aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJan Mercl <0xjnml@gmail.com>2017-07-15 22:00:16 +0200
committerJan Mercl <0xjnml@gmail.com>2017-07-15 22:00:16 +0200
commit1b11dbb188f57e3e9f227bda4796722dc74e233b (patch)
treeca8e1a5dabf2ff67030e401a213eb255a1e19259 /internal
parent43512da12520709267eb7cfa33d9e68ec97a2aaf (diff)
Regenerate Linux/386 using lates CCGO.
modified: internal/bin/bin_linux_386.go modified: internal/mptest/mptest_linux_386.go modified: internal/threadtest1/threadtest1_linux_386.go modified: internal/threadtest2/threadtest2_linux_386.go modified: internal/threadtest3/threadtest3_linux_386.go modified: internal/threadtest4/threadtest4_linux_386.go
Diffstat (limited to 'internal')
-rw-r--r--internal/bin/bin_linux_386.go114478
-rw-r--r--internal/mptest/mptest_linux_386.go1564
-rw-r--r--internal/threadtest1/threadtest1_linux_386.go312
-rw-r--r--internal/threadtest2/threadtest2_linux_386.go106
-rw-r--r--internal/threadtest3/threadtest3_linux_386.go6559
-rw-r--r--internal/threadtest4/threadtest4_linux_386.go568
6 files changed, 62498 insertions, 61089 deletions
diff --git a/internal/bin/bin_linux_386.go b/internal/bin/bin_linux_386.go
index e245d4a..29525ba 100644
--- a/internal/bin/bin_linux_386.go
+++ b/internal/bin/bin_linux_386.go
@@ -30,27 +30,27 @@ uncontaminated with licensed code from other projects.
*/
-// sqlite3.c
-
-// *****************************************************************************
-// This file is an amalgamation of many separate C source files from SQLite
-// version 3.19.3. By combining all the individual C code files into this
-// single large file, the entire code can be compiled as a single translation
-// unit. This allows many compilers to do optimizations that would not be
-// possible if the files were compiled separately. Performance improvements
-// of 5% or more are commonly seen when SQLite is compiled as a single
-// translation unit.
-//
-// This file is all you need to compile SQLite. To use SQLite in other
-// programs, you need this file and the "sqlite3.h" header file that defines
-// the programming interface to the SQLite library. (If you do not have
-// the "sqlite3.h" header file at hand, you will find a copy embedded within
-// the text of this file. Search for "Begin file sqlite3.h" to find the start
-// of the embedded sqlite3.h header file.) Additional code files may be needed
-// if you want a wrapper to interface SQLite with your choice of programming
-// language. The code for the "sqlite3" command-line shell is also in a
-// separate file. This file contains only code for the core SQLite library.
-
+// Package sqlite is an in-process implementation of a self-contained,
+// serverless, zero-configuration, transactional SQL database engine. (Work In Progress)
+// /******************************************************************************
+// ** This file is an amalgamation of many separate C source files from SQLite
+// ** version 3.19.3. By combining all the individual C code files into this
+// ** single large file, the entire code can be compiled as a single translation
+// ** unit. This allows many compilers to do optimizations that would not be
+// ** possible if the files were compiled separately. Performance improvements
+// ** of 5% or more are commonly seen when SQLite is compiled as a single
+// ** translation unit.
+// **
+// ** This file is all you need to compile SQLite. To use SQLite in other
+// ** programs, you need this file and the "sqlite3.h" header file that defines
+// ** the programming interface to the SQLite library. (If you do not have
+// ** the "sqlite3.h" header file at hand, you will find a copy embedded within
+// ** the text of this file. Search for "Begin file sqlite3.h" to find the start
+// ** of the embedded sqlite3.h header file.) Additional code files may be needed
+// ** if you want a wrapper to interface SQLite with your choice of programming
+// ** language. The code for the "sqlite3" command-line shell is also in a
+// ** separate file. This file contains only code for the core SQLite library.
+// */
package bin
import (
@@ -70,8 +70,6 @@ func ftrace(s string, args ...interface{}) {
os.Stderr.Sync()
}
-func Xsqlite3PendingByte() int32 { return _sqlite3PendingByte }
-
const (
XFTS5_TOKENIZE_AUX = 8
XFTS5_TOKENIZE_DOCUMENT = 4
@@ -623,277 +621,213 @@ var X__stdfiles [3]unsafe.Pointer
var Xstdout unsafe.Pointer
func init() {
- Xstdout = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
+ Xstdout = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
}
var Xstderr unsafe.Pointer
func init() {
- Xstderr = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
+ Xstderr = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
}
func Xmain(tls *crt.TLS, _argc int32, _argv **int8) (r0 int32) {
- r0 = i32(0)
- _use(tls, i32(0), Xsqlite3_exec, Xsqlite3_enable_load_extension)
- return
+ return int32(0)
}
-func _use(tls *crt.TLS, _ int32, args ...interface{}) {
+func Xsqlite3PendingByte() int32 { return _sqlite3PendingByte }
+
+// C comment
+// /*
+// ** CAPI3REF: Run-Time Library Version Numbers
+// ** KEYWORDS: sqlite3_version sqlite3_sourceid
+// **
+// ** These interfaces provide the same information as the [SQLITE_VERSION],
+// ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
+// ** but are associated with the library instead of the header file. ^(Cautious
+// ** programmers might include assert() statements in their application to
+// ** verify that values returned by these interfaces match the macros in
+// ** the header, and thus ensure that the application is
+// ** compiled with matching library and header files.
+// **
+// ** <blockquote><pre>
+// ** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
+// ** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
+// ** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
+// ** </pre></blockquote>)^
+// **
+// ** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION]
+// ** macro. ^The sqlite3_libversion() function returns a pointer to the
+// ** to the sqlite3_version[] string constant. The sqlite3_libversion()
+// ** function is provided for use in DLLs since DLL users usually do not have
+// ** direct access to string constants within the DLL. ^The
+// ** sqlite3_libversion_number() function returns an integer equal to
+// ** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns
+// ** a pointer to a string constant whose value is the same as the
+// ** [SQLITE_SOURCE_ID] C preprocessor macro.
+// **
+// ** See also: [sqlite_version()] and [sqlite_source_id()].
+// */
+var Xsqlite3_version [7]int8
+
+func init() {
+ crt.Xstrncpy(nil, &Xsqlite3_version[0], str(0), 7)
}
-// Execute SQL code. Return one of the SQLITE_ success/failure
-// codes. Also write an error message into memory obtained from
-// malloc() and make *pzErrMsg point to that message.
-//
-// If the SQL is a query, then for each row in the query result
-// the xCallback() function is called. pArg becomes the first
-// argument to xCallback(). If xCallback=NULL then no callback
-// is invoked, even for queries.
-func Xsqlite3_exec(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _xCallback func(*crt.TLS, unsafe.Pointer, int32, **int8, **int8) int32, _pArg unsafe.Pointer, _pzErrMsg **int8) (r0 int32) {
- var _rc, _callbackIsInit, _1_nCol, _4_i, _14_nErrMsg int32
- var _zLeftover *int8
- var _pStmt unsafe.Pointer
- var _azCols, _1_azVals **int8
- _rc = i32(0)
- _pStmt = nil
- _azCols = nil
- if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(111141))
+// C comment
+// /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
+// ** a pointer to the to the sqlite3_version[] string constant.
+// */
+func Xsqlite3_libversion(tls *crt.TLS) (r0 *int8) {
+ return (*int8)(unsafe.Pointer(&Xsqlite3_version))
+}
+
+// C comment
+// /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
+// ** pointer to a string constant whose value is the same as the
+// ** SQLITE_SOURCE_ID C preprocessor macro.
+// */
+func Xsqlite3_sourceid(tls *crt.TLS) (r0 *int8) {
+ return str(7)
+}
+
+// C comment
+// /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
+// ** returns an integer equal to SQLITE_VERSION_NUMBER.
+// */
+func Xsqlite3_libversion_number(tls *crt.TLS) (r0 int32) {
+ return int32(3019003)
+}
+
+// C comment
+// /*
+// ** Given the name of a compile-time option, return true if that option
+// ** was used and false if not.
+// **
+// ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
+// ** is not required for a match.
+// */
+func Xsqlite3_compileoption_used(tls *crt.TLS, _zOptName *int8) (r0 int32) {
+ var _i, _n int32
+ if _zOptName == nil {
+ _sqlite3MisuseError(tls, int32(17883))
+ return int32(0)
}
- if _zSql == nil {
- _zSql = str(0)
+ if Xsqlite3_strnicmp(tls, _zOptName, str(92), int32(7)) == int32(0) {
+ *(*uintptr)(unsafe.Pointer(&_zOptName)) += uintptr(int32(7))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _sqlite3Error(tls, _db, i32(0))
+ _n = _sqlite3Strlen30(tls, _zOptName)
+ _i = int32(0)
_2:
- if _rc != i32(0) || (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(0))))) == 0 {
- goto _exec_out
- }
- _1_azVals = nil
- _pStmt = nil
- _rc = Xsqlite3_prepare_v2(tls, _db, _zSql, i32(-1), &_pStmt, &_zLeftover)
- func() {
- if _rc != i32(0) && _pStmt != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(111152), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_execØ00__func__Ø000))), unsafe.Pointer(str(95)))
- crt.X__builtin_abort(tls)
- }
- }()
- if _rc != i32(0) {
- goto _2
- }
- if _pStmt == nil {
- _zSql = _zLeftover
- goto _2
- }
- _callbackIsInit = i32(0)
- _1_nCol = Xsqlite3_column_count(tls, _pStmt)
-_10:
- _rc = Xsqlite3_step(tls, _pStmt)
- if _xCallback == nil || i32(100) != _rc && (i32(101) != _rc || _callbackIsInit != 0 || ((_db.X6)&i32(256)) == 0) {
- goto _16
- }
- if _callbackIsInit != 0 {
- goto _17
- }
- _azCols = (**int8)(_sqlite3DbMallocRaw(tls, _db, uint64(uint32((i32(2)*_1_nCol)+i32(1))*u32(4))))
- if _azCols == nil {
- goto _exec_out
- }
- _4_i = i32(0)
-_19:
- if _4_i >= _1_nCol {
- goto _22
- }
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azCols)) + 4*uintptr(_4_i))) = Xsqlite3_column_name(tls, _pStmt, _4_i)
- func() {
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azCols)) + 4*uintptr(_4_i)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(111182), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_execØ00__func__Ø000))), unsafe.Pointer(str(121)))
- crt.X__builtin_abort(tls)
- }
- }()
- _4_i += 1
- goto _19
-_22:
- _callbackIsInit = i32(1)
-_17:
- if _rc != i32(100) {
- goto _25
- }
- _1_azVals = (**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azCols)) + 4*uintptr(_1_nCol)))
- _4_i = i32(0)
-_26:
- if _4_i >= _1_nCol {
- goto _29
- }
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_azVals)) + 4*uintptr(_4_i))) = (*int8)(unsafe.Pointer(Xsqlite3_column_text(tls, _pStmt, _4_i)))
- if ((*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_azVals)) + 4*uintptr(_4_i)))) == nil) && (Xsqlite3_column_type(tls, _pStmt, _4_i) != i32(5)) {
- _sqlite3OomFault(tls, _db)
- goto _exec_out
- }
- _4_i += 1
- goto _26
-_29:
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_azVals)) + 4*uintptr(_4_i))) = nil
-_25:
- if _xCallback(tls, _pArg, _1_nCol, _1_azVals, _azCols) != 0 {
- _rc = i32(4)
- _sqlite3VdbeFinalize(tls, (*TVdbe)(_pStmt))
- _pStmt = nil
- _sqlite3Error(tls, _db, i32(4))
- goto _exec_out
+ if _i >= int32(6) {
+ goto _5
}
-_16:
- if _rc == i32(100) {
- goto _33
+ if (Xsqlite3_strnicmp(tls, _zOptName, *elem0((**int8)(unsafe.Pointer(&_azCompileOpt)), uintptr(_i)), _n) == int32(0)) && (_sqlite3IsIdChar(tls, uint8(*elem1(*elem0((**int8)(unsafe.Pointer(&_azCompileOpt)), uintptr(_i)), uintptr(_n)))) == int32(0)) {
+ return int32(1)
}
- _rc = _sqlite3VdbeFinalize(tls, (*TVdbe)(_pStmt))
- _pStmt = nil
- _zSql = _zLeftover
-_34:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(0))))))))) & i32(1)) != 0 {
- *(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(1)
- goto _34
- }
- goto _11
-_33:
- goto _10
-_11:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_azCols))
- _azCols = nil
+ _i += 1
goto _2
-_exec_out:
- if _pStmt != nil {
- _sqlite3VdbeFinalize(tls, (*TVdbe)(_pStmt))
- }
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_azCols))
- _rc = _sqlite3ApiExit(tls, _db, _rc)
- if _rc == i32(0) || _pzErrMsg == nil {
- goto _38
- }
- _14_nErrMsg = i32(1) + _sqlite3Strlen30(tls, Xsqlite3_errmsg(tls, _db))
- *_pzErrMsg = (*int8)(_sqlite3Malloc(tls, uint64(_14_nErrMsg)))
- if (*_pzErrMsg) != nil {
- crt.Xmemcpy(tls, (unsafe.Pointer)(*_pzErrMsg), (unsafe.Pointer)(Xsqlite3_errmsg(tls, _db)), uint32(_14_nErrMsg))
- goto _40
- }
- _rc = _sqlite3NomemError(tls, i32(111233))
- _sqlite3Error(tls, _db, i32(7))
-_40:
- goto _42
-_38:
- if _pzErrMsg != nil {
- *_pzErrMsg = nil
- }
-_42:
- func() {
- if (_rc & (_db.X11)) != _rc {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(111240), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_execØ00__func__Ø000))), unsafe.Pointer(str(134)))
- crt.X__builtin_abort(tls)
- }
- }()
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return _rc
-}
-
-// Check to make sure we have a valid db pointer. This test is not
-// foolproof but it does provide some measure of protection against
-// misuse of the interface such as passing in db pointers that are
-// NULL or which have been previously closed. If this routine returns
-// 1 it means that the db pointer is valid and 0 if it should not be
-// dereferenced for any reason. The calling function should invoke
-// SQLITE_MISUSE immediately.
-//
-// sqlite3SafetyCheckOk() requires that the db pointer be valid for
-// use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to
-// open properly and is not fit for general use but which can be
-// used as an argument to sqlite3_errmsg() or sqlite3_close().
-func _sqlite3SafetyCheckOk(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
- var _magic uint32
- if _db == nil {
- _logBadConnection(tls, str(155))
- return i32(0)
- }
- _magic = _db.X28
- if _magic == u32(2687084183) {
- goto _1
- }
- if _sqlite3SafetyCheckSickOrOk(tls, _db) != 0 {
- _logBadConnection(tls, str(160))
- }
- return i32(0)
-
-_1:
- return i32(1)
+_5:
+ return int32(0)
}
-// Log an error that is an API call on a connection pointer that should
-// not have been used. The "type" of connection pointer is given as the
-// argument. The zType is a word like "NULL" or "closed" or "invalid".
-func _logBadConnection(tls *crt.TLS, _zType *int8) {
- Xsqlite3_log(tls, i32(21), str(169), unsafe.Pointer(_zType))
+func _sqlite3MisuseError(tls *crt.TLS, _lineno int32) (r0 int32) {
+ return _reportError(tls, int32(21), _lineno, str(100))
+}
+
+// C comment
+// /*
+// ** The following routines are substitutes for constants SQLITE_CORRUPT,
+// ** SQLITE_MISUSE, SQLITE_CANTOPEN, SQLITE_NOMEM and possibly other error
+// ** constants. They serve two purposes:
+// **
+// ** 1. Serve as a convenient place to set a breakpoint in a debugger
+// ** to detect when version error conditions occurs.
+// **
+// ** 2. Invoke sqlite3_log() to provide the source code location where
+// ** a low-level error is first detected.
+// */
+func _reportError(tls *crt.TLS, _iErr int32, _lineno int32, _zType *int8) (r0 int32) {
+ Xsqlite3_log(tls, _iErr, str(107), unsafe.Pointer(_zType), _lineno, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(int32(20))+uintptr(unsafe.Pointer(Xsqlite3_sourceid(tls)))))))
+ return _iErr
}
-// Format and write a message to the log if logging is enabled.
+// C comment
+// /*
+// ** Format and write a message to the log if logging is enabled.
+// */
func Xsqlite3_log(tls *crt.TLS, _iErrCode int32, _zFormat *int8, args ...interface{}) {
var _ap []interface{}
- if (_sqlite3Config.X35) != nil {
+ if _sqlite3Config.XxLog != nil {
_ap = args
_renderLogMsg(tls, _iErrCode, _zFormat, _ap)
_ap = nil
}
}
+// C comment
+// /*
+// ** The following singleton contains the global configuration for
+// ** the SQLite library.
+// */
var _sqlite3Config TSqlite3Config
func init() {
- _sqlite3Config = TSqlite3Config{X0: i32(1), X1: i32(1), X2: i32(1), X3: i32(1), X4: i32(1), X5: i32(2147483646), X6: i32(0), X7: i32(1200), X8: i32(100), X9: i32(65536), X10: Xsqlite3_mem_methods{}, X11: Xsqlite3_mutex_methods{}, X12: Xsqlite3_pcache_methods2{}, X13: nil, X14: i32(0), X15: i32(0), X16: i32(0), X17: i64(0), X18: i64(2147418112), X19: nil, X20: i32(0), X21: i32(0), X22: nil, X23: i32(0), X24: i32(20), X25: i32(0), X26: i32(0), X27: u32(250), X28: i32(0), X29: i32(0), X30: i32(0), X31: i32(0), X32: i32(0), X33: i32(0), X34: nil, X35: nil, X36: nil, X37: nil, X38: i32(0), X39: i32(2147483646)}
-}
-
-// This is the routine that actually formats the sqlite3_log() message.
-// We house it in a separate routine from sqlite3_log() to avoid using
-// stack space on small-stack systems when logging is disabled.
-//
-// sqlite3_log() must render into a static buffer. It cannot dynamically
-// allocate memory because it might be called while the memory allocator
-// mutex is held.
-//
-// sqlite3VXPrintf() might ask for *temporary* memory allocations for
-// certain format characters (%q) or for very large precisions or widths.
-// Care must be taken that any sqlite3_log() calls that occur while the
-// memory mutex is held do not use these mechanisms.
+ _sqlite3Config = TSqlite3Config{XbMemstat: int32(1), XbCoreMutex: int32(1), XbFullMutex: int32(1), XbOpenUri: int32(1), XbUseCis: int32(1), XmxStrlen: int32(2147483646), XszLookaside: int32(1200), XnLookaside: int32(100), XnStmtSpill: int32(65536), XmxMmap: int64(2147418112), XnPage: int32(20), XszPma: uint32(250), XiOnceResetThreshold: int32(2147483646)}
+}
+
+// C comment
+// /*
+// ** This is the routine that actually formats the sqlite3_log() message.
+// ** We house it in a separate routine from sqlite3_log() to avoid using
+// ** stack space on small-stack systems when logging is disabled.
+// **
+// ** sqlite3_log() must render into a static buffer. It cannot dynamically
+// ** allocate memory because it might be called while the memory allocator
+// ** mutex is held.
+// **
+// ** sqlite3VXPrintf() might ask for *temporary* memory allocations for
+// ** certain format characters (%q) or for very large precisions or widths.
+// ** Care must be taken that any sqlite3_log() calls that occur while the
+// ** memory mutex is held do not use these mechanisms.
+// */
func _renderLogMsg(tls *crt.TLS, _iErrCode int32, _zFormat *int8, _ap []interface{}) {
var _acc XStrAccum
var _zMsg [210]int8
- _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zMsg)), int32(u32(210)), i32(0))
+ _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zMsg)), int32(210), int32(0))
_sqlite3VXPrintf(tls, &_acc, _zFormat, _ap)
- (_sqlite3Config.X35)(tls, _sqlite3Config.X36, _iErrCode, _sqlite3StrAccumFinish(tls, &_acc))
- _ = _acc
+ _sqlite3Config.XxLog(tls, _sqlite3Config.XpLogArg, _iErrCode, _sqlite3StrAccumFinish(tls, &_acc))
_ = _zMsg
}
-// Initialize a string accumulator.
-//
-// p: The accumulator to be initialized.
-// db: Pointer to a database connection. May be NULL. Lookaside
-// memory is used if not NULL. db->mallocFailed is set appropriately
-// when not NULL.
-// zBase: An initial buffer. May be NULL in which case the initial buffer
-// is malloced.
-// n: Size of zBase in bytes. If total space requirements never exceed
-// n then no memory allocations ever occur.
-// mx: Maximum number of bytes to accumulate. If mx==0 then no memory
-// allocations will ever occur.
+// C comment
+// /*
+// ** Initialize a string accumulator.
+// **
+// ** p: The accumulator to be initialized.
+// ** db: Pointer to a database connection. May be NULL. Lookaside
+// ** memory is used if not NULL. db->mallocFailed is set appropriately
+// ** when not NULL.
+// ** zBase: An initial buffer. May be NULL in which case the initial buffer
+// ** is malloced.
+// ** n: Size of zBase in bytes. If total space requirements never exceed
+// ** n then no memory allocations ever occur.
+// ** mx: Maximum number of bytes to accumulate. If mx==0 then no memory
+// ** allocations will ever occur.
+// */
func _sqlite3StrAccumInit(tls *crt.TLS, _p *XStrAccum, _db *Xsqlite3, _zBase *int8, _n int32, _mx int32) {
- *(**int8)(unsafe.Pointer(&(_p.X2))) = store0((**int8)(unsafe.Pointer(&(_p.X1))), _zBase)
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _db
- *(*uint32)(unsafe.Pointer(&(_p.X3))) = uint32(i32(0))
- *(*uint32)(unsafe.Pointer(&(_p.X4))) = uint32(_n)
- *(*uint32)(unsafe.Pointer(&(_p.X5))) = uint32(_mx)
- *(*uint8)(unsafe.Pointer(&(_p.X6))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_p.X7))) = uint8(i32(0))
-}
-
-// Render a string given by "fmt" into the StrAccum object.
+ _p.XzText = store1(&_p.XzBase, _zBase)
+ *(**Xsqlite3)(unsafe.Pointer(&_p.Xdb)) = _db
+ _p.XnChar = 0
+ _p.XnAlloc = uint32(_n)
+ _p.XmxAlloc = uint32(_mx)
+ _p.XaccError = 0
+ _p.XprintfFlags = 0
+}
+
+// C comment
+// /*
+// ** Render a string given by "fmt" into the StrAccum object.
+// */
func _sqlite3VXPrintf(tls *crt.TLS, _pAccum *XStrAccum, _fmt *int8, _ap []interface{}) {
var _c, _precision, _length, _idx, _width, _nOut, _exp, _e2, _nsd, _49_x, _54_nn, _54_ix, _96_i, _96_nPad, _110_i, _110_j, _110_k, _110_n, _110_isnull, _110_needQuote, _120_k int32
var _29_v int64
@@ -909,89 +843,89 @@ func _sqlite3VXPrintf(tls *crt.TLS, _pAccum *XStrAccum, _fmt *int8, _ap []interf
var _118_pToken *XToken
var _120_pSrc *XSrcList
var _120_pItem *TSrcList_item
- _xtype = u8(17)
+ _xtype = uint8(17)
_zExtra = nil
_pArgList = nil
_bufpt = nil
- if (int32(_pAccum.X7) & i32(2)) != i32(0) {
+ if (int32(_pAccum.XprintfFlags) & int32(2)) != int32(0) {
_pArgList = (*XPrintfArguments)(crt.VAPointer(&_ap))
- _bArgList = uint8(i32(1))
+ _bArgList = uint8(1)
goto _1
}
- _bArgList = uint8(i32(0))
+ _bArgList = 0
_1:
- if store1(&_c, int32(*_fmt)) == i32(0) {
+ if store2(&_c, int32(*_fmt)) == int32(0) {
goto _5
}
- if _c == i32(37) {
+ if _c == int32(37) {
goto _6
}
_bufpt = _fmt
_7:
*(*uintptr)(unsafe.Pointer(&_fmt)) += uintptr(1)
- if ((*_fmt) != 0) && (int32(*_fmt) != i32(37)) {
+ if ((*_fmt) != 0) && (int32(*_fmt) != int32(37)) {
goto _7
}
- _sqlite3StrAccumAppend(tls, _pAccum, _bufpt, int32((uintptr(unsafe.Pointer(_fmt))-uintptr(unsafe.Pointer(_bufpt)))/1))
- if int32(*_fmt) == i32(0) {
+ _sqlite3StrAccumAppend(tls, _pAccum, _bufpt, int32(uintptr(unsafe.Pointer(_fmt))-uintptr(unsafe.Pointer(_bufpt))))
+ if int32(*_fmt) == int32(0) {
goto _5
}
_6:
- if store1(&_c, int32(*preInc0(&_fmt, 1))) == i32(0) {
- _sqlite3StrAccumAppend(tls, _pAccum, str(214), i32(1))
+ if store2(&_c, int32(*preInc1(&_fmt, 1))) == int32(0) {
+ _sqlite3StrAccumAppend(tls, _pAccum, str(132), int32(1))
goto _5
}
- _flag_leftjustify = store2(&_flag_prefix, store2(&_cThousand, store2(&_flag_alternateform, store2(&_flag_altform2, store2(&_flag_zeropad, uint8(i32(0)))))))
- _done = uint8(i32(0))
+ _flag_leftjustify = store3(&_flag_prefix, store3(&_cThousand, store3(&_flag_alternateform, store3(&_flag_altform2, store3(&_flag_zeropad, 0)))))
+ _done = 0
_11:
switch _c {
- case i32(32):
+ case int32(32):
goto _15
- case i32(33):
+ case int32(33):
goto _17
- case i32(35):
+ case int32(35):
goto _16
- case i32(43):
+ case int32(43):
goto _14
- case i32(44):
+ case int32(44):
goto _19
- case i32(45):
+ case int32(45):
goto _13
- case i32(48):
+ case int32(48):
goto _18
default:
goto _20
}
_13:
- _flag_leftjustify = uint8(i32(1))
+ _flag_leftjustify = uint8(1)
goto _21
_14:
- _flag_prefix = uint8(i32(43))
+ _flag_prefix = uint8(43)
goto _21
_15:
- _flag_prefix = uint8(i32(32))
+ _flag_prefix = uint8(32)
goto _21
_16:
- _flag_alternateform = uint8(i32(1))
+ _flag_alternateform = uint8(1)
goto _21
_17:
- _flag_altform2 = uint8(i32(1))
+ _flag_altform2 = uint8(1)
goto _21
_18:
- _flag_zeropad = uint8(i32(1))
+ _flag_zeropad = uint8(1)
goto _21
_19:
- _cThousand = uint8(i32(44))
+ _cThousand = uint8(44)
goto _21
_20:
- _done = uint8(i32(1))
+ _done = uint8(1)
goto _21
_21:
- if (_done == 0) && (store1(&_c, int32(*preInc0(&_fmt, 1))) != i32(0)) {
+ if (_done == 0) && (store2(&_c, int32(*preInc1(&_fmt, 1))) != int32(0)) {
goto _11
}
- if _c != i32(42) {
+ if _c != int32(42) {
goto _23
}
if _bArgList != 0 {
@@ -1000,38 +934,38 @@ _21:
}
_width = crt.VAInt32(&_ap)
_25:
- if _width < i32(0) {
- _flag_leftjustify = uint8(i32(1))
+ if _width < int32(0) {
+ _flag_leftjustify = uint8(1)
_width = func() int32 {
- if _width >= i32(-2147483647) {
+ if _width >= int32(-2147483647) {
return (-_width)
}
- return i32(0)
+ return int32(0)
}()
}
- _c = int32(*preInc0(&_fmt, 1))
+ _c = int32(*preInc1(&_fmt, 1))
goto _29
_23:
- _13_wx = uint32(i32(0))
+ _13_wx = 0
_30:
- if (_c >= i32(48)) && (_c <= i32(57)) {
- _13_wx = ((_13_wx * uint32(i32(10))) + uint32(_c)) - uint32(i32(48))
- _c = int32(*preInc0(&_fmt, 1))
+ if (_c >= int32(48)) && (_c <= int32(57)) {
+ _13_wx = ((_13_wx * uint32(10)) + uint32(_c)) - uint32(48)
+ _c = int32(*preInc1(&_fmt, 1))
goto _30
}
- _width = int32(_13_wx & uint32(i32(2147483647)))
+ _width = int32(_13_wx & uint32(2147483647))
_29:
func() {
- if _width < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25327), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000))), unsafe.Pointer(str(216)))
+ if _width < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25327), unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000), unsafe.Pointer(str(228)))
crt.X__builtin_abort(tls)
}
}()
- if _c != i32(46) {
+ if _c != int32(46) {
goto _35
}
- _c = int32(*preInc0(&_fmt, 1))
- if _c != i32(42) {
+ _c = int32(*preInc1(&_fmt, 1))
+ if _c != int32(42) {
goto _36
}
if _bArgList != 0 {
@@ -1040,109 +974,109 @@ _29:
}
_precision = crt.VAInt32(&_ap)
_38:
- _c = int32(*preInc0(&_fmt, 1))
- if _precision < i32(0) {
+ _c = int32(*preInc1(&_fmt, 1))
+ if _precision < int32(0) {
_precision = func() int32 {
- if _precision >= i32(-2147483647) {
+ if _precision >= int32(-2147483647) {
return (-_precision)
}
- return i32(-1)
+ return int32(-1)
}()
}
goto _42
_36:
- _20_px = uint32(i32(0))
+ _20_px = 0
_43:
- if (_c >= i32(48)) && (_c <= i32(57)) {
- _20_px = ((_20_px * uint32(i32(10))) + uint32(_c)) - uint32(i32(48))
- _c = int32(*preInc0(&_fmt, 1))
+ if (_c >= int32(48)) && (_c <= int32(57)) {
+ _20_px = ((_20_px * uint32(10)) + uint32(_c)) - uint32(48)
+ _c = int32(*preInc1(&_fmt, 1))
goto _43
}
- _precision = int32(_20_px & uint32(i32(2147483647)))
+ _precision = int32(_20_px & uint32(2147483647))
_42:
goto _46
_35:
- _precision = i32(-1)
+ _precision = int32(-1)
_46:
func() {
- if _precision < i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25359), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000))), unsafe.Pointer(str(225)))
+ if _precision < int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25359), unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000), unsafe.Pointer(str(237)))
crt.X__builtin_abort(tls)
}
}()
- if _c != i32(108) {
+ if _c != int32(108) {
goto _49
}
- _flag_long = uint8(i32(1))
- _c = int32(*preInc0(&_fmt, 1))
- if _c == i32(108) {
- _flag_long = uint8(i32(2))
- _c = int32(*preInc0(&_fmt, 1))
+ _flag_long = uint8(1)
+ _c = int32(*preInc1(&_fmt, 1))
+ if _c == int32(108) {
+ _flag_long = uint8(2)
+ _c = int32(*preInc1(&_fmt, 1))
}
goto _51
_49:
- _flag_long = uint8(i32(0))
+ _flag_long = 0
_51:
- _infop = (*Xet_info)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_fmtinfo)) + 6*uintptr(i32(0))))
- _xtype = uint8(i32(17))
- _idx = i32(0)
+ _infop = elem4((*Xet_info)(unsafe.Pointer(&_fmtinfo)), 0)
+ _xtype = uint8(17)
+ _idx = int32(0)
_52:
- if _idx >= i32(23) {
+ if _idx >= int32(23) {
goto _55
}
- if _c == int32((*Xet_info)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_fmtinfo))+6*uintptr(_idx))).X0) {
- _infop = (*Xet_info)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_fmtinfo)) + 6*uintptr(_idx)))
- _xtype = _infop.X3
+ if _c == int32(elem4((*Xet_info)(unsafe.Pointer(&_fmtinfo)), uintptr(_idx)).Xfmttype) {
+ _infop = elem4((*Xet_info)(unsafe.Pointer(&_fmtinfo)), uintptr(_idx))
+ _xtype = _infop.Xtype
goto _55
}
_idx += 1
goto _52
_55:
switch int32(_xtype) {
- case i32(0):
+ case int32(0):
goto _59
- case i32(1):
+ case int32(1):
goto _62
- case i32(2):
+ case int32(2):
goto _62
- case i32(3):
+ case int32(3):
goto _62
- case i32(4):
+ case int32(4):
goto _65
- case i32(5):
+ case int32(5):
goto _68
- case i32(6):
+ case int32(6):
goto _68
- case i32(7):
+ case int32(7):
goto _66
- case i32(8):
+ case int32(8):
goto _67
- case i32(9):
+ case int32(9):
goto _70
- case i32(10):
+ case int32(10):
goto _70
- case i32(11):
+ case int32(11):
goto _73
- case i32(12):
+ case int32(12):
goto _74
- case i32(13):
+ case int32(13):
goto _58
- case i32(14):
+ case int32(14):
goto _70
- case i32(15):
+ case int32(15):
goto _59
- case i32(16):
+ case int32(16):
goto _61
default:
goto _75
}
_58:
- _flag_long = uint8(i32(1))
+ _flag_long = uint8(1)
_59:
- _cThousand = uint8(i32(0))
+ _cThousand = 0
_61:
- if (int32(_infop.X2) & i32(1)) == 0 {
+ if (int32(_infop.Xflags) & int32(1)) == 0 {
goto _76
}
if _bArgList != 0 {
@@ -1152,7 +1086,7 @@ _61:
if _flag_long == 0 {
goto _79
}
- if int32(_flag_long) == i32(2) {
+ if int32(_flag_long) == int32(2) {
_29_v = crt.VAInt64(&_ap)
goto _81
}
@@ -1162,16 +1096,16 @@ _81:
_79:
_29_v = int64(crt.VAInt32(&_ap))
_82:
- if _29_v >= int64(i32(0)) {
+ if _29_v >= (0) {
goto _83
}
- if _29_v == i64(-9223372036854775808) {
- _longvalue = u64(9223372036854775808)
+ if _29_v == int64(-9223372036854775808) {
+ _longvalue = uint64(9223372036854775808)
goto _85
}
_longvalue = uint64(-_29_v)
_85:
- _prefix = int8(i32(45))
+ _prefix = int8(45)
goto _86
_83:
_longvalue = uint64(_29_v)
@@ -1186,7 +1120,7 @@ _76:
if _flag_long == 0 {
goto _90
}
- if int32(_flag_long) == i32(2) {
+ if int32(_flag_long) == int32(2) {
_longvalue = crt.VAUint64(&_ap)
goto _92
}
@@ -1196,96 +1130,92 @@ _92:
_90:
_longvalue = uint64(crt.VAUint32(&_ap))
_93:
- _prefix = int8(i32(0))
+ _prefix = 0
_87:
- if _longvalue == uint64(i32(0)) {
- _flag_alternateform = uint8(i32(0))
+ if _longvalue == (0) {
+ _flag_alternateform = 0
}
- if (_flag_zeropad != 0) && (_precision < (_width - bool2int(int32(_prefix) != i32(0)))) {
- _precision = _width - bool2int(int32(_prefix) != i32(0))
+ if (_flag_zeropad != 0) && (_precision < (_width - bool2int(int32(_prefix) != int32(0)))) {
+ _precision = _width - bool2int(int32(_prefix) != int32(0))
}
- if _precision < i32(37) {
- _nOut = i32(70)
+ if _precision < int32(37) {
+ _nOut = int32(70)
_zOut = (*int8)(unsafe.Pointer(&_buf))
goto _98
}
- _47_n = (uint64(_precision) + uint64(i32(10))) + uint64(_precision/i32(3))
- _zOut = store0(&_zExtra, (*int8)(_sqlite3Malloc(tls, _47_n)))
+ _47_n = (uint64(_precision) + uint64(10)) + uint64(_precision/int32(3))
+ _zOut = store1(&_zExtra, (*int8)(_sqlite3Malloc(tls, _47_n)))
if _zOut == nil {
- _setStrAccumError(tls, _pAccum, uint8(i32(1)))
+ _setStrAccumError(tls, _pAccum, uint8(1))
return
}
_nOut = int32(_47_n)
_98:
- _bufpt = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(_nOut-i32(1))))
- if int32(_xtype) != i32(15) {
+ _bufpt = elem1(_zOut, uintptr(_nOut-int32(1)))
+ if int32(_xtype) != int32(15) {
goto _100
}
- _49_x = int32(_longvalue % uint64(i32(10)))
- if (_49_x >= i32(4)) || (((_longvalue / uint64(i32(10))) % uint64(i32(10))) == uint64(i32(1))) {
- _49_x = i32(0)
+ _49_x = int32(_longvalue % uint64(10))
+ if (_49_x >= int32(4)) || (((_longvalue / uint64(10)) % uint64(10)) == uint64(1)) {
+ _49_x = int32(0)
}
- *preInc0(&_bufpt, -1) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3VXPrintfØ00zOrdØ001)) + 1*uintptr((_49_x*i32(2))+i32(1))))
- *preInc0(&_bufpt, -1) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3VXPrintfØ00zOrdØ001)) + 1*uintptr(_49_x*i32(2))))
+ *preInc1(&_bufpt, -1) = *elem1((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00zOrdØ001)), uintptr((_49_x*int32(2))+int32(1)))
+ *preInc1(&_bufpt, -1) = *elem1((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00zOrdØ001)), uintptr(_49_x*int32(2)))
_100:
- _51_cset = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aDigits)) + 1*uintptr(_infop.X4)))
- _51_base = _infop.X1
+ _51_cset = elem1((*int8)(unsafe.Pointer(&_aDigits)), uintptr(_infop.Xcharset))
+ _51_base = _infop.Xbase
_103:
- *preInc0(&_bufpt, -1) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_51_cset)) + 1*uintptr(_longvalue%uint64(_51_base))))
+ *preInc1(&_bufpt, -1) = *elem1(_51_cset, uintptr(_longvalue%uint64(_51_base)))
_longvalue = _longvalue / uint64(_51_base)
- if _longvalue > uint64(i32(0)) {
+ if _longvalue > (0) {
goto _103
}
- _length = int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut))+1*uintptr(_nOut-i32(1)))))) - uintptr(unsafe.Pointer(_bufpt))) / 1)
+ _length = int32(uintptr(unsafe.Pointer(elem1(_zOut, uintptr(_nOut-int32(1))))) - uintptr(unsafe.Pointer(_bufpt)))
_104:
if _precision > _length {
- *preInc0(&_bufpt, -1) = int8(i32(48))
+ *preInc1(&_bufpt, -1) = int8(48)
_length += 1
goto _104
}
if _cThousand == 0 {
goto _106
}
- _54_nn = (_length - i32(1)) / i32(3)
- _54_ix = ((_length - i32(1)) % i32(3)) + i32(1)
- {
- p := &_bufpt
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 1*uintptr(_54_nn)))
- sink0(*p)
- }
- _idx = i32(0)
+ _54_nn = (_length - int32(1)) / int32(3)
+ _54_ix = ((_length - int32(1)) % int32(3)) + int32(1)
+ *(*uintptr)(unsafe.Pointer(&_bufpt)) -= uintptr(_54_nn)
+ _idx = int32(0)
_107:
- if _54_nn <= i32(0) {
+ if _54_nn <= int32(0) {
goto _110
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(_idx))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(_idx+_54_nn)))
+ *elem1(_bufpt, uintptr(_idx)) = *elem1(_bufpt, uintptr(_idx+_54_nn))
_54_ix -= 1
- if _54_ix == i32(0) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(preInc1(&_idx, 1)))) = int8(_cThousand)
+ if _54_ix == int32(0) {
+ *elem1(_bufpt, uintptr(preInc2(&_idx, 1))) = int8(_cThousand)
_54_nn -= 1
- _54_ix = i32(3)
+ _54_ix = int32(3)
}
_idx += 1
goto _107
_110:
_106:
if _prefix != 0 {
- *preInc0(&_bufpt, -1) = _prefix
+ *preInc1(&_bufpt, -1) = _prefix
}
- if _flag_alternateform == 0 || (_infop.X5) == 0 {
+ if _flag_alternateform == 0 || _infop.Xprefix == 0 {
goto _114
}
- _57_pre = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPrefix)) + 1*uintptr(_infop.X5)))
+ _57_pre = elem1((*int8)(unsafe.Pointer(&_aPrefix)), uintptr(_infop.Xprefix))
_115:
- if int32(store3(&_57_x, *_57_pre)) == i32(0) {
+ if int32(store5(&_57_x, *_57_pre)) == int32(0) {
goto _118
}
- *preInc0(&_bufpt, -1) = _57_x
+ *preInc1(&_bufpt, -1) = _57_x
*(*uintptr)(unsafe.Pointer(&_57_pre)) += uintptr(1)
goto _115
_118:
_114:
- _length = int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut))+1*uintptr(_nOut-i32(1)))))) - uintptr(unsafe.Pointer(_bufpt))) / 1)
+ _length = int32(uintptr(unsafe.Pointer(elem1(_zOut, uintptr(_nOut-int32(1))))) - uintptr(unsafe.Pointer(_bufpt)))
goto _119
_62:
if _bArgList != 0 {
@@ -1294,42 +1224,34 @@ _62:
}
_realvalue = crt.VAOther(&_ap).(float64)
_121:
- if _precision < i32(0) {
- _precision = i32(6)
+ if _precision < int32(0) {
+ _precision = int32(6)
}
if _realvalue < float64(0) {
_realvalue = -_realvalue
- _prefix = int8(i32(45))
+ _prefix = int8(45)
goto _124
}
_prefix = int8(_flag_prefix)
_124:
- if (int32(_xtype) == i32(3)) && (_precision > i32(0)) {
+ if (int32(_xtype) == int32(3)) && (_precision > int32(0)) {
_precision -= 1
}
- *func() *float64 { _idx = _precision & i32(4095); return &_rounder }() = 0.5
+ *func() *float64 { _idx = _precision & int32(4095); return &_rounder }() = 0.5
_127:
- if _idx <= i32(0) {
+ if _idx <= int32(0) {
goto _130
}
- {
- p := func() *float64 { _idx -= 1; return &_rounder }()
- *p = (*p) * (0.1)
- sink4(*p)
- }
+ *func() *float64 { _idx -= 1; return &_rounder }() *= 0.1
goto _127
_130:
- if int32(_xtype) == i32(1) {
- {
- p := &_realvalue
- *p = (*p) + _rounder
- sink4(*p)
- }
+ if int32(_xtype) == int32(1) {
+ _realvalue += _rounder
}
- _exp = i32(0)
+ _exp = int32(0)
if _sqlite3IsNaN(tls, _realvalue) != 0 {
- _bufpt = str(241)
- _length = i32(3)
+ _bufpt = str(253)
+ _length = int32(3)
goto _119
}
if _realvalue <= float64(0) {
@@ -1337,233 +1259,185 @@ _130:
}
_64_scale = float64(1)
_134:
- if (_realvalue >= (float64(1e+100) * _64_scale)) && (_exp <= i32(350)) {
- {
- p := &_64_scale
- *p = (*p) * float64(1e+100)
- sink4(*p)
- }
- {
- p := &_exp
- *p = (*p) + i32(100)
- sink1(*p)
- }
+ if (_realvalue >= (float64(1e+100) * _64_scale)) && (_exp <= int32(350)) {
+ _64_scale *= float64(1e+100)
+ _exp += int32(100)
goto _134
}
_135:
- if (_realvalue >= (float64(1e+10) * _64_scale)) && (_exp <= i32(350)) {
- {
- p := &_64_scale
- *p = (*p) * float64(1e+10)
- sink4(*p)
- }
- {
- p := &_exp
- *p = (*p) + i32(10)
- sink1(*p)
- }
+ if (_realvalue >= (float64(1e+10) * _64_scale)) && (_exp <= int32(350)) {
+ _64_scale *= float64(1e+10)
+ _exp += int32(10)
goto _135
}
_138:
- if (_realvalue >= (float64(10) * _64_scale)) && (_exp <= i32(350)) {
- {
- p := &_64_scale
- *p = (*p) * float64(10)
- sink4(*p)
- }
+ if (_realvalue >= (float64(10) * _64_scale)) && (_exp <= int32(350)) {
+ _64_scale *= float64(10)
_exp += 1
goto _138
}
- {
- p := &_realvalue
- *p = (*p) / _64_scale
- sink4(*p)
- }
+ _realvalue /= _64_scale
_143:
if _realvalue < float64(1e-08) {
- {
- p := &_realvalue
- *p = (*p) * float64(1e+08)
- sink4(*p)
- }
- {
- p := &_exp
- *p = (*p) - i32(8)
- sink1(*p)
- }
+ _realvalue *= float64(1e+08)
+ _exp -= int32(8)
goto _143
}
_144:
if _realvalue < float64(1) {
- {
- p := &_realvalue
- *p = (*p) * float64(10)
- sink4(*p)
- }
+ _realvalue *= float64(10)
_exp -= 1
goto _144
}
- if _exp > i32(350) {
+ if _exp > int32(350) {
_bufpt = (*int8)(unsafe.Pointer(&_buf))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_buf)) + 1*uintptr(i32(0)))) = _prefix
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&_buf))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(bool2int(int32(_prefix) != i32(0)))))))))), (unsafe.Pointer)(str(245)), uint32(i32(4)))
- _length = i32(3) + bool2int(int32(_prefix) != i32(0))
+ *elem1((*int8)(unsafe.Pointer(&_buf)), 0) = _prefix
+ crt.Xmemcpy(tls, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_buf))+uintptr(bool2int(int32(_prefix) != int32(0)))))), unsafe.Pointer(str(257)), uint32(4))
+ _length = int32(3) + bool2int(int32(_prefix) != int32(0))
goto _119
}
_133:
_bufpt = (*int8)(unsafe.Pointer(&_buf))
- if int32(_xtype) == i32(1) {
+ if int32(_xtype) == int32(1) {
goto _148
}
- {
- p := &_realvalue
- *p = (*p) + _rounder
- sink4(*p)
- }
+ _realvalue += _rounder
if _realvalue >= float64(10) {
- {
- p := &_realvalue
- *p = (*p) * (0.1)
- sink4(*p)
- }
+ _realvalue *= 0.1
_exp += 1
}
_148:
- if int32(_xtype) != i32(3) {
+ if int32(_xtype) != int32(3) {
goto _150
}
_flag_rtz = uint8(bool2int(_flag_alternateform == 0))
- if (_exp < i32(-4)) || (_exp > _precision) {
- _xtype = uint8(i32(2))
+ if (_exp < int32(-4)) || (_exp > _precision) {
+ _xtype = uint8(2)
goto _153
}
_precision = _precision - _exp
- _xtype = uint8(i32(1))
+ _xtype = uint8(1)
_153:
goto _154
_150:
_flag_rtz = _flag_altform2
_154:
- if int32(_xtype) == i32(2) {
- _e2 = i32(0)
+ if int32(_xtype) == int32(2) {
+ _e2 = int32(0)
goto _156
}
_e2 = _exp
_156:
if ((int64(func() int32 {
- if _e2 > i32(0) {
+ if _e2 > int32(0) {
return _e2
}
- return i32(0)
- }()) + int64(_precision)) + int64(_width)) <= int64(i32(55)) {
+ return int32(0)
+ }()) + int64(_precision)) + int64(_width)) <= int64(55) {
goto _159
}
- _bufpt = store0(&_zExtra, (*int8)(_sqlite3Malloc(tls, uint64(((int64(func() int32 {
- if _e2 > i32(0) {
+ _bufpt = store1(&_zExtra, (*int8)(_sqlite3Malloc(tls, uint64(((int64(func() int32 {
+ if _e2 > int32(0) {
return _e2
}
- return i32(0)
- }())+int64(_precision))+int64(_width))+int64(i32(15))))))
+ return int32(0)
+ }())+int64(_precision))+int64(_width))+int64(15)))))
if _bufpt == nil {
- _setStrAccumError(tls, _pAccum, uint8(i32(1)))
+ _setStrAccumError(tls, _pAccum, uint8(1))
return
}
_159:
_zOut = _bufpt
- _nsd = i32(16) + (int32(_flag_altform2) * i32(10))
+ _nsd = int32(16) + (int32(_flag_altform2) * int32(10))
_flag_dp = uint8((func() int32 {
- if _precision > i32(0) {
- return i32(1)
+ if _precision > int32(0) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}() | int32(_flag_alternateform)) | int32(_flag_altform2))
if _prefix != 0 {
- *postInc0(&_bufpt, 1) = _prefix
+ *postInc1(&_bufpt, 1) = _prefix
}
- if _e2 < i32(0) {
- *postInc0(&_bufpt, 1) = int8(i32(48))
+ if _e2 < int32(0) {
+ *postInc1(&_bufpt, 1) = int8(48)
goto _167
}
_168:
- if _e2 < i32(0) {
+ if _e2 < int32(0) {
goto _171
}
- *postInc0(&_bufpt, 1) = _et_getdigit(tls, &_realvalue, &_nsd)
+ *postInc1(&_bufpt, 1) = _et_getdigit(tls, &_realvalue, &_nsd)
_e2 -= 1
goto _168
_171:
_167:
if _flag_dp != 0 {
- *postInc0(&_bufpt, 1) = int8(i32(46))
+ *postInc1(&_bufpt, 1) = int8(46)
}
_e2 += 1
_173:
- if _e2 >= i32(0) {
+ if _e2 >= int32(0) {
goto _176
}
func() {
- if _precision <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25616), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000))), unsafe.Pointer(str(249)))
+ if _precision <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25616), unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000), unsafe.Pointer(str(261)))
crt.X__builtin_abort(tls)
}
}()
- *postInc0(&_bufpt, 1) = int8(i32(48))
+ *postInc1(&_bufpt, 1) = int8(48)
*func() *int32 { _precision -= 1; return &_e2 }() += 1
goto _173
_176:
- if postInc1(&_precision, int32(-1)) > i32(0) {
- *postInc0(&_bufpt, 1) = _et_getdigit(tls, &_realvalue, &_nsd)
+ if postInc2(&_precision, -1) > int32(0) {
+ *postInc1(&_bufpt, 1) = _et_getdigit(tls, &_realvalue, &_nsd)
goto _176
}
if _flag_rtz == 0 || _flag_dp == 0 {
goto _182
}
_183:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(i32(-1))))) == i32(48) {
- *preInc0(&_bufpt, -1) = int8(i32(0))
+ if int32(*elem1(_bufpt, uintptr(4294967295))) == int32(48) {
+ *preInc1(&_bufpt, -1) = 0
goto _183
}
func() {
- if uintptr(unsafe.Pointer(_bufpt)) <= uintptr(unsafe.Pointer(_zOut)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25626), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000))), unsafe.Pointer(str(261)))
+ if crt.P2U(unsafe.Pointer(_bufpt)) <= crt.P2U(unsafe.Pointer(_zOut)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25626), unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000), unsafe.Pointer(str(273)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(i32(-1))))) != i32(46) {
+ if int32(*elem1(_bufpt, uintptr(4294967295))) != int32(46) {
goto _187
}
if _flag_altform2 != 0 {
- *postInc0(&_bufpt, 1) = int8(i32(48))
+ *postInc1(&_bufpt, 1) = int8(48)
goto _189
}
- *preInc0(&_bufpt, -1) = int8(i32(0))
+ *preInc1(&_bufpt, -1) = 0
_189:
_187:
_182:
- if int32(_xtype) != i32(2) {
+ if int32(_xtype) != int32(2) {
goto _190
}
- *postInc0(&_bufpt, 1) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aDigits)) + 1*uintptr(_infop.X4)))
- if _exp < i32(0) {
- *postInc0(&_bufpt, 1) = int8(i32(45))
+ *postInc1(&_bufpt, 1) = *elem1((*int8)(unsafe.Pointer(&_aDigits)), uintptr(_infop.Xcharset))
+ if _exp < int32(0) {
+ *postInc1(&_bufpt, 1) = int8(45)
_exp = -_exp
goto _192
}
- *postInc0(&_bufpt, 1) = int8(i32(43))
+ *postInc1(&_bufpt, 1) = int8(43)
_192:
- if _exp >= i32(100) {
- *postInc0(&_bufpt, 1) = int8((_exp / i32(100)) + i32(48))
- {
- p := &_exp
- *p = (*p) % i32(100)
- sink1(*p)
- }
+ if _exp >= int32(100) {
+ *postInc1(&_bufpt, 1) = int8((_exp / int32(100)) + int32(48))
+ _exp %= int32(100)
}
- *postInc0(&_bufpt, 1) = int8((_exp / i32(10)) + i32(48))
- *postInc0(&_bufpt, 1) = int8((_exp % i32(10)) + i32(48))
+ *postInc1(&_bufpt, 1) = int8((_exp / int32(10)) + int32(48))
+ *postInc1(&_bufpt, 1) = int8((_exp % int32(10)) + int32(48))
_190:
- *_bufpt = int8(i32(0))
- _length = int32((uintptr(unsafe.Pointer(_bufpt)) - uintptr(unsafe.Pointer(_zOut))) / 1)
+ *_bufpt = 0
+ _length = int32(uintptr(unsafe.Pointer(_bufpt)) - uintptr(unsafe.Pointer(_zOut)))
_bufpt = _zOut
if _flag_zeropad == 0 || _flag_leftjustify != 0 || _length >= _width {
goto _196
@@ -1574,14 +1448,14 @@ _197:
if _96_i < _96_nPad {
goto _200
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(_96_i))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(_96_i-_96_nPad)))
+ *elem1(_bufpt, uintptr(_96_i)) = *elem1(_bufpt, uintptr(_96_i-_96_nPad))
_96_i -= 1
goto _197
_200:
- _96_i = bool2int(int32(_prefix) != i32(0))
+ _96_i = bool2int(int32(_prefix) != int32(0))
_201:
- if postInc1(&_96_nPad, int32(-1)) != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(postInc1(&_96_i, int32(1))))) = int8(i32(48))
+ if postInc2(&_96_nPad, -1) != 0 {
+ *elem1(_bufpt, uintptr(postInc2(&_96_i, 1))) = int8(48)
goto _201
}
_length = _width
@@ -1589,68 +1463,64 @@ _196:
goto _119
_65:
if _bArgList == 0 {
- *(*int32)(crt.VAPointer(&_ap)) = int32(_pAccum.X3)
+ *(*int32)(crt.VAPointer(&_ap)) = int32(_pAccum.XnChar)
}
- _length = store1(&_width, i32(0))
+ _length = store2(&_width, int32(0))
goto _119
_66:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_buf)) + 1*uintptr(i32(0)))) = int8(i32(37))
+ *elem1((*int8)(unsafe.Pointer(&_buf)), 0) = int8(37)
_bufpt = (*int8)(unsafe.Pointer(&_buf))
- _length = i32(1)
+ _length = int32(1)
goto _119
_67:
if _bArgList != 0 {
_bufpt = _getTextArg(tls, _pArgList)
_c = func() int32 {
if _bufpt != nil {
- return int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(i32(0)))))
+ return int32(*elem1(_bufpt, 0))
}
- return i32(0)
+ return int32(0)
}()
goto _207
}
_c = crt.VAInt32(&_ap)
_207:
- if _precision <= i32(1) {
+ if _precision <= int32(1) {
goto _208
}
- {
- p := &_width
- *p = (*p) - (_precision - i32(1))
- sink1(*p)
+ _width -= _precision - int32(1)
+ if (_width > int32(1)) && (_flag_leftjustify == 0) {
+ _sqlite3AppendChar(tls, _pAccum, _width-int32(1), int8(32))
+ _width = int32(0)
}
- if (_width > i32(1)) && (_flag_leftjustify == 0) {
- _sqlite3AppendChar(tls, _pAccum, _width-i32(1), int8(i32(32)))
- _width = i32(0)
- }
- _sqlite3AppendChar(tls, _pAccum, _precision-i32(1), int8(_c))
+ _sqlite3AppendChar(tls, _pAccum, _precision-int32(1), int8(_c))
_208:
- _length = i32(1)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_buf)) + 1*uintptr(i32(0)))) = int8(_c)
+ _length = int32(1)
+ *elem1((*int8)(unsafe.Pointer(&_buf)), 0) = int8(_c)
_bufpt = (*int8)(unsafe.Pointer(&_buf))
goto _119
_68:
if _bArgList != 0 {
_bufpt = _getTextArg(tls, _pArgList)
- _xtype = uint8(i32(5))
+ _xtype = uint8(5)
goto _212
}
_bufpt = (*int8)(crt.VAPointer(&_ap))
_212:
if _bufpt == nil {
- _bufpt = str(0)
+ _bufpt = str(284)
goto _215
}
- if int32(_xtype) == i32(6) {
+ if int32(_xtype) == int32(6) {
_zExtra = _bufpt
}
_215:
- if _precision < i32(0) {
+ if _precision < int32(0) {
goto _216
}
- _length = i32(0)
+ _length = int32(0)
_217:
- if _length >= _precision || (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(_length)))) == 0 {
+ if _length >= _precision || (*elem1(_bufpt, uintptr(_length))) == 0 {
goto _221
}
_length += 1
@@ -1663,10 +1533,10 @@ _222:
goto _119
_70:
_110_q = int8(func() int32 {
- if int32(_xtype) == i32(14) {
- return i32(34)
+ if int32(_xtype) == int32(14) {
+ return int32(34)
}
- return i32(39)
+ return int32(39)
}())
if _bArgList != 0 {
_110_escarg = _getTextArg(tls, _pArgList)
@@ -1677,16 +1547,16 @@ _226:
_110_isnull = bool2int(_110_escarg == nil)
if _110_isnull != 0 {
_110_escarg = func() *int8 {
- if int32(_xtype) == i32(10) {
- return str(155)
+ if int32(_xtype) == int32(10) {
+ return str(285)
}
- return str(272)
+ return str(290)
}()
}
_110_k = _precision
- _110_i = store1(&_110_n, i32(0))
+ _110_i = store2(&_110_n, int32(0))
_230:
- if _110_k == i32(0) || int32(store3(&_110_ch, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_110_escarg)) + 1*uintptr(_110_i))))) == i32(0) {
+ if _110_k == int32(0) || int32(store5(&_110_ch, *elem1(_110_escarg, uintptr(_110_i)))) == int32(0) {
goto _234
}
if int32(_110_ch) == int32(_110_q) {
@@ -1695,172 +1565,162 @@ _230:
*func() *int32 { _110_i += 1; return &_110_k }() -= 1
goto _230
_234:
- _110_needQuote = bool2int((_110_isnull == 0) && (int32(_xtype) == i32(10)))
- {
- p := &_110_n
- *p = (*p) + (_110_i + i32(3))
- sink1(*p)
- }
- if _110_n <= i32(70) {
+ _110_needQuote = bool2int((_110_isnull == 0) && (int32(_xtype) == int32(10)))
+ _110_n += _110_i + int32(3)
+ if _110_n <= int32(70) {
goto _237
}
- _bufpt = store0(&_zExtra, (*int8)(_sqlite3Malloc(tls, uint64(_110_n))))
+ _bufpt = store1(&_zExtra, (*int8)(_sqlite3Malloc(tls, uint64(_110_n))))
if _bufpt == nil {
- _setStrAccumError(tls, _pAccum, uint8(i32(1)))
+ _setStrAccumError(tls, _pAccum, uint8(1))
return
}
goto _239
_237:
_bufpt = (*int8)(unsafe.Pointer(&_buf))
_239:
- _110_j = i32(0)
+ _110_j = int32(0)
if _110_needQuote != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(postInc1(&_110_j, int32(1))))) = _110_q
+ *elem1(_bufpt, uintptr(postInc2(&_110_j, 1))) = _110_q
}
_110_k = _110_i
- _110_i = i32(0)
+ _110_i = int32(0)
_241:
if _110_i >= _110_k {
goto _244
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(postInc1(&_110_j, int32(1))))) = store3(&_110_ch, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_110_escarg)) + 1*uintptr(_110_i))))
+ *elem1(_bufpt, uintptr(postInc2(&_110_j, 1))) = store5(&_110_ch, *elem1(_110_escarg, uintptr(_110_i)))
if int32(_110_ch) == int32(_110_q) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(postInc1(&_110_j, int32(1))))) = _110_ch
+ *elem1(_bufpt, uintptr(postInc2(&_110_j, 1))) = _110_ch
}
_110_i += 1
goto _241
_244:
if _110_needQuote != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(postInc1(&_110_j, int32(1))))) = _110_q
+ *elem1(_bufpt, uintptr(postInc2(&_110_j, 1))) = _110_q
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_bufpt)) + 1*uintptr(_110_j))) = int8(i32(0))
+ *elem1(_bufpt, uintptr(_110_j)) = 0
_length = _110_j
goto _119
_73:
- if (int32(_pAccum.X7) & i32(1)) == i32(0) {
+ if (int32(_pAccum.XprintfFlags) & int32(1)) == int32(0) {
return
}
_118_pToken = (*XToken)(crt.VAPointer(&_ap))
func() {
- if int32(_bArgList) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25771), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000))), unsafe.Pointer(str(279)))
+ if int32(_bArgList) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25771), unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000), unsafe.Pointer(str(297)))
crt.X__builtin_abort(tls)
}
}()
- if (_118_pToken != nil) && ((_118_pToken.X1) != 0) {
- _sqlite3StrAccumAppend(tls, _pAccum, _118_pToken.X0, int32(_118_pToken.X1))
+ if (_118_pToken != nil) && (_118_pToken.Xn != 0) {
+ _sqlite3StrAccumAppend(tls, _pAccum, _118_pToken.Xz, int32(_118_pToken.Xn))
}
- _length = store1(&_width, i32(0))
+ _length = store2(&_width, int32(0))
goto _119
_74:
- if (int32(_pAccum.X7) & i32(1)) == i32(0) {
+ if (int32(_pAccum.XprintfFlags) & int32(1)) == int32(0) {
return
}
_120_pSrc = (*XSrcList)(crt.VAPointer(&_ap))
_120_k = crt.VAInt32(&_ap)
- _120_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_120_pSrc.X2))))) + 68*uintptr(_120_k)))
+ _120_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_120_pSrc.Xa)), uintptr(_120_k))
func() {
- if int32(_bArgList) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25786), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000))), unsafe.Pointer(str(279)))
+ if int32(_bArgList) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25786), unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000), unsafe.Pointer(str(297)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _120_k < i32(0) || _120_k >= (_120_pSrc.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25787), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000))), unsafe.Pointer(str(291)))
+ if _120_k < int32(0) || _120_k >= _120_pSrc.XnSrc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25787), unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000), unsafe.Pointer(str(309)))
crt.X__builtin_abort(tls)
}
}()
- if (_120_pItem.X1) != nil {
- _sqlite3StrAccumAppendAll(tls, _pAccum, _120_pItem.X1)
- _sqlite3StrAccumAppend(tls, _pAccum, str(312), i32(1))
+ if _120_pItem.XzDatabase != nil {
+ _sqlite3StrAccumAppendAll(tls, _pAccum, _120_pItem.XzDatabase)
+ _sqlite3StrAccumAppend(tls, _pAccum, str(330), int32(1))
}
- _sqlite3StrAccumAppendAll(tls, _pAccum, _120_pItem.X2)
- _length = store1(&_width, i32(0))
+ _sqlite3StrAccumAppendAll(tls, _pAccum, _120_pItem.XzName)
+ _length = store2(&_width, int32(0))
goto _119
_75:
func() {
- if int32(_xtype) != i32(17) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25797), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000))), unsafe.Pointer(str(314)))
+ if int32(_xtype) != int32(17) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25797), unsafe.Pointer(&_sqlite3VXPrintfØ00__func__Ø000), unsafe.Pointer(str(332)))
crt.X__builtin_abort(tls)
}
}()
return
_119:
- {
- p := &_width
- *p = (*p) - _length
- sink1(*p)
- }
- if _width <= i32(0) {
+ _width -= _length
+ if _width <= int32(0) {
goto _261
}
if _flag_leftjustify == 0 {
- _sqlite3AppendChar(tls, _pAccum, _width, int8(i32(32)))
+ _sqlite3AppendChar(tls, _pAccum, _width, int8(32))
}
_sqlite3StrAccumAppend(tls, _pAccum, _bufpt, _length)
if _flag_leftjustify != 0 {
- _sqlite3AppendChar(tls, _pAccum, _width, int8(i32(32)))
+ _sqlite3AppendChar(tls, _pAccum, _width, int8(32))
}
goto _264
_261:
_sqlite3StrAccumAppend(tls, _pAccum, _bufpt, _length)
_264:
if _zExtra != nil {
- _sqlite3DbFree(tls, (*Xsqlite3)(_pAccum.X0), (unsafe.Pointer)(_zExtra))
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pAccum.Xdb), unsafe.Pointer(_zExtra))
_zExtra = nil
}
*(*uintptr)(unsafe.Pointer(&_fmt)) += uintptr(1)
goto _1
_5:
- _ = _nsd
_ = _buf
}
-// Append N bytes of text from z to the StrAccum object. Increase the
-// size of the memory allocation for StrAccum if necessary.
+// C comment
+// /*
+// ** Append N bytes of text from z to the StrAccum object. Increase the
+// ** size of the memory allocation for StrAccum if necessary.
+// */
func _sqlite3StrAccumAppend(tls *crt.TLS, _p *XStrAccum, _z *int8, _N int32) {
func() {
- if _z == nil && _N != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25912), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000))), unsafe.Pointer(str(331)))
+ if _z == nil && _N != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25912), unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000), unsafe.Pointer(str(349)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X2) == nil && (_p.X3) != uint32(i32(0)) && (_p.X6) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25913), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000))), unsafe.Pointer(str(344)))
+ if _p.XzText == nil && _p.XnChar != (0) && _p.XaccError == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25913), unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000), unsafe.Pointer(str(362)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _N < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25914), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000))), unsafe.Pointer(str(386)))
+ if _N < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25914), unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000), unsafe.Pointer(str(404)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X6) != i32(0) && (_p.X4) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25915), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000))), unsafe.Pointer(str(391)))
+ if int32(_p.XaccError) != int32(0) && _p.XnAlloc != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25915), unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000), unsafe.Pointer(str(409)))
crt.X__builtin_abort(tls)
}
}()
- if ((_p.X3) + uint32(_N)) >= (_p.X4) {
+ if (_p.XnChar + uint32(_N)) >= _p.XnAlloc {
_enlargeAndAppend(tls, _p, _z, _N)
goto _14
}
if _N != 0 {
func() {
- if (_p.X2) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25919), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000))), unsafe.Pointer(str(422)))
+ if _p.XzText == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25919), unsafe.Pointer(&_sqlite3StrAccumAppendØ00__func__Ø000), unsafe.Pointer(str(440)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) + uint32(_N)
- sink5(*p)
- }
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2))+1*uintptr((_p.X3)-uint32(_N))))), (unsafe.Pointer)(_z), uint32(_N))
+ _p.XnChar += uint32(_N)
+ crt.Xmemcpy(tls, unsafe.Pointer(elem1(_p.XzText, uintptr(_p.XnChar-uint32(_N)))), unsafe.Pointer(_z), uint32(_N))
}
_14:
}
@@ -1868,116 +1728,109 @@ _14:
var _sqlite3StrAccumAppendØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StrAccumAppendØ00__func__Ø000[0], str(431), 22)
+ crt.Xstrncpy(nil, &_sqlite3StrAccumAppendØ00__func__Ø000[0], str(449), 22)
}
-// The StrAccum "p" is not large enough to accept N new bytes of z[].
-// So enlarge if first, then do the append.
-//
-// This is a helper routine to sqlite3StrAccumAppend() that does special-case
-// work (enlarging the buffer) using tail recursion, so that the
-// sqlite3StrAccumAppend() routine can use fast calling semantics.
+// C comment
+// /*
+// ** The StrAccum "p" is not large enough to accept N new bytes of z[].
+// ** So enlarge if first, then do the append.
+// **
+// ** This is a helper routine to sqlite3StrAccumAppend() that does special-case
+// ** work (enlarging the buffer) using tail recursion, so that the
+// ** sqlite3StrAccumAppend() routine can use fast calling semantics.
+// */
func _enlargeAndAppend(tls *crt.TLS, _p *XStrAccum, _z *int8, _N int32) {
_N = _sqlite3StrAccumEnlarge(tls, _p, _N)
- if _N > i32(0) {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2))+1*uintptr(_p.X3)))), (unsafe.Pointer)(_z), uint32(_N))
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) + uint32(_N)
- sink5(*p)
- }
+ if _N > int32(0) {
+ crt.Xmemcpy(tls, unsafe.Pointer(elem1(_p.XzText, uintptr(_p.XnChar))), unsafe.Pointer(_z), uint32(_N))
+ _p.XnChar += uint32(_N)
}
func() {
- if (((_p.X2) == nil) || ((_p.X2) == (_p.X1))) != ((int32(_p.X7) & i32(4)) == i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25904), unsafe.Pointer((*int8)(unsafe.Pointer(&_enlargeAndAppendØ00__func__Ø000))), unsafe.Pointer(str(453)))
+ if ((_p.XzText == nil) || (_p.XzText == _p.XzBase)) != ((int32(_p.XprintfFlags) & int32(4)) == int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25904), unsafe.Pointer(&_enlargeAndAppendØ00__func__Ø000), unsafe.Pointer(str(471)))
crt.X__builtin_abort(tls)
}
}()
}
-// Enlarge the memory allocation on a StrAccum object so that it is
-// able to accept at least N more bytes of text.
-//
-// Return the number of bytes of text that StrAccum is able to accept
-// after the attempted enlargement. The value returned might be zero.
+// C comment
+// /*
+// ** Enlarge the memory allocation on a StrAccum object so that it is
+// ** able to accept at least N more bytes of text.
+// **
+// ** Return the number of bytes of text that StrAccum is able to accept
+// ** after the attempted enlargement. The value returned might be zero.
+// */
func _sqlite3StrAccumEnlarge(tls *crt.TLS, _p *XStrAccum, _N int32) (r0 int32) {
var _3_szNew int64
var _zNew, _3_zOld *int8
func() {
- if (int64(_p.X3) + int64(_N)) < int64(_p.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25831), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumEnlargeØ00__func__Ø000))), unsafe.Pointer(str(505)))
+ if (int64(_p.XnChar) + int64(_N)) < int64(_p.XnAlloc) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25831), unsafe.Pointer(&_sqlite3StrAccumEnlargeØ00__func__Ø000), unsafe.Pointer(str(523)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X6) != 0 {
- return i32(0)
+ if _p.XaccError != 0 {
+ return int32(0)
}
- if (_p.X5) == uint32(i32(0)) {
- _N = int32(((_p.X4) - (_p.X3)) - uint32(i32(1)))
- _setStrAccumError(tls, _p, uint8(i32(2)))
+ if _p.XmxAlloc == (0) {
+ _N = int32((_p.XnAlloc - _p.XnChar) - uint32(1))
+ _setStrAccumError(tls, _p, uint8(2))
return _N
}
_3_zOld = func() *int8 {
- if (int32(_p.X7) & i32(4)) != i32(0) {
- return (_p.X2)
+ if (int32(_p.XprintfFlags) & int32(4)) != int32(0) {
+ return _p.XzText
}
return nil
}()
- _3_szNew = int64(_p.X3)
+ _3_szNew = int64(_p.XnChar)
func() {
- if (((_p.X2) == nil) || ((_p.X2) == (_p.X1))) != ((int32(_p.X7) & i32(4)) == i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25844), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumEnlargeØ00__func__Ø000))), unsafe.Pointer(str(453)))
+ if ((_p.XzText == nil) || (_p.XzText == _p.XzBase)) != ((int32(_p.XprintfFlags) & int32(4)) == int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25844), unsafe.Pointer(&_sqlite3StrAccumEnlargeØ00__func__Ø000), unsafe.Pointer(str(471)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_3_szNew
- *p = (*p) + int64(_N+i32(1))
- sink6(*p)
- }
- if (_3_szNew + int64(_p.X3)) <= int64(_p.X5) {
- {
- p := &_3_szNew
- *p = (*p) + int64(_p.X3)
- sink6(*p)
- }
+ _3_szNew += int64(_N + int32(1))
+ if (_3_szNew + int64(_p.XnChar)) <= int64(_p.XmxAlloc) {
+ _3_szNew += int64(_p.XnChar)
}
- if _3_szNew > int64(_p.X5) {
+ if _3_szNew > int64(_p.XmxAlloc) {
_sqlite3StrAccumReset(tls, _p)
- _setStrAccumError(tls, _p, uint8(i32(2)))
- return i32(0)
+ _setStrAccumError(tls, _p, uint8(2))
+ return int32(0)
}
- *(*uint32)(unsafe.Pointer(&(_p.X4))) = uint32(int32(_3_szNew))
- if (*Xsqlite3)(_p.X0) != nil {
- _zNew = (*int8)(_sqlite3DbRealloc(tls, (*Xsqlite3)(_p.X0), (unsafe.Pointer)(_3_zOld), uint64(_p.X4)))
+ _p.XnAlloc = uint32(int32(_3_szNew))
+ if _p.Xdb != nil {
+ _zNew = (*int8)(_sqlite3DbRealloc(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_3_zOld), uint64(_p.XnAlloc)))
goto _14
}
- _zNew = (*int8)(Xsqlite3_realloc64(tls, (unsafe.Pointer)(_3_zOld), uint64(_p.X4)))
+ _zNew = (*int8)(Xsqlite3_realloc64(tls, unsafe.Pointer(_3_zOld), uint64(_p.XnAlloc)))
_14:
if _zNew == nil {
goto _15
}
func() {
- if (_p.X2) == nil && (_p.X3) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25864), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumEnlargeØ00__func__Ø000))), unsafe.Pointer(str(534)))
+ if _p.XzText == nil && _p.XnChar != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25864), unsafe.Pointer(&_sqlite3StrAccumEnlargeØ00__func__Ø000), unsafe.Pointer(str(552)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_p.X7) & i32(4)) == i32(0)) && ((_p.X3) > uint32(i32(0))) {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zNew), (unsafe.Pointer)(_p.X2), _p.X3)
+ if ((int32(_p.XprintfFlags) & int32(4)) == int32(0)) && (_p.XnChar > (0)) {
+ crt.Xmemcpy(tls, unsafe.Pointer(_zNew), unsafe.Pointer(_p.XzText), _p.XnChar)
}
- *(**int8)(unsafe.Pointer(&(_p.X2))) = _zNew
- *(*uint32)(unsafe.Pointer(&(_p.X4))) = uint32(_sqlite3DbMallocSize(tls, (*Xsqlite3)(_p.X0), (unsafe.Pointer)(_zNew)))
+ _p.XzText = _zNew
+ _p.XnAlloc = uint32(_sqlite3DbMallocSize(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_zNew)))
{
- p := (*uint8)(unsafe.Pointer(&(_p.X7)))
- *p = uint8(int32(*p) | i32(4))
- sink2(*p)
+ p := &_p.XprintfFlags
+ *p = uint8(int32(*p) | int32(4))
}
goto _21
_15:
_sqlite3StrAccumReset(tls, _p)
- _setStrAccumError(tls, _p, uint8(i32(1)))
- return i32(0)
+ _setStrAccumError(tls, _p, uint8(1))
+ return int32(0)
_21:
return _N
@@ -1986,56 +1839,61 @@ _21:
var _sqlite3StrAccumEnlargeØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StrAccumEnlargeØ00__func__Ø000[0], str(561), 23)
+ crt.Xstrncpy(nil, &_sqlite3StrAccumEnlargeØ00__func__Ø000[0], str(579), 23)
}
-// Set the StrAccum object to an error mode.
+// C comment
+// /*
+// ** Set the StrAccum object to an error mode.
+// */
func _setStrAccumError(tls *crt.TLS, _p *XStrAccum, _eError uint8) {
func() {
- if int32(_eError) != i32(1) && int32(_eError) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25196), unsafe.Pointer((*int8)(unsafe.Pointer(&_setStrAccumErrorØ00__func__Ø000))), unsafe.Pointer(str(584)))
+ if int32(_eError) != int32(1) && int32(_eError) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25196), unsafe.Pointer(&_setStrAccumErrorØ00__func__Ø000), unsafe.Pointer(str(602)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_p.X6))) = _eError
- *(*uint32)(unsafe.Pointer(&(_p.X4))) = uint32(i32(0))
+ _p.XaccError = _eError
+ _p.XnAlloc = 0
}
var _setStrAccumErrorØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_setStrAccumErrorØ00__func__Ø000[0], str(634), 17)
+ crt.Xstrncpy(nil, &_setStrAccumErrorØ00__func__Ø000[0], str(652), 17)
}
-// Reset an StrAccum string. Reclaim all malloced memory.
+// C comment
+// /*
+// ** Reset an StrAccum string. Reclaim all malloced memory.
+// */
func _sqlite3StrAccumReset(tls *crt.TLS, _p *XStrAccum) {
func() {
- if (((_p.X2) == nil) || ((_p.X2) == (_p.X1))) != ((int32(_p.X7) & i32(4)) == i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25964), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumResetØ00__func__Ø000))), unsafe.Pointer(str(453)))
+ if ((_p.XzText == nil) || (_p.XzText == _p.XzBase)) != ((int32(_p.XprintfFlags) & int32(4)) == int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25964), unsafe.Pointer(&_sqlite3StrAccumResetØ00__func__Ø000), unsafe.Pointer(str(471)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_p.X7) & i32(4)) != i32(0) {
- _sqlite3DbFree(tls, (*Xsqlite3)(_p.X0), (unsafe.Pointer)(_p.X2))
+ if (int32(_p.XprintfFlags) & int32(4)) != int32(0) {
+ _sqlite3DbFree(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_p.XzText))
{
- p := (*uint8)(unsafe.Pointer(&(_p.X7)))
- *p = uint8(int32(*p) & i32(-5))
- sink2(*p)
+ p := &_p.XprintfFlags
+ *p = uint8(int32(*p) & int32(-5))
}
}
- *(**int8)(unsafe.Pointer(&(_p.X2))) = nil
+ _p.XzText = nil
}
var _sqlite3StrAccumResetØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StrAccumResetØ00__func__Ø000[0], str(651), 21)
+ crt.Xstrncpy(nil, &_sqlite3StrAccumResetØ00__func__Ø000[0], str(669), 21)
}
func _sqlite3DbFree(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer) {
func() {
- if _db != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24721), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbFreeØ00__func__Ø000))), unsafe.Pointer(str(672)))
+ if _db != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24721), unsafe.Pointer(&_sqlite3DbFreeØ00__func__Ø000), unsafe.Pointer(str(690)))
crt.X__builtin_abort(tls)
}
}()
@@ -2044,72 +1902,76 @@ func _sqlite3DbFree(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer) {
}
}
-// The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
-// intended for use inside assert() statements.
+// C comment
+// /*
+// ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
+// ** intended for use inside assert() statements.
+// */
func Xsqlite3_mutex_held(tls *crt.TLS, _p *Xsqlite3_mutex) (r0 int32) {
func() {
- if _p != nil && (*(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X7)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22902), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_mutex_heldØ00__func__Ø000))), unsafe.Pointer(str(711)))
+ if _p != nil && (_sqlite3Config.Xmutex.XxMutexHeld) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22902), unsafe.Pointer(&_sqlite3_mutex_heldØ00__func__Ø000), unsafe.Pointer(str(729)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int((_p == nil) || (*(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X7)})))(tls, _p) != 0)
+ return bool2int((_p == nil) || func() func(*crt.TLS, *Xsqlite3_mutex) int32 {
+ v := _sqlite3Config.Xmutex.XxMutexHeld
+ return *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&v))
+ }()(tls, _p) != 0)
}
var _sqlite3_mutex_heldØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_mutex_heldØ00__func__Ø000[0], str(756), 19)
+ crt.Xstrncpy(nil, &_sqlite3_mutex_heldØ00__func__Ø000[0], str(774), 19)
}
var _sqlite3DbFreeØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DbFreeØ00__func__Ø000[0], str(775), 14)
+ crt.Xstrncpy(nil, &_sqlite3DbFreeØ00__func__Ø000[0], str(793), 14)
}
-// Free memory that might be associated with a particular database
-// connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op.
-// The sqlite3DbFreeNN(D,X) version requires that X be non-NULL.
+// C comment
+// /*
+// ** Free memory that might be associated with a particular database
+// ** connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op.
+// ** The sqlite3DbFreeNN(D,X) version requires that X be non-NULL.
+// */
func _sqlite3DbFreeNN(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer) {
- var _3_pBuf *Xsqlite3_file
+ var _3_pBuf *XScratchFreeslot
func() {
- if _db != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24695), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbFreeNNØ00__func__Ø000))), unsafe.Pointer(str(672)))
+ if _db != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24695), unsafe.Pointer(&_sqlite3DbFreeNNØ00__func__Ø000), unsafe.Pointer(str(690)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24696), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbFreeNNØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24696), unsafe.Pointer(&_sqlite3DbFreeNNØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
if _db == nil {
goto _5
}
- if (_db.X79) != nil {
+ if _db.XpnBytesFreed != nil {
_measureAllocationSize(tls, _db, _p)
return
}
if _isLookaside(tls, _db, _p) != 0 {
- _3_pBuf = (*Xsqlite3_file)(_p)
- crt.Xmemset(tls, _p, i32(170), uint32((*t7)(unsafe.Pointer(&(_db.X58))).X1))
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_pBuf.X0))))) = (*Xsqlite3_file)((*t7)(unsafe.Pointer(&(_db.X58))).X6)
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X6))))) = _3_pBuf
- *(*int32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X3))) -= 1
+ _3_pBuf = (*XScratchFreeslot)(_p)
+ crt.Xmemset(tls, _p, int32(170), uint32(_db.Xlookaside.Xsz))
+ *(**XScratchFreeslot)(unsafe.Pointer(&_3_pBuf.XpNext)) = (*XScratchFreeslot)(_db.Xlookaside.XpFree)
+ *(**XScratchFreeslot)(unsafe.Pointer(&(_db.Xlookaside.XpFree))) = _3_pBuf
+ _db.Xlookaside.XnOut -= 1
return
}
_5:
- i32(0)
- i32(0)
+
func() {
- if _db == nil && i32(1) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24716), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbFreeNNØ00__func__Ø000))), unsafe.Pointer(str(794)))
+ if _db == nil && int32(1) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24716), unsafe.Pointer(&_sqlite3DbFreeNNØ00__func__Ø000), unsafe.Pointer(str(812)))
crt.X__builtin_abort(tls)
}
}()
@@ -2119,23 +1981,22 @@ _5:
var _sqlite3DbFreeNNØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DbFreeNNØ00__func__Ø000[0], str(847), 16)
+ crt.Xstrncpy(nil, &_sqlite3DbFreeNNØ00__func__Ø000[0], str(865), 16)
}
-// Add the size of memory allocation "p" to the count in
-// *db->pnBytesFreed.
+// C comment
+// /*
+// ** Add the size of memory allocation "p" to the count in
+// ** *db->pnBytesFreed.
+// */
func _measureAllocationSize(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer) {
- {
- p := _db.X79
- *p = (*p) + _sqlite3DbMallocSize(tls, _db, _p)
- sink1(*p)
- }
+ *_db.XpnBytesFreed += _sqlite3DbMallocSize(tls, _db, _p)
}
func _sqlite3DbMallocSize(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer) (r0 int32) {
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24640), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbMallocSizeØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24640), unsafe.Pointer(&_sqlite3DbMallocSizeØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
@@ -2143,183 +2004,206 @@ func _sqlite3DbMallocSize(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer) (r0 in
goto _3
}
if _db == nil {
- i32(0)
- i32(0)
goto _5
}
- i32(0)
- i32(0)
+
_5:
- return ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X3)(tls, _p)
+ return (_sqlite3Config.Xm.XxSize)(tls, _p)
_3:
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24653), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbMallocSizeØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24653), unsafe.Pointer(&_sqlite3DbMallocSizeØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- return int32((*t7)(unsafe.Pointer(&(_db.X58))).X1)
+ return int32(_db.Xlookaside.Xsz)
}
var _sqlite3DbMallocSizeØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DbMallocSizeØ00__func__Ø000[0], str(893), 20)
+ crt.Xstrncpy(nil, &_sqlite3DbMallocSizeØ00__func__Ø000[0], str(911), 20)
}
func _isLookaside(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer) (r0 int32) {
- return bool2int((uint32(uintptr(_p)) >= uint32(uintptr((*t7)(unsafe.Pointer(&(_db.X58))).X7))) && (uint32(uintptr(_p)) < uint32(uintptr((*t7)(unsafe.Pointer(&(_db.X58))).X8))))
+ return bool2int((uint32(crt.P2U(_p)) >= uint32(crt.P2U(_db.Xlookaside.XpStart))) && (uint32(crt.P2U(_p)) < uint32(crt.P2U(_db.Xlookaside.XpEnd))))
}
-// Free memory previously obtained from sqlite3Malloc().
+// C comment
+// /*
+// ** Free memory previously obtained from sqlite3Malloc().
+// */
func Xsqlite3_free(tls *crt.TLS, _p unsafe.Pointer) {
if _p == nil {
return
}
- i32(0)
- i32(0)
- if (_sqlite3Config.X0) != 0 {
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.X0))
- _sqlite3StatusDown(tls, i32(0), _sqlite3MallocSize(tls, _p))
- _sqlite3StatusDown(tls, i32(9), i32(1))
- ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X1)(tls, _p)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+
+ if _sqlite3Config.XbMemstat != 0 {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
+ _sqlite3StatusDown(tls, int32(0), _sqlite3MallocSize(tls, _p))
+ _sqlite3StatusDown(tls, int32(9), int32(1))
+ (_sqlite3Config.Xm.XxFree)(tls, _p)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
goto _2
}
- ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X1)(tls, _p)
+ (_sqlite3Config.Xm.XxFree)(tls, _p)
_2:
}
-// Obtain the mutex p. If some other thread already has the mutex, block
-// until it can be obtained.
+// C comment
+// /*
+// ** Obtain the mutex p. If some other thread already has the mutex, block
+// ** until it can be obtained.
+// */
func Xsqlite3_mutex_enter(tls *crt.TLS, _p *Xsqlite3_mutex) {
if _p != nil {
func() {
- if (*(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X4)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22865), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_mutex_enterØ00__func__Ø000))), unsafe.Pointer(str(913)))
+ if (_sqlite3Config.Xmutex.XxMutexEnter) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22865), unsafe.Pointer(&_sqlite3_mutex_enterØ00__func__Ø000), unsafe.Pointer(str(931)))
crt.X__builtin_abort(tls)
}
}()
- (*(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X4)})))(tls, _p)
+ func() func(*crt.TLS, *Xsqlite3_mutex) {
+ v := _sqlite3Config.Xmutex.XxMutexEnter
+ return *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&v))
+ }()(tls, _p)
}
}
var _sqlite3_mutex_enterØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_mutex_enterØ00__func__Ø000[0], str(951), 20)
+ crt.Xstrncpy(nil, &_sqlite3_mutex_enterØ00__func__Ø000[0], str(969), 20)
}
+// C comment
+// /*
+// ** State information local to the memory allocation subsystem.
+// */
var _mem0 TMem0Global
func _sqlite3StatusDown(tls *crt.TLS, _op int32, _N int32) {
func() {
- if _N < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18574), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusDownØ00__func__Ø000))), unsafe.Pointer(str(386)))
+ if _N < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18574), unsafe.Pointer(&_sqlite3StatusDownØ00__func__Ø000), unsafe.Pointer(str(404)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op < i32(0) || _op >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18575), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusDownØ00__func__Ø000))), unsafe.Pointer(str(971)))
+ if _op < int32(0) || _op >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18575), unsafe.Pointer(&_sqlite3StatusDownØ00__func__Ø000), unsafe.Pointer(str(989)))
crt.X__builtin_abort(tls)
}
}()
func() {
if Xsqlite3_mutex_held(tls, func() *Xsqlite3_mutex {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_statMutex)) + 1*uintptr(_op)))) != 0 {
+ if (*elem1((*int8)(unsafe.Pointer(&_statMutex)), uintptr(_op))) != 0 {
return _sqlite3Pcache1Mutex(tls)
}
return _sqlite3MallocMutex(tls)
}()) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18576), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusDownØ00__func__Ø000))), unsafe.Pointer(str(1004)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18576), unsafe.Pointer(&_sqlite3StatusDownØ00__func__Ø000), unsafe.Pointer(str(1022)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op < i32(0) || _op >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18578), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusDownØ00__func__Ø000))), unsafe.Pointer(str(1085)))
+ if _op < int32(0) || _op >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18578), unsafe.Pointer(&_sqlite3StatusDownØ00__func__Ø000), unsafe.Pointer(str(1103)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X0))))) + 4*uintptr(_op)))
- *p = (*p) - uint32(_N)
- sink5(*p)
- }
+ *elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XnowValue)), uintptr(_op)) -= uint32(_N)
}
var _sqlite3StatusDownØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StatusDownØ00__func__Ø000[0], str(1125), 18)
+ crt.Xstrncpy(nil, &_sqlite3StatusDownØ00__func__Ø000[0], str(1143), 18)
}
+// C comment
+// /*
+// ** Elements of sqlite3Stat[] are protected by either the memory allocator
+// ** mutex, or by the pcache1 mutex. The following array determines which.
+// */
var _statMutex [10]int8
func init() {
_statMutex = [10]int8{0, 1, 1, 0, 0, 0, 0, 1, 0, 0}
}
-// Return the global mutex used by this PCACHE implementation. The
-// sqlite3_status() routine needs access to this mutex.
+// C comment
+// /*
+// ** Return the global mutex used by this PCACHE implementation. The
+// ** sqlite3_status() routine needs access to this mutex.
+// */
func _sqlite3Pcache1Mutex(tls *crt.TLS) (r0 *Xsqlite3_mutex) {
- return (*Xsqlite3_mutex)(_pcache1_g.X9)
+ return (*Xsqlite3_mutex)(_pcache1_g.Xmutex)
}
+// C comment
+// /*
+// ** Global data used by this cache.
+// */
var _pcache1_g TPCacheGlobal
-// Return the memory allocator mutex. sqlite3_status() needs it.
+// C comment
+// /*
+// ** Return the memory allocator mutex. sqlite3_status() needs it.
+// */
func _sqlite3MallocMutex(tls *crt.TLS) (r0 *Xsqlite3_mutex) {
- return (*Xsqlite3_mutex)(_mem0.X0)
+ return (*Xsqlite3_mutex)(_mem0.Xmutex)
}
var _sqlite3Stat Tsqlite3StatType
-// Return the size of a memory allocation previously obtained from
-// sqlite3Malloc() or sqlite3_malloc().
+// C comment
+// /*
+// ** Return the size of a memory allocation previously obtained from
+// ** sqlite3Malloc() or sqlite3_malloc().
+// */
func _sqlite3MallocSize(tls *crt.TLS, _p unsafe.Pointer) (r0 int32) {
- i32(0)
- return ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X3)(tls, _p)
+ return (_sqlite3Config.Xm.XxSize)(tls, _p)
}
-// The sqlite3_mutex_leave() routine exits a mutex that was previously
-// entered by the same thread. The behavior is undefined if the mutex
-// is not currently entered. If a NULL pointer is passed as an argument
-// this function is a no-op.
+// C comment
+// /*
+// ** The sqlite3_mutex_leave() routine exits a mutex that was previously
+// ** entered by the same thread. The behavior is undefined if the mutex
+// ** is not currently entered. If a NULL pointer is passed as an argument
+// ** this function is a no-op.
+// */
func Xsqlite3_mutex_leave(tls *crt.TLS, _p *Xsqlite3_mutex) {
if _p != nil {
func() {
- if (*(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X6)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22891), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_mutex_leaveØ00__func__Ø000))), unsafe.Pointer(str(1143)))
+ if (_sqlite3Config.Xmutex.XxMutexLeave) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22891), unsafe.Pointer(&_sqlite3_mutex_leaveØ00__func__Ø000), unsafe.Pointer(str(1161)))
crt.X__builtin_abort(tls)
}
}()
- (*(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X6)})))(tls, _p)
+ func() func(*crt.TLS, *Xsqlite3_mutex) {
+ v := _sqlite3Config.Xmutex.XxMutexLeave
+ return *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&v))
+ }()(tls, _p)
}
}
var _sqlite3_mutex_leaveØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_mutex_leaveØ00__func__Ø000[0], str(1181), 20)
+ crt.Xstrncpy(nil, &_sqlite3_mutex_leaveØ00__func__Ø000[0], str(1199), 20)
}
-// Resize the block of memory pointed to by p to n bytes. If the
-// resize fails, set the mallocFailed flag in the connection object.
+// C comment
+// /*
+// ** Resize the block of memory pointed to by p to n bytes. If the
+// ** resize fails, set the mallocFailed flag in the connection object.
+// */
func _sqlite3DbRealloc(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer, _n uint64) (r0 unsafe.Pointer) {
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24904), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbReallocØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24904), unsafe.Pointer(&_sqlite3DbReallocØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
@@ -2327,12 +2211,12 @@ func _sqlite3DbRealloc(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer, _n uint64
return _sqlite3DbMallocRawNN(tls, _db, _n)
}
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24906), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbReallocØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24906), unsafe.Pointer(&_sqlite3DbReallocØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- if _isLookaside(tls, _db, _p) != 0 && (_n <= uint64((*t7)(unsafe.Pointer(&(_db.X58))).X1)) {
+ if _isLookaside(tls, _db, _p) != 0 && (_n <= uint64(_db.Xlookaside.Xsz)) {
return _p
}
return _dbReallocFinish(tls, _db, _p, _n)
@@ -2341,58 +2225,58 @@ func _sqlite3DbRealloc(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer, _n uint64
var _sqlite3DbReallocØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DbReallocØ00__func__Ø000[0], str(1207), 17)
+ crt.Xstrncpy(nil, &_sqlite3DbReallocØ00__func__Ø000[0], str(1225), 17)
}
func _sqlite3DbMallocRawNN(tls *crt.TLS, _db *Xsqlite3, _n uint64) (r0 unsafe.Pointer) {
- var _pBuf *Xsqlite3_file
+ var _pBuf *XScratchFreeslot
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24864), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbMallocRawNNØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24864), unsafe.Pointer(&_sqlite3DbMallocRawNNØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24865), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbMallocRawNNØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24865), unsafe.Pointer(&_sqlite3DbMallocRawNNØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_db.X79) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24866), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbMallocRawNNØ00__func__Ø000))), unsafe.Pointer(str(1224)))
+ if _db.XpnBytesFreed != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24866), unsafe.Pointer(&_sqlite3DbMallocRawNNØ00__func__Ø000), unsafe.Pointer(str(1242)))
crt.X__builtin_abort(tls)
}
}()
- if ((*t7)(unsafe.Pointer(&(_db.X58))).X0) != uint32(i32(0)) {
+ if (_db.Xlookaside.XbDisable) != (0) {
goto _6
}
func() {
- if int32(_db.X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24868), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbMallocRawNNØ00__func__Ø000))), unsafe.Pointer(str(1244)))
+ if int32(_db.XmallocFailed) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24868), unsafe.Pointer(&_sqlite3DbMallocRawNNØ00__func__Ø000), unsafe.Pointer(str(1262)))
crt.X__builtin_abort(tls)
}
}()
- if _n > uint64((*t7)(unsafe.Pointer(&(_db.X58))).X1) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X5))))) + 4*uintptr(i32(1)))) += 1
+ if _n > uint64(_db.Xlookaside.Xsz) {
+ *elem8((*int32)(unsafe.Pointer(&(_db.Xlookaside.XanStat))), uintptr(1)) += 1
goto _12
}
- if store8(&_pBuf, (*Xsqlite3_file)((*t7)(unsafe.Pointer(&(_db.X58))).X6)) == nil {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X5))))) + 4*uintptr(i32(2)))) += 1
+ if store9(&_pBuf, (*XScratchFreeslot)(_db.Xlookaside.XpFree)) == nil {
+ *elem8((*int32)(unsafe.Pointer(&(_db.Xlookaside.XanStat))), uintptr(2)) += 1
goto _12
}
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X6))))) = (*Xsqlite3_file)(_pBuf.X0)
- *(*int32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X3))) += 1
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X5))))) + 4*uintptr(i32(0)))) += 1
- if ((*t7)(unsafe.Pointer(&(_db.X58))).X3) > ((*t7)(unsafe.Pointer(&(_db.X58))).X4) {
- *(*int32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X4))) = (*t7)(unsafe.Pointer(&(_db.X58))).X3
+ *(**XScratchFreeslot)(unsafe.Pointer(&(_db.Xlookaside.XpFree))) = (*XScratchFreeslot)(_pBuf.XpNext)
+ _db.Xlookaside.XnOut += 1
+ *elem8((*int32)(unsafe.Pointer(&(_db.Xlookaside.XanStat))), 0) += 1
+ if (_db.Xlookaside.XnOut) > (_db.Xlookaside.XmxOut) {
+ _db.Xlookaside.XmxOut = _db.Xlookaside.XnOut
}
- return (unsafe.Pointer)(_pBuf)
+ return unsafe.Pointer(_pBuf)
_12:
goto _15
_6:
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
return nil
}
_15:
@@ -2402,16 +2286,18 @@ _15:
var _sqlite3DbMallocRawNNØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DbMallocRawNNØ00__func__Ø000[0], str(1264), 21)
+ crt.Xstrncpy(nil, &_sqlite3DbMallocRawNNØ00__func__Ø000[0], str(1282), 21)
}
-// Finish the work of sqlite3DbMallocRawNN for the unusual and
-// slower case when the allocation cannot be fulfilled using lookaside.
+// C comment
+// /* Finish the work of sqlite3DbMallocRawNN for the unusual and
+// ** slower case when the allocation cannot be fulfilled using lookaside.
+// */
func _dbMallocRawFinish(tls *crt.TLS, _db *Xsqlite3, _n uint64) (r0 unsafe.Pointer) {
var _p unsafe.Pointer
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24824), unsafe.Pointer((*int8)(unsafe.Pointer(&_dbMallocRawFinishØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24824), unsafe.Pointer(&_dbMallocRawFinishØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
@@ -2425,71 +2311,77 @@ func _dbMallocRawFinish(tls *crt.TLS, _db *Xsqlite3, _n uint64) (r0 unsafe.Point
var _dbMallocRawFinishØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_dbMallocRawFinishØ00__func__Ø000[0], str(1285), 18)
+ crt.Xstrncpy(nil, &_dbMallocRawFinishØ00__func__Ø000[0], str(1303), 18)
}
-// Allocate memory. This routine is like sqlite3_malloc() except that it
-// assumes the memory subsystem has already been initialized.
+// C comment
+// /*
+// ** Allocate memory. This routine is like sqlite3_malloc() except that it
+// ** assumes the memory subsystem has already been initialized.
+// */
func _sqlite3Malloc(tls *crt.TLS, _n uint64) (r0 unsafe.Pointer) {
var _p unsafe.Pointer
- if (_n == uint64(i32(0))) || (_n >= uint64(i32(2147483392))) {
+ if (_n == (0)) || (_n >= uint64(2147483392)) {
_p = nil
goto _4
}
- if (_sqlite3Config.X0) != 0 {
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ if _sqlite3Config.XbMemstat != 0 {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
_mallocWithAlarm(tls, int32(_n), &_p)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
goto _4
}
- _p = ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X0)(tls, int32(_n))
+ _p = (_sqlite3Config.Xm.XxMalloc)(tls, int32(_n))
_4:
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(_p)))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24499), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MallocØ00__func__Ø000))), unsafe.Pointer(str(1303)))
+ if (int32(uintptr(_p)) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24499), unsafe.Pointer(&_sqlite3MallocØ00__func__Ø000), unsafe.Pointer(str(1321)))
crt.X__builtin_abort(tls)
}
}()
return _p
}
-// Do a memory allocation with statistics and alarms. Assume the
-// lock is already held.
+// C comment
+// /*
+// ** Do a memory allocation with statistics and alarms. Assume the
+// ** lock is already held.
+// */
func _mallocWithAlarm(tls *crt.TLS, _n int32, _pp *unsafe.Pointer) {
var _nFull int32
var _1_nUsed int64
var _p unsafe.Pointer
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_mem0.X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24437), unsafe.Pointer((*int8)(unsafe.Pointer(&_mallocWithAlarmØ00__func__Ø000))), unsafe.Pointer(str(1327)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_mem0.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24437), unsafe.Pointer(&_mallocWithAlarmØ00__func__Ø000), unsafe.Pointer(str(1345)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _n <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24438), unsafe.Pointer((*int8)(unsafe.Pointer(&_mallocWithAlarmØ00__func__Ø000))), unsafe.Pointer(str(1358)))
+ if _n <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24438), unsafe.Pointer(&_mallocWithAlarmØ00__func__Ø000), unsafe.Pointer(str(1376)))
crt.X__builtin_abort(tls)
}
}()
- _nFull = ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X4)(tls, _n)
- _sqlite3StatusHighwater(tls, i32(5), _n)
- if (_mem0.X1) <= int64(i32(0)) {
+ _nFull = (_sqlite3Config.Xm.XxRoundup)(tls, _n)
+ _sqlite3StatusHighwater(tls, int32(5), _n)
+ if _mem0.XalarmThreshold <= (0) {
goto _4
}
- _1_nUsed = _sqlite3StatusValue(tls, i32(0))
- if _1_nUsed >= ((_mem0.X1) - int64(_nFull)) {
- *(*int32)(unsafe.Pointer(&(_mem0.X5))) = i32(1)
+ _1_nUsed = _sqlite3StatusValue(tls, int32(0))
+ if _1_nUsed >= (_mem0.XalarmThreshold - int64(_nFull)) {
+ _mem0.XnearlyFull = int32(1)
_sqlite3MallocAlarm(tls, _nFull)
goto _6
}
- *(*int32)(unsafe.Pointer(&(_mem0.X5))) = i32(0)
+ _mem0.XnearlyFull = int32(0)
_6:
_4:
- _p = ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X0)(tls, _nFull)
+ _p = (_sqlite3Config.Xm.XxMalloc)(tls, _nFull)
if _p != nil {
_nFull = _sqlite3MallocSize(tls, _p)
- _sqlite3StatusUp(tls, i32(0), _nFull)
- _sqlite3StatusUp(tls, i32(9), i32(1))
+ _sqlite3StatusUp(tls, int32(0), _nFull)
+ _sqlite3StatusUp(tls, int32(9), int32(1))
}
*_pp = _p
}
@@ -2497,180 +2389,194 @@ _4:
var _mallocWithAlarmØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_mallocWithAlarmØ00__func__Ø000[0], str(1362), 16)
+ crt.Xstrncpy(nil, &_mallocWithAlarmØ00__func__Ø000[0], str(1380), 16)
}
-// Adjust the highwater mark if necessary.
-// The caller must hold the appropriate mutex.
+// C comment
+// /*
+// ** Adjust the highwater mark if necessary.
+// ** The caller must hold the appropriate mutex.
+// */
func _sqlite3StatusHighwater(tls *crt.TLS, _op int32, _X int32) {
var _newValue uint32
func() {
- if _X < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18589), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000))), unsafe.Pointer(str(1378)))
+ if _X < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18589), unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000), unsafe.Pointer(str(1396)))
crt.X__builtin_abort(tls)
}
}()
_newValue = uint32(_X)
func() {
- if _op < i32(0) || _op >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18591), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000))), unsafe.Pointer(str(1085)))
+ if _op < int32(0) || _op >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18591), unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000), unsafe.Pointer(str(1103)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op < i32(0) || _op >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18592), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000))), unsafe.Pointer(str(971)))
+ if _op < int32(0) || _op >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18592), unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000), unsafe.Pointer(str(989)))
crt.X__builtin_abort(tls)
}
}()
func() {
if Xsqlite3_mutex_held(tls, func() *Xsqlite3_mutex {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_statMutex)) + 1*uintptr(_op)))) != 0 {
+ if (*elem1((*int8)(unsafe.Pointer(&_statMutex)), uintptr(_op))) != 0 {
return _sqlite3Pcache1Mutex(tls)
}
return _sqlite3MallocMutex(tls)
}()) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18593), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000))), unsafe.Pointer(str(1004)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18593), unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000), unsafe.Pointer(str(1022)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op != i32(5) && _op != i32(7) && _op != i32(8) && _op != i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18595), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000))), unsafe.Pointer(str(1383)))
+ if _op != int32(5) && _op != int32(7) && _op != int32(8) && _op != int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18595), unsafe.Pointer(&_sqlite3StatusHighwaterØ00__func__Ø000), unsafe.Pointer(str(1401)))
crt.X__builtin_abort(tls)
}
}()
- if _newValue > (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X1))))) + 4*uintptr(_op)))) {
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X1))))) + 4*uintptr(_op))) = _newValue
+ if _newValue > (*elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XmxValue)), uintptr(_op))) {
+ *elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XmxValue)), uintptr(_op)) = _newValue
}
}
var _sqlite3StatusHighwaterØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StatusHighwaterØ00__func__Ø000[0], str(1517), 23)
+ crt.Xstrncpy(nil, &_sqlite3StatusHighwaterØ00__func__Ø000[0], str(1535), 23)
}
-// Return the current value of a status parameter. The caller must
-// be holding the appropriate mutex.
+// C comment
+// /*
+// ** Return the current value of a status parameter. The caller must
+// ** be holding the appropriate mutex.
+// */
func _sqlite3StatusValue(tls *crt.TLS, _op int32) (r0 int64) {
func() {
- if _op < i32(0) || _op >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18543), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusValueØ00__func__Ø000))), unsafe.Pointer(str(1085)))
+ if _op < int32(0) || _op >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18543), unsafe.Pointer(&_sqlite3StatusValueØ00__func__Ø000), unsafe.Pointer(str(1103)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op < i32(0) || _op >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18544), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusValueØ00__func__Ø000))), unsafe.Pointer(str(971)))
+ if _op < int32(0) || _op >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18544), unsafe.Pointer(&_sqlite3StatusValueØ00__func__Ø000), unsafe.Pointer(str(989)))
crt.X__builtin_abort(tls)
}
}()
func() {
if Xsqlite3_mutex_held(tls, func() *Xsqlite3_mutex {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_statMutex)) + 1*uintptr(_op)))) != 0 {
+ if (*elem1((*int8)(unsafe.Pointer(&_statMutex)), uintptr(_op))) != 0 {
return _sqlite3Pcache1Mutex(tls)
}
return _sqlite3MallocMutex(tls)
}()) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18545), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusValueØ00__func__Ø000))), unsafe.Pointer(str(1004)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18545), unsafe.Pointer(&_sqlite3StatusValueØ00__func__Ø000), unsafe.Pointer(str(1022)))
crt.X__builtin_abort(tls)
}
}()
- return int64(*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X0))))) + 4*uintptr(_op))))
+ return int64(*elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XnowValue)), uintptr(_op)))
}
var _sqlite3StatusValueØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StatusValueØ00__func__Ø000[0], str(1540), 19)
+ crt.Xstrncpy(nil, &_sqlite3StatusValueØ00__func__Ø000[0], str(1558), 19)
}
-// Trigger the alarm
+// C comment
+// /*
+// ** Trigger the alarm
+// */
func _sqlite3MallocAlarm(tls *crt.TLS, _nByte int32) {
- if (_mem0.X1) <= int64(i32(0)) {
+ if _mem0.XalarmThreshold <= (0) {
return
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
Xsqlite3_release_memory(tls, _nByte)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
}
-// Attempt to release up to n bytes of non-essential memory currently
-// held by SQLite. An example of non-essential memory is memory used to
-// cache database pages that are not currently in use.
+// C comment
+// /*
+// ** Attempt to release up to n bytes of non-essential memory currently
+// ** held by SQLite. An example of non-essential memory is memory used to
+// ** cache database pages that are not currently in use.
+// */
func Xsqlite3_release_memory(tls *crt.TLS, _n int32) (r0 int32) {
- return i32(0)
-}
-
-// Add N to the value of a status record. The caller must hold the
-// appropriate mutex. (Locking is checked by assert()).
-//
-// The StatusUp() routine can accept positive or negative values for N.
-// The value of N is added to the current status value and the high-water
-// mark is adjusted if necessary.
-//
-// The StatusDown() routine lowers the current value by N. The highwater
-// mark is unchanged. N must be non-negative for StatusDown().
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Add N to the value of a status record. The caller must hold the
+// ** appropriate mutex. (Locking is checked by assert()).
+// **
+// ** The StatusUp() routine can accept positive or negative values for N.
+// ** The value of N is added to the current status value and the high-water
+// ** mark is adjusted if necessary.
+// **
+// ** The StatusDown() routine lowers the current value by N. The highwater
+// ** mark is unchanged. N must be non-negative for StatusDown().
+// */
func _sqlite3StatusUp(tls *crt.TLS, _op int32, _N int32) {
func() {
- if _op < i32(0) || _op >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18563), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusUpØ00__func__Ø000))), unsafe.Pointer(str(1085)))
+ if _op < int32(0) || _op >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18563), unsafe.Pointer(&_sqlite3StatusUpØ00__func__Ø000), unsafe.Pointer(str(1103)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op < i32(0) || _op >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18564), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusUpØ00__func__Ø000))), unsafe.Pointer(str(971)))
+ if _op < int32(0) || _op >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18564), unsafe.Pointer(&_sqlite3StatusUpØ00__func__Ø000), unsafe.Pointer(str(989)))
crt.X__builtin_abort(tls)
}
}()
func() {
if Xsqlite3_mutex_held(tls, func() *Xsqlite3_mutex {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_statMutex)) + 1*uintptr(_op)))) != 0 {
+ if (*elem1((*int8)(unsafe.Pointer(&_statMutex)), uintptr(_op))) != 0 {
return _sqlite3Pcache1Mutex(tls)
}
return _sqlite3MallocMutex(tls)
}()) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18565), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StatusUpØ00__func__Ø000))), unsafe.Pointer(str(1004)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18565), unsafe.Pointer(&_sqlite3StatusUpØ00__func__Ø000), unsafe.Pointer(str(1022)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X0))))) + 4*uintptr(_op)))
- *p = (*p) + uint32(_N)
- sink5(*p)
- }
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X0))))) + 4*uintptr(_op)))) > (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X1))))) + 4*uintptr(_op)))) {
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X1))))) + 4*uintptr(_op))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X0))))) + 4*uintptr(_op)))
+ *elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XnowValue)), uintptr(_op)) += uint32(_N)
+ if (*elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XnowValue)), uintptr(_op))) > (*elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XmxValue)), uintptr(_op))) {
+ *elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XmxValue)), uintptr(_op)) = *elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XnowValue)), uintptr(_op))
}
}
var _sqlite3StatusUpØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StatusUpØ00__func__Ø000[0], str(1559), 16)
+ crt.Xstrncpy(nil, &_sqlite3StatusUpØ00__func__Ø000[0], str(1577), 16)
}
var _sqlite3MallocØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3MallocØ00__func__Ø000[0], str(1575), 14)
+ crt.Xstrncpy(nil, &_sqlite3MallocØ00__func__Ø000[0], str(1593), 14)
}
-// Call this routine to record the fact that an OOM (out-of-memory) error
-// has happened. This routine will set db->mallocFailed, and also
-// temporarily disable the lookaside memory allocator and interrupt
-// any running VDBEs.
+// C comment
+// /*
+// ** Call this routine to record the fact that an OOM (out-of-memory) error
+// ** has happened. This routine will set db->mallocFailed, and also
+// ** temporarily disable the lookaside memory allocator and interrupt
+// ** any running VDBEs.
+// */
func _sqlite3OomFault(tls *crt.TLS, _db *Xsqlite3) {
- if int32(_db.X17) != i32(0) || int32(_db.X18) != i32(0) {
+ if int32(_db.XmallocFailed) != int32(0) || int32(_db.XbBenignMalloc) != int32(0) {
goto _1
}
- *(*uint8)(unsafe.Pointer(&(_db.X17))) = uint8(i32(1))
- if (_db.X37) > i32(0) {
- *(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57))))) = i32(1)
+ _db.XmallocFailed = uint8(1)
+ if _db.XnVdbeExec > int32(0) {
+ *(*int32)(unsafe.Pointer(&_db.Xu1)) = int32(1)
}
- *(*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X0))) += 1
+ _db.Xlookaside.XbDisable += 1
_1:
}
@@ -2679,17 +2585,17 @@ func _dbReallocFinish(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer, _n uint64)
_pNew = nil
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24912), unsafe.Pointer((*int8)(unsafe.Pointer(&_dbReallocFinishØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24912), unsafe.Pointer(&_dbReallocFinishØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24913), unsafe.Pointer((*int8)(unsafe.Pointer(&_dbReallocFinishØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24913), unsafe.Pointer(&_dbReallocFinishØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_db.X17) != i32(0) {
+ if int32(_db.XmallocFailed) != int32(0) {
goto _4
}
if _isLookaside(tls, _db, _p) == 0 {
@@ -2697,13 +2603,12 @@ func _dbReallocFinish(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer, _n uint64)
}
_pNew = _sqlite3DbMallocRawNN(tls, _db, _n)
if _pNew != nil {
- crt.Xmemcpy(tls, _pNew, _p, uint32((*t7)(unsafe.Pointer(&(_db.X58))).X1))
+ crt.Xmemcpy(tls, _pNew, _p, uint32(_db.Xlookaside.Xsz))
_sqlite3DbFree(tls, _db, _p)
}
goto _7
_5:
- i32(0)
- i32(0)
+
_pNew = Xsqlite3_realloc64(tls, _p, _n)
if _pNew == nil {
_sqlite3OomFault(tls, _db)
@@ -2716,7 +2621,7 @@ _4:
var _dbReallocFinishØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_dbReallocFinishØ00__func__Ø000[0], str(1589), 16)
+ crt.Xstrncpy(nil, &_dbReallocFinishØ00__func__Ø000[0], str(1607), 16)
}
func Xsqlite3_realloc64(tls *crt.TLS, _pOld unsafe.Pointer, _n uint64) (r0 unsafe.Pointer) {
@@ -2726,116 +2631,118 @@ func Xsqlite3_realloc64(tls *crt.TLS, _pOld unsafe.Pointer, _n uint64) (r0 unsaf
return _sqlite3Realloc(tls, _pOld, _n)
}
-// Initialize SQLite.
-//
-// This routine must be called to initialize the memory allocation,
-// VFS, and mutex subsystems prior to doing any serious work with
-// SQLite. But as long as you do not compile with SQLITE_OMIT_AUTOINIT
-// this routine will be called automatically by key routines such as
-// sqlite3_open().
-//
-// This routine is a no-op except on its very first call for the process,
-// or for the first call after a call to sqlite3_shutdown.
-//
-// The first thread to call this routine runs the initialization to
-// completion. If subsequent threads call this routine before the first
-// thread has finished the initialization process, then the subsequent
-// threads must block until the first thread finishes with the initialization.
-//
-// The first thread might call this routine recursively. Recursive
-// calls to this routine should not block, of course. Otherwise the
-// initialization process would never complete.
-//
-// Let X be the first thread to enter this routine. Let Y be some other
-// thread. Then while the initial invocation of this routine by X is
-// incomplete, it is required that:
-//
-// * Calls to this routine from Y must block until the outer-most
-// call by X completes.
-//
-// * Recursive calls to this routine from thread X return immediately
-// without blocking.
+// C comment
+// /*
+// ** Initialize SQLite.
+// **
+// ** This routine must be called to initialize the memory allocation,
+// ** VFS, and mutex subsystems prior to doing any serious work with
+// ** SQLite. But as long as you do not compile with SQLITE_OMIT_AUTOINIT
+// ** this routine will be called automatically by key routines such as
+// ** sqlite3_open().
+// **
+// ** This routine is a no-op except on its very first call for the process,
+// ** or for the first call after a call to sqlite3_shutdown.
+// **
+// ** The first thread to call this routine runs the initialization to
+// ** completion. If subsequent threads call this routine before the first
+// ** thread has finished the initialization process, then the subsequent
+// ** threads must block until the first thread finishes with the initialization.
+// **
+// ** The first thread might call this routine recursively. Recursive
+// ** calls to this routine should not block, of course. Otherwise the
+// ** initialization process would never complete.
+// **
+// ** Let X be the first thread to enter this routine. Let Y be some other
+// ** thread. Then while the initial invocation of this routine by X is
+// ** incomplete, it is required that:
+// **
+// ** * Calls to this routine from Y must block until the outer-most
+// ** call by X completes.
+// **
+// ** * Recursive calls to this routine from thread X return immediately
+// ** without blocking.
+// */
func Xsqlite3_initialize(tls *crt.TLS) (r0 int32) {
var _rc int32
var _12_x uint64
var _12_y float64
var _pMaster *Xsqlite3_mutex
- i32(0)
- if (_sqlite3Config.X28) != 0 {
- return i32(0)
+
+ if _sqlite3Config.XisInit != 0 {
+ return int32(0)
}
_rc = _sqlite3MutexInit(tls)
if _rc != 0 {
return _rc
}
- _pMaster = _sqlite3MutexAlloc(tls, i32(2))
+ _pMaster = _sqlite3MutexAlloc(tls, int32(2))
Xsqlite3_mutex_enter(tls, _pMaster)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X30))) = i32(1)
- if (_sqlite3Config.X31) == 0 {
+ _sqlite3Config.XisMutexInit = int32(1)
+ if _sqlite3Config.XisMallocInit == 0 {
_rc = _sqlite3MallocInit(tls)
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _3
}
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X31))) = i32(1)
- if (*Xsqlite3_mutex)(_sqlite3Config.X34) != nil {
+ _sqlite3Config.XisMallocInit = int32(1)
+ if _sqlite3Config.XpInitMutex != nil {
goto _4
}
- *(**Xsqlite3_mutex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sqlite3Config.X34))))) = _sqlite3MutexAlloc(tls, i32(1))
- if (_sqlite3Config.X1) != 0 && ((*Xsqlite3_mutex)(_sqlite3Config.X34) == nil) {
- _rc = _sqlite3NomemError(tls, i32(140658))
+ *(**Xsqlite3_mutex)(unsafe.Pointer(&_sqlite3Config.XpInitMutex)) = _sqlite3MutexAlloc(tls, int32(1))
+ if _sqlite3Config.XbCoreMutex != 0 && (_sqlite3Config.XpInitMutex == nil) {
+ _rc = _sqlite3NomemError(tls, int32(140658))
}
_4:
_3:
- if _rc == i32(0) {
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X33))) += 1
+ if _rc == int32(0) {
+ _sqlite3Config.XnRefInitMutex += 1
}
Xsqlite3_mutex_leave(tls, _pMaster)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_sqlite3Config.X34))
- if (_sqlite3Config.X28) != i32(0) || (_sqlite3Config.X29) != i32(0) {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_sqlite3Config.XpInitMutex))
+ if _sqlite3Config.XisInit != int32(0) || _sqlite3Config.XinProgress != int32(0) {
goto _10
}
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X29))) = i32(1)
- crt.Xmemset(tls, (unsafe.Pointer)(&_sqlite3BuiltinFunctions), i32(0), u32(92))
+ _sqlite3Config.XinProgress = int32(1)
+ crt.Xmemset(tls, unsafe.Pointer(&_sqlite3BuiltinFunctions), int32(0), uint32(92))
_sqlite3RegisterBuiltinFunctions(tls)
- if (_sqlite3Config.X32) == i32(0) {
+ if _sqlite3Config.XisPCacheInit == int32(0) {
_rc = _sqlite3PcacheInitialize(tls)
}
- if _rc == i32(0) {
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X32))) = i32(1)
+ if _rc == int32(0) {
+ _sqlite3Config.XisPCacheInit = int32(1)
_rc = _sqlite3OsInit(tls)
}
- if _rc == i32(0) {
- _sqlite3PCacheBufferSetup(tls, _sqlite3Config.X22, _sqlite3Config.X23, _sqlite3Config.X24)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X28))) = i32(1)
+ if _rc == int32(0) {
+ _sqlite3PCacheBufferSetup(tls, _sqlite3Config.XpPage, _sqlite3Config.XszPage, _sqlite3Config.XnPage)
+ _sqlite3Config.XisInit = int32(1)
}
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X29))) = i32(0)
+ _sqlite3Config.XinProgress = int32(0)
_10:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_sqlite3Config.X34))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_sqlite3Config.XpInitMutex))
Xsqlite3_mutex_enter(tls, _pMaster)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X33))) -= 1
- if (_sqlite3Config.X33) <= i32(0) {
+ _sqlite3Config.XnRefInitMutex -= 1
+ if _sqlite3Config.XnRefInitMutex <= int32(0) {
func() {
- if (_sqlite3Config.X33) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(140723), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_initializeØ00__func__Ø000))), unsafe.Pointer(str(1605)))
+ if _sqlite3Config.XnRefInitMutex != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(140723), unsafe.Pointer(&_sqlite3_initializeØ00__func__Ø000), unsafe.Pointer(str(1623)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_free(tls, (*Xsqlite3_mutex)(_sqlite3Config.X34))
- *(**Xsqlite3_mutex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sqlite3Config.X34))))) = nil
+ Xsqlite3_mutex_free(tls, (*Xsqlite3_mutex)(_sqlite3Config.XpInitMutex))
+ *(**Xsqlite3_mutex)(unsafe.Pointer(&_sqlite3Config.XpInitMutex)) = nil
}
Xsqlite3_mutex_leave(tls, _pMaster)
- if _rc == i32(0) {
- _12_x = u64(9223372036854775807)
- i32(0)
- i32(0)
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_12_y), (unsafe.Pointer)(&_12_x), uint32(i32(8)))
+ if _rc == int32(0) {
+ _12_x = uint64(9223372036854775807)
+
+ crt.Xmemcpy(tls, unsafe.Pointer(&_12_y), unsafe.Pointer(&_12_x), uint32(8))
func() {
if _sqlite3IsNaN(tls, _12_y) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(140743), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_initializeØ00__func__Ø000))), unsafe.Pointer(str(1642)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(140743), unsafe.Pointer(&_sqlite3_initializeØ00__func__Ø000), unsafe.Pointer(str(1660)))
crt.X__builtin_abort(tls)
}
}()
@@ -2846,56 +2753,64 @@ _10:
panic(0)
}
-// Initialize the mutex system.
+// C comment
+// /*
+// ** Initialize the mutex system.
+// */
func _sqlite3MutexInit(tls *crt.TLS) (r0 int32) {
var _rc int32
var _1_pFrom, _1_pTo *Xsqlite3_mutex_methods
- _rc = i32(0)
- if (*(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X2)}))) != nil {
+ _rc = int32(0)
+ if (_sqlite3Config.Xmutex.XxMutexAlloc) != nil {
goto _0
}
- _1_pTo = (*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11)))
- if (_sqlite3Config.X1) != 0 {
+ _1_pTo = &_sqlite3Config.Xmutex
+ if _sqlite3Config.XbCoreMutex != 0 {
_1_pFrom = _sqlite3DefaultMutex(tls)
goto _2
}
_1_pFrom = _sqlite3NoopMutex(tls)
_2:
- *(*func(*crt.TLS) int32)(unsafe.Pointer(&(_1_pTo.X0))) = _1_pFrom.X0
- *(*func(*crt.TLS) int32)(unsafe.Pointer(&(_1_pTo.X1))) = _1_pFrom.X1
- *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_1_pTo.X3))))) = *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_1_pFrom.X3)}))
- *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_1_pTo.X4))))) = *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_1_pFrom.X4)}))
- *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&(_1_pTo.X5))))) = *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_1_pFrom.X5)}))
- *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_1_pTo.X6))))) = *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_1_pFrom.X6)}))
- *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&(_1_pTo.X7))))) = *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_1_pFrom.X7)}))
- *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&(_1_pTo.X8))))) = *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_1_pFrom.X8)}))
+ _1_pTo.XxMutexInit = _1_pFrom.XxMutexInit
+ _1_pTo.XxMutexEnd = _1_pFrom.XxMutexEnd
+ *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&_1_pTo.XxMutexFree)) = func() func(*crt.TLS, *Xsqlite3_mutex) {
+ v := _1_pFrom.XxMutexFree
+ return *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&v))
+ }()
+ *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&_1_pTo.XxMutexEnter)) = func() func(*crt.TLS, *Xsqlite3_mutex) {
+ v := _1_pFrom.XxMutexEnter
+ return *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&v))
+ }()
+ *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&_1_pTo.XxMutexTry)) = func() func(*crt.TLS, *Xsqlite3_mutex) int32 {
+ v := _1_pFrom.XxMutexTry
+ return *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&v))
+ }()
+ *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&_1_pTo.XxMutexLeave)) = func() func(*crt.TLS, *Xsqlite3_mutex) {
+ v := _1_pFrom.XxMutexLeave
+ return *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&v))
+ }()
+ *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&_1_pTo.XxMutexHeld)) = func() func(*crt.TLS, *Xsqlite3_mutex) int32 {
+ v := _1_pFrom.XxMutexHeld
+ return *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&v))
+ }()
+ *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&_1_pTo.XxMutexNotheld)) = func() func(*crt.TLS, *Xsqlite3_mutex) int32 {
+ v := _1_pFrom.XxMutexNotheld
+ return *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&v))
+ }()
_sqlite3MemoryBarrier(tls)
- *(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer((*func(*crt.TLS, int32) unsafe.Pointer)(unsafe.Pointer(&(_1_pTo.X2))))) = *(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{(_1_pFrom.X2)}))
+ *(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&_1_pTo.XxMutexAlloc)) = func() func(*crt.TLS, int32) *Xsqlite3_mutex {
+ v := _1_pFrom.XxMutexAlloc
+ return *(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&v))
+ }()
_0:
func() {
- if ((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22801), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MutexInitØ00__func__Ø000))), unsafe.Pointer(str(1658)))
+ if (_sqlite3Config.Xmutex.XxMutexInit) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22801), unsafe.Pointer(&_sqlite3MutexInitØ00__func__Ø000), unsafe.Pointer(str(1676)))
crt.X__builtin_abort(tls)
}
}()
- _rc = ((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X0)(tls)
- _mutexIsInit = i32(1)
+ _rc = (_sqlite3Config.Xmutex.XxMutexInit)(tls)
+ _mutexIsInit = int32(1)
bug20530(_mutexIsInit)
return _rc
}
@@ -2907,241 +2822,225 @@ func _sqlite3DefaultMutex(tls *crt.TLS) (r0 *Xsqlite3_mutex_methods) {
var _sqlite3DefaultMutexØ00sMutexØ001 Xsqlite3_mutex_methods
func init() {
- _sqlite3DefaultMutexØ00sMutexØ001 = Xsqlite3_mutex_methods{X0: _pthreadMutexInit, X1: _pthreadMutexEnd, X2: *(*func(*crt.TLS, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
+ _sqlite3DefaultMutexØ00sMutexØ001 = Xsqlite3_mutex_methods{XxMutexInit: _pthreadMutexInit, XxMutexEnd: _pthreadMutexEnd, XxMutexAlloc: *(*func(*crt.TLS, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, int32) *Xsqlite3_mutex
- }{_pthreadMutexAlloc})), X3: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_pthreadMutexAlloc})), XxMutexFree: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex)
- }{_pthreadMutexFree})), X4: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_pthreadMutexFree})), XxMutexEnter: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex)
- }{_pthreadMutexEnter})), X5: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_pthreadMutexEnter})), XxMutexTry: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex) int32
- }{_pthreadMutexTry})), X6: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_pthreadMutexTry})), XxMutexLeave: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex)
- }{_pthreadMutexLeave})), X7: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_pthreadMutexLeave})), XxMutexHeld: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex) int32
- }{_pthreadMutexHeld})), X8: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_pthreadMutexHeld})), XxMutexNotheld: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex) int32
}{_pthreadMutexNotheld}))}
}
-// Initialize and deinitialize the mutex subsystem.
+// C comment
+// /*
+// ** Initialize and deinitialize the mutex subsystem.
+// */
func _pthreadMutexInit(tls *crt.TLS) (r0 int32) {
- return i32(0)
+ return int32(0)
}
func _pthreadMutexEnd(tls *crt.TLS) (r0 int32) {
- return i32(0)
-}
-
-// The sqlite3_mutex_alloc() routine allocates a new
-// mutex and returns a pointer to it. If it returns NULL
-// that means that a mutex could not be allocated. SQLite
-// will unwind its stack and return an error. The argument
-// to sqlite3_mutex_alloc() is one of these integer constants:
-//
-// <ul>
-// <li> SQLITE_MUTEX_FAST
-// <li> SQLITE_MUTEX_RECURSIVE
-// <li> SQLITE_MUTEX_STATIC_MASTER
-// <li> SQLITE_MUTEX_STATIC_MEM
-// <li> SQLITE_MUTEX_STATIC_OPEN
-// <li> SQLITE_MUTEX_STATIC_PRNG
-// <li> SQLITE_MUTEX_STATIC_LRU
-// <li> SQLITE_MUTEX_STATIC_PMEM
-// <li> SQLITE_MUTEX_STATIC_APP1
-// <li> SQLITE_MUTEX_STATIC_APP2
-// <li> SQLITE_MUTEX_STATIC_APP3
-// <li> SQLITE_MUTEX_STATIC_VFS1
-// <li> SQLITE_MUTEX_STATIC_VFS2
-// <li> SQLITE_MUTEX_STATIC_VFS3
-// </ul>
-//
-// The first two constants cause sqlite3_mutex_alloc() to create
-// a new mutex. The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
-// is used but not necessarily so when SQLITE_MUTEX_FAST is used.
-// The mutex implementation does not need to make a distinction
-// between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
-// not want to. But SQLite will only request a recursive mutex in
-// cases where it really needs one. If a faster non-recursive mutex
-// implementation is available on the host platform, the mutex subsystem
-// might return such a mutex in response to SQLITE_MUTEX_FAST.
-//
-// The other allowed parameters to sqlite3_mutex_alloc() each return
-// a pointer to a static preexisting mutex. Six static mutexes are
-// used by the current version of SQLite. Future versions of SQLite
-// may add additional static mutexes. Static mutexes are for internal
-// use by SQLite only. Applications that use SQLite mutexes should
-// use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
-// SQLITE_MUTEX_RECURSIVE.
-//
-// Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
-// or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
-// returns a different mutex on every call. But for the static
-// mutex types, the same mutex is returned on every call that has
-// the same type number.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** The sqlite3_mutex_alloc() routine allocates a new
+// ** mutex and returns a pointer to it. If it returns NULL
+// ** that means that a mutex could not be allocated. SQLite
+// ** will unwind its stack and return an error. The argument
+// ** to sqlite3_mutex_alloc() is one of these integer constants:
+// **
+// ** <ul>
+// ** <li> SQLITE_MUTEX_FAST
+// ** <li> SQLITE_MUTEX_RECURSIVE
+// ** <li> SQLITE_MUTEX_STATIC_MASTER
+// ** <li> SQLITE_MUTEX_STATIC_MEM
+// ** <li> SQLITE_MUTEX_STATIC_OPEN
+// ** <li> SQLITE_MUTEX_STATIC_PRNG
+// ** <li> SQLITE_MUTEX_STATIC_LRU
+// ** <li> SQLITE_MUTEX_STATIC_PMEM
+// ** <li> SQLITE_MUTEX_STATIC_APP1
+// ** <li> SQLITE_MUTEX_STATIC_APP2
+// ** <li> SQLITE_MUTEX_STATIC_APP3
+// ** <li> SQLITE_MUTEX_STATIC_VFS1
+// ** <li> SQLITE_MUTEX_STATIC_VFS2
+// ** <li> SQLITE_MUTEX_STATIC_VFS3
+// ** </ul>
+// **
+// ** The first two constants cause sqlite3_mutex_alloc() to create
+// ** a new mutex. The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
+// ** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
+// ** The mutex implementation does not need to make a distinction
+// ** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
+// ** not want to. But SQLite will only request a recursive mutex in
+// ** cases where it really needs one. If a faster non-recursive mutex
+// ** implementation is available on the host platform, the mutex subsystem
+// ** might return such a mutex in response to SQLITE_MUTEX_FAST.
+// **
+// ** The other allowed parameters to sqlite3_mutex_alloc() each return
+// ** a pointer to a static preexisting mutex. Six static mutexes are
+// ** used by the current version of SQLite. Future versions of SQLite
+// ** may add additional static mutexes. Static mutexes are for internal
+// ** use by SQLite only. Applications that use SQLite mutexes should
+// ** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
+// ** SQLITE_MUTEX_RECURSIVE.
+// **
+// ** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
+// ** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
+// ** returns a different mutex on every call. But for the static
+// ** mutex types, the same mutex is returned on every call that has
+// ** the same type number.
+// */
func _pthreadMutexAlloc(tls *crt.TLS, _iType int32) (r0 *Xsqlite3_mutex) {
var _3_recursiveAttr crt.Xpthread_mutexattr_t
var _p *Xsqlite3_mutex
switch _iType {
- case i32(0):
+ case int32(0):
goto _2
- case i32(1):
+ case int32(1):
goto _1
default:
goto _3
}
_1:
- _p = (*Xsqlite3_mutex)(_sqlite3MallocZero(tls, uint64(u32(40))))
+ _p = (*Xsqlite3_mutex)(_sqlite3MallocZero(tls, uint64(40)))
if _p != nil {
crt.Xpthread_mutexattr_init(tls, &_3_recursiveAttr)
- crt.Xpthread_mutexattr_settype(tls, &_3_recursiveAttr, i32(1))
- crt.Xpthread_mutex_init(tls, (*crt.Xpthread_mutex_t)(unsafe.Pointer(&(_p.X0))), &_3_recursiveAttr)
+ crt.Xpthread_mutexattr_settype(tls, &_3_recursiveAttr, int32(1))
+ crt.Xpthread_mutex_init(tls, &_p.Xmutex, &_3_recursiveAttr)
crt.Xpthread_mutexattr_destroy(tls, &_3_recursiveAttr)
}
goto _5
_2:
- _p = (*Xsqlite3_mutex)(_sqlite3MallocZero(tls, uint64(u32(40))))
+ _p = (*Xsqlite3_mutex)(_sqlite3MallocZero(tls, uint64(40)))
if _p != nil {
- crt.Xpthread_mutex_init(tls, (*crt.Xpthread_mutex_t)(unsafe.Pointer(&(_p.X0))), nil)
+ crt.Xpthread_mutex_init(tls, &_p.Xmutex, nil)
}
goto _5
_3:
- if ((_iType - i32(2)) < i32(0)) || ((_iType - i32(2)) >= i32(12)) {
- _sqlite3MisuseError(tls, i32(23329))
+ if ((_iType - int32(2)) < int32(0)) || ((_iType - int32(2)) >= int32(12)) {
+ _sqlite3MisuseError(tls, int32(23329))
return nil
}
- _p = (*Xsqlite3_mutex)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_pthreadMutexAllocØ00staticMutexesØ001)) + 40*uintptr(_iType-i32(2))))
+ _p = elem10((*Xsqlite3_mutex)(unsafe.Pointer(&_pthreadMutexAllocØ00staticMutexesØ001)), uintptr(_iType-int32(2)))
goto _5
_5:
if _p != nil {
- *(*int32)(unsafe.Pointer(&(_p.X1))) = _iType
+ _p.Xid = _iType
}
return _p
-
- _ = _3_recursiveAttr
- panic(0)
}
func _sqlite3MallocZero(tls *crt.TLS, _n uint64) (r0 unsafe.Pointer) {
var _p unsafe.Pointer
_p = _sqlite3Malloc(tls, _n)
if _p != nil {
- crt.Xmemset(tls, _p, i32(0), uint32(_n))
+ crt.Xmemset(tls, _p, int32(0), uint32(_n))
}
return _p
}
-func _sqlite3MisuseError(tls *crt.TLS, _lineno int32) (r0 int32) {
- return _reportError(tls, i32(21), _lineno, str(1695))
-}
-
-// The following routines are substitutes for constants SQLITE_CORRUPT,
-// SQLITE_MISUSE, SQLITE_CANTOPEN, SQLITE_NOMEM and possibly other error
-// constants. They serve two purposes:
-//
-// 1. Serve as a convenient place to set a breakpoint in a debugger
-// to detect when version error conditions occurs.
-//
-// 2. Invoke sqlite3_log() to provide the source code location where
-// a low-level error is first detected.
-func _reportError(tls *crt.TLS, _iErr int32, _lineno int32, _zType *int8) (r0 int32) {
- Xsqlite3_log(tls, _iErr, str(1702), unsafe.Pointer(_zType), _lineno, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(20))))))+uintptr(unsafe.Pointer(Xsqlite3_sourceid(tls)))))))
- return _iErr
-}
-
-// IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
-// pointer to a string constant whose value is the same as the
-// SQLITE_SOURCE_ID C preprocessor macro.
-func Xsqlite3_sourceid(tls *crt.TLS) (r0 *int8) {
- return str(1727)
-}
-
var _pthreadMutexAllocØ00staticMutexesØ001 [12]Xsqlite3_mutex
-// This routine deallocates a previously
-// allocated mutex. SQLite is careful to deallocate every
-// mutex that it allocates.
+// C comment
+// /*
+// ** This routine deallocates a previously
+// ** allocated mutex. SQLite is careful to deallocate every
+// ** mutex that it allocates.
+// */
func _pthreadMutexFree(tls *crt.TLS, _p *Xsqlite3_mutex) {
func() {
- if (_p.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23350), unsafe.Pointer((*int8)(unsafe.Pointer(&_pthreadMutexFreeØ00__func__Ø000))), unsafe.Pointer(str(1812)))
+ if _p.XnRef != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23350), unsafe.Pointer(&_pthreadMutexFreeØ00__func__Ø000), unsafe.Pointer(str(1713)))
crt.X__builtin_abort(tls)
}
}()
- if ((_p.X1) == i32(0)) || ((_p.X1) == i32(1)) {
- crt.Xpthread_mutex_destroy(tls, (*crt.Xpthread_mutex_t)(unsafe.Pointer(&(_p.X0))))
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ if (_p.Xid == int32(0)) || (_p.Xid == int32(1)) {
+ crt.Xpthread_mutex_destroy(tls, &_p.Xmutex)
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
goto _4
}
- _sqlite3MisuseError(tls, i32(23360))
+ _sqlite3MisuseError(tls, int32(23360))
_4:
}
var _pthreadMutexFreeØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_pthreadMutexFreeØ00__func__Ø000[0], str(1823), 17)
+ crt.Xstrncpy(nil, &_pthreadMutexFreeØ00__func__Ø000[0], str(1724), 17)
}
-// The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
-// to enter a mutex. If another thread is already within the mutex,
-// sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
-// SQLITE_BUSY. The sqlite3_mutex_try() interface returns SQLITE_OK
-// upon successful entry. Mutexes created using SQLITE_MUTEX_RECURSIVE can
-// be entered multiple times by the same thread. In such cases the,
-// mutex must be exited an equal number of times before another thread
-// can enter. If the same thread tries to enter any other kind of mutex
-// more than once, the behavior is undefined.
+// C comment
+// /*
+// ** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+// ** to enter a mutex. If another thread is already within the mutex,
+// ** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+// ** SQLITE_BUSY. The sqlite3_mutex_try() interface returns SQLITE_OK
+// ** upon successful entry. Mutexes created using SQLITE_MUTEX_RECURSIVE can
+// ** be entered multiple times by the same thread. In such cases the,
+// ** mutex must be exited an equal number of times before another thread
+// ** can enter. If the same thread tries to enter any other kind of mutex
+// ** more than once, the behavior is undefined.
+// */
func _pthreadMutexEnter(tls *crt.TLS, _p *Xsqlite3_mutex) {
func() {
- if (_p.X1) != i32(1) && _pthreadMutexNotheld(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23377), unsafe.Pointer((*int8)(unsafe.Pointer(&_pthreadMutexEnterØ00__func__Ø000))), unsafe.Pointer(str(1840)))
+ if _p.Xid != int32(1) && _pthreadMutexNotheld(tls, _p) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23377), unsafe.Pointer(&_pthreadMutexEnterØ00__func__Ø000), unsafe.Pointer(str(1741)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(unsafe.Pointer(&(_p.X0))))
+ crt.Xpthread_mutex_lock(tls, &_p.Xmutex)
func() {
- if (_p.X2) <= i32(0) && (_p.X3) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23406), unsafe.Pointer((*int8)(unsafe.Pointer(&_pthreadMutexEnterØ00__func__Ø000))), unsafe.Pointer(str(1896)))
+ if _p.XnRef <= int32(0) && _p.Xowner != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23406), unsafe.Pointer(&_pthreadMutexEnterØ00__func__Ø000), unsafe.Pointer(str(1797)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_p.X3))) = crt.Xpthread_self(tls)
- *(*int32)(unsafe.Pointer(&(_p.X2))) += 1
- if (_p.X4) != 0 {
- crt.Xprintf(tls, str(1921), unsafe.Pointer(_p), _p.X4, _p.X2)
+ _p.Xowner = crt.Xpthread_self(tls)
+ _p.XnRef += 1
+ if _p.Xtrace != 0 {
+ crt.Xprintf(tls, str(1822), unsafe.Pointer(_p), _p.Xtrace, _p.XnRef)
}
}
func _pthreadMutexNotheld(tls *crt.TLS, _p *Xsqlite3_mutex) (r0 int32) {
- return bool2int(((_p.X2) == i32(0)) || (crt.Xpthread_equal(tls, _p.X3, crt.Xpthread_self(tls)) == i32(0)))
+ return bool2int((_p.XnRef == int32(0)) || (crt.Xpthread_equal(tls, _p.Xowner, crt.Xpthread_self(tls)) == int32(0)))
}
var _pthreadMutexEnterØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_pthreadMutexEnterØ00__func__Ø000[0], str(1955), 18)
+ crt.Xstrncpy(nil, &_pthreadMutexEnterØ00__func__Ø000[0], str(1856), 18)
}
func _pthreadMutexTry(tls *crt.TLS, _p *Xsqlite3_mutex) (r0 int32) {
var _rc int32
func() {
- if (_p.X1) != i32(1) && _pthreadMutexNotheld(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23420), unsafe.Pointer((*int8)(unsafe.Pointer(&_pthreadMutexTryØ00__func__Ø000))), unsafe.Pointer(str(1840)))
+ if _p.Xid != int32(1) && _pthreadMutexNotheld(tls, _p) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23420), unsafe.Pointer(&_pthreadMutexTryØ00__func__Ø000), unsafe.Pointer(str(1741)))
crt.X__builtin_abort(tls)
}
}()
- if crt.Xpthread_mutex_trylock(tls, (*crt.Xpthread_mutex_t)(unsafe.Pointer(&(_p.X0)))) == i32(0) {
- *(*uint32)(unsafe.Pointer(&(_p.X3))) = crt.Xpthread_self(tls)
- *(*int32)(unsafe.Pointer(&(_p.X2))) += 1
- _rc = i32(0)
+ if crt.Xpthread_mutex_trylock(tls, &_p.Xmutex) == int32(0) {
+ _p.Xowner = crt.Xpthread_self(tls)
+ _p.XnRef += 1
+ _rc = int32(0)
goto _4
}
- _rc = i32(5)
+ _rc = int32(5)
_4:
- if (_rc == i32(0)) && (_p.X4) != 0 {
- crt.Xprintf(tls, str(1921), unsafe.Pointer(_p), _p.X4, _p.X2)
+ if (_rc == int32(0)) && _p.Xtrace != 0 {
+ crt.Xprintf(tls, str(1822), unsafe.Pointer(_p), _p.Xtrace, _p.XnRef)
}
return _rc
}
@@ -3149,44 +3048,47 @@ _4:
var _pthreadMutexTryØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_pthreadMutexTryØ00__func__Ø000[0], str(1973), 16)
+ crt.Xstrncpy(nil, &_pthreadMutexTryØ00__func__Ø000[0], str(1874), 16)
}
-// The sqlite3_mutex_leave() routine exits a mutex that was
-// previously entered by the same thread. The behavior
-// is undefined if the mutex is not currently entered or
-// is not currently allocated. SQLite will never do either.
+// C comment
+// /*
+// ** The sqlite3_mutex_leave() routine exits a mutex that was
+// ** previously entered by the same thread. The behavior
+// ** is undefined if the mutex is not currently entered or
+// ** is not currently allocated. SQLite will never do either.
+// */
func _pthreadMutexLeave(tls *crt.TLS, _p *Xsqlite3_mutex) {
func() {
if _pthreadMutexHeld(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23476), unsafe.Pointer((*int8)(unsafe.Pointer(&_pthreadMutexLeaveØ00__func__Ø000))), unsafe.Pointer(str(1989)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23476), unsafe.Pointer(&_pthreadMutexLeaveØ00__func__Ø000), unsafe.Pointer(str(1890)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_p.X2))) -= 1
- if (_p.X2) == i32(0) {
- *(*uint32)(unsafe.Pointer(&(_p.X3))) = uint32(i32(0))
+ _p.XnRef -= 1
+ if _p.XnRef == int32(0) {
+ _p.Xowner = 0
}
func() {
- if (_p.X2) != i32(0) && (_p.X1) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23481), unsafe.Pointer((*int8)(unsafe.Pointer(&_pthreadMutexLeaveØ00__func__Ø000))), unsafe.Pointer(str(2009)))
+ if _p.XnRef != int32(0) && _p.Xid != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23481), unsafe.Pointer(&_pthreadMutexLeaveØ00__func__Ø000), unsafe.Pointer(str(1910)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(unsafe.Pointer(&(_p.X0))))
- if (_p.X4) != 0 {
- crt.Xprintf(tls, str(2053), unsafe.Pointer(_p), _p.X4, _p.X2)
+ crt.Xpthread_mutex_unlock(tls, &_p.Xmutex)
+ if _p.Xtrace != 0 {
+ crt.Xprintf(tls, str(1954), unsafe.Pointer(_p), _p.Xtrace, _p.XnRef)
}
}
func _pthreadMutexHeld(tls *crt.TLS, _p *Xsqlite3_mutex) (r0 int32) {
- return bool2int(((_p.X2) != i32(0)) && crt.Xpthread_equal(tls, _p.X3, crt.Xpthread_self(tls)) != 0)
+ return bool2int((_p.XnRef != int32(0)) && crt.Xpthread_equal(tls, _p.Xowner, crt.Xpthread_self(tls)) != 0)
}
var _pthreadMutexLeaveØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_pthreadMutexLeaveØ00__func__Ø000[0], str(2087), 18)
+ crt.Xstrncpy(nil, &_pthreadMutexLeaveØ00__func__Ø000[0], str(1988), 18)
}
func _sqlite3NoopMutex(tls *crt.TLS) (r0 *Xsqlite3_mutex_methods) {
@@ -3196,391 +3098,418 @@ func _sqlite3NoopMutex(tls *crt.TLS) (r0 *Xsqlite3_mutex_methods) {
var _sqlite3NoopMutexØ00sMutexØ001 Xsqlite3_mutex_methods
func init() {
- _sqlite3NoopMutexØ00sMutexØ001 = Xsqlite3_mutex_methods{X0: _debugMutexInit, X1: _debugMutexEnd, X2: *(*func(*crt.TLS, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
+ _sqlite3NoopMutexØ00sMutexØ001 = Xsqlite3_mutex_methods{XxMutexInit: _debugMutexInit, XxMutexEnd: _debugMutexEnd, XxMutexAlloc: *(*func(*crt.TLS, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, int32) *Xsqlite3_mutex
- }{_debugMutexAlloc})), X3: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_debugMutexAlloc})), XxMutexFree: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex)
- }{_debugMutexFree})), X4: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_debugMutexFree})), XxMutexEnter: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex)
- }{_debugMutexEnter})), X5: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_debugMutexEnter})), XxMutexTry: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex) int32
- }{_debugMutexTry})), X6: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_debugMutexTry})), XxMutexLeave: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex)
- }{_debugMutexLeave})), X7: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_debugMutexLeave})), XxMutexHeld: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex) int32
- }{_debugMutexHeld})), X8: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_debugMutexHeld})), XxMutexNotheld: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex) int32
}{_debugMutexNotheld}))}
}
-// Initialize and deinitialize the mutex subsystem.
+// C comment
+// /*
+// ** Initialize and deinitialize the mutex subsystem.
+// */
func _debugMutexInit(tls *crt.TLS) (r0 int32) {
- return i32(0)
+ return int32(0)
}
func _debugMutexEnd(tls *crt.TLS) (r0 int32) {
- return i32(0)
+ return int32(0)
}
-// The sqlite3_mutex_alloc() routine allocates a new
-// mutex and returns a pointer to it. If it returns NULL
-// that means that a mutex could not be allocated.
+// C comment
+// /*
+// ** The sqlite3_mutex_alloc() routine allocates a new
+// ** mutex and returns a pointer to it. If it returns NULL
+// ** that means that a mutex could not be allocated.
+// */
func _debugMutexAlloc(tls *crt.TLS, _id int32) (r0 *Xsqlite3_mutex) {
- var _pNew *crt.Xstruct_timeval
+ var _pNew *Xsqlite3_debug_mutex
_pNew = nil
switch _id {
- case i32(0):
+ case int32(0):
goto _1
- case i32(1):
+ case int32(1):
goto _1
default:
goto _3
}
_1:
- _pNew = (*crt.Xstruct_timeval)(_sqlite3Malloc(tls, uint64(u32(8))))
+ _pNew = (*Xsqlite3_debug_mutex)(_sqlite3Malloc(tls, uint64(8)))
if _pNew != nil {
- *(*int32)(unsafe.Pointer(&(_pNew.X0))) = _id
- *(*int32)(unsafe.Pointer(&(_pNew.X1))) = i32(0)
+ _pNew.Xid = _id
+ _pNew.Xcnt = int32(0)
}
goto _5
_3:
- if ((_id - i32(2)) < i32(0)) || ((_id - i32(2)) >= i32(12)) {
- _sqlite3MisuseError(tls, i32(23039))
+ if ((_id - int32(2)) < int32(0)) || ((_id - int32(2)) >= int32(12)) {
+ _sqlite3MisuseError(tls, int32(23039))
return nil
}
- _pNew = (*crt.Xstruct_timeval)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_debugMutexAllocØ00aStaticØ001)) + 8*uintptr(_id-i32(2))))
- *(*int32)(unsafe.Pointer(&(_pNew.X0))) = _id
+ _pNew = elem11((*Xsqlite3_debug_mutex)(unsafe.Pointer(&_debugMutexAllocØ00aStaticØ001)), uintptr(_id-int32(2)))
+ _pNew.Xid = _id
goto _5
_5:
return (*Xsqlite3_mutex)(unsafe.Pointer(_pNew))
}
-var _debugMutexAllocØ00aStaticØ001 [12]crt.Xstruct_timeval
+var _debugMutexAllocØ00aStaticØ001 [12]Xsqlite3_debug_mutex
-// This routine deallocates a previously allocated mutex.
+// C comment
+// /*
+// ** This routine deallocates a previously allocated mutex.
+// */
func _debugMutexFree(tls *crt.TLS, _pX *Xsqlite3_mutex) {
- var _p *crt.Xstruct_timeval
- _p = (*crt.Xstruct_timeval)(unsafe.Pointer(_pX))
+ var _p *Xsqlite3_debug_mutex
+ _p = (*Xsqlite3_debug_mutex)(unsafe.Pointer(_pX))
func() {
- if (_p.X1) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23056), unsafe.Pointer((*int8)(unsafe.Pointer(&_debugMutexFreeØ00__func__Ø000))), unsafe.Pointer(str(2105)))
+ if _p.Xcnt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23056), unsafe.Pointer(&_debugMutexFreeØ00__func__Ø000), unsafe.Pointer(str(2006)))
crt.X__builtin_abort(tls)
}
}()
- if ((_p.X0) == i32(1)) || ((_p.X0) == i32(0)) {
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ if (_p.Xid == int32(1)) || (_p.Xid == int32(0)) {
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
goto _4
}
- _sqlite3MisuseError(tls, i32(23061))
+ _sqlite3MisuseError(tls, int32(23061))
_4:
}
var _debugMutexFreeØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_debugMutexFreeØ00__func__Ø000[0], str(2115), 15)
+ crt.Xstrncpy(nil, &_debugMutexFreeØ00__func__Ø000[0], str(2016), 15)
}
-// The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
-// to enter a mutex. If another thread is already within the mutex,
-// sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
-// SQLITE_BUSY. The sqlite3_mutex_try() interface returns SQLITE_OK
-// upon successful entry. Mutexes created using SQLITE_MUTEX_RECURSIVE can
-// be entered multiple times by the same thread. In such cases the,
-// mutex must be exited an equal number of times before another thread
-// can enter. If the same thread tries to enter any other kind of mutex
-// more than once, the behavior is undefined.
+// C comment
+// /*
+// ** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+// ** to enter a mutex. If another thread is already within the mutex,
+// ** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+// ** SQLITE_BUSY. The sqlite3_mutex_try() interface returns SQLITE_OK
+// ** upon successful entry. Mutexes created using SQLITE_MUTEX_RECURSIVE can
+// ** be entered multiple times by the same thread. In such cases the,
+// ** mutex must be exited an equal number of times before another thread
+// ** can enter. If the same thread tries to enter any other kind of mutex
+// ** more than once, the behavior is undefined.
+// */
func _debugMutexEnter(tls *crt.TLS, _pX *Xsqlite3_mutex) {
- var _p *crt.Xstruct_timeval
- _p = (*crt.Xstruct_timeval)(unsafe.Pointer(_pX))
+ var _p *Xsqlite3_debug_mutex
+ _p = (*Xsqlite3_debug_mutex)(unsafe.Pointer(_pX))
func() {
- if (_p.X0) != i32(1) && _debugMutexNotheld(tls, _pX) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23079), unsafe.Pointer((*int8)(unsafe.Pointer(&_debugMutexEnterØ00__func__Ø000))), unsafe.Pointer(str(2130)))
+ if _p.Xid != int32(1) && _debugMutexNotheld(tls, _pX) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23079), unsafe.Pointer(&_debugMutexEnterØ00__func__Ø000), unsafe.Pointer(str(2031)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_p.X1))) += 1
+ _p.Xcnt += 1
}
func _debugMutexNotheld(tls *crt.TLS, _pX *Xsqlite3_mutex) (r0 int32) {
- var _p *crt.Xstruct_timeval
- _p = (*crt.Xstruct_timeval)(unsafe.Pointer(_pX))
- return bool2int((_p == nil) || ((_p.X1) == i32(0)))
+ var _p *Xsqlite3_debug_mutex
+ _p = (*Xsqlite3_debug_mutex)(unsafe.Pointer(_pX))
+ return bool2int((_p == nil) || (_p.Xcnt == int32(0)))
}
var _debugMutexEnterØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_debugMutexEnterØ00__func__Ø000[0], str(2185), 16)
+ crt.Xstrncpy(nil, &_debugMutexEnterØ00__func__Ø000[0], str(2086), 16)
}
func _debugMutexTry(tls *crt.TLS, _pX *Xsqlite3_mutex) (r0 int32) {
- var _p *crt.Xstruct_timeval
- _p = (*crt.Xstruct_timeval)(unsafe.Pointer(_pX))
+ var _p *Xsqlite3_debug_mutex
+ _p = (*Xsqlite3_debug_mutex)(unsafe.Pointer(_pX))
func() {
- if (_p.X0) != i32(1) && _debugMutexNotheld(tls, _pX) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23084), unsafe.Pointer((*int8)(unsafe.Pointer(&_debugMutexTryØ00__func__Ø000))), unsafe.Pointer(str(2130)))
+ if _p.Xid != int32(1) && _debugMutexNotheld(tls, _pX) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23084), unsafe.Pointer(&_debugMutexTryØ00__func__Ø000), unsafe.Pointer(str(2031)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_p.X1))) += 1
- return i32(0)
+ _p.Xcnt += 1
+ return int32(0)
}
var _debugMutexTryØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_debugMutexTryØ00__func__Ø000[0], str(2201), 14)
+ crt.Xstrncpy(nil, &_debugMutexTryØ00__func__Ø000[0], str(2102), 14)
}
-// The sqlite3_mutex_leave() routine exits a mutex that was
-// previously entered by the same thread. The behavior
-// is undefined if the mutex is not currently entered or
-// is not currently allocated. SQLite will never do either.
+// C comment
+// /*
+// ** The sqlite3_mutex_leave() routine exits a mutex that was
+// ** previously entered by the same thread. The behavior
+// ** is undefined if the mutex is not currently entered or
+// ** is not currently allocated. SQLite will never do either.
+// */
func _debugMutexLeave(tls *crt.TLS, _pX *Xsqlite3_mutex) {
- var _p *crt.Xstruct_timeval
- _p = (*crt.Xstruct_timeval)(unsafe.Pointer(_pX))
+ var _p *Xsqlite3_debug_mutex
+ _p = (*Xsqlite3_debug_mutex)(unsafe.Pointer(_pX))
func() {
if _debugMutexHeld(tls, _pX) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23097), unsafe.Pointer((*int8)(unsafe.Pointer(&_debugMutexLeaveØ00__func__Ø000))), unsafe.Pointer(str(2215)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23097), unsafe.Pointer(&_debugMutexLeaveØ00__func__Ø000), unsafe.Pointer(str(2116)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_p.X1))) -= 1
+ _p.Xcnt -= 1
func() {
- if (_p.X0) != i32(1) && _debugMutexNotheld(tls, _pX) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(23099), unsafe.Pointer((*int8)(unsafe.Pointer(&_debugMutexLeaveØ00__func__Ø000))), unsafe.Pointer(str(2130)))
+ if _p.Xid != int32(1) && _debugMutexNotheld(tls, _pX) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(23099), unsafe.Pointer(&_debugMutexLeaveØ00__func__Ø000), unsafe.Pointer(str(2031)))
crt.X__builtin_abort(tls)
}
}()
}
-// The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
-// intended for use inside assert() statements.
+// C comment
+// /*
+// ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
+// ** intended for use inside assert() statements.
+// */
func _debugMutexHeld(tls *crt.TLS, _pX *Xsqlite3_mutex) (r0 int32) {
- var _p *crt.Xstruct_timeval
- _p = (*crt.Xstruct_timeval)(unsafe.Pointer(_pX))
- return bool2int((_p == nil) || ((_p.X1) > i32(0)))
+ var _p *Xsqlite3_debug_mutex
+ _p = (*Xsqlite3_debug_mutex)(unsafe.Pointer(_pX))
+ return bool2int((_p == nil) || (_p.Xcnt > int32(0)))
}
var _debugMutexLeaveØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_debugMutexLeaveØ00__func__Ø000[0], str(2234), 16)
+ crt.Xstrncpy(nil, &_debugMutexLeaveØ00__func__Ø000[0], str(2135), 16)
}
-// Try to provide a memory barrier operation, needed for initialization
-// and also for the implementation of xShmBarrier in the VFS in cases
-// where SQLite is compiled without mutexes.
+// C comment
+// /*
+// ** Try to provide a memory barrier operation, needed for initialization
+// ** and also for the implementation of xShmBarrier in the VFS in cases
+// ** where SQLite is compiled without mutexes.
+// */
func _sqlite3MemoryBarrier(tls *crt.TLS) {
}
var _sqlite3MutexInitØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3MutexInitØ00__func__Ø000[0], str(2250), 17)
+ crt.Xstrncpy(nil, &_sqlite3MutexInitØ00__func__Ø000[0], str(2151), 17)
}
+// C comment
+// /*
+// ** For debugging purposes, record when the mutex subsystem is initialized
+// ** and uninitialized so that we can assert() if there is an attempt to
+// ** allocate a mutex while the system is uninitialized.
+// */
var _mutexIsInit int32
func _sqlite3MutexAlloc(tls *crt.TLS, _id int32) (r0 *Xsqlite3_mutex) {
- if (_sqlite3Config.X1) == 0 {
+ if _sqlite3Config.XbCoreMutex == 0 {
return nil
}
func() {
if _mutexIsInit == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22844), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MutexAllocØ00__func__Ø000))), unsafe.Pointer(str(2267)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22844), unsafe.Pointer(&_sqlite3MutexAllocØ00__func__Ø000), unsafe.Pointer(str(2168)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X2)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22845), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MutexAllocØ00__func__Ø000))), unsafe.Pointer(str(2292)))
+ if (_sqlite3Config.Xmutex.XxMutexAlloc) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22845), unsafe.Pointer(&_sqlite3MutexAllocØ00__func__Ø000), unsafe.Pointer(str(2193)))
crt.X__builtin_abort(tls)
}
}()
- return (*(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X2)})))(tls, _id)
+ return func() func(*crt.TLS, int32) *Xsqlite3_mutex {
+ v := _sqlite3Config.Xmutex.XxMutexAlloc
+ return *(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&v))
+ }()(tls, _id)
}
var _sqlite3MutexAllocØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3MutexAllocØ00__func__Ø000[0], str(2330), 18)
+ crt.Xstrncpy(nil, &_sqlite3MutexAllocØ00__func__Ø000[0], str(2231), 18)
}
-// Initialize the memory allocation subsystem.
+// C comment
+// /*
+// ** Initialize the memory allocation subsystem.
+// */
func _sqlite3MallocInit(tls *crt.TLS) (r0 int32) {
var _rc, _2_i, _2_n, _2_sz int32
- var _2_pSlot *Xsqlite3_file
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X0)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{nil})) {
+ var _2_pSlot *XScratchFreeslot
+ if (_sqlite3Config.Xm.XxMalloc) == nil {
_sqlite3MemSetDefault(tls)
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_mem0), i32(0), u32(28))
- *(**Xsqlite3_mutex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_mem0.X0))))) = _sqlite3MutexAlloc(tls, i32(3))
- if (_sqlite3Config.X19) == nil || (_sqlite3Config.X20) < i32(100) || (_sqlite3Config.X21) <= i32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(&_mem0), int32(0), uint32(28))
+ *(**Xsqlite3_mutex)(unsafe.Pointer(&_mem0.Xmutex)) = _sqlite3MutexAlloc(tls, int32(3))
+ if _sqlite3Config.XpScratch == nil || _sqlite3Config.XszScratch < int32(100) || _sqlite3Config.XnScratch <= int32(0) {
goto _3
}
- _2_sz = (_sqlite3Config.X20) & i32(-8)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X20))) = _2_sz
- _2_pSlot = (*Xsqlite3_file)(_sqlite3Config.X19)
- _2_n = _sqlite3Config.X21
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_mem0.X3))))) = _2_pSlot
- *(*uint32)(unsafe.Pointer(&(_mem0.X4))) = uint32(_2_n)
- _2_i = i32(0)
+ _2_sz = _sqlite3Config.XszScratch & int32(-8)
+ _sqlite3Config.XszScratch = _2_sz
+ _2_pSlot = (*XScratchFreeslot)(_sqlite3Config.XpScratch)
+ _2_n = _sqlite3Config.XnScratch
+ *(**XScratchFreeslot)(unsafe.Pointer(&_mem0.XpScratchFree)) = _2_pSlot
+ _mem0.XnScratchFree = uint32(_2_n)
+ _2_i = int32(0)
_4:
- if _2_i >= (_2_n - i32(1)) {
+ if _2_i >= (_2_n - int32(1)) {
goto _7
}
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pSlot.X0))))) = (*Xsqlite3_file)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_2_sz))))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_2_pSlot))))))))
- _2_pSlot = (*Xsqlite3_file)(_2_pSlot.X0)
+ *(**XScratchFreeslot)(unsafe.Pointer(&_2_pSlot.XpNext)) = (*XScratchFreeslot)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_2_sz) + uintptr(unsafe.Pointer(_2_pSlot))))))
+ _2_pSlot = (*XScratchFreeslot)(_2_pSlot.XpNext)
_2_i += 1
goto _4
_7:
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pSlot.X0))))) = nil
- *(*unsafe.Pointer)(unsafe.Pointer(&(_mem0.X2))) = (unsafe.Pointer)((*Xsqlite3_file)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_pSlot)) + 4*uintptr(i32(1)))))
+ *(**XScratchFreeslot)(unsafe.Pointer(&_2_pSlot.XpNext)) = nil
+ _mem0.XpScratchEnd = unsafe.Pointer(elem9(_2_pSlot, uintptr(1)))
goto _8
_3:
- *(*unsafe.Pointer)(unsafe.Pointer(&(_mem0.X2))) = nil
- *(*unsafe.Pointer)(unsafe.Pointer(&(_sqlite3Config.X19))) = nil
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X20))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X21))) = i32(0)
+ _mem0.XpScratchEnd = nil
+ _sqlite3Config.XpScratch = nil
+ _sqlite3Config.XszScratch = int32(0)
+ _sqlite3Config.XnScratch = int32(0)
_8:
- if ((_sqlite3Config.X22 == nil) || ((_sqlite3Config.X23) < i32(512))) || ((_sqlite3Config.X24) <= i32(0)) {
- *(*unsafe.Pointer)(unsafe.Pointer(&(_sqlite3Config.X22))) = nil
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X23))) = i32(0)
+ if ((_sqlite3Config.XpPage == nil) || (_sqlite3Config.XszPage < int32(512))) || (_sqlite3Config.XnPage <= int32(0)) {
+ _sqlite3Config.XpPage = nil
+ _sqlite3Config.XszPage = int32(0)
}
- _rc = ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X5)(tls, (*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X7)
- if _rc != i32(0) {
- crt.Xmemset(tls, (unsafe.Pointer)(&_mem0), i32(0), u32(28))
+ _rc = (_sqlite3Config.Xm.XxInit)(tls, _sqlite3Config.Xm.XpAppData)
+ if _rc != int32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(&_mem0), int32(0), uint32(28))
}
return _rc
}
-// This routine is the only routine in this file with external linkage.
-//
-// Populate the low-level memory allocation function pointers in
-// sqlite3GlobalConfig.m with pointers to the routines in this file.
+// C comment
+// /*
+// ** This routine is the only routine in this file with external linkage.
+// **
+// ** Populate the low-level memory allocation function pointers in
+// ** sqlite3GlobalConfig.m with pointers to the routines in this file.
+// */
func _sqlite3MemSetDefault(tls *crt.TLS) {
- Xsqlite3_config(tls, i32(4), unsafe.Pointer(&_sqlite3MemSetDefaultØ00defaultMethodsØ001))
-}
-
-// This API allows applications to modify the global configuration of
-// the SQLite library at run-time.
-//
-// This routine should only be called when there are no outstanding
-// database connections or memory allocations. This routine is not
-// threadsafe. Failure to heed these warnings can lead to unpredictable
-// behavior.
+ Xsqlite3_config(tls, int32(4), unsafe.Pointer(&_sqlite3MemSetDefaultØ00defaultMethodsØ001))
+}
+
+// C comment
+// /*
+// ** This API allows applications to modify the global configuration of
+// ** the SQLite library at run-time.
+// **
+// ** This routine should only be called when there are no outstanding
+// ** database connections or memory allocations. This routine is not
+// ** threadsafe. Failure to heed these warnings can lead to unpredictable
+// ** behavior.
+// */
func Xsqlite3_config(tls *crt.TLS, _op int32, args ...interface{}) (r0 int32) {
var _rc int32
var _22_szMmap, _22_mxMmap int64
var _ap []interface{}
- _rc = i32(0)
- if (_sqlite3Config.X28) != 0 {
- return _sqlite3MisuseError(tls, i32(140829))
+ _rc = int32(0)
+ if _sqlite3Config.XisInit != 0 {
+ return _sqlite3MisuseError(tls, int32(140829))
}
_ap = args
switch _op {
- case i32(1):
+ case int32(1):
goto _2
- case i32(2):
+ case int32(2):
goto _3
- case i32(3):
+ case int32(3):
goto _4
- case i32(4):
+ case int32(4):
goto _7
- case i32(5):
+ case int32(5):
goto _8
- case i32(6):
+ case int32(6):
goto _10
- case i32(7):
+ case int32(7):
goto _11
- case i32(9):
+ case int32(9):
goto _9
- case i32(10):
+ case int32(10):
goto _5
- case i32(11):
+ case int32(11):
goto _6
- case i32(13):
+ case int32(13):
goto _17
- case i32(14):
+ case int32(14):
goto _13
- case i32(15):
+ case int32(15):
goto _14
- case i32(16):
+ case int32(16):
goto _18
- case i32(17):
+ case int32(17):
goto _19
- case i32(18):
+ case int32(18):
goto _15
- case i32(19):
+ case int32(19):
goto _16
- case i32(20):
+ case int32(20):
goto _20
- case i32(22):
+ case int32(22):
goto _21
- case i32(24):
+ case int32(24):
goto _12
- case i32(25):
+ case int32(25):
goto _22
- case i32(26):
+ case int32(26):
goto _23
default:
goto _24
}
_2:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X1))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X2))) = i32(0)
+ _sqlite3Config.XbCoreMutex = int32(0)
+ _sqlite3Config.XbFullMutex = int32(0)
goto _25
_3:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X1))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X2))) = i32(0)
+ _sqlite3Config.XbCoreMutex = int32(1)
+ _sqlite3Config.XbFullMutex = int32(0)
goto _25
_4:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X1))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X2))) = i32(1)
+ _sqlite3Config.XbCoreMutex = int32(1)
+ _sqlite3Config.XbFullMutex = int32(1)
goto _25
_5:
- *(*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))) = *(*Xsqlite3_mutex_methods)(crt.VAPointer(&_ap))
+ _sqlite3Config.Xmutex = *(*Xsqlite3_mutex_methods)(crt.VAPointer(&_ap))
goto _25
_6:
- *(*Xsqlite3_mutex_methods)(crt.VAPointer(&_ap)) = _sqlite3Config.X11
+ *(*Xsqlite3_mutex_methods)(crt.VAPointer(&_ap)) = _sqlite3Config.Xmutex
goto _25
_7:
- *(*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))) = *(*Xsqlite3_mem_methods)(crt.VAPointer(&_ap))
+ _sqlite3Config.Xm = *(*Xsqlite3_mem_methods)(crt.VAPointer(&_ap))
goto _25
_8:
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X0)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{nil})) {
+ if (_sqlite3Config.Xm.XxMalloc) == nil {
_sqlite3MemSetDefault(tls)
}
- *(*Xsqlite3_mem_methods)(crt.VAPointer(&_ap)) = _sqlite3Config.X10
+ *(*Xsqlite3_mem_methods)(crt.VAPointer(&_ap)) = _sqlite3Config.Xm
goto _25
_9:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X0))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XbMemstat = crt.VAInt32(&_ap)
goto _25
_10:
- *(*unsafe.Pointer)(unsafe.Pointer(&(_sqlite3Config.X19))) = crt.VAPointer(&_ap)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X20))) = crt.VAInt32(&_ap)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X21))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XpScratch = crt.VAPointer(&_ap)
+ _sqlite3Config.XszScratch = crt.VAInt32(&_ap)
+ _sqlite3Config.XnScratch = crt.VAInt32(&_ap)
goto _25
_11:
- *(*unsafe.Pointer)(unsafe.Pointer(&(_sqlite3Config.X22))) = crt.VAPointer(&_ap)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X23))) = crt.VAInt32(&_ap)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X24))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XpPage = crt.VAPointer(&_ap)
+ _sqlite3Config.XszPage = crt.VAInt32(&_ap)
+ _sqlite3Config.XnPage = crt.VAInt32(&_ap)
goto _25
_12:
*(*int32)(crt.VAPointer(&_ap)) = (_sqlite3HeaderSizeBtree(tls) + _sqlite3HeaderSizePcache(tls)) + _sqlite3HeaderSizePcache1(tls)
@@ -3588,442 +3517,459 @@ _12:
_13:
goto _25
_14:
- _rc = i32(1)
+ _rc = int32(1)
goto _25
_15:
- *(*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))) = *(*Xsqlite3_pcache_methods2)(crt.VAPointer(&_ap))
+ _sqlite3Config.Xpcache2 = *(*Xsqlite3_pcache_methods2)(crt.VAPointer(&_ap))
goto _25
_16:
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X2)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{nil})) {
+ if (_sqlite3Config.Xpcache2.XxInit) == nil {
_sqlite3PCacheSetDefault(tls)
}
- *(*Xsqlite3_pcache_methods2)(crt.VAPointer(&_ap)) = _sqlite3Config.X12
+ *(*Xsqlite3_pcache_methods2)(crt.VAPointer(&_ap)) = _sqlite3Config.Xpcache2
goto _25
_17:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X7))) = crt.VAInt32(&_ap)
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X8))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XszLookaside = crt.VAInt32(&_ap)
+ _sqlite3Config.XnLookaside = crt.VAInt32(&_ap)
goto _25
_18:
- *(*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&(_sqlite3Config.X35))) = crt.VAOther(&_ap).(func(*crt.TLS, unsafe.Pointer, int32, *int8))
- *(*unsafe.Pointer)(unsafe.Pointer(&(_sqlite3Config.X36))) = crt.VAPointer(&_ap)
+ _sqlite3Config.XxLog = crt.VAOther(&_ap).(func(*crt.TLS, unsafe.Pointer, int32, *int8))
+ _sqlite3Config.XpLogArg = crt.VAPointer(&_ap)
goto _25
_19:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X3))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XbOpenUri = crt.VAInt32(&_ap)
goto _25
_20:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X4))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XbUseCis = crt.VAInt32(&_ap)
goto _25
_21:
_22_szMmap = crt.VAInt64(&_ap)
_22_mxMmap = crt.VAInt64(&_ap)
- if (_22_mxMmap < int64(i32(0))) || (_22_mxMmap > int64(i32(2147418112))) {
- _22_mxMmap = int64(i32(2147418112))
+ if (_22_mxMmap < (0)) || (_22_mxMmap > int64(2147418112)) {
+ _22_mxMmap = int64(2147418112)
}
- if _22_szMmap < int64(i32(0)) {
- _22_szMmap = int64(i32(0))
+ if _22_szMmap < (0) {
+ _22_szMmap = 0
}
if _22_szMmap > _22_mxMmap {
_22_szMmap = _22_mxMmap
}
- *(*int64)(unsafe.Pointer(&(_sqlite3Config.X18))) = _22_mxMmap
- *(*int64)(unsafe.Pointer(&(_sqlite3Config.X17))) = _22_szMmap
+ _sqlite3Config.XmxMmap = _22_mxMmap
+ _sqlite3Config.XszMmap = _22_szMmap
goto _25
_22:
- *(*uint32)(unsafe.Pointer(&(_sqlite3Config.X27))) = crt.VAUint32(&_ap)
+ _sqlite3Config.XszPma = crt.VAUint32(&_ap)
goto _25
_23:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X9))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XnStmtSpill = crt.VAInt32(&_ap)
goto _25
_24:
- _rc = i32(1)
+ _rc = int32(1)
goto _25
_25:
_ap = nil
return _rc
}
-// Return the size of the header added to each page by this module.
+// C comment
+// /*
+// ** Return the size of the header added to each page by this module.
+// */
func _sqlite3HeaderSizeBtree(tls *crt.TLS) (r0 int32) {
- return int32(u32(88))
+ return int32(88)
}
-// Return the size of the header added by this middleware layer
-// in the page-cache hierarchy.
+// C comment
+// /*
+// ** Return the size of the header added by this middleware layer
+// ** in the page-cache hierarchy.
+// */
func _sqlite3HeaderSizePcache(tls *crt.TLS) (r0 int32) {
- return int32(u32(40))
+ return int32(40)
}
-// Return the size of the header on each page of this PCACHE implementation.
+// C comment
+// /*
+// ** Return the size of the header on each page of this PCACHE implementation.
+// */
func _sqlite3HeaderSizePcache1(tls *crt.TLS) (r0 int32) {
- return int32(u32(32))
+ return int32(32)
}
-// This function is called during initialization (sqlite3_initialize()) to
-// install the default pluggable cache module, assuming the user has not
-// already provided an alternative.
+// C comment
+// /*
+// ** This function is called during initialization (sqlite3_initialize()) to
+// ** install the default pluggable cache module, assuming the user has not
+// ** already provided an alternative.
+// */
func _sqlite3PCacheSetDefault(tls *crt.TLS) {
- Xsqlite3_config(tls, i32(18), unsafe.Pointer(&_sqlite3PCacheSetDefaultØ00defaultMethodsØ001))
+ Xsqlite3_config(tls, int32(18), unsafe.Pointer(&_sqlite3PCacheSetDefaultØ00defaultMethodsØ001))
}
var _sqlite3PCacheSetDefaultØ00defaultMethodsØ001 Xsqlite3_pcache_methods2
func init() {
- _sqlite3PCacheSetDefaultØ00defaultMethodsØ001 = Xsqlite3_pcache_methods2{X0: i32(1), X1: nil, X2: _pcache1Init, X3: _pcache1Shutdown, X4: _pcache1Create, X5: _pcache1Cachesize, X6: _pcache1Pagecount, X7: *(*func(*crt.TLS, unsafe.Pointer, uint32, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
+ _sqlite3PCacheSetDefaultØ00defaultMethodsØ001 = Xsqlite3_pcache_methods2{XiVersion: int32(1), XxInit: _pcache1Init, XxShutdown: _pcache1Shutdown, XxCreate: _pcache1Create, XxCachesize: _pcache1Cachesize, XxPagecount: _pcache1Pagecount, XxFetch: *(*func(*crt.TLS, unsafe.Pointer, uint32, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page
- }{_pcache1Fetch})), X8: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
+ }{_pcache1Fetch})), XxUnpin: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, int32)
- }{_pcache1Unpin})), X9: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint32, uint32))(unsafe.Pointer(&struct {
+ }{_pcache1Unpin})), XxRekey: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint32, uint32))(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, uint32, uint32)
- }{_pcache1Rekey})), X10: _pcache1Truncate, X11: _pcache1Destroy, X12: _pcache1Shrink}
+ }{_pcache1Rekey})), XxTruncate: _pcache1Truncate, XxDestroy: _pcache1Destroy, XxShrink: _pcache1Shrink}
}
-// Implementation of the sqlite3_pcache.xInit method.
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xInit method.
+// */
func _pcache1Init(tls *crt.TLS, _NotUsed unsafe.Pointer) (r0 int32) {
func() {
- if (_pcache1_g.X1) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45688), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1InitØ00__func__Ø000))), unsafe.Pointer(str(2348)))
+ if _pcache1_g.XisInit != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45688), unsafe.Pointer(&_pcache1InitØ00__func__Ø000), unsafe.Pointer(str(2249)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, (unsafe.Pointer)(&_pcache1_g), i32(0), u32(100))
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X2))) = bool2int((_sqlite3Config.X22 == nil) || ((_sqlite3Config.X1) > i32(0)))
- if (_sqlite3Config.X1) != 0 {
- *(**Xsqlite3_mutex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPGroup)(unsafe.Pointer(&(_pcache1_g.X0))).X0))))) = _sqlite3MutexAlloc(tls, i32(6))
- *(**Xsqlite3_mutex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pcache1_g.X9))))) = _sqlite3MutexAlloc(tls, i32(7))
+ crt.Xmemset(tls, unsafe.Pointer(&_pcache1_g), int32(0), uint32(100))
+ _pcache1_g.XseparateCache = bool2int((_sqlite3Config.XpPage == nil) || (_sqlite3Config.XbCoreMutex > int32(0)))
+ if _sqlite3Config.XbCoreMutex != 0 {
+ *(**Xsqlite3_mutex)(unsafe.Pointer(&(_pcache1_g.Xgrp.Xmutex))) = _sqlite3MutexAlloc(tls, int32(6))
+ *(**Xsqlite3_mutex)(unsafe.Pointer(&_pcache1_g.Xmutex)) = _sqlite3MutexAlloc(tls, int32(7))
}
- if ((_pcache1_g.X2) != 0 && ((_sqlite3Config.X24) != i32(0))) && (_sqlite3Config.X22 == nil) {
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X3))) = _sqlite3Config.X24
+ if (_pcache1_g.XseparateCache != 0 && (_sqlite3Config.XnPage != int32(0))) && (_sqlite3Config.XpPage == nil) {
+ _pcache1_g.XnInitPage = _sqlite3Config.XnPage
goto _7
}
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X3))) = i32(0)
+ _pcache1_g.XnInitPage = int32(0)
_7:
- *(*uint32)(unsafe.Pointer(&((*XPGroup)(unsafe.Pointer(&(_pcache1_g.X0))).X3))) = uint32(i32(10))
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X1))) = i32(1)
- return i32(0)
+ _pcache1_g.Xgrp.XmxPinned = uint32(10)
+ _pcache1_g.XisInit = int32(1)
+ return int32(0)
}
var _pcache1InitØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1InitØ00__func__Ø000[0], str(2366), 12)
+ crt.Xstrncpy(nil, &_pcache1InitØ00__func__Ø000[0], str(2267), 12)
}
-// Implementation of the sqlite3_pcache.xShutdown method.
-// Note that the static mutex allocated in xInit does
-// not need to be freed.
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xShutdown method.
+// ** Note that the static mutex allocated in xInit does
+// ** not need to be freed.
+// */
func _pcache1Shutdown(tls *crt.TLS, _NotUsed unsafe.Pointer) {
func() {
- if (_pcache1_g.X1) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45741), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1ShutdownØ00__func__Ø000))), unsafe.Pointer(str(2378)))
+ if _pcache1_g.XisInit == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45741), unsafe.Pointer(&_pcache1ShutdownØ00__func__Ø000), unsafe.Pointer(str(2279)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, (unsafe.Pointer)(&_pcache1_g), i32(0), u32(100))
+ crt.Xmemset(tls, unsafe.Pointer(&_pcache1_g), int32(0), uint32(100))
}
var _pcache1ShutdownØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1ShutdownØ00__func__Ø000[0], str(2396), 16)
+ crt.Xstrncpy(nil, &_pcache1ShutdownØ00__func__Ø000[0], str(2297), 16)
}
-// Implementation of the sqlite3_pcache.xCreate method.
-//
-// Allocate a new cache.
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xCreate method.
+// **
+// ** Allocate a new cache.
+// */
func _pcache1Create(tls *crt.TLS, _szPage int32, _szExtra int32, _bPurgeable int32) (r0 unsafe.Pointer) {
var _sz int32
var _pCache *XPCache1
var _pGroup *XPGroup
func() {
- if (_szPage&(_szPage-i32(1))) != i32(0) || _szPage < i32(512) || _szPage > i32(65536) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45758), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1CreateØ00__func__Ø000))), unsafe.Pointer(str(2412)))
+ if (_szPage&(_szPage-int32(1))) != int32(0) || _szPage < int32(512) || _szPage > int32(65536) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45758), unsafe.Pointer(&_pcache1CreateØ00__func__Ø000), unsafe.Pointer(str(2313)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _szExtra >= i32(300) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45759), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1CreateØ00__func__Ø000))), unsafe.Pointer(str(2469)))
+ if _szExtra >= int32(300) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45759), unsafe.Pointer(&_pcache1CreateØ00__func__Ø000), unsafe.Pointer(str(2370)))
crt.X__builtin_abort(tls)
}
}()
- _sz = int32(u32(60) + (u32(52) * uint32(_pcache1_g.X2)))
+ _sz = int32(uint32(60) + (uint32(52) * uint32(_pcache1_g.XseparateCache)))
_pCache = (*XPCache1)(_sqlite3MallocZero(tls, uint64(_sz)))
if _pCache == nil {
goto _6
}
- if (_pcache1_g.X2) != 0 {
- _pGroup = (*XPGroup)(unsafe.Pointer((*XPCache1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCache)) + 60*uintptr(i32(1))))))
- *(*uint32)(unsafe.Pointer(&(_pGroup.X3))) = uint32(i32(10))
+ if _pcache1_g.XseparateCache != 0 {
+ _pGroup = (*XPGroup)(unsafe.Pointer(elem12(_pCache, uintptr(1))))
+ _pGroup.XmxPinned = uint32(10)
goto _8
}
- _pGroup = (*XPGroup)(unsafe.Pointer(&(_pcache1_g.X0)))
+ _pGroup = &_pcache1_g.Xgrp
_8:
- if int32((*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5))).X4) == i32(0) {
- *(*uint8)(unsafe.Pointer(&((*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5))).X4))) = uint8(i32(1))
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5))).X8))))) = store10((**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5))).X7))))), (*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5))))
- }
- *(**XPGroup)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X0))))) = _pGroup
- *(*int32)(unsafe.Pointer(&(_pCache.X1))) = _szPage
- *(*int32)(unsafe.Pointer(&(_pCache.X2))) = _szExtra
- *(*int32)(unsafe.Pointer(&(_pCache.X3))) = int32(uint32(_szPage+_szExtra) + u32(32))
- *(*int32)(unsafe.Pointer(&(_pCache.X4))) = func() int32 {
+ if int32(_pGroup.Xlru.XisAnchor) == int32(0) {
+ _pGroup.Xlru.XisAnchor = uint8(1)
+ *(**XPgHdr1)(unsafe.Pointer(&(_pGroup.Xlru.XpLruPrev))) = store13((**XPgHdr1)(unsafe.Pointer(&(_pGroup.Xlru.XpLruNext))), &_pGroup.Xlru)
+ }
+ *(**XPGroup)(unsafe.Pointer(&_pCache.XpGroup)) = _pGroup
+ _pCache.XszPage = _szPage
+ _pCache.XszExtra = _szExtra
+ _pCache.XszAlloc = int32(uint32(_szPage+_szExtra) + uint32(32))
+ _pCache.XbPurgeable = func() int32 {
if _bPurgeable != 0 {
- return i32(1)
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}()
func() {
- if (*Xsqlite3_mutex)(_pGroup.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45779), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1CreateØ00__func__Ø000))), unsafe.Pointer(str(2483)))
+ if (*Xsqlite3_mutex)(_pGroup.Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45779), unsafe.Pointer(&_pcache1CreateØ00__func__Ø000), unsafe.Pointer(str(2384)))
crt.X__builtin_abort(tls)
}
}()
_pcache1ResizeHash(tls, _pCache)
if _bPurgeable != 0 {
- *(*uint32)(unsafe.Pointer(&(_pCache.X5))) = uint32(i32(10))
- {
- p := (*uint32)(unsafe.Pointer(&(_pGroup.X2)))
- *p = (*p) + (_pCache.X5)
- sink5(*p)
- }
- *(*uint32)(unsafe.Pointer(&(_pGroup.X3))) = ((_pGroup.X1) + uint32(i32(10))) - (_pGroup.X2)
+ _pCache.XnMin = uint32(10)
+ _pGroup.XnMinPage += _pCache.XnMin
+ _pGroup.XmxPinned = (_pGroup.XnMaxPage + uint32(10)) - _pGroup.XnMinPage
}
func() {
- if (*Xsqlite3_mutex)(_pGroup.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45786), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1CreateØ00__func__Ø000))), unsafe.Pointer(str(2483)))
+ if (*Xsqlite3_mutex)(_pGroup.Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45786), unsafe.Pointer(&_pcache1CreateØ00__func__Ø000), unsafe.Pointer(str(2384)))
crt.X__builtin_abort(tls)
}
}()
- if (_pCache.X11) == uint32(i32(0)) {
- _pcache1Destroy(tls, (unsafe.Pointer)(_pCache))
+ if _pCache.XnHash == (0) {
+ _pcache1Destroy(tls, unsafe.Pointer(_pCache))
_pCache = nil
}
_6:
- return (unsafe.Pointer)(_pCache)
+ return unsafe.Pointer(_pCache)
}
var _pcache1CreateØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1CreateØ00__func__Ø000[0], str(2502), 14)
+ crt.Xstrncpy(nil, &_pcache1CreateØ00__func__Ø000[0], str(2403), 14)
}
-// This function is used to resize the hash table used by the cache passed
-// as the first argument.
-//
-// The PCache mutex must be held when this function is called.
+// C comment
+// /*
+// ** This function is used to resize the hash table used by the cache passed
+// ** as the first argument.
+// **
+// ** The PCache mutex must be held when this function is called.
+// */
func _pcache1ResizeHash(tls *crt.TLS, _p *XPCache1) {
var _nNew, _i, _6_h uint32
var _5_pPage, _5_pNext *XPgHdr1
var _apNew **XPgHdr1
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_p.X0).X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45528), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1ResizeHashØ00__func__Ø000))), unsafe.Pointer(str(2516)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_p.XpGroup).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45528), unsafe.Pointer(&_pcache1ResizeHashØ00__func__Ø000), unsafe.Pointer(str(2417)))
crt.X__builtin_abort(tls)
}
}()
- _nNew = (_p.X11) * uint32(i32(2))
- if _nNew < uint32(i32(256)) {
- _nNew = uint32(i32(256))
+ _nNew = _p.XnHash * uint32(2)
+ if _nNew < uint32(256) {
+ _nNew = uint32(256)
}
func() {
- if (*Xsqlite3_mutex)((*XPGroup)(_p.X0).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45535), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1ResizeHashØ00__func__Ø000))), unsafe.Pointer(str(2553)))
+ if (*Xsqlite3_mutex)((*XPGroup)(_p.XpGroup).Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45535), unsafe.Pointer(&_pcache1ResizeHashØ00__func__Ø000), unsafe.Pointer(str(2454)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X11) != 0 {
+ if _p.XnHash != 0 {
_sqlite3BeginBenignMalloc(tls)
}
- _apNew = (**XPgHdr1)(_sqlite3MallocZero(tls, uint64(u32(4)*_nNew)))
- if (_p.X11) != 0 {
+ _apNew = (**XPgHdr1)(_sqlite3MallocZero(tls, uint64(uint32(4)*_nNew)))
+ if _p.XnHash != 0 {
_sqlite3EndBenignMalloc(tls)
}
func() {
- if (*Xsqlite3_mutex)((*XPGroup)(_p.X0).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45539), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1ResizeHashØ00__func__Ø000))), unsafe.Pointer(str(2553)))
+ if (*Xsqlite3_mutex)((*XPGroup)(_p.XpGroup).Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45539), unsafe.Pointer(&_pcache1ResizeHashØ00__func__Ø000), unsafe.Pointer(str(2454)))
crt.X__builtin_abort(tls)
}
}()
if _apNew == nil {
goto _9
}
- _i = uint32(i32(0))
+ _i = 0
_10:
- if _i >= (_p.X11) {
+ if _i >= _p.XnHash {
goto _13
}
- _5_pNext = *(**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X12)) + 4*uintptr(_i)))
+ _5_pNext = *elem14((**XPgHdr1)(unsafe.Pointer(_p.XapHash)), uintptr(_i))
_14:
- if store10(&_5_pPage, _5_pNext) != nil {
- _6_h = (_5_pPage.X1) % _nNew
- _5_pNext = (*XPgHdr1)(_5_pPage.X5)
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_5_pPage.X5))))) = *(**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apNew)) + 4*uintptr(_6_h)))
- *(**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apNew)) + 4*uintptr(_6_h))) = _5_pPage
+ if store13(&_5_pPage, _5_pNext) != nil {
+ _6_h = _5_pPage.XiKey % _nNew
+ _5_pNext = (*XPgHdr1)(_5_pPage.XpNext)
+ *(**XPgHdr1)(unsafe.Pointer(&_5_pPage.XpNext)) = *elem14(_apNew, uintptr(_6_h))
+ *elem14(_apNew, uintptr(_6_h)) = _5_pPage
goto _14
}
_i += 1
goto _10
_13:
- Xsqlite3_free(tls, (unsafe.Pointer)(_p.X12))
- *(***XPgHdr1)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = _apNew
- *(*uint32)(unsafe.Pointer(&(_p.X11))) = _nNew
+ Xsqlite3_free(tls, unsafe.Pointer(_p.XapHash))
+ *(***XPgHdr1)(unsafe.Pointer(&_p.XapHash)) = _apNew
+ _p.XnHash = _nNew
_9:
}
var _pcache1ResizeHashØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1ResizeHashØ00__func__Ø000[0], str(2575), 18)
+ crt.Xstrncpy(nil, &_pcache1ResizeHashØ00__func__Ø000[0], str(2476), 18)
}
-// This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that
-// subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc()
-// indicates that subsequent malloc failures are non-benign.
+// C comment
+// /*
+// ** This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that
+// ** subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc()
+// ** indicates that subsequent malloc failures are non-benign.
+// */
func _sqlite3BeginBenignMalloc(tls *crt.TLS) {
- if (_sqlite3Hooks.X0) != nil {
- (_sqlite3Hooks.X0)(tls)
+ if _sqlite3Hooks.XxBenignBegin != nil {
+ _sqlite3Hooks.XxBenignBegin(tls)
}
}
var _sqlite3Hooks TBenignMallocHooks
func _sqlite3EndBenignMalloc(tls *crt.TLS) {
- if (_sqlite3Hooks.X1) != nil {
- (_sqlite3Hooks.X1)(tls)
+ if _sqlite3Hooks.XxBenignEnd != nil {
+ _sqlite3Hooks.XxBenignEnd(tls)
}
}
-// Implementation of the sqlite3_pcache.xDestroy method.
-//
-// Destroy a cache allocated using pcache1Create().
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xDestroy method.
+// **
+// ** Destroy a cache allocated using pcache1Create().
+// */
func _pcache1Destroy(tls *crt.TLS, _p unsafe.Pointer) {
var _pCache *XPCache1
var _pGroup *XPGroup
_pCache = (*XPCache1)(_p)
- _pGroup = (*XPGroup)(_pCache.X0)
+ _pGroup = (*XPGroup)(_pCache.XpGroup)
func() {
- if (_pCache.X4) == 0 && ((_pCache.X6) != uint32(i32(0)) || (_pCache.X5) != uint32(i32(0))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46152), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000))), unsafe.Pointer(str(2593)))
+ if _pCache.XbPurgeable == 0 && (_pCache.XnMax != (0) || _pCache.XnMin != (0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46152), unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000), unsafe.Pointer(str(2494)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_mutex)(_pGroup.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46153), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000))), unsafe.Pointer(str(2483)))
+ if (*Xsqlite3_mutex)(_pGroup.Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46153), unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000), unsafe.Pointer(str(2384)))
crt.X__builtin_abort(tls)
}
}()
- if (_pCache.X10) != 0 {
- _pcache1TruncateUnsafe(tls, _pCache, uint32(i32(0)))
+ if _pCache.XnPage != 0 {
+ _pcache1TruncateUnsafe(tls, _pCache, 0)
}
func() {
- if (_pGroup.X1) < (_pCache.X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46155), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000))), unsafe.Pointer(str(2652)))
+ if _pGroup.XnMaxPage < _pCache.XnMax {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46155), unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000), unsafe.Pointer(str(2553)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_pGroup.X1)))
- *p = (*p) - (_pCache.X6)
- sink5(*p)
- }
+ _pGroup.XnMaxPage -= _pCache.XnMax
func() {
- if (_pGroup.X2) < (_pCache.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46157), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000))), unsafe.Pointer(str(2685)))
+ if _pGroup.XnMinPage < _pCache.XnMin {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46157), unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000), unsafe.Pointer(str(2586)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_pGroup.X2)))
- *p = (*p) - (_pCache.X5)
- sink5(*p)
- }
- *(*uint32)(unsafe.Pointer(&(_pGroup.X3))) = ((_pGroup.X1) + uint32(i32(10))) - (_pGroup.X2)
+ _pGroup.XnMinPage -= _pCache.XnMin
+ _pGroup.XmxPinned = (_pGroup.XnMaxPage + uint32(10)) - _pGroup.XnMinPage
_pcache1EnforceMaxPage(tls, _pCache)
func() {
- if (*Xsqlite3_mutex)(_pGroup.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46161), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000))), unsafe.Pointer(str(2483)))
+ if (*Xsqlite3_mutex)(_pGroup.Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46161), unsafe.Pointer(&_pcache1DestroyØ00__func__Ø000), unsafe.Pointer(str(2384)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_free(tls, _pCache.X14)
- Xsqlite3_free(tls, (unsafe.Pointer)(_pCache.X12))
- Xsqlite3_free(tls, (unsafe.Pointer)(_pCache))
+ Xsqlite3_free(tls, _pCache.XpBulk)
+ Xsqlite3_free(tls, unsafe.Pointer(_pCache.XapHash))
+ Xsqlite3_free(tls, unsafe.Pointer(_pCache))
}
var _pcache1DestroyØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1DestroyØ00__func__Ø000[0], str(2718), 15)
+ crt.Xstrncpy(nil, &_pcache1DestroyØ00__func__Ø000[0], str(2619), 15)
}
-// Discard all pages from cache pCache with a page number (key value)
-// greater than or equal to iLimit. Any pinned pages that meet this
-// criteria are unpinned before they are discarded.
-//
-// The PCache mutex must be held when this function is called.
+// C comment
+// /*
+// ** Discard all pages from cache pCache with a page number (key value)
+// ** greater than or equal to iLimit. Any pinned pages that meet this
+// ** criteria are unpinned before they are discarded.
+// **
+// ** The PCache mutex must be held when this function is called.
+// */
func _pcache1TruncateUnsafe(tls *crt.TLS, _pCache *XPCache1, _iLimit uint32) {
var _nPage int32
var _h, _iStop uint32
var _3_pPage *XPgHdr1
var _3_pp **XPgHdr1
- _nPage = i32(0)
+ _nPage = int32(0)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45641), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000))), unsafe.Pointer(str(2733)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45641), unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000), unsafe.Pointer(str(2634)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCache.X8) < _iLimit {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45642), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000))), unsafe.Pointer(str(2775)))
+ if _pCache.XiMaxKey < _iLimit {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45642), unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000), unsafe.Pointer(str(2676)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCache.X11) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45643), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000))), unsafe.Pointer(str(2801)))
+ if _pCache.XnHash <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45643), unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000), unsafe.Pointer(str(2702)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pCache.X8) - _iLimit) < (_pCache.X11) {
- _h = _iLimit % (_pCache.X11)
- _iStop = (_pCache.X8) % (_pCache.X11)
- _nPage = i32(-10)
+ if (_pCache.XiMaxKey - _iLimit) < _pCache.XnHash {
+ _h = _iLimit % _pCache.XnHash
+ _iStop = _pCache.XiMaxKey % _pCache.XnHash
+ _nPage = int32(-10)
goto _7
}
- _h = (_pCache.X11) / uint32(i32(2))
- _iStop = _h - uint32(i32(1))
+ _h = _pCache.XnHash / uint32(2)
+ _iStop = _h - uint32(1)
_7:
func() {
- if _h >= (_pCache.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45661), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000))), unsafe.Pointer(str(2819)))
+ if _h >= _pCache.XnHash {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45661), unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000), unsafe.Pointer(str(2720)))
crt.X__builtin_abort(tls)
}
}()
- _3_pp = (**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCache.X12)) + 4*uintptr(_h)))
+ _3_pp = elem14((**XPgHdr1)(unsafe.Pointer(_pCache.XapHash)), uintptr(_h))
_13:
- if store10(&_3_pPage, *_3_pp) == nil {
+ if store13(&_3_pPage, *_3_pp) == nil {
goto _14
}
- if (_3_pPage.X1) < _iLimit {
+ if _3_pPage.XiKey < _iLimit {
goto _15
}
- *(*uint32)(unsafe.Pointer(&(_pCache.X10))) -= 1
- *_3_pp = (*XPgHdr1)(_3_pPage.X5)
- if (_3_pPage.X2) == 0 {
+ _pCache.XnPage -= 1
+ *_3_pp = (*XPgHdr1)(_3_pPage.XpNext)
+ if _3_pPage.XisPinned == 0 {
_pcache1PinPage(tls, _3_pPage)
}
_pcache1FreePage(tls, _3_pPage)
goto _17
_15:
- _3_pp = (**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_pPage.X5)))))
- if _nPage >= i32(0) {
+ _3_pp = (**XPgHdr1)(unsafe.Pointer(&_3_pPage.XpNext))
+ if _nPage >= int32(0) {
_nPage += 1
}
_17:
@@ -4032,12 +3978,12 @@ _14:
if _h == _iStop {
goto _10
}
- _h = (_h + uint32(i32(1))) % (_pCache.X11)
+ _h = (_h + uint32(1)) % _pCache.XnHash
goto _7
_10:
func() {
- if _nPage >= i32(0) && (_pCache.X10) != uint32(_nPage) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45677), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000))), unsafe.Pointer(str(2835)))
+ if _nPage >= int32(0) && _pCache.XnPage != uint32(_nPage) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45677), unsafe.Pointer(&_pcache1TruncateUnsafeØ00__func__Ø000), unsafe.Pointer(str(2736)))
crt.X__builtin_abort(tls)
}
}()
@@ -4046,138 +3992,147 @@ _10:
var _pcache1TruncateUnsafeØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1TruncateUnsafeØ00__func__Ø000[0], str(2877), 22)
+ crt.Xstrncpy(nil, &_pcache1TruncateUnsafeØ00__func__Ø000[0], str(2778), 22)
}
-// This function is used internally to remove the page pPage from the
-// PGroup LRU list, if is part of it. If pPage is not part of the PGroup
-// LRU list, then this function is a no-op.
-//
-// The PGroup mutex must be held when this function is called.
+// C comment
+// /*
+// ** This function is used internally to remove the page pPage from the
+// ** PGroup LRU list, if is part of it. If pPage is not part of the PGroup
+// ** LRU list, then this function is a no-op.
+// **
+// ** The PGroup mutex must be held when this function is called.
+// */
func _pcache1PinPage(tls *crt.TLS, _pPage *XPgHdr1) (r0 *XPgHdr1) {
var _pCache *XPCache1
func() {
if _pPage == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45567), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000))), unsafe.Pointer(str(2899)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45567), unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000), unsafe.Pointer(str(2800)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45568), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000))), unsafe.Pointer(str(2908)))
+ if int32(_pPage.XisPinned) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45568), unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000), unsafe.Pointer(str(2809)))
crt.X__builtin_abort(tls)
}
}()
- _pCache = (*XPCache1)(_pPage.X6)
+ _pCache = (*XPCache1)(_pPage.XpCache)
func() {
- if (*XPgHdr1)(_pPage.X7) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45570), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000))), unsafe.Pointer(str(2927)))
+ if _pPage.XpLruNext == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45570), unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000), unsafe.Pointer(str(2828)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPgHdr1)(_pPage.X8) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45571), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000))), unsafe.Pointer(str(2943)))
+ if _pPage.XpLruPrev == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45571), unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000), unsafe.Pointer(str(2844)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45572), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000))), unsafe.Pointer(str(2733)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45572), unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000), unsafe.Pointer(str(2634)))
crt.X__builtin_abort(tls)
}
}()
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPgHdr1)(_pPage.X8).X7))))) = (*XPgHdr1)(_pPage.X7)
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPgHdr1)(_pPage.X7).X8))))) = (*XPgHdr1)(_pPage.X8)
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X7))))) = nil
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X8))))) = nil
- *(*uint8)(unsafe.Pointer(&(_pPage.X2))) = uint8(i32(1))
+ *(**XPgHdr1)(unsafe.Pointer(&((*XPgHdr1)(_pPage.XpLruPrev).XpLruNext))) = (*XPgHdr1)(_pPage.XpLruNext)
+ *(**XPgHdr1)(unsafe.Pointer(&((*XPgHdr1)(_pPage.XpLruNext).XpLruPrev))) = (*XPgHdr1)(_pPage.XpLruPrev)
+ *(**XPgHdr1)(unsafe.Pointer(&_pPage.XpLruNext)) = nil
+ *(**XPgHdr1)(unsafe.Pointer(&_pPage.XpLruPrev)) = nil
+ _pPage.XisPinned = uint8(1)
func() {
- if int32(_pPage.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45578), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000))), unsafe.Pointer(str(2959)))
+ if int32(_pPage.XisAnchor) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45578), unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000), unsafe.Pointer(str(2860)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XPgHdr1)(unsafe.Pointer(&((*XPGroup)(_pCache.X0).X5))).X4) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45579), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000))), unsafe.Pointer(str(2978)))
+ if int32(((*XPGroup)(_pCache.XpGroup).Xlru).XisAnchor) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45579), unsafe.Pointer(&_pcache1PinPageØ00__func__Ø000), unsafe.Pointer(str(2879)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_pCache.X9))) -= 1
+ _pCache.XnRecyclable -= 1
return _pPage
}
var _pcache1PinPageØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1PinPageØ00__func__Ø000[0], str(3010), 15)
+ crt.Xstrncpy(nil, &_pcache1PinPageØ00__func__Ø000[0], str(2911), 15)
}
-// Free a page object allocated by pcache1AllocPage().
+// C comment
+// /*
+// ** Free a page object allocated by pcache1AllocPage().
+// */
func _pcache1FreePage(tls *crt.TLS, _p *XPgHdr1) {
var _pCache *XPCache1
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45456), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FreePageØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45456), unsafe.Pointer(&_pcache1FreePageØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
- _pCache = (*XPCache1)(_p.X6)
+ _pCache = (*XPCache1)(_p.XpCache)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)((*XPCache1)(_p.X6).X0).X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45458), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FreePageØ00__func__Ø000))), unsafe.Pointer(str(3025)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)((*XPCache1)(_p.XpCache).XpGroup).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45458), unsafe.Pointer(&_pcache1FreePageØ00__func__Ø000), unsafe.Pointer(str(2926)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X3) != 0 {
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X5))))) = (*XPgHdr1)(_pCache.X13)
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X13))))) = _p
+ if _p.XisBulkLocal != 0 {
+ *(**XPgHdr1)(unsafe.Pointer(&_p.XpNext)) = (*XPgHdr1)(_pCache.XpFree)
+ *(**XPgHdr1)(unsafe.Pointer(&_pCache.XpFree)) = _p
goto _5
}
- _pcache1Free(tls, (*Xsqlite3_pcache_page)(unsafe.Pointer(&(_p.X0))).X0)
+ _pcache1Free(tls, _p.Xpage.XpBuf)
_5:
- if (_pCache.X4) != 0 {
- *(*uint32)(unsafe.Pointer(&((*XPGroup)(_pCache.X0).X4))) -= 1
+ if _pCache.XbPurgeable != 0 {
+ (*XPGroup)(_pCache.XpGroup).XnCurrentPage -= 1
}
}
var _pcache1FreePageØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1FreePageØ00__func__Ø000[0], str(3070), 16)
+ crt.Xstrncpy(nil, &_pcache1FreePageØ00__func__Ø000[0], str(2971), 16)
}
-// Free an allocated buffer obtained from pcache1Alloc().
+// C comment
+// /*
+// ** Free an allocated buffer obtained from pcache1Alloc().
+// */
func _pcache1Free(tls *crt.TLS, _p unsafe.Pointer) {
var _3_nFreed int32
- var _1_pSlot *Xsqlite3_file
+ var _1_pSlot *XScratchFreeslot
if _p == nil {
return
}
- if (uint32(uintptr(_p)) >= uint32(uintptr(_pcache1_g.X7))) && (uint32(uintptr(_p)) < uint32(uintptr(_pcache1_g.X8))) {
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pcache1_g.X9))
- _sqlite3StatusDown(tls, i32(1), i32(1))
- _1_pSlot = (*Xsqlite3_file)(_p)
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pSlot.X0))))) = (*Xsqlite3_file)(_pcache1_g.X10)
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pcache1_g.X10))))) = _1_pSlot
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X11))) += 1
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X12))) = bool2int((_pcache1_g.X11) < (_pcache1_g.X6))
+ if (uint32(crt.P2U(_p)) >= uint32(crt.P2U(_pcache1_g.XpStart))) && (uint32(crt.P2U(_p)) < uint32(crt.P2U(_pcache1_g.XpEnd))) {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pcache1_g.Xmutex))
+ _sqlite3StatusDown(tls, int32(1), int32(1))
+ _1_pSlot = (*XScratchFreeslot)(_p)
+ *(**XScratchFreeslot)(unsafe.Pointer(&_1_pSlot.XpNext)) = (*XScratchFreeslot)(_pcache1_g.XpFree)
+ *(**XScratchFreeslot)(unsafe.Pointer(&_pcache1_g.XpFree)) = _1_pSlot
+ _pcache1_g.XnFreeSlot += 1
+ _pcache1_g.XbUnderPressure = bool2int(_pcache1_g.XnFreeSlot < _pcache1_g.XnReserve)
func() {
- if (_pcache1_g.X11) > (_pcache1_g.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45365), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FreeØ00__func__Ø000))), unsafe.Pointer(str(3086)))
+ if _pcache1_g.XnFreeSlot > _pcache1_g.XnSlot {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45365), unsafe.Pointer(&_pcache1FreeØ00__func__Ø000), unsafe.Pointer(str(2987)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pcache1_g.X9))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pcache1_g.Xmutex))
goto _5
}
- i32(0)
- _3_nFreed = i32(0)
+
+ _3_nFreed = int32(0)
_3_nFreed = _sqlite3MallocSize(tls, _p)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pcache1_g.X9))
- _sqlite3StatusDown(tls, i32(2), _3_nFreed)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pcache1_g.X9))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pcache1_g.Xmutex))
+ _sqlite3StatusDown(tls, int32(2), _3_nFreed)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pcache1_g.Xmutex))
Xsqlite3_free(tls, _p)
_5:
}
@@ -4185,78 +4140,84 @@ _5:
var _pcache1FreeØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1FreeØ00__func__Ø000[0], str(3119), 12)
+ crt.Xstrncpy(nil, &_pcache1FreeØ00__func__Ø000[0], str(3020), 12)
}
-// If there are currently more than nMaxPage pages allocated, try
-// to recycle pages to reduce the number allocated to nMaxPage.
+// C comment
+// /*
+// ** If there are currently more than nMaxPage pages allocated, try
+// ** to recycle pages to reduce the number allocated to nMaxPage.
+// */
func _pcache1EnforceMaxPage(tls *crt.TLS, _pCache *XPCache1) {
var _p *XPgHdr1
var _pGroup *XPGroup
- _pGroup = (*XPGroup)(_pCache.X0)
+ _pGroup = (*XPGroup)(_pCache.XpGroup)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pGroup.X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45613), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1EnforceMaxPageØ00__func__Ø000))), unsafe.Pointer(str(3131)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pGroup.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45613), unsafe.Pointer(&_pcache1EnforceMaxPageØ00__func__Ø000), unsafe.Pointer(str(3032)))
crt.X__builtin_abort(tls)
}
}()
_2:
- if ((_pGroup.X4) > (_pGroup.X1)) && (int32(store10(&_p, (*XPgHdr1)((*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5))).X8)).X4) == i32(0)) {
+ if (_pGroup.XnCurrentPage > _pGroup.XnMaxPage) && (int32(store13(&_p, (*XPgHdr1)(_pGroup.Xlru.XpLruPrev)).XisAnchor) == int32(0)) {
func() {
- if (*XPGroup)((*XPCache1)(_p.X6).X0) != _pGroup {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45617), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1EnforceMaxPageØ00__func__Ø000))), unsafe.Pointer(str(3165)))
+ if (*XPGroup)((*XPCache1)(_p.XpCache).XpGroup) != _pGroup {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45617), unsafe.Pointer(&_pcache1EnforceMaxPageØ00__func__Ø000), unsafe.Pointer(str(3066)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45618), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1EnforceMaxPageØ00__func__Ø000))), unsafe.Pointer(str(3191)))
+ if int32(_p.XisPinned) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45618), unsafe.Pointer(&_pcache1EnforceMaxPageØ00__func__Ø000), unsafe.Pointer(str(3092)))
crt.X__builtin_abort(tls)
}
}()
_pcache1PinPage(tls, _p)
- _pcache1RemoveFromHash(tls, _p, i32(1))
+ _pcache1RemoveFromHash(tls, _p, int32(1))
goto _2
}
- if ((_pCache.X10) == uint32(i32(0))) && ((_pCache.X14) != nil) {
- Xsqlite3_free(tls, _pCache.X14)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X14))) = (unsafe.Pointer)(store10((**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X13))))), nil))
+ if (_pCache.XnPage == (0)) && (_pCache.XpBulk != nil) {
+ Xsqlite3_free(tls, _pCache.XpBulk)
+ _pCache.XpBulk = unsafe.Pointer(store13((**XPgHdr1)(unsafe.Pointer(&_pCache.XpFree)), nil))
}
}
var _pcache1EnforceMaxPageØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1EnforceMaxPageØ00__func__Ø000[0], str(3206), 22)
+ crt.Xstrncpy(nil, &_pcache1EnforceMaxPageØ00__func__Ø000[0], str(3107), 22)
}
-// Remove the page supplied as an argument from the hash table
-// (PCache1.apHash structure) that it is currently stored in.
-// Also free the page if freePage is true.
-//
-// The PGroup mutex must be held when this function is called.
+// C comment
+// /*
+// ** Remove the page supplied as an argument from the hash table
+// ** (PCache1.apHash structure) that it is currently stored in.
+// ** Also free the page if freePage is true.
+// **
+// ** The PGroup mutex must be held when this function is called.
+// */
func _pcache1RemoveFromHash(tls *crt.TLS, _pPage *XPgHdr1, _freeFlag int32) {
var _h uint32
var _pCache *XPCache1
var _pp **XPgHdr1
- _pCache = (*XPCache1)(_pPage.X6)
+ _pCache = (*XPCache1)(_pPage.XpCache)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45597), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1RemoveFromHashØ00__func__Ø000))), unsafe.Pointer(str(2733)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45597), unsafe.Pointer(&_pcache1RemoveFromHashØ00__func__Ø000), unsafe.Pointer(str(2634)))
crt.X__builtin_abort(tls)
}
}()
- _h = (_pPage.X1) % (_pCache.X11)
- _pp = (**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCache.X12)) + 4*uintptr(_h)))
+ _h = _pPage.XiKey % _pCache.XnHash
+ _pp = elem14((**XPgHdr1)(unsafe.Pointer(_pCache.XapHash)), uintptr(_h))
_2:
if (*_pp) == _pPage {
goto _5
}
- _pp = (**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*_pp).X5)))))
+ _pp = (**XPgHdr1)(unsafe.Pointer(&((*_pp).XpNext)))
goto _2
_5:
- *_pp = (*XPgHdr1)((*_pp).X5)
- *(*uint32)(unsafe.Pointer(&(_pCache.X10))) -= 1
+ *_pp = (*XPgHdr1)((*_pp).XpNext)
+ _pCache.XnPage -= 1
if _freeFlag != 0 {
_pcache1FreePage(tls, _pPage)
}
@@ -4265,36 +4226,35 @@ _5:
var _pcache1RemoveFromHashØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1RemoveFromHashØ00__func__Ø000[0], str(3228), 22)
+ crt.Xstrncpy(nil, &_pcache1RemoveFromHashØ00__func__Ø000[0], str(3129), 22)
}
-// Implementation of the sqlite3_pcache.xCachesize method.
-//
-// Configure the cache_size limit for a cache.
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xCachesize method.
+// **
+// ** Configure the cache_size limit for a cache.
+// */
func _pcache1Cachesize(tls *crt.TLS, _p unsafe.Pointer, _nMax int32) {
var _pCache *XPCache1
var _1_pGroup *XPGroup
_pCache = (*XPCache1)(_p)
- if (_pCache.X4) != 0 {
- _1_pGroup = (*XPGroup)(_pCache.X0)
+ if _pCache.XbPurgeable != 0 {
+ _1_pGroup = (*XPGroup)(_pCache.XpGroup)
func() {
- if (*Xsqlite3_mutex)(_1_pGroup.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45804), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1CachesizeØ00__func__Ø000))), unsafe.Pointer(str(2483)))
+ if (*Xsqlite3_mutex)(_1_pGroup.Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45804), unsafe.Pointer(&_pcache1CachesizeØ00__func__Ø000), unsafe.Pointer(str(2384)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_1_pGroup.X1)))
- *p = (*p) + (uint32(_nMax) - (_pCache.X6))
- sink5(*p)
- }
- *(*uint32)(unsafe.Pointer(&(_1_pGroup.X3))) = ((_1_pGroup.X1) + uint32(i32(10))) - (_1_pGroup.X2)
- *(*uint32)(unsafe.Pointer(&(_pCache.X6))) = uint32(_nMax)
- *(*uint32)(unsafe.Pointer(&(_pCache.X7))) = ((_pCache.X6) * uint32(i32(9))) / uint32(i32(10))
+ _1_pGroup.XnMaxPage += uint32(_nMax) - _pCache.XnMax
+ _1_pGroup.XmxPinned = (_1_pGroup.XnMaxPage + uint32(10)) - _1_pGroup.XnMinPage
+ _pCache.XnMax = uint32(_nMax)
+ _pCache.Xn90pct = (_pCache.XnMax * uint32(9)) / uint32(10)
_pcache1EnforceMaxPage(tls, _pCache)
func() {
- if (*Xsqlite3_mutex)(_1_pGroup.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45810), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1CachesizeØ00__func__Ø000))), unsafe.Pointer(str(2483)))
+ if (*Xsqlite3_mutex)(_1_pGroup.Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45810), unsafe.Pointer(&_pcache1CachesizeØ00__func__Ø000), unsafe.Pointer(str(2384)))
crt.X__builtin_abort(tls)
}
}()
@@ -4304,24 +4264,27 @@ func _pcache1Cachesize(tls *crt.TLS, _p unsafe.Pointer, _nMax int32) {
var _pcache1CachesizeØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1CachesizeØ00__func__Ø000[0], str(3250), 17)
+ crt.Xstrncpy(nil, &_pcache1CachesizeØ00__func__Ø000[0], str(3151), 17)
}
-// Implementation of the sqlite3_pcache.xPagecount method.
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xPagecount method.
+// */
func _pcache1Pagecount(tls *crt.TLS, _p unsafe.Pointer) (r0 int32) {
var _n int32
var _pCache *XPCache1
_pCache = (*XPCache1)(_p)
func() {
- if (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45839), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1PagecountØ00__func__Ø000))), unsafe.Pointer(str(3267)))
+ if (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45839), unsafe.Pointer(&_pcache1PagecountØ00__func__Ø000), unsafe.Pointer(str(3168)))
crt.X__builtin_abort(tls)
}
}()
- _n = int32(_pCache.X10)
+ _n = int32(_pCache.XnPage)
func() {
- if (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45841), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1PagecountØ00__func__Ø000))), unsafe.Pointer(str(3267)))
+ if (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45841), unsafe.Pointer(&_pcache1PagecountØ00__func__Ø000), unsafe.Pointer(str(3168)))
crt.X__builtin_abort(tls)
}
}()
@@ -4331,40 +4294,40 @@ func _pcache1Pagecount(tls *crt.TLS, _p unsafe.Pointer) (r0 int32) {
var _pcache1PagecountØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1PagecountØ00__func__Ø000[0], str(3294), 17)
+ crt.Xstrncpy(nil, &_pcache1PagecountØ00__func__Ø000[0], str(3195), 17)
}
func _pcache1Fetch(tls *crt.TLS, _p unsafe.Pointer, _iKey uint32, _createFlag int32) (r0 *Xsqlite3_pcache_page) {
var _pCache *XPCache1
_pCache = (*XPCache1)(_p)
- i32(0)
+
func() {
- if (_pCache.X4) == 0 && _createFlag == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46037), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchØ00__func__Ø000))), unsafe.Pointer(str(3311)))
+ if _pCache.XbPurgeable == 0 && _createFlag == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46037), unsafe.Pointer(&_pcache1FetchØ00__func__Ø000), unsafe.Pointer(str(3212)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCache.X4) == 0 && (_pCache.X5) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46038), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchØ00__func__Ø000))), unsafe.Pointer(str(3347)))
+ if _pCache.XbPurgeable == 0 && _pCache.XnMin != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46038), unsafe.Pointer(&_pcache1FetchØ00__func__Ø000), unsafe.Pointer(str(3248)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCache.X4) != i32(0) && (_pCache.X5) != uint32(i32(10)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46039), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchØ00__func__Ø000))), unsafe.Pointer(str(3385)))
+ if _pCache.XbPurgeable != int32(0) && _pCache.XnMin != uint32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46039), unsafe.Pointer(&_pcache1FetchØ00__func__Ø000), unsafe.Pointer(str(3286)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCache.X5) != uint32(i32(0)) && (_pCache.X4) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46040), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchØ00__func__Ø000))), unsafe.Pointer(str(3427)))
+ if _pCache.XnMin != (0) && _pCache.XbPurgeable == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46040), unsafe.Pointer(&_pcache1FetchØ00__func__Ø000), unsafe.Pointer(str(3328)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCache.X11) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46041), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchØ00__func__Ø000))), unsafe.Pointer(str(3465)))
+ if _pCache.XnHash <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46041), unsafe.Pointer(&_pcache1FetchØ00__func__Ø000), unsafe.Pointer(str(3366)))
crt.X__builtin_abort(tls)
}
}()
@@ -4374,81 +4337,84 @@ func _pcache1Fetch(tls *crt.TLS, _p unsafe.Pointer, _iKey uint32, _createFlag in
var _pcache1FetchØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1FetchØ00__func__Ø000[0], str(3481), 13)
-}
-
-// Implementation of the sqlite3_pcache.xFetch method.
-//
-// Fetch a page by key value.
-//
-// Whether or not a new page may be allocated by this function depends on
-// the value of the createFlag argument. 0 means do not allocate a new
-// page. 1 means allocate a new page if space is easily available. 2
-// means to try really hard to allocate a new page.
-//
-// For a non-purgeable cache (a cache used as the storage for an in-memory
-// database) there is really no difference between createFlag 1 and 2. So
-// the calling function (pcache.c) will never have a createFlag of 1 on
-// a non-purgeable cache.
-//
-// There are three different approaches to obtaining space for a page,
-// depending on the value of parameter createFlag (which may be 0, 1 or 2).
-//
-// 1. Regardless of the value of createFlag, the cache is searched for a
-// copy of the requested page. If one is found, it is returned.
-//
-// 2. If createFlag==0 and the page is not already in the cache, NULL is
-// returned.
-//
-// 3. If createFlag is 1, and the page is not already in the cache, then
-// return NULL (do not allocate a new page) if any of the following
-// conditions are true:
-//
-// (a) the number of pages pinned by the cache is greater than
-// PCache1.nMax, or
-//
-// (b) the number of pages pinned by the cache is greater than
-// the sum of nMax for all purgeable caches, less the sum of
-// nMin for all other purgeable caches, or
-//
-// 4. If none of the first three conditions apply and the cache is marked
-// as purgeable, and if one of the following is true:
-//
-// (a) The number of pages allocated for the cache is already
-// PCache1.nMax, or
-//
-// (b) The number of pages allocated for all purgeable caches is
-// already equal to or greater than the sum of nMax for all
-// purgeable caches,
-//
-// (c) The system is under memory pressure and wants to avoid
-// unnecessary pages cache entry allocations
-//
-// then attempt to recycle a page from the LRU list. If it is the right
-// size, return the recycled buffer. Otherwise, free the buffer and
-// proceed to step 5.
-//
-// 5. Otherwise, allocate and return a new page buffer.
-//
-// There are two versions of this routine. pcache1FetchWithMutex() is
-// the general case. pcache1FetchNoMutex() is a faster implementation for
-// the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper
-// invokes the appropriate routine.
+ crt.Xstrncpy(nil, &_pcache1FetchØ00__func__Ø000[0], str(3382), 13)
+}
+
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xFetch method.
+// **
+// ** Fetch a page by key value.
+// **
+// ** Whether or not a new page may be allocated by this function depends on
+// ** the value of the createFlag argument. 0 means do not allocate a new
+// ** page. 1 means allocate a new page if space is easily available. 2
+// ** means to try really hard to allocate a new page.
+// **
+// ** For a non-purgeable cache (a cache used as the storage for an in-memory
+// ** database) there is really no difference between createFlag 1 and 2. So
+// ** the calling function (pcache.c) will never have a createFlag of 1 on
+// ** a non-purgeable cache.
+// **
+// ** There are three different approaches to obtaining space for a page,
+// ** depending on the value of parameter createFlag (which may be 0, 1 or 2).
+// **
+// ** 1. Regardless of the value of createFlag, the cache is searched for a
+// ** copy of the requested page. If one is found, it is returned.
+// **
+// ** 2. If createFlag==0 and the page is not already in the cache, NULL is
+// ** returned.
+// **
+// ** 3. If createFlag is 1, and the page is not already in the cache, then
+// ** return NULL (do not allocate a new page) if any of the following
+// ** conditions are true:
+// **
+// ** (a) the number of pages pinned by the cache is greater than
+// ** PCache1.nMax, or
+// **
+// ** (b) the number of pages pinned by the cache is greater than
+// ** the sum of nMax for all purgeable caches, less the sum of
+// ** nMin for all other purgeable caches, or
+// **
+// ** 4. If none of the first three conditions apply and the cache is marked
+// ** as purgeable, and if one of the following is true:
+// **
+// ** (a) The number of pages allocated for the cache is already
+// ** PCache1.nMax, or
+// **
+// ** (b) The number of pages allocated for all purgeable caches is
+// ** already equal to or greater than the sum of nMax for all
+// ** purgeable caches,
+// **
+// ** (c) The system is under memory pressure and wants to avoid
+// ** unnecessary pages cache entry allocations
+// **
+// ** then attempt to recycle a page from the LRU list. If it is the right
+// ** size, return the recycled buffer. Otherwise, free the buffer and
+// ** proceed to step 5.
+// **
+// ** 5. Otherwise, allocate and return a new page buffer.
+// **
+// ** There are two versions of this routine. pcache1FetchWithMutex() is
+// ** the general case. pcache1FetchNoMutex() is a faster implementation for
+// ** the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper
+// ** invokes the appropriate routine.
+// */
func _pcache1FetchNoMutex(tls *crt.TLS, _p unsafe.Pointer, _iKey uint32, _createFlag int32) (r0 *XPgHdr1) {
var _pCache *XPCache1
var _pPage *XPgHdr1
_pCache = (*XPCache1)(_p)
_pPage = nil
- _pPage = *(**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCache.X12)) + 4*uintptr(_iKey%(_pCache.X11))))
+ _pPage = *elem14((**XPgHdr1)(unsafe.Pointer(_pCache.XapHash)), uintptr(_iKey%_pCache.XnHash))
_0:
- if (_pPage != nil) && ((_pPage.X1) != _iKey) {
- _pPage = (*XPgHdr1)(_pPage.X5)
+ if (_pPage != nil) && (_pPage.XiKey != _iKey) {
+ _pPage = (*XPgHdr1)(_pPage.XpNext)
goto _0
}
if _pPage == nil {
goto _3
}
- if (_pPage.X2) == 0 {
+ if _pPage.XisPinned == 0 {
return _pcache1PinPage(tls, _pPage)
}
return _pPage
@@ -4460,93 +4426,92 @@ _3:
return nil
}
-// Implement steps 3, 4, and 5 of the pcache1Fetch() algorithm described
-// in the header of the pcache1Fetch() procedure.
-//
-// This steps are broken out into a separate procedure because they are
-// usually not needed, and by avoiding the stack initialization required
-// for these steps, the main pcache1Fetch() procedure can run faster.
+// C comment
+// /*
+// ** Implement steps 3, 4, and 5 of the pcache1Fetch() algorithm described
+// ** in the header of the pcache1Fetch() procedure.
+// **
+// ** This steps are broken out into a separate procedure because they are
+// ** usually not needed, and by avoiding the stack initialization required
+// ** for these steps, the main pcache1Fetch() procedure can run faster.
+// */
func _pcache1FetchStage2(tls *crt.TLS, _pCache *XPCache1, _iKey uint32, _createFlag int32) (r0 *XPgHdr1) {
var _nPinned, _6_h uint32
var _2_pOther *XPCache1
var _pPage *XPgHdr1
var _pGroup *XPGroup
- _pGroup = (*XPGroup)(_pCache.X0)
+ _pGroup = (*XPGroup)(_pCache.XpGroup)
_pPage = nil
func() {
- if (_pCache.X10) < (_pCache.X9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45864), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000))), unsafe.Pointer(str(3494)))
+ if _pCache.XnPage < _pCache.XnRecyclable {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45864), unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000), unsafe.Pointer(str(3395)))
crt.X__builtin_abort(tls)
}
}()
- _nPinned = (_pCache.X10) - (_pCache.X9)
+ _nPinned = _pCache.XnPage - _pCache.XnRecyclable
func() {
- if (_pGroup.X3) != (((_pGroup.X1) + uint32(i32(10))) - (_pGroup.X2)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45866), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000))), unsafe.Pointer(str(3531)))
+ if _pGroup.XmxPinned != ((_pGroup.XnMaxPage + uint32(10)) - _pGroup.XnMinPage) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45866), unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000), unsafe.Pointer(str(3432)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCache.X7) != (((_pCache.X6) * uint32(i32(9))) / uint32(i32(10))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45867), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000))), unsafe.Pointer(str(3592)))
+ if _pCache.Xn90pct != ((_pCache.XnMax * uint32(9)) / uint32(10)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45867), unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000), unsafe.Pointer(str(3493)))
crt.X__builtin_abort(tls)
}
}()
- if (_createFlag == i32(1)) && (((_nPinned >= (_pGroup.X3)) || (_nPinned >= (_pCache.X7))) || (_pcache1UnderMemoryPressure(tls, _pCache) != 0 && ((_pCache.X9) < _nPinned))) {
+ if (_createFlag == int32(1)) && (((_nPinned >= _pGroup.XmxPinned) || (_nPinned >= _pCache.Xn90pct)) || (_pcache1UnderMemoryPressure(tls, _pCache) != 0 && (_pCache.XnRecyclable < _nPinned))) {
return nil
}
- if (_pCache.X10) >= (_pCache.X11) {
+ if _pCache.XnPage >= _pCache.XnHash {
_pcache1ResizeHash(tls, _pCache)
}
func() {
- if (_pCache.X11) <= uint32(i32(0)) || (**XPgHdr1)(unsafe.Pointer(_pCache.X12)) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45877), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000))), unsafe.Pointer(str(3628)))
+ if _pCache.XnHash <= (0) || _pCache.XapHash == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45877), unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000), unsafe.Pointer(str(3529)))
crt.X__builtin_abort(tls)
}
}()
- if (_pCache.X4) == 0 || ((*XPgHdr1)((*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5))).X8).X4) != 0 || ((_pCache.X10)+uint32(i32(1))) < (_pCache.X6) && _pcache1UnderMemoryPressure(tls, _pCache) == 0 {
+ if _pCache.XbPurgeable == 0 || ((*XPgHdr1)(_pGroup.Xlru.XpLruPrev).XisAnchor) != 0 || (_pCache.XnPage+uint32(1)) < _pCache.XnMax && _pcache1UnderMemoryPressure(tls, _pCache) == 0 {
goto _18
}
- _pPage = (*XPgHdr1)((*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5))).X8)
+ _pPage = (*XPgHdr1)(_pGroup.Xlru.XpLruPrev)
func() {
- if int32(_pPage.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45886), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000))), unsafe.Pointer(str(2908)))
+ if int32(_pPage.XisPinned) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45886), unsafe.Pointer(&_pcache1FetchStage2Ø00__func__Ø000), unsafe.Pointer(str(2809)))
crt.X__builtin_abort(tls)
}
}()
- _pcache1RemoveFromHash(tls, _pPage, i32(0))
+ _pcache1RemoveFromHash(tls, _pPage, int32(0))
_pcache1PinPage(tls, _pPage)
- _2_pOther = (*XPCache1)(_pPage.X6)
- if (_2_pOther.X3) != (_pCache.X3) {
+ _2_pOther = (*XPCache1)(_pPage.XpCache)
+ if _2_pOther.XszAlloc != _pCache.XszAlloc {
_pcache1FreePage(tls, _pPage)
_pPage = nil
goto _22
}
- {
- p := (*uint32)(unsafe.Pointer(&(_pGroup.X4)))
- *p = (*p) - uint32((_2_pOther.X4)-(_pCache.X4))
- sink5(*p)
- }
+ _pGroup.XnCurrentPage -= uint32(_2_pOther.XbPurgeable - _pCache.XbPurgeable)
_22:
_18:
if _pPage == nil {
- _pPage = _pcache1AllocPage(tls, _pCache, bool2int(_createFlag == i32(1)))
+ _pPage = _pcache1AllocPage(tls, _pCache, bool2int(_createFlag == int32(1)))
}
if _pPage == nil {
goto _24
}
- _6_h = _iKey % (_pCache.X11)
- *(*uint32)(unsafe.Pointer(&(_pCache.X10))) += 1
- *(*uint32)(unsafe.Pointer(&(_pPage.X1))) = _iKey
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X5))))) = *(**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCache.X12)) + 4*uintptr(_6_h)))
- *(**XPCache1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X6))))) = _pCache
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X8))))) = nil
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X7))))) = nil
- *(*uint8)(unsafe.Pointer(&(_pPage.X2))) = uint8(i32(1))
- *(*unsafe.Pointer)((*Xsqlite3_pcache_page)(unsafe.Pointer(&(_pPage.X0))).X1) = nil
- *(**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCache.X12)) + 4*uintptr(_6_h))) = _pPage
- if _iKey > (_pCache.X8) {
- *(*uint32)(unsafe.Pointer(&(_pCache.X8))) = _iKey
+ _6_h = _iKey % _pCache.XnHash
+ _pCache.XnPage += 1
+ _pPage.XiKey = _iKey
+ *(**XPgHdr1)(unsafe.Pointer(&_pPage.XpNext)) = *elem14((**XPgHdr1)(unsafe.Pointer(_pCache.XapHash)), uintptr(_6_h))
+ *(**XPCache1)(unsafe.Pointer(&_pPage.XpCache)) = _pCache
+ *(**XPgHdr1)(unsafe.Pointer(&_pPage.XpLruPrev)) = nil
+ *(**XPgHdr1)(unsafe.Pointer(&_pPage.XpLruNext)) = nil
+ _pPage.XisPinned = uint8(1)
+ *(*unsafe.Pointer)(_pPage.Xpage.XpExtra) = nil
+ *elem14((**XPgHdr1)(unsafe.Pointer(_pCache.XapHash)), uintptr(_6_h)) = _pPage
+ if _iKey > _pCache.XiMaxKey {
+ _pCache.XiMaxKey = _iKey
}
_24:
return _pPage
@@ -4555,72 +4520,81 @@ _24:
var _pcache1FetchStage2Ø00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1FetchStage2Ø00__func__Ø000[0], str(3662), 19)
-}
-
-// Return true if it desirable to avoid allocating a new page cache
-// entry.
-//
-// If memory was allocated specifically to the page cache using
-// SQLITE_CONFIG_PAGECACHE but that memory has all been used, then
-// it is desirable to avoid allocating a new page cache entry because
-// presumably SQLITE_CONFIG_PAGECACHE was suppose to be sufficient
-// for all page cache needs and we should not need to spill the
-// allocation onto the heap.
-//
-// Or, the heap is used for all page cache memory but the heap is
-// under memory pressure, then again it is desirable to avoid
-// allocating a new page cache entry in order to avoid stressing
-// the heap even further.
+ crt.Xstrncpy(nil, &_pcache1FetchStage2Ø00__func__Ø000[0], str(3563), 19)
+}
+
+// C comment
+// /*
+// ** Return true if it desirable to avoid allocating a new page cache
+// ** entry.
+// **
+// ** If memory was allocated specifically to the page cache using
+// ** SQLITE_CONFIG_PAGECACHE but that memory has all been used, then
+// ** it is desirable to avoid allocating a new page cache entry because
+// ** presumably SQLITE_CONFIG_PAGECACHE was suppose to be sufficient
+// ** for all page cache needs and we should not need to spill the
+// ** allocation onto the heap.
+// **
+// ** Or, the heap is used for all page cache memory but the heap is
+// ** under memory pressure, then again it is desirable to avoid
+// ** allocating a new page cache entry in order to avoid stressing
+// ** the heap even further.
+// */
func _pcache1UnderMemoryPressure(tls *crt.TLS, _pCache *XPCache1) (r0 int32) {
- if (_pcache1_g.X5) != 0 && (((_pCache.X1) + (_pCache.X2)) <= (_pcache1_g.X4)) {
- return _pcache1_g.X12
+ if _pcache1_g.XnSlot != 0 && ((_pCache.XszPage + _pCache.XszExtra) <= _pcache1_g.XszSlot) {
+ return _pcache1_g.XbUnderPressure
}
return _sqlite3HeapNearlyFull(tls)
}
-// Return true if the heap is currently under memory pressure - in other
-// words if the amount of heap used is close to the limit set by
-// sqlite3_soft_heap_limit().
+// C comment
+// /*
+// ** Return true if the heap is currently under memory pressure - in other
+// ** words if the amount of heap used is close to the limit set by
+// ** sqlite3_soft_heap_limit().
+// */
func _sqlite3HeapNearlyFull(tls *crt.TLS) (r0 int32) {
- return _mem0.X5
+ return _mem0.XnearlyFull
}
-// Allocate a new page object initially associated with cache pCache.
+// C comment
+// /*
+// ** Allocate a new page object initially associated with cache pCache.
+// */
func _pcache1AllocPage(tls *crt.TLS, _pCache *XPCache1, _benignMalloc int32) (r0 *XPgHdr1) {
var _pPg unsafe.Pointer
var _p *XPgHdr1
_p = nil
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45408), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1AllocPageØ00__func__Ø000))), unsafe.Pointer(str(2733)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45408), unsafe.Pointer(&_pcache1AllocPageØ00__func__Ø000), unsafe.Pointer(str(2634)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XPgHdr1)(_pCache.X13) != nil) || (((_pCache.X10) == uint32(i32(0))) && _pcache1InitBulk(tls, _pCache) != 0) {
- _p = (*XPgHdr1)(_pCache.X13)
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X13))))) = (*XPgHdr1)(_p.X5)
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X5))))) = nil
+ if (_pCache.XpFree != nil) || ((_pCache.XnPage == (0)) && _pcache1InitBulk(tls, _pCache) != 0) {
+ _p = (*XPgHdr1)(_pCache.XpFree)
+ *(**XPgHdr1)(unsafe.Pointer(&_pCache.XpFree)) = (*XPgHdr1)(_p.XpNext)
+ *(**XPgHdr1)(unsafe.Pointer(&_p.XpNext)) = nil
goto _5
}
if _benignMalloc != 0 {
_sqlite3BeginBenignMalloc(tls)
}
- _pPg = _pcache1Alloc(tls, _pCache.X3)
- _p = (*XPgHdr1)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_pPg) + 1*uintptr(_pCache.X1)))))
+ _pPg = _pcache1Alloc(tls, _pCache.XszAlloc)
+ _p = (*XPgHdr1)(unsafe.Pointer(elem15((*uint8)(_pPg), uintptr(_pCache.XszPage))))
if _benignMalloc != 0 {
_sqlite3EndBenignMalloc(tls)
}
if _pPg == nil {
return nil
}
- *(*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer(&(_p.X0))).X0))) = _pPg
- *(*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer(&(_p.X0))).X1))) = (unsafe.Pointer)((*XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 32*uintptr(i32(1)))))
- *(*uint8)(unsafe.Pointer(&(_p.X3))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_p.X4))) = uint8(i32(0))
+ _p.Xpage.XpBuf = _pPg
+ _p.Xpage.XpExtra = unsafe.Pointer(elem13(_p, uintptr(1)))
+ _p.XisBulkLocal = 0
+ _p.XisAnchor = 0
_5:
- if (_pCache.X4) != 0 {
- *(*uint32)(unsafe.Pointer(&((*XPGroup)(_pCache.X0).X4))) += 1
+ if _pCache.XbPurgeable != 0 {
+ (*XPGroup)(_pCache.XpGroup).XnCurrentPage += 1
}
return _p
}
@@ -4628,97 +4602,99 @@ _5:
var _pcache1AllocPageØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1AllocPageØ00__func__Ø000[0], str(3681), 17)
+ crt.Xstrncpy(nil, &_pcache1AllocPageØ00__func__Ø000[0], str(3582), 17)
}
-// Try to initialize the pCache->pFree and pCache->pBulk fields. Return
-// true if pCache->pFree ends up containing one or more free pages.
+// C comment
+// /*
+// ** Try to initialize the pCache->pFree and pCache->pBulk fields. Return
+// ** true if pCache->pFree ends up containing one or more free pages.
+// */
func _pcache1InitBulk(tls *crt.TLS, _pCache *XPCache1) (r0 int32) {
var _4_nBulk int32
var _szBulk int64
var _zBulk *int8
var _5_pX *XPgHdr1
- if (_pcache1_g.X3) == i32(0) {
- return i32(0)
+ if _pcache1_g.XnInitPage == int32(0) {
+ return int32(0)
}
- if (_pCache.X6) < uint32(i32(3)) {
- return i32(0)
+ if _pCache.XnMax < uint32(3) {
+ return int32(0)
}
_sqlite3BeginBenignMalloc(tls)
- if (_pcache1_g.X3) > i32(0) {
- _szBulk = int64(_pCache.X3) * int64(_pcache1_g.X3)
+ if _pcache1_g.XnInitPage > int32(0) {
+ _szBulk = int64(_pCache.XszAlloc) * int64(_pcache1_g.XnInitPage)
goto _3
}
- _szBulk = int64(i32(-1024)) * int64(_pcache1_g.X3)
+ _szBulk = int64(-1024) * int64(_pcache1_g.XnInitPage)
_3:
- if _szBulk > (int64(_pCache.X3) * int64(_pCache.X6)) {
- _szBulk = int64(_pCache.X3) * int64(_pCache.X6)
+ if _szBulk > (int64(_pCache.XszAlloc) * int64(_pCache.XnMax)) {
+ _szBulk = int64(_pCache.XszAlloc) * int64(_pCache.XnMax)
}
- _zBulk = (*int8)(store11((*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X14))), _sqlite3Malloc(tls, uint64(_szBulk))))
+ _zBulk = (*int8)(store16(&_pCache.XpBulk, _sqlite3Malloc(tls, uint64(_szBulk))))
_sqlite3EndBenignMalloc(tls)
if _zBulk == nil {
goto _5
}
- _4_nBulk = _sqlite3MallocSize(tls, (unsafe.Pointer)(_zBulk)) / (_pCache.X3)
+ _4_nBulk = _sqlite3MallocSize(tls, unsafe.Pointer(_zBulk)) / _pCache.XszAlloc
_6:
- _5_pX = (*XPgHdr1)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBulk)) + 1*uintptr(_pCache.X1)))))
- *(*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer(&(_5_pX.X0))).X0))) = (unsafe.Pointer)(_zBulk)
- *(*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer(&(_5_pX.X0))).X1))) = (unsafe.Pointer)((*XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_pX)) + 32*uintptr(i32(1)))))
- *(*uint8)(unsafe.Pointer(&(_5_pX.X3))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_5_pX.X4))) = uint8(i32(0))
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_5_pX.X5))))) = (*XPgHdr1)(_pCache.X13)
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X13))))) = _5_pX
- {
- p := &_zBulk
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_pCache.X3)))
- sink0(*p)
- }
- if preInc1(&_4_nBulk, -1) != 0 {
+ _5_pX = (*XPgHdr1)(unsafe.Pointer(elem1(_zBulk, uintptr(_pCache.XszPage))))
+ _5_pX.Xpage.XpBuf = unsafe.Pointer(_zBulk)
+ _5_pX.Xpage.XpExtra = unsafe.Pointer(elem13(_5_pX, uintptr(1)))
+ _5_pX.XisBulkLocal = uint8(1)
+ _5_pX.XisAnchor = 0
+ *(**XPgHdr1)(unsafe.Pointer(&_5_pX.XpNext)) = (*XPgHdr1)(_pCache.XpFree)
+ *(**XPgHdr1)(unsafe.Pointer(&_pCache.XpFree)) = _5_pX
+ *(*uintptr)(unsafe.Pointer(&_zBulk)) += uintptr(_pCache.XszAlloc)
+ if preInc2(&_4_nBulk, -1) != 0 {
goto _6
}
_5:
- return bool2int((*XPgHdr1)(_pCache.X13) != nil)
+ return bool2int((*XPgHdr1)(_pCache.XpFree) != nil)
_ = _4_nBulk
panic(0)
}
-// Malloc function used within this file to allocate space from the buffer
-// configured using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no
-// such buffer exists or there is no space left in it, this function falls
-// back to sqlite3Malloc().
-//
-// Multiple threads can run this routine at the same time. Global variables
-// in pcache1 need to be protected via mutex.
+// C comment
+// /*
+// ** Malloc function used within this file to allocate space from the buffer
+// ** configured using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no
+// ** such buffer exists or there is no space left in it, this function falls
+// ** back to sqlite3Malloc().
+// **
+// ** Multiple threads can run this routine at the same time. Global variables
+// ** in pcache1 need to be protected via mutex.
+// */
func _pcache1Alloc(tls *crt.TLS, _nByte int32) (r0 unsafe.Pointer) {
var _4_sz int32
var _p unsafe.Pointer
_p = nil
func() {
- if Xsqlite3_mutex_notheld(tls, (*Xsqlite3_mutex)((*XPGroup)(unsafe.Pointer(&(_pcache1_g.X0))).X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45318), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1AllocØ00__func__Ø000))), unsafe.Pointer(str(3698)))
+ if Xsqlite3_mutex_notheld(tls, (*Xsqlite3_mutex)(_pcache1_g.Xgrp.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45318), unsafe.Pointer(&_pcache1AllocØ00__func__Ø000), unsafe.Pointer(str(3599)))
crt.X__builtin_abort(tls)
}
}()
- if _nByte > (_pcache1_g.X4) {
+ if _nByte > _pcache1_g.XszSlot {
goto _2
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pcache1_g.X9))
- _p = _pcache1_g.X10
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pcache1_g.Xmutex))
+ _p = _pcache1_g.XpFree
if _p != nil {
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pcache1_g.X10))))) = (*Xsqlite3_file)((*Xsqlite3_file)(_pcache1_g.X10).X0)
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X11))) -= 1
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X12))) = bool2int((_pcache1_g.X11) < (_pcache1_g.X6))
+ *(**XScratchFreeslot)(unsafe.Pointer(&_pcache1_g.XpFree)) = (*XScratchFreeslot)((*XScratchFreeslot)(_pcache1_g.XpFree).XpNext)
+ _pcache1_g.XnFreeSlot -= 1
+ _pcache1_g.XbUnderPressure = bool2int(_pcache1_g.XnFreeSlot < _pcache1_g.XnReserve)
func() {
- if (_pcache1_g.X11) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45326), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1AllocØ00__func__Ø000))), unsafe.Pointer(str(3739)))
+ if _pcache1_g.XnFreeSlot < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45326), unsafe.Pointer(&_pcache1AllocØ00__func__Ø000), unsafe.Pointer(str(3640)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3StatusHighwater(tls, i32(7), _nByte)
- _sqlite3StatusUp(tls, i32(1), i32(1))
+ _sqlite3StatusHighwater(tls, int32(7), _nByte)
+ _sqlite3StatusUp(tls, int32(1), int32(1))
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pcache1_g.X9))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pcache1_g.Xmutex))
_2:
if _p != nil {
goto _6
@@ -4726,10 +4702,10 @@ _2:
_p = _sqlite3Malloc(tls, uint64(_nByte))
if _p != nil {
_4_sz = _sqlite3MallocSize(tls, _p)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pcache1_g.X9))
- _sqlite3StatusHighwater(tls, i32(7), _nByte)
- _sqlite3StatusUp(tls, i32(2), _4_sz)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pcache1_g.X9))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pcache1_g.Xmutex))
+ _sqlite3StatusHighwater(tls, int32(7), _nByte)
+ _sqlite3StatusUp(tls, int32(2), _4_sz)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pcache1_g.Xmutex))
}
_6:
return _p
@@ -4737,33 +4713,35 @@ _6:
func Xsqlite3_mutex_notheld(tls *crt.TLS, _p *Xsqlite3_mutex) (r0 int32) {
func() {
- if _p != nil && (*(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X8)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22906), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_mutex_notheldØ00__func__Ø000))), unsafe.Pointer(str(3760)))
+ if _p != nil && (_sqlite3Config.Xmutex.XxMutexNotheld) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22906), unsafe.Pointer(&_sqlite3_mutex_notheldØ00__func__Ø000), unsafe.Pointer(str(3661)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int((_p == nil) || (*(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X8)})))(tls, _p) != 0)
+ return bool2int((_p == nil) || func() func(*crt.TLS, *Xsqlite3_mutex) int32 {
+ v := _sqlite3Config.Xmutex.XxMutexNotheld
+ return *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&v))
+ }()(tls, _p) != 0)
}
var _sqlite3_mutex_notheldØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_mutex_notheldØ00__func__Ø000[0], str(3808), 22)
+ crt.Xstrncpy(nil, &_sqlite3_mutex_notheldØ00__func__Ø000[0], str(3709), 22)
}
var _pcache1AllocØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1AllocØ00__func__Ø000[0], str(3830), 13)
+ crt.Xstrncpy(nil, &_pcache1AllocØ00__func__Ø000[0], str(3731), 13)
}
-// Implementation of the sqlite3_pcache.xUnpin method.
-//
-// Mark a page as unpinned (eligible for asynchronous recycling).
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xUnpin method.
+// **
+// ** Mark a page as unpinned (eligible for asynchronous recycling).
+// */
func _pcache1Unpin(tls *crt.TLS, _p unsafe.Pointer, _pPg *Xsqlite3_pcache_page, _reuseUnlikely int32) {
var _pCache *XPCache1
var _pPage *XPgHdr1
@@ -4771,45 +4749,45 @@ func _pcache1Unpin(tls *crt.TLS, _p unsafe.Pointer, _pPg *Xsqlite3_pcache_page,
var _pGroup *XPGroup
_pCache = (*XPCache1)(_p)
_pPage = (*XPgHdr1)(unsafe.Pointer(_pPg))
- _pGroup = (*XPGroup)(_pCache.X0)
+ _pGroup = (*XPGroup)(_pCache.XpGroup)
func() {
- if (*XPCache1)(_pPage.X6) != _pCache {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46067), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000))), unsafe.Pointer(str(3843)))
+ if (*XPCache1)(_pPage.XpCache) != _pCache {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46067), unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000), unsafe.Pointer(str(3744)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_mutex)(_pGroup.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46068), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000))), unsafe.Pointer(str(2483)))
+ if (*Xsqlite3_mutex)(_pGroup.Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46068), unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000), unsafe.Pointer(str(2384)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPgHdr1)(_pPage.X8) != nil || (*XPgHdr1)(_pPage.X7) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46073), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000))), unsafe.Pointer(str(3865)))
+ if (*XPgHdr1)(_pPage.XpLruPrev) != nil || (*XPgHdr1)(_pPage.XpLruNext) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46073), unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000), unsafe.Pointer(str(3766)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X2) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46074), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000))), unsafe.Pointer(str(3906)))
+ if int32(_pPage.XisPinned) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46074), unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000), unsafe.Pointer(str(3807)))
crt.X__builtin_abort(tls)
}
}()
- if _reuseUnlikely != 0 || ((_pGroup.X4) > (_pGroup.X1)) {
- _pcache1RemoveFromHash(tls, _pPage, i32(1))
+ if _reuseUnlikely != 0 || (_pGroup.XnCurrentPage > _pGroup.XnMaxPage) {
+ _pcache1RemoveFromHash(tls, _pPage, int32(1))
goto _11
}
- _2_ppFirst = (**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5))).X7)))))
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X8))))) = (*XPgHdr1)(unsafe.Pointer(&(_pGroup.X5)))
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(store10((**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X7))))), *_2_ppFirst).X8))))) = _pPage
+ _2_ppFirst = (**XPgHdr1)(unsafe.Pointer(&(_pGroup.Xlru.XpLruNext)))
+ *(**XPgHdr1)(unsafe.Pointer(&_pPage.XpLruPrev)) = &_pGroup.Xlru
+ *(**XPgHdr1)(unsafe.Pointer(&(store13((**XPgHdr1)(unsafe.Pointer(&_pPage.XpLruNext)), *_2_ppFirst).XpLruPrev))) = _pPage
*_2_ppFirst = _pPage
- *(*uint32)(unsafe.Pointer(&(_pCache.X9))) += 1
- *(*uint8)(unsafe.Pointer(&(_pPage.X2))) = uint8(i32(0))
+ _pCache.XnRecyclable += 1
+ _pPage.XisPinned = 0
_11:
func() {
- if (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46088), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000))), unsafe.Pointer(str(3267)))
+ if (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46088), unsafe.Pointer(&_pcache1UnpinØ00__func__Ø000), unsafe.Pointer(str(3168)))
crt.X__builtin_abort(tls)
}
}()
@@ -4818,10 +4796,13 @@ _11:
var _pcache1UnpinØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1UnpinØ00__func__Ø000[0], str(3925), 13)
+ crt.Xstrncpy(nil, &_pcache1UnpinØ00__func__Ø000[0], str(3826), 13)
}
-// Implementation of the sqlite3_pcache.xRekey method.
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xRekey method.
+// */
func _pcache1Rekey(tls *crt.TLS, _p unsafe.Pointer, _pPg *Xsqlite3_pcache_page, _iOld uint32, _iNew uint32) {
var _h uint32
var _pCache *XPCache1
@@ -4830,41 +4811,41 @@ func _pcache1Rekey(tls *crt.TLS, _p unsafe.Pointer, _pPg *Xsqlite3_pcache_page,
_pCache = (*XPCache1)(_p)
_pPage = (*XPgHdr1)(unsafe.Pointer(_pPg))
func() {
- if (_pPage.X1) != _iOld {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46104), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1RekeyØ00__func__Ø000))), unsafe.Pointer(str(3938)))
+ if _pPage.XiKey != _iOld {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46104), unsafe.Pointer(&_pcache1RekeyØ00__func__Ø000), unsafe.Pointer(str(3839)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPCache1)(_pPage.X6) != _pCache {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46105), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1RekeyØ00__func__Ø000))), unsafe.Pointer(str(3843)))
+ if (*XPCache1)(_pPage.XpCache) != _pCache {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46105), unsafe.Pointer(&_pcache1RekeyØ00__func__Ø000), unsafe.Pointer(str(3744)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46107), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1RekeyØ00__func__Ø000))), unsafe.Pointer(str(3267)))
+ if (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46107), unsafe.Pointer(&_pcache1RekeyØ00__func__Ø000), unsafe.Pointer(str(3168)))
crt.X__builtin_abort(tls)
}
}()
- _h = _iOld % (_pCache.X11)
- _pp = (**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCache.X12)) + 4*uintptr(_h)))
+ _h = _iOld % _pCache.XnHash
+ _pp = elem14((**XPgHdr1)(unsafe.Pointer(_pCache.XapHash)), uintptr(_h))
_6:
if (*_pp) != _pPage {
- _pp = (**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*_pp).X5)))))
+ _pp = (**XPgHdr1)(unsafe.Pointer(&((*_pp).XpNext)))
goto _6
}
- *_pp = (*XPgHdr1)(_pPage.X5)
- _h = _iNew % (_pCache.X11)
- *(*uint32)(unsafe.Pointer(&(_pPage.X1))) = _iNew
- *(**XPgHdr1)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X5))))) = *(**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCache.X12)) + 4*uintptr(_h)))
- *(**XPgHdr1)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCache.X12)) + 4*uintptr(_h))) = _pPage
- if _iNew > (_pCache.X8) {
- *(*uint32)(unsafe.Pointer(&(_pCache.X8))) = _iNew
+ *_pp = (*XPgHdr1)(_pPage.XpNext)
+ _h = _iNew % _pCache.XnHash
+ _pPage.XiKey = _iNew
+ *(**XPgHdr1)(unsafe.Pointer(&_pPage.XpNext)) = *elem14((**XPgHdr1)(unsafe.Pointer(_pCache.XapHash)), uintptr(_h))
+ *elem14((**XPgHdr1)(unsafe.Pointer(_pCache.XapHash)), uintptr(_h)) = _pPage
+ if _iNew > _pCache.XiMaxKey {
+ _pCache.XiMaxKey = _iNew
}
func() {
- if (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46124), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1RekeyØ00__func__Ø000))), unsafe.Pointer(str(3267)))
+ if (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46124), unsafe.Pointer(&_pcache1RekeyØ00__func__Ø000), unsafe.Pointer(str(3168)))
crt.X__builtin_abort(tls)
}
}()
@@ -4873,30 +4854,33 @@ _6:
var _pcache1RekeyØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1RekeyØ00__func__Ø000[0], str(3956), 13)
+ crt.Xstrncpy(nil, &_pcache1RekeyØ00__func__Ø000[0], str(3857), 13)
}
-// Implementation of the sqlite3_pcache.xTruncate method.
-//
-// Discard all unpinned pages in the cache with a page number equal to
-// or greater than parameter iLimit. Any pinned pages with a page number
-// equal to or greater than iLimit are implicitly unpinned.
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xTruncate method.
+// **
+// ** Discard all unpinned pages in the cache with a page number equal to
+// ** or greater than parameter iLimit. Any pinned pages with a page number
+// ** equal to or greater than iLimit are implicitly unpinned.
+// */
func _pcache1Truncate(tls *crt.TLS, _p unsafe.Pointer, _iLimit uint32) {
var _pCache *XPCache1
_pCache = (*XPCache1)(_p)
func() {
- if (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46136), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1TruncateØ00__func__Ø000))), unsafe.Pointer(str(3267)))
+ if (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46136), unsafe.Pointer(&_pcache1TruncateØ00__func__Ø000), unsafe.Pointer(str(3168)))
crt.X__builtin_abort(tls)
}
}()
- if _iLimit <= (_pCache.X8) {
+ if _iLimit <= _pCache.XiMaxKey {
_pcache1TruncateUnsafe(tls, _pCache, _iLimit)
- *(*uint32)(unsafe.Pointer(&(_pCache.X8))) = _iLimit - uint32(i32(1))
+ _pCache.XiMaxKey = _iLimit - uint32(1)
}
func() {
- if (*Xsqlite3_mutex)((*XPGroup)(_pCache.X0).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46141), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1TruncateØ00__func__Ø000))), unsafe.Pointer(str(3267)))
+ if (*Xsqlite3_mutex)((*XPGroup)(_pCache.XpGroup).Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46141), unsafe.Pointer(&_pcache1TruncateØ00__func__Ø000), unsafe.Pointer(str(3168)))
crt.X__builtin_abort(tls)
}
}()
@@ -4905,32 +4889,35 @@ func _pcache1Truncate(tls *crt.TLS, _p unsafe.Pointer, _iLimit uint32) {
var _pcache1TruncateØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1TruncateØ00__func__Ø000[0], str(3969), 16)
+ crt.Xstrncpy(nil, &_pcache1TruncateØ00__func__Ø000[0], str(3870), 16)
}
-// Implementation of the sqlite3_pcache.xShrink method.
-//
-// Free up as much memory as possible.
+// C comment
+// /*
+// ** Implementation of the sqlite3_pcache.xShrink method.
+// **
+// ** Free up as much memory as possible.
+// */
func _pcache1Shrink(tls *crt.TLS, _p unsafe.Pointer) {
var _1_savedMaxPage int32
var _pCache *XPCache1
var _1_pGroup *XPGroup
_pCache = (*XPCache1)(_p)
- if (_pCache.X4) != 0 {
- _1_pGroup = (*XPGroup)(_pCache.X0)
+ if _pCache.XbPurgeable != 0 {
+ _1_pGroup = (*XPGroup)(_pCache.XpGroup)
func() {
- if (*Xsqlite3_mutex)(_1_pGroup.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45824), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1ShrinkØ00__func__Ø000))), unsafe.Pointer(str(2483)))
+ if (*Xsqlite3_mutex)(_1_pGroup.Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45824), unsafe.Pointer(&_pcache1ShrinkØ00__func__Ø000), unsafe.Pointer(str(2384)))
crt.X__builtin_abort(tls)
}
}()
- _1_savedMaxPage = int32(_1_pGroup.X1)
- *(*uint32)(unsafe.Pointer(&(_1_pGroup.X1))) = uint32(i32(0))
+ _1_savedMaxPage = int32(_1_pGroup.XnMaxPage)
+ _1_pGroup.XnMaxPage = 0
_pcache1EnforceMaxPage(tls, _pCache)
- *(*uint32)(unsafe.Pointer(&(_1_pGroup.X1))) = uint32(_1_savedMaxPage)
+ _1_pGroup.XnMaxPage = uint32(_1_savedMaxPage)
func() {
- if (*Xsqlite3_mutex)(_1_pGroup.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(45829), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcache1ShrinkØ00__func__Ø000))), unsafe.Pointer(str(2483)))
+ if (*Xsqlite3_mutex)(_1_pGroup.Xmutex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(45829), unsafe.Pointer(&_pcache1ShrinkØ00__func__Ø000), unsafe.Pointer(str(2384)))
crt.X__builtin_abort(tls)
}
}()
@@ -4940,63 +4927,75 @@ func _pcache1Shrink(tls *crt.TLS, _p unsafe.Pointer) {
var _pcache1ShrinkØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_pcache1ShrinkØ00__func__Ø000[0], str(3985), 14)
+ crt.Xstrncpy(nil, &_pcache1ShrinkØ00__func__Ø000[0], str(3886), 14)
}
var _sqlite3MemSetDefaultØ00defaultMethodsØ001 Xsqlite3_mem_methods
func init() {
- _sqlite3MemSetDefaultØ00defaultMethodsØ001 = Xsqlite3_mem_methods{X0: _sqlite3MemMalloc, X1: _sqlite3MemFree, X2: _sqlite3MemRealloc, X3: _sqlite3MemSize, X4: _sqlite3MemRoundup, X5: _sqlite3MemInit, X6: _sqlite3MemShutdown, X7: nil}
+ _sqlite3MemSetDefaultØ00defaultMethodsØ001 = Xsqlite3_mem_methods{XxMalloc: _sqlite3MemMalloc, XxFree: _sqlite3MemFree, XxRealloc: _sqlite3MemRealloc, XxSize: _sqlite3MemSize, XxRoundup: _sqlite3MemRoundup, XxInit: _sqlite3MemInit, XxShutdown: _sqlite3MemShutdown}
}
-// Like malloc(), but remember the size of the allocation
-// so that we can find it later using sqlite3MemSize().
-//
-// For this low-level routine, we are guaranteed that nByte>0 because
-// cases of nByte<=0 will be intercepted and dealt with by higher level
-// routines.
+// C comment
+// /*
+// ** Like malloc(), but remember the size of the allocation
+// ** so that we can find it later using sqlite3MemSize().
+// **
+// ** For this low-level routine, we are guaranteed that nByte>0 because
+// ** cases of nByte<=0 will be intercepted and dealt with by higher level
+// ** routines.
+// */
func _sqlite3MemMalloc(tls *crt.TLS, _nByte int32) (r0 unsafe.Pointer) {
var _p unsafe.Pointer
_p = crt.Xmalloc(tls, uint32(_nByte))
if _p == nil {
- Xsqlite3_log(tls, i32(7), str(3999), _nByte)
+ Xsqlite3_log(tls, int32(7), str(3900), _nByte)
}
return _p
}
-// Like free() but works for allocations obtained from sqlite3MemMalloc()
-// or sqlite3MemRealloc().
-//
-// For this low-level routine, we already know that pPrior!=0 since
-// cases where pPrior==0 will have been intecepted and dealt with
-// by higher-level routines.
+// C comment
+// /*
+// ** Like free() but works for allocations obtained from sqlite3MemMalloc()
+// ** or sqlite3MemRealloc().
+// **
+// ** For this low-level routine, we already know that pPrior!=0 since
+// ** cases where pPrior==0 will have been intecepted and dealt with
+// ** by higher-level routines.
+// */
func _sqlite3MemFree(tls *crt.TLS, _pPrior unsafe.Pointer) {
crt.Xfree(tls, _pPrior)
}
-// Like realloc(). Resize an allocation previously obtained from
-// sqlite3MemMalloc().
-//
-// For this low-level interface, we know that pPrior!=0. Cases where
-// pPrior==0 while have been intercepted by higher-level routine and
-// redirected to xMalloc. Similarly, we know that nByte>0 because
-// cases where nByte<=0 will have been intercepted by higher-level
-// routines and redirected to xFree.
+// C comment
+// /*
+// ** Like realloc(). Resize an allocation previously obtained from
+// ** sqlite3MemMalloc().
+// **
+// ** For this low-level interface, we know that pPrior!=0. Cases where
+// ** pPrior==0 while have been intercepted by higher-level routine and
+// ** redirected to xMalloc. Similarly, we know that nByte>0 because
+// ** cases where nByte<=0 will have been intercepted by higher-level
+// ** routines and redirected to xFree.
+// */
func _sqlite3MemRealloc(tls *crt.TLS, _pPrior unsafe.Pointer, _nByte int32) (r0 unsafe.Pointer) {
var _p unsafe.Pointer
_p = crt.Xrealloc(tls, _pPrior, uint32(_nByte))
if _p == nil {
- Xsqlite3_log(tls, i32(7), str(4037), crt.Xmalloc_usable_size(tls, _pPrior), _nByte)
+ Xsqlite3_log(tls, int32(7), str(3938), crt.Xmalloc_usable_size(tls, _pPrior), _nByte)
}
return _p
}
-// Report the allocated size of a prior return from xMalloc()
-// or xRealloc().
+// C comment
+// /*
+// ** Report the allocated size of a prior return from xMalloc()
+// ** or xRealloc().
+// */
func _sqlite3MemSize(tls *crt.TLS, _pPrior unsafe.Pointer) (r0 int32) {
func() {
if _pPrior == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(20827), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MemSizeØ00__func__Ø000))), unsafe.Pointer(str(4073)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(20827), unsafe.Pointer(&_sqlite3MemSizeØ00__func__Ø000), unsafe.Pointer(str(3974)))
crt.X__builtin_abort(tls)
}
}()
@@ -5006,124 +5005,166 @@ func _sqlite3MemSize(tls *crt.TLS, _pPrior unsafe.Pointer) (r0 int32) {
var _sqlite3MemSizeØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3MemSizeØ00__func__Ø000[0], str(4083), 15)
+ crt.Xstrncpy(nil, &_sqlite3MemSizeØ00__func__Ø000[0], str(3984), 15)
}
-// Round up a request size to the next valid allocation size.
+// C comment
+// /*
+// ** Round up a request size to the next valid allocation size.
+// */
func _sqlite3MemRoundup(tls *crt.TLS, _n int32) (r0 int32) {
- return (_n + i32(7)) & i32(-8)
+ return (_n + int32(7)) & int32(-8)
}
-// Initialize this module.
+// C comment
+// /*
+// ** Initialize this module.
+// */
func _sqlite3MemInit(tls *crt.TLS, _NotUsed unsafe.Pointer) (r0 int32) {
- return i32(0)
+ return int32(0)
}
-// Deinitialize this module.
+// C comment
+// /*
+// ** Deinitialize this module.
+// */
func _sqlite3MemShutdown(tls *crt.TLS, _NotUsed unsafe.Pointer) {
}
func _sqlite3NomemError(tls *crt.TLS, _lineno int32) (r0 int32) {
- return _reportError(tls, i32(7), _lineno, str(4098))
+ return _reportError(tls, int32(7), _lineno, str(3999))
}
+// C comment
+// /*
+// ** Hash table for global functions - functions common to all
+// ** database connections. After initialization, this table is
+// ** read-only.
+// */
var _sqlite3BuiltinFunctions XFuncDefHash
-// All of the FuncDef structures in the aBuiltinFunc[] array above
-// to the global function hash table. This occurs at start-time (as
-// a consequence of calling sqlite3_initialize()).
-//
-// After this routine runs
+// C comment
+// /*
+// ** All of the FuncDef structures in the aBuiltinFunc[] array above
+// ** to the global function hash table. This occurs at start-time (as
+// ** a consequence of calling sqlite3_initialize()).
+// **
+// ** After this routine runs
+// */
func _sqlite3RegisterBuiltinFunctions(tls *crt.TLS) {
_sqlite3AlterFunctions(tls)
_sqlite3RegisterDateTimeFunctions(tls)
- _sqlite3InsertBuiltinFuncs(tls, (*XFuncDef)(unsafe.Pointer(&_sqlite3RegisterBuiltinFunctionsØ00aBuiltinFuncØ001)), i32(60))
+ _sqlite3InsertBuiltinFuncs(tls, (*XFuncDef)(unsafe.Pointer(&_sqlite3RegisterBuiltinFunctionsØ00aBuiltinFuncØ001)), int32(60))
}
-// Register built-in functions used to help implement ALTER TABLE
+// C comment
+// /*
+// ** Register built-in functions used to help implement ALTER TABLE
+// */
func _sqlite3AlterFunctions(tls *crt.TLS) {
- _sqlite3InsertBuiltinFuncs(tls, (*XFuncDef)(unsafe.Pointer(&_sqlite3AlterFunctionsØ00aAlterTableFuncsØ001)), i32(3))
+ _sqlite3InsertBuiltinFuncs(tls, (*XFuncDef)(unsafe.Pointer(&_sqlite3AlterFunctionsØ00aAlterTableFuncsØ001)), int32(3))
}
-// Insert a new FuncDef into a FuncDefHash hash table.
+// C comment
+// /*
+// ** Insert a new FuncDef into a FuncDefHash hash table.
+// */
func _sqlite3InsertBuiltinFuncs(tls *crt.TLS, _aDef *XFuncDef, _nDef int32) {
var _i, _1_nName, _1_h int32
var _1_zName *int8
var _1_pOther *XFuncDef
- _i = i32(0)
+ _i = int32(0)
_0:
if _i >= _nDef {
goto _3
}
- _1_zName = (*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDef)) + 28*uintptr(_i))).X6
+ _1_zName = elem17(_aDef, uintptr(_i)).XzName
_1_nName = _sqlite3Strlen30(tls, _1_zName)
- _1_h = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_zName)) + 1*uintptr(i32(0))))))))) + _1_nName) % i32(23)
+ _1_h = (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(*elem1(_1_zName, 0))))) + _1_nName) % int32(23)
_1_pOther = _functionSearch(tls, _1_h, _1_zName)
if _1_pOther != nil {
func() {
- if _1_pOther == (*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDef))+28*uintptr(_i))) || (*XFuncDef)(_1_pOther.X3) == (*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDef))+28*uintptr(_i))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104459), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertBuiltinFuncsØ00__func__Ø000))), unsafe.Pointer(str(4102)))
+ if _1_pOther == elem17(_aDef, uintptr(_i)) || (*XFuncDef)(_1_pOther.XpNext) == elem17(_aDef, uintptr(_i)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104459), unsafe.Pointer(&_sqlite3InsertBuiltinFuncsØ00__func__Ø000), unsafe.Pointer(str(4003)))
crt.X__builtin_abort(tls)
}
}()
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDef)) + 28*uintptr(_i))).X3))))) = (*XFuncDef)(_1_pOther.X3)
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pOther.X3))))) = (*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDef)) + 28*uintptr(_i)))
+ *(**XFuncDef)(unsafe.Pointer(&(elem17(_aDef, uintptr(_i)).XpNext))) = (*XFuncDef)(_1_pOther.XpNext)
+ *(**XFuncDef)(unsafe.Pointer(&_1_pOther.XpNext)) = elem17(_aDef, uintptr(_i))
goto _8
}
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDef)) + 28*uintptr(_i))).X3))))) = nil
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDef)) + 28*uintptr(_i))).X7))))))) = *(**XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[23]unsafe.Pointer)(unsafe.Pointer(&(_sqlite3BuiltinFunctions.X0))))) + 4*uintptr(_1_h)))
- *(**XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[23]unsafe.Pointer)(unsafe.Pointer(&(_sqlite3BuiltinFunctions.X0))))) + 4*uintptr(_1_h))) = (*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDef)) + 28*uintptr(_i)))
+ *(**XFuncDef)(unsafe.Pointer(&(elem17(_aDef, uintptr(_i)).XpNext))) = nil
+ *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem17(_aDef, uintptr(_i)).Xu))))) = *elem18((**XFuncDef)(unsafe.Pointer(&_sqlite3BuiltinFunctions.Xa)), uintptr(_1_h))
+ *elem18((**XFuncDef)(unsafe.Pointer(&_sqlite3BuiltinFunctions.Xa)), uintptr(_1_h)) = elem17(_aDef, uintptr(_i))
_8:
_i += 1
goto _0
_3:
}
-// Compute a string length that is limited to what can be stored in
-// lower 30 bits of a 32-bit signed integer.
-//
-// The value returned will never be negative. Nor will it ever be greater
-// than the actual length of the string. For very long strings (greater
-// than 1GiB) the value returned might be less than the true string length.
+// C comment
+// /*
+// ** Compute a string length that is limited to what can be stored in
+// ** lower 30 bits of a 32-bit signed integer.
+// **
+// ** The value returned will never be negative. Nor will it ever be greater
+// ** than the actual length of the string. For very long strings (greater
+// ** than 1GiB) the value returned might be less than the true string length.
+// */
func _sqlite3Strlen30(tls *crt.TLS, _z *int8) (r0 int32) {
if _z == nil {
- return i32(0)
+ return int32(0)
}
- return i32(1073741823) & int32(crt.Xstrlen(tls, _z))
+ return int32(1073741823) & int32(crt.Xstrlen(tls, _z))
}
+// C comment
+// /* An array to map all upper-case characters into their corresponding
+// ** lower-case character.
+// **
+// ** SQLite only considers US-ASCII (or EBCDIC) characters. We do not
+// ** handle case conversions for the UTF character set since the tables
+// ** involved are nearly as big or bigger than SQLite itself.
+// */
var _sqlite3UpperToLower [256]uint8
func init() {
_sqlite3UpperToLower = [256]uint8{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255}
}
-// Search a FuncDefHash for a function with the given name. Return
-// a pointer to the matching FuncDef if found, or 0 if there is no match.
+// C comment
+// /*
+// ** Search a FuncDefHash for a function with the given name. Return
+// ** a pointer to the matching FuncDef if found, or 0 if there is no match.
+// */
func _functionSearch(tls *crt.TLS, _h int32, _zFunc *int8) (r0 *XFuncDef) {
var _p *XFuncDef
- _p = *(**XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[23]unsafe.Pointer)(unsafe.Pointer(&(_sqlite3BuiltinFunctions.X0))))) + 4*uintptr(_h)))
+ _p = *elem18((**XFuncDef)(unsafe.Pointer(&_sqlite3BuiltinFunctions.Xa)), uintptr(_h))
_0:
if _p == nil {
goto _3
}
- if _sqlite3StrICmp(tls, _p.X6, _zFunc) == i32(0) {
+ if _sqlite3StrICmp(tls, _p.XzName, _zFunc) == int32(0) {
return _p
}
- _p = (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X7))))))
+ _p = (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))
goto _0
_3:
return nil
}
+// C comment
+// /*
+// ** Internal function prototypes
+// */
func _sqlite3StrICmp(tls *crt.TLS, _zLeft *int8, _zRight *int8) (r0 int32) {
var _c int32
var _a, _b *uint8
_a = (*uint8)(unsafe.Pointer(_zLeft))
_b = (*uint8)(unsafe.Pointer(_zRight))
_0:
- _c = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(*_a)))) - int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(*_b))))
- if _c != 0 || (int32(*_a) == i32(0)) {
+ _c = int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(*_a))) - int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(*_b)))
+ if _c != 0 || (int32(*_a) == int32(0)) {
goto _2
}
*(*uintptr)(unsafe.Pointer(&_a)) += uintptr(1)
@@ -5136,42 +5177,45 @@ _2:
var _sqlite3InsertBuiltinFuncsØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3InsertBuiltinFuncsØ00__func__Ø000[0], str(4146), 26)
+ crt.Xstrncpy(nil, &_sqlite3InsertBuiltinFuncsØ00__func__Ø000[0], str(4047), 26)
}
var _sqlite3AlterFunctionsØ00aAlterTableFuncsØ001 [3]XFuncDef
func init() {
- _sqlite3AlterFunctionsØ00aAlterTableFuncsØ001 = [3]XFuncDef{XFuncDef{X0: i8(2), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ _sqlite3AlterFunctionsØ00aAlterTableFuncsØ001 = [3]XFuncDef{XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_renameTableFunc})), X5: nil, X6: str(4172), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_renameTableFunc})), XzName: str(4073)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_renameTriggerFunc})), X5: nil, X6: str(4192), X7: t12{}}, XFuncDef{X0: i8(3), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_renameTriggerFunc})), XzName: str(4093)}, XFuncDef{XnArg: int8(3), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_renameParentFunc})), X5: nil, X6: str(4214), X7: t12{}}}
-}
-
-// This function is used by SQL generated to implement the
-// ALTER TABLE command. The first argument is the text of a CREATE TABLE or
-// CREATE INDEX command. The second is a table name. The table name in
-// the CREATE TABLE or CREATE INDEX statement is replaced with the third
-// argument and the result returned. Examples:
-//
-// sqlite_rename_table('CREATE TABLE abc(a, b, c)', 'def')
-// -> 'CREATE TABLE def(a, b, c)'
-//
-// sqlite_rename_table('CREATE INDEX i ON abc(a)', 'def')
-// -> 'CREATE INDEX i ON def(a, b, c)'
+ }{_renameParentFunc})), XzName: str(4115)}}
+}
+
+// C comment
+// /*
+// ** This function is used by SQL generated to implement the
+// ** ALTER TABLE command. The first argument is the text of a CREATE TABLE or
+// ** CREATE INDEX command. The second is a table name. The table name in
+// ** the CREATE TABLE or CREATE INDEX statement is replaced with the third
+// ** argument and the result returned. Examples:
+// **
+// ** sqlite_rename_table('CREATE TABLE abc(a, b, c)', 'def')
+// ** -> 'CREATE TABLE def(a, b, c)'
+// **
+// ** sqlite_rename_table('CREATE INDEX i ON abc(a)', 'def')
+// ** -> 'CREATE INDEX i ON def(a, b, c)'
+// */
func _renameTableFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _argv **XMem) {
var _token, _len int32
var _zRet *int8
var _zSql, _zTableName, _zCsr *uint8
var _tname XToken
var _db *Xsqlite3
- _zSql = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- _zTableName = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
+ _zSql = Xsqlite3_value_text(tls, *elem19(_argv, 0))
+ _zTableName = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))
_zCsr = _zSql
- _len = i32(0)
+ _len = int32(0)
_db = Xsqlite3_context_db_handle(tls, _context)
if _zSql == nil {
@@ -5181,74 +5225,72 @@ _1:
if (*_zCsr) == 0 {
return
}
- *(**int8)(unsafe.Pointer(&(_tname.X0))) = (*int8)(unsafe.Pointer(_zCsr))
- *(*uint32)(unsafe.Pointer(&(_tname.X1))) = uint32(_len)
+ _tname.Xz = (*int8)(unsafe.Pointer(_zCsr))
+ _tname.Xn = uint32(_len)
_3:
- {
- p := &_zCsr
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_len)))
- sink13(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zCsr)) += uintptr(_len)
_len = _sqlite3GetToken(tls, _zCsr, &_token)
- if _token == i32(163) {
+ if _token == int32(163) {
goto _3
}
func() {
- if _len <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96186), unsafe.Pointer((*int8)(unsafe.Pointer(&_renameTableFuncØ00__func__Ø000))), unsafe.Pointer(str(4235)))
+ if _len <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96186), unsafe.Pointer(&_renameTableFuncØ00__func__Ø000), unsafe.Pointer(str(4136)))
crt.X__builtin_abort(tls)
}
}()
- if (_token != i32(22)) && (_token != i32(125)) {
+ if (_token != int32(22)) && (_token != int32(125)) {
goto _1
}
- _zRet = _sqlite3MPrintf(tls, _db, str(4241), int32((uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(_tname.X0))))-uintptr(unsafe.Pointer(_zSql)))/1), unsafe.Pointer(_zSql), unsafe.Pointer(_zTableName), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_tname.X0))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_tname.X1)))))))))
- Xsqlite3_result_text(tls, _context, _zRet, i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ _zRet = _sqlite3MPrintf(tls, _db, str(4142), int32(uintptr(unsafe.Pointer(_tname.Xz))-uintptr(unsafe.Pointer(_zSql))), unsafe.Pointer(_zSql), unsafe.Pointer(_zTableName), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_tname.Xz))+uintptr(_tname.Xn)))))
+ Xsqlite3_result_text(tls, _context, _zRet, int32(-1), func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
_0:
- _ = _tname
}
func Xsqlite3_value_text(tls *crt.TLS, _pVal *XMem) (r0 *uint8) {
- return (*uint8)(_sqlite3ValueText(tls, _pVal, uint8(i32(1))))
-}
-
-// This function is only available internally, it is not part of the
-// external API. It works in a similar way to sqlite3_value_text(),
-// except the data returned is in the encoding specified by the second
-// parameter, which must be one of SQLITE_UTF16BE, SQLITE_UTF16LE or
-// SQLITE_UTF8.
-//
-// (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED.
-// If that is the case, then the result must be aligned on an even byte
-// boundary.
+ return (*uint8)(_sqlite3ValueText(tls, _pVal, uint8(1)))
+}
+
+// C comment
+// /* This function is only available internally, it is not part of the
+// ** external API. It works in a similar way to sqlite3_value_text(),
+// ** except the data returned is in the encoding specified by the second
+// ** parameter, which must be one of SQLITE_UTF16BE, SQLITE_UTF16LE or
+// ** SQLITE_UTF8.
+// **
+// ** (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED.
+// ** If that is the case, then the result must be aligned on an even byte
+// ** boundary.
+// */
func _sqlite3ValueText(tls *crt.TLS, _pVal *XMem, _enc uint8) (r0 unsafe.Pointer) {
if _pVal == nil {
return nil
}
func() {
- if (*Xsqlite3)(_pVal.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pVal.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70759), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ValueTextØ00__func__Ø000))), unsafe.Pointer(str(4252)))
+ if (*Xsqlite3)(_pVal.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pVal.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70759), unsafe.Pointer(&_sqlite3ValueTextØ00__func__Ø000), unsafe.Pointer(str(4153)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_enc) & i32(3)) != (int32(_enc) & i32(-9)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70760), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ValueTextØ00__func__Ø000))), unsafe.Pointer(str(4303)))
+ if (int32(_enc) & int32(3)) != (int32(_enc) & int32(-9)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70760), unsafe.Pointer(&_sqlite3ValueTextØ00__func__Ø000), unsafe.Pointer(str(4204)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pVal.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70761), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ValueTextØ00__func__Ø000))), unsafe.Pointer(str(4340)))
+ if (int32(_pVal.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70761), unsafe.Pointer(&_sqlite3ValueTextØ00__func__Ø000), unsafe.Pointer(str(4241)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_pVal.X1) & i32(514)) == i32(514)) && (int32(_pVal.X2) == int32(_enc)) {
- return (unsafe.Pointer)(_pVal.X5)
+ if ((int32(_pVal.Xflags) & int32(514)) == int32(514)) && (int32(_pVal.Xenc) == int32(_enc)) {
+ return unsafe.Pointer(_pVal.Xz)
}
- if (int32(_pVal.X1) & i32(1)) != 0 {
+ if (int32(_pVal.Xflags) & int32(1)) != 0 {
return nil
}
return _valueToText(tls, _pVal, _enc)
@@ -5257,94 +5299,96 @@ func _sqlite3ValueText(tls *crt.TLS, _pVal *XMem, _enc uint8) (r0 unsafe.Pointer
var _sqlite3ValueTextØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ValueTextØ00__func__Ø000[0], str(4370), 17)
+ crt.Xstrncpy(nil, &_sqlite3ValueTextØ00__func__Ø000[0], str(4271), 17)
}
-// The pVal argument is known to be a value other than NULL.
-// Convert it into a string with encoding enc and return a pointer
-// to a zero-terminated version of that string.
+// C comment
+// /*
+// ** The pVal argument is known to be a value other than NULL.
+// ** Convert it into a string with encoding enc and return a pointer
+// ** to a zero-terminated version of that string.
+// */
func _valueToText(tls *crt.TLS, _pVal *XMem, _enc uint8) (r0 unsafe.Pointer) {
func() {
if _pVal == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70716), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueToTextØ00__func__Ø000))), unsafe.Pointer(str(4387)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70716), unsafe.Pointer(&_valueToTextØ00__func__Ø000), unsafe.Pointer(str(4288)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pVal.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pVal.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70717), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueToTextØ00__func__Ø000))), unsafe.Pointer(str(4252)))
+ if (*Xsqlite3)(_pVal.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pVal.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70717), unsafe.Pointer(&_valueToTextØ00__func__Ø000), unsafe.Pointer(str(4153)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_enc) & i32(3)) != (int32(_enc) & i32(-9)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70718), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueToTextØ00__func__Ø000))), unsafe.Pointer(str(4303)))
+ if (int32(_enc) & int32(3)) != (int32(_enc) & int32(-9)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70718), unsafe.Pointer(&_valueToTextØ00__func__Ø000), unsafe.Pointer(str(4204)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pVal.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70719), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueToTextØ00__func__Ø000))), unsafe.Pointer(str(4340)))
+ if (int32(_pVal.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70719), unsafe.Pointer(&_valueToTextØ00__func__Ø000), unsafe.Pointer(str(4241)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pVal.X1) & i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70720), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueToTextØ00__func__Ø000))), unsafe.Pointer(str(4395)))
+ if (int32(_pVal.Xflags) & int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70720), unsafe.Pointer(&_valueToTextØ00__func__Ø000), unsafe.Pointer(str(4296)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pVal.X1) & i32(18)) == 0 {
+ if (int32(_pVal.Xflags) & int32(18)) == 0 {
goto _11
}
if func() int32 {
- if (int32(_pVal.X1) & i32(16384)) != 0 {
+ if (int32(_pVal.Xflags) & int32(16384)) != 0 {
return _sqlite3VdbeMemExpandBlob(tls, _pVal)
}
- return i32(0)
+ return int32(0)
}() != 0 {
return nil
}
{
- p := (*uint16)(unsafe.Pointer(&(_pVal.X1)))
- *p = uint16(int32(*p) | i32(2))
- sink14(*p)
+ p := &_pVal.Xflags
+ *p = uint16(int32(*p) | int32(2))
}
- if int32(_pVal.X2) != (int32(_enc) & i32(-9)) {
- _sqlite3VdbeChangeEncoding(tls, _pVal, int32(_enc)&i32(-9))
+ if int32(_pVal.Xenc) != (int32(_enc) & int32(-9)) {
+ _sqlite3VdbeChangeEncoding(tls, _pVal, int32(_enc)&int32(-9))
}
- if (int32(_enc)&i32(8)) == i32(0) || i32(1) != (i32(1)&int32(uintptr(unsafe.Pointer(_pVal.X5)))) {
+ if (int32(_enc)&int32(8)) == int32(0) || int32(1) != (int32(1)&int32(crt.P2U(unsafe.Pointer(_pVal.Xz)))) {
goto _17
}
func() {
- if (int32(_pVal.X1) & i32(6144)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70728), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueToTextØ00__func__Ø000))), unsafe.Pointer(str(4425)))
+ if (int32(_pVal.Xflags) & int32(6144)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70728), unsafe.Pointer(&_valueToTextØ00__func__Ø000), unsafe.Pointer(str(4326)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3VdbeMemMakeWriteable(tls, _pVal) != i32(0) {
+ if _sqlite3VdbeMemMakeWriteable(tls, _pVal) != int32(0) {
return nil
}
_17:
_sqlite3VdbeMemNulTerminate(tls, _pVal)
goto _21
_11:
- _sqlite3VdbeMemStringify(tls, _pVal, _enc, uint8(i32(0)))
+ _sqlite3VdbeMemStringify(tls, _pVal, _enc, 0)
func() {
- if i32(0) != (i32(1) & int32(uintptr(unsafe.Pointer(_pVal.X5)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70736), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueToTextØ00__func__Ø000))), unsafe.Pointer(str(4467)))
+ if int32(0) != (int32(1) & int32(crt.P2U(unsafe.Pointer(_pVal.Xz)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70736), unsafe.Pointer(&_valueToTextØ00__func__Ø000), unsafe.Pointer(str(4368)))
crt.X__builtin_abort(tls)
}
}()
_21:
func() {
- if int32(_pVal.X2) != (int32(_enc)&i32(-9)) && (*Xsqlite3)(_pVal.X9) != nil && ((*Xsqlite3)(_pVal.X9).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70738), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueToTextØ00__func__Ø000))), unsafe.Pointer(str(4501)))
+ if int32(_pVal.Xenc) != (int32(_enc)&int32(-9)) && (*Xsqlite3)(_pVal.Xdb) != nil && ((*Xsqlite3)(_pVal.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70738), unsafe.Pointer(&_valueToTextØ00__func__Ø000), unsafe.Pointer(str(4402)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pVal.X2) == (int32(_enc) & i32(-9)) {
- return (unsafe.Pointer)(_pVal.X5)
+ if int32(_pVal.Xenc) == (int32(_enc) & int32(-9)) {
+ return unsafe.Pointer(_pVal.Xz)
}
return nil
}
@@ -5352,238 +5396,234 @@ _21:
var _valueToTextØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_valueToTextØ00__func__Ø000[0], str(4583), 12)
+ crt.Xstrncpy(nil, &_valueToTextØ00__func__Ø000[0], str(4484), 12)
}
func _sqlite3VdbeMemExpandBlob(tls *crt.TLS, _pMem *XMem) (r0 int32) {
var _nByte int32
func() {
- if (int32(_pMem.X1) & i32(16384)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69923), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemExpandBlobØ00__func__Ø000))), unsafe.Pointer(str(4595)))
+ if (int32(_pMem.Xflags) & int32(16384)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69923), unsafe.Pointer(&_sqlite3VdbeMemExpandBlobØ00__func__Ø000), unsafe.Pointer(str(4496)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(16)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69924), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemExpandBlobØ00__func__Ø000))), unsafe.Pointer(str(4618)))
+ if (int32(_pMem.Xflags) & int32(16)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69924), unsafe.Pointer(&_sqlite3VdbeMemExpandBlobØ00__func__Ø000), unsafe.Pointer(str(4519)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69925), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemExpandBlobØ00__func__Ø000))), unsafe.Pointer(str(4639)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69925), unsafe.Pointer(&_sqlite3VdbeMemExpandBlobØ00__func__Ø000), unsafe.Pointer(str(4540)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69926), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemExpandBlobØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69926), unsafe.Pointer(&_sqlite3VdbeMemExpandBlobØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
- _nByte = (_pMem.X4) + (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
- if _nByte <= i32(0) {
- _nByte = i32(1)
+ _nByte = _pMem.Xn + (*(*int32)(unsafe.Pointer(&_pMem.Xu)))
+ if _nByte <= int32(0) {
+ _nByte = int32(1)
}
- if _sqlite3VdbeMemGrow(tls, _pMem, _nByte, i32(1)) != 0 {
- return _sqlite3NomemError(tls, i32(69934))
- }
- crt.Xmemset(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5))+1*uintptr(_pMem.X4)))), i32(0), uint32(*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))))
- {
- p := (*int32)(unsafe.Pointer(&(_pMem.X4)))
- *p = (*p) + (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
- sink1(*p)
+ if _sqlite3VdbeMemGrow(tls, _pMem, _nByte, int32(1)) != 0 {
+ return _sqlite3NomemError(tls, int32(69934))
}
+ crt.Xmemset(tls, unsafe.Pointer(elem1(_pMem.Xz, uintptr(_pMem.Xn))), int32(0), uint32(*(*int32)(unsafe.Pointer(&_pMem.Xu))))
+ _pMem.Xn += *(*int32)(unsafe.Pointer(&_pMem.Xu))
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) & i32(-16897))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) & int32(-16897))
}
- return i32(0)
+ return int32(0)
}
var _sqlite3VdbeMemExpandBlobØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemExpandBlobØ00__func__Ø000[0], str(4718), 25)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemExpandBlobØ00__func__Ø000[0], str(4619), 25)
}
-// Make sure pMem->z points to a writable allocation of at least
-// min(n,32) bytes.
-//
-// If the bPreserve argument is true, then copy of the content of
-// pMem->z into the new allocation. pMem must be either a string or
-// blob if bPreserve is true. If bPreserve is false, any prior content
-// in pMem->z is discarded.
+// C comment
+// /*
+// ** Make sure pMem->z points to a writable allocation of at least
+// ** min(n,32) bytes.
+// **
+// ** If the bPreserve argument is true, then copy of the content of
+// ** pMem->z into the new allocation. pMem must be either a string or
+// ** blob if bPreserve is true. If bPreserve is false, any prior content
+// ** in pMem->z is discarded.
+// */
func _sqlite3VdbeMemGrow(tls *crt.TLS, _pMem *XMem, _n int32, _bPreserve int32) (r0 int32) {
func() {
if _sqlite3VdbeCheckMemInvariants(tls, _pMem) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69822), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000))), unsafe.Pointer(str(4743)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69822), unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000), unsafe.Pointer(str(4644)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69823), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000))), unsafe.Pointer(str(4639)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69823), unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000), unsafe.Pointer(str(4540)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _bPreserve != i32(0) && (int32(_pMem.X1)&i32(18)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69828), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000))), unsafe.Pointer(str(4779)))
+ if _bPreserve != int32(0) && (int32(_pMem.Xflags)&int32(18)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69828), unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000), unsafe.Pointer(str(4680)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pMem.X7) != i32(0) && (_pMem.X7) != _sqlite3DbMallocSize(tls, (*Xsqlite3)(_pMem.X9), (unsafe.Pointer)(_pMem.X6)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69831), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000))), unsafe.Pointer(str(4826)))
+ if _pMem.XszMalloc != int32(0) && _pMem.XszMalloc != _sqlite3DbMallocSize(tls, (*Xsqlite3)(_pMem.Xdb), unsafe.Pointer(_pMem.XzMalloc)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69831), unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000), unsafe.Pointer(str(4727)))
crt.X__builtin_abort(tls)
}
}()
- if _n < i32(32) {
- _n = i32(32)
+ if _n < int32(32) {
+ _n = int32(32)
}
- if (_bPreserve != 0 && ((_pMem.X7) > i32(0))) && ((_pMem.X5) == (_pMem.X6)) {
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = store0((**int8)(unsafe.Pointer(&(_pMem.X6))), (*int8)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_pMem.X9), (unsafe.Pointer)(_pMem.X5), uint64(_n))))
- _bPreserve = i32(0)
+ if (_bPreserve != 0 && (_pMem.XszMalloc > int32(0))) && (_pMem.Xz == _pMem.XzMalloc) {
+ _pMem.Xz = store1(&_pMem.XzMalloc, (*int8)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_pMem.Xdb), unsafe.Pointer(_pMem.Xz), uint64(_n))))
+ _bPreserve = int32(0)
goto _14
}
- if (_pMem.X7) > i32(0) {
- _sqlite3DbFreeNN(tls, (*Xsqlite3)(_pMem.X9), (unsafe.Pointer)(_pMem.X6))
+ if _pMem.XszMalloc > int32(0) {
+ _sqlite3DbFreeNN(tls, (*Xsqlite3)(_pMem.Xdb), unsafe.Pointer(_pMem.XzMalloc))
}
- *(**int8)(unsafe.Pointer(&(_pMem.X6))) = (*int8)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_pMem.X9), uint64(_n)))
+ _pMem.XzMalloc = (*int8)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_pMem.Xdb), uint64(_n)))
_14:
- if (_pMem.X6) == nil {
+ if _pMem.XzMalloc == nil {
_sqlite3VdbeMemSetNull(tls, _pMem)
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = nil
- *(*int32)(unsafe.Pointer(&(_pMem.X7))) = i32(0)
- return _sqlite3NomemError(tls, i32(69845))
+ _pMem.Xz = nil
+ _pMem.XszMalloc = int32(0)
+ return _sqlite3NomemError(tls, int32(69845))
}
- *(*int32)(unsafe.Pointer(&(_pMem.X7))) = _sqlite3DbMallocSize(tls, (*Xsqlite3)(_pMem.X9), (unsafe.Pointer)(_pMem.X6))
- if (_bPreserve != 0 && ((_pMem.X5) != nil)) && func() int32 {
- if (_pMem.X5) != (_pMem.X6) {
- return i32(1)
+ _pMem.XszMalloc = _sqlite3DbMallocSize(tls, (*Xsqlite3)(_pMem.Xdb), unsafe.Pointer(_pMem.XzMalloc))
+ if (_bPreserve != 0 && (_pMem.Xz != nil)) && func() int32 {
+ if _pMem.Xz != _pMem.XzMalloc {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69850), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69850), unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pMem.X6), (unsafe.Pointer)(_pMem.X5), uint32(_pMem.X4))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pMem.XzMalloc), unsafe.Pointer(_pMem.Xz), uint32(_pMem.Xn))
}
- if (int32(_pMem.X1) & i32(1024)) != i32(0) {
+ if (int32(_pMem.Xflags) & int32(1024)) != int32(0) {
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if _pMem.XxDel == nil || *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{(_pMem.X10)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_pMem.XxDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{nil})) || *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_pMem.X10)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69854), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000))), unsafe.Pointer(str(4910)))
+ }{func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()})) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69854), unsafe.Pointer(&_sqlite3VdbeMemGrowØ00__func__Ø000), unsafe.Pointer(str(4811)))
crt.X__builtin_abort(tls)
}
}()
- (_pMem.X10)(tls, (unsafe.Pointer)(_pMem.X5))
+ _pMem.XxDel(tls, unsafe.Pointer(_pMem.Xz))
}
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = _pMem.X6
+ _pMem.Xz = _pMem.XzMalloc
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) & i32(-7169))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) & int32(-7169))
}
- return i32(0)
+ return int32(0)
}
-// Check invariants on a Mem object.
-//
-// This routine is intended for use inside of assert() statements, like
-// this: assert( sqlite3VdbeCheckMemInvariants(pMem) );
+// C comment
+// /*
+// ** Check invariants on a Mem object.
+// **
+// ** This routine is intended for use inside of assert() statements, like
+// ** this: assert( sqlite3VdbeCheckMemInvariants(pMem) );
+// */
func _sqlite3VdbeCheckMemInvariants(tls *crt.TLS, _p *XMem) (r0 int32) {
func() {
- if (int32(_p.X1)&i32(1024)) != i32(0) && *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_p.X10)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{nil})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69733), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000))), unsafe.Pointer(str(4954)))
+ if (int32(_p.Xflags)&int32(1024)) != int32(0) && _p.XxDel == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69733), unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000), unsafe.Pointer(str(4855)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_p.X1)&i32(1024)) != i32(0) && (_p.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69739), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000))), unsafe.Pointer(str(4992)))
+ if (int32(_p.Xflags)&int32(1024)) != int32(0) && _p.XszMalloc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69739), unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000), unsafe.Pointer(str(4893)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_p.X1) & i32(12)) == i32(12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69742), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000))), unsafe.Pointer(str(5034)))
+ if (int32(_p.Xflags) & int32(12)) == int32(12) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69742), unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000), unsafe.Pointer(str(4935)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_p.X1)&i32(1)) != i32(0) && (int32(_p.X1)&i32(30)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69745), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000))), unsafe.Pointer(str(5086)))
+ if (int32(_p.Xflags)&int32(1)) != int32(0) && (int32(_p.Xflags)&int32(30)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69745), unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000), unsafe.Pointer(str(4987)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X7) != i32(0) && (_p.X7) != _sqlite3DbMallocSize(tls, (*Xsqlite3)(_p.X9), (unsafe.Pointer)(_p.X6)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69749), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000))), unsafe.Pointer(str(5166)))
+ if _p.XszMalloc != int32(0) && _p.XszMalloc != _sqlite3DbMallocSize(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_p.XzMalloc)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69749), unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000), unsafe.Pointer(str(5067)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_p.X1)&i32(18)) != 0 && ((_p.X4) > i32(0)) {
+ if (int32(_p.Xflags)&int32(18)) != 0 && (_p.Xn > int32(0)) {
func() {
if (((func() int32 {
- if ((_p.X7) > i32(0)) && ((_p.X5) == (_p.X6)) {
- return i32(1)
+ if (_p.XszMalloc > int32(0)) && (_p.Xz == _p.XzMalloc) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}() + func() int32 {
- if (int32(_p.X1) & i32(1024)) != i32(0) {
- return i32(1)
+ if (int32(_p.Xflags) & int32(1024)) != int32(0) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}()) + func() int32 {
- if (int32(_p.X1) & i32(4096)) != i32(0) {
- return i32(1)
+ if (int32(_p.Xflags) & int32(4096)) != int32(0) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}()) + func() int32 {
- if (int32(_p.X1) & i32(2048)) != i32(0) {
- return i32(1)
+ if (int32(_p.Xflags) & int32(2048)) != int32(0) {
+ return int32(1)
}
- return i32(0)
- }()) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69761), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000))), unsafe.Pointer(str(5235)))
+ return int32(0)
+ }()) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69761), unsafe.Pointer(&_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000), unsafe.Pointer(str(5136)))
crt.X__builtin_abort(tls)
}
}()
}
- return i32(1)
+ return int32(1)
}
var _sqlite3VdbeCheckMemInvariantsØ00__func__Ø000 [30]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000[0], str(5392), 30)
+ crt.Xstrncpy(nil, &_sqlite3VdbeCheckMemInvariantsØ00__func__Ø000[0], str(5293), 30)
}
var _sqlite3VdbeMemGrowØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemGrowØ00__func__Ø000[0], str(5422), 19)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemGrowØ00__func__Ø000[0], str(5323), 19)
}
-// Attempt to reallocate p. If the reallocation fails, then free p
-// and set the mallocFailed flag in the database connection.
+// C comment
+// /*
+// ** Attempt to reallocate p. If the reallocation fails, then free p
+// ** and set the mallocFailed flag in the database connection.
+// */
func _sqlite3DbReallocOrFree(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer, _n uint64) (r0 unsafe.Pointer) {
var _pNew unsafe.Pointer
_pNew = _sqlite3DbRealloc(tls, _db, _p, _n)
@@ -5593,26 +5633,29 @@ func _sqlite3DbReallocOrFree(tls *crt.TLS, _db *Xsqlite3, _p unsafe.Pointer, _n
return _pNew
}
-// Allocate memory, either lookaside (if possible) or heap.
-// If the allocation fails, set the mallocFailed flag in
-// the connection pointer.
-//
-// If db!=0 and db->mallocFailed is true (indicating a prior malloc
-// failure on the same database connection) then always return 0.
-// Hence for a particular database connection, once malloc starts
-// failing, it fails consistently until mallocFailed is reset.
-// This is an important assumption. There are many places in the
-// code that do things like this:
-//
-// int *a = (int*)sqlite3DbMallocRaw(db, 100);
-// int *b = (int*)sqlite3DbMallocRaw(db, 200);
-// if( b ) a[10] = 9;
-//
-// In other words, if a subsequent malloc (ex: "b") worked, it is assumed
-// that all prior mallocs (ex: "a") worked too.
-//
-// The sqlite3MallocRawNN() variant guarantees that the "db" parameter is
-// not a NULL pointer.
+// C comment
+// /*
+// ** Allocate memory, either lookaside (if possible) or heap.
+// ** If the allocation fails, set the mallocFailed flag in
+// ** the connection pointer.
+// **
+// ** If db!=0 and db->mallocFailed is true (indicating a prior malloc
+// ** failure on the same database connection) then always return 0.
+// ** Hence for a particular database connection, once malloc starts
+// ** failing, it fails consistently until mallocFailed is reset.
+// ** This is an important assumption. There are many places in the
+// ** code that do things like this:
+// **
+// ** int *a = (int*)sqlite3DbMallocRaw(db, 100);
+// ** int *b = (int*)sqlite3DbMallocRaw(db, 200);
+// ** if( b ) a[10] = 9;
+// **
+// ** In other words, if a subsequent malloc (ex: "b") worked, it is assumed
+// ** that all prior mallocs (ex: "a") worked too.
+// **
+// ** The sqlite3MallocRawNN() variant guarantees that the "db" parameter is
+// ** not a NULL pointer.
+// */
func _sqlite3DbMallocRaw(tls *crt.TLS, _db *Xsqlite3, _n uint64) (r0 unsafe.Pointer) {
var _p unsafe.Pointer
if _db != nil {
@@ -5622,245 +5665,252 @@ func _sqlite3DbMallocRaw(tls *crt.TLS, _db *Xsqlite3, _n uint64) (r0 unsafe.Poin
return _p
}
-// Delete any previous value and set the value stored in *pMem to NULL.
-//
-// This routine calls the Mem.xDel destructor to dispose of values that
-// require the destructor. But it preserves the Mem.zMalloc memory allocation.
-// To free all resources, use sqlite3VdbeMemRelease(), which both calls this
-// routine to invoke the destructor and deallocates Mem.zMalloc.
-//
-// Use this routine to reset the Mem prior to insert a new value.
-//
-// Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it.
+// C comment
+// /*
+// ** Delete any previous value and set the value stored in *pMem to NULL.
+// **
+// ** This routine calls the Mem.xDel destructor to dispose of values that
+// ** require the destructor. But it preserves the Mem.zMalloc memory allocation.
+// ** To free all resources, use sqlite3VdbeMemRelease(), which both calls this
+// ** routine to invoke the destructor and deallocates Mem.zMalloc.
+// **
+// ** Use this routine to reset the Mem prior to insert a new value.
+// **
+// ** Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it.
+// */
func _sqlite3VdbeMemSetNull(tls *crt.TLS, _pMem *XMem) {
- if (int32(_pMem.X1) & i32(9312)) != i32(0) {
+ if (int32(_pMem.Xflags) & int32(9312)) != int32(0) {
_vdbeMemClearExternAndSetNull(tls, _pMem)
goto _1
}
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(1))
+ _pMem.Xflags = uint16(1)
_1:
}
-// If the memory cell contains a value that must be freed by
-// invoking the external callback in Mem.xDel, then this routine
-// will free that value. It also sets Mem.flags to MEM_Null.
-//
-// This is a helper routine for sqlite3VdbeMemSetNull() and
-// for sqlite3VdbeMemRelease(). Use those other routines as the
-// entry point for releasing Mem resources.
+// C comment
+// /*
+// ** If the memory cell contains a value that must be freed by
+// ** invoking the external callback in Mem.xDel, then this routine
+// ** will free that value. It also sets Mem.flags to MEM_Null.
+// **
+// ** This is a helper routine for sqlite3VdbeMemSetNull() and
+// ** for sqlite3VdbeMemRelease(). Use those other routines as the
+// ** entry point for releasing Mem resources.
+// */
func _vdbeMemClearExternAndSetNull(tls *crt.TLS, _p *XMem) {
var _4_pFrame *XVdbeFrame
func() {
- if (*Xsqlite3)(_p.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70064), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000))), unsafe.Pointer(str(5441)))
+ if (*Xsqlite3)(_p.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70064), unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000), unsafe.Pointer(str(5342)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_p.X1) & i32(9312)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70065), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000))), unsafe.Pointer(str(5486)))
+ if (int32(_p.Xflags) & int32(9312)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70065), unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000), unsafe.Pointer(str(5387)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_p.X1) & i32(8192)) != 0 {
- _sqlite3VdbeMemFinalize(tls, _p, (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_p.X0)))))))
+ if (int32(_p.Xflags) & int32(8192)) != 0 {
+ _sqlite3VdbeMemFinalize(tls, _p, (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xu))))
func() {
- if (int32(_p.X1) & i32(8192)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70068), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000))), unsafe.Pointer(str(5504)))
+ if (int32(_p.Xflags) & int32(8192)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70068), unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000), unsafe.Pointer(str(5405)))
crt.X__builtin_abort(tls)
}
}()
}
- if (int32(_p.X1) & i32(1024)) != 0 {
+ if (int32(_p.Xflags) & int32(1024)) != 0 {
func() {
- if (int32(_p.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70072), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000))), unsafe.Pointer(str(5528)))
+ if (int32(_p.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70072), unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000), unsafe.Pointer(str(5429)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_p.X10)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))})) || *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{(_p.X10)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_p.XxDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{nil})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70073), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000))), unsafe.Pointer(str(5553)))
+ }{func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()})) || _p.XxDel == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70073), unsafe.Pointer(&_vdbeMemClearExternAndSetNullØ00__func__Ø000), unsafe.Pointer(str(5454)))
crt.X__builtin_abort(tls)
}
}()
- (_p.X10)(tls, (unsafe.Pointer)(_p.X5))
+ _p.XxDel(tls, unsafe.Pointer(_p.Xz))
goto _17
}
- if (int32(_p.X1) & i32(32)) != 0 {
- _sqlite3RowSetClear(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_p.X0)))))))
+ if (int32(_p.Xflags) & int32(32)) != 0 {
+ _sqlite3RowSetClear(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xu))))
goto _17
}
- if (int32(_p.X1) & i32(64)) != 0 {
- _4_pFrame = (*XVdbeFrame)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_p.X0))))))
- *(**XVdbeFrame)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_4_pFrame.X1))))) = (*XVdbeFrame)((*TVdbe)(_4_pFrame.X0).X39)
- *(**XVdbeFrame)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TVdbe)(_4_pFrame.X0).X39))))) = _4_pFrame
+ if (int32(_p.Xflags) & int32(64)) != 0 {
+ _4_pFrame = (*XVdbeFrame)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))
+ *(**XVdbeFrame)(unsafe.Pointer(&_4_pFrame.XpParent)) = (*XVdbeFrame)((*TVdbe)(_4_pFrame.Xv).XpDelFrame)
+ *(**XVdbeFrame)(unsafe.Pointer(&((*TVdbe)(_4_pFrame.Xv).XpDelFrame))) = _4_pFrame
}
_17:
- *(*uint16)(unsafe.Pointer(&(_p.X1))) = uint16(i32(1))
+ _p.Xflags = uint16(1)
}
var _vdbeMemClearExternAndSetNullØ00__func__Ø000 [29]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeMemClearExternAndSetNullØ00__func__Ø000[0], str(5591), 29)
+ crt.Xstrncpy(nil, &_vdbeMemClearExternAndSetNullØ00__func__Ø000[0], str(5492), 29)
}
-// Memory cell pMem contains the context of an aggregate function.
-// This routine calls the finalize method for that function. The
-// result of the aggregate is stored back into pMem.
-//
-// Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK
-// otherwise.
+// C comment
+// /*
+// ** Memory cell pMem contains the context of an aggregate function.
+// ** This routine calls the finalize method for that function. The
+// ** result of the aggregate is stored back into pMem.
+// **
+// ** Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK
+// ** otherwise.
+// */
func _sqlite3VdbeMemFinalize(tls *crt.TLS, _pMem *XMem, _pFunc *XFuncDef) (r0 int32) {
var _rc int32
var _1_ctx Xsqlite3_context
var _1_t XMem
- _rc = i32(0)
+ _rc = int32(0)
if func() int32 {
- if (_pFunc != nil) && ((*(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_pFunc.X5)}))) != nil) {
- return i32(1)
+ if (_pFunc != nil) && (_pFunc.XxFinalize != nil) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70033), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemFinalizeØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70033), unsafe.Pointer(&_sqlite3VdbeMemFinalizeØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _3
}
func() {
- if (int32(_pMem.X1)&i32(1)) == i32(0) && _pFunc != (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70036), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemFinalizeØ00__func__Ø000))), unsafe.Pointer(str(5620)))
+ if (int32(_pMem.Xflags)&int32(1)) == int32(0) && _pFunc != (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer(&_pMem.Xu))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70036), unsafe.Pointer(&_sqlite3VdbeMemFinalizeØ00__func__Ø000), unsafe.Pointer(str(5521)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70037), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemFinalizeØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70037), unsafe.Pointer(&_sqlite3VdbeMemFinalizeØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, (unsafe.Pointer)(&_1_ctx), i32(0), u32(32))
- crt.Xmemset(tls, (unsafe.Pointer)(&_1_t), i32(0), u32(48))
- *(*uint16)(unsafe.Pointer(&(_1_t.X1))) = uint16(i32(1))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_t.X9))))) = (*Xsqlite3)(_pMem.X9)
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_ctx.X0))))) = &_1_t
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_ctx.X2))))) = _pMem
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_ctx.X1))))) = _pFunc
- (*(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_pFunc.X5)})))(tls, &_1_ctx)
+ crt.Xmemset(tls, unsafe.Pointer(&_1_ctx), int32(0), uint32(32))
+ crt.Xmemset(tls, unsafe.Pointer(&_1_t), int32(0), uint32(48))
+ _1_t.Xflags = uint16(1)
+ *(**Xsqlite3)(unsafe.Pointer(&_1_t.Xdb)) = (*Xsqlite3)(_pMem.Xdb)
+ *(**XMem)(unsafe.Pointer(&_1_ctx.XpOut)) = &_1_t
+ *(**XMem)(unsafe.Pointer(&_1_ctx.XpMem)) = _pMem
+ *(**XFuncDef)(unsafe.Pointer(&_1_ctx.XpFunc)) = _pFunc
+ func() func(*crt.TLS, *Xsqlite3_context) {
+ v := _pFunc.XxFinalize
+ return *(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&v))
+ }()(tls, &_1_ctx)
func() {
- if (int32(_pMem.X1) & i32(1024)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70046), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemFinalizeØ00__func__Ø000))), unsafe.Pointer(str(5671)))
+ if (int32(_pMem.Xflags) & int32(1024)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70046), unsafe.Pointer(&_sqlite3VdbeMemFinalizeØ00__func__Ø000), unsafe.Pointer(str(5572)))
crt.X__builtin_abort(tls)
}
}()
- if (_pMem.X7) > i32(0) {
- _sqlite3DbFreeNN(tls, (*Xsqlite3)(_pMem.X9), (unsafe.Pointer)(_pMem.X6))
+ if _pMem.XszMalloc > int32(0) {
+ _sqlite3DbFreeNN(tls, (*Xsqlite3)(_pMem.Xdb), unsafe.Pointer(_pMem.XzMalloc))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pMem), (unsafe.Pointer)(&_1_t), u32(48))
- _rc = _1_ctx.X5
+ crt.Xmemcpy(tls, unsafe.Pointer(_pMem), unsafe.Pointer(&_1_t), uint32(48))
+ _rc = _1_ctx.XisError
_3:
return _rc
-
- _ = _1_ctx
- _ = _1_t
- panic(0)
}
var _sqlite3VdbeMemFinalizeØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemFinalizeØ00__func__Ø000[0], str(5698), 23)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemFinalizeØ00__func__Ø000[0], str(5599), 23)
}
-// Deallocate all chunks from a RowSet. This frees all memory that
-// the RowSet has allocated over its lifetime. This routine is
-// the destructor for the RowSet.
+// C comment
+// /*
+// ** Deallocate all chunks from a RowSet. This frees all memory that
+// ** the RowSet has allocated over its lifetime. This routine is
+// ** the destructor for the RowSet.
+// */
func _sqlite3RowSetClear(tls *crt.TLS, _p *XRowSet) {
var _pChunk, _pNextChunk *TRowSetChunk
- _pChunk = (*TRowSetChunk)(_p.X0)
+ _pChunk = (*TRowSetChunk)(_p.XpChunk)
_0:
if _pChunk == nil {
goto _3
}
- _pNextChunk = (*TRowSetChunk)(_pChunk.X0)
- _sqlite3DbFree(tls, (*Xsqlite3)(_p.X1), (unsafe.Pointer)(_pChunk))
+ _pNextChunk = (*TRowSetChunk)(_pChunk.XpNextChunk)
+ _sqlite3DbFree(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_pChunk))
_pChunk = _pNextChunk
goto _0
_3:
- *(**TRowSetChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = nil
- *(*uint16)(unsafe.Pointer(&(_p.X6))) = uint16(i32(0))
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = nil
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3))))) = nil
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X5))))) = nil
- *(*uint16)(unsafe.Pointer(&(_p.X7))) = uint16(i32(1))
-}
-
-// If pMem is an object with a valid string representation, this routine
-// ensures the internal encoding for the string representation is
-// 'desiredEnc', one of SQLITE_UTF8, SQLITE_UTF16LE or SQLITE_UTF16BE.
-//
-// If pMem is not a string object, or the encoding of the string
-// representation is already stored using the requested encoding, then this
-// routine is a no-op.
-//
-// SQLITE_OK is returned if the conversion is successful (or not required).
-// SQLITE_NOMEM may be returned if a malloc() fails during conversion
-// between formats.
+ *(**TRowSetChunk)(unsafe.Pointer(&_p.XpChunk)) = nil
+ _p.XnFresh = 0
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpEntry)) = nil
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpLast)) = nil
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpForest)) = nil
+ _p.XrsFlags = uint16(1)
+}
+
+// C comment
+// /*
+// ** If pMem is an object with a valid string representation, this routine
+// ** ensures the internal encoding for the string representation is
+// ** 'desiredEnc', one of SQLITE_UTF8, SQLITE_UTF16LE or SQLITE_UTF16BE.
+// **
+// ** If pMem is not a string object, or the encoding of the string
+// ** representation is already stored using the requested encoding, then this
+// ** routine is a no-op.
+// **
+// ** SQLITE_OK is returned if the conversion is successful (or not required).
+// ** SQLITE_NOMEM may be returned if a malloc() fails during conversion
+// ** between formats.
+// */
func _sqlite3VdbeChangeEncoding(tls *crt.TLS, _pMem *XMem, _desiredEnc int32) (r0 int32) {
var _rc int32
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69790), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000))), unsafe.Pointer(str(4639)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69790), unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000), unsafe.Pointer(str(4540)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _desiredEnc != i32(1) && _desiredEnc != i32(2) && _desiredEnc != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69791), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000))), unsafe.Pointer(str(5721)))
+ if _desiredEnc != int32(1) && _desiredEnc != int32(2) && _desiredEnc != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69791), unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000), unsafe.Pointer(str(5622)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_pMem.X1) & i32(2)) == 0) || (int32(_pMem.X2) == _desiredEnc) {
- return i32(0)
+ if ((int32(_pMem.Xflags) & int32(2)) == 0) || (int32(_pMem.Xenc) == _desiredEnc) {
+ return int32(0)
}
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69796), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69796), unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
_rc = _sqlite3VdbeMemTranslate(tls, _pMem, uint8(_desiredEnc))
func() {
- if _rc != i32(0) && _rc != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69805), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000))), unsafe.Pointer(str(5805)))
+ if _rc != int32(0) && _rc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69805), unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000), unsafe.Pointer(str(5706)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc != i32(0) && int32(_pMem.X2) == _desiredEnc {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69806), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000))), unsafe.Pointer(str(5839)))
+ if _rc != int32(0) && int32(_pMem.Xenc) == _desiredEnc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69806), unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000), unsafe.Pointer(str(5740)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc != i32(7) && int32(_pMem.X2) != _desiredEnc {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69807), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000))), unsafe.Pointer(str(5878)))
+ if _rc != int32(7) && int32(_pMem.Xenc) != _desiredEnc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69807), unsafe.Pointer(&_sqlite3VdbeChangeEncodingØ00__func__Ø000), unsafe.Pointer(str(5779)))
crt.X__builtin_abort(tls)
}
}()
@@ -5870,375 +5920,367 @@ func _sqlite3VdbeChangeEncoding(tls *crt.TLS, _pMem *XMem, _desiredEnc int32) (r
var _sqlite3VdbeChangeEncodingØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeChangeEncodingØ00__func__Ø000[0], str(5920), 26)
+ crt.Xstrncpy(nil, &_sqlite3VdbeChangeEncodingØ00__func__Ø000[0], str(5821), 26)
}
-// This routine transforms the internal text encoding used by pMem to
-// desiredEnc. It is an error if the string is already of the desired
-// encoding, or if *pMem does not contain a string value.
+// C comment
+// /*
+// ** This routine transforms the internal text encoding used by pMem to
+// ** desiredEnc. It is an error if the string is already of the desired
+// ** encoding, or if *pMem does not contain a string value.
+// */
func _sqlite3VdbeMemTranslate(tls *crt.TLS, _pMem *XMem, _desiredEnc uint8) (r0 int32) {
var _len, _1_rc, _28_c2, _37_c2 int32
var _c uint32
var _1_temp uint8
var _zOut, _zIn, _zTerm, _z *uint8
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27333), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27333), unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27334), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000))), unsafe.Pointer(str(5946)))
+ if (int32(_pMem.Xflags) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27334), unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000), unsafe.Pointer(str(5847)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pMem.X2) == int32(_desiredEnc) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27335), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000))), unsafe.Pointer(str(5966)))
+ if int32(_pMem.Xenc) == int32(_desiredEnc) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27335), unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000), unsafe.Pointer(str(5867)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pMem.X2) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27336), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000))), unsafe.Pointer(str(5988)))
+ if int32(_pMem.Xenc) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27336), unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000), unsafe.Pointer(str(5889)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pMem.X4) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27337), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000))), unsafe.Pointer(str(6001)))
+ if _pMem.Xn < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27337), unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000), unsafe.Pointer(str(5902)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pMem.X2) == i32(1) || int32(_desiredEnc) == i32(1) {
+ if int32(_pMem.Xenc) == int32(1) || int32(_desiredEnc) == int32(1) {
goto _12
}
_1_rc = _sqlite3VdbeMemMakeWriteable(tls, _pMem)
- if _1_rc != i32(0) {
+ if _1_rc != int32(0) {
func() {
- if _1_rc != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27356), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000))), unsafe.Pointer(str(6012)))
+ if _1_rc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27356), unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000), unsafe.Pointer(str(5913)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3NomemError(tls, i32(27357))
+ return _sqlite3NomemError(tls, int32(27357))
}
- _zIn = (*uint8)(unsafe.Pointer(_pMem.X5))
- _zTerm = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIn)) + 1*uintptr((_pMem.X4)&i32(-2))))
+ _zIn = (*uint8)(unsafe.Pointer(_pMem.Xz))
+ _zTerm = elem15(_zIn, uintptr(_pMem.Xn&int32(-2)))
_16:
- if uintptr(unsafe.Pointer(_zIn)) < uintptr(unsafe.Pointer(_zTerm)) {
+ if crt.P2U(unsafe.Pointer(_zIn)) < crt.P2U(unsafe.Pointer(_zTerm)) {
_1_temp = *_zIn
- *_zIn = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zIn)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(1))))))))
+ *_zIn = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zIn)) + uintptr(int32(1))))
*(*uintptr)(unsafe.Pointer(&_zIn)) += uintptr(1)
- *postInc13(&_zIn, 1) = _1_temp
+ *postInc15(&_zIn, 1) = _1_temp
goto _16
}
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = _desiredEnc
+ _pMem.Xenc = _desiredEnc
goto _translate_out
_12:
- if int32(_desiredEnc) == i32(1) {
- {
- p := (*int32)(unsafe.Pointer(&(_pMem.X4)))
- *p = (*p) & i32(-2)
- sink1(*p)
- }
- _len = ((_pMem.X4) * i32(2)) + i32(1)
+ if int32(_desiredEnc) == int32(1) {
+ _pMem.Xn &= int32(-2)
+ _len = (_pMem.Xn * int32(2)) + int32(1)
goto _19
}
- _len = ((_pMem.X4) * i32(2)) + i32(2)
+ _len = (_pMem.Xn * int32(2)) + int32(2)
_19:
- _zIn = (*uint8)(unsafe.Pointer(_pMem.X5))
- _zTerm = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIn)) + 1*uintptr(_pMem.X4)))
- _zOut = (*uint8)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_pMem.X9), uint64(_len)))
+ _zIn = (*uint8)(unsafe.Pointer(_pMem.Xz))
+ _zTerm = elem15(_zIn, uintptr(_pMem.Xn))
+ _zOut = (*uint8)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_pMem.Xdb), uint64(_len)))
if _zOut == nil {
- return _sqlite3NomemError(tls, i32(27399))
+ return _sqlite3NomemError(tls, int32(27399))
}
_z = _zOut
- if int32(_pMem.X2) != i32(1) {
+ if int32(_pMem.Xenc) != int32(1) {
goto _21
}
- if int32(_desiredEnc) != i32(2) {
+ if int32(_desiredEnc) != int32(2) {
goto _22
}
_23:
- if uintptr(unsafe.Pointer(_zIn)) >= uintptr(unsafe.Pointer(_zTerm)) {
+ if crt.P2U(unsafe.Pointer(_zIn)) >= crt.P2U(unsafe.Pointer(_zTerm)) {
goto _24
}
- _c = uint32(*postInc13(&_zIn, 1))
- if _c < uint32(i32(192)) {
+ _c = uint32(*postInc15(&_zIn, 1))
+ if _c < uint32(192) {
goto _25
}
- _c = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3Utf8Trans1)) + 1*uintptr(_c-uint32(i32(192))))))
+ _c = uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3Utf8Trans1)), uintptr(_c-uint32(192))))
_26:
- if (_zIn != _zTerm) && ((int32(*_zIn) & i32(192)) == i32(128)) {
- _c = (_c << uint(i32(6))) + uint32(i32(63)&int32(*postInc13(&_zIn, 1)))
+ if (_zIn != _zTerm) && ((int32(*_zIn) & int32(192)) == int32(128)) {
+ _c = (_c << 6) + uint32(int32(63)&int32(*postInc15(&_zIn, 1)))
goto _26
}
- if ((_c < uint32(i32(128))) || ((_c & u32(4294965248)) == uint32(i32(55296)))) || ((_c & u32(4294967294)) == uint32(i32(65534))) {
- _c = uint32(i32(65533))
+ if ((_c < uint32(128)) || ((_c & uint32(4294965248)) == uint32(55296))) || ((_c & uint32(4294967294)) == uint32(65534)) {
+ _c = uint32(65533)
}
_25:
- if _c <= uint32(i32(65535)) {
- *postInc13(&_z, 1) = uint8(_c & uint32(i32(255)))
- *postInc13(&_z, 1) = uint8((_c >> uint(i32(8))) & uint32(i32(255)))
+ if _c <= uint32(65535) {
+ *postInc15(&_z, 1) = uint8(_c & uint32(255))
+ *postInc15(&_z, 1) = uint8((_c >> 8) & uint32(255))
goto _33
}
- *postInc13(&_z, 1) = uint8(((_c >> uint(i32(10))) & uint32(i32(63))) + (((_c - uint32(i32(65536))) >> uint(i32(10))) & uint32(i32(192))))
- *postInc13(&_z, 1) = uint8(uint32(i32(216)) + (((_c - uint32(i32(65536))) >> uint(i32(18))) & uint32(i32(3))))
- *postInc13(&_z, 1) = uint8(_c & uint32(i32(255)))
- *postInc13(&_z, 1) = uint8(uint32(i32(220)) + ((_c >> uint(i32(8))) & uint32(i32(3))))
+ *postInc15(&_z, 1) = uint8(((_c >> 10) & uint32(63)) + (((_c - uint32(65536)) >> 10) & uint32(192)))
+ *postInc15(&_z, 1) = uint8(uint32(216) + (((_c - uint32(65536)) >> 18) & uint32(3)))
+ *postInc15(&_z, 1) = uint8(_c & uint32(255))
+ *postInc15(&_z, 1) = uint8(uint32(220) + ((_c >> 8) & uint32(3)))
_33:
goto _23
_24:
goto _34
_22:
func() {
- if int32(_desiredEnc) != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27411), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000))), unsafe.Pointer(str(6029)))
+ if int32(_desiredEnc) != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27411), unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000), unsafe.Pointer(str(5930)))
crt.X__builtin_abort(tls)
}
}()
_37:
- if uintptr(unsafe.Pointer(_zIn)) >= uintptr(unsafe.Pointer(_zTerm)) {
+ if crt.P2U(unsafe.Pointer(_zIn)) >= crt.P2U(unsafe.Pointer(_zTerm)) {
goto _38
}
- _c = uint32(*postInc13(&_zIn, 1))
- if _c < uint32(i32(192)) {
+ _c = uint32(*postInc15(&_zIn, 1))
+ if _c < uint32(192) {
goto _39
}
- _c = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3Utf8Trans1)) + 1*uintptr(_c-uint32(i32(192))))))
+ _c = uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3Utf8Trans1)), uintptr(_c-uint32(192))))
_40:
- if (_zIn != _zTerm) && ((int32(*_zIn) & i32(192)) == i32(128)) {
- _c = (_c << uint(i32(6))) + uint32(i32(63)&int32(*postInc13(&_zIn, 1)))
+ if (_zIn != _zTerm) && ((int32(*_zIn) & int32(192)) == int32(128)) {
+ _c = (_c << 6) + uint32(int32(63)&int32(*postInc15(&_zIn, 1)))
goto _40
}
- if ((_c < uint32(i32(128))) || ((_c & u32(4294965248)) == uint32(i32(55296)))) || ((_c & u32(4294967294)) == uint32(i32(65534))) {
- _c = uint32(i32(65533))
+ if ((_c < uint32(128)) || ((_c & uint32(4294965248)) == uint32(55296))) || ((_c & uint32(4294967294)) == uint32(65534)) {
+ _c = uint32(65533)
}
_39:
- if _c <= uint32(i32(65535)) {
- *postInc13(&_z, 1) = uint8((_c >> uint(i32(8))) & uint32(i32(255)))
- *postInc13(&_z, 1) = uint8(_c & uint32(i32(255)))
+ if _c <= uint32(65535) {
+ *postInc15(&_z, 1) = uint8((_c >> 8) & uint32(255))
+ *postInc15(&_z, 1) = uint8(_c & uint32(255))
goto _47
}
- *postInc13(&_z, 1) = uint8(uint32(i32(216)) + (((_c - uint32(i32(65536))) >> uint(i32(18))) & uint32(i32(3))))
- *postInc13(&_z, 1) = uint8(((_c >> uint(i32(10))) & uint32(i32(63))) + (((_c - uint32(i32(65536))) >> uint(i32(10))) & uint32(i32(192))))
- *postInc13(&_z, 1) = uint8(uint32(i32(220)) + ((_c >> uint(i32(8))) & uint32(i32(3))))
- *postInc13(&_z, 1) = uint8(_c & uint32(i32(255)))
+ *postInc15(&_z, 1) = uint8(uint32(216) + (((_c - uint32(65536)) >> 18) & uint32(3)))
+ *postInc15(&_z, 1) = uint8(((_c >> 10) & uint32(63)) + (((_c - uint32(65536)) >> 10) & uint32(192)))
+ *postInc15(&_z, 1) = uint8(uint32(220) + ((_c >> 8) & uint32(3)))
+ *postInc15(&_z, 1) = uint8(_c & uint32(255))
_47:
goto _37
_38:
_34:
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = int32((uintptr(unsafe.Pointer(_z)) - uintptr(unsafe.Pointer(_zOut))) / 1)
- *postInc13(&_z, 1) = uint8(i32(0))
+ _pMem.Xn = int32(uintptr(unsafe.Pointer(_z)) - uintptr(unsafe.Pointer(_zOut)))
+ *postInc15(&_z, 1) = 0
goto _48
_21:
func() {
- if int32(_desiredEnc) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27421), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000))), unsafe.Pointer(str(6056)))
+ if int32(_desiredEnc) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27421), unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000), unsafe.Pointer(str(5957)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pMem.X2) != i32(2) {
+ if int32(_pMem.Xenc) != int32(2) {
goto _51
}
_52:
- if uintptr(unsafe.Pointer(_zIn)) >= uintptr(unsafe.Pointer(_zTerm)) {
+ if crt.P2U(unsafe.Pointer(_zIn)) >= crt.P2U(unsafe.Pointer(_zTerm)) {
goto _53
}
- _c = uint32(*postInc13(&_zIn, 1))
- {
- p := &_c
- *p = (*p) + uint32(int32(*postInc13(&_zIn, 1))<<uint(i32(8)))
- sink5(*p)
- }
- if ((_c >= uint32(i32(55296))) && (_c < uint32(i32(57344)))) && (uintptr(unsafe.Pointer(_zIn)) < uintptr(unsafe.Pointer(_zTerm))) {
- _28_c2 = int32(*postInc13(&_zIn, 1))
- {
- p := &_28_c2
- *p = (*p) + (int32(*postInc13(&_zIn, 1)) << uint(i32(8)))
- sink1(*p)
- }
- _c = (uint32(_28_c2&i32(1023)) + ((_c & uint32(i32(63))) << uint(i32(10)))) + (((_c & uint32(i32(960))) + uint32(i32(64))) << uint(i32(10)))
+ _c = uint32(*postInc15(&_zIn, 1))
+ _c += uint32(int32(*postInc15(&_zIn, 1)) << 8)
+ if ((_c >= uint32(55296)) && (_c < uint32(57344))) && (crt.P2U(unsafe.Pointer(_zIn)) < crt.P2U(unsafe.Pointer(_zTerm))) {
+ _28_c2 = int32(*postInc15(&_zIn, 1))
+ _28_c2 += int32(*postInc15(&_zIn, 1)) << 8
+ _c = (uint32(_28_c2&int32(1023)) + ((_c & uint32(63)) << 10)) + (((_c & uint32(960)) + uint32(64)) << 10)
}
- if _c < uint32(i32(128)) {
- *postInc13(&_z, 1) = uint8(_c & uint32(i32(255)))
+ if _c < uint32(128) {
+ *postInc15(&_z, 1) = uint8(_c & uint32(255))
goto _62
}
- if _c < uint32(i32(2048)) {
- *postInc13(&_z, 1) = uint8(i32(192) + int32(uint8((_c>>uint(i32(6)))&uint32(i32(31)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8(_c&uint32(i32(63)))))
+ if _c < uint32(2048) {
+ *postInc15(&_z, 1) = uint8(int32(192) + int32(uint8((_c>>6)&uint32(31))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8(_c&uint32(63))))
goto _62
}
- if _c < uint32(i32(65536)) {
- *postInc13(&_z, 1) = uint8(i32(224) + int32(uint8((_c>>uint(i32(12)))&uint32(i32(15)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8((_c>>uint(i32(6)))&uint32(i32(63)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8(_c&uint32(i32(63)))))
+ if _c < uint32(65536) {
+ *postInc15(&_z, 1) = uint8(int32(224) + int32(uint8((_c>>12)&uint32(15))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8((_c>>6)&uint32(63))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8(_c&uint32(63))))
goto _62
}
- *postInc13(&_z, 1) = uint8(i32(240) + int32(uint8((_c>>uint(i32(18)))&uint32(i32(7)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8((_c>>uint(i32(12)))&uint32(i32(63)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8((_c>>uint(i32(6)))&uint32(i32(63)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8(_c&uint32(i32(63)))))
+ *postInc15(&_z, 1) = uint8(int32(240) + int32(uint8((_c>>18)&uint32(7))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8((_c>>12)&uint32(63))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8((_c>>6)&uint32(63))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8(_c&uint32(63))))
_62:
goto _52
_53:
goto _63
_51:
_64:
- if uintptr(unsafe.Pointer(_zIn)) >= uintptr(unsafe.Pointer(_zTerm)) {
+ if crt.P2U(unsafe.Pointer(_zIn)) >= crt.P2U(unsafe.Pointer(_zTerm)) {
goto _65
}
- _c = uint32(int32(*postInc13(&_zIn, 1)) << uint(i32(8)))
- {
- p := &_c
- *p = (*p) + uint32(*postInc13(&_zIn, 1))
- sink5(*p)
+ _c = uint32(int32(*postInc15(&_zIn, 1)) << 8)
+ _c += uint32(*postInc15(&_zIn, 1))
+ if ((_c >= uint32(55296)) && (_c < uint32(57344))) && (crt.P2U(unsafe.Pointer(_zIn)) < crt.P2U(unsafe.Pointer(_zTerm))) {
+ _37_c2 = int32(*postInc15(&_zIn, 1)) << 8
+ _37_c2 += int32(*postInc15(&_zIn, 1))
+ _c = (uint32(_37_c2&int32(1023)) + ((_c & uint32(63)) << 10)) + (((_c & uint32(960)) + uint32(64)) << 10)
}
- if ((_c >= uint32(i32(55296))) && (_c < uint32(i32(57344)))) && (uintptr(unsafe.Pointer(_zIn)) < uintptr(unsafe.Pointer(_zTerm))) {
- _37_c2 = int32(*postInc13(&_zIn, 1)) << uint(i32(8))
- {
- p := &_37_c2
- *p = (*p) + int32(*postInc13(&_zIn, 1))
- sink1(*p)
- }
- _c = (uint32(_37_c2&i32(1023)) + ((_c & uint32(i32(63))) << uint(i32(10)))) + (((_c & uint32(i32(960))) + uint32(i32(64))) << uint(i32(10)))
- }
- if _c < uint32(i32(128)) {
- *postInc13(&_z, 1) = uint8(_c & uint32(i32(255)))
+ if _c < uint32(128) {
+ *postInc15(&_z, 1) = uint8(_c & uint32(255))
goto _74
}
- if _c < uint32(i32(2048)) {
- *postInc13(&_z, 1) = uint8(i32(192) + int32(uint8((_c>>uint(i32(6)))&uint32(i32(31)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8(_c&uint32(i32(63)))))
+ if _c < uint32(2048) {
+ *postInc15(&_z, 1) = uint8(int32(192) + int32(uint8((_c>>6)&uint32(31))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8(_c&uint32(63))))
goto _74
}
- if _c < uint32(i32(65536)) {
- *postInc13(&_z, 1) = uint8(i32(224) + int32(uint8((_c>>uint(i32(12)))&uint32(i32(15)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8((_c>>uint(i32(6)))&uint32(i32(63)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8(_c&uint32(i32(63)))))
+ if _c < uint32(65536) {
+ *postInc15(&_z, 1) = uint8(int32(224) + int32(uint8((_c>>12)&uint32(15))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8((_c>>6)&uint32(63))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8(_c&uint32(63))))
goto _74
}
- *postInc13(&_z, 1) = uint8(i32(240) + int32(uint8((_c>>uint(i32(18)))&uint32(i32(7)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8((_c>>uint(i32(12)))&uint32(i32(63)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8((_c>>uint(i32(6)))&uint32(i32(63)))))
- *postInc13(&_z, 1) = uint8(i32(128) + int32(uint8(_c&uint32(i32(63)))))
+ *postInc15(&_z, 1) = uint8(int32(240) + int32(uint8((_c>>18)&uint32(7))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8((_c>>12)&uint32(63))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8((_c>>6)&uint32(63))))
+ *postInc15(&_z, 1) = uint8(int32(128) + int32(uint8(_c&uint32(63))))
_74:
goto _64
_65:
_63:
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = int32((uintptr(unsafe.Pointer(_z)) - uintptr(unsafe.Pointer(_zOut))) / 1)
+ _pMem.Xn = int32(uintptr(unsafe.Pointer(_z)) - uintptr(unsafe.Pointer(_zOut)))
_48:
- *_z = uint8(i32(0))
+ *_z = 0
func() {
- if ((_pMem.X4) + func() int32 {
- if int32(_desiredEnc) == i32(1) {
- return i32(1)
+ if (_pMem.Xn + func() int32 {
+ if int32(_desiredEnc) == int32(1) {
+ return int32(1)
}
- return i32(2)
+ return int32(2)
}()) > _len {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27438), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000))), unsafe.Pointer(str(6080)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27438), unsafe.Pointer(&_sqlite3VdbeMemTranslateØ00__func__Ø000), unsafe.Pointer(str(5981)))
crt.X__builtin_abort(tls)
}
}()
- _c = uint32(_pMem.X1)
+ _c = uint32(_pMem.Xflags)
_sqlite3VdbeMemRelease(tls, _pMem)
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(uint32(i32(514)) | (_c & uint32(i32(32799))))
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = _desiredEnc
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = (*int8)(unsafe.Pointer(_zOut))
- *(**int8)(unsafe.Pointer(&(_pMem.X6))) = _pMem.X5
- *(*int32)(unsafe.Pointer(&(_pMem.X7))) = _sqlite3DbMallocSize(tls, (*Xsqlite3)(_pMem.X9), (unsafe.Pointer)(_pMem.X5))
+ _pMem.Xflags = uint16(uint32(514) | (_c & uint32(32799)))
+ _pMem.Xenc = _desiredEnc
+ _pMem.Xz = (*int8)(unsafe.Pointer(_zOut))
+ _pMem.XzMalloc = _pMem.Xz
+ _pMem.XszMalloc = _sqlite3DbMallocSize(tls, (*Xsqlite3)(_pMem.Xdb), unsafe.Pointer(_pMem.Xz))
_translate_out:
- return i32(0)
+ return int32(0)
}
var _sqlite3VdbeMemTranslateØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemTranslateØ00__func__Ø000[0], str(6125), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemTranslateØ00__func__Ø000[0], str(6026), 24)
}
-// Change pMem so that its MEM_Str or MEM_Blob value is stored in
-// MEM.zMalloc, where it can be safely written.
-//
-// Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.
+// C comment
+// /*
+// ** Change pMem so that its MEM_Str or MEM_Blob value is stored in
+// ** MEM.zMalloc, where it can be safely written.
+// **
+// ** Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.
+// */
func _sqlite3VdbeMemMakeWriteable(tls *crt.TLS, _pMem *XMem) (r0 int32) {
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69895), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemMakeWriteableØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69895), unsafe.Pointer(&_sqlite3VdbeMemMakeWriteableØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69896), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemMakeWriteableØ00__func__Ø000))), unsafe.Pointer(str(4639)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69896), unsafe.Pointer(&_sqlite3VdbeMemMakeWriteableØ00__func__Ø000), unsafe.Pointer(str(4540)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pMem.X1) & i32(18)) == i32(0) {
+ if (int32(_pMem.Xflags) & int32(18)) == int32(0) {
goto _5
}
if func() int32 {
- if (int32(_pMem.X1) & i32(16384)) != 0 {
+ if (int32(_pMem.Xflags) & int32(16384)) != 0 {
return _sqlite3VdbeMemExpandBlob(tls, _pMem)
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return i32(7)
+ return int32(7)
}
- if (_pMem.X7) != i32(0) && (_pMem.X5) == (_pMem.X6) {
+ if _pMem.XszMalloc != int32(0) && _pMem.Xz == _pMem.XzMalloc {
goto _10
}
- if _sqlite3VdbeMemGrow(tls, _pMem, (_pMem.X4)+i32(2), i32(1)) != 0 {
- return _sqlite3NomemError(tls, i32(69901))
+ if _sqlite3VdbeMemGrow(tls, _pMem, _pMem.Xn+int32(2), int32(1)) != 0 {
+ return _sqlite3NomemError(tls, int32(69901))
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr(_pMem.X4))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr((_pMem.X4)+i32(1)))) = int8(i32(0))
+ *elem1(_pMem.Xz, uintptr(_pMem.Xn)) = 0
+ *elem1(_pMem.Xz, uintptr(_pMem.Xn+int32(1))) = 0
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) | i32(512))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) | int32(512))
}
_10:
_5:
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) & i32(-4097))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) & int32(-4097))
}
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMem.X11))))) = nil
- return i32(0)
+ *(**XMem)(unsafe.Pointer(&_pMem.XpScopyFrom)) = nil
+ return int32(0)
}
var _sqlite3VdbeMemMakeWriteableØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemMakeWriteableØ00__func__Ø000[0], str(6149), 28)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemMakeWriteableØ00__func__Ø000[0], str(6050), 28)
}
+// C comment
+// /*
+// ** This lookup table is used to help decode the first byte of
+// ** a multi-byte UTF8 character.
+// */
var _sqlite3Utf8Trans1 [64]uint8
func init() {
_sqlite3Utf8Trans1 = [64]uint8{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 0, 1, 0, 0}
}
-// Release any memory resources held by the Mem. Both the memory that is
-// free by Mem.xDel and the Mem.zMalloc allocation are freed.
-//
-// Use this routine prior to clean up prior to abandoning a Mem, or to
-// reset a Mem back to its minimum memory utilization.
-//
-// Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space
-// prior to inserting new content into the Mem.
+// C comment
+// /*
+// ** Release any memory resources held by the Mem. Both the memory that is
+// ** free by Mem.xDel and the Mem.zMalloc allocation are freed.
+// **
+// ** Use this routine prior to clean up prior to abandoning a Mem, or to
+// ** reset a Mem back to its minimum memory utilization.
+// **
+// ** Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space
+// ** prior to inserting new content into the Mem.
+// */
func _sqlite3VdbeMemRelease(tls *crt.TLS, _p *XMem) {
func() {
if _sqlite3VdbeCheckMemInvariants(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70115), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemReleaseØ00__func__Ø000))), unsafe.Pointer(str(6177)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70115), unsafe.Pointer(&_sqlite3VdbeMemReleaseØ00__func__Ø000), unsafe.Pointer(str(6078)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_p.X1) & i32(9312)) != i32(0)) || (_p.X7) != 0 {
+ if ((int32(_p.Xflags) & int32(9312)) != int32(0)) || _p.XszMalloc != 0 {
_vdbeMemClear(tls, _p)
}
}
@@ -6246,36 +6288,42 @@ func _sqlite3VdbeMemRelease(tls *crt.TLS, _p *XMem) {
var _sqlite3VdbeMemReleaseØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemReleaseØ00__func__Ø000[0], str(6210), 22)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemReleaseØ00__func__Ø000[0], str(6111), 22)
}
-// Release memory held by the Mem p, both external memory cleared
-// by p->xDel and memory in p->zMalloc.
-//
-// This is a helper routine invoked by sqlite3VdbeMemRelease() in
-// the unusual case where there really is memory in p that needs
-// to be freed.
+// C comment
+// /*
+// ** Release memory held by the Mem p, both external memory cleared
+// ** by p->xDel and memory in p->zMalloc.
+// **
+// ** This is a helper routine invoked by sqlite3VdbeMemRelease() in
+// ** the unusual case where there really is memory in p that needs
+// ** to be freed.
+// */
func _vdbeMemClear(tls *crt.TLS, _p *XMem) {
- if (int32(_p.X1) & i32(9312)) != i32(0) {
+ if (int32(_p.Xflags) & int32(9312)) != int32(0) {
_vdbeMemClearExternAndSetNull(tls, _p)
}
- if (_p.X7) != 0 {
- _sqlite3DbFreeNN(tls, (*Xsqlite3)(_p.X9), (unsafe.Pointer)(_p.X6))
- *(*int32)(unsafe.Pointer(&(_p.X7))) = i32(0)
+ if _p.XszMalloc != 0 {
+ _sqlite3DbFreeNN(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_p.XzMalloc))
+ _p.XszMalloc = int32(0)
}
- *(**int8)(unsafe.Pointer(&(_p.X5))) = nil
+ _p.Xz = nil
}
-// Make sure the given Mem is \u0000 terminated.
+// C comment
+// /*
+// ** Make sure the given Mem is \u0000 terminated.
+// */
func _sqlite3VdbeMemNulTerminate(tls *crt.TLS, _pMem *XMem) (r0 int32) {
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69962), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemNulTerminateØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69962), unsafe.Pointer(&_sqlite3VdbeMemNulTerminateØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pMem.X1) & i32(514)) != i32(2) {
- return i32(0)
+ if (int32(_pMem.Xflags) & int32(514)) != int32(2) {
+ return int32(0)
}
return _vdbeMemAddTerminator(tls, _pMem)
}
@@ -6283,163 +6331,168 @@ func _sqlite3VdbeMemNulTerminate(tls *crt.TLS, _pMem *XMem) (r0 int32) {
var _sqlite3VdbeMemNulTerminateØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemNulTerminateØ00__func__Ø000[0], str(6232), 27)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemNulTerminateØ00__func__Ø000[0], str(6133), 27)
}
-// It is already known that pMem contains an unterminated string.
-// Add the zero terminator.
+// C comment
+// /*
+// ** It is already known that pMem contains an unterminated string.
+// ** Add the zero terminator.
+// */
func _vdbeMemAddTerminator(tls *crt.TLS, _pMem *XMem) (r0 int32) {
- if _sqlite3VdbeMemGrow(tls, _pMem, (_pMem.X4)+i32(2), i32(1)) != 0 {
- return _sqlite3NomemError(tls, i32(69950))
- }
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr(_pMem.X4))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr((_pMem.X4)+i32(1)))) = int8(i32(0))
- {
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) | i32(512))
- sink14(*p)
- }
- return i32(0)
-}
-
-// Add MEM_Str to the set of representations for the given Mem. Numbers
-// are converted using sqlite3_snprintf(). Converting a BLOB to a string
-// is a no-op.
-//
-// Existing representations MEM_Int and MEM_Real are invalidated if
-// bForce is true but are retained if bForce is false.
-//
-// A MEM_Null value will never be passed to this function. This function is
-// used for converting values to text for returning to the user (i.e. via
-// sqlite3_value_text()), or for ensuring that values to be used as btree
-// keys are strings. In the former case a NULL pointer is returned the
-// user and the latter is an internal programming error.
+ if _sqlite3VdbeMemGrow(tls, _pMem, _pMem.Xn+int32(2), int32(1)) != 0 {
+ return _sqlite3NomemError(tls, int32(69950))
+ }
+ *elem1(_pMem.Xz, uintptr(_pMem.Xn)) = 0
+ *elem1(_pMem.Xz, uintptr(_pMem.Xn+int32(1))) = 0
+ {
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) | int32(512))
+ }
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Add MEM_Str to the set of representations for the given Mem. Numbers
+// ** are converted using sqlite3_snprintf(). Converting a BLOB to a string
+// ** is a no-op.
+// **
+// ** Existing representations MEM_Int and MEM_Real are invalidated if
+// ** bForce is true but are retained if bForce is false.
+// **
+// ** A MEM_Null value will never be passed to this function. This function is
+// ** used for converting values to text for returning to the user (i.e. via
+// ** sqlite3_value_text()), or for ensuring that values to be used as btree
+// ** keys are strings. In the former case a NULL pointer is returned the
+// ** user and the latter is an internal programming error.
+// */
func _sqlite3VdbeMemStringify(tls *crt.TLS, _pMem *XMem, _enc uint8, _bForce uint8) (r0 int32) {
var _fg, _nByte int32
- _fg = int32(_pMem.X1)
- _nByte = i32(32)
+ _fg = int32(_pMem.Xflags)
+ _nByte = int32(32)
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69990), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69990), unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_fg & i32(16384)) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69991), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000))), unsafe.Pointer(str(6259)))
+ if (_fg & int32(16384)) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69991), unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000), unsafe.Pointer(str(6160)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_fg & i32(18)) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69992), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000))), unsafe.Pointer(str(6274)))
+ if (_fg & int32(18)) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69992), unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000), unsafe.Pointer(str(6175)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_fg & i32(12)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69993), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000))), unsafe.Pointer(str(6299)))
+ if (_fg & int32(12)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69993), unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000), unsafe.Pointer(str(6200)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69994), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000))), unsafe.Pointer(str(4639)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69994), unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000), unsafe.Pointer(str(4540)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pMem))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69995), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000))), unsafe.Pointer(str(6321)))
+ if (int32(uintptr(unsafe.Pointer(_pMem))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69995), unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000), unsafe.Pointer(str(6222)))
crt.X__builtin_abort(tls)
}
}()
if _sqlite3VdbeMemClearAndResize(tls, _pMem, _nByte) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = uint8(i32(0))
- return _sqlite3NomemError(tls, i32(70000))
+ _pMem.Xenc = 0
+ return _sqlite3NomemError(tls, int32(70000))
}
- if (_fg & i32(4)) != 0 {
- Xsqlite3_snprintf(tls, _nByte, _pMem.X5, str(6348), *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
+ if (_fg & int32(4)) != 0 {
+ Xsqlite3_snprintf(tls, _nByte, _pMem.Xz, str(6249), *(*int64)(unsafe.Pointer(&_pMem.Xu)))
goto _15
}
func() {
- if (_fg & i32(8)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70012), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000))), unsafe.Pointer(str(6353)))
+ if (_fg & int32(8)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70012), unsafe.Pointer(&_sqlite3VdbeMemStringifyØ00__func__Ø000), unsafe.Pointer(str(6254)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_snprintf(tls, _nByte, _pMem.X5, str(6367), *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
+ Xsqlite3_snprintf(tls, _nByte, _pMem.Xz, str(6268), *(*float64)(unsafe.Pointer(&_pMem.Xu)))
_15:
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = _sqlite3Strlen30(tls, _pMem.X5)
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = uint8(i32(1))
+ _pMem.Xn = _sqlite3Strlen30(tls, _pMem.Xz)
+ _pMem.Xenc = uint8(1)
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) | i32(514))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) | int32(514))
}
if _bForce != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) & i32(-13))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) & int32(-13))
}
}
_sqlite3VdbeChangeEncoding(tls, _pMem, int32(_enc))
- return i32(0)
+ return int32(0)
}
var _sqlite3VdbeMemStringifyØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemStringifyØ00__func__Ø000[0], str(6374), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemStringifyØ00__func__Ø000[0], str(6275), 24)
}
-// Change the pMem->zMalloc allocation to be at least szNew bytes.
-// If pMem->zMalloc already meets or exceeds the requested size, this
-// routine is a no-op.
-//
-// Any prior string or blob content in the pMem object may be discarded.
-// The pMem->xDel destructor is called, if it exists. Though MEM_Str
-// and MEM_Blob values may be discarded, MEM_Int, MEM_Real, and MEM_Null
-// values are preserved.
-//
-// Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM)
-// if unable to complete the resizing.
+// C comment
+// /*
+// ** Change the pMem->zMalloc allocation to be at least szNew bytes.
+// ** If pMem->zMalloc already meets or exceeds the requested size, this
+// ** routine is a no-op.
+// **
+// ** Any prior string or blob content in the pMem object may be discarded.
+// ** The pMem->xDel destructor is called, if it exists. Though MEM_Str
+// ** and MEM_Blob values may be discarded, MEM_Int, MEM_Real, and MEM_Null
+// ** values are preserved.
+// **
+// ** Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM)
+// ** if unable to complete the resizing.
+// */
func _sqlite3VdbeMemClearAndResize(tls *crt.TLS, _pMem *XMem, _szNew int32) (r0 int32) {
func() {
- if _szNew <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69877), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemClearAndResizeØ00__func__Ø000))), unsafe.Pointer(str(6398)))
+ if _szNew <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69877), unsafe.Pointer(&_sqlite3VdbeMemClearAndResizeØ00__func__Ø000), unsafe.Pointer(str(6299)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1)&i32(1024)) != i32(0) && (_pMem.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69878), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemClearAndResizeØ00__func__Ø000))), unsafe.Pointer(str(6406)))
+ if (int32(_pMem.Xflags)&int32(1024)) != int32(0) && _pMem.XszMalloc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69878), unsafe.Pointer(&_sqlite3VdbeMemClearAndResizeØ00__func__Ø000), unsafe.Pointer(str(6307)))
crt.X__builtin_abort(tls)
}
}()
- if (_pMem.X7) < _szNew {
- return _sqlite3VdbeMemGrow(tls, _pMem, _szNew, i32(0))
+ if _pMem.XszMalloc < _szNew {
+ return _sqlite3VdbeMemGrow(tls, _pMem, _szNew, int32(0))
}
func() {
- if (int32(_pMem.X1) & i32(1024)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69882), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemClearAndResizeØ00__func__Ø000))), unsafe.Pointer(str(5671)))
+ if (int32(_pMem.Xflags) & int32(1024)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69882), unsafe.Pointer(&_sqlite3VdbeMemClearAndResizeØ00__func__Ø000), unsafe.Pointer(str(5572)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = _pMem.X6
+ _pMem.Xz = _pMem.XzMalloc
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) & i32(13))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) & int32(13))
}
- return i32(0)
+ return int32(0)
}
var _sqlite3VdbeMemClearAndResizeØ00__func__Ø000 [29]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemClearAndResizeØ00__func__Ø000[0], str(6454), 29)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemClearAndResizeØ00__func__Ø000[0], str(6355), 29)
}
func Xsqlite3_snprintf(tls *crt.TLS, _n int32, _zBuf *int8, _zFormat *int8, args ...interface{}) (r0 *int8) {
@@ -6451,187 +6504,193 @@ func Xsqlite3_snprintf(tls *crt.TLS, _n int32, _zBuf *int8, _zFormat *int8, args
return _z
}
-// sqlite3_snprintf() works like snprintf() except that it ignores the
-// current locale settings. This is important for SQLite because we
-// are not able to use a "," as the decimal point in place of "." as
-// specified by some locales.
-//
-// Oops: The first two arguments of sqlite3_snprintf() are backwards
-// from the snprintf() standard. Unfortunately, it is too late to change
-// this without breaking compatibility, so we just have to live with the
-// mistake.
-//
-// sqlite3_vsnprintf() is the varargs version.
+// C comment
+// /*
+// ** sqlite3_snprintf() works like snprintf() except that it ignores the
+// ** current locale settings. This is important for SQLite because we
+// ** are not able to use a "," as the decimal point in place of "." as
+// ** specified by some locales.
+// **
+// ** Oops: The first two arguments of sqlite3_snprintf() are backwards
+// ** from the snprintf() standard. Unfortunately, it is too late to change
+// ** this without breaking compatibility, so we just have to live with the
+// ** mistake.
+// **
+// ** sqlite3_vsnprintf() is the varargs version.
+// */
func Xsqlite3_vsnprintf(tls *crt.TLS, _n int32, _zBuf *int8, _zFormat *int8, _ap []interface{}) (r0 *int8) {
var _acc XStrAccum
- if _n <= i32(0) {
+ if _n <= int32(0) {
return _zBuf
}
if _zBuf != nil && _zFormat != nil {
goto _2
}
- _sqlite3MisuseError(tls, i32(26087))
+ _sqlite3MisuseError(tls, int32(26087))
if _zBuf != nil {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(i32(0)))) = int8(i32(0))
+ *elem1(_zBuf, 0) = 0
}
return _zBuf
_2:
- _sqlite3StrAccumInit(tls, &_acc, nil, _zBuf, _n, i32(0))
+ _sqlite3StrAccumInit(tls, &_acc, nil, _zBuf, _n, int32(0))
_sqlite3VXPrintf(tls, &_acc, _zFormat, _ap)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(_acc.X3))) = int8(i32(0))
+ *elem1(_zBuf, uintptr(_acc.XnChar)) = 0
return _zBuf
-
- _ = _acc
- panic(0)
}
-// Extract the user data from a sqlite3_context structure and return a
-// pointer to it.
-//
-// IMPLEMENTATION-OF: R-46798-50301 The sqlite3_context_db_handle() interface
-// returns a copy of the pointer to the database connection (the 1st
-// parameter) of the sqlite3_create_function() and
-// sqlite3_create_function16() routines that originally registered the
-// application defined function.
+// C comment
+// /*
+// ** Extract the user data from a sqlite3_context structure and return a
+// ** pointer to it.
+// **
+// ** IMPLEMENTATION-OF: R-46798-50301 The sqlite3_context_db_handle() interface
+// ** returns a copy of the pointer to the database connection (the 1st
+// ** parameter) of the sqlite3_create_function() and
+// ** sqlite3_create_function16() routines that originally registered the
+// ** application defined function.
+// */
func Xsqlite3_context_db_handle(tls *crt.TLS, _p *Xsqlite3_context) (r0 *Xsqlite3) {
func() {
- if _p == nil || (*XMem)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76814), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_context_db_handleØ00__func__Ø000))), unsafe.Pointer(str(6483)))
+ if _p == nil || _p.XpOut == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76814), unsafe.Pointer(&_sqlite3_context_db_handleØ00__func__Ø000), unsafe.Pointer(str(6384)))
crt.X__builtin_abort(tls)
}
}()
- return (*Xsqlite3)((*XMem)(_p.X0).X9)
+ return (*Xsqlite3)((*XMem)(_p.XpOut).Xdb)
}
var _sqlite3_context_db_handleØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_context_db_handleØ00__func__Ø000[0], str(6496), 26)
+ crt.Xstrncpy(nil, &_sqlite3_context_db_handleØ00__func__Ø000[0], str(6397), 26)
}
-// Return the length (in bytes) of the token that begins at z[0].
-// Store the token type in *tokenType before returning.
+// C comment
+// /*
+// ** Return the length (in bytes) of the token that begins at z[0].
+// ** Store the token type in *tokenType before returning.
+// */
func _sqlite3GetToken(tls *crt.TLS, _z *uint8, _tokenType *int32) (r0 int32) {
var _i, _c, _35_delim, _58_n int32
- switch int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiClass)) + 1*uintptr(*_z)))) {
- case i32(0):
+ switch int32(*elem15((*uint8)(unsafe.Pointer(&_aiClass)), uintptr(*_z))) {
+ case int32(0):
goto _26
- case i32(1):
+ case int32(1):
goto _25
- case i32(2):
+ case int32(2):
goto _27
- case i32(3):
+ case int32(3):
goto _20
- case i32(4):
+ case int32(4):
goto _23
- case i32(5):
+ case int32(5):
goto _23
- case i32(6):
+ case int32(6):
goto _22
- case i32(7):
+ case int32(7):
goto _1
- case i32(8):
+ case int32(8):
goto _18
- case i32(9):
+ case int32(9):
goto _21
- case i32(10):
+ case int32(10):
goto _14
- case i32(11):
+ case int32(11):
goto _2
- case i32(12):
+ case int32(12):
goto _11
- case i32(13):
+ case int32(13):
goto _12
- case i32(14):
+ case int32(14):
goto _10
- case i32(15):
+ case int32(15):
goto _13
- case i32(16):
+ case int32(16):
goto _8
- case i32(17):
+ case int32(17):
goto _3
- case i32(18):
+ case int32(18):
goto _4
- case i32(19):
+ case int32(19):
goto _5
- case i32(20):
+ case int32(20):
goto _6
- case i32(21):
+ case int32(21):
goto _7
- case i32(22):
+ case int32(22):
goto _9
- case i32(23):
+ case int32(23):
goto _15
- case i32(24):
+ case int32(24):
goto _16
- case i32(25):
+ case int32(25):
goto _17
- case i32(26):
+ case int32(26):
goto _19
default:
goto _28
}
_1:
- _i = i32(1)
+ _i = int32(1)
_29:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(1)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(1)) == 0 {
goto _32
}
_i += 1
goto _29
_32:
- *_tokenType = i32(163)
+ *_tokenType = int32(163)
return _i
_2:
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(45) {
+ if int32(*elem15(_z, uintptr(1))) != int32(45) {
goto _33
}
- _i = i32(2)
+ _i = int32(2)
_34:
- if store1(&_c, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))) == i32(0) || _c == i32(10) {
+ if store2(&_c, int32(*elem15(_z, uintptr(_i)))) == int32(0) || _c == int32(10) {
goto _38
}
_i += 1
goto _34
_38:
- *_tokenType = i32(163)
+ *_tokenType = int32(163)
return _i
_33:
- *_tokenType = i32(89)
- return i32(1)
+ *_tokenType = int32(89)
+ return int32(1)
_3:
- *_tokenType = i32(22)
- return i32(1)
+ *_tokenType = int32(22)
+ return int32(1)
_4:
- *_tokenType = i32(23)
- return i32(1)
+ *_tokenType = int32(23)
+ return int32(1)
_5:
- *_tokenType = i32(1)
- return i32(1)
+ *_tokenType = int32(1)
+ return int32(1)
_6:
- *_tokenType = i32(88)
- return i32(1)
+ *_tokenType = int32(88)
+ return int32(1)
_7:
- *_tokenType = i32(90)
- return i32(1)
+ *_tokenType = int32(90)
+ return int32(1)
_8:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(42)) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(2))))) == i32(0)) {
- *_tokenType = i32(91)
- return i32(1)
+ if (int32(*elem15(_z, uintptr(1))) != int32(42)) || (int32(*elem15(_z, uintptr(2))) == int32(0)) {
+ *_tokenType = int32(91)
+ return int32(1)
}
- *func() *int32 { _i = i32(3); return &_c }() = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(2)))))
+ *func() *int32 { _i = int32(3); return &_c }() = int32(*elem15(_z, uintptr(2)))
_41:
- if _c == i32(42) && int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) == i32(47) || store1(&_c, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))) == i32(0) {
+ if _c == int32(42) && int32(*elem15(_z, uintptr(_i))) == int32(47) || store2(&_c, int32(*elem15(_z, uintptr(_i)))) == int32(0) {
goto _46
}
_i += 1
@@ -6640,84 +6699,84 @@ _46:
if _c != 0 {
_i += 1
}
- *_tokenType = i32(163)
+ *_tokenType = int32(163)
return _i
_9:
- *_tokenType = i32(92)
- return i32(1)
+ *_tokenType = int32(92)
+ return int32(1)
_10:
- *_tokenType = i32(78)
- return i32(1) + bool2int(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) == i32(61))
+ *_tokenType = int32(78)
+ return int32(1) + bool2int(int32(*elem15(_z, uintptr(1))) == int32(61))
_11:
- if store1(&_c, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1)))))) == i32(61) {
- *_tokenType = i32(80)
- return i32(2)
+ if store2(&_c, int32(*elem15(_z, uintptr(1)))) == int32(61) {
+ *_tokenType = int32(80)
+ return int32(2)
}
- if _c == i32(62) {
- *_tokenType = i32(77)
- return i32(2)
+ if _c == int32(62) {
+ *_tokenType = int32(77)
+ return int32(2)
}
- if _c == i32(60) {
- *_tokenType = i32(86)
- return i32(2)
+ if _c == int32(60) {
+ *_tokenType = int32(86)
+ return int32(2)
}
- *_tokenType = i32(81)
- return i32(1)
+ *_tokenType = int32(81)
+ return int32(1)
_12:
- if store1(&_c, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1)))))) == i32(61) {
- *_tokenType = i32(82)
- return i32(2)
+ if store2(&_c, int32(*elem15(_z, uintptr(1)))) == int32(61) {
+ *_tokenType = int32(82)
+ return int32(2)
}
- if _c == i32(62) {
- *_tokenType = i32(87)
- return i32(2)
+ if _c == int32(62) {
+ *_tokenType = int32(87)
+ return int32(2)
}
- *_tokenType = i32(79)
- return i32(1)
+ *_tokenType = int32(79)
+ return int32(1)
_13:
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(61) {
- *_tokenType = i32(164)
- return i32(1)
+ if int32(*elem15(_z, uintptr(1))) != int32(61) {
+ *_tokenType = int32(164)
+ return int32(1)
}
- *_tokenType = i32(77)
- return i32(2)
+ *_tokenType = int32(77)
+ return int32(2)
_14:
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(124) {
- *_tokenType = i32(85)
- return i32(1)
+ if int32(*elem15(_z, uintptr(1))) != int32(124) {
+ *_tokenType = int32(85)
+ return int32(1)
}
- *_tokenType = i32(93)
- return i32(2)
+ *_tokenType = int32(93)
+ return int32(2)
_15:
- *_tokenType = i32(26)
- return i32(1)
+ *_tokenType = int32(26)
+ return int32(1)
_16:
- *_tokenType = i32(84)
- return i32(1)
+ *_tokenType = int32(84)
+ return int32(1)
_17:
- *_tokenType = i32(95)
- return i32(1)
+ *_tokenType = int32(95)
+ return int32(1)
_18:
- _35_delim = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0)))))
- _i = i32(1)
+ _35_delim = int32(*elem15(_z, 0))
+ _i = int32(1)
_62:
- if store1(&_c, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))) == i32(0) {
+ if store2(&_c, int32(*elem15(_z, uintptr(_i)))) == int32(0) {
goto _65
}
if _c != _35_delim {
goto _66
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i+i32(1))))) == _35_delim {
+ if int32(*elem15(_z, uintptr(_i+int32(1)))) == _35_delim {
_i += 1
goto _68
}
@@ -6727,30 +6786,30 @@ _66:
_i += 1
goto _62
_65:
- if _c == i32(39) {
- *_tokenType = i32(97)
- return _i + i32(1)
+ if _c == int32(39) {
+ *_tokenType = int32(97)
+ return _i + int32(1)
}
- if _c != i32(0) {
- *_tokenType = i32(27)
- return _i + i32(1)
+ if _c != int32(0) {
+ *_tokenType = int32(27)
+ return _i + int32(1)
}
- *_tokenType = i32(164)
+ *_tokenType = int32(164)
return _i
_19:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1)))))))) & i32(4)) == 0 {
- *_tokenType = i32(122)
- return i32(1)
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(1))))) & int32(4)) == 0 {
+ *_tokenType = int32(122)
+ return int32(1)
}
_20:
- *_tokenType = i32(134)
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(48) || int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(120) && int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(88) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(2))))))))&i32(8)) == 0 {
+ *_tokenType = int32(134)
+ if int32(*elem15(_z, 0)) != int32(48) || int32(*elem15(_z, uintptr(1))) != int32(120) && int32(*elem15(_z, uintptr(1))) != int32(88) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(2)))))&int32(8)) == 0 {
goto _77
}
- _i = i32(3)
+ _i = int32(3)
_78:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(8)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(8)) == 0 {
goto _81
}
_i += 1
@@ -6759,69 +6818,65 @@ _81:
return _i
_77:
- _i = i32(0)
+ _i = int32(0)
_82:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(4)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(4)) == 0 {
goto _85
}
_i += 1
goto _82
_85:
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) != i32(46) {
+ if int32(*elem15(_z, uintptr(_i))) != int32(46) {
goto _86
}
_i += 1
_87:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(4)) != 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(4)) != 0 {
_i += 1
goto _87
}
- *_tokenType = i32(132)
+ *_tokenType = int32(132)
_86:
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) != i32(101) && int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) != i32(69) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i+i32(1))))))))&i32(4)) == 0 && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i+i32(1))))) != i32(43) && int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i+i32(1))))) != i32(45) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i+i32(2))))))))&i32(4)) == 0) {
+ if int32(*elem15(_z, uintptr(_i))) != int32(101) && int32(*elem15(_z, uintptr(_i))) != int32(69) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i+int32(1))))))&int32(4)) == 0 && (int32(*elem15(_z, uintptr(_i+int32(1)))) != int32(43) && int32(*elem15(_z, uintptr(_i+int32(1)))) != int32(45) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i+int32(2))))))&int32(4)) == 0) {
goto _94
}
- {
- p := &_i
- *p = (*p) + i32(2)
- sink1(*p)
- }
+ _i += int32(2)
_95:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(4)) != 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(4)) != 0 {
_i += 1
goto _95
}
- *_tokenType = i32(132)
+ *_tokenType = int32(132)
_94:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(70)) != i32(0) {
- *_tokenType = i32(164)
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(70)) != int32(0) {
+ *_tokenType = int32(164)
_i += 1
goto _94
}
return _i
_21:
- *func() *int32 { _i = i32(1); return &_c }() = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0)))))
+ *func() *int32 { _i = int32(1); return &_c }() = int32(*elem15(_z, 0))
_99:
- if _c == i32(93) || store1(&_c, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))) == i32(0) {
+ if _c == int32(93) || store2(&_c, int32(*elem15(_z, uintptr(_i)))) == int32(0) {
goto _103
}
_i += 1
goto _99
_103:
*_tokenType = func() int32 {
- if _c == i32(93) {
- return i32(27)
+ if _c == int32(93) {
+ return int32(27)
}
- return i32(164)
+ return int32(164)
}()
return _i
_22:
- *_tokenType = i32(135)
- _i = i32(1)
+ *_tokenType = int32(135)
+ _i = int32(1)
_106:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(4)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(4)) == 0 {
goto _109
}
_i += 1
@@ -6830,34 +6885,34 @@ _109:
return _i
_23:
- _58_n = i32(0)
- *_tokenType = i32(135)
- _i = i32(1)
+ _58_n = int32(0)
+ *_tokenType = int32(135)
+ _i = int32(1)
_110:
- if store1(&_c, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))) == i32(0) {
+ if store2(&_c, int32(*elem15(_z, uintptr(_i)))) == int32(0) {
goto _113
}
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(_c))))) & i32(70)) != i32(0) {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(_c)))) & int32(70)) != int32(0) {
_58_n += 1
goto _126
}
- if _c != i32(40) || _58_n <= i32(0) {
+ if _c != int32(40) || _58_n <= int32(0) {
goto _117
}
_118:
_i += 1
- if ((store1(&_c, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))) != i32(0)) && ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(_c))))) & i32(1)) == 0)) && (_c != i32(41)) {
+ if ((store2(&_c, int32(*elem15(_z, uintptr(_i)))) != int32(0)) && ((int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(_c)))) & int32(1)) == 0)) && (_c != int32(41)) {
goto _118
}
- if _c == i32(41) {
+ if _c == int32(41) {
_i += 1
goto _122
}
- *_tokenType = i32(164)
+ *_tokenType = int32(164)
_122:
goto _113
_117:
- if (_c == i32(58)) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i+i32(1))))) == i32(58)) {
+ if (_c == int32(58)) && (int32(*elem15(_z, uintptr(_i+int32(1)))) == int32(58)) {
_i += 1
goto _126
}
@@ -6866,69 +6921,69 @@ _126:
_i += 1
goto _110
_113:
- if _58_n == i32(0) {
- *_tokenType = i32(164)
+ if _58_n == int32(0) {
+ *_tokenType = int32(164)
}
return _i
_25:
- _i = i32(1)
+ _i = int32(1)
_128:
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiClass)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) > i32(1) {
+ if int32(*elem15((*uint8)(unsafe.Pointer(&_aiClass)), uintptr(*elem15(_z, uintptr(_i))))) > int32(1) {
goto _131
}
_i += 1
goto _128
_131:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(70)) != i32(0) {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(70)) != int32(0) {
_i += 1
goto _133
}
- *_tokenType = i32(27)
+ *_tokenType = int32(27)
return _keywordCode(tls, (*int8)(unsafe.Pointer(_z)), _i, _tokenType)
_26:
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(39) {
+ if int32(*elem15(_z, uintptr(1))) != int32(39) {
goto _134
}
- *_tokenType = i32(133)
- _i = i32(2)
+ *_tokenType = int32(133)
+ _i = int32(2)
_135:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(8)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(8)) == 0 {
goto _138
}
_i += 1
goto _135
_138:
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) == i32(39) && (_i%i32(2)) == 0 {
+ if int32(*elem15(_z, uintptr(_i))) == int32(39) && (_i%int32(2)) == 0 {
goto _140
}
- *_tokenType = i32(164)
+ *_tokenType = int32(164)
_141:
- if ((*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) != 0) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) != i32(39)) {
+ if ((*elem15(_z, uintptr(_i))) != 0) && (int32(*elem15(_z, uintptr(_i))) != int32(39)) {
_i += 1
goto _141
}
_140:
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) != 0 {
+ if (*elem15(_z, uintptr(_i))) != 0 {
_i += 1
}
return _i
_134:
_27:
- _i = i32(1)
+ _i = int32(1)
goto _133
_28:
- *_tokenType = i32(164)
- return i32(1)
+ *_tokenType = int32(164)
+ return int32(1)
_133:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))))))) & i32(70)) != i32(0) {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_z, uintptr(_i))))) & int32(70)) != int32(0) {
_i += 1
goto _133
}
- *_tokenType = i32(27)
+ *_tokenType = int32(27)
return _i
}
@@ -6944,63 +6999,63 @@ func init() {
_sqlite3CtypeMap = [256]uint8{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 128, 0, 64, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 128, 0, 0, 0, 64, 128, 42, 42, 42, 42, 42, 42, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}
}
-// The sqlite3KeywordCode function looks up an identifier to determine if
-// it is a keyword. If it is a keyword, the token code of that keyword is
-// returned. If the input is not a keyword, TK_ID is returned.
-//
-// The implementation of this routine was generated by a program,
-// mkkeywordhash.c, located in the tool subdirectory of the distribution.
-// The output of the mkkeywordhash.c program is written into a file
-// named keywordhash.h and then included into this source file by
-// the #include below.
-
-// ************* Include keywordhash.h in the middle of tokenize.c ***********
-
-// ************* Begin file keywordhash.h ************************************
-
-// **** This file contains automatically generated code ******
-//
-// The code in this file has been automatically generated by
-//
-// sqlite/tool/mkkeywordhash.c
-//
-// The code in this file implements a function that determines whether
-// or not a given identifier is really an SQL keyword. The same thing
-// might be implemented more directly using a hand-written hash table.
-// But by using this automatically generated code, the size of the code
-// is substantially reduced. This is important for embedded applications
-// on platforms with limited memory.
-
-// Hash score: 182
+// C comment
+// /*
+// ** The sqlite3KeywordCode function looks up an identifier to determine if
+// ** it is a keyword. If it is a keyword, the token code of that keyword is
+// ** returned. If the input is not a keyword, TK_ID is returned.
+// **
+// ** The implementation of this routine was generated by a program,
+// ** mkkeywordhash.c, located in the tool subdirectory of the distribution.
+// ** The output of the mkkeywordhash.c program is written into a file
+// ** named keywordhash.h and then included into this source file by
+// ** the #include below.
+// */
+// /************** Include keywordhash.h in the middle of tokenize.c ************/
+// /************** Begin file keywordhash.h *************************************/
+// /***** This file contains automatically generated code ******
+// **
+// ** The code in this file has been automatically generated by
+// **
+// ** sqlite/tool/mkkeywordhash.c
+// **
+// ** The code in this file implements a function that determines whether
+// ** or not a given identifier is really an SQL keyword. The same thing
+// ** might be implemented more directly using a hand-written hash table.
+// ** But by using this automatically generated code, the size of the code
+// ** is substantially reduced. This is important for embedded applications
+// ** on platforms with limited memory.
+// */
+// /* Hash score: 182 */
func _keywordCode(tls *crt.TLS, _z *int8, _n int32, _pType *int32) (r0 int32) {
var _i, _j int32
var _zKW *int8
- if _n < i32(2) {
+ if _n < int32(2) {
goto _0
}
- _i = (((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))))))) * i32(4)) ^ (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n-i32(1))))))))) * i32(3))) ^ _n) % i32(127)
- _i = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_keywordCodeØ00aHashØ002)) + 1*uintptr(_i)))) - i32(1)
+ _i = (((int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(*elem1(_z, 0))))) * int32(4)) ^ (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(*elem1(_z, uintptr(_n-int32(1))))))) * int32(3))) ^ _n) % int32(127)
+ _i = int32(*elem15((*uint8)(unsafe.Pointer(&_keywordCodeØ00aHashØ002)), uintptr(_i))) - int32(1)
_1:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _4
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_keywordCodeØ00aLenØ004)) + 1*uintptr(_i)))) != _n {
+ if int32(*elem15((*uint8)(unsafe.Pointer(&_keywordCodeØ00aLenØ004)), uintptr(_i))) != _n {
goto _2
}
- _j = i32(0)
- _zKW = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_keywordCodeØ00zTextØ001)) + 1*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_keywordCodeØ00aOffsetØ005)) + 2*uintptr(_i))))))
+ _j = int32(0)
+ _zKW = elem1((*int8)(unsafe.Pointer(&_keywordCodeØ00zTextØ001)), uintptr(*elem20((*uint16)(unsafe.Pointer(&_keywordCodeØ00aOffsetØ005)), uintptr(_i))))
_6:
- if (_j < _n) && ((int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_j)))) & i32(-33)) == int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zKW)) + 1*uintptr(_j))))) {
+ if (_j < _n) && ((int32(*elem1(_z, uintptr(_j))) & int32(-33)) == int32(*elem1(_zKW, uintptr(_j)))) {
_j += 1
goto _6
}
if _j < _n {
goto _2
}
- *_pType = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_keywordCodeØ00aCodeØ006)) + 1*uintptr(_i))))
+ *_pType = int32(*elem15((*uint8)(unsafe.Pointer(&_keywordCodeØ00aCodeØ006)), uintptr(_i)))
goto _4
_2:
- _i = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_keywordCodeØ00aNextØ003)) + 1*uintptr(_i)))) - i32(1)
+ _i = int32(*elem15((*uint8)(unsafe.Pointer(&_keywordCodeØ00aNextØ003)), uintptr(_i))) - int32(1)
goto _1
_4:
_0:
@@ -7028,7 +7083,7 @@ func init() {
var _keywordCodeØ00aOffsetØ005 [124]uint16
func init() {
- _keywordCodeØ00aOffsetØ005 = [124]uint16{u16(0), u16(2), u16(2), u16(8), u16(9), u16(14), u16(16), u16(20), u16(23), u16(25), u16(25), u16(29), u16(33), u16(36), u16(41), u16(46), u16(48), u16(53), u16(54), u16(59), u16(62), u16(65), u16(67), u16(69), u16(78), u16(81), u16(86), u16(91), u16(95), u16(96), u16(101), u16(105), u16(109), u16(117), u16(122), u16(128), u16(136), u16(142), u16(152), u16(159), u16(162), u16(162), u16(165), u16(167), u16(167), u16(171), u16(176), u16(179), u16(184), u16(184), u16(188), u16(192), u16(199), u16(204), u16(209), u16(212), u16(218), u16(221), u16(225), u16(234), u16(240), u16(240), u16(240), u16(243), u16(246), u16(250), u16(251), u16(255), u16(261), u16(265), u16(272), u16(278), u16(290), u16(296), u16(305), u16(307), u16(313), u16(318), u16(320), u16(327), u16(332), u16(337), u16(343), u16(349), u16(354), u16(358), u16(361), u16(367), u16(371), u16(378), u16(380), u16(387), u16(389), u16(391), u16(400), u16(404), u16(410), u16(416), u16(424), u16(429), u16(429), u16(445), u16(452), u16(459), u16(460), u16(467), u16(471), u16(475), u16(479), u16(483), u16(486), u16(488), u16(490), u16(496), u16(500), u16(508), u16(513), u16(521), u16(524), u16(529), u16(534), u16(540), u16(544), u16(549)}
+ _keywordCodeØ00aOffsetØ005 = [124]uint16{uint16(0), uint16(2), uint16(2), uint16(8), uint16(9), uint16(14), uint16(16), uint16(20), uint16(23), uint16(25), uint16(25), uint16(29), uint16(33), uint16(36), uint16(41), uint16(46), uint16(48), uint16(53), uint16(54), uint16(59), uint16(62), uint16(65), uint16(67), uint16(69), uint16(78), uint16(81), uint16(86), uint16(91), uint16(95), uint16(96), uint16(101), uint16(105), uint16(109), uint16(117), uint16(122), uint16(128), uint16(136), uint16(142), uint16(152), uint16(159), uint16(162), uint16(162), uint16(165), uint16(167), uint16(167), uint16(171), uint16(176), uint16(179), uint16(184), uint16(184), uint16(188), uint16(192), uint16(199), uint16(204), uint16(209), uint16(212), uint16(218), uint16(221), uint16(225), uint16(234), uint16(240), uint16(240), uint16(240), uint16(243), uint16(246), uint16(250), uint16(251), uint16(255), uint16(261), uint16(265), uint16(272), uint16(278), uint16(290), uint16(296), uint16(305), uint16(307), uint16(313), uint16(318), uint16(320), uint16(327), uint16(332), uint16(337), uint16(343), uint16(349), uint16(354), uint16(358), uint16(361), uint16(367), uint16(371), uint16(378), uint16(380), uint16(387), uint16(389), uint16(391), uint16(400), uint16(404), uint16(410), uint16(416), uint16(424), uint16(429), uint16(429), uint16(445), uint16(452), uint16(459), uint16(460), uint16(467), uint16(471), uint16(475), uint16(479), uint16(483), uint16(486), uint16(488), uint16(490), uint16(496), uint16(500), uint16(508), uint16(513), uint16(521), uint16(524), uint16(529), uint16(534), uint16(540), uint16(544), uint16(549)}
}
var _keywordCodeØ00aCodeØ006 [124]uint8
@@ -7046,11 +7101,14 @@ func init() {
var _renameTableFuncØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_renameTableFuncØ00__func__Ø000[0], str(6522), 16)
+ crt.Xstrncpy(nil, &_renameTableFuncØ00__func__Ø000[0], str(6423), 16)
}
-// Print into memory obtained from sqliteMalloc(). Use the internal
-// %-conversion extensions.
+// C comment
+// /*
+// ** Print into memory obtained from sqliteMalloc(). Use the internal
+// ** %-conversion extensions.
+// */
func _sqlite3MPrintf(tls *crt.TLS, _db *Xsqlite3, _zFormat *int8, args ...interface{}) (r0 *int8) {
var _z *int8
var _ap []interface{}
@@ -7060,344 +7118,338 @@ func _sqlite3MPrintf(tls *crt.TLS, _db *Xsqlite3, _zFormat *int8, args ...interf
return _z
}
-// Print into memory obtained from sqliteMalloc(). Use the internal
-// %-conversion extensions.
+// C comment
+// /*
+// ** Print into memory obtained from sqliteMalloc(). Use the internal
+// ** %-conversion extensions.
+// */
func _sqlite3VMPrintf(tls *crt.TLS, _db *Xsqlite3, _zFormat *int8, _ap []interface{}) (r0 *int8) {
var _z *int8
var _acc XStrAccum
var _zBase [70]int8
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(26004), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VMPrintfØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(26004), unsafe.Pointer(&_sqlite3VMPrintfØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3StrAccumInit(tls, &_acc, _db, (*int8)(unsafe.Pointer(&_zBase)), int32(u32(70)), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0)))))
- *(*uint8)(unsafe.Pointer(&(_acc.X7))) = uint8(i32(1))
+ _sqlite3StrAccumInit(tls, &_acc, _db, (*int8)(unsafe.Pointer(&_zBase)), int32(70), *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0))
+ _acc.XprintfFlags = uint8(1)
_sqlite3VXPrintf(tls, &_acc, _zFormat, _ap)
_z = _sqlite3StrAccumFinish(tls, &_acc)
- if int32(_acc.X6) == i32(1) {
+ if int32(_acc.XaccError) == int32(1) {
_sqlite3OomFault(tls, _db)
}
return _z
_ = _zBase
- _ = _acc
panic(0)
}
var _sqlite3VMPrintfØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VMPrintfØ00__func__Ø000[0], str(6538), 16)
+ crt.Xstrncpy(nil, &_sqlite3VMPrintfØ00__func__Ø000[0], str(6439), 16)
}
func _sqlite3StrAccumFinish(tls *crt.TLS, _p *XStrAccum) (r0 *int8) {
- if (_p.X2) == nil {
+ if _p.XzText == nil {
goto _0
}
func() {
- if ((_p.X2) == (_p.X1)) != ((int32(_p.X7) & i32(4)) == i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25951), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StrAccumFinishØ00__func__Ø000))), unsafe.Pointer(str(6554)))
+ if (_p.XzText == _p.XzBase) != ((int32(_p.XprintfFlags) & int32(4)) == int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25951), unsafe.Pointer(&_sqlite3StrAccumFinishØ00__func__Ø000), unsafe.Pointer(str(6455)))
crt.X__builtin_abort(tls)
}
}()
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2)) + 1*uintptr(_p.X3))) = int8(i32(0))
- if ((_p.X5) > uint32(i32(0))) && ((int32(_p.X7) & i32(4)) == i32(0)) {
+ *elem1(_p.XzText, uintptr(_p.XnChar)) = 0
+ if (_p.XmxAlloc > (0)) && ((int32(_p.XprintfFlags) & int32(4)) == int32(0)) {
return _strAccumFinishRealloc(tls, _p)
}
_0:
- return _p.X2
+ return _p.XzText
}
var _sqlite3StrAccumFinishØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StrAccumFinishØ00__func__Ø000[0], str(6591), 22)
+ crt.Xstrncpy(nil, &_sqlite3StrAccumFinishØ00__func__Ø000[0], str(6492), 22)
}
-// Finish off a string by making sure it is zero-terminated.
-// Return a pointer to the resulting string. Return a NULL
-// pointer if any kind of error was encountered.
+// C comment
+// /*
+// ** Finish off a string by making sure it is zero-terminated.
+// ** Return a pointer to the resulting string. Return a NULL
+// ** pointer if any kind of error was encountered.
+// */
func _strAccumFinishRealloc(tls *crt.TLS, _p *XStrAccum) (r0 *int8) {
func() {
- if (_p.X5) <= uint32(i32(0)) || (int32(_p.X7)&i32(4)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25939), unsafe.Pointer((*int8)(unsafe.Pointer(&_strAccumFinishReallocØ00__func__Ø000))), unsafe.Pointer(str(6613)))
+ if _p.XmxAlloc <= (0) || (int32(_p.XprintfFlags)&int32(4)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25939), unsafe.Pointer(&_strAccumFinishReallocØ00__func__Ø000), unsafe.Pointer(str(6514)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&(_p.X2))) = (*int8)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_p.X0), uint64((_p.X3)+uint32(i32(1)))))
- if (_p.X2) != nil {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_p.X2), (unsafe.Pointer)(_p.X1), (_p.X3)+uint32(i32(1)))
+ _p.XzText = (*int8)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_p.Xdb), uint64(_p.XnChar+uint32(1))))
+ if _p.XzText != nil {
+ crt.Xmemcpy(tls, unsafe.Pointer(_p.XzText), unsafe.Pointer(_p.XzBase), _p.XnChar+uint32(1))
{
- p := (*uint8)(unsafe.Pointer(&(_p.X7)))
- *p = uint8(int32(*p) | i32(4))
- sink2(*p)
+ p := &_p.XprintfFlags
+ *p = uint8(int32(*p) | int32(4))
}
goto _4
}
- _setStrAccumError(tls, _p, uint8(i32(1)))
+ _setStrAccumError(tls, _p, uint8(1))
_4:
- return _p.X2
+ return _p.XzText
}
var _strAccumFinishReallocØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_strAccumFinishReallocØ00__func__Ø000[0], str(6644), 22)
+ crt.Xstrncpy(nil, &_strAccumFinishReallocØ00__func__Ø000[0], str(6545), 22)
}
func Xsqlite3_result_text(tls *crt.TLS, _pCtx *Xsqlite3_context, _z *int8, _n int32, _xDel func(*crt.TLS, unsafe.Pointer)) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76488), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_textØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76488), unsafe.Pointer(&_sqlite3_result_textØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _setResultStrOrError(tls, _pCtx, _z, _n, uint8(i32(1)), _xDel)
+ _setResultStrOrError(tls, _pCtx, _z, _n, uint8(1), _xDel)
}
var _sqlite3_result_textØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_textØ00__func__Ø000[0], str(6708), 20)
+ crt.Xstrncpy(nil, &_sqlite3_result_textØ00__func__Ø000[0], str(6609), 20)
}
-// *************************** sqlite3_result_ *******************************
-// The following routines are used by user-defined functions to specify
-// the function result.
-//
-// The setStrOrError() function calls sqlite3VdbeMemSetStr() to store the
-// result as a string or blob but if the string or blob is too large, it
-// then sets the error code to SQLITE_TOOBIG
-//
-// The invokeValueDestructor(P,X) routine invokes destructor function X()
-// on value P is not going to be used and need to be destroyed.
+// C comment
+// /**************************** sqlite3_result_ *******************************
+// ** The following routines are used by user-defined functions to specify
+// ** the function result.
+// **
+// ** The setStrOrError() function calls sqlite3VdbeMemSetStr() to store the
+// ** result as a string or blob but if the string or blob is too large, it
+// ** then sets the error code to SQLITE_TOOBIG
+// **
+// ** The invokeValueDestructor(P,X) routine invokes destructor function X()
+// ** on value P is not going to be used and need to be destroyed.
+// */
func _setResultStrOrError(tls *crt.TLS, _pCtx *Xsqlite3_context, _z *int8, _n int32, _enc uint8, _xDel func(*crt.TLS, unsafe.Pointer)) {
- if _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.X0), _z, _n, _enc, _xDel) == i32(18) {
+ if _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.XpOut), _z, _n, _enc, _xDel) == int32(18) {
Xsqlite3_result_error_toobig(tls, _pCtx)
}
}
-// Change the value of a Mem to be a string or a BLOB.
-//
-// The memory management strategy depends on the value of the xDel
-// parameter. If the value passed is SQLITE_TRANSIENT, then the
-// string is copied into a (possibly existing) buffer managed by the
-// Mem structure. Otherwise, any existing buffer is freed and the
-// pointer copied.
-//
-// If the string is too large (if it exceeds the SQLITE_LIMIT_LENGTH
-// size limit) then no memory allocation occurs. If the string can be
-// stored without allocating memory, then it is. If a memory allocation
-// is required to store the string, then value of pMem is unchanged. In
-// either case, SQLITE_TOOBIG is returned.
+// C comment
+// /*
+// ** Change the value of a Mem to be a string or a BLOB.
+// **
+// ** The memory management strategy depends on the value of the xDel
+// ** parameter. If the value passed is SQLITE_TRANSIENT, then the
+// ** string is copied into a (possibly existing) buffer managed by the
+// ** Mem structure. Otherwise, any existing buffer is freed and the
+// ** pointer copied.
+// **
+// ** If the string is too large (if it exceeds the SQLITE_LIMIT_LENGTH
+// ** size limit) then no memory allocation occurs. If the string can be
+// ** stored without allocating memory, then it is. If a memory allocation
+// ** is required to store the string, then value of pMem is unchanged. In
+// ** either case, SQLITE_TOOBIG is returned.
+// */
func _sqlite3VdbeMemSetStr(tls *crt.TLS, _pMem *XMem, _z *int8, _n int32, _enc uint8, _xDel func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
var _nByte, _iLimit, _8_nAlloc int32
var _flags uint16
_nByte = _n
- _flags = u16(0)
+ _flags = uint16(0)
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70571), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemSetStrØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70571), unsafe.Pointer(&_sqlite3VdbeMemSetStrØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70572), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemSetStrØ00__func__Ø000))), unsafe.Pointer(str(6728)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70572), unsafe.Pointer(&_sqlite3VdbeMemSetStrØ00__func__Ø000), unsafe.Pointer(str(6629)))
crt.X__builtin_abort(tls)
}
}()
if _z == nil {
_sqlite3VdbeMemSetNull(tls, _pMem)
- return i32(0)
+ return int32(0)
}
- if (*Xsqlite3)(_pMem.X9) != nil {
- _iLimit = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_pMem.X9).X31))))) + 4*uintptr(i32(0))))
+ if _pMem.Xdb != nil {
+ _iLimit = *elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_pMem.Xdb).XaLimit))), 0)
goto _7
}
- _iLimit = i32(1000000000)
+ _iLimit = int32(1000000000)
_7:
_flags = uint16(func() int32 {
- if int32(_enc) == i32(0) {
- return i32(16)
+ if int32(_enc) == int32(0) {
+ return int32(16)
}
- return i32(2)
+ return int32(2)
}())
- if _nByte >= i32(0) {
+ if _nByte >= int32(0) {
goto _10
}
func() {
- if int32(_enc) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70587), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemSetStrØ00__func__Ø000))), unsafe.Pointer(str(6758)))
+ if int32(_enc) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70587), unsafe.Pointer(&_sqlite3VdbeMemSetStrØ00__func__Ø000), unsafe.Pointer(str(6659)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_enc) != i32(1) {
+ if int32(_enc) != int32(1) {
goto _13
}
_nByte = _sqlite3Strlen30(tls, _z)
if _nByte > _iLimit {
- _nByte = _iLimit + i32(1)
+ _nByte = _iLimit + int32(1)
}
goto _15
_13:
- _nByte = i32(0)
+ _nByte = int32(0)
_16:
- if _nByte > _iLimit || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_nByte))))|int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_nByte+i32(1)))))) == 0 {
+ if _nByte > _iLimit || (int32(*elem1(_z, uintptr(_nByte)))|int32(*elem1(_z, uintptr(_nByte+int32(1))))) == 0 {
goto _20
}
- {
- p := &_nByte
- *p = (*p) + i32(2)
- sink1(*p)
- }
+ _nByte += int32(2)
goto _16
_20:
_15:
{
p := &_flags
- *p = uint16(int32(*p) | i32(512))
- sink14(*p)
+ *p = uint16(int32(*p) | int32(512))
}
_10:
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) != *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
}{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))})) {
goto _21
}
_8_nAlloc = _nByte
- if (int32(_flags) & i32(512)) != 0 {
- {
- p := &_8_nAlloc
- *p = (*p) + func() int32 {
- if int32(_enc) == i32(1) {
- return i32(1)
- }
- return i32(2)
- }()
- sink1(*p)
- }
+ if (int32(_flags) & int32(512)) != 0 {
+ _8_nAlloc += func() int32 {
+ if int32(_enc) == int32(1) {
+ return int32(1)
+ }
+ return int32(2)
+ }()
}
if _nByte > _iLimit {
- return i32(18)
+ return int32(18)
}
if _sqlite3VdbeMemClearAndResize(tls, _pMem, func() int32 {
- if _8_nAlloc > i32(32) {
+ if _8_nAlloc > int32(32) {
return _8_nAlloc
}
- return i32(32)
+ return int32(32)
}()) != 0 {
- return _sqlite3NomemError(tls, i32(70613))
+ return _sqlite3NomemError(tls, int32(70613))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pMem.X5), (unsafe.Pointer)(_z), uint32(_8_nAlloc))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pMem.Xz), unsafe.Pointer(_z), uint32(_8_nAlloc))
goto _31
_21:
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))})) {
+ }{func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()})) {
_sqlite3VdbeMemRelease(tls, _pMem)
- *(**int8)(unsafe.Pointer(&(_pMem.X6))) = store0((**int8)(unsafe.Pointer(&(_pMem.X5))), _z)
- *(*int32)(unsafe.Pointer(&(_pMem.X7))) = _sqlite3DbMallocSize(tls, (*Xsqlite3)(_pMem.X9), (unsafe.Pointer)(_pMem.X6))
+ _pMem.XzMalloc = store1(&_pMem.Xz, _z)
+ _pMem.XszMalloc = _sqlite3DbMallocSize(tls, (*Xsqlite3)(_pMem.Xdb), unsafe.Pointer(_pMem.XzMalloc))
goto _31
}
_sqlite3VdbeMemRelease(tls, _pMem)
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = _z
- *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_pMem.X10))) = _xDel
+ _pMem.Xz = _z
+ _pMem.XxDel = _xDel
{
p := &_flags
*p = uint16(int32(*p) | func() int32 {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{nil})) {
- return i32(2048)
+ if _xDel == nil {
+ return int32(2048)
}
- return i32(1024)
+ return int32(1024)
}())
- sink14(*p)
}
_31:
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = _nByte
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = _flags
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = uint8(func() int32 {
- if int32(_enc) == i32(0) {
- return i32(1)
+ _pMem.Xn = _nByte
+ _pMem.Xflags = _flags
+ _pMem.Xenc = uint8(func() int32 {
+ if int32(_enc) == int32(0) {
+ return int32(1)
}
return int32(_enc)
}())
- if (int32(_pMem.X2) != i32(1)) && _sqlite3VdbeMemHandleBom(tls, _pMem) != 0 {
- return _sqlite3NomemError(tls, i32(70633))
+ if (int32(_pMem.Xenc) != int32(1)) && _sqlite3VdbeMemHandleBom(tls, _pMem) != 0 {
+ return _sqlite3NomemError(tls, int32(70633))
}
if _nByte > _iLimit {
- return i32(18)
+ return int32(18)
}
- return i32(0)
+ return int32(0)
}
var _sqlite3VdbeMemSetStrØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemSetStrØ00__func__Ø000[0], str(6765), 21)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemSetStrØ00__func__Ø000[0], str(6666), 21)
}
-// This routine checks for a byte-order mark at the beginning of the
-// UTF-16 string stored in *pMem. If one is present, it is removed and
-// the encoding of the Mem adjusted. This routine does not do any
-// byte-swapping, it just sets Mem.enc appropriately.
-//
-// The allocation (static, dynamic etc.) and encoding of the Mem may be
-// changed by this function.
+// C comment
+// /*
+// ** This routine checks for a byte-order mark at the beginning of the
+// ** UTF-16 string stored in *pMem. If one is present, it is removed and
+// ** the encoding of the Mem adjusted. This routine does not do any
+// ** byte-swapping, it just sets Mem.enc appropriately.
+// **
+// ** The allocation (static, dynamic etc.) and encoding of the Mem may be
+// ** changed by this function.
+// */
func _sqlite3VdbeMemHandleBom(tls *crt.TLS, _pMem *XMem) (r0 int32) {
var _rc int32
var _bom, _1_b1, _1_b2 uint8
- _rc = i32(0)
- _bom = u8(0)
+ _rc = int32(0)
+ _bom = uint8(0)
func() {
- if (_pMem.X4) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27472), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemHandleBomØ00__func__Ø000))), unsafe.Pointer(str(6001)))
+ if _pMem.Xn < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27472), unsafe.Pointer(&_sqlite3VdbeMemHandleBomØ00__func__Ø000), unsafe.Pointer(str(5902)))
crt.X__builtin_abort(tls)
}
}()
- if (_pMem.X4) <= i32(1) {
+ if _pMem.Xn <= int32(1) {
goto _2
}
- _1_b1 = *(*uint8)(unsafe.Pointer(_pMem.X5))
- _1_b2 = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(_pMem.X5)))) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(1))))))))
- if (int32(_1_b1) == i32(254)) && (int32(_1_b2) == i32(255)) {
- _bom = uint8(i32(3))
+ _1_b1 = *(*uint8)(unsafe.Pointer(_pMem.Xz))
+ _1_b2 = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pMem.Xz)) + uintptr(int32(1))))
+ if (int32(_1_b1) == int32(254)) && (int32(_1_b2) == int32(255)) {
+ _bom = uint8(3)
}
- if (int32(_1_b1) == i32(255)) && (int32(_1_b2) == i32(254)) {
- _bom = uint8(i32(2))
+ if (int32(_1_b1) == int32(255)) && (int32(_1_b2) == int32(254)) {
+ _bom = uint8(2)
}
_2:
if _bom == 0 {
goto _7
}
_rc = _sqlite3VdbeMemMakeWriteable(tls, _pMem)
- if _rc == i32(0) {
+ if _rc == int32(0) {
+ _pMem.Xn -= int32(2)
+ crt.Xmemmove(tls, unsafe.Pointer(_pMem.Xz), unsafe.Pointer(elem1(_pMem.Xz, uintptr(2))), uint32(_pMem.Xn))
+ *elem1(_pMem.Xz, uintptr(_pMem.Xn)) = 0
+ *elem1(_pMem.Xz, uintptr(_pMem.Xn+int32(1))) = 0
{
- p := (*int32)(unsafe.Pointer(&(_pMem.X4)))
- *p = (*p) - i32(2)
- sink1(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) | int32(512))
}
- crt.Xmemmove(tls, (unsafe.Pointer)(_pMem.X5), (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5))+1*uintptr(i32(2))))), uint32(_pMem.X4))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr(_pMem.X4))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr((_pMem.X4)+i32(1)))) = int8(i32(0))
- {
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) | i32(512))
- sink14(*p)
- }
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = _bom
+ _pMem.Xenc = _bom
}
_7:
return _rc
@@ -7406,45 +7458,48 @@ _7:
var _sqlite3VdbeMemHandleBomØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemHandleBomØ00__func__Ø000[0], str(6786), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemHandleBomØ00__func__Ø000[0], str(6687), 24)
}
-// Force an SQLITE_TOOBIG error.
+// C comment
+// /* Force an SQLITE_TOOBIG error. */
func Xsqlite3_result_error_toobig(tls *crt.TLS, _pCtx *Xsqlite3_context) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76567), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_error_toobigØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76567), unsafe.Pointer(&_sqlite3_result_error_toobigØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pCtx.X5))) = i32(18)
- *(*uint8)(unsafe.Pointer(&(_pCtx.X7))) = uint8(i32(1))
- _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.X0), str(6810), i32(-1), uint8(i32(1)), nil)
+ _pCtx.XisError = int32(18)
+ _pCtx.XfErrorOrAux = uint8(1)
+ _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.XpOut), str(6711), int32(-1), uint8(1), nil)
}
var _sqlite3_result_error_toobigØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_error_toobigØ00__func__Ø000[0], str(6833), 28)
+ crt.Xstrncpy(nil, &_sqlite3_result_error_toobigØ00__func__Ø000[0], str(6734), 28)
}
-// This function is used by SQL generated to implement the
-// ALTER TABLE command. The first argument is the text of a CREATE TRIGGER
-// statement. The second is a table name. The table name in the CREATE
-// TRIGGER statement is replaced with the third argument and the result
-// returned. This is analagous to renameTableFunc() above, except for CREATE
-// TRIGGER, not CREATE INDEX and CREATE TABLE.
+// C comment
+// /* This function is used by SQL generated to implement the
+// ** ALTER TABLE command. The first argument is the text of a CREATE TRIGGER
+// ** statement. The second is a table name. The table name in the CREATE
+// ** TRIGGER statement is replaced with the third argument and the result
+// ** returned. This is analagous to renameTableFunc() above, except for CREATE
+// ** TRIGGER, not CREATE INDEX and CREATE TABLE.
+// */
func _renameTriggerFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _argv **XMem) {
var _token, _dist, _len int32
var _zRet *int8
var _zSql, _zTableName, _zCsr *uint8
var _tname XToken
var _db *Xsqlite3
- _zSql = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- _zTableName = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
- _dist = i32(3)
+ _zSql = Xsqlite3_value_text(tls, *elem19(_argv, 0))
+ _zTableName = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))
+ _dist = int32(3)
_zCsr = _zSql
- _len = i32(0)
+ _len = int32(0)
_db = Xsqlite3_context_db_handle(tls, _context)
if _zSql == nil {
@@ -7454,43 +7509,39 @@ _1:
if (*_zCsr) == 0 {
return
}
- *(**int8)(unsafe.Pointer(&(_tname.X0))) = (*int8)(unsafe.Pointer(_zCsr))
- *(*uint32)(unsafe.Pointer(&(_tname.X1))) = uint32(_len)
+ _tname.Xz = (*int8)(unsafe.Pointer(_zCsr))
+ _tname.Xn = uint32(_len)
_3:
- {
- p := &_zCsr
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_len)))
- sink13(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zCsr)) += uintptr(_len)
_len = _sqlite3GetToken(tls, _zCsr, &_token)
- if _token == i32(163) {
+ if _token == int32(163) {
goto _3
}
func() {
- if _len <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96310), unsafe.Pointer((*int8)(unsafe.Pointer(&_renameTriggerFuncØ00__func__Ø000))), unsafe.Pointer(str(4235)))
+ if _len <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96310), unsafe.Pointer(&_renameTriggerFuncØ00__func__Ø000), unsafe.Pointer(str(4136)))
crt.X__builtin_abort(tls)
}
}()
_dist += 1
- if (_token == i32(122)) || (_token == i32(107)) {
- _dist = i32(0)
+ if (_token == int32(122)) || (_token == int32(107)) {
+ _dist = int32(0)
}
- if (_dist != i32(2)) || (((_token != i32(137)) && (_token != i32(45))) && (_token != i32(5))) {
+ if (_dist != int32(2)) || (((_token != int32(137)) && (_token != int32(45))) && (_token != int32(5))) {
goto _1
}
- _zRet = _sqlite3MPrintf(tls, _db, str(4241), int32((uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(_tname.X0))))-uintptr(unsafe.Pointer(_zSql)))/1), unsafe.Pointer(_zSql), unsafe.Pointer(_zTableName), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_tname.X0))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_tname.X1)))))))))
- Xsqlite3_result_text(tls, _context, _zRet, i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ _zRet = _sqlite3MPrintf(tls, _db, str(4142), int32(uintptr(unsafe.Pointer(_tname.Xz))-uintptr(unsafe.Pointer(_zSql))), unsafe.Pointer(_zSql), unsafe.Pointer(_zTableName), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_tname.Xz))+uintptr(_tname.Xn)))))
+ Xsqlite3_result_text(tls, _context, _zRet, int32(-1), func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
_0:
- _ = _tname
}
var _renameTriggerFuncØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_renameTriggerFuncØ00__func__Ø000[0], str(6861), 18)
+ crt.Xstrncpy(nil, &_renameTriggerFuncØ00__func__Ø000[0], str(6762), 18)
}
func _renameParentFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _argv **XMem) {
@@ -7500,9 +7551,9 @@ func _renameParentFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32,
var _db *Xsqlite3
_db = Xsqlite3_context_db_handle(tls, _context)
_zOutput = nil
- _zInput = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- _zOld = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
- _zNew = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2)))))
+ _zInput = Xsqlite3_value_text(tls, *elem19(_argv, 0))
+ _zOld = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))
+ _zNew = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(2)))
if (_zInput == nil) || (_zOld == nil) {
return
@@ -7513,20 +7564,16 @@ _2:
goto _5
}
_n = _sqlite3GetToken(tls, _z, &_token)
- if _token != i32(105) {
+ if _token != int32(105) {
goto _6
}
_7:
- {
- p := &_z
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n)))
- sink13(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_n)
_n = _sqlite3GetToken(tls, _z, &_token)
- if _token == i32(163) {
+ if _token == int32(163) {
goto _7
}
- if _token == i32(164) {
+ if _token == int32(164) {
goto _5
}
_2_zParent = _sqlite3DbStrNDup(tls, _db, (*int8)(unsafe.Pointer(_z)), uint64(_n))
@@ -7534,41 +7581,42 @@ _7:
goto _5
}
_sqlite3Dequote(tls, _2_zParent)
- if i32(0) == _sqlite3StrICmp(tls, (*int8)(unsafe.Pointer(_zOld)), _2_zParent) {
- _4_zOut = _sqlite3MPrintf(tls, _db, str(6879), unsafe.Pointer(func() *int8 {
+ if int32(0) == _sqlite3StrICmp(tls, (*int8)(unsafe.Pointer(_zOld)), _2_zParent) {
+ _4_zOut = _sqlite3MPrintf(tls, _db, str(6780), unsafe.Pointer(func() *int8 {
if _zOutput != nil {
return _zOutput
}
- return str(0)
- }()), int32((uintptr(unsafe.Pointer(_z))-uintptr(unsafe.Pointer(_zInput)))/1), unsafe.Pointer(_zInput), unsafe.Pointer((*int8)(unsafe.Pointer(_zNew))))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zOutput))
+ return str(284)
+ }()), int32(uintptr(unsafe.Pointer(_z))-uintptr(unsafe.Pointer(_zInput))), unsafe.Pointer(_zInput), unsafe.Pointer(_zNew))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zOutput))
_zOutput = _4_zOut
- _zInput = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))
+ _zInput = elem15(_z, uintptr(_n))
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_2_zParent))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_2_zParent))
_6:
- _z = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_n)))))))
+ _z = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z)) + uintptr(_n)))
goto _2
_5:
Xsqlite3_result_text(tls, func() *Xsqlite3_context {
- _zResult = _sqlite3MPrintf(tls, _db, str(6890), unsafe.Pointer(func() *int8 {
+ _zResult = _sqlite3MPrintf(tls, _db, str(6791), unsafe.Pointer(func() *int8 {
if _zOutput != nil {
return _zOutput
}
- return str(0)
+ return str(284)
}()), unsafe.Pointer(_zInput))
return _context
- }(), _zResult, i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zOutput))
+ }(), _zResult, int32(-1), func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zOutput))
}
func _sqlite3DbStrNDup(tls *crt.TLS, _db *Xsqlite3, _z *int8, _n uint64) (r0 *int8) {
var _zNew *int8
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24971), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbStrNDupØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24971), unsafe.Pointer(&_sqlite3DbStrNDupØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
@@ -7576,15 +7624,15 @@ func _sqlite3DbStrNDup(tls *crt.TLS, _db *Xsqlite3, _z *int8, _n uint64) (r0 *in
return nil
}
func() {
- if (_n & uint64(i32(2147483647))) != _n {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24975), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DbStrNDupØ00__func__Ø000))), unsafe.Pointer(str(6895)))
+ if (_n & uint64(2147483647)) != _n {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24975), unsafe.Pointer(&_sqlite3DbStrNDupØ00__func__Ø000), unsafe.Pointer(str(6796)))
crt.X__builtin_abort(tls)
}
}()
- _zNew = (*int8)(_sqlite3DbMallocRawNN(tls, _db, _n+uint64(i32(1))))
+ _zNew = (*int8)(_sqlite3DbMallocRawNN(tls, _db, _n+uint64(1)))
if _zNew != nil {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zNew), (unsafe.Pointer)(_z), uint32(_n))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNew)) + 1*uintptr(_n))) = int8(i32(0))
+ crt.Xmemcpy(tls, unsafe.Pointer(_zNew), unsafe.Pointer(_z), uint32(_n))
+ *elem1(_zNew, uintptr(_n)) = 0
}
return _zNew
}
@@ -7592,50 +7640,53 @@ func _sqlite3DbStrNDup(tls *crt.TLS, _db *Xsqlite3, _z *int8, _n uint64) (r0 *in
var _sqlite3DbStrNDupØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DbStrNDupØ00__func__Ø000[0], str(6913), 17)
-}
-
-// Convert an SQL-style quoted string into a normal string by removing
-// the quote characters. The conversion is done in-place. If the
-// input does not begin with a quote character, then this routine
-// is a no-op.
-//
-// The input string must be zero-terminated. A new zero-terminator
-// is added to the dequoted string.
-//
-// The return value is -1 if no dequoting occurs or the length of the
-// dequoted string, exclusive of the zero terminator, if dequoting does
-// occur.
-//
-// 2002-Feb-14: This routine is extended to remove MS-Access style
-// brackets from around identifiers. For example: "[a-b-c]" becomes
-// "a-b-c".
+ crt.Xstrncpy(nil, &_sqlite3DbStrNDupØ00__func__Ø000[0], str(6814), 17)
+}
+
+// C comment
+// /*
+// ** Convert an SQL-style quoted string into a normal string by removing
+// ** the quote characters. The conversion is done in-place. If the
+// ** input does not begin with a quote character, then this routine
+// ** is a no-op.
+// **
+// ** The input string must be zero-terminated. A new zero-terminator
+// ** is added to the dequoted string.
+// **
+// ** The return value is -1 if no dequoting occurs or the length of the
+// ** dequoted string, exclusive of the zero terminator, if dequoting does
+// ** occur.
+// **
+// ** 2002-Feb-14: This routine is extended to remove MS-Access style
+// ** brackets from around identifiers. For example: "[a-b-c]" becomes
+// ** "a-b-c".
+// */
func _sqlite3Dequote(tls *crt.TLS, _z *int8) {
var _i, _j int32
var _quote int8
if _z == nil {
return
}
- _quote = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(_quote))))) & i32(128)) == 0 {
+ _quote = *elem1(_z, 0)
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(_quote)))) & int32(128)) == 0 {
return
}
- if int32(_quote) == i32(91) {
- _quote = int8(i32(93))
+ if int32(_quote) == int32(91) {
+ _quote = int8(93)
}
- *func() *int32 { _i = i32(1); return &_j }() = i32(0)
+ *func() *int32 { _i = int32(1); return &_j }() = int32(0)
_3:
func() {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27909), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DequoteØ00__func__Ø000))), unsafe.Pointer(str(6930)))
+ if (*elem1(_z, uintptr(_i))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27909), unsafe.Pointer(&_sqlite3DequoteØ00__func__Ø000), unsafe.Pointer(str(6831)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) != int32(_quote) {
+ if int32(*elem1(_z, uintptr(_i))) != int32(_quote) {
goto _8
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i+i32(1))))) == int32(_quote) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc1(&_j, int32(1))))) = _quote
+ if int32(*elem1(_z, uintptr(_i+int32(1)))) == int32(_quote) {
+ *elem1(_z, uintptr(postInc2(&_j, 1))) = _quote
_i += 1
goto _10
}
@@ -7643,137 +7694,151 @@ _3:
_10:
goto _11
_8:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc1(&_j, int32(1))))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))
+ *elem1(_z, uintptr(postInc2(&_j, 1))) = *elem1(_z, uintptr(_i))
_11:
_i += 1
goto _3
_5:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_j))) = int8(i32(0))
+ *elem1(_z, uintptr(_j)) = 0
}
var _sqlite3DequoteØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DequoteØ00__func__Ø000[0], str(6935), 15)
+ crt.Xstrncpy(nil, &_sqlite3DequoteØ00__func__Ø000[0], str(6836), 15)
}
-// This function registered all of the above C functions as SQL
-// functions. This should be the only routine in this file with
-// external linkage.
+// C comment
+// /*
+// ** This function registered all of the above C functions as SQL
+// ** functions. This should be the only routine in this file with
+// ** external linkage.
+// */
func _sqlite3RegisterDateTimeFunctions(tls *crt.TLS) {
- _sqlite3InsertBuiltinFuncs(tls, (*XFuncDef)(unsafe.Pointer(&_sqlite3RegisterDateTimeFunctionsØ00aDateTimeFuncsØ001)), i32(8))
+ _sqlite3InsertBuiltinFuncs(tls, (*XFuncDef)(unsafe.Pointer(&_sqlite3RegisterDateTimeFunctionsØ00aDateTimeFuncsØ001)), int32(8))
}
var _sqlite3RegisterDateTimeFunctionsØ00aDateTimeFuncsØ001 [8]XFuncDef
func init() {
- _sqlite3RegisterDateTimeFunctionsØ00aDateTimeFuncsØ001 = [8]XFuncDef{XFuncDef{X0: i8(-1), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ _sqlite3RegisterDateTimeFunctionsØ00aDateTimeFuncsØ001 = [8]XFuncDef{XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_juliandayFunc})), X5: nil, X6: str(6950), X7: t12{}}, XFuncDef{X0: i8(-1), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_juliandayFunc})), XzName: str(6851)}, XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_dateFunc})), X5: nil, X6: str(6960), X7: t12{}}, XFuncDef{X0: i8(-1), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_dateFunc})), XzName: str(6861)}, XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_timeFunc})), X5: nil, X6: str(6965), X7: t12{}}, XFuncDef{X0: i8(-1), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_timeFunc})), XzName: str(6866)}, XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_datetimeFunc})), X5: nil, X6: str(6970), X7: t12{}}, XFuncDef{X0: i8(-1), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_datetimeFunc})), XzName: str(6871)}, XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_strftimeFunc})), X5: nil, X6: str(6979), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_strftimeFunc})), XzName: str(6880)}, XFuncDef{XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_ctimeFunc})), X5: nil, X6: str(6988), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_ctimeFunc})), XzName: str(6889)}, XFuncDef{XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_ctimestampFunc})), X5: nil, X6: str(7001), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_ctimestampFunc})), XzName: str(6902)}, XFuncDef{XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_cdateFunc})), X5: nil, X6: str(7019), X7: t12{}}}
+ }{_cdateFunc})), XzName: str(6920)}}
}
-// julianday( TIMESTRING, MOD, MOD, ...)
-//
-// Return the julian day number of the date specified in the arguments
+// C comment
+// /*
+// ** julianday( TIMESTRING, MOD, MOD, ...)
+// **
+// ** Return the julian day number of the date specified in the arguments
+// */
func _juliandayFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _x XDateTime
- if _isDate(tls, _context, _argc, _argv, &_x) == i32(0) {
+ if _isDate(tls, _context, _argc, _argv, &_x) == int32(0) {
_computeJD(tls, &_x)
- Xsqlite3_result_double(tls, _context, float64(_x.X0)/(8.64e+07))
+ Xsqlite3_result_double(tls, _context, float64(_x.XiJD)/(8.64e+07))
}
- _ = _x
}
-// Process time function arguments. argv[0] is a date-time stamp.
-// argv[1] and following are modifiers. Parse them all and write
-// the resulting time into the DateTime structure p. Return 0
-// on success and 1 if there are any errors.
-//
-// If there are zero parameters (if even argv[0] is undefined)
-// then assume a default value of "now" for argv[0].
+// C comment
+// /*
+// ** Process time function arguments. argv[0] is a date-time stamp.
+// ** argv[1] and following are modifiers. Parse them all and write
+// ** the resulting time into the DateTime structure p. Return 0
+// ** on success and 1 if there are any errors.
+// **
+// ** If there are zero parameters (if even argv[0] is undefined)
+// ** then assume a default value of "now" for argv[0].
+// */
func _isDate(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem, _p *XDateTime) (r0 int32) {
var _i, _n, _eType int32
var _z *uint8
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(48))
- if _argc == i32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(48))
+ if _argc == int32(0) {
return _setDateTimeToCurrent(tls, _context, _p)
}
- if (store1(&_eType, Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))) == i32(2)) || (_eType == i32(1)) {
- _setRawDateNumber(tls, _p, Xsqlite3_value_double(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
+ if (store2(&_eType, Xsqlite3_value_type(tls, *elem19(_argv, 0))) == int32(2)) || (_eType == int32(1)) {
+ _setRawDateNumber(tls, _p, Xsqlite3_value_double(tls, *elem19(_argv, 0)))
goto _3
}
- _z = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _z = Xsqlite3_value_text(tls, *elem19(_argv, 0))
if (_z == nil) || _parseDateOrTime(tls, _context, (*int8)(unsafe.Pointer(_z)), _p) != 0 {
- return i32(1)
+ return int32(1)
}
_3:
- _i = i32(1)
+ _i = int32(1)
_6:
if _i >= _argc {
goto _9
}
- _z = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i))))
- _n = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i))))
+ _z = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(_i)))
+ _n = Xsqlite3_value_bytes(tls, *elem19(_argv, uintptr(_i)))
if (_z == nil) || _parseModifier(tls, _context, (*int8)(unsafe.Pointer(_z)), _n, _p) != 0 {
- return i32(1)
+ return int32(1)
}
_i += 1
goto _6
_9:
_computeJD(tls, _p)
- if ((_p.X14) != 0) || (_validJulianDay(tls, _p.X0) == 0) {
- return i32(1)
+ if (_p.XisError != 0) || (_validJulianDay(tls, _p.XiJD) == 0) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}
-// Set the time to the current time reported by the VFS.
-//
-// Return the number of errors.
+// C comment
+// /*
+// ** Set the time to the current time reported by the VFS.
+// **
+// ** Return the number of errors.
+// */
func _setDateTimeToCurrent(tls *crt.TLS, _context *Xsqlite3_context, _p *XDateTime) (r0 int32) {
- *(*int64)(unsafe.Pointer(&(_p.X0))) = _sqlite3StmtCurrentTime(tls, _context)
- if (_p.X0) > int64(i32(0)) {
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(1))
- return i32(0)
- }
- return i32(1)
-}
-
-// Return the current time for a statement. If the current time
-// is requested more than once within the same run of a single prepared
-// statement, the exact same time is returned for each invocation regardless
-// of the amount of time that elapses between invocations. In other words,
-// the time returned is always the time of the first call.
+ _p.XiJD = _sqlite3StmtCurrentTime(tls, _context)
+ if _p.XiJD > (0) {
+ _p.XvalidJD = int8(1)
+ return int32(0)
+ }
+ return int32(1)
+}
+
+// C comment
+// /*
+// ** Return the current time for a statement. If the current time
+// ** is requested more than once within the same run of a single prepared
+// ** statement, the exact same time is returned for each invocation regardless
+// ** of the amount of time that elapses between invocations. In other words,
+// ** the time returned is always the time of the first call.
+// */
func _sqlite3StmtCurrentTime(tls *crt.TLS, _p *Xsqlite3_context) (r0 int64) {
var _rc int32
var _piTime *int64
- _piTime = (*int64)(unsafe.Pointer(&((*TVdbe)(_p.X3).X13)))
+ _piTime = &((*TVdbe)(_p.XpVdbe).XiCurrentTime)
func() {
- if (*TVdbe)(_p.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76829), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StmtCurrentTimeØ00__func__Ø000))), unsafe.Pointer(str(7032)))
+ if (*TVdbe)(_p.XpVdbe) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76829), unsafe.Pointer(&_sqlite3StmtCurrentTimeØ00__func__Ø000), unsafe.Pointer(str(6933)))
crt.X__builtin_abort(tls)
}
}()
- if (*_piTime) != int64(i32(0)) {
+ if (*_piTime) != (0) {
goto _2
}
- _rc = _sqlite3OsCurrentTimeInt64(tls, (*Xsqlite3_vfs)((*Xsqlite3)((*XMem)(_p.X0).X9).X0), _piTime)
+ _rc = _sqlite3OsCurrentTimeInt64(tls, (*Xsqlite3_vfs)((*Xsqlite3)((*XMem)(_p.XpOut).Xdb).XpVfs), _piTime)
if _rc != 0 {
- *_piTime = int64(i32(0))
+ *_piTime = 0
}
_2:
return *_piTime
@@ -7782,35 +7847,36 @@ _2:
var _sqlite3StmtCurrentTimeØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StmtCurrentTimeØ00__func__Ø000[0], str(7044), 23)
+ crt.Xstrncpy(nil, &_sqlite3StmtCurrentTimeØ00__func__Ø000[0], str(6945), 23)
}
func _sqlite3OsCurrentTimeInt64(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _pTimeOut *int64) (r0 int32) {
var _rc int32
var _2_r float64
- if ((_pVfs.X0) >= i32(2)) && ((*(*func(*crt.TLS, *Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{(_pVfs.X18)}))) != nil) {
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{(_pVfs.X18)})))(tls, _pVfs, _pTimeOut)
+ if (_pVfs.XiVersion >= int32(2)) && (_pVfs.XxCurrentTimeInt64 != nil) {
+ _rc = func() func(*crt.TLS, *Xsqlite3_vfs, *int64) int32 {
+ v := _pVfs.XxCurrentTimeInt64
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _pTimeOut)
goto _2
}
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vfs, *float64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *float64) int32
- }{(_pVfs.X16)})))(tls, _pVfs, &_2_r)
+ _rc = func() func(*crt.TLS, *Xsqlite3_vfs, *float64) int32 {
+ v := _pVfs.XxCurrentTime
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, *float64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, &_2_r)
*_pTimeOut = int64(_2_r * (8.64e+07))
_2:
return _rc
}
-// SQLITE_OMIT_UTF16
-
-// EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
-// fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
-// point number string BLOB NULL
+// C comment
+// /* SQLITE_OMIT_UTF16 */
+// /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
+// ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
+// ** point number string BLOB NULL
+// */
func Xsqlite3_value_type(tls *crt.TLS, _pVal *XMem) (r0 int32) {
- return int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3_value_typeØ00aTypeØ001)) + 1*uintptr(int32(_pVal.X1)&i32(31)))))
+ return int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3_value_typeØ00aTypeØ001)), uintptr(int32(_pVal.Xflags)&int32(31))))
}
var _sqlite3_value_typeØ00aTypeØ001 [32]uint8
@@ -7819,16 +7885,19 @@ func init() {
_sqlite3_value_typeØ00aTypeØ001 = [32]uint8{4, 5, 3, 5, 1, 5, 1, 5, 2, 5, 2, 5, 1, 5, 1, 5, 4, 5, 3, 5, 1, 5, 1, 5, 2, 5, 2, 5, 1, 5, 1, 5}
}
-// Input "r" is a numeric quantity which might be a julian day number,
-// or the number of seconds since 1970. If the value if r is within
-// range of a julian day number, install it as such and set validJD.
-// If the value is a valid unix timestamp, put it in p->s and set p->rawS.
+// C comment
+// /*
+// ** Input "r" is a numeric quantity which might be a julian day number,
+// ** or the number of seconds since 1970. If the value if r is within
+// ** range of a julian day number, install it as such and set validJD.
+// ** If the value is a valid unix timestamp, put it in p->s and set p->rawS.
+// */
func _setRawDateNumber(tls *crt.TLS, _p *XDateTime, _r float64) {
- *(*float64)(unsafe.Pointer(&(_p.X7))) = _r
- *(*int8)(unsafe.Pointer(&(_p.X9))) = int8(i32(1))
+ _p.Xs = _r
+ _p.XrawS = int8(1)
if (_r >= float64(0)) && (_r < (5.3734845e+06)) {
- *(*int64)(unsafe.Pointer(&(_p.X0))) = int64((_r * (8.64e+07)) + (0.5))
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(1))
+ _p.XiJD = int64((_r * (8.64e+07)) + (0.5))
+ _p.XvalidJD = int8(1)
}
}
@@ -7838,24 +7907,24 @@ func Xsqlite3_value_double(tls *crt.TLS, _pVal *XMem) (r0 float64) {
func _sqlite3VdbeRealValue(tls *crt.TLS, _pMem *XMem) (r0 float64) {
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70197), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRealValueØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70197), unsafe.Pointer(&_sqlite3VdbeRealValueØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pMem))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70198), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRealValueØ00__func__Ø000))), unsafe.Pointer(str(6321)))
+ if (int32(uintptr(unsafe.Pointer(_pMem))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70198), unsafe.Pointer(&_sqlite3VdbeRealValueØ00__func__Ø000), unsafe.Pointer(str(6222)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pMem.X1) & i32(8)) != 0 {
- return *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))
+ if (int32(_pMem.Xflags) & int32(8)) != 0 {
+ return *(*float64)(unsafe.Pointer(&_pMem.Xu))
}
- if (int32(_pMem.X1) & i32(4)) != 0 {
- return float64(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
+ if (int32(_pMem.Xflags) & int32(4)) != 0 {
+ return float64(*(*int64)(unsafe.Pointer(&_pMem.Xu)))
}
- if (int32(_pMem.X1) & i32(18)) != 0 {
+ if (int32(_pMem.Xflags) & int32(18)) != 0 {
return _memRealValue(tls, _pMem)
}
return float64(0)
@@ -7864,244 +7933,181 @@ func _sqlite3VdbeRealValue(tls *crt.TLS, _pMem *XMem) (r0 float64) {
var _sqlite3VdbeRealValueØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeRealValueØ00__func__Ø000[0], str(7067), 21)
+ crt.Xstrncpy(nil, &_sqlite3VdbeRealValueØ00__func__Ø000[0], str(6968), 21)
}
-// Return the best representation of pMem that we can get into a
-// double. If pMem is already a double or an integer, return its
-// value. If it is a string or blob, try to convert it to a double.
-// If it is a NULL, return 0.0.
+// C comment
+// /*
+// ** Return the best representation of pMem that we can get into a
+// ** double. If pMem is already a double or an integer, return its
+// ** value. If it is a string or blob, try to convert it to a double.
+// ** If it is a NULL, return 0.0.
+// */
func _memRealValue(tls *crt.TLS, _pMem *XMem) (r0 float64) {
var _val float64
_val = 0
- _sqlite3AtoF(tls, _pMem.X5, &_val, _pMem.X4, _pMem.X2)
+ _sqlite3AtoF(tls, _pMem.Xz, &_val, _pMem.Xn, _pMem.Xenc)
return _val
}
-// The string z[] is an text representation of a real number.
-// Convert this string to a double and write it into *pResult.
-//
-// The string z[] is length bytes in length (bytes, not characters) and
-// uses the encoding enc. The string is not necessarily zero-terminated.
-//
-// Return TRUE if the result is a valid real number (or integer) and FALSE
-// if the string is empty or contains extraneous text. Valid numbers
-// are in one of these formats:
-//
-// [+-]digits[E[+-]digits]
-// [+-]digits.[digits][E[+-]digits]
-// [+-].digits[E[+-]digits]
-//
-// Leading and trailing whitespace is ignored for the purpose of determining
-// validity.
-//
-// If some prefix of the input string is a valid number, this routine
-// returns FALSE but it still converts the prefix and writes the result
-// into *pResult.
+// C comment
+// /*
+// ** The string z[] is an text representation of a real number.
+// ** Convert this string to a double and write it into *pResult.
+// **
+// ** The string z[] is length bytes in length (bytes, not characters) and
+// ** uses the encoding enc. The string is not necessarily zero-terminated.
+// **
+// ** Return TRUE if the result is a valid real number (or integer) and FALSE
+// ** if the string is empty or contains extraneous text. Valid numbers
+// ** are in one of these formats:
+// **
+// ** [+-]digits[E[+-]digits]
+// ** [+-]digits.[digits][E[+-]digits]
+// ** [+-].digits[E[+-]digits]
+// **
+// ** Leading and trailing whitespace is ignored for the purpose of determining
+// ** validity.
+// **
+// ** If some prefix of the input string is a valid number, this routine
+// ** returns FALSE but it still converts the prefix and writes the result
+// ** into *pResult.
+// */
func _sqlite3AtoF(tls *crt.TLS, _z *int8, _pResult *float64, _length int32, _enc uint8) (r0 int32) {
var _incr, _sign, _d, _esign, _e, _eValid, _nDigits, _nonNum, _2_i int32
var _s int64
var _zEnd *int8
var _result, _22_scale float64
- _zEnd = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z)) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_length)))))))
- _sign = i32(1)
- _s = i64(0)
- _d = i32(0)
- _esign = i32(1)
- _e = i32(0)
- _eValid = i32(1)
- _nDigits = i32(0)
- _nonNum = i32(0)
+ _zEnd = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z)) + uintptr(_length)))
+ _sign = int32(1)
+ _s = int64(0)
+ _d = int32(0)
+ _esign = int32(1)
+ _e = int32(0)
+ _eValid = int32(1)
+ _nDigits = int32(0)
+ _nonNum = int32(0)
func() {
- if int32(_enc) != i32(1) && int32(_enc) != i32(2) && int32(_enc) != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28016), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AtoFØ00__func__Ø000))), unsafe.Pointer(str(7088)))
+ if int32(_enc) != int32(1) && int32(_enc) != int32(2) && int32(_enc) != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28016), unsafe.Pointer(&_sqlite3AtoFØ00__func__Ø000), unsafe.Pointer(str(6989)))
crt.X__builtin_abort(tls)
}
}()
*_pResult = float64(0)
- if int32(_enc) == i32(1) {
- _incr = i32(1)
+ if int32(_enc) == int32(1) {
+ _incr = int32(1)
goto _5
}
- _incr = i32(2)
- i32(0)
- _2_i = i32(3) - int32(_enc)
+ _incr = int32(2)
+
+ _2_i = int32(3) - int32(_enc)
_6:
- if _2_i >= _length || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_2_i)))) != i32(0) {
+ if _2_i >= _length || int32(*elem1(_z, uintptr(_2_i))) != int32(0) {
goto _10
}
- {
- p := &_2_i
- *p = (*p) + i32(2)
- sink1(*p)
- }
+ _2_i += int32(2)
goto _6
_10:
_nonNum = bool2int(_2_i < _length)
- _zEnd = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_2_i^i32(1))))
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(int32(_enc)&i32(1))))
- sink0(*p)
- }
+ _zEnd = elem1(_z, uintptr(_2_i^int32(1)))
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(int32(_enc) & int32(1))
_5:
- if (uintptr(unsafe.Pointer(_z)) < uintptr(unsafe.Pointer(_zEnd))) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_z)))))&i32(1)) != 0 {
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if (crt.P2U(unsafe.Pointer(_z)) < crt.P2U(unsafe.Pointer(_zEnd))) && (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_z))))&int32(1)) != 0 {
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr)
goto _5
}
- if uintptr(unsafe.Pointer(_z)) >= uintptr(unsafe.Pointer(_zEnd)) {
- return i32(0)
+ if crt.P2U(unsafe.Pointer(_z)) >= crt.P2U(unsafe.Pointer(_zEnd)) {
+ return int32(0)
}
- if int32(*_z) == i32(45) {
- _sign = i32(-1)
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if int32(*_z) == int32(45) {
+ _sign = int32(-1)
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr)
goto _17
}
- if int32(*_z) == i32(43) {
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if int32(*_z) == int32(43) {
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr)
}
_17:
- if ((uintptr(unsafe.Pointer(_z)) < uintptr(unsafe.Pointer(_zEnd))) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_z)))))&i32(4)) != 0) && (_s < i64(922337203685477579)) {
- _s = (_s * int64(i32(10))) + int64(int32(*_z)-i32(48))
- *func() *int32 {
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
- return &_nDigits
- }() += 1
+ if ((crt.P2U(unsafe.Pointer(_z)) < crt.P2U(unsafe.Pointer(_zEnd))) && (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_z))))&int32(4)) != 0) && (_s < int64(922337203685477579)) {
+ _s = (_s * int64(10)) + int64(int32(*_z)-int32(48))
+ *func() *int32 { *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr); return &_nDigits }() += 1
goto _17
}
_19:
- if (uintptr(unsafe.Pointer(_z)) < uintptr(unsafe.Pointer(_zEnd))) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_z)))))&i32(4)) != 0 {
+ if (crt.P2U(unsafe.Pointer(_z)) < crt.P2U(unsafe.Pointer(_zEnd))) && (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_z))))&int32(4)) != 0 {
*func() *int32 {
- *func() *int32 {
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
- return &_nDigits
- }() += 1
+ *func() *int32 { *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr); return &_nDigits }() += 1
return &_d
}() += 1
goto _19
}
- if uintptr(unsafe.Pointer(_z)) >= uintptr(unsafe.Pointer(_zEnd)) {
+ if crt.P2U(unsafe.Pointer(_z)) >= crt.P2U(unsafe.Pointer(_zEnd)) {
goto _do_atof_calc
}
- if int32(*_z) != i32(46) {
+ if int32(*_z) != int32(46) {
goto _26
}
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr)
_27:
- if uintptr(unsafe.Pointer(_z)) >= uintptr(unsafe.Pointer(_zEnd)) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_z)))))&i32(4)) == 0 {
+ if crt.P2U(unsafe.Pointer(_z)) >= crt.P2U(unsafe.Pointer(_zEnd)) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_z))))&int32(4)) == 0 {
goto _28
}
- if _s < i64(922337203685477579) {
- _s = (_s * int64(i32(10))) + int64(int32(*_z)-i32(48))
+ if _s < int64(922337203685477579) {
+ _s = (_s * int64(10)) + int64(int32(*_z)-int32(48))
_d -= 1
}
- *func() *int32 {
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
- return &_nDigits
- }() += 1
+ *func() *int32 { *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr); return &_nDigits }() += 1
goto _27
_28:
_26:
- if uintptr(unsafe.Pointer(_z)) >= uintptr(unsafe.Pointer(_zEnd)) {
+ if crt.P2U(unsafe.Pointer(_z)) >= crt.P2U(unsafe.Pointer(_zEnd)) {
goto _do_atof_calc
}
- if int32(*_z) != i32(101) && int32(*_z) != i32(69) {
+ if int32(*_z) != int32(101) && int32(*_z) != int32(69) {
goto _33
}
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
- _eValid = i32(0)
- if uintptr(unsafe.Pointer(_z)) >= uintptr(unsafe.Pointer(_zEnd)) {
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr)
+ _eValid = int32(0)
+ if crt.P2U(unsafe.Pointer(_z)) >= crt.P2U(unsafe.Pointer(_zEnd)) {
goto _do_atof_calc
}
- if int32(*_z) == i32(45) {
- _esign = i32(-1)
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if int32(*_z) == int32(45) {
+ _esign = int32(-1)
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr)
goto _37
}
- if int32(*_z) == i32(43) {
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if int32(*_z) == int32(43) {
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr)
}
_37:
- if (uintptr(unsafe.Pointer(_z)) < uintptr(unsafe.Pointer(_zEnd))) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_z)))))&i32(4)) != 0 {
+ if (crt.P2U(unsafe.Pointer(_z)) < crt.P2U(unsafe.Pointer(_zEnd))) && (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_z))))&int32(4)) != 0 {
_e = func() int32 {
- if _e < i32(10000) {
- return ((_e * i32(10)) + (int32(*_z) - i32(48)))
+ if _e < int32(10000) {
+ return ((_e * int32(10)) + (int32(*_z) - int32(48)))
}
- return i32(10000)
+ return int32(10000)
}()
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
- _eValid = i32(1)
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr)
+ _eValid = int32(1)
goto _37
}
_33:
- if (uintptr(unsafe.Pointer(_z)) < uintptr(unsafe.Pointer(_zEnd))) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_z)))))&i32(1)) != 0 {
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if (crt.P2U(unsafe.Pointer(_z)) < crt.P2U(unsafe.Pointer(_zEnd))) && (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_z))))&int32(1)) != 0 {
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_incr)
goto _33
}
_do_atof_calc:
_e = (_e * _esign) + _d
- if _e < i32(0) {
- _esign = i32(-1)
- {
- p := &_e
- *p = (*p) * i32(-1)
- sink1(*p)
- }
+ if _e < int32(0) {
+ _esign = int32(-1)
+ _e *= int32(-1)
goto _47
}
- _esign = i32(1)
+ _esign = int32(1)
_47:
- if _s == int64(i32(0)) {
+ if _s == (0) {
_result = func() float64 {
- if _sign < i32(0) {
+ if _sign < int32(0) {
return (-0)
}
return float64(0)
@@ -8109,90 +8115,66 @@ _47:
goto _51
}
_52:
- if _e <= i32(0) {
+ if _e <= int32(0) {
goto _53
}
- if _esign <= i32(0) {
+ if _esign <= int32(0) {
goto _54
}
- if _s >= i64(922337203685477580) {
+ if _s >= int64(922337203685477580) {
goto _53
}
- {
- p := &_s
- *p = (*p) * int64(i32(10))
- sink6(*p)
- }
+ _s *= int64(10)
goto _56
_54:
- if (_s % int64(i32(10))) != int64(i32(0)) {
+ if (_s % int64(10)) != (0) {
goto _53
}
- {
- p := &_s
- *p = (*p) / int64(i32(10))
- sink6(*p)
- }
+ _s /= int64(10)
_56:
_e -= 1
goto _52
_53:
_s = func() int64 {
- if _sign < i32(0) {
+ if _sign < int32(0) {
return (-_s)
}
return _s
}()
- if _e == i32(0) {
+ if _e == int32(0) {
_result = float64(_s)
goto _61
}
_22_scale = 1
- if _e <= i32(307) {
+ if _e <= int32(307) {
goto _62
}
- if _e >= i32(342) {
+ if _e >= int32(342) {
goto _63
}
_64:
- if (_e % i32(308)) != 0 {
- {
- p := &_22_scale
- *p = (*p) * float64(10)
- sink4(*p)
- }
- {
- p := &_e
- *p = (*p) - i32(1)
- sink1(*p)
- }
+ if (_e % int32(308)) != 0 {
+ _22_scale *= float64(10)
+ _e -= int32(1)
goto _64
}
- if _esign < i32(0) {
+ if _esign < int32(0) {
_result = float64(_s) / _22_scale
- {
- p := &_result
- *p = (*p) / float64(1e+308)
- sink4(*p)
- }
+ _result /= float64(1e+308)
goto _67
}
_result = float64(_s) * _22_scale
- {
- p := &_result
- *p = (*p) * float64(1e+308)
- sink4(*p)
- }
+ _result *= float64(1e+308)
_67:
goto _68
_63:
func() {
- if _e < i32(342) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28146), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AtoFØ00__func__Ø000))), unsafe.Pointer(str(7151)))
+ if _e < int32(342) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28146), unsafe.Pointer(&_sqlite3AtoFØ00__func__Ø000), unsafe.Pointer(str(7052)))
crt.X__builtin_abort(tls)
}
}()
- if _esign < i32(0) {
+ if _esign < int32(0) {
_result = float64(0) * float64(_s)
goto _72
}
@@ -8202,34 +8184,18 @@ _68:
goto _73
_62:
_74:
- if (_e % i32(22)) != 0 {
- {
- p := &_22_scale
- *p = (*p) * float64(10)
- sink4(*p)
- }
- {
- p := &_e
- *p = (*p) - i32(1)
- sink1(*p)
- }
+ if (_e % int32(22)) != 0 {
+ _22_scale *= float64(10)
+ _e -= int32(1)
goto _74
}
_75:
- if _e > i32(0) {
- {
- p := &_22_scale
- *p = (*p) * float64(1e+22)
- sink4(*p)
- }
- {
- p := &_e
- *p = (*p) - i32(22)
- sink1(*p)
- }
+ if _e > int32(0) {
+ _22_scale *= float64(1e+22)
+ _e -= int32(22)
goto _75
}
- if _esign < i32(0) {
+ if _esign < int32(0) {
_result = float64(_s) / _22_scale
goto _79
}
@@ -8239,172 +8205,173 @@ _73:
_61:
_51:
*_pResult = _result
- return bool2int((((_z == _zEnd) && (_nDigits > i32(0))) && _eValid != 0) && (_nonNum == i32(0)))
+ return bool2int((((_z == _zEnd) && (_nDigits > int32(0))) && _eValid != 0) && (_nonNum == int32(0)))
}
var _sqlite3AtoFØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AtoFØ00__func__Ø000[0], str(7158), 12)
-}
-
-// Attempt to parse the given string into a julian day number. Return
-// the number of errors.
-//
-// The following are acceptable forms for the input string:
-//
-// YYYY-MM-DD HH:MM:SS.FFF +/-HH:MM
-// DDDD.DD
-// now
-//
-// In the first form, the +/-HH:MM is always optional. The fractional
-// seconds extension (the ".FFF") is optional. The seconds portion
-// (":SS.FFF") is option. The year and date can be omitted as long
-// as there is a time string. The time string can be omitted as long
-// as there is a year and date.
+ crt.Xstrncpy(nil, &_sqlite3AtoFØ00__func__Ø000[0], str(7059), 12)
+}
+
+// C comment
+// /*
+// ** Attempt to parse the given string into a julian day number. Return
+// ** the number of errors.
+// **
+// ** The following are acceptable forms for the input string:
+// **
+// ** YYYY-MM-DD HH:MM:SS.FFF +/-HH:MM
+// ** DDDD.DD
+// ** now
+// **
+// ** In the first form, the +/-HH:MM is always optional. The fractional
+// ** seconds extension (the ".FFF") is optional. The seconds portion
+// ** (":SS.FFF") is option. The year and date can be omitted as long
+// ** as there is a time string. The time string can be omitted as long
+// ** as there is a year and date.
+// */
func _parseDateOrTime(tls *crt.TLS, _context *Xsqlite3_context, _zDate *int8, _p *XDateTime) (r0 int32) {
var _r float64
- if _parseYyyyMmDd(tls, _zDate, _p) == i32(0) {
- return i32(0)
+ if _parseYyyyMmDd(tls, _zDate, _p) == int32(0) {
+ return int32(0)
}
- if _parseHhMmSs(tls, _zDate, _p) == i32(0) {
- return i32(0)
+ if _parseHhMmSs(tls, _zDate, _p) == int32(0) {
+ return int32(0)
}
- if _sqlite3StrICmp(tls, _zDate, str(7170)) == i32(0) {
+ if _sqlite3StrICmp(tls, _zDate, str(7071)) == int32(0) {
return _setDateTimeToCurrent(tls, _context, _p)
}
- if _sqlite3AtoF(tls, _zDate, &_r, _sqlite3Strlen30(tls, _zDate), uint8(i32(1))) != 0 {
+ if _sqlite3AtoF(tls, _zDate, &_r, _sqlite3Strlen30(tls, _zDate), uint8(1)) != 0 {
_setRawDateNumber(tls, _p, _r)
- return i32(0)
- }
- return i32(1)
-}
-
-// Parse dates of the form
-//
-// YYYY-MM-DD HH:MM:SS.FFF
-// YYYY-MM-DD HH:MM:SS
-// YYYY-MM-DD HH:MM
-// YYYY-MM-DD
-//
-// Write the result into the DateTime structure and return 0
-// on success and 1 if the input string is not a well-formed
-// date.
+ return int32(0)
+ }
+ return int32(1)
+}
+
+// C comment
+// /*
+// ** Parse dates of the form
+// **
+// ** YYYY-MM-DD HH:MM:SS.FFF
+// ** YYYY-MM-DD HH:MM:SS
+// ** YYYY-MM-DD HH:MM
+// ** YYYY-MM-DD
+// **
+// ** Write the result into the DateTime structure and return 0
+// ** on success and 1 if the input string is not a well-formed
+// ** date.
+// */
func _parseYyyyMmDd(tls *crt.TLS, _zDate *int8, _p *XDateTime) (r0 int32) {
var _Y, _M, _D, _neg int32
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zDate)) + 1*uintptr(i32(0))))) == i32(45) {
+ if int32(*elem1(_zDate, 0)) == int32(45) {
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
- _neg = i32(1)
+ _neg = int32(1)
goto _1
}
- _neg = i32(0)
+ _neg = int32(0)
_1:
- if _getDigits(tls, _zDate, str(7174), unsafe.Pointer(&_Y), unsafe.Pointer(&_M), unsafe.Pointer(&_D)) != i32(3) {
- return i32(1)
- }
- {
- p := &_zDate
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(10))))
- sink0(*p)
+ if _getDigits(tls, _zDate, str(7075), unsafe.Pointer(&_Y), unsafe.Pointer(&_M), unsafe.Pointer(&_D)) != int32(3) {
+ return int32(1)
}
+ *(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(int32(10))
_3:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_zDate)))))&i32(1)) != 0 || (i32(84) == int32(*(*uint8)(unsafe.Pointer(_zDate)))) {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_zDate))))&int32(1)) != 0 || (int32(84) == int32(*(*uint8)(unsafe.Pointer(_zDate)))) {
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
goto _3
}
- if _parseHhMmSs(tls, _zDate, _p) == i32(0) {
+ if _parseHhMmSs(tls, _zDate, _p) == int32(0) {
goto _9
}
- if int32(*_zDate) == i32(0) {
- *(*int8)(unsafe.Pointer(&(_p.X11))) = int8(i32(0))
+ if int32(*_zDate) == int32(0) {
+ _p.XvalidHMS = 0
goto _9
}
- return i32(1)
+ return int32(1)
_9:
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X10))) = int8(i32(1))
- *(*int32)(unsafe.Pointer(&(_p.X1))) = func() int32 {
+ _p.XvalidJD = 0
+ _p.XvalidYMD = int8(1)
+ _p.XY = func() int32 {
if _neg != 0 {
return (-_Y)
}
return _Y
}()
- *(*int32)(unsafe.Pointer(&(_p.X2))) = _M
- *(*int32)(unsafe.Pointer(&(_p.X3))) = _D
- if (_p.X12) != 0 {
+ _p.XM = _M
+ _p.XD = _D
+ if _p.XvalidTZ != 0 {
_computeJD(tls, _p)
}
- return i32(0)
-}
-
-// Convert zDate into one or more integers according to the conversion
-// specifier zFormat.
-//
-// zFormat[] contains 4 characters for each integer converted, except for
-// the last integer which is specified by three characters. The meaning
-// of a four-character format specifiers ABCD is:
-//
-// A: number of digits to convert. Always "2" or "4".
-// B: minimum value. Always "0" or "1".
-// C: maximum value, decoded as:
-// a: 12
-// b: 14
-// c: 24
-// d: 31
-// e: 59
-// f: 9999
-// D: the separator character, or \000 to indicate this is the
-// last number to convert.
-//
-// Example: To translate an ISO-8601 date YYYY-MM-DD, the format would
-// be "40f-21a-20c". The "40f-" indicates the 4-digit year followed by "-".
-// The "21a-" indicates the 2-digit month followed by "-". The "20c" indicates
-// the 2-digit day which is the last integer in the set.
-//
-// The function returns the number of successful conversions.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Convert zDate into one or more integers according to the conversion
+// ** specifier zFormat.
+// **
+// ** zFormat[] contains 4 characters for each integer converted, except for
+// ** the last integer which is specified by three characters. The meaning
+// ** of a four-character format specifiers ABCD is:
+// **
+// ** A: number of digits to convert. Always "2" or "4".
+// ** B: minimum value. Always "0" or "1".
+// ** C: maximum value, decoded as:
+// ** a: 12
+// ** b: 14
+// ** c: 24
+// ** d: 31
+// ** e: 59
+// ** f: 9999
+// ** D: the separator character, or \000 to indicate this is the
+// ** last number to convert.
+// **
+// ** Example: To translate an ISO-8601 date YYYY-MM-DD, the format would
+// ** be "40f-21a-20c". The "40f-" indicates the 4-digit year followed by "-".
+// ** The "21a-" indicates the 2-digit month followed by "-". The "20c" indicates
+// ** the 2-digit day which is the last integer in the set.
+// **
+// ** The function returns the number of successful conversions.
+// */
func _getDigits(tls *crt.TLS, _zDate *int8, _zFormat *int8, args ...interface{}) (r0 int32) {
var _cnt, _1_val int32
var _nextC, _1_N, _1_min int8
var _1_max uint16
var _ap []interface{}
- _cnt = i32(0)
+ _cnt = int32(0)
_ap = args
_0:
- _1_N = int8(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFormat)) + 1*uintptr(i32(0))))) - i32(48))
- _1_min = int8(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFormat)) + 1*uintptr(i32(1))))) - i32(48))
- _1_val = i32(0)
+ _1_N = int8(int32(*elem1(_zFormat, 0)) - int32(48))
+ _1_min = int8(int32(*elem1(_zFormat, uintptr(1))) - int32(48))
+ _1_val = int32(0)
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFormat)) + 1*uintptr(i32(2))))) < i32(97) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFormat)) + 1*uintptr(i32(2))))) > i32(102) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18950), unsafe.Pointer((*int8)(unsafe.Pointer(&_getDigitsØ00__func__Ø000))), unsafe.Pointer(str(7186)))
+ if int32(*elem1(_zFormat, uintptr(2))) < int32(97) || int32(*elem1(_zFormat, uintptr(2))) > int32(102) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18950), unsafe.Pointer(&_getDigitsØ00__func__Ø000), unsafe.Pointer(str(7087)))
crt.X__builtin_abort(tls)
}
}()
- _1_max = *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_getDigitsØ00aMxØ001)) + 2*uintptr(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFormat)) + 1*uintptr(i32(2)))))-i32(97))))
- _nextC = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFormat)) + 1*uintptr(i32(3))))
- _1_val = i32(0)
+ _1_max = *elem20((*uint16)(unsafe.Pointer(&_getDigitsØ00aMxØ001)), uintptr(int32(*elem1(_zFormat, uintptr(2)))-int32(97)))
+ _nextC = *elem1(_zFormat, uintptr(3))
+ _1_val = int32(0)
_4:
- if postInc3(&_1_N, int8(-1)) == 0 {
+ if postInc5(&_1_N, -1) == 0 {
goto _5
}
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_zDate))))) & i32(4)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_zDate)))) & int32(4)) == 0 {
goto _end_getDigits
}
- _1_val = ((_1_val * i32(10)) + int32(*_zDate)) - i32(48)
+ _1_val = ((_1_val * int32(10)) + int32(*_zDate)) - int32(48)
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
goto _4
_5:
- if ((_1_val < int32(_1_min)) || (_1_val > int32(_1_max))) || ((int32(_nextC) != i32(0)) && (int32(_nextC) != int32(*_zDate))) {
+ if ((_1_val < int32(_1_min)) || (_1_val > int32(_1_max))) || ((int32(_nextC) != int32(0)) && (int32(_nextC) != int32(*_zDate))) {
goto _end_getDigits
}
*(*int32)(crt.VAPointer(&_ap)) = _1_val
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
_cnt += 1
- {
- p := &_zFormat
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(4))))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zFormat)) += uintptr(int32(4))
if _nextC != 0 {
goto _0
}
@@ -8419,237 +8386,217 @@ _end_getDigits:
var _getDigitsØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_getDigitsØ00__func__Ø000[0], str(7221), 10)
+ crt.Xstrncpy(nil, &_getDigitsØ00__func__Ø000[0], str(7122), 10)
}
var _getDigitsØ00aMxØ001 [6]uint16
func init() {
- _getDigitsØ00aMxØ001 = [6]uint16{u16(12), u16(14), u16(24), u16(31), u16(59), u16(9999)}
+ _getDigitsØ00aMxØ001 = [6]uint16{uint16(12), uint16(14), uint16(24), uint16(31), uint16(59), uint16(9999)}
}
-// Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF.
-// The HH, MM, and SS must each be exactly 2 digits. The
-// fractional seconds FFFF can be one or more digits.
-//
-// Return 1 if there is a parsing error and 0 on success.
+// C comment
+// /*
+// ** Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF.
+// ** The HH, MM, and SS must each be exactly 2 digits. The
+// ** fractional seconds FFFF can be one or more digits.
+// **
+// ** Return 1 if there is a parsing error and 0 on success.
+// */
func _parseHhMmSs(tls *crt.TLS, _zDate *int8, _p *XDateTime) (r0 int32) {
var _h, _m, _s int32
var _ms, _4_rScale float64
_ms = 0
- if _getDigits(tls, _zDate, str(7231), unsafe.Pointer(&_h), unsafe.Pointer(&_m)) != i32(2) {
- return i32(1)
- }
- {
- p := &_zDate
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(5))))
- sink0(*p)
+ if _getDigits(tls, _zDate, str(7132), unsafe.Pointer(&_h), unsafe.Pointer(&_m)) != int32(2) {
+ return int32(1)
}
- if int32(*_zDate) != i32(58) {
+ *(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(int32(5))
+ if int32(*_zDate) != int32(58) {
goto _1
}
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
- if _getDigits(tls, _zDate, str(7239), unsafe.Pointer(&_s)) != i32(1) {
- return i32(1)
+ if _getDigits(tls, _zDate, str(7140), unsafe.Pointer(&_s)) != int32(1) {
+ return int32(1)
}
- {
- p := &_zDate
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(2))))
- sink0(*p)
- }
- if int32(*_zDate) != i32(46) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zDate)) + 1*uintptr(i32(1)))))))))&i32(4)) == 0 {
+ *(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(int32(2))
+ if int32(*_zDate) != int32(46) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zDate, uintptr(1))))))&int32(4)) == 0 {
goto _4
}
_4_rScale = 1
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
_5:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_zDate))))) & i32(4)) != 0 {
- _ms = ((_ms * float64(10)) + float64(*_zDate)) - float64(i32(48))
- {
- p := &_4_rScale
- *p = (*p) * float64(10)
- sink4(*p)
- }
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_zDate)))) & int32(4)) != 0 {
+ _ms = ((_ms * float64(10)) + float64(*_zDate)) - (48)
+ _4_rScale *= float64(10)
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
goto _5
}
- {
- p := &_ms
- *p = (*p) / _4_rScale
- sink4(*p)
- }
+ _ms /= _4_rScale
_4:
goto _7
_1:
- _s = i32(0)
+ _s = int32(0)
_7:
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X9))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X11))) = int8(i32(1))
- *(*int32)(unsafe.Pointer(&(_p.X4))) = _h
- *(*int32)(unsafe.Pointer(&(_p.X5))) = _m
- *(*float64)(unsafe.Pointer(&(_p.X7))) = float64(_s) + _ms
+ _p.XvalidJD = 0
+ _p.XrawS = 0
+ _p.XvalidHMS = int8(1)
+ _p.Xh = _h
+ _p.Xm = _m
+ _p.Xs = float64(_s) + _ms
if _parseTimezone(tls, _zDate, _p) != 0 {
- return i32(1)
+ return int32(1)
}
- *(*int8)(unsafe.Pointer(&(_p.X12))) = int8(func() int32 {
- if (_p.X6) != i32(0) {
- return i32(1)
+ _p.XvalidTZ = int8(func() int32 {
+ if _p.Xtz != int32(0) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- return i32(0)
-}
-
-// Parse a timezone extension on the end of a date-time.
-// The extension is of the form:
-//
-// (+/-)HH:MM
-//
-// Or the "zulu" notation:
-//
-// Z
-//
-// If the parse is successful, write the number of minutes
-// of change in p->tz and return 0. If a parser error occurs,
-// return non-zero.
-//
-// A missing specifier is not considered an error.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Parse a timezone extension on the end of a date-time.
+// ** The extension is of the form:
+// **
+// ** (+/-)HH:MM
+// **
+// ** Or the "zulu" notation:
+// **
+// ** Z
+// **
+// ** If the parse is successful, write the number of minutes
+// ** of change in p->tz and return 0. If a parser error occurs,
+// ** return non-zero.
+// **
+// ** A missing specifier is not considered an error.
+// */
func _parseTimezone(tls *crt.TLS, _zDate *int8, _p *XDateTime) (r0 int32) {
var _sgn, _nHr, _nMn, _c int32
- _sgn = i32(0)
+ _sgn = int32(0)
_0:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_zDate))))) & i32(1)) != 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_zDate)))) & int32(1)) != 0 {
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
goto _0
}
- *(*int32)(unsafe.Pointer(&(_p.X6))) = i32(0)
+ _p.Xtz = int32(0)
_c = int32(*_zDate)
- if _c == i32(45) {
- _sgn = i32(-1)
+ if _c == int32(45) {
+ _sgn = int32(-1)
goto _5
}
- if _c == i32(43) {
- _sgn = i32(1)
+ if _c == int32(43) {
+ _sgn = int32(1)
goto _5
}
- if (_c == i32(90)) || (_c == i32(122)) {
+ if (_c == int32(90)) || (_c == int32(122)) {
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
goto _zulu_time
}
- return bool2int(_c != i32(0))
+ return bool2int(_c != int32(0))
_5:
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
- if _getDigits(tls, _zDate, str(7243), unsafe.Pointer(&_nHr), unsafe.Pointer(&_nMn)) != i32(2) {
- return i32(1)
- }
- {
- p := &_zDate
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(5))))
- sink0(*p)
+ if _getDigits(tls, _zDate, str(7144), unsafe.Pointer(&_nHr), unsafe.Pointer(&_nMn)) != int32(2) {
+ return int32(1)
}
- *(*int32)(unsafe.Pointer(&(_p.X6))) = _sgn * (_nMn + (_nHr * i32(60)))
+ *(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(int32(5))
+ _p.Xtz = _sgn * (_nMn + (_nHr * int32(60)))
_zulu_time:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_zDate))))) & i32(1)) != 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_zDate)))) & int32(1)) != 0 {
*(*uintptr)(unsafe.Pointer(&_zDate)) += uintptr(1)
goto _zulu_time
}
- *(*int8)(unsafe.Pointer(&(_p.X13))) = int8(i32(1))
- return bool2int(int32(*_zDate) != i32(0))
+ _p.XtzSet = int8(1)
+ return bool2int(int32(*_zDate) != int32(0))
}
-// Convert from YYYY-MM-DD HH:MM:SS to julian day. We always assume
-// that the YYYY-MM-DD is according to the Gregorian calendar.
-//
-// Reference: Meeus page 61
+// C comment
+// /*
+// ** Convert from YYYY-MM-DD HH:MM:SS to julian day. We always assume
+// ** that the YYYY-MM-DD is according to the Gregorian calendar.
+// **
+// ** Reference: Meeus page 61
+// */
func _computeJD(tls *crt.TLS, _p *XDateTime) {
var _Y, _M, _D, _A, _B, _X1, _X2 int32
- if (_p.X8) != 0 {
+ if _p.XvalidJD != 0 {
return
}
- if (_p.X10) != 0 {
- _Y = _p.X1
- _M = _p.X2
- _D = _p.X3
+ if _p.XvalidYMD != 0 {
+ _Y = _p.XY
+ _M = _p.XM
+ _D = _p.XD
goto _2
}
- _Y = i32(2000)
- _M = i32(1)
- _D = i32(1)
+ _Y = int32(2000)
+ _M = int32(1)
+ _D = int32(1)
_2:
- if ((_Y < i32(-4713)) || (_Y > i32(9999))) || ((_p.X9) != 0) {
+ if ((_Y < int32(-4713)) || (_Y > int32(9999))) || (_p.XrawS != 0) {
_datetimeError(tls, _p)
return
}
- if _M <= i32(2) {
+ if _M <= int32(2) {
_Y -= 1
- {
- p := &_M
- *p = (*p) + i32(12)
- sink1(*p)
- }
- }
- _A = _Y / i32(100)
- _B = (i32(2) - _A) + (_A / i32(4))
- _X1 = (i32(36525) * (_Y + i32(4716))) / i32(100)
- _X2 = (i32(306001) * (_M + i32(1))) / i32(10000)
- *(*int64)(unsafe.Pointer(&(_p.X0))) = int64((float64(((_X1+_X2)+_D)+_B) - (1524.5)) * float64(i32(86400000)))
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(1))
- if (_p.X11) == 0 {
+ _M += int32(12)
+ }
+ _A = _Y / int32(100)
+ _B = (int32(2) - _A) + (_A / int32(4))
+ _X1 = (int32(36525) * (_Y + int32(4716))) / int32(100)
+ _X2 = (int32(306001) * (_M + int32(1))) / int32(10000)
+ _p.XiJD = int64((float64(((_X1+_X2)+_D)+_B) - (1524.5)) * (8.64e+07))
+ _p.XvalidJD = int8(1)
+ if _p.XvalidHMS == 0 {
goto _7
}
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + (int64(((_p.X4)*i32(3600000))+((_p.X5)*i32(60000))) + int64((_p.X7)*float64(i32(1000))))
- sink6(*p)
- }
- if (_p.X12) != 0 {
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) - int64((_p.X6)*i32(60000))
- sink6(*p)
- }
- *(*int8)(unsafe.Pointer(&(_p.X10))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X11))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X12))) = int8(i32(0))
+ _p.XiJD += int64((_p.Xh*int32(3600000))+(_p.Xm*int32(60000))) + int64(_p.Xs*(1000))
+ if _p.XvalidTZ != 0 {
+ _p.XiJD -= int64(_p.Xtz * int32(60000))
+ _p.XvalidYMD = 0
+ _p.XvalidHMS = 0
+ _p.XvalidTZ = 0
}
_7:
}
-// Put the DateTime object into its error state.
+// C comment
+// /*
+// ** Put the DateTime object into its error state.
+// */
func _datetimeError(tls *crt.TLS, _p *XDateTime) {
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(48))
- *(*int8)(unsafe.Pointer(&(_p.X14))) = int8(i32(1))
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(48))
+ _p.XisError = int8(1)
}
func Xsqlite3_value_bytes(tls *crt.TLS, _pVal *XMem) (r0 int32) {
- return _sqlite3ValueBytes(tls, _pVal, uint8(i32(1)))
+ return _sqlite3ValueBytes(tls, _pVal, uint8(1))
}
func _sqlite3ValueBytes(tls *crt.TLS, _pVal *XMem, _enc uint8) (r0 int32) {
var _p *XMem
_p = _pVal
func() {
- if (int32(_p.X1)&i32(1)) != i32(0) && (int32(_p.X1)&i32(18)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71404), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ValueBytesØ00__func__Ø000))), unsafe.Pointer(str(7251)))
+ if (int32(_p.Xflags)&int32(1)) != int32(0) && (int32(_p.Xflags)&int32(18)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71404), unsafe.Pointer(&_sqlite3ValueBytesØ00__func__Ø000), unsafe.Pointer(str(7152)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_p.X1) & i32(2)) != i32(0)) && (int32(_pVal.X2) == int32(_enc)) {
- return _p.X4
+ if ((int32(_p.Xflags) & int32(2)) != int32(0)) && (int32(_pVal.Xenc) == int32(_enc)) {
+ return _p.Xn
}
- if (int32(_p.X1) & i32(16)) == i32(0) {
+ if (int32(_p.Xflags) & int32(16)) == int32(0) {
goto _5
}
- if (int32(_p.X1) & i32(16384)) != 0 {
- return (_p.X4) + (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_p.X0))))))
+ if (int32(_p.Xflags) & int32(16384)) != 0 {
+ return _p.Xn + (*(*int32)(unsafe.Pointer(&_p.Xu)))
}
- return _p.X4
+ return _p.Xn
_5:
- if (int32(_p.X1) & i32(1)) != 0 {
- return i32(0)
+ if (int32(_p.Xflags) & int32(1)) != 0 {
+ return int32(0)
}
return _valueBytes(tls, _pVal, _enc)
}
@@ -8657,286 +8604,252 @@ _5:
var _sqlite3ValueBytesØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ValueBytesØ00__func__Ø000[0], str(7314), 18)
+ crt.Xstrncpy(nil, &_sqlite3ValueBytesØ00__func__Ø000[0], str(7215), 18)
}
-// The sqlite3ValueBytes() routine returns the number of bytes in the
-// sqlite3_value object assuming that it uses the encoding "enc".
-// The valueBytes() routine is a helper function.
+// C comment
+// /*
+// ** The sqlite3ValueBytes() routine returns the number of bytes in the
+// ** sqlite3_value object assuming that it uses the encoding "enc".
+// ** The valueBytes() routine is a helper function.
+// */
func _valueBytes(tls *crt.TLS, _pVal *XMem, _enc uint8) (r0 int32) {
return func() int32 {
if _valueToText(tls, _pVal, _enc) != nil {
- return (_pVal.X4)
- }
- return i32(0)
- }()
-}
-
-// Process a modifier to a date-time stamp. The modifiers are
-// as follows:
-//
-// NNN days
-// NNN hours
-// NNN minutes
-// NNN.NNNN seconds
-// NNN months
-// NNN years
-// start of month
-// start of year
-// start of week
-// start of day
-// weekday N
-// unixepoch
-// localtime
-// utc
-//
-// Return 0 on success and 1 if there is any kind of error. If the error
-// is in a system call (i.e. localtime()), then an error message is written
-// to context pCtx. If the error is an unrecognized modifier, no error is
-// written to pCtx.
+ return _pVal.Xn
+ }
+ return int32(0)
+ }()
+}
+
+// C comment
+// /*
+// ** Process a modifier to a date-time stamp. The modifiers are
+// ** as follows:
+// **
+// ** NNN days
+// ** NNN hours
+// ** NNN minutes
+// ** NNN.NNNN seconds
+// ** NNN months
+// ** NNN years
+// ** start of month
+// ** start of year
+// ** start of week
+// ** start of day
+// ** weekday N
+// ** unixepoch
+// ** localtime
+// ** utc
+// **
+// ** Return 0 on success and 1 if there is any kind of error. If the error
+// ** is in a system call (i.e. localtime()), then an error message is written
+// ** to context pCtx. If the error is an unrecognized modifier, no error is
+// ** written to pCtx.
+// */
func _parseModifier(tls *crt.TLS, _pCtx *Xsqlite3_context, _z *int8, _n int32, _p *XDateTime) (r0 int32) {
var _rc, _17_i, _24_x, _25_y int32
var _8_c1, _12_Z, _20_day int64
var _20_z2 *int8
var _r, _17_rRounder float64
var _20_tx XDateTime
- _rc = i32(1)
- switch int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))))))) {
- case i32(43):
+ _rc = int32(1)
+ switch int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(*elem1(_z, 0))))) {
+ case int32(43):
goto _5
- case i32(45):
+ case int32(45):
goto _5
- case i32(48):
+ case int32(48):
goto _5
- case i32(49):
+ case int32(49):
goto _5
- case i32(50):
+ case int32(50):
goto _5
- case i32(51):
+ case int32(51):
goto _5
- case i32(52):
+ case int32(52):
goto _5
- case i32(53):
+ case int32(53):
goto _5
- case i32(54):
+ case int32(54):
goto _5
- case i32(55):
+ case int32(55):
goto _5
- case i32(56):
+ case int32(56):
goto _5
- case i32(57):
+ case int32(57):
goto _5
- case i32(108):
+ case int32(108):
goto _1
- case i32(115):
+ case int32(115):
goto _4
- case i32(117):
+ case int32(117):
goto _2
- case i32(119):
+ case int32(119):
goto _3
default:
goto _17
}
_1:
- if Xsqlite3_stricmp(tls, _z, str(7332)) == i32(0) {
+ if Xsqlite3_stricmp(tls, _z, str(7233)) == int32(0) {
_computeJD(tls, _p)
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + _localtimeOffset(tls, _p, _pCtx, &_rc)
- sink6(*p)
- }
+ _p.XiJD += _localtimeOffset(tls, _p, _pCtx, &_rc)
_clearYMD_HMS_TZ(tls, _p)
}
goto _19
_2:
- if Xsqlite3_stricmp(tls, _z, str(7342)) != i32(0) || (_p.X9) == 0 {
+ if Xsqlite3_stricmp(tls, _z, str(7243)) != int32(0) || _p.XrawS == 0 {
goto _21
}
- _r = ((_p.X7) * float64(1000)) + (2.1086676e+14)
+ _r = (_p.Xs * float64(1000)) + (2.1086676e+14)
if (_r >= float64(0)) && (_r < (4.642690608e+14)) {
_clearYMD_HMS_TZ(tls, _p)
- *(*int64)(unsafe.Pointer(&(_p.X0))) = int64(_r)
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(1))
- *(*int8)(unsafe.Pointer(&(_p.X9))) = int8(i32(0))
- _rc = i32(0)
+ _p.XiJD = int64(_r)
+ _p.XvalidJD = int8(1)
+ _p.XrawS = 0
+ _rc = int32(0)
}
goto _25
_21:
- if Xsqlite3_stricmp(tls, _z, str(7352)) != i32(0) {
+ if Xsqlite3_stricmp(tls, _z, str(7253)) != int32(0) {
goto _25
}
- if int32(_p.X13) != i32(0) {
+ if int32(_p.XtzSet) != int32(0) {
goto _26
}
_computeJD(tls, _p)
_8_c1 = _localtimeOffset(tls, _p, _pCtx, &_rc)
- if _rc == i32(0) {
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) - _8_c1
- sink6(*p)
- }
+ if _rc == int32(0) {
+ _p.XiJD -= _8_c1
_clearYMD_HMS_TZ(tls, _p)
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + (_8_c1 - _localtimeOffset(tls, _p, _pCtx, &_rc))
- sink6(*p)
- }
+ _p.XiJD += _8_c1 - _localtimeOffset(tls, _p, _pCtx, &_rc)
}
- *(*int8)(unsafe.Pointer(&(_p.X13))) = int8(i32(1))
+ _p.XtzSet = int8(1)
goto _28
_26:
- _rc = i32(0)
+ _rc = int32(0)
_28:
_25:
goto _19
_3:
- if Xsqlite3_strnicmp(tls, _z, str(7356), i32(8)) != i32(0) || _sqlite3AtoF(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(i32(8)))), &_r, _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(i32(8))))), uint8(i32(1))) == 0 || float64(store1(&_n, int32(_r))) != _r || _n < i32(0) || _r >= float64(i32(7)) {
+ if Xsqlite3_strnicmp(tls, _z, str(7257), int32(8)) != int32(0) || _sqlite3AtoF(tls, elem1(_z, uintptr(8)), &_r, _sqlite3Strlen30(tls, elem1(_z, uintptr(8))), uint8(1)) == 0 || float64(store2(&_n, int32(_r))) != _r || _n < int32(0) || _r >= (7) {
goto _33
}
_computeYMD_HMS(tls, _p)
- *(*int8)(unsafe.Pointer(&(_p.X12))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(0))
+ _p.XvalidTZ = 0
+ _p.XvalidJD = 0
_computeJD(tls, _p)
- _12_Z = (((_p.X0) + int64(i32(129600000))) / int64(i32(86400000))) % int64(i32(7))
+ _12_Z = ((_p.XiJD + int64(129600000)) / int64(86400000)) % int64(7)
if _12_Z > int64(_n) {
- {
- p := &_12_Z
- *p = (*p) - int64(i32(7))
- sink6(*p)
- }
- }
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + ((int64(_n) - _12_Z) * int64(i32(86400000)))
- sink6(*p)
+ _12_Z -= int64(7)
}
+ _p.XiJD += (int64(_n) - _12_Z) * int64(86400000)
_clearYMD_HMS_TZ(tls, _p)
- _rc = i32(0)
+ _rc = int32(0)
_33:
goto _19
_4:
- if Xsqlite3_strnicmp(tls, _z, str(7365), i32(9)) != i32(0) {
+ if Xsqlite3_strnicmp(tls, _z, str(7266), int32(9)) != int32(0) {
goto _19
}
- if (((_p.X8) == 0) && ((_p.X10) == 0)) && ((_p.X11) == 0) {
+ if ((_p.XvalidJD == 0) && (_p.XvalidYMD == 0)) && (_p.XvalidHMS == 0) {
goto _19
}
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(9))))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(int32(9))
_computeYMD(tls, _p)
- *(*int8)(unsafe.Pointer(&(_p.X11))) = int8(i32(1))
- *(*int32)(unsafe.Pointer(&(_p.X4))) = store1((*int32)(unsafe.Pointer(&(_p.X5))), i32(0))
- *(*float64)(unsafe.Pointer(&(_p.X7))) = float64(0)
- *(*int8)(unsafe.Pointer(&(_p.X9))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X12))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(0))
- if Xsqlite3_stricmp(tls, _z, str(7375)) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_p.X3))) = i32(1)
- _rc = i32(0)
+ _p.XvalidHMS = int8(1)
+ _p.Xh = store2(&_p.Xm, int32(0))
+ _p.Xs = float64(0)
+ _p.XrawS = 0
+ _p.XvalidTZ = 0
+ _p.XvalidJD = 0
+ if Xsqlite3_stricmp(tls, _z, str(7276)) == int32(0) {
+ _p.XD = int32(1)
+ _rc = int32(0)
goto _43
}
- if Xsqlite3_stricmp(tls, _z, str(7381)) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_p.X2))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_p.X3))) = i32(1)
- _rc = i32(0)
+ if Xsqlite3_stricmp(tls, _z, str(7282)) == int32(0) {
+ _p.XM = int32(1)
+ _p.XD = int32(1)
+ _rc = int32(0)
goto _43
}
- if Xsqlite3_stricmp(tls, _z, str(7386)) == i32(0) {
- _rc = i32(0)
+ if Xsqlite3_stricmp(tls, _z, str(7287)) == int32(0) {
+ _rc = int32(0)
}
_43:
goto _19
_5:
- _n = i32(1)
+ _n = int32(1)
_44:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) == 0 || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) == i32(58) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n))))))))&i32(1)) != 0 {
+ if (*elem1(_z, uintptr(_n))) == 0 || int32(*elem1(_z, uintptr(_n))) == int32(58) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_z, uintptr(_n))))))&int32(1)) != 0 {
goto _49
}
_n += 1
goto _44
_49:
- if _sqlite3AtoF(tls, _z, &_r, _n, uint8(i32(1))) == 0 {
- _rc = i32(1)
+ if _sqlite3AtoF(tls, _z, &_r, _n, uint8(1)) == 0 {
+ _rc = int32(1)
goto _19
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) != i32(58) {
+ if int32(*elem1(_z, uintptr(_n))) != int32(58) {
goto _51
}
_20_z2 = _z
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_20_z2))))) & i32(4)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_20_z2)))) & int32(4)) == 0 {
*(*uintptr)(unsafe.Pointer(&_20_z2)) += uintptr(1)
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_20_tx), i32(0), u32(48))
+ crt.Xmemset(tls, unsafe.Pointer(&_20_tx), int32(0), uint32(48))
if _parseHhMmSs(tls, _20_z2, &_20_tx) != 0 {
goto _19
}
_computeJD(tls, &_20_tx)
- {
- p := (*int64)(unsafe.Pointer(&(_20_tx.X0)))
- *p = (*p) - int64(i32(43200000))
- sink6(*p)
- }
- _20_day = (_20_tx.X0) / int64(i32(86400000))
- {
- p := (*int64)(unsafe.Pointer(&(_20_tx.X0)))
- *p = (*p) - (_20_day * int64(i32(86400000)))
- sink6(*p)
- }
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) == i32(45) {
- *(*int64)(unsafe.Pointer(&(_20_tx.X0))) = -(_20_tx.X0)
+ _20_tx.XiJD -= int64(43200000)
+ _20_day = _20_tx.XiJD / int64(86400000)
+ _20_tx.XiJD -= _20_day * int64(86400000)
+ if int32(*elem1(_z, 0)) == int32(45) {
+ _20_tx.XiJD = -_20_tx.XiJD
}
_computeJD(tls, _p)
_clearYMD_HMS_TZ(tls, _p)
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + (_20_tx.X0)
- sink6(*p)
- }
- _rc = i32(0)
+ _p.XiJD += _20_tx.XiJD
+ _rc = int32(0)
goto _19
_51:
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n)))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_n)
_55:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_z))))) & i32(1)) != 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_z)))) & int32(1)) != 0 {
*(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
goto _55
}
_n = _sqlite3Strlen30(tls, _z)
- if (_n > i32(10)) || (_n < i32(3)) {
+ if (_n > int32(10)) || (_n < int32(3)) {
goto _19
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n-i32(1))))))))) == i32(115) {
+ if int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(*elem1(_z, uintptr(_n-int32(1))))))) == int32(115) {
_n -= 1
}
_computeJD(tls, _p)
- _rc = i32(1)
+ _rc = int32(1)
_17_rRounder = func() float64 {
- if _r < float64(i32(0)) {
+ if _r < (0) {
return (-0.5)
}
return (0.5)
}()
- _17_i = i32(0)
+ _17_i = int32(0)
_62:
- if _17_i >= i32(6) {
+ if _17_i >= int32(6) {
goto _65
}
- if int32((*t16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aXformType))+24*uintptr(_17_i))).X1) != _n || Xsqlite3_strnicmp(tls, (*t16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aXformType))+24*uintptr(_17_i))).X2, _z, _n) != i32(0) || _r <= (-((*t16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aXformType)) + 24*uintptr(_17_i))).X3)) || _r >= ((*t16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aXformType))+24*uintptr(_17_i))).X3) {
+ if int32(elem21((*t22)(unsafe.Pointer(&_aXformType)), uintptr(_17_i)).XnName) != _n || Xsqlite3_strnicmp(tls, elem21((*t22)(unsafe.Pointer(&_aXformType)), uintptr(_17_i)).XzName, _z, _n) != int32(0) || _r <= (-(elem21((*t22)(unsafe.Pointer(&_aXformType)), uintptr(_17_i)).XrLimit)) || _r >= (elem21((*t22)(unsafe.Pointer(&_aXformType)), uintptr(_17_i)).XrLimit) {
goto _69
}
- switch int32((*t16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aXformType)) + 24*uintptr(_17_i))).X0) {
- case i32(1):
+ switch int32(elem21((*t22)(unsafe.Pointer(&_aXformType)), uintptr(_17_i)).XeType) {
+ case int32(1):
goto _71
- case i32(2):
+ case int32(2):
goto _72
default:
goto _73
@@ -8944,57 +8857,29 @@ _62:
_71:
_computeYMD_HMS(tls, _p)
- {
- p := (*int32)(unsafe.Pointer(&(_p.X2)))
- *p = (*p) + int32(_r)
- sink1(*p)
- }
+ _p.XM += int32(_r)
_24_x = func() int32 {
- if (_p.X2) > i32(0) {
- return (((_p.X2) - i32(1)) / i32(12))
+ if _p.XM > int32(0) {
+ return ((_p.XM - int32(1)) / int32(12))
}
- return (((_p.X2) - i32(12)) / i32(12))
+ return ((_p.XM - int32(12)) / int32(12))
}()
- {
- p := (*int32)(unsafe.Pointer(&(_p.X1)))
- *p = (*p) + _24_x
- sink1(*p)
- }
- {
- p := (*int32)(unsafe.Pointer(&(_p.X2)))
- *p = (*p) - (_24_x * i32(12))
- sink1(*p)
- }
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(0))
- {
- p := &_r
- *p = (*p) - float64(int32(_r))
- sink4(*p)
- }
+ _p.XY += _24_x
+ _p.XM -= _24_x * int32(12)
+ _p.XvalidJD = 0
+ _r -= float64(int32(_r))
goto _73
_72:
_25_y = int32(_r)
_computeYMD_HMS(tls, _p)
- {
- p := (*int32)(unsafe.Pointer(&(_p.X1)))
- *p = (*p) + _25_y
- sink1(*p)
- }
- *(*int8)(unsafe.Pointer(&(_p.X8))) = int8(i32(0))
- {
- p := &_r
- *p = (*p) - float64(int32(_r))
- sink4(*p)
- }
+ _p.XY += _25_y
+ _p.XvalidJD = 0
+ _r -= float64(int32(_r))
goto _73
_73:
_computeJD(tls, _p)
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + int64((_r*((*t16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aXformType))+24*uintptr(_17_i))).X4))+_17_rRounder)
- sink6(*p)
- }
- _rc = i32(0)
+ _p.XiJD += int64((_r * (elem21((*t22)(unsafe.Pointer(&_aXformType)), uintptr(_17_i)).XrXform)) + _17_rRounder)
+ _rc = int32(0)
goto _65
_69:
_17_i += 1
@@ -9006,195 +8891,195 @@ _17:
goto _19
_19:
return _rc
-
- _ = _20_tx
- panic(0)
}
-// Some systems have stricmp(). Others have strcasecmp(). Because
-// there is no consistency, we will define our own.
-//
-// IMPLEMENTATION-OF: R-30243-02494 The sqlite3_stricmp() and
-// sqlite3_strnicmp() APIs allow applications and extensions to compare
-// the contents of two buffers containing UTF-8 strings in a
-// case-independent fashion, using the same definition of "case
-// independence" that SQLite uses internally when comparing identifiers.
+// C comment
+// /*
+// ** Some systems have stricmp(). Others have strcasecmp(). Because
+// ** there is no consistency, we will define our own.
+// **
+// ** IMPLEMENTATION-OF: R-30243-02494 The sqlite3_stricmp() and
+// ** sqlite3_strnicmp() APIs allow applications and extensions to compare
+// ** the contents of two buffers containing UTF-8 strings in a
+// ** case-independent fashion, using the same definition of "case
+// ** independence" that SQLite uses internally when comparing identifiers.
+// */
func Xsqlite3_stricmp(tls *crt.TLS, _zLeft *int8, _zRight *int8) (r0 int32) {
if _zLeft == nil {
return func() int32 {
if _zRight != nil {
- return i32(-1)
+ return int32(-1)
}
- return i32(0)
+ return int32(0)
}()
}
if _zRight == nil {
- return i32(1)
+ return int32(1)
}
return _sqlite3StrICmp(tls, _zLeft, _zRight)
}
-// Compute the difference (in milliseconds) between localtime and UTC
-// (a.k.a. GMT) for the time value p where p is in UTC. If no error occurs,
-// return this value and set *pRc to SQLITE_OK.
-//
-// Or, if an error does occur, set *pRc to SQLITE_ERROR. The returned value
-// is undefined in this case.
+// C comment
+// /*
+// ** Compute the difference (in milliseconds) between localtime and UTC
+// ** (a.k.a. GMT) for the time value p where p is in UTC. If no error occurs,
+// ** return this value and set *pRc to SQLITE_OK.
+// **
+// ** Or, if an error does occur, set *pRc to SQLITE_ERROR. The returned value
+// ** is undefined in this case.
+// */
func _localtimeOffset(tls *crt.TLS, _p *XDateTime, _pCtx *Xsqlite3_context, _pRc *int32) (r0 int64) {
var _t, _2_s int32
var _sLocal crt.Xtm
var _x, _y XDateTime
- crt.Xmemset(tls, (unsafe.Pointer)(&_sLocal), i32(0), u32(44))
+ crt.Xmemset(tls, unsafe.Pointer(&_sLocal), int32(0), uint32(44))
_x = *_p
_computeYMD_HMS(tls, &_x)
- if ((_x.X1) < i32(1971)) || ((_x.X1) >= i32(2038)) {
- *(*int32)(unsafe.Pointer(&(_x.X1))) = i32(2000)
- *(*int32)(unsafe.Pointer(&(_x.X2))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_x.X3))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_x.X4))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_x.X5))) = i32(0)
- *(*float64)(unsafe.Pointer(&(_x.X7))) = float64(0)
+ if (_x.XY < int32(1971)) || (_x.XY >= int32(2038)) {
+ _x.XY = int32(2000)
+ _x.XM = int32(1)
+ _x.XD = int32(1)
+ _x.Xh = int32(0)
+ _x.Xm = int32(0)
+ _x.Xs = float64(0)
goto _2
}
- _2_s = int32((_x.X7) + (0.5))
- *(*float64)(unsafe.Pointer(&(_x.X7))) = float64(_2_s)
+ _2_s = int32(_x.Xs + (0.5))
+ _x.Xs = float64(_2_s)
_2:
- *(*int32)(unsafe.Pointer(&(_x.X6))) = i32(0)
- *(*int8)(unsafe.Pointer(&(_x.X8))) = int8(i32(0))
+ _x.Xtz = int32(0)
+ _x.XvalidJD = 0
_computeJD(tls, &_x)
- _t = int32(((_x.X0) / int64(i32(1000))) - i64(210866760000))
+ _t = int32((_x.XiJD / int64(1000)) - int64(210866760000))
if _osLocaltime(tls, &_t, &_sLocal) != 0 {
- Xsqlite3_result_error(tls, _pCtx, str(7390), i32(-1))
- *_pRc = i32(1)
- return int64(i32(0))
- }
- *(*int32)(unsafe.Pointer(&(_y.X1))) = (_sLocal.X5) + i32(1900)
- *(*int32)(unsafe.Pointer(&(_y.X2))) = (_sLocal.X4) + i32(1)
- *(*int32)(unsafe.Pointer(&(_y.X3))) = _sLocal.X3
- *(*int32)(unsafe.Pointer(&(_y.X4))) = _sLocal.X2
- *(*int32)(unsafe.Pointer(&(_y.X5))) = _sLocal.X1
- *(*float64)(unsafe.Pointer(&(_y.X7))) = float64(_sLocal.X0)
- *(*int8)(unsafe.Pointer(&(_y.X10))) = int8(i32(1))
- *(*int8)(unsafe.Pointer(&(_y.X11))) = int8(i32(1))
- *(*int8)(unsafe.Pointer(&(_y.X8))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_y.X9))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_y.X12))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_y.X14))) = int8(i32(0))
+ Xsqlite3_result_error(tls, _pCtx, str(7291), int32(-1))
+ *_pRc = int32(1)
+ return 0
+ }
+ _y.XY = _sLocal.Xtm_year + int32(1900)
+ _y.XM = _sLocal.Xtm_mon + int32(1)
+ _y.XD = _sLocal.Xtm_mday
+ _y.Xh = _sLocal.Xtm_hour
+ _y.Xm = _sLocal.Xtm_min
+ _y.Xs = float64(_sLocal.Xtm_sec)
+ _y.XvalidYMD = int8(1)
+ _y.XvalidHMS = int8(1)
+ _y.XvalidJD = 0
+ _y.XrawS = 0
+ _y.XvalidTZ = 0
+ _y.XisError = 0
_computeJD(tls, &_y)
- *_pRc = i32(0)
- return (_y.X0) - (_x.X0)
-
- _ = _x
- _ = _y
- _ = _t
- _ = _sLocal
- panic(0)
+ *_pRc = int32(0)
+ return _y.XiJD - _x.XiJD
}
-// Compute both YMD and HMS
+// C comment
+// /*
+// ** Compute both YMD and HMS
+// */
func _computeYMD_HMS(tls *crt.TLS, _p *XDateTime) {
_computeYMD(tls, _p)
_computeHMS(tls, _p)
}
-// Compute the Year, Month, and Day from the julian day number.
+// C comment
+// /*
+// ** Compute the Year, Month, and Day from the julian day number.
+// */
func _computeYMD(tls *crt.TLS, _p *XDateTime) {
var _Z, _A, _B, _C, _D, _E, _X1 int32
- if (_p.X10) != 0 {
+ if _p.XvalidYMD != 0 {
return
}
- if (_p.X8) == 0 {
- *(*int32)(unsafe.Pointer(&(_p.X1))) = i32(2000)
- *(*int32)(unsafe.Pointer(&(_p.X2))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_p.X3))) = i32(1)
+ if _p.XvalidJD == 0 {
+ _p.XY = int32(2000)
+ _p.XM = int32(1)
+ _p.XD = int32(1)
goto _4
}
- if _validJulianDay(tls, _p.X0) == 0 {
+ if _validJulianDay(tls, _p.XiJD) == 0 {
_datetimeError(tls, _p)
return
}
- _Z = int32(((_p.X0) + int64(i32(43200000))) / int64(i32(86400000)))
+ _Z = int32((_p.XiJD + int64(43200000)) / int64(86400000))
_A = int32((float64(_Z) - (1.86721625e+06)) / (36524.25))
- _A = ((_Z + i32(1)) + _A) - (_A / i32(4))
- _B = _A + i32(1524)
+ _A = ((_Z + int32(1)) + _A) - (_A / int32(4))
+ _B = _A + int32(1524)
_C = int32((float64(_B) - (122.1)) / (365.25))
- _D = (i32(36525) * (_C & i32(32767))) / i32(100)
+ _D = (int32(36525) * (_C & int32(32767))) / int32(100)
_E = int32(float64(_B-_D) / (30.6001))
_X1 = int32((30.6001) * float64(_E))
- *(*int32)(unsafe.Pointer(&(_p.X3))) = (_B - _D) - _X1
- *(*int32)(unsafe.Pointer(&(_p.X2))) = func() int32 {
- if _E < i32(14) {
- return (_E - i32(1))
+ _p.XD = (_B - _D) - _X1
+ _p.XM = func() int32 {
+ if _E < int32(14) {
+ return (_E - int32(1))
}
- return (_E - i32(13))
+ return (_E - int32(13))
}()
- *(*int32)(unsafe.Pointer(&(_p.X1))) = func() int32 {
- if (_p.X2) > i32(2) {
- return (_C - i32(4716))
+ _p.XY = func() int32 {
+ if _p.XM > int32(2) {
+ return (_C - int32(4716))
}
- return (_C - i32(4715))
+ return (_C - int32(4715))
}()
_4:
- *(*int8)(unsafe.Pointer(&(_p.X10))) = int8(i32(1))
+ _p.XvalidYMD = int8(1)
}
-// Return TRUE if the given julian day number is within range.
-//
-// The input is the JulianDay times 86400000.
+// C comment
+// /*
+// ** Return TRUE if the given julian day number is within range.
+// **
+// ** The input is the JulianDay times 86400000.
+// */
func _validJulianDay(tls *crt.TLS, _iJD int64) (r0 int32) {
- return bool2int((_iJD >= int64(i32(0))) && (_iJD <= i64(464269060799999)))
+ return bool2int((_iJD >= (0)) && (_iJD <= int64(464269060799999)))
}
-// Compute the Hour, Minute, and Seconds from the julian day number.
+// C comment
+// /*
+// ** Compute the Hour, Minute, and Seconds from the julian day number.
+// */
func _computeHMS(tls *crt.TLS, _p *XDateTime) {
var _s int32
- if (_p.X11) != 0 {
+ if _p.XvalidHMS != 0 {
return
}
_computeJD(tls, _p)
- _s = int32(((_p.X0) + int64(i32(43200000))) % int64(i32(86400000)))
- *(*float64)(unsafe.Pointer(&(_p.X7))) = float64(_s) / float64(1000)
- _s = int32(_p.X7)
- {
- p := (*float64)(unsafe.Pointer(&(_p.X7)))
- *p = (*p) - float64(_s)
- sink4(*p)
- }
- *(*int32)(unsafe.Pointer(&(_p.X4))) = _s / i32(3600)
- {
- p := &_s
- *p = (*p) - ((_p.X4) * i32(3600))
- sink1(*p)
- }
- *(*int32)(unsafe.Pointer(&(_p.X5))) = _s / i32(60)
- {
- p := (*float64)(unsafe.Pointer(&(_p.X7)))
- *p = (*p) + float64(_s-((_p.X5)*i32(60)))
- sink4(*p)
- }
- *(*int8)(unsafe.Pointer(&(_p.X9))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X11))) = int8(i32(1))
-}
-
-// The following routine implements the rough equivalent of localtime_r()
-// using whatever operating-system specific localtime facility that
-// is available. This routine returns 0 on success and
-// non-zero on any kind of error.
-//
-// If the sqlite3GlobalConfig.bLocaltimeFault variable is true then this
-// routine will always fail.
-//
-// EVIDENCE-OF: R-62172-00036 In this implementation, the standard C
-// library function localtime_r() is used to assist in the calculation of
-// local time.
+ _s = int32((_p.XiJD + int64(43200000)) % int64(86400000))
+ _p.Xs = float64(_s) / float64(1000)
+ _s = int32(_p.Xs)
+ _p.Xs -= float64(_s)
+ _p.Xh = _s / int32(3600)
+ _s -= _p.Xh * int32(3600)
+ _p.Xm = _s / int32(60)
+ _p.Xs += float64(_s - (_p.Xm * int32(60)))
+ _p.XrawS = 0
+ _p.XvalidHMS = int8(1)
+}
+
+// C comment
+// /*
+// ** The following routine implements the rough equivalent of localtime_r()
+// ** using whatever operating-system specific localtime facility that
+// ** is available. This routine returns 0 on success and
+// ** non-zero on any kind of error.
+// **
+// ** If the sqlite3GlobalConfig.bLocaltimeFault variable is true then this
+// ** routine will always fail.
+// **
+// ** EVIDENCE-OF: R-62172-00036 In this implementation, the standard C
+// ** library function localtime_r() is used to assist in the calculation of
+// ** local time.
+// */
func _osLocaltime(tls *crt.TLS, _t *int32, _pTm *crt.Xtm) (r0 int32) {
var _rc int32
var _mutex *Xsqlite3_mutex
var _pX *crt.Xtm
- _mutex = _sqlite3MutexAlloc(tls, i32(2))
+ _mutex = _sqlite3MutexAlloc(tls, int32(2))
Xsqlite3_mutex_enter(tls, _mutex)
_pX = crt.Xlocaltime(tls, _t)
- if (_sqlite3Config.X38) != 0 {
+ if _sqlite3Config.XbLocaltimeFault != 0 {
_pX = nil
}
if _pX != nil {
@@ -9207,27 +9092,30 @@ func _osLocaltime(tls *crt.TLS, _t *int32, _pTm *crt.Xtm) (r0 int32) {
func Xsqlite3_result_error(tls *crt.TLS, _pCtx *Xsqlite3_context, _z *int8, _n int32) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76451), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_errorØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76451), unsafe.Pointer(&_sqlite3_result_errorØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pCtx.X5))) = i32(1)
- *(*uint8)(unsafe.Pointer(&(_pCtx.X7))) = uint8(i32(1))
- _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.X0), _z, _n, uint8(i32(1)), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ _pCtx.XisError = int32(1)
+ _pCtx.XfErrorOrAux = uint8(1)
+ _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.XpOut), _z, _n, uint8(1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
}
var _sqlite3_result_errorØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_errorØ00__func__Ø000[0], str(7413), 21)
+ crt.Xstrncpy(nil, &_sqlite3_result_errorØ00__func__Ø000[0], str(7314), 21)
}
-// Clear the YMD and HMS and the TZ
+// C comment
+// /*
+// ** Clear the YMD and HMS and the TZ
+// */
func _clearYMD_HMS_TZ(tls *crt.TLS, _p *XDateTime) {
- *(*int8)(unsafe.Pointer(&(_p.X10))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X11))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_p.X12))) = int8(i32(0))
+ _p.XvalidYMD = 0
+ _p.XvalidHMS = 0
+ _p.XvalidTZ = 0
}
func Xsqlite3_strnicmp(tls *crt.TLS, _zLeft *int8, _zRight *int8, _N int32) (r0 int32) {
@@ -9235,78 +9123,81 @@ func Xsqlite3_strnicmp(tls *crt.TLS, _zLeft *int8, _zRight *int8, _N int32) (r0
if _zLeft == nil {
return func() int32 {
if _zRight != nil {
- return i32(-1)
+ return int32(-1)
}
- return i32(0)
+ return int32(0)
}()
}
if _zRight == nil {
- return i32(1)
+ return int32(1)
}
_a = (*uint8)(unsafe.Pointer(_zLeft))
_b = (*uint8)(unsafe.Pointer(_zRight))
_5:
- if ((postInc1(&_N, int32(-1)) > i32(0)) && (int32(*_a) != i32(0))) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(*_a)))) == int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(*_b))))) {
+ if ((postInc2(&_N, -1) > int32(0)) && (int32(*_a) != int32(0))) && (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(*_a))) == int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(*_b)))) {
*(*uintptr)(unsafe.Pointer(&_a)) += uintptr(1)
*(*uintptr)(unsafe.Pointer(&_b)) += uintptr(1)
goto _5
}
return func() int32 {
- if _N < i32(0) {
- return i32(0)
+ if _N < int32(0) {
+ return int32(0)
}
- return (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(*_a)))) - int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(*_b)))))
+ return (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(*_a))) - int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(*_b))))
}()
}
-var _aXformType [6]struct {
- X0 uint8
- X1 uint8
- X2 *int8
- X3 float64
- X4 float64
-}
+// C comment
+// /*
+// ** The following table defines various date transformations of the form
+// **
+// ** 'NNN days'
+// **
+// ** Where NNN is an arbitrary floating-point number and "days" can be one
+// ** of several units of time.
+// */
+var _aXformType [6]t22
func init() {
- _aXformType = [6]struct {
- X0 uint8
- X1 uint8
- X2 *int8
- X3 float64
- X4 float64
- }{t16{X0: u8(0), X1: u8(6), X2: str(7434), X3: 4.642690608e+11, X4: 1000}, t16{X0: u8(0), X1: u8(6), X2: str(7441), X3: 7.73781768e+09, X4: 60000}, t16{X0: u8(0), X1: u8(4), X2: str(7448), X3: 1.28963628e+08, X4: 3.6e+06}, t16{X0: u8(0), X1: u8(3), X2: str(7386), X3: 5.373485e+06, X4: 8.64e+07}, t16{X0: u8(1), X1: u8(5), X2: str(7375), X3: 176546, X4: 2.592e+09}, t16{X0: u8(2), X1: u8(4), X2: str(7381), X3: 14713, X4: 3.1536e+10}}
+ _aXformType = [6]t22{t22{XnName: uint8(6), XzName: str(7335), XrLimit: 4.642690608e+11, XrXform: 1000}, t22{XnName: uint8(6), XzName: str(7342), XrLimit: 7.73781768e+09, XrXform: 60000}, t22{XnName: uint8(4), XzName: str(7349), XrLimit: 1.28963628e+08, XrXform: 3.6e+06}, t22{XnName: uint8(3), XzName: str(7287), XrLimit: 5.373485e+06, XrXform: 8.64e+07}, t22{XeType: uint8(1), XnName: uint8(5), XzName: str(7276), XrLimit: 176546, XrXform: 2.592e+09}, t22{XeType: uint8(2), XnName: uint8(4), XzName: str(7282), XrLimit: 14713, XrXform: 3.1536e+10}}
}
func Xsqlite3_result_double(tls *crt.TLS, _pCtx *Xsqlite3_context, _rVal float64) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76447), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_doubleØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76447), unsafe.Pointer(&_sqlite3_result_doubleØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemSetDouble(tls, (*XMem)(_pCtx.X0), _rVal)
+ _sqlite3VdbeMemSetDouble(tls, (*XMem)(_pCtx.XpOut), _rVal)
}
var _sqlite3_result_doubleØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_doubleØ00__func__Ø000[0], str(7453), 22)
+ crt.Xstrncpy(nil, &_sqlite3_result_doubleØ00__func__Ø000[0], str(7354), 22)
}
-// Delete any previous value and set the value stored in *pMem to val,
-// manifest type REAL.
+// C comment
+// /*
+// ** Delete any previous value and set the value stored in *pMem to val,
+// ** manifest type REAL.
+// */
func _sqlite3VdbeMemSetDouble(tls *crt.TLS, _pMem *XMem, _val float64) {
_sqlite3VdbeMemSetNull(tls, _pMem)
if _sqlite3IsNaN(tls, _val) == 0 {
- *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = _val
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(8))
+ *(*float64)(unsafe.Pointer(&_pMem.Xu)) = _val
+ _pMem.Xflags = uint16(8)
}
}
-// Return true if the floating point value is Not a Number (NaN).
-//
-// Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.
-// Otherwise, we have our own implementation that works on most systems.
+// C comment
+// /*
+// ** Return true if the floating point value is Not a Number (NaN).
+// **
+// ** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.
+// ** Otherwise, we have our own implementation that works on most systems.
+// */
func _sqlite3IsNaN(tls *crt.TLS, _x float64) (r0 int32) {
var _rc int32
var _y, _z float64
@@ -9316,68 +9207,77 @@ func _sqlite3IsNaN(tls *crt.TLS, _x float64) (r0 int32) {
return _rc
}
-// date( TIMESTRING, MOD, MOD, ...)
-//
-// Return YYYY-MM-DD
+// C comment
+// /*
+// ** date( TIMESTRING, MOD, MOD, ...)
+// **
+// ** Return YYYY-MM-DD
+// */
func _dateFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _x XDateTime
var _1_zBuf [100]int8
- if _isDate(tls, _context, _argc, _argv, &_x) == i32(0) {
+ if _isDate(tls, _context, _argc, _argv, &_x) == int32(0) {
_computeYMD(tls, &_x)
- Xsqlite3_snprintf(tls, int32(u32(100)), (*int8)(unsafe.Pointer(&_1_zBuf)), str(7475), _x.X1, _x.X2, _x.X3)
- Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(&_1_zBuf)), i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ Xsqlite3_snprintf(tls, int32(100), (*int8)(unsafe.Pointer(&_1_zBuf)), str(7376), _x.XY, _x.XM, _x.XD)
+ Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(&_1_zBuf)), int32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
}
- _ = _x
_ = _1_zBuf
}
-// time( TIMESTRING, MOD, MOD, ...)
-//
-// Return HH:MM:SS
+// C comment
+// /*
+// ** time( TIMESTRING, MOD, MOD, ...)
+// **
+// ** Return HH:MM:SS
+// */
func _timeFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _x XDateTime
var _1_zBuf [100]int8
- if _isDate(tls, _context, _argc, _argv, &_x) == i32(0) {
+ if _isDate(tls, _context, _argc, _argv, &_x) == int32(0) {
_computeHMS(tls, &_x)
- Xsqlite3_snprintf(tls, int32(u32(100)), (*int8)(unsafe.Pointer(&_1_zBuf)), str(7490), _x.X4, _x.X5, int32(_x.X7))
- Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(&_1_zBuf)), i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ Xsqlite3_snprintf(tls, int32(100), (*int8)(unsafe.Pointer(&_1_zBuf)), str(7391), _x.Xh, _x.Xm, int32(_x.Xs))
+ Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(&_1_zBuf)), int32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
}
- _ = _x
_ = _1_zBuf
}
-// datetime( TIMESTRING, MOD, MOD, ...)
-//
-// Return YYYY-MM-DD HH:MM:SS
+// C comment
+// /*
+// ** datetime( TIMESTRING, MOD, MOD, ...)
+// **
+// ** Return YYYY-MM-DD HH:MM:SS
+// */
func _datetimeFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _x XDateTime
var _1_zBuf [100]int8
- if _isDate(tls, _context, _argc, _argv, &_x) == i32(0) {
+ if _isDate(tls, _context, _argc, _argv, &_x) == int32(0) {
_computeYMD_HMS(tls, &_x)
- Xsqlite3_snprintf(tls, int32(u32(100)), (*int8)(unsafe.Pointer(&_1_zBuf)), str(7505), _x.X1, _x.X2, _x.X3, _x.X4, _x.X5, int32(_x.X7))
- Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(&_1_zBuf)), i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ Xsqlite3_snprintf(tls, int32(100), (*int8)(unsafe.Pointer(&_1_zBuf)), str(7406), _x.XY, _x.XM, _x.XD, _x.Xh, _x.Xm, int32(_x.Xs))
+ Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(&_1_zBuf)), int32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
}
- _ = _x
_ = _1_zBuf
}
-// strftime( FORMAT, TIMESTRING, MOD, MOD, ...)
-//
-// Return a string described by FORMAT. Conversions as follows:
-//
-// %d day of month
-// %f ** fractional seconds SS.SSS
-// %H hour 00-24
-// %j day of year 000-366
-// %J ** julian day number
-// %m month 01-12
-// %M minute 00-59
-// %s seconds since 1970-01-01
-// %S seconds 00-59
-// %w day of week 0-6 sunday==0
-// %W week of year 00-53
-// %Y year 0000-9999
-// %% %
+// C comment
+// /*
+// ** strftime( FORMAT, TIMESTRING, MOD, MOD, ...)
+// **
+// ** Return a string described by FORMAT. Conversions as follows:
+// **
+// ** %d day of month
+// ** %f ** fractional seconds SS.SSS
+// ** %H hour 00-24
+// ** %j day of year 000-366
+// ** %J ** julian day number
+// ** %m month 01-12
+// ** %M minute 00-59
+// ** %s seconds since 1970-01-01
+// ** %S seconds 00-59
+// ** %w day of week 0-6 sunday==0
+// ** %W week of year 00-53
+// ** %Y year 0000-9999
+// ** %% %
+// */
func _strftimeFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _13_nDay, _14_wd int32
var _i, _j uint32
@@ -9387,48 +9287,48 @@ func _strftimeFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv
var _db *Xsqlite3
var _x, _13_y XDateTime
var _zBuf [100]int8
- if _argc == i32(0) {
+ if _argc == int32(0) {
return
}
- _zFmt = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))))
- if (_zFmt == nil) || _isDate(tls, _context, _argc-i32(1), (**XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(i32(1))))))*uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(4))))))))))), &_x) != 0 {
+ _zFmt = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0))))
+ if (_zFmt == nil) || _isDate(tls, _context, _argc-int32(1), (**XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(int32(1))*uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(4))))))))))), &_x) != 0 {
return
}
_db = Xsqlite3_context_db_handle(tls, _context)
- *func() *uint64 { _i = uint32(i32(0)); return &_n }() = uint64(i32(1))
+ *func() *uint64 { _i = 0; return &_n }() = uint64(1)
_3:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFmt)) + 1*uintptr(_i)))) == 0 {
+ if (*elem1(_zFmt, uintptr(_i))) == 0 {
goto _6
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFmt)) + 1*uintptr(_i)))) != i32(37) {
+ if int32(*elem1(_zFmt, uintptr(_i))) != int32(37) {
goto _7
}
- switch int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFmt)) + 1*uintptr(_i+uint32(i32(1)))))) {
- case i32(37):
+ switch int32(*elem1(_zFmt, uintptr(_i+uint32(1)))) {
+ case int32(37):
goto _15
- case i32(72):
+ case int32(72):
goto _9
- case i32(74):
+ case int32(74):
goto _20
- case i32(77):
+ case int32(77):
goto _9
- case i32(83):
+ case int32(83):
goto _9
- case i32(87):
+ case int32(87):
goto _9
- case i32(89):
+ case int32(89):
goto _19
- case i32(100):
+ case int32(100):
goto _9
- case i32(102):
+ case int32(102):
goto _17
- case i32(106):
+ case int32(106):
goto _18
- case i32(109):
+ case int32(109):
goto _9
- case i32(115):
+ case int32(115):
goto _20
- case i32(119):
+ case int32(119):
goto _15
default:
goto _22
@@ -9439,32 +9339,16 @@ _9:
_15:
goto _23
_17:
- {
- p := &_n
- *p = (*p) + uint64(i32(8))
- sink17(*p)
- }
+ _n += uint64(8)
goto _23
_18:
- {
- p := &_n
- *p = (*p) + uint64(i32(3))
- sink17(*p)
- }
+ _n += uint64(3)
goto _23
_19:
- {
- p := &_n
- *p = (*p) + uint64(i32(8))
- sink17(*p)
- }
+ _n += uint64(8)
goto _23
_20:
- {
- p := &_n
- *p = (*p) + uint64(i32(50))
- sink17(*p)
- }
+ _n += uint64(50)
goto _23
_22:
return
@@ -9474,11 +9358,11 @@ _7:
*func() *uint64 { _i += 1; return &_n }() += 1
goto _3
_6:
- if _n < uint64(u32(100)) {
+ if _n < uint64(100) {
_z = (*int8)(unsafe.Pointer(&_zBuf))
goto _27
}
- if _n > uint64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0))))) {
+ if _n > uint64(*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0)) {
Xsqlite3_result_error_toobig(tls, _context)
return
}
@@ -9490,395 +9374,412 @@ _6:
_27:
_computeJD(tls, &_x)
_computeYMD_HMS(tls, &_x)
- _i = store5(&_j, uint32(i32(0)))
+ _i = store23(&_j, 0)
_29:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFmt)) + 1*uintptr(_i)))) == 0 {
+ if (*elem1(_zFmt, uintptr(_i))) == 0 {
goto _32
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFmt)) + 1*uintptr(_i)))) != i32(37) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc5(&_j, uint32(1))))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFmt)) + 1*uintptr(_i)))
+ if int32(*elem1(_zFmt, uintptr(_i))) != int32(37) {
+ *elem1(_z, uintptr(postInc23(&_j, uint32(1)))) = *elem1(_zFmt, uintptr(_i))
goto _34
}
_i += 1
- switch int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFmt)) + 1*uintptr(_i)))) {
- case i32(72):
+ switch int32(*elem1(_zFmt, uintptr(_i))) {
+ case int32(72):
goto _38
- case i32(74):
+ case int32(74):
goto _41
- case i32(77):
+ case int32(77):
goto _43
- case i32(83):
+ case int32(83):
goto _45
- case i32(87):
+ case int32(87):
goto _39
- case i32(89):
+ case int32(89):
goto _47
- case i32(100):
+ case int32(100):
goto _36
- case i32(102):
+ case int32(102):
goto _37
- case i32(106):
+ case int32(106):
goto _39
- case i32(109):
+ case int32(109):
goto _42
- case i32(115):
+ case int32(115):
goto _44
- case i32(119):
+ case int32(119):
goto _46
default:
goto _48
}
_36:
- Xsqlite3_snprintf(tls, i32(3), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7535), _x.X3)
- {
- p := &_j
- *p = (*p) + uint32(i32(2))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(3), elem1(_z, uintptr(_j)), str(7436), _x.XD)
+ _j += uint32(2)
goto _49
_37:
- _12_s = _x.X7
+ _12_s = _x.Xs
if _12_s > (59.999) {
_12_s = 59.999
}
- Xsqlite3_snprintf(tls, i32(7), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7540), _12_s)
- {
- p := &_j
- *p = (*p) + uint32(_sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j)))))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(7), elem1(_z, uintptr(_j)), str(7441), _12_s)
+ _j += uint32(_sqlite3Strlen30(tls, elem1(_z, uintptr(_j))))
goto _49
_38:
- Xsqlite3_snprintf(tls, i32(3), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7535), _x.X4)
- {
- p := &_j
- *p = (*p) + uint32(i32(2))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(3), elem1(_z, uintptr(_j)), str(7436), _x.Xh)
+ _j += uint32(2)
goto _49
_39:
_13_y = _x
- *(*int8)(unsafe.Pointer(&(_13_y.X8))) = int8(i32(0))
- *(*int32)(unsafe.Pointer(&(_13_y.X2))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_13_y.X3))) = i32(1)
+ _13_y.XvalidJD = 0
+ _13_y.XM = int32(1)
+ _13_y.XD = int32(1)
_computeJD(tls, &_13_y)
- _13_nDay = int32((((_x.X0) - (_13_y.X0)) + int64(i32(43200000))) / int64(i32(86400000)))
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFmt)) + 1*uintptr(_i)))) == i32(87) {
- _14_wd = int32((((_x.X0) + int64(i32(43200000))) / int64(i32(86400000))) % int64(i32(7)))
- Xsqlite3_snprintf(tls, i32(3), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7535), ((_13_nDay+i32(7))-_14_wd)/i32(7))
- {
- p := &_j
- *p = (*p) + uint32(i32(2))
- sink5(*p)
- }
+ _13_nDay = int32(((_x.XiJD - _13_y.XiJD) + int64(43200000)) / int64(86400000))
+ if int32(*elem1(_zFmt, uintptr(_i))) == int32(87) {
+ _14_wd = int32(((_x.XiJD + int64(43200000)) / int64(86400000)) % int64(7))
+ Xsqlite3_snprintf(tls, int32(3), elem1(_z, uintptr(_j)), str(7436), ((_13_nDay+int32(7))-_14_wd)/int32(7))
+ _j += uint32(2)
goto _52
}
- Xsqlite3_snprintf(tls, i32(4), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7547), _13_nDay+i32(1))
- {
- p := &_j
- *p = (*p) + uint32(i32(3))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(4), elem1(_z, uintptr(_j)), str(7448), _13_nDay+int32(1))
+ _j += uint32(3)
_52:
goto _49
_41:
- Xsqlite3_snprintf(tls, i32(20), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7552), float64(_x.X0)/(8.64e+07))
- {
- p := &_j
- *p = (*p) + uint32(_sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j)))))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(20), elem1(_z, uintptr(_j)), str(7453), float64(_x.XiJD)/(8.64e+07))
+ _j += uint32(_sqlite3Strlen30(tls, elem1(_z, uintptr(_j))))
goto _49
_42:
- Xsqlite3_snprintf(tls, i32(3), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7535), _x.X2)
- {
- p := &_j
- *p = (*p) + uint32(i32(2))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(3), elem1(_z, uintptr(_j)), str(7436), _x.XM)
+ _j += uint32(2)
goto _49
_43:
- Xsqlite3_snprintf(tls, i32(3), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7535), _x.X5)
- {
- p := &_j
- *p = (*p) + uint32(i32(2))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(3), elem1(_z, uintptr(_j)), str(7436), _x.Xm)
+ _j += uint32(2)
goto _49
_44:
- Xsqlite3_snprintf(tls, i32(30), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(6348), ((_x.X0)/int64(i32(1000)))-i64(210866760000))
- {
- p := &_j
- *p = (*p) + uint32(_sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j)))))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(30), elem1(_z, uintptr(_j)), str(6249), (_x.XiJD/int64(1000))-int64(210866760000))
+ _j += uint32(_sqlite3Strlen30(tls, elem1(_z, uintptr(_j))))
goto _49
_45:
- Xsqlite3_snprintf(tls, i32(3), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7535), int32(_x.X7))
- {
- p := &_j
- *p = (*p) + uint32(i32(2))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(3), elem1(_z, uintptr(_j)), str(7436), int32(_x.Xs))
+ _j += uint32(2)
goto _49
_46:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc5(&_j, uint32(1))))) = int8(int32(int8((((_x.X0)+int64(i32(129600000)))/int64(i32(86400000)))%int64(i32(7)))) + i32(48))
+ *elem1(_z, uintptr(postInc23(&_j, uint32(1)))) = int8(int32(int8(((_x.XiJD+int64(129600000))/int64(86400000))%int64(7))) + int32(48))
goto _49
_47:
- Xsqlite3_snprintf(tls, i32(5), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j))), str(7558), _x.X1)
- {
- p := &_j
- *p = (*p) + uint32(_sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_j)))))
- sink5(*p)
- }
+ Xsqlite3_snprintf(tls, int32(5), elem1(_z, uintptr(_j)), str(7459), _x.XY)
+ _j += uint32(_sqlite3Strlen30(tls, elem1(_z, uintptr(_j))))
goto _49
_48:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc5(&_j, uint32(1))))) = int8(i32(37))
+ *elem1(_z, uintptr(postInc23(&_j, uint32(1)))) = int8(37)
goto _49
_49:
_34:
_i += 1
goto _29
_32:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_j))) = int8(i32(0))
- Xsqlite3_result_text(tls, _context, _z, i32(-1), func() func(*crt.TLS, unsafe.Pointer) {
+ *elem1(_z, uintptr(_j)) = 0
+ Xsqlite3_result_text(tls, _context, _z, int32(-1), func() func(*crt.TLS, unsafe.Pointer) {
if _z == (*int8)(unsafe.Pointer(&_zBuf)) {
return (*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
}
- return (*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ return func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()
}())
_ = _zBuf
- _ = _13_y
}
-// An SQLITE_NOMEM error.
+// C comment
+// /* An SQLITE_NOMEM error. */
func Xsqlite3_result_error_nomem(tls *crt.TLS, _pCtx *Xsqlite3_context) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76576), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_error_nomemØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76576), unsafe.Pointer(&_sqlite3_result_error_nomemØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemSetNull(tls, (*XMem)(_pCtx.X0))
- *(*int32)(unsafe.Pointer(&(_pCtx.X5))) = _sqlite3NomemError(tls, i32(76578))
- *(*uint8)(unsafe.Pointer(&(_pCtx.X7))) = uint8(i32(1))
- _sqlite3OomFault(tls, (*Xsqlite3)((*XMem)(_pCtx.X0).X9))
+ _sqlite3VdbeMemSetNull(tls, (*XMem)(_pCtx.XpOut))
+ _pCtx.XisError = _sqlite3NomemError(tls, int32(76578))
+ _pCtx.XfErrorOrAux = uint8(1)
+ _sqlite3OomFault(tls, (*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb))
}
var _sqlite3_result_error_nomemØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_error_nomemØ00__func__Ø000[0], str(7563), 27)
+ crt.Xstrncpy(nil, &_sqlite3_result_error_nomemØ00__func__Ø000[0], str(7464), 27)
}
-// current_time()
-//
-// This function returns the same value as time('now').
+// C comment
+// /*
+// ** current_time()
+// **
+// ** This function returns the same value as time('now').
+// */
func _ctimeFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
_ = _NotUsed2
- _timeFunc(tls, _context, i32(0), nil)
+ _timeFunc(tls, _context, int32(0), nil)
}
-// current_timestamp()
-//
-// This function returns the same value as datetime('now').
+// C comment
+// /*
+// ** current_timestamp()
+// **
+// ** This function returns the same value as datetime('now').
+// */
func _ctimestampFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
_ = _NotUsed2
- _datetimeFunc(tls, _context, i32(0), nil)
+ _datetimeFunc(tls, _context, int32(0), nil)
}
-// current_date()
-//
-// This function returns the same value as date('now').
+// C comment
+// /*
+// ** current_date()
+// **
+// ** This function returns the same value as date('now').
+// */
func _cdateFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
_ = _NotUsed2
- _dateFunc(tls, _context, i32(0), nil)
+ _dateFunc(tls, _context, int32(0), nil)
}
var _sqlite3RegisterBuiltinFunctionsØ00aBuiltinFuncØ001 [60]XFuncDef
func init() {
- _sqlite3RegisterBuiltinFunctionsØ00aBuiltinFuncØ001 = [60]XFuncDef{XFuncDef{X0: i8(1), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ _sqlite3RegisterBuiltinFunctionsØ00aBuiltinFuncØ001 = [60]XFuncDef{XFuncDef{XnArg: int8(1), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_loadExt})), X5: nil, X6: str(7590), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_loadExt})), XzName: str(7491)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_loadExt})), X5: nil, X6: str(7590), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_loadExt})), XzName: str(7491)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_compileoptionusedFunc})), X5: nil, X6: str(7605), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_compileoptionusedFunc})), XzName: str(7506)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_compileoptiongetFunc})), X5: nil, X6: str(7631), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(3073), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_compileoptiongetFunc})), XzName: str(7532)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(3073), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_versionFunc})), X5: nil, X6: str(7656), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(3073), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_versionFunc})), XzName: str(7557)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(3073), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_versionFunc})), X5: nil, X6: str(7665), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(3073), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_versionFunc})), XzName: str(7566)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(3073), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_versionFunc})), X5: nil, X6: str(7676), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(18433), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_versionFunc})), XzName: str(7577)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(18433), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_versionFunc})), X5: nil, X6: str(7683), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: (unsafe.Pointer)(uintptr(1)), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_versionFunc})), XzName: str(7584)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XpUserData: crt.U2P(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_trimFunc})), X5: nil, X6: str(7692), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2049), X2: (unsafe.Pointer)(uintptr(1)), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_trimFunc})), XzName: str(7593)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2049), XpUserData: crt.U2P(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_trimFunc})), X5: nil, X6: str(7692), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: (unsafe.Pointer)(uintptr(2)), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_trimFunc})), XzName: str(7593)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XpUserData: crt.U2P(2), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_trimFunc})), X5: nil, X6: str(7698), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2049), X2: (unsafe.Pointer)(uintptr(2)), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_trimFunc})), XzName: str(7599)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2049), XpUserData: crt.U2P(2), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_trimFunc})), X5: nil, X6: str(7698), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: (unsafe.Pointer)(uintptr(3)), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_trimFunc})), XzName: str(7599)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XpUserData: crt.U2P(3), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_trimFunc})), X5: nil, X6: str(7704), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2049), X2: (unsafe.Pointer)(uintptr(3)), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_trimFunc})), XzName: str(7605)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2049), XpUserData: crt.U2P(3), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_trimFunc})), X5: nil, X6: str(7704), X7: t12{}}, XFuncDef{X0: i8(-1), X1: u16(2081), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_trimFunc})), XzName: str(7605)}, XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(2081), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_minmaxFunc})), X5: nil, X6: str(7709), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(2081), X2: nil, X3: nil, X4: nil, X5: nil, X6: str(7709), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(4129), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_minmaxFunc})), XzName: str(7610)}, XFuncDef{XfuncFlags: uint16(2081), XzName: str(7610)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(4129), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_minmaxStep})), X5: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_minmaxStep})), XxFinalize: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{_minMaxFinalize})), X6: str(7709), X7: t12{}}, XFuncDef{X0: i8(-1), X1: u16(2081), X2: (unsafe.Pointer)(uintptr(1)), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_minMaxFinalize})), XzName: str(7610)}, XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(2081), XpUserData: crt.U2P(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_minmaxFunc})), X5: nil, X6: str(7713), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(2081), X2: (unsafe.Pointer)(uintptr(1)), X3: nil, X4: nil, X5: nil, X6: str(7713), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(4129), X2: (unsafe.Pointer)(uintptr(1)), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_minmaxFunc})), XzName: str(7614)}, XFuncDef{XfuncFlags: uint16(2081), XpUserData: crt.U2P(1), XzName: str(7614)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(4129), XpUserData: crt.U2P(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_minmaxStep})), X5: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_minmaxStep})), XxFinalize: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{_minMaxFinalize})), X6: str(7713), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2177), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_minMaxFinalize})), XzName: str(7614)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2177), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_typeofFunc})), X5: nil, X6: str(7717), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2113), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_typeofFunc})), XzName: str(7618)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2113), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_lengthFunc})), X5: nil, X6: str(7724), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_lengthFunc})), XzName: str(7625)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_instrFunc})), X5: nil, X6: str(7731), X7: t12{}}, XFuncDef{X0: i8(-1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_instrFunc})), XzName: str(7632)}, XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_printfFunc})), X5: nil, X6: str(7737), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_printfFunc})), XzName: str(7638)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_unicodeFunc})), X5: nil, X6: str(7744), X7: t12{}}, XFuncDef{X0: i8(-1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_unicodeFunc})), XzName: str(7645)}, XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_charFunc})), X5: nil, X6: str(7752), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_charFunc})), XzName: str(7653)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_absFunc})), X5: nil, X6: str(7757), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_absFunc})), XzName: str(7658)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_roundFunc})), X5: nil, X6: str(7761), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_roundFunc})), XzName: str(7662)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_roundFunc})), X5: nil, X6: str(7761), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_roundFunc})), XzName: str(7662)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_upperFunc})), X5: nil, X6: str(7767), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_upperFunc})), XzName: str(7668)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_lowerFunc})), X5: nil, X6: str(7773), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_lowerFunc})), XzName: str(7674)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_hexFunc})), X5: nil, X6: str(7779), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2561), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_hexFunc})), XzName: str(7680)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2561), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_versionFunc})), X5: nil, X6: str(7783), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_versionFunc})), XzName: str(7684)}, XFuncDef{XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_randomFunc})), X5: nil, X6: str(7790), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_randomFunc})), XzName: str(7691)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_randomBlob})), X5: nil, X6: str(7797), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2081), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_randomBlob})), XzName: str(7698)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2081), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_nullifFunc})), X5: nil, X6: str(7808), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_nullifFunc})), XzName: str(7709)}, XFuncDef{XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_versionFunc})), X5: nil, X6: str(7815), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(8193), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_versionFunc})), XzName: str(7716)}, XFuncDef{XfuncFlags: uint16(8193), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_sourceidFunc})), X5: nil, X6: str(7830), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_sourceidFunc})), XzName: str(7731)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_errlogFunc})), X5: nil, X6: str(7847), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_errlogFunc})), XzName: str(7748)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_quoteFunc})), X5: nil, X6: str(7858), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_quoteFunc})), XzName: str(7759)}, XFuncDef{XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_last_insert_rowid})), X5: nil, X6: str(7864), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_last_insert_rowid})), XzName: str(7765)}, XFuncDef{XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_changes})), X5: nil, X6: str(7882), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_changes})), XzName: str(7783)}, XFuncDef{XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_total_changes})), X5: nil, X6: str(7890), X7: t12{}}, XFuncDef{X0: i8(3), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_total_changes})), XzName: str(7791)}, XFuncDef{XnArg: int8(3), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_replaceFunc})), X5: nil, X6: str(7904), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_replaceFunc})), XzName: str(7805)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_zeroblobFunc})), X5: nil, X6: str(7912), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_zeroblobFunc})), XzName: str(7813)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_substrFunc})), X5: nil, X6: str(7921), X7: t12{}}, XFuncDef{X0: i8(3), X1: u16(2049), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_substrFunc})), XzName: str(7822)}, XFuncDef{XnArg: int8(3), XfuncFlags: uint16(2049), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_substrFunc})), X5: nil, X6: str(7921), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_substrFunc})), XzName: str(7822)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_sumStep})), X5: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_sumStep})), XxFinalize: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{_sumFinalize})), X6: str(7928), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_sumFinalize})), XzName: str(7829)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_sumStep})), X5: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_sumStep})), XxFinalize: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{_totalFinalize})), X6: str(7932), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_totalFinalize})), XzName: str(7833)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_sumStep})), X5: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_sumStep})), XxFinalize: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{_avgFinalize})), X6: str(7938), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(257), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_avgFinalize})), XzName: str(7839)}, XFuncDef{XfuncFlags: uint16(257), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_countStep})), X5: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_countStep})), XxFinalize: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{_countFinalize})), X6: str(7942), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_countFinalize})), XzName: str(7843)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_countStep})), X5: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_countStep})), XxFinalize: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{_countFinalize})), X6: str(7942), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_countFinalize})), XzName: str(7843)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_groupConcatStep})), X5: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_groupConcatStep})), XxFinalize: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{_groupConcatFinalize})), X6: str(7948), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_groupConcatFinalize})), XzName: str(7849)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_groupConcatStep})), X5: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_groupConcatStep})), XxFinalize: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{_groupConcatFinalize})), X6: str(7948), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2061), X2: unsafe.Pointer(&_globInfo), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_groupConcatFinalize})), XzName: str(7849)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2061), XpUserData: unsafe.Pointer(&_globInfo), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_likeFunc})), X5: nil, X6: str(7961), X7: t12{}}, XFuncDef{X0: i8(2), X1: u16(2053), X2: unsafe.Pointer(&_likeInfoNorm), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_likeFunc})), XzName: str(7862)}, XFuncDef{XnArg: int8(2), XfuncFlags: uint16(2053), XpUserData: unsafe.Pointer(&_likeInfoNorm), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_likeFunc})), X5: nil, X6: str(7966), X7: t12{}}, XFuncDef{X0: i8(3), X1: u16(2053), X2: unsafe.Pointer(&_likeInfoNorm), X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_likeFunc})), XzName: str(7867)}, XFuncDef{XnArg: int8(3), XfuncFlags: uint16(2053), XpUserData: unsafe.Pointer(&_likeInfoNorm), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_likeFunc})), X5: nil, X6: str(7966), X7: t12{}}, XFuncDef{X0: i8(1), X1: u16(2049), X2: nil, X3: nil, X4: nil, X5: nil, X6: str(7971), X7: t12{}}, XFuncDef{X0: i8(0), X1: u16(2049), X2: nil, X3: nil, X4: nil, X5: nil, X6: str(7971), X7: t12{}}, XFuncDef{X0: i8(-1), X1: u16(2561), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_likeFunc})), XzName: str(7867)}, XFuncDef{XnArg: int8(1), XfuncFlags: uint16(2049), XzName: str(7872)}, XFuncDef{XfuncFlags: uint16(2049), XzName: str(7872)}, XFuncDef{XnArg: int8(-1), XfuncFlags: uint16(2561), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_versionFunc})), X5: nil, X6: str(7971), X7: t12{}}}
+ }{_versionFunc})), XzName: str(7872)}}
}
-// A function that loads a shared-library extension then returns NULL.
+// C comment
+// /*
+// ** A function that loads a shared-library extension then returns NULL.
+// */
func _loadExt(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _zFile, _zProc, _zErrMsg *int8
var _db *Xsqlite3
- _zFile = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))))
+ _zFile = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0))))
_db = Xsqlite3_context_db_handle(tls, _context)
_zErrMsg = nil
- if ((_db.X6) & i32(8388608)) == i32(0) {
- Xsqlite3_result_error(tls, _context, str(7980), i32(-1))
+ if (_db.Xflags & int32(8388608)) == int32(0) {
+ Xsqlite3_result_error(tls, _context, str(7881), int32(-1))
return
}
- if _argc == i32(2) {
- _zProc = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))))
+ if _argc == int32(2) {
+ _zProc = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))))
goto _2
}
_zProc = nil
_2:
if (_zFile != nil) && Xsqlite3_load_extension(tls, _db, _zFile, _zProc, &_zErrMsg) != 0 {
- Xsqlite3_result_error(tls, _context, _zErrMsg, i32(-1))
- Xsqlite3_free(tls, (unsafe.Pointer)(_zErrMsg))
- }
-}
-
+ Xsqlite3_result_error(tls, _context, _zErrMsg, int32(-1))
+ Xsqlite3_free(tls, unsafe.Pointer(_zErrMsg))
+ }
+}
+
+// C comment
+// /*
+// ** CAPI3REF: Load An Extension
+// ** METHOD: sqlite3
+// **
+// ** ^This interface loads an SQLite extension library from the named file.
+// **
+// ** ^The sqlite3_load_extension() interface attempts to load an
+// ** [SQLite extension] library contained in the file zFile. If
+// ** the file cannot be loaded directly, attempts are made to load
+// ** with various operating-system specific extensions added.
+// ** So for example, if "samplelib" cannot be loaded, then names like
+// ** "samplelib.so" or "samplelib.dylib" or "samplelib.dll" might
+// ** be tried also.
+// **
+// ** ^The entry point is zProc.
+// ** ^(zProc may be 0, in which case SQLite will try to come up with an
+// ** entry point name on its own. It first tries "sqlite3_extension_init".
+// ** If that does not work, it constructs a name "sqlite3_X_init" where the
+// ** X is consists of the lower-case equivalent of all ASCII alphabetic
+// ** characters in the filename from the last "/" to the first following
+// ** "." and omitting any initial "lib".)^
+// ** ^The sqlite3_load_extension() interface returns
+// ** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
+// ** ^If an error occurs and pzErrMsg is not 0, then the
+// ** [sqlite3_load_extension()] interface shall attempt to
+// ** fill *pzErrMsg with error message text stored in memory
+// ** obtained from [sqlite3_malloc()]. The calling function
+// ** should free this memory by calling [sqlite3_free()].
+// **
+// ** ^Extension loading must be enabled using
+// ** [sqlite3_enable_load_extension()] or
+// ** [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL)
+// ** prior to calling this API,
+// ** otherwise an error will be returned.
+// **
+// ** <b>Security warning:</b> It is recommended that the
+// ** [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this
+// ** interface. The use of the [sqlite3_enable_load_extension()] interface
+// ** should be avoided. This will keep the SQL function [load_extension()]
+// ** disabled and prevent SQL injections from giving attackers
+// ** access to extension loading capabilities.
+// **
+// ** See also the [load_extension() SQL function].
+// */
func Xsqlite3_load_extension(tls *crt.TLS, _db *Xsqlite3, _zFile *int8, _zProc *int8, _pzErrMsg **int8) (r0 int32) {
var _rc int32
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
_rc = _sqlite3LoadExtension(tls, _db, _zFile, _zProc, _pzErrMsg)
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
-// Attempt to load an SQLite extension library contained in the file
-// zFile. The entry point is zProc. zProc may be 0 in which case a
-// default entry point name (sqlite3_extension_init) is used. Use
-// of the default name is recommended.
-//
-// Return SQLITE_OK on success and SQLITE_ERROR if something goes wrong.
-//
-// If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with
-// error message text. The calling function should free this memory
-// by calling sqlite3DbFree(db, ).
+// C comment
+// /*
+// ** Attempt to load an SQLite extension library contained in the file
+// ** zFile. The entry point is zProc. zProc may be 0 in which case a
+// ** default entry point name (sqlite3_extension_init) is used. Use
+// ** of the default name is recommended.
+// **
+// ** Return SQLITE_OK on success and SQLITE_ERROR if something goes wrong.
+// **
+// ** If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with
+// ** error message text. The calling function should free this memory
+// ** by calling sqlite3DbFree(db, ).
+// */
func _sqlite3LoadExtension(tls *crt.TLS, _db *Xsqlite3, _zFile *int8, _zProc *int8, _pzErrMsg **int8) (r0 int32) {
var _ii, _rc, _7_iFile, _7_iEntry, _7_c, _7_ncFile int32
var _nMsg uint64
@@ -9887,40 +9788,40 @@ func _sqlite3LoadExtension(tls *crt.TLS, _db *Xsqlite3, _zFile *int8, _zProc *in
var _aHandle *unsafe.Pointer
var _pVfs *Xsqlite3_vfs
var _xInit func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32
- _pVfs = (*Xsqlite3_vfs)(_db.X0)
+ _pVfs = (*Xsqlite3_vfs)(_db.XpVfs)
_zErrmsg = nil
_zAltEntry = nil
- _nMsg = uint64(i32(300) + _sqlite3Strlen30(tls, _zFile))
+ _nMsg = uint64(int32(300) + _sqlite3Strlen30(tls, _zFile))
if _pzErrMsg != nil {
*_pzErrMsg = nil
}
- if ((_db.X6) & i32(4194304)) != i32(0) {
+ if (_db.Xflags & int32(4194304)) != int32(0) {
goto _1
}
if _pzErrMsg != nil {
- *_pzErrMsg = Xsqlite3_mprintf(tls, str(7980))
+ *_pzErrMsg = Xsqlite3_mprintf(tls, str(7881))
}
- return i32(1)
+ return int32(1)
_1:
_zEntry = func() *int8 {
if _zProc != nil {
return _zProc
}
- return str(7995)
+ return str(7896)
}()
_handle = _sqlite3OsDlOpen(tls, _pVfs, _zFile)
- _ii = i32(0)
+ _ii = int32(0)
_5:
- if _ii >= i32(1) || _handle != nil {
+ if _ii >= int32(1) || _handle != nil {
goto _9
}
- _3_zAltFile = Xsqlite3_mprintf(tls, str(8018), unsafe.Pointer(_zFile), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3LoadExtensionØ00azEndingsØ001)) + 4*uintptr(_ii)))))
+ _3_zAltFile = Xsqlite3_mprintf(tls, str(7919), unsafe.Pointer(_zFile), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_sqlite3LoadExtensionØ00azEndingsØ001)), uintptr(_ii))))
if _3_zAltFile == nil {
- return _sqlite3NomemError(tls, i32(112306))
+ return _sqlite3NomemError(tls, int32(112306))
}
_handle = _sqlite3OsDlOpen(tls, _pVfs, _3_zAltFile)
- Xsqlite3_free(tls, (unsafe.Pointer)(_3_zAltFile))
+ Xsqlite3_free(tls, unsafe.Pointer(_3_zAltFile))
_ii += 1
goto _5
_9:
@@ -9930,118 +9831,111 @@ _9:
if _pzErrMsg == nil {
goto _12
}
- *_pzErrMsg = store0(&_zErrmsg, (*int8)(Xsqlite3_malloc64(tls, _nMsg)))
+ *_pzErrMsg = store1(&_zErrmsg, (*int8)(Xsqlite3_malloc64(tls, _nMsg)))
if _zErrmsg != nil {
- Xsqlite3_snprintf(tls, int32(_nMsg), _zErrmsg, str(8024), unsafe.Pointer(_zFile))
- _sqlite3OsDlError(tls, _pVfs, int32(_nMsg-uint64(i32(1))), _zErrmsg)
+ Xsqlite3_snprintf(tls, int32(_nMsg), _zErrmsg, str(7925), unsafe.Pointer(_zFile))
+ _sqlite3OsDlError(tls, _pVfs, int32(_nMsg-uint64(1)), _zErrmsg)
}
_12:
- return i32(1)
+ return int32(1)
_11:
- _xInit = *(*func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{_sqlite3OsDlSym(tls, _pVfs, _handle, _zEntry)}))
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32
- }{_xInit})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32
- }{nil})) || _zProc != nil {
+ _xInit = func() func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32 {
+ v := _sqlite3OsDlSym(tls, _pVfs, _handle, _zEntry)
+ return *(*func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32)(unsafe.Pointer(&v))
+ }()
+ if _xInit != nil || _zProc != nil {
goto _15
}
_7_ncFile = _sqlite3Strlen30(tls, _zFile)
- _zAltEntry = (*int8)(Xsqlite3_malloc64(tls, uint64(_7_ncFile+i32(30))))
+ _zAltEntry = (*int8)(Xsqlite3_malloc64(tls, uint64(_7_ncFile+int32(30))))
if _zAltEntry == nil {
_sqlite3OsDlClose(tls, _pVfs, _handle)
- return _sqlite3NomemError(tls, i32(112341))
+ return _sqlite3NomemError(tls, int32(112341))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zAltEntry), (unsafe.Pointer)(str(8059)), uint32(i32(8)))
- _7_iFile = _7_ncFile - i32(1)
+ crt.Xmemcpy(tls, unsafe.Pointer(_zAltEntry), unsafe.Pointer(str(7960)), uint32(8))
+ _7_iFile = _7_ncFile - int32(1)
_17:
- if _7_iFile < i32(0) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(_7_iFile)))) == i32(47) {
+ if _7_iFile < int32(0) || int32(*elem1(_zFile, uintptr(_7_iFile))) == int32(47) {
goto _21
}
_7_iFile -= 1
goto _17
_21:
_7_iFile += 1
- if Xsqlite3_strnicmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zFile))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_7_iFile))))))), str(8068), i32(3)) == i32(0) {
- {
- p := &_7_iFile
- *p = (*p) + i32(3)
- sink1(*p)
- }
+ if Xsqlite3_strnicmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zFile))+uintptr(_7_iFile))), str(7969), int32(3)) == int32(0) {
+ _7_iFile += int32(3)
}
- _7_iEntry = i32(8)
+ _7_iEntry = int32(8)
_23:
- if store1(&_7_c, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(_7_iFile))))) == i32(0) || _7_c == i32(46) {
+ if store2(&_7_c, int32(*elem1(_zFile, uintptr(_7_iFile)))) == int32(0) || _7_c == int32(46) {
goto _27
}
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(_7_c))))) & i32(2)) != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAltEntry)) + 1*uintptr(postInc1(&_7_iEntry, int32(1))))) = int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint32(_7_c)))))
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(_7_c)))) & int32(2)) != 0 {
+ *elem1(_zAltEntry, uintptr(postInc2(&_7_iEntry, 1))) = int8(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint32(_7_c))))
}
_7_iFile += 1
goto _23
_27:
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zAltEntry))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_7_iEntry)))))))), (unsafe.Pointer)(str(8072)), uint32(i32(6)))
+ crt.Xmemcpy(tls, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zAltEntry))+uintptr(_7_iEntry)))), unsafe.Pointer(str(7973)), uint32(6))
_zEntry = _zAltEntry
- _xInit = *(*func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{_sqlite3OsDlSym(tls, _pVfs, _handle, _zEntry)}))
+ _xInit = func() func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32 {
+ v := _sqlite3OsDlSym(tls, _pVfs, _handle, _zEntry)
+ return *(*func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32)(unsafe.Pointer(&v))
+ }()
_15:
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32
- }{_xInit})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32
- }{nil})) {
+ if _xInit != nil {
goto _29
}
if _pzErrMsg == nil {
goto _30
}
- {
- p := &_nMsg
- *p = (*p) + uint64(_sqlite3Strlen30(tls, _zEntry))
- sink17(*p)
- }
- *_pzErrMsg = store0(&_zErrmsg, (*int8)(Xsqlite3_malloc64(tls, _nMsg)))
+ _nMsg += uint64(_sqlite3Strlen30(tls, _zEntry))
+ *_pzErrMsg = store1(&_zErrmsg, (*int8)(Xsqlite3_malloc64(tls, _nMsg)))
if _zErrmsg != nil {
- Xsqlite3_snprintf(tls, int32(_nMsg), _zErrmsg, str(8078), unsafe.Pointer(_zEntry), unsafe.Pointer(_zFile))
- _sqlite3OsDlError(tls, _pVfs, int32(_nMsg-uint64(i32(1))), _zErrmsg)
+ Xsqlite3_snprintf(tls, int32(_nMsg), _zErrmsg, str(7979), unsafe.Pointer(_zEntry), unsafe.Pointer(_zFile))
+ _sqlite3OsDlError(tls, _pVfs, int32(_nMsg-uint64(1)), _zErrmsg)
}
_30:
_sqlite3OsDlClose(tls, _pVfs, _handle)
- Xsqlite3_free(tls, (unsafe.Pointer)(_zAltEntry))
- return i32(1)
+ Xsqlite3_free(tls, unsafe.Pointer(_zAltEntry))
+ return int32(1)
_29:
- Xsqlite3_free(tls, (unsafe.Pointer)(_zAltEntry))
+ Xsqlite3_free(tls, unsafe.Pointer(_zAltEntry))
_rc = _xInit(tls, _db, &_zErrmsg, &_sqlite3Apis)
if _rc == 0 {
goto _32
}
- if _rc == i32(256) {
- return i32(0)
+ if _rc == int32(256) {
+ return int32(0)
}
if _pzErrMsg != nil {
- *_pzErrMsg = Xsqlite3_mprintf(tls, str(8121), unsafe.Pointer(_zErrmsg))
+ *_pzErrMsg = Xsqlite3_mprintf(tls, str(8022), unsafe.Pointer(_zErrmsg))
}
- Xsqlite3_free(tls, (unsafe.Pointer)(_zErrmsg))
+ Xsqlite3_free(tls, unsafe.Pointer(_zErrmsg))
_sqlite3OsDlClose(tls, _pVfs, _handle)
- return i32(1)
+ return int32(1)
_32:
- _aHandle = (*unsafe.Pointer)(_sqlite3DbMallocZero(tls, _db, uint64(u32(4)*uint32((_db.X39)+i32(1)))))
+ _aHandle = (*unsafe.Pointer)(_sqlite3DbMallocZero(tls, _db, uint64(uint32(4)*uint32(_db.XnExtension+int32(1)))))
if _aHandle == nil {
- return _sqlite3NomemError(tls, i32(112385))
+ return _sqlite3NomemError(tls, int32(112385))
}
- if (_db.X39) > i32(0) {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_aHandle), (unsafe.Pointer)(_db.X40), u32(4)*uint32(_db.X39))
+ if _db.XnExtension > int32(0) {
+ crt.Xmemcpy(tls, unsafe.Pointer(_aHandle), unsafe.Pointer(_db.XaExtension), uint32(4)*uint32(_db.XnExtension))
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_db.X40))
- *(**unsafe.Pointer)(unsafe.Pointer(&(_db.X40))) = _aHandle
- *(*unsafe.Pointer)(unsafe.Pointer(uintptr((unsafe.Pointer)(_db.X40)) + 4*uintptr(postInc1((*int32)(unsafe.Pointer(&(_db.X39))), int32(1))))) = _handle
- return i32(0)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_db.XaExtension))
+ _db.XaExtension = _aHandle
+ *elem24(_db.XaExtension, uintptr(postInc2(&_db.XnExtension, 1))) = _handle
+ return int32(0)
}
-// Print into memory obtained from sqlite3_malloc()(). Omit the internal
-// %-conversion extensions.
+// C comment
+// /*
+// ** Print into memory obtained from sqlite3_malloc()(). Omit the internal
+// ** %-conversion extensions.
+// */
func Xsqlite3_mprintf(tls *crt.TLS, _zFormat *int8, args ...interface{}) (r0 *int8) {
var _z *int8
var _ap []interface{}
@@ -10054,39 +9948,42 @@ func Xsqlite3_mprintf(tls *crt.TLS, _zFormat *int8, args ...interface{}) (r0 *in
return _z
}
-// Print into memory obtained from sqlite3_malloc(). Omit the internal
-// %-conversion extensions.
+// C comment
+// /*
+// ** Print into memory obtained from sqlite3_malloc(). Omit the internal
+// ** %-conversion extensions.
+// */
func Xsqlite3_vmprintf(tls *crt.TLS, _zFormat *int8, _ap []interface{}) (r0 *int8) {
var _z *int8
var _acc XStrAccum
var _zBase [70]int8
if _zFormat == nil {
- _sqlite3MisuseError(tls, i32(26040))
+ _sqlite3MisuseError(tls, int32(26040))
return nil
}
if Xsqlite3_initialize(tls) != 0 {
return nil
}
- _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zBase)), int32(u32(70)), i32(1000000000))
+ _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zBase)), int32(70), int32(1000000000))
_sqlite3VXPrintf(tls, &_acc, _zFormat, _ap)
_z = _sqlite3StrAccumFinish(tls, &_acc)
return _z
_ = _zBase
- _ = _acc
panic(0)
}
func _sqlite3OsDlOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zPath *int8) (r0 unsafe.Pointer) {
- return (*(*func(*crt.TLS, *Xsqlite3_vfs, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer
- }{(_pVfs.X10)})))(tls, _pVfs, _zPath)
+ return func() func(*crt.TLS, *Xsqlite3_vfs, *int8) unsafe.Pointer {
+ v := _pVfs.XxDlOpen
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, *int8) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _zPath)
}
var _sqlite3LoadExtensionØ00azEndingsØ001 [1]*int8
func init() {
- _sqlite3LoadExtensionØ00azEndingsØ001 = [1]*int8{str(8153)}
+ _sqlite3LoadExtensionØ00azEndingsØ001 = [1]*int8{str(8054)}
}
func Xsqlite3_malloc64(tls *crt.TLS, _n uint64) (r0 unsafe.Pointer) {
@@ -10097,377 +9994,403 @@ func Xsqlite3_malloc64(tls *crt.TLS, _n uint64) (r0 unsafe.Pointer) {
}
func _sqlite3OsDlError(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _nByte int32, _zBufOut *int8) {
- (*(*func(*crt.TLS, *Xsqlite3_vfs, int32, *int8))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8)
- }{(_pVfs.X11)})))(tls, _pVfs, _nByte, _zBufOut)
+ func() func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) {
+ v := _pVfs.XxDlError
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, int32, *int8))(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _nByte, _zBufOut)
}
func _sqlite3OsDlSym(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _pHdle unsafe.Pointer, _zSym *int8) (r0 func(*crt.TLS)) {
- return (*(*func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS)
- }{(_pVfs.X12)})))(tls, _pVfs, _pHdle, _zSym)
+ return func() func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS) {
+ v := _pVfs.XxDlSym
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _pHdle, _zSym)
}
func _sqlite3OsDlClose(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _pHandle unsafe.Pointer) {
- (*(*func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
- }{(_pVfs.X13)})))(tls, _pVfs, _pHandle)
-}
-
+ func() func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer) {
+ v := _pVfs.XxDlClose
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _pHandle)
+}
+
+// C comment
+// /*
+// ** The following structure contains pointers to all SQLite API routines.
+// ** A pointer to this structure is passed into extensions when they are
+// ** loaded so that the extension can make calls back into the SQLite
+// ** library.
+// **
+// ** When adding new APIs, add them to the bottom of this structure
+// ** in order to preserve backwards compatibility.
+// **
+// ** Extensions that use newer APIs should first call the
+// ** sqlite3_libversion_number() to make sure that the API they
+// ** intend to use is supported by the library. Extensions should
+// ** also check to make sure that the pointer to the function is
+// ** not NULL before calling it.
+// */
var _sqlite3Apis Xsqlite3_api_routines
func init() {
- _sqlite3Apis = Xsqlite3_api_routines{X0: *(*func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
+ _sqlite3Apis = Xsqlite3_api_routines{Xaggregate_context: *(*func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32) unsafe.Pointer
- }{Xsqlite3_aggregate_context})), X1: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_aggregate_context})), Xaggregate_count: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context) int32
- }{Xsqlite3_aggregate_count})), X2: Xsqlite3_bind_blob, X3: Xsqlite3_bind_double, X4: Xsqlite3_bind_int, X5: Xsqlite3_bind_int64, X6: Xsqlite3_bind_null, X7: Xsqlite3_bind_parameter_count, X8: Xsqlite3_bind_parameter_index, X9: Xsqlite3_bind_parameter_name, X10: Xsqlite3_bind_text, X11: Xsqlite3_bind_text16, X12: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_aggregate_count})), Xbind_blob: Xsqlite3_bind_blob, Xbind_double: Xsqlite3_bind_double, Xbind_int: Xsqlite3_bind_int, Xbind_int64: Xsqlite3_bind_int64, Xbind_null: Xsqlite3_bind_null, Xbind_parameter_count: Xsqlite3_bind_parameter_count, Xbind_parameter_index: Xsqlite3_bind_parameter_index, Xbind_parameter_name: Xsqlite3_bind_parameter_name, Xbind_text: Xsqlite3_bind_text, Xbind_text16: Xsqlite3_bind_text16, Xbind_value: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, int32, *XMem) int32
- }{Xsqlite3_bind_value})), X13: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32) int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_bind_value})), Xbusy_handler: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32) int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, func(*crt.TLS, unsafe.Pointer, int32) int32, unsafe.Pointer) int32
- }{Xsqlite3_busy_handler})), X14: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_busy_handler})), Xbusy_timeout: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, int32) int32
- }{Xsqlite3_busy_timeout})), X15: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_busy_timeout})), Xchanges: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_changes})), X16: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_changes})), Xclose: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_close})), X17: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_close})), Xcollation_needed: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8)) int32
- }{Xsqlite3_collation_needed})), X18: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_collation_needed})), Xcollation_needed16: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer)) int32
- }{Xsqlite3_collation_needed16})), X19: Xsqlite3_column_blob, X20: Xsqlite3_column_bytes, X21: Xsqlite3_column_bytes16, X22: Xsqlite3_column_count, X23: nil, X24: nil, X25: Xsqlite3_column_decltype, X26: Xsqlite3_column_decltype16, X27: Xsqlite3_column_double, X28: Xsqlite3_column_int, X29: Xsqlite3_column_int64, X30: Xsqlite3_column_name, X31: Xsqlite3_column_name16, X32: nil, X33: nil, X34: nil, X35: nil, X36: Xsqlite3_column_text, X37: Xsqlite3_column_text16, X38: Xsqlite3_column_type, X39: *(*func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_collation_needed16})), Xcolumn_blob: Xsqlite3_column_blob, Xcolumn_bytes: Xsqlite3_column_bytes, Xcolumn_bytes16: Xsqlite3_column_bytes16, Xcolumn_count: Xsqlite3_column_count, Xcolumn_decltype: Xsqlite3_column_decltype, Xcolumn_decltype16: Xsqlite3_column_decltype16, Xcolumn_double: Xsqlite3_column_double, Xcolumn_int: Xsqlite3_column_int, Xcolumn_int64: Xsqlite3_column_int64, Xcolumn_name: Xsqlite3_column_name, Xcolumn_name16: Xsqlite3_column_name16, Xcolumn_text: Xsqlite3_column_text, Xcolumn_text16: Xsqlite3_column_text16, Xcolumn_type: Xsqlite3_column_type, Xcolumn_value: *(*func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, int32) *XMem
- }{Xsqlite3_column_value})), X40: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_column_value})), Xcommit_hook: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer) unsafe.Pointer
- }{Xsqlite3_commit_hook})), X41: Xsqlite3_complete, X42: Xsqlite3_complete16, X43: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_commit_hook})), Xcomplete: Xsqlite3_complete, Xcomplete16: Xsqlite3_complete16, Xcreate_collation: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32
- }{Xsqlite3_create_collation})), X44: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_create_collation})), Xcreate_collation16: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32
- }{Xsqlite3_create_collation16})), X45: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_create_collation16})), Xcreate_function: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, *Xsqlite3_context, int32, **XMem), func(*crt.TLS, *Xsqlite3_context, int32, **XMem), func(*crt.TLS, *Xsqlite3_context)) int32
- }{Xsqlite3_create_function})), X46: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_create_function})), Xcreate_function16: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, int32, unsafe.Pointer, func(*crt.TLS, *Xsqlite3_context, int32, **XMem), func(*crt.TLS, *Xsqlite3_context, int32, **XMem), func(*crt.TLS, *Xsqlite3_context)) int32
- }{Xsqlite3_create_function16})), X47: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_create_function16})), Xcreate_module: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, *Xsqlite3_module, unsafe.Pointer) int32
- }{Xsqlite3_create_module})), X48: Xsqlite3_data_count, X49: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_create_module})), Xdata_count: Xsqlite3_data_count, Xdb_handle: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer) *Xsqlite3
- }{Xsqlite3_db_handle})), X50: *(*func(*crt.TLS, unsafe.Pointer, *int8) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_db_handle})), Xdeclare_vtab: *(*func(*crt.TLS, unsafe.Pointer, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8) int32
- }{Xsqlite3_declare_vtab})), X51: Xsqlite3_enable_shared_cache, X52: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_declare_vtab})), Xenable_shared_cache: Xsqlite3_enable_shared_cache, Xerrcode: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_errcode})), X53: *(*func(*crt.TLS, unsafe.Pointer) *int8)(unsafe.Pointer(&struct {
+ }{Xsqlite3_errcode})), Xerrmsg: *(*func(*crt.TLS, unsafe.Pointer) *int8)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) *int8
- }{Xsqlite3_errmsg})), X54: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_errmsg})), Xerrmsg16: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) unsafe.Pointer
- }{Xsqlite3_errmsg16})), X55: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS, unsafe.Pointer, int32, **int8, **int8) int32, unsafe.Pointer, **int8) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_errmsg16})), Xexec: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS, unsafe.Pointer, int32, **int8, **int8) int32, unsafe.Pointer, **int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, func(*crt.TLS, unsafe.Pointer, int32, **int8, **int8) int32, unsafe.Pointer, **int8) int32
- }{Xsqlite3_exec})), X56: Xsqlite3_expired, X57: Xsqlite3_finalize, X58: Xsqlite3_free, X59: Xsqlite3_free_table, X60: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_exec})), Xexpired: Xsqlite3_expired, Xfinalize: Xsqlite3_finalize, Xfree: Xsqlite3_free, Xfree_table: Xsqlite3_free_table, Xget_autocommit: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_get_autocommit})), X61: *(*func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_get_autocommit})), Xget_auxdata: *(*func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32) unsafe.Pointer
- }{Xsqlite3_get_auxdata})), X62: *(*func(*crt.TLS, unsafe.Pointer, *int8, ***int8, *int32, *int32, **int8) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_get_auxdata})), Xget_table: *(*func(*crt.TLS, unsafe.Pointer, *int8, ***int8, *int32, *int32, **int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, ***int8, *int32, *int32, **int8) int32
- }{Xsqlite3_get_table})), X63: nil, X64: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f func(*crt.TLS, *Xsqlite3) }{Xsqlite3_interrupt})), X65: *(*func(*crt.TLS, unsafe.Pointer) int64)(unsafe.Pointer(&struct {
+ }{Xsqlite3_get_table})), Xinterruptx: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f func(*crt.TLS, *Xsqlite3) }{Xsqlite3_interrupt})), Xlast_insert_rowid: *(*func(*crt.TLS, unsafe.Pointer) int64)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int64
- }{Xsqlite3_last_insert_rowid})), X66: Xsqlite3_libversion, X67: Xsqlite3_libversion_number, X68: Xsqlite3_malloc, X69: Xsqlite3_mprintf, X70: *(*func(*crt.TLS, *int8, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_last_insert_rowid})), Xlibversion: Xsqlite3_libversion, Xlibversion_number: Xsqlite3_libversion_number, Xmalloc: Xsqlite3_malloc, Xmprintf: Xsqlite3_mprintf, Xopen64: *(*func(*crt.TLS, *int8, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, **Xsqlite3) int32
- }{Xsqlite3_open})), X71: *(*func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_open})), Xopen16: *(*func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, **Xsqlite3) int32
- }{Xsqlite3_open16})), X72: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_open16})), Xprepare: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, int32, *unsafe.Pointer, **int8) int32
- }{Xsqlite3_prepare})), X73: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_prepare})), Xprepare16: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32
- }{Xsqlite3_prepare16})), X74: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8, uint64), unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_prepare16})), Xprofile: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8, uint64), unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, func(*crt.TLS, unsafe.Pointer, *int8, uint64), unsafe.Pointer) unsafe.Pointer
- }{Xsqlite3_profile})), X75: *(*func(*crt.TLS, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{Xsqlite3_profile})), Xprogress_handler: *(*func(*crt.TLS, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, int32, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer)
- }{Xsqlite3_progress_handler})), X76: Xsqlite3_realloc, X77: Xsqlite3_reset, X78: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
+ }{Xsqlite3_progress_handler})), Xrealloc: Xsqlite3_realloc, Xreset: Xsqlite3_reset, Xresult_blob: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
- }{Xsqlite3_result_blob})), X79: *(*func(*crt.TLS, unsafe.Pointer, float64))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_blob})), Xresult_double: *(*func(*crt.TLS, unsafe.Pointer, float64))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, float64)
- }{Xsqlite3_result_double})), X80: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_double})), Xresult_error: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, *int8, int32)
- }{Xsqlite3_result_error})), X81: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_error})), Xresult_error16: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, unsafe.Pointer, int32)
- }{Xsqlite3_result_error16})), X82: *(*func(*crt.TLS, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_error16})), Xresult_int: *(*func(*crt.TLS, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32)
- }{Xsqlite3_result_int})), X83: *(*func(*crt.TLS, unsafe.Pointer, int64))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_int})), Xresult_int64: *(*func(*crt.TLS, unsafe.Pointer, int64))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int64)
- }{Xsqlite3_result_int64})), X84: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_int64})), Xresult_null: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{Xsqlite3_result_null})), X85: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_null})), Xresult_text: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, *int8, int32, func(*crt.TLS, unsafe.Pointer))
- }{Xsqlite3_result_text})), X86: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_text})), Xresult_text16: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
- }{Xsqlite3_result_text16})), X87: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_text16})), Xresult_text16be: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
- }{Xsqlite3_result_text16be})), X88: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_text16be})), Xresult_text16le: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
- }{Xsqlite3_result_text16le})), X89: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_text16le})), Xresult_value: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, *XMem)
- }{Xsqlite3_result_value})), X90: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer), unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_value})), Xrollback_hook: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer), unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, func(*crt.TLS, unsafe.Pointer), unsafe.Pointer) unsafe.Pointer
- }{Xsqlite3_rollback_hook})), X91: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_rollback_hook})), Xset_authorizer: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32, unsafe.Pointer) int32
- }{Xsqlite3_set_authorizer})), X92: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
+ }{Xsqlite3_set_authorizer})), Xset_auxdata: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer))
- }{Xsqlite3_set_auxdata})), X93: Xsqlite3_snprintf, X94: Xsqlite3_step, X95: *(*func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, **int8, **int8, *int32, *int32, *int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_set_auxdata})), Xsnprintf: Xsqlite3_snprintf, Xstep: Xsqlite3_step, Xtable_column_metadata: *(*func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, **int8, **int8, *int32, *int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, *int8, *int8, **int8, **int8, *int32, *int32, *int32) int32
- }{Xsqlite3_table_column_metadata})), X96: Xsqlite3_thread_cleanup, X97: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_table_column_metadata})), Xthread_cleanup: Xsqlite3_thread_cleanup, Xtotal_changes: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_total_changes})), X98: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8), unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_total_changes})), Xtrace: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8), unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, func(*crt.TLS, unsafe.Pointer, *int8), unsafe.Pointer) unsafe.Pointer
- }{Xsqlite3_trace})), X99: Xsqlite3_transfer_bindings, X100: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64), unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_trace})), Xtransfer_bindings: Xsqlite3_transfer_bindings, Xupdate_hook: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64), unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64), unsafe.Pointer) unsafe.Pointer
- }{Xsqlite3_update_hook})), X101: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_update_hook})), Xuser_data: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context) unsafe.Pointer
- }{Xsqlite3_user_data})), X102: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_user_data})), Xvalue_blob: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XMem) unsafe.Pointer
- }{Xsqlite3_value_blob})), X103: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_bytes})), X104: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_bytes16})), X105: *(*func(*crt.TLS, unsafe.Pointer) float64)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) float64 }{Xsqlite3_value_double})), X106: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_int})), X107: *(*func(*crt.TLS, unsafe.Pointer) int64)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int64 }{Xsqlite3_value_int64})), X108: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_numeric_type})), X109: *(*func(*crt.TLS, unsafe.Pointer) *uint8)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) *uint8 }{Xsqlite3_value_text})), X110: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_value_blob})), Xvalue_bytes: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_bytes})), Xvalue_bytes16: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_bytes16})), Xvalue_double: *(*func(*crt.TLS, unsafe.Pointer) float64)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) float64 }{Xsqlite3_value_double})), Xvalue_int: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_int})), Xvalue_int64: *(*func(*crt.TLS, unsafe.Pointer) int64)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int64 }{Xsqlite3_value_int64})), Xvalue_numeric_type: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_numeric_type})), Xvalue_text: *(*func(*crt.TLS, unsafe.Pointer) *uint8)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) *uint8 }{Xsqlite3_value_text})), Xvalue_text16: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XMem) unsafe.Pointer
- }{Xsqlite3_value_text16})), X111: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_value_text16})), Xvalue_text16be: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XMem) unsafe.Pointer
- }{Xsqlite3_value_text16be})), X112: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_value_text16be})), Xvalue_text16le: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XMem) unsafe.Pointer
- }{Xsqlite3_value_text16le})), X113: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_type})), X114: *(*func(*crt.TLS, *int8, unsafe.Pointer) *int8)(unsafe.Pointer(&struct {
+ }{Xsqlite3_value_text16le})), Xvalue_type: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) int32 }{Xsqlite3_value_type})), Xvmprintf: *(*func(*crt.TLS, *int8, unsafe.Pointer) *int8)(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, []interface{}) *int8
- }{Xsqlite3_vmprintf})), X115: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_vmprintf})), Xoverload_function: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, int32) int32
- }{Xsqlite3_overload_function})), X116: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_overload_function})), Xprepare_v2: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, int32, *unsafe.Pointer, **int8) int32
- }{Xsqlite3_prepare_v2})), X117: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_prepare_v2})), Xprepare16_v2: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32
- }{Xsqlite3_prepare16_v2})), X118: Xsqlite3_clear_bindings, X119: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_prepare16_v2})), Xclear_bindings: Xsqlite3_clear_bindings, Xcreate_module_v2: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, *Xsqlite3_module, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer)) int32
- }{Xsqlite3_create_module_v2})), X120: Xsqlite3_bind_zeroblob, X121: Xsqlite3_blob_bytes, X122: Xsqlite3_blob_close, X123: *(*func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_create_module_v2})), Xbind_zeroblob: Xsqlite3_bind_zeroblob, Xblob_bytes: Xsqlite3_blob_bytes, Xblob_close: Xsqlite3_blob_close, Xblob_open: *(*func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, *int8, *int8, int64, int32, *unsafe.Pointer) int32
- }{Xsqlite3_blob_open})), X124: Xsqlite3_blob_read, X125: Xsqlite3_blob_write, X126: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32, func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_blob_open})), Xblob_read: Xsqlite3_blob_read, Xblob_write: Xsqlite3_blob_write, Xcreate_collation_v2: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32, func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32, func(*crt.TLS, unsafe.Pointer)) int32
- }{Xsqlite3_create_collation_v2})), X127: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_create_collation_v2})), Xfile_control: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, int32, unsafe.Pointer) int32
- }{Xsqlite3_file_control})), X128: Xsqlite3_memory_highwater, X129: Xsqlite3_memory_used, X130: *(*func(*crt.TLS, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_file_control})), Xmemory_highwater: Xsqlite3_memory_highwater, Xmemory_used: Xsqlite3_memory_used, Xmutex_alloc: *(*func(*crt.TLS, int32) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, int32) *Xsqlite3_mutex
- }{Xsqlite3_mutex_alloc})), X131: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{Xsqlite3_mutex_alloc})), Xmutex_enter: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex)
- }{Xsqlite3_mutex_enter})), X132: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{Xsqlite3_mutex_enter})), Xmutex_free: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex)
- }{Xsqlite3_mutex_free})), X133: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{Xsqlite3_mutex_free})), Xmutex_leave: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex)
- }{Xsqlite3_mutex_leave})), X134: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_mutex_leave})), Xmutex_try: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_mutex) int32
- }{Xsqlite3_mutex_try})), X135: *(*func(*crt.TLS, *int8, *unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_mutex_try})), Xopen_v2: *(*func(*crt.TLS, *int8, *unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, **Xsqlite3, int32, *int8) int32
- }{Xsqlite3_open_v2})), X136: Xsqlite3_release_memory, X137: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{Xsqlite3_open_v2})), Xrelease_memory: Xsqlite3_release_memory, Xresult_error_nomem: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{Xsqlite3_result_error_nomem})), X138: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_error_nomem})), Xresult_error_toobig: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context)
- }{Xsqlite3_result_error_toobig})), X139: Xsqlite3_sleep, X140: Xsqlite3_soft_heap_limit, X141: *(*func(*crt.TLS, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_error_toobig})), Xsleep: Xsqlite3_sleep, Xsoft_heap_limit: Xsqlite3_soft_heap_limit, Xvfs_find: *(*func(*crt.TLS, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8) *Xsqlite3_vfs
- }{Xsqlite3_vfs_find})), X142: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_vfs_find})), Xvfs_register: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32) int32
- }{Xsqlite3_vfs_register})), X143: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_vfs_register})), Xvfs_unregister: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs) int32
- }{Xsqlite3_vfs_unregister})), X144: Xsqlite3_threadsafe, X145: *(*func(*crt.TLS, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
+ }{Xsqlite3_vfs_unregister})), Xxthreadsafe: Xsqlite3_threadsafe, Xresult_zeroblob: *(*func(*crt.TLS, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32)
- }{Xsqlite3_result_zeroblob})), X146: *(*func(*crt.TLS, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_zeroblob})), Xresult_error_code: *(*func(*crt.TLS, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32)
- }{Xsqlite3_result_error_code})), X147: Xsqlite3_test_control, X148: Xsqlite3_randomness, X149: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_error_code})), Xtest_control: Xsqlite3_test_control, Xrandomness: Xsqlite3_randomness, Xcontext_db_handle: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context) *Xsqlite3
- }{Xsqlite3_context_db_handle})), X150: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_context_db_handle})), Xextended_result_codes: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, int32) int32
- }{Xsqlite3_extended_result_codes})), X151: *(*func(*crt.TLS, unsafe.Pointer, int32, int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_extended_result_codes})), Xlimit: *(*func(*crt.TLS, unsafe.Pointer, int32, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, int32, int32) int32
- }{Xsqlite3_limit})), X152: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_limit})), Xnext_stmt: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, unsafe.Pointer) unsafe.Pointer
- }{Xsqlite3_next_stmt})), X153: Xsqlite3_sql, X154: Xsqlite3_status, X155: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_next_stmt})), Xsql: Xsqlite3_sql, Xstatus: Xsqlite3_status, Xbackup_finish: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_backup) int32
- }{Xsqlite3_backup_finish})), X156: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_backup_finish})), Xbackup_init: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, *Xsqlite3, *int8) *Xsqlite3_backup
- }{Xsqlite3_backup_init})), X157: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_backup_init})), Xbackup_pagecount: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_backup) int32
- }{Xsqlite3_backup_pagecount})), X158: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_backup_pagecount})), Xbackup_remaining: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_backup) int32
- }{Xsqlite3_backup_remaining})), X159: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_backup_remaining})), Xbackup_step: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_backup, int32) int32
- }{Xsqlite3_backup_step})), X160: Xsqlite3_compileoption_get, X161: Xsqlite3_compileoption_used, X162: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_backup_step})), Xcompileoption_get: Xsqlite3_compileoption_get, Xcompileoption_used: Xsqlite3_compileoption_used, Xcreate_function_v2: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, *Xsqlite3_context, int32, **XMem), func(*crt.TLS, *Xsqlite3_context, int32, **XMem), func(*crt.TLS, *Xsqlite3_context), func(*crt.TLS, unsafe.Pointer)) int32
- }{Xsqlite3_create_function_v2})), X163: *(*func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_create_function_v2})), Xdb_config: *(*func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, int32, ...interface{}) int32
- }{Xsqlite3_db_config})), X164: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_db_config})), Xdb_mutex: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) *Xsqlite3_mutex
- }{Xsqlite3_db_mutex})), X165: *(*func(*crt.TLS, unsafe.Pointer, int32, *int32, *int32, int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_db_mutex})), Xdb_status: *(*func(*crt.TLS, unsafe.Pointer, int32, *int32, *int32, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, int32, *int32, *int32, int32) int32
- }{Xsqlite3_db_status})), X166: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_db_status})), Xextended_errcode: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_extended_errcode})), X167: Xsqlite3_log, X168: Xsqlite3_soft_heap_limit64, X169: Xsqlite3_sourceid, X170: Xsqlite3_stmt_status, X171: Xsqlite3_strnicmp, X172: nil, X173: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_extended_errcode})), Xlog: Xsqlite3_log, Xsoft_heap_limit64: Xsqlite3_soft_heap_limit64, Xsourceid: Xsqlite3_sourceid, Xstmt_status: Xsqlite3_stmt_status, Xstrnicmp: Xsqlite3_strnicmp, Xwal_autocheckpoint: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, int32) int32
- }{Xsqlite3_wal_autocheckpoint})), X174: *(*func(*crt.TLS, unsafe.Pointer, *int8) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_wal_autocheckpoint})), Xwal_checkpoint: *(*func(*crt.TLS, unsafe.Pointer, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8) int32
- }{Xsqlite3_wal_checkpoint})), X175: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{Xsqlite3_wal_checkpoint})), Xwal_hook: *(*func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32, unsafe.Pointer) unsafe.Pointer
- }{Xsqlite3_wal_hook})), X176: Xsqlite3_blob_reopen, X177: *(*func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_wal_hook})), Xblob_reopen: Xsqlite3_blob_reopen, Xvtab_config: *(*func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, int32, ...interface{}) int32
- }{Xsqlite3_vtab_config})), X178: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_vtab_config})), Xvtab_on_conflict: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_vtab_on_conflict})), X179: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_vtab_on_conflict})), Xclose_v2: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_close_v2})), X180: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
+ }{Xsqlite3_close_v2})), Xdb_filename: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8) *int8
- }{Xsqlite3_db_filename})), X181: *(*func(*crt.TLS, unsafe.Pointer, *int8) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_db_filename})), Xdb_readonly: *(*func(*crt.TLS, unsafe.Pointer, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8) int32
- }{Xsqlite3_db_readonly})), X182: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_db_readonly})), Xdb_release_memory: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_db_release_memory})), X183: Xsqlite3_errstr, X184: Xsqlite3_stmt_busy, X185: Xsqlite3_stmt_readonly, X186: Xsqlite3_stricmp, X187: Xsqlite3_uri_boolean, X188: Xsqlite3_uri_int64, X189: Xsqlite3_uri_parameter, X190: *(*func(*crt.TLS, int32, *int8, *int8, unsafe.Pointer) *int8)(unsafe.Pointer(&struct {
+ }{Xsqlite3_db_release_memory})), Xerrstr: Xsqlite3_errstr, Xstmt_busy: Xsqlite3_stmt_busy, Xstmt_readonly: Xsqlite3_stmt_readonly, Xstricmp: Xsqlite3_stricmp, Xuri_boolean: Xsqlite3_uri_boolean, Xuri_int64: Xsqlite3_uri_int64, Xuri_parameter: Xsqlite3_uri_parameter, Xvsnprintf: *(*func(*crt.TLS, int32, *int8, *int8, unsafe.Pointer) *int8)(unsafe.Pointer(&struct {
f func(*crt.TLS, int32, *int8, *int8, []interface{}) *int8
- }{Xsqlite3_vsnprintf})), X191: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32, *int32) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_vsnprintf})), Xwal_checkpoint_v2: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, int32, *int32, *int32) int32
- }{Xsqlite3_wal_checkpoint_v2})), X192: Xsqlite3_auto_extension, X193: Xsqlite3_bind_blob64, X194: Xsqlite3_bind_text64, X195: Xsqlite3_cancel_auto_extension, X196: *(*func(*crt.TLS, unsafe.Pointer, *int8, *int8, **int8) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_wal_checkpoint_v2})), Xauto_extension: Xsqlite3_auto_extension, Xbind_blob64: Xsqlite3_bind_blob64, Xbind_text64: Xsqlite3_bind_text64, Xcancel_auto_extension: Xsqlite3_cancel_auto_extension, Xload_extension: *(*func(*crt.TLS, unsafe.Pointer, *int8, *int8, **int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, *int8, *int8, **int8) int32
- }{Xsqlite3_load_extension})), X197: Xsqlite3_malloc64, X198: Xsqlite3_msize, X199: Xsqlite3_realloc64, X200: Xsqlite3_reset_auto_extension, X201: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint64, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
+ }{Xsqlite3_load_extension})), Xmalloc64: Xsqlite3_malloc64, Xmsize: Xsqlite3_msize, Xrealloc64: Xsqlite3_realloc64, Xreset_auto_extension: Xsqlite3_reset_auto_extension, Xresult_blob64: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint64, func(*crt.TLS, unsafe.Pointer)))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, unsafe.Pointer, uint64, func(*crt.TLS, unsafe.Pointer))
- }{Xsqlite3_result_blob64})), X202: *(*func(*crt.TLS, unsafe.Pointer, *int8, uint64, func(*crt.TLS, unsafe.Pointer), uint8))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_blob64})), Xresult_text64: *(*func(*crt.TLS, unsafe.Pointer, *int8, uint64, func(*crt.TLS, unsafe.Pointer), uint8))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, *int8, uint64, func(*crt.TLS, unsafe.Pointer), uint8)
- }{Xsqlite3_result_text64})), X203: Xsqlite3_strglob, X204: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) *XMem }{Xsqlite3_value_dup})), X205: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) }{Xsqlite3_value_free})), X206: *(*func(*crt.TLS, unsafe.Pointer, uint64) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_text64})), Xstrglob: Xsqlite3_strglob, Xvalue_dup: *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) *XMem }{Xsqlite3_value_dup})), Xvalue_free: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) }{Xsqlite3_value_free})), Xresult_zeroblob64: *(*func(*crt.TLS, unsafe.Pointer, uint64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, uint64) int32
- }{Xsqlite3_result_zeroblob64})), X207: Xsqlite3_bind_zeroblob64, X208: *(*func(*crt.TLS, unsafe.Pointer) uint32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) uint32 }{Xsqlite3_value_subtype})), X209: *(*func(*crt.TLS, unsafe.Pointer, uint32))(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_zeroblob64})), Xbind_zeroblob64: Xsqlite3_bind_zeroblob64, Xvalue_subtype: *(*func(*crt.TLS, unsafe.Pointer) uint32)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) uint32 }{Xsqlite3_value_subtype})), Xresult_subtype: *(*func(*crt.TLS, unsafe.Pointer, uint32))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, uint32)
- }{Xsqlite3_result_subtype})), X210: Xsqlite3_status64, X211: Xsqlite3_strlike, X212: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_result_subtype})), Xstatus64: Xsqlite3_status64, Xstrlike: Xsqlite3_strlike, Xdb_cacheflush: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_db_cacheflush})), X213: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_db_cacheflush})), Xsystem_errno: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3) int32
- }{Xsqlite3_system_errno})), X214: *(*func(*crt.TLS, unsafe.Pointer, uint32, func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{Xsqlite3_system_errno})), Xtrace_v2: *(*func(*crt.TLS, unsafe.Pointer, uint32, func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, uint32, func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32, unsafe.Pointer) int32
- }{Xsqlite3_trace_v2})), X215: Xsqlite3_expanded_sql, X216: *(*func(*crt.TLS, unsafe.Pointer, int64))(unsafe.Pointer(&struct {
+ }{Xsqlite3_trace_v2})), Xexpanded_sql: Xsqlite3_expanded_sql, Xset_last_insert_rowid: *(*func(*crt.TLS, unsafe.Pointer, int64))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, int64)
}{Xsqlite3_set_last_insert_rowid}))}
}
-// Allocate or return the aggregate context for a user function. A new
-// context is allocated on the first call. Subsequent calls return the
-// same context that was returned on prior calls.
+// C comment
+// /*
+// ** Allocate or return the aggregate context for a user function. A new
+// ** context is allocated on the first call. Subsequent calls return the
+// ** same context that was returned on prior calls.
+// */
func Xsqlite3_aggregate_context(tls *crt.TLS, _p *Xsqlite3_context, _nByte int32) (r0 unsafe.Pointer) {
func() {
- if _p == nil || (*XFuncDef)(_p.X1) == nil || (*(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*XFuncDef)(_p.X1).X5)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76890), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_aggregate_contextØ00__func__Ø000))), unsafe.Pointer(str(8156)))
+ if _p == nil || _p.XpFunc == nil || ((*XFuncDef)(_p.XpFunc).XxFinalize) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76890), unsafe.Pointer(&_sqlite3_aggregate_contextØ00__func__Ø000), unsafe.Pointer(str(8057)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_p.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76891), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_aggregate_contextØ00__func__Ø000))), unsafe.Pointer(str(8193)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_p.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76891), unsafe.Pointer(&_sqlite3_aggregate_contextØ00__func__Ø000), unsafe.Pointer(str(8094)))
crt.X__builtin_abort(tls)
}
}()
- if (int32((*XMem)(_p.X2).X1) & i32(8192)) == i32(0) {
+ if (int32((*XMem)(_p.XpMem).Xflags) & int32(8192)) == int32(0) {
return _createAggContext(tls, _p, _nByte)
}
- return (unsafe.Pointer)((*XMem)(_p.X2).X5)
+ return unsafe.Pointer((*XMem)(_p.XpMem).Xz)
}
var _sqlite3_aggregate_contextØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_aggregate_contextØ00__func__Ø000[0], str(8232), 26)
+ crt.Xstrncpy(nil, &_sqlite3_aggregate_contextØ00__func__Ø000[0], str(8133), 26)
}
-// Create a new aggregate context for p and return a pointer to
-// its pMem->z element.
+// C comment
+// /*
+// ** Create a new aggregate context for p and return a pointer to
+// ** its pMem->z element.
+// */
func _createAggContext(tls *crt.TLS, _p *Xsqlite3_context, _nByte int32) (r0 unsafe.Pointer) {
var _pMem *XMem
- _pMem = (*XMem)(_p.X2)
+ _pMem = (*XMem)(_p.XpMem)
func() {
- if (int32(_pMem.X1) & i32(8192)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76869), unsafe.Pointer((*int8)(unsafe.Pointer(&_createAggContextØ00__func__Ø000))), unsafe.Pointer(str(8258)))
+ if (int32(_pMem.Xflags) & int32(8192)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76869), unsafe.Pointer(&_createAggContextØ00__func__Ø000), unsafe.Pointer(str(8159)))
crt.X__builtin_abort(tls)
}
}()
- if _nByte <= i32(0) {
+ if _nByte <= int32(0) {
_sqlite3VdbeMemSetNull(tls, _pMem)
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = nil
+ _pMem.Xz = nil
goto _3
}
_sqlite3VdbeMemClearAndResize(tls, _pMem, _nByte)
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(8192))
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))) = (*XFuncDef)(_p.X1)
- if (_pMem.X5) != nil {
- crt.Xmemset(tls, (unsafe.Pointer)(_pMem.X5), i32(0), uint32(_nByte))
+ _pMem.Xflags = uint16(8192)
+ *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pMem.Xu)))) = (*XFuncDef)(_p.XpFunc)
+ if _pMem.Xz != nil {
+ crt.Xmemset(tls, unsafe.Pointer(_pMem.Xz), int32(0), uint32(_nByte))
}
_3:
- return (unsafe.Pointer)(_pMem.X5)
+ return unsafe.Pointer(_pMem.Xz)
}
var _createAggContextØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_createAggContextØ00__func__Ø000[0], str(8285), 17)
+ crt.Xstrncpy(nil, &_createAggContextØ00__func__Ø000[0], str(8186), 17)
}
-// Return the number of times the Step function of an aggregate has been
-// called.
-//
-// This function is deprecated. Do not use it for new code. It is
-// provide only to avoid breaking legacy code. New aggregate function
-// implementations should keep their own counts within their aggregate
-// context.
+// C comment
+// /*
+// ** Return the number of times the Step function of an aggregate has been
+// ** called.
+// **
+// ** This function is deprecated. Do not use it for new code. It is
+// ** provide only to avoid breaking legacy code. New aggregate function
+// ** implementations should keep their own counts within their aggregate
+// ** context.
+// */
func Xsqlite3_aggregate_count(tls *crt.TLS, _p *Xsqlite3_context) (r0 int32) {
func() {
- if _p == nil || (*XMem)(_p.X2) == nil || (*XFuncDef)(_p.X1) == nil || (*(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*XFuncDef)(_p.X1).X5)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76995), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_aggregate_countØ00__func__Ø000))), unsafe.Pointer(str(8302)))
+ if _p == nil || _p.XpMem == nil || _p.XpFunc == nil || ((*XFuncDef)(_p.XpFunc).XxFinalize) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76995), unsafe.Pointer(&_sqlite3_aggregate_countØ00__func__Ø000), unsafe.Pointer(str(8203)))
crt.X__builtin_abort(tls)
}
}()
- return (*XMem)(_p.X2).X4
+ return (*XMem)(_p.XpMem).Xn
}
var _sqlite3_aggregate_countØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_aggregate_countØ00__func__Ø000[0], str(8350), 24)
+ crt.Xstrncpy(nil, &_sqlite3_aggregate_countØ00__func__Ø000[0], str(8251), 24)
}
-// Bind a blob value to an SQL statement variable.
+// C comment
+// /*
+// ** Bind a blob value to an SQL statement variable.
+// */
func Xsqlite3_bind_blob(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _zData unsafe.Pointer, _nData int32, _xDel func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
- if _nData < i32(0) {
- return _sqlite3MisuseError(tls, i32(77424))
+ if _nData < int32(0) {
+ return _sqlite3MisuseError(tls, int32(77424))
}
- return _bindText(tls, _pStmt, _i, _zData, _nData, _xDel, uint8(i32(0)))
+ return _bindText(tls, _pStmt, _i, _zData, _nData, _xDel, 0)
}
-// Bind a text or BLOB value.
+// C comment
+// /*
+// ** Bind a text or BLOB value.
+// */
func _bindText(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _zData unsafe.Pointer, _nData int32, _xDel func(*crt.TLS, unsafe.Pointer), _encoding uint8) (r0 int32) {
var _rc int32
var _p *TVdbe
var _pVar *XMem
_p = (*TVdbe)(_pStmt)
_rc = _vdbeUnbind(tls, _p, _i)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _0
}
if _zData == nil {
goto _1
}
- _pVar = (*XMem)(unsafe.Pointer(uintptr(_p.X24) + 48*uintptr(_i-i32(1))))
+ _pVar = elem25((*XMem)(_p.XaVar), uintptr(_i-int32(1)))
_rc = _sqlite3VdbeMemSetStr(tls, _pVar, (*int8)(_zData), _nData, _encoding, _xDel)
- if (_rc == i32(0)) && (int32(_encoding) != i32(0)) {
- _rc = _sqlite3VdbeChangeEncoding(tls, _pVar, int32((*Xsqlite3)(_p.X0).X14))
+ if (_rc == int32(0)) && (int32(_encoding) != int32(0)) {
+ _rc = _sqlite3VdbeChangeEncoding(tls, _pVar, int32((*Xsqlite3)(_p.Xdb).Xenc))
}
- _sqlite3Error(tls, (*Xsqlite3)(_p.X0), _rc)
- _rc = _sqlite3ApiExit(tls, (*Xsqlite3)(_p.X0), _rc)
+ _sqlite3Error(tls, (*Xsqlite3)(_p.Xdb), _rc)
+ _rc = _sqlite3ApiExit(tls, (*Xsqlite3)(_p.Xdb), _rc)
_1:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
goto _6
_0:
- if (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{nil}))) && (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if (_xDel != nil) && (*(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) != *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
}{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))}))) {
_xDel(tls, _zData)
@@ -10476,89 +10399,98 @@ _6:
return _rc
}
-// ****************************** sqlite3_bind_ ***************************
-//
-// Routines used to attach values to wildcards in a compiled SQL statement.
-
-// Unbind the value bound to variable i in virtual machine p. This is the
-// the same as binding a NULL value to the column. If the "i" parameter is
-// out of range, then SQLITE_RANGE is returned. Othewise SQLITE_OK.
-//
-// A successful evaluation of this routine acquires the mutex on p.
-// the mutex is released if any kind of error occurs.
-//
-// The error code stored in database p->db is overwritten with the return
-// value in any case.
+// C comment
+// /******************************* sqlite3_bind_ ***************************
+// **
+// ** Routines used to attach values to wildcards in a compiled SQL statement.
+// */
+// /*
+// ** Unbind the value bound to variable i in virtual machine p. This is the
+// ** the same as binding a NULL value to the column. If the "i" parameter is
+// ** out of range, then SQLITE_RANGE is returned. Othewise SQLITE_OK.
+// **
+// ** A successful evaluation of this routine acquires the mutex on p.
+// ** the mutex is released if any kind of error occurs.
+// **
+// ** The error code stored in database p->db is overwritten with the return
+// ** value in any case.
+// */
func _vdbeUnbind(tls *crt.TLS, _p *TVdbe, _i int32) (r0 int32) {
var _pVar *XMem
if _vdbeSafetyNotNull(tls, _p) != 0 {
- return _sqlite3MisuseError(tls, i32(77342))
+ return _sqlite3MisuseError(tls, int32(77342))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
- if ((_p.X5) != uint32(i32(770837923))) || ((_p.X9) >= i32(0)) {
- _sqlite3Error(tls, (*Xsqlite3)(_p.X0), i32(21))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
- Xsqlite3_log(tls, i32(21), str(8374), unsafe.Pointer(_p.X36))
- return _sqlite3MisuseError(tls, i32(77350))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
+ if (_p.Xmagic != uint32(770837923)) || (_p.Xpc >= int32(0)) {
+ _sqlite3Error(tls, (*Xsqlite3)(_p.Xdb), int32(21))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
+ Xsqlite3_log(tls, int32(21), str(8275), unsafe.Pointer(_p.XzSql))
+ return _sqlite3MisuseError(tls, int32(77350))
}
- if (_i < i32(1)) || (_i > int32(_p.X4)) {
- _sqlite3Error(tls, (*Xsqlite3)(_p.X0), i32(25))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
- return i32(25)
+ if (_i < int32(1)) || (_i > int32(_p.XnVar)) {
+ _sqlite3Error(tls, (*Xsqlite3)(_p.Xdb), int32(25))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
+ return int32(25)
}
_i -= 1
- _pVar = (*XMem)(unsafe.Pointer(uintptr(_p.X24) + 48*uintptr(_i)))
+ _pVar = elem25((*XMem)(_p.XaVar), uintptr(_i))
_sqlite3VdbeMemRelease(tls, _pVar)
- *(*uint16)(unsafe.Pointer(&(_pVar.X1))) = uint16(i32(1))
- _sqlite3Error(tls, (*Xsqlite3)(_p.X0), i32(0))
+ _pVar.Xflags = uint16(1)
+ _sqlite3Error(tls, (*Xsqlite3)(_p.Xdb), int32(0))
func() {
- if ((uint32((_p.X32)>>uint(i32(9)))<<uint(i32(31)))>>uint(i32(31))) == 0 && (_p.X41) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77372), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeUnbindØ00__func__Ø000))), unsafe.Pointer(str(8414)))
+ if ((uint32(_p.Xexpired>>9)<<31)>>31) == 0 && _p.Xexpmask != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77372), unsafe.Pointer(&_vdbeUnbindØ00__func__Ø000), unsafe.Pointer(str(8315)))
crt.X__builtin_abort(tls)
}
}()
- if ((_p.X41) != uint32(i32(0))) && (((_p.X41) & func() uint32 {
- if _i >= i32(31) {
- return u32(2147483648)
+ if (_p.Xexpmask != (0)) && ((_p.Xexpmask & func() uint32 {
+ if _i >= int32(31) {
+ return uint32(2147483648)
}
- return (u32(1) << uint(_i))
- }()) != uint32(i32(0))) {
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 1, 0)
+ return (uint32(1) << uint(_i))
+ }()) != (0)) {
+ storebits26(&_p.Xexpired, int16(1), 1, 0)
}
- return i32(0)
+ return int32(0)
}
func _vdbeSafetyNotNull(tls *crt.TLS, _p *TVdbe) (r0 int32) {
if _p == nil {
- Xsqlite3_log(tls, i32(21), str(8446))
- return i32(1)
+ Xsqlite3_log(tls, int32(21), str(8347))
+ return int32(1)
}
return _vdbeSafety(tls, _p)
}
-// Check on a Vdbe to make sure it has not been finalized. Log
-// an error and return true if it has been finalized (or is otherwise
-// invalid). Return false if it is ok.
+// C comment
+// /*
+// ** Check on a Vdbe to make sure it has not been finalized. Log
+// ** an error and return true if it has been finalized (or is otherwise
+// ** invalid). Return false if it is ok.
+// */
func _vdbeSafety(tls *crt.TLS, _p *TVdbe) (r0 int32) {
- if (*Xsqlite3)(_p.X0) == nil {
- Xsqlite3_log(tls, i32(21), str(8486))
- return i32(1)
+ if (*Xsqlite3)(_p.Xdb) == nil {
+ Xsqlite3_log(tls, int32(21), str(8387))
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}
-// Set the current error code to err_code and clear any prior error message.
-// Also set iSysErrno (by calling sqlite3System) if the err_code indicates
-// that would be appropriate.
+// C comment
+// /*
+// ** Set the current error code to err_code and clear any prior error message.
+// ** Also set iSysErrno (by calling sqlite3System) if the err_code indicates
+// ** that would be appropriate.
+// */
func _sqlite3Error(tls *crt.TLS, _db *Xsqlite3, _err_code int32) {
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27796), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ErrorØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27796), unsafe.Pointer(&_sqlite3ErrorØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_db.X10))) = _err_code
- if _err_code != 0 || ((*XMem)(_db.X56) != nil) {
+ _db.XerrCode = _err_code
+ if _err_code != 0 || (_db.XpErr != nil) {
_sqlite3ErrorFinish(tls, _db, _err_code)
}
}
@@ -10566,15 +10498,18 @@ func _sqlite3Error(tls *crt.TLS, _db *Xsqlite3, _err_code int32) {
var _sqlite3ErrorØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ErrorØ00__func__Ø000[0], str(8531), 13)
+ crt.Xstrncpy(nil, &_sqlite3ErrorØ00__func__Ø000[0], str(8432), 13)
}
-// Helper function for sqlite3Error() - called rarely. Broken out into
-// a separate routine to avoid unnecessary register saves on entry to
-// sqlite3Error().
+// C comment
+// /*
+// ** Helper function for sqlite3Error() - called rarely. Broken out into
+// ** a separate routine to avoid unnecessary register saves on entry to
+// ** sqlite3Error().
+// */
func _sqlite3ErrorFinish(tls *crt.TLS, _db *Xsqlite3, _err_code int32) {
- if (*XMem)(_db.X56) != nil {
- _sqlite3ValueSetNull(tls, (*XMem)(_db.X56))
+ if _db.XpErr != nil {
+ _sqlite3ValueSetNull(tls, (*XMem)(_db.XpErr))
}
_sqlite3SystemError(tls, _db, _err_code)
}
@@ -10583,106 +10518,113 @@ func _sqlite3ValueSetNull(tls *crt.TLS, _p *XMem) {
_sqlite3VdbeMemSetNull(tls, _p)
}
-// Load the sqlite3.iSysErrno field if that is an appropriate thing
-// to do based on the SQLite error code in rc.
+// C comment
+// /*
+// ** Load the sqlite3.iSysErrno field if that is an appropriate thing
+// ** to do based on the SQLite error code in rc.
+// */
func _sqlite3SystemError(tls *crt.TLS, _db *Xsqlite3, _rc int32) {
- if _rc == i32(3082) {
+ if _rc == int32(3082) {
return
}
- {
- p := &_rc
- *p = (*p) & i32(255)
- sink1(*p)
- }
- if (_rc == i32(14)) || (_rc == i32(10)) {
- *(*int32)(unsafe.Pointer(&(_db.X12))) = _sqlite3OsGetLastError(tls, (*Xsqlite3_vfs)(_db.X0))
+ _rc &= int32(255)
+ if (_rc == int32(14)) || (_rc == int32(10)) {
+ _db.XiSysErrno = _sqlite3OsGetLastError(tls, (*Xsqlite3_vfs)(_db.XpVfs))
}
}
func _sqlite3OsGetLastError(tls *crt.TLS, _pVfs *Xsqlite3_vfs) (r0 int32) {
return func() int32 {
- if (*(*func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- }{(_pVfs.X17)}))) != nil {
- return (*(*func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- }{(_pVfs.X17)})))(tls, _pVfs, i32(0), nil)
+ if _pVfs.XxGetLastError != nil {
+ return func() func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32 {
+ v := _pVfs.XxGetLastError
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, int32(0), nil)
}
- return i32(0)
+ return int32(0)
}()
}
var _vdbeUnbindØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeUnbindØ00__func__Ø000[0], str(8544), 11)
+ crt.Xstrncpy(nil, &_vdbeUnbindØ00__func__Ø000[0], str(8445), 11)
}
-// This function must be called before exiting any API function (i.e.
-// returning control to the user) that has called sqlite3_malloc or
-// sqlite3_realloc.
-//
-// The returned value is normally a copy of the second argument to this
-// function. However, if a malloc() failure has occurred since the previous
-// invocation SQLITE_NOMEM is returned instead.
-//
-// If an OOM as occurred, then the connection error-code (the value
-// returned by sqlite3_errcode()) is set to SQLITE_NOMEM.
+// C comment
+// /*
+// ** This function must be called before exiting any API function (i.e.
+// ** returning control to the user) that has called sqlite3_malloc or
+// ** sqlite3_realloc.
+// **
+// ** The returned value is normally a copy of the second argument to this
+// ** function. However, if a malloc() failure has occurred since the previous
+// ** invocation SQLITE_NOMEM is returned instead.
+// **
+// ** If an OOM as occurred, then the connection error-code (the value
+// ** returned by sqlite3_errcode()) is set to SQLITE_NOMEM.
+// */
func _sqlite3ApiExit(tls *crt.TLS, _db *Xsqlite3, _rc int32) (r0 int32) {
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25050), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ApiExitØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25050), unsafe.Pointer(&_sqlite3ApiExitØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25051), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ApiExitØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25051), unsafe.Pointer(&_sqlite3ApiExitØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X17) != 0) || (_rc == i32(3082)) {
+ if (_db.XmallocFailed != 0) || (_rc == int32(3082)) {
return _apiOomError(tls, _db)
}
- return _rc & (_db.X11)
+ return _rc & _db.XerrMask
}
var _sqlite3ApiExitØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ApiExitØ00__func__Ø000[0], str(8555), 15)
+ crt.Xstrncpy(nil, &_sqlite3ApiExitØ00__func__Ø000[0], str(8456), 15)
}
-// Take actions at the end of an API call to indicate an OOM error
+// C comment
+// /*
+// ** Take actions at the end of an API call to indicate an OOM error
+// */
func _apiOomError(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
_sqlite3OomClear(tls, _db)
- _sqlite3Error(tls, _db, i32(7))
- return _sqlite3NomemError(tls, i32(25030))
-}
-
-// This routine reactivates the memory allocator and clears the
-// db->mallocFailed flag as necessary.
-//
-// The memory allocator is not restarted if there are running
-// VDBEs.
+ _sqlite3Error(tls, _db, int32(7))
+ return _sqlite3NomemError(tls, int32(25030))
+}
+
+// C comment
+// /*
+// ** This routine reactivates the memory allocator and clears the
+// ** db->mallocFailed flag as necessary.
+// **
+// ** The memory allocator is not restarted if there are running
+// ** VDBEs.
+// */
func _sqlite3OomClear(tls *crt.TLS, _db *Xsqlite3) {
- if ((_db.X17) != 0) && ((_db.X37) == i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_db.X17))) = uint8(i32(0))
- *(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57))))) = i32(0)
+ if (_db.XmallocFailed != 0) && (_db.XnVdbeExec == int32(0)) {
+ _db.XmallocFailed = 0
+ *(*int32)(unsafe.Pointer(&_db.Xu1)) = int32(0)
func() {
- if ((*t7)(unsafe.Pointer(&(_db.X58))).X0) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25019), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OomClearØ00__func__Ø000))), unsafe.Pointer(str(8570)))
+ if (_db.Xlookaside.XbDisable) <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25019), unsafe.Pointer(&_sqlite3OomClearØ00__func__Ø000), unsafe.Pointer(str(8471)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X0))) -= 1
+ _db.Xlookaside.XbDisable -= 1
}
}
var _sqlite3OomClearØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3OomClearØ00__func__Ø000[0], str(8595), 16)
+ crt.Xstrncpy(nil, &_sqlite3OomClearØ00__func__Ø000[0], str(8496), 16)
}
func Xsqlite3_bind_double(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _rValue float64) (r0 int32) {
@@ -10690,9 +10632,9 @@ func Xsqlite3_bind_double(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _rValue
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
_rc = _vdbeUnbind(tls, _p, _i)
- if _rc == i32(0) {
- _sqlite3VdbeMemSetDouble(tls, (*XMem)(unsafe.Pointer(uintptr(_p.X24)+48*uintptr(_i-i32(1)))), _rValue)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ if _rc == int32(0) {
+ _sqlite3VdbeMemSetDouble(tls, elem25((*XMem)(_p.XaVar), uintptr(_i-int32(1))), _rValue)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
}
return _rc
}
@@ -10706,32 +10648,38 @@ func Xsqlite3_bind_int64(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _iValue
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
_rc = _vdbeUnbind(tls, _p, _i)
- if _rc == i32(0) {
- _sqlite3VdbeMemSetInt64(tls, (*XMem)(unsafe.Pointer(uintptr(_p.X24)+48*uintptr(_i-i32(1)))), _iValue)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ if _rc == int32(0) {
+ _sqlite3VdbeMemSetInt64(tls, elem25((*XMem)(_p.XaVar), uintptr(_i-int32(1))), _iValue)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
}
return _rc
}
-// Delete any previous value and set the value stored in *pMem to val,
-// manifest type INTEGER.
+// C comment
+// /*
+// ** Delete any previous value and set the value stored in *pMem to val,
+// ** manifest type INTEGER.
+// */
func _sqlite3VdbeMemSetInt64(tls *crt.TLS, _pMem *XMem, _val int64) {
- if (int32(_pMem.X1) & i32(9312)) != i32(0) {
+ if (int32(_pMem.Xflags) & int32(9312)) != int32(0) {
_vdbeReleaseAndSetInt64(tls, _pMem, _val)
goto _1
}
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = _val
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = _val
+ _pMem.Xflags = uint16(4)
_1:
}
-// The pMem is known to contain content that needs to be destroyed prior
-// to a value change. So invoke the destructor, then set the value to
-// a 64-bit integer.
+// C comment
+// /*
+// ** The pMem is known to contain content that needs to be destroyed prior
+// ** to a value change. So invoke the destructor, then set the value to
+// ** a 64-bit integer.
+// */
func _vdbeReleaseAndSetInt64(tls *crt.TLS, _pMem *XMem, _val int64) {
_sqlite3VdbeMemSetNull(tls, _pMem)
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = _val
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = _val
+ _pMem.Xflags = uint16(4)
}
func Xsqlite3_bind_null(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 int32) {
@@ -10739,97 +10687,120 @@ func Xsqlite3_bind_null(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 int32
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
_rc = _vdbeUnbind(tls, _p, _i)
- if _rc == i32(0) {
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ if _rc == int32(0) {
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
}
return _rc
}
-// Return the number of wildcards that can be potentially bound to.
-// This routine is added to support DBD::SQLite.
+// C comment
+// /*
+// ** Return the number of wildcards that can be potentially bound to.
+// ** This routine is added to support DBD::SQLite.
+// */
func Xsqlite3_bind_parameter_count(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
return func() int32 {
if _p != nil {
- return int32(_p.X4)
- }
- return i32(0)
- }()
-}
-
+ return int32(_p.XnVar)
+ }
+ return int32(0)
+ }()
+}
+
+// C comment
+// /*
+// ** CAPI3REF: Index Of A Parameter With A Given Name
+// ** METHOD: sqlite3_stmt
+// **
+// ** ^Return the index of an SQL parameter given its name. ^The
+// ** index value returned is suitable for use as the second
+// ** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero
+// ** is returned if no matching parameter is found. ^The parameter
+// ** name must be given in UTF-8 even if the original statement
+// ** was prepared from UTF-16 text using [sqlite3_prepare16_v2()].
+// **
+// ** See also: [sqlite3_bind_blob|sqlite3_bind()],
+// ** [sqlite3_bind_parameter_count()], and
+// ** [sqlite3_bind_parameter_name()].
+// */
func Xsqlite3_bind_parameter_index(tls *crt.TLS, _pStmt unsafe.Pointer, _zName *int8) (r0 int32) {
return _sqlite3VdbeParameterIndex(tls, (*TVdbe)(_pStmt), _zName, _sqlite3Strlen30(tls, _zName))
}
-// Given a wildcard parameter name, return the index of the variable
-// with that name. If there is no variable with the given name,
-// return 0.
+// C comment
+// /*
+// ** Given a wildcard parameter name, return the index of the variable
+// ** with that name. If there is no variable with the given name,
+// ** return 0.
+// */
func _sqlite3VdbeParameterIndex(tls *crt.TLS, _p *TVdbe, _zName *int8, _nName int32) (r0 int32) {
if (_p == nil) || (_zName == nil) {
- return i32(0)
+ return int32(0)
}
- return _sqlite3VListNameToNum(tls, _p.X25, _zName, _nName)
+ return _sqlite3VListNameToNum(tls, _p.XpVList, _zName, _nName)
}
-// Return the number of the variable named zName, if it is in VList.
-// or return 0 if there is no such variable.
+// C comment
+// /*
+// ** Return the number of the variable named zName, if it is in VList.
+// ** or return 0 if there is no such variable.
+// */
func _sqlite3VListNameToNum(tls *crt.TLS, _pIn *int32, _zName *int8, _nName int32) (r0 int32) {
var _i, _mx int32
var _1_z *int8
if _pIn == nil {
- return i32(0)
+ return int32(0)
}
- _mx = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(1))))
- _i = i32(2)
+ _mx = *elem8(_pIn, uintptr(1))
+ _i = int32(2)
_1:
- _1_z = (*int8)(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(_i+i32(2))))))
- if (crt.Xstrncmp(tls, _1_z, _zName, uint32(_nName)) == i32(0)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(_nName)))) == i32(0)) {
- return *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(_i)))
- }
- {
- p := &_i
- *p = (*p) + (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(_i+i32(1)))))
- sink1(*p)
+ _1_z = (*int8)(unsafe.Pointer(elem8(_pIn, uintptr(_i+int32(2)))))
+ if (crt.Xstrncmp(tls, _1_z, _zName, uint32(_nName)) == int32(0)) && (int32(*elem1(_1_z, uintptr(_nName))) == int32(0)) {
+ return *elem8(_pIn, uintptr(_i))
}
+ _i += *elem8(_pIn, uintptr(_i+int32(1)))
if _i < _mx {
goto _1
}
- return i32(0)
+ return int32(0)
}
-// Return the name of a wildcard parameter. Return NULL if the index
-// is out of range or if the wildcard is unnamed.
-//
-// The result is always UTF-8.
+// C comment
+// /*
+// ** Return the name of a wildcard parameter. Return NULL if the index
+// ** is out of range or if the wildcard is unnamed.
+// **
+// ** The result is always UTF-8.
+// */
func Xsqlite3_bind_parameter_name(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 *int8) {
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
if _p == nil {
return nil
}
- return _sqlite3VListNumToName(tls, _p.X25, _i)
+ return _sqlite3VListNumToName(tls, _p.XpVList, _i)
}
-// Return a pointer to the name of a variable in the given VList that
-// has the value iVal. Or return a NULL if there is no such variable in
-// the list
+// C comment
+// /*
+// ** Return a pointer to the name of a variable in the given VList that
+// ** has the value iVal. Or return a NULL if there is no such variable in
+// ** the list
+// */
func _sqlite3VListNumToName(tls *crt.TLS, _pIn *int32, _iVal int32) (r0 *int8) {
var _i, _mx int32
if _pIn == nil {
return nil
}
- _mx = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(1))))
- _i = i32(2)
+ _mx = *elem8(_pIn, uintptr(1))
+ _i = int32(2)
_1:
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(_i)))) == _iVal {
- return (*int8)(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(_i+i32(2))))))
- }
- {
- p := &_i
- *p = (*p) + (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(_i+i32(1)))))
- sink1(*p)
+ if (*elem8(_pIn, uintptr(_i))) == _iVal {
+ return (*int8)(unsafe.Pointer(elem8(_pIn, uintptr(_i+int32(2)))))
}
+ _i += *elem8(_pIn, uintptr(_i+int32(1)))
if _i < _mx {
goto _1
}
@@ -10837,45 +10808,46 @@ _1:
}
func Xsqlite3_bind_text(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _zData *int8, _nData int32, _xDel func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
- return _bindText(tls, _pStmt, _i, (unsafe.Pointer)(_zData), _nData, _xDel, uint8(i32(1)))
+ return _bindText(tls, _pStmt, _i, unsafe.Pointer(_zData), _nData, _xDel, uint8(1))
}
func Xsqlite3_bind_text16(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _zData unsafe.Pointer, _nData int32, _xDel func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
- return _bindText(tls, _pStmt, _i, _zData, _nData, _xDel, uint8(i32(2)))
+ return _bindText(tls, _pStmt, _i, _zData, _nData, _xDel, uint8(2))
}
-// SQLITE_OMIT_UTF16
+// C comment
+// /* SQLITE_OMIT_UTF16 */
func Xsqlite3_bind_value(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _pValue *XMem) (r0 int32) {
var _rc int32
switch Xsqlite3_value_type(tls, _pValue) {
- case i32(1):
+ case int32(1):
goto _1
- case i32(2):
+ case int32(2):
goto _2
- case i32(3):
+ case int32(3):
goto _4
- case i32(4):
+ case int32(4):
goto _3
default:
goto _5
}
_1:
- _rc = Xsqlite3_bind_int64(tls, _pStmt, _i, *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pValue.X0))))))
+ _rc = Xsqlite3_bind_int64(tls, _pStmt, _i, *(*int64)(unsafe.Pointer(&_pValue.Xu)))
goto _6
_2:
- _rc = Xsqlite3_bind_double(tls, _pStmt, _i, *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pValue.X0))))))
+ _rc = Xsqlite3_bind_double(tls, _pStmt, _i, *(*float64)(unsafe.Pointer(&_pValue.Xu)))
goto _6
_3:
- if (int32(_pValue.X1) & i32(16384)) != 0 {
- _rc = Xsqlite3_bind_zeroblob(tls, _pStmt, _i, *(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pValue.X0))))))
+ if (int32(_pValue.Xflags) & int32(16384)) != 0 {
+ _rc = Xsqlite3_bind_zeroblob(tls, _pStmt, _i, *(*int32)(unsafe.Pointer(&_pValue.Xu)))
goto _8
}
- _rc = Xsqlite3_bind_blob(tls, _pStmt, _i, (unsafe.Pointer)(_pValue.X5), _pValue.X4, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ _rc = Xsqlite3_bind_blob(tls, _pStmt, _i, unsafe.Pointer(_pValue.Xz), _pValue.Xn, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
_8:
goto _6
_4:
- _rc = _bindText(tls, _pStmt, _i, (unsafe.Pointer)(_pValue.X5), _pValue.X4, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})), _pValue.X2)
+ _rc = _bindText(tls, _pStmt, _i, unsafe.Pointer(_pValue.Xz), _pValue.Xn, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})), _pValue.Xenc)
goto _6
_5:
_rc = Xsqlite3_bind_null(tls, _pStmt, _i)
@@ -10889,97 +10861,163 @@ func Xsqlite3_bind_zeroblob(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _n in
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
_rc = _vdbeUnbind(tls, _p, _i)
- if _rc == i32(0) {
- _sqlite3VdbeMemSetZeroBlob(tls, (*XMem)(unsafe.Pointer(uintptr(_p.X24)+48*uintptr(_i-i32(1)))), _n)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ if _rc == int32(0) {
+ _sqlite3VdbeMemSetZeroBlob(tls, elem25((*XMem)(_p.XaVar), uintptr(_i-int32(1))), _n)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
}
return _rc
}
-// Delete any previous value and set the value to be a BLOB of length
-// n containing all zeros.
+// C comment
+// /*
+// ** Delete any previous value and set the value to be a BLOB of length
+// ** n containing all zeros.
+// */
func _sqlite3VdbeMemSetZeroBlob(tls *crt.TLS, _pMem *XMem, _n int32) {
_sqlite3VdbeMemRelease(tls, _pMem)
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(16400))
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = i32(0)
- if _n < i32(0) {
- _n = i32(0)
+ _pMem.Xflags = uint16(16400)
+ _pMem.Xn = int32(0)
+ if _n < int32(0) {
+ _n = int32(0)
}
- *(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = _n
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = uint8(i32(1))
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = nil
+ *(*int32)(unsafe.Pointer(&_pMem.Xu)) = _n
+ _pMem.Xenc = uint8(1)
+ _pMem.Xz = nil
}
-// This routine sets the busy callback for an Sqlite database to the
-// given callback function with the given argument.
+// C comment
+// /*
+// ** This routine sets the busy callback for an Sqlite database to the
+// ** given callback function with the given argument.
+// */
func Xsqlite3_busy_handler(tls *crt.TLS, _db *Xsqlite3, _xBusy func(*crt.TLS, unsafe.Pointer, int32) int32, _pArg unsafe.Pointer) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(141988))
+ return _sqlite3MisuseError(tls, int32(141988))
+ }
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _db.XbusyHandler.XxFunc = _xBusy
+ _db.XbusyHandler.XpArg = _pArg
+ _db.XbusyHandler.XnBusy = int32(0)
+ _db.XbusyTimeout = int32(0)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Check to make sure we have a valid db pointer. This test is not
+// ** foolproof but it does provide some measure of protection against
+// ** misuse of the interface such as passing in db pointers that are
+// ** NULL or which have been previously closed. If this routine returns
+// ** 1 it means that the db pointer is valid and 0 if it should not be
+// ** dereferenced for any reason. The calling function should invoke
+// ** SQLITE_MISUSE immediately.
+// **
+// ** sqlite3SafetyCheckOk() requires that the db pointer be valid for
+// ** use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to
+// ** open properly and is not fit for general use but which can be
+// ** used as an argument to sqlite3_errmsg() or sqlite3_close().
+// */
+func _sqlite3SafetyCheckOk(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
+ var _magic uint32
+ if _db == nil {
+ _logBadConnection(tls, str(285))
+ return int32(0)
+ }
+ _magic = _db.Xmagic
+ if _magic == uint32(2687084183) {
+ goto _1
+ }
+ if _sqlite3SafetyCheckSickOrOk(tls, _db) != 0 {
+ _logBadConnection(tls, str(8512))
+ }
+ return int32(0)
+
+_1:
+ return int32(1)
+}
+
+// C comment
+// /*
+// ** Log an error that is an API call on a connection pointer that should
+// ** not have been used. The "type" of connection pointer is given as the
+// ** argument. The zType is a word like "NULL" or "closed" or "invalid".
+// */
+func _logBadConnection(tls *crt.TLS, _zType *int8) {
+ Xsqlite3_log(tls, int32(21), str(8521), unsafe.Pointer(_zType))
+}
+
+func _sqlite3SafetyCheckSickOrOk(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
+ var _magic uint32
+ _magic = _db.Xmagic
+ if ((_magic != uint32(1266094736)) && (_magic != uint32(2687084183))) && (_magic != uint32(4030429446)) {
+ _logBadConnection(tls, str(8566))
+ return int32(0)
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&((*t19)(unsafe.Pointer(&(_db.X71))).X0))) = _xBusy
- *(*unsafe.Pointer)(unsafe.Pointer(&((*t19)(unsafe.Pointer(&(_db.X71))).X1))) = _pArg
- *(*int32)(unsafe.Pointer(&((*t19)(unsafe.Pointer(&(_db.X71))).X2))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_db.X74))) = i32(0)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return i32(0)
+ return int32(1)
}
-// This routine installs a default busy handler that waits for the
-// specified number of milliseconds before returning 0.
+// C comment
+// /*
+// ** This routine installs a default busy handler that waits for the
+// ** specified number of milliseconds before returning 0.
+// */
func Xsqlite3_busy_timeout(tls *crt.TLS, _db *Xsqlite3, _ms int32) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(142038))
+ return _sqlite3MisuseError(tls, int32(142038))
}
- if _ms > i32(0) {
- Xsqlite3_busy_handler(tls, _db, _sqliteDefaultBusyCallback, (unsafe.Pointer)(_db))
- *(*int32)(unsafe.Pointer(&(_db.X74))) = _ms
+ if _ms > int32(0) {
+ Xsqlite3_busy_handler(tls, _db, _sqliteDefaultBusyCallback, unsafe.Pointer(_db))
+ _db.XbusyTimeout = _ms
goto _2
}
Xsqlite3_busy_handler(tls, _db, nil, nil)
_2:
- return i32(0)
+ return int32(0)
}
-// This routine implements a busy callback that sleeps and tries
-// again until a timeout value is reached. The timeout value is
-// an integer number of milliseconds passed in as the first
-// argument.
+// C comment
+// /*
+// ** This routine implements a busy callback that sleeps and tries
+// ** again until a timeout value is reached. The timeout value is
+// ** an integer number of milliseconds passed in as the first
+// ** argument.
+// */
func _sqliteDefaultBusyCallback(tls *crt.TLS, _ptr unsafe.Pointer, _count int32) (r0 int32) {
var _timeout, _delay, _prior int32
var _db *Xsqlite3
_db = (*Xsqlite3)(_ptr)
- _timeout = _db.X74
+ _timeout = _db.XbusyTimeout
func() {
- if _count < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(141934), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqliteDefaultBusyCallbackØ00__func__Ø000))), unsafe.Pointer(str(8611)))
+ if _count < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(141934), unsafe.Pointer(&_sqliteDefaultBusyCallbackØ00__func__Ø000), unsafe.Pointer(str(8574)))
crt.X__builtin_abort(tls)
}
}()
- if _count < i32(12) {
- _delay = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqliteDefaultBusyCallbackØ00delaysØ001)) + 1*uintptr(_count))))
- _prior = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqliteDefaultBusyCallbackØ00totalsØ002)) + 1*uintptr(_count))))
+ if _count < int32(12) {
+ _delay = int32(*elem15((*uint8)(unsafe.Pointer(&_sqliteDefaultBusyCallbackØ00delaysØ001)), uintptr(_count)))
+ _prior = int32(*elem15((*uint8)(unsafe.Pointer(&_sqliteDefaultBusyCallbackØ00totalsØ002)), uintptr(_count)))
goto _3
}
- _delay = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqliteDefaultBusyCallbackØ00delaysØ001)) + 1*uintptr(i32(11)))))
- _prior = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqliteDefaultBusyCallbackØ00totalsØ002)) + 1*uintptr(i32(11))))) + (_delay * (_count - i32(11)))
+ _delay = int32(*elem15((*uint8)(unsafe.Pointer(&_sqliteDefaultBusyCallbackØ00delaysØ001)), uintptr(11)))
+ _prior = int32(*elem15((*uint8)(unsafe.Pointer(&_sqliteDefaultBusyCallbackØ00totalsØ002)), uintptr(11))) + (_delay * (_count - int32(11)))
_3:
if (_prior + _delay) <= _timeout {
goto _4
}
_delay = _timeout - _prior
- if _delay <= i32(0) {
- return i32(0)
+ if _delay <= int32(0) {
+ return int32(0)
}
_4:
- _sqlite3OsSleep(tls, (*Xsqlite3_vfs)(_db.X0), _delay*i32(1000))
- return i32(1)
+ _sqlite3OsSleep(tls, (*Xsqlite3_vfs)(_db.XpVfs), _delay*int32(1000))
+ return int32(1)
}
var _sqliteDefaultBusyCallbackØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqliteDefaultBusyCallbackØ00__func__Ø000[0], str(8620), 26)
+ crt.Xstrncpy(nil, &_sqliteDefaultBusyCallbackØ00__func__Ø000[0], str(8583), 26)
}
var _sqliteDefaultBusyCallbackØ00delaysØ001 [12]uint8
@@ -10995,67 +11033,70 @@ func init() {
}
func _sqlite3OsSleep(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _nMicro int32) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_vfs, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{(_pVfs.X15)})))(tls, _pVfs, _nMicro)
+ return func() func(*crt.TLS, *Xsqlite3_vfs, int32) int32 {
+ v := _pVfs.XxSleep
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _nMicro)
}
-// Return the number of changes in the most recent call to sqlite3_exec().
+// C comment
+// /*
+// ** Return the number of changes in the most recent call to sqlite3_exec().
+// */
func Xsqlite3_changes(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(141413))
- return i32(0)
- }
- return _db.X29
-}
-
-// Two variations on the public interface for closing a database
-// connection. The sqlite3_close() version returns SQLITE_BUSY and
-// leaves the connection option if there are unfinalized prepared
-// statements or unfinished sqlite3_backups. The sqlite3_close_v2()
-// version forces the connection to become a zombie if there are
-// unclosed resources, and arranges for deallocation when the last
-// prepare statement or sqlite3_backup closes.
+ _sqlite3MisuseError(tls, int32(141413))
+ return int32(0)
+ }
+ return _db.XnChange
+}
+
+// C comment
+// /*
+// ** Two variations on the public interface for closing a database
+// ** connection. The sqlite3_close() version returns SQLITE_BUSY and
+// ** leaves the connection option if there are unfinalized prepared
+// ** statements or unfinished sqlite3_backups. The sqlite3_close_v2()
+// ** version forces the connection to become a zombie if there are
+// ** unclosed resources, and arranges for deallocation when the last
+// ** prepare statement or sqlite3_backup closes.
+// */
func Xsqlite3_close(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
- return _sqlite3Close(tls, _db, i32(0))
+ return _sqlite3Close(tls, _db, int32(0))
}
-// Close an existing SQLite database
+// C comment
+// /*
+// ** Close an existing SQLite database
+// */
func _sqlite3Close(tls *crt.TLS, _db *Xsqlite3, _forceZombie int32) (r0 int32) {
if _db == nil {
- return i32(0)
+ return int32(0)
}
if _sqlite3SafetyCheckSickOrOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(141522))
+ return _sqlite3MisuseError(tls, int32(141522))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- if (int32(_db.X24) & i32(8)) != 0 {
- (_db.X41)(tls, uint32(i32(8)), _db.X42, (unsafe.Pointer)(_db), nil)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ if (int32(_db.XmTrace) & int32(8)) != 0 {
+ _db.XxTrace(tls, uint32(8), _db.XpTraceArg, unsafe.Pointer(_db), nil)
}
_disconnectAllVtab(tls, _db)
_sqlite3VtabRollback(tls, _db)
if (_forceZombie == 0) && _connectionIsBusy(tls, _db) != 0 {
- _sqlite3ErrorWithMsg(tls, _db, i32(5), str(8646))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return i32(5)
+ _sqlite3ErrorWithMsg(tls, _db, int32(5), str(8609))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return int32(5)
}
- *(*uint32)(unsafe.Pointer(&(_db.X28))) = uint32(i32(1691352191))
+ _db.Xmagic = uint32(1691352191)
_sqlite3LeaveMutexAndCloseZombie(tls, _db)
- return i32(0)
-}
-
-func _sqlite3SafetyCheckSickOrOk(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
- var _magic uint32
- _magic = _db.X28
- if ((_magic != uint32(i32(1266094736))) && (_magic != u32(2687084183))) && (_magic != u32(4030429446)) {
- _logBadConnection(tls, str(8714))
- return i32(0)
- }
- return i32(1)
+ return int32(0)
}
-// Disconnect all sqlite3_vtab objects that belong to database connection
-// db. This is called when db is being closed.
+// C comment
+// /*
+// ** Disconnect all sqlite3_vtab objects that belong to database connection
+// ** db. This is called when db is being closed.
+// */
func _disconnectAllVtab(tls *crt.TLS, _db *Xsqlite3) {
var _i int32
var _1_pSchema *XSchema
@@ -11063,41 +11104,41 @@ func _disconnectAllVtab(tls *crt.TLS, _db *Xsqlite3) {
var _3_pTab *XTable
var _4_pMod *XModule
_sqlite3BtreeEnterAll(tls, _db)
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _3
}
- _1_pSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X4)
- if (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_i))).X4) == nil {
+ _1_pSchema = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpSchema)
+ if (elem27((*XDb)(_db.XaDb), uintptr(_i)).XpSchema) == nil {
goto _4
}
- _p = (*XHashElem)((*XHash)(unsafe.Pointer(&(_1_pSchema.X2))).X2)
+ _p = (*XHashElem)(_1_pSchema.XtblHash.Xfirst)
_5:
if _p == nil {
goto _8
}
- _3_pTab = (*XTable)(_p.X2)
- if (_3_pTab.X16) != 0 {
+ _3_pTab = (*XTable)(_p.Xdata)
+ if _3_pTab.XnModuleArg != 0 {
_sqlite3VtabDisconnect(tls, _db, _3_pTab)
}
- _p = (*XHashElem)(_p.X0)
+ _p = (*XHashElem)(_p.Xnext)
goto _5
_8:
_4:
_i += 1
goto _0
_3:
- _p = (*XHashElem)((*XHash)(unsafe.Pointer(&(_db.X65))).X2)
+ _p = (*XHashElem)(_db.XaModule.Xfirst)
_10:
if _p == nil {
goto _13
}
- _4_pMod = (*XModule)(_p.X2)
- if (*XTable)(_4_pMod.X4) != nil {
- _sqlite3VtabDisconnect(tls, _db, (*XTable)(_4_pMod.X4))
+ _4_pMod = (*XModule)(_p.Xdata)
+ if _4_pMod.XpEpoTab != nil {
+ _sqlite3VtabDisconnect(tls, _db, (*XTable)(_4_pMod.XpEpoTab))
}
- _p = (*XHashElem)(_p.X0)
+ _p = (*XHashElem)(_p.Xnext)
goto _10
_13:
_sqlite3VtabUnlockList(tls, _db)
@@ -11105,129 +11146,135 @@ _13:
}
func _sqlite3BtreeEnterAll(tls *crt.TLS, _db *Xsqlite3) {
- if int32(_db.X25) == i32(0) {
+ if int32(_db.XskipBtreeMutex) == int32(0) {
_btreeEnterAll(tls, _db)
}
}
-// Enter the mutex on every Btree associated with a database
-// connection. This is needed (for example) prior to parsing
-// a statement since we will be comparing table and column names
-// against all schemas and we do not want those schemas being
-// reset out from under us.
-//
-// There is a corresponding leave-all procedures.
-//
-// Enter the mutexes in accending order by BtShared pointer address
-// to avoid the possibility of deadlock when two threads with
-// two or more btrees in common both try to lock all their btrees
-// at the same instant.
+// C comment
+// /*
+// ** Enter the mutex on every Btree associated with a database
+// ** connection. This is needed (for example) prior to parsing
+// ** a statement since we will be comparing table and column names
+// ** against all schemas and we do not want those schemas being
+// ** reset out from under us.
+// **
+// ** There is a corresponding leave-all procedures.
+// **
+// ** Enter the mutexes in accending order by BtShared pointer address
+// ** to avoid the possibility of deadlock when two threads with
+// ** two or more btrees in common both try to lock all their btrees
+// ** at the same instant.
+// */
func _btreeEnterAll(tls *crt.TLS, _db *Xsqlite3) {
var _i, _skipOk int32
var _p *XBtree
- _skipOk = i32(1)
+ _skipOk = int32(1)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58913), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeEnterAllØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58913), unsafe.Pointer(&_btreeEnterAllØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_2:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _5
}
- _p = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
- if (_p != nil) && ((_p.X3) != 0) {
+ _p = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
+ if (_p != nil) && (_p.Xsharable != 0) {
_sqlite3BtreeEnter(tls, _p)
- _skipOk = i32(0)
+ _skipOk = int32(0)
}
_i += 1
goto _2
_5:
- *(*uint8)(unsafe.Pointer(&(_db.X25))) = uint8(_skipOk)
+ _db.XskipBtreeMutex = uint8(_skipOk)
}
var _btreeEnterAllØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_btreeEnterAllØ00__func__Ø000[0], str(8722), 14)
-}
-
-// Enter a mutex on the given BTree object.
-//
-// If the object is not sharable, then no mutex is ever required
-// and this routine is a no-op. The underlying mutex is non-recursive.
-// But we keep a reference count in Btree.wantToLock so the behavior
-// of this interface is recursive.
-//
-// To avoid deadlocks, multiple Btrees are locked in the same order
-// by all database connections. The p->pNext is a list of other
-// Btrees belonging to the same database connection as the p Btree
-// which need to be locked after p. If we cannot get a lock on
-// p, then first unlock all of the others on p->pNext, then wait
-// for the lock to become available on p, then relock all of the
-// subsequent Btrees that desire a lock.
+ crt.Xstrncpy(nil, &_btreeEnterAllØ00__func__Ø000[0], str(8677), 14)
+}
+
+// C comment
+// /*
+// ** Enter a mutex on the given BTree object.
+// **
+// ** If the object is not sharable, then no mutex is ever required
+// ** and this routine is a no-op. The underlying mutex is non-recursive.
+// ** But we keep a reference count in Btree.wantToLock so the behavior
+// ** of this interface is recursive.
+// **
+// ** To avoid deadlocks, multiple Btrees are locked in the same order
+// ** by all database connections. The p->pNext is a list of other
+// ** Btrees belonging to the same database connection as the p Btree
+// ** which need to be locked after p. If we cannot get a lock on
+// ** p, then first unlock all of the others on p->pNext, then wait
+// ** for the lock to become available on p, then relock all of the
+// ** subsequent Btrees that desire a lock.
+// */
func _sqlite3BtreeEnter(tls *crt.TLS, _p *XBtree) {
func() {
- if (*XBtree)(_p.X9) != nil && uintptr(unsafe.Pointer((*XBtShared)((*XBtree)(_p.X9).X1))) <= uintptr(unsafe.Pointer((*XBtShared)(_p.X1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58799), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000))), unsafe.Pointer(str(8736)))
+ if (*XBtree)(_p.XpNext) != nil && crt.P2U((*XBtree)(_p.XpNext).XpBt) <= crt.P2U(_p.XpBt) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58799), unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000), unsafe.Pointer(str(8691)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtree)(_p.X10) != nil && uintptr(unsafe.Pointer((*XBtShared)((*XBtree)(_p.X10).X1))) >= uintptr(unsafe.Pointer((*XBtShared)(_p.X1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58800), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000))), unsafe.Pointer(str(8772)))
+ if (*XBtree)(_p.XpPrev) != nil && crt.P2U((*XBtree)(_p.XpPrev).XpBt) >= crt.P2U(_p.XpBt) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58800), unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000), unsafe.Pointer(str(8727)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtree)(_p.X9) != nil && (*Xsqlite3)((*XBtree)(_p.X9).X0) != (*Xsqlite3)(_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58801), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000))), unsafe.Pointer(str(8808)))
+ if (*XBtree)(_p.XpNext) != nil && (*Xsqlite3)((*XBtree)(_p.XpNext).Xdb) != (*Xsqlite3)(_p.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58801), unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000), unsafe.Pointer(str(8763)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtree)(_p.X10) != nil && (*Xsqlite3)((*XBtree)(_p.X10).X0) != (*Xsqlite3)(_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58802), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000))), unsafe.Pointer(str(8843)))
+ if (*XBtree)(_p.XpPrev) != nil && (*Xsqlite3)((*XBtree)(_p.XpPrev).Xdb) != (*Xsqlite3)(_p.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58802), unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000), unsafe.Pointer(str(8798)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X3) == 0 && ((*XBtree)(_p.X9) != nil || (*XBtree)(_p.X10) != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58803), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000))), unsafe.Pointer(str(8878)))
+ if _p.Xsharable == 0 && ((*XBtree)(_p.XpNext) != nil || (*XBtree)(_p.XpPrev) != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58803), unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000), unsafe.Pointer(str(8833)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X4) != 0 && (_p.X6) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58806), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000))), unsafe.Pointer(str(8922)))
+ if _p.Xlocked != 0 && _p.XwantToLock <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58806), unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000), unsafe.Pointer(str(8877)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X3) == 0 && (_p.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58807), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000))), unsafe.Pointer(str(8952)))
+ if _p.Xsharable == 0 && _p.XwantToLock != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58807), unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000), unsafe.Pointer(str(8907)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58810), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58810), unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_p.X4) != i32(0) || (_p.X3) == 0) && (*Xsqlite3)((*XBtShared)(_p.X1).X1) != (*Xsqlite3)(_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58814), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000))), unsafe.Pointer(str(9017)))
+ if (int32(_p.Xlocked) != int32(0) || _p.Xsharable == 0) && (*Xsqlite3)((*XBtShared)(_p.XpBt).Xdb) != (*Xsqlite3)(_p.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58814), unsafe.Pointer(&_sqlite3BtreeEnterØ00__func__Ø000), unsafe.Pointer(str(8972)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X3) == 0 {
+ if _p.Xsharable == 0 {
return
}
- *(*int32)(unsafe.Pointer(&(_p.X6))) += 1
- if (_p.X4) != 0 {
+ _p.XwantToLock += 1
+ if _p.Xlocked != 0 {
return
}
_btreeLockCarefully(tls, _p)
@@ -11236,81 +11283,85 @@ func _sqlite3BtreeEnter(tls *crt.TLS, _p *XBtree) {
var _sqlite3BtreeEnterØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeEnterØ00__func__Ø000[0], str(9068), 18)
+ crt.Xstrncpy(nil, &_sqlite3BtreeEnterØ00__func__Ø000[0], str(9023), 18)
}
-// This is a helper function for sqlite3BtreeLock(). By moving
-// complex, but seldom used logic, out of sqlite3BtreeLock() and
-// into this routine, we avoid unnecessary stack pointer changes
-// and thus help the sqlite3BtreeLock() routine to run much faster
-// in the common case.
+// C comment
+// /* This is a helper function for sqlite3BtreeLock(). By moving
+// ** complex, but seldom used logic, out of sqlite3BtreeLock() and
+// ** into this routine, we avoid unnecessary stack pointer changes
+// ** and thus help the sqlite3BtreeLock() routine to run much faster
+// ** in the common case.
+// */
func _btreeLockCarefully(tls *crt.TLS, _p *XBtree) {
var _pLater *XBtree
- if Xsqlite3_mutex_try(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.X1).X21)) == i32(0) {
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XBtShared)(_p.X1).X1))))) = (*Xsqlite3)(_p.X0)
- *(*uint8)(unsafe.Pointer(&(_p.X4))) = uint8(i32(1))
+ if Xsqlite3_mutex_try(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.XpBt).Xmutex)) == int32(0) {
+ *(**Xsqlite3)(unsafe.Pointer(&((*XBtShared)(_p.XpBt).Xdb))) = (*Xsqlite3)(_p.Xdb)
+ _p.Xlocked = uint8(1)
return
}
- _pLater = (*XBtree)(_p.X9)
+ _pLater = (*XBtree)(_p.XpNext)
_1:
if _pLater == nil {
goto _4
}
func() {
- if (_pLater.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58847), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeLockCarefullyØ00__func__Ø000))), unsafe.Pointer(str(9086)))
+ if _pLater.Xsharable == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58847), unsafe.Pointer(&_btreeLockCarefullyØ00__func__Ø000), unsafe.Pointer(str(9041)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtree)(_pLater.X9) != nil && uintptr(unsafe.Pointer((*XBtShared)((*XBtree)(_pLater.X9).X1))) <= uintptr(unsafe.Pointer((*XBtShared)(_pLater.X1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58848), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeLockCarefullyØ00__func__Ø000))), unsafe.Pointer(str(9103)))
+ if (*XBtree)(_pLater.XpNext) != nil && crt.P2U((*XBtree)(_pLater.XpNext).XpBt) <= crt.P2U(_pLater.XpBt) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58848), unsafe.Pointer(&_btreeLockCarefullyØ00__func__Ø000), unsafe.Pointer(str(9058)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pLater.X4) != 0 && (_pLater.X6) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58849), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeLockCarefullyØ00__func__Ø000))), unsafe.Pointer(str(9154)))
+ if _pLater.Xlocked != 0 && _pLater.XwantToLock <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58849), unsafe.Pointer(&_btreeLockCarefullyØ00__func__Ø000), unsafe.Pointer(str(9109)))
crt.X__builtin_abort(tls)
}
}()
- if (_pLater.X4) != 0 {
+ if _pLater.Xlocked != 0 {
_unlockBtreeMutex(tls, _pLater)
}
- _pLater = (*XBtree)(_pLater.X9)
+ _pLater = (*XBtree)(_pLater.XpNext)
goto _1
_4:
_lockBtreeMutex(tls, _p)
- _pLater = (*XBtree)(_p.X9)
+ _pLater = (*XBtree)(_p.XpNext)
_14:
if _pLater == nil {
goto _17
}
- if (_pLater.X6) != 0 {
+ if _pLater.XwantToLock != 0 {
_lockBtreeMutex(tls, _pLater)
}
- _pLater = (*XBtree)(_pLater.X9)
+ _pLater = (*XBtree)(_pLater.XpNext)
goto _14
_17:
}
-// Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
-// thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
+// C comment
+// /*
+// ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
+// ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
+// */
func Xsqlite3_mutex_try(tls *crt.TLS, _p *Xsqlite3_mutex) (r0 int32) {
var _rc int32
- _rc = i32(0)
+ _rc = int32(0)
if _p != nil {
func() {
- if (*(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X5)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22877), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_mutex_tryØ00__func__Ø000))), unsafe.Pointer(str(9194)))
+ if (_sqlite3Config.Xmutex.XxMutexTry) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22877), unsafe.Pointer(&_sqlite3_mutex_tryØ00__func__Ø000), unsafe.Pointer(str(9149)))
crt.X__builtin_abort(tls)
}
}()
- return (*(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X5)})))(tls, _p)
+ return func() func(*crt.TLS, *Xsqlite3_mutex) int32 {
+ v := _sqlite3Config.Xmutex.XxMutexTry
+ return *(*func(*crt.TLS, *Xsqlite3_mutex) int32)(unsafe.Pointer(&v))
+ }()(tls, _p)
}
return _rc
}
@@ -11318,126 +11369,135 @@ func Xsqlite3_mutex_try(tls *crt.TLS, _p *Xsqlite3_mutex) (r0 int32) {
var _sqlite3_mutex_tryØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_mutex_tryØ00__func__Ø000[0], str(9230), 18)
+ crt.Xstrncpy(nil, &_sqlite3_mutex_tryØ00__func__Ø000[0], str(9185), 18)
}
var _btreeLockCarefullyØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_btreeLockCarefullyØ00__func__Ø000[0], str(9248), 19)
+ crt.Xstrncpy(nil, &_btreeLockCarefullyØ00__func__Ø000[0], str(9203), 19)
}
-// Release the BtShared mutex associated with B-Tree handle p and
-// clear the p->locked boolean.
+// C comment
+// /*
+// ** Release the BtShared mutex associated with B-Tree handle p and
+// ** clear the p->locked boolean.
+// */
func _unlockBtreeMutex(tls *crt.TLS, _p *XBtree) {
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
- if int32(_p.X4) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58766), unsafe.Pointer((*int8)(unsafe.Pointer(&_unlockBtreeMutexØ00__func__Ø000))), unsafe.Pointer(str(9267)))
+ if int32(_p.Xlocked) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58766), unsafe.Pointer(&_unlockBtreeMutexØ00__func__Ø000), unsafe.Pointer(str(9222)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58767), unsafe.Pointer((*int8)(unsafe.Pointer(&_unlockBtreeMutexØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58767), unsafe.Pointer(&_unlockBtreeMutexØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58768), unsafe.Pointer((*int8)(unsafe.Pointer(&_unlockBtreeMutexØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58768), unsafe.Pointer(&_unlockBtreeMutexØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_p.X0) != (*Xsqlite3)(_pBt.X1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58769), unsafe.Pointer((*int8)(unsafe.Pointer(&_unlockBtreeMutexØ00__func__Ø000))), unsafe.Pointer(str(9311)))
+ if (*Xsqlite3)(_p.Xdb) != (*Xsqlite3)(_pBt.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58769), unsafe.Pointer(&_unlockBtreeMutexØ00__func__Ø000), unsafe.Pointer(str(9266)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pBt.X21))
- *(*uint8)(unsafe.Pointer(&(_p.X4))) = uint8(i32(0))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pBt.Xmutex))
+ _p.Xlocked = 0
}
var _unlockBtreeMutexØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_unlockBtreeMutexØ00__func__Ø000[0], str(9326), 17)
+ crt.Xstrncpy(nil, &_unlockBtreeMutexØ00__func__Ø000[0], str(9281), 17)
}
-// Obtain the BtShared mutex associated with B-Tree handle p. Also,
-// set BtShared.db to the database handle associated with p and the
-// p->locked boolean to true.
+// C comment
+// /*
+// ** Obtain the BtShared mutex associated with B-Tree handle p. Also,
+// ** set BtShared.db to the database handle associated with p and the
+// ** p->locked boolean to true.
+// */
func _lockBtreeMutex(tls *crt.TLS, _p *XBtree) {
func() {
- if int32(_p.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58751), unsafe.Pointer((*int8)(unsafe.Pointer(&_lockBtreeMutexØ00__func__Ø000))), unsafe.Pointer(str(9343)))
+ if int32(_p.Xlocked) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58751), unsafe.Pointer(&_lockBtreeMutexØ00__func__Ø000), unsafe.Pointer(str(9298)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_notheld(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.X1).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58752), unsafe.Pointer((*int8)(unsafe.Pointer(&_lockBtreeMutexØ00__func__Ø000))), unsafe.Pointer(str(9356)))
+ if Xsqlite3_mutex_notheld(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58752), unsafe.Pointer(&_lockBtreeMutexØ00__func__Ø000), unsafe.Pointer(str(9311)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58753), unsafe.Pointer((*int8)(unsafe.Pointer(&_lockBtreeMutexØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58753), unsafe.Pointer(&_lockBtreeMutexØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.X1).X21))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XBtShared)(_p.X1).X1))))) = (*Xsqlite3)(_p.X0)
- *(*uint8)(unsafe.Pointer(&(_p.X4))) = uint8(i32(1))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.XpBt).Xmutex))
+ *(**Xsqlite3)(unsafe.Pointer(&((*XBtShared)(_p.XpBt).Xdb))) = (*Xsqlite3)(_p.Xdb)
+ _p.Xlocked = uint8(1)
}
var _lockBtreeMutexØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_lockBtreeMutexØ00__func__Ø000[0], str(9393), 15)
+ crt.Xstrncpy(nil, &_lockBtreeMutexØ00__func__Ø000[0], str(9348), 15)
}
-// Table *p is a virtual table. This function removes the VTable object
-// for table *p associated with database connection db from the linked
-// list in p->pVTab. It also decrements the VTable ref count. This is
-// used when closing database connection db to free all of its VTable
-// objects without disturbing the rest of the Schema object (which may
-// be being used by other shared-cache connections).
+// C comment
+// /*
+// ** Table *p is a virtual table. This function removes the VTable object
+// ** for table *p associated with database connection db from the linked
+// ** list in p->pVTab. It also decrements the VTable ref count. This is
+// ** used when closing database connection db to free all of its VTable
+// ** objects without disturbing the rest of the Schema object (which may
+// ** be being used by other shared-cache connections).
+// */
func _sqlite3VtabDisconnect(tls *crt.TLS, _db *Xsqlite3, _p *XTable) {
var _2_pVTab *XVTable
var _ppVTab **XVTable
func() {
- if (_p.X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125207), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabDisconnectØ00__func__Ø000))), unsafe.Pointer(str(9408)))
+ if _p.XnModuleArg == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125207), unsafe.Pointer(&_sqlite3VtabDisconnectØ00__func__Ø000), unsafe.Pointer(str(9363)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125208), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabDisconnectØ00__func__Ø000))), unsafe.Pointer(str(9421)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125208), unsafe.Pointer(&_sqlite3VtabDisconnectØ00__func__Ø000), unsafe.Pointer(str(9376)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125209), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabDisconnectØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125209), unsafe.Pointer(&_sqlite3VtabDisconnectØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- _ppVTab = (**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X18)))))
+ _ppVTab = (**XVTable)(unsafe.Pointer(&_p.XpVTable))
_6:
if (*_ppVTab) == nil {
goto _9
}
- if (*Xsqlite3)((*_ppVTab).X0) == _db {
+ if (*Xsqlite3)((*_ppVTab).Xdb) == _db {
_2_pVTab = *_ppVTab
- *_ppVTab = (*XVTable)(_2_pVTab.X6)
+ *_ppVTab = (*XVTable)(_2_pVTab.XpNext)
_sqlite3VtabUnlock(tls, _2_pVTab)
goto _9
}
- _ppVTab = (**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*_ppVTab).X6)))))
+ _ppVTab = (**XVTable)(unsafe.Pointer(&((*_ppVTab).XpNext)))
goto _6
_9:
}
@@ -11445,109 +11505,119 @@ _9:
var _sqlite3VtabDisconnectØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabDisconnectØ00__func__Ø000[0], str(9453), 22)
+ crt.Xstrncpy(nil, &_sqlite3VtabDisconnectØ00__func__Ø000[0], str(9408), 22)
}
-// Return true if the current thread holds the database connection
-// mutex and all required BtShared mutexes.
-//
-// This routine is used inside assert() statements only.
+// C comment
+// /*
+// ** Return true if the current thread holds the database connection
+// ** mutex and all required BtShared mutexes.
+// **
+// ** This routine is used inside assert() statements only.
+// */
func _sqlite3BtreeHoldsAllMutexes(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
var _i int32
var _2_p *XBtree
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- return i32(0)
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _4
}
- _2_p = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
- if ((_2_p != nil) && ((_2_p.X3) != 0)) && (((_2_p.X6) == i32(0)) || (Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_2_p.X1).X21)) == 0)) {
- return i32(0)
+ _2_p = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
+ if ((_2_p != nil) && (_2_p.Xsharable != 0)) && ((_2_p.XwantToLock == int32(0)) || (Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_2_p.XpBt).Xmutex)) == 0)) {
+ return int32(0)
}
_i += 1
goto _1
_4:
- return i32(1)
+ return int32(1)
}
-// Decrement the ref-count on a virtual table object. When the ref-count
-// reaches zero, call the xDisconnect() method to delete the object.
+// C comment
+// /*
+// ** Decrement the ref-count on a virtual table object. When the ref-count
+// ** reaches zero, call the xDisconnect() method to delete the object.
+// */
func _sqlite3VtabUnlock(tls *crt.TLS, _pVTab *XVTable) {
var _db *Xsqlite3
var _1_p *Xsqlite3_vtab
- _db = (*Xsqlite3)(_pVTab.X0)
+ _db = (*Xsqlite3)(_pVTab.Xdb)
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125143), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabUnlockØ00__func__Ø000))), unsafe.Pointer(str(9475)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125143), unsafe.Pointer(&_sqlite3VtabUnlockØ00__func__Ø000), unsafe.Pointer(str(9430)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pVTab.X3) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125144), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabUnlockØ00__func__Ø000))), unsafe.Pointer(str(9478)))
+ if _pVTab.XnRef <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125144), unsafe.Pointer(&_sqlite3VtabUnlockØ00__func__Ø000), unsafe.Pointer(str(9433)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_db.X28) != u32(2687084183) && (_db.X28) != uint32(i32(1691352191)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125145), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabUnlockØ00__func__Ø000))), unsafe.Pointer(str(9492)))
+ if _db.Xmagic != uint32(2687084183) && _db.Xmagic != uint32(1691352191) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125145), unsafe.Pointer(&_sqlite3VtabUnlockØ00__func__Ø000), unsafe.Pointer(str(9447)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pVTab.X3))) -= 1
- if (_pVTab.X3) != i32(0) {
+ _pVTab.XnRef -= 1
+ if _pVTab.XnRef != int32(0) {
goto _7
}
- _1_p = (*Xsqlite3_vtab)(_pVTab.X2)
+ _1_p = (*Xsqlite3_vtab)(_pVTab.XpVtab)
if _1_p != nil {
- (*(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_module)(_1_p.X0).X4)})))(tls, _1_p)
+ func() func(*crt.TLS, *Xsqlite3_vtab) int32 {
+ v := (*Xsqlite3_module)(_1_p.XpModule).XxDisconnect
+ return *(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&v))
+ }()(tls, _1_p)
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pVTab))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pVTab))
_7:
}
var _sqlite3VtabUnlockØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabUnlockØ00__func__Ø000[0], str(9555), 18)
-}
-
-// Disconnect all the virtual table objects in the sqlite3.pDisconnect list.
-//
-// This function may only be called when the mutexes associated with all
-// shared b-tree databases opened using connection db are held by the
-// caller. This is done to protect the sqlite3.pDisconnect list. The
-// sqlite3.pDisconnect list is accessed only as follows:
-//
-// 1) By this function. In this case, all BtShared mutexes and the mutex
-// associated with the database handle itself must be held.
-//
-// 2) By function vtabDisconnectAll(), when it adds a VTable entry to
-// the sqlite3.pDisconnect list. In this case either the BtShared mutex
-// associated with the database the virtual table is stored in is held
-// or, if the virtual table is stored in a non-sharable database, then
-// the database handle mutex is held.
-//
-// As a result, a sqlite3.pDisconnect cannot be accessed simultaneously
-// by multiple threads. It is thread-safe.
+ crt.Xstrncpy(nil, &_sqlite3VtabUnlockØ00__func__Ø000[0], str(9510), 18)
+}
+
+// C comment
+// /*
+// ** Disconnect all the virtual table objects in the sqlite3.pDisconnect list.
+// **
+// ** This function may only be called when the mutexes associated with all
+// ** shared b-tree databases opened using connection db are held by the
+// ** caller. This is done to protect the sqlite3.pDisconnect list. The
+// ** sqlite3.pDisconnect list is accessed only as follows:
+// **
+// ** 1) By this function. In this case, all BtShared mutexes and the mutex
+// ** associated with the database handle itself must be held.
+// **
+// ** 2) By function vtabDisconnectAll(), when it adds a VTable entry to
+// ** the sqlite3.pDisconnect list. In this case either the BtShared mutex
+// ** associated with the database the virtual table is stored in is held
+// ** or, if the virtual table is stored in a non-sharable database, then
+// ** the database handle mutex is held.
+// **
+// ** As a result, a sqlite3.pDisconnect cannot be accessed simultaneously
+// ** by multiple threads. It is thread-safe.
+// */
func _sqlite3VtabUnlockList(tls *crt.TLS, _db *Xsqlite3) {
var _p, _2_pNext *XVTable
- _p = (*XVTable)(_db.X68)
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X68))))) = nil
+ _p = (*XVTable)(_db.XpDisconnect)
+ *(**XVTable)(unsafe.Pointer(&_db.XpDisconnect)) = nil
func() {
if _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125246), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabUnlockListØ00__func__Ø000))), unsafe.Pointer(str(9421)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125246), unsafe.Pointer(&_sqlite3VtabUnlockListØ00__func__Ø000), unsafe.Pointer(str(9376)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125247), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabUnlockListØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125247), unsafe.Pointer(&_sqlite3VtabUnlockListØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
@@ -11556,7 +11626,7 @@ func _sqlite3VtabUnlockList(tls *crt.TLS, _db *Xsqlite3) {
}
_sqlite3ExpirePreparedStatements(tls, _db)
_5:
- _2_pNext = (*XVTable)(_p.X6)
+ _2_pNext = (*XVTable)(_p.XpNext)
_sqlite3VtabUnlock(tls, _p)
_p = _2_pNext
if _p != nil {
@@ -11568,32 +11638,35 @@ _4:
var _sqlite3VtabUnlockListØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabUnlockListØ00__func__Ø000[0], str(9573), 22)
+ crt.Xstrncpy(nil, &_sqlite3VtabUnlockListØ00__func__Ø000[0], str(9528), 22)
}
-// Mark every prepared statement associated with a database connection
-// as expired.
-//
-// An expired statement means that recompilation of the statement is
-// recommend. Statements expire when things happen that make their
-// programs obsolete. Removing user-defined functions or collating
-// sequences, or changing an authorization function are the types of
-// things that make prepared statements obsolete.
+// C comment
+// /*
+// ** Mark every prepared statement associated with a database connection
+// ** as expired.
+// **
+// ** An expired statement means that recompilation of the statement is
+// ** recommend. Statements expire when things happen that make their
+// ** programs obsolete. Removing user-defined functions or collating
+// ** sequences, or changing an authorization function are the types of
+// ** things that make prepared statements obsolete.
+// */
func _sqlite3ExpirePreparedStatements(tls *crt.TLS, _db *Xsqlite3) {
var _p *TVdbe
- _p = (*TVdbe)(_db.X1)
+ _p = (*TVdbe)(_db.XpVdbe)
_0:
if _p == nil {
goto _3
}
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 1, 0)
- _p = (*TVdbe)(_p.X2)
+ storebits26(&_p.Xexpired, int16(1), 1, 0)
+ _p = (*TVdbe)(_p.XpNext)
goto _0
_3:
}
func _sqlite3BtreeLeaveAll(tls *crt.TLS, _db *Xsqlite3) {
- if int32(_db.X25) == i32(0) {
+ if int32(_db.XskipBtreeMutex) == int32(0) {
_btreeLeaveAll(tls, _db)
}
}
@@ -11602,17 +11675,17 @@ func _btreeLeaveAll(tls *crt.TLS, _db *Xsqlite3) {
var _i int32
var _p *XBtree
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58929), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeLeaveAllØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58929), unsafe.Pointer(&_btreeLeaveAllØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_2:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _5
}
- _p = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _p = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _p != nil {
_sqlite3BtreeLeave(tls, _p)
}
@@ -11624,28 +11697,31 @@ _5:
var _btreeLeaveAllØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_btreeLeaveAllØ00__func__Ø000[0], str(9595), 14)
+ crt.Xstrncpy(nil, &_btreeLeaveAllØ00__func__Ø000[0], str(9550), 14)
}
-// Exit the recursive mutex on a Btree.
+// C comment
+// /*
+// ** Exit the recursive mutex on a Btree.
+// */
func _sqlite3BtreeLeave(tls *crt.TLS, _p *XBtree) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58867), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLeaveØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58867), unsafe.Pointer(&_sqlite3BtreeLeaveØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X3) == 0 {
+ if _p.Xsharable == 0 {
goto _2
}
func() {
- if (_p.X6) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58869), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLeaveØ00__func__Ø000))), unsafe.Pointer(str(9609)))
+ if _p.XwantToLock <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58869), unsafe.Pointer(&_sqlite3BtreeLeaveØ00__func__Ø000), unsafe.Pointer(str(9564)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_p.X6))) -= 1
- if (_p.X6) == i32(0) {
+ _p.XwantToLock -= 1
+ if _p.XwantToLock == int32(0) {
_unlockBtreeMutex(tls, _p)
}
_2:
@@ -11654,156 +11730,169 @@ _2:
var _sqlite3BtreeLeaveØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeLeaveØ00__func__Ø000[0], str(9625), 18)
+ crt.Xstrncpy(nil, &_sqlite3BtreeLeaveØ00__func__Ø000[0], str(9580), 18)
}
-// Invoke the xRollback method of all virtual tables in the
-// sqlite3.aVTrans array. Then clear the array itself.
+// C comment
+// /*
+// ** Invoke the xRollback method of all virtual tables in the
+// ** sqlite3.aVTrans array. Then clear the array itself.
+// */
func _sqlite3VtabRollback(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
- _callFinaliser(tls, _db, int32(u32(68)))
- return i32(0)
-}
-
-// This function invokes either the xRollback or xCommit method
-// of each of the virtual tables in the sqlite3.aVTrans array. The method
-// called is identified by the second argument, "offset", which is
-// the offset of the method to call in the sqlite3_module structure.
-//
-// The array is cleared after invoking the callbacks.
+ _callFinaliser(tls, _db, int32(68))
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** This function invokes either the xRollback or xCommit method
+// ** of each of the virtual tables in the sqlite3.aVTrans array. The method
+// ** called is identified by the second argument, "offset", which is
+// ** the offset of the method to call in the sqlite3_module structure.
+// **
+// ** The array is cleared after invoking the callbacks.
+// */
func _callFinaliser(tls *crt.TLS, _db *Xsqlite3, _offset int32) {
var _i int32
var _2_pVTab *XVTable
var _2_p *Xsqlite3_vtab
var _1_aVTrans **XVTable
var _3_x func(*crt.TLS, *Xsqlite3_vtab) int32
- if (**XVTable)(unsafe.Pointer(_db.X67)) == nil {
+ if _db.XaVTrans == nil {
goto _0
}
- _1_aVTrans = (**XVTable)(unsafe.Pointer(_db.X67))
- *(***XVTable)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_db.X67))))) = nil
- _i = i32(0)
+ _1_aVTrans = (**XVTable)(unsafe.Pointer(_db.XaVTrans))
+ *(***XVTable)(unsafe.Pointer(&_db.XaVTrans)) = nil
+ _i = int32(0)
_1:
- if _i >= (_db.X64) {
+ if _i >= _db.XnVTrans {
goto _4
}
- _2_pVTab = *(**XVTable)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aVTrans)) + 4*uintptr(_i)))
- _2_p = (*Xsqlite3_vtab)(_2_pVTab.X2)
+ _2_pVTab = *elem28(_1_aVTrans, uintptr(_i))
+ _2_p = (*Xsqlite3_vtab)(_2_pVTab.XpVtab)
if _2_p == nil {
goto _5
}
- _3_x = *(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer((*Xsqlite3_module)(_2_p.X0))))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_offset)))))))))
+ _3_x = *(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_2_p.XpModule) + uintptr(_offset)))))
if _3_x != nil {
_3_x(tls, _2_p)
}
_5:
- *(*int32)(unsafe.Pointer(&(_2_pVTab.X5))) = i32(0)
+ _2_pVTab.XiSavepoint = int32(0)
_sqlite3VtabUnlock(tls, _2_pVTab)
_i += 1
goto _1
_4:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_aVTrans))
- *(*int32)(unsafe.Pointer(&(_db.X64))) = i32(0)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_aVTrans))
+ _db.XnVTrans = int32(0)
_0:
}
-// Return TRUE if database connection db has unfinalized prepared
-// statements or unfinished sqlite3_backup objects.
+// C comment
+// /*
+// ** Return TRUE if database connection db has unfinalized prepared
+// ** statements or unfinished sqlite3_backup objects.
+// */
func _connectionIsBusy(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
var _j int32
var _1_pBt *XBtree
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(141503), unsafe.Pointer((*int8)(unsafe.Pointer(&_connectionIsBusyØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(141503), unsafe.Pointer(&_connectionIsBusyØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- if (*TVdbe)(_db.X1) != nil {
- return i32(1)
+ if _db.XpVdbe != nil {
+ return int32(1)
}
- _j = i32(0)
+ _j = int32(0)
_3:
- if _j >= (_db.X5) {
+ if _j >= _db.XnDb {
goto _6
}
- _1_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_j))).X1)
+ _1_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_j)).XpBt)
if (_1_pBt != nil) && _sqlite3BtreeIsInBackup(tls, _1_pBt) != 0 {
- return i32(1)
+ return int32(1)
}
_j += 1
goto _3
_6:
- return i32(0)
+ return int32(0)
}
var _connectionIsBusyØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_connectionIsBusyØ00__func__Ø000[0], str(9643), 17)
+ crt.Xstrncpy(nil, &_connectionIsBusyØ00__func__Ø000[0], str(9598), 17)
}
func _sqlite3BtreeIsInBackup(tls *crt.TLS, _p *XBtree) (r0 int32) {
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68680), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIsInBackupØ00__func__Ø000))), unsafe.Pointer(str(9660)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68680), unsafe.Pointer(&_sqlite3BtreeIsInBackupØ00__func__Ø000), unsafe.Pointer(str(9615)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68681), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIsInBackupØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68681), unsafe.Pointer(&_sqlite3BtreeIsInBackupØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int((_p.X7) != i32(0))
+ return bool2int(_p.XnBackup != int32(0))
}
var _sqlite3BtreeIsInBackupØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeIsInBackupØ00__func__Ø000[0], str(9662), 23)
-}
-
-// Set the most recent error code and error string for the sqlite
-// handle "db". The error code is set to "err_code".
-//
-// If it is not NULL, string zFormat specifies the format of the
-// error string in the style of the printf functions: The following
-// format characters are allowed:
-//
-// %s Insert a string
-// %z A string that should be freed after use
-// %d Insert an integer
-// %T Insert a token
-// %S Insert the first element of a SrcList
-//
-// zFormat and any string tokens that follow it are assumed to be
-// encoded in UTF-8.
-//
-// To clear the most recent error for sqlite handle "db", sqlite3Error
-// should be called with err_code set to SQLITE_OK and zFormat set
-// to NULL.
+ crt.Xstrncpy(nil, &_sqlite3BtreeIsInBackupØ00__func__Ø000[0], str(9617), 23)
+}
+
+// C comment
+// /*
+// ** Set the most recent error code and error string for the sqlite
+// ** handle "db". The error code is set to "err_code".
+// **
+// ** If it is not NULL, string zFormat specifies the format of the
+// ** error string in the style of the printf functions: The following
+// ** format characters are allowed:
+// **
+// ** %s Insert a string
+// ** %z A string that should be freed after use
+// ** %d Insert an integer
+// ** %T Insert a token
+// ** %S Insert the first element of a SrcList
+// **
+// ** zFormat and any string tokens that follow it are assumed to be
+// ** encoded in UTF-8.
+// **
+// ** To clear the most recent error for sqlite handle "db", sqlite3Error
+// ** should be called with err_code set to SQLITE_OK and zFormat set
+// ** to NULL.
+// */
func _sqlite3ErrorWithMsg(tls *crt.TLS, _db *Xsqlite3, _err_code int32, _zFormat *int8, args ...interface{}) {
var _2_z *int8
var _2_ap []interface{}
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27835), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ErrorWithMsgØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27835), unsafe.Pointer(&_sqlite3ErrorWithMsgØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_db.X10))) = _err_code
+ _db.XerrCode = _err_code
_sqlite3SystemError(tls, _db, _err_code)
if _zFormat == nil {
_sqlite3Error(tls, _db, _err_code)
goto _5
}
- if ((*XMem)(_db.X56) != nil) || (store20((**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X56))))), _sqlite3ValueNew(tls, _db)) != nil) {
+ if (_db.XpErr != nil) || (store25((**XMem)(unsafe.Pointer(&_db.XpErr)), _sqlite3ValueNew(tls, _db)) != nil) {
_2_ap = args
_2_z = _sqlite3VMPrintf(tls, _db, _zFormat, _2_ap)
_2_ap = nil
- _sqlite3ValueSetStr(tls, (*XMem)(_db.X56), i32(-1), (unsafe.Pointer)(_2_z), uint8(i32(1)), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ _sqlite3ValueSetStr(tls, (*XMem)(_db.XpErr), int32(-1), unsafe.Pointer(_2_z), uint8(1), func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
}
_5:
}
@@ -11811,44 +11900,56 @@ _5:
var _sqlite3ErrorWithMsgØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ErrorWithMsgØ00__func__Ø000[0], str(9685), 20)
+ crt.Xstrncpy(nil, &_sqlite3ErrorWithMsgØ00__func__Ø000[0], str(9640), 20)
}
-// Create a new sqlite3_value object.
+// C comment
+// /*
+// ** Create a new sqlite3_value object.
+// */
func _sqlite3ValueNew(tls *crt.TLS, _db *Xsqlite3) (r0 *XMem) {
var _p *XMem
- _p = (*XMem)(_sqlite3DbMallocZero(tls, _db, uint64(u32(48))))
+ _p = (*XMem)(_sqlite3DbMallocZero(tls, _db, uint64(48)))
if _p != nil {
- *(*uint16)(unsafe.Pointer(&(_p.X1))) = uint16(i32(1))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))) = _db
+ _p.Xflags = uint16(1)
+ *(**Xsqlite3)(unsafe.Pointer(&_p.Xdb)) = _db
}
return _p
}
-// Allocate and zero memory. If the allocation fails, make
-// the mallocFailed flag in the connection pointer.
+// C comment
+// /*
+// ** Allocate and zero memory. If the allocation fails, make
+// ** the mallocFailed flag in the connection pointer.
+// */
func _sqlite3DbMallocZero(tls *crt.TLS, _db *Xsqlite3, _n uint64) (r0 unsafe.Pointer) {
var _p unsafe.Pointer
_p = _sqlite3DbMallocRaw(tls, _db, _n)
if _p != nil {
- crt.Xmemset(tls, _p, i32(0), uint32(_n))
+ crt.Xmemset(tls, _p, int32(0), uint32(_n))
}
return _p
}
-// Change the string value of an sqlite3_value object
+// C comment
+// /*
+// ** Change the string value of an sqlite3_value object
+// */
func _sqlite3ValueSetStr(tls *crt.TLS, _v *XMem, _n int32, _z unsafe.Pointer, _enc uint8, _xDel func(*crt.TLS, unsafe.Pointer)) {
if _v != nil {
_sqlite3VdbeMemSetStr(tls, _v, (*int8)(_z), _n, _enc, _xDel)
}
}
-// Close the mutex on database connection db.
-//
-// Furthermore, if database connection db is a zombie (meaning that there
-// has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and
-// every sqlite3_stmt has now been finalized and every sqlite3_backup has
-// finished, then free all resources.
+// C comment
+// /*
+// ** Close the mutex on database connection db.
+// **
+// ** Furthermore, if database connection db is a zombie (meaning that there
+// ** has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and
+// ** every sqlite3_stmt has now been finalized and every sqlite3_backup has
+// ** finished, then free all resources.
+// */
func _sqlite3LeaveMutexAndCloseZombie(tls *crt.TLS, _db *Xsqlite3) {
var _j int32
var _2_pDb *XDb
@@ -11856,151 +11957,154 @@ func _sqlite3LeaveMutexAndCloseZombie(tls *crt.TLS, _db *Xsqlite3) {
var _6_pNext, _6_p *XFuncDef
var _8_pColl *XCollSeq
var _11_pMod *XModule
- if ((_db.X28) != uint32(i32(1691352191))) || _connectionIsBusy(tls, _db) != 0 {
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ if (_db.Xmagic != uint32(1691352191)) || _connectionIsBusy(tls, _db) != 0 {
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return
}
- _sqlite3RollbackAll(tls, _db, i32(0))
+ _sqlite3RollbackAll(tls, _db, int32(0))
_sqlite3CloseSavepoints(tls, _db)
- _j = i32(0)
+ _j = int32(0)
_2:
- if _j >= (_db.X5) {
+ if _j >= _db.XnDb {
goto _5
}
- _2_pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_j)))
- if (*XBtree)(_2_pDb.X1) == nil {
+ _2_pDb = elem27((*XDb)(_db.XaDb), uintptr(_j))
+ if _2_pDb.XpBt == nil {
goto _6
}
- _sqlite3BtreeClose(tls, (*XBtree)(_2_pDb.X1))
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pDb.X1))))) = nil
- if _j != i32(1) {
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pDb.X4))))) = nil
+ _sqlite3BtreeClose(tls, (*XBtree)(_2_pDb.XpBt))
+ *(**XBtree)(unsafe.Pointer(&_2_pDb.XpBt)) = nil
+ if _j != int32(1) {
+ *(**XSchema)(unsafe.Pointer(&_2_pDb.XpSchema)) = nil
}
_6:
_j += 1
goto _2
_5:
- if (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X4) != nil {
- _sqlite3SchemaClear(tls, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X4)
+ if (elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema) != nil {
+ _sqlite3SchemaClear(tls, elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema)
}
_sqlite3VtabUnlockList(tls, _db)
_sqlite3CollapseDatabaseArray(tls, _db)
func() {
- if (_db.X5) > i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(141633), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3LeaveMutexAndCloseZombieØ00__func__Ø000))), unsafe.Pointer(str(9705)))
+ if _db.XnDb > int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(141633), unsafe.Pointer(&_sqlite3LeaveMutexAndCloseZombieØ00__func__Ø000), unsafe.Pointer(str(9660)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XDb)(_db.X4) != (*XDb)(unsafe.Pointer((*[2]XDb)(unsafe.Pointer(&(_db.X72))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(141634), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3LeaveMutexAndCloseZombieØ00__func__Ø000))), unsafe.Pointer(str(9716)))
+ if (*XDb)(_db.XaDb) != (*XDb)(unsafe.Pointer(&_db.XaDbStatic)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(141634), unsafe.Pointer(&_sqlite3LeaveMutexAndCloseZombieØ00__func__Ø000), unsafe.Pointer(str(9671)))
crt.X__builtin_abort(tls)
}
}()
- _i = (*XHashElem)((*XHash)(unsafe.Pointer(&(_db.X69))).X2)
+ _i = (*XHashElem)(_db.XaFunc.Xfirst)
_13:
if _i == nil {
goto _16
}
- _6_p = (*XFuncDef)(_i.X2)
+ _6_p = (*XFuncDef)(_i.Xdata)
_17:
_functionDestroy(tls, _db, _6_p)
- _6_pNext = (*XFuncDef)(_6_p.X3)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_6_p))
+ _6_pNext = (*XFuncDef)(_6_p.XpNext)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_6_p))
_6_p = _6_pNext
if _6_p != nil {
goto _17
}
- _i = (*XHashElem)(_i.X0)
+ _i = (*XHashElem)(_i.Xnext)
goto _13
_16:
- _sqlite3HashClear(tls, (*XHash)(unsafe.Pointer(&(_db.X69))))
- _i = (*XHashElem)((*XHash)(unsafe.Pointer(&(_db.X70))).X2)
+ _sqlite3HashClear(tls, &_db.XaFunc)
+ _i = (*XHashElem)(_db.XaCollSeq.Xfirst)
_18:
if _i == nil {
goto _21
}
- _8_pColl = (*XCollSeq)(_i.X2)
- _j = i32(0)
+ _8_pColl = (*XCollSeq)(_i.Xdata)
+ _j = int32(0)
_22:
- if _j >= i32(3) {
+ if _j >= int32(3) {
goto _25
}
- if ((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_pColl)) + 20*uintptr(_j))).X4) != nil {
- ((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_pColl)) + 20*uintptr(_j))).X4)(tls, (*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_pColl))+20*uintptr(_j))).X2)
+ if (elem29(_8_pColl, uintptr(_j)).XxDel) != nil {
+ (elem29(_8_pColl, uintptr(_j)).XxDel)(tls, elem29(_8_pColl, uintptr(_j)).XpUser)
}
_j += 1
goto _22
_25:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_8_pColl))
- _i = (*XHashElem)(_i.X0)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_8_pColl))
+ _i = (*XHashElem)(_i.Xnext)
goto _18
_21:
- _sqlite3HashClear(tls, (*XHash)(unsafe.Pointer(&(_db.X70))))
- _i = (*XHashElem)((*XHash)(unsafe.Pointer(&(_db.X65))).X2)
+ _sqlite3HashClear(tls, &_db.XaCollSeq)
+ _i = (*XHashElem)(_db.XaModule.Xfirst)
_27:
if _i == nil {
goto _30
}
- _11_pMod = (*XModule)(_i.X2)
- if (_11_pMod.X3) != nil {
- (_11_pMod.X3)(tls, _11_pMod.X2)
+ _11_pMod = (*XModule)(_i.Xdata)
+ if _11_pMod.XxDestroy != nil {
+ _11_pMod.XxDestroy(tls, _11_pMod.XpAux)
}
_sqlite3VtabEponymousTableClear(tls, _db, _11_pMod)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_11_pMod))
- _i = (*XHashElem)(_i.X0)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_11_pMod))
+ _i = (*XHashElem)(_i.Xnext)
goto _27
_30:
- _sqlite3HashClear(tls, (*XHash)(unsafe.Pointer(&(_db.X65))))
- _sqlite3Error(tls, _db, i32(0))
- _sqlite3ValueFree(tls, (*XMem)(_db.X56))
+ _sqlite3HashClear(tls, &_db.XaModule)
+ _sqlite3Error(tls, _db, int32(0))
+ _sqlite3ValueFree(tls, (*XMem)(_db.XpErr))
_sqlite3CloseExtensions(tls, _db)
- *(*uint32)(unsafe.Pointer(&(_db.X28))) = u32(3040180528)
- _sqlite3DbFree(tls, _db, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X4)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- *(*uint32)(unsafe.Pointer(&(_db.X28))) = u32(2671521075)
- Xsqlite3_mutex_free(tls, (*Xsqlite3_mutex)(_db.X3))
+ _db.Xmagic = uint32(3040180528)
+ _sqlite3DbFree(tls, _db, elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _db.Xmagic = uint32(2671521075)
+ Xsqlite3_mutex_free(tls, (*Xsqlite3_mutex)(_db.Xmutex))
func() {
- if ((*t7)(unsafe.Pointer(&(_db.X58))).X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(141695), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3LeaveMutexAndCloseZombieØ00__func__Ø000))), unsafe.Pointer(str(9739)))
+ if (_db.Xlookaside.XnOut) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(141695), unsafe.Pointer(&_sqlite3LeaveMutexAndCloseZombieØ00__func__Ø000), unsafe.Pointer(str(9694)))
crt.X__builtin_abort(tls)
}
}()
- if ((*t7)(unsafe.Pointer(&(_db.X58))).X2) != 0 {
- Xsqlite3_free(tls, (*t7)(unsafe.Pointer(&(_db.X58))).X7)
+ if (_db.Xlookaside.XbMalloced) != 0 {
+ Xsqlite3_free(tls, _db.Xlookaside.XpStart)
}
- Xsqlite3_free(tls, (unsafe.Pointer)(_db))
+ Xsqlite3_free(tls, unsafe.Pointer(_db))
}
-// Rollback all database files. If tripCode is not SQLITE_OK, then
-// any write cursors are invalidated ("tripped" - as in "tripping a circuit
-// breaker") and made to return tripCode if there are any further
-// attempts to use that cursor. Read cursors remain open and valid
-// but are "saved" in case the table pages are moved around.
+// C comment
+// /*
+// ** Rollback all database files. If tripCode is not SQLITE_OK, then
+// ** any write cursors are invalidated ("tripped" - as in "tripping a circuit
+// ** breaker") and made to return tripCode if there are any further
+// ** attempts to use that cursor. Read cursors remain open and valid
+// ** but are "saved" in case the table pages are moved around.
+// */
func _sqlite3RollbackAll(tls *crt.TLS, _db *Xsqlite3, _tripCode int32) {
var _i, _inTrans, _schemaChange int32
var _1_p *XBtree
- _inTrans = i32(0)
+ _inTrans = int32(0)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(141713), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RollbackAllØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(141713), unsafe.Pointer(&_sqlite3RollbackAllØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BeginBenignMalloc(tls)
_sqlite3BtreeEnterAll(tls, _db)
- _schemaChange = bool2int((((_db.X6) & i32(2)) != i32(0)) && (int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) == i32(0)))
- _i = i32(0)
+ _schemaChange = bool2int(((_db.Xflags & int32(2)) != int32(0)) && (int32(_db.Xinit.Xbusy) == int32(0)))
+ _i = int32(0)
_3:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _6
}
- _1_p = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _1_p = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _1_p == nil {
goto _7
}
if _sqlite3BtreeIsInTrans(tls, _1_p) != 0 {
- _inTrans = i32(1)
+ _inTrans = int32(1)
}
_sqlite3BtreeRollback(tls, _1_p, _tripCode, bool2int(_schemaChange == 0))
_7:
@@ -12009,140 +12113,142 @@ _7:
_6:
_sqlite3VtabRollback(tls, _db)
_sqlite3EndBenignMalloc(tls)
- if (((_db.X6) & i32(2)) != i32(0)) && (int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) == i32(0)) {
+ if ((_db.Xflags & int32(2)) != int32(0)) && (int32(_db.Xinit.Xbusy) == int32(0)) {
_sqlite3ExpirePreparedStatements(tls, _db)
_sqlite3ResetAllSchemasOfConnection(tls, _db)
}
_sqlite3BtreeLeaveAll(tls, _db)
- *(*int64)(unsafe.Pointer(&(_db.X77))) = int64(i32(0))
- *(*int64)(unsafe.Pointer(&(_db.X78))) = int64(i32(0))
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-33554433)
- sink1(*p)
- }
- if ((_db.X48) != nil) && (_inTrans != 0 || ((_db.X15) == 0)) {
- (_db.X48)(tls, _db.X47)
+ _db.XnDeferredCons = 0
+ _db.XnDeferredImmCons = 0
+ _db.Xflags &= int32(-33554433)
+ if (_db.XxRollbackCallback != nil) && (_inTrans != 0 || (_db.XautoCommit == 0)) {
+ _db.XxRollbackCallback(tls, _db.XpRollbackArg)
}
}
var _sqlite3RollbackAllØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RollbackAllØ00__func__Ø000[0], str(9761), 19)
+ crt.Xstrncpy(nil, &_sqlite3RollbackAllØ00__func__Ø000[0], str(9716), 19)
}
-// Return non-zero if a transaction is active.
+// C comment
+// /*
+// ** Return non-zero if a transaction is active.
+// */
func _sqlite3BtreeIsInTrans(tls *crt.TLS, _p *XBtree) (r0 int32) {
func() {
- if _p != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68641), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIsInTransØ00__func__Ø000))), unsafe.Pointer(str(9780)))
+ if _p != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68641), unsafe.Pointer(&_sqlite3BtreeIsInTransØ00__func__Ø000), unsafe.Pointer(str(9735)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int((_p != nil) && (int32(_p.X2) == i32(2)))
+ return bool2int((_p != nil) && (int32(_p.XinTrans) == int32(2)))
}
var _sqlite3BtreeIsInTransØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeIsInTransØ00__func__Ø000[0], str(9821), 22)
+ crt.Xstrncpy(nil, &_sqlite3BtreeIsInTransØ00__func__Ø000[0], str(9776), 22)
}
-// Rollback the transaction in progress.
-//
-// If tripCode is not SQLITE_OK then cursors will be invalidated (tripped).
-// Only write cursors are tripped if writeOnly is true but all cursors are
-// tripped if writeOnly is false. Any attempt to use
-// a tripped cursor will result in an error.
-//
-// This will release the write lock on the database file. If there
-// are no active cursors, it also releases the read lock.
+// C comment
+// /*
+// ** Rollback the transaction in progress.
+// **
+// ** If tripCode is not SQLITE_OK then cursors will be invalidated (tripped).
+// ** Only write cursors are tripped if writeOnly is true but all cursors are
+// ** tripped if writeOnly is false. Any attempt to use
+// ** a tripped cursor will result in an error.
+// **
+// ** This will release the write lock on the database file. If there
+// ** are no active cursors, it also releases the read lock.
+// */
func _sqlite3BtreeRollback(tls *crt.TLS, _p *XBtree, _tripCode int32, _writeOnly int32) (r0 int32) {
var _rc, _3_rc2, _4_rc2, _6_nPage int32
var _pBt *XBtShared
var _pPage1 *XMemPage
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
- if _writeOnly != i32(1) && _writeOnly != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63037), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000))), unsafe.Pointer(str(9843)))
+ if _writeOnly != int32(1) && _writeOnly != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63037), unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000), unsafe.Pointer(str(9798)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _tripCode != i32(516) && _tripCode != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63038), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000))), unsafe.Pointer(str(9872)))
+ if _tripCode != int32(516) && _tripCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63038), unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000), unsafe.Pointer(str(9827)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
- if _tripCode != i32(0) {
+ if _tripCode != int32(0) {
goto _6
}
- _rc = store1(&_tripCode, _saveAllCursors(tls, _pBt, uint32(i32(0)), nil))
+ _rc = store2(&_tripCode, _saveAllCursors(tls, _pBt, 0, nil))
if _rc != 0 {
- _writeOnly = i32(0)
+ _writeOnly = int32(0)
}
goto _8
_6:
- _rc = i32(0)
+ _rc = int32(0)
_8:
if _tripCode == 0 {
goto _9
}
_3_rc2 = _sqlite3BtreeTripAllCursors(tls, _p, _tripCode, _writeOnly)
func() {
- if _rc != i32(0) && (_writeOnly != i32(0) || _3_rc2 != i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63048), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000))), unsafe.Pointer(str(9927)))
+ if _rc != int32(0) && (_writeOnly != int32(0) || _3_rc2 != int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63048), unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000), unsafe.Pointer(str(9882)))
crt.X__builtin_abort(tls)
}
}()
- if _3_rc2 != i32(0) {
+ if _3_rc2 != int32(0) {
_rc = _3_rc2
}
_9:
func() {
- if int32((*XBtShared)(_p.X1).X8) == i32(0) && ((*XBtShared)(_p.X1).X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63051), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000))), unsafe.Pointer(str(9977)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) == int32(0) && ((*XBtShared)(_p.XpBt).XnTransaction) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63051), unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000), unsafe.Pointer(str(9932)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XBtShared)(_p.X1).X8) < int32(_p.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63051), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000))), unsafe.Pointer(str(10038)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) < int32(_p.XinTrans) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63051), unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000), unsafe.Pointer(str(9993)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_p.X2) != i32(2) {
+ if int32(_p.XinTrans) != int32(2) {
goto _20
}
func() {
- if i32(2) != int32(_pBt.X8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63056), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000))), unsafe.Pointer(str(10072)))
+ if int32(2) != int32(_pBt.XinTransaction) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63056), unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000), unsafe.Pointer(str(10027)))
crt.X__builtin_abort(tls)
}
}()
- _4_rc2 = _sqlite3PagerRollback(tls, (*XPager)(_pBt.X0))
- if _4_rc2 != i32(0) {
+ _4_rc2 = _sqlite3PagerRollback(tls, (*XPager)(_pBt.XpPager))
+ if _4_rc2 != int32(0) {
_rc = _4_rc2
}
- if _btreeGetPage(tls, _pBt, uint32(i32(1)), &_pPage1, i32(0)) != i32(0) {
+ if _btreeGetPage(tls, _pBt, uint32(1), &_pPage1, int32(0)) != int32(0) {
goto _24
}
- _6_nPage = int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(28))))))+uintptr(unsafe.Pointer(_pPage1.X19))))))
- if _6_nPage == i32(0) {
- _sqlite3PagerPagecount(tls, (*XPager)(_pBt.X0), &_6_nPage)
+ _6_nPage = int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(int32(28))+uintptr(unsafe.Pointer(_pPage1.XaData))))))
+ if _6_nPage == int32(0) {
+ _sqlite3PagerPagecount(tls, (*XPager)(_pBt.XpPager), &_6_nPage)
}
- *(*uint32)(unsafe.Pointer(&(_pBt.X18))) = uint32(_6_nPage)
+ _pBt.XnPage = uint32(_6_nPage)
_releasePage(tls, _pPage1)
_24:
func() {
- if _countValidCursors(tls, _pBt, i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63073), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000))), unsafe.Pointer(str(10104)))
+ if _countValidCursors(tls, _pBt, int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63073), unsafe.Pointer(&_sqlite3BtreeRollbackØ00__func__Ø000), unsafe.Pointer(str(10059)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pBt.X8))) = uint8(i32(1))
+ _pBt.XinTransaction = uint8(1)
_btreeClearHasContent(tls, _pBt)
_20:
_btreeEndTransaction(tls, _p)
@@ -12153,51 +12259,54 @@ _20:
var _sqlite3BtreeRollbackØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeRollbackØ00__func__Ø000[0], str(10133), 21)
-}
-
-// Save the positions of all cursors (except pExcept) that are open on
-// the table with root-page iRoot. "Saving the cursor position" means that
-// the location in the btree is remembered in such a way that it can be
-// moved back to the same spot after the btree has been modified. This
-// routine is called just before cursor pExcept is used to modify the
-// table, for example in BtreeDelete() or BtreeInsert().
-//
-// If there are two or more cursors on the same btree, then all such
-// cursors should have their BTCF_Multiple flag set. The btreeCursor()
-// routine enforces that rule. This routine only needs to be called in
-// the uncommon case when pExpect has the BTCF_Multiple flag set.
-//
-// If pExpect!=NULL and if no other cursors are found on the same root-page,
-// then the BTCF_Multiple flag on pExpect is cleared, to avoid another
-// pointless call to this routine.
-//
-// Implementation note: This routine merely checks to see if any cursors
-// need to be saved. It calls out to saveCursorsOnList() in the (unusual)
-// event that cursors are in need to being saved.
+ crt.Xstrncpy(nil, &_sqlite3BtreeRollbackØ00__func__Ø000[0], str(10088), 21)
+}
+
+// C comment
+// /*
+// ** Save the positions of all cursors (except pExcept) that are open on
+// ** the table with root-page iRoot. "Saving the cursor position" means that
+// ** the location in the btree is remembered in such a way that it can be
+// ** moved back to the same spot after the btree has been modified. This
+// ** routine is called just before cursor pExcept is used to modify the
+// ** table, for example in BtreeDelete() or BtreeInsert().
+// **
+// ** If there are two or more cursors on the same btree, then all such
+// ** cursors should have their BTCF_Multiple flag set. The btreeCursor()
+// ** routine enforces that rule. This routine only needs to be called in
+// ** the uncommon case when pExpect has the BTCF_Multiple flag set.
+// **
+// ** If pExpect!=NULL and if no other cursors are found on the same root-page,
+// ** then the BTCF_Multiple flag on pExpect is cleared, to avoid another
+// ** pointless call to this routine.
+// **
+// ** Implementation note: This routine merely checks to see if any cursors
+// ** need to be saved. It calls out to saveCursorsOnList() in the (unusual)
+// ** event that cursors are in need to being saved.
+// */
func _saveAllCursors(tls *crt.TLS, _pBt *XBtShared, _iRoot uint32, _pExcept *XBtCursor) (r0 int32) {
var _p *XBtCursor
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59740), unsafe.Pointer((*int8)(unsafe.Pointer(&_saveAllCursorsØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59740), unsafe.Pointer(&_saveAllCursorsØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pExcept != nil && (*XBtShared)(_pExcept.X1) != _pBt {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59741), unsafe.Pointer((*int8)(unsafe.Pointer(&_saveAllCursorsØ00__func__Ø000))), unsafe.Pointer(str(10154)))
+ if _pExcept != nil && (*XBtShared)(_pExcept.XpBt) != _pBt {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59741), unsafe.Pointer(&_saveAllCursorsØ00__func__Ø000), unsafe.Pointer(str(10109)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*XBtCursor)(_pBt.X2)
+ _p = (*XBtCursor)(_pBt.XpCursor)
_5:
if _p == nil {
goto _8
}
- if (_p != _pExcept) && ((uint32(i32(0)) == _iRoot) || ((_p.X7) == _iRoot)) {
+ if (_p != _pExcept) && (((0) == _iRoot) || (_p.XpgnoRoot == _iRoot)) {
goto _8
}
- _p = (*XBtCursor)(_p.X2)
+ _p = (*XBtCursor)(_p.XpNext)
goto _5
_8:
if _p != nil {
@@ -12205,35 +12314,36 @@ _8:
}
if _pExcept != nil {
{
- p := (*uint8)(unsafe.Pointer(&(_pExcept.X10)))
- *p = uint8(int32(*p) & i32(-33))
- sink2(*p)
+ p := &_pExcept.XcurFlags
+ *p = uint8(int32(*p) & int32(-33))
}
}
- return i32(0)
+ return int32(0)
}
var _saveAllCursorsØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_saveAllCursorsØ00__func__Ø000[0], str(10186), 15)
+ crt.Xstrncpy(nil, &_saveAllCursorsØ00__func__Ø000[0], str(10141), 15)
}
-// This helper routine to saveAllCursors does the actual work of saving
-// the cursors if and when a cursor is found that actually requires saving.
-// The common case is that no cursors need to be saved, so this routine is
-// broken out from its caller to avoid unnecessary stack pointer movement.
+// C comment
+// /* This helper routine to saveAllCursors does the actual work of saving
+// ** the cursors if and when a cursor is found that actually requires saving.
+// ** The common case is that no cursors need to be saved, so this routine is
+// ** broken out from its caller to avoid unnecessary stack pointer movement.
+// */
func _saveCursorsOnList(tls *crt.TLS, _p *XBtCursor, _iRoot uint32, _pExcept *XBtCursor) (r0 int32) {
var _3_rc int32
_0:
- if _p == _pExcept || uint32(i32(0)) != _iRoot && (_p.X7) != _iRoot {
+ if _p == _pExcept || (0) != _iRoot && _p.XpgnoRoot != _iRoot {
goto _3
}
- if int32(_p.X12) != i32(1) && int32(_p.X12) != i32(2) {
+ if int32(_p.XeState) != int32(1) && int32(_p.XeState) != int32(2) {
goto _5
}
_3_rc = _saveCursorPosition(tls, _p)
- if i32(0) != _3_rc {
+ if int32(0) != _3_rc {
return _3_rc
}
goto _7
@@ -12241,53 +12351,55 @@ _5:
_btreeReleaseAllCursorPages(tls, _p)
_7:
_3:
- _p = (*XBtCursor)(_p.X2)
+ _p = (*XBtCursor)(_p.XpNext)
if _p != nil {
goto _0
}
- return i32(0)
+ return int32(0)
}
-// Save the current cursor position in the variables BtCursor.nKey
-// and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK.
-//
-// The caller must ensure that the cursor is valid (has eState==CURSOR_VALID)
-// prior to calling this routine.
+// C comment
+// /*
+// ** Save the current cursor position in the variables BtCursor.nKey
+// ** and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK.
+// **
+// ** The caller must ensure that the cursor is valid (has eState==CURSOR_VALID)
+// ** prior to calling this routine.
+// */
func _saveCursorPosition(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
var _rc int32
func() {
- if i32(1) != int32(_pCur.X12) && i32(2) != int32(_pCur.X12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59694), unsafe.Pointer((*int8)(unsafe.Pointer(&_saveCursorPositionØ00__func__Ø000))), unsafe.Pointer(str(10201)))
+ if int32(1) != int32(_pCur.XeState) && int32(2) != int32(_pCur.XeState) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59694), unsafe.Pointer(&_saveCursorPositionØ00__func__Ø000), unsafe.Pointer(str(10156)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if unsafe.Pointer(nil) != (_pCur.X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59695), unsafe.Pointer((*int8)(unsafe.Pointer(&_saveCursorPositionØ00__func__Ø000))), unsafe.Pointer(str(10261)))
+ if nil != _pCur.XpKey {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59695), unsafe.Pointer(&_saveCursorPositionØ00__func__Ø000), unsafe.Pointer(str(10216)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _cursorHoldsMutex(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59696), unsafe.Pointer((*int8)(unsafe.Pointer(&_saveCursorPositionØ00__func__Ø000))), unsafe.Pointer(str(10275)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59696), unsafe.Pointer(&_saveCursorPositionØ00__func__Ø000), unsafe.Pointer(str(10230)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pCur.X12) == i32(2) {
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(1))
+ if int32(_pCur.XeState) == int32(2) {
+ _pCur.XeState = uint8(1)
goto _8
}
- *(*int32)(unsafe.Pointer(&(_pCur.X9))) = i32(0)
+ _pCur.XskipNext = int32(0)
_8:
_rc = _saveCursorKey(tls, _pCur)
- if _rc == i32(0) {
+ if _rc == int32(0) {
_btreeReleaseAllCursorPages(tls, _pCur)
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(3))
+ _pCur.XeState = uint8(3)
}
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-15))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-15))
}
return _rc
}
@@ -12295,70 +12407,73 @@ _8:
var _saveCursorPositionØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_saveCursorPositionØ00__func__Ø000[0], str(10298), 19)
+ crt.Xstrncpy(nil, &_saveCursorPositionØ00__func__Ø000[0], str(10253), 19)
}
func _cursorHoldsMutex(tls *crt.TLS, _p *XBtCursor) (r0 int32) {
- return Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.X1).X21))
-}
-
-// The cursor passed as the only argument must point to a valid entry
-// when this function is called (i.e. have eState==CURSOR_VALID). This
-// function saves the current cursor key in variables pCur->nKey and
-// pCur->pKey. SQLITE_OK is returned if successful or an SQLite error
-// code otherwise.
-//
-// If the cursor is open on an intkey table, then the integer key
-// (the rowid) is stored in pCur->nKey and pCur->pKey is left set to
-// NULL. If the cursor is open on a non-intkey table, then pCur->pKey is
-// set to point to a malloced buffer pCur->nKey bytes in size containing
-// the key.
+ return Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.XpBt).Xmutex))
+}
+
+// C comment
+// /*
+// ** The cursor passed as the only argument must point to a valid entry
+// ** when this function is called (i.e. have eState==CURSOR_VALID). This
+// ** function saves the current cursor key in variables pCur->nKey and
+// ** pCur->pKey. SQLITE_OK is returned if successful or an SQLite error
+// ** code otherwise.
+// **
+// ** If the cursor is open on an intkey table, then the integer key
+// ** (the rowid) is stored in pCur->nKey and pCur->pKey is left set to
+// ** NULL. If the cursor is open on a non-intkey table, then pCur->pKey is
+// ** set to point to a malloced buffer pCur->nKey bytes in size containing
+// ** the key.
+// */
func _saveCursorKey(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
var _rc int32
var _2_pKey unsafe.Pointer
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if i32(1) != int32(_pCur.X12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59657), unsafe.Pointer((*int8)(unsafe.Pointer(&_saveCursorKeyØ00__func__Ø000))), unsafe.Pointer(str(10317)))
+ if int32(1) != int32(_pCur.XeState) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59657), unsafe.Pointer(&_saveCursorKeyØ00__func__Ø000), unsafe.Pointer(str(10272)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if unsafe.Pointer(nil) != (_pCur.X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59658), unsafe.Pointer((*int8)(unsafe.Pointer(&_saveCursorKeyØ00__func__Ø000))), unsafe.Pointer(str(10261)))
+ if nil != _pCur.XpKey {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59658), unsafe.Pointer(&_saveCursorKeyØ00__func__Ø000), unsafe.Pointer(str(10216)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _cursorHoldsMutex(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59659), unsafe.Pointer((*int8)(unsafe.Pointer(&_saveCursorKeyØ00__func__Ø000))), unsafe.Pointer(str(10275)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59659), unsafe.Pointer(&_saveCursorKeyØ00__func__Ø000), unsafe.Pointer(str(10230)))
crt.X__builtin_abort(tls)
}
}()
- if (_pCur.X15) != 0 {
- *(*int64)(unsafe.Pointer(&(_pCur.X5))) = _sqlite3BtreeIntegerKey(tls, _pCur)
+ if _pCur.XcurIntKey != 0 {
+ _pCur.XnKey = _sqlite3BtreeIntegerKey(tls, _pCur)
goto _7
}
- *(*int64)(unsafe.Pointer(&(_pCur.X5))) = int64(_sqlite3BtreePayloadSize(tls, _pCur))
- _2_pKey = _sqlite3Malloc(tls, uint64(_pCur.X5))
+ _pCur.XnKey = int64(_sqlite3BtreePayloadSize(tls, _pCur))
+ _2_pKey = _sqlite3Malloc(tls, uint64(_pCur.XnKey))
if _2_pKey == nil {
goto _8
}
- _rc = _sqlite3BtreePayload(tls, _pCur, uint32(i32(0)), uint32(int32(_pCur.X5)), _2_pKey)
- if _rc == i32(0) {
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pCur.X6))) = _2_pKey
+ _rc = _sqlite3BtreePayload(tls, _pCur, 0, uint32(int32(_pCur.XnKey)), _2_pKey)
+ if _rc == int32(0) {
+ _pCur.XpKey = _2_pKey
goto _10
}
Xsqlite3_free(tls, _2_pKey)
_10:
goto _11
_8:
- _rc = _sqlite3NomemError(tls, i32(59677))
+ _rc = _sqlite3NomemError(tls, int32(59677))
_11:
_7:
func() {
- if (_pCur.X15) != 0 && (_pCur.X6) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59680), unsafe.Pointer((*int8)(unsafe.Pointer(&_saveCursorKeyØ00__func__Ø000))), unsafe.Pointer(str(10344)))
+ if _pCur.XcurIntKey != 0 && _pCur.XpKey != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59680), unsafe.Pointer(&_saveCursorKeyØ00__func__Ø000), unsafe.Pointer(str(10299)))
crt.X__builtin_abort(tls)
}
}()
@@ -12368,52 +12483,54 @@ _7:
var _saveCursorKeyØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_saveCursorKeyØ00__func__Ø000[0], str(10376), 14)
+ crt.Xstrncpy(nil, &_saveCursorKeyØ00__func__Ø000[0], str(10331), 14)
}
-// Return the value of the integer key or "rowid" for a table btree.
-// This routine is only valid for a cursor that is pointing into a
-// ordinary table btree. If the cursor points to an index btree or
-// is invalid, the result of this routine is undefined.
+// C comment
+// /*
+// ** Return the value of the integer key or "rowid" for a table btree.
+// ** This routine is only valid for a cursor that is pointing into a
+// ** ordinary table btree. If the cursor points to an index btree or
+// ** is invalid, the result of this routine is undefined.
+// */
func _sqlite3BtreeIntegerKey(tls *crt.TLS, _pCur *XBtCursor) (r0 int64) {
func() {
if _cursorHoldsMutex(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63392), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIntegerKeyØ00__func__Ø000))), unsafe.Pointer(str(10275)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63392), unsafe.Pointer(&_sqlite3BtreeIntegerKeyØ00__func__Ø000), unsafe.Pointer(str(10230)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63393), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIntegerKeyØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63393), unsafe.Pointer(&_sqlite3BtreeIntegerKeyØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCur.X15) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63394), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIntegerKeyØ00__func__Ø000))), unsafe.Pointer(str(10417)))
+ if _pCur.XcurIntKey == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63394), unsafe.Pointer(&_sqlite3BtreeIntegerKeyØ00__func__Ø000), unsafe.Pointer(str(10372)))
crt.X__builtin_abort(tls)
}
}()
_getCellInfo(tls, _pCur)
- return (*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0
+ return _pCur.Xinfo.XnKey
}
var _sqlite3BtreeIntegerKeyØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeIntegerKeyØ00__func__Ø000[0], str(10433), 23)
+ crt.Xstrncpy(nil, &_sqlite3BtreeIntegerKeyØ00__func__Ø000[0], str(10388), 23)
}
func _getCellInfo(tls *crt.TLS, _pCur *XBtCursor) {
var _1_iPage int32
- if int32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4) == i32(0) {
- _1_iPage = int32(_pCur.X14)
+ if int32(_pCur.Xinfo.XnSize) == int32(0) {
+ _1_iPage = int32(_pCur.XiPage)
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) | i32(2))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) | int32(2))
}
- _btreeParseCell(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_1_iPage))), int32(_pCur.X16), (*XCellInfo)(unsafe.Pointer(&(_pCur.X4))))
+ _btreeParseCell(tls, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_1_iPage)), int32(_pCur.Xix), &_pCur.Xinfo)
goto _1
}
_assertCellInfo(tls, _pCur)
@@ -12421,138 +12538,147 @@ _1:
}
func _btreeParseCell(tls *crt.TLS, _pPage *XMemPage, _iCell int32, _pInfo *XCellInfo) {
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_pPage.X25)})))(tls, _pPage, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_iCell))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_iCell))))) + 1*uintptr(i32(1))))))))))))), _pInfo)
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _pPage.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _pPage, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData))+uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_iCell)), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_iCell)), uintptr(1))))))), _pInfo)
}
func _assertCellInfo(tls *crt.TLS, _pCur *XBtCursor) {
var _iPage int32
var _info XCellInfo
- _iPage = int32(_pCur.X14)
- crt.Xmemset(tls, (unsafe.Pointer)(&_info), i32(0), u32(20))
- _btreeParseCell(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_iPage))), int32(_pCur.X16), &_info)
+ _iPage = int32(_pCur.XiPage)
+ crt.Xmemset(tls, unsafe.Pointer(&_info), int32(0), uint32(20))
+ _btreeParseCell(tls, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_iPage)), int32(_pCur.Xix), &_info)
func() {
- if (_sqlite3Config.X6) != i32(0) && crt.Xmemcmp(tls, (unsafe.Pointer)(&_info), (unsafe.Pointer)((*XCellInfo)(unsafe.Pointer(&(_pCur.X4)))), u32(20)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63355), unsafe.Pointer((*int8)(unsafe.Pointer(&_assertCellInfoØ00__func__Ø000))), unsafe.Pointer(str(10456)))
+ if _sqlite3Config.XneverCorrupt != int32(0) && crt.Xmemcmp(tls, unsafe.Pointer(&_info), unsafe.Pointer(&_pCur.Xinfo), uint32(20)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63355), unsafe.Pointer(&_assertCellInfoØ00__func__Ø000), unsafe.Pointer(str(10411)))
crt.X__builtin_abort(tls)
}
}()
- _ = _info
}
var _assertCellInfoØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_assertCellInfoØ00__func__Ø000[0], str(10514), 15)
+ crt.Xstrncpy(nil, &_assertCellInfoØ00__func__Ø000[0], str(10469), 15)
}
-// Return the number of bytes of payload for the entry that pCur is
-// currently pointing to. For table btrees, this will be the amount
-// of data. For index btrees, this will be the size of the key.
-//
-// The caller must guarantee that the cursor is pointing to a non-NULL
-// valid entry. In other words, the calling procedure must guarantee
-// that the cursor has Cursor.eState==CURSOR_VALID.
+// C comment
+// /*
+// ** Return the number of bytes of payload for the entry that pCur is
+// ** currently pointing to. For table btrees, this will be the amount
+// ** of data. For index btrees, this will be the size of the key.
+// **
+// ** The caller must guarantee that the cursor is pointing to a non-NULL
+// ** valid entry. In other words, the calling procedure must guarantee
+// ** that the cursor has Cursor.eState==CURSOR_VALID.
+// */
func _sqlite3BtreePayloadSize(tls *crt.TLS, _pCur *XBtCursor) (r0 uint32) {
func() {
if _cursorHoldsMutex(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63409), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePayloadSizeØ00__func__Ø000))), unsafe.Pointer(str(10275)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63409), unsafe.Pointer(&_sqlite3BtreePayloadSizeØ00__func__Ø000), unsafe.Pointer(str(10230)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63410), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePayloadSizeØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63410), unsafe.Pointer(&_sqlite3BtreePayloadSizeØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
_getCellInfo(tls, _pCur)
- return (*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X2
+ return _pCur.Xinfo.XnPayload
}
var _sqlite3BtreePayloadSizeØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreePayloadSizeØ00__func__Ø000[0], str(10529), 24)
-}
-
-// Read part of the payload for the row at which that cursor pCur is currently
-// pointing. "amt" bytes will be transferred into pBuf[]. The transfer
-// begins at "offset".
-//
-// pCur can be pointing to either a table or an index b-tree.
-// If pointing to a table btree, then the content section is read. If
-// pCur is pointing to an index b-tree then the key section is read.
-//
-// For sqlite3BtreePayload(), the caller must ensure that pCur is pointing
-// to a valid row in the table. For sqlite3BtreePayloadChecked(), the
-// cursor might be invalid or might need to be restored before being read.
-//
-// Return SQLITE_OK on success or an error code if anything goes
-// wrong. An error is returned if "offset+amt" is larger than
-// the available payload.
+ crt.Xstrncpy(nil, &_sqlite3BtreePayloadSizeØ00__func__Ø000[0], str(10484), 24)
+}
+
+// C comment
+// /*
+// ** Read part of the payload for the row at which that cursor pCur is currently
+// ** pointing. "amt" bytes will be transferred into pBuf[]. The transfer
+// ** begins at "offset".
+// **
+// ** pCur can be pointing to either a table or an index b-tree.
+// ** If pointing to a table btree, then the content section is read. If
+// ** pCur is pointing to an index b-tree then the key section is read.
+// **
+// ** For sqlite3BtreePayload(), the caller must ensure that pCur is pointing
+// ** to a valid row in the table. For sqlite3BtreePayloadChecked(), the
+// ** cursor might be invalid or might need to be restored before being read.
+// **
+// ** Return SQLITE_OK on success or an error code if anything goes
+// ** wrong. An error is returned if "offset+amt" is larger than
+// ** the available payload.
+// */
func _sqlite3BtreePayload(tls *crt.TLS, _pCur *XBtCursor, _offset uint32, _amt uint32, _pBuf unsafe.Pointer) (r0 int32) {
func() {
if _cursorHoldsMutex(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63755), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePayloadØ00__func__Ø000))), unsafe.Pointer(str(10275)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63755), unsafe.Pointer(&_sqlite3BtreePayloadØ00__func__Ø000), unsafe.Pointer(str(10230)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63756), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePayloadØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63756), unsafe.Pointer(&_sqlite3BtreePayloadØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X14) < i32(0) || (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63757), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePayloadØ00__func__Ø000))), unsafe.Pointer(str(10553)))
+ if int32(_pCur.XiPage) < int32(0) || (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63757), unsafe.Pointer(&_sqlite3BtreePayloadØ00__func__Ø000), unsafe.Pointer(str(10508)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X16) >= int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63758), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePayloadØ00__func__Ø000))), unsafe.Pointer(str(10597)))
+ if int32(_pCur.Xix) >= int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63758), unsafe.Pointer(&_sqlite3BtreePayloadØ00__func__Ø000), unsafe.Pointer(str(10552)))
crt.X__builtin_abort(tls)
}
}()
- return _accessPayload(tls, _pCur, _offset, _amt, (*uint8)(_pBuf), i32(0))
+ return _accessPayload(tls, _pCur, _offset, _amt, (*uint8)(_pBuf), int32(0))
}
var _sqlite3BtreePayloadØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreePayloadØ00__func__Ø000[0], str(10639), 20)
-}
-
-// This function is used to read or overwrite payload information
-// for the entry that the pCur cursor is pointing to. The eOp
-// argument is interpreted as follows:
-//
-// 0: The operation is a read. Populate the overflow cache.
-// 1: The operation is a write. Populate the overflow cache.
-//
-// A total of "amt" bytes are read or written beginning at "offset".
-// Data is read to or from the buffer pBuf.
-//
-// The content being read or written might appear on the main page
-// or be scattered out on multiple overflow pages.
-//
-// If the current cursor entry uses one or more overflow pages
-// this function may allocate space for and lazily populate
-// the overflow page-list cache array (BtCursor.aOverflow).
-// Subsequent calls use this cache to make seeking to the supplied offset
-// more efficient.
-//
-// Once an overflow page-list cache has been allocated, it must be
-// invalidated if some other cursor writes to the same table, or if
-// the cursor is moved to a different row. Additionally, in auto-vacuum
-// mode, the following events may invalidate an overflow page-list cache.
-//
-// * An incremental vacuum,
-// * A commit in auto_vacuum="full" mode,
-// * Creating a table (may require moving an overflow page).
+ crt.Xstrncpy(nil, &_sqlite3BtreePayloadØ00__func__Ø000[0], str(10594), 20)
+}
+
+// C comment
+// /*
+// ** This function is used to read or overwrite payload information
+// ** for the entry that the pCur cursor is pointing to. The eOp
+// ** argument is interpreted as follows:
+// **
+// ** 0: The operation is a read. Populate the overflow cache.
+// ** 1: The operation is a write. Populate the overflow cache.
+// **
+// ** A total of "amt" bytes are read or written beginning at "offset".
+// ** Data is read to or from the buffer pBuf.
+// **
+// ** The content being read or written might appear on the main page
+// ** or be scattered out on multiple overflow pages.
+// **
+// ** If the current cursor entry uses one or more overflow pages
+// ** this function may allocate space for and lazily populate
+// ** the overflow page-list cache array (BtCursor.aOverflow).
+// ** Subsequent calls use this cache to make seeking to the supplied offset
+// ** more efficient.
+// **
+// ** Once an overflow page-list cache has been allocated, it must be
+// ** invalidated if some other cursor writes to the same table, or if
+// ** the cursor is moved to a different row. Additionally, in auto-vacuum
+// ** mode, the following events may invalidate an overflow page-list cache.
+// **
+// ** * An incremental vacuum,
+// ** * A commit in auto_vacuum="full" mode,
+// ** * Creating a table (may require moving an overflow page).
+// */
func _accessPayload(tls *crt.TLS, _pCur *XBtCursor, _offset uint32, _amt uint32, _pBuf *uint8, _eOp int32) (r0 int32) {
var _rc, _iIdx, _2_a, _6_nOvfl, _16_a int32
var _5_ovflSize, _5_nextPage uint32
@@ -12561,120 +12687,107 @@ func _accessPayload(tls *crt.TLS, _pCur *XBtCursor, _offset uint32, _amt uint32,
var _18_pDbPage *XPgHdr
var _pBt *XBtShared
var _pPage *XMemPage
- _rc = i32(0)
- _iIdx = i32(0)
- _pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
- _pBt = (*XBtShared)(_pCur.X1)
+ _rc = int32(0)
+ _iIdx = int32(0)
+ _pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
+ _pBt = (*XBtShared)(_pCur.XpBt)
func() {
if _pPage == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63568), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10659)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63568), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10614)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eOp != i32(0) && _eOp != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63569), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10665)))
+ if _eOp != int32(0) && _eOp != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63569), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10620)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63570), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63570), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X16) >= int32(_pPage.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63571), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10682)))
+ if int32(_pCur.Xix) >= int32(_pPage.XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63571), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10637)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _cursorHoldsMutex(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63572), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10275)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63572), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10230)))
crt.X__builtin_abort(tls)
}
}()
_getCellInfo(tls, _pCur)
- _aPayload = (*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X1
+ _aPayload = _pCur.Xinfo.XpPayload
func() {
- if (_offset + _amt) > ((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63576), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10704)))
+ if (_offset + _amt) > (_pCur.Xinfo.XnPayload) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63576), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10659)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uintptr(unsafe.Pointer(_aPayload)) <= uintptr(unsafe.Pointer(_pPage.X19)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63578), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10738)))
+ if crt.P2U(unsafe.Pointer(_aPayload)) <= crt.P2U(unsafe.Pointer(_pPage.XaData)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63578), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10693)))
crt.X__builtin_abort(tls)
}
}()
- if uint32(int32((uintptr(unsafe.Pointer(_aPayload))-uintptr(unsafe.Pointer(_pPage.X19)))/1)) > ((_pBt.X16) - uint32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X3)) {
- return _sqlite3CorruptError(tls, i32(63585))
+ if uint32(int32(uintptr(unsafe.Pointer(_aPayload))-uintptr(unsafe.Pointer(_pPage.XaData)))) > (_pBt.XusableSize - uint32(_pCur.Xinfo.XnLocal)) {
+ return _sqlite3CorruptError(tls, int32(63585))
}
- if _offset >= uint32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X3) {
+ if _offset >= uint32(_pCur.Xinfo.XnLocal) {
goto _16
}
_2_a = int32(_amt)
- if (uint32(_2_a) + _offset) > uint32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X3) {
- _2_a = int32(uint32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X3) - _offset)
- }
- _rc = _copyPayload(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPayload))+1*uintptr(_offset)))), (unsafe.Pointer)(_pBuf), _2_a, _eOp, (*XPgHdr)(_pPage.X23))
- _offset = uint32(i32(0))
- {
- p := &_pBuf
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_2_a)))
- sink13(*p)
- }
- {
- p := &_amt
- *p = (*p) - uint32(_2_a)
- sink5(*p)
+ if (uint32(_2_a) + _offset) > uint32(_pCur.Xinfo.XnLocal) {
+ _2_a = int32(uint32(_pCur.Xinfo.XnLocal) - _offset)
}
+ _rc = _copyPayload(tls, unsafe.Pointer(elem15(_aPayload, uintptr(_offset))), unsafe.Pointer(_pBuf), _2_a, _eOp, (*XPgHdr)(_pPage.XpDbPage))
+ _offset = 0
+ *(*uintptr)(unsafe.Pointer(&_pBuf)) += uintptr(_2_a)
+ _amt -= uint32(_2_a)
goto _18
_16:
- {
- p := &_offset
- *p = (*p) - uint32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X3)
- sink5(*p)
- }
+ _offset -= uint32(_pCur.Xinfo.XnLocal)
_18:
- if _rc != i32(0) || _amt <= uint32(i32(0)) {
+ if _rc != int32(0) || _amt <= (0) {
goto _20
}
- _5_ovflSize = (_pBt.X16) - uint32(i32(4))
- _5_nextPage = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPayload))+1*uintptr((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X3))))
- if (int32(_pCur.X10) & i32(4)) != i32(0) {
+ _5_ovflSize = _pBt.XusableSize - uint32(4)
+ _5_nextPage = _sqlite3Get4byte(tls, elem15(_aPayload, uintptr(_pCur.Xinfo.XnLocal)))
+ if (int32(_pCur.XcurFlags) & int32(4)) != int32(0) {
goto _21
}
- _6_nOvfl = int32((((((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X2) - uint32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X3)) + _5_ovflSize) - uint32(i32(1))) / _5_ovflSize)
- if _6_nOvfl <= (_pCur.X8) {
+ _6_nOvfl = int32(((((_pCur.Xinfo.XnPayload) - uint32(_pCur.Xinfo.XnLocal)) + _5_ovflSize) - uint32(1)) / _5_ovflSize)
+ if _6_nOvfl <= _pCur.XnOvflAlloc {
goto _22
}
- _7_aNew = (*uint32)(_sqlite3Realloc(tls, (unsafe.Pointer)(_pCur.X3), uint64(uint32(_6_nOvfl*i32(2))*u32(4))))
+ _7_aNew = (*uint32)(_sqlite3Realloc(tls, unsafe.Pointer(_pCur.XaOverflow), uint64(uint32(_6_nOvfl*int32(2))*uint32(4))))
if _7_aNew == nil {
- return _sqlite3NomemError(tls, i32(63623))
+ return _sqlite3NomemError(tls, int32(63623))
}
- *(*int32)(unsafe.Pointer(&(_pCur.X8))) = _6_nOvfl * i32(2)
- *(**uint32)(unsafe.Pointer(&(_pCur.X3))) = _7_aNew
+ _pCur.XnOvflAlloc = _6_nOvfl * int32(2)
+ _pCur.XaOverflow = _7_aNew
_22:
- crt.Xmemset(tls, (unsafe.Pointer)(_pCur.X3), i32(0), uint32(_6_nOvfl)*u32(4))
+ crt.Xmemset(tls, unsafe.Pointer(_pCur.XaOverflow), int32(0), uint32(_6_nOvfl)*uint32(4))
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) | i32(4))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) | int32(4))
}
goto _25
_21:
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCur.X3)) + 4*uintptr(_offset/_5_ovflSize)))) != 0 {
+ if (*elem7(_pCur.XaOverflow, uintptr(_offset/_5_ovflSize))) != 0 {
_iIdx = int32(_offset / _5_ovflSize)
- _5_nextPage = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCur.X3)) + 4*uintptr(_iIdx)))
+ _5_nextPage = *elem7(_pCur.XaOverflow, uintptr(_iIdx))
_offset = _offset % _5_ovflSize
}
_25:
func() {
- if _rc != i32(0) || _amt <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63643), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10762)))
+ if _rc != int32(0) || _amt <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63643), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10717)))
crt.X__builtin_abort(tls)
}
}()
@@ -12683,70 +12796,58 @@ _30:
goto _31
}
func() {
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCur.X3)) + 4*uintptr(_iIdx)))) != uint32(i32(0)) && (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCur.X3)) + 4*uintptr(_iIdx)))) != _5_nextPage && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63646), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10785)))
+ if (*elem7(_pCur.XaOverflow, uintptr(_iIdx))) != (0) && (*elem7(_pCur.XaOverflow, uintptr(_iIdx))) != _5_nextPage && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63646), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10740)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCur.X3)) + 4*uintptr(_iIdx))) = _5_nextPage
+ *elem7(_pCur.XaOverflow, uintptr(_iIdx)) = _5_nextPage
if _offset < _5_ovflSize {
goto _36
}
func() {
- if (int32(_pCur.X10) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63658), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10859)))
+ if (int32(_pCur.XcurFlags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63658), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10814)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)((*XBtree)(_pCur.X0).X0) != (*Xsqlite3)(_pBt.X1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63659), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadØ00__func__Ø000))), unsafe.Pointer(str(10891)))
+ if (*Xsqlite3)((*XBtree)(_pCur.XpBtree).Xdb) != (*Xsqlite3)(_pBt.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63659), unsafe.Pointer(&_accessPayloadØ00__func__Ø000), unsafe.Pointer(str(10846)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCur.X3)) + 4*uintptr(_iIdx+i32(1))))) != 0 {
- _5_nextPage = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCur.X3)) + 4*uintptr(_iIdx+i32(1))))
+ if (*elem7(_pCur.XaOverflow, uintptr(_iIdx+int32(1)))) != 0 {
+ _5_nextPage = *elem7(_pCur.XaOverflow, uintptr(_iIdx+int32(1)))
goto _42
}
_rc = _getOverflowPage(tls, _pBt, _5_nextPage, nil, &_5_nextPage)
_42:
- {
- p := &_offset
- *p = (*p) - _5_ovflSize
- sink5(*p)
- }
+ _offset -= _5_ovflSize
goto _43
_36:
_16_a = int32(_amt)
if (uint32(_16_a) + _offset) > _5_ovflSize {
_16_a = int32(_5_ovflSize - _offset)
}
- _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.X0), _5_nextPage, &_18_pDbPage, func() int32 {
- if _eOp == i32(0) {
- return i32(2)
+ _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.XpPager), _5_nextPage, &_18_pDbPage, func() int32 {
+ if _eOp == int32(0) {
+ return int32(2)
}
- return i32(0)
+ return int32(0)
}())
- if _rc == i32(0) {
+ if _rc == int32(0) {
_aPayload = (*uint8)(_sqlite3PagerGetData(tls, _18_pDbPage))
_5_nextPage = _sqlite3Get4byte(tls, _aPayload)
- _rc = _copyPayload(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPayload))+1*uintptr(_offset+uint32(i32(4)))))), (unsafe.Pointer)(_pBuf), _16_a, _eOp, _18_pDbPage)
+ _rc = _copyPayload(tls, unsafe.Pointer(elem15(_aPayload, uintptr(_offset+uint32(4)))), unsafe.Pointer(_pBuf), _16_a, _eOp, _18_pDbPage)
_sqlite3PagerUnref(tls, _18_pDbPage)
- _offset = uint32(i32(0))
- }
- {
- p := &_amt
- *p = (*p) - uint32(_16_a)
- sink5(*p)
+ _offset = 0
}
- if _amt == uint32(i32(0)) {
+ _amt -= uint32(_16_a)
+ if _amt == (0) {
return _rc
}
- {
- p := &_pBuf
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_16_a)))
- sink13(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_pBuf)) += uintptr(_16_a)
_43:
if _rc != 0 {
goto _31
@@ -12755,8 +12856,8 @@ _43:
goto _30
_31:
_20:
- if (_rc == i32(0)) && (_amt > uint32(i32(0))) {
- return _sqlite3CorruptError(tls, i32(63732))
+ if (_rc == int32(0)) && (_amt > (0)) {
+ return _sqlite3CorruptError(tls, int32(63732))
}
return _rc
}
@@ -12764,29 +12865,40 @@ _20:
var _accessPayloadØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_accessPayloadØ00__func__Ø000[0], str(10917), 14)
+ crt.Xstrncpy(nil, &_accessPayloadØ00__func__Ø000[0], str(10872), 14)
}
+// C comment
+// /*
+// ** The SQLITE_*_BKPT macros are substitutes for the error codes with
+// ** the same name but without the _BKPT suffix. These macros invoke
+// ** routines that report the line-number on which the error originated
+// ** using sqlite3_log(). The routines also provide a convenient place
+// ** to set a debugger breakpoint.
+// */
func _sqlite3CorruptError(tls *crt.TLS, _lineno int32) (r0 int32) {
- return _reportError(tls, i32(11), _lineno, str(10931))
-}
-
-// Copy data from a buffer to a page, or from a page to a buffer.
-//
-// pPayload is a pointer to data stored on database page pDbPage.
-// If argument eOp is false, then nByte bytes of data are copied
-// from pPayload to the buffer pointed at by pBuf. If eOp is true,
-// then sqlite3PagerWrite() is called on pDbPage and nByte bytes
-// of data are copied from the buffer pBuf to pPayload.
-//
-// SQLITE_OK is returned on success, otherwise an error code.
+ return _reportError(tls, int32(11), _lineno, str(10886))
+}
+
+// C comment
+// /*
+// ** Copy data from a buffer to a page, or from a page to a buffer.
+// **
+// ** pPayload is a pointer to data stored on database page pDbPage.
+// ** If argument eOp is false, then nByte bytes of data are copied
+// ** from pPayload to the buffer pointed at by pBuf. If eOp is true,
+// ** then sqlite3PagerWrite() is called on pDbPage and nByte bytes
+// ** of data are copied from the buffer pBuf to pPayload.
+// **
+// ** SQLITE_OK is returned on success, otherwise an error code.
+// */
func _copyPayload(tls *crt.TLS, _pPayload unsafe.Pointer, _pBuf unsafe.Pointer, _nByte int32, _eOp int32, _pDbPage *XPgHdr) (r0 int32) {
var _1_rc int32
if _eOp == 0 {
goto _0
}
_1_rc = _sqlite3PagerWrite(tls, _pDbPage)
- if _1_rc != i32(0) {
+ if _1_rc != int32(0) {
return _1_rc
}
crt.Xmemcpy(tls, _pPayload, _pBuf, uint32(_nByte))
@@ -12794,58 +12906,61 @@ func _copyPayload(tls *crt.TLS, _pPayload unsafe.Pointer, _pBuf unsafe.Pointer,
_0:
crt.Xmemcpy(tls, _pBuf, _pPayload, uint32(_nByte))
_2:
- return i32(0)
-}
-
-// Mark a data page as writeable. This routine must be called before
-// making changes to a page. The caller must check the return value
-// of this function and be careful not to change any page data unless
-// this routine returns SQLITE_OK.
-//
-// The difference between this function and pager_write() is that this
-// function also deals with the special case where 2 or more pages
-// fit on a single disk sector. In this case all co-resident pages
-// must have been written to the journal file before returning.
-//
-// If an error occurs, SQLITE_NOMEM or an IO error code is returned
-// as appropriate. Otherwise, SQLITE_OK.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Mark a data page as writeable. This routine must be called before
+// ** making changes to a page. The caller must check the return value
+// ** of this function and be careful not to change any page data unless
+// ** this routine returns SQLITE_OK.
+// **
+// ** The difference between this function and pager_write() is that this
+// ** function also deals with the special case where 2 or more pages
+// ** fit on a single disk sector. In this case all co-resident pages
+// ** must have been written to the journal file before returning.
+// **
+// ** If an error occurs, SQLITE_NOMEM or an IO error code is returned
+// ** as appropriate. Otherwise, SQLITE_OK.
+// */
func _sqlite3PagerWrite(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
var _pPager *XPager
- _pPager = (*XPager)(_pPg.X4)
+ _pPager = (*XPager)(_pPg.XpPager)
func() {
- if (int32(_pPg.X6) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52989), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerWriteØ00__func__Ø000))), unsafe.Pointer(str(10951)))
+ if (int32(_pPg.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52989), unsafe.Pointer(&_sqlite3PagerWriteØ00__func__Ø000), unsafe.Pointer(str(10906)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52990), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerWriteØ00__func__Ø000))), unsafe.Pointer(str(10980)))
+ if int32(_pPager.XeState) < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52990), unsafe.Pointer(&_sqlite3PagerWriteØ00__func__Ø000), unsafe.Pointer(str(10935)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52991), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerWriteØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52991), unsafe.Pointer(&_sqlite3PagerWriteØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pPg.X6)&i32(4)) == i32(0) || (_pPager.X22) < (_pPg.X5) {
+ if (int32(_pPg.Xflags)&int32(4)) == int32(0) || _pPager.XdbSize < _pPg.Xpgno {
goto _7
}
- if (_pPager.X38) != 0 {
+ if _pPager.XnSavepoint != 0 {
return _subjournalPageIfRequired(tls, _pPg)
}
- return i32(0)
+ return int32(0)
_7:
- if (_pPager.X26) != 0 {
- return _pPager.X26
+ if _pPager.XerrCode != 0 {
+ return _pPager.XerrCode
}
- if (_pPager.X47) > uint32(_pPager.X48) {
+ if _pPager.XsectorSize > uint32(_pPager.XpageSize) {
func() {
- if int32(_pPager.X10) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52998), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerWriteØ00__func__Ø000))), unsafe.Pointer(str(11043)))
+ if int32(_pPager.XtempFile) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52998), unsafe.Pointer(&_sqlite3PagerWriteØ00__func__Ø000), unsafe.Pointer(str(10998)))
crt.X__builtin_abort(tls)
}
}()
@@ -12857,106 +12972,109 @@ _7:
var _sqlite3PagerWriteØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerWriteØ00__func__Ø000[0], str(11063), 18)
+ crt.Xstrncpy(nil, &_sqlite3PagerWriteØ00__func__Ø000[0], str(11018), 18)
}
-// Usage:
-//
-// assert( assert_pager_state(pPager) );
-//
-// This function runs many asserts to try to find inconsistencies in
-// the internal state of the Pager object.
+// C comment
+// /*
+// ** Usage:
+// **
+// ** assert( assert_pager_state(pPager) );
+// **
+// ** This function runs many asserts to try to find inconsistencies in
+// ** the internal state of the Pager object.
+// */
func _assert_pager_state(tls *crt.TLS, _p *XPager) (r0 int32) {
var _pPager *XPager
_pPager = _p
func() {
- if int32(_p.X14) != i32(0) && int32(_p.X14) != i32(1) && int32(_p.X14) != i32(2) && int32(_p.X14) != i32(3) && int32(_p.X14) != i32(4) && int32(_p.X14) != i32(5) && int32(_p.X14) != i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47769), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11081)))
+ if int32(_p.XeState) != int32(0) && int32(_p.XeState) != int32(1) && int32(_p.XeState) != int32(2) && int32(_p.XeState) != int32(3) && int32(_p.XeState) != int32(4) && int32(_p.XeState) != int32(5) && int32(_p.XeState) != int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47769), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11036)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X10) != i32(0) && int32(_p.X15) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47782), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11295)))
+ if int32(_p.XtempFile) != int32(0) && int32(_p.XeLock) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47782), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11250)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X10) != i32(0) && (_pPager.X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47783), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11338)))
+ if int32(_p.XtempFile) != int32(0) && _pPager.XchangeCountDone == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47783), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11293)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X2) != i32(2) && (_p.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47788), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11380)))
+ if int32(_p.XjournalMode) != int32(2) && _p.XuseJournal == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47788), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11335)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X2) == i32(2) && (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.X32).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47789), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11435)))
+ if int32(_p.XjournalMode) == int32(2) && (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.Xjfd).XpMethods) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47789), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11390)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X13) != 0 {
+ if _pPager.XmemDb != 0 {
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.X31).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47800), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11492)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.Xfd).XpMethods) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47800), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11447)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X4) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47801), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11507)))
+ if _p.XnoSync == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47801), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11462)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X2) != i32(2) && int32(_p.X2) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47802), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11517)))
+ if int32(_p.XjournalMode) != int32(2) && int32(_p.XjournalMode) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47802), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11472)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X14) == i32(6) || int32(_p.X14) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47805), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11599)))
+ if int32(_p.XeState) == int32(6) || int32(_p.XeState) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47805), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11554)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if bool2int((*XWal)(_p.X60) != nil) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47806), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11647)))
+ if bool2int((*XWal)(_p.XpWal) != nil) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47806), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11602)))
crt.X__builtin_abort(tls)
}
}()
}
func() {
- if int32(_pPager.X16) != i32(0) && int32(_pPager.X15) < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47812), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11665)))
+ if int32(_pPager.XchangeCountDone) != int32(0) && int32(_pPager.XeLock) < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47812), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11620)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X15) == i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47813), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11724)))
+ if int32(_p.XeLock) == int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47813), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11679)))
crt.X__builtin_abort(tls)
}
}()
- switch int32(_p.X14) {
- case i32(0):
+ switch int32(_p.XeState) {
+ case int32(0):
goto _39
- case i32(1):
+ case int32(1):
goto _40
- case i32(2):
+ case int32(2):
goto _41
- case i32(3):
+ case int32(3):
goto _42
- case i32(4):
+ case int32(4):
goto _43
- case i32(5):
+ case int32(5):
goto _44
- case i32(6):
+ case int32(6):
goto _45
default:
goto _46
@@ -12964,378 +13082,390 @@ func _assert_pager_state(tls *crt.TLS, _p *XPager) (r0 int32) {
_39:
func() {
- if (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47817), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11747)))
+ if _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47817), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11702)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47818), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11754)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47818), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11709)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.X59)) != i32(0) && (_pPager.X10) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47819), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11781)))
+ if _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.XpPCache)) != int32(0) && _pPager.XtempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47819), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11736)))
crt.X__builtin_abort(tls)
}
}()
goto _46
_40:
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47823), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11754)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47823), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11709)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X15) == i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47824), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11843)))
+ if int32(_p.XeLock) == int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47824), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11798)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X15) < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47825), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11866)))
+ if int32(_p.XeLock) < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47825), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11821)))
crt.X__builtin_abort(tls)
}
}()
goto _46
_41:
func() {
- if int32(_p.X15) == i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47829), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11843)))
+ if int32(_p.XeLock) == int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47829), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11798)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47830), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11754)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47830), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11709)))
crt.X__builtin_abort(tls)
}
}()
- if (*XWal)(_pPager.X60) == nil {
+ if (*XWal)(_pPager.XpWal) == nil {
func() {
- if int32(_p.X15) < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47832), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11888)))
+ if int32(_p.XeLock) < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47832), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11843)))
crt.X__builtin_abort(tls)
}
}()
}
func() {
- if (_pPager.X22) != (_pPager.X23) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47834), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11912)))
+ if _pPager.XdbSize != _pPager.XdbOrigSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47834), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11867)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X23) != (_pPager.X24) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47835), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11947)))
+ if _pPager.XdbOrigSize != _pPager.XdbFileSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47835), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11902)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X23) != (_pPager.X25) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47836), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11986)))
+ if _pPager.XdbOrigSize != _pPager.XdbHintSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47836), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11941)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47837), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12025)))
+ if int32(_pPager.XsetMaster) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47837), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11980)))
crt.X__builtin_abort(tls)
}
}()
goto _46
_42:
func() {
- if int32(_p.X15) == i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47841), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11843)))
+ if int32(_p.XeLock) == int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47841), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11798)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47842), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11754)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47842), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11709)))
crt.X__builtin_abort(tls)
}
}()
- if (*XWal)(_pPager.X60) == nil {
+ if (*XWal)(_pPager.XpWal) == nil {
func() {
- if int32(_p.X15) < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47849), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11888)))
+ if int32(_p.XeLock) < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47849), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11843)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.X32).X0) == nil && int32(_p.X2) != i32(2) && int32(_p.X2) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47850), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12046)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.Xjfd).XpMethods) == nil && int32(_p.XjournalMode) != int32(2) && int32(_p.XjournalMode) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47850), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12001)))
crt.X__builtin_abort(tls)
}
}()
}
func() {
- if (_pPager.X23) != (_pPager.X24) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47855), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11947)))
+ if _pPager.XdbOrigSize != _pPager.XdbFileSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47855), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11902)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X23) != (_pPager.X25) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47856), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11986)))
+ if _pPager.XdbOrigSize != _pPager.XdbHintSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47856), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11941)))
crt.X__builtin_abort(tls)
}
}()
goto _46
_43:
func() {
- if int32(_p.X15) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47860), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12143)))
+ if int32(_p.XeLock) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47860), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12098)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47861), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11754)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47861), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11709)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XWal)(_pPager.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47862), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12168)))
+ if (*XWal)(_pPager.XpWal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47862), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12123)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X15) < i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47863), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12189)))
+ if int32(_p.XeLock) < int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47863), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12144)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.X32).X0) == nil && int32(_p.X2) != i32(2) && int32(_p.X2) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47864), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12046)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.Xjfd).XpMethods) == nil && int32(_p.XjournalMode) != int32(2) && int32(_p.XjournalMode) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47864), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12001)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X23) > (_pPager.X25) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47868), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12214)))
+ if _pPager.XdbOrigSize > _pPager.XdbHintSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47868), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12169)))
crt.X__builtin_abort(tls)
}
}()
goto _46
_44:
func() {
- if int32(_p.X15) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47872), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12143)))
+ if int32(_p.XeLock) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47872), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12098)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47873), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(11754)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47873), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(11709)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XWal)(_pPager.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47874), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12168)))
+ if (*XWal)(_pPager.XpWal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47874), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12123)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.X32).X0) == nil && int32(_p.X2) != i32(2) && int32(_p.X2) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47875), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12046)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_p.Xjfd).XpMethods) == nil && int32(_p.XjournalMode) != int32(2) && int32(_p.XjournalMode) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47875), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12001)))
crt.X__builtin_abort(tls)
}
}()
goto _46
_45:
func() {
- if (_pPager.X26) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47886), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12253)))
+ if _pPager.XerrCode == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47886), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12208)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.X59)) <= i32(0) && (_pPager.X10) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(47887), unsafe.Pointer((*int8)(unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000))), unsafe.Pointer(str(12280)))
+ if _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.XpPCache)) <= int32(0) && _pPager.XtempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(47887), unsafe.Pointer(&_assert_pager_stateØ00__func__Ø000), unsafe.Pointer(str(12235)))
crt.X__builtin_abort(tls)
}
}()
goto _46
_46:
- return i32(1)
+ return int32(1)
}
var _assert_pager_stateØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_assert_pager_stateØ00__func__Ø000[0], str(12341), 19)
+ crt.Xstrncpy(nil, &_assert_pager_stateØ00__func__Ø000[0], str(12296), 19)
}
-// Return the total number of references to all pages held by the cache.
-//
-// This is not the total number of pages referenced, but the sum of the
-// reference count for all pages.
+// C comment
+// /*
+// ** Return the total number of references to all pages held by the cache.
+// **
+// ** This is not the total number of pages referenced, but the sum of the
+// ** reference count for all pages.
+// */
func _sqlite3PcacheRefCount(tls *crt.TLS, _pCache *XPCache) (r0 int32) {
- return _pCache.X3
+ return _pCache.XnRefSum
}
func _subjournalPageIfRequired(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
if _subjRequiresPage(tls, _pPg) != 0 {
return _subjournalPage(tls, _pPg)
}
- return i32(0)
+ return int32(0)
}
-// Return true if it is necessary to write page *pPg into the sub-journal.
-// A page needs to be written into the sub-journal if there exists one
-// or more open savepoints for which:
-//
-// * The page-number is less than or equal to PagerSavepoint.nOrig, and
-// * The bit corresponding to the page-number is not set in
-// PagerSavepoint.pInSavepoint.
+// C comment
+// /*
+// ** Return true if it is necessary to write page *pPg into the sub-journal.
+// ** A page needs to be written into the sub-journal if there exists one
+// ** or more open savepoints for which:
+// **
+// ** * The page-number is less than or equal to PagerSavepoint.nOrig, and
+// ** * The bit corresponding to the page-number is not set in
+// ** PagerSavepoint.pInSavepoint.
+// */
func _subjRequiresPage(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
var _i int32
var _pgno uint32
var _pPager *XPager
var _p *XPagerSavepoint
- _pPager = (*XPager)(_pPg.X4)
- _pgno = _pPg.X5
- _i = i32(0)
+ _pPager = (*XPager)(_pPg.XpPager)
+ _pgno = _pPg.Xpgno
+ _i = int32(0)
_0:
- if _i >= (_pPager.X38) {
+ if _i >= _pPager.XnSavepoint {
goto _3
}
- _p = (*XPagerSavepoint)(unsafe.Pointer(uintptr(_pPager.X37) + 44*uintptr(_i)))
- if ((_p.X3) >= _pgno) && (i32(0) == _sqlite3BitvecTestNotNull(tls, (*XBitvec)(_p.X2), _pgno)) {
- return i32(1)
+ _p = elem31((*XPagerSavepoint)(_pPager.XaSavepoint), uintptr(_i))
+ if (_p.XnOrig >= _pgno) && (int32(0) == _sqlite3BitvecTestNotNull(tls, (*XBitvec)(_p.XpInSavepoint), _pgno)) {
+ return int32(1)
}
_i += 1
goto _0
_3:
- return i32(0)
+ return int32(0)
}
-// Check to see if the i-th bit is set. Return true or false.
-// If p is NULL (if the bitmap has not been created) or if
-// i is out of range, then return false.
+// C comment
+// /*
+// ** Check to see if the i-th bit is set. Return true or false.
+// ** If p is NULL (if the bitmap has not been created) or if
+// ** i is out of range, then return false.
+// */
func _sqlite3BitvecTestNotNull(tls *crt.TLS, _p *XBitvec, _i uint32) (r0 int32) {
var _1_bin, _4_h uint32
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(43840), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BitvecTestNotNullØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(43840), unsafe.Pointer(&_sqlite3BitvecTestNotNullØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
_i -= 1
- if _i >= (_p.X0) {
- return i32(0)
+ if _i >= _p.XiSize {
+ return int32(0)
}
_2:
- if (_p.X2) == 0 {
+ if _p.XiDivisor == 0 {
goto _4
}
- _1_bin = _i / (_p.X2)
- _i = _i % (_p.X2)
- _p = *(**XBitvec)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]unsafe.Pointer)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_1_bin)))
+ _1_bin = _i / _p.XiDivisor
+ _i = _i % _p.XiDivisor
+ _p = *elem32((**XBitvec)(unsafe.Pointer((*[125]unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))), uintptr(_1_bin))
if _p == nil {
- return i32(0)
+ return int32(0)
}
goto _2
_4:
- if (_p.X0) <= u32(4000) {
- return bool2int((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[500]uint8)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 1*uintptr(_i/uint32(i32(8)))))) & (i32(1) << uint(int32(_i&uint32(i32(7)))))) != i32(0))
+ if _p.XiSize <= uint32(4000) {
+ return bool2int((int32(*elem15((*uint8)(unsafe.Pointer((*[500]uint8)(unsafe.Pointer(&_p.Xu)))), uintptr(_i/uint32(8)))) & (int32(1) << uint(int32(_i&uint32(7))))) != int32(0))
}
- _4_h = (postInc5(&_i, uint32(1)) * uint32(i32(1))) % u32(125)
+ _4_h = (postInc23(&_i, uint32(1)) * uint32(1)) % uint32(125)
_8:
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_4_h)))) == 0 {
+ if (*elem7((*uint32)(unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu)))), uintptr(_4_h))) == 0 {
goto _9
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_4_h)))) == _i {
- return i32(1)
+ if (*elem7((*uint32)(unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu)))), uintptr(_4_h))) == _i {
+ return int32(1)
}
- _4_h = (_4_h + uint32(i32(1))) % u32(125)
+ _4_h = (_4_h + uint32(1)) % uint32(125)
goto _8
_9:
- return i32(0)
+ return int32(0)
}
var _sqlite3BitvecTestNotNullØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BitvecTestNotNullØ00__func__Ø000[0], str(12360), 25)
+ crt.Xstrncpy(nil, &_sqlite3BitvecTestNotNullØ00__func__Ø000[0], str(12315), 25)
}
-// Append a record of the current state of page pPg to the sub-journal.
-//
-// If successful, set the bit corresponding to pPg->pgno in the bitvecs
-// for all open savepoints before returning.
-//
-// This function returns SQLITE_OK if everything is successful, an IO
-// error code if the attempt to write to the sub-journal fails, or
-// SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint
-// bitvec.
+// C comment
+// /*
+// ** Append a record of the current state of page pPg to the sub-journal.
+// **
+// ** If successful, set the bit corresponding to pPg->pgno in the bitvecs
+// ** for all open savepoints before returning.
+// **
+// ** This function returns SQLITE_OK if everything is successful, an IO
+// ** error code if the attempt to write to the sub-journal fails, or
+// ** SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint
+// ** bitvec.
+// */
func _subjournalPage(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
var _rc int32
var _2_offset int64
var _2_pData2 *int8
var _2_pData unsafe.Pointer
var _pPager *XPager
- _rc = i32(0)
- _pPager = (*XPager)(_pPg.X4)
- if int32(_pPager.X2) == i32(2) {
+ _rc = int32(0)
+ _pPager = (*XPager)(_pPg.XpPager)
+ if int32(_pPager.XjournalMode) == int32(2) {
goto _0
}
func() {
- if (_pPager.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51384), unsafe.Pointer((*int8)(unsafe.Pointer(&_subjournalPageØ00__func__Ø000))), unsafe.Pointer(str(12385)))
+ if _pPager.XuseJournal == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51384), unsafe.Pointer(&_subjournalPageØ00__func__Ø000), unsafe.Pointer(str(12340)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil && (*XWal)(_pPager.X60) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51385), unsafe.Pointer((*int8)(unsafe.Pointer(&_subjournalPageØ00__func__Ø000))), unsafe.Pointer(str(12404)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil && (*XWal)(_pPager.XpWal) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51385), unsafe.Pointer(&_subjournalPageØ00__func__Ø000), unsafe.Pointer(str(12359)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X33).X0) == nil && (_pPager.X29) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51386), unsafe.Pointer((*int8)(unsafe.Pointer(&_subjournalPageØ00__func__Ø000))), unsafe.Pointer(str(12447)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xsjfd).XpMethods) == nil && _pPager.XnSubRec != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51386), unsafe.Pointer(&_subjournalPageØ00__func__Ø000), unsafe.Pointer(str(12402)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XWal)(_pPager.X60) == nil && _pageInJournal(tls, _pPager, _pPg) == 0 && (_pPg.X5) <= (_pPager.X23) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51387), unsafe.Pointer((*int8)(unsafe.Pointer(&_subjournalPageØ00__func__Ø000))), unsafe.Pointer(str(12490)))
+ if (*XWal)(_pPager.XpWal) == nil && _pageInJournal(tls, _pPager, _pPg) == 0 && _pPg.Xpgno <= _pPager.XdbOrigSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51387), unsafe.Pointer(&_subjournalPageØ00__func__Ø000), unsafe.Pointer(str(12445)))
crt.X__builtin_abort(tls)
}
}()
_rc = _openSubJournal(tls, _pPager)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _13
}
- _2_pData = _pPg.X1
- _2_offset = int64(_pPager.X29) * int64(i32(4)+(_pPager.X48))
+ _2_pData = _pPg.XpData
+ _2_offset = int64(_pPager.XnSubRec) * int64(int32(4)+_pPager.XpageSize)
_2_pData2 = (*int8)(_2_pData)
- _rc = _write32bits(tls, (*Xsqlite3_file)(_pPager.X33), _2_offset, _pPg.X5)
- if _rc == i32(0) {
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X33), (unsafe.Pointer)(_2_pData2), _pPager.X48, _2_offset+int64(i32(4)))
+ _rc = _write32bits(tls, (*Xsqlite3_file)(_pPager.Xsjfd), _2_offset, _pPg.Xpgno)
+ if _rc == int32(0) {
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xsjfd), unsafe.Pointer(_2_pData2), _pPager.XpageSize, _2_offset+int64(4))
}
_13:
_0:
- if _rc == i32(0) {
- *(*uint32)(unsafe.Pointer(&(_pPager.X29))) += 1
+ if _rc == int32(0) {
+ _pPager.XnSubRec += 1
func() {
- if (_pPager.X38) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51415), unsafe.Pointer((*int8)(unsafe.Pointer(&_subjournalPageØ00__func__Ø000))), unsafe.Pointer(str(12572)))
+ if _pPager.XnSavepoint <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51415), unsafe.Pointer(&_subjournalPageØ00__func__Ø000), unsafe.Pointer(str(12527)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _addToSavepointBitvecs(tls, _pPager, _pPg.X5)
+ _rc = _addToSavepointBitvecs(tls, _pPager, _pPg.Xpgno)
}
return _rc
}
@@ -13343,87 +13473,100 @@ _0:
var _subjournalPageØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_subjournalPageØ00__func__Ø000[0], str(12593), 15)
+ crt.Xstrncpy(nil, &_subjournalPageØ00__func__Ø000[0], str(12548), 15)
}
-// Return true if the page is already in the journal file.
+// C comment
+// /*
+// ** Return true if the page is already in the journal file.
+// */
func _pageInJournal(tls *crt.TLS, _pPager *XPager, _pPg *XPgHdr) (r0 int32) {
- return _sqlite3BitvecTest(tls, (*XBitvec)(_pPager.X30), _pPg.X5)
+ return _sqlite3BitvecTest(tls, (*XBitvec)(_pPager.XpInJournal), _pPg.Xpgno)
}
func _sqlite3BitvecTest(tls *crt.TLS, _p *XBitvec, _i uint32) (r0 int32) {
return bool2int((_p != nil) && _sqlite3BitvecTestNotNull(tls, _p, _i) != 0)
}
-// Ensure that the sub-journal file is open. If it is already open, this
-// function is a no-op.
-//
-// SQLITE_OK is returned if everything goes according to plan. An
-// SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen()
-// fails.
+// C comment
+// /*
+// ** Ensure that the sub-journal file is open. If it is already open, this
+// ** function is a no-op.
+// **
+// ** SQLITE_OK is returned if everything goes according to plan. An
+// ** SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen()
+// ** fails.
+// */
func _openSubJournal(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc, _1_flags, _1_nStmtSpill int32
- _rc = i32(0)
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X33).X0) != nil {
+ _rc = int32(0)
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xsjfd).XpMethods) != nil {
goto _0
}
- _1_flags = i32(8222)
- _1_nStmtSpill = _sqlite3Config.X9
- if (int32(_pPager.X2) == i32(4)) || ((_pPager.X19) != 0) {
- _1_nStmtSpill = i32(-1)
+ _1_flags = int32(8222)
+ _1_nStmtSpill = _sqlite3Config.XnStmtSpill
+ if (int32(_pPager.XjournalMode) == int32(4)) || (_pPager.XsubjInMemory != 0) {
+ _1_nStmtSpill = int32(-1)
}
- _rc = _sqlite3JournalOpen(tls, (*Xsqlite3_vfs)(_pPager.X0), nil, (*Xsqlite3_file)(_pPager.X33), _1_flags, _1_nStmtSpill)
+ _rc = _sqlite3JournalOpen(tls, (*Xsqlite3_vfs)(_pPager.XpVfs), nil, (*Xsqlite3_file)(_pPager.Xsjfd), _1_flags, _1_nStmtSpill)
_0:
return _rc
}
-// Open a journal file.
-//
-// The behaviour of the journal file depends on the value of parameter
-// nSpill. If nSpill is 0, then the journal file is always create and
-// accessed using the underlying VFS. If nSpill is less than zero, then
-// all content is always stored in main-memory. Finally, if nSpill is a
-// positive value, then the journal file is initially created in-memory
-// but may be flushed to disk later on. In this case the journal file is
-// flushed to disk either when it grows larger than nSpill bytes in size,
-// or when sqlite3JournalCreate() is called.
+// C comment
+// /*
+// ** Open a journal file.
+// **
+// ** The behaviour of the journal file depends on the value of parameter
+// ** nSpill. If nSpill is 0, then the journal file is always create and
+// ** accessed using the underlying VFS. If nSpill is less than zero, then
+// ** all content is always stored in main-memory. Finally, if nSpill is a
+// ** positive value, then the journal file is initially created in-memory
+// ** but may be flushed to disk later on. In this case the journal file is
+// ** flushed to disk either when it grows larger than nSpill bytes in size,
+// ** or when sqlite3JournalCreate() is called.
+// */
func _sqlite3JournalOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zName *int8, _pJfd *Xsqlite3_file, _flags int32, _nSpill int32) (r0 int32) {
var _p *XMemJournal
_p = (*XMemJournal)(unsafe.Pointer(_pJfd))
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(56))
- if _nSpill == i32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(56))
+ if _nSpill == int32(0) {
return _sqlite3OsOpen(tls, _pVfs, _zName, _pJfd, _flags, nil)
}
- if _nSpill > i32(0) {
- *(*int32)(unsafe.Pointer(&(_p.X1))) = _nSpill
+ if _nSpill > int32(0) {
+ _p.XnChunkSize = _nSpill
goto _2
}
- *(*int32)(unsafe.Pointer(&(_p.X1))) = int32(u32(1020))
+ _p.XnChunkSize = int32(1020)
func() {
- if uint32(i32(1024)) != (u32(12) + uint32((_p.X1)-i32(8))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89134), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3JournalOpenØ00__func__Ø000))), unsafe.Pointer(str(12608)))
+ if uint32(1024) != (uint32(12) + uint32(_p.XnChunkSize-int32(8))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89134), unsafe.Pointer(&_sqlite3JournalOpenØ00__func__Ø000), unsafe.Pointer(str(12563)))
crt.X__builtin_abort(tls)
}
}()
_2:
- *(**Xsqlite3_io_methods)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = &_MemJournalMethods
- *(*int32)(unsafe.Pointer(&(_p.X2))) = _nSpill
- *(*int32)(unsafe.Pointer(&(_p.X7))) = _flags
- *(**int8)(unsafe.Pointer(&(_p.X9))) = _zName
- *(**Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X8))))) = _pVfs
- return i32(0)
-}
-
-// The next group of routines are convenience wrappers around the
-// VFS methods.
+ *(**Xsqlite3_io_methods)(unsafe.Pointer(&_p.XpMethod)) = &_MemJournalMethods
+ _p.XnSpill = _nSpill
+ _p.Xflags = _flags
+ _p.XzJournal = _zName
+ *(**Xsqlite3_vfs)(unsafe.Pointer(&_p.XpVfs)) = _pVfs
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** The next group of routines are convenience wrappers around the
+// ** VFS methods.
+// */
func _sqlite3OsOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zPath *int8, _pFile *Xsqlite3_file, _flags int32, _pFlagsOut *int32) (r0 int32) {
var _rc int32
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vfs, *int8, *Xsqlite3_file, int32, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32
- }{(_pVfs.X6)})))(tls, _pVfs, _zPath, _pFile, _flags&i32(556927), _pFlagsOut)
+ _rc = func() func(*crt.TLS, *Xsqlite3_vfs, *int8, *Xsqlite3_file, int32, *int32) int32 {
+ v := _pVfs.XxOpen
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, *int8, *Xsqlite3_file, int32, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _zPath, _pFile, _flags&int32(556927), _pFlagsOut)
func() {
- if _rc != i32(0) && (*Xsqlite3_io_methods)(_pFile.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(20292), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OsOpenØ00__func__Ø000))), unsafe.Pointer(str(12668)))
+ if _rc != int32(0) && (*Xsqlite3_io_methods)(_pFile.XpMethods) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(20292), unsafe.Pointer(&_sqlite3OsOpenØ00__func__Ø000), unsafe.Pointer(str(12623)))
crt.X__builtin_abort(tls)
}
}()
@@ -13433,59 +13576,72 @@ func _sqlite3OsOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zPath *int8, _pFile *Xsq
var _sqlite3OsOpenØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3OsOpenØ00__func__Ø000[0], str(12704), 14)
+ crt.Xstrncpy(nil, &_sqlite3OsOpenØ00__func__Ø000[0], str(12659), 14)
}
var _sqlite3JournalOpenØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3JournalOpenØ00__func__Ø000[0], str(12718), 19)
+ crt.Xstrncpy(nil, &_sqlite3JournalOpenØ00__func__Ø000[0], str(12673), 19)
}
+// C comment
+// /*
+// ** Table of methods for MemJournal sqlite3_file object.
+// */
var _MemJournalMethods Xsqlite3_io_methods
func init() {
- _MemJournalMethods = Xsqlite3_io_methods{X0: i32(1), X1: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ _MemJournalMethods = Xsqlite3_io_methods{XiVersion: int32(1), XxClose: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_memjrnlClose})), X2: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
+ }{_memjrnlClose})), XxRead: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32
- }{_memjrnlRead})), X3: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
+ }{_memjrnlRead})), XxWrite: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32
- }{_memjrnlWrite})), X4: *(*func(*crt.TLS, unsafe.Pointer, int64) int32)(unsafe.Pointer(&struct {
+ }{_memjrnlWrite})), XxTruncate: *(*func(*crt.TLS, unsafe.Pointer, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64) int32
- }{_memjrnlTruncate})), X5: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_memjrnlTruncate})), XxSync: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_memjrnlSync})), X6: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
+ }{_memjrnlSync})), XxFileSize: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, *int64) int32
- }{_memjrnlFileSize})), X7: nil, X8: nil, X9: nil, X10: nil, X11: nil, X12: nil, X13: nil, X14: nil, X15: nil, X16: nil, X17: nil, X18: nil}
+ }{_memjrnlFileSize}))}
}
-// Close the file.
+// C comment
+// /*
+// ** Close the file.
+// */
func _memjrnlClose(tls *crt.TLS, _pJfd *Xsqlite3_file) (r0 int32) {
var _p *XMemJournal
_p = (*XMemJournal)(unsafe.Pointer(_pJfd))
_memjrnlFreeChunks(tls, _p)
- return i32(0)
+ return int32(0)
}
-// Free the list of FileChunk structures headed at MemJournal.pFirst.
+// C comment
+// /*
+// ** Free the list of FileChunk structures headed at MemJournal.pFirst.
+// */
func _memjrnlFreeChunks(tls *crt.TLS, _p *XMemJournal) {
var _pIter, _pNext *XFileChunk
- _pIter = (*XFileChunk)(_p.X4)
+ _pIter = (*XFileChunk)(_p.XpFirst)
_0:
if _pIter == nil {
goto _3
}
- _pNext = (*XFileChunk)(_pIter.X0)
- Xsqlite3_free(tls, (unsafe.Pointer)(_pIter))
+ _pNext = (*XFileChunk)(_pIter.XpNext)
+ Xsqlite3_free(tls, unsafe.Pointer(_pIter))
_pIter = _pNext
goto _0
_3:
- *(**XFileChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))))) = nil
+ *(**XFileChunk)(unsafe.Pointer(&_p.XpFirst)) = nil
}
-// Read data from the in-memory journal file. This is the implementation
-// of the sqlite3_vfs.xRead method.
+// C comment
+// /*
+// ** Read data from the in-memory journal file. This is the implementation
+// ** of the sqlite3_vfs.xRead method.
+// */
func _memjrnlRead(tls *crt.TLS, _pJfd *Xsqlite3_file, _zBuf unsafe.Pointer, _iAmt int32, _iOfst int64) (r0 int32) {
var _nRead, _iChunkOffset, _4_iSpace, _4_nCopy int32
var _1_iOff int64
@@ -13496,94 +13652,85 @@ func _memjrnlRead(tls *crt.TLS, _pJfd *Xsqlite3_file, _zBuf unsafe.Pointer, _iAm
_zOut = (*uint8)(_zBuf)
_nRead = _iAmt
func() {
- if (int64(_iAmt) + _iOfst) > ((*t23)(unsafe.Pointer(&(_p.X5))).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88870), unsafe.Pointer((*int8)(unsafe.Pointer(&_memjrnlReadØ00__func__Ø000))), unsafe.Pointer(str(12737)))
+ if (int64(_iAmt) + _iOfst) > (_p.Xendpoint.XiOffset) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88870), unsafe.Pointer(&_memjrnlReadØ00__func__Ø000), unsafe.Pointer(str(12692)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*t23)(unsafe.Pointer(&(_p.X6))).X0) != int64(i32(0)) && (*XFileChunk)((*t23)(unsafe.Pointer(&(_p.X6))).X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88871), unsafe.Pointer((*int8)(unsafe.Pointer(&_memjrnlReadØ00__func__Ø000))), unsafe.Pointer(str(12771)))
+ if (_p.Xreadpoint.XiOffset) != (0) && (*XFileChunk)(_p.Xreadpoint.XpChunk) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88871), unsafe.Pointer(&_memjrnlReadØ00__func__Ø000), unsafe.Pointer(str(12726)))
crt.X__builtin_abort(tls)
}
}()
- if ((*t23)(unsafe.Pointer(&(_p.X6))).X0) == _iOfst && _iOfst != int64(i32(0)) {
+ if (_p.Xreadpoint.XiOffset) == _iOfst && _iOfst != (0) {
goto _6
}
- _1_iOff = i64(0)
- _pChunk = (*XFileChunk)(_p.X4)
+ _1_iOff = int64(0)
+ _pChunk = (*XFileChunk)(_p.XpFirst)
_7:
if func() int32 {
if _pChunk != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88875), unsafe.Pointer((*int8)(unsafe.Pointer(&_memjrnlReadØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88875), unsafe.Pointer(&_memjrnlReadØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() == 0 || (_1_iOff+int64(_p.X1)) > _iOfst {
+ }() == 0 || (_1_iOff+int64(_p.XnChunkSize)) > _iOfst {
goto _13
}
- {
- p := &_1_iOff
- *p = (*p) + int64(_p.X1)
- sink6(*p)
- }
- _pChunk = (*XFileChunk)(_pChunk.X0)
+ _1_iOff += int64(_p.XnChunkSize)
+ _pChunk = (*XFileChunk)(_pChunk.XpNext)
goto _7
_13:
goto _14
_6:
- _pChunk = (*XFileChunk)((*t23)(unsafe.Pointer(&(_p.X6))).X1)
+ _pChunk = (*XFileChunk)(_p.Xreadpoint.XpChunk)
func() {
if _pChunk == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88882), unsafe.Pointer((*int8)(unsafe.Pointer(&_memjrnlReadØ00__func__Ø000))), unsafe.Pointer(str(12821)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88882), unsafe.Pointer(&_memjrnlReadØ00__func__Ø000), unsafe.Pointer(str(12776)))
crt.X__builtin_abort(tls)
}
}()
_14:
- _iChunkOffset = int32(_iOfst % int64(_p.X1))
+ _iChunkOffset = int32(_iOfst % int64(_p.XnChunkSize))
_17:
- _4_iSpace = (_p.X1) - _iChunkOffset
+ _4_iSpace = _p.XnChunkSize - _iChunkOffset
_4_nCopy = func() int32 {
- if _nRead < ((_p.X1) - _iChunkOffset) {
+ if _nRead < (_p.XnChunkSize - _iChunkOffset) {
return _nRead
}
- return ((_p.X1) - _iChunkOffset)
+ return (_p.XnChunkSize - _iChunkOffset)
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zOut), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*[8]uint8)(unsafe.Pointer(&(_pChunk.X1)))))))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_iChunkOffset)))))))), uint32(_4_nCopy))
- {
- p := &_zOut
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_4_nCopy)))
- sink13(*p)
- }
- {
- p := &_nRead
- *p = (*p) - _4_iSpace
- sink1(*p)
- }
- _iChunkOffset = i32(0)
- if ((_nRead >= i32(0)) && (store24(&_pChunk, (*XFileChunk)(_pChunk.X0)) != nil)) && (_nRead > i32(0)) {
+ crt.Xmemcpy(tls, unsafe.Pointer(_zOut), unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_pChunk.XzChunk))+uintptr(_iChunkOffset)))), uint32(_4_nCopy))
+ *(*uintptr)(unsafe.Pointer(&_zOut)) += uintptr(_4_nCopy)
+ _nRead -= _4_iSpace
+ _iChunkOffset = int32(0)
+ if ((_nRead >= int32(0)) && (store33(&_pChunk, (*XFileChunk)(_pChunk.XpNext)) != nil)) && (_nRead > int32(0)) {
goto _17
}
- *(*int64)(unsafe.Pointer(&((*t23)(unsafe.Pointer(&(_p.X6))).X0))) = func() int64 {
+ _p.Xreadpoint.XiOffset = func() int64 {
if _pChunk != nil {
return (_iOfst + int64(_iAmt))
}
- return int64(i32(0))
+ return (0)
}()
- *(**XFileChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t23)(unsafe.Pointer(&(_p.X6))).X1))))) = _pChunk
- return i32(0)
+ *(**XFileChunk)(unsafe.Pointer(&(_p.Xreadpoint.XpChunk))) = _pChunk
+ return int32(0)
}
var _memjrnlReadØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_memjrnlReadØ00__func__Ø000[0], str(12831), 12)
+ crt.Xstrncpy(nil, &_memjrnlReadØ00__func__Ø000[0], str(12786), 12)
}
-// Write data to the file.
+// C comment
+// /*
+// ** Write data to the file.
+// */
func _memjrnlWrite(tls *crt.TLS, _pJfd *Xsqlite3_file, _zBuf unsafe.Pointer, _iAmt int32, _iOfst int64) (r0 int32) {
var _nWrite, _1_rc, _5_iChunkOffset, _5_iSpace int32
var _zWrite *uint8
@@ -13592,91 +13739,82 @@ func _memjrnlWrite(tls *crt.TLS, _pJfd *Xsqlite3_file, _zBuf unsafe.Pointer, _iA
_p = (*XMemJournal)(unsafe.Pointer(_pJfd))
_nWrite = _iAmt
_zWrite = (*uint8)(_zBuf)
- if (_p.X2) <= i32(0) || (int64(_iAmt)+_iOfst) <= int64(_p.X2) {
+ if _p.XnSpill <= int32(0) || (int64(_iAmt)+_iOfst) <= int64(_p.XnSpill) {
goto _1
}
_1_rc = _memjrnlCreateFile(tls, _p)
- if _1_rc == i32(0) {
+ if _1_rc == int32(0) {
_1_rc = _sqlite3OsWrite(tls, _pJfd, _zBuf, _iAmt, _iOfst)
}
return _1_rc
_1:
func() {
- if _iOfst != ((*t23)(unsafe.Pointer(&(_p.X5))).X0) && _iOfst != int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88982), unsafe.Pointer((*int8)(unsafe.Pointer(&_memjrnlWriteØ00__func__Ø000))), unsafe.Pointer(str(12843)))
+ if _iOfst != (_p.Xendpoint.XiOffset) && _iOfst != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88982), unsafe.Pointer(&_memjrnlWriteØ00__func__Ø000), unsafe.Pointer(str(12798)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iOfst <= int64(i32(0)) && (*XFileChunk)(_p.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88989), unsafe.Pointer((*int8)(unsafe.Pointer(&_memjrnlWriteØ00__func__Ø000))), unsafe.Pointer(str(12882)))
+ if _iOfst <= (0) && (*XFileChunk)(_p.XpFirst) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88989), unsafe.Pointer(&_memjrnlWriteØ00__func__Ø000), unsafe.Pointer(str(12837)))
crt.X__builtin_abort(tls)
}
}()
_10:
- if _nWrite <= i32(0) {
+ if _nWrite <= int32(0) {
goto _11
}
- _5_pChunk = (*XFileChunk)((*t23)(unsafe.Pointer(&(_p.X5))).X1)
- _5_iChunkOffset = int32(((*t23)(unsafe.Pointer(&(_p.X5))).X0) % int64(_p.X1))
+ _5_pChunk = (*XFileChunk)(_p.Xendpoint.XpChunk)
+ _5_iChunkOffset = int32((_p.Xendpoint.XiOffset) % int64(_p.XnChunkSize))
_5_iSpace = func() int32 {
- if _nWrite < ((_p.X1) - _5_iChunkOffset) {
+ if _nWrite < (_p.XnChunkSize - _5_iChunkOffset) {
return _nWrite
}
- return ((_p.X1) - _5_iChunkOffset)
+ return (_p.XnChunkSize - _5_iChunkOffset)
}()
- if _5_iChunkOffset != i32(0) {
+ if _5_iChunkOffset != int32(0) {
goto _14
}
- _6_pNew = (*XFileChunk)(Xsqlite3_malloc(tls, int32(u32(12)+uint32((_p.X1)-i32(8)))))
+ _6_pNew = (*XFileChunk)(Xsqlite3_malloc(tls, int32(uint32(12)+uint32(_p.XnChunkSize-int32(8)))))
if _6_pNew == nil {
- return _sqlite3IoerrnomemError(tls, i32(89001))
+ return _sqlite3IoerrnomemError(tls, int32(89001))
}
- *(**XFileChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_6_pNew.X0))))) = nil
+ *(**XFileChunk)(unsafe.Pointer(&_6_pNew.XpNext)) = nil
if _5_pChunk != nil {
func() {
- if (*XFileChunk)(_p.X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89005), unsafe.Pointer((*int8)(unsafe.Pointer(&_memjrnlWriteØ00__func__Ø000))), unsafe.Pointer(str(12906)))
+ if _p.XpFirst == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89005), unsafe.Pointer(&_memjrnlWriteØ00__func__Ø000), unsafe.Pointer(str(12861)))
crt.X__builtin_abort(tls)
}
}()
- *(**XFileChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_5_pChunk.X0))))) = _6_pNew
+ *(**XFileChunk)(unsafe.Pointer(&_5_pChunk.XpNext)) = _6_pNew
goto _19
}
func() {
- if (*XFileChunk)(_p.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89008), unsafe.Pointer((*int8)(unsafe.Pointer(&_memjrnlWriteØ00__func__Ø000))), unsafe.Pointer(str(12916)))
+ if _p.XpFirst != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89008), unsafe.Pointer(&_memjrnlWriteØ00__func__Ø000), unsafe.Pointer(str(12871)))
crt.X__builtin_abort(tls)
}
}()
- *(**XFileChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))))) = _6_pNew
+ *(**XFileChunk)(unsafe.Pointer(&_p.XpFirst)) = _6_pNew
_19:
- *(**XFileChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t23)(unsafe.Pointer(&(_p.X5))).X1))))) = _6_pNew
+ *(**XFileChunk)(unsafe.Pointer(&(_p.Xendpoint.XpChunk))) = _6_pNew
_14:
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*[8]uint8)(unsafe.Pointer(&((*XFileChunk)((*t23)(unsafe.Pointer(&(_p.X5))).X1).X1)))))))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_5_iChunkOffset)))))))), (unsafe.Pointer)(_zWrite), uint32(_5_iSpace))
- {
- p := &_zWrite
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_5_iSpace)))
- sink13(*p)
- }
- {
- p := &_nWrite
- *p = (*p) - _5_iSpace
- sink1(*p)
- }
- {
- p := (*int64)(unsafe.Pointer(&((*t23)(unsafe.Pointer(&(_p.X5))).X0)))
- *p = (*p) + int64(_5_iSpace)
- sink6(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&((*XFileChunk)(_p.Xendpoint.XpChunk).XzChunk)))+uintptr(_5_iChunkOffset)))), unsafe.Pointer(_zWrite), uint32(_5_iSpace))
+ *(*uintptr)(unsafe.Pointer(&_zWrite)) += uintptr(_5_iSpace)
+ _nWrite -= _5_iSpace
+ _p.Xendpoint.XiOffset += int64(_5_iSpace)
goto _10
_11:
- *(*int32)(unsafe.Pointer(&(_p.X3))) = int32(int64(_iAmt) + _iOfst)
- return i32(0)
+ _p.XnSize = int32(int64(_iAmt) + _iOfst)
+ return int32(0)
}
-// Flush the contents of memory to a real file on disk.
+// C comment
+// /*
+// ** Flush the contents of memory to a real file on disk.
+// */
func _memjrnlCreateFile(tls *crt.TLS, _p *XMemJournal) (r0 int32) {
var _rc, _1_nChunk int32
var _1_iOff int64
@@ -13685,38 +13823,34 @@ func _memjrnlCreateFile(tls *crt.TLS, _p *XMemJournal) (r0 int32) {
var _1_pIter *XFileChunk
_pReal = (*Xsqlite3_file)(unsafe.Pointer(_p))
_copy = *_p
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(56))
- _rc = _sqlite3OsOpen(tls, (*Xsqlite3_vfs)(_copy.X8), _copy.X9, _pReal, _copy.X7, nil)
- if _rc != i32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(56))
+ _rc = _sqlite3OsOpen(tls, (*Xsqlite3_vfs)(_copy.XpVfs), _copy.XzJournal, _pReal, _copy.Xflags, nil)
+ if _rc != int32(0) {
goto _0
}
- _1_nChunk = _copy.X1
- _1_iOff = i64(0)
- _1_pIter = (*XFileChunk)(_copy.X4)
+ _1_nChunk = _copy.XnChunkSize
+ _1_iOff = int64(0)
+ _1_pIter = (*XFileChunk)(_copy.XpFirst)
_1:
if _1_pIter == nil {
goto _4
}
- if (_1_iOff + int64(_1_nChunk)) > ((*t23)(unsafe.Pointer(&(_copy.X5))).X0) {
- _1_nChunk = int32(((*t23)(unsafe.Pointer(&(_copy.X5))).X0) - _1_iOff)
+ if (_1_iOff + int64(_1_nChunk)) > (_copy.Xendpoint.XiOffset) {
+ _1_nChunk = int32((_copy.Xendpoint.XiOffset) - _1_iOff)
}
- _rc = _sqlite3OsWrite(tls, _pReal, (unsafe.Pointer)((*[8]uint8)(unsafe.Pointer(&(_1_pIter.X1)))), _1_nChunk, _1_iOff)
+ _rc = _sqlite3OsWrite(tls, _pReal, unsafe.Pointer(&_1_pIter.XzChunk), _1_nChunk, _1_iOff)
if _rc != 0 {
goto _4
}
- {
- p := &_1_iOff
- *p = (*p) + int64(_1_nChunk)
- sink6(*p)
- }
- _1_pIter = (*XFileChunk)(_1_pIter.X0)
+ _1_iOff += int64(_1_nChunk)
+ _1_pIter = (*XFileChunk)(_1_pIter.XpNext)
goto _1
_4:
- if _rc == i32(0) {
+ if _rc == int32(0) {
_memjrnlFreeChunks(tls, &_copy)
}
_0:
- if _rc != i32(0) {
+ if _rc != int32(0) {
_sqlite3OsClose(tls, _pReal)
*_p = _copy
}
@@ -13724,140 +13858,159 @@ _0:
}
func _sqlite3OsWrite(tls *crt.TLS, _id *Xsqlite3_file, _pBuf unsafe.Pointer, _amt int32, _offset int64) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X3)})))(tls, _id, _pBuf, _amt, _offset)
-}
-
-// The following routines are convenience wrappers around methods
-// of the sqlite3_file object. This is mostly just syntactic sugar. All
-// of this would be completely automatic if SQLite were coded using
-// C++ instead of plain old C.
+ return func() func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxWrite
+ return *(*func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _pBuf, _amt, _offset)
+}
+
+// C comment
+// /*
+// ** The following routines are convenience wrappers around methods
+// ** of the sqlite3_file object. This is mostly just syntactic sugar. All
+// ** of this would be completely automatic if SQLite were coded using
+// ** C++ instead of plain old C.
+// */
func _sqlite3OsClose(tls *crt.TLS, _pId *Xsqlite3_file) {
- if (*Xsqlite3_io_methods)(_pId.X0) != nil {
- (*(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_io_methods)(_pId.X0).X1)})))(tls, _pId)
- *(**Xsqlite3_io_methods)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pId.X0))))) = nil
+ if _pId.XpMethods != nil {
+ func() func(*crt.TLS, *Xsqlite3_file) int32 {
+ v := (*Xsqlite3_io_methods)(_pId.XpMethods).XxClose
+ return *(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&v))
+ }()(tls, _pId)
+ *(**Xsqlite3_io_methods)(unsafe.Pointer(&_pId.XpMethods)) = nil
}
}
var _memjrnlWriteØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_memjrnlWriteØ00__func__Ø000[0], str(12927), 13)
+ crt.Xstrncpy(nil, &_memjrnlWriteØ00__func__Ø000[0], str(12882), 13)
}
-// This version of the memory allocation is for use by the application.
-// First make sure the memory subsystem is initialized, then do the
-// allocation.
+// C comment
+// /*
+// ** This version of the memory allocation is for use by the application.
+// ** First make sure the memory subsystem is initialized, then do the
+// ** allocation.
+// */
func Xsqlite3_malloc(tls *crt.TLS, _n int32) (r0 unsafe.Pointer) {
if Xsqlite3_initialize(tls) != 0 {
return nil
}
return func() unsafe.Pointer {
- if _n <= i32(0) {
- return unsafe.Pointer(nil)
+ if _n <= int32(0) {
+ return nil
}
return _sqlite3Malloc(tls, uint64(_n))
}()
}
func _sqlite3IoerrnomemError(tls *crt.TLS, _lineno int32) (r0 int32) {
- return _reportError(tls, i32(3082), _lineno, str(12940))
+ return _reportError(tls, int32(3082), _lineno, str(12895))
}
-// Truncate the file.
-//
-// If the journal file is already on disk, truncate it there. Or, if it
-// is still in main memory but is being truncated to zero bytes in size,
-// ignore
+// C comment
+// /*
+// ** Truncate the file.
+// **
+// ** If the journal file is already on disk, truncate it there. Or, if it
+// ** is still in main memory but is being truncated to zero bytes in size,
+// ** ignore
+// */
func _memjrnlTruncate(tls *crt.TLS, _pJfd *Xsqlite3_file, _size int64) (r0 int32) {
var _p *XMemJournal
_p = (*XMemJournal)(unsafe.Pointer(_pJfd))
if func() int32 {
- if _size == int64(i32(0)) {
- return i32(1)
+ if _size == (0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89035), unsafe.Pointer((*int8)(unsafe.Pointer(&_memjrnlTruncateØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89035), unsafe.Pointer(&_memjrnlTruncateØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
_memjrnlFreeChunks(tls, _p)
- *(*int32)(unsafe.Pointer(&(_p.X3))) = i32(0)
- *(**XFileChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t23)(unsafe.Pointer(&(_p.X5))).X1))))) = nil
- *(*int64)(unsafe.Pointer(&((*t23)(unsafe.Pointer(&(_p.X5))).X0))) = int64(i32(0))
- *(**XFileChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t23)(unsafe.Pointer(&(_p.X6))).X1))))) = nil
- *(*int64)(unsafe.Pointer(&((*t23)(unsafe.Pointer(&(_p.X6))).X0))) = int64(i32(0))
+ _p.XnSize = int32(0)
+ *(**XFileChunk)(unsafe.Pointer(&(_p.Xendpoint.XpChunk))) = nil
+ _p.Xendpoint.XiOffset = 0
+ *(**XFileChunk)(unsafe.Pointer(&(_p.Xreadpoint.XpChunk))) = nil
+ _p.Xreadpoint.XiOffset = 0
}
- return i32(0)
+ return int32(0)
}
var _memjrnlTruncateØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_memjrnlTruncateØ00__func__Ø000[0], str(12954), 16)
+ crt.Xstrncpy(nil, &_memjrnlTruncateØ00__func__Ø000[0], str(12909), 16)
}
-// Sync the file.
-//
-// If the real file has been created, call its xSync method. Otherwise,
-// syncing an in-memory journal is a no-op.
+// C comment
+// /*
+// ** Sync the file.
+// **
+// ** If the real file has been created, call its xSync method. Otherwise,
+// ** syncing an in-memory journal is a no-op.
+// */
func _memjrnlSync(tls *crt.TLS, _pJfd *Xsqlite3_file, _flags int32) (r0 int32) {
_ = _flags
- return i32(0)
+ return int32(0)
}
-// Query the size of the file in bytes.
+// C comment
+// /*
+// ** Query the size of the file in bytes.
+// */
func _memjrnlFileSize(tls *crt.TLS, _pJfd *Xsqlite3_file, _pSize *int64) (r0 int32) {
var _p *XMemJournal
_p = (*XMemJournal)(unsafe.Pointer(_pJfd))
- *_pSize = (*t23)(unsafe.Pointer(&(_p.X5))).X0
- return i32(0)
+ *_pSize = _p.Xendpoint.XiOffset
+ return int32(0)
}
-// Write a 32-bit integer into the given file descriptor. Return SQLITE_OK
-// on success or an error code is something goes wrong.
+// C comment
+// /*
+// ** Write a 32-bit integer into the given file descriptor. Return SQLITE_OK
+// ** on success or an error code is something goes wrong.
+// */
func _write32bits(tls *crt.TLS, _fd *Xsqlite3_file, _offset int64, _val uint32) (r0 int32) {
var _ac [4]int8
_sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(&_ac)))), _val)
- return _sqlite3OsWrite(tls, _fd, (unsafe.Pointer)(&_ac), i32(4), _offset)
+ return _sqlite3OsWrite(tls, _fd, unsafe.Pointer(&_ac), int32(4), _offset)
_ = _ac
panic(0)
}
func _sqlite3Put4byte(tls *crt.TLS, _p *uint8, _v uint32) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(0)))) = uint8(_v >> uint(i32(24)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(1)))) = uint8(_v >> uint(i32(16)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(2)))) = uint8(_v >> uint(i32(8)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(3)))) = uint8(_v)
-}
-
-// Set the bit number pgno in the PagerSavepoint.pInSavepoint
-// bitvecs of all open savepoints. Return SQLITE_OK if successful
-// or SQLITE_NOMEM if a malloc failure occurs.
+ *elem15(_p, 0) = uint8(_v >> 24)
+ *elem15(_p, uintptr(1)) = uint8(_v >> 16)
+ *elem15(_p, uintptr(2)) = uint8(_v >> 8)
+ *elem15(_p, uintptr(3)) = uint8(_v)
+}
+
+// C comment
+// /*
+// ** Set the bit number pgno in the PagerSavepoint.pInSavepoint
+// ** bitvecs of all open savepoints. Return SQLITE_OK if successful
+// ** or SQLITE_NOMEM if a malloc failure occurs.
+// */
func _addToSavepointBitvecs(tls *crt.TLS, _pPager *XPager, _pgno uint32) (r0 int32) {
var _ii, _rc int32
var _1_p *XPagerSavepoint
- _rc = i32(0)
- _ii = i32(0)
+ _rc = int32(0)
+ _ii = int32(0)
_0:
- if _ii >= (_pPager.X38) {
+ if _ii >= _pPager.XnSavepoint {
goto _3
}
- _1_p = (*XPagerSavepoint)(unsafe.Pointer(uintptr(_pPager.X37) + 44*uintptr(_ii)))
- if _pgno <= (_1_p.X3) {
- {
- p := &_rc
- *p = (*p) | _sqlite3BitvecSet(tls, (*XBitvec)(_1_p.X2), _pgno)
- sink1(*p)
- }
+ _1_p = elem31((*XPagerSavepoint)(_pPager.XaSavepoint), uintptr(_ii))
+ if _pgno <= _1_p.XnOrig {
+ _rc |= _sqlite3BitvecSet(tls, (*XBitvec)(_1_p.XpInSavepoint), _pgno)
func() {
- if _rc != i32(0) && _rc != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48693), unsafe.Pointer((*int8)(unsafe.Pointer(&_addToSavepointBitvecsØ00__func__Ø000))), unsafe.Pointer(str(5805)))
+ if _rc != int32(0) && _rc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48693), unsafe.Pointer(&_addToSavepointBitvecsØ00__func__Ø000), unsafe.Pointer(str(5706)))
crt.X__builtin_abort(tls)
}
}()
@@ -13868,131 +14021,132 @@ _3:
return _rc
}
-// Set the i-th bit. Return 0 on success and an error code if
-// anything goes wrong.
-//
-// This routine might cause sub-bitmaps to be allocated. Failing
-// to get the memory needed to hold the sub-bitmap is the only
-// that can go wrong with an insert, assuming p and i are valid.
-//
-// The calling function must ensure that p is a valid Bitvec object
-// and that the value for "i" is within range of the Bitvec object.
-// Otherwise the behavior is undefined.
+// C comment
+// /*
+// ** Set the i-th bit. Return 0 on success and an error code if
+// ** anything goes wrong.
+// **
+// ** This routine might cause sub-bitmaps to be allocated. Failing
+// ** to get the memory needed to hold the sub-bitmap is the only
+// ** that can go wrong with an insert, assuming p and i are valid.
+// **
+// ** The calling function must ensure that p is a valid Bitvec object
+// ** and that the value for "i" is within range of the Bitvec object.
+// ** Otherwise the behavior is undefined.
+// */
func _sqlite3BitvecSet(tls *crt.TLS, _p *XBitvec, _i uint32) (r0 int32) {
var _8_rc int32
var _h, _1_bin, _8_j uint32
var _8_aiValues *uint32
if _p == nil {
- return i32(0)
+ return int32(0)
}
func() {
- if _i <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(43881), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BitvecSetØ00__func__Ø000))), unsafe.Pointer(str(12970)))
+ if _i <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(43881), unsafe.Pointer(&_sqlite3BitvecSetØ00__func__Ø000), unsafe.Pointer(str(12925)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _i > (_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(43882), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BitvecSetØ00__func__Ø000))), unsafe.Pointer(str(12974)))
+ if _i > _p.XiSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(43882), unsafe.Pointer(&_sqlite3BitvecSetØ00__func__Ø000), unsafe.Pointer(str(12929)))
crt.X__builtin_abort(tls)
}
}()
_i -= 1
_5:
- if (_p.X0) <= u32(4000) || (_p.X2) == 0 {
+ if _p.XiSize <= uint32(4000) || _p.XiDivisor == 0 {
goto _6
}
- _1_bin = _i / (_p.X2)
- _i = _i % (_p.X2)
- if (*(**XBitvec)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]unsafe.Pointer)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_1_bin)))) != nil {
+ _1_bin = _i / _p.XiDivisor
+ _i = _i % _p.XiDivisor
+ if (*elem32((**XBitvec)(unsafe.Pointer((*[125]unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))), uintptr(_1_bin))) != nil {
goto _8
}
- *(**XBitvec)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]unsafe.Pointer)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_1_bin))) = _sqlite3BitvecCreate(tls, _p.X2)
- if (*(**XBitvec)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]unsafe.Pointer)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_1_bin)))) == nil {
- return _sqlite3NomemError(tls, i32(43889))
+ *elem32((**XBitvec)(unsafe.Pointer((*[125]unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))), uintptr(_1_bin)) = _sqlite3BitvecCreate(tls, _p.XiDivisor)
+ if (*elem32((**XBitvec)(unsafe.Pointer((*[125]unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))), uintptr(_1_bin))) == nil {
+ return _sqlite3NomemError(tls, int32(43889))
}
_8:
- _p = *(**XBitvec)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]unsafe.Pointer)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_1_bin)))
+ _p = *elem32((**XBitvec)(unsafe.Pointer((*[125]unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))), uintptr(_1_bin))
goto _5
_6:
- if (_p.X0) <= u32(4000) {
+ if _p.XiSize <= uint32(4000) {
{
- p := (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[500]uint8)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 1*uintptr(_i/uint32(i32(8)))))
- *p = uint8(int32(*p) | (i32(1) << uint(int32(_i&uint32(i32(7))))))
- sink2(*p)
+ p := elem15((*uint8)(unsafe.Pointer((*[500]uint8)(unsafe.Pointer(&_p.Xu)))), uintptr(_i/uint32(8)))
+ *p = uint8(int32(*p) | (int32(1) << uint(int32(_i&uint32(7)))))
}
- return i32(0)
+ return int32(0)
}
- _h = (postInc5(&_i, uint32(1)) * uint32(i32(1))) % u32(125)
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_h)))) != 0 {
+ _h = (postInc23(&_i, uint32(1)) * uint32(1)) % uint32(125)
+ if (*elem7((*uint32)(unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu)))), uintptr(_h))) != 0 {
goto _11
}
- if (_p.X1) < u32(124) {
+ if _p.XnSet < uint32(124) {
goto _bitvec_set_end
}
goto _bitvec_set_rehash
_11:
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_h)))) == _i {
- return i32(0)
+ if (*elem7((*uint32)(unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu)))), uintptr(_h))) == _i {
+ return int32(0)
}
_h += 1
- if _h >= u32(125) {
- _h = uint32(i32(0))
+ if _h >= uint32(125) {
+ _h = 0
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_h)))) != 0 {
+ if (*elem7((*uint32)(unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu)))), uintptr(_h))) != 0 {
goto _11
}
_bitvec_set_rehash:
- if (_p.X1) < u32(62) {
+ if _p.XnSet < uint32(62) {
goto _bitvec_set_end
}
- _8_aiValues = (*uint32)(_sqlite3DbMallocRaw(tls, nil, uint64(u32(500))))
+ _8_aiValues = (*uint32)(_sqlite3DbMallocRaw(tls, nil, uint64(500)))
if _8_aiValues == nil {
- return _sqlite3NomemError(tls, i32(43924))
+ return _sqlite3NomemError(tls, int32(43924))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_8_aiValues), (unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3)))))), u32(500))
- crt.Xmemset(tls, (unsafe.Pointer)((*[125]unsafe.Pointer)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3)))))), i32(0), u32(500))
- *(*uint32)(unsafe.Pointer(&(_p.X2))) = (((_p.X0) + u32(125)) - uint32(i32(1))) / u32(125)
+ crt.Xmemcpy(tls, unsafe.Pointer(_8_aiValues), unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu))), uint32(500))
+ crt.Xmemset(tls, unsafe.Pointer((*[125]unsafe.Pointer)(unsafe.Pointer(&_p.Xu))), int32(0), uint32(500))
+ _p.XiDivisor = ((_p.XiSize + uint32(125)) - uint32(1)) / uint32(125)
_8_rc = _sqlite3BitvecSet(tls, _p, _i)
- _8_j = uint32(i32(0))
+ _8_j = 0
_20:
- if _8_j >= u32(125) {
+ if _8_j >= uint32(125) {
goto _23
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_aiValues)) + 4*uintptr(_8_j)))) != 0 {
- {
- p := &_8_rc
- *p = (*p) | _sqlite3BitvecSet(tls, _p, *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_aiValues)) + 4*uintptr(_8_j))))
- sink1(*p)
- }
+ if (*elem7(_8_aiValues, uintptr(_8_j))) != 0 {
+ _8_rc |= _sqlite3BitvecSet(tls, _p, *elem7(_8_aiValues, uintptr(_8_j)))
}
_8_j += 1
goto _20
_23:
- _sqlite3DbFree(tls, nil, (unsafe.Pointer)(_8_aiValues))
+ _sqlite3DbFree(tls, nil, unsafe.Pointer(_8_aiValues))
return _8_rc
_bitvec_set_end:
- *(*uint32)(unsafe.Pointer(&(_p.X1))) += 1
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_h))) = _i
- return i32(0)
+ _p.XnSet += 1
+ *elem7((*uint32)(unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu)))), uintptr(_h)) = _i
+ return int32(0)
}
var _sqlite3BitvecSetØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BitvecSetØ00__func__Ø000[0], str(12986), 17)
+ crt.Xstrncpy(nil, &_sqlite3BitvecSetØ00__func__Ø000[0], str(12941), 17)
}
-// Create a new bitmap object able to handle bits between 0 and iSize,
-// inclusive. Return a pointer to the new object. Return NULL if
-// malloc fails.
+// C comment
+// /*
+// ** Create a new bitmap object able to handle bits between 0 and iSize,
+// ** inclusive. Return a pointer to the new object. Return NULL if
+// ** malloc fails.
+// */
func _sqlite3BitvecCreate(tls *crt.TLS, _iSize uint32) (r0 *XBitvec) {
var _p *XBitvec
- i32(0)
- _p = (*XBitvec)(_sqlite3MallocZero(tls, uint64(u32(512))))
+
+ _p = (*XBitvec)(_sqlite3MallocZero(tls, uint64(512)))
if _p != nil {
- *(*uint32)(unsafe.Pointer(&(_p.X0))) = _iSize
+ _p.XiSize = _iSize
}
return _p
}
@@ -14000,121 +14154,123 @@ func _sqlite3BitvecCreate(tls *crt.TLS, _iSize uint32) (r0 *XBitvec) {
var _addToSavepointBitvecsØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_addToSavepointBitvecsØ00__func__Ø000[0], str(13003), 22)
+ crt.Xstrncpy(nil, &_addToSavepointBitvecsØ00__func__Ø000[0], str(12958), 22)
}
-// This is a variant of sqlite3PagerWrite() that runs when the sector size
-// is larger than the page size. SQLite makes the (reasonable) assumption that
-// all bytes of a sector are written together by hardware. Hence, all bytes of
-// a sector need to be journalled in case of a power loss in the middle of
-// a write.
-//
-// Usually, the sector size is less than or equal to the page size, in which
-// case pages can be individually written. This routine only runs in the
-// exceptional case where the page size is smaller than the sector size.
+// C comment
+// /*
+// ** This is a variant of sqlite3PagerWrite() that runs when the sector size
+// ** is larger than the page size. SQLite makes the (reasonable) assumption that
+// ** all bytes of a sector are written together by hardware. Hence, all bytes of
+// ** a sector need to be journalled in case of a power loss in the middle of
+// ** a write.
+// **
+// ** Usually, the sector size is less than or equal to the page size, in which
+// ** case pages can be individually written. This routine only runs in the
+// ** exceptional case where the page size is smaller than the sector size.
+// */
func _pagerWriteLargeSector(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
var _rc, _nPage, _ii, _needSync int32
var _nPageCount, _pg1, _nPagePerSector, _4_pg uint32
var _pPager *XPager
var _4_pPage, _12_pPage *XPgHdr
- _rc = i32(0)
- _nPage = i32(0)
- _needSync = i32(0)
- _pPager = (*XPager)(_pPg.X4)
- _nPagePerSector = (_pPager.X47) / uint32(_pPager.X48)
+ _rc = int32(0)
+ _nPage = int32(0)
+ _needSync = int32(0)
+ _pPager = (*XPager)(_pPg.XpPager)
+ _nPagePerSector = _pPager.XsectorSize / uint32(_pPager.XpageSize)
func() {
- if (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52907), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000))), unsafe.Pointer(str(11747)))
+ if _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52907), unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000), unsafe.Pointer(str(11702)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pPager.X18) & i32(4)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52908), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000))), unsafe.Pointer(str(13025)))
+ if (int32(_pPager.XdoNotSpill) & int32(4)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52908), unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000), unsafe.Pointer(str(12980)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint8)(unsafe.Pointer(&(_pPager.X18)))
- *p = uint8(int32(*p) | i32(4))
- sink2(*p)
- }
- _pg1 = (((_pPg.X5) - uint32(i32(1))) & (^(_nPagePerSector - uint32(i32(1))))) + uint32(i32(1))
- _nPageCount = _pPager.X22
- if (_pPg.X5) > _nPageCount {
- _nPage = int32(((_pPg.X5) - _pg1) + uint32(i32(1)))
+ p := &_pPager.XdoNotSpill
+ *p = uint8(int32(*p) | int32(4))
+ }
+ _pg1 = ((_pPg.Xpgno - uint32(1)) & (^(_nPagePerSector - uint32(1)))) + uint32(1)
+ _nPageCount = _pPager.XdbSize
+ if _pPg.Xpgno > _nPageCount {
+ _nPage = int32((_pPg.Xpgno - _pg1) + uint32(1))
goto _7
}
- if ((_pg1 + _nPagePerSector) - uint32(i32(1))) > _nPageCount {
- _nPage = int32((_nPageCount + uint32(i32(1))) - _pg1)
+ if ((_pg1 + _nPagePerSector) - uint32(1)) > _nPageCount {
+ _nPage = int32((_nPageCount + uint32(1)) - _pg1)
goto _7
}
_nPage = int32(_nPagePerSector)
_7:
func() {
- if _nPage <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52925), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000))), unsafe.Pointer(str(13068)))
+ if _nPage <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52925), unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000), unsafe.Pointer(str(13023)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pg1 > (_pPg.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52926), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000))), unsafe.Pointer(str(13076)))
+ if _pg1 > _pPg.Xpgno {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52926), unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000), unsafe.Pointer(str(13031)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pg1 + uint32(_nPage)) <= (_pPg.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52927), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000))), unsafe.Pointer(str(13091)))
+ if (_pg1 + uint32(_nPage)) <= _pPg.Xpgno {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52927), unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000), unsafe.Pointer(str(13046)))
crt.X__builtin_abort(tls)
}
}()
- _ii = i32(0)
+ _ii = int32(0)
_14:
- if _ii >= _nPage || _rc != i32(0) {
+ if _ii >= _nPage || _rc != int32(0) {
goto _18
}
_4_pg = _pg1 + uint32(_ii)
- if _4_pg != (_pPg.X5) && _sqlite3BitvecTest(tls, (*XBitvec)(_pPager.X30), _4_pg) != 0 {
+ if _4_pg != _pPg.Xpgno && _sqlite3BitvecTest(tls, (*XBitvec)(_pPager.XpInJournal), _4_pg) != 0 {
goto _20
}
- if _4_pg == uint32((_sqlite3PendingByte/(_pPager.X48))+i32(1)) {
+ if _4_pg == uint32((_sqlite3PendingByte/_pPager.XpageSize)+int32(1)) {
goto _21
}
- _rc = _sqlite3PagerGet(tls, _pPager, _4_pg, &_4_pPage, i32(0))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerGet(tls, _pPager, _4_pg, &_4_pPage, int32(0))
+ if _rc != int32(0) {
goto _22
}
_rc = _pager_write(tls, _4_pPage)
- if (int32(_4_pPage.X6) & i32(8)) != 0 {
- _needSync = i32(1)
+ if (int32(_4_pPage.Xflags) & int32(8)) != 0 {
+ _needSync = int32(1)
}
_sqlite3PagerUnrefNotNull(tls, _4_pPage)
_22:
_21:
goto _25
_20:
- if store25(&_4_pPage, _sqlite3PagerLookup(tls, _pPager, _4_pg)) == nil {
+ if store34(&_4_pPage, _sqlite3PagerLookup(tls, _pPager, _4_pg)) == nil {
goto _25
}
- if (int32(_4_pPage.X6) & i32(8)) != 0 {
- _needSync = i32(1)
+ if (int32(_4_pPage.Xflags) & int32(8)) != 0 {
+ _needSync = int32(1)
}
_sqlite3PagerUnrefNotNull(tls, _4_pPage)
_25:
_ii += 1
goto _14
_18:
- if _rc != i32(0) || _needSync == 0 {
+ if _rc != int32(0) || _needSync == 0 {
goto _28
}
func() {
- if (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52958), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000))), unsafe.Pointer(str(11747)))
+ if _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52958), unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000), unsafe.Pointer(str(11702)))
crt.X__builtin_abort(tls)
}
}()
- _ii = i32(0)
+ _ii = int32(0)
_31:
if _ii >= _nPage {
goto _34
@@ -14122,9 +14278,8 @@ _31:
_12_pPage = _sqlite3PagerLookup(tls, _pPager, _pg1+uint32(_ii))
if _12_pPage != nil {
{
- p := (*uint16)(unsafe.Pointer(&(_12_pPage.X6)))
- *p = uint16(int32(*p) | i32(8))
- sink14(*p)
+ p := &_12_pPage.Xflags
+ *p = uint16(int32(*p) | int32(8))
}
_sqlite3PagerUnrefNotNull(tls, _12_pPage)
}
@@ -14133,15 +14288,14 @@ _31:
_34:
_28:
func() {
- if (int32(_pPager.X18) & i32(4)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52968), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000))), unsafe.Pointer(str(13113)))
+ if (int32(_pPager.XdoNotSpill) & int32(4)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52968), unsafe.Pointer(&_pagerWriteLargeSectorØ00__func__Ø000), unsafe.Pointer(str(13068)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint8)(unsafe.Pointer(&(_pPager.X18)))
- *p = uint8(int32(*p) & i32(-5))
- sink2(*p)
+ p := &_pPager.XdoNotSpill
+ *p = uint8(int32(*p) & int32(-5))
}
return _rc
}
@@ -14149,120 +14303,124 @@ _28:
var _pagerWriteLargeSectorØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_pagerWriteLargeSectorØ00__func__Ø000[0], str(13156), 22)
+ crt.Xstrncpy(nil, &_pagerWriteLargeSectorØ00__func__Ø000[0], str(13111), 22)
}
var _sqlite3PendingByte int32
func init() {
- _sqlite3PendingByte = i32(1073741824)
+ _sqlite3PendingByte = int32(1073741824)
}
-// Dispatch all page fetch requests to the appropriate getter method.
+// C comment
+// /* Dispatch all page fetch requests to the appropriate getter method.
+// */
func _sqlite3PagerGet(tls *crt.TLS, _pPager *XPager, _pgno uint32, _ppPage **XPgHdr, _flags int32) (r0 int32) {
- return (*(*func(*crt.TLS, *XPager, uint32, **XPgHdr, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, uint32, *unsafe.Pointer, int32) int32
- }{(_pPager.X57)})))(tls, _pPager, _pgno, _ppPage, _flags)
-}
-
-// Mark a single data page as writeable. The page is written into the
-// main journal or sub-journal as required. If the page is written into
-// one of the journals, the corresponding bit is set in the
-// Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs
-// of any open savepoints as appropriate.
+ return func() func(*crt.TLS, *XPager, uint32, **XPgHdr, int32) int32 {
+ v := _pPager.XxGet
+ return *(*func(*crt.TLS, *XPager, uint32, **XPgHdr, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pPager, _pgno, _ppPage, _flags)
+}
+
+// C comment
+// /*
+// ** Mark a single data page as writeable. The page is written into the
+// ** main journal or sub-journal as required. If the page is written into
+// ** one of the journals, the corresponding bit is set in the
+// ** Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs
+// ** of any open savepoints as appropriate.
+// */
func _pager_write(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
var _rc int32
var _pPager *XPager
- _pPager = (*XPager)(_pPg.X4)
- _rc = i32(0)
+ _pPager = (*XPager)(_pPg.XpPager)
+ _rc = int32(0)
func() {
- if int32(_pPager.X14) != i32(2) && int32(_pPager.X14) != i32(3) && int32(_pPager.X14) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52809), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_writeØ00__func__Ø000))), unsafe.Pointer(str(13178)))
+ if int32(_pPager.XeState) != int32(2) && int32(_pPager.XeState) != int32(3) && int32(_pPager.XeState) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52809), unsafe.Pointer(&_pager_writeØ00__func__Ø000), unsafe.Pointer(str(13133)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52813), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_writeØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52813), unsafe.Pointer(&_pager_writeØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52814), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_writeØ00__func__Ø000))), unsafe.Pointer(str(13293)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52814), unsafe.Pointer(&_pager_writeØ00__func__Ø000), unsafe.Pointer(str(13248)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52815), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_writeØ00__func__Ø000))), unsafe.Pointer(str(13312)))
+ if int32(_pPager.XreadOnly) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52815), unsafe.Pointer(&_pager_writeØ00__func__Ø000), unsafe.Pointer(str(13267)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pPager.X14) != i32(2) {
+ if int32(_pPager.XeState) != int32(2) {
goto _10
}
_rc = _pager_open_journal(tls, _pPager)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
_10:
func() {
- if int32(_pPager.X14) < i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52831), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_writeØ00__func__Ø000))), unsafe.Pointer(str(13332)))
+ if int32(_pPager.XeState) < int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52831), unsafe.Pointer(&_pager_writeØ00__func__Ø000), unsafe.Pointer(str(13287)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52832), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_writeØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52832), unsafe.Pointer(&_pager_writeØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3PcacheMakeDirty(tls, _pPg)
func() {
- if ((*XBitvec)(_pPager.X30) != nil) != ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52841), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_writeØ00__func__Ø000))), unsafe.Pointer(str(13370)))
+ if ((*XBitvec)(_pPager.XpInJournal) != nil) != ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52841), unsafe.Pointer(&_pager_writeØ00__func__Ø000), unsafe.Pointer(str(13325)))
crt.X__builtin_abort(tls)
}
}()
- if (*XBitvec)(_pPager.X30) == nil || _sqlite3BitvecTestNotNull(tls, (*XBitvec)(_pPager.X30), _pPg.X5) != i32(0) {
+ if (*XBitvec)(_pPager.XpInJournal) == nil || _sqlite3BitvecTestNotNull(tls, (*XBitvec)(_pPager.XpInJournal), _pPg.Xpgno) != int32(0) {
goto _19
}
func() {
- if bool2int((*XWal)(_pPager.X60) != nil) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52845), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_writeØ00__func__Ø000))), unsafe.Pointer(str(13417)))
+ if bool2int((*XWal)(_pPager.XpWal) != nil) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52845), unsafe.Pointer(&_pager_writeØ00__func__Ø000), unsafe.Pointer(str(13372)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPg.X5) > (_pPager.X23) {
+ if _pPg.Xpgno > _pPager.XdbOrigSize {
goto _22
}
_rc = _pagerAddPageToRollbackJournal(tls, _pPg)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
goto _24
_22:
- if int32(_pPager.X14) != i32(4) {
+ if int32(_pPager.XeState) != int32(4) {
{
- p := (*uint16)(unsafe.Pointer(&(_pPg.X6)))
- *p = uint16(int32(*p) | i32(8))
- sink14(*p)
+ p := &_pPg.Xflags
+ *p = uint16(int32(*p) | int32(8))
}
}
_24:
_19:
{
- p := (*uint16)(unsafe.Pointer(&(_pPg.X6)))
- *p = uint16(int32(*p) | i32(4))
- sink14(*p)
+ p := &_pPg.Xflags
+ *p = uint16(int32(*p) | int32(4))
}
- if (_pPager.X38) > i32(0) {
+ if _pPager.XnSavepoint > int32(0) {
_rc = _subjournalPageIfRequired(tls, _pPg)
}
- if (_pPager.X22) < (_pPg.X5) {
- *(*uint32)(unsafe.Pointer(&(_pPager.X22))) = _pPg.X5
+ if _pPager.XdbSize < _pPg.Xpgno {
+ _pPager.XdbSize = _pPg.Xpgno
}
return _rc
}
@@ -14270,127 +14428,122 @@ _19:
var _pager_writeØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_pager_writeØ00__func__Ø000[0], str(13440), 12)
-}
-
-// This function is called at the start of every write transaction.
-// There must already be a RESERVED or EXCLUSIVE lock on the database
-// file when this routine is called.
-//
-// Open the journal file for pager pPager and write a journal header
-// to the start of it. If there are active savepoints, open the sub-journal
-// as well. This function is only used when the journal file is being
-// opened to write a rollback log for a transaction. It is not used
-// when opening a hot journal file to roll it back.
-//
-// If the journal file is already open (as it may be in exclusive mode),
-// then this function just writes a journal header to the start of the
-// already open file.
-//
-// Whether or not the journal file is opened by this function, the
-// Pager.pInJournal bitvec structure is allocated.
-//
-// Return SQLITE_OK if everything is successful. Otherwise, return
-// SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or
-// an IO error code if opening or writing the journal file fails.
+ crt.Xstrncpy(nil, &_pager_writeØ00__func__Ø000[0], str(13395), 12)
+}
+
+// C comment
+// /*
+// ** This function is called at the start of every write transaction.
+// ** There must already be a RESERVED or EXCLUSIVE lock on the database
+// ** file when this routine is called.
+// **
+// ** Open the journal file for pager pPager and write a journal header
+// ** to the start of it. If there are active savepoints, open the sub-journal
+// ** as well. This function is only used when the journal file is being
+// ** opened to write a rollback log for a transaction. It is not used
+// ** when opening a hot journal file to roll it back.
+// **
+// ** If the journal file is already open (as it may be in exclusive mode),
+// ** then this function just writes a journal header to the start of the
+// ** already open file.
+// **
+// ** Whether or not the journal file is opened by this function, the
+// ** Pager.pInJournal bitvec structure is allocated.
+// **
+// ** Return SQLITE_OK if everything is successful. Otherwise, return
+// ** SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or
+// ** an IO error code if opening or writing the journal file fails.
+// */
func _pager_open_journal(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc, _5_flags, _5_nSpill int32
var _pVfs *Xsqlite3_vfs
- _rc = i32(0)
- _pVfs = (*Xsqlite3_vfs)(_pPager.X0)
+ _rc = int32(0)
+ _pVfs = (*Xsqlite3_vfs)(_pPager.XpVfs)
func() {
- if int32(_pPager.X14) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52590), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_open_journalØ00__func__Ø000))), unsafe.Pointer(str(13452)))
+ if int32(_pPager.XeState) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52590), unsafe.Pointer(&_pager_open_journalØ00__func__Ø000), unsafe.Pointer(str(13407)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52591), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_open_journalØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52591), unsafe.Pointer(&_pager_open_journalØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBitvec)(_pPager.X30) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52592), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_open_journalØ00__func__Ø000))), unsafe.Pointer(str(13488)))
+ if (*XBitvec)(_pPager.XpInJournal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52592), unsafe.Pointer(&_pager_open_journalØ00__func__Ø000), unsafe.Pointer(str(13443)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
- if (_pPager.X26) != 0 {
+ if _pPager.XerrCode != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52597), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_open_journalØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52597), unsafe.Pointer(&_pager_open_journalØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return _pPager.X26
+ return _pPager.XerrCode
}
- if (*XWal)(_pPager.X60) != nil || int32(_pPager.X2) == i32(2) {
+ if (*XWal)(_pPager.XpWal) != nil || int32(_pPager.XjournalMode) == int32(2) {
goto _10
}
- *(**XBitvec)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X30))))) = _sqlite3BitvecCreate(tls, _pPager.X22)
- if (*XBitvec)(_pPager.X30) == nil {
- return _sqlite3NomemError(tls, i32(52602))
+ *(**XBitvec)(unsafe.Pointer(&_pPager.XpInJournal)) = _sqlite3BitvecCreate(tls, _pPager.XdbSize)
+ if (*XBitvec)(_pPager.XpInJournal) == nil {
+ return _sqlite3NomemError(tls, int32(52602))
}
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil {
goto _12
}
- if int32(_pPager.X2) == i32(4) {
- _sqlite3MemJournalOpen(tls, (*Xsqlite3_file)(_pPager.X32))
+ if int32(_pPager.XjournalMode) == int32(4) {
+ _sqlite3MemJournalOpen(tls, (*Xsqlite3_file)(_pPager.Xjfd))
goto _14
}
- _5_flags = i32(6)
- if (_pPager.X10) != 0 {
- {
- p := &_5_flags
- *p = (*p) | i32(4104)
- sink1(*p)
- }
- _5_nSpill = _sqlite3Config.X9
+ _5_flags = int32(6)
+ if _pPager.XtempFile != 0 {
+ _5_flags |= int32(4104)
+ _5_nSpill = _sqlite3Config.XnStmtSpill
goto _16
}
- {
- p := &_5_flags
- *p = (*p) | i32(2048)
- sink1(*p)
- }
- _5_nSpill = i32(0)
+ _5_flags |= int32(2048)
+ _5_nSpill = int32(0)
_16:
_rc = _databaseIsUnmoved(tls, _pPager)
- if _rc == i32(0) {
- _rc = _sqlite3JournalOpen(tls, _pVfs, _pPager.X52, (*Xsqlite3_file)(_pPager.X32), _5_flags, _5_nSpill)
+ if _rc == int32(0) {
+ _rc = _sqlite3JournalOpen(tls, _pVfs, _pPager.XzJournal, (*Xsqlite3_file)(_pPager.Xjfd), _5_flags, _5_nSpill)
}
_14:
func() {
- if _rc == i32(0) && (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52630), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_open_journalØ00__func__Ø000))), unsafe.Pointer(str(13510)))
+ if _rc == int32(0) && (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52630), unsafe.Pointer(&_pager_open_journalØ00__func__Ø000), unsafe.Pointer(str(13465)))
crt.X__builtin_abort(tls)
}
}()
_12:
- if _rc == i32(0) {
- *(*int32)(unsafe.Pointer(&(_pPager.X27))) = i32(0)
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = int64(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pPager.X17))) = uint8(i32(0))
- *(*int64)(unsafe.Pointer(&(_pPager.X35))) = int64(i32(0))
+ if _rc == int32(0) {
+ _pPager.XnRec = int32(0)
+ _pPager.XjournalOff = 0
+ _pPager.XsetMaster = 0
+ _pPager.XjournalHdr = 0
_rc = _writeJournalHdr(tls, _pPager)
}
_10:
- if _rc != i32(0) {
- _sqlite3BitvecDestroy(tls, (*XBitvec)(_pPager.X30))
- *(**XBitvec)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X30))))) = nil
+ if _rc != int32(0) {
+ _sqlite3BitvecDestroy(tls, (*XBitvec)(_pPager.XpInJournal))
+ *(**XBitvec)(unsafe.Pointer(&_pPager.XpInJournal)) = nil
goto _23
}
func() {
- if int32(_pPager.X14) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52651), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_open_journalØ00__func__Ø000))), unsafe.Pointer(str(13452)))
+ if int32(_pPager.XeState) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52651), unsafe.Pointer(&_pager_open_journalØ00__func__Ø000), unsafe.Pointer(str(13407)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(3))
+ _pPager.XeState = uint8(3)
_23:
return _rc
}
@@ -14398,40 +14551,45 @@ _23:
var _pager_open_journalØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_pager_open_journalØ00__func__Ø000[0], str(13547), 19)
+ crt.Xstrncpy(nil, &_pager_open_journalØ00__func__Ø000[0], str(13502), 19)
}
-// Open an in-memory journal file.
+// C comment
+// /*
+// ** Open an in-memory journal file.
+// */
func _sqlite3MemJournalOpen(tls *crt.TLS, _pJfd *Xsqlite3_file) {
- _sqlite3JournalOpen(tls, nil, nil, _pJfd, i32(0), i32(-1))
+ _sqlite3JournalOpen(tls, nil, nil, _pJfd, int32(0), int32(-1))
}
-// Verify that the database file has not be deleted or renamed out from
-// under the pager. Return SQLITE_OK if the database is still were it ought
-// to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error
-// code from sqlite3OsAccess()) if the database has gone missing.
+// C comment
+// /* Verify that the database file has not be deleted or renamed out from
+// ** under the pager. Return SQLITE_OK if the database is still were it ought
+// ** to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error
+// ** code from sqlite3OsAccess()) if the database has gone missing.
+// */
func _databaseIsUnmoved(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _bHasMoved, _rc int32
- _bHasMoved = i32(0)
- if (_pPager.X10) != 0 {
- return i32(0)
+ _bHasMoved = int32(0)
+ if _pPager.XtempFile != 0 {
+ return int32(0)
}
- if (_pPager.X22) == uint32(i32(0)) {
- return i32(0)
+ if _pPager.XdbSize == (0) {
+ return int32(0)
}
func() {
- if (_pPager.X51) == nil || (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPager.X51)) + 1*uintptr(i32(0))))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51865), unsafe.Pointer((*int8)(unsafe.Pointer(&_databaseIsUnmovedØ00__func__Ø000))), unsafe.Pointer(str(13566)))
+ if _pPager.XzFilename == nil || (*elem1(_pPager.XzFilename, 0)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51865), unsafe.Pointer(&_databaseIsUnmovedØ00__func__Ø000), unsafe.Pointer(str(13521)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsFileControl(tls, (*Xsqlite3_file)(_pPager.X31), i32(20), (unsafe.Pointer)(&_bHasMoved))
- if _rc == i32(12) {
- _rc = i32(0)
+ _rc = _sqlite3OsFileControl(tls, (*Xsqlite3_file)(_pPager.Xfd), int32(20), unsafe.Pointer(&_bHasMoved))
+ if _rc == int32(12) {
+ _rc = int32(0)
goto _8
}
- if (_rc == i32(0)) && _bHasMoved != 0 {
- _rc = i32(1032)
+ if (_rc == int32(0)) && _bHasMoved != 0 {
+ _rc = int32(1032)
}
_8:
return _rc
@@ -14440,103 +14598,102 @@ _8:
var _databaseIsUnmovedØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_databaseIsUnmovedØ00__func__Ø000[0], str(13608), 18)
+ crt.Xstrncpy(nil, &_databaseIsUnmovedØ00__func__Ø000[0], str(13563), 18)
}
-// Use sqlite3OsFileControl() when we are doing something that might fail
-// and we need to know about the failures. Use sqlite3OsFileControlHint()
-// when simply tossing information over the wall to the VFS and we do not
-// really care if the VFS receives and understands the information since it
-// is only a hint and can be safely ignored. The sqlite3OsFileControlHint()
-// routine has no return value since the return value would be meaningless.
+// C comment
+// /*
+// ** Use sqlite3OsFileControl() when we are doing something that might fail
+// ** and we need to know about the failures. Use sqlite3OsFileControlHint()
+// ** when simply tossing information over the wall to the VFS and we do not
+// ** really care if the VFS receives and understands the information since it
+// ** is only a hint and can be safely ignored. The sqlite3OsFileControlHint()
+// ** routine has no return value since the return value would be meaningless.
+// */
func _sqlite3OsFileControl(tls *crt.TLS, _id *Xsqlite3_file, _op int32, _pArg unsafe.Pointer) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X10)})))(tls, _id, _op, _pArg)
-}
-
-// The journal file must be open when this routine is called. A journal
-// header (JOURNAL_HDR_SZ bytes) is written into the journal file at the
-// current location.
-//
-// The format for the journal header is as follows:
-// - 8 bytes: Magic identifying journal format.
-// - 4 bytes: Number of records in journal, or -1 no-sync mode is on.
-// - 4 bytes: Random number used for page hash.
-// - 4 bytes: Initial database page count.
-// - 4 bytes: Sector size used by the process that wrote this journal.
-// - 4 bytes: Database page size.
-//
-// Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space.
+ return func() func(*crt.TLS, *Xsqlite3_file, int32, unsafe.Pointer) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxFileControl
+ return *(*func(*crt.TLS, *Xsqlite3_file, int32, unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _op, _pArg)
+}
+
+// C comment
+// /*
+// ** The journal file must be open when this routine is called. A journal
+// ** header (JOURNAL_HDR_SZ bytes) is written into the journal file at the
+// ** current location.
+// **
+// ** The format for the journal header is as follows:
+// ** - 8 bytes: Magic identifying journal format.
+// ** - 4 bytes: Number of records in journal, or -1 no-sync mode is on.
+// ** - 4 bytes: Random number used for page hash.
+// ** - 4 bytes: Initial database page count.
+// ** - 4 bytes: Sector size used by the process that wrote this journal.
+// ** - 4 bytes: Database page size.
+// **
+// ** Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space.
+// */
func _writeJournalHdr(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc, _ii int32
var _nHeader, _nWrite uint32
var _zHeader *int8
- _rc = i32(0)
- _zHeader = _pPager.X58
- _nHeader = uint32(_pPager.X48)
+ _rc = int32(0)
+ _zHeader = _pPager.XpTmpSpace
+ _nHeader = uint32(_pPager.XpageSize)
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48342), unsafe.Pointer((*int8)(unsafe.Pointer(&_writeJournalHdrØ00__func__Ø000))), unsafe.Pointer(str(13626)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48342), unsafe.Pointer(&_writeJournalHdrØ00__func__Ø000), unsafe.Pointer(str(13581)))
crt.X__builtin_abort(tls)
}
}()
- if _nHeader > (_pPager.X47) {
- _nHeader = _pPager.X47
+ if _nHeader > _pPager.XsectorSize {
+ _nHeader = _pPager.XsectorSize
}
- _ii = i32(0)
+ _ii = int32(0)
_3:
- if _ii >= (_pPager.X38) {
+ if _ii >= _pPager.XnSavepoint {
goto _6
}
- if ((*XPagerSavepoint)(unsafe.Pointer(uintptr(_pPager.X37) + 44*uintptr(_ii))).X1) == int64(i32(0)) {
- *(*int64)(unsafe.Pointer(&((*XPagerSavepoint)(unsafe.Pointer(uintptr(_pPager.X37) + 44*uintptr(_ii))).X1))) = _pPager.X34
+ if (elem31((*XPagerSavepoint)(_pPager.XaSavepoint), uintptr(_ii)).XiHdrOffset) == (0) {
+ elem31((*XPagerSavepoint)(_pPager.XaSavepoint), uintptr(_ii)).XiHdrOffset = _pPager.XjournalOff
}
_ii += 1
goto _3
_6:
- *(*int64)(unsafe.Pointer(&(_pPager.X35))) = store6((*int64)(unsafe.Pointer(&(_pPager.X34))), _journalHdrOffset(tls, _pPager))
+ _pPager.XjournalHdr = store35(&_pPager.XjournalOff, _journalHdrOffset(tls, _pPager))
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil && (_pPager.X4) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48380), unsafe.Pointer((*int8)(unsafe.Pointer(&_writeJournalHdrØ00__func__Ø000))), unsafe.Pointer(str(13646)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil && _pPager.XnoSync == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48380), unsafe.Pointer(&_writeJournalHdrØ00__func__Ø000), unsafe.Pointer(str(13601)))
crt.X__builtin_abort(tls)
}
}()
- if (((_pPager.X4) != 0) || (int32(_pPager.X2) == i32(4))) || (_sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.X31))&i32(512)) != 0 {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zHeader), (unsafe.Pointer)(&_aJournalMagic), u32(8))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zHeader))+1*uintptr(u32(8)))))), u32(4294967295))
+ if ((_pPager.XnoSync != 0) || (int32(_pPager.XjournalMode) == int32(4))) || (_sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.Xfd))&int32(512)) != 0 {
+ crt.Xmemcpy(tls, unsafe.Pointer(_zHeader), unsafe.Pointer(&_aJournalMagic), uint32(8))
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(elem1(_zHeader, uintptr(8)))), uint32(4294967295))
goto _14
}
- crt.Xmemset(tls, (unsafe.Pointer)(_zHeader), i32(0), u32(12))
+ crt.Xmemset(tls, unsafe.Pointer(_zHeader), int32(0), uint32(12))
_14:
- Xsqlite3_randomness(tls, int32(u32(4)), (unsafe.Pointer)((*uint32)(unsafe.Pointer(&(_pPager.X28)))))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zHeader))+1*uintptr(u32(12)))))), _pPager.X28)
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zHeader))+1*uintptr(u32(16)))))), _pPager.X23)
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zHeader))+1*uintptr(u32(20)))))), _pPager.X47)
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zHeader))+1*uintptr(u32(24)))))), uint32(_pPager.X48))
- crt.Xmemset(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zHeader))+1*uintptr(u32(28))))), i32(0), _nHeader-u32(28))
- _nWrite = uint32(i32(0))
+ Xsqlite3_randomness(tls, int32(4), unsafe.Pointer(&_pPager.XcksumInit))
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(elem1(_zHeader, uintptr(12)))), _pPager.XcksumInit)
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(elem1(_zHeader, uintptr(16)))), _pPager.XdbOrigSize)
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(elem1(_zHeader, uintptr(20)))), _pPager.XsectorSize)
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(elem1(_zHeader, uintptr(24)))), uint32(_pPager.XpageSize))
+ crt.Xmemset(tls, unsafe.Pointer(elem1(_zHeader, uintptr(28))), int32(0), _nHeader-uint32(28))
+ _nWrite = 0
_15:
- if _rc != i32(0) || _nWrite >= (_pPager.X47) {
+ if _rc != int32(0) || _nWrite >= _pPager.XsectorSize {
goto _19
}
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(_zHeader), int32(_nHeader), _pPager.X34)
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(_zHeader), int32(_nHeader), _pPager.XjournalOff)
func() {
- if (_pPager.X35) > (_pPager.X34) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48429), unsafe.Pointer((*int8)(unsafe.Pointer(&_writeJournalHdrØ00__func__Ø000))), unsafe.Pointer(str(13683)))
+ if _pPager.XjournalHdr > _pPager.XjournalOff {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48429), unsafe.Pointer(&_writeJournalHdrØ00__func__Ø000), unsafe.Pointer(str(13638)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*int64)(unsafe.Pointer(&(_pPager.X34)))
- *p = (*p) + int64(_nHeader)
- sink6(*p)
- }
- {
- p := &_nWrite
- *p = (*p) + _nHeader
- sink5(*p)
- }
+ _pPager.XjournalOff += int64(_nHeader)
+ _nWrite += _nHeader
goto _15
_19:
return _rc
@@ -14545,44 +14702,47 @@ _19:
var _writeJournalHdrØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_writeJournalHdrØ00__func__Ø000[0], str(13724), 16)
-}
-
-// Return the offset of the sector boundary at or immediately
-// following the value in pPager->journalOff, assuming a sector
-// size of pPager->sectorSize bytes.
-//
-// i.e for a sector size of 512:
-//
-// Pager.journalOff Return value
-// ---------------------------------------
-// 0 0
-// 512 512
-// 100 512
-// 2000 2048
-//
+ crt.Xstrncpy(nil, &_writeJournalHdrØ00__func__Ø000[0], str(13679), 16)
+}
+
+// C comment
+// /*
+// ** Return the offset of the sector boundary at or immediately
+// ** following the value in pPager->journalOff, assuming a sector
+// ** size of pPager->sectorSize bytes.
+// **
+// ** i.e for a sector size of 512:
+// **
+// ** Pager.journalOff Return value
+// ** ---------------------------------------
+// ** 0 0
+// ** 512 512
+// ** 100 512
+// ** 2000 2048
+// **
+// */
func _journalHdrOffset(tls *crt.TLS, _pPager *XPager) (r0 int64) {
var _offset, _c int64
- _offset = i64(0)
- _c = _pPager.X34
+ _offset = int64(0)
+ _c = _pPager.XjournalOff
if _c != 0 {
- _offset = (((_c - int64(i32(1))) / int64(_pPager.X47)) + int64(i32(1))) * int64(_pPager.X47)
+ _offset = (((_c - int64(1)) / int64(_pPager.XsectorSize)) + int64(1)) * int64(_pPager.XsectorSize)
}
func() {
- if (_offset % int64(_pPager.X47)) != int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48258), unsafe.Pointer((*int8)(unsafe.Pointer(&_journalHdrOffsetØ00__func__Ø000))), unsafe.Pointer(str(13740)))
+ if (_offset % int64(_pPager.XsectorSize)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48258), unsafe.Pointer(&_journalHdrOffsetØ00__func__Ø000), unsafe.Pointer(str(13695)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _offset < _c {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48259), unsafe.Pointer((*int8)(unsafe.Pointer(&_journalHdrOffsetØ00__func__Ø000))), unsafe.Pointer(str(13773)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48259), unsafe.Pointer(&_journalHdrOffsetØ00__func__Ø000), unsafe.Pointer(str(13728)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_offset - _c) >= int64(_pPager.X47) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48260), unsafe.Pointer((*int8)(unsafe.Pointer(&_journalHdrOffsetØ00__func__Ø000))), unsafe.Pointer(str(13783)))
+ if (_offset - _c) >= int64(_pPager.XsectorSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48260), unsafe.Pointer(&_journalHdrOffsetØ00__func__Ø000), unsafe.Pointer(str(13738)))
crt.X__builtin_abort(tls)
}
}()
@@ -14592,22 +14752,50 @@ func _journalHdrOffset(tls *crt.TLS, _pPager *XPager) (r0 int64) {
var _journalHdrOffsetØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_journalHdrOffsetØ00__func__Ø000[0], str(13817), 17)
+ crt.Xstrncpy(nil, &_journalHdrOffsetØ00__func__Ø000[0], str(13772), 17)
}
func _sqlite3OsDeviceCharacteristics(tls *crt.TLS, _id *Xsqlite3_file) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X12)})))(tls, _id)
-}
-
+ return func() func(*crt.TLS, *Xsqlite3_file) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxDeviceCharacteristics
+ return *(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&v))
+ }()(tls, _id)
+}
+
+// C comment
+// /*
+// ** Journal files begin with the following magic string. The data
+// ** was obtained from /dev/random. It is used only as a sanity check.
+// **
+// ** Since version 2.8.0, the journal format contains additional sanity
+// ** checking information. If the power fails while the journal is being
+// ** written, semi-random garbage data might appear in the journal
+// ** file after power is restored. If an attempt is then made
+// ** to roll the journal back, the database could be corrupted. The additional
+// ** sanity checking data is an attempt to discover the garbage in the
+// ** journal and ignore it.
+// **
+// ** The sanity checking information for the new journal format consists
+// ** of a 32-bit checksum on each page of data. The checksum covers both
+// ** the page number and the pPager->pageSize bytes of data for the page.
+// ** This cksum is initialized to a 32-bit random value that appears in the
+// ** journal file right after the header. The random initializer is important,
+// ** because garbage data that appears at the end of a journal is likely
+// ** data that was once in other files that have now been deleted. If the
+// ** garbage data came from an obsolete journal file, the checksums might
+// ** be correct. But by initializing the checksum to random value which
+// ** is different for every journal, we minimize that risk.
+// */
var _aJournalMagic [8]uint8
func init() {
_aJournalMagic = [8]uint8{217, 213, 5, 249, 32, 161, 99, 215}
}
-// Return N random bytes.
+// C comment
+// /*
+// ** Return N random bytes.
+// */
func Xsqlite3_randomness(tls *crt.TLS, _N int32, _pBuf unsafe.Pointer) {
var _2_i int32
var _t uint8
@@ -14618,69 +14806,66 @@ func Xsqlite3_randomness(tls *crt.TLS, _N int32, _pBuf unsafe.Pointer) {
if Xsqlite3_initialize(tls) != 0 {
return
}
- _mutex = _sqlite3MutexAlloc(tls, i32(5))
+ _mutex = _sqlite3MutexAlloc(tls, int32(5))
Xsqlite3_mutex_enter(tls, _mutex)
- if (_N <= i32(0)) || (_pBuf == nil) {
- *(*uint8)(unsafe.Pointer(&(_sqlite3Prng.X0))) = uint8(i32(0))
+ if (_N <= int32(0)) || (_pBuf == nil) {
+ _sqlite3Prng.XisInit = 0
Xsqlite3_mutex_leave(tls, _mutex)
return
}
- if (_sqlite3Prng.X0) != 0 {
+ if _sqlite3Prng.XisInit != 0 {
goto _3
}
- *(*uint8)(unsafe.Pointer(&(_sqlite3Prng.X2))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_sqlite3Prng.X1))) = uint8(i32(0))
- _sqlite3OsRandomness(tls, Xsqlite3_vfs_find(tls, nil), i32(256), (*int8)(unsafe.Pointer(&_2_k)))
- _2_i = i32(0)
+ _sqlite3Prng.Xj = 0
+ _sqlite3Prng.Xi = 0
+ _sqlite3OsRandomness(tls, Xsqlite3_vfs_find(tls, nil), int32(256), (*int8)(unsafe.Pointer(&_2_k)))
+ _2_i = int32(0)
_4:
- if _2_i >= i32(256) {
+ if _2_i >= int32(256) {
goto _7
}
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_2_i))) = uint8(_2_i)
+ *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_2_i)) = uint8(_2_i)
_2_i += 1
goto _4
_7:
- _2_i = i32(0)
+ _2_i = int32(0)
_8:
- if _2_i >= i32(256) {
+ if _2_i >= int32(256) {
goto _11
}
{
- p := (*uint8)(unsafe.Pointer(&(_sqlite3Prng.X2)))
- *p = uint8(int32(*p) + (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_2_i)))) + int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_2_k)) + 1*uintptr(_2_i))))))
- sink2(*p)
+ p := &_sqlite3Prng.Xj
+ *p = uint8(int32(*p) + (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_2_i))) + int32(*elem1((*int8)(unsafe.Pointer(&_2_k)), uintptr(_2_i)))))
}
- _t = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_sqlite3Prng.X2)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_sqlite3Prng.X2))) = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_2_i)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_2_i))) = _t
+ _t = *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_sqlite3Prng.Xj))
+ *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_sqlite3Prng.Xj)) = *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_2_i))
+ *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_2_i)) = _t
_2_i += 1
goto _8
_11:
- *(*uint8)(unsafe.Pointer(&(_sqlite3Prng.X0))) = uint8(i32(1))
+ _sqlite3Prng.XisInit = uint8(1)
_3:
func() {
- if _N <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(26805), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_randomnessØ00__func__Ø000))), unsafe.Pointer(str(13834)))
+ if _N <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(26805), unsafe.Pointer(&_sqlite3_randomnessØ00__func__Ø000), unsafe.Pointer(str(13789)))
crt.X__builtin_abort(tls)
}
}()
_14:
- *(*uint8)(unsafe.Pointer(&(_sqlite3Prng.X1))) += 1
- _t = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_sqlite3Prng.X1)))
+ _sqlite3Prng.Xi += 1
+ _t = *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_sqlite3Prng.Xi))
{
- p := (*uint8)(unsafe.Pointer(&(_sqlite3Prng.X2)))
+ p := &_sqlite3Prng.Xj
*p = uint8(int32(*p) + int32(_t))
- sink2(*p)
}
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_sqlite3Prng.X1))) = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_sqlite3Prng.X2)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_sqlite3Prng.X2))) = _t
+ *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_sqlite3Prng.Xi)) = *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_sqlite3Prng.Xj))
+ *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_sqlite3Prng.Xj)) = _t
{
p := &_t
- *p = uint8(int32(*p) + int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_sqlite3Prng.X1)))))
- sink2(*p)
+ *p = uint8(int32(*p) + int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_sqlite3Prng.Xi))))
}
- *postInc13(&_zBuf, 1) = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[256]uint8)(unsafe.Pointer(&(_sqlite3Prng.X3))))) + 1*uintptr(_t)))
- if preInc1(&_N, -1) != 0 {
+ *postInc15(&_zBuf, 1) = *elem15((*uint8)(unsafe.Pointer(&_sqlite3Prng.Xs)), uintptr(_t))
+ if preInc2(&_N, -1) != 0 {
goto _14
}
Xsqlite3_mutex_leave(tls, _mutex)
@@ -14688,17 +14873,26 @@ _14:
_ = _2_k
}
+// C comment
+// /* All threads share a single random number generator.
+// ** This structure is the current state of the generator.
+// */
var _sqlite3Prng Tsqlite3PrngType
-// SQLITE_OMIT_LOAD_EXTENSION
+// C comment
+// /* SQLITE_OMIT_LOAD_EXTENSION */
func _sqlite3OsRandomness(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _nByte int32, _zBufOut *int8) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- }{(_pVfs.X14)})))(tls, _pVfs, _nByte, _zBufOut)
+ return func() func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32 {
+ v := _pVfs.XxRandomness
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _nByte, _zBufOut)
}
-// Locate a VFS by name. If no name is given, simply return the
-// first VFS on the list.
+// C comment
+// /*
+// ** Locate a VFS by name. If no name is given, simply return the
+// ** first VFS on the list.
+// */
func Xsqlite3_vfs_find(tls *crt.TLS, _zVfs *int8) (r0 *Xsqlite3_vfs) {
var _rc int32
var _mutex *Xsqlite3_mutex
@@ -14708,7 +14902,7 @@ func Xsqlite3_vfs_find(tls *crt.TLS, _zVfs *int8) (r0 *Xsqlite3_vfs) {
if _rc != 0 {
return nil
}
- _mutex = _sqlite3MutexAlloc(tls, i32(2))
+ _mutex = _sqlite3MutexAlloc(tls, int32(2))
Xsqlite3_mutex_enter(tls, _mutex)
_pVfs = _vfsList
_1:
@@ -14718,86 +14912,94 @@ _1:
if _zVfs == nil {
goto _4
}
- if crt.Xstrcmp(tls, _zVfs, _pVfs.X4) == i32(0) {
+ if crt.Xstrcmp(tls, _zVfs, _pVfs.XzName) == int32(0) {
goto _4
}
- _pVfs = (*Xsqlite3_vfs)(_pVfs.X3)
+ _pVfs = (*Xsqlite3_vfs)(_pVfs.XpNext)
goto _1
_4:
Xsqlite3_mutex_leave(tls, _mutex)
return _pVfs
}
+// C comment
+// /*
+// ** The list of all registered VFS implementations.
+// */
var _vfsList *Xsqlite3_vfs
var _sqlite3_randomnessØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_randomnessØ00__func__Ø000[0], str(13838), 19)
+ crt.Xstrncpy(nil, &_sqlite3_randomnessØ00__func__Ø000[0], str(13793), 19)
}
-// Destroy a bitmap object. Reclaim all memory used.
+// C comment
+// /*
+// ** Destroy a bitmap object. Reclaim all memory used.
+// */
func _sqlite3BitvecDestroy(tls *crt.TLS, _p *XBitvec) {
var _1_i uint32
if _p == nil {
return
}
- if (_p.X2) == 0 {
+ if _p.XiDivisor == 0 {
goto _1
}
- _1_i = uint32(i32(0))
+ _1_i = 0
_2:
- if _1_i >= u32(125) {
+ if _1_i >= uint32(125) {
goto _5
}
- _sqlite3BitvecDestroy(tls, *(**XBitvec)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]unsafe.Pointer)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_1_i))))
+ _sqlite3BitvecDestroy(tls, *elem32((**XBitvec)(unsafe.Pointer((*[125]unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))), uintptr(_1_i)))
_1_i += 1
goto _2
_5:
_1:
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
}
-// Make sure the page is marked as dirty. If it isn't dirty already,
-// make it so.
+// C comment
+// /*
+// ** Make sure the page is marked as dirty. If it isn't dirty already,
+// ** make it so.
+// */
func _sqlite3PcacheMakeDirty(tls *crt.TLS, _p *XPgHdr) {
func() {
- if int32(_p.X7) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44679), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMakeDirtyØ00__func__Ø000))), unsafe.Pointer(str(13857)))
+ if int32(_p.XnRef) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44679), unsafe.Pointer(&_sqlite3PcacheMakeDirtyØ00__func__Ø000), unsafe.Pointer(str(13812)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3PcachePageSanity(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44680), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMakeDirtyØ00__func__Ø000))), unsafe.Pointer(str(13867)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44680), unsafe.Pointer(&_sqlite3PcacheMakeDirtyØ00__func__Ø000), unsafe.Pointer(str(13822)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_p.X6) & i32(17)) == 0 {
+ if (int32(_p.Xflags) & int32(17)) == 0 {
goto _4
}
{
- p := (*uint16)(unsafe.Pointer(&(_p.X6)))
- *p = uint16(int32(*p) & i32(-17))
- sink14(*p)
+ p := &_p.Xflags
+ *p = uint16(int32(*p) & int32(-17))
}
- if (int32(_p.X6) & i32(1)) != 0 {
+ if (int32(_p.Xflags) & int32(1)) != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_p.X6)))
- *p = uint16(int32(*p) ^ i32(3))
- sink14(*p)
+ p := &_p.Xflags
+ *p = uint16(int32(*p) ^ int32(3))
}
func() {
- if (int32(_p.X6) & i32(3)) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44686), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMakeDirtyØ00__func__Ø000))), unsafe.Pointer(str(13894)))
+ if (int32(_p.Xflags) & int32(3)) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44686), unsafe.Pointer(&_sqlite3PcacheMakeDirtyØ00__func__Ø000), unsafe.Pointer(str(13849)))
crt.X__builtin_abort(tls)
}
}()
- _pcacheManageDirtyList(tls, _p, uint8(i32(2)))
+ _pcacheManageDirtyList(tls, _p, uint8(2))
}
func() {
if _sqlite3PcachePageSanity(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44689), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMakeDirtyØ00__func__Ø000))), unsafe.Pointer(str(13867)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44689), unsafe.Pointer(&_sqlite3PcacheMakeDirtyØ00__func__Ø000), unsafe.Pointer(str(13822)))
crt.X__builtin_abort(tls)
}
}()
@@ -14807,168 +15009,173 @@ _4:
var _sqlite3PcacheMakeDirtyØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheMakeDirtyØ00__func__Ø000[0], str(13946), 23)
+ crt.Xstrncpy(nil, &_sqlite3PcacheMakeDirtyØ00__func__Ø000[0], str(13901), 23)
}
+// C comment
+// /* Check invariants on a PgHdr object */
func _sqlite3PcachePageSanity(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
var _pCache *XPCache
func() {
if _pPg == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44233), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000))), unsafe.Pointer(str(13969)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44233), unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000), unsafe.Pointer(str(13924)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPg.X5) <= uint32(i32(0)) && (*XPager)(_pPg.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44234), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000))), unsafe.Pointer(str(13976)))
+ if _pPg.Xpgno <= (0) && (*XPager)(_pPg.XpPager) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44234), unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000), unsafe.Pointer(str(13931)))
crt.X__builtin_abort(tls)
}
}()
- _pCache = (*XPCache)(_pPg.X8)
+ _pCache = (*XPCache)(_pPg.XpCache)
func() {
if _pCache == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44236), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000))), unsafe.Pointer(str(14006)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44236), unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000), unsafe.Pointer(str(13961)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pPg.X6) & i32(1)) != 0 {
+ if (int32(_pPg.Xflags) & int32(1)) != 0 {
func() {
- if (int32(_pPg.X6) & i32(2)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44238), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000))), unsafe.Pointer(str(14016)))
+ if (int32(_pPg.Xflags) & int32(2)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44238), unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000), unsafe.Pointer(str(13971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPgHdr)(_pCache.X0) == _pPg {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44239), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000))), unsafe.Pointer(str(14046)))
+ if (*XPgHdr)(_pCache.XpDirty) == _pPg {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44239), unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000), unsafe.Pointer(str(14001)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPgHdr)(_pCache.X1) == _pPg {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44240), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000))), unsafe.Pointer(str(14066)))
+ if (*XPgHdr)(_pCache.XpDirtyTail) == _pPg {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44240), unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000), unsafe.Pointer(str(14021)))
crt.X__builtin_abort(tls)
}
}()
}
- if (int32(_pPg.X6) & i32(4)) != 0 {
+ if (int32(_pPg.Xflags) & int32(4)) != 0 {
func() {
- if (int32(_pPg.X6) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44244), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000))), unsafe.Pointer(str(14090)))
+ if (int32(_pPg.Xflags) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44244), unsafe.Pointer(&_sqlite3PcachePageSanityØ00__func__Ø000), unsafe.Pointer(str(14045)))
crt.X__builtin_abort(tls)
}
}()
}
- return i32(1)
+ return int32(1)
}
var _sqlite3PcachePageSanityØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcachePageSanityØ00__func__Ø000[0], str(14115), 24)
+ crt.Xstrncpy(nil, &_sqlite3PcachePageSanityØ00__func__Ø000[0], str(14070), 24)
}
-// Manage pPage's participation on the dirty list. Bits of the addRemove
-// argument determines what operation to do. The 0x01 bit means first
-// remove pPage from the dirty list. The 0x02 means add pPage back to
-// the dirty list. Doing both moves pPage to the front of the dirty list.
+// C comment
+// /*
+// ** Manage pPage's participation on the dirty list. Bits of the addRemove
+// ** argument determines what operation to do. The 0x01 bit means first
+// ** remove pPage from the dirty list. The 0x02 means add pPage back to
+// ** the dirty list. Doing both moves pPage to the front of the dirty list.
+// */
func _pcacheManageDirtyList(tls *crt.TLS, _pPage *XPgHdr, _addRemove uint8) {
var _p *XPCache
- _p = (*XPCache)(_pPage.X8)
- if (int32(_addRemove) & i32(1)) == 0 {
+ _p = (*XPCache)(_pPage.XpCache)
+ if (int32(_addRemove) & int32(1)) == 0 {
goto _0
}
func() {
- if (*XPgHdr)(_pPage.X9) == nil && _pPage != (*XPgHdr)(_p.X1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44288), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000))), unsafe.Pointer(str(14139)))
+ if _pPage.XpDirtyNext == nil && _pPage != (*XPgHdr)(_p.XpDirtyTail) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44288), unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000), unsafe.Pointer(str(14094)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPgHdr)(_pPage.X10) == nil && _pPage != (*XPgHdr)(_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44289), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000))), unsafe.Pointer(str(14181)))
+ if _pPage.XpDirtyPrev == nil && _pPage != (*XPgHdr)(_p.XpDirty) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44289), unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000), unsafe.Pointer(str(14136)))
crt.X__builtin_abort(tls)
}
}()
- if (*XPgHdr)(_p.X2) == _pPage {
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = (*XPgHdr)(_pPage.X10)
+ if (*XPgHdr)(_p.XpSynced) == _pPage {
+ *(**XPgHdr)(unsafe.Pointer(&_p.XpSynced)) = (*XPgHdr)(_pPage.XpDirtyPrev)
}
- if (*XPgHdr)(_pPage.X9) != nil {
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPgHdr)(_pPage.X9).X10))))) = (*XPgHdr)(_pPage.X10)
+ if _pPage.XpDirtyNext != nil {
+ *(**XPgHdr)(unsafe.Pointer(&((*XPgHdr)(_pPage.XpDirtyNext).XpDirtyPrev))) = (*XPgHdr)(_pPage.XpDirtyPrev)
goto _9
}
func() {
- if _pPage != (*XPgHdr)(_p.X1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44299), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000))), unsafe.Pointer(str(14219)))
+ if _pPage != (*XPgHdr)(_p.XpDirtyTail) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44299), unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000), unsafe.Pointer(str(14174)))
crt.X__builtin_abort(tls)
}
}()
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = (*XPgHdr)(_pPage.X10)
+ *(**XPgHdr)(unsafe.Pointer(&_p.XpDirtyTail)) = (*XPgHdr)(_pPage.XpDirtyPrev)
_9:
- if (*XPgHdr)(_pPage.X10) != nil {
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPgHdr)(_pPage.X10).X9))))) = (*XPgHdr)(_pPage.X9)
+ if _pPage.XpDirtyPrev != nil {
+ *(**XPgHdr)(unsafe.Pointer(&((*XPgHdr)(_pPage.XpDirtyPrev).XpDirtyNext))) = (*XPgHdr)(_pPage.XpDirtyNext)
goto _13
}
func() {
- if _pPage != (*XPgHdr)(_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44309), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000))), unsafe.Pointer(str(14240)))
+ if _pPage != (*XPgHdr)(_p.XpDirty) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44309), unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000), unsafe.Pointer(str(14195)))
crt.X__builtin_abort(tls)
}
}()
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = (*XPgHdr)(_pPage.X9)
+ *(**XPgHdr)(unsafe.Pointer(&_p.XpDirty)) = (*XPgHdr)(_pPage.XpDirtyNext)
func() {
- if (_p.X8) == 0 && int32(_p.X9) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44311), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000))), unsafe.Pointer(str(14257)))
+ if _p.XbPurgeable == 0 && int32(_p.XeCreate) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44311), unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000), unsafe.Pointer(str(14212)))
crt.X__builtin_abort(tls)
}
}()
- if (*XPgHdr)(_p.X0) == nil {
+ if (*XPgHdr)(_p.XpDirty) == nil {
func() {
- if int32(_p.X8) != i32(0) && int32(_p.X9) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44313), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000))), unsafe.Pointer(str(14288)))
+ if int32(_p.XbPurgeable) != int32(0) && int32(_p.XeCreate) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44313), unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000), unsafe.Pointer(str(14243)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_p.X9))) = uint8(i32(2))
+ _p.XeCreate = uint8(2)
}
_13:
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X9))))) = nil
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X10))))) = nil
+ *(**XPgHdr)(unsafe.Pointer(&_pPage.XpDirtyNext)) = nil
+ *(**XPgHdr)(unsafe.Pointer(&_pPage.XpDirtyPrev)) = nil
_0:
- if (int32(_addRemove) & i32(2)) == 0 {
+ if (int32(_addRemove) & int32(2)) == 0 {
goto _23
}
func() {
- if (*XPgHdr)(_pPage.X9) != nil || (*XPgHdr)(_pPage.X10) != nil || (*XPgHdr)(_p.X0) == _pPage {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44321), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000))), unsafe.Pointer(str(14322)))
+ if (*XPgHdr)(_pPage.XpDirtyNext) != nil || (*XPgHdr)(_pPage.XpDirtyPrev) != nil || (*XPgHdr)(_p.XpDirty) == _pPage {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44321), unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000), unsafe.Pointer(str(14277)))
crt.X__builtin_abort(tls)
}
}()
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X9))))) = (*XPgHdr)(_p.X0)
- if (*XPgHdr)(_pPage.X9) != nil {
+ *(**XPgHdr)(unsafe.Pointer(&_pPage.XpDirtyNext)) = (*XPgHdr)(_p.XpDirty)
+ if _pPage.XpDirtyNext != nil {
func() {
- if (*XPgHdr)((*XPgHdr)(_pPage.X9).X10) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44325), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000))), unsafe.Pointer(str(14387)))
+ if (*XPgHdr)((*XPgHdr)(_pPage.XpDirtyNext).XpDirtyPrev) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44325), unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000), unsafe.Pointer(str(14342)))
crt.X__builtin_abort(tls)
}
}()
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPgHdr)(_pPage.X9).X10))))) = _pPage
+ *(**XPgHdr)(unsafe.Pointer(&((*XPgHdr)(_pPage.XpDirtyNext).XpDirtyPrev))) = _pPage
goto _31
}
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = _pPage
- if (_p.X8) != 0 {
+ *(**XPgHdr)(unsafe.Pointer(&_p.XpDirtyTail)) = _pPage
+ if _p.XbPurgeable != 0 {
func() {
- if int32(_p.X9) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44330), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000))), unsafe.Pointer(str(14420)))
+ if int32(_p.XeCreate) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44330), unsafe.Pointer(&_pcacheManageDirtyListØ00__func__Ø000), unsafe.Pointer(str(14375)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_p.X9))) = uint8(i32(1))
+ _p.XeCreate = uint8(1)
}
_31:
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _pPage
- if ((*XPgHdr)(_p.X2) == nil) && (i32(0) == (int32(_pPage.X6) & i32(8))) {
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = _pPage
+ *(**XPgHdr)(unsafe.Pointer(&_p.XpDirty)) = _pPage
+ if (_p.XpSynced == nil) && (int32(0) == (int32(_pPage.Xflags) & int32(8))) {
+ *(**XPgHdr)(unsafe.Pointer(&_p.XpSynced)) = _pPage
}
_23:
}
@@ -14976,76 +15183,70 @@ _23:
var _pcacheManageDirtyListØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_pcacheManageDirtyListØ00__func__Ø000[0], str(14434), 22)
+ crt.Xstrncpy(nil, &_pcacheManageDirtyListØ00__func__Ø000[0], str(14389), 22)
}
-// Write page pPg onto the end of the rollback journal.
+// C comment
+// /*
+// ** Write page pPg onto the end of the rollback journal.
+// */
func _pagerAddPageToRollbackJournal(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
var _rc int32
var _iOff int64
var _cksum uint32
var _pData2 *int8
var _pPager *XPager
- _pPager = (*XPager)(_pPg.X4)
- _iOff = _pPager.X34
+ _pPager = (*XPager)(_pPg.XpPager)
+ _iOff = _pPager.XjournalOff
func() {
- if (_pPg.X5) == uint32((_sqlite3PendingByte/(_pPager.X48))+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52754), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000))), unsafe.Pointer(str(14456)))
+ if _pPg.Xpgno == uint32((_sqlite3PendingByte/_pPager.XpageSize)+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52754), unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000), unsafe.Pointer(str(14411)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X35) > (_pPager.X34) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52756), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000))), unsafe.Pointer(str(14489)))
+ if _pPager.XjournalHdr > _pPager.XjournalOff {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52756), unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000), unsafe.Pointer(str(14444)))
crt.X__builtin_abort(tls)
}
}()
- _pData2 = (*int8)(_pPg.X1)
+ _pData2 = (*int8)(_pPg.XpData)
_cksum = _pager_cksum(tls, _pPager, (*uint8)(unsafe.Pointer(_pData2)))
{
- p := (*uint16)(unsafe.Pointer(&(_pPg.X6)))
- *p = uint16(int32(*p) | i32(8))
- sink14(*p)
+ p := &_pPg.Xflags
+ *p = uint16(int32(*p) | int32(8))
}
- _rc = _write32bits(tls, (*Xsqlite3_file)(_pPager.X32), _iOff, _pPg.X5)
- if _rc != i32(0) {
+ _rc = _write32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), _iOff, _pPg.Xpgno)
+ if _rc != int32(0) {
return _rc
}
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(_pData2), _pPager.X48, _iOff+int64(i32(4)))
- if _rc != i32(0) {
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(_pData2), _pPager.XpageSize, _iOff+int64(4))
+ if _rc != int32(0) {
return _rc
}
- _rc = _write32bits(tls, (*Xsqlite3_file)(_pPager.X32), (_iOff+int64(_pPager.X48))+int64(i32(4)), _cksum)
- if _rc != i32(0) {
+ _rc = _write32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), (_iOff+int64(_pPager.XpageSize))+int64(4), _cksum)
+ if _rc != int32(0) {
return _rc
}
- {
- p := (*int64)(unsafe.Pointer(&(_pPager.X34)))
- *p = (*p) + int64(i32(8)+(_pPager.X48))
- sink6(*p)
- }
- *(*int32)(unsafe.Pointer(&(_pPager.X27))) += 1
+ _pPager.XjournalOff += int64(int32(8) + _pPager.XpageSize)
+ _pPager.XnRec += 1
func() {
- if (*XBitvec)(_pPager.X30) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52785), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000))), unsafe.Pointer(str(14528)))
+ if (*XBitvec)(_pPager.XpInJournal) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52785), unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000), unsafe.Pointer(str(14483)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BitvecSet(tls, (*XBitvec)(_pPager.X30), _pPg.X5)
+ _rc = _sqlite3BitvecSet(tls, (*XBitvec)(_pPager.XpInJournal), _pPg.Xpgno)
func() {
- if _rc != i32(0) && _rc != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52788), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000))), unsafe.Pointer(str(5805)))
+ if _rc != int32(0) && _rc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52788), unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000), unsafe.Pointer(str(5706)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_rc
- *p = (*p) | _addToSavepointBitvecs(tls, _pPager, _pPg.X5)
- sink1(*p)
- }
+ _rc |= _addToSavepointBitvecs(tls, _pPager, _pPg.Xpgno)
func() {
- if _rc != i32(0) && _rc != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52790), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000))), unsafe.Pointer(str(5805)))
+ if _rc != int32(0) && _rc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52790), unsafe.Pointer(&_pagerAddPageToRollbackJournalØ00__func__Ø000), unsafe.Pointer(str(5706)))
crt.X__builtin_abort(tls)
}
}()
@@ -15055,64 +15256,62 @@ func _pagerAddPageToRollbackJournal(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
var _pagerAddPageToRollbackJournalØ00__func__Ø000 [30]int8
func init() {
- crt.Xstrncpy(nil, &_pagerAddPageToRollbackJournalØ00__func__Ø000[0], str(14550), 30)
-}
-
-// Parameter aData must point to a buffer of pPager->pageSize bytes
-// of data. Compute and return a checksum based ont the contents of the
-// page of data and the current value of pPager->cksumInit.
-//
-// This is not a real checksum. It is really just the sum of the
-// random initial value (pPager->cksumInit) and every 200th byte
-// of the page data, starting with byte offset (pPager->pageSize%200).
-// Each byte is interpreted as an 8-bit unsigned integer.
-//
-// Changing the formula used to compute this checksum results in an
-// incompatible journal file format.
-//
-// If journal corruption occurs due to a power failure, the most likely
-// scenario is that one end or the other of the record will be changed.
-// It is much less likely that the two ends of the journal record will be
-// correct and the middle be corrupt. Thus, this "checksum" scheme,
-// though fast and simple, catches the mostly likely kind of corruption.
+ crt.Xstrncpy(nil, &_pagerAddPageToRollbackJournalØ00__func__Ø000[0], str(14505), 30)
+}
+
+// C comment
+// /*
+// ** Parameter aData must point to a buffer of pPager->pageSize bytes
+// ** of data. Compute and return a checksum based ont the contents of the
+// ** page of data and the current value of pPager->cksumInit.
+// **
+// ** This is not a real checksum. It is really just the sum of the
+// ** random initial value (pPager->cksumInit) and every 200th byte
+// ** of the page data, starting with byte offset (pPager->pageSize%200).
+// ** Each byte is interpreted as an 8-bit unsigned integer.
+// **
+// ** Changing the formula used to compute this checksum results in an
+// ** incompatible journal file format.
+// **
+// ** If journal corruption occurs due to a power failure, the most likely
+// ** scenario is that one end or the other of the record will be changed.
+// ** It is much less likely that the two ends of the journal record will be
+// ** correct and the middle be corrupt. Thus, this "checksum" scheme,
+// ** though fast and simple, catches the mostly likely kind of corruption.
+// */
func _pager_cksum(tls *crt.TLS, _pPager *XPager, _aData *uint8) (r0 uint32) {
var _i int32
var _cksum uint32
- _cksum = _pPager.X28
- _i = (_pPager.X48) - i32(200)
+ _cksum = _pPager.XcksumInit
+ _i = _pPager.XpageSize - int32(200)
_0:
- if _i > i32(0) {
- {
- p := &_cksum
- *p = (*p) + uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(_i))))
- sink5(*p)
- }
- {
- p := &_i
- *p = (*p) - i32(200)
- sink1(*p)
- }
+ if _i > int32(0) {
+ _cksum += uint32(*elem15(_aData, uintptr(_i)))
+ _i -= int32(200)
goto _0
}
return _cksum
}
-// Release a page reference.
-//
-// If the number of references to the page drop to zero, then the
-// page is added to the LRU list. When all references to all pages
-// are released, a rollback occurs and the lock on the database is
-// removed.
+// C comment
+// /*
+// ** Release a page reference.
+// **
+// ** If the number of references to the page drop to zero, then the
+// ** page is added to the LRU list. When all references to all pages
+// ** are released, a rollback occurs and the lock on the database is
+// ** removed.
+// */
func _sqlite3PagerUnrefNotNull(tls *crt.TLS, _pPg *XPgHdr) {
var _pPager *XPager
func() {
if _pPg == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52551), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerUnrefNotNullØ00__func__Ø000))), unsafe.Pointer(str(13969)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52551), unsafe.Pointer(&_sqlite3PagerUnrefNotNullØ00__func__Ø000), unsafe.Pointer(str(13924)))
crt.X__builtin_abort(tls)
}
}()
- _pPager = (*XPager)(_pPg.X4)
- if (int32(_pPg.X6) & i32(32)) != 0 {
+ _pPager = (*XPager)(_pPg.XpPager)
+ if (int32(_pPg.Xflags) & int32(32)) != 0 {
_pagerReleaseMapPage(tls, _pPg)
goto _3
}
@@ -15124,57 +15323,64 @@ _3:
var _sqlite3PagerUnrefNotNullØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerUnrefNotNullØ00__func__Ø000[0], str(14580), 25)
+ crt.Xstrncpy(nil, &_sqlite3PagerUnrefNotNullØ00__func__Ø000[0], str(14535), 25)
}
-// Release a reference to page pPg. pPg must have been returned by an
-// earlier call to pagerAcquireMapPage().
+// C comment
+// /*
+// ** Release a reference to page pPg. pPg must have been returned by an
+// ** earlier call to pagerAcquireMapPage().
+// */
func _pagerReleaseMapPage(tls *crt.TLS, _pPg *XPgHdr) {
var _pPager *XPager
- _pPager = (*XPager)(_pPg.X4)
- *(*int32)(unsafe.Pointer(&(_pPager.X41))) -= 1
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPg.X3))))) = (*XPgHdr)(_pPager.X43)
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X43))))) = _pPg
+ _pPager = (*XPager)(_pPg.XpPager)
+ _pPager.XnMmapOut -= 1
+ *(**XPgHdr)(unsafe.Pointer(&_pPg.XpDirty)) = (*XPgHdr)(_pPager.XpMmapFreelist)
+ *(**XPgHdr)(unsafe.Pointer(&_pPager.XpMmapFreelist)) = _pPg
func() {
- if ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0).X0) < i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50978), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerReleaseMapPageØ00__func__Ø000))), unsafe.Pointer(str(14605)))
+ if ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods).XiVersion) < int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50978), unsafe.Pointer(&_pagerReleaseMapPageØ00__func__Ø000), unsafe.Pointer(str(14560)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.X31), int64((_pPg.X5)-uint32(i32(1)))*int64(_pPager.X48), _pPg.X1)
+ _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.Xfd), int64(_pPg.Xpgno-uint32(1))*int64(_pPager.XpageSize), _pPg.XpData)
}
var _pagerReleaseMapPageØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_pagerReleaseMapPageØ00__func__Ø000[0], str(14639), 20)
+ crt.Xstrncpy(nil, &_pagerReleaseMapPageØ00__func__Ø000[0], str(14594), 20)
}
func _sqlite3OsUnfetch(tls *crt.TLS, _id *Xsqlite3_file, _iOff int64, _p unsafe.Pointer) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int64, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X18)})))(tls, _id, _iOff, _p)
+ return func() func(*crt.TLS, *Xsqlite3_file, int64, unsafe.Pointer) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxUnfetch
+ return *(*func(*crt.TLS, *Xsqlite3_file, int64, unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _iOff, _p)
}
-// Decrement the reference count on a page. If the page is clean and the
-// reference count drops to 0, then it is made eligible for recycling.
+// C comment
+// /*
+// ** Decrement the reference count on a page. If the page is clean and the
+// ** reference count drops to 0, then it is made eligible for recycling.
+// */
func _sqlite3PcacheRelease(tls *crt.TLS, _p *XPgHdr) {
func() {
- if int32(_p.X7) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44634), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheReleaseØ00__func__Ø000))), unsafe.Pointer(str(13857)))
+ if int32(_p.XnRef) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44634), unsafe.Pointer(&_sqlite3PcacheReleaseØ00__func__Ø000), unsafe.Pointer(str(13812)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&((*XPCache)(_p.X8).X3))) -= 1
- if int32(preInc18((*int16)(unsafe.Pointer(&(_p.X7))), -1)) != i32(0) {
+ (*XPCache)(_p.XpCache).XnRefSum -= 1
+ if int32(preInc26(&_p.XnRef, -1)) != int32(0) {
goto _2
}
- if (int32(_p.X6) & i32(1)) != 0 {
+ if (int32(_p.Xflags) & int32(1)) != 0 {
_pcacheUnpin(tls, _p)
goto _5
}
- if (*XPgHdr)(_p.X10) != nil {
- _pcacheManageDirtyList(tls, _p, uint8(i32(3)))
+ if (*XPgHdr)(_p.XpDirtyPrev) != nil {
+ _pcacheManageDirtyList(tls, _p, uint8(3))
}
_5:
_2:
@@ -15183,64 +15389,71 @@ _2:
var _sqlite3PcacheReleaseØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheReleaseØ00__func__Ø000[0], str(14659), 21)
+ crt.Xstrncpy(nil, &_sqlite3PcacheReleaseØ00__func__Ø000[0], str(14614), 21)
}
-// Wrapper around the pluggable caches xUnpin method. If the cache is
-// being used for an in-memory database, this function is a no-op.
+// C comment
+// /*
+// ** Wrapper around the pluggable caches xUnpin method. If the cache is
+// ** being used for an in-memory database, this function is a no-op.
+// */
func _pcacheUnpin(tls *crt.TLS, _p *XPgHdr) {
- if ((*XPCache)(_p.X8).X8) != 0 {
- (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
- }{((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X8)})))(tls, (*XPCache)(_p.X8).X12, (*Xsqlite3_pcache_page)(_p.X0), i32(0))
+ if ((*XPCache)(_p.XpCache).XbPurgeable) != 0 {
+ func() func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, int32) {
+ v := _sqlite3Config.Xpcache2.XxUnpin
+ return *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, int32))(unsafe.Pointer(&v))
+ }()(tls, (*XPCache)(_p.XpCache).XpCache, (*Xsqlite3_pcache_page)(_p.XpPage), int32(0))
}
}
func _pagerUnlockIfUnused(tls *crt.TLS, _pPager *XPager) {
- if ((_pPager.X41) == i32(0)) && (_sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.X59)) == i32(0)) {
+ if (_pPager.XnMmapOut == int32(0)) && (_sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.XpPCache)) == int32(0)) {
_pagerUnlockAndRollback(tls, _pPager)
}
}
-// Execute a rollback if a transaction is active and unlock the
-// database file.
-//
-// If the pager has already entered the ERROR state, do not attempt
-// the rollback at this time. Instead, pager_unlock() is called. The
-// call to pager_unlock() will discard all in-memory pages, unlock
-// the database file and move the pager back to OPEN state. If this
-// means that there is a hot-journal left in the file-system, the next
-// connection to obtain a shared lock on the pager (which may be this one)
-// will roll it back.
-//
-// If the pager has not already entered the ERROR state, but an IO or
-// malloc error occurs during a rollback, then this will itself cause
-// the pager to enter the ERROR state. Which will be cleared by the
-// call to pager_unlock(), as described above.
+// C comment
+// /*
+// ** Execute a rollback if a transaction is active and unlock the
+// ** database file.
+// **
+// ** If the pager has already entered the ERROR state, do not attempt
+// ** the rollback at this time. Instead, pager_unlock() is called. The
+// ** call to pager_unlock() will discard all in-memory pages, unlock
+// ** the database file and move the pager back to OPEN state. If this
+// ** means that there is a hot-journal left in the file-system, the next
+// ** connection to obtain a shared lock on the pager (which may be this one)
+// ** will roll it back.
+// **
+// ** If the pager has not already entered the ERROR state, but an IO or
+// ** malloc error occurs during a rollback, then this will itself cause
+// ** the pager to enter the ERROR state. Which will be cleared by the
+// ** call to pager_unlock(), as described above.
+// */
func _pagerUnlockAndRollback(tls *crt.TLS, _pPager *XPager) {
- if int32(_pPager.X14) == i32(6) || int32(_pPager.X14) == i32(0) {
+ if int32(_pPager.XeState) == int32(6) || int32(_pPager.XeState) == int32(0) {
goto _1
}
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49056), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerUnlockAndRollbackØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49056), unsafe.Pointer(&_pagerUnlockAndRollbackØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pPager.X14) >= i32(2) {
+ if int32(_pPager.XeState) >= int32(2) {
_sqlite3BeginBenignMalloc(tls)
_sqlite3PagerRollback(tls, _pPager)
_sqlite3EndBenignMalloc(tls)
goto _6
}
- if (_pPager.X1) == 0 {
+ if _pPager.XexclusiveMode == 0 {
func() {
- if int32(_pPager.X14) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49062), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerUnlockAndRollbackØ00__func__Ø000))), unsafe.Pointer(str(14680)))
+ if int32(_pPager.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49062), unsafe.Pointer(&_pagerUnlockAndRollbackØ00__func__Ø000), unsafe.Pointer(str(14635)))
crt.X__builtin_abort(tls)
}
}()
- _pager_end_transaction(tls, _pPager, i32(0), i32(0))
+ _pager_end_transaction(tls, _pPager, int32(0), int32(0))
}
_6:
_1:
@@ -15250,82 +15463,85 @@ _1:
var _pagerUnlockAndRollbackØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_pagerUnlockAndRollbackØ00__func__Ø000[0], str(14709), 23)
-}
-
-// If a write transaction is open, then all changes made within the
-// transaction are reverted and the current write-transaction is closed.
-// The pager falls back to PAGER_READER state if successful, or PAGER_ERROR
-// state if an error occurs.
-//
-// If the pager is already in PAGER_ERROR state when this function is called,
-// it returns Pager.errCode immediately. No work is performed in this case.
-//
-// Otherwise, in rollback mode, this function performs two functions:
-//
-// 1) It rolls back the journal file, restoring all database file and
-// in-memory cache pages to the state they were in when the transaction
-// was opened, and
-//
-// 2) It finalizes the journal file, so that it is not used for hot
-// rollback at any point in the future.
-//
-// Finalization of the journal file (task 2) is only performed if the
-// rollback is successful.
-//
-// In WAL mode, all cache-entries containing data modified within the
-// current transaction are either expelled from the cache or reverted to
-// their pre-transaction state by re-reading data from the database or
-// WAL files. The WAL transaction is then closed.
+ crt.Xstrncpy(nil, &_pagerUnlockAndRollbackØ00__func__Ø000[0], str(14664), 23)
+}
+
+// C comment
+// /*
+// ** If a write transaction is open, then all changes made within the
+// ** transaction are reverted and the current write-transaction is closed.
+// ** The pager falls back to PAGER_READER state if successful, or PAGER_ERROR
+// ** state if an error occurs.
+// **
+// ** If the pager is already in PAGER_ERROR state when this function is called,
+// ** it returns Pager.errCode immediately. No work is performed in this case.
+// **
+// ** Otherwise, in rollback mode, this function performs two functions:
+// **
+// ** 1) It rolls back the journal file, restoring all database file and
+// ** in-memory cache pages to the state they were in when the transaction
+// ** was opened, and
+// **
+// ** 2) It finalizes the journal file, so that it is not used for hot
+// ** rollback at any point in the future.
+// **
+// ** Finalization of the journal file (task 2) is only performed if the
+// ** rollback is successful.
+// **
+// ** In WAL mode, all cache-entries containing data modified within the
+// ** current transaction are either expelled from the cache or reverted to
+// ** their pre-transaction state by re-reading data from the database or
+// ** WAL files. The WAL transaction is then closed.
+// */
func _sqlite3PagerRollback(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc, _1_rc2, _2_eState int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53472), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerRollbackØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53472), unsafe.Pointer(&_sqlite3PagerRollbackØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pPager.X14) == i32(6) {
- return _pPager.X26
+ if int32(_pPager.XeState) == int32(6) {
+ return _pPager.XerrCode
}
- if int32(_pPager.X14) <= i32(1) {
- return i32(0)
+ if int32(_pPager.XeState) <= int32(1) {
+ return int32(0)
}
- if (*XWal)(_pPager.X60) == nil {
+ if (*XWal)(_pPager.XpWal) == nil {
goto _4
}
- _rc = _sqlite3PagerSavepoint(tls, _pPager, i32(2), i32(-1))
- _1_rc2 = _pager_end_transaction(tls, _pPager, int32(_pPager.X17), i32(0))
- if _rc == i32(0) {
+ _rc = _sqlite3PagerSavepoint(tls, _pPager, int32(2), int32(-1))
+ _1_rc2 = _pager_end_transaction(tls, _pPager, int32(_pPager.XsetMaster), int32(0))
+ if _rc == int32(0) {
_rc = _1_rc2
}
goto _11
_4:
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil && int32(_pPager.X14) != i32(2) {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil && int32(_pPager.XeState) != int32(2) {
goto _8
}
- _2_eState = int32(_pPager.X14)
- _rc = _pager_end_transaction(tls, _pPager, i32(0), i32(0))
- if ((_pPager.X13) == 0) && (_2_eState > i32(2)) {
- *(*int32)(unsafe.Pointer(&(_pPager.X26))) = i32(4)
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(6))
+ _2_eState = int32(_pPager.XeState)
+ _rc = _pager_end_transaction(tls, _pPager, int32(0), int32(0))
+ if (_pPager.XmemDb == 0) && (_2_eState > int32(2)) {
+ _pPager.XerrCode = int32(4)
+ _pPager.XeState = uint8(6)
_setGetterMethod(tls, _pPager)
return _rc
}
goto _11
_8:
- _rc = _pager_playback(tls, _pPager, i32(0))
+ _rc = _pager_playback(tls, _pPager, int32(0))
_11:
func() {
- if int32(_pPager.X14) != i32(1) && _rc == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53498), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerRollbackØ00__func__Ø000))), unsafe.Pointer(str(14732)))
+ if int32(_pPager.XeState) != int32(1) && _rc == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53498), unsafe.Pointer(&_sqlite3PagerRollbackØ00__func__Ø000), unsafe.Pointer(str(14687)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc != i32(0) && _rc != i32(13) && _rc != i32(11) && _rc != i32(7) && (_rc&i32(255)) != i32(10) && _rc != i32(14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53499), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerRollbackØ00__func__Ø000))), unsafe.Pointer(str(14778)))
+ if _rc != int32(0) && _rc != int32(13) && _rc != int32(11) && _rc != int32(7) && (_rc&int32(255)) != int32(10) && _rc != int32(14) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53499), unsafe.Pointer(&_sqlite3PagerRollbackØ00__func__Ø000), unsafe.Pointer(str(14733)))
crt.X__builtin_abort(tls)
}
}()
@@ -15335,74 +15551,74 @@ _11:
var _sqlite3PagerRollbackØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerRollbackØ00__func__Ø000[0], str(14903), 21)
+ crt.Xstrncpy(nil, &_sqlite3PagerRollbackØ00__func__Ø000[0], str(14858), 21)
}
func _sqlite3PagerSavepoint(tls *crt.TLS, _pPager *XPager, _op int32, _iSavepoint int32) (r0 int32) {
var _rc, _1_ii, _1_nNew int32
var _6_pSavepoint *XPagerSavepoint
- _rc = _pPager.X26
+ _rc = _pPager.XerrCode
func() {
- if _op != i32(1) && _op != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53702), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSavepointØ00__func__Ø000))), unsafe.Pointer(str(14924)))
+ if _op != int32(1) && _op != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53702), unsafe.Pointer(&_sqlite3PagerSavepointØ00__func__Ø000), unsafe.Pointer(str(14879)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iSavepoint < i32(0) && _op != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53703), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSavepointØ00__func__Ø000))), unsafe.Pointer(str(14972)))
+ if _iSavepoint < int32(0) && _op != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53703), unsafe.Pointer(&_sqlite3PagerSavepointØ00__func__Ø000), unsafe.Pointer(str(14927)))
crt.X__builtin_abort(tls)
}
}()
- if _rc != i32(0) || _iSavepoint >= (_pPager.X38) {
+ if _rc != int32(0) || _iSavepoint >= _pPager.XnSavepoint {
goto _7
}
_1_nNew = _iSavepoint + func() int32 {
- if _op == i32(1) {
- return i32(0)
+ if _op == int32(1) {
+ return int32(0)
}
- return i32(1)
+ return int32(1)
}()
_1_ii = _1_nNew
_10:
- if _1_ii >= (_pPager.X38) {
+ if _1_ii >= _pPager.XnSavepoint {
goto _13
}
- _sqlite3BitvecDestroy(tls, (*XBitvec)((*XPagerSavepoint)(unsafe.Pointer(uintptr(_pPager.X37)+44*uintptr(_1_ii))).X2))
+ _sqlite3BitvecDestroy(tls, (*XBitvec)(elem31((*XPagerSavepoint)(_pPager.XaSavepoint), uintptr(_1_ii)).XpInSavepoint))
_1_ii += 1
goto _10
_13:
- *(*int32)(unsafe.Pointer(&(_pPager.X38))) = _1_nNew
- if _op != i32(1) {
+ _pPager.XnSavepoint = _1_nNew
+ if _op != int32(1) {
goto _14
}
- if _1_nNew != i32(0) || (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X33).X0) == nil {
+ if _1_nNew != int32(0) || (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xsjfd).XpMethods) == nil {
goto _16
}
- if _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.X33)) != 0 {
- _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.X33), int64(i32(0)))
+ if _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.Xsjfd)) != 0 {
+ _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.Xsjfd), 0)
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53726), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSavepointØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53726), unsafe.Pointer(&_sqlite3PagerSavepointØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
}
- *(*uint32)(unsafe.Pointer(&(_pPager.X29))) = uint32(i32(0))
+ _pPager.XnSubRec = 0
_16:
goto _22
_14:
- if ((*XWal)(_pPager.X60) != nil) || ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil) {
+ if ((*XWal)(_pPager.XpWal) != nil) || ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil) {
_6_pSavepoint = func() *XPagerSavepoint {
- if _1_nNew == i32(0) {
+ if _1_nNew == int32(0) {
return nil
}
- return (*XPagerSavepoint)(unsafe.Pointer(uintptr(_pPager.X37) + 44*uintptr(_1_nNew-i32(1))))
+ return elem31((*XPagerSavepoint)(_pPager.XaSavepoint), uintptr(_1_nNew-int32(1)))
}()
_rc = _pagerPlaybackSavepoint(tls, _pPager, _6_pSavepoint)
func() {
- if _rc == i32(101) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53739), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSavepointØ00__func__Ø000))), unsafe.Pointer(str(15026)))
+ if _rc == int32(101) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53739), unsafe.Pointer(&_sqlite3PagerSavepointØ00__func__Ø000), unsafe.Pointer(str(14981)))
crt.X__builtin_abort(tls)
}
}()
@@ -15415,269 +15631,279 @@ _7:
var _sqlite3PagerSavepointØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerSavepointØ00__func__Ø000[0], str(15042), 22)
+ crt.Xstrncpy(nil, &_sqlite3PagerSavepointØ00__func__Ø000[0], str(14997), 22)
}
-// The file-handle passed as the only argument is open on a journal file.
-// Return true if this "journal file" is currently stored in heap memory,
-// or false otherwise.
+// C comment
+// /*
+// ** The file-handle passed as the only argument is open on a journal file.
+// ** Return true if this "journal file" is currently stored in heap memory,
+// ** or false otherwise.
+// */
func _sqlite3JournalIsInMemory(tls *crt.TLS, _p *Xsqlite3_file) (r0 int32) {
- return bool2int((*Xsqlite3_io_methods)(_p.X0) == &_MemJournalMethods)
+ return bool2int((*Xsqlite3_io_methods)(_p.XpMethods) == &_MemJournalMethods)
}
func _sqlite3OsTruncate(tls *crt.TLS, _id *Xsqlite3_file, _size int64) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int64) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X4)})))(tls, _id, _size)
-}
-
-// Playback savepoint pSavepoint. Or, if pSavepoint==NULL, then playback
-// the entire master journal file. The case pSavepoint==NULL occurs when
-// a ROLLBACK TO command is invoked on a SAVEPOINT that is a transaction
-// savepoint.
-//
-// When pSavepoint is not NULL (meaning a non-transaction savepoint is
-// being rolled back), then the rollback consists of up to three stages,
-// performed in the order specified:
-//
-// * Pages are played back from the main journal starting at byte
-// offset PagerSavepoint.iOffset and continuing to
-// PagerSavepoint.iHdrOffset, or to the end of the main journal
-// file if PagerSavepoint.iHdrOffset is zero.
-//
-// * If PagerSavepoint.iHdrOffset is not zero, then pages are played
-// back starting from the journal header immediately following
-// PagerSavepoint.iHdrOffset to the end of the main journal file.
-//
-// * Pages are then played back from the sub-journal file, starting
-// with the PagerSavepoint.iSubRec and continuing to the end of
-// the journal file.
-//
-// Throughout the rollback process, each time a page is rolled back, the
-// corresponding bit is set in a bitvec structure (variable pDone in the
-// implementation below). This is used to ensure that a page is only
-// rolled back the first time it is encountered in either journal.
-//
-// If pSavepoint is NULL, then pages are only played back from the main
-// journal file. There is no need for a bitvec in this case.
-//
-// In either case, before playback commences the Pager.dbSize variable
-// is reset to the value that it held at the start of the savepoint
-// (or transaction). No page with a page-number greater than this value
-// is played back. If one is encountered it is simply skipped.
+ return func() func(*crt.TLS, *Xsqlite3_file, int64) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxTruncate
+ return *(*func(*crt.TLS, *Xsqlite3_file, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _size)
+}
+
+// C comment
+// /*
+// ** Playback savepoint pSavepoint. Or, if pSavepoint==NULL, then playback
+// ** the entire master journal file. The case pSavepoint==NULL occurs when
+// ** a ROLLBACK TO command is invoked on a SAVEPOINT that is a transaction
+// ** savepoint.
+// **
+// ** When pSavepoint is not NULL (meaning a non-transaction savepoint is
+// ** being rolled back), then the rollback consists of up to three stages,
+// ** performed in the order specified:
+// **
+// ** * Pages are played back from the main journal starting at byte
+// ** offset PagerSavepoint.iOffset and continuing to
+// ** PagerSavepoint.iHdrOffset, or to the end of the main journal
+// ** file if PagerSavepoint.iHdrOffset is zero.
+// **
+// ** * If PagerSavepoint.iHdrOffset is not zero, then pages are played
+// ** back starting from the journal header immediately following
+// ** PagerSavepoint.iHdrOffset to the end of the main journal file.
+// **
+// ** * Pages are then played back from the sub-journal file, starting
+// ** with the PagerSavepoint.iSubRec and continuing to the end of
+// ** the journal file.
+// **
+// ** Throughout the rollback process, each time a page is rolled back, the
+// ** corresponding bit is set in a bitvec structure (variable pDone in the
+// ** implementation below). This is used to ensure that a page is only
+// ** rolled back the first time it is encountered in either journal.
+// **
+// ** If pSavepoint is NULL, then pages are only played back from the main
+// ** journal file. There is no need for a bitvec in this case.
+// **
+// ** In either case, before playback commences the Pager.dbSize variable
+// ** is reset to the value that it held at the start of the savepoint
+// ** (or transaction). No page with a page-number greater than this value
+// ** is played back. If one is encountered it is simply skipped.
+// */
func _pagerPlaybackSavepoint(tls *crt.TLS, _pPager *XPager, _pSavepoint *XPagerSavepoint) (r0 int32) {
var _rc int32
var _szJ, _iHdrOff, _10_offset int64
var _7_ii, _7_nJRec, _7_dummy, _10_ii uint32
var _pDone *XBitvec
- _rc = i32(0)
+ _rc = int32(0)
_pDone = nil
func() {
- if int32(_pPager.X14) == i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50292), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000))), unsafe.Pointer(str(15064)))
+ if int32(_pPager.XeState) == int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50292), unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000), unsafe.Pointer(str(15019)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50293), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000))), unsafe.Pointer(str(10980)))
+ if int32(_pPager.XeState) < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50293), unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000), unsafe.Pointer(str(10935)))
crt.X__builtin_abort(tls)
}
}()
if _pSavepoint == nil {
goto _4
}
- _pDone = _sqlite3BitvecCreate(tls, _pSavepoint.X3)
+ _pDone = _sqlite3BitvecCreate(tls, _pSavepoint.XnOrig)
if _pDone == nil {
- return _sqlite3NomemError(tls, i32(50299))
+ return _sqlite3NomemError(tls, int32(50299))
}
_4:
- *(*uint32)(unsafe.Pointer(&(_pPager.X22))) = func() uint32 {
+ _pPager.XdbSize = func() uint32 {
if _pSavepoint != nil {
- return (_pSavepoint.X3)
+ return _pSavepoint.XnOrig
}
- return (_pPager.X23)
+ return _pPager.XdbOrigSize
}()
- *(*uint8)(unsafe.Pointer(&(_pPager.X16))) = _pPager.X10
- if (_pSavepoint == nil) && ((*XWal)(_pPager.X60) != nil) {
+ _pPager.XchangeCountDone = _pPager.XtempFile
+ if (_pSavepoint == nil) && ((*XWal)(_pPager.XpWal) != nil) {
return _pagerRollbackWal(tls, _pPager)
}
- _szJ = _pPager.X34
+ _szJ = _pPager.XjournalOff
func() {
- if bool2int((*XWal)(_pPager.X60) != nil) != i32(0) && _szJ != int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50319), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000))), unsafe.Pointer(str(15092)))
+ if bool2int((*XWal)(_pPager.XpWal) != nil) != int32(0) && _szJ != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50319), unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000), unsafe.Pointer(str(15047)))
crt.X__builtin_abort(tls)
}
}()
- if _pSavepoint == nil || (*XWal)(_pPager.X60) != nil {
+ if _pSavepoint == nil || (*XWal)(_pPager.XpWal) != nil {
goto _14
}
_iHdrOff = func() int64 {
- if (_pSavepoint.X1) != 0 {
- return (_pSavepoint.X1)
+ if _pSavepoint.XiHdrOffset != 0 {
+ return _pSavepoint.XiHdrOffset
}
return _szJ
}()
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = _pSavepoint.X0
+ _pPager.XjournalOff = _pSavepoint.XiOffset
_17:
- if (_rc == i32(0)) && ((_pPager.X34) < _iHdrOff) {
- _rc = _pager_playback_one_page(tls, _pPager, (*int64)(unsafe.Pointer(&(_pPager.X34))), _pDone, i32(1), i32(1))
+ if (_rc == int32(0)) && (_pPager.XjournalOff < _iHdrOff) {
+ _rc = _pager_playback_one_page(tls, _pPager, &_pPager.XjournalOff, _pDone, int32(1), int32(1))
goto _17
}
func() {
- if _rc == i32(101) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50334), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000))), unsafe.Pointer(str(15026)))
+ if _rc == int32(101) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50334), unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000), unsafe.Pointer(str(14981)))
crt.X__builtin_abort(tls)
}
}()
goto _22
_14:
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = int64(i32(0))
+ _pPager.XjournalOff = 0
_22:
- if _rc != i32(0) || (_pPager.X34) >= _szJ {
+ if _rc != int32(0) || _pPager.XjournalOff >= _szJ {
goto _24
}
- _7_nJRec = uint32(i32(0))
- _rc = _readJournalHdr(tls, _pPager, i32(0), _szJ, &_7_nJRec, &_7_dummy)
+ _7_nJRec = 0
+ _rc = _readJournalHdr(tls, _pPager, int32(0), _szJ, &_7_nJRec, &_7_dummy)
func() {
- if _rc == i32(101) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50349), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000))), unsafe.Pointer(str(15026)))
+ if _rc == int32(101) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50349), unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000), unsafe.Pointer(str(14981)))
crt.X__builtin_abort(tls)
}
}()
- if (_7_nJRec == uint32(i32(0))) && (((_pPager.X35) + int64(_pPager.X47)) == (_pPager.X34)) {
- _7_nJRec = uint32((_szJ - (_pPager.X34)) / int64((_pPager.X48)+i32(8)))
+ if (_7_nJRec == (0)) && ((_pPager.XjournalHdr + int64(_pPager.XsectorSize)) == _pPager.XjournalOff) {
+ _7_nJRec = uint32((_szJ - _pPager.XjournalOff) / int64(_pPager.XpageSize+int32(8)))
}
- _7_ii = uint32(i32(0))
+ _7_ii = 0
_30:
- if _rc != i32(0) || _7_ii >= _7_nJRec || (_pPager.X34) >= _szJ {
+ if _rc != int32(0) || _7_ii >= _7_nJRec || _pPager.XjournalOff >= _szJ {
goto _35
}
- _rc = _pager_playback_one_page(tls, _pPager, (*int64)(unsafe.Pointer(&(_pPager.X34))), _pDone, i32(1), i32(1))
+ _rc = _pager_playback_one_page(tls, _pPager, &_pPager.XjournalOff, _pDone, int32(1), int32(1))
_7_ii += 1
goto _30
_35:
func() {
- if _rc == i32(101) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50364), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000))), unsafe.Pointer(str(15026)))
+ if _rc == int32(101) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50364), unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000), unsafe.Pointer(str(14981)))
crt.X__builtin_abort(tls)
}
}()
goto _22
_24:
func() {
- if _rc == i32(0) && (_pPager.X34) < _szJ {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50366), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000))), unsafe.Pointer(str(15125)))
+ if _rc == int32(0) && _pPager.XjournalOff < _szJ {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50366), unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000), unsafe.Pointer(str(15080)))
crt.X__builtin_abort(tls)
}
}()
if _pSavepoint == nil {
goto _41
}
- _10_offset = int64(_pSavepoint.X4) * int64(i32(4)+(_pPager.X48))
- if (*XWal)(_pPager.X60) != nil {
- _rc = _sqlite3WalSavepointUndo(tls, (*XWal)(_pPager.X60), (*uint32)(unsafe.Pointer((*[4]uint32)(unsafe.Pointer(&(_pSavepoint.X5))))))
+ _10_offset = int64(_pSavepoint.XiSubRec) * int64(int32(4)+_pPager.XpageSize)
+ if (*XWal)(_pPager.XpWal) != nil {
+ _rc = _sqlite3WalSavepointUndo(tls, (*XWal)(_pPager.XpWal), (*uint32)(unsafe.Pointer(&_pSavepoint.XaWalData)))
}
- _10_ii = _pSavepoint.X4
+ _10_ii = _pSavepoint.XiSubRec
_43:
- if _rc != i32(0) || _10_ii >= (_pPager.X29) {
+ if _rc != int32(0) || _10_ii >= _pPager.XnSubRec {
goto _47
}
func() {
- if _10_offset != (int64(_10_ii) * int64(i32(4)+(_pPager.X48))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50380), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000))), unsafe.Pointer(str(15166)))
+ if _10_offset != (int64(_10_ii) * int64(int32(4)+_pPager.XpageSize)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50380), unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000), unsafe.Pointer(str(15121)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _pager_playback_one_page(tls, _pPager, &_10_offset, _pDone, i32(0), i32(1))
+ _rc = _pager_playback_one_page(tls, _pPager, &_10_offset, _pDone, int32(0), int32(1))
_10_ii += 1
goto _43
_47:
func() {
- if _rc == i32(101) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50383), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000))), unsafe.Pointer(str(15026)))
+ if _rc == int32(101) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50383), unsafe.Pointer(&_pagerPlaybackSavepointØ00__func__Ø000), unsafe.Pointer(str(14981)))
crt.X__builtin_abort(tls)
}
}()
_41:
_sqlite3BitvecDestroy(tls, _pDone)
- if _rc == i32(0) {
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = _szJ
+ if _rc == int32(0) {
+ _pPager.XjournalOff = _szJ
}
return _rc
-
- _ = _7_dummy
- panic(0)
}
var _pagerPlaybackSavepointØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_pagerPlaybackSavepointØ00__func__Ø000[0], str(15203), 23)
+ crt.Xstrncpy(nil, &_pagerPlaybackSavepointØ00__func__Ø000[0], str(15158), 23)
}
-// This function is called to rollback a transaction on a WAL database.
+// C comment
+// /*
+// ** This function is called to rollback a transaction on a WAL database.
+// */
func _pagerRollbackWal(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc int32
var _pList, _1_pNext *XPgHdr
- *(*uint32)(unsafe.Pointer(&(_pPager.X22))) = _pPager.X23
- _rc = _sqlite3WalUndo(tls, (*XWal)(_pPager.X60), _pagerUndoCallback, (unsafe.Pointer)(_pPager))
- _pList = _sqlite3PcacheDirtyList(tls, (*XPCache)(_pPager.X59))
+ _pPager.XdbSize = _pPager.XdbOrigSize
+ _rc = _sqlite3WalUndo(tls, (*XWal)(_pPager.XpWal), _pagerUndoCallback, unsafe.Pointer(_pPager))
+ _pList = _sqlite3PcacheDirtyList(tls, (*XPCache)(_pPager.XpPCache))
_0:
- if (_pList != nil) && (_rc == i32(0)) {
- _1_pNext = (*XPgHdr)(_pList.X3)
- _rc = _pagerUndoCallback(tls, (unsafe.Pointer)(_pPager), _pList.X5)
+ if (_pList != nil) && (_rc == int32(0)) {
+ _1_pNext = (*XPgHdr)(_pList.XpDirty)
+ _rc = _pagerUndoCallback(tls, unsafe.Pointer(_pPager), _pList.Xpgno)
_pList = _1_pNext
goto _0
}
return _rc
}
-// If any data has been written (but not committed) to the log file, this
-// function moves the write-pointer back to the start of the transaction.
-//
-// Additionally, the callback function is invoked for each frame written
-// to the WAL since the start of the transaction. If the callback returns
-// other than SQLITE_OK, it is not invoked again and the error code is
-// returned to the caller.
-//
-// Otherwise, if the callback function does not return an error, this
-// function returns SQLITE_OK.
+// C comment
+// /*
+// ** If any data has been written (but not committed) to the log file, this
+// ** function moves the write-pointer back to the start of the transaction.
+// **
+// ** Additionally, the callback function is invoked for each frame written
+// ** to the WAL since the start of the transaction. If the callback returns
+// ** other than SQLITE_OK, it is not invoked again and the error code is
+// ** returned to the caller.
+// **
+// ** Otherwise, if the callback function does not return an error, this
+// ** function returns SQLITE_OK.
+// */
func _sqlite3WalUndo(tls *crt.TLS, _pWal *XWal, _xUndo func(*crt.TLS, unsafe.Pointer, uint32) int32, _pUndoCtx unsafe.Pointer) (r0 int32) {
var _rc int32
var _1_iMax, _1_iFrame uint32
- _rc = i32(0)
+ _rc = int32(0)
if func() int32 {
- if (_pWal.X12) != 0 {
- return i32(1)
+ if _pWal.XwriteLock != 0 {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57261), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalUndoØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57261), unsafe.Pointer(&_sqlite3WalUndoØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _2
}
- _1_iMax = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
- crt.Xmemcpy(tls, (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), (unsafe.Pointer)(_walIndexHdr(tls, _pWal)), u32(48))
- _1_iFrame = ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) + uint32(i32(1))
+ _1_iMax = _pWal.Xhdr.XmxFrame
+ crt.Xmemcpy(tls, unsafe.Pointer(&_pWal.Xhdr), unsafe.Pointer(_walIndexHdr(tls, _pWal)), uint32(48))
+ _1_iFrame = (_pWal.Xhdr.XmxFrame) + uint32(1)
_3:
if func() int32 {
- if _rc == i32(0) {
- return i32(1)
+ if _rc == int32(0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57271), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalUndoØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57271), unsafe.Pointer(&_sqlite3WalUndoØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 || _1_iFrame > _1_iMax {
goto _9
}
func() {
- if _walFramePgno(tls, _pWal, _1_iFrame) == uint32(i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57285), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalUndoØ00__func__Ø000))), unsafe.Pointer(str(15226)))
+ if _walFramePgno(tls, _pWal, _1_iFrame) == uint32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57285), unsafe.Pointer(&_sqlite3WalUndoØ00__func__Ø000), unsafe.Pointer(str(15181)))
crt.X__builtin_abort(tls)
}
}()
@@ -15685,7 +15911,7 @@ _3:
_1_iFrame += 1
goto _3
_9:
- if _1_iMax != ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
+ if _1_iMax != (_pWal.Xhdr.XmxFrame) {
_walCleanupHash(tls, _pWal)
}
_2:
@@ -15695,46 +15921,55 @@ _2:
var _sqlite3WalUndoØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalUndoØ00__func__Ø000[0], str(15256), 15)
+ crt.Xstrncpy(nil, &_sqlite3WalUndoØ00__func__Ø000[0], str(15211), 15)
}
-// Return a pointer to the WalIndexHdr structure in the wal-index.
+// C comment
+// /*
+// ** Return a pointer to the WalIndexHdr structure in the wal-index.
+// */
func _walIndexHdr(tls *crt.TLS, _pWal *XWal) (r0 *XWalIndexHdr) {
func() {
- if (_pWal.X5) <= i32(0) || (*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(i32(0))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55066), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexHdrØ00__func__Ø000))), unsafe.Pointer(str(15271)))
+ if _pWal.XnWiData <= int32(0) || (*elem36(_pWal.XapWiData, 0)) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55066), unsafe.Pointer(&_walIndexHdrØ00__func__Ø000), unsafe.Pointer(str(15226)))
crt.X__builtin_abort(tls)
}
}()
- return (*XWalIndexHdr)(unsafe.Pointer(*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(i32(0))))))
+ return (*XWalIndexHdr)(unsafe.Pointer(*elem36(_pWal.XapWiData, 0)))
}
var _walIndexHdrØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_walIndexHdrØ00__func__Ø000[0], str(15308), 12)
+ crt.Xstrncpy(nil, &_walIndexHdrØ00__func__Ø000[0], str(15263), 12)
}
-// Return the page number associated with frame iFrame in this WAL.
+// C comment
+// /*
+// ** Return the page number associated with frame iFrame in this WAL.
+// */
func _walFramePgno(tls *crt.TLS, _pWal *XWal, _iFrame uint32) (r0 uint32) {
var _iHash int32
_iHash = _walFramePage(tls, _iFrame)
- if _iHash == i32(0) {
- return *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(i32(0)))))) + 4*uintptr((u32(34)+_iFrame)-uint32(i32(1)))))
+ if _iHash == int32(0) {
+ return *elem7(*elem36(_pWal.XapWiData, 0), uintptr((uint32(34)+_iFrame)-uint32(1)))
}
- return *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(_iHash))))) + 4*uintptr(((_iFrame-uint32(i32(1)))-u32(4062))%uint32(i32(4096)))))
+ return *elem7(*elem36(_pWal.XapWiData, uintptr(_iHash)), uintptr(((_iFrame-uint32(1))-uint32(4062))%uint32(4096)))
}
-// Return the number of the wal-index page that contains the hash-table
-// and page-number array that contain entries corresponding to WAL frame
-// iFrame. The wal-index is broken up into 32KB pages. Wal-index pages
-// are numbered starting from 0.
+// C comment
+// /*
+// ** Return the number of the wal-index page that contains the hash-table
+// ** and page-number array that contain entries corresponding to WAL frame
+// ** iFrame. The wal-index is broken up into 32KB pages. Wal-index pages
+// ** are numbered starting from 0.
+// */
func _walFramePage(tls *crt.TLS, _iFrame uint32) (r0 int32) {
var _iHash int32
- _iHash = int32((((_iFrame + uint32(i32(4096))) - u32(4062)) - uint32(i32(1))) / uint32(i32(4096)))
+ _iHash = int32((((_iFrame + uint32(4096)) - uint32(4062)) - uint32(1)) / uint32(4096))
func() {
- if _iHash != i32(0) && _iFrame <= u32(4062) || _iHash < i32(1) && _iFrame > u32(4062) || _iHash > i32(1) && _iFrame <= u32(8158) || _iHash < i32(2) && _iFrame > u32(8158) || _iHash > i32(2) && _iFrame <= u32(12254) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55378), unsafe.Pointer((*int8)(unsafe.Pointer(&_walFramePageØ00__func__Ø000))), unsafe.Pointer(str(15320)))
+ if _iHash != int32(0) && _iFrame <= uint32(4062) || _iHash < int32(1) && _iFrame > uint32(4062) || _iHash > int32(1) && _iFrame <= uint32(8158) || _iHash < int32(2) && _iFrame > uint32(8158) || _iHash > int32(2) && _iFrame <= uint32(12254) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55378), unsafe.Pointer(&_walFramePageØ00__func__Ø000), unsafe.Pointer(str(15275)))
crt.X__builtin_abort(tls)
}
}()
@@ -15744,19 +15979,22 @@ func _walFramePage(tls *crt.TLS, _iFrame uint32) (r0 int32) {
var _walFramePageØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_walFramePageØ00__func__Ø000[0], str(15593), 13)
+ crt.Xstrncpy(nil, &_walFramePageØ00__func__Ø000[0], str(15548), 13)
}
-// Remove entries from the hash table that point to WAL slots greater
-// than pWal->hdr.mxFrame.
-//
-// This function is called whenever pWal->hdr.mxFrame is decreased due
-// to a rollback or savepoint.
-//
-// At most only the hash table containing pWal->hdr.mxFrame needs to be
-// updated. Any later hash tables will be automatically cleared when
-// pWal->hdr.mxFrame advances to the point where those hash tables are
-// actually needed.
+// C comment
+// /*
+// ** Remove entries from the hash table that point to WAL slots greater
+// ** than pWal->hdr.mxFrame.
+// **
+// ** This function is called whenever pWal->hdr.mxFrame is decreased due
+// ** to a rollback or savepoint.
+// **
+// ** At most only the hash table containing pWal->hdr.mxFrame needs to be
+// ** updated. Any later hash tables will be automatically cleared when
+// ** pWal->hdr.mxFrame advances to the point where those hash tables are
+// ** actually needed.
+// */
func _walCleanupHash(tls *crt.TLS, _pWal *XWal) {
var _iLimit, _nByte, _i int32
var _iZero uint32
@@ -15764,70 +16002,73 @@ func _walCleanupHash(tls *crt.TLS, _pWal *XWal) {
var _aHash *uint16
_aHash = nil
_aPgno = nil
- _iZero = u32(0)
- _iLimit = i32(0)
+ _iZero = uint32(0)
+ _iLimit = int32(0)
func() {
- if (_pWal.X12) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55418), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCleanupHashØ00__func__Ø000))), unsafe.Pointer(str(15606)))
+ if _pWal.XwriteLock == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55418), unsafe.Pointer(&_walCleanupHashØ00__func__Ø000), unsafe.Pointer(str(15561)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) == uint32(i32(0)) {
+ if (_pWal.Xhdr.XmxFrame) == (0) {
return
}
func() {
- if (_pWal.X5) <= _walFramePage(tls, (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55429), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCleanupHashØ00__func__Ø000))), unsafe.Pointer(str(15622)))
+ if _pWal.XnWiData <= _walFramePage(tls, _pWal.Xhdr.XmxFrame) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55429), unsafe.Pointer(&_walCleanupHashØ00__func__Ø000), unsafe.Pointer(str(15577)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(_walFramePage(tls, (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55430), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCleanupHashØ00__func__Ø000))), unsafe.Pointer(str(15668)))
+ if (*elem36(_pWal.XapWiData, uintptr(_walFramePage(tls, _pWal.Xhdr.XmxFrame)))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55430), unsafe.Pointer(&_walCleanupHashØ00__func__Ø000), unsafe.Pointer(str(15623)))
crt.X__builtin_abort(tls)
}
}()
- _walHashGet(tls, _pWal, _walFramePage(tls, (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6), &_aHash, &_aPgno, &_iZero)
- _iLimit = int32(((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) - _iZero)
+ _walHashGet(tls, _pWal, _walFramePage(tls, _pWal.Xhdr.XmxFrame), &_aHash, &_aPgno, &_iZero)
+ _iLimit = int32((_pWal.Xhdr.XmxFrame) - _iZero)
func() {
- if _iLimit <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55437), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCleanupHashØ00__func__Ø000))), unsafe.Pointer(str(15716)))
+ if _iLimit <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55437), unsafe.Pointer(&_walCleanupHashØ00__func__Ø000), unsafe.Pointer(str(15671)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_9:
- if _i >= i32(8192) {
+ if _i >= int32(8192) {
goto _12
}
- if int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHash)) + 2*uintptr(_i)))) > _iLimit {
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHash)) + 2*uintptr(_i))) = uint16(i32(0))
+ if int32(*elem20(_aHash, uintptr(_i))) > _iLimit {
+ *elem20(_aHash, uintptr(_i)) = 0
}
_i += 1
goto _9
_12:
- _nByte = int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_aHash)))) - uintptr(unsafe.Pointer((*int8)(unsafe.Pointer((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno))+4*uintptr(_iLimit+i32(1))))))))) / 1)
- crt.Xmemset(tls, (unsafe.Pointer)((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno))+4*uintptr(_iLimit+i32(1))))), i32(0), uint32(_nByte))
+ _nByte = int32(uintptr(unsafe.Pointer(_aHash)) - uintptr(unsafe.Pointer(elem7(_aPgno, uintptr(_iLimit+int32(1))))))
+ crt.Xmemset(tls, unsafe.Pointer(elem7(_aPgno, uintptr(_iLimit+int32(1)))), int32(0), uint32(_nByte))
}
var _walCleanupHashØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_walCleanupHashØ00__func__Ø000[0], str(15725), 15)
-}
-
-// Return pointers to the hash table and page number array stored on
-// page iHash of the wal-index. The wal-index is broken into 32KB pages
-// numbered starting from 0.
-//
-// Set output variable *paHash to point to the start of the hash table
-// in the wal-index file. Set *piZero to one less than the frame
-// number of the first frame indexed by this hash table. If a
-// slot in the hash table is set to N, it refers to frame number
-// (*piZero+N) in the log.
-//
-// Finally, set *paPgno so that *paPgno[1] is the page number of the
-// first frame indexed by the hash table, frame (*piZero+1).
+ crt.Xstrncpy(nil, &_walCleanupHashØ00__func__Ø000[0], str(15680), 15)
+}
+
+// C comment
+// /*
+// ** Return pointers to the hash table and page number array stored on
+// ** page iHash of the wal-index. The wal-index is broken into 32KB pages
+// ** numbered starting from 0.
+// **
+// ** Set output variable *paHash to point to the start of the hash table
+// ** in the wal-index file. Set *piZero to one less than the frame
+// ** number of the first frame indexed by this hash table. If a
+// ** slot in the hash table is set to N, it refers to frame number
+// ** (*piZero+N) in the log.
+// **
+// ** Finally, set *paPgno so that *paPgno[1] is the page number of the
+// ** first frame indexed by the hash table, frame (*piZero+1).
+// */
func _walHashGet(tls *crt.TLS, _pWal *XWal, _iHash int32, _paHash **uint16, _paPgno **uint32, _piZero *uint32) (r0 int32) {
var _rc int32
var _1_iZero uint32
@@ -15835,80 +16076,82 @@ func _walHashGet(tls *crt.TLS, _pWal *XWal, _iHash int32, _paHash **uint16, _paP
var _1_aHash *uint16
_rc = _walIndexPage(tls, _pWal, _iHash, &_aPgno)
func() {
- if _rc != i32(0) && _iHash <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55349), unsafe.Pointer((*int8)(unsafe.Pointer(&_walHashGetØ00__func__Ø000))), unsafe.Pointer(str(15740)))
+ if _rc != int32(0) && _iHash <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55349), unsafe.Pointer(&_walHashGetØ00__func__Ø000), unsafe.Pointer(str(15695)))
crt.X__builtin_abort(tls)
}
}()
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _3
}
- _1_aHash = (*uint16)(unsafe.Pointer((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno)) + 4*uintptr(i32(4096))))))
- if _iHash == i32(0) {
- _aPgno = (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno)) + 4*uintptr(u32(34))))
- _1_iZero = uint32(i32(0))
+ _1_aHash = (*uint16)(unsafe.Pointer(elem7(_aPgno, uintptr(4096))))
+ if _iHash == int32(0) {
+ _aPgno = elem7(_aPgno, uintptr(34))
+ _1_iZero = 0
goto _5
}
- _1_iZero = u32(4062) + uint32((_iHash-i32(1))*i32(4096))
+ _1_iZero = uint32(4062) + uint32((_iHash-int32(1))*int32(4096))
_5:
- *_paPgno = (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno)) + 4*uintptr(i32(-1))))
+ *_paPgno = elem7(_aPgno, uintptr(4294967295))
*_paHash = _1_aHash
*_piZero = _1_iZero
_3:
return _rc
}
-// Obtain a pointer to the iPage'th page of the wal-index. The wal-index
-// is broken into pages of WALINDEX_PGSZ bytes. Wal-index pages are
-// numbered from zero.
-//
-// If this call is successful, *ppPage is set to point to the wal-index
-// page and SQLITE_OK is returned. If an error (an OOM or VFS error) occurs,
-// then an SQLite error code is returned and *ppPage is set to 0.
+// C comment
+// /*
+// ** Obtain a pointer to the iPage'th page of the wal-index. The wal-index
+// ** is broken into pages of WALINDEX_PGSZ bytes. Wal-index pages are
+// ** numbered from zero.
+// **
+// ** If this call is successful, *ppPage is set to point to the wal-index
+// ** page and SQLITE_OK is returned. If an error (an OOM or VFS error) occurs,
+// ** then an SQLite error code is returned and *ppPage is set to 0.
+// */
func _walIndexPage(tls *crt.TLS, _pWal *XWal, _iPage int32, _ppPage **uint32) (r0 int32) {
var _rc, _1_nByte int32
var _1_apNew **uint32
- _rc = i32(0)
- if (_pWal.X5) > _iPage {
+ _rc = int32(0)
+ if _pWal.XnWiData > _iPage {
goto _0
}
- _1_nByte = int32(u32(4) * uint32(_iPage+i32(1)))
- _1_apNew = (**uint32)(Xsqlite3_realloc64(tls, (unsafe.Pointer)(_pWal.X7), uint64(_1_nByte)))
+ _1_nByte = int32(uint32(4) * uint32(_iPage+int32(1)))
+ _1_apNew = (**uint32)(Xsqlite3_realloc64(tls, unsafe.Pointer(_pWal.XapWiData), uint64(_1_nByte)))
if _1_apNew == nil {
*_ppPage = nil
- return _sqlite3NomemError(tls, i32(55025))
+ return _sqlite3NomemError(tls, int32(55025))
}
- crt.Xmemset(tls, (unsafe.Pointer)((**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_apNew))+4*uintptr(_pWal.X5)))), i32(0), u32(4)*uint32((_iPage+i32(1))-(_pWal.X5)))
- *(***uint32)(unsafe.Pointer(&(_pWal.X7))) = _1_apNew
- *(*int32)(unsafe.Pointer(&(_pWal.X5))) = _iPage + i32(1)
+ crt.Xmemset(tls, unsafe.Pointer(elem36(_1_apNew, uintptr(_pWal.XnWiData))), int32(0), uint32(4)*uint32((_iPage+int32(1))-_pWal.XnWiData))
+ _pWal.XapWiData = _1_apNew
+ _pWal.XnWiData = _iPage + int32(1)
_0:
- if (*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(_iPage)))) != nil {
+ if (*elem36(_pWal.XapWiData, uintptr(_iPage))) != nil {
goto _2
}
- if int32(_pWal.X11) != i32(2) {
+ if int32(_pWal.XexclusiveMode) != int32(2) {
goto _3
}
- *(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(_iPage))) = (*uint32)(_sqlite3MallocZero(tls, uint64(u32(32768))))
- if (*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(_iPage)))) == nil {
- _rc = _sqlite3NomemError(tls, i32(55037))
+ *elem36(_pWal.XapWiData, uintptr(_iPage)) = (*uint32)(_sqlite3MallocZero(tls, uint64(32768)))
+ if (*elem36(_pWal.XapWiData, uintptr(_iPage))) == nil {
+ _rc = _sqlite3NomemError(tls, int32(55037))
}
goto _5
_3:
- _rc = _sqlite3OsShmMap(tls, (*Xsqlite3_file)(_pWal.X1), _iPage, int32(u32(32768)), int32(_pWal.X12), (*unsafe.Pointer)(unsafe.Pointer((**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7))+4*uintptr(_iPage))))))
- if _rc == i32(8) {
+ _rc = _sqlite3OsShmMap(tls, (*Xsqlite3_file)(_pWal.XpDbFd), _iPage, int32(32768), int32(_pWal.XwriteLock), (*unsafe.Pointer)(unsafe.Pointer(elem36(_pWal.XapWiData, uintptr(_iPage)))))
+ if _rc == int32(8) {
{
- p := (*uint8)(unsafe.Pointer(&(_pWal.X14)))
- *p = uint8(int32(*p) | i32(2))
- sink2(*p)
+ p := &_pWal.XreadOnly
+ *p = uint8(int32(*p) | int32(2))
}
- _rc = i32(0)
+ _rc = int32(0)
}
_5:
_2:
- *_ppPage = *(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(_iPage)))
+ *_ppPage = *elem36(_pWal.XapWiData, uintptr(_iPage))
func() {
- if _iPage != i32(0) && (*_ppPage) == nil && _rc == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55050), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexPageØ00__func__Ø000))), unsafe.Pointer(str(15765)))
+ if _iPage != int32(0) && (*_ppPage) == nil && _rc == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55050), unsafe.Pointer(&_walIndexPageØ00__func__Ø000), unsafe.Pointer(str(15720)))
crt.X__builtin_abort(tls)
}
}()
@@ -15916,43 +16159,47 @@ _2:
}
func _sqlite3OsShmMap(tls *crt.TLS, _id *Xsqlite3_file, _iPage int32, _pgsz int32, _bExtend int32, _pp *unsafe.Pointer) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X13)})))(tls, _id, _iPage, _pgsz, _bExtend, _pp)
+ return func() func(*crt.TLS, *Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxShmMap
+ return *(*func(*crt.TLS, *Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _iPage, _pgsz, _bExtend, _pp)
}
var _walIndexPageØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_walIndexPageØ00__func__Ø000[0], str(15802), 13)
+ crt.Xstrncpy(nil, &_walIndexPageØ00__func__Ø000[0], str(15757), 13)
}
var _walHashGetØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_walHashGetØ00__func__Ø000[0], str(15815), 11)
+ crt.Xstrncpy(nil, &_walHashGetØ00__func__Ø000[0], str(15770), 11)
}
-// This function is invoked once for each page that has already been
-// written into the log file when a WAL transaction is rolled back.
-// Parameter iPg is the page number of said page. The pCtx argument
-// is actually a pointer to the Pager structure.
-//
-// If page iPg is present in the cache, and has no outstanding references,
-// it is discarded. Otherwise, if there are one or more outstanding
-// references, the page content is reloaded from the database. If the
-// attempt to reload content from the database is required and fails,
-// return an SQLite error code. Otherwise, SQLITE_OK.
+// C comment
+// /*
+// ** This function is invoked once for each page that has already been
+// ** written into the log file when a WAL transaction is rolled back.
+// ** Parameter iPg is the page number of said page. The pCtx argument
+// ** is actually a pointer to the Pager structure.
+// **
+// ** If page iPg is present in the cache, and has no outstanding references,
+// ** it is discarded. Otherwise, if there are one or more outstanding
+// ** references, the page content is reloaded from the database. If the
+// ** attempt to reload content from the database is required and fails,
+// ** return an SQLite error code. Otherwise, SQLITE_OK.
+// */
func _pagerUndoCallback(tls *crt.TLS, _pCtx unsafe.Pointer, _iPg uint32) (r0 int32) {
var _rc int32
var _3_iFrame uint32
var _pPager *XPager
var _pPg *XPgHdr
- _rc = i32(0)
+ _rc = int32(0)
_pPager = (*XPager)(_pCtx)
func() {
- if (*XWal)(_pPager.X60) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49991), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerUndoCallbackØ00__func__Ø000))), unsafe.Pointer(str(15826)))
+ if (*XWal)(_pPager.XpWal) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49991), unsafe.Pointer(&_pagerUndoCallbackØ00__func__Ø000), unsafe.Pointer(str(15781)))
crt.X__builtin_abort(tls)
}
}()
@@ -15960,187 +16207,198 @@ func _pagerUndoCallback(tls *crt.TLS, _pCtx unsafe.Pointer, _iPg uint32) (r0 int
if _pPg == nil {
goto _2
}
- if _sqlite3PcachePageRefcount(tls, _pPg) == i32(1) {
+ if _sqlite3PcachePageRefcount(tls, _pPg) == int32(1) {
_sqlite3PcacheDrop(tls, _pPg)
goto _4
}
- _3_iFrame = u32(0)
- _rc = _sqlite3WalFindFrame(tls, (*XWal)(_pPager.X60), _pPg.X5, &_3_iFrame)
- if _rc == i32(0) {
+ _3_iFrame = uint32(0)
+ _rc = _sqlite3WalFindFrame(tls, (*XWal)(_pPager.XpWal), _pPg.Xpgno, &_3_iFrame)
+ if _rc == int32(0) {
_rc = _readDbPage(tls, _pPg, _3_iFrame)
}
- if _rc == i32(0) {
- (*(*func(*crt.TLS, *XPgHdr))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_pPager.X56)})))(tls, _pPg)
+ if _rc == int32(0) {
+ func() func(*crt.TLS, *XPgHdr) {
+ v := _pPager.XxReiniter
+ return *(*func(*crt.TLS, *XPgHdr))(unsafe.Pointer(&v))
+ }()(tls, _pPg)
}
_sqlite3PagerUnrefNotNull(tls, _pPg)
_4:
_2:
- _sqlite3BackupRestart(tls, (*Xsqlite3_backup)(_pPager.X36))
+ _sqlite3BackupRestart(tls, (*Xsqlite3_backup)(_pPager.XpBackup))
return _rc
}
var _pagerUndoCallbackØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_pagerUndoCallbackØ00__func__Ø000[0], str(15846), 18)
+ crt.Xstrncpy(nil, &_pagerUndoCallbackØ00__func__Ø000[0], str(15801), 18)
}
-// Acquire a page if it is already in the in-memory cache. Do
-// not read the page from disk. Return a pointer to the page,
-// or 0 if the page is not in cache.
-//
-// See also sqlite3PagerGet(). The difference between this routine
-// and sqlite3PagerGet() is that _get() will go to the disk and read
-// in the page if the page is not already in cache. This routine
-// returns NULL if the page is not in cache or if a disk I/O error
-// has ever happened.
+// C comment
+// /*
+// ** Acquire a page if it is already in the in-memory cache. Do
+// ** not read the page from disk. Return a pointer to the page,
+// ** or 0 if the page is not in cache.
+// **
+// ** See also sqlite3PagerGet(). The difference between this routine
+// ** and sqlite3PagerGet() is that _get() will go to the disk and read
+// ** in the page if the page is not already in cache. This routine
+// ** returns NULL if the page is not in cache or if a disk I/O error
+// ** has ever happened.
+// */
func _sqlite3PagerLookup(tls *crt.TLS, _pPager *XPager, _pgno uint32) (r0 *XPgHdr) {
var _pPage *Xsqlite3_pcache_page
func() {
if _pPager == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52532), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerLookupØ00__func__Ø000))), unsafe.Pointer(str(15864)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52532), unsafe.Pointer(&_sqlite3PagerLookupØ00__func__Ø000), unsafe.Pointer(str(15819)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pgno == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52533), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerLookupØ00__func__Ø000))), unsafe.Pointer(str(15874)))
+ if _pgno == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52533), unsafe.Pointer(&_sqlite3PagerLookupØ00__func__Ø000), unsafe.Pointer(str(15829)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPCache)(_pPager.X59) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52534), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerLookupØ00__func__Ø000))), unsafe.Pointer(str(15882)))
+ if (*XPCache)(_pPager.XpPCache) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52534), unsafe.Pointer(&_sqlite3PagerLookupØ00__func__Ø000), unsafe.Pointer(str(15837)))
crt.X__builtin_abort(tls)
}
}()
- _pPage = _sqlite3PcacheFetch(tls, (*XPCache)(_pPager.X59), _pgno, i32(0))
+ _pPage = _sqlite3PcacheFetch(tls, (*XPCache)(_pPager.XpPCache), _pgno, int32(0))
func() {
- if _pPage != nil && (_pPager.X21) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52536), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerLookupØ00__func__Ø000))), unsafe.Pointer(str(15901)))
+ if _pPage != nil && _pPager.XhasHeldSharedLock == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52536), unsafe.Pointer(&_sqlite3PagerLookupØ00__func__Ø000), unsafe.Pointer(str(15856)))
crt.X__builtin_abort(tls)
}
}()
if _pPage == nil {
return nil
}
- return _sqlite3PcacheFetchFinish(tls, (*XPCache)(_pPager.X59), _pgno, _pPage)
+ return _sqlite3PcacheFetchFinish(tls, (*XPCache)(_pPager.XpPCache), _pgno, _pPage)
}
var _sqlite3PagerLookupØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerLookupØ00__func__Ø000[0], str(15939), 19)
-}
-
-// Try to obtain a page from the cache.
-//
-// This routine returns a pointer to an sqlite3_pcache_page object if
-// such an object is already in cache, or if a new one is created.
-// This routine returns a NULL pointer if the object was not in cache
-// and could not be created.
-//
-// The createFlags should be 0 to check for existing pages and should
-// be 3 (not 1, but 3) to try to create a new page.
-//
-// If the createFlag is 0, then NULL is always returned if the page
-// is not already in the cache. If createFlag is 1, then a new page
-// is created only if that can be done without spilling dirty pages
-// and without exceeding the cache size limit.
-//
-// The caller needs to invoke sqlite3PcacheFetchFinish() to properly
-// initialize the sqlite3_pcache_page object and convert it into a
-// PgHdr object. The sqlite3PcacheFetch() and sqlite3PcacheFetchFinish()
-// routines are split this way for performance reasons. When separated
-// they can both (usually) operate without having to push values to
-// the stack on entry and pop them back off on exit, which saves a
-// lot of pushing and popping.
+ crt.Xstrncpy(nil, &_sqlite3PagerLookupØ00__func__Ø000[0], str(15894), 19)
+}
+
+// C comment
+// /*
+// ** Try to obtain a page from the cache.
+// **
+// ** This routine returns a pointer to an sqlite3_pcache_page object if
+// ** such an object is already in cache, or if a new one is created.
+// ** This routine returns a NULL pointer if the object was not in cache
+// ** and could not be created.
+// **
+// ** The createFlags should be 0 to check for existing pages and should
+// ** be 3 (not 1, but 3) to try to create a new page.
+// **
+// ** If the createFlag is 0, then NULL is always returned if the page
+// ** is not already in the cache. If createFlag is 1, then a new page
+// ** is created only if that can be done without spilling dirty pages
+// ** and without exceeding the cache size limit.
+// **
+// ** The caller needs to invoke sqlite3PcacheFetchFinish() to properly
+// ** initialize the sqlite3_pcache_page object and convert it into a
+// ** PgHdr object. The sqlite3PcacheFetch() and sqlite3PcacheFetchFinish()
+// ** routines are split this way for performance reasons. When separated
+// ** they can both (usually) operate without having to push values to
+// ** the stack on entry and pop them back off on exit, which saves a
+// ** lot of pushing and popping.
+// */
func _sqlite3PcacheFetch(tls *crt.TLS, _pCache *XPCache, _pgno uint32, _createFlag int32) (r0 *Xsqlite3_pcache_page) {
var _eCreate int32
var _pRes *Xsqlite3_pcache_page
func() {
if _pCache == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44495), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000))), unsafe.Pointer(str(14006)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44495), unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000), unsafe.Pointer(str(13961)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCache.X12) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44496), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000))), unsafe.Pointer(str(15958)))
+ if _pCache.XpCache == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44496), unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000), unsafe.Pointer(str(15913)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _createFlag != i32(3) && _createFlag != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44497), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000))), unsafe.Pointer(str(15976)))
+ if _createFlag != int32(3) && _createFlag != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44497), unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000), unsafe.Pointer(str(15931)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCache.X9) != func() int32 {
- if ((_pCache.X8) != 0) && ((*XPgHdr)(_pCache.X0) != nil) {
- return i32(1)
+ if int32(_pCache.XeCreate) != func() int32 {
+ if (_pCache.XbPurgeable != 0) && (_pCache.XpDirty != nil) {
+ return int32(1)
}
- return i32(2)
+ return int32(2)
}() {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44498), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000))), unsafe.Pointer(str(16007)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44498), unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000), unsafe.Pointer(str(15962)))
crt.X__builtin_abort(tls)
}
}()
- _eCreate = _createFlag & int32(_pCache.X9)
+ _eCreate = _createFlag & int32(_pCache.XeCreate)
func() {
- if _eCreate != i32(0) && _eCreate != i32(1) && _eCreate != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44508), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000))), unsafe.Pointer(str(16073)))
+ if _eCreate != int32(0) && _eCreate != int32(1) && _eCreate != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44508), unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000), unsafe.Pointer(str(16028)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _createFlag != i32(0) && int32(_pCache.X9) != _eCreate {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44509), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000))), unsafe.Pointer(str(16112)))
+ if _createFlag != int32(0) && int32(_pCache.XeCreate) != _eCreate {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44509), unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000), unsafe.Pointer(str(16067)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _createFlag != i32(0) && _eCreate != (i32(1)+bool2int(((_pCache.X8) == 0) || ((*XPgHdr)(_pCache.X0) == nil))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44510), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000))), unsafe.Pointer(str(16154)))
+ if _createFlag != int32(0) && _eCreate != (int32(1)+bool2int((_pCache.XbPurgeable == 0) || (_pCache.XpDirty == nil))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44510), unsafe.Pointer(&_sqlite3PcacheFetchØ00__func__Ø000), unsafe.Pointer(str(16109)))
crt.X__builtin_abort(tls)
}
}()
- _pRes = (*(*func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, uint32, int32) unsafe.Pointer
- }{((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X7)})))(tls, _pCache.X12, _pgno, _eCreate)
+ _pRes = func() func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page {
+ v := _sqlite3Config.Xpcache2.XxFetch
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page)(unsafe.Pointer(&v))
+ }()(tls, _pCache.XpCache, _pgno, _eCreate)
return _pRes
}
var _sqlite3PcacheFetchØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheFetchØ00__func__Ø000[0], str(16221), 19)
+ crt.Xstrncpy(nil, &_sqlite3PcacheFetchØ00__func__Ø000[0], str(16176), 19)
}
-// This routine converts the sqlite3_pcache_page object returned by
-// sqlite3PcacheFetch() into an initialized PgHdr object. This routine
-// must be called after sqlite3PcacheFetch() in order to get a usable
-// result.
+// C comment
+// /*
+// ** This routine converts the sqlite3_pcache_page object returned by
+// ** sqlite3PcacheFetch() into an initialized PgHdr object. This routine
+// ** must be called after sqlite3PcacheFetch() in order to get a usable
+// ** result.
+// */
func _sqlite3PcacheFetchFinish(tls *crt.TLS, _pCache *XPCache, _pgno uint32, _pPage *Xsqlite3_pcache_page) (r0 *XPgHdr) {
var _pPgHdr *XPgHdr
func() {
if _pPage == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44617), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheFetchFinishØ00__func__Ø000))), unsafe.Pointer(str(2899)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44617), unsafe.Pointer(&_sqlite3PcacheFetchFinishØ00__func__Ø000), unsafe.Pointer(str(2800)))
crt.X__builtin_abort(tls)
}
}()
- _pPgHdr = (*XPgHdr)(_pPage.X1)
- if (*Xsqlite3_pcache_page)(_pPgHdr.X0) == nil {
+ _pPgHdr = (*XPgHdr)(_pPage.XpExtra)
+ if _pPgHdr.XpPage == nil {
return _pcacheFetchFinishWithInit(tls, _pCache, _pgno, _pPage)
}
- *(*int32)(unsafe.Pointer(&(_pCache.X3))) += 1
- *(*int16)(unsafe.Pointer(&(_pPgHdr.X7))) += 1
+ _pCache.XnRefSum += 1
+ _pPgHdr.XnRef += 1
func() {
if _sqlite3PcachePageSanity(tls, _pPgHdr) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44625), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheFetchFinishØ00__func__Ø000))), unsafe.Pointer(str(16240)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44625), unsafe.Pointer(&_sqlite3PcacheFetchFinishØ00__func__Ø000), unsafe.Pointer(str(16195)))
crt.X__builtin_abort(tls)
}
}()
@@ -16150,135 +16408,148 @@ func _sqlite3PcacheFetchFinish(tls *crt.TLS, _pCache *XPCache, _pgno uint32, _pP
var _sqlite3PcacheFetchFinishØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheFetchFinishØ00__func__Ø000[0], str(16272), 25)
+ crt.Xstrncpy(nil, &_sqlite3PcacheFetchFinishØ00__func__Ø000[0], str(16227), 25)
}
-// This is a helper routine for sqlite3PcacheFetchFinish()
-//
-// In the uncommon case where the page being fetched has not been
-// initialized, this routine is invoked to do the initialization.
-// This routine is broken out into a separate function since it
-// requires extra stack manipulation that can be avoided in the common
-// case.
+// C comment
+// /*
+// ** This is a helper routine for sqlite3PcacheFetchFinish()
+// **
+// ** In the uncommon case where the page being fetched has not been
+// ** initialized, this routine is invoked to do the initialization.
+// ** This routine is broken out into a separate function since it
+// ** requires extra stack manipulation that can be avoided in the common
+// ** case.
+// */
func _pcacheFetchFinishWithInit(tls *crt.TLS, _pCache *XPCache, _pgno uint32, _pPage *Xsqlite3_pcache_page) (r0 *XPgHdr) {
var _pPgHdr *XPgHdr
func() {
if _pPage == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44590), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheFetchFinishWithInitØ00__func__Ø000))), unsafe.Pointer(str(2899)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44590), unsafe.Pointer(&_pcacheFetchFinishWithInitØ00__func__Ø000), unsafe.Pointer(str(2800)))
crt.X__builtin_abort(tls)
}
}()
- _pPgHdr = (*XPgHdr)(_pPage.X1)
+ _pPgHdr = (*XPgHdr)(_pPage.XpExtra)
func() {
- if (*Xsqlite3_pcache_page)(_pPgHdr.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44592), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheFetchFinishWithInitØ00__func__Ø000))), unsafe.Pointer(str(16297)))
+ if (*Xsqlite3_pcache_page)(_pPgHdr.XpPage) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44592), unsafe.Pointer(&_pcacheFetchFinishWithInitØ00__func__Ø000), unsafe.Pointer(str(16252)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, (unsafe.Pointer)((*unsafe.Pointer)(unsafe.Pointer(&(_pPgHdr.X3)))), i32(0), u32(28))
- *(**Xsqlite3_pcache_page)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPgHdr.X0))))) = _pPage
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pPgHdr.X1))) = _pPage.X0
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pPgHdr.X2))) = (unsafe.Pointer)((*XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPgHdr)) + 40*uintptr(i32(1)))))
- crt.Xmemset(tls, _pPgHdr.X2, i32(0), uint32(i32(8)))
- *(**XPCache)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPgHdr.X8))))) = _pCache
- *(*uint32)(unsafe.Pointer(&(_pPgHdr.X5))) = _pgno
- *(*uint16)(unsafe.Pointer(&(_pPgHdr.X6))) = uint16(i32(1))
+ crt.Xmemset(tls, unsafe.Pointer(&_pPgHdr.XpDirty), int32(0), uint32(28))
+ *(**Xsqlite3_pcache_page)(unsafe.Pointer(&_pPgHdr.XpPage)) = _pPage
+ _pPgHdr.XpData = _pPage.XpBuf
+ _pPgHdr.XpExtra = unsafe.Pointer(elem34(_pPgHdr, uintptr(1)))
+ crt.Xmemset(tls, _pPgHdr.XpExtra, int32(0), uint32(8))
+ *(**XPCache)(unsafe.Pointer(&_pPgHdr.XpCache)) = _pCache
+ _pPgHdr.Xpgno = _pgno
+ _pPgHdr.Xflags = uint16(1)
return _sqlite3PcacheFetchFinish(tls, _pCache, _pgno, _pPage)
}
var _pcacheFetchFinishWithInitØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_pcacheFetchFinishWithInitØ00__func__Ø000[0], str(16314), 26)
+ crt.Xstrncpy(nil, &_pcacheFetchFinishWithInitØ00__func__Ø000[0], str(16269), 26)
}
-// Return the number of references to the page supplied as an argument.
+// C comment
+// /*
+// ** Return the number of references to the page supplied as an argument.
+// */
func _sqlite3PcachePageRefcount(tls *crt.TLS, _p *XPgHdr) (r0 int32) {
- return int32(_p.X7)
+ return int32(_p.XnRef)
}
-// Drop a page from the cache. There must be exactly one reference to the
-// page. This function deletes that reference, so after it returns the
-// page pointed to by p is invalid.
+// C comment
+// /*
+// ** Drop a page from the cache. There must be exactly one reference to the
+// ** page. This function deletes that reference, so after it returns the
+// ** page pointed to by p is invalid.
+// */
func _sqlite3PcacheDrop(tls *crt.TLS, _p *XPgHdr) {
func() {
- if int32(_p.X7) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44665), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheDropØ00__func__Ø000))), unsafe.Pointer(str(16340)))
+ if int32(_p.XnRef) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44665), unsafe.Pointer(&_sqlite3PcacheDropØ00__func__Ø000), unsafe.Pointer(str(16295)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3PcachePageSanity(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44666), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheDropØ00__func__Ø000))), unsafe.Pointer(str(13867)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44666), unsafe.Pointer(&_sqlite3PcacheDropØ00__func__Ø000), unsafe.Pointer(str(13822)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_p.X6) & i32(2)) != 0 {
- _pcacheManageDirtyList(tls, _p, uint8(i32(1)))
+ if (int32(_p.Xflags) & int32(2)) != 0 {
+ _pcacheManageDirtyList(tls, _p, uint8(1))
}
- *(*int32)(unsafe.Pointer(&((*XPCache)(_p.X8).X3))) -= 1
- (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
- }{((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X8)})))(tls, (*XPCache)(_p.X8).X12, (*Xsqlite3_pcache_page)(_p.X0), i32(1))
+ (*XPCache)(_p.XpCache).XnRefSum -= 1
+ func() func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, int32) {
+ v := _sqlite3Config.Xpcache2.XxUnpin
+ return *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, int32))(unsafe.Pointer(&v))
+ }()(tls, (*XPCache)(_p.XpCache).XpCache, (*Xsqlite3_pcache_page)(_p.XpPage), int32(1))
}
var _sqlite3PcacheDropØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheDropØ00__func__Ø000[0], str(16351), 18)
+ crt.Xstrncpy(nil, &_sqlite3PcacheDropØ00__func__Ø000[0], str(16306), 18)
}
-// Search the wal file for page pgno. If found, set *piRead to the frame that
-// contains the page. Otherwise, if pgno is not in the wal file, set *piRead
-// to zero.
-//
-// Return SQLITE_OK if successful, or an error code if an error occurs. If an
-// error does occur, the final value of *piRead is undefined.
+// C comment
+// /*
+// ** Search the wal file for page pgno. If found, set *piRead to the frame that
+// ** contains the page. Otherwise, if pgno is not in the wal file, set *piRead
+// ** to zero.
+// **
+// ** Return SQLITE_OK if successful, or an error code if an error occurs. If an
+// ** error does occur, the final value of *piRead is undefined.
+// */
func _sqlite3WalFindFrame(tls *crt.TLS, _pWal *XWal, _pgno uint32, _piRead *uint32) (r0 int32) {
var _iHash, _iMinHash, _2_iKey, _2_nCollide, _2_rc int32
var _iRead, _iLast, _2_iZero, _4_iFrame uint32
var _2_aPgno *uint32
var _2_aHash *uint16
- _iRead = u32(0)
- _iLast = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
+ _iRead = uint32(0)
+ _iLast = _pWal.Xhdr.XmxFrame
func() {
- if int32(_pWal.X9) < i32(0) && (_pWal.X23) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57067), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalFindFrameØ00__func__Ø000))), unsafe.Pointer(str(16369)))
+ if int32(_pWal.XreadLock) < int32(0) && _pWal.XlockError == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57067), unsafe.Pointer(&_sqlite3WalFindFrameØ00__func__Ø000), unsafe.Pointer(str(16324)))
crt.X__builtin_abort(tls)
}
}()
- if (_iLast == uint32(i32(0))) || (int32(_pWal.X9) == i32(0)) {
- *_piRead = uint32(i32(0))
- return i32(0)
+ if (_iLast == (0)) || (int32(_pWal.XreadLock) == int32(0)) {
+ *_piRead = 0
+ return int32(0)
}
- _iMinHash = _walFramePage(tls, _pWal.X19)
+ _iMinHash = _walFramePage(tls, _pWal.XminFrame)
_iHash = _walFramePage(tls, _iLast)
_5:
- if _iHash < _iMinHash || _iRead != uint32(i32(0)) {
+ if _iHash < _iMinHash || _iRead != (0) {
goto _9
}
_2_rc = _walHashGet(tls, _pWal, _iHash, &_2_aHash, &_2_aPgno, &_2_iZero)
- if _2_rc != i32(0) {
+ if _2_rc != int32(0) {
return _2_rc
}
- _2_nCollide = i32(8192)
+ _2_nCollide = int32(8192)
_2_iKey = _walHash(tls, _pgno)
_11:
- if (*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_aHash)) + 2*uintptr(_2_iKey)))) == 0 {
+ if (*elem20(_2_aHash, uintptr(_2_iKey))) == 0 {
goto _14
}
- _4_iFrame = uint32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_aHash)) + 2*uintptr(_2_iKey)))) + _2_iZero
- if ((_4_iFrame <= _iLast) && (_4_iFrame >= (_pWal.X19))) && ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_aPgno)) + 4*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_aHash)) + 2*uintptr(_2_iKey))))))) == _pgno) {
+ _4_iFrame = uint32(*elem20(_2_aHash, uintptr(_2_iKey))) + _2_iZero
+ if ((_4_iFrame <= _iLast) && (_4_iFrame >= _pWal.XminFrame)) && ((*elem7(_2_aPgno, uintptr(*elem20(_2_aHash, uintptr(_2_iKey))))) == _pgno) {
func() {
- if _4_iFrame <= _iRead && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57122), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalFindFrameØ00__func__Ø000))), unsafe.Pointer(str(16406)))
+ if _4_iFrame <= _iRead && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57122), unsafe.Pointer(&_sqlite3WalFindFrameØ00__func__Ø000), unsafe.Pointer(str(16361)))
crt.X__builtin_abort(tls)
}
}()
_iRead = _4_iFrame
}
- if postInc1(&_2_nCollide, int32(-1)) == i32(0) {
- return _sqlite3CorruptError(tls, i32(57126))
+ if postInc2(&_2_nCollide, -1) == int32(0) {
+ return _sqlite3CorruptError(tls, int32(57126))
}
_2_iKey = _walNextHash(tls, _2_iKey)
goto _11
@@ -16287,7 +16558,7 @@ _14:
goto _5
_9:
*_piRead = _iRead
- return i32(0)
+ return int32(0)
_ = _2_nCollide
panic(0)
@@ -16296,83 +16567,88 @@ _9:
var _sqlite3WalFindFrameØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalFindFrameØ00__func__Ø000[0], str(16433), 20)
+ crt.Xstrncpy(nil, &_sqlite3WalFindFrameØ00__func__Ø000[0], str(16388), 20)
}
-// Compute a hash on a page number. The resulting hash value must land
-// between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances
-// the hash to the next value in the event of a collision.
+// C comment
+// /*
+// ** Compute a hash on a page number. The resulting hash value must land
+// ** between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances
+// ** the hash to the next value in the event of a collision.
+// */
func _walHash(tls *crt.TLS, _iPage uint32) (r0 int32) {
func() {
- if _iPage <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55316), unsafe.Pointer((*int8)(unsafe.Pointer(&_walHashØ00__func__Ø000))), unsafe.Pointer(str(16453)))
+ if _iPage <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55316), unsafe.Pointer(&_walHashØ00__func__Ø000), unsafe.Pointer(str(16408)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- return int32((_iPage * uint32(i32(383))) & uint32(i32(8191)))
+ return int32((_iPage * uint32(383)) & uint32(8191))
}
var _walHashØ00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_walHashØ00__func__Ø000[0], str(16461), 8)
+ crt.Xstrncpy(nil, &_walHashØ00__func__Ø000[0], str(16416), 8)
}
func _walNextHash(tls *crt.TLS, _iPriorHash int32) (r0 int32) {
- return (_iPriorHash + i32(1)) & i32(8191)
-}
-
-// Read the content for page pPg out of the database file and into
-// pPg->pData. A shared lock or greater must be held on the database
-// file before this function is called.
-//
-// If page 1 is read, then the value of Pager.dbFileVers[] is set to
-// the value read from the database file.
-//
-// If an IO error occurs, then the IO error is returned to the caller.
-// Otherwise, SQLITE_OK is returned.
+ return (_iPriorHash + int32(1)) & int32(8191)
+}
+
+// C comment
+// /*
+// ** Read the content for page pPg out of the database file and into
+// ** pPg->pData. A shared lock or greater must be held on the database
+// ** file before this function is called.
+// **
+// ** If page 1 is read, then the value of Pager.dbFileVers[] is set to
+// ** the value read from the database file.
+// **
+// ** If an IO error occurs, then the IO error is returned to the caller.
+// ** Otherwise, SQLITE_OK is returned.
+// */
func _readDbPage(tls *crt.TLS, _pPg *XPgHdr, _iFrame uint32) (r0 int32) {
var _rc, _pgsz int32
var _2_iOffset int64
var _pgno uint32
var _6_dbFileVers *uint8
var _pPager *XPager
- _pPager = (*XPager)(_pPg.X4)
- _pgno = _pPg.X5
- _rc = i32(0)
- _pgsz = _pPager.X48
+ _pPager = (*XPager)(_pPg.XpPager)
+ _pgno = _pPg.Xpgno
+ _rc = int32(0)
+ _pgsz = _pPager.XpageSize
func() {
- if int32(_pPager.X14) < i32(1) || (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49903), unsafe.Pointer((*int8)(unsafe.Pointer(&_readDbPageØ00__func__Ø000))), unsafe.Pointer(str(16469)))
+ if int32(_pPager.XeState) < int32(1) || _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49903), unsafe.Pointer(&_readDbPageØ00__func__Ø000), unsafe.Pointer(str(16424)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49904), unsafe.Pointer((*int8)(unsafe.Pointer(&_readDbPageØ00__func__Ø000))), unsafe.Pointer(str(16508)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49904), unsafe.Pointer(&_readDbPageØ00__func__Ø000), unsafe.Pointer(str(16463)))
crt.X__builtin_abort(tls)
}
}()
if _iFrame != 0 {
- _rc = _sqlite3WalReadFrame(tls, (*XWal)(_pPager.X60), _iFrame, _pgsz, (*uint8)(_pPg.X1))
+ _rc = _sqlite3WalReadFrame(tls, (*XWal)(_pPager.XpWal), _iFrame, _pgsz, (*uint8)(_pPg.XpData))
goto _6
}
- _2_iOffset = int64(_pgno-uint32(i32(1))) * int64(_pPager.X48)
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.X31), _pPg.X1, _pgsz, _2_iOffset)
- if _rc == i32(522) {
- _rc = i32(0)
+ _2_iOffset = int64(_pgno-uint32(1)) * int64(_pPager.XpageSize)
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.Xfd), _pPg.XpData, _pgsz, _2_iOffset)
+ if _rc == int32(522) {
+ _rc = int32(0)
}
_6:
- if _pgno != uint32(i32(1)) {
+ if _pgno != uint32(1) {
goto _8
}
if _rc != 0 {
- crt.Xmemset(tls, (unsafe.Pointer)((*[16]int8)(unsafe.Pointer(&(_pPager.X40)))), i32(255), u32(16))
+ crt.Xmemset(tls, unsafe.Pointer(&_pPager.XdbFileVers), int32(255), uint32(16))
goto _10
}
- _6_dbFileVers = (*uint8)(unsafe.Pointer(uintptr(_pPg.X1) + 1*uintptr(i32(24))))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[16]int8)(unsafe.Pointer(&(_pPager.X40)))), (unsafe.Pointer)(_6_dbFileVers), u32(16))
+ _6_dbFileVers = elem15((*uint8)(_pPg.XpData), uintptr(24))
+ crt.Xmemcpy(tls, unsafe.Pointer(&_pPager.XdbFileVers), unsafe.Pointer(_6_dbFileVers), uint32(16))
_10:
_8:
return _rc
@@ -16381,19 +16657,22 @@ _8:
var _readDbPageØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_readDbPageØ00__func__Ø000[0], str(16527), 11)
+ crt.Xstrncpy(nil, &_readDbPageØ00__func__Ø000[0], str(16482), 11)
}
-// Read the contents of frame iRead from the wal file into buffer pOut
-// (which is nOut bytes in size). Return SQLITE_OK if successful, or an
-// error code otherwise.
+// C comment
+// /*
+// ** Read the contents of frame iRead from the wal file into buffer pOut
+// ** (which is nOut bytes in size). Return SQLITE_OK if successful, or an
+// ** error code otherwise.
+// */
func _sqlite3WalReadFrame(tls *crt.TLS, _pWal *XWal, _iRead uint32, _nOut int32, _pOut *uint8) (r0 int32) {
var _sz int32
var _iOffset int64
- _sz = int32((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X5)
- _sz = (_sz & i32(65024)) + ((_sz & i32(1)) << uint(i32(16)))
- _iOffset = (int64(i32(32)) + (int64(_iRead-uint32(i32(1))) * int64(_sz+i32(24)))) + int64(i32(24))
- return _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.X2), (unsafe.Pointer)(_pOut), func() int32 {
+ _sz = int32(_pWal.Xhdr.XszPage)
+ _sz = (_sz & int32(65024)) + ((_sz & int32(1)) << 16)
+ _iOffset = (int64(32) + (int64(_iRead-uint32(1)) * int64(_sz+int32(24)))) + int64(24)
+ return _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.XpWalFd), unsafe.Pointer(_pOut), func() int32 {
if _nOut > _sz {
return _sz
}
@@ -16402,20 +16681,24 @@ func _sqlite3WalReadFrame(tls *crt.TLS, _pWal *XWal, _iRead uint32, _nOut int32,
}
func _sqlite3OsRead(tls *crt.TLS, _id *Xsqlite3_file, _pBuf unsafe.Pointer, _amt int32, _offset int64) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X2)})))(tls, _id, _pBuf, _amt, _offset)
-}
-
-// Restart the backup process. This is called when the pager layer
-// detects that the database has been modified by an external database
-// connection. In this case there is no way of knowing which of the
-// pages that have been copied into the destination database are still
-// valid and which are not, so the entire process needs to be restarted.
-//
-// It is assumed that the mutex associated with the BtShared object
-// corresponding to the source database is held when this function is
-// called.
+ return func() func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxRead
+ return *(*func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _pBuf, _amt, _offset)
+}
+
+// C comment
+// /*
+// ** Restart the backup process. This is called when the pager layer
+// ** detects that the database has been modified by an external database
+// ** connection. In this case there is no way of knowing which of the
+// ** pages that have been copied into the destination database are still
+// ** valid and which are not, so the entire process needs to be restarted.
+// **
+// ** It is assumed that the mutex associated with the BtShared object
+// ** corresponding to the source database is held when this function is
+// ** called.
+// */
func _sqlite3BackupRestart(tls *crt.TLS, _pBackup *Xsqlite3_backup) {
var _p *Xsqlite3_backup
_p = _pBackup
@@ -16424,13 +16707,13 @@ _0:
goto _3
}
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)((*XBtree)(_p.X6).X1).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69631), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BackupRestartØ00__func__Ø000))), unsafe.Pointer(str(16538)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)((*XBtree)(_p.XpSrc).XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69631), unsafe.Pointer(&_sqlite3BackupRestartØ00__func__Ø000), unsafe.Pointer(str(16493)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_p.X4))) = uint32(i32(1))
- _p = (*Xsqlite3_backup)(_p.X11)
+ _p.XiNext = uint32(1)
+ _p = (*Xsqlite3_backup)(_p.XpNext)
goto _0
_3:
}
@@ -16438,87 +16721,90 @@ _3:
var _sqlite3BackupRestartØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BackupRestartØ00__func__Ø000[0], str(16578), 21)
+ crt.Xstrncpy(nil, &_sqlite3BackupRestartØ00__func__Ø000[0], str(16533), 21)
}
-// Return a list of all dirty pages in the cache, sorted by page number.
+// C comment
+// /*
+// ** Return a list of all dirty pages in the cache, sorted by page number.
+// */
func _sqlite3PcacheDirtyList(tls *crt.TLS, _pCache *XPCache) (r0 *XPgHdr) {
var _p *XPgHdr
- _p = (*XPgHdr)(_pCache.X0)
+ _p = (*XPgHdr)(_pCache.XpDirty)
_0:
if _p == nil {
goto _3
}
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3))))) = (*XPgHdr)(_p.X9)
- _p = (*XPgHdr)(_p.X9)
+ *(**XPgHdr)(unsafe.Pointer(&_p.XpDirty)) = (*XPgHdr)(_p.XpDirtyNext)
+ _p = (*XPgHdr)(_p.XpDirtyNext)
goto _0
_3:
- return _pcacheSortDirtyList(tls, (*XPgHdr)(_pCache.X0))
+ return _pcacheSortDirtyList(tls, (*XPgHdr)(_pCache.XpDirty))
}
func _pcacheSortDirtyList(tls *crt.TLS, _pIn *XPgHdr) (r0 *XPgHdr) {
var _i int32
var _p *XPgHdr
var _a [32]*XPgHdr
- crt.Xmemset(tls, (unsafe.Pointer)(&_a), i32(0), u32(128))
+ crt.Xmemset(tls, unsafe.Pointer(&_a), int32(0), uint32(128))
_0:
if _pIn == nil {
goto _1
}
_p = _pIn
- _pIn = (*XPgHdr)(_p.X3)
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3))))) = nil
- _i = i32(0)
+ _pIn = (*XPgHdr)(_p.XpDirty)
+ *(**XPgHdr)(unsafe.Pointer(&_p.XpDirty)) = nil
+ _i = int32(0)
_2:
if func() int32 {
- if _i < i32(31) {
- return i32(1)
+ if _i < int32(31) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44866), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheSortDirtyListØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44866), unsafe.Pointer(&_pcacheSortDirtyListØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _7
}
- if (*(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(_i)))) == nil {
- *(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(_i))) = _p
+ if (*elem37((**XPgHdr)(unsafe.Pointer(&_a)), uintptr(_i))) == nil {
+ *elem37((**XPgHdr)(unsafe.Pointer(&_a)), uintptr(_i)) = _p
goto _7
}
- _p = _pcacheMergeDirtyList(tls, *(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(_i))), _p)
- *(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(_i))) = nil
+ _p = _pcacheMergeDirtyList(tls, *elem37((**XPgHdr)(unsafe.Pointer(&_a)), uintptr(_i)), _p)
+ *elem37((**XPgHdr)(unsafe.Pointer(&_a)), uintptr(_i)) = nil
_i += 1
goto _2
_7:
if func() int32 {
- if _i == i32(31) {
+ if _i == int32(31) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44875), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheSortDirtyListØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44875), unsafe.Pointer(&_pcacheSortDirtyListØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- *(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(_i))) = _pcacheMergeDirtyList(tls, *(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(_i))), _p)
+ *elem37((**XPgHdr)(unsafe.Pointer(&_a)), uintptr(_i)) = _pcacheMergeDirtyList(tls, *elem37((**XPgHdr)(unsafe.Pointer(&_a)), uintptr(_i)), _p)
}
goto _0
_1:
- _p = *(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(i32(0))))
- _i = i32(1)
+ _p = *elem37((**XPgHdr)(unsafe.Pointer(&_a)), 0)
+ _i = int32(1)
_13:
- if _i >= i32(32) {
+ if _i >= int32(32) {
goto _16
}
- if (*(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(_i)))) == nil {
+ if (*elem37((**XPgHdr)(unsafe.Pointer(&_a)), uintptr(_i))) == nil {
goto _14
}
_p = func() *XPgHdr {
if _p != nil {
- return _pcacheMergeDirtyList(tls, _p, *(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(_i))))
+ return _pcacheMergeDirtyList(tls, _p, *elem37((**XPgHdr)(unsafe.Pointer(&_a)), uintptr(_i)))
}
- return (*(**XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_a)) + 4*uintptr(_i))))
+ return (*elem37((**XPgHdr)(unsafe.Pointer(&_a)), uintptr(_i)))
}()
_14:
_i += 1
@@ -16533,91 +16819,94 @@ _16:
var _pcacheSortDirtyListØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_pcacheSortDirtyListØ00__func__Ø000[0], str(16599), 20)
+ crt.Xstrncpy(nil, &_pcacheSortDirtyListØ00__func__Ø000[0], str(16554), 20)
}
-// Merge two lists of pages connected by pDirty and in pgno order.
-// Do not bother fixing the pDirtyPrev pointers.
+// C comment
+// /*
+// ** Merge two lists of pages connected by pDirty and in pgno order.
+// ** Do not bother fixing the pDirtyPrev pointers.
+// */
func _pcacheMergeDirtyList(tls *crt.TLS, _pA *XPgHdr, _pB *XPgHdr) (r0 *XPgHdr) {
var _result XPgHdr
var _pTail *XPgHdr
_pTail = &_result
func() {
if _pA == nil || _pB == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44824), unsafe.Pointer((*int8)(unsafe.Pointer(&_pcacheMergeDirtyListØ00__func__Ø000))), unsafe.Pointer(str(16619)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44824), unsafe.Pointer(&_pcacheMergeDirtyListØ00__func__Ø000), unsafe.Pointer(str(16574)))
crt.X__builtin_abort(tls)
}
}()
_3:
- if (_pA.X5) >= (_pB.X5) {
+ if _pA.Xpgno >= _pB.Xpgno {
goto _6
}
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTail.X3))))) = _pA
+ *(**XPgHdr)(unsafe.Pointer(&_pTail.XpDirty)) = _pA
_pTail = _pA
- _pA = (*XPgHdr)(_pA.X3)
+ _pA = (*XPgHdr)(_pA.XpDirty)
if _pA == nil {
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTail.X3))))) = _pB
+ *(**XPgHdr)(unsafe.Pointer(&_pTail.XpDirty)) = _pB
goto _5
}
goto _8
_6:
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTail.X3))))) = _pB
+ *(**XPgHdr)(unsafe.Pointer(&_pTail.XpDirty)) = _pB
_pTail = _pB
- _pB = (*XPgHdr)(_pB.X3)
+ _pB = (*XPgHdr)(_pB.XpDirty)
if _pB == nil {
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTail.X3))))) = _pA
+ *(**XPgHdr)(unsafe.Pointer(&_pTail.XpDirty)) = _pA
goto _5
}
_8:
goto _3
_5:
- return (*XPgHdr)(_result.X3)
-
- _ = _result
- panic(0)
+ return (*XPgHdr)(_result.XpDirty)
}
var _pcacheMergeDirtyListØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_pcacheMergeDirtyListØ00__func__Ø000[0], str(16634), 21)
-}
-
-// Read a single page from either the journal file (if isMainJrnl==1) or
-// from the sub-journal (if isMainJrnl==0) and playback that page.
-// The page begins at offset *pOffset into the file. The *pOffset
-// value is increased to the start of the next page in the journal.
-//
-// The main rollback journal uses checksums - the statement journal does
-// not.
-//
-// If the page number of the page record read from the (sub-)journal file
-// is greater than the current value of Pager.dbSize, then playback is
-// skipped and SQLITE_OK is returned.
-//
-// If pDone is not NULL, then it is a record of pages that have already
-// been played back. If the page at *pOffset has already been played back
-// (if the corresponding pDone bit is set) then skip the playback.
-// Make sure the pDone bit corresponding to the *pOffset page is set
-// prior to returning.
-//
-// If the page record is successfully read from the (sub-)journal file
-// and played back, then SQLITE_OK is returned. If an IO error occurs
-// while reading the record from the (sub-)journal file or while writing
-// to the database file, then the IO error code is returned. If data
-// is successfully read from the (sub-)journal file but appears to be
-// corrupted, SQLITE_DONE is returned. Data is considered corrupted in
-// two circumstances:
-//
-// * If the record page-number is illegal (0 or PAGER_MJ_PGNO), or
-// * If the record is being rolled back from the main journal file
-// and the checksum field does not match the record content.
-//
-// Neither of these two scenarios are possible during a savepoint rollback.
-//
-// If this is a savepoint rollback, then memory may have to be dynamically
-// allocated by this function. If this is the case and an allocation fails,
-// SQLITE_NOMEM is returned.
+ crt.Xstrncpy(nil, &_pcacheMergeDirtyListØ00__func__Ø000[0], str(16589), 21)
+}
+
+// C comment
+// /*
+// ** Read a single page from either the journal file (if isMainJrnl==1) or
+// ** from the sub-journal (if isMainJrnl==0) and playback that page.
+// ** The page begins at offset *pOffset into the file. The *pOffset
+// ** value is increased to the start of the next page in the journal.
+// **
+// ** The main rollback journal uses checksums - the statement journal does
+// ** not.
+// **
+// ** If the page number of the page record read from the (sub-)journal file
+// ** is greater than the current value of Pager.dbSize, then playback is
+// ** skipped and SQLITE_OK is returned.
+// **
+// ** If pDone is not NULL, then it is a record of pages that have already
+// ** been played back. If the page at *pOffset has already been played back
+// ** (if the corresponding pDone bit is set) then skip the playback.
+// ** Make sure the pDone bit corresponding to the *pOffset page is set
+// ** prior to returning.
+// **
+// ** If the page record is successfully read from the (sub-)journal file
+// ** and played back, then SQLITE_OK is returned. If an IO error occurs
+// ** while reading the record from the (sub-)journal file or while writing
+// ** to the database file, then the IO error code is returned. If data
+// ** is successfully read from the (sub-)journal file but appears to be
+// ** corrupted, SQLITE_DONE is returned. Data is considered corrupted in
+// ** two circumstances:
+// **
+// ** * If the record page-number is illegal (0 or PAGER_MJ_PGNO), or
+// ** * If the record is being rolled back from the main journal file
+// ** and the checksum field does not match the record content.
+// **
+// ** Neither of these two scenarios are possible during a savepoint rollback.
+// **
+// ** If this is a savepoint rollback, then memory may have to be dynamically
+// ** allocated by this function. If this is the case and an allocation fails,
+// ** SQLITE_NOMEM is returned.
+// */
func _pager_playback_one_page(tls *crt.TLS, _pPager *XPager, _pOffset *int64, _pDone *XBitvec, _isMainJrnl int32, _isSavepnt int32) (r0 int32) {
var _rc, _isSynced int32
var _11_ofst int64
@@ -16627,142 +16916,138 @@ func _pager_playback_one_page(tls *crt.TLS, _pPager *XPager, _pOffset *int64, _p
var _jfd *Xsqlite3_file
var _pPg *XPgHdr
func() {
- if (_isMainJrnl & i32(-2)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49184), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16655)))
+ if (_isMainJrnl & int32(-2)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49184), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16610)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_isSavepnt & i32(-2)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49185), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16674)))
+ if (_isSavepnt & int32(-2)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49185), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16629)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _isMainJrnl == 0 && _pDone == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49186), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16692)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49186), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16647)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _isSavepnt == 0 && _pDone != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49187), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16712)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49187), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16667)))
crt.X__builtin_abort(tls)
}
}()
- _aData = _pPager.X58
+ _aData = _pPager.XpTmpSpace
func() {
if _aData == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49190), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16734)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49190), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16689)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if bool2int((*XWal)(_pPager.X60) != nil) != i32(0) && (_isMainJrnl != 0 || _isSavepnt == 0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49191), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16740)))
+ if bool2int((*XWal)(_pPager.XpWal) != nil) != int32(0) && (_isMainJrnl != 0 || _isSavepnt == 0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49191), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16695)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) < i32(3) && (int32(_pPager.X14) != i32(0) || int32(_pPager.X15) != i32(4)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49199), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16793)))
+ if int32(_pPager.XeState) < int32(3) && (int32(_pPager.XeState) != int32(0) || int32(_pPager.XeLock) != int32(4)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49199), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16748)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) < i32(3) && _isMainJrnl == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49202), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16896)))
+ if int32(_pPager.XeState) < int32(3) && _isMainJrnl == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49202), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16851)))
crt.X__builtin_abort(tls)
}
}()
_jfd = func() *Xsqlite3_file {
if _isMainJrnl != 0 {
- return (*Xsqlite3_file)(_pPager.X32)
+ return (*Xsqlite3_file)(_pPager.Xjfd)
}
- return (*Xsqlite3_file)(_pPager.X33)
+ return (*Xsqlite3_file)(_pPager.Xsjfd)
}()
_rc = _read32bits(tls, _jfd, *_pOffset, &_pgno)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- _rc = _sqlite3OsRead(tls, _jfd, (unsafe.Pointer)(_aData), _pPager.X48, (*_pOffset)+int64(i32(4)))
- if _rc != i32(0) {
+ _rc = _sqlite3OsRead(tls, _jfd, unsafe.Pointer(_aData), _pPager.XpageSize, (*_pOffset)+int64(4))
+ if _rc != int32(0) {
return _rc
}
- {
- p := _pOffset
- *p = (*p) + int64(((_pPager.X48)+i32(4))+(_isMainJrnl*i32(4)))
- sink6(*p)
- }
- if (_pgno == uint32(i32(0))) || (_pgno == uint32((_sqlite3PendingByte/(_pPager.X48))+i32(1))) {
+ *_pOffset += int64((_pPager.XpageSize + int32(4)) + (_isMainJrnl * int32(4)))
+ if (_pgno == (0)) || (_pgno == uint32((_sqlite3PendingByte/_pPager.XpageSize)+int32(1))) {
func() {
if _isSavepnt != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49220), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16948)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49220), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16903)))
crt.X__builtin_abort(tls)
}
}()
- return i32(101)
+ return int32(101)
}
- if (_pgno > (_pPager.X22)) || _sqlite3BitvecTest(tls, _pDone, _pgno) != 0 {
- return i32(0)
+ if (_pgno > _pPager.XdbSize) || _sqlite3BitvecTest(tls, _pDone, _pgno) != 0 {
+ return int32(0)
}
if _isMainJrnl == 0 {
goto _33
}
- _rc = _read32bits(tls, _jfd, (*_pOffset)-int64(i32(4)), &_cksum)
+ _rc = _read32bits(tls, _jfd, (*_pOffset)-int64(4), &_cksum)
if _rc != 0 {
return _rc
}
if (_isSavepnt == 0) && (_pager_cksum(tls, _pPager, (*uint8)(unsafe.Pointer(_aData))) != _cksum) {
- return i32(101)
+ return int32(101)
}
_33:
- if (_pDone != nil) && (store1(&_rc, _sqlite3BitvecSet(tls, _pDone, _pgno)) != i32(0)) {
+ if (_pDone != nil) && (store2(&_rc, _sqlite3BitvecSet(tls, _pDone, _pgno)) != int32(0)) {
return _rc
}
- if (_pgno == uint32(i32(1))) && (int32(_pPager.X45) != int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(i32(20)))))) {
- *(*int16)(unsafe.Pointer(&(_pPager.X45))) = int16(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(i32(20)))))
+ if (_pgno == uint32(1)) && (int32(_pPager.XnReserve) != int32(*elem15((*uint8)(unsafe.Pointer(_aData)), uintptr(20)))) {
+ _pPager.XnReserve = int16(*elem15((*uint8)(unsafe.Pointer(_aData)), uintptr(20)))
}
- if (*XWal)(_pPager.X60) != nil {
+ if (*XWal)(_pPager.XpWal) != nil {
_pPg = nil
goto _42
}
_pPg = _sqlite3PagerLookup(tls, _pPager, _pgno)
_42:
func() {
- if _pPg == nil && (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49288), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16959)))
+ if _pPg == nil && _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49288), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16914)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) == i32(0) && _pPg != nil && (_pPager.X10) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49289), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(16973)))
+ if int32(_pPager.XeState) == int32(0) && _pPg != nil && _pPager.XtempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49289), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16928)))
crt.X__builtin_abort(tls)
}
}()
if _isMainJrnl != 0 {
- _isSynced = bool2int(((_pPager.X4) != 0) || ((*_pOffset) <= (_pPager.X35)))
+ _isSynced = bool2int((_pPager.XnoSync != 0) || ((*_pOffset) <= _pPager.XjournalHdr))
goto _52
}
- _isSynced = bool2int((_pPg == nil) || (i32(0) == (int32(_pPg.X6) & i32(8))))
+ _isSynced = bool2int((_pPg == nil) || (int32(0) == (int32(_pPg.Xflags) & int32(8))))
_52:
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil || int32(_pPager.X14) < i32(4) && int32(_pPager.X14) != i32(0) || _isSynced == 0 {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil || int32(_pPager.XeState) < int32(4) && int32(_pPager.XeState) != int32(0) || _isSynced == 0 {
goto _57
}
- _11_ofst = int64(_pgno-uint32(i32(1))) * int64(_pPager.X48)
+ _11_ofst = int64(_pgno-uint32(1)) * int64(_pPager.XpageSize)
func() {
- if (*XWal)(_pPager.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49305), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(12168)))
+ if (*XWal)(_pPager.XpWal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49305), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(12123)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X31), (unsafe.Pointer)(_aData), _pPager.X48, _11_ofst)
- if _pgno > (_pPager.X24) {
- *(*uint32)(unsafe.Pointer(&(_pPager.X24))) = _pgno
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xfd), unsafe.Pointer(_aData), _pPager.XpageSize, _11_ofst)
+ if _pgno > _pPager.XdbFileSize {
+ _pPager.XdbFileSize = _pgno
}
- if (*Xsqlite3_backup)(_pPager.X36) != nil {
- _sqlite3BackupUpdate(tls, (*Xsqlite3_backup)(_pPager.X36), _pgno, (*uint8)(unsafe.Pointer(_aData)))
+ if _pPager.XpBackup != nil {
+ _sqlite3BackupUpdate(tls, (*Xsqlite3_backup)(_pPager.XpBackup), _pgno, (*uint8)(unsafe.Pointer(_aData)))
}
goto _64
_57:
@@ -16771,34 +17056,32 @@ _57:
}
func() {
if _isSavepnt == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49352), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(17030)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49352), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16985)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pPager.X18) & i32(2)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49353), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(17040)))
+ if (int32(_pPager.XdoNotSpill) & int32(2)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49353), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(16995)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint8)(unsafe.Pointer(&(_pPager.X18)))
- *p = uint8(int32(*p) | i32(2))
- sink2(*p)
+ p := &_pPager.XdoNotSpill
+ *p = uint8(int32(*p) | int32(2))
}
- _rc = _sqlite3PagerGet(tls, _pPager, _pgno, &_pPg, i32(1))
+ _rc = _sqlite3PagerGet(tls, _pPager, _pgno, &_pPg, int32(1))
func() {
- if (int32(_pPager.X18) & i32(2)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49356), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000))), unsafe.Pointer(str(17085)))
+ if (int32(_pPager.XdoNotSpill) & int32(2)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49356), unsafe.Pointer(&_pager_playback_one_pageØ00__func__Ø000), unsafe.Pointer(str(17040)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint8)(unsafe.Pointer(&(_pPager.X18)))
- *p = uint8(int32(*p) & i32(-3))
- sink2(*p)
+ p := &_pPager.XdoNotSpill
+ *p = uint8(int32(*p) & int32(-3))
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
_sqlite3PcacheMakeDirty(tls, _pPg)
@@ -16806,13 +17089,14 @@ _64:
if _pPg == nil {
goto _72
}
- _15_pData = _pPg.X1
- crt.Xmemcpy(tls, _15_pData, (unsafe.Pointer)(_aData), uint32(_pPager.X48))
- (*(*func(*crt.TLS, *XPgHdr))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_pPager.X56)})))(tls, _pPg)
- if _pgno == uint32(i32(1)) {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[16]int8)(unsafe.Pointer(&(_pPager.X40)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(_15_pData)+1*uintptr(i32(24))))), u32(16))
+ _15_pData = _pPg.XpData
+ crt.Xmemcpy(tls, _15_pData, unsafe.Pointer(_aData), uint32(_pPager.XpageSize))
+ func() func(*crt.TLS, *XPgHdr) {
+ v := _pPager.XxReiniter
+ return *(*func(*crt.TLS, *XPgHdr))(unsafe.Pointer(&v))
+ }()(tls, _pPg)
+ if _pgno == uint32(1) {
+ crt.Xmemcpy(tls, unsafe.Pointer(&_pPager.XdbFileVers), unsafe.Pointer(elem15((*uint8)(_15_pData), uintptr(24))), uint32(16))
}
_sqlite3PcacheRelease(tls, _pPg)
_72:
@@ -16822,19 +17106,22 @@ _72:
var _pager_playback_one_pageØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_pager_playback_one_pageØ00__func__Ø000[0], str(17130), 24)
+ crt.Xstrncpy(nil, &_pager_playback_one_pageØ00__func__Ø000[0], str(17085), 24)
}
-// Read a 32-bit integer from the given file descriptor. Store the integer
-// that is read in *pRes. Return SQLITE_OK if everything worked, or an
-// error code is something goes wrong.
-//
-// All values are stored on disk as big-endian.
+// C comment
+// /*
+// ** Read a 32-bit integer from the given file descriptor. Store the integer
+// ** that is read in *pRes. Return SQLITE_OK if everything worked, or an
+// ** error code is something goes wrong.
+// **
+// ** All values are stored on disk as big-endian.
+// */
func _read32bits(tls *crt.TLS, _fd *Xsqlite3_file, _offset int64, _pRes *uint32) (r0 int32) {
var _rc int32
var _ac [4]uint8
- _rc = _sqlite3OsRead(tls, _fd, (unsafe.Pointer)(&_ac), int32(u32(4)), _offset)
- if _rc == i32(0) {
+ _rc = _sqlite3OsRead(tls, _fd, unsafe.Pointer(&_ac), int32(4), _offset)
+ if _rc == int32(0) {
*_pRes = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(&_ac)))
}
return _rc
@@ -16843,9 +17130,12 @@ func _read32bits(tls *crt.TLS, _fd *Xsqlite3_file, _offset int64, _pRes *uint32)
panic(0)
}
-// Read or write a four-byte big-endian integer value.
+// C comment
+// /*
+// ** Read or write a four-byte big-endian integer value.
+// */
func _sqlite3Get4byte(tls *crt.TLS, _p *uint8) (r0 uint32) {
- return (((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(0))))) << uint(i32(24))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(1)))))<<uint(i32(16)))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(2)))))<<uint(i32(8)))) | uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(3)))))
+ return (((uint32(*elem15(_p, 0)) << 24) | uint32(int32(*elem15(_p, uintptr(1)))<<16)) | uint32(int32(*elem15(_p, uintptr(2)))<<8)) | uint32(*elem15(_p, uintptr(3)))
}
func _sqlite3BackupUpdate(tls *crt.TLS, _pBackup *Xsqlite3_backup, _iPage uint32, _aData *uint8) {
@@ -16854,54 +17144,57 @@ func _sqlite3BackupUpdate(tls *crt.TLS, _pBackup *Xsqlite3_backup, _iPage uint32
}
}
-// This function is called after the contents of page iPage of the
-// source database have been modified. If page iPage has already been
-// copied into the destination database, then the data written to the
-// destination is now invalidated. The destination copy of iPage needs
-// to be updated with the new data before the backup operation is
-// complete.
-//
-// It is assumed that the mutex associated with the BtShared object
-// corresponding to the source database is held when this function is
-// called.
+// C comment
+// /*
+// ** This function is called after the contents of page iPage of the
+// ** source database have been modified. If page iPage has already been
+// ** copied into the destination database, then the data written to the
+// ** destination is now invalidated. The destination copy of iPage needs
+// ** to be updated with the new data before the backup operation is
+// ** complete.
+// **
+// ** It is assumed that the mutex associated with the BtShared object
+// ** corresponding to the source database is held when this function is
+// ** called.
+// */
func _backupUpdate(tls *crt.TLS, _p *Xsqlite3_backup, _iPage uint32, _aData *uint8) {
var _2_rc int32
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69593), unsafe.Pointer((*int8)(unsafe.Pointer(&_backupUpdateØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69593), unsafe.Pointer(&_backupUpdateØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
_2:
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)((*XBtree)(_p.X6).X1).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69595), unsafe.Pointer((*int8)(unsafe.Pointer(&_backupUpdateØ00__func__Ø000))), unsafe.Pointer(str(16538)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)((*XBtree)(_p.XpSrc).XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69595), unsafe.Pointer(&_backupUpdateØ00__func__Ø000), unsafe.Pointer(str(16493)))
crt.X__builtin_abort(tls)
}
}()
- if _isFatalError(tls, _p.X7) != 0 || _iPage >= (_p.X4) {
+ if _isFatalError(tls, _p.Xrc) != 0 || _iPage >= _p.XiNext {
goto _6
}
func() {
- if (*Xsqlite3)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69602), unsafe.Pointer((*int8)(unsafe.Pointer(&_backupUpdateØ00__func__Ø000))), unsafe.Pointer(str(17154)))
+ if _p.XpDestDb == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69602), unsafe.Pointer(&_backupUpdateØ00__func__Ø000), unsafe.Pointer(str(17109)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
- _2_rc = _backupOnePage(tls, _p, _iPage, _aData, i32(1))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.XpDestDb).Xmutex))
+ _2_rc = _backupOnePage(tls, _p, _iPage, _aData, int32(1))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.XpDestDb).Xmutex))
func() {
- if _2_rc == i32(5) || _2_rc == i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69606), unsafe.Pointer((*int8)(unsafe.Pointer(&_backupUpdateØ00__func__Ø000))), unsafe.Pointer(str(17165)))
+ if _2_rc == int32(5) || _2_rc == int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69606), unsafe.Pointer(&_backupUpdateØ00__func__Ø000), unsafe.Pointer(str(17120)))
crt.X__builtin_abort(tls)
}
}()
- if _2_rc != i32(0) {
- *(*int32)(unsafe.Pointer(&(_p.X7))) = _2_rc
+ if _2_rc != int32(0) {
+ _p.Xrc = _2_rc
}
_6:
- if store26(&_p, (*Xsqlite3_backup)(_p.X11)) != nil {
+ if store38(&_p, (*Xsqlite3_backup)(_p.XpNext)) != nil {
goto _2
}
}
@@ -16909,21 +17202,24 @@ _6:
var _backupUpdateØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_backupUpdateØ00__func__Ø000[0], str(17202), 13)
+ crt.Xstrncpy(nil, &_backupUpdateØ00__func__Ø000[0], str(17157), 13)
}
-// Argument rc is an SQLite error code. Return true if this error is
-// considered fatal if encountered during a backup operation. All errors
-// are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED.
+// C comment
+// /*
+// ** Argument rc is an SQLite error code. Return true if this error is
+// ** considered fatal if encountered during a backup operation. All errors
+// ** are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED.
+// */
func _isFatalError(tls *crt.TLS, _rc int32) (r0 int32) {
- return bool2int(((_rc != i32(0)) && (_rc != i32(5))) && func() int32 {
- if _rc != i32(6) {
- return i32(1)
+ return bool2int(((_rc != int32(0)) && (_rc != int32(5))) && func() int32 {
+ if _rc != int32(6) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69117), unsafe.Pointer((*int8)(unsafe.Pointer(&_isFatalErrorØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69117), unsafe.Pointer(&_isFatalErrorØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0)
}
@@ -16931,12 +17227,15 @@ func _isFatalError(tls *crt.TLS, _rc int32) (r0 int32) {
var _isFatalErrorØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_isFatalErrorØ00__func__Ø000[0], str(17215), 13)
+ crt.Xstrncpy(nil, &_isFatalErrorØ00__func__Ø000[0], str(17170), 13)
}
-// Parameter zSrcData points to a buffer containing the data for
-// page iSrcPg from the source database. Copy this data into the
-// destination database.
+// C comment
+// /*
+// ** Parameter zSrcData points to a buffer containing the data for
+// ** page iSrcPg from the source database. Copy this data into the
+// ** destination database.
+// */
func _backupOnePage(tls *crt.TLS, _p *Xsqlite3_backup, _iSrcPg uint32, _zSrcData *uint8, _bUpdate int32) (r0 int32) {
var _nSrcPgsz, _nDestPgsz, _nCopy, _rc int32
var _iEnd, _iOff int64
@@ -16944,9 +17243,9 @@ func _backupOnePage(tls *crt.TLS, _p *Xsqlite3_backup, _iSrcPg uint32, _zSrcData
var _3_zIn, _3_zDestData, _3_zOut *uint8
var _pDestPager *XPager
var _2_pDestPg *XPgHdr
- _pDestPager = _sqlite3BtreePager(tls, (*XBtree)(_p.X1))
- _nSrcPgsz = _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.X6))
- _nDestPgsz = _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.X1))
+ _pDestPager = _sqlite3BtreePager(tls, (*XBtree)(_p.XpDest))
+ _nSrcPgsz = _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.XpSrc))
+ _nDestPgsz = _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.XpDest))
_nCopy = func() int32 {
if _nSrcPgsz < _nDestPgsz {
return _nSrcPgsz
@@ -16954,210 +17253,230 @@ func _backupOnePage(tls *crt.TLS, _p *Xsqlite3_backup, _iSrcPg uint32, _zSrcData
return _nDestPgsz
}()
_iEnd = int64(_iSrcPg) * int64(_nSrcPgsz)
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if _sqlite3BtreeGetReserveNoMutex(tls, (*XBtree)(_p.X6)) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69146), unsafe.Pointer((*int8)(unsafe.Pointer(&_backupOnePageØ00__func__Ø000))), unsafe.Pointer(str(17228)))
+ if _sqlite3BtreeGetReserveNoMutex(tls, (*XBtree)(_p.XpSrc)) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69146), unsafe.Pointer(&_backupOnePageØ00__func__Ø000), unsafe.Pointer(str(17183)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69147), unsafe.Pointer((*int8)(unsafe.Pointer(&_backupOnePageØ00__func__Ø000))), unsafe.Pointer(str(17270)))
+ if _p.XbDestLocked == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69147), unsafe.Pointer(&_backupOnePageØ00__func__Ø000), unsafe.Pointer(str(17225)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _isFatalError(tls, _p.X7) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69148), unsafe.Pointer((*int8)(unsafe.Pointer(&_backupOnePageØ00__func__Ø000))), unsafe.Pointer(str(17285)))
+ if _isFatalError(tls, _p.Xrc) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69148), unsafe.Pointer(&_backupOnePageØ00__func__Ø000), unsafe.Pointer(str(17240)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iSrcPg == ((uint32(_sqlite3PendingByte) / ((*XBtShared)((*XBtree)(_p.X6).X1).X15)) + uint32(i32(1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69149), unsafe.Pointer((*int8)(unsafe.Pointer(&_backupOnePageØ00__func__Ø000))), unsafe.Pointer(str(17306)))
+ if _iSrcPg == ((uint32(_sqlite3PendingByte) / ((*XBtShared)((*XBtree)(_p.XpSrc).XpBt).XpageSize)) + uint32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69149), unsafe.Pointer(&_backupOnePageØ00__func__Ø000), unsafe.Pointer(str(17261)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _zSrcData == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69150), unsafe.Pointer((*int8)(unsafe.Pointer(&_backupOnePageØ00__func__Ø000))), unsafe.Pointer(str(17346)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69150), unsafe.Pointer(&_backupOnePageØ00__func__Ø000), unsafe.Pointer(str(17301)))
crt.X__builtin_abort(tls)
}
}()
if (_nSrcPgsz != _nDestPgsz) && _sqlite3PagerIsMemdb(tls, _pDestPager) != 0 {
- _rc = i32(8)
+ _rc = int32(8)
}
_iOff = _iEnd - int64(_nSrcPgsz)
_14:
- if _rc != i32(0) || _iOff >= _iEnd {
+ if _rc != int32(0) || _iOff >= _iEnd {
goto _18
}
_2_pDestPg = nil
- _2_iDest = uint32(_iOff/int64(_nDestPgsz)) + uint32(i32(1))
- if _2_iDest == ((uint32(_sqlite3PendingByte) / ((*XBtShared)((*XBtree)(_p.X1).X1).X15)) + uint32(i32(1))) {
+ _2_iDest = uint32(_iOff/int64(_nDestPgsz)) + uint32(1)
+ if _2_iDest == ((uint32(_sqlite3PendingByte) / ((*XBtShared)((*XBtree)(_p.XpDest).XpBt).XpageSize)) + uint32(1)) {
goto _15
}
- if i32(0) != store1(&_rc, _sqlite3PagerGet(tls, _pDestPager, _2_iDest, &_2_pDestPg, i32(0))) || i32(0) != store1(&_rc, _sqlite3PagerWrite(tls, _2_pDestPg)) {
+ if int32(0) != store2(&_rc, _sqlite3PagerGet(tls, _pDestPager, _2_iDest, &_2_pDestPg, int32(0))) || int32(0) != store2(&_rc, _sqlite3PagerWrite(tls, _2_pDestPg)) {
goto _21
}
- _3_zIn = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSrcData)) + 1*uintptr(_iOff%int64(_nSrcPgsz))))
+ _3_zIn = elem15(_zSrcData, uintptr(_iOff%int64(_nSrcPgsz)))
_3_zDestData = (*uint8)(_sqlite3PagerGetData(tls, _2_pDestPg))
- _3_zOut = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_zDestData)) + 1*uintptr(_iOff%int64(_nDestPgsz))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_3_zOut), (unsafe.Pointer)(_3_zIn), uint32(_nCopy))
- *(*uint8)(unsafe.Pointer(uintptr(_sqlite3PagerGetExtra(tls, _2_pDestPg)) + 1*uintptr(i32(0)))) = uint8(i32(0))
- if (_iOff == int64(i32(0))) && (_bUpdate == i32(0)) {
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_zOut))+1*uintptr(i32(28)))), _sqlite3BtreeLastPage(tls, (*XBtree)(_p.X6)))
+ _3_zOut = elem15(_3_zDestData, uintptr(_iOff%int64(_nDestPgsz)))
+ crt.Xmemcpy(tls, unsafe.Pointer(_3_zOut), unsafe.Pointer(_3_zIn), uint32(_nCopy))
+ *elem15((*uint8)(_sqlite3PagerGetExtra(tls, _2_pDestPg)), 0) = 0
+ if (_iOff == (0)) && (_bUpdate == int32(0)) {
+ _sqlite3Put4byte(tls, elem15(_3_zOut, uintptr(28)), _sqlite3BtreeLastPage(tls, (*XBtree)(_p.XpSrc)))
}
_21:
_sqlite3PagerUnref(tls, _2_pDestPg)
_15:
- {
- p := &_iOff
- *p = (*p) + int64(_nDestPgsz)
- sink6(*p)
- }
+ _iOff += int64(_nDestPgsz)
goto _14
_18:
return _rc
}
-// Return the pager associated with a BTree. This routine is used for
-// testing and debugging only.
+// C comment
+// /*
+// ** Return the pager associated with a BTree. This routine is used for
+// ** testing and debugging only.
+// */
func _sqlite3BtreePager(tls *crt.TLS, _p *XBtree) (r0 *XPager) {
- return (*XPager)((*XBtShared)(_p.X1).X0)
+ return (*XPager)((*XBtShared)(_p.XpBt).XpPager)
}
-// Return the currently defined page size
+// C comment
+// /*
+// ** Return the currently defined page size
+// */
func _sqlite3BtreeGetPageSize(tls *crt.TLS, _p *XBtree) (r0 int32) {
- return int32((*XBtShared)(_p.X1).X15)
-}
-
-// This function is similar to sqlite3BtreeGetReserve(), except that it
-// may only be called if it is guaranteed that the b-tree mutex is already
-// held.
-//
-// This is useful in one special case in the backup API code where it is
-// known that the shared b-tree mutex is held, but the mutex on the
-// database handle that owns *p is not. In this case if sqlite3BtreeEnter()
-// were to be called, it might collide with some other operation on the
-// database handle that owns *p, causing undefined behavior.
+ return int32((*XBtShared)(_p.XpBt).XpageSize)
+}
+
+// C comment
+// /*
+// ** This function is similar to sqlite3BtreeGetReserve(), except that it
+// ** may only be called if it is guaranteed that the b-tree mutex is already
+// ** held.
+// **
+// ** This is useful in one special case in the backup API code where it is
+// ** known that the shared b-tree mutex is held, but the mutex on the
+// ** database handle that owns *p is not. In this case if sqlite3BtreeEnter()
+// ** were to be called, it might collide with some other operation on the
+// ** database handle that owns *p, causing undefined behavior.
+// */
func _sqlite3BtreeGetReserveNoMutex(tls *crt.TLS, _p *XBtree) (r0 int32) {
var _n int32
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.X1).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61796), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeGetReserveNoMutexØ00__func__Ø000))), unsafe.Pointer(str(17355)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61796), unsafe.Pointer(&_sqlite3BtreeGetReserveNoMutexØ00__func__Ø000), unsafe.Pointer(str(17310)))
crt.X__builtin_abort(tls)
}
}()
- _n = int32(((*XBtShared)(_p.X1).X15) - ((*XBtShared)(_p.X1).X16))
+ _n = int32(((*XBtShared)(_p.XpBt).XpageSize) - ((*XBtShared)(_p.XpBt).XusableSize))
return _n
}
var _sqlite3BtreeGetReserveNoMutexØ00__func__Ø000 [30]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeGetReserveNoMutexØ00__func__Ø000[0], str(17389), 30)
+ crt.Xstrncpy(nil, &_sqlite3BtreeGetReserveNoMutexØ00__func__Ø000[0], str(17344), 30)
}
var _backupOnePageØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_backupOnePageØ00__func__Ø000[0], str(17419), 14)
+ crt.Xstrncpy(nil, &_backupOnePageØ00__func__Ø000[0], str(17374), 14)
}
-// Return true if this is an in-memory or temp-file backed pager.
+// C comment
+// /*
+// ** Return true if this is an in-memory or temp-file backed pager.
+// */
func _sqlite3PagerIsMemdb(tls *crt.TLS, _pPager *XPager) (r0 int32) {
- return int32(_pPager.X10)
+ return int32(_pPager.XtempFile)
}
-// Return a pointer to the data for the specified page.
+// C comment
+// /*
+// ** Return a pointer to the data for the specified page.
+// */
func _sqlite3PagerGetData(tls *crt.TLS, _pPg *XPgHdr) (r0 unsafe.Pointer) {
func() {
- if int32(_pPg.X7) <= i32(0) && ((*XPager)(_pPg.X4).X13) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54024), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerGetDataØ00__func__Ø000))), unsafe.Pointer(str(17433)))
+ if int32(_pPg.XnRef) <= int32(0) && ((*XPager)(_pPg.XpPager).XmemDb) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54024), unsafe.Pointer(&_sqlite3PagerGetDataØ00__func__Ø000), unsafe.Pointer(str(17388)))
crt.X__builtin_abort(tls)
}
}()
- return _pPg.X1
+ return _pPg.XpData
}
var _sqlite3PagerGetDataØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerGetDataØ00__func__Ø000[0], str(17467), 20)
+ crt.Xstrncpy(nil, &_sqlite3PagerGetDataØ00__func__Ø000[0], str(17422), 20)
}
-// Return a pointer to the Pager.nExtra bytes of "extra" space
-// allocated along with the specified page.
+// C comment
+// /*
+// ** Return a pointer to the Pager.nExtra bytes of "extra" space
+// ** allocated along with the specified page.
+// */
func _sqlite3PagerGetExtra(tls *crt.TLS, _pPg *XPgHdr) (r0 unsafe.Pointer) {
- return _pPg.X2
+ return _pPg.XpExtra
}
func _sqlite3BtreeLastPage(tls *crt.TLS, _p *XBtree) (r0 uint32) {
func() {
if _sqlite3BtreeHoldsMutex(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61054), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLastPageØ00__func__Ø000))), unsafe.Pointer(str(17487)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61054), unsafe.Pointer(&_sqlite3BtreeLastPageØ00__func__Ø000), unsafe.Pointer(str(17442)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (((*XBtShared)(_p.X1).X18) & uint32(i32(134217728))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61055), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLastPageØ00__func__Ø000))), unsafe.Pointer(str(17513)))
+ if (((*XBtShared)(_p.XpBt).XnPage) & uint32(134217728)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61055), unsafe.Pointer(&_sqlite3BtreeLastPageØ00__func__Ø000), unsafe.Pointer(str(17468)))
crt.X__builtin_abort(tls)
}
}()
- return _btreePagecount(tls, (*XBtShared)(_p.X1))
+ return _btreePagecount(tls, (*XBtShared)(_p.XpBt))
}
-// Return true if the BtShared mutex is held on the btree, or if the
-// B-Tree is not marked as sharable.
-//
-// This routine is used only from within assert() statements.
+// C comment
+// /*
+// ** Return true if the BtShared mutex is held on the btree, or if the
+// ** B-Tree is not marked as sharable.
+// **
+// ** This routine is used only from within assert() statements.
+// */
func _sqlite3BtreeHoldsMutex(tls *crt.TLS, _p *XBtree) (r0 int32) {
func() {
- if int32(_p.X3) != i32(0) && int32(_p.X4) != i32(0) && (_p.X6) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58885), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeHoldsMutexØ00__func__Ø000))), unsafe.Pointer(str(17544)))
+ if int32(_p.Xsharable) != int32(0) && int32(_p.Xlocked) != int32(0) && _p.XwantToLock <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58885), unsafe.Pointer(&_sqlite3BtreeHoldsMutexØ00__func__Ø000), unsafe.Pointer(str(17499)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X3) != i32(0) && int32(_p.X4) != i32(0) && (*Xsqlite3)(_p.X0) != (*Xsqlite3)((*XBtShared)(_p.X1).X1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58886), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeHoldsMutexØ00__func__Ø000))), unsafe.Pointer(str(17594)))
+ if int32(_p.Xsharable) != int32(0) && int32(_p.Xlocked) != int32(0) && (*Xsqlite3)(_p.Xdb) != (*Xsqlite3)((*XBtShared)(_p.XpBt).Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58886), unsafe.Pointer(&_sqlite3BtreeHoldsMutexØ00__func__Ø000), unsafe.Pointer(str(17549)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X3) != i32(0) && int32(_p.X4) != i32(0) && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.X1).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58887), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeHoldsMutexØ00__func__Ø000))), unsafe.Pointer(str(17646)))
+ if int32(_p.Xsharable) != int32(0) && int32(_p.Xlocked) != int32(0) && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_p.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58887), unsafe.Pointer(&_sqlite3BtreeHoldsMutexØ00__func__Ø000), unsafe.Pointer(str(17601)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X3) != i32(0) && int32(_p.X4) != i32(0) && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58888), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeHoldsMutexØ00__func__Ø000))), unsafe.Pointer(str(17714)))
+ if int32(_p.Xsharable) != int32(0) && int32(_p.Xlocked) != int32(0) && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58888), unsafe.Pointer(&_sqlite3BtreeHoldsMutexØ00__func__Ø000), unsafe.Pointer(str(17669)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int((int32(_p.X3) == i32(0)) || ((_p.X4) != 0))
+ return bool2int((int32(_p.Xsharable) == int32(0)) || (_p.Xlocked != 0))
}
var _sqlite3BtreeHoldsMutexØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeHoldsMutexØ00__func__Ø000[0], str(17781), 23)
+ crt.Xstrncpy(nil, &_sqlite3BtreeHoldsMutexØ00__func__Ø000[0], str(17736), 23)
}
var _sqlite3BtreeLastPageØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeLastPageØ00__func__Ø000[0], str(17804), 21)
+ crt.Xstrncpy(nil, &_sqlite3BtreeLastPageØ00__func__Ø000[0], str(17759), 21)
}
-// Return the size of the database file in pages. If there is any kind of
-// error, return ((unsigned int)-1).
+// C comment
+// /*
+// ** Return the size of the database file in pages. If there is any kind of
+// ** error, return ((unsigned int)-1).
+// */
func _btreePagecount(tls *crt.TLS, _pBt *XBtShared) (r0 uint32) {
- return _pBt.X18
+ return _pBt.XnPage
}
func _sqlite3PagerUnref(tls *crt.TLS, _pPg *XPgHdr) {
@@ -17166,71 +17485,70 @@ func _sqlite3PagerUnref(tls *crt.TLS, _pPg *XPgHdr) {
}
}
-// The journal file must be open when this is called. A journal header file
-// (JOURNAL_HDR_SZ bytes) is read from the current location in the journal
-// file. The current location in the journal file is given by
-// pPager->journalOff. See comments above function writeJournalHdr() for
-// a description of the journal header format.
-//
-// If the header is read successfully, *pNRec is set to the number of
-// page records following this header and *pDbSize is set to the size of the
-// database before the transaction began, in pages. Also, pPager->cksumInit
-// is set to the value read from the journal header. SQLITE_OK is returned
-// in this case.
-//
-// If the journal header file appears to be corrupted, SQLITE_DONE is
-// returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes
-// cannot be read from the journal file an error code is returned.
+// C comment
+// /*
+// ** The journal file must be open when this is called. A journal header file
+// ** (JOURNAL_HDR_SZ bytes) is read from the current location in the journal
+// ** file. The current location in the journal file is given by
+// ** pPager->journalOff. See comments above function writeJournalHdr() for
+// ** a description of the journal header format.
+// **
+// ** If the header is read successfully, *pNRec is set to the number of
+// ** page records following this header and *pDbSize is set to the size of the
+// ** database before the transaction began, in pages. Also, pPager->cksumInit
+// ** is set to the value read from the journal header. SQLITE_OK is returned
+// ** in this case.
+// **
+// ** If the journal header file appears to be corrupted, SQLITE_DONE is
+// ** returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes
+// ** cannot be read from the journal file an error code is returned.
+// */
func _readJournalHdr(tls *crt.TLS, _pPager *XPager, _isHot int32, _journalSize int64, _pNRec *uint32, _pDbSize *uint32) (r0 int32) {
var _rc int32
var _iHdrOff int64
var _6_iPageSize, _6_iSectorSize uint32
var _aMagic [8]uint8
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48464), unsafe.Pointer((*int8)(unsafe.Pointer(&_readJournalHdrØ00__func__Ø000))), unsafe.Pointer(str(13626)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48464), unsafe.Pointer(&_readJournalHdrØ00__func__Ø000), unsafe.Pointer(str(13581)))
crt.X__builtin_abort(tls)
}
}()
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = _journalHdrOffset(tls, _pPager)
- if ((_pPager.X34) + int64(_pPager.X47)) > _journalSize {
- return i32(101)
+ _pPager.XjournalOff = _journalHdrOffset(tls, _pPager)
+ if (_pPager.XjournalOff + int64(_pPager.XsectorSize)) > _journalSize {
+ return int32(101)
}
- _iHdrOff = _pPager.X34
- if _isHot == 0 && _iHdrOff == (_pPager.X35) {
+ _iHdrOff = _pPager.XjournalOff
+ if _isHot == 0 && _iHdrOff == _pPager.XjournalHdr {
goto _4
}
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(&_aMagic), int32(u32(8)), _iHdrOff)
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(&_aMagic), int32(8), _iHdrOff)
if _rc != 0 {
return _rc
}
- if crt.Xmemcmp(tls, (unsafe.Pointer)(&_aMagic), (unsafe.Pointer)(&_aJournalMagic), u32(8)) != i32(0) {
- return i32(101)
+ if crt.Xmemcmp(tls, unsafe.Pointer(&_aMagic), unsafe.Pointer(&_aJournalMagic), uint32(8)) != int32(0) {
+ return int32(101)
}
_4:
- if ((i32(0) != store1(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.X32), _iHdrOff+int64(i32(8)), _pNRec))) || (i32(0) != store1(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.X32), _iHdrOff+int64(i32(12)), (*uint32)(unsafe.Pointer(&(_pPager.X28))))))) || (i32(0) != store1(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.X32), _iHdrOff+int64(i32(16)), _pDbSize))) {
+ if ((int32(0) != store2(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), _iHdrOff+int64(8), _pNRec))) || (int32(0) != store2(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), _iHdrOff+int64(12), &_pPager.XcksumInit)))) || (int32(0) != store2(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), _iHdrOff+int64(16), _pDbSize))) {
return _rc
}
- if (_pPager.X34) != int64(i32(0)) {
+ if _pPager.XjournalOff != (0) {
goto _10
}
- if (i32(0) != store1(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.X32), _iHdrOff+int64(i32(20)), &_6_iSectorSize))) || (i32(0) != store1(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.X32), _iHdrOff+int64(i32(24)), &_6_iPageSize))) {
+ if (int32(0) != store2(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), _iHdrOff+int64(20), &_6_iSectorSize))) || (int32(0) != store2(&_rc, _read32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), _iHdrOff+int64(24), &_6_iPageSize))) {
return _rc
}
- if _6_iPageSize == uint32(i32(0)) {
- _6_iPageSize = uint32(_pPager.X48)
+ if _6_iPageSize == (0) {
+ _6_iPageSize = uint32(_pPager.XpageSize)
}
- if (((((_6_iPageSize < uint32(i32(512))) || (_6_iSectorSize < uint32(i32(32)))) || (_6_iPageSize > uint32(i32(65536)))) || (_6_iSectorSize > uint32(i32(65536)))) || (((_6_iPageSize - uint32(i32(1))) & _6_iPageSize) != uint32(i32(0)))) || (((_6_iSectorSize - uint32(i32(1))) & _6_iSectorSize) != uint32(i32(0))) {
- return i32(101)
+ if (((((_6_iPageSize < uint32(512)) || (_6_iSectorSize < uint32(32))) || (_6_iPageSize > uint32(65536))) || (_6_iSectorSize > uint32(65536))) || (((_6_iPageSize - uint32(1)) & _6_iPageSize) != (0))) || (((_6_iSectorSize - uint32(1)) & _6_iSectorSize) != (0)) {
+ return int32(101)
}
- _rc = _sqlite3PagerSetPagesize(tls, _pPager, &_6_iPageSize, i32(-1))
- *(*uint32)(unsafe.Pointer(&(_pPager.X47))) = _6_iSectorSize
+ _rc = _sqlite3PagerSetPagesize(tls, _pPager, &_6_iPageSize, int32(-1))
+ _pPager.XsectorSize = _6_iSectorSize
_10:
- {
- p := (*int64)(unsafe.Pointer(&(_pPager.X34)))
- *p = (*p) + int64(_pPager.X47)
- sink6(*p)
- }
+ _pPager.XjournalOff += int64(_pPager.XsectorSize)
return _rc
_ = _aMagic
@@ -17240,94 +17558,97 @@ _10:
var _readJournalHdrØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_readJournalHdrØ00__func__Ø000[0], str(17825), 15)
-}
-
-// Change the page size used by the Pager object. The new page size
-// is passed in *pPageSize.
-//
-// If the pager is in the error state when this function is called, it
-// is a no-op. The value returned is the error state error code (i.e.
-// one of SQLITE_IOERR, an SQLITE_IOERR_xxx sub-code or SQLITE_FULL).
-//
-// Otherwise, if all of the following are true:
-//
-// * the new page size (value of *pPageSize) is valid (a power
-// of two between 512 and SQLITE_MAX_PAGE_SIZE, inclusive), and
-//
-// * there are no outstanding page references, and
-//
-// * the database is either not an in-memory database or it is
-// an in-memory database that currently consists of zero pages.
-//
-// then the pager object page size is set to *pPageSize.
-//
-// If the page size is changed, then this function uses sqlite3PagerMalloc()
-// to obtain a new Pager.pTmpSpace buffer. If this allocation attempt
-// fails, SQLITE_NOMEM is returned and the page size remains unchanged.
-// In all other cases, SQLITE_OK is returned.
-//
-// If the page size is not changed, either because one of the enumerated
-// conditions above is not true, the pager was in error state when this
-// function was called, or because the memory allocation attempt failed,
-// then *pPageSize is set to the old, retained page size before returning.
+ crt.Xstrncpy(nil, &_readJournalHdrØ00__func__Ø000[0], str(17780), 15)
+}
+
+// C comment
+// /*
+// ** Change the page size used by the Pager object. The new page size
+// ** is passed in *pPageSize.
+// **
+// ** If the pager is in the error state when this function is called, it
+// ** is a no-op. The value returned is the error state error code (i.e.
+// ** one of SQLITE_IOERR, an SQLITE_IOERR_xxx sub-code or SQLITE_FULL).
+// **
+// ** Otherwise, if all of the following are true:
+// **
+// ** * the new page size (value of *pPageSize) is valid (a power
+// ** of two between 512 and SQLITE_MAX_PAGE_SIZE, inclusive), and
+// **
+// ** * there are no outstanding page references, and
+// **
+// ** * the database is either not an in-memory database or it is
+// ** an in-memory database that currently consists of zero pages.
+// **
+// ** then the pager object page size is set to *pPageSize.
+// **
+// ** If the page size is changed, then this function uses sqlite3PagerMalloc()
+// ** to obtain a new Pager.pTmpSpace buffer. If this allocation attempt
+// ** fails, SQLITE_NOMEM is returned and the page size remains unchanged.
+// ** In all other cases, SQLITE_OK is returned.
+// **
+// ** If the page size is not changed, either because one of the enumerated
+// ** conditions above is not true, the pager was in error state when this
+// ** function was called, or because the memory allocation attempt failed,
+// ** then *pPageSize is set to the old, retained page size before returning.
+// */
func _sqlite3PagerSetPagesize(tls *crt.TLS, _pPager *XPager, _pPageSize *uint32, _nReserve int32) (r0 int32) {
var _rc int32
var _1_nByte int64
var _pageSize uint32
var _1_pNew *int8
- _rc = i32(0)
+ _rc = int32(0)
_pageSize = *_pPageSize
func() {
- if _pageSize != uint32(i32(0)) && (_pageSize < uint32(i32(512)) || _pageSize > uint32(i32(65536))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50655), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetPagesizeØ00__func__Ø000))), unsafe.Pointer(str(17840)))
+ if _pageSize != (0) && (_pageSize < uint32(512) || _pageSize > uint32(65536)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50655), unsafe.Pointer(&_sqlite3PagerSetPagesizeØ00__func__Ø000), unsafe.Pointer(str(17795)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pPager.X13) != i32(0) && (_pPager.X22) != uint32(i32(0)) || _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.X59)) != i32(0) || _pageSize == 0 || _pageSize == uint32(_pPager.X48) {
+ if int32(_pPager.XmemDb) != int32(0) && _pPager.XdbSize != (0) || _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.XpPCache)) != int32(0) || _pageSize == 0 || _pageSize == uint32(_pPager.XpageSize) {
goto _8
}
_1_pNew = nil
- _1_nByte = i64(0)
- if (int32(_pPager.X14) > i32(0)) && ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) != nil) {
- _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.X31), &_1_nByte)
+ _1_nByte = int64(0)
+ if (int32(_pPager.XeState) > int32(0)) && ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) != nil) {
+ _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.Xfd), &_1_nByte)
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _11
}
_1_pNew = (*int8)(_sqlite3PageMalloc(tls, int32(_pageSize)))
if _1_pNew == nil {
- _rc = _sqlite3NomemError(tls, i32(50668))
+ _rc = _sqlite3NomemError(tls, int32(50668))
}
_11:
- if _rc == i32(0) {
+ if _rc == int32(0) {
_pager_reset(tls, _pPager)
- _rc = _sqlite3PcacheSetPageSize(tls, (*XPCache)(_pPager.X59), int32(_pageSize))
+ _rc = _sqlite3PcacheSetPageSize(tls, (*XPCache)(_pPager.XpPCache), int32(_pageSize))
}
- if _rc == i32(0) {
- _sqlite3PageFree(tls, (unsafe.Pointer)(_pPager.X58))
- *(**int8)(unsafe.Pointer(&(_pPager.X58))) = _1_pNew
- *(*uint32)(unsafe.Pointer(&(_pPager.X22))) = uint32(((_1_nByte + int64(_pageSize)) - int64(i32(1))) / int64(_pageSize))
- *(*int32)(unsafe.Pointer(&(_pPager.X48))) = int32(_pageSize)
+ if _rc == int32(0) {
+ _sqlite3PageFree(tls, unsafe.Pointer(_pPager.XpTmpSpace))
+ _pPager.XpTmpSpace = _1_pNew
+ _pPager.XdbSize = uint32(((_1_nByte + int64(_pageSize)) - int64(1)) / int64(_pageSize))
+ _pPager.XpageSize = int32(_pageSize)
goto _15
}
- _sqlite3PageFree(tls, (unsafe.Pointer)(_1_pNew))
+ _sqlite3PageFree(tls, unsafe.Pointer(_1_pNew))
_15:
_8:
- *_pPageSize = uint32(_pPager.X48)
- if _rc != i32(0) {
+ *_pPageSize = uint32(_pPager.XpageSize)
+ if _rc != int32(0) {
goto _16
}
- if _nReserve < i32(0) {
- _nReserve = int32(_pPager.X45)
+ if _nReserve < int32(0) {
+ _nReserve = int32(_pPager.XnReserve)
}
func() {
- if _nReserve < i32(0) || _nReserve >= i32(1000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50688), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetPagesizeØ00__func__Ø000))), unsafe.Pointer(str(17905)))
+ if _nReserve < int32(0) || _nReserve >= int32(1000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50688), unsafe.Pointer(&_sqlite3PagerSetPagesizeØ00__func__Ø000), unsafe.Pointer(str(17860)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_pPager.X45))) = int16(_nReserve)
+ _pPager.XnReserve = int16(_nReserve)
_pagerFixMaplimit(tls, _pPager)
_16:
return _rc
@@ -17336,63 +17657,76 @@ _16:
var _sqlite3PagerSetPagesizeØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerSetPagesizeØ00__func__Ø000[0], str(17934), 24)
+ crt.Xstrncpy(nil, &_sqlite3PagerSetPagesizeØ00__func__Ø000[0], str(17889), 24)
}
func _sqlite3OsFileSize(tls *crt.TLS, _id *Xsqlite3_file, _pSize *int64) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X6)})))(tls, _id, _pSize)
-}
-
-// Malloc function used by SQLite to obtain space from the buffer configured
-// using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer
-// exists, this function falls back to sqlite3Malloc().
+ return func() func(*crt.TLS, *Xsqlite3_file, *int64) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxFileSize
+ return *(*func(*crt.TLS, *Xsqlite3_file, *int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _pSize)
+}
+
+// C comment
+// /*
+// ** Malloc function used by SQLite to obtain space from the buffer configured
+// ** using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer
+// ** exists, this function falls back to sqlite3Malloc().
+// */
func _sqlite3PageMalloc(tls *crt.TLS, _sz int32) (r0 unsafe.Pointer) {
return _pcache1Alloc(tls, _sz)
}
-// Discard the entire contents of the in-memory page-cache.
+// C comment
+// /*
+// ** Discard the entire contents of the in-memory page-cache.
+// */
func _pager_reset(tls *crt.TLS, _pPager *XPager) {
- *(*uint32)(unsafe.Pointer(&(_pPager.X39))) += 1
- _sqlite3BackupRestart(tls, (*Xsqlite3_backup)(_pPager.X36))
- _sqlite3PcacheClear(tls, (*XPCache)(_pPager.X59))
+ _pPager.XiDataVersion += 1
+ _sqlite3BackupRestart(tls, (*Xsqlite3_backup)(_pPager.XpBackup))
+ _sqlite3PcacheClear(tls, (*XPCache)(_pPager.XpPCache))
}
-// Discard the contents of the cache.
+// C comment
+// /*
+// ** Discard the contents of the cache.
+// */
func _sqlite3PcacheClear(tls *crt.TLS, _pCache *XPCache) {
- _sqlite3PcacheTruncate(tls, _pCache, uint32(i32(0)))
-}
-
-// Drop every cache entry whose page number is greater than "pgno". The
-// caller must ensure that there are no outstanding references to any pages
-// other than page 1 with a page number greater than pgno.
-//
-// If there is a reference to page 1 and the pgno parameter passed to this
-// function is 0, then the data area associated with page 1 is zeroed, but
-// the page object is not dropped.
+ _sqlite3PcacheTruncate(tls, _pCache, 0)
+}
+
+// C comment
+// /*
+// ** Drop every cache entry whose page number is greater than "pgno". The
+// ** caller must ensure that there are no outstanding references to any pages
+// ** other than page 1 with a page number greater than pgno.
+// **
+// ** If there is a reference to page 1 and the pgno parameter passed to this
+// ** function is 0, then the data area associated with page 1 is zeroed, but
+// ** the page object is not dropped.
+// */
func _sqlite3PcacheTruncate(tls *crt.TLS, _pCache *XPCache, _pgno uint32) {
var _1_p, _1_pNext *XPgHdr
var _4_pPage1 *Xsqlite3_pcache_page
- if (_pCache.X12) == nil {
+ if _pCache.XpCache == nil {
goto _0
}
- _1_p = (*XPgHdr)(_pCache.X0)
+ _1_p = (*XPgHdr)(_pCache.XpDirty)
_1:
if _1_p == nil {
goto _4
}
- _1_pNext = (*XPgHdr)(_1_p.X9)
+ _1_pNext = (*XPgHdr)(_1_p.XpDirtyNext)
func() {
- if (_1_p.X5) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44782), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheTruncateØ00__func__Ø000))), unsafe.Pointer(str(17958)))
+ if _1_p.Xpgno <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44782), unsafe.Pointer(&_sqlite3PcacheTruncateØ00__func__Ø000), unsafe.Pointer(str(17913)))
crt.X__builtin_abort(tls)
}
}()
- if (_1_p.X5) > _pgno {
+ if _1_p.Xpgno > _pgno {
func() {
- if (int32(_1_p.X6) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44784), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheTruncateØ00__func__Ø000))), unsafe.Pointer(str(17968)))
+ if (int32(_1_p.Xflags) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44784), unsafe.Pointer(&_sqlite3PcacheTruncateØ00__func__Ø000), unsafe.Pointer(str(17923)))
crt.X__builtin_abort(tls)
}
}()
@@ -17401,81 +17735,83 @@ _1:
_1_p = _1_pNext
goto _1
_4:
- if _pgno != uint32(i32(0)) || (_pCache.X3) == 0 {
+ if _pgno != (0) || _pCache.XnRefSum == 0 {
goto _11
}
- _4_pPage1 = (*(*func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, uint32, int32) unsafe.Pointer
- }{((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X7)})))(tls, _pCache.X12, uint32(i32(1)), i32(0))
+ _4_pPage1 = func() func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page {
+ v := _sqlite3Config.Xpcache2.XxFetch
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page)(unsafe.Pointer(&v))
+ }()(tls, _pCache.XpCache, uint32(1), int32(0))
if func() int32 {
if _4_pPage1 != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44791), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheTruncateØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44791), unsafe.Pointer(&_sqlite3PcacheTruncateØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- crt.Xmemset(tls, _4_pPage1.X0, i32(0), uint32(_pCache.X6))
- _pgno = uint32(i32(1))
+ crt.Xmemset(tls, _4_pPage1.XpBuf, int32(0), uint32(_pCache.XszPage))
+ _pgno = uint32(1)
}
_11:
- ((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X10)(tls, _pCache.X12, _pgno+uint32(i32(1)))
+ (_sqlite3Config.Xpcache2.XxTruncate)(tls, _pCache.XpCache, _pgno+uint32(1))
_0:
}
var _sqlite3PcacheTruncateØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheTruncateØ00__func__Ø000[0], str(17989), 22)
+ crt.Xstrncpy(nil, &_sqlite3PcacheTruncateØ00__func__Ø000[0], str(17944), 22)
}
-// Make sure the page is marked as clean. If it isn't clean already,
-// make it so.
+// C comment
+// /*
+// ** Make sure the page is marked as clean. If it isn't clean already,
+// ** make it so.
+// */
func _sqlite3PcacheMakeClean(tls *crt.TLS, _p *XPgHdr) {
func() {
if _sqlite3PcachePageSanity(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44698), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMakeCleanØ00__func__Ø000))), unsafe.Pointer(str(13867)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44698), unsafe.Pointer(&_sqlite3PcacheMakeCleanØ00__func__Ø000), unsafe.Pointer(str(13822)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
- if (int32(_p.X6) & i32(2)) != i32(0) {
- return i32(1)
+ if (int32(_p.Xflags) & int32(2)) != int32(0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44699), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMakeCleanØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44699), unsafe.Pointer(&_sqlite3PcacheMakeCleanØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _4
}
func() {
- if (int32(_p.X6) & i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44700), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMakeCleanØ00__func__Ø000))), unsafe.Pointer(str(18011)))
+ if (int32(_p.Xflags) & int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44700), unsafe.Pointer(&_sqlite3PcacheMakeCleanØ00__func__Ø000), unsafe.Pointer(str(17966)))
crt.X__builtin_abort(tls)
}
}()
- _pcacheManageDirtyList(tls, _p, uint8(i32(1)))
+ _pcacheManageDirtyList(tls, _p, uint8(1))
{
- p := (*uint16)(unsafe.Pointer(&(_p.X6)))
- *p = uint16(int32(*p) & i32(-15))
- sink14(*p)
+ p := &_p.Xflags
+ *p = uint16(int32(*p) & int32(-15))
}
{
- p := (*uint16)(unsafe.Pointer(&(_p.X6)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ p := &_p.Xflags
+ *p = uint16(int32(*p) | int32(1))
}
func() {
if _sqlite3PcachePageSanity(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44705), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMakeCleanØ00__func__Ø000))), unsafe.Pointer(str(13867)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44705), unsafe.Pointer(&_sqlite3PcacheMakeCleanØ00__func__Ø000), unsafe.Pointer(str(13822)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_p.X7) == i32(0) {
+ if int32(_p.XnRef) == int32(0) {
_pcacheUnpin(tls, _p)
}
_4:
@@ -17484,183 +17820,200 @@ _4:
var _sqlite3PcacheMakeCleanØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheMakeCleanØ00__func__Ø000[0], str(18039), 23)
+ crt.Xstrncpy(nil, &_sqlite3PcacheMakeCleanØ00__func__Ø000[0], str(17994), 23)
}
-// Change the page size for PCache object. The caller must ensure that there
-// are no outstanding page references when this function is called.
+// C comment
+// /*
+// ** Change the page size for PCache object. The caller must ensure that there
+// ** are no outstanding page references when this function is called.
+// */
func _sqlite3PcacheSetPageSize(tls *crt.TLS, _pCache *XPCache, _szPage int32) (r0 int32) {
var _1_pNew unsafe.Pointer
func() {
- if (_pCache.X3) != i32(0) || (*XPgHdr)(_pCache.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44444), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheSetPageSizeØ00__func__Ø000))), unsafe.Pointer(str(18062)))
+ if _pCache.XnRefSum != int32(0) || (*XPgHdr)(_pCache.XpDirty) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44444), unsafe.Pointer(&_sqlite3PcacheSetPageSizeØ00__func__Ø000), unsafe.Pointer(str(18017)))
crt.X__builtin_abort(tls)
}
}()
- if (_pCache.X6) == 0 {
+ if _pCache.XszPage == 0 {
goto _3
}
- _1_pNew = ((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X4)(tls, _szPage, int32(uint32(_pCache.X7)+u32(40)), int32(_pCache.X8))
+ _1_pNew = (_sqlite3Config.Xpcache2.XxCreate)(tls, _szPage, int32(uint32(_pCache.XszExtra)+uint32(40)), int32(_pCache.XbPurgeable))
if _1_pNew == nil {
- return _sqlite3NomemError(tls, i32(44451))
+ return _sqlite3NomemError(tls, int32(44451))
}
- ((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X5)(tls, _1_pNew, _numberOfCachePages(tls, _pCache))
- if (_pCache.X12) != nil {
- ((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X11)(tls, _pCache.X12)
+ (_sqlite3Config.Xpcache2.XxCachesize)(tls, _1_pNew, _numberOfCachePages(tls, _pCache))
+ if _pCache.XpCache != nil {
+ (_sqlite3Config.Xpcache2.XxDestroy)(tls, _pCache.XpCache)
}
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X12))) = _1_pNew
- *(*int32)(unsafe.Pointer(&(_pCache.X6))) = _szPage
+ _pCache.XpCache = _1_pNew
+ _pCache.XszPage = _szPage
_3:
- return i32(0)
+ return int32(0)
}
var _sqlite3PcacheSetPageSizeØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheSetPageSizeØ00__func__Ø000[0], str(18102), 25)
+ crt.Xstrncpy(nil, &_sqlite3PcacheSetPageSizeØ00__func__Ø000[0], str(18057), 25)
}
-// Compute the number of pages of cache requested. p->szCache is the
-// cache size requested by the "PRAGMA cache_size" statement.
+// C comment
+// /*
+// ** Compute the number of pages of cache requested. p->szCache is the
+// ** cache size requested by the "PRAGMA cache_size" statement.
+// */
func _numberOfCachePages(tls *crt.TLS, _p *XPCache) (r0 int32) {
- if (_p.X4) >= i32(0) {
- return _p.X4
+ if _p.XszCache >= int32(0) {
+ return _p.XszCache
}
- return int32((int64(i32(-1024)) * int64(_p.X4)) / int64((_p.X6)+(_p.X7)))
+ return int32((int64(-1024) * int64(_p.XszCache)) / int64(_p.XszPage+_p.XszExtra))
}
-// Free an allocated buffer obtained from sqlite3PageMalloc().
+// C comment
+// /*
+// ** Free an allocated buffer obtained from sqlite3PageMalloc().
+// */
func _sqlite3PageFree(tls *crt.TLS, _p unsafe.Pointer) {
_pcache1Free(tls, _p)
}
-// Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap.
+// C comment
+// /*
+// ** Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap.
+// */
func _pagerFixMaplimit(tls *crt.TLS, _pPager *XPager) {
var _1_sz int64
var _fd *Xsqlite3_file
- _fd = (*Xsqlite3_file)(_pPager.X31)
- if ((*Xsqlite3_io_methods)(_fd.X0) != nil) && (((*Xsqlite3_io_methods)(_fd.X0).X0) >= i32(3)) {
- _1_sz = _pPager.X42
- *(*uint8)(unsafe.Pointer(&(_pPager.X20))) = uint8(bool2int(_1_sz > int64(i32(0))))
+ _fd = (*Xsqlite3_file)(_pPager.Xfd)
+ if ((*Xsqlite3_io_methods)(_fd.XpMethods) != nil) && (((*Xsqlite3_io_methods)(_fd.XpMethods).XiVersion) >= int32(3)) {
+ _1_sz = _pPager.XszMmap
+ _pPager.XbUseFetch = uint8(bool2int(_1_sz > (0)))
_setGetterMethod(tls, _pPager)
- _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pPager.X31), i32(18), (unsafe.Pointer)(&_1_sz))
+ _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pPager.Xfd), int32(18), unsafe.Pointer(&_1_sz))
}
}
-// Set the Pager.xGet method for the appropriate routine used to fetch
-// content from the pager.
+// C comment
+// /*
+// ** Set the Pager.xGet method for the appropriate routine used to fetch
+// ** content from the pager.
+// */
func _setGetterMethod(tls *crt.TLS, _pPager *XPager) {
- if (_pPager.X26) != 0 {
- *(*func(*crt.TLS, *XPager, uint32, **XPgHdr, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, uint32, *unsafe.Pointer, int32) int32)(unsafe.Pointer(&(_pPager.X57))))) = _getPageError
+ if _pPager.XerrCode != 0 {
+ *(*func(*crt.TLS, *XPager, uint32, **XPgHdr, int32) int32)(unsafe.Pointer(&_pPager.XxGet)) = _getPageError
goto _3
}
- if (_pPager.X20) != 0 {
- *(*func(*crt.TLS, *XPager, uint32, **XPgHdr, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, uint32, *unsafe.Pointer, int32) int32)(unsafe.Pointer(&(_pPager.X57))))) = _getPageMMap
+ if _pPager.XbUseFetch != 0 {
+ *(*func(*crt.TLS, *XPager, uint32, **XPgHdr, int32) int32)(unsafe.Pointer(&_pPager.XxGet)) = _getPageMMap
goto _3
}
- *(*func(*crt.TLS, *XPager, uint32, **XPgHdr, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, uint32, *unsafe.Pointer, int32) int32)(unsafe.Pointer(&(_pPager.X57))))) = _getPageNormal
+ *(*func(*crt.TLS, *XPager, uint32, **XPgHdr, int32) int32)(unsafe.Pointer(&_pPager.XxGet)) = _getPageNormal
_3:
}
-// The page getter method for when the pager is an error state
+// C comment
+// /* The page getter method for when the pager is an error state */
func _getPageError(tls *crt.TLS, _pPager *XPager, _pgno uint32, _ppPage **XPgHdr, _flags int32) (r0 int32) {
func() {
- if (_pPager.X26) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52502), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageErrorØ00__func__Ø000))), unsafe.Pointer(str(12253)))
+ if _pPager.XerrCode == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52502), unsafe.Pointer(&_getPageErrorØ00__func__Ø000), unsafe.Pointer(str(12208)))
crt.X__builtin_abort(tls)
}
}()
*_ppPage = nil
- return _pPager.X26
+ return _pPager.XerrCode
}
var _getPageErrorØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_getPageErrorØ00__func__Ø000[0], str(18127), 13)
+ crt.Xstrncpy(nil, &_getPageErrorØ00__func__Ø000[0], str(18082), 13)
}
-// The page getter for when memory-mapped I/O is enabled
+// C comment
+// /* The page getter for when memory-mapped I/O is enabled */
func _getPageMMap(tls *crt.TLS, _pPager *XPager, _pgno uint32, _ppPage **XPgHdr, _flags int32) (r0 int32) {
var _rc, _bMmapOk int32
var _iFrame uint32
var _4_pData unsafe.Pointer
var _pPg *XPgHdr
- _rc = i32(0)
+ _rc = int32(0)
_pPg = nil
- _iFrame = u32(0)
- _bMmapOk = bool2int((_pgno > uint32(i32(1))) && ((int32(_pPager.X14) == i32(1)) || (_flags&i32(2)) != 0))
+ _iFrame = uint32(0)
+ _bMmapOk = bool2int((_pgno > uint32(1)) && ((int32(_pPager.XeState) == int32(1)) || (_flags&int32(2)) != 0))
func() {
- if (_pPager.X20) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52440), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageMMapØ00__func__Ø000))), unsafe.Pointer(str(18140)))
+ if _pPager.XbUseFetch == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52440), unsafe.Pointer(&_getPageMMapØ00__func__Ø000), unsafe.Pointer(str(18095)))
crt.X__builtin_abort(tls)
}
}()
- if (_pgno <= uint32(i32(1))) && (_pgno == uint32(i32(0))) {
- return _sqlite3CorruptError(tls, i32(52450))
+ if (_pgno <= uint32(1)) && (_pgno == (0)) {
+ return _sqlite3CorruptError(tls, int32(52450))
}
func() {
- if int32(_pPager.X14) < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52452), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageMMapØ00__func__Ø000))), unsafe.Pointer(str(18157)))
+ if int32(_pPager.XeState) < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52452), unsafe.Pointer(&_getPageMMapØ00__func__Ø000), unsafe.Pointer(str(18112)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52453), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageMMapØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52453), unsafe.Pointer(&_getPageMMapØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X21) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52454), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageMMapØ00__func__Ø000))), unsafe.Pointer(str(18186)))
+ if int32(_pPager.XhasHeldSharedLock) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52454), unsafe.Pointer(&_getPageMMapØ00__func__Ø000), unsafe.Pointer(str(18141)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52455), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageMMapØ00__func__Ø000))), unsafe.Pointer(str(11754)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52455), unsafe.Pointer(&_getPageMMapØ00__func__Ø000), unsafe.Pointer(str(11709)))
crt.X__builtin_abort(tls)
}
}()
- if _bMmapOk == 0 || (*XWal)(_pPager.X60) == nil {
+ if _bMmapOk == 0 || (*XWal)(_pPager.XpWal) == nil {
goto _15
}
- _rc = _sqlite3WalFindFrame(tls, (*XWal)(_pPager.X60), _pgno, &_iFrame)
- if _rc != i32(0) {
+ _rc = _sqlite3WalFindFrame(tls, (*XWal)(_pPager.XpWal), _pgno, &_iFrame)
+ if _rc != int32(0) {
*_ppPage = nil
return _rc
}
_15:
- if _bMmapOk == 0 || _iFrame != uint32(i32(0)) {
+ if _bMmapOk == 0 || _iFrame != (0) {
goto _18
}
_4_pData = nil
- _rc = _sqlite3OsFetch(tls, (*Xsqlite3_file)(_pPager.X31), int64(_pgno-uint32(i32(1)))*int64(_pPager.X48), _pPager.X48, &_4_pData)
- if _rc != i32(0) || _4_pData == nil {
+ _rc = _sqlite3OsFetch(tls, (*Xsqlite3_file)(_pPager.Xfd), int64(_pgno-uint32(1))*int64(_pPager.XpageSize), _pPager.XpageSize, &_4_pData)
+ if _rc != int32(0) || _4_pData == nil {
goto _20
}
- if (int32(_pPager.X14) > i32(1)) || ((_pPager.X10) != 0) {
+ if (int32(_pPager.XeState) > int32(1)) || (_pPager.XtempFile != 0) {
_pPg = _sqlite3PagerLookup(tls, _pPager, _pgno)
}
if _pPg == nil {
_rc = _pagerAcquireMapPage(tls, _pPager, _pgno, _4_pData, &_pPg)
goto _24
}
- _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.X31), int64(_pgno-uint32(i32(1)))*int64(_pPager.X48), _4_pData)
+ _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.Xfd), int64(_pgno-uint32(1))*int64(_pPager.XpageSize), _4_pData)
_24:
if _pPg != nil {
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52479), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageMMapØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52479), unsafe.Pointer(&_getPageMMapØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
*_ppPage = _pPg
- return i32(0)
+ return int32(0)
}
_20:
- if _rc != i32(0) {
+ if _rc != int32(0) {
*_ppPage = nil
return _rc
}
@@ -17671,282 +18024,290 @@ _18:
var _getPageMMapØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_getPageMMapØ00__func__Ø000[0], str(18215), 12)
+ crt.Xstrncpy(nil, &_getPageMMapØ00__func__Ø000[0], str(18170), 12)
}
-// The real implementation of xFetch and xUnfetch
+// C comment
+// /* The real implementation of xFetch and xUnfetch */
func _sqlite3OsFetch(tls *crt.TLS, _id *Xsqlite3_file, _iOff int64, _iAmt int32, _pp *unsafe.Pointer) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X17)})))(tls, _id, _iOff, _iAmt, _pp)
-}
-
-// Obtain a reference to a memory mapped page object for page number pgno.
-// The new object will use the pointer pData, obtained from xFetch().
-// If successful, set *ppPage to point to the new page reference
-// and return SQLITE_OK. Otherwise, return an SQLite error code and set
-// *ppPage to zero.
-//
-// Page references obtained by calling this function should be released
-// by calling pagerReleaseMapPage().
+ return func() func(*crt.TLS, *Xsqlite3_file, int64, int32, *unsafe.Pointer) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxFetch
+ return *(*func(*crt.TLS, *Xsqlite3_file, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _iOff, _iAmt, _pp)
+}
+
+// C comment
+// /*
+// ** Obtain a reference to a memory mapped page object for page number pgno.
+// ** The new object will use the pointer pData, obtained from xFetch().
+// ** If successful, set *ppPage to point to the new page reference
+// ** and return SQLITE_OK. Otherwise, return an SQLite error code and set
+// ** *ppPage to zero.
+// **
+// ** Page references obtained by calling this function should be released
+// ** by calling pagerReleaseMapPage().
+// */
func _pagerAcquireMapPage(tls *crt.TLS, _pPager *XPager, _pgno uint32, _pData unsafe.Pointer, _ppPage **XPgHdr) (r0 int32) {
var _p *XPgHdr
- if (*XPgHdr)(_pPager.X43) != nil {
- *_ppPage = store25(&_p, (*XPgHdr)(_pPager.X43))
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X43))))) = (*XPgHdr)(_p.X3)
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3))))) = nil
+ if _pPager.XpMmapFreelist != nil {
+ *_ppPage = store34(&_p, (*XPgHdr)(_pPager.XpMmapFreelist))
+ *(**XPgHdr)(unsafe.Pointer(&_pPager.XpMmapFreelist)) = (*XPgHdr)(_p.XpDirty)
+ *(**XPgHdr)(unsafe.Pointer(&_p.XpDirty)) = nil
func() {
- if int32(_pPager.X44) < i32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50940), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000))), unsafe.Pointer(str(18227)))
+ if int32(_pPager.XnExtra) < int32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50940), unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000), unsafe.Pointer(str(18182)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, _p.X2, i32(0), uint32(i32(8)))
+ crt.Xmemset(tls, _p.XpExtra, int32(0), uint32(8))
goto _3
}
- *_ppPage = store25(&_p, (*XPgHdr)(_sqlite3MallocZero(tls, uint64(u32(40)+uint32(_pPager.X44)))))
+ *_ppPage = store34(&_p, (*XPgHdr)(_sqlite3MallocZero(tls, uint64(uint32(40)+uint32(_pPager.XnExtra)))))
if _p == nil {
- _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.X31), int64(_pgno-uint32(i32(1)))*int64(_pPager.X48), _pData)
- return _sqlite3NomemError(tls, i32(50946))
+ _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.Xfd), int64(_pgno-uint32(1))*int64(_pPager.XpageSize), _pData)
+ return _sqlite3NomemError(tls, int32(50946))
}
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))) = (unsafe.Pointer)((*XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 40*uintptr(i32(1)))))
- *(*uint16)(unsafe.Pointer(&(_p.X6))) = uint16(i32(32))
- *(*int16)(unsafe.Pointer(&(_p.X7))) = int16(i32(1))
- *(**XPager)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))))) = _pPager
+ _p.XpExtra = unsafe.Pointer(elem34(_p, uintptr(1)))
+ _p.Xflags = uint16(32)
+ _p.XnRef = int16(1)
+ *(**XPager)(unsafe.Pointer(&_p.XpPager)) = _pPager
_3:
func() {
- if _p.X2 != (unsafe.Pointer)((*XPgHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p))+40*uintptr(i32(1))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50954), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000))), unsafe.Pointer(str(18245)))
+ if _p.XpExtra != unsafe.Pointer(elem34(_p, uintptr(1))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50954), unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000), unsafe.Pointer(str(18200)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_pcache_page)(_p.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50955), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000))), unsafe.Pointer(str(18270)))
+ if (*Xsqlite3_pcache_page)(_p.XpPage) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50955), unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000), unsafe.Pointer(str(18225)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X6) != i32(32) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50956), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000))), unsafe.Pointer(str(18282)))
+ if int32(_p.Xflags) != int32(32) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50956), unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000), unsafe.Pointer(str(18237)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPager)(_p.X4) != _pPager {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50957), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000))), unsafe.Pointer(str(18303)))
+ if (*XPager)(_p.XpPager) != _pPager {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50957), unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000), unsafe.Pointer(str(18258)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X7) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50958), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000))), unsafe.Pointer(str(16340)))
+ if int32(_p.XnRef) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50958), unsafe.Pointer(&_pagerAcquireMapPageØ00__func__Ø000), unsafe.Pointer(str(16295)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_p.X5))) = _pgno
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))) = _pData
- *(*int32)(unsafe.Pointer(&(_pPager.X41))) += 1
- return i32(0)
+ _p.Xpgno = _pgno
+ _p.XpData = _pData
+ _pPager.XnMmapOut += 1
+ return int32(0)
}
var _pagerAcquireMapPageØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_pagerAcquireMapPageØ00__func__Ø000[0], str(18321), 20)
-}
-
-// The page getter methods each try to acquire a reference to a
-// page with page number pgno. If the requested reference is
-// successfully obtained, it is copied to *ppPage and SQLITE_OK returned.
-//
-// There are different implementations of the getter method depending
-// on the current state of the pager.
-//
-// getPageNormal() -- The normal getter
-// getPageError() -- Used if the pager is in an error state
-// getPageMmap() -- Used if memory-mapped I/O is enabled
-//
-// If the requested page is already in the cache, it is returned.
-// Otherwise, a new page object is allocated and populated with data
-// read from the database file. In some cases, the pcache module may
-// choose not to allocate a new page object and may reuse an existing
-// object with no outstanding references.
-//
-// The extra data appended to a page is always initialized to zeros the
-// first time a page is loaded into memory. If the page requested is
-// already in the cache when this function is called, then the extra
-// data is left as it was when the page object was last used.
-//
-// If the database image is smaller than the requested page or if
-// the flags parameter contains the PAGER_GET_NOCONTENT bit and the
-// requested page is not already stored in the cache, then no
-// actual disk read occurs. In this case the memory image of the
-// page is initialized to all zeros.
-//
-// If PAGER_GET_NOCONTENT is true, it means that we do not care about
-// the contents of the page. This occurs in two scenarios:
-//
-// a) When reading a free-list leaf page from the database, and
-//
-// b) When a savepoint is being rolled back and we need to load
-// a new page into the cache to be filled with the data read
-// from the savepoint journal.
-//
-// If PAGER_GET_NOCONTENT is true, then the data returned is zeroed instead
-// of being read from the database. Additionally, the bits corresponding
-// to pgno in Pager.pInJournal (bitvec of pages already written to the
-// journal file) and the PagerSavepoint.pInSavepoint bitvecs of any open
-// savepoints are set. This means if the page is made writable at any
-// point in the future, using a call to sqlite3PagerWrite(), its contents
-// will not be journaled. This saves IO.
-//
-// The acquisition might fail for several reasons. In all cases,
-// an appropriate error code is returned and *ppPage is set to NULL.
-//
-// See also sqlite3PagerLookup(). Both this routine and Lookup() attempt
-// to find a page in the in-memory cache first. If the page is not already
-// in memory, this routine goes to disk to read it in whereas Lookup()
-// just returns 0. This routine acquires a read-lock the first time it
-// has to go to disk, and could also playback an old journal if necessary.
-// Since Lookup() never goes to disk, it never has to deal with locks
-// or journal files.
+ crt.Xstrncpy(nil, &_pagerAcquireMapPageØ00__func__Ø000[0], str(18276), 20)
+}
+
+// C comment
+// /*
+// ** The page getter methods each try to acquire a reference to a
+// ** page with page number pgno. If the requested reference is
+// ** successfully obtained, it is copied to *ppPage and SQLITE_OK returned.
+// **
+// ** There are different implementations of the getter method depending
+// ** on the current state of the pager.
+// **
+// ** getPageNormal() -- The normal getter
+// ** getPageError() -- Used if the pager is in an error state
+// ** getPageMmap() -- Used if memory-mapped I/O is enabled
+// **
+// ** If the requested page is already in the cache, it is returned.
+// ** Otherwise, a new page object is allocated and populated with data
+// ** read from the database file. In some cases, the pcache module may
+// ** choose not to allocate a new page object and may reuse an existing
+// ** object with no outstanding references.
+// **
+// ** The extra data appended to a page is always initialized to zeros the
+// ** first time a page is loaded into memory. If the page requested is
+// ** already in the cache when this function is called, then the extra
+// ** data is left as it was when the page object was last used.
+// **
+// ** If the database image is smaller than the requested page or if
+// ** the flags parameter contains the PAGER_GET_NOCONTENT bit and the
+// ** requested page is not already stored in the cache, then no
+// ** actual disk read occurs. In this case the memory image of the
+// ** page is initialized to all zeros.
+// **
+// ** If PAGER_GET_NOCONTENT is true, it means that we do not care about
+// ** the contents of the page. This occurs in two scenarios:
+// **
+// ** a) When reading a free-list leaf page from the database, and
+// **
+// ** b) When a savepoint is being rolled back and we need to load
+// ** a new page into the cache to be filled with the data read
+// ** from the savepoint journal.
+// **
+// ** If PAGER_GET_NOCONTENT is true, then the data returned is zeroed instead
+// ** of being read from the database. Additionally, the bits corresponding
+// ** to pgno in Pager.pInJournal (bitvec of pages already written to the
+// ** journal file) and the PagerSavepoint.pInSavepoint bitvecs of any open
+// ** savepoints are set. This means if the page is made writable at any
+// ** point in the future, using a call to sqlite3PagerWrite(), its contents
+// ** will not be journaled. This saves IO.
+// **
+// ** The acquisition might fail for several reasons. In all cases,
+// ** an appropriate error code is returned and *ppPage is set to NULL.
+// **
+// ** See also sqlite3PagerLookup(). Both this routine and Lookup() attempt
+// ** to find a page in the in-memory cache first. If the page is not already
+// ** in memory, this routine goes to disk to read it in whereas Lookup()
+// ** just returns 0. This routine acquires a read-lock the first time it
+// ** has to go to disk, and could also playback an old journal if necessary.
+// ** Since Lookup() never goes to disk, it never has to deal with locks
+// ** or journal files.
+// */
func _getPageNormal(tls *crt.TLS, _pPager *XPager, _pgno uint32, _ppPage **XPgHdr, _flags int32) (r0 int32) {
var _rc int32
var _10_iFrame uint32
var _noContent uint8
var _pPg *XPgHdr
var _pBase *Xsqlite3_pcache_page
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52326), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(11754)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52326), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(11709)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52327), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(18157)))
+ if int32(_pPager.XeState) < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52327), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(18112)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52328), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52328), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X21) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52329), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(18186)))
+ if int32(_pPager.XhasHeldSharedLock) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52329), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(18141)))
crt.X__builtin_abort(tls)
}
}()
- if _pgno == uint32(i32(0)) {
- return _sqlite3CorruptError(tls, i32(52331))
+ if _pgno == (0) {
+ return _sqlite3CorruptError(tls, int32(52331))
}
- _pBase = _sqlite3PcacheFetch(tls, (*XPCache)(_pPager.X59), _pgno, i32(3))
+ _pBase = _sqlite3PcacheFetch(tls, (*XPCache)(_pPager.XpPCache), _pgno, int32(3))
if _pBase != nil {
goto _9
}
_pPg = nil
- _rc = _sqlite3PcacheFetchStress(tls, (*XPCache)(_pPager.X59), _pgno, &_pBase)
- if _rc != i32(0) {
+ _rc = _sqlite3PcacheFetchStress(tls, (*XPCache)(_pPager.XpPCache), _pgno, &_pBase)
+ if _rc != int32(0) {
goto _pager_acquire_err
}
if _pBase == nil {
- _rc = _sqlite3NomemError(tls, i32(52338))
+ _rc = _sqlite3NomemError(tls, int32(52338))
goto _pager_acquire_err
}
_9:
- _pPg = store25(_ppPage, _sqlite3PcacheFetchFinish(tls, (*XPCache)(_pPager.X59), _pgno, _pBase))
+ _pPg = store34(_ppPage, _sqlite3PcacheFetchFinish(tls, (*XPCache)(_pPager.XpPCache), _pgno, _pBase))
func() {
if _pPg != (*_ppPage) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52343), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(18341)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52343), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(18296)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPg.X5) != _pgno {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52344), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(18356)))
+ if _pPg.Xpgno != _pgno {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52344), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(18311)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPager)(_pPg.X4) != _pPager && (*XPager)(_pPg.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52345), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(18372)))
+ if (*XPager)(_pPg.XpPager) != _pPager && (*XPager)(_pPg.XpPager) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52345), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(18327)))
crt.X__builtin_abort(tls)
}
}()
- _noContent = uint8(bool2int((_flags & i32(1)) != i32(0)))
- if ((*XPager)(_pPg.X4) != nil) && (_noContent == 0) {
+ _noContent = uint8(bool2int((_flags & int32(1)) != int32(0)))
+ if (_pPg.XpPager != nil) && (_noContent == 0) {
func() {
- if _pgno > uint32(i32(2147483647)) || _pgno == uint32((_sqlite3PendingByte/(_pPager.X48))+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52351), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(18410)))
+ if _pgno > uint32(2147483647) || _pgno == uint32((_sqlite3PendingByte/_pPager.XpageSize)+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52351), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(18365)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&(_pPager.X55))))) + 4*uintptr(i32(0)))) += 1
- return i32(0)
+ *elem8((*int32)(unsafe.Pointer(&_pPager.XaStat)), 0) += 1
+ return int32(0)
}
- if (_pgno > uint32(i32(2147483647))) || (_pgno == uint32((_sqlite3PendingByte/(_pPager.X48))+i32(1))) {
- _rc = _sqlite3CorruptError(tls, i32(52363))
+ if (_pgno > uint32(2147483647)) || (_pgno == uint32((_sqlite3PendingByte/_pPager.XpageSize)+int32(1))) {
+ _rc = _sqlite3CorruptError(tls, int32(52363))
goto _pager_acquire_err
}
- *(**XPager)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPg.X4))))) = _pPager
+ *(**XPager)(unsafe.Pointer(&_pPg.XpPager)) = _pPager
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) != nil && (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52369), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(18462)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) != nil && _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52369), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(18417)))
crt.X__builtin_abort(tls)
}
}()
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) != nil && (_pPager.X22) >= _pgno && _noContent == 0 {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) != nil && _pPager.XdbSize >= _pgno && _noContent == 0 {
goto _32
}
- if _pgno > (_pPager.X49) {
- _rc = i32(13)
+ if _pgno > _pPager.XmxPgno {
+ _rc = int32(13)
goto _pager_acquire_err
}
if _noContent == 0 {
goto _34
}
_sqlite3BeginBenignMalloc(tls)
- if _pgno <= (_pPager.X23) {
- _rc = _sqlite3BitvecSet(tls, (*XBitvec)(_pPager.X30), _pgno)
+ if _pgno <= _pPager.XdbOrigSize {
+ _rc = _sqlite3BitvecSet(tls, (*XBitvec)(_pPager.XpInJournal), _pgno)
}
_rc = _addToSavepointBitvecs(tls, _pPager, _pgno)
_sqlite3EndBenignMalloc(tls)
_34:
- crt.Xmemset(tls, _pPg.X1, i32(0), uint32(_pPager.X48))
+ crt.Xmemset(tls, _pPg.XpData, int32(0), uint32(_pPager.XpageSize))
goto _36
_32:
- _10_iFrame = u32(0)
- if (*XWal)(_pPager.X60) == nil {
+ _10_iFrame = uint32(0)
+ if (*XWal)(_pPager.XpWal) == nil {
goto _37
}
- _rc = _sqlite3WalFindFrame(tls, (*XWal)(_pPager.X60), _pgno, &_10_iFrame)
- if _rc != i32(0) {
+ _rc = _sqlite3WalFindFrame(tls, (*XWal)(_pPager.XpWal), _pgno, &_10_iFrame)
+ if _rc != int32(0) {
goto _pager_acquire_err
}
_37:
func() {
- if (*XPager)(_pPg.X4) != _pPager {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52399), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(18492)))
+ if (*XPager)(_pPg.XpPager) != _pPager {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52399), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(18447)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&(_pPager.X55))))) + 4*uintptr(i32(1)))) += 1
+ *elem8((*int32)(unsafe.Pointer(&_pPager.XaStat)), uintptr(1)) += 1
_rc = _readDbPage(tls, _pPg, _10_iFrame)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _pager_acquire_err
}
_36:
- return i32(0)
+ return int32(0)
_pager_acquire_err:
func() {
- if _rc == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52411), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageNormalØ00__func__Ø000))), unsafe.Pointer(str(18512)))
+ if _rc == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52411), unsafe.Pointer(&_getPageNormalØ00__func__Ø000), unsafe.Pointer(str(18467)))
crt.X__builtin_abort(tls)
}
}()
@@ -17961,120 +18322,132 @@ _pager_acquire_err:
var _getPageNormalØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_getPageNormalØ00__func__Ø000[0], str(18526), 14)
+ crt.Xstrncpy(nil, &_getPageNormalØ00__func__Ø000[0], str(18481), 14)
}
-// If the sqlite3PcacheFetch() routine is unable to allocate a new
-// page because no clean pages are available for reuse and the cache
-// size limit has been reached, then this routine can be invoked to
-// try harder to allocate a page. This routine might invoke the stress
-// callback to spill dirty pages to the journal. It will then try to
-// allocate the new page and will only fail to allocate a new page on
-// an OOM error.
-//
-// This routine should be invoked only after sqlite3PcacheFetch() fails.
+// C comment
+// /*
+// ** If the sqlite3PcacheFetch() routine is unable to allocate a new
+// ** page because no clean pages are available for reuse and the cache
+// ** size limit has been reached, then this routine can be invoked to
+// ** try harder to allocate a page. This routine might invoke the stress
+// ** callback to spill dirty pages to the journal. It will then try to
+// ** allocate the new page and will only fail to allocate a new page on
+// ** an OOM error.
+// **
+// ** This routine should be invoked only after sqlite3PcacheFetch() fails.
+// */
func _sqlite3PcacheFetchStress(tls *crt.TLS, _pCache *XPCache, _pgno uint32, _ppPage **Xsqlite3_pcache_page) (r0 int32) {
var _3_rc int32
var _pPg *XPgHdr
- if int32(_pCache.X9) == i32(2) {
- return i32(0)
+ if int32(_pCache.XeCreate) == int32(2) {
+ return int32(0)
}
- if _sqlite3PcachePagecount(tls, _pCache) <= (_pCache.X5) {
+ if _sqlite3PcachePagecount(tls, _pCache) <= _pCache.XszSpill {
goto _1
}
- _pPg = (*XPgHdr)(_pCache.X2)
+ _pPg = (*XPgHdr)(_pCache.XpSynced)
_2:
- if _pPg == nil || (_pPg.X7) == 0 && (int32(_pPg.X6)&i32(8)) == 0 {
+ if _pPg == nil || _pPg.XnRef == 0 && (int32(_pPg.Xflags)&int32(8)) == 0 {
goto _7
}
- _pPg = (*XPgHdr)(_pPg.X10)
+ _pPg = (*XPgHdr)(_pPg.XpDirtyPrev)
goto _2
_7:
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X2))))) = _pPg
+ *(**XPgHdr)(unsafe.Pointer(&_pCache.XpSynced)) = _pPg
if _pPg != nil {
goto _8
}
- _pPg = (*XPgHdr)(_pCache.X1)
+ _pPg = (*XPgHdr)(_pCache.XpDirtyTail)
_9:
- if _pPg == nil || (_pPg.X7) == 0 {
+ if _pPg == nil || _pPg.XnRef == 0 {
goto _13
}
- _pPg = (*XPgHdr)(_pPg.X10)
+ _pPg = (*XPgHdr)(_pPg.XpDirtyPrev)
goto _9
_13:
_8:
if _pPg == nil {
goto _14
}
- _3_rc = (*(*func(*crt.TLS, unsafe.Pointer, *XPgHdr) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- }{(_pCache.X10)})))(tls, _pCache.X11, _pPg)
- if (_3_rc != i32(0)) && (_3_rc != i32(5)) {
+ _3_rc = func() func(*crt.TLS, unsafe.Pointer, *XPgHdr) int32 {
+ v := _pCache.XxStress
+ return *(*func(*crt.TLS, unsafe.Pointer, *XPgHdr) int32)(unsafe.Pointer(&v))
+ }()(tls, _pCache.XpStress, _pPg)
+ if (_3_rc != int32(0)) && (_3_rc != int32(5)) {
return _3_rc
}
_14:
_1:
- *_ppPage = (*(*func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, uint32, int32) unsafe.Pointer
- }{((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X7)})))(tls, _pCache.X12, _pgno, i32(2))
+ *_ppPage = func() func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page {
+ v := _sqlite3Config.Xpcache2.XxFetch
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32, int32) *Xsqlite3_pcache_page)(unsafe.Pointer(&v))
+ }()(tls, _pCache.XpCache, _pgno, int32(2))
return func() int32 {
if (*_ppPage) == nil {
- return _sqlite3NomemError(tls, i32(44572))
+ return _sqlite3NomemError(tls, int32(44572))
}
- return i32(0)
+ return int32(0)
}()
}
-// Return the total number of pages in the cache.
+// C comment
+// /*
+// ** Return the total number of pages in the cache.
+// */
func _sqlite3PcachePagecount(tls *crt.TLS, _pCache *XPCache) (r0 int32) {
func() {
- if (_pCache.X12) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44922), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcachePagecountØ00__func__Ø000))), unsafe.Pointer(str(15958)))
+ if _pCache.XpCache == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44922), unsafe.Pointer(&_sqlite3PcachePagecountØ00__func__Ø000), unsafe.Pointer(str(15913)))
crt.X__builtin_abort(tls)
}
}()
- return ((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X6)(tls, _pCache.X12)
+ return (_sqlite3Config.Xpcache2.XxPagecount)(tls, _pCache.XpCache)
}
var _sqlite3PcachePagecountØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcachePagecountØ00__func__Ø000[0], str(18540), 23)
+ crt.Xstrncpy(nil, &_sqlite3PcachePagecountØ00__func__Ø000[0], str(18495), 23)
}
func _sqlite3OsFileControlHint(tls *crt.TLS, _id *Xsqlite3_file, _op int32, _pArg unsafe.Pointer) {
- (*(*func(*crt.TLS, *Xsqlite3_file, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X10)})))(tls, _id, _op, _pArg)
-}
-
-// Move the write position of the WAL back to the point identified by
-// the values in the aWalData[] array. aWalData must point to an array
-// of WAL_SAVEPOINT_NDATA u32 values that has been previously populated
-// by a call to WalSavepoint().
+ func() func(*crt.TLS, *Xsqlite3_file, int32, unsafe.Pointer) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxFileControl
+ return *(*func(*crt.TLS, *Xsqlite3_file, int32, unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _op, _pArg)
+}
+
+// C comment
+// /*
+// ** Move the write position of the WAL back to the point identified by
+// ** the values in the aWalData[] array. aWalData must point to an array
+// ** of WAL_SAVEPOINT_NDATA u32 values that has been previously populated
+// ** by a call to WalSavepoint().
+// */
func _sqlite3WalSavepointUndo(tls *crt.TLS, _pWal *XWal, _aWalData *uint32) (r0 int32) {
var _rc int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (_pWal.X12) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57316), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalSavepointUndoØ00__func__Ø000))), unsafe.Pointer(str(15606)))
+ if _pWal.XwriteLock == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57316), unsafe.Pointer(&_sqlite3WalSavepointUndoØ00__func__Ø000), unsafe.Pointer(str(15561)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(3))))) == (_pWal.X22) && (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(0))))) > ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57317), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalSavepointUndoØ00__func__Ø000))), unsafe.Pointer(str(18563)))
+ if (*elem7(_aWalData, uintptr(3))) == _pWal.XnCkpt && (*elem7(_aWalData, 0)) > (_pWal.Xhdr.XmxFrame) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57317), unsafe.Pointer(&_sqlite3WalSavepointUndoØ00__func__Ø000), unsafe.Pointer(str(18518)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(3))))) != (_pWal.X22) {
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(0)))) = uint32(i32(0))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(3)))) = _pWal.X22
+ if (*elem7(_aWalData, uintptr(3))) != _pWal.XnCkpt {
+ *elem7(_aWalData, 0) = 0
+ *elem7(_aWalData, uintptr(3)) = _pWal.XnCkpt
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(0))))) < ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
- *(*uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(0))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(0)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(1))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(1)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(2))))
+ if (*elem7(_aWalData, 0)) < (_pWal.Xhdr.XmxFrame) {
+ _pWal.Xhdr.XmxFrame = *elem7(_aWalData, 0)
+ *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), 0) = *elem7(_aWalData, uintptr(1))
+ *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), uintptr(1)) = *elem7(_aWalData, uintptr(2))
_walCleanupHash(tls, _pWal)
}
return _rc
@@ -18083,188 +18456,191 @@ func _sqlite3WalSavepointUndo(tls *crt.TLS, _pWal *XWal, _aWalData *uint32) (r0
var _sqlite3WalSavepointUndoØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalSavepointUndoØ00__func__Ø000[0], str(18622), 24)
-}
-
-// This routine ends a transaction. A transaction is usually ended by
-// either a COMMIT or a ROLLBACK operation. This routine may be called
-// after rollback of a hot-journal, or if an error occurs while opening
-// the journal file or writing the very first journal-header of a
-// database transaction.
-//
-// This routine is never called in PAGER_ERROR state. If it is called
-// in PAGER_NONE or PAGER_SHARED state and the lock held is less
-// exclusive than a RESERVED lock, it is a no-op.
-//
-// Otherwise, any active savepoints are released.
-//
-// If the journal file is open, then it is "finalized". Once a journal
-// file has been finalized it is not possible to use it to roll back a
-// transaction. Nor will it be considered to be a hot-journal by this
-// or any other database connection. Exactly how a journal is finalized
-// depends on whether or not the pager is running in exclusive mode and
-// the current journal-mode (Pager.journalMode value), as follows:
-//
-// journalMode==MEMORY
-// Journal file descriptor is simply closed. This destroys an
-// in-memory journal.
-//
-// journalMode==TRUNCATE
-// Journal file is truncated to zero bytes in size.
-//
-// journalMode==PERSIST
-// The first 28 bytes of the journal file are zeroed. This invalidates
-// the first journal header in the file, and hence the entire journal
-// file. An invalid journal file cannot be rolled back.
-//
-// journalMode==DELETE
-// The journal file is closed and deleted using sqlite3OsDelete().
-//
-// If the pager is running in exclusive mode, this method of finalizing
-// the journal file is never used. Instead, if the journalMode is
-// DELETE and the pager is in exclusive mode, the method described under
-// journalMode==PERSIST is used instead.
-//
-// After the journal is finalized, the pager moves to PAGER_READER state.
-// If running in non-exclusive rollback mode, the lock on the file is
-// downgraded to a SHARED_LOCK.
-//
-// SQLITE_OK is returned if no error occurs. If an error occurs during
-// any of the IO operations to finalize the journal file or unlock the
-// database then the IO error code is returned to the user. If the
-// operation to finalize the journal file fails, then the code still
-// tries to unlock the database file if not in exclusive mode. If the
-// unlock operation fails as well, then the first error code related
-// to the first error encountered (the journal finalization one) is
-// returned.
+ crt.Xstrncpy(nil, &_sqlite3WalSavepointUndoØ00__func__Ø000[0], str(18577), 24)
+}
+
+// C comment
+// /*
+// ** This routine ends a transaction. A transaction is usually ended by
+// ** either a COMMIT or a ROLLBACK operation. This routine may be called
+// ** after rollback of a hot-journal, or if an error occurs while opening
+// ** the journal file or writing the very first journal-header of a
+// ** database transaction.
+// **
+// ** This routine is never called in PAGER_ERROR state. If it is called
+// ** in PAGER_NONE or PAGER_SHARED state and the lock held is less
+// ** exclusive than a RESERVED lock, it is a no-op.
+// **
+// ** Otherwise, any active savepoints are released.
+// **
+// ** If the journal file is open, then it is "finalized". Once a journal
+// ** file has been finalized it is not possible to use it to roll back a
+// ** transaction. Nor will it be considered to be a hot-journal by this
+// ** or any other database connection. Exactly how a journal is finalized
+// ** depends on whether or not the pager is running in exclusive mode and
+// ** the current journal-mode (Pager.journalMode value), as follows:
+// **
+// ** journalMode==MEMORY
+// ** Journal file descriptor is simply closed. This destroys an
+// ** in-memory journal.
+// **
+// ** journalMode==TRUNCATE
+// ** Journal file is truncated to zero bytes in size.
+// **
+// ** journalMode==PERSIST
+// ** The first 28 bytes of the journal file are zeroed. This invalidates
+// ** the first journal header in the file, and hence the entire journal
+// ** file. An invalid journal file cannot be rolled back.
+// **
+// ** journalMode==DELETE
+// ** The journal file is closed and deleted using sqlite3OsDelete().
+// **
+// ** If the pager is running in exclusive mode, this method of finalizing
+// ** the journal file is never used. Instead, if the journalMode is
+// ** DELETE and the pager is in exclusive mode, the method described under
+// ** journalMode==PERSIST is used instead.
+// **
+// ** After the journal is finalized, the pager moves to PAGER_READER state.
+// ** If running in non-exclusive rollback mode, the lock on the file is
+// ** downgraded to a SHARED_LOCK.
+// **
+// ** SQLITE_OK is returned if no error occurs. If an error occurs during
+// ** any of the IO operations to finalize the journal file or unlock the
+// ** database then the IO error code is returned to the user. If the
+// ** operation to finalize the journal file fails, then the code still
+// ** tries to unlock the database file if not in exclusive mode. If the
+// ** unlock operation fails as well, then the first error code related
+// ** to the first error encountered (the journal finalization one) is
+// ** returned.
+// */
func _pager_end_transaction(tls *crt.TLS, _pPager *XPager, _hasMaster int32, _bCommit int32) (r0 int32) {
var _rc, _rc2, _9_bDelete int32
- _rc = i32(0)
- _rc2 = i32(0)
+ _rc = int32(0)
+ _rc2 = int32(0)
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48925), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48925), unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) == i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48926), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000))), unsafe.Pointer(str(15064)))
+ if int32(_pPager.XeState) == int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48926), unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000), unsafe.Pointer(str(15019)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pPager.X14) < i32(2)) && (int32(_pPager.X15) < i32(2)) {
- return i32(0)
+ if (int32(_pPager.XeState) < int32(2)) && (int32(_pPager.XeLock) < int32(2)) {
+ return int32(0)
}
_releaseAllSavepoints(tls, _pPager)
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil && (*XBitvec)(_pPager.X30) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48932), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000))), unsafe.Pointer(str(18646)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil && (*XBitvec)(_pPager.XpInJournal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48932), unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000), unsafe.Pointer(str(18601)))
crt.X__builtin_abort(tls)
}
}()
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil {
goto _9
}
func() {
- if (*XWal)(_pPager.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48934), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000))), unsafe.Pointer(str(12168)))
+ if (*XWal)(_pPager.XpWal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48934), unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000), unsafe.Pointer(str(12123)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.X32)) != 0 {
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X32))
+ if _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.Xjfd)) != 0 {
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xjfd))
goto _24
}
- if int32(_pPager.X2) != i32(3) {
+ if int32(_pPager.XjournalMode) != int32(3) {
goto _14
}
- if (_pPager.X34) == int64(i32(0)) {
- _rc = i32(0)
+ if _pPager.XjournalOff == (0) {
+ _rc = int32(0)
goto _16
}
- _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.X32), int64(i32(0)))
- if (_rc == i32(0)) && ((_pPager.X5) != 0) {
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.X32), int32(_pPager.X9))
+ _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.Xjfd), 0)
+ if (_rc == int32(0)) && (_pPager.XfullSync != 0) {
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.Xjfd), int32(_pPager.XsyncFlags))
}
_16:
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = int64(i32(0))
+ _pPager.XjournalOff = 0
goto _24
_14:
- if (int32(_pPager.X2) == i32(1)) || (((_pPager.X1) != 0) && (int32(_pPager.X2) != i32(5))) {
- _rc = _zeroJournalHdr(tls, _pPager, bool2int(_hasMaster != 0 || ((_pPager.X10) != 0)))
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = int64(i32(0))
+ if (int32(_pPager.XjournalMode) == int32(1)) || ((_pPager.XexclusiveMode != 0) && (int32(_pPager.XjournalMode) != int32(5))) {
+ _rc = _zeroJournalHdr(tls, _pPager, bool2int(_hasMaster != 0 || (_pPager.XtempFile != 0)))
+ _pPager.XjournalOff = 0
goto _24
}
- _9_bDelete = bool2int((_pPager.X10) == 0)
+ _9_bDelete = bool2int(_pPager.XtempFile == 0)
func() {
- if _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.X32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48967), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000))), unsafe.Pointer(str(18691)))
+ if _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.Xjfd)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48967), unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000), unsafe.Pointer(str(18646)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X2) != i32(0) && int32(_pPager.X2) != i32(4) && int32(_pPager.X2) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48968), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000))), unsafe.Pointer(str(18732)))
+ if int32(_pPager.XjournalMode) != int32(0) && int32(_pPager.XjournalMode) != int32(4) && int32(_pPager.XjournalMode) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48968), unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000), unsafe.Pointer(str(18687)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X32))
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xjfd))
if _9_bDelete != 0 {
- _rc = _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pPager.X0), _pPager.X52, int32(_pPager.X6))
+ _rc = _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pPager.XpVfs), _pPager.XzJournal, int32(_pPager.XextraSync))
}
_24:
_9:
- _sqlite3BitvecDestroy(tls, (*XBitvec)(_pPager.X30))
- *(**XBitvec)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X30))))) = nil
- *(*int32)(unsafe.Pointer(&(_pPager.X27))) = i32(0)
- if _rc != i32(0) {
+ _sqlite3BitvecDestroy(tls, (*XBitvec)(_pPager.XpInJournal))
+ *(**XBitvec)(unsafe.Pointer(&_pPager.XpInJournal)) = nil
+ _pPager.XnRec = int32(0)
+ if _rc != int32(0) {
goto _32
}
- if ((_pPager.X13) != 0) || _pagerFlushOnCommit(tls, _pPager, _bCommit) != 0 {
- _sqlite3PcacheCleanAll(tls, (*XPCache)(_pPager.X59))
+ if (_pPager.XmemDb != 0) || _pagerFlushOnCommit(tls, _pPager, _bCommit) != 0 {
+ _sqlite3PcacheCleanAll(tls, (*XPCache)(_pPager.XpPCache))
goto _35
}
- _sqlite3PcacheClearWritable(tls, (*XPCache)(_pPager.X59))
+ _sqlite3PcacheClearWritable(tls, (*XPCache)(_pPager.XpPCache))
_35:
- _sqlite3PcacheTruncate(tls, (*XPCache)(_pPager.X59), _pPager.X22)
+ _sqlite3PcacheTruncate(tls, (*XPCache)(_pPager.XpPCache), _pPager.XdbSize)
_32:
- if (*XWal)(_pPager.X60) != nil {
- _rc2 = _sqlite3WalEndWriteTransaction(tls, (*XWal)(_pPager.X60))
+ if (*XWal)(_pPager.XpWal) != nil {
+ _rc2 = _sqlite3WalEndWriteTransaction(tls, (*XWal)(_pPager.XpWal))
func() {
- if _rc2 != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49008), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000))), unsafe.Pointer(str(18873)))
+ if _rc2 != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49008), unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000), unsafe.Pointer(str(18828)))
crt.X__builtin_abort(tls)
}
}()
goto _42
}
- if ((_rc == i32(0)) && _bCommit != 0) && ((_pPager.X24) > (_pPager.X22)) {
+ if ((_rc == int32(0)) && _bCommit != 0) && (_pPager.XdbFileSize > _pPager.XdbSize) {
func() {
- if int32(_pPager.X15) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49016), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000))), unsafe.Pointer(str(18888)))
+ if int32(_pPager.XeLock) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49016), unsafe.Pointer(&_pager_end_transactionØ00__func__Ø000), unsafe.Pointer(str(18843)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _pager_truncate(tls, _pPager, _pPager.X22)
+ _rc = _pager_truncate(tls, _pPager, _pPager.XdbSize)
}
_42:
- if _rc != i32(0) || _bCommit == 0 || (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
+ if _rc != int32(0) || _bCommit == 0 || (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
goto _47
}
- _rc = _sqlite3OsFileControl(tls, (*Xsqlite3_file)(_pPager.X31), i32(22), nil)
- if _rc == i32(12) {
- _rc = i32(0)
+ _rc = _sqlite3OsFileControl(tls, (*Xsqlite3_file)(_pPager.Xfd), int32(22), nil)
+ if _rc == int32(12) {
+ _rc = int32(0)
}
_47:
- if ((_pPager.X1) == 0) && (((*XWal)(_pPager.X60) == nil) || _sqlite3WalExclusiveMode(tls, (*XWal)(_pPager.X60), i32(0)) != 0) {
- _rc2 = _pagerUnlockDb(tls, _pPager, i32(1))
- *(*uint8)(unsafe.Pointer(&(_pPager.X16))) = uint8(i32(0))
+ if (_pPager.XexclusiveMode == 0) && (((*XWal)(_pPager.XpWal) == nil) || _sqlite3WalExclusiveMode(tls, (*XWal)(_pPager.XpWal), int32(0)) != 0) {
+ _rc2 = _pagerUnlockDb(tls, _pPager, int32(1))
+ _pPager.XchangeCountDone = 0
}
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_pPager.X17))) = uint8(i32(0))
+ _pPager.XeState = uint8(1)
+ _pPager.XsetMaster = 0
return func() int32 {
- if _rc == i32(0) {
+ if _rc == int32(0) {
return _rc2
}
return _rc
@@ -18274,92 +18650,99 @@ _47:
var _pager_end_transactionØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_pager_end_transactionØ00__func__Ø000[0], str(18918), 22)
+ crt.Xstrncpy(nil, &_pager_end_transactionØ00__func__Ø000[0], str(18873), 22)
}
-// Free all structures in the Pager.aSavepoint[] array and set both
-// Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal
-// if it is open and the pager is not in exclusive mode.
+// C comment
+// /*
+// ** Free all structures in the Pager.aSavepoint[] array and set both
+// ** Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal
+// ** if it is open and the pager is not in exclusive mode.
+// */
func _releaseAllSavepoints(tls *crt.TLS, _pPager *XPager) {
var _ii int32
- _ii = i32(0)
+ _ii = int32(0)
_0:
- if _ii >= (_pPager.X38) {
+ if _ii >= _pPager.XnSavepoint {
goto _3
}
- _sqlite3BitvecDestroy(tls, (*XBitvec)((*XPagerSavepoint)(unsafe.Pointer(uintptr(_pPager.X37)+44*uintptr(_ii))).X2))
+ _sqlite3BitvecDestroy(tls, (*XBitvec)(elem31((*XPagerSavepoint)(_pPager.XaSavepoint), uintptr(_ii)).XpInSavepoint))
_ii += 1
goto _0
_3:
- if ((_pPager.X1) == 0) || _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.X33)) != 0 {
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X33))
+ if (_pPager.XexclusiveMode == 0) || _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.Xsjfd)) != 0 {
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xsjfd))
}
- Xsqlite3_free(tls, _pPager.X37)
- *(**XPagerSavepoint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X37))))) = nil
- *(*int32)(unsafe.Pointer(&(_pPager.X38))) = i32(0)
- *(*uint32)(unsafe.Pointer(&(_pPager.X29))) = uint32(i32(0))
+ Xsqlite3_free(tls, _pPager.XaSavepoint)
+ *(**XPagerSavepoint)(unsafe.Pointer(&_pPager.XaSavepoint)) = nil
+ _pPager.XnSavepoint = int32(0)
+ _pPager.XnSubRec = 0
}
func _sqlite3OsSync(tls *crt.TLS, _id *Xsqlite3_file, _flags int32) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X5)})))(tls, _id, _flags)
-}
-
-// The journal file must be open when this function is called.
-//
-// This function is a no-op if the journal file has not been written to
-// within the current transaction (i.e. if Pager.journalOff==0).
-//
-// If doTruncate is non-zero or the Pager.journalSizeLimit variable is
-// set to 0, then truncate the journal file to zero bytes in size. Otherwise,
-// zero the 28-byte header at the start of the journal file. In either case,
-// if the pager is not in no-sync mode, sync the journal file immediately
-// after writing or truncating it.
-//
-// If Pager.journalSizeLimit is set to a positive, non-zero value, and
-// following the truncation or zeroing described above the size of the
-// journal file in bytes is larger than this value, then truncate the
-// journal file to Pager.journalSizeLimit bytes. The journal file does
-// not need to be synced following this operation.
-//
-// If an IO error occurs, abandon processing and return the IO error code.
-// Otherwise, return SQLITE_OK.
+ return func() func(*crt.TLS, *Xsqlite3_file, int32) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxSync
+ return *(*func(*crt.TLS, *Xsqlite3_file, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _flags)
+}
+
+// C comment
+// /*
+// ** The journal file must be open when this function is called.
+// **
+// ** This function is a no-op if the journal file has not been written to
+// ** within the current transaction (i.e. if Pager.journalOff==0).
+// **
+// ** If doTruncate is non-zero or the Pager.journalSizeLimit variable is
+// ** set to 0, then truncate the journal file to zero bytes in size. Otherwise,
+// ** zero the 28-byte header at the start of the journal file. In either case,
+// ** if the pager is not in no-sync mode, sync the journal file immediately
+// ** after writing or truncating it.
+// **
+// ** If Pager.journalSizeLimit is set to a positive, non-zero value, and
+// ** following the truncation or zeroing described above the size of the
+// ** journal file in bytes is larger than this value, then truncate the
+// ** journal file to Pager.journalSizeLimit bytes. The journal file does
+// ** not need to be synced following this operation.
+// **
+// ** If an IO error occurs, abandon processing and return the IO error code.
+// ** Otherwise, return SQLITE_OK.
+// */
func _zeroJournalHdr(tls *crt.TLS, _pPager *XPager, _doTruncate int32) (r0 int32) {
var _rc int32
var _1_iLimit, _5_sz int64
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48287), unsafe.Pointer((*int8)(unsafe.Pointer(&_zeroJournalHdrØ00__func__Ø000))), unsafe.Pointer(str(13626)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48287), unsafe.Pointer(&_zeroJournalHdrØ00__func__Ø000), unsafe.Pointer(str(13581)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.X32)) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48288), unsafe.Pointer((*int8)(unsafe.Pointer(&_zeroJournalHdrØ00__func__Ø000))), unsafe.Pointer(str(18940)))
+ if _sqlite3JournalIsInMemory(tls, (*Xsqlite3_file)(_pPager.Xjfd)) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48288), unsafe.Pointer(&_zeroJournalHdrØ00__func__Ø000), unsafe.Pointer(str(18895)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X34) == 0 {
+ if _pPager.XjournalOff == 0 {
goto _4
}
- _1_iLimit = _pPager.X50
- if _doTruncate != 0 || (_1_iLimit == int64(i32(0))) {
- _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.X32), int64(i32(0)))
+ _1_iLimit = _pPager.XjournalSizeLimit
+ if _doTruncate != 0 || (_1_iLimit == (0)) {
+ _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.Xjfd), 0)
goto _7
}
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(&_zeroJournalHdrØ00zeroHdrØ001), int32(u32(28)), int64(i32(0)))
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(&_zeroJournalHdrØ00zeroHdrØ001), int32(28), 0)
_7:
- if (_rc == i32(0)) && ((_pPager.X4) == 0) {
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.X32), i32(16)|int32(_pPager.X9))
+ if (_rc == int32(0)) && (_pPager.XnoSync == 0) {
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.Xjfd), int32(16)|int32(_pPager.XsyncFlags))
}
- if _rc != i32(0) || _1_iLimit <= int64(i32(0)) {
+ if _rc != int32(0) || _1_iLimit <= (0) {
goto _11
}
- _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.X32), &_5_sz)
- if (_rc == i32(0)) && (_5_sz > _1_iLimit) {
- _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.X32), _1_iLimit)
+ _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.Xjfd), &_5_sz)
+ if (_rc == int32(0)) && (_5_sz > _1_iLimit) {
+ _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.Xjfd), _1_iLimit)
}
_11:
_4:
@@ -18369,196 +18752,215 @@ _4:
var _zeroJournalHdrØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_zeroJournalHdrØ00__func__Ø000[0], str(18979), 15)
+ crt.Xstrncpy(nil, &_zeroJournalHdrØ00__func__Ø000[0], str(18934), 15)
}
var _zeroJournalHdrØ00zeroHdrØ001 [28]int8
func _sqlite3OsDelete(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zPath *int8, _dirSync int32) (r0 int32) {
func() {
- if _dirSync != i32(0) && _dirSync != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(20297), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OsDeleteØ00__func__Ø000))), unsafe.Pointer(str(18994)))
+ if _dirSync != int32(0) && _dirSync != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(20297), unsafe.Pointer(&_sqlite3OsDeleteØ00__func__Ø000), unsafe.Pointer(str(18949)))
crt.X__builtin_abort(tls)
}
}()
- return (*(*func(*crt.TLS, *Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
- }{(_pVfs.X7)})))(tls, _pVfs, _zPath, _dirSync)
+ return func() func(*crt.TLS, *Xsqlite3_vfs, *int8, int32) int32 {
+ v := _pVfs.XxDelete
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _zPath, _dirSync)
}
var _sqlite3OsDeleteØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3OsDeleteØ00__func__Ø000[0], str(19019), 16)
-}
-
-// The write transaction open on pPager is being committed (bCommit==1)
-// or rolled back (bCommit==0).
-//
-// Return TRUE if and only if all dirty pages should be flushed to disk.
-//
-// Rules:
-//
-// * For non-TEMP databases, always sync to disk. This is necessary
-// for transactions to be durable.
-//
-// * Sync TEMP database only on a COMMIT (not a ROLLBACK) when the backing
-// file has been created already (via a spill on pagerStress()) and
-// when the number of dirty pages in memory exceeds 25% of the total
-// cache size.
+ crt.Xstrncpy(nil, &_sqlite3OsDeleteØ00__func__Ø000[0], str(18974), 16)
+}
+
+// C comment
+// /*
+// ** The write transaction open on pPager is being committed (bCommit==1)
+// ** or rolled back (bCommit==0).
+// **
+// ** Return TRUE if and only if all dirty pages should be flushed to disk.
+// **
+// ** Rules:
+// **
+// ** * For non-TEMP databases, always sync to disk. This is necessary
+// ** for transactions to be durable.
+// **
+// ** * Sync TEMP database only on a COMMIT (not a ROLLBACK) when the backing
+// ** file has been created already (via a spill on pagerStress()) and
+// ** when the number of dirty pages in memory exceeds 25% of the total
+// ** cache size.
+// */
func _pagerFlushOnCommit(tls *crt.TLS, _pPager *XPager, _bCommit int32) (r0 int32) {
- if int32(_pPager.X10) == i32(0) {
- return i32(1)
+ if int32(_pPager.XtempFile) == int32(0) {
+ return int32(1)
}
if _bCommit == 0 {
- return i32(0)
+ return int32(0)
}
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
- return i32(0)
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
+ return int32(0)
}
- return bool2int(_sqlite3PCachePercentDirty(tls, (*XPCache)(_pPager.X59)) >= i32(25))
+ return bool2int(_sqlite3PCachePercentDirty(tls, (*XPCache)(_pPager.XpPCache)) >= int32(25))
}
-// Return the number of dirty pages currently in the cache, as a percentage
-// of the configured cache size.
+// C comment
+// /*
+// ** Return the number of dirty pages currently in the cache, as a percentage
+// ** of the configured cache size.
+// */
func _sqlite3PCachePercentDirty(tls *crt.TLS, _pCache *XPCache) (r0 int32) {
var _nDirty, _nCache int32
var _pDirty *XPgHdr
- _nDirty = i32(0)
+ _nDirty = int32(0)
_nCache = _numberOfCachePages(tls, _pCache)
- _pDirty = (*XPgHdr)(_pCache.X0)
+ _pDirty = (*XPgHdr)(_pCache.XpDirty)
_0:
if _pDirty == nil {
goto _3
}
_nDirty += 1
- _pDirty = (*XPgHdr)(_pDirty.X9)
+ _pDirty = (*XPgHdr)(_pDirty.XpDirtyNext)
goto _0
_3:
return func() int32 {
if _nCache != 0 {
- return int32((int64(_nDirty) * int64(i32(100))) / int64(_nCache))
+ return int32((int64(_nDirty) * int64(100)) / int64(_nCache))
}
- return i32(0)
+ return int32(0)
}()
}
-// Make every page in the cache clean.
+// C comment
+// /*
+// ** Make every page in the cache clean.
+// */
func _sqlite3PcacheCleanAll(tls *crt.TLS, _pCache *XPCache) {
var _p *XPgHdr
_0:
- if store25(&_p, (*XPgHdr)(_pCache.X0)) != nil {
+ if store34(&_p, (*XPgHdr)(_pCache.XpDirty)) != nil {
_sqlite3PcacheMakeClean(tls, _p)
goto _0
}
}
-// Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages.
+// C comment
+// /*
+// ** Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages.
+// */
func _sqlite3PcacheClearWritable(tls *crt.TLS, _pCache *XPCache) {
var _p *XPgHdr
- _p = (*XPgHdr)(_pCache.X0)
+ _p = (*XPgHdr)(_pCache.XpDirty)
_0:
if _p == nil {
goto _3
}
{
- p := (*uint16)(unsafe.Pointer(&(_p.X6)))
- *p = uint16(int32(*p) & i32(-13))
- sink14(*p)
+ p := &_p.Xflags
+ *p = uint16(int32(*p) & int32(-13))
}
- _p = (*XPgHdr)(_p.X9)
+ _p = (*XPgHdr)(_p.XpDirtyNext)
goto _0
_3:
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X2))))) = (*XPgHdr)(_pCache.X1)
+ *(**XPgHdr)(unsafe.Pointer(&_pCache.XpSynced)) = (*XPgHdr)(_pCache.XpDirtyTail)
}
-// End a write transaction. The commit has already been done. This
-// routine merely releases the lock.
+// C comment
+// /*
+// ** End a write transaction. The commit has already been done. This
+// ** routine merely releases the lock.
+// */
func _sqlite3WalEndWriteTransaction(tls *crt.TLS, _pWal *XWal) (r0 int32) {
- if (_pWal.X12) != 0 {
- _walUnlockExclusive(tls, _pWal, i32(0), i32(1))
- *(*uint8)(unsafe.Pointer(&(_pWal.X12))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(&(_pWal.X20))) = uint32(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pWal.X15))) = uint8(i32(0))
+ if _pWal.XwriteLock != 0 {
+ _walUnlockExclusive(tls, _pWal, int32(0), int32(1))
+ _pWal.XwriteLock = 0
+ _pWal.XiReCksum = 0
+ _pWal.XtruncateOnCommit = 0
}
- return i32(0)
+ return int32(0)
}
func _walUnlockExclusive(tls *crt.TLS, _pWal *XWal, _lockIdx int32, _n int32) {
- if (_pWal.X11) != 0 {
+ if _pWal.XexclusiveMode != 0 {
return
}
- _sqlite3OsShmLock(tls, (*Xsqlite3_file)(_pWal.X1), _lockIdx, _n, i32(9))
+ _sqlite3OsShmLock(tls, (*Xsqlite3_file)(_pWal.XpDbFd), _lockIdx, _n, int32(9))
}
func _sqlite3OsShmLock(tls *crt.TLS, _id *Xsqlite3_file, _offset int32, _n int32, _flags int32) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int32, int32, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X14)})))(tls, _id, _offset, _n, _flags)
-}
-
-// This function is used to change the actual size of the database
-// file in the file-system. This only happens when committing a transaction,
-// or rolling back a transaction (including rolling back a hot-journal).
-//
-// If the main database file is not open, or the pager is not in either
-// DBMOD or OPEN state, this function is a no-op. Otherwise, the size
-// of the file is changed to nPage pages (nPage*pPager->pageSize bytes).
-// If the file on disk is currently larger than nPage pages, then use the VFS
-// xTruncate() method to truncate it.
-//
-// Or, it might be the case that the file on disk is smaller than
-// nPage pages. Some operating system implementations can get confused if
-// you try to truncate a file to some size that is larger than it
-// currently is, so detect this case and write a single zero byte to
-// the end of the new file instead.
-//
-// If successful, return SQLITE_OK. If an IO error occurs while modifying
-// the database file, return the error code to the caller.
+ return func() func(*crt.TLS, *Xsqlite3_file, int32, int32, int32) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxShmLock
+ return *(*func(*crt.TLS, *Xsqlite3_file, int32, int32, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _offset, _n, _flags)
+}
+
+// C comment
+// /*
+// ** This function is used to change the actual size of the database
+// ** file in the file-system. This only happens when committing a transaction,
+// ** or rolling back a transaction (including rolling back a hot-journal).
+// **
+// ** If the main database file is not open, or the pager is not in either
+// ** DBMOD or OPEN state, this function is a no-op. Otherwise, the size
+// ** of the file is changed to nPage pages (nPage*pPager->pageSize bytes).
+// ** If the file on disk is currently larger than nPage pages, then use the VFS
+// ** xTruncate() method to truncate it.
+// **
+// ** Or, it might be the case that the file on disk is smaller than
+// ** nPage pages. Some operating system implementations can get confused if
+// ** you try to truncate a file to some size that is larger than it
+// ** currently is, so detect this case and write a single zero byte to
+// ** the end of the new file instead.
+// **
+// ** If successful, return SQLITE_OK. If an IO error occurs while modifying
+// ** the database file, return the error code to the caller.
+// */
func _pager_truncate(tls *crt.TLS, _pPager *XPager, _nPage uint32) (r0 int32) {
var _rc, _1_szPage int32
var _1_currentSize, _1_newSize int64
var _4_pTmp *int8
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if int32(_pPager.X14) == i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49548), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_truncateØ00__func__Ø000))), unsafe.Pointer(str(15064)))
+ if int32(_pPager.XeState) == int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49548), unsafe.Pointer(&_pager_truncateØ00__func__Ø000), unsafe.Pointer(str(15019)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49549), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_truncateØ00__func__Ø000))), unsafe.Pointer(str(19035)))
+ if int32(_pPager.XeState) == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49549), unsafe.Pointer(&_pager_truncateØ00__func__Ø000), unsafe.Pointer(str(18990)))
crt.X__builtin_abort(tls)
}
}()
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil || int32(_pPager.X14) < i32(4) && int32(_pPager.X14) != i32(0) {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil || int32(_pPager.XeState) < int32(4) && int32(_pPager.XeState) != int32(0) {
goto _6
}
- _1_szPage = _pPager.X48
+ _1_szPage = _pPager.XpageSize
func() {
- if int32(_pPager.X15) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49556), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_truncateØ00__func__Ø000))), unsafe.Pointer(str(18888)))
+ if int32(_pPager.XeLock) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49556), unsafe.Pointer(&_pager_truncateØ00__func__Ø000), unsafe.Pointer(str(18843)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.X31), &_1_currentSize)
+ _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.Xfd), &_1_currentSize)
_1_newSize = int64(_1_szPage) * int64(_nPage)
- if _rc != i32(0) || _1_currentSize == _1_newSize {
+ if _rc != int32(0) || _1_currentSize == _1_newSize {
goto _10
}
if _1_currentSize > _1_newSize {
- _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.X31), _1_newSize)
+ _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.Xfd), _1_newSize)
goto _13
}
if (_1_currentSize + int64(_1_szPage)) <= _1_newSize {
- _4_pTmp = _pPager.X58
- crt.Xmemset(tls, (unsafe.Pointer)(_4_pTmp), i32(0), uint32(_1_szPage))
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X31), (unsafe.Pointer)(_4_pTmp), _1_szPage, _1_newSize-int64(_1_szPage))
+ _4_pTmp = _pPager.XpTmpSpace
+ crt.Xmemset(tls, unsafe.Pointer(_4_pTmp), int32(0), uint32(_1_szPage))
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xfd), unsafe.Pointer(_4_pTmp), _1_szPage, _1_newSize-int64(_1_szPage))
}
_13:
- if _rc == i32(0) {
- *(*uint32)(unsafe.Pointer(&(_pPager.X24))) = _nPage
+ if _rc == int32(0) {
+ _pPager.XdbFileSize = _nPage
}
_10:
_6:
@@ -18568,93 +18970,96 @@ _6:
var _pager_truncateØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_pager_truncateØ00__func__Ø000[0], str(19064), 15)
-}
-
-// This function is called to change the WAL subsystem into or out
-// of locking_mode=EXCLUSIVE.
-//
-// If op is zero, then attempt to change from locking_mode=EXCLUSIVE
-// into locking_mode=NORMAL. This means that we must acquire a lock
-// on the pWal->readLock byte. If the WAL is already in locking_mode=NORMAL
-// or if the acquisition of the lock fails, then return 0. If the
-// transition out of exclusive-mode is successful, return 1. This
-// operation must occur while the pager is still holding the exclusive
-// lock on the main database file.
-//
-// If op is one, then change from locking_mode=NORMAL into
-// locking_mode=EXCLUSIVE. This means that the pWal->readLock must
-// be released. Return 1 if the transition is made and 0 if the
-// WAL is already in exclusive-locking mode - meaning that this
-// routine is a no-op. The pager must already hold the exclusive lock
-// on the main database file before invoking this operation.
-//
-// If op is negative, then do a dry-run of the op==1 case but do
-// not actually change anything. The pager uses this to see if it
-// should acquire the database exclusive lock prior to invoking
-// the op==1 case.
+ crt.Xstrncpy(nil, &_pager_truncateØ00__func__Ø000[0], str(19019), 15)
+}
+
+// C comment
+// /*
+// ** This function is called to change the WAL subsystem into or out
+// ** of locking_mode=EXCLUSIVE.
+// **
+// ** If op is zero, then attempt to change from locking_mode=EXCLUSIVE
+// ** into locking_mode=NORMAL. This means that we must acquire a lock
+// ** on the pWal->readLock byte. If the WAL is already in locking_mode=NORMAL
+// ** or if the acquisition of the lock fails, then return 0. If the
+// ** transition out of exclusive-mode is successful, return 1. This
+// ** operation must occur while the pager is still holding the exclusive
+// ** lock on the main database file.
+// **
+// ** If op is one, then change from locking_mode=NORMAL into
+// ** locking_mode=EXCLUSIVE. This means that the pWal->readLock must
+// ** be released. Return 1 if the transition is made and 0 if the
+// ** WAL is already in exclusive-locking mode - meaning that this
+// ** routine is a no-op. The pager must already hold the exclusive lock
+// ** on the main database file before invoking this operation.
+// **
+// ** If op is negative, then do a dry-run of the op==1 case but do
+// ** not actually change anything. The pager uses this to see if it
+// ** should acquire the database exclusive lock prior to invoking
+// ** the op==1 case.
+// */
func _sqlite3WalExclusiveMode(tls *crt.TLS, _pWal *XWal, _op int32) (r0 int32) {
var _rc int32
func() {
- if int32(_pWal.X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57902), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000))), unsafe.Pointer(str(19079)))
+ if int32(_pWal.XwriteLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57902), unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000), unsafe.Pointer(str(19034)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pWal.X11) == i32(2) && _op != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57903), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000))), unsafe.Pointer(str(19098)))
+ if int32(_pWal.XexclusiveMode) == int32(2) && _op != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57903), unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000), unsafe.Pointer(str(19053)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pWal.X9) < i32(0) && (_pWal.X23) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57911), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000))), unsafe.Pointer(str(16369)))
+ if int32(_pWal.XreadLock) < int32(0) && _pWal.XlockError == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57911), unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000), unsafe.Pointer(str(16324)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pWal.X9) < i32(0) && (_op > i32(0) || int32(_pWal.X11) != i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57912), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000))), unsafe.Pointer(str(19149)))
+ if int32(_pWal.XreadLock) < int32(0) && (_op > int32(0) || int32(_pWal.XexclusiveMode) != int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57912), unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000), unsafe.Pointer(str(19104)))
crt.X__builtin_abort(tls)
}
}()
- if _op != i32(0) {
+ if _op != int32(0) {
goto _12
}
- if (_pWal.X11) == 0 {
+ if _pWal.XexclusiveMode == 0 {
goto _13
}
- *(*uint8)(unsafe.Pointer(&(_pWal.X11))) = uint8(i32(0))
- if _walLockShared(tls, _pWal, i32(3)+int32(_pWal.X9)) != i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pWal.X11))) = uint8(i32(1))
+ _pWal.XexclusiveMode = 0
+ if _walLockShared(tls, _pWal, int32(3)+int32(_pWal.XreadLock)) != int32(0) {
+ _pWal.XexclusiveMode = uint8(1)
}
- _rc = bool2int(int32(_pWal.X11) == i32(0))
+ _rc = bool2int(int32(_pWal.XexclusiveMode) == int32(0))
goto _15
_13:
- _rc = i32(0)
+ _rc = int32(0)
_15:
goto _22
_12:
- if _op > i32(0) {
+ if _op > int32(0) {
func() {
- if int32(_pWal.X11) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57926), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000))), unsafe.Pointer(str(19204)))
+ if int32(_pWal.XexclusiveMode) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57926), unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000), unsafe.Pointer(str(19159)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pWal.X9) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57927), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000))), unsafe.Pointer(str(19227)))
+ if int32(_pWal.XreadLock) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57927), unsafe.Pointer(&_sqlite3WalExclusiveModeØ00__func__Ø000), unsafe.Pointer(str(19182)))
crt.X__builtin_abort(tls)
}
}()
- _walUnlockShared(tls, _pWal, i32(3)+int32(_pWal.X9))
- *(*uint8)(unsafe.Pointer(&(_pWal.X11))) = uint8(i32(1))
- _rc = i32(1)
+ _walUnlockShared(tls, _pWal, int32(3)+int32(_pWal.XreadLock))
+ _pWal.XexclusiveMode = uint8(1)
+ _rc = int32(1)
goto _22
}
- _rc = bool2int(int32(_pWal.X11) == i32(0))
+ _rc = bool2int(int32(_pWal.XexclusiveMode) == int32(0))
_22:
return _rc
}
@@ -18662,76 +19067,82 @@ _22:
var _sqlite3WalExclusiveModeØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalExclusiveModeØ00__func__Ø000[0], str(19245), 24)
+ crt.Xstrncpy(nil, &_sqlite3WalExclusiveModeØ00__func__Ø000[0], str(19200), 24)
}
-// Set or release locks on the WAL. Locks are either shared or exclusive.
-// A lock cannot be moved directly between shared and exclusive - it must go
-// through the unlocked state first.
-//
-// In locking_mode=EXCLUSIVE, all of these routines become no-ops.
+// C comment
+// /*
+// ** Set or release locks on the WAL. Locks are either shared or exclusive.
+// ** A lock cannot be moved directly between shared and exclusive - it must go
+// ** through the unlocked state first.
+// **
+// ** In locking_mode=EXCLUSIVE, all of these routines become no-ops.
+// */
func _walLockShared(tls *crt.TLS, _pWal *XWal, _lockIdx int32) (r0 int32) {
var _rc int32
- if (_pWal.X11) != 0 {
- return i32(0)
+ if _pWal.XexclusiveMode != 0 {
+ return int32(0)
}
- _rc = _sqlite3OsShmLock(tls, (*Xsqlite3_file)(_pWal.X1), _lockIdx, i32(1), i32(6))
- *(*uint8)(unsafe.Pointer(&(_pWal.X23))) = uint8(bool2int((_rc != i32(0)) && (_rc != i32(5))))
+ _rc = _sqlite3OsShmLock(tls, (*Xsqlite3_file)(_pWal.XpDbFd), _lockIdx, int32(1), int32(6))
+ _pWal.XlockError = uint8(bool2int((_rc != int32(0)) && (_rc != int32(5))))
return _rc
}
func _walUnlockShared(tls *crt.TLS, _pWal *XWal, _lockIdx int32) {
- if (_pWal.X11) != 0 {
+ if _pWal.XexclusiveMode != 0 {
return
}
- _sqlite3OsShmLock(tls, (*Xsqlite3_file)(_pWal.X1), _lockIdx, i32(1), i32(5))
+ _sqlite3OsShmLock(tls, (*Xsqlite3_file)(_pWal.XpDbFd), _lockIdx, int32(1), int32(5))
}
-// Unlock the database file to level eLock, which must be either NO_LOCK
-// or SHARED_LOCK. Regardless of whether or not the call to xUnlock()
-// succeeds, set the Pager.eLock variable to match the (attempted) new lock.
-//
-// Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
-// called, do not modify it. See the comment above the #define of
-// UNKNOWN_LOCK for an explanation of this.
+// C comment
+// /*
+// ** Unlock the database file to level eLock, which must be either NO_LOCK
+// ** or SHARED_LOCK. Regardless of whether or not the call to xUnlock()
+// ** succeeds, set the Pager.eLock variable to match the (attempted) new lock.
+// **
+// ** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
+// ** called, do not modify it. See the comment above the #define of
+// ** UNKNOWN_LOCK for an explanation of this.
+// */
func _pagerUnlockDb(tls *crt.TLS, _pPager *XPager, _eLock int32) (r0 int32) {
var _rc int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (_pPager.X1) != 0 && int32(_pPager.X15) != _eLock {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48049), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerUnlockDbØ00__func__Ø000))), unsafe.Pointer(str(19269)))
+ if _pPager.XexclusiveMode != 0 && int32(_pPager.XeLock) != _eLock {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48049), unsafe.Pointer(&_pagerUnlockDbØ00__func__Ø000), unsafe.Pointer(str(19224)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eLock != i32(0) && _eLock != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48050), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerUnlockDbØ00__func__Ø000))), unsafe.Pointer(str(19316)))
+ if _eLock != int32(0) && _eLock != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48050), unsafe.Pointer(&_pagerUnlockDbØ00__func__Ø000), unsafe.Pointer(str(19271)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eLock == i32(0) && bool2int((*XWal)(_pPager.X60) != nil) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48051), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerUnlockDbØ00__func__Ø000))), unsafe.Pointer(str(19353)))
+ if _eLock == int32(0) && bool2int((*XWal)(_pPager.XpWal) != nil) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48051), unsafe.Pointer(&_pagerUnlockDbØ00__func__Ø000), unsafe.Pointer(str(19308)))
crt.X__builtin_abort(tls)
}
}()
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
goto _9
}
func() {
- if int32(_pPager.X15) < _eLock {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48053), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerUnlockDbØ00__func__Ø000))), unsafe.Pointer(str(19394)))
+ if int32(_pPager.XeLock) < _eLock {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48053), unsafe.Pointer(&_pagerUnlockDbØ00__func__Ø000), unsafe.Pointer(str(19349)))
crt.X__builtin_abort(tls)
}
}()
_rc = func() int32 {
- if (_pPager.X11) != 0 {
- return i32(0)
+ if _pPager.XnoLock != 0 {
+ return int32(0)
}
- return _sqlite3OsUnlock(tls, (*Xsqlite3_file)(_pPager.X31), _eLock)
+ return _sqlite3OsUnlock(tls, (*Xsqlite3_file)(_pPager.Xfd), _eLock)
}()
- if int32(_pPager.X15) != i32(5) {
- *(*uint8)(unsafe.Pointer(&(_pPager.X15))) = uint8(_eLock)
+ if int32(_pPager.XeLock) != int32(5) {
+ _pPager.XeLock = uint8(_eLock)
}
_9:
return _rc
@@ -18740,153 +19151,157 @@ _9:
var _pagerUnlockDbØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_pagerUnlockDbØ00__func__Ø000[0], str(19415), 14)
+ crt.Xstrncpy(nil, &_pagerUnlockDbØ00__func__Ø000[0], str(19370), 14)
}
func _sqlite3OsUnlock(tls *crt.TLS, _id *Xsqlite3_file, _lockType int32) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X8)})))(tls, _id, _lockType)
-}
-
-// Playback the journal and thus restore the database file to
-// the state it was in before we started making changes.
-//
-// The journal file format is as follows:
-//
-// (1) 8 byte prefix. A copy of aJournalMagic[].
-// (2) 4 byte big-endian integer which is the number of valid page records
-// in the journal. If this value is 0xffffffff, then compute the
-// number of page records from the journal size.
-// (3) 4 byte big-endian integer which is the initial value for the
-// sanity checksum.
-// (4) 4 byte integer which is the number of pages to truncate the
-// database to during a rollback.
-// (5) 4 byte big-endian integer which is the sector size. The header
-// is this many bytes in size.
-// (6) 4 byte big-endian integer which is the page size.
-// (7) zero padding out to the next sector size.
-// (8) Zero or more pages instances, each as follows:
-// + 4 byte page number.
-// + pPager->pageSize bytes of data.
-// + 4 byte checksum
-//
-// When we speak of the journal header, we mean the first 7 items above.
-// Each entry in the journal is an instance of the 8th item.
-//
-// Call the value from the second bullet "nRec". nRec is the number of
-// valid page entries in the journal. In most cases, you can compute the
-// value of nRec from the size of the journal file. But if a power
-// failure occurred while the journal was being written, it could be the
-// case that the size of the journal file had already been increased but
-// the extra entries had not yet made it safely to disk. In such a case,
-// the value of nRec computed from the file size would be too large. For
-// that reason, we always use the nRec value in the header.
-//
-// If the nRec value is 0xffffffff it means that nRec should be computed
-// from the file size. This value is used when the user selects the
-// no-sync option for the journal. A power failure could lead to corruption
-// in this case. But for things like temporary table (which will be
-// deleted when the power is restored) we don't care.
-//
-// If the file opened as the journal file is not a well-formed
-// journal file then all pages up to the first corrupted page are rolled
-// back (or no pages if the journal header is corrupted). The journal file
-// is then deleted and SQLITE_OK returned, just as if no corruption had
-// been encountered.
-//
-// If an I/O or malloc() error occurs, the journal-file is not deleted
-// and an error code is returned.
-//
-// The isHot parameter indicates that we are trying to rollback a journal
-// that might be a hot journal. Or, it could be that the journal is
-// preserved because of JOURNALMODE_PERSIST or JOURNALMODE_TRUNCATE.
-// If the journal really is hot, reset the pager cache prior rolling
-// back any content. If the journal is merely persistent, no reset is
-// needed.
+ return func() func(*crt.TLS, *Xsqlite3_file, int32) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxUnlock
+ return *(*func(*crt.TLS, *Xsqlite3_file, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _lockType)
+}
+
+// C comment
+// /*
+// ** Playback the journal and thus restore the database file to
+// ** the state it was in before we started making changes.
+// **
+// ** The journal file format is as follows:
+// **
+// ** (1) 8 byte prefix. A copy of aJournalMagic[].
+// ** (2) 4 byte big-endian integer which is the number of valid page records
+// ** in the journal. If this value is 0xffffffff, then compute the
+// ** number of page records from the journal size.
+// ** (3) 4 byte big-endian integer which is the initial value for the
+// ** sanity checksum.
+// ** (4) 4 byte integer which is the number of pages to truncate the
+// ** database to during a rollback.
+// ** (5) 4 byte big-endian integer which is the sector size. The header
+// ** is this many bytes in size.
+// ** (6) 4 byte big-endian integer which is the page size.
+// ** (7) zero padding out to the next sector size.
+// ** (8) Zero or more pages instances, each as follows:
+// ** + 4 byte page number.
+// ** + pPager->pageSize bytes of data.
+// ** + 4 byte checksum
+// **
+// ** When we speak of the journal header, we mean the first 7 items above.
+// ** Each entry in the journal is an instance of the 8th item.
+// **
+// ** Call the value from the second bullet "nRec". nRec is the number of
+// ** valid page entries in the journal. In most cases, you can compute the
+// ** value of nRec from the size of the journal file. But if a power
+// ** failure occurred while the journal was being written, it could be the
+// ** case that the size of the journal file had already been increased but
+// ** the extra entries had not yet made it safely to disk. In such a case,
+// ** the value of nRec computed from the file size would be too large. For
+// ** that reason, we always use the nRec value in the header.
+// **
+// ** If the nRec value is 0xffffffff it means that nRec should be computed
+// ** from the file size. This value is used when the user selects the
+// ** no-sync option for the journal. A power failure could lead to corruption
+// ** in this case. But for things like temporary table (which will be
+// ** deleted when the power is restored) we don't care.
+// **
+// ** If the file opened as the journal file is not a well-formed
+// ** journal file then all pages up to the first corrupted page are rolled
+// ** back (or no pages if the journal header is corrupted). The journal file
+// ** is then deleted and SQLITE_OK returned, just as if no corruption had
+// ** been encountered.
+// **
+// ** If an I/O or malloc() error occurs, the journal-file is not deleted
+// ** and an error code is returned.
+// **
+// ** The isHot parameter indicates that we are trying to rollback a journal
+// ** that might be a hot journal. Or, it could be that the journal is
+// ** preserved because of JOURNALMODE_PERSIST or JOURNALMODE_TRUNCATE.
+// ** If the journal really is hot, reset the pager cache prior rolling
+// ** back any content. If the journal is merely persistent, no reset is
+// ** needed.
+// */
func _pager_playback(tls *crt.TLS, _pPager *XPager, _isHot int32) (r0 int32) {
var _rc, _res, _needPagerReset, _nPlayback int32
var _szJ int64
var _nRec, _u, _mxPg uint32
var _zMaster *int8
var _pVfs *Xsqlite3_vfs
- _pVfs = (*Xsqlite3_vfs)(_pPager.X0)
- _mxPg = u32(0)
- _res = i32(1)
+ _pVfs = (*Xsqlite3_vfs)(_pPager.XpVfs)
+ _mxPg = uint32(0)
+ _res = int32(1)
_zMaster = nil
- _nPlayback = i32(0)
+ _nPlayback = int32(0)
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49704), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playbackØ00__func__Ø000))), unsafe.Pointer(str(13626)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49704), unsafe.Pointer(&_pager_playbackØ00__func__Ø000), unsafe.Pointer(str(13581)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.X32), &_szJ)
- if _rc != i32(0) {
+ _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.Xjfd), &_szJ)
+ if _rc != int32(0) {
goto _end_playback
}
- _zMaster = _pPager.X58
- _rc = _readMasterJournal(tls, (*Xsqlite3_file)(_pPager.X32), _zMaster, uint32(((*Xsqlite3_vfs)(_pPager.X0).X2)+i32(1)))
- if (_rc == i32(0)) && ((*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMaster)) + 1*uintptr(i32(0))))) != 0) {
- _rc = _sqlite3OsAccess(tls, _pVfs, _zMaster, i32(0), &_res)
+ _zMaster = _pPager.XpTmpSpace
+ _rc = _readMasterJournal(tls, (*Xsqlite3_file)(_pPager.Xjfd), _zMaster, uint32(((*Xsqlite3_vfs)(_pPager.XpVfs).XmxPathname)+int32(1)))
+ if (_rc == int32(0)) && ((*elem1(_zMaster, 0)) != 0) {
+ _rc = _sqlite3OsAccess(tls, _pVfs, _zMaster, int32(0), &_res)
}
_zMaster = nil
- if (_rc != i32(0)) || (_res == 0) {
+ if (_rc != int32(0)) || (_res == 0) {
goto _end_playback
}
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = int64(i32(0))
+ _pPager.XjournalOff = 0
_needPagerReset = _isHot
_7:
_rc = _readJournalHdr(tls, _pPager, _isHot, _szJ, &_nRec, &_mxPg)
- if _rc == i32(0) {
+ if _rc == int32(0) {
goto _9
}
- if _rc == i32(101) {
- _rc = i32(0)
+ if _rc == int32(101) {
+ _rc = int32(0)
}
goto _end_playback
_9:
- if _nRec == u32(4294967295) {
+ if _nRec == uint32(4294967295) {
func() {
- if (_pPager.X34) != int64(_pPager.X47) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49757), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_playbackØ00__func__Ø000))), unsafe.Pointer(str(19429)))
+ if _pPager.XjournalOff != int64(_pPager.XsectorSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49757), unsafe.Pointer(&_pager_playbackØ00__func__Ø000), unsafe.Pointer(str(19384)))
crt.X__builtin_abort(tls)
}
}()
- _nRec = uint32(int32((_szJ - int64(_pPager.X47)) / int64((_pPager.X48)+i32(8))))
+ _nRec = uint32(int32((_szJ - int64(_pPager.XsectorSize)) / int64(_pPager.XpageSize+int32(8))))
}
- if ((_nRec == uint32(i32(0))) && (_isHot == 0)) && (((_pPager.X35) + int64(_pPager.X47)) == (_pPager.X34)) {
- _nRec = uint32(int32((_szJ - (_pPager.X34)) / int64((_pPager.X48)+i32(8))))
+ if ((_nRec == (0)) && (_isHot == 0)) && ((_pPager.XjournalHdr + int64(_pPager.XsectorSize)) == _pPager.XjournalOff) {
+ _nRec = uint32(int32((_szJ - _pPager.XjournalOff) / int64(_pPager.XpageSize+int32(8))))
}
- if (_pPager.X34) != int64(_pPager.X47) {
+ if _pPager.XjournalOff != int64(_pPager.XsectorSize) {
goto _17
}
_rc = _pager_truncate(tls, _pPager, _mxPg)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _end_playback
}
- *(*uint32)(unsafe.Pointer(&(_pPager.X22))) = _mxPg
+ _pPager.XdbSize = _mxPg
_17:
- _u = uint32(i32(0))
+ _u = 0
_19:
if _u >= _nRec {
goto _22
}
if _needPagerReset != 0 {
_pager_reset(tls, _pPager)
- _needPagerReset = i32(0)
+ _needPagerReset = int32(0)
}
- _rc = _pager_playback_one_page(tls, _pPager, (*int64)(unsafe.Pointer(&(_pPager.X34))), nil, i32(1), i32(0))
- if _rc == i32(0) {
+ _rc = _pager_playback_one_page(tls, _pPager, &_pPager.XjournalOff, nil, int32(1), int32(0))
+ if _rc == int32(0) {
_nPlayback += 1
goto _25
}
- if _rc == i32(101) {
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = _szJ
+ if _rc == int32(101) {
+ _pPager.XjournalOff = _szJ
goto _22
}
- if _rc == i32(522) {
- _rc = i32(0)
+ if _rc == int32(522) {
+ _rc = int32(0)
goto _end_playback
}
goto _end_playback
@@ -18896,25 +19311,25 @@ _25:
_22:
goto _7
_end_playback:
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) != nil {
- _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pPager.X31), int32(u32(3389603744)), nil)
+ if ((*Xsqlite3_file)(_pPager.Xfd).XpMethods) != nil {
+ _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pPager.Xfd), int32(-905363552), nil)
}
- *(*uint8)(unsafe.Pointer(&(_pPager.X16))) = _pPager.X10
- if _rc == i32(0) {
- _zMaster = _pPager.X58
- _rc = _readMasterJournal(tls, (*Xsqlite3_file)(_pPager.X32), _zMaster, uint32(((*Xsqlite3_vfs)(_pPager.X0).X2)+i32(1)))
+ _pPager.XchangeCountDone = _pPager.XtempFile
+ if _rc == int32(0) {
+ _zMaster = _pPager.XpTmpSpace
+ _rc = _readMasterJournal(tls, (*Xsqlite3_file)(_pPager.Xjfd), _zMaster, uint32(((*Xsqlite3_vfs)(_pPager.XpVfs).XmxPathname)+int32(1)))
}
- if (_rc == i32(0)) && ((int32(_pPager.X14) >= i32(4)) || (int32(_pPager.X14) == i32(0))) {
+ if (_rc == int32(0)) && ((int32(_pPager.XeState) >= int32(4)) || (int32(_pPager.XeState) == int32(0))) {
_rc = _sqlite3PagerSync(tls, _pPager, nil)
}
- if _rc == i32(0) {
- _rc = _pager_end_transaction(tls, _pPager, bool2int(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMaster)) + 1*uintptr(i32(0))))) != i32(0)), i32(0))
+ if _rc == int32(0) {
+ _rc = _pager_end_transaction(tls, _pPager, bool2int(int32(*elem1(_zMaster, 0)) != int32(0)), int32(0))
}
- if ((_rc == i32(0)) && ((*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMaster)) + 1*uintptr(i32(0))))) != 0)) && _res != 0 {
+ if ((_rc == int32(0)) && ((*elem1(_zMaster, 0)) != 0)) && _res != 0 {
_rc = _pager_delmaster(tls, _pPager, _zMaster)
}
if _isHot != 0 && _nPlayback != 0 {
- Xsqlite3_log(tls, i32(539), str(19472), _nPlayback, unsafe.Pointer(_pPager.X52))
+ Xsqlite3_log(tls, int32(539), str(19427), _nPlayback, unsafe.Pointer(_pPager.XzJournal))
}
_setSectorSize(tls, _pPager)
return _rc
@@ -18923,96 +19338,99 @@ _end_playback:
var _pager_playbackØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_pager_playbackØ00__func__Ø000[0], str(19499), 15)
-}
-
-// When this is called the journal file for pager pPager must be open.
-// This function attempts to read a master journal file name from the
-// end of the file and, if successful, copies it into memory supplied
-// by the caller. See comments above writeMasterJournal() for the format
-// used to store a master journal file name at the end of a journal file.
-//
-// zMaster must point to a buffer of at least nMaster bytes allocated by
-// the caller. This should be sqlite3_vfs.mxPathname+1 (to ensure there is
-// enough space to write the master journal name). If the master journal
-// name in the journal is longer than nMaster bytes (including a
-// nul-terminator), then this is handled as if no master journal name
-// were present in the journal.
-//
-// If a master journal file name is present at the end of the journal
-// file, then it is copied into the buffer pointed to by zMaster. A
-// nul-terminator byte is appended to the buffer following the master
-// journal file name.
-//
-// If it is determined that no master journal file name is present
-// zMaster[0] is set to 0 and SQLITE_OK returned.
-//
-// If an error occurs while reading from the journal file, an SQLite
-// error code is returned.
+ crt.Xstrncpy(nil, &_pager_playbackØ00__func__Ø000[0], str(19454), 15)
+}
+
+// C comment
+// /*
+// ** When this is called the journal file for pager pPager must be open.
+// ** This function attempts to read a master journal file name from the
+// ** end of the file and, if successful, copies it into memory supplied
+// ** by the caller. See comments above writeMasterJournal() for the format
+// ** used to store a master journal file name at the end of a journal file.
+// **
+// ** zMaster must point to a buffer of at least nMaster bytes allocated by
+// ** the caller. This should be sqlite3_vfs.mxPathname+1 (to ensure there is
+// ** enough space to write the master journal name). If the master journal
+// ** name in the journal is longer than nMaster bytes (including a
+// ** nul-terminator), then this is handled as if no master journal name
+// ** were present in the journal.
+// **
+// ** If a master journal file name is present at the end of the journal
+// ** file, then it is copied into the buffer pointed to by zMaster. A
+// ** nul-terminator byte is appended to the buffer following the master
+// ** journal file name.
+// **
+// ** If it is determined that no master journal file name is present
+// ** zMaster[0] is set to 0 and SQLITE_OK returned.
+// **
+// ** If an error occurs while reading from the journal file, an SQLite
+// ** error code is returned.
+// */
func _readMasterJournal(tls *crt.TLS, _pJrnl *Xsqlite3_file, _zMaster *int8, _nMaster uint32) (r0 int32) {
var _rc int32
var _szJ int64
var _len, _cksum, _u uint32
var _aMagic [8]uint8
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMaster)) + 1*uintptr(i32(0)))) = int8(i32(0))
- if ((((((((i32(0) != store1(&_rc, _sqlite3OsFileSize(tls, _pJrnl, &_szJ))) || (_szJ < int64(i32(16)))) || (i32(0) != store1(&_rc, _read32bits(tls, _pJrnl, _szJ-int64(i32(16)), &_len)))) || (_len >= _nMaster)) || (_len == uint32(i32(0)))) || (i32(0) != store1(&_rc, _read32bits(tls, _pJrnl, _szJ-int64(i32(12)), &_cksum)))) || (i32(0) != store1(&_rc, _sqlite3OsRead(tls, _pJrnl, (unsafe.Pointer)(&_aMagic), i32(8), _szJ-int64(i32(8)))))) || crt.Xmemcmp(tls, (unsafe.Pointer)(&_aMagic), (unsafe.Pointer)(&_aJournalMagic), uint32(i32(8))) != 0) || (i32(0) != store1(&_rc, _sqlite3OsRead(tls, _pJrnl, (unsafe.Pointer)(_zMaster), int32(_len), (_szJ-int64(i32(16)))-int64(_len)))) {
+ *elem1(_zMaster, 0) = 0
+ if ((((((((int32(0) != store2(&_rc, _sqlite3OsFileSize(tls, _pJrnl, &_szJ))) || (_szJ < int64(16))) || (int32(0) != store2(&_rc, _read32bits(tls, _pJrnl, _szJ-int64(16), &_len)))) || (_len >= _nMaster)) || (_len == (0))) || (int32(0) != store2(&_rc, _read32bits(tls, _pJrnl, _szJ-int64(12), &_cksum)))) || (int32(0) != store2(&_rc, _sqlite3OsRead(tls, _pJrnl, unsafe.Pointer(&_aMagic), int32(8), _szJ-int64(8))))) || crt.Xmemcmp(tls, unsafe.Pointer(&_aMagic), unsafe.Pointer(&_aJournalMagic), uint32(8)) != 0) || (int32(0) != store2(&_rc, _sqlite3OsRead(tls, _pJrnl, unsafe.Pointer(_zMaster), int32(_len), (_szJ-int64(16))-int64(_len)))) {
return _rc
}
- _u = uint32(i32(0))
+ _u = 0
_9:
if _u >= _len {
goto _12
}
- {
- p := &_cksum
- *p = (*p) - uint32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMaster)) + 1*uintptr(_u))))
- sink5(*p)
- }
+ _cksum -= uint32(*elem1(_zMaster, uintptr(_u)))
_u += 1
goto _9
_12:
if _cksum != 0 {
- _len = uint32(i32(0))
+ _len = 0
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMaster)) + 1*uintptr(_len))) = int8(i32(0))
- return i32(0)
+ *elem1(_zMaster, uintptr(_len)) = 0
+ return int32(0)
_ = _aMagic
panic(0)
}
func _sqlite3OsAccess(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zPath *int8, _flags int32, _pResOut *int32) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
- }{(_pVfs.X8)})))(tls, _pVfs, _zPath, _flags, _pResOut)
-}
-
-// Sync the database file to disk. This is a no-op for in-memory databases
-// or pages with the Pager.noSync flag set.
-//
-// If successful, or if called on a pager for which it is a no-op, this
-// function returns SQLITE_OK. Otherwise, an IO error code is returned.
+ return func() func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int32) int32 {
+ v := _pVfs.XxAccess
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _zPath, _flags, _pResOut)
+}
+
+// C comment
+// /*
+// ** Sync the database file to disk. This is a no-op for in-memory databases
+// ** or pages with the Pager.noSync flag set.
+// **
+// ** If successful, or if called on a pager for which it is a no-op, this
+// ** function returns SQLITE_OK. Otherwise, an IO error code is returned.
+// */
func _sqlite3PagerSync(tls *crt.TLS, _pPager *XPager, _zMaster *int8) (r0 int32) {
var _rc int32
var _1_pArg unsafe.Pointer
- _rc = i32(0)
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
+ _rc = int32(0)
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
goto _0
}
- _1_pArg = (unsafe.Pointer)(_zMaster)
- _rc = _sqlite3OsFileControl(tls, (*Xsqlite3_file)(_pPager.X31), i32(21), _1_pArg)
- if _rc == i32(12) {
- _rc = i32(0)
+ _1_pArg = unsafe.Pointer(_zMaster)
+ _rc = _sqlite3OsFileControl(tls, (*Xsqlite3_file)(_pPager.Xfd), int32(21), _1_pArg)
+ if _rc == int32(12) {
+ _rc = int32(0)
}
_0:
- if (_rc == i32(0)) && ((_pPager.X4) == 0) {
+ if (_rc == int32(0)) && (_pPager.XnoSync == 0) {
func() {
- if (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53162), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSyncØ00__func__Ø000))), unsafe.Pointer(str(11747)))
+ if _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53162), unsafe.Pointer(&_sqlite3PagerSyncØ00__func__Ø000), unsafe.Pointer(str(11702)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.X31), int32(_pPager.X9))
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.Xfd), int32(_pPager.XsyncFlags))
}
return _rc
}
@@ -19020,133 +19438,132 @@ _0:
var _sqlite3PagerSyncØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerSyncØ00__func__Ø000[0], str(19514), 17)
-}
-
-// Parameter zMaster is the name of a master journal file. A single journal
-// file that referred to the master journal file has just been rolled back.
-// This routine checks if it is possible to delete the master journal file,
-// and does so if it is.
-//
-// Argument zMaster may point to Pager.pTmpSpace. So that buffer is not
-// available for use within this function.
-//
-// When a master journal file is created, it is populated with the names
-// of all of its child journals, one after another, formatted as utf-8
-// encoded text. The end of each child journal file is marked with a
-// nul-terminator byte (0x00). i.e. the entire contents of a master journal
-// file for a transaction involving two databases might be:
-//
-// "/home/bill/a.db-journal\x00/home/bill/b.db-journal\x00"
-//
-// A master journal file may only be deleted once all of its child
-// journals have been rolled back.
-//
-// This function reads the contents of the master-journal file into
-// memory and loops through each of the child journal names. For
-// each child journal, it checks if:
-//
-// * if the child journal exists, and if so
-// * if the child journal contains a reference to master journal
-// file zMaster
-//
-// If a child journal can be found that matches both of the criteria
-// above, this function returns without doing anything. Otherwise, if
-// no such child journal can be found, file zMaster is deleted from
-// the file-system using sqlite3OsDelete().
-//
-// If an IO error within this function, an error code is returned. This
-// function allocates memory by calling sqlite3Malloc(). If an allocation
-// fails, SQLITE_NOMEM is returned. Otherwise, if no IO or malloc errors
-// occur, SQLITE_OK is returned.
-//
-// TODO: This function allocates a single block of memory to load
-// the entire contents of the master journal file. This could be
-// a couple of kilobytes or so - potentially larger than the page
-// size.
+ crt.Xstrncpy(nil, &_sqlite3PagerSyncØ00__func__Ø000[0], str(19469), 17)
+}
+
+// C comment
+// /*
+// ** Parameter zMaster is the name of a master journal file. A single journal
+// ** file that referred to the master journal file has just been rolled back.
+// ** This routine checks if it is possible to delete the master journal file,
+// ** and does so if it is.
+// **
+// ** Argument zMaster may point to Pager.pTmpSpace. So that buffer is not
+// ** available for use within this function.
+// **
+// ** When a master journal file is created, it is populated with the names
+// ** of all of its child journals, one after another, formatted as utf-8
+// ** encoded text. The end of each child journal file is marked with a
+// ** nul-terminator byte (0x00). i.e. the entire contents of a master journal
+// ** file for a transaction involving two databases might be:
+// **
+// ** "/home/bill/a.db-journal\x00/home/bill/b.db-journal\x00"
+// **
+// ** A master journal file may only be deleted once all of its child
+// ** journals have been rolled back.
+// **
+// ** This function reads the contents of the master-journal file into
+// ** memory and loops through each of the child journal names. For
+// ** each child journal, it checks if:
+// **
+// ** * if the child journal exists, and if so
+// ** * if the child journal contains a reference to master journal
+// ** file zMaster
+// **
+// ** If a child journal can be found that matches both of the criteria
+// ** above, this function returns without doing anything. Otherwise, if
+// ** no such child journal can be found, file zMaster is deleted from
+// ** the file-system using sqlite3OsDelete().
+// **
+// ** If an IO error within this function, an error code is returned. This
+// ** function allocates memory by calling sqlite3Malloc(). If an allocation
+// ** fails, SQLITE_NOMEM is returned. Otherwise, if no IO or malloc errors
+// ** occur, SQLITE_OK is returned.
+// **
+// ** TODO: This function allocates a single block of memory to load
+// ** the entire contents of the master journal file. This could be
+// ** a couple of kilobytes or so - potentially larger than the page
+// ** size.
+// */
func _pager_delmaster(tls *crt.TLS, _pPager *XPager, _zMaster *int8) (r0 int32) {
var _rc, _nMasterPtr, _2_flags, _4_exists, _6_c, _6_flags int32
var _nMasterJournal int64
var _zMasterJournal, _zJournal, _zMasterPtr *int8
var _pMaster, _pJournal *Xsqlite3_file
var _pVfs *Xsqlite3_vfs
- _pVfs = (*Xsqlite3_vfs)(_pPager.X0)
+ _pVfs = (*Xsqlite3_vfs)(_pPager.XpVfs)
_zMasterJournal = nil
- _pMaster = (*Xsqlite3_file)(_sqlite3MallocZero(tls, uint64((_pVfs.X1)*i32(2))))
- _pJournal = (*Xsqlite3_file)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(_pMaster)))) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_pVfs.X1)))))))))
+ _pMaster = (*Xsqlite3_file)(_sqlite3MallocZero(tls, uint64(_pVfs.XszOsFile*int32(2))))
+ _pJournal = (*Xsqlite3_file)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pMaster)) + uintptr(_pVfs.XszOsFile)))))
if _pMaster == nil {
- _rc = _sqlite3NomemError(tls, i32(49453))
+ _rc = _sqlite3NomemError(tls, int32(49453))
goto _1
}
- _2_flags = i32(16385)
+ _2_flags = int32(16385)
_rc = _sqlite3OsOpen(tls, _pVfs, _zMaster, _pMaster, _2_flags, nil)
_1:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _delmaster_out
}
_rc = _sqlite3OsFileSize(tls, _pMaster, &_nMasterJournal)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _delmaster_out
}
- _nMasterPtr = (_pVfs.X2) + i32(1)
- _zMasterJournal = (*int8)(_sqlite3Malloc(tls, uint64((_nMasterJournal+int64(_nMasterPtr))+int64(i32(1)))))
+ _nMasterPtr = _pVfs.XmxPathname + int32(1)
+ _zMasterJournal = (*int8)(_sqlite3Malloc(tls, uint64((_nMasterJournal+int64(_nMasterPtr))+int64(1))))
if _zMasterJournal == nil {
- _rc = _sqlite3NomemError(tls, i32(49470))
+ _rc = _sqlite3NomemError(tls, int32(49470))
goto _delmaster_out
}
- _zMasterPtr = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMasterJournal)) + 1*uintptr(_nMasterJournal+int64(i32(1)))))
- _rc = _sqlite3OsRead(tls, _pMaster, (unsafe.Pointer)(_zMasterJournal), int32(_nMasterJournal), int64(i32(0)))
- if _rc != i32(0) {
+ _zMasterPtr = elem1(_zMasterJournal, uintptr(_nMasterJournal+int64(1)))
+ _rc = _sqlite3OsRead(tls, _pMaster, unsafe.Pointer(_zMasterJournal), int32(_nMasterJournal), 0)
+ if _rc != int32(0) {
goto _delmaster_out
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMasterJournal)) + 1*uintptr(_nMasterJournal))) = int8(i32(0))
+ *elem1(_zMasterJournal, uintptr(_nMasterJournal)) = 0
_zJournal = _zMasterJournal
_6:
- if int64(int32((uintptr(unsafe.Pointer(_zJournal))-uintptr(unsafe.Pointer(_zMasterJournal)))/1)) >= _nMasterJournal {
+ if int64(int32(uintptr(unsafe.Pointer(_zJournal))-uintptr(unsafe.Pointer(_zMasterJournal)))) >= _nMasterJournal {
goto _7
}
- _rc = _sqlite3OsAccess(tls, _pVfs, _zJournal, i32(0), &_4_exists)
- if _rc != i32(0) {
+ _rc = _sqlite3OsAccess(tls, _pVfs, _zJournal, int32(0), &_4_exists)
+ if _rc != int32(0) {
goto _delmaster_out
}
if _4_exists == 0 {
goto _9
}
- _6_flags = i32(2049)
+ _6_flags = int32(2049)
_rc = _sqlite3OsOpen(tls, _pVfs, _zJournal, _pJournal, _6_flags, nil)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _delmaster_out
}
_rc = _readMasterJournal(tls, _pJournal, _zMasterPtr, uint32(_nMasterPtr))
_sqlite3OsClose(tls, _pJournal)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _delmaster_out
}
- _6_c = bool2int((int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMasterPtr)) + 1*uintptr(i32(0))))) != i32(0)) && (crt.Xstrcmp(tls, _zMasterPtr, _zMaster) == i32(0)))
+ _6_c = bool2int((int32(*elem1(_zMasterPtr, 0)) != int32(0)) && (crt.Xstrcmp(tls, _zMasterPtr, _zMaster) == int32(0)))
if _6_c != 0 {
goto _delmaster_out
}
_9:
- {
- p := &_zJournal
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _zJournal)+i32(1))))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zJournal)) += uintptr(_sqlite3Strlen30(tls, _zJournal) + int32(1))
goto _6
_7:
_sqlite3OsClose(tls, _pMaster)
- _rc = _sqlite3OsDelete(tls, _pVfs, _zMaster, i32(0))
+ _rc = _sqlite3OsDelete(tls, _pVfs, _zMaster, int32(0))
_delmaster_out:
- Xsqlite3_free(tls, (unsafe.Pointer)(_zMasterJournal))
+ Xsqlite3_free(tls, unsafe.Pointer(_zMasterJournal))
if _pMaster != nil {
_sqlite3OsClose(tls, _pMaster)
func() {
- if (*Xsqlite3_io_methods)(_pJournal.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49519), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_delmasterØ00__func__Ø000))), unsafe.Pointer(str(19531)))
+ if (*Xsqlite3_io_methods)(_pJournal.XpMethods) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49519), unsafe.Pointer(&_pager_delmasterØ00__func__Ø000), unsafe.Pointer(str(19486)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_free(tls, (unsafe.Pointer)(_pMaster))
+ Xsqlite3_free(tls, unsafe.Pointer(_pMaster))
}
return _rc
}
@@ -19154,63 +19571,68 @@ _delmaster_out:
var _pager_delmasterØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_pager_delmasterØ00__func__Ø000[0], str(19549), 16)
-}
-
-// Set the value of the Pager.sectorSize variable for the given
-// pager based on the value returned by the xSectorSize method
-// of the open database file. The sector size will be used
-// to determine the size and alignment of journal header and
-// master journal pointers within created journal files.
-//
-// For temporary files the effective sector size is always 512 bytes.
-//
-// Otherwise, for non-temporary files, the effective sector size is
-// the value returned by the xSectorSize() method rounded up to 32 if
-// it is less than 32, or rounded down to MAX_SECTOR_SIZE if it
-// is greater than MAX_SECTOR_SIZE.
-//
-// If the file has the SQLITE_IOCAP_POWERSAFE_OVERWRITE property, then set
-// the effective sector size to its minimum value (512). The purpose of
-// pPager->sectorSize is to define the "blast radius" of bytes that
-// might change if a crash occurs while writing to a single byte in
-// that range. But with POWERSAFE_OVERWRITE, the blast radius is zero
-// (that is what POWERSAFE_OVERWRITE means), so we minimize the sector
-// size. For backwards compatibility of the rollback journal file format,
-// we cannot reduce the effective sector size below 512.
+ crt.Xstrncpy(nil, &_pager_delmasterØ00__func__Ø000[0], str(19504), 16)
+}
+
+// C comment
+// /*
+// ** Set the value of the Pager.sectorSize variable for the given
+// ** pager based on the value returned by the xSectorSize method
+// ** of the open database file. The sector size will be used
+// ** to determine the size and alignment of journal header and
+// ** master journal pointers within created journal files.
+// **
+// ** For temporary files the effective sector size is always 512 bytes.
+// **
+// ** Otherwise, for non-temporary files, the effective sector size is
+// ** the value returned by the xSectorSize() method rounded up to 32 if
+// ** it is less than 32, or rounded down to MAX_SECTOR_SIZE if it
+// ** is greater than MAX_SECTOR_SIZE.
+// **
+// ** If the file has the SQLITE_IOCAP_POWERSAFE_OVERWRITE property, then set
+// ** the effective sector size to its minimum value (512). The purpose of
+// ** pPager->sectorSize is to define the "blast radius" of bytes that
+// ** might change if a crash occurs while writing to a single byte in
+// ** that range. But with POWERSAFE_OVERWRITE, the blast radius is zero
+// ** (that is what POWERSAFE_OVERWRITE means), so we minimize the sector
+// ** size. For backwards compatibility of the rollback journal file format,
+// ** we cannot reduce the effective sector size below 512.
+// */
func _setSectorSize(tls *crt.TLS, _pPager *XPager) {
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil && (_pPager.X10) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(49617), unsafe.Pointer((*int8)(unsafe.Pointer(&_setSectorSizeØ00__func__Ø000))), unsafe.Pointer(str(19565)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil && _pPager.XtempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(49617), unsafe.Pointer(&_setSectorSizeØ00__func__Ø000), unsafe.Pointer(str(19520)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pPager.X10) != 0) || ((_sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.X31)) & i32(4096)) != i32(0)) {
- *(*uint32)(unsafe.Pointer(&(_pPager.X47))) = uint32(i32(512))
+ if (_pPager.XtempFile != 0) || ((_sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.Xfd)) & int32(4096)) != int32(0)) {
+ _pPager.XsectorSize = uint32(512)
goto _5
}
- *(*uint32)(unsafe.Pointer(&(_pPager.X47))) = uint32(_sqlite3SectorSize(tls, (*Xsqlite3_file)(_pPager.X31)))
+ _pPager.XsectorSize = uint32(_sqlite3SectorSize(tls, (*Xsqlite3_file)(_pPager.Xfd)))
_5:
}
var _setSectorSizeØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_setSectorSizeØ00__func__Ø000[0], str(19604), 14)
+ crt.Xstrncpy(nil, &_setSectorSizeØ00__func__Ø000[0], str(19559), 14)
}
-// Return a sanitized version of the sector-size of OS file pFile. The
-// return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE.
+// C comment
+// /*
+// ** Return a sanitized version of the sector-size of OS file pFile. The
+// ** return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE.
+// */
func _sqlite3SectorSize(tls *crt.TLS, _pFile *Xsqlite3_file) (r0 int32) {
var _iRet int32
_iRet = _sqlite3OsSectorSize(tls, _pFile)
- if _iRet < i32(32) {
- _iRet = i32(512)
+ if _iRet < int32(32) {
+ _iRet = int32(512)
goto _2
}
- if _iRet > i32(65536) {
- i32(0)
- _iRet = i32(65536)
+ if _iRet > int32(65536) {
+ _iRet = int32(65536)
}
_2:
return _iRet
@@ -19218,52 +19640,56 @@ _2:
func _sqlite3OsSectorSize(tls *crt.TLS, _id *Xsqlite3_file) (r0 int32) {
var _xSectorSize func(*crt.TLS, *Xsqlite3_file) int32
- _xSectorSize = *(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X11)}))
+ _xSectorSize = func() func(*crt.TLS, *Xsqlite3_file) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxSectorSize
+ return *(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&v))
+ }()
return func() int32 {
if _xSectorSize != nil {
return _xSectorSize(tls, _id)
}
- return i32(4096)
- }()
-}
-
-// This function is called whenever an IOERR or FULL error that requires
-// the pager to transition into the ERROR state may ahve occurred.
-// The first argument is a pointer to the pager structure, the second
-// the error-code about to be returned by a pager API function. The
-// value returned is a copy of the second argument to this function.
-//
-// If the second argument is SQLITE_FULL, SQLITE_IOERR or one of the
-// IOERR sub-codes, the pager enters the ERROR state and the error code
-// is stored in Pager.errCode. While the pager remains in the ERROR state,
-// all major API calls on the Pager will immediately return Pager.errCode.
-//
-// The ERROR state indicates that the contents of the pager-cache
-// cannot be trusted. This state can be cleared by completely discarding
-// the contents of the pager-cache. If a transaction was active when
-// the persistent error occurred, then the rollback journal may need
-// to be replayed to restore the contents of the database file (as if
-// it were a hot-journal).
+ return int32(4096)
+ }()
+}
+
+// C comment
+// /*
+// ** This function is called whenever an IOERR or FULL error that requires
+// ** the pager to transition into the ERROR state may ahve occurred.
+// ** The first argument is a pointer to the pager structure, the second
+// ** the error-code about to be returned by a pager API function. The
+// ** value returned is a copy of the second argument to this function.
+// **
+// ** If the second argument is SQLITE_FULL, SQLITE_IOERR or one of the
+// ** IOERR sub-codes, the pager enters the ERROR state and the error code
+// ** is stored in Pager.errCode. While the pager remains in the ERROR state,
+// ** all major API calls on the Pager will immediately return Pager.errCode.
+// **
+// ** The ERROR state indicates that the contents of the pager-cache
+// ** cannot be trusted. This state can be cleared by completely discarding
+// ** the contents of the pager-cache. If a transaction was active when
+// ** the persistent error occurred, then the rollback journal may need
+// ** to be replayed to restore the contents of the database file (as if
+// ** it were a hot-journal).
+// */
func _pager_error(tls *crt.TLS, _pPager *XPager, _rc int32) (r0 int32) {
var _rc2 int32
- _rc2 = _rc & i32(255)
+ _rc2 = _rc & int32(255)
func() {
- if _rc != i32(0) && (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48816), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_errorØ00__func__Ø000))), unsafe.Pointer(str(19618)))
+ if _rc != int32(0) && _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48816), unsafe.Pointer(&_pager_errorØ00__func__Ø000), unsafe.Pointer(str(19573)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X26) != i32(13) && (_pPager.X26) != i32(0) && ((_pPager.X26)&i32(255)) != i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48817), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_errorØ00__func__Ø000))), unsafe.Pointer(str(19642)))
+ if _pPager.XerrCode != int32(13) && _pPager.XerrCode != int32(0) && (_pPager.XerrCode&int32(255)) != int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48817), unsafe.Pointer(&_pager_errorØ00__func__Ø000), unsafe.Pointer(str(19597)))
crt.X__builtin_abort(tls)
}
}()
- if (_rc2 == i32(13)) || (_rc2 == i32(10)) {
- *(*int32)(unsafe.Pointer(&(_pPager.X26))) = _rc
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(6))
+ if (_rc2 == int32(13)) || (_rc2 == int32(10)) {
+ _pPager.XerrCode = _rc
+ _pPager.XeState = uint8(6)
_setGetterMethod(tls, _pPager)
}
return _rc
@@ -19272,174 +19698,177 @@ func _pager_error(tls *crt.TLS, _pPager *XPager, _rc int32) (r0 int32) {
var _pager_errorØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_pager_errorØ00__func__Ø000[0], str(19743), 12)
-}
-
-// This function is a no-op if the pager is in exclusive mode and not
-// in the ERROR state. Otherwise, it switches the pager to PAGER_OPEN
-// state.
-//
-// If the pager is not in exclusive-access mode, the database file is
-// completely unlocked. If the file is unlocked and the file-system does
-// not exhibit the UNDELETABLE_WHEN_OPEN property, the journal file is
-// closed (if it is open).
-//
-// If the pager is in ERROR state when this function is called, the
-// contents of the pager cache are discarded before switching back to
-// the OPEN state. Regardless of whether the pager is in exclusive-mode
-// or not, any journal file left in the file-system will be treated
-// as a hot-journal and rolled back the next time a read-transaction
-// is opened (by this or by any other connection).
+ crt.Xstrncpy(nil, &_pager_errorØ00__func__Ø000[0], str(19698), 12)
+}
+
+// C comment
+// /*
+// ** This function is a no-op if the pager is in exclusive mode and not
+// ** in the ERROR state. Otherwise, it switches the pager to PAGER_OPEN
+// ** state.
+// **
+// ** If the pager is not in exclusive-access mode, the database file is
+// ** completely unlocked. If the file is unlocked and the file-system does
+// ** not exhibit the UNDELETABLE_WHEN_OPEN property, the journal file is
+// ** closed (if it is open).
+// **
+// ** If the pager is in ERROR state when this function is called, the
+// ** contents of the pager cache are discarded before switching back to
+// ** the OPEN state. Regardless of whether the pager is in exclusive-mode
+// ** or not, any journal file left in the file-system will be treated
+// ** as a hot-journal and rolled back the next time a read-transaction
+// ** is opened (by this or by any other connection).
+// */
func _pager_unlock(tls *crt.TLS, _pPager *XPager) {
var _2_rc, _2_iDc int32
func() {
- if int32(_pPager.X14) != i32(1) && int32(_pPager.X14) != i32(0) && int32(_pPager.X14) != i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48718), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_unlockØ00__func__Ø000))), unsafe.Pointer(str(19755)))
+ if int32(_pPager.XeState) != int32(1) && int32(_pPager.XeState) != int32(0) && int32(_pPager.XeState) != int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48718), unsafe.Pointer(&_pager_unlockØ00__func__Ø000), unsafe.Pointer(str(19710)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3BitvecDestroy(tls, (*XBitvec)(_pPager.X30))
- *(**XBitvec)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X30))))) = nil
+ _sqlite3BitvecDestroy(tls, (*XBitvec)(_pPager.XpInJournal))
+ *(**XBitvec)(unsafe.Pointer(&_pPager.XpInJournal)) = nil
_releaseAllSavepoints(tls, _pPager)
- if (*XWal)(_pPager.X60) != nil {
+ if (*XWal)(_pPager.XpWal) != nil {
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48728), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_unlockØ00__func__Ø000))), unsafe.Pointer(str(19845)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48728), unsafe.Pointer(&_pager_unlockØ00__func__Ø000), unsafe.Pointer(str(19800)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3WalEndReadTransaction(tls, (*XWal)(_pPager.X60))
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(0))
+ _sqlite3WalEndReadTransaction(tls, (*XWal)(_pPager.XpWal))
+ _pPager.XeState = 0
goto _8
}
- if (_pPager.X1) != 0 {
+ if _pPager.XexclusiveMode != 0 {
goto _8
}
_2_iDc = func() int32 {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) != nil {
- return _sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.X31))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) != nil {
+ return _sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.Xfd))
}
- return i32(0)
+ return int32(0)
}()
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- if (i32(0) == (_2_iDc & i32(2048))) || (i32(1) != (int32(_pPager.X2) & i32(5))) {
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X32))
+
+ if (int32(0) == (_2_iDc & int32(2048))) || (int32(1) != (int32(_pPager.XjournalMode) & int32(5))) {
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xjfd))
}
- _2_rc = _pagerUnlockDb(tls, _pPager, i32(0))
- if (_2_rc != i32(0)) && (int32(_pPager.X14) == i32(6)) {
- *(*uint8)(unsafe.Pointer(&(_pPager.X15))) = uint8(i32(5))
+ _2_rc = _pagerUnlockDb(tls, _pPager, int32(0))
+ if (_2_rc != int32(0)) && (int32(_pPager.XeState) == int32(6)) {
+ _pPager.XeLock = uint8(5)
}
func() {
- if (_pPager.X26) == 0 && int32(_pPager.X14) == i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48766), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_unlockØ00__func__Ø000))), unsafe.Pointer(str(19866)))
+ if _pPager.XerrCode == 0 && int32(_pPager.XeState) == int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48766), unsafe.Pointer(&_pager_unlockØ00__func__Ø000), unsafe.Pointer(str(19821)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pPager.X16))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(0))
+ _pPager.XchangeCountDone = 0
+ _pPager.XeState = 0
_8:
func() {
- if (_pPager.X26) != i32(0) && (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48776), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_unlockØ00__func__Ø000))), unsafe.Pointer(str(19913)))
+ if _pPager.XerrCode != int32(0) && _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48776), unsafe.Pointer(&_pager_unlockØ00__func__Ø000), unsafe.Pointer(str(19868)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X26) == 0 {
+ if _pPager.XerrCode == 0 {
goto _21
}
- if int32(_pPager.X10) == i32(0) {
+ if int32(_pPager.XtempFile) == int32(0) {
_pager_reset(tls, _pPager)
- *(*uint8)(unsafe.Pointer(&(_pPager.X16))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(0))
+ _pPager.XchangeCountDone = 0
+ _pPager.XeState = 0
goto _23
}
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(func() int32 {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil {
- return i32(0)
+ _pPager.XeState = uint8(func() int32 {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil {
+ return int32(0)
}
- return i32(1)
+ return int32(1)
}())
_23:
- if (_pPager.X20) != 0 {
- _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.X31), int64(i32(0)), nil)
+ if _pPager.XbUseFetch != 0 {
+ _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.Xfd), 0, nil)
}
- *(*int32)(unsafe.Pointer(&(_pPager.X26))) = i32(0)
+ _pPager.XerrCode = int32(0)
_setGetterMethod(tls, _pPager)
_21:
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = int64(i32(0))
- *(*int64)(unsafe.Pointer(&(_pPager.X35))) = int64(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pPager.X17))) = uint8(i32(0))
+ _pPager.XjournalOff = 0
+ _pPager.XjournalHdr = 0
+ _pPager.XsetMaster = 0
}
var _pager_unlockØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_pager_unlockØ00__func__Ø000[0], str(19950), 13)
+ crt.Xstrncpy(nil, &_pager_unlockØ00__func__Ø000[0], str(19905), 13)
}
-// Finish with a read transaction. All this does is release the
-// read-lock.
+// C comment
+// /*
+// ** Finish with a read transaction. All this does is release the
+// ** read-lock.
+// */
func _sqlite3WalEndReadTransaction(tls *crt.TLS, _pWal *XWal) {
_sqlite3WalEndWriteTransaction(tls, _pWal)
- if int32(_pWal.X9) >= i32(0) {
- _walUnlockShared(tls, _pWal, i32(3)+int32(_pWal.X9))
- *(*int16)(unsafe.Pointer(&(_pWal.X9))) = int16(i32(-1))
+ if int32(_pWal.XreadLock) >= int32(0) {
+ _walUnlockShared(tls, _pWal, int32(3)+int32(_pWal.XreadLock))
+ _pWal.XreadLock = int16(-1)
}
}
-// Change the size of an existing memory allocation
+// C comment
+// /*
+// ** Change the size of an existing memory allocation
+// */
func _sqlite3Realloc(tls *crt.TLS, _pOld unsafe.Pointer, _nBytes uint64) (r0 unsafe.Pointer) {
var _nOld, _nNew, _nDiff int32
var _pNew unsafe.Pointer
- i32(0)
- i32(0)
+
if _pOld == nil {
return _sqlite3Malloc(tls, _nBytes)
}
- if _nBytes == uint64(i32(0)) {
+ if _nBytes == (0) {
Xsqlite3_free(tls, _pOld)
return nil
}
- if _nBytes >= uint64(i32(2147483392)) {
+ if _nBytes >= uint64(2147483392) {
return nil
}
_nOld = _sqlite3MallocSize(tls, _pOld)
- _nNew = ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X4)(tls, int32(_nBytes))
+ _nNew = (_sqlite3Config.Xm.XxRoundup)(tls, int32(_nBytes))
if _nOld == _nNew {
_pNew = _pOld
goto _11
}
- if (_sqlite3Config.X0) == 0 {
+ if _sqlite3Config.XbMemstat == 0 {
goto _5
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.X0))
- _sqlite3StatusHighwater(tls, i32(5), int32(_nBytes))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
+ _sqlite3StatusHighwater(tls, int32(5), int32(_nBytes))
_nDiff = _nNew - _nOld
- if (_nDiff > i32(0)) && (_sqlite3StatusValue(tls, i32(0)) >= ((_mem0.X1) - int64(_nDiff))) {
+ if (_nDiff > int32(0)) && (_sqlite3StatusValue(tls, int32(0)) >= (_mem0.XalarmThreshold - int64(_nDiff))) {
_sqlite3MallocAlarm(tls, _nDiff)
}
- _pNew = ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X2)(tls, _pOld, _nNew)
- if (_pNew == nil) && ((_mem0.X1) > int64(i32(0))) {
+ _pNew = (_sqlite3Config.Xm.XxRealloc)(tls, _pOld, _nNew)
+ if (_pNew == nil) && (_mem0.XalarmThreshold > (0)) {
_sqlite3MallocAlarm(tls, int32(_nBytes))
- _pNew = ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X2)(tls, _pOld, _nNew)
+ _pNew = (_sqlite3Config.Xm.XxRealloc)(tls, _pOld, _nNew)
}
if _pNew != nil {
_nNew = _sqlite3MallocSize(tls, _pNew)
- _sqlite3StatusUp(tls, i32(0), _nNew-_nOld)
+ _sqlite3StatusUp(tls, int32(0), _nNew-_nOld)
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
goto _11
_5:
- _pNew = ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X2)(tls, _pOld, _nNew)
+ _pNew = (_sqlite3Config.Xm.XxRealloc)(tls, _pOld, _nNew)
_11:
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(_pNew)))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24772), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ReallocØ00__func__Ø000))), unsafe.Pointer(str(19963)))
+ if (int32(uintptr(_pNew)) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24772), unsafe.Pointer(&_sqlite3ReallocØ00__func__Ø000), unsafe.Pointer(str(19918)))
crt.X__builtin_abort(tls)
}
}()
@@ -19449,52 +19878,55 @@ _11:
var _sqlite3ReallocØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ReallocØ00__func__Ø000[0], str(19990), 15)
-}
-
-// Given the page number of an overflow page in the database (parameter
-// ovfl), this function finds the page number of the next page in the
-// linked list of overflow pages. If possible, it uses the auto-vacuum
-// pointer-map data instead of reading the content of page ovfl to do so.
-//
-// If an error occurs an SQLite error code is returned. Otherwise:
-//
-// The page number of the next overflow page in the linked list is
-// written to *pPgnoNext. If page ovfl is the last page in its linked
-// list, *pPgnoNext is set to zero.
-//
-// If ppPage is not NULL, and a reference to the MemPage object corresponding
-// to page number pOvfl was obtained, then *ppPage is set to point to that
-// reference. It is the responsibility of the caller to call releasePage()
-// on *ppPage to free the reference. In no reference was obtained (because
-// the pointer-map was used to obtain the value for *pPgnoNext), then
-// *ppPage is set to zero.
+ crt.Xstrncpy(nil, &_sqlite3ReallocØ00__func__Ø000[0], str(19945), 15)
+}
+
+// C comment
+// /*
+// ** Given the page number of an overflow page in the database (parameter
+// ** ovfl), this function finds the page number of the next page in the
+// ** linked list of overflow pages. If possible, it uses the auto-vacuum
+// ** pointer-map data instead of reading the content of page ovfl to do so.
+// **
+// ** If an error occurs an SQLite error code is returned. Otherwise:
+// **
+// ** The page number of the next overflow page in the linked list is
+// ** written to *pPgnoNext. If page ovfl is the last page in its linked
+// ** list, *pPgnoNext is set to zero.
+// **
+// ** If ppPage is not NULL, and a reference to the MemPage object corresponding
+// ** to page number pOvfl was obtained, then *ppPage is set to point to that
+// ** reference. It is the responsibility of the caller to call releasePage()
+// ** on *ppPage to free the reference. In no reference was obtained (because
+// ** the pointer-map was used to obtain the value for *pPgnoNext), then
+// ** *ppPage is set to zero.
+// */
func _getOverflowPage(tls *crt.TLS, _pBt *XBtShared, _ovfl uint32, _ppPage **XMemPage, _pPgnoNext *uint32) (r0 int32) {
var _rc int32
var _next, _1_pgno, _1_iGuess uint32
var _1_eType uint8
var _pPage *XMemPage
- _next = u32(0)
+ _next = uint32(0)
_pPage = nil
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63444), unsafe.Pointer((*int8)(unsafe.Pointer(&_getOverflowPageØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63444), unsafe.Pointer(&_getOverflowPageØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pPgnoNext == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63445), unsafe.Pointer((*int8)(unsafe.Pointer(&_getOverflowPageØ00__func__Ø000))), unsafe.Pointer(str(20005)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63445), unsafe.Pointer(&_getOverflowPageØ00__func__Ø000), unsafe.Pointer(str(19960)))
crt.X__builtin_abort(tls)
}
}()
- if (_pBt.X5) == 0 {
+ if _pBt.XautoVacuum == 0 {
goto _4
}
- _1_iGuess = _ovfl + uint32(i32(1))
+ _1_iGuess = _ovfl + uint32(1)
_5:
- if (_ptrmapPageno(tls, _pBt, _1_iGuess) == _1_iGuess) || (_1_iGuess == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1)))) {
+ if (_ptrmapPageno(tls, _pBt, _1_iGuess) == _1_iGuess) || (_1_iGuess == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1))) {
_1_iGuess += 1
goto _5
}
@@ -19502,35 +19934,35 @@ _5:
goto _8
}
_rc = _ptrmapGet(tls, _pBt, _1_iGuess, &_1_eType, &_1_pgno)
- if ((_rc == i32(0)) && (int32(_1_eType) == i32(4))) && (_1_pgno == _ovfl) {
+ if ((_rc == int32(0)) && (int32(_1_eType) == int32(4))) && (_1_pgno == _ovfl) {
_next = _1_iGuess
- _rc = i32(101)
+ _rc = int32(101)
}
_8:
_4:
func() {
- if _next != uint32(i32(0)) && _rc != i32(101) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63473), unsafe.Pointer((*int8)(unsafe.Pointer(&_getOverflowPageØ00__func__Ø000))), unsafe.Pointer(str(20015)))
+ if _next != (0) && _rc != int32(101) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63473), unsafe.Pointer(&_getOverflowPageØ00__func__Ø000), unsafe.Pointer(str(19970)))
crt.X__builtin_abort(tls)
}
}()
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _15
}
_rc = _btreeGetPage(tls, _pBt, _ovfl, &_pPage, func() int32 {
if _ppPage == nil {
- return i32(2)
+ return int32(2)
}
- return i32(0)
+ return int32(0)
}())
func() {
- if _rc != i32(0) && _pPage != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63476), unsafe.Pointer((*int8)(unsafe.Pointer(&_getOverflowPageØ00__func__Ø000))), unsafe.Pointer(str(20042)))
+ if _rc != int32(0) && _pPage != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63476), unsafe.Pointer(&_getOverflowPageØ00__func__Ø000), unsafe.Pointer(str(19997)))
crt.X__builtin_abort(tls)
}
}()
- if _rc == i32(0) {
- _next = _sqlite3Get4byte(tls, _pPage.X19)
+ if _rc == int32(0) {
+ _next = _sqlite3Get4byte(tls, _pPage.XaData)
}
_15:
*_pPgnoNext = _next
@@ -19541,8 +19973,8 @@ _15:
_releasePage(tls, _pPage)
_23:
return func() int32 {
- if _rc == i32(101) {
- return i32(0)
+ if _rc == int32(101) {
+ return int32(0)
}
return _rc
}()
@@ -19551,32 +19983,35 @@ _23:
var _getOverflowPageØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_getOverflowPageØ00__func__Ø000[0], str(20068), 16)
+ crt.Xstrncpy(nil, &_getOverflowPageØ00__func__Ø000[0], str(20023), 16)
}
-// Given a page number of a regular database page, return the page
-// number for the pointer-map page that contains the entry for the
-// input page number.
-//
-// Return 0 (not a valid page) for pgno==1 since there is
-// no pointer map associated with page 1. The integrity_check logic
-// requires that ptrmapPageno(*,1)!=1.
+// C comment
+// /*
+// ** Given a page number of a regular database page, return the page
+// ** number for the pointer-map page that contains the entry for the
+// ** input page number.
+// **
+// ** Return 0 (not a valid page) for pgno==1 since there is
+// ** no pointer map associated with page 1. The integrity_check logic
+// ** requires that ptrmapPageno(*,1)!=1.
+// */
func _ptrmapPageno(tls *crt.TLS, _pBt *XBtShared, _pgno uint32) (r0 uint32) {
var _nPagesPerMapPage int32
var _iPtrMap, _ret uint32
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59937), unsafe.Pointer((*int8)(unsafe.Pointer(&_ptrmapPagenoØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59937), unsafe.Pointer(&_ptrmapPagenoØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
- if _pgno < uint32(i32(2)) {
- return uint32(i32(0))
+ if _pgno < uint32(2) {
+ return 0
}
- _nPagesPerMapPage = int32(((_pBt.X16) / uint32(i32(5))) + uint32(i32(1)))
- _iPtrMap = (_pgno - uint32(i32(2))) / uint32(_nPagesPerMapPage)
- _ret = (_iPtrMap * uint32(_nPagesPerMapPage)) + uint32(i32(2))
- if _ret == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1))) {
+ _nPagesPerMapPage = int32((_pBt.XusableSize / uint32(5)) + uint32(1))
+ _iPtrMap = (_pgno - uint32(2)) / uint32(_nPagesPerMapPage)
+ _ret = (_iPtrMap * uint32(_nPagesPerMapPage)) + uint32(2)
+ if _ret == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1)) {
_ret += 1
}
return _ret
@@ -19585,122 +20020,131 @@ func _ptrmapPageno(tls *crt.TLS, _pBt *XBtShared, _pgno uint32) (r0 uint32) {
var _ptrmapPagenoØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_ptrmapPagenoØ00__func__Ø000[0], str(20084), 13)
+ crt.Xstrncpy(nil, &_ptrmapPagenoØ00__func__Ø000[0], str(20039), 13)
}
-// Read an entry from the pointer map.
-//
-// This routine retrieves the pointer map entry for page 'key', writing
-// the type and parent page number to *pEType and *pPgno respectively.
-// An error code is returned if something goes wrong, otherwise SQLITE_OK.
+// C comment
+// /*
+// ** Read an entry from the pointer map.
+// **
+// ** This routine retrieves the pointer map entry for page 'key', writing
+// ** the type and parent page number to *pEType and *pPgno respectively.
+// ** An error code is returned if something goes wrong, otherwise SQLITE_OK.
+// */
func _ptrmapGet(tls *crt.TLS, _pBt *XBtShared, _key uint32, _pEType *uint8, _pPgno *uint32) (r0 int32) {
var _iPtrmap, _offset, _rc int32
var _pPtrmap *uint8
var _pDbPage *XPgHdr
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60017), unsafe.Pointer((*int8)(unsafe.Pointer(&_ptrmapGetØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60017), unsafe.Pointer(&_ptrmapGetØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
_iPtrmap = int32(_ptrmapPageno(tls, _pBt, _key))
- _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.X0), uint32(_iPtrmap), &_pDbPage, i32(0))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.XpPager), uint32(_iPtrmap), &_pDbPage, int32(0))
+ if _rc != int32(0) {
return _rc
}
_pPtrmap = (*uint8)(_sqlite3PagerGetData(tls, _pDbPage))
- _offset = int32(uint32(i32(5)) * ((_key - uint32(_iPtrmap)) - uint32(i32(1))))
- if _offset < i32(0) {
+ _offset = int32(uint32(5) * ((_key - uint32(_iPtrmap)) - uint32(1)))
+ if _offset < int32(0) {
_sqlite3PagerUnref(tls, _pDbPage)
- return _sqlite3CorruptError(tls, i32(60029))
+ return _sqlite3CorruptError(tls, int32(60029))
}
func() {
- if _offset > (int32(_pBt.X16) - i32(5)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60031), unsafe.Pointer((*int8)(unsafe.Pointer(&_ptrmapGetØ00__func__Ø000))), unsafe.Pointer(str(20097)))
+ if _offset > (int32(_pBt.XusableSize) - int32(5)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60031), unsafe.Pointer(&_ptrmapGetØ00__func__Ø000), unsafe.Pointer(str(20052)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pEType == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60032), unsafe.Pointer((*int8)(unsafe.Pointer(&_ptrmapGetØ00__func__Ø000))), unsafe.Pointer(str(20130)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60032), unsafe.Pointer(&_ptrmapGetØ00__func__Ø000), unsafe.Pointer(str(20085)))
crt.X__builtin_abort(tls)
}
}()
- *_pEType = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPtrmap)) + 1*uintptr(_offset)))
+ *_pEType = *elem15(_pPtrmap, uintptr(_offset))
if _pPgno != nil {
- *_pPgno = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPtrmap))+1*uintptr(_offset+i32(1)))))
+ *_pPgno = _sqlite3Get4byte(tls, elem15(_pPtrmap, uintptr(_offset+int32(1))))
}
_sqlite3PagerUnref(tls, _pDbPage)
- if (int32(*_pEType) < i32(1)) || (int32(*_pEType) > i32(5)) {
- return _sqlite3CorruptError(tls, i32(60037))
+ if (int32(*_pEType) < int32(1)) || (int32(*_pEType) > int32(5)) {
+ return _sqlite3CorruptError(tls, int32(60037))
}
- return i32(0)
+ return int32(0)
}
var _ptrmapGetØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_ptrmapGetØ00__func__Ø000[0], str(20140), 10)
+ crt.Xstrncpy(nil, &_ptrmapGetØ00__func__Ø000[0], str(20095), 10)
}
-// Get a page from the pager. Initialize the MemPage.pBt and
-// MemPage.aData elements if needed. See also: btreeGetUnusedPage().
-//
-// If the PAGER_GET_NOCONTENT flag is set, it means that we do not care
-// about the content of the page at this time. So do not go to the disk
-// to fetch the content. Just fill in the content with zeros for now.
-// If in the future we call sqlite3PagerWrite() on this page, that
-// means we have started to be concerned about content and the disk
-// read should occur at that point.
+// C comment
+// /*
+// ** Get a page from the pager. Initialize the MemPage.pBt and
+// ** MemPage.aData elements if needed. See also: btreeGetUnusedPage().
+// **
+// ** If the PAGER_GET_NOCONTENT flag is set, it means that we do not care
+// ** about the content of the page at this time. So do not go to the disk
+// ** to fetch the content. Just fill in the content with zeros for now.
+// ** If in the future we call sqlite3PagerWrite() on this page, that
+// ** means we have started to be concerned about content and the disk
+// ** read should occur at that point.
+// */
func _btreeGetPage(tls *crt.TLS, _pBt *XBtShared, _pgno uint32, _ppPage **XMemPage, _flags int32) (r0 int32) {
var _rc int32
var _pDbPage *XPgHdr
func() {
- if _flags != i32(0) && _flags != i32(1) && _flags != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61023), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeGetPageØ00__func__Ø000))), unsafe.Pointer(str(20150)))
+ if _flags != int32(0) && _flags != int32(1) && _flags != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61023), unsafe.Pointer(&_btreeGetPageØ00__func__Ø000), unsafe.Pointer(str(20105)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61024), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeGetPageØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61024), unsafe.Pointer(&_btreeGetPageØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.X0), _pgno, &_pDbPage, _flags)
+ _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.XpPager), _pgno, &_pDbPage, _flags)
if _rc != 0 {
return _rc
}
*_ppPage = _btreePageFromDbPage(tls, _pDbPage, _pgno, _pBt)
- return i32(0)
+ return int32(0)
}
var _btreeGetPageØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_btreeGetPageØ00__func__Ø000[0], str(20218), 13)
+ crt.Xstrncpy(nil, &_btreeGetPageØ00__func__Ø000[0], str(20173), 13)
}
-// Convert a DbPage obtained from the pager into a MemPage used by
-// the btree layer.
+// C comment
+// /*
+// ** Convert a DbPage obtained from the pager into a MemPage used by
+// ** the btree layer.
+// */
func _btreePageFromDbPage(tls *crt.TLS, _pDbPage *XPgHdr, _pgno uint32, _pBt *XBtShared) (r0 *XMemPage) {
var _pPage *XMemPage
_pPage = (*XMemPage)(_sqlite3PagerGetExtra(tls, _pDbPage))
- if _pgno != (_pPage.X4) {
- *(**uint8)(unsafe.Pointer(&(_pPage.X19))) = (*uint8)(_sqlite3PagerGetData(tls, _pDbPage))
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X23))))) = _pDbPage
- *(**XBtShared)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPage.X18))))) = _pBt
- *(*uint32)(unsafe.Pointer(&(_pPage.X4))) = _pgno
- *(*uint8)(unsafe.Pointer(&(_pPage.X6))) = uint8(func() int32 {
- if _pgno == uint32(i32(1)) {
- return i32(100)
+ if _pgno != _pPage.Xpgno {
+ _pPage.XaData = (*uint8)(_sqlite3PagerGetData(tls, _pDbPage))
+ *(**XPgHdr)(unsafe.Pointer(&_pPage.XpDbPage)) = _pDbPage
+ *(**XBtShared)(unsafe.Pointer(&_pPage.XpBt)) = _pBt
+ _pPage.Xpgno = _pgno
+ _pPage.XhdrOffset = uint8(func() int32 {
+ if _pgno == uint32(1) {
+ return int32(100)
}
- return i32(0)
+ return int32(0)
}())
}
func() {
- if (_pPage.X19) != (*uint8)(_sqlite3PagerGetData(tls, _pDbPage)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60999), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePageFromDbPageØ00__func__Ø000))), unsafe.Pointer(str(20231)))
+ if _pPage.XaData != (*uint8)(_sqlite3PagerGetData(tls, _pDbPage)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60999), unsafe.Pointer(&_btreePageFromDbPageØ00__func__Ø000), unsafe.Pointer(str(20186)))
crt.X__builtin_abort(tls)
}
}()
@@ -19710,7 +20154,7 @@ func _btreePageFromDbPage(tls *crt.TLS, _pDbPage *XPgHdr, _pgno uint32, _pBt *XB
var _btreePageFromDbPageØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_btreePageFromDbPageØ00__func__Ø000[0], str(20274), 20)
+ crt.Xstrncpy(nil, &_btreePageFromDbPageØ00__func__Ø000[0], str(20229), 20)
}
func _releasePage(tls *crt.TLS, _pPage *XMemPage) {
@@ -19719,101 +20163,110 @@ func _releasePage(tls *crt.TLS, _pPage *XMemPage) {
}
}
-// Release a MemPage. This should be called once for each prior
-// call to btreeGetPage.
+// C comment
+// /*
+// ** Release a MemPage. This should be called once for each prior
+// ** call to btreeGetPage.
+// */
func _releasePageNotNull(tls *crt.TLS, _pPage *XMemPage) {
func() {
- if (_pPage.X19) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61127), unsafe.Pointer((*int8)(unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000))), unsafe.Pointer(str(20294)))
+ if _pPage.XaData == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61127), unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000), unsafe.Pointer(str(20249)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtShared)(_pPage.X18) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61128), unsafe.Pointer((*int8)(unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000))), unsafe.Pointer(str(20307)))
+ if _pPage.XpBt == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61128), unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000), unsafe.Pointer(str(20262)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XPgHdr)(_pPage.X23) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61129), unsafe.Pointer((*int8)(unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000))), unsafe.Pointer(str(20318)))
+ if (*XPgHdr)(_pPage.XpDbPage) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61129), unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000), unsafe.Pointer(str(20273)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerGetExtra(tls, (*XPgHdr)(_pPage.X23)) != (unsafe.Pointer)(_pPage) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61130), unsafe.Pointer((*int8)(unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000))), unsafe.Pointer(str(20336)))
+ if _sqlite3PagerGetExtra(tls, (*XPgHdr)(_pPage.XpDbPage)) != unsafe.Pointer(_pPage) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61130), unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000), unsafe.Pointer(str(20291)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerGetData(tls, (*XPgHdr)(_pPage.X23)) != (unsafe.Pointer)(_pPage.X19) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61131), unsafe.Pointer((*int8)(unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000))), unsafe.Pointer(str(20389)))
+ if _sqlite3PagerGetData(tls, (*XPgHdr)(_pPage.XpDbPage)) != unsafe.Pointer(_pPage.XaData) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61131), unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000), unsafe.Pointer(str(20344)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61132), unsafe.Pointer((*int8)(unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61132), unsafe.Pointer(&_releasePageNotNullØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3PagerUnrefNotNull(tls, (*XPgHdr)(_pPage.X23))
+ _sqlite3PagerUnrefNotNull(tls, (*XPgHdr)(_pPage.XpDbPage))
}
var _releasePageNotNullØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_releasePageNotNullØ00__func__Ø000[0], str(20477), 19)
+ crt.Xstrncpy(nil, &_releasePageNotNullØ00__func__Ø000[0], str(20432), 19)
}
-// Release all of the apPage[] pages for a cursor.
+// C comment
+// /*
+// ** Release all of the apPage[] pages for a cursor.
+// */
func _btreeReleaseAllCursorPages(tls *crt.TLS, _pCur *XBtCursor) {
var _i int32
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i > int32(_pCur.X14) {
+ if _i > int32(_pCur.XiPage) {
goto _3
}
- _releasePage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_i))))
- *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_i))) = nil
+ _releasePage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_i)))
+ *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_i)) = nil
_i += 1
goto _0
_3:
- *(*int8)(unsafe.Pointer(&(_pCur.X14))) = int8(i32(-1))
-}
-
-// This routine sets the state to CURSOR_FAULT and the error
-// code to errCode for every cursor on any BtShared that pBtree
-// references. Or if the writeOnly flag is set to 1, then only
-// trip write cursors and leave read cursors unchanged.
-//
-// Every cursor is a candidate to be tripped, including cursors
-// that belong to other database connections that happen to be
-// sharing the cache with pBtree.
-//
-// This routine gets called when a rollback occurs. If the writeOnly
-// flag is true, then only write-cursors need be tripped - read-only
-// cursors save their current positions so that they may continue
-// following the rollback. Or, if writeOnly is false, all cursors are
-// tripped. In general, writeOnly is false if the transaction being
-// rolled back modified the database schema. In this case b-tree root
-// pages may be moved or deleted from the database altogether, making
-// it unsafe for read cursors to continue.
-//
-// If the writeOnly flag is true and an error is encountered while
-// saving the current position of a read-only cursor, all cursors,
-// including all read-cursors are tripped.
-//
-// SQLITE_OK is returned if successful, or if an error occurs while
-// saving a cursor position, an SQLite error code.
+ _pCur.XiPage = int8(-1)
+}
+
+// C comment
+// /*
+// ** This routine sets the state to CURSOR_FAULT and the error
+// ** code to errCode for every cursor on any BtShared that pBtree
+// ** references. Or if the writeOnly flag is set to 1, then only
+// ** trip write cursors and leave read cursors unchanged.
+// **
+// ** Every cursor is a candidate to be tripped, including cursors
+// ** that belong to other database connections that happen to be
+// ** sharing the cache with pBtree.
+// **
+// ** This routine gets called when a rollback occurs. If the writeOnly
+// ** flag is true, then only write-cursors need be tripped - read-only
+// ** cursors save their current positions so that they may continue
+// ** following the rollback. Or, if writeOnly is false, all cursors are
+// ** tripped. In general, writeOnly is false if the transaction being
+// ** rolled back modified the database schema. In this case b-tree root
+// ** pages may be moved or deleted from the database altogether, making
+// ** it unsafe for read cursors to continue.
+// **
+// ** If the writeOnly flag is true and an error is encountered while
+// ** saving the current position of a read-only cursor, all cursors,
+// ** including all read-cursors are tripped.
+// **
+// ** SQLITE_OK is returned if successful, or if an error occurs while
+// ** saving a cursor position, an SQLite error code.
+// */
func _sqlite3BtreeTripAllCursors(tls *crt.TLS, _pBtree *XBtree, _errCode int32, _writeOnly int32) (r0 int32) {
var _rc, _2_i int32
var _p *XBtCursor
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if _writeOnly != i32(0) && _writeOnly != i32(1) || i32(1) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62993), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeTripAllCursorsØ00__func__Ø000))), unsafe.Pointer(str(20496)))
+ if _writeOnly != int32(0) && _writeOnly != int32(1) || int32(1) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62993), unsafe.Pointer(&_sqlite3BtreeTripAllCursorsØ00__func__Ø000), unsafe.Pointer(str(20451)))
crt.X__builtin_abort(tls)
}
}()
@@ -19821,40 +20274,40 @@ func _sqlite3BtreeTripAllCursors(tls *crt.TLS, _pBtree *XBtree, _errCode int32,
goto _4
}
_sqlite3BtreeEnter(tls, _pBtree)
- _p = (*XBtCursor)((*XBtShared)(_pBtree.X1).X2)
+ _p = (*XBtCursor)((*XBtShared)(_pBtree.XpBt).XpCursor)
_5:
if _p == nil {
goto _8
}
- if _writeOnly == 0 || (int32(_p.X10)&i32(1)) != i32(0) {
+ if _writeOnly == 0 || (int32(_p.XcurFlags)&int32(1)) != int32(0) {
goto _10
}
- if int32(_p.X12) != i32(1) && int32(_p.X12) != i32(2) {
+ if int32(_p.XeState) != int32(1) && int32(_p.XeState) != int32(2) {
goto _12
}
_rc = _saveCursorPosition(tls, _p)
- if _rc != i32(0) {
- _sqlite3BtreeTripAllCursors(tls, _pBtree, _rc, i32(0))
+ if _rc != int32(0) {
+ _sqlite3BtreeTripAllCursors(tls, _pBtree, _rc, int32(0))
goto _8
}
_12:
goto _14
_10:
_sqlite3BtreeClearCursor(tls, _p)
- *(*uint8)(unsafe.Pointer(&(_p.X12))) = uint8(i32(4))
- *(*int32)(unsafe.Pointer(&(_p.X9))) = _errCode
+ _p.XeState = uint8(4)
+ _p.XskipNext = _errCode
_14:
- _2_i = i32(0)
+ _2_i = int32(0)
_15:
- if _2_i > int32(_p.X14) {
+ if _2_i > int32(_p.XiPage) {
goto _18
}
- _releasePage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_p.X19))))) + 4*uintptr(_2_i))))
- *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_p.X19))))) + 4*uintptr(_2_i))) = nil
+ _releasePage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_p.XapPage)), uintptr(_2_i)))
+ *elem30((**XMemPage)(unsafe.Pointer(&_p.XapPage)), uintptr(_2_i)) = nil
_2_i += 1
goto _15
_18:
- _p = (*XBtCursor)(_p.X2)
+ _p = (*XBtCursor)(_p.XpNext)
goto _5
_8:
_sqlite3BtreeLeave(tls, _pBtree)
@@ -19865,130 +20318,145 @@ _4:
var _sqlite3BtreeTripAllCursorsØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeTripAllCursorsØ00__func__Ø000[0], str(20548), 27)
+ crt.Xstrncpy(nil, &_sqlite3BtreeTripAllCursorsØ00__func__Ø000[0], str(20503), 27)
}
-// Clear the current cursor position.
+// C comment
+// /*
+// ** Clear the current cursor position.
+// */
func _sqlite3BtreeClearCursor(tls *crt.TLS, _pCur *XBtCursor) {
func() {
if _cursorHoldsMutex(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59781), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeClearCursorØ00__func__Ø000))), unsafe.Pointer(str(10275)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59781), unsafe.Pointer(&_sqlite3BtreeClearCursorØ00__func__Ø000), unsafe.Pointer(str(10230)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_free(tls, _pCur.X6)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pCur.X6))) = nil
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(0))
+ Xsqlite3_free(tls, _pCur.XpKey)
+ _pCur.XpKey = nil
+ _pCur.XeState = 0
}
var _sqlite3BtreeClearCursorØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeClearCursorØ00__func__Ø000[0], str(20575), 24)
+ crt.Xstrncpy(nil, &_sqlite3BtreeClearCursorØ00__func__Ø000[0], str(20530), 24)
}
-// This function may only be called when a read-transaction is open on
-// the pager. It returns the total number of pages in the database.
-//
-// However, if the file is between 1 and <page-size> bytes in size, then
-// this is considered a 1 page file.
+// C comment
+// /*
+// ** This function may only be called when a read-transaction is open on
+// ** the pager. It returns the total number of pages in the database.
+// **
+// ** However, if the file is between 1 and <page-size> bytes in size, then
+// ** this is considered a 1 page file.
+// */
func _sqlite3PagerPagecount(tls *crt.TLS, _pPager *XPager, _pnPage *int32) {
func() {
- if int32(_pPager.X14) < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50791), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerPagecountØ00__func__Ø000))), unsafe.Pointer(str(18157)))
+ if int32(_pPager.XeState) < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50791), unsafe.Pointer(&_sqlite3PagerPagecountØ00__func__Ø000), unsafe.Pointer(str(18112)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) == i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50792), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerPagecountØ00__func__Ø000))), unsafe.Pointer(str(20599)))
+ if int32(_pPager.XeState) == int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50792), unsafe.Pointer(&_sqlite3PagerPagecountØ00__func__Ø000), unsafe.Pointer(str(20554)))
crt.X__builtin_abort(tls)
}
}()
- *_pnPage = int32(_pPager.X22)
+ *_pnPage = int32(_pPager.XdbSize)
}
var _sqlite3PagerPagecountØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerPagecountØ00__func__Ø000[0], str(20637), 22)
+ crt.Xstrncpy(nil, &_sqlite3PagerPagecountØ00__func__Ø000[0], str(20592), 22)
}
-// Return the number of cursors open on pBt. This is for use
-// in assert() expressions, so it is only compiled if NDEBUG is not
-// defined.
-//
-// Only write cursors are counted if wrOnly is true. If wrOnly is
-// false then all cursors are counted.
-//
-// For the purposes of this routine, a cursor is any cursor that
-// is capable of reading or writing to the database. Cursors that
-// have been tripped into the CURSOR_FAULT state are not counted.
+// C comment
+// /*
+// ** Return the number of cursors open on pBt. This is for use
+// ** in assert() expressions, so it is only compiled if NDEBUG is not
+// ** defined.
+// **
+// ** Only write cursors are counted if wrOnly is true. If wrOnly is
+// ** false then all cursors are counted.
+// **
+// ** For the purposes of this routine, a cursor is any cursor that
+// ** is capable of reading or writing to the database. Cursors that
+// ** have been tripped into the CURSOR_FAULT state are not counted.
+// */
func _countValidCursors(tls *crt.TLS, _pBt *XBtShared, _wrOnly int32) (r0 int32) {
var _r int32
var _pCur *XBtCursor
- _r = i32(0)
- _pCur = (*XBtCursor)(_pBt.X2)
+ _r = int32(0)
+ _pCur = (*XBtCursor)(_pBt.XpCursor)
_0:
if _pCur == nil {
goto _3
}
- if ((_wrOnly == i32(0)) || ((int32(_pCur.X10) & i32(1)) != i32(0))) && (int32(_pCur.X12) != i32(4)) {
+ if ((_wrOnly == int32(0)) || ((int32(_pCur.XcurFlags) & int32(1)) != int32(0))) && (int32(_pCur.XeState) != int32(4)) {
_r += 1
}
- _pCur = (*XBtCursor)(_pCur.X2)
+ _pCur = (*XBtCursor)(_pCur.XpNext)
goto _0
_3:
return _r
}
-// Clear (destroy) the BtShared.pHasContent bitvec. This should be
-// invoked at the conclusion of each write-transaction.
+// C comment
+// /*
+// ** Clear (destroy) the BtShared.pHasContent bitvec. This should be
+// ** invoked at the conclusion of each write-transaction.
+// */
func _btreeClearHasContent(tls *crt.TLS, _pBt *XBtShared) {
- _sqlite3BitvecDestroy(tls, (*XBitvec)(_pBt.X22))
- *(**XBitvec)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X22))))) = nil
+ _sqlite3BitvecDestroy(tls, (*XBitvec)(_pBt.XpHasContent))
+ *(**XBitvec)(unsafe.Pointer(&_pBt.XpHasContent)) = nil
}
-// This function is called from both BtreeCommitPhaseTwo() and BtreeRollback()
-// at the conclusion of a transaction.
+// C comment
+// /*
+// ** This function is called from both BtreeCommitPhaseTwo() and BtreeRollback()
+// ** at the conclusion of a transaction.
+// */
func _btreeEndTransaction(tls *crt.TLS, _p *XBtree) {
var _db *Xsqlite3
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
- _db = (*Xsqlite3)(_p.X0)
+ _pBt = (*XBtShared)(_p.XpBt)
+ _db = (*Xsqlite3)(_p.Xdb)
func() {
if _sqlite3BtreeHoldsMutex(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62861), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeEndTransactionØ00__func__Ø000))), unsafe.Pointer(str(17487)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62861), unsafe.Pointer(&_btreeEndTransactionØ00__func__Ø000), unsafe.Pointer(str(17442)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pBt.X7))) = uint8(i32(0))
- if (int32(_p.X2) > i32(0)) && ((_db.X35) > i32(1)) {
+ _pBt.XbDoTruncate = 0
+ if (int32(_p.XinTrans) > int32(0)) && (_db.XnVdbeRead > int32(1)) {
_downgradeAllSharedCacheTableLocks(tls, _p)
- *(*uint8)(unsafe.Pointer(&(_p.X2))) = uint8(i32(1))
+ _p.XinTrans = uint8(1)
goto _4
}
- if int32(_p.X2) == i32(0) {
+ if int32(_p.XinTrans) == int32(0) {
goto _5
}
_clearAllSharedCacheTableLocks(tls, _p)
- *(*int32)(unsafe.Pointer(&(_pBt.X17))) -= 1
- if i32(0) == (_pBt.X17) {
- *(*uint8)(unsafe.Pointer(&(_pBt.X8))) = uint8(i32(0))
+ _pBt.XnTransaction -= 1
+ if int32(0) == _pBt.XnTransaction {
+ _pBt.XinTransaction = 0
}
_5:
- *(*uint8)(unsafe.Pointer(&(_p.X2))) = uint8(i32(0))
+ _p.XinTrans = 0
_unlockBtreeIfUnused(tls, _pBt)
_4:
func() {
- if int32((*XBtShared)(_p.X1).X8) == i32(0) && ((*XBtShared)(_p.X1).X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62891), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeEndTransactionØ00__func__Ø000))), unsafe.Pointer(str(9977)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) == int32(0) && ((*XBtShared)(_p.XpBt).XnTransaction) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62891), unsafe.Pointer(&_btreeEndTransactionØ00__func__Ø000), unsafe.Pointer(str(9932)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XBtShared)(_p.X1).X8) < int32(_p.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62891), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeEndTransactionØ00__func__Ø000))), unsafe.Pointer(str(10038)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) < int32(_p.XinTrans) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62891), unsafe.Pointer(&_btreeEndTransactionØ00__func__Ø000), unsafe.Pointer(str(9993)))
crt.X__builtin_abort(tls)
}
}()
@@ -19997,36 +20465,38 @@ _4:
var _btreeEndTransactionØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_btreeEndTransactionØ00__func__Ø000[0], str(20659), 20)
+ crt.Xstrncpy(nil, &_btreeEndTransactionØ00__func__Ø000[0], str(20614), 20)
}
-// This function changes all write-locks held by Btree p into read-locks.
+// C comment
+// /*
+// ** This function changes all write-locks held by Btree p into read-locks.
+// */
func _downgradeAllSharedCacheTableLocks(tls *crt.TLS, _p *XBtree) {
var _pBt *XBtShared
var _1_pLock *XBtLock
- _pBt = (*XBtShared)(_p.X1)
- if (*XBtree)(_pBt.X26) != _p {
+ _pBt = (*XBtShared)(_p.XpBt)
+ if (*XBtree)(_pBt.XpWriter) != _p {
goto _0
}
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X26))))) = nil
+ *(**XBtree)(unsafe.Pointer(&_pBt.XpWriter)) = nil
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) & i32(-97))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) & int32(-97))
}
- _1_pLock = (*XBtLock)(_pBt.X25)
+ _1_pLock = (*XBtLock)(_pBt.XpLock)
_1:
if _1_pLock == nil {
goto _4
}
func() {
- if int32(_1_pLock.X2) != i32(1) && (*XBtree)(_1_pLock.X0) != _p {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59468), unsafe.Pointer((*int8)(unsafe.Pointer(&_downgradeAllSharedCacheTableLocksØ00__func__Ø000))), unsafe.Pointer(str(20679)))
+ if int32(_1_pLock.XeLock) != int32(1) && (*XBtree)(_1_pLock.XpBtree) != _p {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59468), unsafe.Pointer(&_downgradeAllSharedCacheTableLocksØ00__func__Ø000), unsafe.Pointer(str(20634)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_1_pLock.X2))) = uint8(i32(1))
- _1_pLock = (*XBtLock)(_1_pLock.X3)
+ _1_pLock.XeLock = uint8(1)
+ _1_pLock = (*XBtLock)(_1_pLock.XpNext)
goto _1
_4:
_0:
@@ -20035,36 +20505,39 @@ _0:
var _downgradeAllSharedCacheTableLocksØ00__func__Ø000 [34]int8
func init() {
- crt.Xstrncpy(nil, &_downgradeAllSharedCacheTableLocksØ00__func__Ø000[0], str(20723), 34)
+ crt.Xstrncpy(nil, &_downgradeAllSharedCacheTableLocksØ00__func__Ø000[0], str(20678), 34)
}
-// Release all the table locks (locks obtained via calls to
-// the setSharedCacheTableLock() procedure) held by Btree object p.
-//
-// This function assumes that Btree p has an open read or write
-// transaction. If it does not, then the BTS_PENDING flag
-// may be incorrectly cleared.
+// C comment
+// /*
+// ** Release all the table locks (locks obtained via calls to
+// ** the setSharedCacheTableLock() procedure) held by Btree object p.
+// **
+// ** This function assumes that Btree p has an open read or write
+// ** transaction. If it does not, then the BTS_PENDING flag
+// ** may be incorrectly cleared.
+// */
func _clearAllSharedCacheTableLocks(tls *crt.TLS, _p *XBtree) {
var _pBt *XBtShared
var _1_pLock *XBtLock
var _ppIter **XBtLock
- _pBt = (*XBtShared)(_p.X1)
- _ppIter = (**XBtLock)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X25)))))
+ _pBt = (*XBtShared)(_p.XpBt)
+ _ppIter = (**XBtLock)(unsafe.Pointer(&_pBt.XpLock))
func() {
if _sqlite3BtreeHoldsMutex(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59421), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000))), unsafe.Pointer(str(17487)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59421), unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000), unsafe.Pointer(str(17442)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X3) == 0 && nil != (*_ppIter) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59422), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000))), unsafe.Pointer(str(20757)))
+ if _p.Xsharable == 0 && nil != (*_ppIter) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59422), unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000), unsafe.Pointer(str(20712)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X2) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59423), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000))), unsafe.Pointer(str(20783)))
+ if int32(_p.XinTrans) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59423), unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000), unsafe.Pointer(str(20738)))
crt.X__builtin_abort(tls)
}
}()
@@ -20074,56 +20547,54 @@ _7:
}
_1_pLock = *_ppIter
func() {
- if (int32(_pBt.X10)&i32(32)) != i32(0) && (*XBtree)(_pBt.X26) != (*XBtree)(_1_pLock.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59427), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000))), unsafe.Pointer(str(20796)))
+ if (int32(_pBt.XbtsFlags)&int32(32)) != int32(0) && (*XBtree)(_pBt.XpWriter) != (*XBtree)(_1_pLock.XpBtree) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59427), unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000), unsafe.Pointer(str(20751)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XBtree)(_1_pLock.X0).X2) < int32(_1_pLock.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59428), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000))), unsafe.Pointer(str(20862)))
+ if int32((*XBtree)(_1_pLock.XpBtree).XinTrans) < int32(_1_pLock.XeLock) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59428), unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000), unsafe.Pointer(str(20817)))
crt.X__builtin_abort(tls)
}
}()
- if (*XBtree)(_1_pLock.X0) != _p {
+ if (*XBtree)(_1_pLock.XpBtree) != _p {
goto _14
}
- *_ppIter = (*XBtLock)(_1_pLock.X3)
+ *_ppIter = (*XBtLock)(_1_pLock.XpNext)
func() {
- if (_1_pLock.X1) == uint32(i32(1)) && _1_pLock != (*XBtLock)(unsafe.Pointer(&(_p.X11))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59431), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000))), unsafe.Pointer(str(20899)))
+ if _1_pLock.XiTable == uint32(1) && _1_pLock != &_p.Xlock {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59431), unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000), unsafe.Pointer(str(20854)))
crt.X__builtin_abort(tls)
}
}()
- if (_1_pLock.X1) != uint32(i32(1)) {
- Xsqlite3_free(tls, (unsafe.Pointer)(_1_pLock))
+ if _1_pLock.XiTable != uint32(1) {
+ Xsqlite3_free(tls, unsafe.Pointer(_1_pLock))
}
goto _19
_14:
- _ppIter = (**XBtLock)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pLock.X3)))))
+ _ppIter = (**XBtLock)(unsafe.Pointer(&_1_pLock.XpNext))
_19:
goto _7
_8:
func() {
- if (int32(_pBt.X10)&i32(64)) != i32(0) && (*XBtree)(_pBt.X26) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59440), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000))), unsafe.Pointer(str(20935)))
+ if (int32(_pBt.XbtsFlags)&int32(64)) != int32(0) && _pBt.XpWriter == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59440), unsafe.Pointer(&_clearAllSharedCacheTableLocksØ00__func__Ø000), unsafe.Pointer(str(20890)))
crt.X__builtin_abort(tls)
}
}()
- if (*XBtree)(_pBt.X26) == _p {
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X26))))) = nil
+ if (*XBtree)(_pBt.XpWriter) == _p {
+ *(**XBtree)(unsafe.Pointer(&_pBt.XpWriter)) = nil
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) & i32(-97))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) & int32(-97))
}
goto _25
}
- if (_pBt.X17) == i32(2) {
+ if _pBt.XnTransaction == int32(2) {
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) & i32(-65))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) & int32(-65))
}
}
_25:
@@ -20132,44 +20603,47 @@ _25:
var _clearAllSharedCacheTableLocksØ00__func__Ø000 [30]int8
func init() {
- crt.Xstrncpy(nil, &_clearAllSharedCacheTableLocksØ00__func__Ø000[0], str(20984), 30)
+ crt.Xstrncpy(nil, &_clearAllSharedCacheTableLocksØ00__func__Ø000[0], str(20939), 30)
}
-// If there are no outstanding cursors and we are not in the middle
-// of a transaction but there is a read lock on the database, then
-// this routine unrefs the first page of the database file which
-// has the effect of releasing the read lock.
-//
-// If there is a transaction in progress, this routine is a no-op.
+// C comment
+// /*
+// ** If there are no outstanding cursors and we are not in the middle
+// ** of a transaction but there is a read lock on the database, then
+// ** this routine unrefs the first page of the database file which
+// ** has the effect of releasing the read lock.
+// **
+// ** If there is a transaction in progress, this routine is a no-op.
+// */
func _unlockBtreeIfUnused(tls *crt.TLS, _pBt *XBtShared) {
var _1_pPage1 *XMemPage
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62138), unsafe.Pointer((*int8)(unsafe.Pointer(&_unlockBtreeIfUnusedØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62138), unsafe.Pointer(&_unlockBtreeIfUnusedØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _countValidCursors(tls, _pBt, i32(0)) != i32(0) && int32(_pBt.X8) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62139), unsafe.Pointer((*int8)(unsafe.Pointer(&_unlockBtreeIfUnusedØ00__func__Ø000))), unsafe.Pointer(str(21014)))
+ if _countValidCursors(tls, _pBt, int32(0)) != int32(0) && int32(_pBt.XinTransaction) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62139), unsafe.Pointer(&_unlockBtreeIfUnusedØ00__func__Ø000), unsafe.Pointer(str(20969)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pBt.X8) == i32(0)) && ((*XMemPage)(_pBt.X3) != nil) {
- _1_pPage1 = (*XMemPage)(_pBt.X3)
+ if (int32(_pBt.XinTransaction) == int32(0)) && ((*XMemPage)(_pBt.XpPage1) != nil) {
+ _1_pPage1 = (*XMemPage)(_pBt.XpPage1)
func() {
- if (_1_pPage1.X19) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62142), unsafe.Pointer((*int8)(unsafe.Pointer(&_unlockBtreeIfUnusedØ00__func__Ø000))), unsafe.Pointer(str(21075)))
+ if _1_pPage1.XaData == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62142), unsafe.Pointer(&_unlockBtreeIfUnusedØ00__func__Ø000), unsafe.Pointer(str(21030)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerRefcount(tls, (*XPager)(_pBt.X0)) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62143), unsafe.Pointer((*int8)(unsafe.Pointer(&_unlockBtreeIfUnusedØ00__func__Ø000))), unsafe.Pointer(str(21089)))
+ if _sqlite3PagerRefcount(tls, (*XPager)(_pBt.XpPager)) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62143), unsafe.Pointer(&_unlockBtreeIfUnusedØ00__func__Ø000), unsafe.Pointer(str(21044)))
crt.X__builtin_abort(tls)
}
}()
- *(**XMemPage)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X3))))) = nil
+ *(**XMemPage)(unsafe.Pointer(&_pBt.XpPage1)) = nil
_releasePageNotNull(tls, _1_pPage1)
}
}
@@ -20177,174 +20651,186 @@ func _unlockBtreeIfUnused(tls *crt.TLS, _pBt *XBtShared) {
var _unlockBtreeIfUnusedØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_unlockBtreeIfUnusedØ00__func__Ø000[0], str(21126), 20)
+ crt.Xstrncpy(nil, &_unlockBtreeIfUnusedØ00__func__Ø000[0], str(21081), 20)
}
-// Return the sum of the reference counts for all pages held by pPager.
+// C comment
+// /*
+// ** Return the sum of the reference counts for all pages held by pPager.
+// */
func _sqlite3PagerRefcount(tls *crt.TLS, _pPager *XPager) (r0 int32) {
- return _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.X59))
+ return _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.XpPCache))
}
-// Erase all schema information from all attached databases (including
-// "main" and "temp") for a single database connection.
+// C comment
+// /*
+// ** Erase all schema information from all attached databases (including
+// ** "main" and "temp") for a single database connection.
+// */
func _sqlite3ResetAllSchemasOfConnection(tls *crt.TLS, _db *Xsqlite3) {
var _i int32
var _1_pDb *XDb
_sqlite3BtreeEnterAll(tls, _db)
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _3
}
- _1_pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i)))
- if (*XSchema)(_1_pDb.X4) != nil {
- _sqlite3SchemaClear(tls, _1_pDb.X4)
+ _1_pDb = elem27((*XDb)(_db.XaDb), uintptr(_i))
+ if _1_pDb.XpSchema != nil {
+ _sqlite3SchemaClear(tls, _1_pDb.XpSchema)
}
_i += 1
goto _0
_3:
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-3)
- sink1(*p)
- }
+ _db.Xflags &= int32(-3)
_sqlite3VtabUnlockList(tls, _db)
_sqlite3BtreeLeaveAll(tls, _db)
_sqlite3CollapseDatabaseArray(tls, _db)
}
-// Free all resources held by the schema structure. The void* argument points
-// at a Schema struct. This function does not call sqlite3DbFree(db, ) on the
-// pointer itself, it just cleans up subsidiary resources (i.e. the contents
-// of the schema hash tables).
-//
-// The Schema.cache_size variable is not cleared.
+// C comment
+// /*
+// ** Free all resources held by the schema structure. The void* argument points
+// ** at a Schema struct. This function does not call sqlite3DbFree(db, ) on the
+// ** pointer itself, it just cleans up subsidiary resources (i.e. the contents
+// ** of the schema hash tables).
+// **
+// ** The Schema.cache_size variable is not cleared.
+// */
func _sqlite3SchemaClear(tls *crt.TLS, _p unsafe.Pointer) {
var _temp1, _temp2 XHash
var _pSchema *XSchema
var _pElem *XHashElem
var _2_pTab *XTable
_pSchema = (*XSchema)(_p)
- _temp1 = _pSchema.X2
- _temp2 = _pSchema.X4
- _sqlite3HashInit(tls, (*XHash)(unsafe.Pointer(&(_pSchema.X4))))
- _sqlite3HashClear(tls, (*XHash)(unsafe.Pointer(&(_pSchema.X3))))
- _pElem = (*XHashElem)(_temp2.X2)
+ _temp1 = _pSchema.XtblHash
+ _temp2 = _pSchema.XtrigHash
+ _sqlite3HashInit(tls, &_pSchema.XtrigHash)
+ _sqlite3HashClear(tls, &_pSchema.XidxHash)
+ _pElem = (*XHashElem)(_temp2.Xfirst)
_0:
if _pElem == nil {
goto _3
}
- _sqlite3DeleteTrigger(tls, nil, (*XTrigger)(_pElem.X2))
- _pElem = (*XHashElem)(_pElem.X0)
+ _sqlite3DeleteTrigger(tls, nil, (*XTrigger)(_pElem.Xdata))
+ _pElem = (*XHashElem)(_pElem.Xnext)
goto _0
_3:
_sqlite3HashClear(tls, &_temp2)
- _sqlite3HashInit(tls, (*XHash)(unsafe.Pointer(&(_pSchema.X2))))
- _pElem = (*XHashElem)(_temp1.X2)
+ _sqlite3HashInit(tls, &_pSchema.XtblHash)
+ _pElem = (*XHashElem)(_temp1.Xfirst)
_4:
if _pElem == nil {
goto _7
}
- _2_pTab = (*XTable)(_pElem.X2)
+ _2_pTab = (*XTable)(_pElem.Xdata)
_sqlite3DeleteTable(tls, nil, _2_pTab)
- _pElem = (*XHashElem)(_pElem.X0)
+ _pElem = (*XHashElem)(_pElem.Xnext)
goto _4
_7:
_sqlite3HashClear(tls, &_temp1)
- _sqlite3HashClear(tls, (*XHash)(unsafe.Pointer(&(_pSchema.X5))))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSchema.X6))))) = nil
- if (int32(_pSchema.X9) & i32(1)) != 0 {
- *(*int32)(unsafe.Pointer(&(_pSchema.X1))) += 1
+ _sqlite3HashClear(tls, &_pSchema.XfkeyHash)
+ *(**XTable)(unsafe.Pointer(&_pSchema.XpSeqTab)) = nil
+ if (int32(_pSchema.XschemaFlags) & int32(1)) != 0 {
+ _pSchema.XiGeneration += 1
{
- p := (*uint16)(unsafe.Pointer(&(_pSchema.X9)))
- *p = uint16(int32(*p) & i32(-2))
- sink14(*p)
+ p := &_pSchema.XschemaFlags
+ *p = uint16(int32(*p) & int32(-2))
}
}
- _ = _temp1
- _ = _temp2
}
-// Turn bulk memory into a hash table object by initializing the
-// fields of the Hash structure.
-//
-// "pNew" is a pointer to the hash table that is to be initialized.
+// C comment
+// /* Turn bulk memory into a hash table object by initializing the
+// ** fields of the Hash structure.
+// **
+// ** "pNew" is a pointer to the hash table that is to be initialized.
+// */
func _sqlite3HashInit(tls *crt.TLS, _pNew *XHash) {
func() {
if _pNew == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29250), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3HashInitØ00__func__Ø000))), unsafe.Pointer(str(21146)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29250), unsafe.Pointer(&_sqlite3HashInitØ00__func__Ø000), unsafe.Pointer(str(21101)))
crt.X__builtin_abort(tls)
}
}()
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X2))))) = nil
- *(*uint32)(unsafe.Pointer(&(_pNew.X1))) = uint32(i32(0))
- *(*uint32)(unsafe.Pointer(&(_pNew.X0))) = uint32(i32(0))
- *(**T_ht)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X3))))) = nil
+ *(**XHashElem)(unsafe.Pointer(&_pNew.Xfirst)) = nil
+ _pNew.Xcount = 0
+ _pNew.Xhtsize = 0
+ *(**T_ht)(unsafe.Pointer(&_pNew.Xht)) = nil
}
var _sqlite3HashInitØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3HashInitØ00__func__Ø000[0], str(21154), 16)
+ crt.Xstrncpy(nil, &_sqlite3HashInitØ00__func__Ø000[0], str(21109), 16)
}
-// Remove all entries from a hash table. Reclaim all memory.
-// Call this routine to delete a hash table or to reset a hash table
-// to the empty state.
+// C comment
+// /* Remove all entries from a hash table. Reclaim all memory.
+// ** Call this routine to delete a hash table or to reset a hash table
+// ** to the empty state.
+// */
func _sqlite3HashClear(tls *crt.TLS, _pH *XHash) {
var _elem, _1_next_elem *XHashElem
func() {
if _pH == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29264), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3HashClearØ00__func__Ø000))), unsafe.Pointer(str(21170)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29264), unsafe.Pointer(&_sqlite3HashClearØ00__func__Ø000), unsafe.Pointer(str(21125)))
crt.X__builtin_abort(tls)
}
}()
- _elem = (*XHashElem)(_pH.X2)
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pH.X2))))) = nil
- Xsqlite3_free(tls, _pH.X3)
- *(**T_ht)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pH.X3))))) = nil
- *(*uint32)(unsafe.Pointer(&(_pH.X0))) = uint32(i32(0))
+ _elem = (*XHashElem)(_pH.Xfirst)
+ *(**XHashElem)(unsafe.Pointer(&_pH.Xfirst)) = nil
+ Xsqlite3_free(tls, _pH.Xht)
+ *(**T_ht)(unsafe.Pointer(&_pH.Xht)) = nil
+ _pH.Xhtsize = 0
_2:
if _elem != nil {
- _1_next_elem = (*XHashElem)(_elem.X0)
- Xsqlite3_free(tls, (unsafe.Pointer)(_elem))
+ _1_next_elem = (*XHashElem)(_elem.Xnext)
+ Xsqlite3_free(tls, unsafe.Pointer(_elem))
_elem = _1_next_elem
goto _2
}
- *(*uint32)(unsafe.Pointer(&(_pH.X1))) = uint32(i32(0))
+ _pH.Xcount = 0
}
var _sqlite3HashClearØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3HashClearØ00__func__Ø000[0], str(21176), 17)
+ crt.Xstrncpy(nil, &_sqlite3HashClearØ00__func__Ø000[0], str(21131), 17)
}
-// Recursively delete a Trigger structure
+// C comment
+// /*
+// ** Recursively delete a Trigger structure
+// */
func _sqlite3DeleteTrigger(tls *crt.TLS, _db *Xsqlite3, _pTrigger *XTrigger) {
if _pTrigger == nil {
return
}
- _sqlite3DeleteTriggerStep(tls, _db, (*XTriggerStep)(_pTrigger.X8))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pTrigger.X0))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pTrigger.X1))
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_pTrigger.X4))
- _sqlite3IdListDelete(tls, _db, (*XIdList)(_pTrigger.X5))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pTrigger))
+ _sqlite3DeleteTriggerStep(tls, _db, (*XTriggerStep)(_pTrigger.Xstep_list))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pTrigger.XzName))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pTrigger.Xtable))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_pTrigger.XpWhen))
+ _sqlite3IdListDelete(tls, _db, (*XIdList)(_pTrigger.XpColumns))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pTrigger))
}
-// Delete a linked list of TriggerStep structures.
+// C comment
+// /*
+// ** Delete a linked list of TriggerStep structures.
+// */
func _sqlite3DeleteTriggerStep(tls *crt.TLS, _db *Xsqlite3, _pTriggerStep *XTriggerStep) {
var _1_pTmp *XTriggerStep
_0:
if _pTriggerStep != nil {
_1_pTmp = _pTriggerStep
- _pTriggerStep = (*XTriggerStep)(_pTriggerStep.X8)
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_1_pTmp.X5))
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(_1_pTmp.X6))
- _sqlite3SelectDelete(tls, _db, (*XSelect)(_1_pTmp.X3))
- _sqlite3IdListDelete(tls, _db, (*XIdList)(_1_pTmp.X7))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_pTmp))
+ _pTriggerStep = (*XTriggerStep)(_pTriggerStep.XpNext)
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_1_pTmp.XpWhere))
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(_1_pTmp.XpExprList))
+ _sqlite3SelectDelete(tls, _db, (*XSelect)(_1_pTmp.XpSelect))
+ _sqlite3IdListDelete(tls, _db, (*XIdList)(_1_pTmp.XpIdList))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_pTmp))
goto _0
}
}
@@ -20355,106 +20841,115 @@ func _sqlite3ExprDelete(tls *crt.TLS, _db *Xsqlite3, _p *XExpr) {
}
}
-// Recursively delete an expression tree.
+// C comment
+// /*
+// ** Recursively delete an expression tree.
+// */
func _sqlite3ExprDeleteNN(tls *crt.TLS, _db *Xsqlite3, _p *XExpr) {
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91912), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91912), unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X2)&uint32(i32(1024))) != uint32(i32(0)) && (*(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91914), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000))), unsafe.Pointer(str(21193)))
+ if (_p.Xflags&uint32(1024)) != (0) && (*(*int32)(unsafe.Pointer(&_p.Xu))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91914), unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000), unsafe.Pointer(str(21148)))
crt.X__builtin_abort(tls)
}
}()
- if (((_p.X2) & uint32(i32(8388608))) != uint32(i32(0))) && (((_p.X2) & uint32(i32(16384))) == uint32(i32(0))) {
+ if ((_p.Xflags & uint32(8388608)) != (0)) && ((_p.Xflags & uint32(16384)) == (0)) {
func() {
- if (*XExpr)(_p.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91917), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000))), unsafe.Pointer(str(21244)))
+ if (*XExpr)(_p.XpLeft) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91917), unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000), unsafe.Pointer(str(21199)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)(_p.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91918), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000))), unsafe.Pointer(str(21256)))
+ if (*XExpr)(_p.XpRight) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91918), unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000), unsafe.Pointer(str(21211)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91919), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000))), unsafe.Pointer(str(21269)))
+ if (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91919), unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000), unsafe.Pointer(str(21224)))
crt.X__builtin_abort(tls)
}
}()
}
- if ((_p.X2) & uint32(i32(8404992))) != uint32(i32(0)) {
+ if (_p.Xflags & uint32(8404992)) != (0) {
goto _13
}
func() {
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))) != nil && (*XExpr)(_p.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91924), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000))), unsafe.Pointer(str(21285)))
+ if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))) != nil && (*XExpr)(_p.XpRight) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91924), unsafe.Pointer(&_sqlite3ExprDeleteNNØ00__func__Ø000), unsafe.Pointer(str(21240)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XExpr)(_p.X4) != nil) && (int32(_p.X0) != i32(159)) {
- _sqlite3ExprDeleteNN(tls, _db, (*XExpr)(_p.X4))
+ if (_p.XpLeft != nil) && (int32(_p.Xop) != int32(159)) {
+ _sqlite3ExprDeleteNN(tls, _db, (*XExpr)(_p.XpLeft))
}
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X5))
- if ((_p.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- _sqlite3SelectDelete(tls, _db, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpRight))
+ if (_p.Xflags & uint32(2048)) != (0) {
+ _sqlite3SelectDelete(tls, _db, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))))
goto _20
}
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))))
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))))
_20:
_13:
- if ((_p.X2) & uint32(i32(65536))) != uint32(i32(0)) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))))
+ if (_p.Xflags & uint32(65536)) != (0) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(*(**int8)(unsafe.Pointer(&_p.Xu))))
}
- if ((_p.X2) & uint32(i32(32768))) == uint32(i32(0)) {
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_p))
+ if (_p.Xflags & uint32(32768)) == (0) {
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_p))
}
}
var _sqlite3ExprDeleteNNØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprDeleteNNØ00__func__Ø000[0], str(21315), 20)
+ crt.Xstrncpy(nil, &_sqlite3ExprDeleteNNØ00__func__Ø000[0], str(21270), 20)
}
-// Delete the given Select structure and all of its substructures.
+// C comment
+// /*
+// ** Delete the given Select structure and all of its substructures.
+// */
func _sqlite3SelectDelete(tls *crt.TLS, _db *Xsqlite3, _p *XSelect) {
if _p != nil {
- _clearSelect(tls, _db, _p, i32(1))
+ _clearSelect(tls, _db, _p, int32(1))
}
}
-// Delete all the content of a Select structure. Deallocate the structure
-// itself only if bFree is true.
+// C comment
+// /*
+// ** Delete all the content of a Select structure. Deallocate the structure
+// ** itself only if bFree is true.
+// */
func _clearSelect(tls *crt.TLS, _db *Xsqlite3, _p *XSelect, _bFree int32) {
var _1_pPrior *XSelect
_0:
if _p == nil {
goto _1
}
- _1_pPrior = (*XSelect)(_p.X13)
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.X0))
- _sqlite3SrcListDelete(tls, _db, (*XSrcList)(_p.X8))
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X9))
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.X10))
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X11))
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.X12))
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X15))
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X16))
- if (*XWith)(_p.X17) != nil {
- _sqlite3WithDelete(tls, _db, (*XWith)(_p.X17))
+ _1_pPrior = (*XSelect)(_p.XpPrior)
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.XpEList))
+ _sqlite3SrcListDelete(tls, _db, (*XSrcList)(_p.XpSrc))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpWhere))
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.XpGroupBy))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpHaving))
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.XpOrderBy))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpLimit))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpOffset))
+ if _p.XpWith != nil {
+ _sqlite3WithDelete(tls, _db, (*XWith)(_p.XpWith))
}
if _bFree != 0 {
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_p))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_p))
}
_p = _1_pPrior
- _bFree = i32(1)
+ _bFree = int32(1)
goto _0
_1:
}
@@ -20465,127 +20960,133 @@ func _sqlite3ExprListDelete(tls *crt.TLS, _db *Xsqlite3, _pList *XExprList) {
}
}
-// Delete an entire expression list.
+// C comment
+// /*
+// ** Delete an entire expression list.
+// */
func _exprListDeleteNN(tls *crt.TLS, _db *Xsqlite3, _pList *XExprList) {
var _i int32
var _pItem *TExprList_item
- _i = _pList.X0
- _pItem = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))
+ _i = _pList.XnExpr
+ _pItem = (*TExprList_item)(unsafe.Pointer(&_pList.Xa))
func() {
- if (_pList.X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92555), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprListDeleteNNØ00__func__Ø000))), unsafe.Pointer(str(21335)))
+ if _pList.XnExpr <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92555), unsafe.Pointer(&_exprListDeleteNNØ00__func__Ø000), unsafe.Pointer(str(21290)))
crt.X__builtin_abort(tls)
}
}()
_2:
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_pItem.X0))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pItem.X1))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pItem.X2))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_pItem.XpExpr))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pItem.XzName))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pItem.XzSpan))
*(*uintptr)(unsafe.Pointer(&_pItem)) += uintptr(20)
- if preInc1(&_i, -1) > i32(0) {
+ if preInc2(&_i, -1) > int32(0) {
goto _2
}
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_pList))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_pList))
_ = _i
}
var _exprListDeleteNNØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_exprListDeleteNNØ00__func__Ø000[0], str(21350), 17)
+ crt.Xstrncpy(nil, &_exprListDeleteNNØ00__func__Ø000[0], str(21305), 17)
}
-// Delete an entire SrcList including all its substructure.
+// C comment
+// /*
+// ** Delete an entire SrcList including all its substructure.
+// */
func _sqlite3SrcListDelete(tls *crt.TLS, _db *Xsqlite3, _pList *XSrcList) {
var _i int32
var _pItem *TSrcList_item
if _pList == nil {
return
}
- *func() *int32 {
- _pItem = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pList.X2)))))
- return &_i
- }() = i32(0)
+ *func() *int32 { _pItem = (*TSrcList_item)(unsafe.Pointer(&_pList.Xa)); return &_i }() = int32(0)
_1:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnSrc {
goto _4
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pItem.X1))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pItem.X2))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pItem.X3))
- if ((uint32(((*t28)(unsafe.Pointer(&(_pItem.X9))).X1)>>uint(i32(1))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_pItem.X15)))))))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pItem.XzDatabase))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pItem.XzName))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pItem.XzAlias))
+ if ((uint32((_pItem.Xfg.XnotIndexed)>>1) << 31) >> 31) != 0 {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pItem.Xu1))))
}
- if ((uint32(((*t28)(unsafe.Pointer(&(_pItem.X9))).X1)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_pItem.X15)))))))
+ if ((uint32((_pItem.Xfg.XnotIndexed)>>2) << 31) >> 31) != 0 {
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pItem.Xu1))))
}
- _sqlite3DeleteTable(tls, _db, (*XTable)(_pItem.X4))
- _sqlite3SelectDelete(tls, _db, (*XSelect)(_pItem.X5))
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_pItem.X12))
- _sqlite3IdListDelete(tls, _db, (*XIdList)(_pItem.X13))
+ _sqlite3DeleteTable(tls, _db, (*XTable)(_pItem.XpTab))
+ _sqlite3SelectDelete(tls, _db, (*XSelect)(_pItem.XpSelect))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_pItem.XpOn))
+ _sqlite3IdListDelete(tls, _db, (*XIdList)(_pItem.XpUsing))
*(*uintptr)(unsafe.Pointer(func() **TSrcList_item { _i += 1; return &_pItem }())) += uintptr(68)
goto _1
_4:
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_pList))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_pList))
}
func _sqlite3DeleteTable(tls *crt.TLS, _db *Xsqlite3, _pTable *XTable) {
if _pTable == nil {
return
}
- if ((_db == nil) || ((_db.X79) == nil)) && (preInc5((*uint32)(unsafe.Pointer(&(_pTable.X8))), uint32(4294967295)) > uint32(i32(0))) {
+ if ((_db == nil) || (_db.XpnBytesFreed == nil)) && (preInc23(&_pTable.XnTabRef, uint32(4294967295)) > (0)) {
return
}
_deleteTable(tls, _db, _pTable)
}
-// Remove the memory data structures associated with the given
-// Table. No changes are made to disk by this routine.
-//
-// This routine just deletes the data structure. It does not unlink
-// the table data structure from the hash table. But it does destroy
-// memory structures of the indices and foreign keys associated with
-// the table.
-//
-// The db parameter is optional. It is needed if the Table object
-// contains lookaside memory. (Table objects in the schema do not use
-// lookaside memory, but some ephemeral Table objects do.) Or the
-// db parameter can be used with db->pnBytesFreed to measure the memory
-// used by the Table object.
+// C comment
+// /*
+// ** Remove the memory data structures associated with the given
+// ** Table. No changes are made to disk by this routine.
+// **
+// ** This routine just deletes the data structure. It does not unlink
+// ** the table data structure from the hash table. But it does destroy
+// ** memory structures of the indices and foreign keys associated with
+// ** the table.
+// **
+// ** The db parameter is optional. It is needed if the Table object
+// ** contains lookaside memory. (Table objects in the schema do not use
+// ** lookaside memory, but some ephemeral Table objects do.) Or the
+// ** db parameter can be used with db->pnBytesFreed to measure the memory
+// ** used by the Table object.
+// */
func _deleteTable(tls *crt.TLS, _db *Xsqlite3, _pTable *XTable) {
var _nLookaside int32
var _2_zName *int8
var _pIndex, _pNext, _2_pOld *XIndex
_nLookaside = func() int32 {
- if (_db != nil) && (((_pTable.X9) & uint32(i32(2))) == uint32(i32(0))) {
- return ((*t7)(unsafe.Pointer(&(_db.X58))).X3)
+ if (_db != nil) && ((_pTable.XtabFlags & uint32(2)) == (0)) {
+ return (_db.Xlookaside.XnOut)
}
- return i32(0)
+ return int32(0)
}()
- _pIndex = (*XIndex)(_pTable.X2)
+ _pIndex = (*XIndex)(_pTable.XpIndex)
_3:
if _pIndex == nil {
goto _6
}
- _pNext = (*XIndex)(_pIndex.X5)
+ _pNext = (*XIndex)(_pIndex.XpNext)
func() {
- if (*XSchema)(_pIndex.X6) != (*XSchema)(_pTable.X20) && ((_pTable.X16) == 0 || int32((uint32(_pIndex.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100309), unsafe.Pointer((*int8)(unsafe.Pointer(&_deleteTableØ00__func__Ø000))), unsafe.Pointer(str(21367)))
+ if (*XSchema)(_pIndex.XpSchema) != (*XSchema)(_pTable.XpSchema) && (_pTable.XnModuleArg == 0 || int32((uint32(_pIndex.XidxType)<<30)>>30) == int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100309), unsafe.Pointer(&_deleteTableØ00__func__Ø000), unsafe.Pointer(str(21322)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db == nil) || ((_db.X79) == nil)) && ((_pTable.X16) == 0) {
- _2_zName = _pIndex.X0
- _2_pOld = (*XIndex)(_sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&((*XSchema)(_pIndex.X6).X3))), _2_zName, nil))
+ if ((_db == nil) || (_db.XpnBytesFreed == nil)) && (_pTable.XnModuleArg == 0) {
+ _2_zName = _pIndex.XzName
+ _2_pOld = (*XIndex)(_sqlite3HashInsert(tls, &((*XSchema)(_pIndex.XpSchema).XidxHash), _2_zName, nil))
func() {
- if _db != nil && _sqlite3SchemaMutexHeld(tls, _db, i32(0), (*XSchema)(_pIndex.X6)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100316), unsafe.Pointer((*int8)(unsafe.Pointer(&_deleteTableØ00__func__Ø000))), unsafe.Pointer(str(21465)))
+ if _db != nil && _sqlite3SchemaMutexHeld(tls, _db, int32(0), (*XSchema)(_pIndex.XpSchema)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100316), unsafe.Pointer(&_deleteTableØ00__func__Ø000), unsafe.Pointer(str(21420)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _2_pOld != _pIndex && _2_pOld != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100317), unsafe.Pointer((*int8)(unsafe.Pointer(&_deleteTableØ00__func__Ø000))), unsafe.Pointer(str(21521)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100317), unsafe.Pointer(&_deleteTableØ00__func__Ø000), unsafe.Pointer(str(21476)))
crt.X__builtin_abort(tls)
}
}()
@@ -20596,15 +21097,15 @@ _3:
_6:
_sqlite3FkDelete(tls, _db, _pTable)
_sqlite3DeleteColumnNames(tls, _db, _pTable)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pTable.X0))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pTable.X5))
- _sqlite3SelectDelete(tls, _db, (*XSelect)(_pTable.X3))
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(_pTable.X6))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pTable.XzName))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pTable.XzColAff))
+ _sqlite3SelectDelete(tls, _db, (*XSelect)(_pTable.XpSelect))
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(_pTable.XpCheck))
_sqlite3VtabClear(tls, _db, _pTable)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pTable))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pTable))
func() {
- if _nLookaside != i32(0) && _nLookaside != ((*t7)(unsafe.Pointer(&(_db.X58))).X3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100338), unsafe.Pointer((*int8)(unsafe.Pointer(&_deleteTableØ00__func__Ø000))), unsafe.Pointer(str(21545)))
+ if _nLookaside != int32(0) && _nLookaside != (_db.Xlookaside.XnOut) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100338), unsafe.Pointer(&_deleteTableØ00__func__Ø000), unsafe.Pointer(str(21500)))
crt.X__builtin_abort(tls)
}
}()
@@ -20613,35 +21114,37 @@ _6:
var _deleteTableØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_deleteTableØ00__func__Ø000[0], str(21593), 12)
-}
-
-// Insert an element into the hash table pH. The key is pKey
-// and the data is "data".
-//
-// If no element exists with a matching key, then a new
-// element is created and NULL is returned.
-//
-// If another element already exists with the same key, then the
-// new data replaces the old data and the old data is returned.
-// The key is not copied in this instance. If a malloc fails, then
-// the new data is returned and the hash table is unchanged.
-//
-// If the "data" parameter to this function is NULL, then the
-// element corresponding to "key" is removed from the hash table.
+ crt.Xstrncpy(nil, &_deleteTableØ00__func__Ø000[0], str(21548), 12)
+}
+
+// C comment
+// /* Insert an element into the hash table pH. The key is pKey
+// ** and the data is "data".
+// **
+// ** If no element exists with a matching key, then a new
+// ** element is created and NULL is returned.
+// **
+// ** If another element already exists with the same key, then the
+// ** new data replaces the old data and the old data is returned.
+// ** The key is not copied in this instance. If a malloc fails, then
+// ** the new data is returned and the hash table is unchanged.
+// **
+// ** If the "data" parameter to this function is NULL, then the
+// ** element corresponding to "key" is removed from the hash table.
+// */
func _sqlite3HashInsert(tls *crt.TLS, _pH *XHash, _pKey *int8, _data unsafe.Pointer) (r0 unsafe.Pointer) {
var _h uint32
var _1_old_data unsafe.Pointer
var _elem, _new_elem *XHashElem
func() {
if _pH == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29470), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3HashInsertØ00__func__Ø000))), unsafe.Pointer(str(21170)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29470), unsafe.Pointer(&_sqlite3HashInsertØ00__func__Ø000), unsafe.Pointer(str(21125)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pKey == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29471), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3HashInsertØ00__func__Ø000))), unsafe.Pointer(str(21605)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29471), unsafe.Pointer(&_sqlite3HashInsertØ00__func__Ø000), unsafe.Pointer(str(21560)))
crt.X__builtin_abort(tls)
}
}()
@@ -20649,13 +21152,13 @@ func _sqlite3HashInsert(tls *crt.TLS, _pH *XHash, _pKey *int8, _data unsafe.Poin
if _elem == nil {
goto _4
}
- _1_old_data = _elem.X2
+ _1_old_data = _elem.Xdata
if _data == nil {
_removeElementGivenHash(tls, _pH, _elem, _h)
goto _6
}
- *(*unsafe.Pointer)(unsafe.Pointer(&(_elem.X2))) = _data
- *(**int8)(unsafe.Pointer(&(_elem.X3))) = _pKey
+ _elem.Xdata = _data
+ _elem.XpKey = _pKey
_6:
return _1_old_data
@@ -20663,29 +21166,29 @@ _4:
if _data == nil {
return nil
}
- _new_elem = (*XHashElem)(_sqlite3Malloc(tls, uint64(u32(16))))
+ _new_elem = (*XHashElem)(_sqlite3Malloc(tls, uint64(16)))
if _new_elem == nil {
return _data
}
- *(**int8)(unsafe.Pointer(&(_new_elem.X3))) = _pKey
- *(*unsafe.Pointer)(unsafe.Pointer(&(_new_elem.X2))) = _data
- *(*uint32)(unsafe.Pointer(&(_pH.X1))) += 1
- if (_pH.X1) < uint32(i32(10)) || (_pH.X1) <= (uint32(i32(2))*(_pH.X0)) {
+ _new_elem.XpKey = _pKey
+ _new_elem.Xdata = _data
+ _pH.Xcount += 1
+ if _pH.Xcount < uint32(10) || _pH.Xcount <= (uint32(2)*_pH.Xhtsize) {
goto _10
}
- if _rehash(tls, _pH, (_pH.X1)*uint32(i32(2))) != 0 {
+ if _rehash(tls, _pH, _pH.Xcount*uint32(2)) != 0 {
func() {
- if (_pH.X0) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29491), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3HashInsertØ00__func__Ø000))), unsafe.Pointer(str(21613)))
+ if _pH.Xhtsize <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29491), unsafe.Pointer(&_sqlite3HashInsertØ00__func__Ø000), unsafe.Pointer(str(21568)))
crt.X__builtin_abort(tls)
}
}()
- _h = _strHash(tls, _pKey) % (_pH.X0)
+ _h = _strHash(tls, _pKey) % _pH.Xhtsize
}
_10:
_insertElement(tls, _pH, func() *T_ht {
- if (*T_ht)(_pH.X3) != nil {
- return (*T_ht)(unsafe.Pointer(uintptr(_pH.X3) + 8*uintptr(_h)))
+ if _pH.Xht != nil {
+ return elem39((*T_ht)(_pH.Xht), uintptr(_h))
}
return nil
}(), _new_elem)
@@ -20695,43 +21198,45 @@ _10:
var _sqlite3HashInsertØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3HashInsertØ00__func__Ø000[0], str(21626), 18)
+ crt.Xstrncpy(nil, &_sqlite3HashInsertØ00__func__Ø000[0], str(21581), 18)
}
-// This function (for internal use only) locates an element in an
-// hash table that matches the given key. The hash for this key is
-// also computed and returned in the *pH parameter.
+// C comment
+// /* This function (for internal use only) locates an element in an
+// ** hash table that matches the given key. The hash for this key is
+// ** also computed and returned in the *pH parameter.
+// */
func _findElementWithHash(tls *crt.TLS, _pH *XHash, _pKey *int8, _pHash *uint32) (r0 *XHashElem) {
var _count int32
var _h uint32
var _elem *XHashElem
var _1_pEntry *T_ht
- if (*T_ht)(_pH.X3) != nil {
- _h = _strHash(tls, _pKey) % (_pH.X0)
- _1_pEntry = (*T_ht)(unsafe.Pointer(uintptr(_pH.X3) + 8*uintptr(_h)))
- _elem = (*XHashElem)(_1_pEntry.X1)
- _count = _1_pEntry.X0
+ if _pH.Xht != nil {
+ _h = _strHash(tls, _pKey) % _pH.Xhtsize
+ _1_pEntry = elem39((*T_ht)(_pH.Xht), uintptr(_h))
+ _elem = (*XHashElem)(_1_pEntry.Xchain)
+ _count = _1_pEntry.Xcount
goto _1
}
- _h = uint32(i32(0))
- _elem = (*XHashElem)(_pH.X2)
- _count = int32(_pH.X1)
+ _h = 0
+ _elem = (*XHashElem)(_pH.Xfirst)
+ _count = int32(_pH.Xcount)
_1:
*_pHash = _h
_2:
- if postInc1(&_count, int32(-1)) == 0 {
+ if postInc2(&_count, -1) == 0 {
goto _3
}
func() {
if _elem == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29394), unsafe.Pointer((*int8)(unsafe.Pointer(&_findElementWithHashØ00__func__Ø000))), unsafe.Pointer(str(21644)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29394), unsafe.Pointer(&_findElementWithHashØ00__func__Ø000), unsafe.Pointer(str(21599)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3StrICmp(tls, _elem.X3, _pKey) == i32(0) {
+ if _sqlite3StrICmp(tls, _elem.XpKey, _pKey) == int32(0) {
return _elem
}
- _elem = (*XHashElem)(_elem.X0)
+ _elem = (*XHashElem)(_elem.Xnext)
goto _2
_3:
return nil
@@ -20740,23 +21245,18 @@ _3:
panic(0)
}
-// The hashing function.
+// C comment
+// /*
+// ** The hashing function.
+// */
func _strHash(tls *crt.TLS, _z *int8) (r0 uint32) {
var _h uint32
var _c uint8
- _h = u32(0)
+ _h = uint32(0)
_0:
- if int32(store2(&_c, uint8(*postInc0(&_z, 1)))) != i32(0) {
- {
- p := &_h
- *p = (*p) + uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(_c))))
- sink5(*p)
- }
- {
- p := &_h
- *p = (*p) * u32(2654435761)
- sink5(*p)
- }
+ if int32(store3(&_c, uint8(*postInc1(&_z, 1)))) != int32(0) {
+ _h += uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(_c)))
+ _h *= uint32(2654435761)
goto _0
}
return _h
@@ -20765,49 +21265,51 @@ _0:
var _findElementWithHashØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_findElementWithHashØ00__func__Ø000[0], str(21652), 20)
+ crt.Xstrncpy(nil, &_findElementWithHashØ00__func__Ø000[0], str(21607), 20)
}
-// Remove a single entry from the hash table given a pointer to that
-// element and a hash on the element's key.
+// C comment
+// /* Remove a single entry from the hash table given a pointer to that
+// ** element and a hash on the element's key.
+// */
func _removeElementGivenHash(tls *crt.TLS, _pH *XHash, _elem *XHashElem, _h uint32) {
var _pEntry *T_ht
- if (*XHashElem)(_elem.X1) != nil {
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XHashElem)(_elem.X1).X0))))) = (*XHashElem)(_elem.X0)
+ if _elem.Xprev != nil {
+ *(**XHashElem)(unsafe.Pointer(&((*XHashElem)(_elem.Xprev).Xnext))) = (*XHashElem)(_elem.Xnext)
goto _1
}
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pH.X2))))) = (*XHashElem)(_elem.X0)
+ *(**XHashElem)(unsafe.Pointer(&_pH.Xfirst)) = (*XHashElem)(_elem.Xnext)
_1:
- if (*XHashElem)(_elem.X0) != nil {
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XHashElem)(_elem.X0).X1))))) = (*XHashElem)(_elem.X1)
+ if _elem.Xnext != nil {
+ *(**XHashElem)(unsafe.Pointer(&((*XHashElem)(_elem.Xnext).Xprev))) = (*XHashElem)(_elem.Xprev)
}
- if (*T_ht)(_pH.X3) == nil {
+ if _pH.Xht == nil {
goto _3
}
- _pEntry = (*T_ht)(unsafe.Pointer(uintptr(_pH.X3) + 8*uintptr(_h)))
- if (*XHashElem)(_pEntry.X1) == _elem {
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pEntry.X1))))) = (*XHashElem)(_elem.X0)
+ _pEntry = elem39((*T_ht)(_pH.Xht), uintptr(_h))
+ if (*XHashElem)(_pEntry.Xchain) == _elem {
+ *(**XHashElem)(unsafe.Pointer(&_pEntry.Xchain)) = (*XHashElem)(_elem.Xnext)
}
- *(*int32)(unsafe.Pointer(&(_pEntry.X0))) -= 1
+ _pEntry.Xcount -= 1
func() {
- if (_pEntry.X0) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29426), unsafe.Pointer((*int8)(unsafe.Pointer(&_removeElementGivenHashØ00__func__Ø000))), unsafe.Pointer(str(21672)))
+ if _pEntry.Xcount < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29426), unsafe.Pointer(&_removeElementGivenHashØ00__func__Ø000), unsafe.Pointer(str(21627)))
crt.X__builtin_abort(tls)
}
}()
_3:
- Xsqlite3_free(tls, (unsafe.Pointer)(_elem))
- *(*uint32)(unsafe.Pointer(&(_pH.X1))) -= 1
- if (_pH.X1) == uint32(i32(0)) {
+ Xsqlite3_free(tls, unsafe.Pointer(_elem))
+ _pH.Xcount -= 1
+ if _pH.Xcount == (0) {
func() {
- if (*XHashElem)(_pH.X2) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29431), unsafe.Pointer((*int8)(unsafe.Pointer(&_removeElementGivenHashØ00__func__Ø000))), unsafe.Pointer(str(21689)))
+ if (*XHashElem)(_pH.Xfirst) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29431), unsafe.Pointer(&_removeElementGivenHashØ00__func__Ø000), unsafe.Pointer(str(21644)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pH.X1) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29432), unsafe.Pointer((*int8)(unsafe.Pointer(&_removeElementGivenHashØ00__func__Ø000))), unsafe.Pointer(str(21702)))
+ if _pH.Xcount != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29432), unsafe.Pointer(&_removeElementGivenHashØ00__func__Ø000), unsafe.Pointer(str(21657)))
crt.X__builtin_abort(tls)
}
}()
@@ -20818,61 +21320,65 @@ _3:
var _removeElementGivenHashØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_removeElementGivenHashØ00__func__Ø000[0], str(21715), 23)
+ crt.Xstrncpy(nil, &_removeElementGivenHashØ00__func__Ø000[0], str(21670), 23)
}
-// Resize the hash table so that it cantains "new_size" buckets.
-//
-// The hash table might fail to resize if sqlite3_malloc() fails or
-// if the new size is the same as the prior size.
-// Return TRUE if the resize occurs and false if not.
+// C comment
+// /* Resize the hash table so that it cantains "new_size" buckets.
+// **
+// ** The hash table might fail to resize if sqlite3_malloc() fails or
+// ** if the new size is the same as the prior size.
+// ** Return TRUE if the resize occurs and false if not.
+// */
func _rehash(tls *crt.TLS, _pH *XHash, _new_size uint32) (r0 int32) {
var _2_h uint32
var _elem, _next_elem *XHashElem
var _new_ht *T_ht
- if (_new_size * u32(8)) > uint32(i32(1024)) {
- _new_size = u32(128)
+ if (_new_size * uint32(8)) > uint32(1024) {
+ _new_size = uint32(128)
}
- if _new_size == (_pH.X0) {
- return i32(0)
+ if _new_size == _pH.Xhtsize {
+ return int32(0)
}
_sqlite3BeginBenignMalloc(tls)
- _new_ht = (*T_ht)(_sqlite3Malloc(tls, uint64(_new_size*u32(8))))
+ _new_ht = (*T_ht)(_sqlite3Malloc(tls, uint64(_new_size*uint32(8))))
_sqlite3EndBenignMalloc(tls)
if _new_ht == nil {
- return i32(0)
+ return int32(0)
}
- Xsqlite3_free(tls, _pH.X3)
- *(**T_ht)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pH.X3))))) = _new_ht
- *(*uint32)(unsafe.Pointer(&(_pH.X0))) = store5(&_new_size, uint32(_sqlite3MallocSize(tls, (unsafe.Pointer)(_new_ht)))/u32(8))
- crt.Xmemset(tls, (unsafe.Pointer)(_new_ht), i32(0), _new_size*u32(8))
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(func() *XHash { _elem = (*XHashElem)(_pH.X2); return _pH }().X2))))) = nil
+ Xsqlite3_free(tls, _pH.Xht)
+ *(**T_ht)(unsafe.Pointer(&_pH.Xht)) = _new_ht
+ _pH.Xhtsize = store23(&_new_size, uint32(_sqlite3MallocSize(tls, unsafe.Pointer(_new_ht)))/uint32(8))
+ crt.Xmemset(tls, unsafe.Pointer(_new_ht), int32(0), _new_size*uint32(8))
+ *(**XHashElem)(unsafe.Pointer(&(func() *XHash { _elem = (*XHashElem)(_pH.Xfirst); return _pH }().Xfirst))) = nil
_3:
if _elem == nil {
goto _6
}
- _2_h = _strHash(tls, _elem.X3) % _new_size
- _next_elem = (*XHashElem)(_elem.X0)
- _insertElement(tls, _pH, (*T_ht)(unsafe.Pointer(uintptr((unsafe.Pointer)(_new_ht))+8*uintptr(_2_h))), _elem)
+ _2_h = _strHash(tls, _elem.XpKey) % _new_size
+ _next_elem = (*XHashElem)(_elem.Xnext)
+ _insertElement(tls, _pH, elem39(_new_ht, uintptr(_2_h)), _elem)
_elem = _next_elem
goto _3
_6:
- return i32(1)
+ return int32(1)
}
-// Link pNew element into the hash table pH. If pEntry!=0 then also
-// insert pNew into the pEntry hash bucket.
+// C comment
+// /* Link pNew element into the hash table pH. If pEntry!=0 then also
+// ** insert pNew into the pEntry hash bucket.
+// */
func _insertElement(tls *crt.TLS, _pH *XHash, _pEntry *T_ht, _pNew *XHashElem) {
var _pHead *XHashElem
if _pEntry != nil {
_pHead = func() *XHashElem {
- if (_pEntry.X0) != 0 {
- return (*XHashElem)(_pEntry.X1)
+ if _pEntry.Xcount != 0 {
+ return (*XHashElem)(_pEntry.Xchain)
}
return nil
}()
- *(*int32)(unsafe.Pointer(&(_pEntry.X0))) += 1
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pEntry.X1))))) = _pNew
+ _pEntry.Xcount += 1
+ *(**XHashElem)(unsafe.Pointer(&_pEntry.Xchain)) = _pNew
goto _3
}
_pHead = nil
@@ -20880,40 +21386,43 @@ _3:
if _pHead == nil {
goto _4
}
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X0))))) = _pHead
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X1))))) = (*XHashElem)(_pHead.X1)
- if (*XHashElem)(_pHead.X1) != nil {
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XHashElem)(_pHead.X1).X0))))) = _pNew
+ *(**XHashElem)(unsafe.Pointer(&_pNew.Xnext)) = _pHead
+ *(**XHashElem)(unsafe.Pointer(&_pNew.Xprev)) = (*XHashElem)(_pHead.Xprev)
+ if _pHead.Xprev != nil {
+ *(**XHashElem)(unsafe.Pointer(&((*XHashElem)(_pHead.Xprev).Xnext))) = _pNew
goto _6
}
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pH.X2))))) = _pNew
+ *(**XHashElem)(unsafe.Pointer(&_pH.Xfirst)) = _pNew
_6:
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pHead.X1))))) = _pNew
+ *(**XHashElem)(unsafe.Pointer(&_pHead.Xprev)) = _pNew
goto _7
_4:
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X0))))) = (*XHashElem)(_pH.X2)
- if (*XHashElem)(_pH.X2) != nil {
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XHashElem)(_pH.X2).X1))))) = _pNew
+ *(**XHashElem)(unsafe.Pointer(&_pNew.Xnext)) = (*XHashElem)(_pH.Xfirst)
+ if _pH.Xfirst != nil {
+ *(**XHashElem)(unsafe.Pointer(&((*XHashElem)(_pH.Xfirst).Xprev))) = _pNew
}
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X1))))) = nil
- *(**XHashElem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pH.X2))))) = _pNew
+ *(**XHashElem)(unsafe.Pointer(&_pNew.Xprev)) = nil
+ *(**XHashElem)(unsafe.Pointer(&_pH.Xfirst)) = _pNew
_7:
}
-// Return true if the correct mutexes are held for accessing the
-// db->aDb[iDb].pSchema structure. The mutexes required for schema
-// access are:
-//
-// (1) The mutex on db
-// (2) if iDb!=1, then the mutex on db->aDb[iDb].pBt.
-//
-// If pSchema is not NULL, then iDb is computed from pSchema and
-// db using sqlite3SchemaToIndex().
+// C comment
+// /*
+// ** Return true if the correct mutexes are held for accessing the
+// ** db->aDb[iDb].pSchema structure. The mutexes required for schema
+// ** access are:
+// **
+// ** (1) The mutex on db
+// ** (2) if iDb!=1, then the mutex on db->aDb[iDb].pBt.
+// **
+// ** If pSchema is not NULL, then iDb is computed from pSchema and
+// ** db using sqlite3SchemaToIndex().
+// */
func _sqlite3SchemaMutexHeld(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _pSchema *XSchema) (r0 int32) {
var _p *XBtree
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58977), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SchemaMutexHeldØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58977), unsafe.Pointer(&_sqlite3SchemaMutexHeldØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
@@ -20921,73 +21430,76 @@ func _sqlite3SchemaMutexHeld(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _pSchema *
_iDb = _sqlite3SchemaToIndex(tls, _db, _pSchema)
}
func() {
- if _iDb < i32(0) || _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58979), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SchemaMutexHeldØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _iDb < int32(0) || _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58979), unsafe.Pointer(&_sqlite3SchemaMutexHeldØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- return i32(0)
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ return int32(0)
}
- if _iDb == i32(1) {
- return i32(1)
+ if _iDb == int32(1) {
+ return int32(1)
}
- _p = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X1)
+ _p = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpBt)
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(58983), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SchemaMutexHeldØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(58983), unsafe.Pointer(&_sqlite3SchemaMutexHeldØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int((int32(_p.X3) == i32(0)) || (int32(_p.X4) == i32(1)))
+ return bool2int((int32(_p.Xsharable) == int32(0)) || (int32(_p.Xlocked) == int32(1)))
}
var _sqlite3SchemaMutexHeldØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SchemaMutexHeldØ00__func__Ø000[0], str(21760), 23)
+ crt.Xstrncpy(nil, &_sqlite3SchemaMutexHeldØ00__func__Ø000[0], str(21715), 23)
}
-// Convert a schema pointer into the iDb index that indicates
-// which database file in db->aDb[] the schema refers to.
-//
-// If the same database is attached more than once, the first
-// attached database is returned.
+// C comment
+// /*
+// ** Convert a schema pointer into the iDb index that indicates
+// ** which database file in db->aDb[] the schema refers to.
+// **
+// ** If the same database is attached more than once, the first
+// ** attached database is returned.
+// */
func _sqlite3SchemaToIndex(tls *crt.TLS, _db *Xsqlite3, _pSchema *XSchema) (r0 int32) {
var _i int32
- _i = i32(-1000000)
+ _i = int32(-1000000)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116147), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SchemaToIndexØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116147), unsafe.Pointer(&_sqlite3SchemaToIndexØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
if _pSchema == nil {
goto _2
}
- _i = i32(0)
+ _i = int32(0)
_3:
if func() int32 {
- if _i < (_db.X5) {
- return i32(1)
+ if _i < _db.XnDb {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116149), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SchemaToIndexØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116149), unsafe.Pointer(&_sqlite3SchemaToIndexØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _8
}
- if (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_i))).X4) == _pSchema {
+ if (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpSchema) == _pSchema {
goto _8
}
_i += 1
goto _3
_8:
func() {
- if _i < i32(0) || _i >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116154), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SchemaToIndexØ00__func__Ø000))), unsafe.Pointer(str(21783)))
+ if _i < int32(0) || _i >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116154), unsafe.Pointer(&_sqlite3SchemaToIndexØ00__func__Ø000), unsafe.Pointer(str(21738)))
crt.X__builtin_abort(tls)
}
}()
@@ -20998,74 +21510,83 @@ _2:
var _sqlite3SchemaToIndexØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SchemaToIndexØ00__func__Ø000[0], str(21801), 21)
+ crt.Xstrncpy(nil, &_sqlite3SchemaToIndexØ00__func__Ø000[0], str(21756), 21)
}
-// Reclaim the memory used by an index
+// C comment
+// /*
+// ** Reclaim the memory used by an index
+// */
func _freeIndex(tls *crt.TLS, _db *Xsqlite3, _p *XIndex) {
_sqlite3DeleteIndexSamples(tls, _db, _p)
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X9))
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.X10))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X4))
- if ((uint32((_p.X16)>>uint(i32(4))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X8))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpPartIdxWhere))
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.XaColExpr))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XzColAff))
+ if ((uint32(_p.XidxType>>4) << 31) >> 31) != 0 {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XazColl))
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p))
}
-// If the Index.aSample variable is not NULL, delete the aSample[] array
-// and its contents.
+// C comment
+// /*
+// ** If the Index.aSample variable is not NULL, delete the aSample[] array
+// ** and its contents.
+// */
func _sqlite3DeleteIndexSamples(tls *crt.TLS, _db *Xsqlite3, _pIdx *XIndex) {
}
-// Free all memory associated with foreign key definitions attached to
-// table pTab. Remove the deleted foreign keys from the Schema.fkeyHash
-// hash table.
+// C comment
+// /*
+// ** Free all memory associated with foreign key definitions attached to
+// ** table pTab. Remove the deleted foreign keys from the Schema.fkeyHash
+// ** hash table.
+// */
func _sqlite3FkDelete(tls *crt.TLS, _db *Xsqlite3, _pTab *XTable) {
var _4_z *int8
var _4_p unsafe.Pointer
var _pFKey, _pNext *XFKey
func() {
- if _db != nil && (_pTab.X16) == 0 && _sqlite3SchemaMutexHeld(tls, _db, i32(0), (*XSchema)(_pTab.X20)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108799), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkDeleteØ00__func__Ø000))), unsafe.Pointer(str(21822)))
+ if _db != nil && _pTab.XnModuleArg == 0 && _sqlite3SchemaMutexHeld(tls, _db, int32(0), (*XSchema)(_pTab.XpSchema)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108799), unsafe.Pointer(&_sqlite3FkDeleteØ00__func__Ø000), unsafe.Pointer(str(21777)))
crt.X__builtin_abort(tls)
}
}()
- _pFKey = (*XFKey)(_pTab.X4)
+ _pFKey = (*XFKey)(_pTab.XpFKey)
_4:
if _pFKey == nil {
goto _7
}
- if _db != nil && (_db.X79) != nil {
+ if _db != nil && _db.XpnBytesFreed != nil {
goto _9
}
- if (*XFKey)(_pFKey.X4) != nil {
- *(**XFKey)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XFKey)(_pFKey.X4).X3))))) = (*XFKey)(_pFKey.X3)
+ if _pFKey.XpPrevTo != nil {
+ *(**XFKey)(unsafe.Pointer(&((*XFKey)(_pFKey.XpPrevTo).XpNextTo))) = (*XFKey)(_pFKey.XpNextTo)
goto _11
}
- _4_p = _pFKey.X3
+ _4_p = _pFKey.XpNextTo
_4_z = func() *int8 {
if _4_p != nil {
- return ((*XFKey)(_pFKey.X3).X2)
+ return ((*XFKey)(_pFKey.XpNextTo).XzTo)
}
- return (_pFKey.X2)
+ return _pFKey.XzTo
}()
- _sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&((*XSchema)(_pTab.X20).X5))), _4_z, _4_p)
+ _sqlite3HashInsert(tls, &((*XSchema)(_pTab.XpSchema).XfkeyHash), _4_z, _4_p)
_11:
- if (*XFKey)(_pFKey.X3) != nil {
- *(**XFKey)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XFKey)(_pFKey.X3).X4))))) = (*XFKey)(_pFKey.X4)
+ if _pFKey.XpNextTo != nil {
+ *(**XFKey)(unsafe.Pointer(&((*XFKey)(_pFKey.XpNextTo).XpPrevTo))) = (*XFKey)(_pFKey.XpPrevTo)
}
_9:
func() {
- if int32(_pFKey.X6) != i32(0) && int32(_pFKey.X6) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108820), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkDeleteØ00__func__Ø000))), unsafe.Pointer(str(21895)))
+ if int32(_pFKey.XisDeferred) != int32(0) && int32(_pFKey.XisDeferred) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108820), unsafe.Pointer(&_sqlite3FkDeleteØ00__func__Ø000), unsafe.Pointer(str(21850)))
crt.X__builtin_abort(tls)
}
}()
- _fkTriggerDelete(tls, _db, *(**XTrigger)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]unsafe.Pointer)(unsafe.Pointer(&(_pFKey.X8))))) + 4*uintptr(i32(0)))))
- _fkTriggerDelete(tls, _db, *(**XTrigger)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]unsafe.Pointer)(unsafe.Pointer(&(_pFKey.X8))))) + 4*uintptr(i32(1)))))
- _pNext = (*XFKey)(_pFKey.X1)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pFKey))
+ _fkTriggerDelete(tls, _db, *elem40((**XTrigger)(unsafe.Pointer(&_pFKey.XapTrigger)), 0))
+ _fkTriggerDelete(tls, _db, *elem40((**XTrigger)(unsafe.Pointer(&_pFKey.XapTrigger)), uintptr(1)))
+ _pNext = (*XFKey)(_pFKey.XpNextFrom)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pFKey))
_pFKey = _pNext
goto _4
_7:
@@ -21074,111 +21595,123 @@ _7:
var _sqlite3FkDeleteØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FkDeleteØ00__func__Ø000[0], str(21940), 16)
+ crt.Xstrncpy(nil, &_sqlite3FkDeleteØ00__func__Ø000[0], str(21895), 16)
}
-// The second argument is a Trigger structure allocated by the
-// fkActionTrigger() routine. This function deletes the Trigger structure
-// and all of its sub-components.
-//
-// The Trigger structure or any of its sub-components may be allocated from
-// the lookaside buffer belonging to database handle dbMem.
+// C comment
+// /*
+// ** The second argument is a Trigger structure allocated by the
+// ** fkActionTrigger() routine. This function deletes the Trigger structure
+// ** and all of its sub-components.
+// **
+// ** The Trigger structure or any of its sub-components may be allocated from
+// ** the lookaside buffer belonging to database handle dbMem.
+// */
func _fkTriggerDelete(tls *crt.TLS, _dbMem *Xsqlite3, _p *XTrigger) {
var _1_pStep *XTriggerStep
if _p != nil {
- _1_pStep = (*XTriggerStep)(_p.X8)
- _sqlite3ExprDelete(tls, _dbMem, (*XExpr)(_1_pStep.X5))
- _sqlite3ExprListDelete(tls, _dbMem, (*XExprList)(_1_pStep.X6))
- _sqlite3SelectDelete(tls, _dbMem, (*XSelect)(_1_pStep.X3))
- _sqlite3ExprDelete(tls, _dbMem, (*XExpr)(_p.X4))
- _sqlite3DbFree(tls, _dbMem, (unsafe.Pointer)(_p))
+ _1_pStep = (*XTriggerStep)(_p.Xstep_list)
+ _sqlite3ExprDelete(tls, _dbMem, (*XExpr)(_1_pStep.XpWhere))
+ _sqlite3ExprListDelete(tls, _dbMem, (*XExprList)(_1_pStep.XpExprList))
+ _sqlite3SelectDelete(tls, _dbMem, (*XSelect)(_1_pStep.XpSelect))
+ _sqlite3ExprDelete(tls, _dbMem, (*XExpr)(_p.XpWhen))
+ _sqlite3DbFree(tls, _dbMem, unsafe.Pointer(_p))
}
}
-// Delete memory allocated for the column names of a table or view (the
-// Table.aCol[] array).
+// C comment
+// /*
+// ** Delete memory allocated for the column names of a table or view (the
+// ** Table.aCol[] array).
+// */
func _sqlite3DeleteColumnNames(tls *crt.TLS, _db *Xsqlite3, _pTable *XTable) {
var _i int32
var _pCol *XColumn
func() {
if _pTable == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100270), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(21956)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100270), unsafe.Pointer(&_sqlite3DeleteColumnNamesØ00__func__Ø000), unsafe.Pointer(str(21911)))
crt.X__builtin_abort(tls)
}
}()
- if store30(&_pCol, (*XColumn)(_pTable.X1)) == nil {
+ if store41(&_pCol, (*XColumn)(_pTable.XaCol)) == nil {
goto _2
}
- _i = i32(0)
+ _i = int32(0)
_3:
- if _i >= int32(_pTable.X11) {
+ if _i >= int32(_pTable.XnCol) {
goto _6
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pCol.X0))
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_pCol.X1))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pCol.X2))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pCol.XzName))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_pCol.XpDflt))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pCol.XzColl))
*(*uintptr)(unsafe.Pointer(func() **XColumn { _i += 1; return &_pCol }())) += uintptr(16)
goto _3
_6:
- _sqlite3DbFree(tls, _db, _pTable.X1)
+ _sqlite3DbFree(tls, _db, _pTable.XaCol)
_2:
}
var _sqlite3DeleteColumnNamesØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DeleteColumnNamesØ00__func__Ø000[0], str(21966), 25)
-}
-
-// Clear any and all virtual-table information from the Table record.
-// This routine is called, for example, just before deleting the Table
-// record.
-//
-// Since it is a virtual-table, the Table structure contains a pointer
-// to the head of a linked list of VTable structures. Each VTable
-// structure is associated with a single sqlite3* user of the schema.
-// The reference count of the VTable structure associated with database
-// connection db is decremented immediately (which may lead to the
-// structure being xDisconnected and free). Any other VTable structures
-// in the list are moved to the sqlite3.pDisconnect list of the associated
-// database connection.
+ crt.Xstrncpy(nil, &_sqlite3DeleteColumnNamesØ00__func__Ø000[0], str(21921), 25)
+}
+
+// C comment
+// /*
+// ** Clear any and all virtual-table information from the Table record.
+// ** This routine is called, for example, just before deleting the Table
+// ** record.
+// **
+// ** Since it is a virtual-table, the Table structure contains a pointer
+// ** to the head of a linked list of VTable structures. Each VTable
+// ** structure is associated with a single sqlite3* user of the schema.
+// ** The reference count of the VTable structure associated with database
+// ** connection db is decremented immediately (which may lead to the
+// ** structure being xDisconnected and free). Any other VTable structures
+// ** in the list are moved to the sqlite3.pDisconnect list of the associated
+// ** database connection.
+// */
func _sqlite3VtabClear(tls *crt.TLS, _db *Xsqlite3, _p *XTable) {
var _1_i int32
- if (_db == nil) || ((_db.X79) == nil) {
+ if (_db == nil) || (_db.XpnBytesFreed == nil) {
_vtabDisconnectAll(tls, nil, _p)
}
- if (_p.X17) == nil {
+ if _p.XazModuleArg == nil {
goto _2
}
- _1_i = i32(0)
+ _1_i = int32(0)
_3:
- if _1_i >= (_p.X16) {
+ if _1_i >= _p.XnModuleArg {
goto _6
}
- if _1_i != i32(1) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X17)) + 4*uintptr(_1_i)))))
+ if _1_i != int32(1) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(*elem0(_p.XazModuleArg, uintptr(_1_i))))
}
_1_i += 1
goto _3
_6:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X17))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XazModuleArg))
_2:
}
-// Table p is a virtual table. This function moves all elements in the
-// p->pVTable list to the sqlite3.pDisconnect lists of their associated
-// database connections to be disconnected at the next opportunity.
-// Except, if argument db is not NULL, then the entry associated with
-// connection db is left in the p->pVTable list.
+// C comment
+// /*
+// ** Table p is a virtual table. This function moves all elements in the
+// ** p->pVTable list to the sqlite3.pDisconnect lists of their associated
+// ** database connections to be disconnected at the next opportunity.
+// ** Except, if argument db is not NULL, then the entry associated with
+// ** connection db is left in the p->pVTable list.
+// */
func _vtabDisconnectAll(tls *crt.TLS, _db *Xsqlite3, _p *XTable) (r0 *XVTable) {
var _1_db2 *Xsqlite3
var _pRet, _pVTable, _1_pNext *XVTable
_pRet = nil
- _pVTable = (*XVTable)(_p.X18)
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X18))))) = nil
+ _pVTable = (*XVTable)(_p.XpVTable)
+ *(**XVTable)(unsafe.Pointer(&_p.XpVTable)) = nil
func() {
- if _db != nil && _sqlite3SchemaMutexHeld(tls, _db, i32(0), (*XSchema)(_p.X20)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125175), unsafe.Pointer((*int8)(unsafe.Pointer(&_vtabDisconnectAllØ00__func__Ø000))), unsafe.Pointer(str(21991)))
+ if _db != nil && _sqlite3SchemaMutexHeld(tls, _db, int32(0), (*XSchema)(_p.XpSchema)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125175), unsafe.Pointer(&_vtabDisconnectAllØ00__func__Ø000), unsafe.Pointer(str(21946)))
crt.X__builtin_abort(tls)
}
}()
@@ -21186,29 +21719,29 @@ _3:
if _pVTable == nil {
goto _4
}
- _1_db2 = (*Xsqlite3)(_pVTable.X0)
- _1_pNext = (*XVTable)(_pVTable.X6)
+ _1_db2 = (*Xsqlite3)(_pVTable.Xdb)
+ _1_pNext = (*XVTable)(_pVTable.XpNext)
func() {
if _1_db2 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125180), unsafe.Pointer((*int8)(unsafe.Pointer(&_vtabDisconnectAllØ00__func__Ø000))), unsafe.Pointer(str(22042)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125180), unsafe.Pointer(&_vtabDisconnectAllØ00__func__Ø000), unsafe.Pointer(str(21997)))
crt.X__builtin_abort(tls)
}
}()
if _1_db2 == _db {
_pRet = _pVTable
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X18))))) = _pRet
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRet.X6))))) = nil
+ *(**XVTable)(unsafe.Pointer(&_p.XpVTable)) = _pRet
+ *(**XVTable)(unsafe.Pointer(&_pRet.XpNext)) = nil
goto _8
}
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pVTable.X6))))) = (*XVTable)(_1_db2.X68)
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_db2.X68))))) = _pVTable
+ *(**XVTable)(unsafe.Pointer(&_pVTable.XpNext)) = (*XVTable)(_1_db2.XpDisconnect)
+ *(**XVTable)(unsafe.Pointer(&_1_db2.XpDisconnect)) = _pVTable
_8:
_pVTable = _1_pNext
goto _3
_4:
func() {
if _db != nil && _pRet == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125192), unsafe.Pointer((*int8)(unsafe.Pointer(&_vtabDisconnectAllØ00__func__Ø000))), unsafe.Pointer(str(22046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125192), unsafe.Pointer(&_vtabDisconnectAllØ00__func__Ø000), unsafe.Pointer(str(22001)))
crt.X__builtin_abort(tls)
}
}()
@@ -21218,271 +21751,292 @@ _4:
var _vtabDisconnectAllØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_vtabDisconnectAllØ00__func__Ø000[0], str(22058), 18)
+ crt.Xstrncpy(nil, &_vtabDisconnectAllØ00__func__Ø000[0], str(22013), 18)
}
-// Delete an IdList.
+// C comment
+// /*
+// ** Delete an IdList.
+// */
func _sqlite3IdListDelete(tls *crt.TLS, _db *Xsqlite3, _pList *XIdList) {
var _i int32
if _pList == nil {
return
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_pList.X1) {
+ if _i >= _pList.XnId {
goto _4
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)((*TIdList_item)(unsafe.Pointer(uintptr(_pList.X0)+8*uintptr(_i))).X0))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(elem42((*TIdList_item)(_pList.Xa), uintptr(_i)).XzName))
_i += 1
goto _1
_4:
- _sqlite3DbFree(tls, _db, _pList.X0)
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_pList))
+ _sqlite3DbFree(tls, _db, _pList.Xa)
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_pList))
}
-// Free the contents of the With object passed as the second argument.
+// C comment
+// /*
+// ** Free the contents of the With object passed as the second argument.
+// */
func _sqlite3WithDelete(tls *crt.TLS, _db *Xsqlite3, _pWith *XWith) {
var _1_i int32
var _2_pCte *TCte
if _pWith == nil {
goto _0
}
- _1_i = i32(0)
+ _1_i = int32(0)
_1:
- if _1_i >= (_pWith.X0) {
+ if _1_i >= _pWith.XnCte {
goto _4
}
- _2_pCte = (*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pWith.X2))))) + 16*uintptr(_1_i)))
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(_2_pCte.X1))
- _sqlite3SelectDelete(tls, _db, (*XSelect)(_2_pCte.X2))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_2_pCte.X0))
+ _2_pCte = elem43((*TCte)(unsafe.Pointer(&_pWith.Xa)), uintptr(_1_i))
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(_2_pCte.XpCols))
+ _sqlite3SelectDelete(tls, _db, (*XSelect)(_2_pCte.XpSelect))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_2_pCte.XzName))
_1_i += 1
goto _1
_4:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pWith))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pWith))
_0:
}
-// Look through the list of open database files in db->aDb[] and if
-// any have been closed, remove them from the list. Reallocate the
-// db->aDb[] structure to a smaller size, if possible.
-//
-// Entry 0 (the "main" database) and entry 1 (the "temp" database)
-// are never candidates for being collapsed.
+// C comment
+// /*
+// ** Look through the list of open database files in db->aDb[] and if
+// ** any have been closed, remove them from the list. Reallocate the
+// ** db->aDb[] structure to a smaller size, if possible.
+// **
+// ** Entry 0 (the "main" database) and entry 1 (the "temp" database)
+// ** are never candidates for being collapsed.
+// */
func _sqlite3CollapseDatabaseArray(tls *crt.TLS, _db *Xsqlite3) {
var _i, _j int32
var _1_pDb *XDb
- _i = store1(&_j, i32(2))
+ _i = store2(&_j, int32(2))
_0:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _3
}
- _1_pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i)))
- if (*XBtree)(_1_pDb.X1) == nil {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_pDb.X0))
- *(**int8)(unsafe.Pointer(&(_1_pDb.X0))) = nil
+ _1_pDb = elem27((*XDb)(_db.XaDb), uintptr(_i))
+ if (*XBtree)(_1_pDb.XpBt) == nil {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_pDb.XzDbSName))
+ _1_pDb.XzDbSName = nil
goto _1
}
if _j < _i {
- *(*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_j))) = *(*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i)))
+ *elem27((*XDb)(_db.XaDb), uintptr(_j)) = *elem27((*XDb)(_db.XaDb), uintptr(_i))
}
_j += 1
_1:
_i += 1
goto _0
_3:
- *(*int32)(unsafe.Pointer(&(_db.X5))) = _j
- if ((_db.X5) <= i32(2)) && ((*XDb)(_db.X4) != (*XDb)(unsafe.Pointer((*[2]XDb)(unsafe.Pointer(&(_db.X72)))))) {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[2]XDb)(unsafe.Pointer(&(_db.X72)))), _db.X4, u32(32))
- _sqlite3DbFree(tls, _db, _db.X4)
- *(**XDb)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X4))))) = (*XDb)(unsafe.Pointer((*[2]XDb)(unsafe.Pointer(&(_db.X72)))))
+ _db.XnDb = _j
+ if (_db.XnDb <= int32(2)) && ((*XDb)(_db.XaDb) != (*XDb)(unsafe.Pointer(&_db.XaDbStatic))) {
+ crt.Xmemcpy(tls, unsafe.Pointer(&_db.XaDbStatic), _db.XaDb, uint32(32))
+ _sqlite3DbFree(tls, _db, _db.XaDb)
+ *(**XDb)(unsafe.Pointer(&_db.XaDb)) = (*XDb)(unsafe.Pointer(&_db.XaDbStatic))
}
}
-// Close all open savepoints. This function only manipulates fields of the
-// database handle object, it does not close any savepoints that may be open
-// at the b-tree/pager level.
+// C comment
+// /*
+// ** Close all open savepoints. This function only manipulates fields of the
+// ** database handle object, it does not close any savepoints that may be open
+// ** at the b-tree/pager level.
+// */
func _sqlite3CloseSavepoints(tls *crt.TLS, _db *Xsqlite3) {
var _1_pTmp *XSavepoint
_0:
- if (*XSavepoint)(_db.X73) != nil {
- _1_pTmp = (*XSavepoint)(_db.X73)
- *(**XSavepoint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X73))))) = (*XSavepoint)(_1_pTmp.X3)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_pTmp))
+ if _db.XpSavepoint != nil {
+ _1_pTmp = (*XSavepoint)(_db.XpSavepoint)
+ *(**XSavepoint)(unsafe.Pointer(&_db.XpSavepoint)) = (*XSavepoint)(_1_pTmp.XpNext)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_pTmp))
goto _0
}
- *(*int32)(unsafe.Pointer(&(_db.X75))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_db.X76))) = i32(0)
- *(*uint8)(unsafe.Pointer(&(_db.X23))) = uint8(i32(0))
+ _db.XnSavepoint = int32(0)
+ _db.XnStatement = int32(0)
+ _db.XisTransactionSavepoint = 0
}
-// Close an open database and invalidate all cursors.
+// C comment
+// /*
+// ** Close an open database and invalidate all cursors.
+// */
func _sqlite3BtreeClose(tls *crt.TLS, _p *XBtree) (r0 int32) {
var _pBt *XBtShared
var _pCur, _1_pTmp *XBtCursor
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61603), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61603), unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
- _pCur = (*XBtCursor)(_pBt.X2)
+ _pCur = (*XBtCursor)(_pBt.XpCursor)
_2:
if _pCur == nil {
goto _3
}
_1_pTmp = _pCur
- _pCur = (*XBtCursor)(_pCur.X2)
- if (*XBtree)(_1_pTmp.X0) == _p {
+ _pCur = (*XBtCursor)(_pCur.XpNext)
+ if (*XBtree)(_1_pTmp.XpBtree) == _p {
_sqlite3BtreeCloseCursor(tls, _1_pTmp)
}
goto _2
_3:
- _sqlite3BtreeRollback(tls, _p, i32(0), i32(0))
+ _sqlite3BtreeRollback(tls, _p, int32(0), int32(0))
_sqlite3BtreeLeave(tls, _p)
func() {
- if (_p.X6) != i32(0) || int32(_p.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61625), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000))), unsafe.Pointer(str(22076)))
+ if _p.XwantToLock != int32(0) || int32(_p.Xlocked) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61625), unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000), unsafe.Pointer(str(22031)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X3) != 0 && _removeFromSharingList(tls, _pBt) == 0 {
+ if _p.Xsharable != 0 && _removeFromSharingList(tls, _pBt) == 0 {
goto _9
}
func() {
- if (*XBtCursor)(_pBt.X2) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61632), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000))), unsafe.Pointer(str(22109)))
+ if _pBt.XpCursor != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61632), unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000), unsafe.Pointer(str(22064)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3PagerClose(tls, (*XPager)(_pBt.X0), (*Xsqlite3)(_p.X0))
- if ((_pBt.X20) != nil) && ((_pBt.X19) != nil) {
- (_pBt.X20)(tls, _pBt.X19)
+ _sqlite3PagerClose(tls, (*XPager)(_pBt.XpPager), (*Xsqlite3)(_p.Xdb))
+ if (_pBt.XxFreeSchema != nil) && (_pBt.XpSchema != nil) {
+ _pBt.XxFreeSchema(tls, _pBt.XpSchema)
}
- _sqlite3DbFree(tls, nil, _pBt.X19)
+ _sqlite3DbFree(tls, nil, _pBt.XpSchema)
_freeTempSpace(tls, _pBt)
- Xsqlite3_free(tls, (unsafe.Pointer)(_pBt))
+ Xsqlite3_free(tls, unsafe.Pointer(_pBt))
_9:
func() {
- if (_p.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61643), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000))), unsafe.Pointer(str(22123)))
+ if _p.XwantToLock != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61643), unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000), unsafe.Pointer(str(22078)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61644), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000))), unsafe.Pointer(str(9343)))
+ if int32(_p.Xlocked) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61644), unsafe.Pointer(&_sqlite3BtreeCloseØ00__func__Ø000), unsafe.Pointer(str(9298)))
crt.X__builtin_abort(tls)
}
}()
- if (*XBtree)(_p.X10) != nil {
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XBtree)(_p.X10).X9))))) = (*XBtree)(_p.X9)
+ if _p.XpPrev != nil {
+ *(**XBtree)(unsafe.Pointer(&((*XBtree)(_p.XpPrev).XpNext))) = (*XBtree)(_p.XpNext)
}
- if (*XBtree)(_p.X9) != nil {
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XBtree)(_p.X9).X10))))) = (*XBtree)(_p.X10)
+ if _p.XpNext != nil {
+ *(**XBtree)(unsafe.Pointer(&((*XBtree)(_p.XpNext).XpPrev))) = (*XBtree)(_p.XpPrev)
}
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
- return i32(0)
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
+ return int32(0)
}
var _sqlite3BtreeCloseØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeCloseØ00__func__Ø000[0], str(22140), 18)
+ crt.Xstrncpy(nil, &_sqlite3BtreeCloseØ00__func__Ø000[0], str(22095), 18)
}
-// Close a cursor. The read lock on the database file is released
-// when the last cursor is closed.
+// C comment
+// /*
+// ** Close a cursor. The read lock on the database file is released
+// ** when the last cursor is closed.
+// */
func _sqlite3BtreeCloseCursor(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
var _1_i int32
var _pBtree *XBtree
var _1_pBt *XBtShared
var _3_pPrev *XBtCursor
- _pBtree = (*XBtree)(_pCur.X0)
+ _pBtree = (*XBtree)(_pCur.XpBtree)
if _pBtree == nil {
goto _0
}
- _1_pBt = (*XBtShared)(_pCur.X1)
+ _1_pBt = (*XBtShared)(_pCur.XpBt)
_sqlite3BtreeEnter(tls, _pBtree)
_sqlite3BtreeClearCursor(tls, _pCur)
func() {
- if (*XBtCursor)(_1_pBt.X2) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63317), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCloseCursorØ00__func__Ø000))), unsafe.Pointer(str(22158)))
+ if (*XBtCursor)(_1_pBt.XpCursor) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63317), unsafe.Pointer(&_sqlite3BtreeCloseCursorØ00__func__Ø000), unsafe.Pointer(str(22113)))
crt.X__builtin_abort(tls)
}
}()
- if (*XBtCursor)(_1_pBt.X2) == _pCur {
- *(**XBtCursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pBt.X2))))) = (*XBtCursor)(_pCur.X2)
+ if (*XBtCursor)(_1_pBt.XpCursor) == _pCur {
+ *(**XBtCursor)(unsafe.Pointer(&_1_pBt.XpCursor)) = (*XBtCursor)(_pCur.XpNext)
goto _4
}
- _3_pPrev = (*XBtCursor)(_1_pBt.X2)
+ _3_pPrev = (*XBtCursor)(_1_pBt.XpCursor)
_5:
- if (*XBtCursor)(_3_pPrev.X2) == _pCur {
- *(**XBtCursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_pPrev.X2))))) = (*XBtCursor)(_pCur.X2)
+ if (*XBtCursor)(_3_pPrev.XpNext) == _pCur {
+ *(**XBtCursor)(unsafe.Pointer(&_3_pPrev.XpNext)) = (*XBtCursor)(_pCur.XpNext)
goto _7
}
- _3_pPrev = (*XBtCursor)(_3_pPrev.X2)
+ _3_pPrev = (*XBtCursor)(_3_pPrev.XpNext)
if func() int32 {
if _3_pPrev != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63328), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCloseCursorØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63328), unsafe.Pointer(&_sqlite3BtreeCloseCursorØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
goto _5
}
_7:
_4:
- _1_i = i32(0)
+ _1_i = int32(0)
_10:
- if _1_i > int32(_pCur.X14) {
+ if _1_i > int32(_pCur.XiPage) {
goto _13
}
- _releasePage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_1_i))))
+ _releasePage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_1_i)))
_1_i += 1
goto _10
_13:
_unlockBtreeIfUnused(tls, _1_pBt)
- Xsqlite3_free(tls, (unsafe.Pointer)(_pCur.X3))
+ Xsqlite3_free(tls, unsafe.Pointer(_pCur.XaOverflow))
_sqlite3BtreeLeave(tls, _pBtree)
_0:
- return i32(0)
+ return int32(0)
}
var _sqlite3BtreeCloseCursorØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeCloseCursorØ00__func__Ø000[0], str(22174), 24)
+ crt.Xstrncpy(nil, &_sqlite3BtreeCloseCursorØ00__func__Ø000[0], str(22129), 24)
}
-// Decrement the BtShared.nRef counter. When it reaches zero,
-// remove the BtShared structure from the sharing list. Return
-// true if the BtShared.nRef counter reaches zero and return
-// false if it is still positive.
+// C comment
+// /*
+// ** Decrement the BtShared.nRef counter. When it reaches zero,
+// ** remove the BtShared structure from the sharing list. Return
+// ** true if the BtShared.nRef counter reaches zero and return
+// ** false if it is still positive.
+// */
func _removeFromSharingList(tls *crt.TLS, _pBt *XBtShared) (r0 int32) {
var _removed int32
var _pMaster *Xsqlite3_mutex
var _pList *XBtShared
- _removed = i32(0)
+ _removed = int32(0)
func() {
- if Xsqlite3_mutex_notheld(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61525), unsafe.Pointer((*int8)(unsafe.Pointer(&_removeFromSharingListØ00__func__Ø000))), unsafe.Pointer(str(22198)))
+ if Xsqlite3_mutex_notheld(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61525), unsafe.Pointer(&_removeFromSharingListØ00__func__Ø000), unsafe.Pointer(str(22153)))
crt.X__builtin_abort(tls)
}
}()
- _pMaster = _sqlite3MutexAlloc(tls, i32(2))
+ _pMaster = _sqlite3MutexAlloc(tls, int32(2))
Xsqlite3_mutex_enter(tls, _pMaster)
- *(*int32)(unsafe.Pointer(&(_pBt.X23))) -= 1
- if (_pBt.X23) > i32(0) {
+ _pBt.XnRef -= 1
+ if _pBt.XnRef > int32(0) {
goto _2
}
if _sqlite3SharedCacheList == _pBt {
- _sqlite3SharedCacheList = (*XBtShared)(_pBt.X24)
+ _sqlite3SharedCacheList = (*XBtShared)(_pBt.XpNext)
bug20530(_sqlite3SharedCacheList)
goto _4
}
@@ -21490,32 +22044,32 @@ func _removeFromSharingList(tls *crt.TLS, _pBt *XBtShared) (r0 int32) {
_5:
if func() int32 {
if _pList != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61534), unsafe.Pointer((*int8)(unsafe.Pointer(&_removeFromSharingListØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61534), unsafe.Pointer(&_removeFromSharingListØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() != 0 && ((*XBtShared)(_pList.X24) != _pBt) {
- _pList = (*XBtShared)(_pList.X24)
+ }() != 0 && ((*XBtShared)(_pList.XpNext) != _pBt) {
+ _pList = (*XBtShared)(_pList.XpNext)
goto _5
}
if func() int32 {
if _pList != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61537), unsafe.Pointer((*int8)(unsafe.Pointer(&_removeFromSharingListØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61537), unsafe.Pointer(&_removeFromSharingListØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- *(**XBtShared)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pList.X24))))) = (*XBtShared)(_pBt.X24)
+ *(**XBtShared)(unsafe.Pointer(&_pList.XpNext)) = (*XBtShared)(_pBt.XpNext)
}
_4:
- Xsqlite3_mutex_free(tls, (*Xsqlite3_mutex)(_pBt.X21))
- _removed = i32(1)
+ Xsqlite3_mutex_free(tls, (*Xsqlite3_mutex)(_pBt.Xmutex))
+ _removed = int32(1)
_2:
Xsqlite3_mutex_leave(tls, _pMaster)
return _removed
@@ -21524,274 +22078,285 @@ _2:
var _removeFromSharingListØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_removeFromSharingListØ00__func__Ø000[0], str(22232), 22)
+ crt.Xstrncpy(nil, &_removeFromSharingListØ00__func__Ø000[0], str(22187), 22)
}
var _sqlite3SharedCacheList *XBtShared
-// Free a dynamic mutex.
+// C comment
+// /*
+// ** Free a dynamic mutex.
+// */
func Xsqlite3_mutex_free(tls *crt.TLS, _p *Xsqlite3_mutex) {
if _p != nil {
func() {
- if (*(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X3)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22854), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_mutex_freeØ00__func__Ø000))), unsafe.Pointer(str(22254)))
+ if (_sqlite3Config.Xmutex.XxMutexFree) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22854), unsafe.Pointer(&_sqlite3_mutex_freeØ00__func__Ø000), unsafe.Pointer(str(22209)))
crt.X__builtin_abort(tls)
}
}()
- (*(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X3)})))(tls, _p)
+ func() func(*crt.TLS, *Xsqlite3_mutex) {
+ v := _sqlite3Config.Xmutex.XxMutexFree
+ return *(*func(*crt.TLS, *Xsqlite3_mutex))(unsafe.Pointer(&v))
+ }()(tls, _p)
}
}
var _sqlite3_mutex_freeØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_mutex_freeØ00__func__Ø000[0], str(22291), 19)
-}
-
-// Shutdown the page cache. Free all memory and close all files.
-//
-// If a transaction was in progress when this routine is called, that
-// transaction is rolled back. All outstanding pages are invalidated
-// and their memory is freed. Any attempt to use a page associated
-// with this page cache after this function returns will likely
-// result in a coredump.
-//
-// This function always succeeds. If a transaction is active an attempt
-// is made to roll it back. If an error occurs during the rollback
-// a hot journal may be left in the filesystem but no error is returned
-// to the caller.
+ crt.Xstrncpy(nil, &_sqlite3_mutex_freeØ00__func__Ø000[0], str(22246), 19)
+}
+
+// C comment
+// /*
+// ** Shutdown the page cache. Free all memory and close all files.
+// **
+// ** If a transaction was in progress when this routine is called, that
+// ** transaction is rolled back. All outstanding pages are invalidated
+// ** and their memory is freed. Any attempt to use a page associated
+// ** with this page cache after this function returns will likely
+// ** result in a coredump.
+// **
+// ** This function always succeeds. If a transaction is active an attempt
+// ** is made to roll it back. If an error occurs during the rollback
+// ** a hot journal may be left in the filesystem but no error is returned
+// ** to the caller.
+// */
func _sqlite3PagerClose(tls *crt.TLS, _pPager *XPager, _db *Xsqlite3) (r0 int32) {
var _pTmp *uint8
- _pTmp = (*uint8)(unsafe.Pointer(_pPager.X58))
+ _pTmp = (*uint8)(unsafe.Pointer(_pPager.XpTmpSpace))
func() {
- if _db == nil && bool2int((*XWal)(_pPager.X60) != nil) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51012), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000))), unsafe.Pointer(str(22310)))
+ if _db == nil && bool2int((*XWal)(_pPager.XpWal) != nil) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51012), unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000), unsafe.Pointer(str(22265)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51013), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51013), unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BeginBenignMalloc(tls)
_pagerFreeMapHdrs(tls, _pPager)
- *(*uint8)(unsafe.Pointer(&(_pPager.X1))) = uint8(i32(0))
+ _pPager.XexclusiveMode = 0
func() {
- if _db == nil && (*XWal)(_pPager.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51020), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000))), unsafe.Pointer(str(22339)))
+ if _db == nil && (*XWal)(_pPager.XpWal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51020), unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000), unsafe.Pointer(str(22294)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3WalClose(tls, (*XWal)(_pPager.X60), _db, int32(_pPager.X7), _pPager.X48, func() *uint8 {
- if (_db != nil) && ((uint32(_db.X6) & u32(2147483648)) != 0) {
+ _sqlite3WalClose(tls, (*XWal)(_pPager.XpWal), _db, int32(_pPager.XckptSyncFlags), _pPager.XpageSize, func() *uint8 {
+ if (_db != nil) && ((uint32(_db.Xflags) & uint32(2147483648)) != 0) {
return nil
}
return _pTmp
}())
- *(**XWal)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X60))))) = nil
+ *(**XWal)(unsafe.Pointer(&_pPager.XpWal)) = nil
_pager_reset(tls, _pPager)
- if (_pPager.X13) != 0 {
+ if _pPager.XmemDb != 0 {
_pager_unlock(tls, _pPager)
goto _12
}
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil {
_pager_error(tls, _pPager, _pagerSyncHotJournal(tls, _pPager))
}
_pagerUnlockAndRollback(tls, _pPager)
_12:
_sqlite3EndBenignMalloc(tls)
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X32))
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X31))
- _sqlite3PageFree(tls, (unsafe.Pointer)(_pTmp))
- _sqlite3PcacheClose(tls, (*XPCache)(_pPager.X59))
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xjfd))
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xfd))
+ _sqlite3PageFree(tls, unsafe.Pointer(_pTmp))
+ _sqlite3PcacheClose(tls, (*XPCache)(_pPager.XpPCache))
func() {
- if (*XPagerSavepoint)(_pPager.X37) != nil || (*XBitvec)(_pPager.X30) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51059), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000))), unsafe.Pointer(str(22361)))
+ if _pPager.XaSavepoint != nil || _pPager.XpInJournal != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51059), unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000), unsafe.Pointer(str(22316)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil || (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X33).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51060), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000))), unsafe.Pointer(str(22404)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil || (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xsjfd).XpMethods) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51060), unsafe.Pointer(&_sqlite3PagerCloseØ00__func__Ø000), unsafe.Pointer(str(22359)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_free(tls, (unsafe.Pointer)(_pPager))
- return i32(0)
+ Xsqlite3_free(tls, unsafe.Pointer(_pPager))
+ return int32(0)
}
var _sqlite3PagerCloseØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerCloseØ00__func__Ø000[0], str(22450), 18)
+ crt.Xstrncpy(nil, &_sqlite3PagerCloseØ00__func__Ø000[0], str(22405), 18)
}
-// Free all PgHdr objects stored in the Pager.pMmapFreelist list.
+// C comment
+// /*
+// ** Free all PgHdr objects stored in the Pager.pMmapFreelist list.
+// */
func _pagerFreeMapHdrs(tls *crt.TLS, _pPager *XPager) {
var _p, _pNext *XPgHdr
- _p = (*XPgHdr)(_pPager.X43)
+ _p = (*XPgHdr)(_pPager.XpMmapFreelist)
_0:
if _p == nil {
goto _3
}
- _pNext = (*XPgHdr)(_p.X3)
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ _pNext = (*XPgHdr)(_p.XpDirty)
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
_p = _pNext
goto _0
_3:
}
-// Close a connection to a log file.
+// C comment
+// /*
+// ** Close a connection to a log file.
+// */
func _sqlite3WalClose(tls *crt.TLS, _pWal *XWal, _db *Xsqlite3, _sync_flags int32, _nBuf int32, _zBuf *uint8) (r0 int32) {
var _rc, _1_isDelete, _4_bPersist int32
- _rc = i32(0)
+ _rc = int32(0)
if _pWal == nil {
goto _0
}
- _1_isDelete = i32(0)
- if _zBuf == nil || i32(0) != store1(&_rc, _sqlite3OsLock(tls, (*Xsqlite3_file)(_pWal.X1), i32(4))) {
+ _1_isDelete = int32(0)
+ if _zBuf == nil || int32(0) != store2(&_rc, _sqlite3OsLock(tls, (*Xsqlite3_file)(_pWal.XpDbFd), int32(4))) {
goto _2
}
- if int32(_pWal.X11) == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pWal.X11))) = uint8(i32(1))
+ if int32(_pWal.XexclusiveMode) == int32(0) {
+ _pWal.XexclusiveMode = uint8(1)
}
- _rc = _sqlite3WalCheckpoint(tls, _pWal, _db, i32(0), nil, nil, _sync_flags, _nBuf, _zBuf, nil, nil)
- if _rc != i32(0) {
+ _rc = _sqlite3WalCheckpoint(tls, _pWal, _db, int32(0), nil, nil, _sync_flags, _nBuf, _zBuf, nil, nil)
+ if _rc != int32(0) {
goto _4
}
- _4_bPersist = i32(-1)
- _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pWal.X1), i32(10), (unsafe.Pointer)(&_4_bPersist))
- if _4_bPersist != i32(1) {
- _1_isDelete = i32(1)
+ _4_bPersist = int32(-1)
+ _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pWal.XpDbFd), int32(10), unsafe.Pointer(&_4_bPersist))
+ if _4_bPersist != int32(1) {
+ _1_isDelete = int32(1)
goto _7
}
- if (_pWal.X4) >= int64(i32(0)) {
- _walLimitSize(tls, _pWal, int64(i32(0)))
+ if _pWal.XmxWalSize >= (0) {
+ _walLimitSize(tls, _pWal, 0)
}
_7:
_4:
_2:
_walIndexClose(tls, _pWal, _1_isDelete)
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pWal.X2))
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pWal.XpWalFd))
if _1_isDelete != 0 {
_sqlite3BeginBenignMalloc(tls)
- _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pWal.X0), _pWal.X21, i32(0))
+ _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pWal.XpVfs), _pWal.XzWalName, int32(0))
_sqlite3EndBenignMalloc(tls)
}
- Xsqlite3_free(tls, (unsafe.Pointer)(_pWal.X7))
- Xsqlite3_free(tls, (unsafe.Pointer)(_pWal))
+ Xsqlite3_free(tls, unsafe.Pointer(_pWal.XapWiData))
+ Xsqlite3_free(tls, unsafe.Pointer(_pWal))
_0:
return _rc
}
func _sqlite3OsLock(tls *crt.TLS, _id *Xsqlite3_file, _lockType int32) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X7)})))(tls, _id, _lockType)
-}
-
-// This routine is called to implement sqlite3_wal_checkpoint() and
-// related interfaces.
-//
-// Obtain a CHECKPOINT lock and then backfill as much information as
-// we can from WAL into the database.
-//
-// If parameter xBusy is not NULL, it is a pointer to a busy-handler
-// callback. In this case this function runs a blocking checkpoint.
+ return func() func(*crt.TLS, *Xsqlite3_file, int32) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxLock
+ return *(*func(*crt.TLS, *Xsqlite3_file, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _lockType)
+}
+
+// C comment
+// /*
+// ** This routine is called to implement sqlite3_wal_checkpoint() and
+// ** related interfaces.
+// **
+// ** Obtain a CHECKPOINT lock and then backfill as much information as
+// ** we can from WAL into the database.
+// **
+// ** If parameter xBusy is not NULL, it is a pointer to a busy-handler
+// ** callback. In this case this function runs a blocking checkpoint.
+// */
func _sqlite3WalCheckpoint(tls *crt.TLS, _pWal *XWal, _db *Xsqlite3, _eMode int32, _xBusy func(*crt.TLS, unsafe.Pointer) int32, _pBusyArg unsafe.Pointer, _sync_flags int32, _nBuf int32, _zBuf *uint8, _pnLog *int32, _pnCkpt *int32) (r0 int32) {
var _rc, _isChanged, _eMode2 int32
var _xBusy2 func(*crt.TLS, unsafe.Pointer) int32
- _isChanged = i32(0)
+ _isChanged = int32(0)
_eMode2 = _eMode
_xBusy2 = _xBusy
func() {
- if int32(_pWal.X13) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57774), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalCheckpointØ00__func__Ø000))), unsafe.Pointer(str(22468)))
+ if int32(_pWal.XckptLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57774), unsafe.Pointer(&_sqlite3WalCheckpointØ00__func__Ø000), unsafe.Pointer(str(22423)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pWal.X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57775), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalCheckpointØ00__func__Ø000))), unsafe.Pointer(str(19079)))
+ if int32(_pWal.XwriteLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57775), unsafe.Pointer(&_sqlite3WalCheckpointØ00__func__Ø000), unsafe.Pointer(str(19034)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eMode == i32(0) && *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_xBusy})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{nil})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57779), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalCheckpointØ00__func__Ø000))), unsafe.Pointer(str(22486)))
+ if _eMode == int32(0) && _xBusy != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57779), unsafe.Pointer(&_sqlite3WalCheckpointØ00__func__Ø000), unsafe.Pointer(str(22441)))
crt.X__builtin_abort(tls)
}
}()
- if (_pWal.X14) != 0 {
- return i32(8)
+ if _pWal.XreadOnly != 0 {
+ return int32(8)
}
- _rc = _walLockExclusive(tls, _pWal, i32(1), i32(1))
+ _rc = _walLockExclusive(tls, _pWal, int32(1), int32(1))
if _rc != 0 {
return _rc
}
- *(*uint8)(unsafe.Pointer(&(_pWal.X13))) = uint8(i32(1))
- if _eMode == i32(0) {
+ _pWal.XckptLock = uint8(1)
+ if _eMode == int32(0) {
goto _9
}
- _rc = _walBusyLock(tls, _pWal, _xBusy, _pBusyArg, i32(0), i32(1))
- if _rc == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pWal.X12))) = uint8(i32(1))
+ _rc = _walBusyLock(tls, _pWal, _xBusy, _pBusyArg, int32(0), int32(1))
+ if _rc == int32(0) {
+ _pWal.XwriteLock = uint8(1)
goto _12
}
- if _rc == i32(5) {
- _eMode2 = i32(0)
+ if _rc == int32(5) {
+ _eMode2 = int32(0)
_xBusy2 = nil
- _rc = i32(0)
+ _rc = int32(0)
}
_12:
_9:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _13
}
_rc = _walIndexReadHdr(tls, _pWal, &_isChanged)
- if _isChanged != 0 && (((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pWal.X1).X0).X0) >= i32(3)) {
- _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pWal.X1), int64(i32(0)), nil)
+ if _isChanged != 0 && (((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pWal.XpDbFd).XpMethods).XiVersion) >= int32(3)) {
+ _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pWal.XpDbFd), 0, nil)
}
_13:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _16
}
- if (((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) != 0) && (_walPagesize(tls, _pWal) != _nBuf) {
- _rc = _sqlite3CorruptError(tls, i32(57832))
+ if ((_pWal.Xhdr.XmxFrame) != 0) && (_walPagesize(tls, _pWal) != _nBuf) {
+ _rc = _sqlite3CorruptError(tls, int32(57832))
goto _19
}
_rc = _walCheckpoint(tls, _pWal, _db, _eMode2, _xBusy2, _pBusyArg, _sync_flags, _zBuf)
_19:
- if _rc != i32(0) && _rc != i32(5) {
+ if _rc != int32(0) && _rc != int32(5) {
goto _21
}
if _pnLog != nil {
- *_pnLog = int32((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6)
+ *_pnLog = int32(_pWal.Xhdr.XmxFrame)
}
if _pnCkpt != nil {
- *_pnCkpt = int32(_walCkptInfo(tls, _pWal).X0)
+ *_pnCkpt = int32(_walCkptInfo(tls, _pWal).XnBackfill)
}
_21:
_16:
if _isChanged != 0 {
- crt.Xmemset(tls, (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), i32(0), u32(48))
+ crt.Xmemset(tls, unsafe.Pointer(&_pWal.Xhdr), int32(0), uint32(48))
}
_sqlite3WalEndWriteTransaction(tls, _pWal)
- _walUnlockExclusive(tls, _pWal, i32(1), i32(1))
- *(*uint8)(unsafe.Pointer(&(_pWal.X13))) = uint8(i32(0))
+ _walUnlockExclusive(tls, _pWal, int32(1), int32(1))
+ _pWal.XckptLock = 0
return func() int32 {
- if (_rc == i32(0)) && (_eMode != _eMode2) {
- return i32(5)
+ if (_rc == int32(0)) && (_eMode != _eMode2) {
+ return int32(5)
}
return _rc
}()
@@ -21800,59 +22365,65 @@ _16:
var _sqlite3WalCheckpointØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalCheckpointØ00__func__Ø000[0], str(22531), 21)
+ crt.Xstrncpy(nil, &_sqlite3WalCheckpointØ00__func__Ø000[0], str(22486), 21)
}
func _walLockExclusive(tls *crt.TLS, _pWal *XWal, _lockIdx int32, _n int32) (r0 int32) {
var _rc int32
- if (_pWal.X11) != 0 {
- return i32(0)
+ if _pWal.XexclusiveMode != 0 {
+ return int32(0)
}
- _rc = _sqlite3OsShmLock(tls, (*Xsqlite3_file)(_pWal.X1), _lockIdx, _n, i32(10))
- *(*uint8)(unsafe.Pointer(&(_pWal.X23))) = uint8(bool2int((_rc != i32(0)) && (_rc != i32(5))))
+ _rc = _sqlite3OsShmLock(tls, (*Xsqlite3_file)(_pWal.XpDbFd), _lockIdx, _n, int32(10))
+ _pWal.XlockError = uint8(bool2int((_rc != int32(0)) && (_rc != int32(5))))
return _rc
}
-// Attempt to obtain the exclusive WAL lock defined by parameters lockIdx and
-// n. If the attempt fails and parameter xBusy is not NULL, then it is a
-// busy-handler function. Invoke it and retry the lock until either the
-// lock is successfully obtained or the busy-handler returns 0.
+// C comment
+// /*
+// ** Attempt to obtain the exclusive WAL lock defined by parameters lockIdx and
+// ** n. If the attempt fails and parameter xBusy is not NULL, then it is a
+// ** busy-handler function. Invoke it and retry the lock until either the
+// ** lock is successfully obtained or the busy-handler returns 0.
+// */
func _walBusyLock(tls *crt.TLS, _pWal *XWal, _xBusy func(*crt.TLS, unsafe.Pointer) int32, _pBusyArg unsafe.Pointer, _lockIdx int32, _n int32) (r0 int32) {
var _rc int32
_0:
_rc = _walLockExclusive(tls, _pWal, _lockIdx, _n)
- if ((_xBusy != nil) && (_rc == i32(5))) && _xBusy(tls, _pBusyArg) != 0 {
+ if ((_xBusy != nil) && (_rc == int32(5))) && _xBusy(tls, _pBusyArg) != 0 {
goto _0
}
return _rc
}
-// Read the wal-index header from the wal-index and into pWal->hdr.
-// If the wal-header appears to be corrupt, try to reconstruct the
-// wal-index from the WAL before returning.
-//
-// Set *pChanged to 1 if the wal-index header value in pWal->hdr is
-// changed by this operation. If pWal->hdr is unchanged, set *pChanged
-// to 0.
-//
-// If the wal-index header is successfully read, return SQLITE_OK.
-// Otherwise an SQLite error code.
+// C comment
+// /*
+// ** Read the wal-index header from the wal-index and into pWal->hdr.
+// ** If the wal-header appears to be corrupt, try to reconstruct the
+// ** wal-index from the WAL before returning.
+// **
+// ** Set *pChanged to 1 if the wal-index header value in pWal->hdr is
+// ** changed by this operation. If pWal->hdr is unchanged, set *pChanged
+// ** to 0.
+// **
+// ** If the wal-index header is successfully read, return SQLITE_OK.
+// ** Otherwise an SQLite error code.
+// */
func _walIndexReadHdr(tls *crt.TLS, _pWal *XWal, _pChanged *int32) (r0 int32) {
var _rc, _badHdr int32
var _page0 *uint32
func() {
if _pChanged == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56550), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexReadHdrØ00__func__Ø000))), unsafe.Pointer(str(22552)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56550), unsafe.Pointer(&_walIndexReadHdrØ00__func__Ø000), unsafe.Pointer(str(22507)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _walIndexPage(tls, _pWal, i32(0), &_page0)
- if _rc != i32(0) {
+ _rc = _walIndexPage(tls, _pWal, int32(0), &_page0)
+ if _rc != int32(0) {
return _rc
}
func() {
- if _page0 == nil && int32(_pWal.X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56555), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexReadHdrØ00__func__Ø000))), unsafe.Pointer(str(22561)))
+ if _page0 == nil && int32(_pWal.XwriteLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56555), unsafe.Pointer(&_walIndexReadHdrØ00__func__Ø000), unsafe.Pointer(str(22516)))
crt.X__builtin_abort(tls)
}
}()
@@ -21860,45 +22431,45 @@ func _walIndexReadHdr(tls *crt.TLS, _pWal *XWal, _pChanged *int32) (r0 int32) {
if _page0 != nil {
return _walIndexTryHdr(tls, _pWal, _pChanged)
}
- return i32(1)
+ return int32(1)
}()
func() {
- if _badHdr != i32(0) && int32(_pWal.X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56567), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexReadHdrØ00__func__Ø000))), unsafe.Pointer(str(22589)))
+ if _badHdr != int32(0) && int32(_pWal.XwriteLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56567), unsafe.Pointer(&_walIndexReadHdrØ00__func__Ø000), unsafe.Pointer(str(22544)))
crt.X__builtin_abort(tls)
}
}()
if _badHdr == 0 {
goto _11
}
- if (int32(_pWal.X14) & i32(2)) == 0 {
+ if (int32(_pWal.XreadOnly) & int32(2)) == 0 {
goto _12
}
- if i32(0) == store1(&_rc, _walLockShared(tls, _pWal, i32(0))) {
- _walUnlockShared(tls, _pWal, i32(0))
- _rc = i32(264)
+ if int32(0) == store2(&_rc, _walLockShared(tls, _pWal, int32(0))) {
+ _walUnlockShared(tls, _pWal, int32(0))
+ _rc = int32(264)
}
goto _15
_12:
- if i32(0) != store1(&_rc, _walLockExclusive(tls, _pWal, i32(0), i32(1))) {
+ if int32(0) != store2(&_rc, _walLockExclusive(tls, _pWal, int32(0), int32(1))) {
goto _15
}
- *(*uint8)(unsafe.Pointer(&(_pWal.X12))) = uint8(i32(1))
- if i32(0) != store1(&_rc, _walIndexPage(tls, _pWal, i32(0), &_page0)) {
+ _pWal.XwriteLock = uint8(1)
+ if int32(0) != store2(&_rc, _walIndexPage(tls, _pWal, int32(0), &_page0)) {
goto _16
}
_badHdr = _walIndexTryHdr(tls, _pWal, _pChanged)
if _badHdr != 0 {
_rc = _walIndexRecover(tls, _pWal)
- *_pChanged = i32(1)
+ *_pChanged = int32(1)
}
_16:
- *(*uint8)(unsafe.Pointer(&(_pWal.X12))) = uint8(i32(0))
- _walUnlockExclusive(tls, _pWal, i32(0), i32(1))
+ _pWal.XwriteLock = 0
+ _walUnlockExclusive(tls, _pWal, int32(0), int32(1))
_15:
_11:
- if (_badHdr == i32(0)) && (((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X0) != uint32(i32(3007000))) {
- _rc = _sqlite3CantopenError(tls, i32(56597))
+ if (_badHdr == int32(0)) && ((_pWal.Xhdr.XiVersion) != uint32(3007000)) {
+ _rc = _sqlite3CantopenError(tls, int32(56597))
}
return _rc
}
@@ -21906,57 +22477,59 @@ _11:
var _walIndexReadHdrØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_walIndexReadHdrØ00__func__Ø000[0], str(22621), 16)
-}
-
-// Try to read the wal-index header. Return 0 on success and 1 if
-// there is a problem.
-//
-// The wal-index is in shared memory. Another thread or process might
-// be writing the header at the same time this procedure is trying to
-// read it, which might result in inconsistency. A dirty read is detected
-// by verifying that both copies of the header are the same and also by
-// a checksum on the header.
-//
-// If and only if the read is consistent and the header is different from
-// pWal->hdr, then pWal->hdr is updated to the content of the new header
-// and *pChanged is set to 1.
-//
-// If the checksum cannot be verified return non-zero. If the header
-// is read successfully and the checksum verified, return zero.
+ crt.Xstrncpy(nil, &_walIndexReadHdrØ00__func__Ø000[0], str(22576), 16)
+}
+
+// C comment
+// /*
+// ** Try to read the wal-index header. Return 0 on success and 1 if
+// ** there is a problem.
+// **
+// ** The wal-index is in shared memory. Another thread or process might
+// ** be writing the header at the same time this procedure is trying to
+// ** read it, which might result in inconsistency. A dirty read is detected
+// ** by verifying that both copies of the header are the same and also by
+// ** a checksum on the header.
+// **
+// ** If and only if the read is consistent and the header is different from
+// ** pWal->hdr, then pWal->hdr is updated to the content of the new header
+// ** and *pChanged is set to 1.
+// **
+// ** If the checksum cannot be verified return non-zero. If the header
+// ** is read successfully and the checksum verified, return zero.
+// */
func _walIndexTryHdr(tls *crt.TLS, _pWal *XWal, _pChanged *int32) (r0 int32) {
var _aCksum [2]uint32
var _h1, _h2 XWalIndexHdr
var _aHdr *XWalIndexHdr
func() {
- if (_pWal.X5) <= i32(0) || (*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(i32(0))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56490), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexTryHdrØ00__func__Ø000))), unsafe.Pointer(str(15271)))
+ if _pWal.XnWiData <= int32(0) || (*elem36(_pWal.XapWiData, 0)) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56490), unsafe.Pointer(&_walIndexTryHdrØ00__func__Ø000), unsafe.Pointer(str(15226)))
crt.X__builtin_abort(tls)
}
}()
_aHdr = _walIndexHdr(tls, _pWal)
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_h1), (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHdr))+48*uintptr(i32(0))))), u32(48))
+ crt.Xmemcpy(tls, unsafe.Pointer(&_h1), unsafe.Pointer(elem44(_aHdr, 0)), uint32(48))
_walShmBarrier(tls, _pWal)
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_h2), (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHdr))+48*uintptr(i32(1))))), u32(48))
- if crt.Xmemcmp(tls, (unsafe.Pointer)(&_h1), (unsafe.Pointer)(&_h2), u32(48)) != i32(0) {
- return i32(1)
+ crt.Xmemcpy(tls, unsafe.Pointer(&_h2), unsafe.Pointer(elem44(_aHdr, uintptr(1))), uint32(48))
+ if crt.Xmemcmp(tls, unsafe.Pointer(&_h1), unsafe.Pointer(&_h2), uint32(48)) != int32(0) {
+ return int32(1)
}
- if int32(_h1.X3) == i32(0) {
- return i32(1)
+ if int32(_h1.XisInit) == int32(0) {
+ return int32(1)
}
- _walChecksumBytes(tls, i32(1), (*uint8)(unsafe.Pointer(&_h1)), int32(u32(40)), nil, (*uint32)(unsafe.Pointer(&_aCksum)))
- if ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aCksum)) + 4*uintptr(i32(0))))) != (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_h1.X10))))) + 4*uintptr(i32(0)))))) || ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aCksum)) + 4*uintptr(i32(1))))) != (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_h1.X10))))) + 4*uintptr(i32(1)))))) {
- return i32(1)
+ _walChecksumBytes(tls, int32(1), (*uint8)(unsafe.Pointer(&_h1)), int32(40), nil, (*uint32)(unsafe.Pointer(&_aCksum)))
+ if ((*elem7((*uint32)(unsafe.Pointer(&_aCksum)), 0)) != (*elem7((*uint32)(unsafe.Pointer(&_h1.XaCksum)), 0))) || ((*elem7((*uint32)(unsafe.Pointer(&_aCksum)), uintptr(1))) != (*elem7((*uint32)(unsafe.Pointer(&_h1.XaCksum)), uintptr(1)))) {
+ return int32(1)
}
- if crt.Xmemcmp(tls, (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), (unsafe.Pointer)(&_h1), u32(48)) != 0 {
- *_pChanged = i32(1)
- crt.Xmemcpy(tls, (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), (unsafe.Pointer)(&_h1), u32(48))
- *(*uint32)(unsafe.Pointer(&(_pWal.X8))) = uint32((int32((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X5) & i32(65024)) + ((int32((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X5) & i32(1)) << uint(i32(16))))
+ if crt.Xmemcmp(tls, unsafe.Pointer(&_pWal.Xhdr), unsafe.Pointer(&_h1), uint32(48)) != 0 {
+ *_pChanged = int32(1)
+ crt.Xmemcpy(tls, unsafe.Pointer(&_pWal.Xhdr), unsafe.Pointer(&_h1), uint32(48))
+ _pWal.XszPage = uint32((int32(_pWal.Xhdr.XszPage) & int32(65024)) + ((int32(_pWal.Xhdr.XszPage) & int32(1)) << 16))
}
- return i32(0)
+ return int32(0)
_ = _aCksum
- _ = _h1
_ = _h2
panic(0)
}
@@ -21964,49 +22537,53 @@ func _walIndexTryHdr(tls *crt.TLS, _pWal *XWal, _pChanged *int32) (r0 int32) {
var _walIndexTryHdrØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_walIndexTryHdrØ00__func__Ø000[0], str(22637), 15)
+ crt.Xstrncpy(nil, &_walIndexTryHdrØ00__func__Ø000[0], str(22592), 15)
}
func _walShmBarrier(tls *crt.TLS, _pWal *XWal) {
- if int32(_pWal.X11) != i32(2) {
- _sqlite3OsShmBarrier(tls, (*Xsqlite3_file)(_pWal.X1))
+ if int32(_pWal.XexclusiveMode) != int32(2) {
+ _sqlite3OsShmBarrier(tls, (*Xsqlite3_file)(_pWal.XpDbFd))
}
}
func _sqlite3OsShmBarrier(tls *crt.TLS, _id *Xsqlite3_file) {
- (*(*func(*crt.TLS, *Xsqlite3_file))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*Xsqlite3_io_methods)(_id.X0).X15)})))(tls, _id)
-}
-
-// Generate or extend an 8 byte checksum based on the data in
-// array aByte[] and the initial values of aIn[0] and aIn[1] (or
-// initial values of 0 and 0 if aIn==NULL).
-//
-// The checksum is written back into aOut[] before returning.
-//
-// nByte must be a positive multiple of 8.
+ func() func(*crt.TLS, *Xsqlite3_file) {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxShmBarrier
+ return *(*func(*crt.TLS, *Xsqlite3_file))(unsafe.Pointer(&v))
+ }()(tls, _id)
+}
+
+// C comment
+// /*
+// ** Generate or extend an 8 byte checksum based on the data in
+// ** array aByte[] and the initial values of aIn[0] and aIn[1] (or
+// ** initial values of 0 and 0 if aIn==NULL).
+// **
+// ** The checksum is written back into aOut[] before returning.
+// **
+// ** nByte must be a positive multiple of 8.
+// */
func _walChecksumBytes(tls *crt.TLS, _nativeCksum int32, _a *uint8, _nByte int32, _aIn *uint32, _aOut *uint32) {
var _s1, _s2 uint32
var _aData, _aEnd *uint32
_aData = (*uint32)(unsafe.Pointer(_a))
- _aEnd = (*uint32)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a)) + 1*uintptr(_nByte)))))
+ _aEnd = (*uint32)(unsafe.Pointer(elem15(_a, uintptr(_nByte))))
if _aIn != nil {
- _s1 = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aIn)) + 4*uintptr(i32(0))))
- _s2 = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aIn)) + 4*uintptr(i32(1))))
+ _s1 = *elem7(_aIn, 0)
+ _s2 = *elem7(_aIn, uintptr(1))
goto _1
}
- _s1 = store5(&_s2, uint32(i32(0)))
+ _s1 = store23(&_s2, 0)
_1:
func() {
- if _nByte < i32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55109), unsafe.Pointer((*int8)(unsafe.Pointer(&_walChecksumBytesØ00__func__Ø000))), unsafe.Pointer(str(22652)))
+ if _nByte < int32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55109), unsafe.Pointer(&_walChecksumBytesØ00__func__Ø000), unsafe.Pointer(str(22607)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_nByte & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55110), unsafe.Pointer((*int8)(unsafe.Pointer(&_walChecksumBytesØ00__func__Ø000))), unsafe.Pointer(str(22661)))
+ if (_nByte & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55110), unsafe.Pointer(&_walChecksumBytesØ00__func__Ø000), unsafe.Pointer(str(22616)))
crt.X__builtin_abort(tls)
}
}()
@@ -22014,59 +22591,42 @@ _1:
goto _6
}
_7:
- {
- p := &_s1
- *p = (*p) + ((*postInc31(&_aData, 4)) + _s2)
- sink5(*p)
- }
- {
- p := &_s2
- *p = (*p) + ((*postInc31(&_aData, 4)) + _s1)
- sink5(*p)
- }
- if uintptr(unsafe.Pointer(_aData)) < uintptr(unsafe.Pointer(_aEnd)) {
+ _s1 += (*postInc7(&_aData, 4)) + _s2
+ _s2 += (*postInc7(&_aData, 4)) + _s1
+ if crt.P2U(unsafe.Pointer(_aData)) < crt.P2U(unsafe.Pointer(_aEnd)) {
goto _7
}
goto _8
_6:
_9:
- {
- p := &_s1
- *p = (*p) + (((((((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 4*uintptr(i32(0))))) & uint32(i32(255))) << uint(i32(24))) + (((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 4*uintptr(i32(0))))) & uint32(i32(65280))) << uint(i32(8)))) + (((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 4*uintptr(i32(0))))) & uint32(i32(16711680))) >> uint(i32(8)))) + (((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 4*uintptr(i32(0))))) & u32(4278190080)) >> uint(i32(24)))) + _s2)
- sink5(*p)
- }
- {
- p := &_s2
- *p = (*p) + (((((((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 4*uintptr(i32(1))))) & uint32(i32(255))) << uint(i32(24))) + (((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 4*uintptr(i32(1))))) & uint32(i32(65280))) << uint(i32(8)))) + (((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 4*uintptr(i32(1))))) & uint32(i32(16711680))) >> uint(i32(8)))) + (((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 4*uintptr(i32(1))))) & u32(4278190080)) >> uint(i32(24)))) + _s1)
- sink5(*p)
- }
- {
- p := &_aData
- *p = (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 4*uintptr(i32(2))))
- sink31(*p)
- }
- if uintptr(unsafe.Pointer(_aData)) < uintptr(unsafe.Pointer(_aEnd)) {
+ _s1 += ((((((*elem7(_aData, 0)) & uint32(255)) << 24) + (((*elem7(_aData, 0)) & uint32(65280)) << 8)) + (((*elem7(_aData, 0)) & uint32(16711680)) >> 8)) + (((*elem7(_aData, 0)) & uint32(4278190080)) >> 24)) + _s2
+ _s2 += ((((((*elem7(_aData, uintptr(1))) & uint32(255)) << 24) + (((*elem7(_aData, uintptr(1))) & uint32(65280)) << 8)) + (((*elem7(_aData, uintptr(1))) & uint32(16711680)) >> 8)) + (((*elem7(_aData, uintptr(1))) & uint32(4278190080)) >> 24)) + _s1
+ *(*uintptr)(unsafe.Pointer(&_aData)) += 4 * uintptr(int32(2))
+ if crt.P2U(unsafe.Pointer(_aData)) < crt.P2U(unsafe.Pointer(_aEnd)) {
goto _9
}
_8:
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOut)) + 4*uintptr(i32(0)))) = _s1
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOut)) + 4*uintptr(i32(1)))) = _s2
+ *elem7(_aOut, 0) = _s1
+ *elem7(_aOut, uintptr(1)) = _s2
}
var _walChecksumBytesØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_walChecksumBytesØ00__func__Ø000[0], str(22683), 17)
+ crt.Xstrncpy(nil, &_walChecksumBytesØ00__func__Ø000[0], str(22638), 17)
}
-// Recover the wal-index by reading the write-ahead log file.
-//
-// This routine first tries to establish an exclusive lock on the
-// wal-index to prevent other threads/processes from doing anything
-// with the WAL or wal-index while recovery is running. The
-// WAL_RECOVER_LOCK is also held so that other threads will know
-// that this thread is running recovery. If unable to establish
-// the necessary locks, this routine returns SQLITE_BUSY.
+// C comment
+// /*
+// ** Recover the wal-index by reading the write-ahead log file.
+// **
+// ** This routine first tries to establish an exclusive lock on the
+// ** wal-index to prevent other threads/processes from doing anything
+// ** with the WAL or wal-index while recovery is running. The
+// ** WAL_RECOVER_LOCK is also held so that other threads will know
+// ** that this thread is running recovery. If unable to establish
+// ** the necessary locks, this routine returns SQLITE_BUSY.
+// */
func _walIndexRecover(tls *crt.TLS, _pWal *XWal) (r0 int32) {
var _rc, _iLock, _nLock, _3_szFrame, _3_iFrame, _3_szPage, _3_isValid, _11_i int32
var _nSize, _3_iOffset int64
@@ -22077,72 +22637,71 @@ func _walIndexRecover(tls *crt.TLS, _pWal *XWal) (r0 int32) {
var _11_pInfo *XWalCkptInfo
_aFrameCksum = [2]uint32{}
func() {
- if int32(_pWal.X13) != i32(1) && int32(_pWal.X13) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55574), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexRecoverØ00__func__Ø000))), unsafe.Pointer(str(22700)))
+ if int32(_pWal.XckptLock) != int32(1) && int32(_pWal.XckptLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55574), unsafe.Pointer(&_walIndexRecoverØ00__func__Ø000), unsafe.Pointer(str(22655)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- i32(0)
+
func() {
- if (_pWal.X12) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55577), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexRecoverØ00__func__Ø000))), unsafe.Pointer(str(15606)))
+ if _pWal.XwriteLock == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55577), unsafe.Pointer(&_walIndexRecoverØ00__func__Ø000), unsafe.Pointer(str(15561)))
crt.X__builtin_abort(tls)
}
}()
- _iLock = i32(1) + int32(_pWal.X13)
- _nLock = i32(8) - _iLock
+ _iLock = int32(1) + int32(_pWal.XckptLock)
+ _nLock = int32(8) - _iLock
_rc = _walLockExclusive(tls, _pWal, _iLock, _nLock)
if _rc != 0 {
return _rc
}
- crt.Xmemset(tls, (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), i32(0), u32(48))
- _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pWal.X2), &_nSize)
- if _rc != i32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(&_pWal.Xhdr), int32(0), uint32(48))
+ _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pWal.XpWalFd), &_nSize)
+ if _rc != int32(0) {
goto _recovery_error
}
- if _nSize <= int64(i32(32)) {
+ if _nSize <= int64(32) {
goto _finished
}
_3_aFrame = nil
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.X2), (unsafe.Pointer)(&_3_aBuf), i32(32), int64(i32(0)))
- if _rc != i32(0) {
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.XpWalFd), unsafe.Pointer(&_3_aBuf), int32(32), 0)
+ if _rc != int32(0) {
goto _recovery_error
}
- _3_magic = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aBuf))+1*uintptr(i32(0)))))
- _3_szPage = int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aBuf))+1*uintptr(i32(8))))))
- if ((((_3_magic & u32(4294967294)) != uint32(i32(931071618))) || (_3_szPage&(_3_szPage-i32(1))) != 0) || (_3_szPage > i32(65536))) || (_3_szPage < i32(512)) {
+ _3_magic = _sqlite3Get4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aBuf)), 0))
+ _3_szPage = int32(_sqlite3Get4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aBuf)), uintptr(8))))
+ if ((((_3_magic & uint32(4294967294)) != uint32(931071618)) || (_3_szPage&(_3_szPage-int32(1))) != 0) || (_3_szPage > int32(65536))) || (_3_szPage < int32(512)) {
goto _finished
}
- *(*uint8)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X4))) = uint8(_3_magic & uint32(i32(1)))
- *(*uint32)(unsafe.Pointer(&(_pWal.X8))) = uint32(_3_szPage)
- *(*uint32)(unsafe.Pointer(&(_pWal.X22))) = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aBuf))+1*uintptr(i32(12)))))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X9)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aBuf))+1*uintptr(i32(16))))), uint32(i32(8)))
- _walChecksumBytes(tls, bool2int(int32((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X4) == i32(0)), (*uint8)(unsafe.Pointer(&_3_aBuf)), i32(24), nil, (*uint32)(unsafe.Pointer((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))))
- if ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(0))))) != _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aBuf))+1*uintptr(i32(24)))))) || ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(1))))) != _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aBuf))+1*uintptr(i32(28)))))) {
+ _pWal.Xhdr.XbigEndCksum = uint8(_3_magic & uint32(1))
+ _pWal.XszPage = uint32(_3_szPage)
+ _pWal.XnCkpt = _sqlite3Get4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aBuf)), uintptr(12)))
+ crt.Xmemcpy(tls, unsafe.Pointer(&(_pWal.Xhdr.XaSalt)), unsafe.Pointer(elem15((*uint8)(unsafe.Pointer(&_3_aBuf)), uintptr(16))), uint32(8))
+ _walChecksumBytes(tls, bool2int(int32(_pWal.Xhdr.XbigEndCksum) == int32(0)), (*uint8)(unsafe.Pointer(&_3_aBuf)), int32(24), nil, (*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))))
+ if ((*elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), 0)) != _sqlite3Get4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aBuf)), uintptr(24)))) || ((*elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), uintptr(1))) != _sqlite3Get4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aBuf)), uintptr(28)))) {
goto _finished
}
- _3_version = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aBuf))+1*uintptr(i32(4)))))
- if _3_version != uint32(i32(3007000)) {
- _rc = _sqlite3CantopenError(tls, i32(55644))
+ _3_version = _sqlite3Get4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aBuf)), uintptr(4)))
+ if _3_version != uint32(3007000) {
+ _rc = _sqlite3CantopenError(tls, int32(55644))
goto _finished
}
- _3_szFrame = _3_szPage + i32(24)
+ _3_szFrame = _3_szPage + int32(24)
_3_aFrame = (*uint8)(Xsqlite3_malloc64(tls, uint64(_3_szFrame)))
if _3_aFrame == nil {
- _rc = _sqlite3NomemError(tls, i32(55652))
+ _rc = _sqlite3NomemError(tls, int32(55652))
goto _recovery_error
}
- _3_aData = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_aFrame)) + 1*uintptr(i32(24))))
- _3_iFrame = i32(0)
- _3_iOffset = int64(i32(32))
+ _3_aData = elem15(_3_aFrame, uintptr(24))
+ _3_iFrame = int32(0)
+ _3_iOffset = int64(32)
_17:
if (_3_iOffset + int64(_3_szFrame)) > _nSize {
goto _20
}
_3_iFrame += 1
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.X2), (unsafe.Pointer)(_3_aFrame), _3_szFrame, _3_iOffset)
- if _rc != i32(0) {
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.XpWalFd), unsafe.Pointer(_3_aFrame), _3_szFrame, _3_iOffset)
+ if _rc != int32(0) {
goto _20
}
_3_isValid = _walDecodeFrame(tls, _pWal, &_9_pgno, &_9_nTruncate, _3_aData, _3_aFrame)
@@ -22150,49 +22709,45 @@ _17:
goto _20
}
_rc = _walIndexAppend(tls, _pWal, uint32(_3_iFrame), _9_pgno)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _20
}
if _9_nTruncate != 0 {
- *(*uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6))) = uint32(_3_iFrame)
- *(*uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X7))) = _9_nTruncate
- *(*uint16)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X5))) = uint16((_3_szPage & i32(65280)) | (_3_szPage >> uint(i32(16))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFrameCksum)) + 4*uintptr(i32(0)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(0))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFrameCksum)) + 4*uintptr(i32(1)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(1))))
- }
- {
- p := &_3_iOffset
- *p = (*p) + int64(_3_szFrame)
- sink6(*p)
+ _pWal.Xhdr.XmxFrame = uint32(_3_iFrame)
+ _pWal.Xhdr.XnPage = _9_nTruncate
+ _pWal.Xhdr.XszPage = uint16((_3_szPage & int32(65280)) | (_3_szPage >> 16))
+ *elem7((*uint32)(unsafe.Pointer(&_aFrameCksum)), 0) = *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), 0)
+ *elem7((*uint32)(unsafe.Pointer(&_aFrameCksum)), uintptr(1)) = *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), uintptr(1))
}
+ _3_iOffset += int64(_3_szFrame)
goto _17
_20:
- Xsqlite3_free(tls, (unsafe.Pointer)(_3_aFrame))
+ Xsqlite3_free(tls, unsafe.Pointer(_3_aFrame))
_finished:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _recovery_error
}
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(0)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFrameCksum)) + 4*uintptr(i32(0))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(1)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFrameCksum)) + 4*uintptr(i32(1))))
+ *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), 0) = *elem7((*uint32)(unsafe.Pointer(&_aFrameCksum)), 0)
+ *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), uintptr(1)) = *elem7((*uint32)(unsafe.Pointer(&_aFrameCksum)), uintptr(1))
_walIndexWriteHdr(tls, _pWal)
_11_pInfo = _walCkptInfo(tls, _pWal)
- *(*uint32)(unsafe.Pointer(&(_11_pInfo.X0))) = uint32(i32(0))
- *(*uint32)(unsafe.Pointer(&(_11_pInfo.X3))) = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_11_pInfo.X1))))) + 4*uintptr(i32(0)))) = uint32(i32(0))
- _11_i = i32(1)
+ _11_pInfo.XnBackfill = 0
+ _11_pInfo.XnBackfillAttempted = _pWal.Xhdr.XmxFrame
+ *elem7((*uint32)(unsafe.Pointer(&_11_pInfo.XaReadMark)), 0) = 0
+ _11_i = int32(1)
_26:
- if _11_i >= i32(5) {
+ if _11_i >= int32(5) {
goto _29
}
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_11_pInfo.X1))))) + 4*uintptr(_11_i))) = u32(4294967295)
+ *elem7((*uint32)(unsafe.Pointer(&_11_pInfo.XaReadMark)), uintptr(_11_i)) = uint32(4294967295)
_11_i += 1
goto _26
_29:
- if ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) != 0 {
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_11_pInfo.X1))))) + 4*uintptr(i32(1)))) = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
+ if (_pWal.Xhdr.XmxFrame) != 0 {
+ *elem7((*uint32)(unsafe.Pointer(&_11_pInfo.XaReadMark)), uintptr(1)) = _pWal.Xhdr.XmxFrame
}
- if ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X7) != 0 {
- Xsqlite3_log(tls, i32(283), str(22739), (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6, unsafe.Pointer(_pWal.X21))
+ if (_pWal.Xhdr.XnPage) != 0 {
+ Xsqlite3_log(tls, int32(283), str(22694), _pWal.Xhdr.XmxFrame, unsafe.Pointer(_pWal.XzWalName))
}
_recovery_error:
_walUnlockExclusive(tls, _pWal, _iLock, _nLock)
@@ -22206,70 +22761,76 @@ _recovery_error:
var _walIndexRecoverØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_walIndexRecoverØ00__func__Ø000[0], str(22776), 16)
+ crt.Xstrncpy(nil, &_walIndexRecoverØ00__func__Ø000[0], str(22731), 16)
}
func _sqlite3CantopenError(tls *crt.TLS, _lineno int32) (r0 int32) {
- return _reportError(tls, i32(14), _lineno, str(22792))
+ return _reportError(tls, int32(14), _lineno, str(22747))
}
-// Check to see if the frame with header in aFrame[] and content
-// in aData[] is valid. If it is a valid frame, fill *piPage and
-// *pnTruncate and return true. Return if the frame is not valid.
+// C comment
+// /*
+// ** Check to see if the frame with header in aFrame[] and content
+// ** in aData[] is valid. If it is a valid frame, fill *piPage and
+// ** *pnTruncate and return true. Return if the frame is not valid.
+// */
func _walDecodeFrame(tls *crt.TLS, _pWal *XWal, _piPage *uint32, _pnTruncate *uint32, _aData *uint8, _aFrame *uint8) (r0 int32) {
var _nativeCksum int32
var _pgno uint32
var _aCksum *uint32
- _aCksum = (*uint32)(unsafe.Pointer((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8)))))
- i32(0)
- if crt.Xmemcmp(tls, (unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X9)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(8))))), uint32(i32(8))) != i32(0) {
- return i32(0)
+ _aCksum = (*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum)))
+
+ if crt.Xmemcmp(tls, unsafe.Pointer(&(_pWal.Xhdr.XaSalt)), unsafe.Pointer(elem15(_aFrame, uintptr(8))), uint32(8)) != int32(0) {
+ return int32(0)
}
- _pgno = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(0)))))
- if _pgno == uint32(i32(0)) {
- return i32(0)
+ _pgno = _sqlite3Get4byte(tls, elem15(_aFrame, 0))
+ if _pgno == (0) {
+ return int32(0)
}
- _nativeCksum = bool2int(int32((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X4) == i32(0))
- _walChecksumBytes(tls, _nativeCksum, _aFrame, i32(8), _aCksum, _aCksum)
- _walChecksumBytes(tls, _nativeCksum, _aData, int32(_pWal.X8), _aCksum, _aCksum)
- if ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aCksum)) + 4*uintptr(i32(0))))) != _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(16)))))) || ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aCksum)) + 4*uintptr(i32(1))))) != _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(20)))))) {
- return i32(0)
+ _nativeCksum = bool2int(int32(_pWal.Xhdr.XbigEndCksum) == int32(0))
+ _walChecksumBytes(tls, _nativeCksum, _aFrame, int32(8), _aCksum, _aCksum)
+ _walChecksumBytes(tls, _nativeCksum, _aData, int32(_pWal.XszPage), _aCksum, _aCksum)
+ if ((*elem7(_aCksum, 0)) != _sqlite3Get4byte(tls, elem15(_aFrame, uintptr(16)))) || ((*elem7(_aCksum, uintptr(1))) != _sqlite3Get4byte(tls, elem15(_aFrame, uintptr(20)))) {
+ return int32(0)
}
*_piPage = _pgno
- *_pnTruncate = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(4)))))
- return i32(1)
+ *_pnTruncate = _sqlite3Get4byte(tls, elem15(_aFrame, uintptr(4)))
+ return int32(1)
}
-// Set an entry in the wal-index that will map database page number
-// pPage into WAL frame iFrame.
+// C comment
+// /*
+// ** Set an entry in the wal-index that will map database page number
+// ** pPage into WAL frame iFrame.
+// */
func _walIndexAppend(tls *crt.TLS, _pWal *XWal, _iFrame uint32, _iPage uint32) (r0 int32) {
var _rc, _1_iKey, _1_idx, _1_nCollide, _2_nByte int32
var _iZero uint32
var _aPgno *uint32
var _aHash *uint16
- _iZero = u32(0)
+ _iZero = uint32(0)
_aPgno = nil
_aHash = nil
_rc = _walHashGet(tls, _pWal, _walFramePage(tls, _iFrame), &_aHash, &_aPgno, &_iZero)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _0
}
_1_idx = int32(_iFrame - _iZero)
func() {
- if _1_idx > i32(4097) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55489), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexAppendØ00__func__Ø000))), unsafe.Pointer(str(22809)))
+ if _1_idx > int32(4097) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55489), unsafe.Pointer(&_walIndexAppendØ00__func__Ø000), unsafe.Pointer(str(22764)))
crt.X__builtin_abort(tls)
}
}()
- if _1_idx == i32(1) {
- _2_nByte = int32((uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHash))+2*uintptr(i32(8192)))))))) - uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno))+4*uintptr(i32(1))))))))) / 1)
- crt.Xmemset(tls, (unsafe.Pointer)((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno))+4*uintptr(i32(1))))), i32(0), uint32(_2_nByte))
+ if _1_idx == int32(1) {
+ _2_nByte = int32(uintptr(unsafe.Pointer(elem20(_aHash, uintptr(8192)))) - uintptr(unsafe.Pointer(elem7(_aPgno, uintptr(1)))))
+ crt.Xmemset(tls, unsafe.Pointer(elem7(_aPgno, uintptr(1))), int32(0), uint32(_2_nByte))
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno)) + 4*uintptr(_1_idx)))) != 0 {
+ if (*elem7(_aPgno, uintptr(_1_idx))) != 0 {
_walCleanupHash(tls, _pWal)
func() {
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno)) + 4*uintptr(_1_idx)))) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55507), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexAppendØ00__func__Ø000))), unsafe.Pointer(str(22838)))
+ if (*elem7(_aPgno, uintptr(_1_idx))) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55507), unsafe.Pointer(&_walIndexAppendØ00__func__Ø000), unsafe.Pointer(str(22793)))
crt.X__builtin_abort(tls)
}
}()
@@ -22277,17 +22838,17 @@ func _walIndexAppend(tls *crt.TLS, _pWal *XWal, _iFrame uint32, _iPage uint32) (
_1_nCollide = _1_idx
_1_iKey = _walHash(tls, _iPage)
_7:
- if (*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHash)) + 2*uintptr(_1_iKey)))) == 0 {
+ if (*elem20(_aHash, uintptr(_1_iKey))) == 0 {
goto _10
}
- if postInc1(&_1_nCollide, int32(-1)) == i32(0) {
- return _sqlite3CorruptError(tls, i32(55513))
+ if postInc2(&_1_nCollide, -1) == int32(0) {
+ return _sqlite3CorruptError(tls, int32(55513))
}
_1_iKey = _walNextHash(tls, _1_iKey)
goto _7
_10:
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPgno)) + 4*uintptr(_1_idx))) = _iPage
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHash)) + 2*uintptr(_1_iKey))) = uint16(_1_idx)
+ *elem7(_aPgno, uintptr(_1_idx)) = _iPage
+ *elem20(_aHash, uintptr(_1_iKey)) = uint16(_1_idx)
_0:
return _rc
@@ -22298,153 +22859,161 @@ _0:
var _walIndexAppendØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_walIndexAppendØ00__func__Ø000[0], str(22850), 15)
+ crt.Xstrncpy(nil, &_walIndexAppendØ00__func__Ø000[0], str(22805), 15)
}
-// Write the header information in pWal->hdr into the wal-index.
-//
-// The checksum on pWal->hdr is updated before it is written.
+// C comment
+// /*
+// ** Write the header information in pWal->hdr into the wal-index.
+// **
+// ** The checksum on pWal->hdr is updated before it is written.
+// */
func _walIndexWriteHdr(tls *crt.TLS, _pWal *XWal) {
var _nCksum int32
var _aHdr *XWalIndexHdr
_aHdr = _walIndexHdr(tls, _pWal)
- _nCksum = i32(40)
+ _nCksum = int32(40)
func() {
- if (_pWal.X12) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55144), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIndexWriteHdrØ00__func__Ø000))), unsafe.Pointer(str(15606)))
+ if _pWal.XwriteLock == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55144), unsafe.Pointer(&_walIndexWriteHdrØ00__func__Ø000), unsafe.Pointer(str(15561)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X3))) = uint8(i32(1))
- *(*uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X0))) = uint32(i32(3007000))
- _walChecksumBytes(tls, i32(1), (*uint8)(unsafe.Pointer((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))))), _nCksum, nil, (*uint32)(unsafe.Pointer((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X10))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHdr))+48*uintptr(i32(1))))), (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), u32(48))
+ _pWal.Xhdr.XisInit = uint8(1)
+ _pWal.Xhdr.XiVersion = uint32(3007000)
+ _walChecksumBytes(tls, int32(1), (*uint8)(unsafe.Pointer(&_pWal.Xhdr)), _nCksum, nil, (*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaCksum))))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem44(_aHdr, uintptr(1))), unsafe.Pointer(&_pWal.Xhdr), uint32(48))
_walShmBarrier(tls, _pWal)
- crt.Xmemcpy(tls, (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHdr))+48*uintptr(i32(0))))), (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), u32(48))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem44(_aHdr, 0)), unsafe.Pointer(&_pWal.Xhdr), uint32(48))
}
var _walIndexWriteHdrØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_walIndexWriteHdrØ00__func__Ø000[0], str(22865), 17)
+ crt.Xstrncpy(nil, &_walIndexWriteHdrØ00__func__Ø000[0], str(22820), 17)
}
-// Return a pointer to the WalCkptInfo structure in the wal-index.
+// C comment
+// /*
+// ** Return a pointer to the WalCkptInfo structure in the wal-index.
+// */
func _walCkptInfo(tls *crt.TLS, _pWal *XWal) (r0 *XWalCkptInfo) {
func() {
- if (_pWal.X5) <= i32(0) || (*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(i32(0))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55058), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCkptInfoØ00__func__Ø000))), unsafe.Pointer(str(15271)))
+ if _pWal.XnWiData <= int32(0) || (*elem36(_pWal.XapWiData, 0)) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55058), unsafe.Pointer(&_walCkptInfoØ00__func__Ø000), unsafe.Pointer(str(15226)))
crt.X__builtin_abort(tls)
}
}()
- return (*XWalCkptInfo)(unsafe.Pointer((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(i32(0)))))) + 4*uintptr(u32(24))))))
+ return (*XWalCkptInfo)(unsafe.Pointer(elem7(*elem36(_pWal.XapWiData, 0), uintptr(24))))
}
var _walCkptInfoØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_walCkptInfoØ00__func__Ø000[0], str(22882), 12)
+ crt.Xstrncpy(nil, &_walCkptInfoØ00__func__Ø000[0], str(22837), 12)
}
-// The cache of the wal-index header must be valid to call this function.
-// Return the page-size in bytes used by the database.
+// C comment
+// /*
+// ** The cache of the wal-index header must be valid to call this function.
+// ** Return the page-size in bytes used by the database.
+// */
func _walPagesize(tls *crt.TLS, _pWal *XWal) (r0 int32) {
- return (int32((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X5) & i32(65024)) + ((int32((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X5) & i32(1)) << uint(i32(16)))
-}
-
-// Copy as much content as we can from the WAL back into the database file
-// in response to an sqlite3_wal_checkpoint() request or the equivalent.
-//
-// The amount of information copies from WAL to database might be limited
-// by active readers. This routine will never overwrite a database page
-// that a concurrent reader might be using.
-//
-// All I/O barrier operations (a.k.a fsyncs) occur in this routine when
-// SQLite is in WAL-mode in synchronous=NORMAL. That means that if
-// checkpoints are always run by a background thread or background
-// process, foreground threads will never block on a lengthy fsync call.
-//
-// Fsync is called on the WAL before writing content out of the WAL and
-// into the database. This ensures that if the new content is persistent
-// in the WAL and can be recovered following a power-loss or hard reset.
-//
-// Fsync is also called on the database file if (and only if) the entire
-// WAL content is copied into the database file. This second fsync makes
-// it safe to delete the WAL since the new content will persist in the
-// database file.
-//
-// This routine uses and updates the nBackfill field of the wal-index header.
-// This is the only routine that will increase the value of nBackfill.
-// (A WAL reset or recovery will revert nBackfill to zero, but not increase
-// its value.)
-//
-// The caller must be holding sufficient locks to ensure that no other
-// checkpoint is running (in any other thread or process) at the same
-// time.
+ return (int32(_pWal.Xhdr.XszPage) & int32(65024)) + ((int32(_pWal.Xhdr.XszPage) & int32(1)) << 16)
+}
+
+// C comment
+// /*
+// ** Copy as much content as we can from the WAL back into the database file
+// ** in response to an sqlite3_wal_checkpoint() request or the equivalent.
+// **
+// ** The amount of information copies from WAL to database might be limited
+// ** by active readers. This routine will never overwrite a database page
+// ** that a concurrent reader might be using.
+// **
+// ** All I/O barrier operations (a.k.a fsyncs) occur in this routine when
+// ** SQLite is in WAL-mode in synchronous=NORMAL. That means that if
+// ** checkpoints are always run by a background thread or background
+// ** process, foreground threads will never block on a lengthy fsync call.
+// **
+// ** Fsync is called on the WAL before writing content out of the WAL and
+// ** into the database. This ensures that if the new content is persistent
+// ** in the WAL and can be recovered following a power-loss or hard reset.
+// **
+// ** Fsync is also called on the database file if (and only if) the entire
+// ** WAL content is copied into the database file. This second fsync makes
+// ** it safe to delete the WAL since the new content will persist in the
+// ** database file.
+// **
+// ** This routine uses and updates the nBackfill field of the wal-index header.
+// ** This is the only routine that will increase the value of nBackfill.
+// ** (A WAL reset or recovery will revert nBackfill to zero, but not increase
+// ** its value.)
+// **
+// ** The caller must be holding sufficient locks to ensure that no other
+// ** checkpoint is running (in any other thread or process) at the same
+// ** time.
+// */
func _walCheckpoint(tls *crt.TLS, _pWal *XWal, _db *Xsqlite3, _eMode int32, _xBusy func(*crt.TLS, unsafe.Pointer) int32, _pBusyArg unsafe.Pointer, _sync_flags int32, _zBuf *uint8) (r0 int32) {
var _rc, _szPage, _i int32
var _8_nSize, _10_nReq, _12_iOffset, _16_szDb int64
var _iDbpage, _iFrame, _mxSafeFrame, _mxPage, _3_y, _8_nBackfill, _22_salt1 uint32
var _pInfo *XWalCkptInfo
var _pIter *XWalIterator
- _rc = i32(0)
+ _rc = int32(0)
_pIter = nil
- _iDbpage = u32(0)
- _iFrame = u32(0)
+ _iDbpage = uint32(0)
+ _iFrame = uint32(0)
_szPage = _walPagesize(tls, _pWal)
_pInfo = _walCkptInfo(tls, _pWal)
- if (_pInfo.X0) >= ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
+ if _pInfo.XnBackfill >= (_pWal.Xhdr.XmxFrame) {
goto _0
}
_rc = _walIteratorInit(tls, _pWal, &_pIter)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
func() {
if _pIter == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56230), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCheckpointØ00__func__Ø000))), unsafe.Pointer(str(22894)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56230), unsafe.Pointer(&_walCheckpointØ00__func__Ø000), unsafe.Pointer(str(22849)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eMode == i32(0) && *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_xBusy})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{nil})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56234), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCheckpointØ00__func__Ø000))), unsafe.Pointer(str(22486)))
+ if _eMode == int32(0) && _xBusy != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56234), unsafe.Pointer(&_walCheckpointØ00__func__Ø000), unsafe.Pointer(str(22441)))
crt.X__builtin_abort(tls)
}
}()
- _mxSafeFrame = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
- _mxPage = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X7
- _i = i32(1)
+ _mxSafeFrame = _pWal.Xhdr.XmxFrame
+ _mxPage = _pWal.Xhdr.XnPage
+ _i = int32(1)
_7:
- if _i >= i32(5) {
+ if _i >= int32(5) {
goto _10
}
- _3_y = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pInfo.X1))))) + 4*uintptr(_i)))
+ _3_y = *elem7((*uint32)(unsafe.Pointer(&_pInfo.XaReadMark)), uintptr(_i))
if _mxSafeFrame <= _3_y {
goto _11
}
func() {
- if _3_y > ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56254), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCheckpointØ00__func__Ø000))), unsafe.Pointer(str(22900)))
+ if _3_y > (_pWal.Xhdr.XmxFrame) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56254), unsafe.Pointer(&_walCheckpointØ00__func__Ø000), unsafe.Pointer(str(22855)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _walBusyLock(tls, _pWal, _xBusy, _pBusyArg, i32(3)+_i, i32(1))
- if _rc == i32(0) {
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pInfo.X1))))) + 4*uintptr(_i))) = func() uint32 {
- if _i == i32(1) {
+ _rc = _walBusyLock(tls, _pWal, _xBusy, _pBusyArg, int32(3)+_i, int32(1))
+ if _rc == int32(0) {
+ *elem7((*uint32)(unsafe.Pointer(&_pInfo.XaReadMark)), uintptr(_i)) = func() uint32 {
+ if _i == int32(1) {
return _mxSafeFrame
}
- return u32(4294967295)
+ return uint32(4294967295)
}()
- _walUnlockExclusive(tls, _pWal, i32(3)+_i, i32(1))
+ _walUnlockExclusive(tls, _pWal, int32(3)+_i, int32(1))
goto _19
}
- if _rc == i32(5) {
+ if _rc == int32(5) {
_mxSafeFrame = _3_y
_xBusy = nil
goto _19
@@ -22455,110 +23024,110 @@ _11:
_i += 1
goto _7
_10:
- if (_pInfo.X0) >= _mxSafeFrame || store1(&_rc, _walBusyLock(tls, _pWal, _xBusy, _pBusyArg, i32(3), i32(1))) != i32(0) {
+ if _pInfo.XnBackfill >= _mxSafeFrame || store2(&_rc, _walBusyLock(tls, _pWal, _xBusy, _pBusyArg, int32(3), int32(1))) != int32(0) {
goto _21
}
- _8_nBackfill = _pInfo.X0
- *(*uint32)(unsafe.Pointer(&(_pInfo.X3))) = _mxSafeFrame
+ _8_nBackfill = _pInfo.XnBackfill
+ _pInfo.XnBackfillAttempted = _mxSafeFrame
if _sync_flags != 0 {
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pWal.X2), _sync_flags)
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pWal.XpWalFd), _sync_flags)
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _23
}
_10_nReq = int64(_mxPage) * int64(_szPage)
- _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pWal.X1), &_8_nSize)
- if (_rc == i32(0)) && (_8_nSize < _10_nReq) {
- _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pWal.X1), i32(5), (unsafe.Pointer)(&_10_nReq))
+ _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pWal.XpDbFd), &_8_nSize)
+ if (_rc == int32(0)) && (_8_nSize < _10_nReq) {
+ _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pWal.XpDbFd), int32(5), unsafe.Pointer(&_10_nReq))
}
_23:
- if _rc != i32(0) || i32(0) != _walIteratorNext(tls, _pIter, &_iDbpage, &_iFrame) {
+ if _rc != int32(0) || int32(0) != _walIteratorNext(tls, _pIter, &_iDbpage, &_iFrame) {
goto _27
}
func() {
if _walFramePgno(tls, _pWal, _iFrame) != _iDbpage {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56296), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCheckpointØ00__func__Ø000))), unsafe.Pointer(str(22921)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56296), unsafe.Pointer(&_walCheckpointØ00__func__Ø000), unsafe.Pointer(str(22876)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57)))))) != 0 {
+ if (*(*int32)(unsafe.Pointer(&_db.Xu1))) != 0 {
_rc = func() int32 {
- if (_db.X17) != 0 {
- return _sqlite3NomemError(tls, i32(56298))
+ if _db.XmallocFailed != 0 {
+ return _sqlite3NomemError(tls, int32(56298))
}
- return i32(9)
+ return int32(9)
}()
goto _27
}
if ((_iFrame <= _8_nBackfill) || (_iFrame > _mxSafeFrame)) || (_iDbpage > _mxPage) {
goto _23
}
- _12_iOffset = (int64(i32(32)) + (int64(_iFrame-uint32(i32(1))) * int64(_szPage+i32(24)))) + int64(i32(24))
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.X2), (unsafe.Pointer)(_zBuf), _szPage, _12_iOffset)
- if _rc != i32(0) {
+ _12_iOffset = (int64(32) + (int64(_iFrame-uint32(1)) * int64(_szPage+int32(24)))) + int64(24)
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.XpWalFd), unsafe.Pointer(_zBuf), _szPage, _12_iOffset)
+ if _rc != int32(0) {
goto _27
}
- _12_iOffset = int64(_iDbpage-uint32(i32(1))) * int64(_szPage)
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pWal.X1), (unsafe.Pointer)(_zBuf), _szPage, _12_iOffset)
- if _rc != i32(0) {
+ _12_iOffset = int64(_iDbpage-uint32(1)) * int64(_szPage)
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pWal.XpDbFd), unsafe.Pointer(_zBuf), _szPage, _12_iOffset)
+ if _rc != int32(0) {
goto _27
}
goto _23
_27:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _39
}
- if _mxSafeFrame != (_walIndexHdr(tls, _pWal).X6) {
+ if _mxSafeFrame != (_walIndexHdr(tls, _pWal).XmxFrame) {
goto _40
}
- _16_szDb = int64((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X7) * int64(_szPage)
- _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pWal.X1), _16_szDb)
- if (_rc == i32(0)) && _sync_flags != 0 {
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pWal.X1), _sync_flags)
+ _16_szDb = int64(_pWal.Xhdr.XnPage) * int64(_szPage)
+ _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pWal.XpDbFd), _16_szDb)
+ if (_rc == int32(0)) && _sync_flags != 0 {
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pWal.XpDbFd), _sync_flags)
}
_40:
- if _rc == i32(0) {
- *(*uint32)(unsafe.Pointer(&(_pInfo.X0))) = _mxSafeFrame
+ if _rc == int32(0) {
+ _pInfo.XnBackfill = _mxSafeFrame
}
_39:
- _walUnlockExclusive(tls, _pWal, i32(3), i32(1))
+ _walUnlockExclusive(tls, _pWal, int32(3), int32(1))
_21:
- if _rc == i32(5) {
- _rc = i32(0)
+ if _rc == int32(5) {
+ _rc = int32(0)
}
_0:
- if _rc != i32(0) || _eMode == i32(0) {
+ if _rc != int32(0) || _eMode == int32(0) {
goto _walcheckpoint_out
}
func() {
- if (_pWal.X12) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56346), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCheckpointØ00__func__Ø000))), unsafe.Pointer(str(15606)))
+ if _pWal.XwriteLock == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56346), unsafe.Pointer(&_walCheckpointØ00__func__Ø000), unsafe.Pointer(str(15561)))
crt.X__builtin_abort(tls)
}
}()
- if (_pInfo.X0) < ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
- _rc = i32(5)
+ if _pInfo.XnBackfill < (_pWal.Xhdr.XmxFrame) {
+ _rc = int32(5)
goto _51
}
- if _eMode < i32(2) {
+ if _eMode < int32(2) {
goto _51
}
- Xsqlite3_randomness(tls, i32(4), (unsafe.Pointer)(&_22_salt1))
+ Xsqlite3_randomness(tls, int32(4), unsafe.Pointer(&_22_salt1))
func() {
- if (_pInfo.X0) != ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56352), unsafe.Pointer((*int8)(unsafe.Pointer(&_walCheckpointØ00__func__Ø000))), unsafe.Pointer(str(22957)))
+ if _pInfo.XnBackfill != (_pWal.Xhdr.XmxFrame) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56352), unsafe.Pointer(&_walCheckpointØ00__func__Ø000), unsafe.Pointer(str(22912)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _walBusyLock(tls, _pWal, _xBusy, _pBusyArg, i32(4), i32(4))
- if _rc != i32(0) {
+ _rc = _walBusyLock(tls, _pWal, _xBusy, _pBusyArg, int32(4), int32(4))
+ if _rc != int32(0) {
goto _54
}
- if _eMode == i32(3) {
+ if _eMode == int32(3) {
_walRestartHdr(tls, _pWal, _22_salt1)
- _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pWal.X2), int64(i32(0)))
+ _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pWal.XpWalFd), 0)
}
- _walUnlockExclusive(tls, _pWal, i32(4), i32(4))
+ _walUnlockExclusive(tls, _pWal, int32(4), int32(4))
_54:
_51:
_walcheckpoint_out:
@@ -22566,85 +23135,88 @@ _walcheckpoint_out:
return _rc
}
-// Construct a WalInterator object that can be used to loop over all
-// pages in the WAL in ascending order. The caller must hold the checkpoint
-// lock.
-//
-// On success, make *pp point to the newly allocated WalInterator object
-// return SQLITE_OK. Otherwise, return an error code. If this routine
-// returns an error, the value of *pp is undefined.
-//
-// The calling routine should invoke walIteratorFree() to destroy the
-// WalIterator object when it has finished with it.
+// C comment
+// /*
+// ** Construct a WalInterator object that can be used to loop over all
+// ** pages in the WAL in ascending order. The caller must hold the checkpoint
+// ** lock.
+// **
+// ** On success, make *pp point to the newly allocated WalInterator object
+// ** return SQLITE_OK. Otherwise, return an error code. If this routine
+// ** returns an error, the value of *pp is undefined.
+// **
+// ** The calling routine should invoke walIteratorFree() to destroy the
+// ** WalIterator object when it has finished with it.
+// */
func _walIteratorInit(tls *crt.TLS, _pWal *XWal, _pp **XWalIterator) (r0 int32) {
var _nSegment, _nByte, _i, _rc, _4_j, _4_nEntry int32
var _iLast, _3_iZero uint32
var _3_aPgno *uint32
var _aTmp, _3_aHash, _4_aIndex *uint16
var _p *XWalIterator
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (_pWal.X13) == 0 || ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56044), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIteratorInitØ00__func__Ø000))), unsafe.Pointer(str(22993)))
+ if _pWal.XckptLock == 0 || (_pWal.Xhdr.XmxFrame) <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56044), unsafe.Pointer(&_walIteratorInitØ00__func__Ø000), unsafe.Pointer(str(22948)))
crt.X__builtin_abort(tls)
}
}()
- _iLast = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
- _nSegment = _walFramePage(tls, _iLast) + i32(1)
- _nByte = int32((u32(28) + (uint32(_nSegment-i32(1)) * u32(20))) + (_iLast * u32(2)))
+ _iLast = _pWal.Xhdr.XmxFrame
+ _nSegment = _walFramePage(tls, _iLast) + int32(1)
+ _nByte = int32((uint32(28) + (uint32(_nSegment-int32(1)) * uint32(20))) + (_iLast * uint32(2)))
_p = (*XWalIterator)(Xsqlite3_malloc64(tls, uint64(_nByte)))
if _p == nil {
- return _sqlite3NomemError(tls, i32(56054))
+ return _sqlite3NomemError(tls, int32(56054))
}
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), uint32(_nByte))
- *(*int32)(unsafe.Pointer(&(_p.X1))) = _nSegment
- _aTmp = (*uint16)(Xsqlite3_malloc64(tls, uint64(u32(2)*func() uint32 {
- if _iLast > uint32(i32(4096)) {
- return uint32(i32(4096))
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(_nByte))
+ _p.XnSegment = _nSegment
+ _aTmp = (*uint16)(Xsqlite3_malloc64(tls, uint64(uint32(2)*func() uint32 {
+ if _iLast > uint32(4096) {
+ return uint32(4096)
}
return _iLast
}())))
if _aTmp == nil {
- _rc = _sqlite3NomemError(tls, i32(56066))
+ _rc = _sqlite3NomemError(tls, int32(56066))
}
- _i = i32(0)
+ _i = int32(0)
_7:
- if _rc != i32(0) || _i >= _nSegment {
+ if _rc != int32(0) || _i >= _nSegment {
goto _11
}
_rc = _walHashGet(tls, _pWal, _i, &_3_aHash, &_3_aPgno, &_3_iZero)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _12
}
*(*uintptr)(unsafe.Pointer(&_3_aPgno)) += uintptr(4)
- if (_i + i32(1)) == _nSegment {
+ if (_i + int32(1)) == _nSegment {
_4_nEntry = int32(_iLast - _3_iZero)
goto _14
}
- _4_nEntry = int32((uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(_3_aHash)))) - uintptr(unsafe.Pointer(_3_aPgno))) / 4)
+ _4_nEntry = int32((uintptr(unsafe.Pointer(_3_aHash)) - uintptr(unsafe.Pointer(_3_aPgno))) / 4)
_14:
- _4_aIndex = (*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*TWalSegment)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TWalSegment)(unsafe.Pointer(&(_p.X2)))))+20*uintptr(_p.X1))))) + 2*uintptr(_3_iZero)))
+ _4_aIndex = elem20((*uint16)(unsafe.Pointer(elem45((*TWalSegment)(unsafe.Pointer(&_p.XaSegment)), uintptr(_p.XnSegment)))), uintptr(_3_iZero))
_3_iZero += 1
- _4_j = i32(0)
+ _4_j = int32(0)
_15:
if _4_j >= _4_nEntry {
goto _18
}
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_4_aIndex)) + 2*uintptr(_4_j))) = uint16(_4_j)
+ *elem20(_4_aIndex, uintptr(_4_j)) = uint16(_4_j)
_4_j += 1
goto _15
_18:
_walMergesort(tls, _3_aPgno, _aTmp, _4_aIndex, &_4_nEntry)
- *(*int32)(unsafe.Pointer(&((*TWalSegment)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TWalSegment)(unsafe.Pointer(&(_p.X2))))) + 20*uintptr(_i))).X4))) = int32(_3_iZero)
- *(*int32)(unsafe.Pointer(&((*TWalSegment)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TWalSegment)(unsafe.Pointer(&(_p.X2))))) + 20*uintptr(_i))).X3))) = _4_nEntry
- *(**uint16)(unsafe.Pointer(&((*TWalSegment)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TWalSegment)(unsafe.Pointer(&(_p.X2))))) + 20*uintptr(_i))).X1))) = _4_aIndex
- *(**uint32)(unsafe.Pointer(&((*TWalSegment)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TWalSegment)(unsafe.Pointer(&(_p.X2))))) + 20*uintptr(_i))).X2))) = _3_aPgno
+ elem45((*TWalSegment)(unsafe.Pointer(&_p.XaSegment)), uintptr(_i)).XiZero = int32(_3_iZero)
+ elem45((*TWalSegment)(unsafe.Pointer(&_p.XaSegment)), uintptr(_i)).XnEntry = _4_nEntry
+ elem45((*TWalSegment)(unsafe.Pointer(&_p.XaSegment)), uintptr(_i)).XaIndex = _4_aIndex
+ elem45((*TWalSegment)(unsafe.Pointer(&_p.XaSegment)), uintptr(_i)).XaPgno = _3_aPgno
_12:
_i += 1
goto _7
_11:
- Xsqlite3_free(tls, (unsafe.Pointer)(_aTmp))
- if _rc != i32(0) {
+ Xsqlite3_free(tls, unsafe.Pointer(_aTmp))
+ if _rc != int32(0) {
_walIteratorFree(tls, _p)
}
*_pp = _p
@@ -22654,24 +23226,27 @@ _11:
var _walIteratorInitØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_walIteratorInitØ00__func__Ø000[0], str(23031), 16)
-}
-
-// Sort the elements in list aList using aContent[] as the sort key.
-// Remove elements with duplicate keys, preferring to keep the
-// larger aList[] values.
-//
-// The aList[] entries are indices into aContent[]. The values in
-// aList[] are to be sorted so that for all J<K:
-//
-// aContent[aList[J]] < aContent[aList[K]]
-//
-// For any X and Y such that
-//
-// aContent[aList[X]] == aContent[aList[Y]]
-//
-// Keep the larger of the two values aList[X] and aList[Y] and discard
-// the smaller.
+ crt.Xstrncpy(nil, &_walIteratorInitØ00__func__Ø000[0], str(22986), 16)
+}
+
+// C comment
+// /*
+// ** Sort the elements in list aList using aContent[] as the sort key.
+// ** Remove elements with duplicate keys, preferring to keep the
+// ** larger aList[] values.
+// **
+// ** The aList[] entries are indices into aContent[]. The values in
+// ** aList[] are to be sorted so that for all J<K:
+// **
+// ** aContent[aList[J]] < aContent[aList[K]]
+// **
+// ** For any X and Y such that
+// **
+// ** aContent[aList[X]] == aContent[aList[Y]]
+// **
+// ** Keep the larger of the two values aList[X] and aList[Y] and discard
+// ** the smaller.
+// */
func _walMergesort(tls *crt.TLS, _aContent *uint32, _aBuffer *uint16, _aList *uint16, _pnList *int32) {
var _nList, _nMerge, _iList, _5_i int32
var _iSub uint32
@@ -22679,102 +23254,102 @@ func _walMergesort(tls *crt.TLS, _aContent *uint32, _aBuffer *uint16, _aList *ui
var _aSub [13]TSublist
var _2_p, _4_p *TSublist
_nList = *_pnList
- _nMerge = i32(0)
+ _nMerge = int32(0)
_aMerge = nil
- _iSub = u32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_aSub), i32(0), u32(104))
+ _iSub = uint32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_aSub), int32(0), uint32(104))
func() {
- if _nList > i32(4096) || _nList <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55972), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergesortØ00__func__Ø000))), unsafe.Pointer(str(23047)))
+ if _nList > int32(4096) || _nList <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55972), unsafe.Pointer(&_walMergesortØ00__func__Ø000), unsafe.Pointer(str(23002)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- _iList = i32(0)
+
+ _iList = int32(0)
_3:
if _iList >= _nList {
goto _6
}
- _nMerge = i32(1)
- _aMerge = (*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aList)) + 2*uintptr(_iList)))
- _iSub = uint32(i32(0))
+ _nMerge = int32(1)
+ _aMerge = elem20(_aList, uintptr(_iList))
+ _iSub = 0
_7:
- if (_iList & (i32(1) << uint(int32(_iSub)))) == 0 {
+ if (_iList & (int32(1) << uint(int32(_iSub)))) == 0 {
goto _10
}
func() {
- if _iSub >= uint32(i32(13)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55980), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergesortØ00__func__Ø000))), unsafe.Pointer(str(23081)))
+ if _iSub >= uint32(13) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55980), unsafe.Pointer(&_walMergesortØ00__func__Ø000), unsafe.Pointer(str(23036)))
crt.X__builtin_abort(tls)
}
}()
- _2_p = (*TSublist)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSub)) + 8*uintptr(_iSub)))
+ _2_p = elem46((*TSublist)(unsafe.Pointer(&_aSub)), uintptr(_iSub))
func() {
- if (_2_p.X1) == nil || (_2_p.X0) > (i32(1)<<uint(int32(_iSub))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55982), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergesortØ00__func__Ø000))), unsafe.Pointer(str(23102)))
+ if _2_p.XaList == nil || _2_p.XnList > (int32(1)<<uint(int32(_iSub))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55982), unsafe.Pointer(&_walMergesortØ00__func__Ø000), unsafe.Pointer(str(23057)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_2_p.X1) != (*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aList))+2*uintptr(_iList&(^((i32(2)<<uint(int32(_iSub)))-i32(1)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55983), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergesortØ00__func__Ø000))), unsafe.Pointer(str(23134)))
+ if _2_p.XaList != elem20(_aList, uintptr(_iList&(^((int32(2)<<uint(int32(_iSub)))-int32(1))))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55983), unsafe.Pointer(&_walMergesortØ00__func__Ø000), unsafe.Pointer(str(23089)))
crt.X__builtin_abort(tls)
}
}()
- _walMerge(tls, _aContent, _2_p.X1, _2_p.X0, &_aMerge, &_nMerge, _aBuffer)
+ _walMerge(tls, _aContent, _2_p.XaList, _2_p.XnList, &_aMerge, &_nMerge, _aBuffer)
_iSub += 1
goto _7
_10:
- *(**uint16)(unsafe.Pointer(&((*TSublist)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSub)) + 8*uintptr(_iSub))).X1))) = _aMerge
- *(*int32)(unsafe.Pointer(&((*TSublist)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSub)) + 8*uintptr(_iSub))).X0))) = _nMerge
+ elem46((*TSublist)(unsafe.Pointer(&_aSub)), uintptr(_iSub)).XaList = _aMerge
+ elem46((*TSublist)(unsafe.Pointer(&_aSub)), uintptr(_iSub)).XnList = _nMerge
_iList += 1
goto _3
_6:
_iSub += 1
_18:
- if _iSub >= uint32(i32(13)) {
+ if _iSub >= uint32(13) {
goto _21
}
- if (_nList & (i32(1) << uint(int32(_iSub)))) != 0 {
+ if (_nList & (int32(1) << uint(int32(_iSub)))) != 0 {
func() {
- if _iSub >= uint32(i32(13)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55993), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergesortØ00__func__Ø000))), unsafe.Pointer(str(23081)))
+ if _iSub >= uint32(13) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55993), unsafe.Pointer(&_walMergesortØ00__func__Ø000), unsafe.Pointer(str(23036)))
crt.X__builtin_abort(tls)
}
}()
- _4_p = (*TSublist)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSub)) + 8*uintptr(_iSub)))
+ _4_p = elem46((*TSublist)(unsafe.Pointer(&_aSub)), uintptr(_iSub))
func() {
- if (_4_p.X0) > (i32(1) << uint(int32(_iSub))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55995), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergesortØ00__func__Ø000))), unsafe.Pointer(str(23173)))
+ if _4_p.XnList > (int32(1) << uint(int32(_iSub))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55995), unsafe.Pointer(&_walMergesortØ00__func__Ø000), unsafe.Pointer(str(23128)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_4_p.X1) != (*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aList))+2*uintptr(_nList&(^((i32(2)<<uint(int32(_iSub)))-i32(1)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55996), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergesortØ00__func__Ø000))), unsafe.Pointer(str(23193)))
+ if _4_p.XaList != elem20(_aList, uintptr(_nList&(^((int32(2)<<uint(int32(_iSub)))-int32(1))))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55996), unsafe.Pointer(&_walMergesortØ00__func__Ø000), unsafe.Pointer(str(23148)))
crt.X__builtin_abort(tls)
}
}()
- _walMerge(tls, _aContent, _4_p.X1, _4_p.X0, &_aMerge, &_nMerge, _aBuffer)
+ _walMerge(tls, _aContent, _4_p.XaList, _4_p.XnList, &_aMerge, &_nMerge, _aBuffer)
}
_iSub += 1
goto _18
_21:
func() {
if _aMerge != _aList {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56000), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergesortØ00__func__Ø000))), unsafe.Pointer(str(23232)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56000), unsafe.Pointer(&_walMergesortØ00__func__Ø000), unsafe.Pointer(str(23187)))
crt.X__builtin_abort(tls)
}
}()
*_pnList = _nMerge
- _5_i = i32(1)
+ _5_i = int32(1)
_31:
if _5_i >= (*_pnList) {
goto _34
}
func() {
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aContent)) + 4*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aList)) + 2*uintptr(_5_i))))))) <= (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aContent)) + 4*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aList)) + 2*uintptr(_5_i-i32(1)))))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56007), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergesortØ00__func__Ø000))), unsafe.Pointer(str(23246)))
+ if (*elem7(_aContent, uintptr(*elem20(_aList, uintptr(_5_i))))) <= (*elem7(_aContent, uintptr(*elem20(_aList, uintptr(_5_i-int32(1)))))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56007), unsafe.Pointer(&_walMergesortØ00__func__Ø000), unsafe.Pointer(str(23201)))
crt.X__builtin_abort(tls)
}
}()
@@ -22787,43 +23362,46 @@ _34:
var _walMergesortØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_walMergesortØ00__func__Ø000[0], str(23288), 13)
-}
-
-// This function merges two sorted lists into a single sorted list.
-//
-// aLeft[] and aRight[] are arrays of indices. The sort key is
-// aContent[aLeft[]] and aContent[aRight[]]. Upon entry, the following
-// is guaranteed for all J<K:
-//
-// aContent[aLeft[J]] < aContent[aLeft[K]]
-// aContent[aRight[J]] < aContent[aRight[K]]
-//
-// This routine overwrites aRight[] with a new (probably longer) sequence
-// of indices such that the aRight[] contains every index that appears in
-// either aLeft[] or the old aRight[] and such that the second condition
-// above is still met.
-//
-// The aContent[aLeft[X]] values will be unique for all X. And the
-// aContent[aRight[X]] values will be unique too. But there might be
-// one or more combinations of X and Y such that
-//
-// aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]]
-//
-// When that happens, omit the aLeft[X] and use the aRight[Y] index.
+ crt.Xstrncpy(nil, &_walMergesortØ00__func__Ø000[0], str(23243), 13)
+}
+
+// C comment
+// /*
+// ** This function merges two sorted lists into a single sorted list.
+// **
+// ** aLeft[] and aRight[] are arrays of indices. The sort key is
+// ** aContent[aLeft[]] and aContent[aRight[]]. Upon entry, the following
+// ** is guaranteed for all J<K:
+// **
+// ** aContent[aLeft[J]] < aContent[aLeft[K]]
+// ** aContent[aRight[J]] < aContent[aRight[K]]
+// **
+// ** This routine overwrites aRight[] with a new (probably longer) sequence
+// ** of indices such that the aRight[] contains every index that appears in
+// ** either aLeft[] or the old aRight[] and such that the second condition
+// ** above is still met.
+// **
+// ** The aContent[aLeft[X]] values will be unique for all X. And the
+// ** aContent[aRight[X]] values will be unique too. But there might be
+// ** one or more combinations of X and Y such that
+// **
+// ** aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]]
+// **
+// ** When that happens, omit the aLeft[X] and use the aRight[Y] index.
+// */
func _walMerge(tls *crt.TLS, _aContent *uint32, _aLeft *uint16, _nLeft int32, _paRight **uint16, _pnRight *int32, _aTmp *uint16) {
var _iLeft, _iRight, _iOut, _nRight int32
var _1_dbpage uint32
var _1_logpage uint16
var _aRight *uint16
- _iLeft = i32(0)
- _iRight = i32(0)
- _iOut = i32(0)
+ _iLeft = int32(0)
+ _iRight = int32(0)
+ _iOut = int32(0)
_nRight = *_pnRight
_aRight = *_paRight
func() {
- if _nLeft <= i32(0) || _nRight <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55910), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergeØ00__func__Ø000))), unsafe.Pointer(str(23301)))
+ if _nLeft <= int32(0) || _nRight <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55910), unsafe.Pointer(&_walMergeØ00__func__Ø000), unsafe.Pointer(str(23256)))
crt.X__builtin_abort(tls)
}
}()
@@ -22831,26 +23409,26 @@ _3:
if _iRight >= _nRight && _iLeft >= _nLeft {
goto _4
}
- if (_iLeft < _nLeft) && ((_iRight >= _nRight) || ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aContent)) + 4*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aLeft)) + 2*uintptr(_iLeft))))))) < (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aContent)) + 4*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRight)) + 2*uintptr(_iRight))))))))) {
- _1_logpage = *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aLeft)) + 2*uintptr(postInc1(&_iLeft, int32(1)))))
+ if (_iLeft < _nLeft) && ((_iRight >= _nRight) || ((*elem7(_aContent, uintptr(*elem20(_aLeft, uintptr(_iLeft))))) < (*elem7(_aContent, uintptr(*elem20(_aRight, uintptr(_iRight))))))) {
+ _1_logpage = *elem20(_aLeft, uintptr(postInc2(&_iLeft, 1)))
goto _9
}
- _1_logpage = *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRight)) + 2*uintptr(postInc1(&_iRight, int32(1)))))
+ _1_logpage = *elem20(_aRight, uintptr(postInc2(&_iRight, 1)))
_9:
- _1_dbpage = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aContent)) + 4*uintptr(_1_logpage)))
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aTmp)) + 2*uintptr(postInc1(&_iOut, int32(1))))) = _1_logpage
- if (_iLeft < _nLeft) && ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aContent)) + 4*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aLeft)) + 2*uintptr(_iLeft))))))) == _1_dbpage) {
+ _1_dbpage = *elem7(_aContent, uintptr(_1_logpage))
+ *elem20(_aTmp, uintptr(postInc2(&_iOut, 1))) = _1_logpage
+ if (_iLeft < _nLeft) && ((*elem7(_aContent, uintptr(*elem20(_aLeft, uintptr(_iLeft))))) == _1_dbpage) {
_iLeft += 1
}
func() {
- if _iLeft < _nLeft && (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aContent)) + 4*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aLeft)) + 2*uintptr(_iLeft))))))) <= _1_dbpage {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55927), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergeØ00__func__Ø000))), unsafe.Pointer(str(23321)))
+ if _iLeft < _nLeft && (*elem7(_aContent, uintptr(*elem20(_aLeft, uintptr(_iLeft))))) <= _1_dbpage {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55927), unsafe.Pointer(&_walMergeØ00__func__Ø000), unsafe.Pointer(str(23276)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iRight < _nRight && (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aContent)) + 4*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRight)) + 2*uintptr(_iRight))))))) <= _1_dbpage {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55928), unsafe.Pointer((*int8)(unsafe.Pointer(&_walMergeØ00__func__Ø000))), unsafe.Pointer(str(23367)))
+ if _iRight < _nRight && (*elem7(_aContent, uintptr(*elem20(_aRight, uintptr(_iRight))))) <= _1_dbpage {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55928), unsafe.Pointer(&_walMergeØ00__func__Ø000), unsafe.Pointer(str(23322)))
crt.X__builtin_abort(tls)
}
}()
@@ -22858,123 +23436,132 @@ _9:
_4:
*_paRight = _aLeft
*_pnRight = _iOut
- crt.Xmemcpy(tls, (unsafe.Pointer)(_aLeft), (unsafe.Pointer)(_aTmp), u32(2)*uint32(_iOut))
+ crt.Xmemcpy(tls, unsafe.Pointer(_aLeft), unsafe.Pointer(_aTmp), uint32(2)*uint32(_iOut))
}
var _walMergeØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_walMergeØ00__func__Ø000[0], str(23417), 9)
+ crt.Xstrncpy(nil, &_walMergeØ00__func__Ø000[0], str(23372), 9)
}
-// Free an iterator allocated by walIteratorInit().
+// C comment
+// /*
+// ** Free an iterator allocated by walIteratorInit().
+// */
func _walIteratorFree(tls *crt.TLS, _p *XWalIterator) {
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
}
var _walCheckpointØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_walCheckpointØ00__func__Ø000[0], str(23426), 14)
+ crt.Xstrncpy(nil, &_walCheckpointØ00__func__Ø000[0], str(23381), 14)
}
-// Find the smallest page number out of all pages held in the WAL that
-// has not been returned by any prior invocation of this method on the
-// same WalIterator object. Write into *piFrame the frame index where
-// that page was last written into the WAL. Write into *piPage the page
-// number.
-//
-// Return 0 on success. If there are no pages in the WAL with a page
-// number larger than *piPage, then return 1.
+// C comment
+// /*
+// ** Find the smallest page number out of all pages held in the WAL that
+// ** has not been returned by any prior invocation of this method on the
+// ** same WalIterator object. Write into *piFrame the frame index where
+// ** that page was last written into the WAL. Write into *piPage the page
+// ** number.
+// **
+// ** Return 0 on success. If there are no pages in the WAL with a page
+// ** number larger than *piPage, then return 1.
+// */
func _walIteratorNext(tls *crt.TLS, _p *XWalIterator, _piPage *uint32, _piFrame *uint32) (r0 int32) {
var _i int32
var _iMin, _iRet, _2_iPg uint32
var _1_pSegment *TWalSegment
- _iRet = u32(4294967295)
- _iMin = uint32(_p.X0)
+ _iRet = uint32(4294967295)
+ _iMin = uint32(_p.XiPrior)
func() {
- if _iMin >= u32(4294967295) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55853), unsafe.Pointer((*int8)(unsafe.Pointer(&_walIteratorNextØ00__func__Ø000))), unsafe.Pointer(str(23440)))
+ if _iMin >= uint32(4294967295) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55853), unsafe.Pointer(&_walIteratorNextØ00__func__Ø000), unsafe.Pointer(str(23395)))
crt.X__builtin_abort(tls)
}
}()
- _i = (_p.X1) - i32(1)
+ _i = _p.XnSegment - int32(1)
_2:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _5
}
- _1_pSegment = (*TWalSegment)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TWalSegment)(unsafe.Pointer(&(_p.X2))))) + 20*uintptr(_i)))
+ _1_pSegment = elem45((*TWalSegment)(unsafe.Pointer(&_p.XaSegment)), uintptr(_i))
_6:
- if (_1_pSegment.X0) >= (_1_pSegment.X3) {
+ if _1_pSegment.XiNext >= _1_pSegment.XnEntry {
goto _7
}
- _2_iPg = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pSegment.X2)) + 4*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pSegment.X1)) + 2*uintptr(_1_pSegment.X0))))))
+ _2_iPg = *elem7(_1_pSegment.XaPgno, uintptr(*elem20(_1_pSegment.XaIndex, uintptr(_1_pSegment.XiNext))))
if _2_iPg <= _iMin {
goto _8
}
if _2_iPg < _iRet {
_iRet = _2_iPg
- *_piFrame = uint32((_1_pSegment.X4) + int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pSegment.X1)) + 2*uintptr(_1_pSegment.X0)))))
+ *_piFrame = uint32(_1_pSegment.XiZero + int32(*elem20(_1_pSegment.XaIndex, uintptr(_1_pSegment.XiNext))))
}
goto _7
_8:
- *(*int32)(unsafe.Pointer(&(_1_pSegment.X0))) += 1
+ _1_pSegment.XiNext += 1
goto _6
_7:
_i -= 1
goto _2
_5:
- *_piPage = uint32(store1((*int32)(unsafe.Pointer(&(_p.X0))), int32(_iRet)))
- return bool2int(_iRet == u32(4294967295))
+ *_piPage = uint32(store2(&_p.XiPrior, int32(_iRet)))
+ return bool2int(_iRet == uint32(4294967295))
}
var _walIteratorNextØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_walIteratorNextØ00__func__Ø000[0], str(23456), 16)
-}
-
-// The following is guaranteed when this function is called:
-//
-// a) the WRITER lock is held,
-// b) the entire log file has been checkpointed, and
-// c) any existing readers are reading exclusively from the database
-// file - there are no readers that may attempt to read a frame from
-// the log file.
-//
-// This function updates the shared-memory structures so that the next
-// client to write to the database (which may be this one) does so by
-// writing frames into the start of the log file.
-//
-// The value of parameter salt1 is used as the aSalt[1] value in the
-// new wal-index header. It should be passed a pseudo-random value (i.e.
-// one obtained from sqlite3_randomness()).
+ crt.Xstrncpy(nil, &_walIteratorNextØ00__func__Ø000[0], str(23411), 16)
+}
+
+// C comment
+// /*
+// ** The following is guaranteed when this function is called:
+// **
+// ** a) the WRITER lock is held,
+// ** b) the entire log file has been checkpointed, and
+// ** c) any existing readers are reading exclusively from the database
+// ** file - there are no readers that may attempt to read a frame from
+// ** the log file.
+// **
+// ** This function updates the shared-memory structures so that the next
+// ** client to write to the database (which may be this one) does so by
+// ** writing frames into the start of the log file.
+// **
+// ** The value of parameter salt1 is used as the aSalt[1] value in the
+// ** new wal-index header. It should be passed a pseudo-random value (i.e.
+// ** one obtained from sqlite3_randomness()).
+// */
func _walRestartHdr(tls *crt.TLS, _pWal *XWal, _salt1 uint32) {
var _i int32
var _aSalt *uint32
var _pInfo *XWalCkptInfo
_pInfo = _walCkptInfo(tls, _pWal)
- _aSalt = (*uint32)(unsafe.Pointer((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X9)))))
- *(*uint32)(unsafe.Pointer(&(_pWal.X22))) += 1
- *(*uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6))) = uint32(i32(0))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSalt))+4*uintptr(i32(0)))))), uint32(i32(1))+_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSalt))+4*uintptr(i32(0))))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X9)))))+4*uintptr(i32(1))))), (unsafe.Pointer)(&_salt1), uint32(i32(4)))
+ _aSalt = (*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaSalt)))
+ _pWal.XnCkpt += 1
+ _pWal.Xhdr.XmxFrame = 0
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(elem7(_aSalt, 0))), uint32(1)+_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(elem7(_aSalt, 0)))))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaSalt))), uintptr(1))), unsafe.Pointer(&_salt1), uint32(4))
_walIndexWriteHdr(tls, _pWal)
- *(*uint32)(unsafe.Pointer(&(_pInfo.X0))) = uint32(i32(0))
- *(*uint32)(unsafe.Pointer(&(_pInfo.X3))) = uint32(i32(0))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pInfo.X1))))) + 4*uintptr(i32(1)))) = uint32(i32(0))
- _i = i32(2)
+ _pInfo.XnBackfill = 0
+ _pInfo.XnBackfillAttempted = 0
+ *elem7((*uint32)(unsafe.Pointer(&_pInfo.XaReadMark)), uintptr(1)) = 0
+ _i = int32(2)
_0:
- if _i >= i32(5) {
+ if _i >= int32(5) {
goto _3
}
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pInfo.X1))))) + 4*uintptr(_i))) = u32(4294967295)
+ *elem7((*uint32)(unsafe.Pointer(&_pInfo.XaReadMark)), uintptr(_i)) = uint32(4294967295)
_i += 1
goto _0
_3:
func() {
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pInfo.X1))))) + 4*uintptr(i32(0))))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56166), unsafe.Pointer((*int8)(unsafe.Pointer(&_walRestartHdrØ00__func__Ø000))), unsafe.Pointer(str(23472)))
+ if (*elem7((*uint32)(unsafe.Pointer(&_pInfo.XaReadMark)), 0)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56166), unsafe.Pointer(&_walRestartHdrØ00__func__Ø000), unsafe.Pointer(str(23427)))
crt.X__builtin_abort(tls)
}
}()
@@ -22983,215 +23570,243 @@ _3:
var _walRestartHdrØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_walRestartHdrØ00__func__Ø000[0], str(23495), 14)
+ crt.Xstrncpy(nil, &_walRestartHdrØ00__func__Ø000[0], str(23450), 14)
}
-// If the WAL file is currently larger than nMax bytes in size, truncate
-// it to exactly nMax bytes. If an error occurs while doing so, ignore it.
+// C comment
+// /*
+// ** If the WAL file is currently larger than nMax bytes in size, truncate
+// ** it to exactly nMax bytes. If an error occurs while doing so, ignore it.
+// */
func _walLimitSize(tls *crt.TLS, _pWal *XWal, _nMax int64) {
var _rx int32
var _sz int64
_sqlite3BeginBenignMalloc(tls)
- _rx = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pWal.X2), &_sz)
- if (_rx == i32(0)) && (_sz > _nMax) {
- _rx = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pWal.X2), _nMax)
+ _rx = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pWal.XpWalFd), &_sz)
+ if (_rx == int32(0)) && (_sz > _nMax) {
+ _rx = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pWal.XpWalFd), _nMax)
}
_sqlite3EndBenignMalloc(tls)
if _rx != 0 {
- Xsqlite3_log(tls, _rx, str(23509), unsafe.Pointer(_pWal.X21))
+ Xsqlite3_log(tls, _rx, str(23464), unsafe.Pointer(_pWal.XzWalName))
}
}
-// Close an open wal-index.
+// C comment
+// /*
+// ** Close an open wal-index.
+// */
func _walIndexClose(tls *crt.TLS, _pWal *XWal, _isDelete int32) {
var _1_i int32
- if int32(_pWal.X11) != i32(2) {
+ if int32(_pWal.XexclusiveMode) != int32(2) {
goto _0
}
- _1_i = i32(0)
+ _1_i = int32(0)
_1:
- if _1_i >= (_pWal.X5) {
+ if _1_i >= _pWal.XnWiData {
goto _4
}
- Xsqlite3_free(tls, (unsafe.Pointer)(*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(_1_i)))))
- *(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(_1_i))) = nil
+ Xsqlite3_free(tls, unsafe.Pointer(*elem36(_pWal.XapWiData, uintptr(_1_i))))
+ *elem36(_pWal.XapWiData, uintptr(_1_i)) = nil
_1_i += 1
goto _1
_4:
goto _5
_0:
- _sqlite3OsShmUnmap(tls, (*Xsqlite3_file)(_pWal.X1), _isDelete)
+ _sqlite3OsShmUnmap(tls, (*Xsqlite3_file)(_pWal.XpDbFd), _isDelete)
_5:
}
func _sqlite3OsShmUnmap(tls *crt.TLS, _id *Xsqlite3_file, _deleteFlag int32) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X16)})))(tls, _id, _deleteFlag)
-}
-
-// This function is called before attempting a hot-journal rollback. It
-// syncs the journal file to disk, then sets pPager->journalHdr to the
-// size of the journal file so that the pager_playback() routine knows
-// that the entire journal file has been synced.
-//
-// Syncing a hot-journal to disk before attempting to roll it back ensures
-// that if a power-failure occurs during the rollback, the process that
-// attempts rollback following system recovery sees the same journal
-// content as this process.
-//
-// If everything goes as planned, SQLITE_OK is returned. Otherwise,
-// an SQLite error code.
+ return func() func(*crt.TLS, *Xsqlite3_file, int32) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxShmUnmap
+ return *(*func(*crt.TLS, *Xsqlite3_file, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _deleteFlag)
+}
+
+// C comment
+// /*
+// ** This function is called before attempting a hot-journal rollback. It
+// ** syncs the journal file to disk, then sets pPager->journalHdr to the
+// ** size of the journal file so that the pager_playback() routine knows
+// ** that the entire journal file has been synced.
+// **
+// ** Syncing a hot-journal to disk before attempting to roll it back ensures
+// ** that if a power-failure occurs during the rollback, the process that
+// ** attempts rollback following system recovery sees the same journal
+// ** content as this process.
+// **
+// ** If everything goes as planned, SQLITE_OK is returned. Otherwise,
+// ** an SQLite error code.
+// */
func _pagerSyncHotJournal(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc int32
- _rc = i32(0)
- if (_pPager.X4) == 0 {
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.X32), i32(2))
+ _rc = int32(0)
+ if _pPager.XnoSync == 0 {
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.Xjfd), int32(2))
}
- if _rc == i32(0) {
- _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.X32), (*int64)(unsafe.Pointer(&(_pPager.X35))))
+ if _rc == int32(0) {
+ _rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.Xjfd), &_pPager.XjournalHdr)
}
return _rc
}
-// Close a cache.
+// C comment
+// /*
+// ** Close a cache.
+// */
func _sqlite3PcacheClose(tls *crt.TLS, _pCache *XPCache) {
func() {
- if (_pCache.X12) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44805), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheCloseØ00__func__Ø000))), unsafe.Pointer(str(15958)))
+ if _pCache.XpCache == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44805), unsafe.Pointer(&_sqlite3PcacheCloseØ00__func__Ø000), unsafe.Pointer(str(15913)))
crt.X__builtin_abort(tls)
}
}()
- ((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X11)(tls, _pCache.X12)
+ (_sqlite3Config.Xpcache2.XxDestroy)(tls, _pCache.XpCache)
}
var _sqlite3PcacheCloseØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheCloseØ00__func__Ø000[0], str(23535), 19)
+ crt.Xstrncpy(nil, &_sqlite3PcacheCloseØ00__func__Ø000[0], str(23490), 19)
}
-// Free the pBt->pTmpSpace allocation
+// C comment
+// /*
+// ** Free the pBt->pTmpSpace allocation
+// */
func _freeTempSpace(tls *crt.TLS, _pBt *XBtShared) {
- if (_pBt.X27) != nil {
- {
- p := (**uint8)(unsafe.Pointer(&(_pBt.X27)))
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 1*uintptr(i32(4))))
- sink13(*p)
- }
- _sqlite3PageFree(tls, (unsafe.Pointer)(_pBt.X27))
- *(**uint8)(unsafe.Pointer(&(_pBt.X27))) = nil
+ if _pBt.XpTmpSpace != nil {
+ *(*uintptr)(unsafe.Pointer(&_pBt.XpTmpSpace)) -= uintptr(int32(4))
+ _sqlite3PageFree(tls, unsafe.Pointer(_pBt.XpTmpSpace))
+ _pBt.XpTmpSpace = nil
}
}
var _sqlite3LeaveMutexAndCloseZombieØ00__func__Ø000 [32]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3LeaveMutexAndCloseZombieØ00__func__Ø000[0], str(23554), 32)
+ crt.Xstrncpy(nil, &_sqlite3LeaveMutexAndCloseZombieØ00__func__Ø000[0], str(23509), 32)
}
-// Invoke the destructor function associated with FuncDef p, if any. Except,
-// if this is not the last copy of the function, do not invoke it. Multiple
-// copies of a single function are created when create_function() is called
-// with SQLITE_ANY as the encoding.
+// C comment
+// /*
+// ** Invoke the destructor function associated with FuncDef p, if any. Except,
+// ** if this is not the last copy of the function, do not invoke it. Multiple
+// ** copies of a single function are created when create_function() is called
+// ** with SQLITE_ANY as the encoding.
+// */
func _functionDestroy(tls *crt.TLS, _db *Xsqlite3, _p *XFuncDef) {
var _pDestructor *XFuncDestructor
- _pDestructor = (*XFuncDestructor)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X7))))))
+ _pDestructor = (*XFuncDestructor)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))
if _pDestructor == nil {
goto _0
}
- *(*int32)(unsafe.Pointer(&(_pDestructor.X0))) -= 1
- if (_pDestructor.X0) == i32(0) {
- (_pDestructor.X1)(tls, _pDestructor.X2)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pDestructor))
+ _pDestructor.XnRef -= 1
+ if _pDestructor.XnRef == int32(0) {
+ _pDestructor.XxDestroy(tls, _pDestructor.XpUserData)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pDestructor))
}
_0:
}
-// Erase the eponymous virtual table instance associated with
-// virtual table module pMod, if it exists.
+// C comment
+// /*
+// ** Erase the eponymous virtual table instance associated with
+// ** virtual table module pMod, if it exists.
+// */
func _sqlite3VtabEponymousTableClear(tls *crt.TLS, _db *Xsqlite3, _pMod *XModule) {
var _pTab *XTable
- _pTab = (*XTable)(_pMod.X4)
+ _pTab = (*XTable)(_pMod.XpEpoTab)
if _pTab != nil {
- {
- p := (*uint32)(unsafe.Pointer(&(_pTab.X9)))
- *p = (*p) | uint32(i32(2))
- sink5(*p)
- }
+ _pTab.XtabFlags |= uint32(2)
_sqlite3DeleteTable(tls, _db, _pTab)
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMod.X4))))) = nil
+ *(**XTable)(unsafe.Pointer(&_pMod.XpEpoTab)) = nil
}
}
-// Free an sqlite3_value object
+// C comment
+// /*
+// ** Free an sqlite3_value object
+// */
func _sqlite3ValueFree(tls *crt.TLS, _v *XMem) {
if _v == nil {
return
}
_sqlite3VdbeMemRelease(tls, _v)
- _sqlite3DbFreeNN(tls, (*Xsqlite3)(_v.X9), (unsafe.Pointer)(_v))
+ _sqlite3DbFreeNN(tls, (*Xsqlite3)(_v.Xdb), unsafe.Pointer(_v))
}
-// Call this routine when the database connection is closing in order
-// to clean up loaded extensions
+// C comment
+// /*
+// ** Call this routine when the database connection is closing in order
+// ** to clean up loaded extensions
+// */
func _sqlite3CloseExtensions(tls *crt.TLS, _db *Xsqlite3) {
var _i int32
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(112416), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CloseExtensionsØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(112416), unsafe.Pointer(&_sqlite3CloseExtensionsØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_2:
- if _i >= (_db.X39) {
+ if _i >= _db.XnExtension {
goto _5
}
- _sqlite3OsDlClose(tls, (*Xsqlite3_vfs)(_db.X0), *(*unsafe.Pointer)(unsafe.Pointer(uintptr((unsafe.Pointer)(_db.X40)) + 4*uintptr(_i))))
+ _sqlite3OsDlClose(tls, (*Xsqlite3_vfs)(_db.XpVfs), *elem24(_db.XaExtension, uintptr(_i)))
_i += 1
goto _2
_5:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_db.X40))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_db.XaExtension))
}
var _sqlite3CloseExtensionsØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CloseExtensionsØ00__func__Ø000[0], str(23586), 23)
+ crt.Xstrncpy(nil, &_sqlite3CloseExtensionsØ00__func__Ø000[0], str(23541), 23)
}
-// Register a collation sequence factory callback with the database handle
-// db. Replace any previously installed collation sequence factory.
+// C comment
+// /*
+// ** Register a collation sequence factory callback with the database handle
+// ** db. Replace any previously installed collation sequence factory.
+// */
func Xsqlite3_collation_needed(tls *crt.TLS, _db *Xsqlite3, _pCollNeededArg unsafe.Pointer, _xCollNeeded func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8)) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(143721))
+ return _sqlite3MisuseError(tls, int32(143721))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&(_db.X53))))) = _xCollNeeded
- *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer))(unsafe.Pointer(&(_db.X54))))) = nil
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X55))) = _pCollNeededArg
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return i32(0)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8))(unsafe.Pointer(&_db.XxCollNeeded)) = _xCollNeeded
+ *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer))(unsafe.Pointer(&_db.XxCollNeeded16)) = nil
+ _db.XpCollNeededArg = _pCollNeededArg
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return int32(0)
}
-// Register a collation sequence factory callback with the database handle
-// db. Replace any previously installed collation sequence factory.
+// C comment
+// /*
+// ** Register a collation sequence factory callback with the database handle
+// ** db. Replace any previously installed collation sequence factory.
+// */
func Xsqlite3_collation_needed16(tls *crt.TLS, _db *Xsqlite3, _pCollNeededArg unsafe.Pointer, _xCollNeeded16 func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer)) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(143742))
+ return _sqlite3MisuseError(tls, int32(143742))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&(_db.X53))))) = nil
- *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer))(unsafe.Pointer(&(_db.X54))))) = _xCollNeeded16
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X55))) = _pCollNeededArg
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return i32(0)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8))(unsafe.Pointer(&_db.XxCollNeeded)) = nil
+ *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer))(unsafe.Pointer(&_db.XxCollNeeded16)) = _xCollNeeded16
+ _db.XpCollNeededArg = _pCollNeededArg
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return int32(0)
}
-// *************************** sqlite3_column_ *******************************
-// The following routines are used to access elements of the current row
-// in the result set.
+// C comment
+// /**************************** sqlite3_column_ *******************************
+// ** The following routines are used to access elements of the current row
+// ** in the result set.
+// */
func Xsqlite3_column_blob(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 unsafe.Pointer) {
var _val unsafe.Pointer
_val = Xsqlite3_value_blob(tls, _columnMem(tls, _pStmt, _i))
@@ -23199,55 +23814,59 @@ func Xsqlite3_column_blob(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 uns
return _val
}
-// *************************** sqlite3_value_ *******************************
-// The following routines extract information from a Mem or sqlite3_value
-// structure.
+// C comment
+// /**************************** sqlite3_value_ *******************************
+// ** The following routines extract information from a Mem or sqlite3_value
+// ** structure.
+// */
func Xsqlite3_value_blob(tls *crt.TLS, _pVal *XMem) (r0 unsafe.Pointer) {
var _p *XMem
_p = _pVal
- if (int32(_p.X1) & i32(18)) == 0 {
+ if (int32(_p.Xflags) & int32(18)) == 0 {
goto _0
}
if func() int32 {
- if (int32(_p.X1) & i32(16384)) != 0 {
+ if (int32(_p.Xflags) & int32(16384)) != 0 {
return _sqlite3VdbeMemExpandBlob(tls, _p)
}
- return i32(0)
- }() != i32(0) {
+ return int32(0)
+ }() != int32(0) {
func() {
- if int32(_p.X1) != i32(1) || (_p.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76270), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_value_blobØ00__func__Ø000))), unsafe.Pointer(str(23609)))
+ if int32(_p.Xflags) != int32(1) || _p.Xz != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76270), unsafe.Pointer(&_sqlite3_value_blobØ00__func__Ø000), unsafe.Pointer(str(23564)))
crt.X__builtin_abort(tls)
}
}()
return nil
}
{
- p := (*uint16)(unsafe.Pointer(&(_p.X1)))
- *p = uint16(int32(*p) | i32(16))
- sink14(*p)
+ p := &_p.Xflags
+ *p = uint16(int32(*p) | int32(16))
}
- return (unsafe.Pointer)(func() *int8 {
- if (_p.X4) != 0 {
- return (_p.X5)
+ return unsafe.Pointer(func() *int8 {
+ if _p.Xn != 0 {
+ return _p.Xz
}
return nil
}())
_0:
- return (unsafe.Pointer)(Xsqlite3_value_text(tls, _pVal))
+ return unsafe.Pointer(Xsqlite3_value_text(tls, _pVal))
}
var _sqlite3_value_blobØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_value_blobØ00__func__Ø000[0], str(23639), 19)
+ crt.Xstrncpy(nil, &_sqlite3_value_blobØ00__func__Ø000[0], str(23594), 19)
}
-// Check to see if column iCol of the given statement is valid. If
-// it is, return a pointer to the Mem for the value of that column.
-// If iCol is not valid, return a pointer to a Mem which has a value
-// of NULL.
+// C comment
+// /*
+// ** Check to see if column iCol of the given statement is valid. If
+// ** it is, return a pointer to the Mem for the value of that column.
+// ** If iCol is not valid, return a pointer to a Mem which has a value
+// ** of NULL.
+// */
func _columnMem(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 *XMem) {
var _pVm *TVdbe
var _pOut *XMem
@@ -23256,23 +23875,26 @@ func _columnMem(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 *XMem) {
return _columnNullValue(tls)
}
func() {
- if (*Xsqlite3)(_pVm.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77067), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnMemØ00__func__Ø000))), unsafe.Pointer(str(23658)))
+ if _pVm.Xdb == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77067), unsafe.Pointer(&_columnMemØ00__func__Ø000), unsafe.Pointer(str(23613)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pVm.X0).X3))
- if (((*XMem)(_pVm.X21) != nil) && (_i < int32(_pVm.X29))) && (_i >= i32(0)) {
- _pOut = (*XMem)(unsafe.Pointer(uintptr(_pVm.X21) + 48*uintptr(_i)))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pVm.Xdb).Xmutex))
+ if (((*XMem)(_pVm.XpResultSet) != nil) && (_i < int32(_pVm.XnResColumn))) && (_i >= int32(0)) {
+ _pOut = elem25((*XMem)(_pVm.XpResultSet), uintptr(_i))
goto _6
}
- _sqlite3Error(tls, (*Xsqlite3)(_pVm.X0), i32(25))
+ _sqlite3Error(tls, (*Xsqlite3)(_pVm.Xdb), int32(25))
_pOut = _columnNullValue(tls)
_6:
return _pOut
}
-// Return a pointer to static memory containing an SQL NULL value.
+// C comment
+// /*
+// ** Return a pointer to static memory containing an SQL NULL value.
+// */
func _columnNullValue(tls *crt.TLS) (r0 *XMem) {
return &_columnNullValueØ00nullMemØ001
}
@@ -23280,56 +23902,59 @@ func _columnNullValue(tls *crt.TLS) (r0 *XMem) {
var _columnNullValueØ00nullMemØ001 XMem
func init() {
- _columnNullValueØ00nullMemØ001 = XMem{X0: t15{}, X1: u16(1), X2: u8(0), X3: u8(0), X4: i32(0), X5: nil, X6: nil, X7: i32(0), X8: u32(0), X9: nil, X10: nil, X11: nil, X12: nil}
+ _columnNullValueØ00nullMemØ001 = XMem{Xflags: uint16(1)}
}
var _columnMemØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_columnMemØ00__func__Ø000[0], str(23666), 10)
-}
-
-// This function is called after invoking an sqlite3_value_XXX function on a
-// column value (i.e. a value returned by evaluating an SQL expression in the
-// select list of a SELECT statement) that may cause a malloc() failure. If
-// malloc() has failed, the threads mallocFailed flag is cleared and the result
-// code of statement pStmt set to SQLITE_NOMEM.
-//
-// Specifically, this is called from within:
-//
-// sqlite3_column_int()
-// sqlite3_column_int64()
-// sqlite3_column_text()
-// sqlite3_column_text16()
-// sqlite3_column_real()
-// sqlite3_column_bytes()
-// sqlite3_column_bytes16()
-// sqiite3_column_blob()
+ crt.Xstrncpy(nil, &_columnMemØ00__func__Ø000[0], str(23621), 10)
+}
+
+// C comment
+// /*
+// ** This function is called after invoking an sqlite3_value_XXX function on a
+// ** column value (i.e. a value returned by evaluating an SQL expression in the
+// ** select list of a SELECT statement) that may cause a malloc() failure. If
+// ** malloc() has failed, the threads mallocFailed flag is cleared and the result
+// ** code of statement pStmt set to SQLITE_NOMEM.
+// **
+// ** Specifically, this is called from within:
+// **
+// ** sqlite3_column_int()
+// ** sqlite3_column_int64()
+// ** sqlite3_column_text()
+// ** sqlite3_column_text16()
+// ** sqlite3_column_real()
+// ** sqlite3_column_bytes()
+// ** sqlite3_column_bytes16()
+// ** sqiite3_column_blob()
+// */
func _columnMallocFailure(tls *crt.TLS, _pStmt unsafe.Pointer) {
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
if _p != nil {
func() {
- if (*Xsqlite3)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77105), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnMallocFailureØ00__func__Ø000))), unsafe.Pointer(str(23676)))
+ if (*Xsqlite3)(_p.Xdb) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77105), unsafe.Pointer(&_columnMallocFailureØ00__func__Ø000), unsafe.Pointer(str(23631)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77106), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnMallocFailureØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77106), unsafe.Pointer(&_columnMallocFailureØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _sqlite3ApiExit(tls, (*Xsqlite3)(_p.X0), _p.X10)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ _p.Xrc = _sqlite3ApiExit(tls, (*Xsqlite3)(_p.Xdb), _p.Xrc)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
}
}
var _columnMallocFailureØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_columnMallocFailureØ00__func__Ø000[0], str(23685), 20)
+ crt.Xstrncpy(nil, &_columnMallocFailureØ00__func__Ø000[0], str(23640), 20)
}
func Xsqlite3_column_bytes(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 int32) {
@@ -23347,81 +23972,89 @@ func Xsqlite3_column_bytes16(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0
}
func Xsqlite3_value_bytes16(tls *crt.TLS, _pVal *XMem) (r0 int32) {
- return _sqlite3ValueBytes(tls, _pVal, uint8(i32(2)))
+ return _sqlite3ValueBytes(tls, _pVal, uint8(2))
}
-// Return the number of columns in the result set for the statement pStmt.
+// C comment
+// /*
+// ** Return the number of columns in the result set for the statement pStmt.
+// */
func Xsqlite3_column_count(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
var _pVm *TVdbe
_pVm = (*TVdbe)(_pStmt)
return func() int32 {
if _pVm != nil {
- return int32(_pVm.X29)
+ return int32(_pVm.XnResColumn)
}
- return i32(0)
+ return int32(0)
}()
}
-// Return the column declaration type (if applicable) of the 'i'th column
-// of the result set of SQL statement pStmt.
+// C comment
+// /*
+// ** Return the column declaration type (if applicable) of the 'i'th column
+// ** of the result set of SQL statement pStmt.
+// */
func Xsqlite3_column_decltype(tls *crt.TLS, _pStmt unsafe.Pointer, _N int32) (r0 *int8) {
- return (*int8)(_columnName(tls, _pStmt, _N, *(*func(*crt.TLS, *XMem) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) *uint8 }{Xsqlite3_value_text})), i32(1)))
-}
-
-// Convert the N-th element of pStmt->pColName[] into a string using
-// xFunc() then return that string. If N is out of range, return 0.
-//
-// There are up to 5 names for each column. useType determines which
-// name is returned. Here are the names:
-//
-// 0 The column name as it should be displayed for output
-// 1 The datatype name for the column
-// 2 The name of the database that the column derives from
-// 3 The name of the table that the column derives from
-// 4 The name of the table column that the result column derives from
-//
-// If the result is not a simple column reference (if it is an expression
-// or a constant) then useTypes 2, 3, and 4 return NULL.
+ return (*int8)(_columnName(tls, _pStmt, _N, func() func(*crt.TLS, *XMem) unsafe.Pointer {
+ v := Xsqlite3_value_text
+ return *(*func(*crt.TLS, *XMem) unsafe.Pointer)(unsafe.Pointer(&v))
+ }(), int32(1)))
+}
+
+// C comment
+// /*
+// ** Convert the N-th element of pStmt->pColName[] into a string using
+// ** xFunc() then return that string. If N is out of range, return 0.
+// **
+// ** There are up to 5 names for each column. useType determines which
+// ** name is returned. Here are the names:
+// **
+// ** 0 The column name as it should be displayed for output
+// ** 1 The datatype name for the column
+// ** 2 The name of the database that the column derives from
+// ** 3 The name of the table that the column derives from
+// ** 4 The name of the table column that the result column derives from
+// **
+// ** If the result is not a simple column reference (if it is an expression
+// ** or a constant) then useTypes 2, 3, and 4 return NULL.
+// */
func _columnName(tls *crt.TLS, _pStmt unsafe.Pointer, _N int32, _xFunc func(*crt.TLS, *XMem) unsafe.Pointer, _useType int32) (r0 unsafe.Pointer) {
var _n int32
var _ret unsafe.Pointer
var _db *Xsqlite3
var _p *TVdbe
if _pStmt == nil {
- _sqlite3MisuseError(tls, i32(77206))
+ _sqlite3MisuseError(tls, int32(77206))
return nil
}
_ret = nil
_p = (*TVdbe)(_pStmt)
- _db = (*Xsqlite3)(_p.X0)
+ _db = (*Xsqlite3)(_p.Xdb)
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77213), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnNameØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77213), unsafe.Pointer(&_columnNameØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
_n = Xsqlite3_column_count(tls, _pStmt)
- if _N >= _n || _N < i32(0) {
+ if _N >= _n || _N < int32(0) {
goto _4
}
- {
- p := &_N
- *p = (*p) + (_useType * _n)
- sink1(*p)
- }
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ _N += _useType * _n
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
func() {
- if int32(_db.X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77218), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnNameØ00__func__Ø000))), unsafe.Pointer(str(1244)))
+ if int32(_db.XmallocFailed) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77218), unsafe.Pointer(&_columnNameØ00__func__Ø000), unsafe.Pointer(str(1262)))
crt.X__builtin_abort(tls)
}
}()
- _ret = _xFunc(tls, (*XMem)(unsafe.Pointer(uintptr(_p.X20)+48*uintptr(_N))))
- if (_db.X17) != 0 {
+ _ret = _xFunc(tls, elem25((*XMem)(_p.XaColName), uintptr(_N)))
+ if _db.XmallocFailed != 0 {
_sqlite3OomClear(tls, _db)
_ret = nil
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
_4:
return _ret
}
@@ -23429,15 +24062,15 @@ _4:
var _columnNameØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_columnNameØ00__func__Ø000[0], str(23705), 11)
+ crt.Xstrncpy(nil, &_columnNameØ00__func__Ø000[0], str(23660), 11)
}
func Xsqlite3_column_decltype16(tls *crt.TLS, _pStmt unsafe.Pointer, _N int32) (r0 unsafe.Pointer) {
- return _columnName(tls, _pStmt, _N, Xsqlite3_value_text16, i32(1))
+ return _columnName(tls, _pStmt, _N, Xsqlite3_value_text16, int32(1))
}
func Xsqlite3_value_text16(tls *crt.TLS, _pVal *XMem) (r0 unsafe.Pointer) {
- return _sqlite3ValueText(tls, _pVal, uint8(i32(2)))
+ return _sqlite3ValueText(tls, _pVal, uint8(2))
}
func Xsqlite3_column_double(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 float64) {
@@ -23461,45 +24094,48 @@ func Xsqlite3_value_int(tls *crt.TLS, _pVal *XMem) (r0 int32) {
func _sqlite3VdbeIntValue(tls *crt.TLS, _pMem *XMem) (r0 int64) {
var _flags int32
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70169), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIntValueØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70169), unsafe.Pointer(&_sqlite3VdbeIntValueØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pMem))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70170), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIntValueØ00__func__Ø000))), unsafe.Pointer(str(6321)))
+ if (int32(uintptr(unsafe.Pointer(_pMem))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70170), unsafe.Pointer(&_sqlite3VdbeIntValueØ00__func__Ø000), unsafe.Pointer(str(6222)))
crt.X__builtin_abort(tls)
}
}()
- _flags = int32(_pMem.X1)
- if (_flags & i32(4)) != 0 {
- return *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))
+ _flags = int32(_pMem.Xflags)
+ if (_flags & int32(4)) != 0 {
+ return *(*int64)(unsafe.Pointer(&_pMem.Xu))
}
- if (_flags & i32(8)) != 0 {
- return _doubleToInt64(tls, *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
+ if (_flags & int32(8)) != 0 {
+ return _doubleToInt64(tls, *(*float64)(unsafe.Pointer(&_pMem.Xu)))
}
- if (_flags & i32(18)) != 0 {
+ if (_flags & int32(18)) != 0 {
func() {
- if (_pMem.X5) == nil && (_pMem.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70177), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIntValueØ00__func__Ø000))), unsafe.Pointer(str(23716)))
+ if _pMem.Xz == nil && _pMem.Xn != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70177), unsafe.Pointer(&_sqlite3VdbeIntValueØ00__func__Ø000), unsafe.Pointer(str(23671)))
crt.X__builtin_abort(tls)
}
}()
return _memIntValue(tls, _pMem)
}
- return int64(i32(0))
+ return 0
}
var _sqlite3VdbeIntValueØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeIntValueØ00__func__Ø000[0], str(23738), 20)
+ crt.Xstrncpy(nil, &_sqlite3VdbeIntValueØ00__func__Ø000[0], str(23693), 20)
}
-// Convert a 64-bit IEEE double into a 64-bit signed integer.
-// If the double is out of range of a 64-bit signed integer then
-// return the closest available 64-bit signed integer.
+// C comment
+// /*
+// ** Convert a 64-bit IEEE double into a 64-bit signed integer.
+// ** If the double is out of range of a 64-bit signed integer then
+// ** return the closest available 64-bit signed integer.
+// */
func _doubleToInt64(tls *crt.TLS, _r float64) (r0 int64) {
if _r <= float64(_doubleToInt64Ø00minIntØ002) {
return _doubleToInt64Ø00minIntØ002
@@ -23513,147 +24149,125 @@ func _doubleToInt64(tls *crt.TLS, _r float64) (r0 int64) {
var _doubleToInt64Ø00minIntØ002 int64
func init() {
- _doubleToInt64Ø00minIntØ002 = i64(-9223372036854775808)
+ _doubleToInt64Ø00minIntØ002 = int64(-9223372036854775808)
}
var _doubleToInt64Ø00maxIntØ001 int64
func init() {
- _doubleToInt64Ø00maxIntØ001 = i64(9223372036854775807)
+ _doubleToInt64Ø00maxIntØ001 = int64(9223372036854775807)
}
-// Return some kind of integer value which is the best we can do
-// at representing the value that *pMem describes as an integer.
-// If pMem is an integer, then the value is exact. If pMem is
-// a floating-point then the value returned is the integer part.
-// If pMem is a string or blob, then we make an attempt to convert
-// it into an integer and return that. If pMem represents an
-// an SQL-NULL value, return 0.
-//
-// If pMem represents a string value, its encoding might be changed.
+// C comment
+// /*
+// ** Return some kind of integer value which is the best we can do
+// ** at representing the value that *pMem describes as an integer.
+// ** If pMem is an integer, then the value is exact. If pMem is
+// ** a floating-point then the value returned is the integer part.
+// ** If pMem is a string or blob, then we make an attempt to convert
+// ** it into an integer and return that. If pMem represents an
+// ** an SQL-NULL value, return 0.
+// **
+// ** If pMem represents a string value, its encoding might be changed.
+// */
func _memIntValue(tls *crt.TLS, _pMem *XMem) (r0 int64) {
var _value int64
- _value = i64(0)
- _sqlite3Atoi64(tls, _pMem.X5, &_value, _pMem.X4, _pMem.X2)
+ _value = int64(0)
+ _sqlite3Atoi64(tls, _pMem.Xz, &_value, _pMem.Xn, _pMem.Xenc)
return _value
}
-// Convert zNum to a 64-bit signed integer. zNum must be decimal. This
-// routine does *not* accept hexadecimal notation.
-//
-// If the zNum value is representable as a 64-bit twos-complement
-// integer, then write that value into *pNum and return 0.
-//
-// If zNum is exactly 9223372036854775808, return 2. This special
-// case is broken out because while 9223372036854775808 cannot be a
-// signed 64-bit integer, its negative -9223372036854775808 can be.
-//
-// If zNum is too big for a 64-bit integer and is not
-// 9223372036854775808 or if zNum contains any non-numeric text,
-// then return 1.
-//
-// length is the number of bytes in the string (bytes, not characters).
-// The string is not necessarily zero-terminated. The encoding is
-// given by enc.
+// C comment
+// /*
+// ** Convert zNum to a 64-bit signed integer. zNum must be decimal. This
+// ** routine does *not* accept hexadecimal notation.
+// **
+// ** If the zNum value is representable as a 64-bit twos-complement
+// ** integer, then write that value into *pNum and return 0.
+// **
+// ** If zNum is exactly 9223372036854775808, return 2. This special
+// ** case is broken out because while 9223372036854775808 cannot be a
+// ** signed 64-bit integer, its negative -9223372036854775808 can be.
+// **
+// ** If zNum is too big for a 64-bit integer and is not
+// ** 9223372036854775808 or if zNum contains any non-numeric text,
+// ** then return 1.
+// **
+// ** length is the number of bytes in the string (bytes, not characters).
+// ** The string is not necessarily zero-terminated. The encoding is
+// ** given by enc.
+// */
func _sqlite3Atoi64(tls *crt.TLS, _zNum *int8, _pNum *int64, _length int32, _enc uint8) (r0 int32) {
var _incr, _neg, _i, _c, _nonNum int32
var _u uint64
var _zStart, _zEnd *int8
- _u = u64(0)
- _neg = i32(0)
- _c = i32(0)
- _nonNum = i32(0)
- _zEnd = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zNum)) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_length)))))))
+ _u = uint64(0)
+ _neg = int32(0)
+ _c = int32(0)
+ _nonNum = int32(0)
+ _zEnd = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zNum)) + uintptr(_length)))
func() {
- if int32(_enc) != i32(1) && int32(_enc) != i32(2) && int32(_enc) != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28236), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3Atoi64Ø00__func__Ø000))), unsafe.Pointer(str(7088)))
+ if int32(_enc) != int32(1) && int32(_enc) != int32(2) && int32(_enc) != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28236), unsafe.Pointer(&_sqlite3Atoi64Ø00__func__Ø000), unsafe.Pointer(str(6989)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_enc) == i32(1) {
- _incr = i32(1)
+ if int32(_enc) == int32(1) {
+ _incr = int32(1)
goto _5
}
- _incr = i32(2)
- i32(0)
- _i = i32(3) - int32(_enc)
+ _incr = int32(2)
+
+ _i = int32(3) - int32(_enc)
_6:
- if _i >= _length || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(_i)))) != i32(0) {
+ if _i >= _length || int32(*elem1(_zNum, uintptr(_i))) != int32(0) {
goto _10
}
- {
- p := &_i
- *p = (*p) + i32(2)
- sink1(*p)
- }
+ _i += int32(2)
goto _6
_10:
_nonNum = bool2int(_i < _length)
- _zEnd = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(_i^i32(1))))
- {
- p := &_zNum
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(int32(_enc)&i32(1))))
- sink0(*p)
- }
+ _zEnd = elem1(_zNum, uintptr(_i^int32(1)))
+ *(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(int32(_enc) & int32(1))
_5:
- if (uintptr(unsafe.Pointer(_zNum)) < uintptr(unsafe.Pointer(_zEnd))) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_zNum)))))&i32(1)) != 0 {
- {
- p := &_zNum
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if (crt.P2U(unsafe.Pointer(_zNum)) < crt.P2U(unsafe.Pointer(_zEnd))) && (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_zNum))))&int32(1)) != 0 {
+ *(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(_incr)
goto _5
}
- if uintptr(unsafe.Pointer(_zNum)) >= uintptr(unsafe.Pointer(_zEnd)) {
+ if crt.P2U(unsafe.Pointer(_zNum)) >= crt.P2U(unsafe.Pointer(_zEnd)) {
goto _14
}
- if int32(*_zNum) == i32(45) {
- _neg = i32(1)
- {
- p := &_zNum
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if int32(*_zNum) == int32(45) {
+ _neg = int32(1)
+ *(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(_incr)
goto _17
}
- if int32(*_zNum) == i32(43) {
- {
- p := &_zNum
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if int32(*_zNum) == int32(43) {
+ *(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(_incr)
}
_17:
_14:
_zStart = _zNum
_18:
- if (uintptr(unsafe.Pointer(_zNum)) < uintptr(unsafe.Pointer(_zEnd))) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(0))))) == i32(48)) {
- {
- p := &_zNum
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_incr)))
- sink0(*p)
- }
+ if (crt.P2U(unsafe.Pointer(_zNum)) < crt.P2U(unsafe.Pointer(_zEnd))) && (int32(*elem1(_zNum, 0)) == int32(48)) {
+ *(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(_incr)
goto _18
}
- _i = i32(0)
+ _i = int32(0)
_21:
- if uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum))+1*uintptr(_i))))) >= uintptr(unsafe.Pointer(_zEnd)) || store1(&_c, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(_i))))) < i32(48) || _c > i32(57) {
+ if crt.P2U(unsafe.Pointer(elem1(_zNum, uintptr(_i)))) >= crt.P2U(unsafe.Pointer(_zEnd)) || store2(&_c, int32(*elem1(_zNum, uintptr(_i)))) < int32(48) || _c > int32(57) {
goto _26
}
- _u = ((_u * uint64(i32(10))) + uint64(_c)) - uint64(i32(48))
- {
- p := &_i
- *p = (*p) + _incr
- sink1(*p)
- }
+ _u = ((_u * uint64(10)) + uint64(_c)) - uint64(48)
+ _i += _incr
goto _21
_26:
- if _u > uint64(i64(9223372036854775807)) {
+ if _u > uint64(9223372036854775807) {
*_pNum = func() int64 {
if _neg != 0 {
- return i64(-9223372036854775808)
+ return int64(-9223372036854775808)
}
- return i64(9223372036854775807)
+ return int64(9223372036854775807)
}()
goto _32
}
@@ -23663,79 +24277,82 @@ _26:
}
*_pNum = int64(_u)
_32:
- if (((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum))+1*uintptr(_i))))) < uintptr(unsafe.Pointer(_zEnd))) || ((_i == i32(0)) && (_zStart == _zNum))) || (_i > (i32(19) * _incr))) || _nonNum != 0 {
- return i32(1)
+ if (((crt.P2U(unsafe.Pointer(elem1(_zNum, uintptr(_i)))) < crt.P2U(unsafe.Pointer(_zEnd))) || ((_i == int32(0)) && (_zStart == _zNum))) || (_i > (int32(19) * _incr))) || _nonNum != 0 {
+ return int32(1)
}
- if _i < (i32(19) * _incr) {
+ if _i < (int32(19) * _incr) {
func() {
- if _u > uint64(i64(9223372036854775807)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28281), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3Atoi64Ø00__func__Ø000))), unsafe.Pointer(str(23758)))
+ if _u > uint64(9223372036854775807) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28281), unsafe.Pointer(&_sqlite3Atoi64Ø00__func__Ø000), unsafe.Pointer(str(23713)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
}
_c = _compare2pow63(tls, _zNum, _incr)
- if _c < i32(0) {
+ if _c < int32(0) {
func() {
- if _u > uint64(i64(9223372036854775807)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28288), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3Atoi64Ø00__func__Ø000))), unsafe.Pointer(str(23758)))
+ if _u > uint64(9223372036854775807) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28288), unsafe.Pointer(&_sqlite3Atoi64Ø00__func__Ø000), unsafe.Pointer(str(23713)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
}
- if _c > i32(0) {
- return i32(1)
+ if _c > int32(0) {
+ return int32(1)
}
func() {
- if (_u - uint64(i32(1))) != uint64(i64(9223372036854775807)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28296), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3Atoi64Ø00__func__Ø000))), unsafe.Pointer(str(23775)))
+ if (_u - uint64(1)) != uint64(9223372036854775807) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28296), unsafe.Pointer(&_sqlite3Atoi64Ø00__func__Ø000), unsafe.Pointer(str(23730)))
crt.X__builtin_abort(tls)
}
}()
return func() int32 {
if _neg != 0 {
- return i32(0)
+ return int32(0)
}
- return i32(2)
+ return int32(2)
}()
}
var _sqlite3Atoi64Ø00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3Atoi64Ø00__func__Ø000[0], str(23794), 14)
-}
-
-// Compare the 19-character string zNum against the text representation
-// value 2^63: 9223372036854775808. Return negative, zero, or positive
-// if zNum is less than, equal to, or greater than the string.
-// Note that zNum must contain exactly 19 characters.
-//
-// Unlike memcmp() this routine is guaranteed to return the difference
-// in the values of the last digit if the only difference is in the
-// last digit. So, for example,
-//
-// compare2pow63("9223372036854775800", 1)
-//
-// will return -8.
+ crt.Xstrncpy(nil, &_sqlite3Atoi64Ø00__func__Ø000[0], str(23749), 14)
+}
+
+// C comment
+// /*
+// ** Compare the 19-character string zNum against the text representation
+// ** value 2^63: 9223372036854775808. Return negative, zero, or positive
+// ** if zNum is less than, equal to, or greater than the string.
+// ** Note that zNum must contain exactly 19 characters.
+// **
+// ** Unlike memcmp() this routine is guaranteed to return the difference
+// ** in the values of the last digit if the only difference is in the
+// ** last digit. So, for example,
+// **
+// ** compare2pow63("9223372036854775800", 1)
+// **
+// ** will return -8.
+// */
func _compare2pow63(tls *crt.TLS, _zNum *int8, _incr int32) (r0 int32) {
var _c, _i int32
var _pow63 *int8
- _c = i32(0)
- _pow63 = str(23808)
- _i = i32(0)
+ _c = int32(0)
+ _pow63 = str(23763)
+ _i = int32(0)
_0:
- if _c != i32(0) || _i >= i32(18) {
+ if _c != int32(0) || _i >= int32(18) {
goto _4
}
- _c = (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(_i*_incr)))) - int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pow63)) + 1*uintptr(_i))))) * i32(10)
+ _c = (int32(*elem1(_zNum, uintptr(_i*_incr))) - int32(*elem1(_pow63, uintptr(_i)))) * int32(10)
_i += 1
goto _0
_4:
- if _c == i32(0) {
- _c = int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(18)*_incr)))) - i32(56)
+ if _c == int32(0) {
+ _c = int32(*elem1(_zNum, uintptr(int32(18)*_incr))) - int32(56)
}
return _c
}
@@ -23751,14 +24368,20 @@ func Xsqlite3_value_int64(tls *crt.TLS, _pVal *XMem) (r0 int64) {
return _sqlite3VdbeIntValue(tls, _pVal)
}
-// Return the name of the Nth column of the result set returned by SQL
-// statement pStmt.
+// C comment
+// /*
+// ** Return the name of the Nth column of the result set returned by SQL
+// ** statement pStmt.
+// */
func Xsqlite3_column_name(tls *crt.TLS, _pStmt unsafe.Pointer, _N int32) (r0 *int8) {
- return (*int8)(_columnName(tls, _pStmt, _N, *(*func(*crt.TLS, *XMem) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS, *XMem) *uint8 }{Xsqlite3_value_text})), i32(0)))
+ return (*int8)(_columnName(tls, _pStmt, _N, func() func(*crt.TLS, *XMem) unsafe.Pointer {
+ v := Xsqlite3_value_text
+ return *(*func(*crt.TLS, *XMem) unsafe.Pointer)(unsafe.Pointer(&v))
+ }(), int32(0)))
}
func Xsqlite3_column_name16(tls *crt.TLS, _pStmt unsafe.Pointer, _N int32) (r0 unsafe.Pointer) {
- return _columnName(tls, _pStmt, _N, Xsqlite3_value_text16, i32(0))
+ return _columnName(tls, _pStmt, _N, Xsqlite3_value_text16, int32(0))
}
func Xsqlite3_column_text(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 *uint8) {
@@ -23775,7 +24398,8 @@ func Xsqlite3_column_text16(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 u
return _val
}
-// SQLITE_OMIT_UTF16
+// C comment
+// /* SQLITE_OMIT_UTF16 */
func Xsqlite3_column_type(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 int32) {
var _iType int32
_iType = Xsqlite3_value_type(tls, _columnMem(tls, _pStmt, _i))
@@ -23786,184 +24410,184 @@ func Xsqlite3_column_type(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 int
func Xsqlite3_column_value(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32) (r0 *XMem) {
var _pOut *XMem
_pOut = _columnMem(tls, _pStmt, _i)
- if (int32(_pOut.X1) & i32(2048)) != 0 {
+ if (int32(_pOut.Xflags) & int32(2048)) != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_pOut.X1)))
- *p = uint16(int32(*p) & i32(-2049))
- sink14(*p)
+ p := &_pOut.Xflags
+ *p = uint16(int32(*p) & int32(-2049))
}
{
- p := (*uint16)(unsafe.Pointer(&(_pOut.X1)))
- *p = uint16(int32(*p) | i32(4096))
- sink14(*p)
+ p := &_pOut.Xflags
+ *p = uint16(int32(*p) | int32(4096))
}
}
_columnMallocFailure(tls, _pStmt)
return _pOut
}
-// Register a function to be invoked when a transaction commits.
-// If the invoked function returns non-zero, then the commit becomes a
-// rollback.
+// C comment
+// /*
+// ** Register a function to be invoked when a transaction commits.
+// ** If the invoked function returns non-zero, then the commit becomes a
+// ** rollback.
+// */
func Xsqlite3_commit_hook(tls *crt.TLS, _db *Xsqlite3, _xCallback func(*crt.TLS, unsafe.Pointer) int32, _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
var _pOld unsafe.Pointer
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(142385))
+ _sqlite3MisuseError(tls, int32(142385))
return nil
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _pOld = _db.X45
- *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&(_db.X46))) = _xCallback
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X45))) = _pArg
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _pOld = _db.XpCommitArg
+ _db.XxCommitCallback = _xCallback
+ _db.XpCommitArg = _pArg
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _pOld
}
-// Return TRUE if the given SQL string ends in a semicolon.
-//
-// Special handling is require for CREATE TRIGGER statements.
-// Whenever the CREATE TRIGGER keywords are seen, the statement
-// must end with ";END;".
-//
-// This implementation uses a state machine with 8 states:
-//
-// (0) INVALID We have not yet seen a non-whitespace character.
-//
-// (1) START At the beginning or end of an SQL statement. This routine
-// returns 1 if it ends in the START state and 0 if it ends
-// in any other state.
-//
-// (2) NORMAL We are in the middle of statement which ends with a single
-// semicolon.
-//
-// (3) EXPLAIN The keyword EXPLAIN has been seen at the beginning of
-// a statement.
-//
-// (4) CREATE The keyword CREATE has been seen at the beginning of a
-// statement, possibly preceded by EXPLAIN and/or followed by
-// TEMP or TEMPORARY
-//
-// (5) TRIGGER We are in the middle of a trigger definition that must be
-// ended by a semicolon, the keyword END, and another semicolon.
-//
-// (6) SEMI We've seen the first semicolon in the ";END;" that occurs at
-// the end of a trigger definition.
-//
-// (7) END We've seen the ";END" of the ";END;" that occurs at the end
-// of a trigger definition.
-//
-// Transitions between states above are determined by tokens extracted
-// from the input. The following tokens are significant:
-//
-// (0) tkSEMI A semicolon.
-// (1) tkWS Whitespace.
-// (2) tkOTHER Any other SQL token.
-// (3) tkEXPLAIN The "explain" keyword.
-// (4) tkCREATE The "create" keyword.
-// (5) tkTEMP The "temp" or "temporary" keyword.
-// (6) tkTRIGGER The "trigger" keyword.
-// (7) tkEND The "end" keyword.
-//
-// Whitespace never causes a state transition and is always ignored.
-// This means that a SQL string of all whitespace is invalid.
-//
-// If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
-// to recognize the end of a trigger can be omitted. All we have to do
-// is look for a semicolon that is not part of an string or comment.
+// C comment
+// /*
+// ** Return TRUE if the given SQL string ends in a semicolon.
+// **
+// ** Special handling is require for CREATE TRIGGER statements.
+// ** Whenever the CREATE TRIGGER keywords are seen, the statement
+// ** must end with ";END;".
+// **
+// ** This implementation uses a state machine with 8 states:
+// **
+// ** (0) INVALID We have not yet seen a non-whitespace character.
+// **
+// ** (1) START At the beginning or end of an SQL statement. This routine
+// ** returns 1 if it ends in the START state and 0 if it ends
+// ** in any other state.
+// **
+// ** (2) NORMAL We are in the middle of statement which ends with a single
+// ** semicolon.
+// **
+// ** (3) EXPLAIN The keyword EXPLAIN has been seen at the beginning of
+// ** a statement.
+// **
+// ** (4) CREATE The keyword CREATE has been seen at the beginning of a
+// ** statement, possibly preceded by EXPLAIN and/or followed by
+// ** TEMP or TEMPORARY
+// **
+// ** (5) TRIGGER We are in the middle of a trigger definition that must be
+// ** ended by a semicolon, the keyword END, and another semicolon.
+// **
+// ** (6) SEMI We've seen the first semicolon in the ";END;" that occurs at
+// ** the end of a trigger definition.
+// **
+// ** (7) END We've seen the ";END" of the ";END;" that occurs at the end
+// ** of a trigger definition.
+// **
+// ** Transitions between states above are determined by tokens extracted
+// ** from the input. The following tokens are significant:
+// **
+// ** (0) tkSEMI A semicolon.
+// ** (1) tkWS Whitespace.
+// ** (2) tkOTHER Any other SQL token.
+// ** (3) tkEXPLAIN The "explain" keyword.
+// ** (4) tkCREATE The "create" keyword.
+// ** (5) tkTEMP The "temp" or "temporary" keyword.
+// ** (6) tkTRIGGER The "trigger" keyword.
+// ** (7) tkEND The "end" keyword.
+// **
+// ** Whitespace never causes a state transition and is always ignored.
+// ** This means that a SQL string of all whitespace is invalid.
+// **
+// ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
+// ** to recognize the end of a trigger can be omitted. All we have to do
+// ** is look for a semicolon that is not part of an string or comment.
+// */
func Xsqlite3_complete(tls *crt.TLS, _zSql *int8) (r0 int32) {
var _14_c, _17_nId int32
var _state, _token uint8
- _state = u8(0)
+ _state = uint8(0)
if _zSql == nil {
- _sqlite3MisuseError(tls, i32(140223))
- return i32(0)
+ _sqlite3MisuseError(tls, int32(140223))
+ return int32(0)
}
_0:
if (*_zSql) == 0 {
goto _2
}
switch int32(*_zSql) {
- case i32(9):
+ case int32(9):
goto _5
- case i32(10):
+ case int32(10):
goto _5
- case i32(12):
+ case int32(12):
goto _5
- case i32(13):
+ case int32(13):
goto _5
- case i32(32):
+ case int32(32):
goto _5
- case i32(34):
+ case int32(34):
goto _13
- case i32(39):
+ case int32(39):
goto _13
- case i32(45):
+ case int32(45):
goto _11
- case i32(47):
+ case int32(47):
goto _10
- case i32(59):
+ case int32(59):
goto _4
- case i32(91):
+ case int32(91):
goto _12
- case i32(96):
+ case int32(96):
goto _13
default:
goto _16
}
_4:
- _token = uint8(i32(0))
+ _token = 0
goto _17
_5:
- _token = uint8(i32(1))
+ _token = uint8(1)
goto _17
_10:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(1))))) != i32(42) {
- _token = uint8(i32(2))
+ if int32(*elem1(_zSql, uintptr(1))) != int32(42) {
+ _token = uint8(2)
goto _17
}
- {
- p := &_zSql
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(2))))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(int32(2))
_19:
- if ((*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(0))))) != 0) && ((int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(0))))) != i32(42)) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(1))))) != i32(47))) {
+ if ((*elem1(_zSql, 0)) != 0) && ((int32(*elem1(_zSql, 0)) != int32(42)) || (int32(*elem1(_zSql, uintptr(1))) != int32(47))) {
*(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(1)
goto _19
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(0))))) == i32(0) {
- return i32(0)
+ if int32(*elem1(_zSql, 0)) == int32(0) {
+ return int32(0)
}
*(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(1)
- _token = uint8(i32(1))
+ _token = uint8(1)
goto _17
_11:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(1))))) != i32(45) {
- _token = uint8(i32(2))
+ if int32(*elem1(_zSql, uintptr(1))) != int32(45) {
+ _token = uint8(2)
goto _17
}
_24:
- if ((*_zSql) != 0) && (int32(*_zSql) != i32(10)) {
+ if ((*_zSql) != 0) && (int32(*_zSql) != int32(10)) {
*(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(1)
goto _24
}
- if int32(*_zSql) == i32(0) {
- return bool2int(int32(_state) == i32(1))
+ if int32(*_zSql) == int32(0) {
+ return bool2int(int32(_state) == int32(1))
}
- _token = uint8(i32(1))
+ _token = uint8(1)
goto _17
_12:
*(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(1)
_29:
- if ((*_zSql) != 0) && (int32(*_zSql) != i32(93)) {
+ if ((*_zSql) != 0) && (int32(*_zSql) != int32(93)) {
*(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(1)
goto _29
}
- if int32(*_zSql) == i32(0) {
- return i32(0)
+ if int32(*_zSql) == int32(0) {
+ return int32(0)
}
- _token = uint8(i32(2))
+ _token = uint8(2)
goto _17
_13:
_14_c = int32(*_zSql)
@@ -23973,107 +24597,106 @@ _33:
*(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(1)
goto _33
}
- if int32(*_zSql) == i32(0) {
- return i32(0)
+ if int32(*_zSql) == int32(0) {
+ return int32(0)
}
- _token = uint8(i32(2))
+ _token = uint8(2)
goto _17
_16:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_zSql))))) & i32(70)) == i32(0) {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_zSql)))) & int32(70)) == int32(0) {
goto _37
}
- _17_nId = i32(1)
+ _17_nId = int32(1)
_38:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(_17_nId)))))))) & i32(70)) == i32(0) {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zSql, uintptr(_17_nId)))))) & int32(70)) == int32(0) {
goto _41
}
_17_nId += 1
goto _38
_41:
switch int32(*_zSql) {
- case i32(67):
+ case int32(67):
goto _43
- case i32(69):
+ case int32(69):
goto _47
- case i32(84):
+ case int32(84):
goto _45
- case i32(99):
+ case int32(99):
goto _43
- case i32(101):
+ case int32(101):
goto _47
- case i32(116):
+ case int32(116):
goto _45
default:
goto _49
}
_43:
- if (_17_nId == i32(6)) && (Xsqlite3_strnicmp(tls, _zSql, str(23827), i32(6)) == i32(0)) {
- _token = uint8(i32(4))
+ if (_17_nId == int32(6)) && (Xsqlite3_strnicmp(tls, _zSql, str(23782), int32(6)) == int32(0)) {
+ _token = uint8(4)
goto _52
}
- _token = uint8(i32(2))
+ _token = uint8(2)
_52:
goto _53
_45:
- if (_17_nId == i32(7)) && (Xsqlite3_strnicmp(tls, _zSql, str(23834), i32(7)) == i32(0)) {
- _token = uint8(i32(6))
+ if (_17_nId == int32(7)) && (Xsqlite3_strnicmp(tls, _zSql, str(23789), int32(7)) == int32(0)) {
+ _token = uint8(6)
goto _62
}
- if (_17_nId == i32(4)) && (Xsqlite3_strnicmp(tls, _zSql, str(23842), i32(4)) == i32(0)) {
- _token = uint8(i32(5))
+ if (_17_nId == int32(4)) && (Xsqlite3_strnicmp(tls, _zSql, str(23797), int32(4)) == int32(0)) {
+ _token = uint8(5)
goto _62
}
- if (_17_nId == i32(9)) && (Xsqlite3_strnicmp(tls, _zSql, str(23847), i32(9)) == i32(0)) {
- _token = uint8(i32(5))
+ if (_17_nId == int32(9)) && (Xsqlite3_strnicmp(tls, _zSql, str(23802), int32(9)) == int32(0)) {
+ _token = uint8(5)
goto _62
}
- _token = uint8(i32(2))
+ _token = uint8(2)
_62:
goto _53
_47:
- if (_17_nId == i32(3)) && (Xsqlite3_strnicmp(tls, _zSql, str(23857), i32(3)) == i32(0)) {
- _token = uint8(i32(7))
+ if (_17_nId == int32(3)) && (Xsqlite3_strnicmp(tls, _zSql, str(23812), int32(3)) == int32(0)) {
+ _token = uint8(7)
goto _68
}
- if (_17_nId == i32(7)) && (Xsqlite3_strnicmp(tls, _zSql, str(23861), i32(7)) == i32(0)) {
- _token = uint8(i32(3))
+ if (_17_nId == int32(7)) && (Xsqlite3_strnicmp(tls, _zSql, str(23816), int32(7)) == int32(0)) {
+ _token = uint8(3)
goto _68
}
- _token = uint8(i32(2))
+ _token = uint8(2)
_68:
goto _53
_49:
- _token = uint8(i32(2))
+ _token = uint8(2)
goto _53
_53:
- {
- p := &_zSql
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_17_nId-i32(1))))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(_17_nId - int32(1))
goto _69
_37:
- _token = uint8(i32(2))
+ _token = uint8(2)
_69:
goto _17
_17:
- _state = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[8]uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3_completeØ00transØ001))+8*uintptr(_state))))) + 1*uintptr(_token)))
+ _state = *elem15((*uint8)(unsafe.Pointer(elem47((*[8]uint8)(unsafe.Pointer(&_sqlite3_completeØ00transØ001)), uintptr(_state)))), uintptr(_token))
*(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(1)
goto _0
_2:
- return bool2int(int32(_state) == i32(1))
+ return bool2int(int32(_state) == int32(1))
}
var _sqlite3_completeØ00transØ001 [8][8]uint8
func init() {
- _sqlite3_completeØ00transØ001 = [8][8]uint8{[8]uint8{u8(1), u8(0), u8(2), u8(3), u8(4), u8(2), u8(2), u8(2)}, [8]uint8{u8(1), u8(1), u8(2), u8(3), u8(4), u8(2), u8(2), u8(2)}, [8]uint8{u8(1), u8(2), u8(2), u8(2), u8(2), u8(2), u8(2), u8(2)}, [8]uint8{u8(1), u8(3), u8(3), u8(2), u8(4), u8(2), u8(2), u8(2)}, [8]uint8{u8(1), u8(4), u8(2), u8(2), u8(2), u8(4), u8(5), u8(2)}, [8]uint8{u8(6), u8(5), u8(5), u8(5), u8(5), u8(5), u8(5), u8(5)}, [8]uint8{u8(6), u8(6), u8(5), u8(5), u8(5), u8(5), u8(5), u8(7)}, [8]uint8{u8(1), u8(7), u8(5), u8(5), u8(5), u8(5), u8(5), u8(5)}}
+ _sqlite3_completeØ00transØ001 = [8][8]uint8{[8]uint8{uint8(1), uint8(0), uint8(2), uint8(3), uint8(4), uint8(2), uint8(2), uint8(2)}, [8]uint8{uint8(1), uint8(1), uint8(2), uint8(3), uint8(4), uint8(2), uint8(2), uint8(2)}, [8]uint8{uint8(1), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2)}, [8]uint8{uint8(1), uint8(3), uint8(3), uint8(2), uint8(4), uint8(2), uint8(2), uint8(2)}, [8]uint8{uint8(1), uint8(4), uint8(2), uint8(2), uint8(2), uint8(4), uint8(5), uint8(2)}, [8]uint8{uint8(6), uint8(5), uint8(5), uint8(5), uint8(5), uint8(5), uint8(5), uint8(5)}, [8]uint8{uint8(6), uint8(6), uint8(5), uint8(5), uint8(5), uint8(5), uint8(5), uint8(7)}, [8]uint8{uint8(1), uint8(7), uint8(5), uint8(5), uint8(5), uint8(5), uint8(5), uint8(5)}}
}
-// This routine is the same as the sqlite3_complete() routine described
-// above, except that the parameter is required to be UTF-16 encoded, not
-// UTF-8.
+// C comment
+// /*
+// ** This routine is the same as the sqlite3_complete() routine described
+// ** above, except that the parameter is required to be UTF-16 encoded, not
+// ** UTF-8.
+// */
func Xsqlite3_complete16(tls *crt.TLS, _zSql unsafe.Pointer) (r0 int32) {
var _rc int32
var _zSql8 *int8
@@ -24083,196 +24706,207 @@ func Xsqlite3_complete16(tls *crt.TLS, _zSql unsafe.Pointer) (r0 int32) {
return _rc
}
_pVal = _sqlite3ValueNew(tls, nil)
- _sqlite3ValueSetStr(tls, _pVal, i32(-1), _zSql, uint8(i32(2)), nil)
- _zSql8 = (*int8)(_sqlite3ValueText(tls, _pVal, uint8(i32(1))))
+ _sqlite3ValueSetStr(tls, _pVal, int32(-1), _zSql, uint8(2), nil)
+ _zSql8 = (*int8)(_sqlite3ValueText(tls, _pVal, uint8(1)))
if _zSql8 != nil {
_rc = Xsqlite3_complete(tls, _zSql8)
goto _2
}
- _rc = _sqlite3NomemError(tls, i32(140368))
+ _rc = _sqlite3NomemError(tls, int32(140368))
_2:
_sqlite3ValueFree(tls, _pVal)
- return _rc & i32(255)
+ return _rc & int32(255)
}
-// Register a new collation sequence with the database handle db.
+// C comment
+// /*
+// ** Register a new collation sequence with the database handle db.
+// */
func Xsqlite3_create_collation(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _enc int32, _pCtx unsafe.Pointer, _xCompare func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) (r0 int32) {
return Xsqlite3_create_collation_v2(tls, _db, _zName, _enc, _pCtx, _xCompare, nil)
}
-// Register a new collation sequence with the database handle db.
+// C comment
+// /*
+// ** Register a new collation sequence with the database handle db.
+// */
func Xsqlite3_create_collation_v2(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _enc int32, _pCtx unsafe.Pointer, _xCompare func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32, _xDel func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
var _rc int32
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zName == nil) {
- return _sqlite3MisuseError(tls, i32(143671))
+ return _sqlite3MisuseError(tls, int32(143671))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
func() {
- if (_db.X17) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143674), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_create_collation_v2Ø00__func__Ø000))), unsafe.Pointer(str(23869)))
+ if _db.XmallocFailed != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143674), unsafe.Pointer(&_sqlite3_create_collation_v2Ø00__func__Ø000), unsafe.Pointer(str(23824)))
crt.X__builtin_abort(tls)
}
}()
_rc = _createCollation(tls, _db, _zName, uint8(_enc), _pCtx, _xCompare, _xDel)
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
var _sqlite3_create_collation_v2Ø00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_create_collation_v2Ø00__func__Ø000[0], str(23887), 28)
+ crt.Xstrncpy(nil, &_sqlite3_create_collation_v2Ø00__func__Ø000[0], str(23842), 28)
}
-// Create a new collating function for database "db". The name is zName
-// and the encoding is enc.
+// C comment
+// /*
+// ** Create a new collating function for database "db". The name is zName
+// ** and the encoding is enc.
+// */
func _createCollation(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _enc uint8, _pCtx unsafe.Pointer, _xCompare func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32, _xDel func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
var _enc2, _5_j int32
var _pColl, _5_aColl, _6_p *XCollSeq
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142821), unsafe.Pointer((*int8)(unsafe.Pointer(&_createCollationØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142821), unsafe.Pointer(&_createCollationØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
_enc2 = int32(_enc)
- if (_enc2 == i32(4)) || (_enc2 == i32(8)) {
- _enc2 = i32(2)
+ if (_enc2 == int32(4)) || (_enc2 == int32(8)) {
+ _enc2 = int32(2)
}
- if (_enc2 < i32(1)) || (_enc2 > i32(3)) {
- return _sqlite3MisuseError(tls, i32(142834))
+ if (_enc2 < int32(1)) || (_enc2 > int32(3)) {
+ return _sqlite3MisuseError(tls, int32(142834))
}
- _pColl = _sqlite3FindCollSeq(tls, _db, uint8(_enc2), _zName, i32(0))
- if _pColl == nil || (_pColl.X3) == nil {
+ _pColl = _sqlite3FindCollSeq(tls, _db, uint8(_enc2), _zName, int32(0))
+ if _pColl == nil || _pColl.XxCmp == nil {
goto _7
}
- if (_db.X34) != 0 {
- _sqlite3ErrorWithMsg(tls, _db, i32(5), str(23915))
- return i32(5)
+ if _db.XnVdbeActive != 0 {
+ _sqlite3ErrorWithMsg(tls, _db, int32(5), str(23870))
+ return int32(5)
}
_sqlite3ExpirePreparedStatements(tls, _db)
- if (int32(_pColl.X1) & i32(-9)) != _enc2 {
+ if (int32(_pColl.Xenc) & int32(-9)) != _enc2 {
goto _9
}
- _5_aColl = (*XCollSeq)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&(_db.X70))), _zName))
- _5_j = i32(0)
+ _5_aColl = (*XCollSeq)(_sqlite3HashFind(tls, &_db.XaCollSeq, _zName))
+ _5_j = int32(0)
_10:
- if _5_j >= i32(3) {
+ if _5_j >= int32(3) {
goto _13
}
- _6_p = (*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_aColl)) + 20*uintptr(_5_j)))
- if int32(_6_p.X1) != int32(_pColl.X1) {
+ _6_p = elem29(_5_aColl, uintptr(_5_j))
+ if int32(_6_p.Xenc) != int32(_pColl.Xenc) {
goto _14
}
- if (_6_p.X4) != nil {
- (_6_p.X4)(tls, _6_p.X2)
+ if _6_p.XxDel != nil {
+ _6_p.XxDel(tls, _6_p.XpUser)
}
- *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&(_6_p.X3))) = nil
+ _6_p.XxCmp = nil
_14:
_5_j += 1
goto _10
_13:
_9:
_7:
- _pColl = _sqlite3FindCollSeq(tls, _db, uint8(_enc2), _zName, i32(1))
+ _pColl = _sqlite3FindCollSeq(tls, _db, uint8(_enc2), _zName, int32(1))
if _pColl == nil {
- return _sqlite3NomemError(tls, i32(142872))
+ return _sqlite3NomemError(tls, int32(142872))
}
- *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&(_pColl.X3))) = _xCompare
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pColl.X2))) = _pCtx
- *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_pColl.X4))) = _xDel
- *(*uint8)(unsafe.Pointer(&(_pColl.X1))) = uint8(_enc2 | (int32(_enc) & i32(8)))
- _sqlite3Error(tls, _db, i32(0))
- return i32(0)
+ _pColl.XxCmp = _xCompare
+ _pColl.XpUser = _pCtx
+ _pColl.XxDel = _xDel
+ _pColl.Xenc = uint8(_enc2 | (int32(_enc) & int32(8)))
+ _sqlite3Error(tls, _db, int32(0))
+ return int32(0)
}
var _createCollationØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_createCollationØ00__func__Ø000[0], str(23983), 16)
-}
-
-// Parameter zName points to a UTF-8 encoded string nName bytes long.
-// Return the CollSeq* pointer for the collation sequence named zName
-// for the encoding 'enc' from the database 'db'.
-//
-// If the entry specified is not found and 'create' is true, then create a
-// new entry. Otherwise return NULL.
-//
-// A separate function sqlite3LocateCollSeq() is a wrapper around
-// this routine. sqlite3LocateCollSeq() invokes the collation factory
-// if necessary and generates an error message if the collating sequence
-// cannot be found.
-//
-// See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq()
+ crt.Xstrncpy(nil, &_createCollationØ00__func__Ø000[0], str(23938), 16)
+}
+
+// C comment
+// /*
+// ** Parameter zName points to a UTF-8 encoded string nName bytes long.
+// ** Return the CollSeq* pointer for the collation sequence named zName
+// ** for the encoding 'enc' from the database 'db'.
+// **
+// ** If the entry specified is not found and 'create' is true, then create a
+// ** new entry. Otherwise return NULL.
+// **
+// ** A separate function sqlite3LocateCollSeq() is a wrapper around
+// ** this routine. sqlite3LocateCollSeq() invokes the collation factory
+// ** if necessary and generates an error message if the collating sequence
+// ** cannot be found.
+// **
+// ** See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq()
+// */
func _sqlite3FindCollSeq(tls *crt.TLS, _db *Xsqlite3, _enc uint8, _zName *int8, _create int32) (r0 *XCollSeq) {
var _pColl *XCollSeq
if _zName != nil {
_pColl = _findCollSeqEntry(tls, _db, _zName, _create)
goto _1
}
- _pColl = (*XCollSeq)(_db.X2)
+ _pColl = (*XCollSeq)(_db.XpDfltColl)
_1:
- i32(0)
+
func() {
- if int32(_enc) < i32(1) || int32(_enc) > i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104362), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindCollSeqØ00__func__Ø000))), unsafe.Pointer(str(23999)))
+ if int32(_enc) < int32(1) || int32(_enc) > int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104362), unsafe.Pointer(&_sqlite3FindCollSeqØ00__func__Ø000), unsafe.Pointer(str(23954)))
crt.X__builtin_abort(tls)
}
}()
if _pColl != nil {
- {
- p := &_pColl
- *p = (*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 20*uintptr(int32(_enc)-i32(1))))
- sink32(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_pColl)) += 20 * uintptr(int32(_enc)-int32(1))
}
return _pColl
}
-// Locate and return an entry from the db.aCollSeq hash table. If the entry
-// specified by zName and nName is not found and parameter 'create' is
-// true, then create a new entry. Otherwise return NULL.
-//
-// Each pointer stored in the sqlite3.aCollSeq hash table contains an
-// array of three CollSeq structures. The first is the collation sequence
-// preferred for UTF-8, the second UTF-16le, and the third UTF-16be.
-//
-// Stored immediately after the three collation sequences is a copy of
-// the collation sequence name. A pointer to this string is stored in
-// each collation sequence structure.
+// C comment
+// /*
+// ** Locate and return an entry from the db.aCollSeq hash table. If the entry
+// ** specified by zName and nName is not found and parameter 'create' is
+// ** true, then create a new entry. Otherwise return NULL.
+// **
+// ** Each pointer stored in the sqlite3.aCollSeq hash table contains an
+// ** array of three CollSeq structures. The first is the collation sequence
+// ** preferred for UTF-8, the second UTF-16le, and the third UTF-16be.
+// **
+// ** Stored immediately after the three collation sequences is a copy of
+// ** the collation sequence name. A pointer to this string is stored in
+// ** each collation sequence structure.
+// */
func _findCollSeqEntry(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _create int32) (r0 *XCollSeq) {
var _1_nName int32
var _pColl, _2_pDel *XCollSeq
- _pColl = (*XCollSeq)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&(_db.X70))), _zName))
+ _pColl = (*XCollSeq)(_sqlite3HashFind(tls, &_db.XaCollSeq, _zName))
if nil != _pColl || _create == 0 {
goto _1
}
_1_nName = _sqlite3Strlen30(tls, _zName)
- _pColl = (*XCollSeq)(_sqlite3DbMallocZero(tls, _db, uint64((u32(60)+uint32(_1_nName))+uint32(i32(1)))))
+ _pColl = (*XCollSeq)(_sqlite3DbMallocZero(tls, _db, uint64((uint32(60)+uint32(_1_nName))+uint32(1))))
if _pColl == nil {
goto _2
}
_2_pDel = nil
- *(**int8)(unsafe.Pointer(&((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl)) + 20*uintptr(i32(0)))).X0))) = (*int8)(unsafe.Pointer((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl)) + 20*uintptr(i32(3))))))
- *(*uint8)(unsafe.Pointer(&((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl)) + 20*uintptr(i32(0)))).X1))) = uint8(i32(1))
- *(**int8)(unsafe.Pointer(&((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl)) + 20*uintptr(i32(1)))).X0))) = (*int8)(unsafe.Pointer((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl)) + 20*uintptr(i32(3))))))
- *(*uint8)(unsafe.Pointer(&((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl)) + 20*uintptr(i32(1)))).X1))) = uint8(i32(2))
- *(**int8)(unsafe.Pointer(&((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl)) + 20*uintptr(i32(2)))).X0))) = (*int8)(unsafe.Pointer((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl)) + 20*uintptr(i32(3))))))
- *(*uint8)(unsafe.Pointer(&((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl)) + 20*uintptr(i32(2)))).X1))) = uint8(i32(3))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl))+20*uintptr(i32(0)))).X0), (unsafe.Pointer)(_zName), uint32(_1_nName))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl))+20*uintptr(i32(0)))).X0)) + 1*uintptr(_1_nName))) = int8(i32(0))
- _2_pDel = (*XCollSeq)(_sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&(_db.X70))), (*XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pColl))+20*uintptr(i32(0)))).X0, (unsafe.Pointer)(_pColl)))
+ elem29(_pColl, 0).XzName = (*int8)(unsafe.Pointer(elem29(_pColl, uintptr(3))))
+ elem29(_pColl, 0).Xenc = uint8(1)
+ elem29(_pColl, uintptr(1)).XzName = (*int8)(unsafe.Pointer(elem29(_pColl, uintptr(3))))
+ elem29(_pColl, uintptr(1)).Xenc = uint8(2)
+ elem29(_pColl, uintptr(2)).XzName = (*int8)(unsafe.Pointer(elem29(_pColl, uintptr(3))))
+ elem29(_pColl, uintptr(2)).Xenc = uint8(3)
+ crt.Xmemcpy(tls, unsafe.Pointer(elem29(_pColl, 0).XzName), unsafe.Pointer(_zName), uint32(_1_nName))
+ *elem1(elem29(_pColl, 0).XzName, uintptr(_1_nName)) = 0
+ _2_pDel = (*XCollSeq)(_sqlite3HashInsert(tls, &_db.XaCollSeq, elem29(_pColl, 0).XzName, unsafe.Pointer(_pColl)))
func() {
if _2_pDel != nil && _2_pDel != _pColl {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104323), unsafe.Pointer((*int8)(unsafe.Pointer(&_findCollSeqEntryØ00__func__Ø000))), unsafe.Pointer(str(24039)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104323), unsafe.Pointer(&_findCollSeqEntryØ00__func__Ø000), unsafe.Pointer(str(23994)))
crt.X__builtin_abort(tls)
}
}()
if _2_pDel != nil {
_sqlite3OomFault(tls, _db)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_2_pDel))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_2_pDel))
_pColl = nil
}
_2:
@@ -24280,131 +24914,136 @@ _1:
return _pColl
}
-// Attempt to locate an element of the hash table pH with a key
-// that matches pKey. Return the data for this element if it is
-// found, or NULL if there is no match.
+// C comment
+// /* Attempt to locate an element of the hash table pH with a key
+// ** that matches pKey. Return the data for this element if it is
+// ** found, or NULL if there is no match.
+// */
func _sqlite3HashFind(tls *crt.TLS, _pH *XHash, _pKey *int8) (r0 unsafe.Pointer) {
var _h uint32
var _elem *XHashElem
func() {
if _pH == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29445), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3HashFindØ00__func__Ø000))), unsafe.Pointer(str(21170)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29445), unsafe.Pointer(&_sqlite3HashFindØ00__func__Ø000), unsafe.Pointer(str(21125)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pKey == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29446), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3HashFindØ00__func__Ø000))), unsafe.Pointer(str(21605)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29446), unsafe.Pointer(&_sqlite3HashFindØ00__func__Ø000), unsafe.Pointer(str(21560)))
crt.X__builtin_abort(tls)
}
}()
_elem = _findElementWithHash(tls, _pH, _pKey, &_h)
return func() unsafe.Pointer {
if _elem != nil {
- return _elem.X2
+ return _elem.Xdata
}
return nil
}()
-
- _ = _h
- panic(0)
}
var _sqlite3HashFindØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3HashFindØ00__func__Ø000[0], str(24062), 16)
+ crt.Xstrncpy(nil, &_sqlite3HashFindØ00__func__Ø000[0], str(24017), 16)
}
var _findCollSeqEntryØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_findCollSeqEntryØ00__func__Ø000[0], str(24078), 17)
+ crt.Xstrncpy(nil, &_findCollSeqEntryØ00__func__Ø000[0], str(24033), 17)
}
var _sqlite3FindCollSeqØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FindCollSeqØ00__func__Ø000[0], str(24095), 19)
+ crt.Xstrncpy(nil, &_sqlite3FindCollSeqØ00__func__Ø000[0], str(24050), 19)
}
-// Register a new collation sequence with the database handle db.
+// C comment
+// /*
+// ** Register a new collation sequence with the database handle db.
+// */
func Xsqlite3_create_collation16(tls *crt.TLS, _db *Xsqlite3, _zName unsafe.Pointer, _enc int32, _pCtx unsafe.Pointer, _xCompare func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) (r0 int32) {
var _rc int32
var _zName8 *int8
- _rc = i32(0)
+ _rc = int32(0)
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zName == nil) {
- return _sqlite3MisuseError(tls, i32(143696))
+ return _sqlite3MisuseError(tls, int32(143696))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
func() {
- if (_db.X17) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143699), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_create_collation16Ø00__func__Ø000))), unsafe.Pointer(str(23869)))
+ if _db.XmallocFailed != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143699), unsafe.Pointer(&_sqlite3_create_collation16Ø00__func__Ø000), unsafe.Pointer(str(23824)))
crt.X__builtin_abort(tls)
}
}()
- _zName8 = _sqlite3Utf16to8(tls, _db, _zName, i32(-1), uint8(i32(2)))
+ _zName8 = _sqlite3Utf16to8(tls, _db, _zName, int32(-1), uint8(2))
if _zName8 != nil {
_rc = _createCollation(tls, _db, _zName8, uint8(_enc), _pCtx, _xCompare, nil)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zName8))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zName8))
}
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
var _sqlite3_create_collation16Ø00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_create_collation16Ø00__func__Ø000[0], str(24114), 27)
+ crt.Xstrncpy(nil, &_sqlite3_create_collation16Ø00__func__Ø000[0], str(24069), 27)
}
-// Convert a UTF-16 string in the native encoding into a UTF-8 string.
-// Memory to hold the UTF-8 string is obtained from sqlite3_malloc and must
-// be freed by the calling function.
-//
-// NULL is returned if there is an allocation error.
+// C comment
+// /*
+// ** Convert a UTF-16 string in the native encoding into a UTF-8 string.
+// ** Memory to hold the UTF-8 string is obtained from sqlite3_malloc and must
+// ** be freed by the calling function.
+// **
+// ** NULL is returned if there is an allocation error.
+// */
func _sqlite3Utf16to8(tls *crt.TLS, _db *Xsqlite3, _z unsafe.Pointer, _nByte int32, _enc uint8) (r0 *int8) {
var _m XMem
- crt.Xmemset(tls, (unsafe.Pointer)(&_m), i32(0), u32(48))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_m.X9))))) = _db
+ crt.Xmemset(tls, unsafe.Pointer(&_m), int32(0), uint32(48))
+ *(**Xsqlite3)(unsafe.Pointer(&_m.Xdb)) = _db
_sqlite3VdbeMemSetStr(tls, &_m, (*int8)(_z), _nByte, _enc, nil)
- _sqlite3VdbeChangeEncoding(tls, &_m, i32(1))
- if (_db.X17) != 0 {
+ _sqlite3VdbeChangeEncoding(tls, &_m, int32(1))
+ if _db.XmallocFailed != 0 {
_sqlite3VdbeMemRelease(tls, &_m)
- *(**int8)(unsafe.Pointer(&(_m.X5))) = nil
+ _m.Xz = nil
}
func() {
- if (int32(_m.X1)&i32(512)) == i32(0) && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27570), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3Utf16to8Ø00__func__Ø000))), unsafe.Pointer(str(24141)))
+ if (int32(_m.Xflags)&int32(512)) == int32(0) && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27570), unsafe.Pointer(&_sqlite3Utf16to8Ø00__func__Ø000), unsafe.Pointer(str(24096)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_m.X1)&i32(2)) == i32(0) && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27571), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3Utf16to8Ø00__func__Ø000))), unsafe.Pointer(str(24185)))
+ if (int32(_m.Xflags)&int32(2)) == int32(0) && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27571), unsafe.Pointer(&_sqlite3Utf16to8Ø00__func__Ø000), unsafe.Pointer(str(24140)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_m.X5) == nil && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27572), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3Utf16to8Ø00__func__Ø000))), unsafe.Pointer(str(24228)))
+ if _m.Xz == nil && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27572), unsafe.Pointer(&_sqlite3Utf16to8Ø00__func__Ø000), unsafe.Pointer(str(24183)))
crt.X__builtin_abort(tls)
}
}()
- return _m.X5
-
- _ = _m
- panic(0)
+ return _m.Xz
}
var _sqlite3Utf16to8Ø00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3Utf16to8Ø00__func__Ø000[0], str(24252), 16)
+ crt.Xstrncpy(nil, &_sqlite3Utf16to8Ø00__func__Ø000[0], str(24207), 16)
}
-// Create new user functions.
+// C comment
+// /*
+// ** Create new user functions.
+// */
func Xsqlite3_create_function(tls *crt.TLS, _db *Xsqlite3, _zFunc *int8, _nArg int32, _enc int32, _p unsafe.Pointer, _xSFunc func(*crt.TLS, *Xsqlite3_context, int32, **XMem), _xStep func(*crt.TLS, *Xsqlite3_context, int32, **XMem), _xFinal func(*crt.TLS, *Xsqlite3_context)) (r0 int32) {
return Xsqlite3_create_function_v2(tls, _db, _zFunc, _nArg, _enc, _p, _xSFunc, _xStep, _xFinal, nil)
}
@@ -24412,121 +25051,120 @@ func Xsqlite3_create_function(tls *crt.TLS, _db *Xsqlite3, _zFunc *int8, _nArg i
func Xsqlite3_create_function_v2(tls *crt.TLS, _db *Xsqlite3, _zFunc *int8, _nArg int32, _enc int32, _p unsafe.Pointer, _xSFunc func(*crt.TLS, *Xsqlite3_context, int32, **XMem), _xStep func(*crt.TLS, *Xsqlite3_context, int32, **XMem), _xFinal func(*crt.TLS, *Xsqlite3_context), _xDestroy func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
var _rc int32
var _pArg *XFuncDestructor
- _rc = i32(1)
+ _rc = int32(1)
_pArg = nil
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(142198))
+ return _sqlite3MisuseError(tls, int32(142198))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
if _xDestroy == nil {
goto _1
}
- _pArg = (*XFuncDestructor)(_sqlite3DbMallocZero(tls, _db, uint64(u32(12))))
+ _pArg = (*XFuncDestructor)(_sqlite3DbMallocZero(tls, _db, uint64(12)))
if _pArg == nil {
_xDestroy(tls, _p)
goto _out
}
- *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_pArg.X1))) = _xDestroy
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pArg.X2))) = _p
+ _pArg.XxDestroy = _xDestroy
+ _pArg.XpUserData = _p
_1:
_rc = _sqlite3CreateFunc(tls, _db, _zFunc, _nArg, _enc, _p, _xSFunc, _xStep, _xFinal, _pArg)
- if (_pArg != nil) && ((_pArg.X0) == i32(0)) {
+ if (_pArg != nil) && (_pArg.XnRef == int32(0)) {
func() {
- if _rc == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142213), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_create_function_v2Ø00__func__Ø000))), unsafe.Pointer(str(18512)))
+ if _rc == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142213), unsafe.Pointer(&_sqlite3_create_function_v2Ø00__func__Ø000), unsafe.Pointer(str(18467)))
crt.X__builtin_abort(tls)
}
}()
_xDestroy(tls, _p)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pArg))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pArg))
}
_out:
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
-// This function is exactly the same as sqlite3_create_function(), except
-// that it is designed to be called by internal code. The difference is
-// that if a malloc() fails in sqlite3_create_function(), an error code
-// is returned and the mallocFailed flag cleared.
+// C comment
+// /*
+// ** This function is exactly the same as sqlite3_create_function(), except
+// ** that it is designed to be called by internal code. The difference is
+// ** that if a malloc() fails in sqlite3_create_function(), an error code
+// ** is returned and the mallocFailed flag cleared.
+// */
func _sqlite3CreateFunc(tls *crt.TLS, _db *Xsqlite3, _zFunctionName *int8, _nArg int32, _enc int32, _pUserData unsafe.Pointer, _xSFunc func(*crt.TLS, *Xsqlite3_context, int32, **XMem), _xStep func(*crt.TLS, *Xsqlite3_context, int32, **XMem), _xFinal func(*crt.TLS, *Xsqlite3_context), _pDestructor *XFuncDestructor) (r0 int32) {
var _nName, _extraFlags, _3_rc int32
var _p *XFuncDef
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142084), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateFuncØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142084), unsafe.Pointer(&_sqlite3CreateFuncØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- if (((((_zFunctionName == nil) || ((_xSFunc != nil) && ((_xFinal != nil) || (_xStep != nil)))) || ((_xSFunc == nil) && ((_xFinal != nil) && (_xStep == nil)))) || ((_xSFunc == nil) && ((_xFinal == nil) && (_xStep != nil)))) || ((_nArg < i32(-1)) || (_nArg > i32(127)))) || (i32(255) < store1(&_nName, _sqlite3Strlen30(tls, _zFunctionName))) {
- return _sqlite3MisuseError(tls, i32(142091))
- }
- i32(0)
- _extraFlags = _enc & i32(2048)
- {
- p := &_enc
- *p = (*p) & i32(7)
- sink1(*p)
+ if (((((_zFunctionName == nil) || ((_xSFunc != nil) && ((_xFinal != nil) || (_xStep != nil)))) || ((_xSFunc == nil) && ((_xFinal != nil) && (_xStep == nil)))) || ((_xSFunc == nil) && ((_xFinal == nil) && (_xStep != nil)))) || ((_nArg < int32(-1)) || (_nArg > int32(127)))) || (int32(255) < store2(&_nName, _sqlite3Strlen30(tls, _zFunctionName))) {
+ return _sqlite3MisuseError(tls, int32(142091))
}
- if _enc == i32(4) {
- _enc = i32(2)
+
+ _extraFlags = _enc & int32(2048)
+ _enc &= int32(7)
+ if _enc == int32(4) {
+ _enc = int32(2)
goto _17
}
- if _enc != i32(5) {
+ if _enc != int32(5) {
goto _17
}
- _3_rc = _sqlite3CreateFunc(tls, _db, _zFunctionName, _nArg, i32(1)|_extraFlags, _pUserData, _xSFunc, _xStep, _xFinal, _pDestructor)
- if _3_rc == i32(0) {
- _3_rc = _sqlite3CreateFunc(tls, _db, _zFunctionName, _nArg, i32(2)|_extraFlags, _pUserData, _xSFunc, _xStep, _xFinal, _pDestructor)
+ _3_rc = _sqlite3CreateFunc(tls, _db, _zFunctionName, _nArg, int32(1)|_extraFlags, _pUserData, _xSFunc, _xStep, _xFinal, _pDestructor)
+ if _3_rc == int32(0) {
+ _3_rc = _sqlite3CreateFunc(tls, _db, _zFunctionName, _nArg, int32(2)|_extraFlags, _pUserData, _xSFunc, _xStep, _xFinal, _pDestructor)
}
- if _3_rc != i32(0) {
+ if _3_rc != int32(0) {
return _3_rc
}
- _enc = i32(3)
+ _enc = int32(3)
_17:
- _p = _sqlite3FindFunction(tls, _db, _zFunctionName, _nArg, uint8(_enc), uint8(i32(0)))
- if _p == nil || (int32(_p.X1)&i32(3)) != _enc || int32(_p.X0) != _nArg {
+ _p = _sqlite3FindFunction(tls, _db, _zFunctionName, _nArg, uint8(_enc), 0)
+ if _p == nil || (int32(_p.XfuncFlags)&int32(3)) != _enc || int32(_p.XnArg) != _nArg {
goto _22
}
- if (_db.X34) != 0 {
- _sqlite3ErrorWithMsg(tls, _db, i32(5), str(24268))
+ if _db.XnVdbeActive != 0 {
+ _sqlite3ErrorWithMsg(tls, _db, int32(5), str(24223))
func() {
- if (_db.X17) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142135), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateFuncØ00__func__Ø000))), unsafe.Pointer(str(23869)))
+ if _db.XmallocFailed != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142135), unsafe.Pointer(&_sqlite3CreateFuncØ00__func__Ø000), unsafe.Pointer(str(23824)))
crt.X__builtin_abort(tls)
}
}()
- return i32(5)
+ return int32(5)
}
_sqlite3ExpirePreparedStatements(tls, _db)
_22:
- _p = _sqlite3FindFunction(tls, _db, _zFunctionName, _nArg, uint8(_enc), uint8(i32(1)))
+ _p = _sqlite3FindFunction(tls, _db, _zFunctionName, _nArg, uint8(_enc), uint8(1))
func() {
- if _p == nil && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142143), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateFuncØ00__func__Ø000))), unsafe.Pointer(str(24331)))
+ if _p == nil && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142143), unsafe.Pointer(&_sqlite3CreateFuncØ00__func__Ø000), unsafe.Pointer(str(24286)))
crt.X__builtin_abort(tls)
}
}()
if _p == nil {
- return _sqlite3NomemError(tls, i32(142145))
+ return _sqlite3NomemError(tls, int32(142145))
}
_functionDestroy(tls, _db, _p)
if _pDestructor != nil {
- *(*int32)(unsafe.Pointer(&(_pDestructor.X0))) += 1
+ _pDestructor.XnRef += 1
}
- *(**XFuncDestructor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X7))))))) = _pDestructor
- *(*uint16)(unsafe.Pointer(&(_p.X1))) = uint16((int32(_p.X1) & i32(3)) | _extraFlags)
- *(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&(_p.X4))))) = func() func(*crt.TLS, *Xsqlite3_context, int32, **XMem) {
+ *(**XFuncDestructor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))) = _pDestructor
+ _p.XfuncFlags = uint16((int32(_p.XfuncFlags) & int32(3)) | _extraFlags)
+ *(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer(&_p.XxSFunc)) = func() func(*crt.TLS, *Xsqlite3_context, int32, **XMem) {
if _xSFunc != nil {
return _xSFunc
}
return _xStep
}()
- *(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_p.X5))))) = _xFinal
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))) = _pUserData
- *(*int8)(unsafe.Pointer(&(_p.X0))) = int8(uint16(_nArg))
- return i32(0)
+ *(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&_p.XxFinalize)) = _xFinal
+ _p.XpUserData = _pUserData
+ _p.XnArg = int8(uint16(_nArg))
+ return int32(0)
_ = _nName
panic(0)
@@ -24535,45 +25173,48 @@ _22:
var _sqlite3CreateFuncØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CreateFuncØ00__func__Ø000[0], str(24353), 18)
-}
-
-// Locate a user function given a name, a number of arguments and a flag
-// indicating whether the function prefers UTF-16 over UTF-8. Return a
-// pointer to the FuncDef structure that defines that function, or return
-// NULL if the function does not exist.
-//
-// If the createFlag argument is true, then a new (blank) FuncDef
-// structure is created and liked into the "db" structure if a
-// no matching function previously existed.
-//
-// If nArg is -2, then the first valid function found is returned. A
-// function is valid if xSFunc is non-zero. The nArg==(-2)
-// case is used to see if zName is a valid function name for some number
-// of arguments. If nArg is -2, then createFlag must be 0.
-//
-// If createFlag is false, then a function with the required name and
-// number of arguments may be returned even if the eTextRep flag does not
-// match that requested.
+ crt.Xstrncpy(nil, &_sqlite3CreateFuncØ00__func__Ø000[0], str(24308), 18)
+}
+
+// C comment
+// /*
+// ** Locate a user function given a name, a number of arguments and a flag
+// ** indicating whether the function prefers UTF-16 over UTF-8. Return a
+// ** pointer to the FuncDef structure that defines that function, or return
+// ** NULL if the function does not exist.
+// **
+// ** If the createFlag argument is true, then a new (blank) FuncDef
+// ** structure is created and liked into the "db" structure if a
+// ** no matching function previously existed.
+// **
+// ** If nArg is -2, then the first valid function found is returned. A
+// ** function is valid if xSFunc is non-zero. The nArg==(-2)
+// ** case is used to see if zName is a valid function name for some number
+// ** of arguments. If nArg is -2, then createFlag must be 0.
+// **
+// ** If createFlag is false, then a function with the required name and
+// ** number of arguments may be returned even if the eTextRep flag does not
+// ** match that requested.
+// */
func _sqlite3FindFunction(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _nArg int32, _enc uint8, _createFlag uint8) (r0 *XFuncDef) {
var _bestScore, _h, _nName, _1_score, _4_score int32
var _p, _pBest, _6_pOther *XFuncDef
_pBest = nil
- _bestScore = i32(0)
+ _bestScore = int32(0)
func() {
- if _nArg < i32(-2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104504), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindFunctionØ00__func__Ø000))), unsafe.Pointer(str(24371)))
+ if _nArg < int32(-2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104504), unsafe.Pointer(&_sqlite3FindFunctionØ00__func__Ø000), unsafe.Pointer(str(24326)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nArg < i32(-1) && int32(_createFlag) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104505), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindFunctionØ00__func__Ø000))), unsafe.Pointer(str(24382)))
+ if _nArg < int32(-1) && int32(_createFlag) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104505), unsafe.Pointer(&_sqlite3FindFunctionØ00__func__Ø000), unsafe.Pointer(str(24337)))
crt.X__builtin_abort(tls)
}
}()
_nName = _sqlite3Strlen30(tls, _zName)
- _p = (*XFuncDef)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&(_db.X69))), _zName))
+ _p = (*XFuncDef)(_sqlite3HashFind(tls, &_db.XaFunc, _zName))
_5:
if _p == nil {
goto _6
@@ -24583,14 +25224,14 @@ _5:
_pBest = _p
_bestScore = _1_score
}
- _p = (*XFuncDef)(_p.X3)
+ _p = (*XFuncDef)(_p.XpNext)
goto _5
_6:
- if _createFlag != 0 || _pBest != nil && ((_db.X6)&i32(2097152)) == i32(0) {
+ if _createFlag != 0 || _pBest != nil && (_db.Xflags&int32(2097152)) == int32(0) {
goto _10
}
- _bestScore = i32(0)
- _h = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zName)) + 1*uintptr(i32(0))))))))) + _nName) % i32(23)
+ _bestScore = int32(0)
+ _h = (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(*elem1(_zName, 0))))) + _nName) % int32(23)
_p = _functionSearch(tls, _h, _zName)
_11:
if _p == nil {
@@ -24601,28 +25242,26 @@ _11:
_pBest = _p
_bestScore = _4_score
}
- _p = (*XFuncDef)(_p.X3)
+ _p = (*XFuncDef)(_p.XpNext)
goto _11
_12:
_10:
- if _createFlag == 0 || _bestScore >= i32(6) || store33(&_pBest, (*XFuncDef)(_sqlite3DbMallocZero(tls, _db, uint64((u32(28)+uint32(_nName))+uint32(i32(1)))))) == nil {
+ if _createFlag == 0 || _bestScore >= int32(6) || store17(&_pBest, (*XFuncDef)(_sqlite3DbMallocZero(tls, _db, uint64((uint32(28)+uint32(_nName))+uint32(1))))) == nil {
goto _16
}
- *(**int8)(unsafe.Pointer(&(_pBest.X6))) = (*int8)(unsafe.Pointer((*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pBest)) + 28*uintptr(i32(1))))))
- *(*int8)(unsafe.Pointer(&(_pBest.X0))) = int8(uint16(_nArg))
- *(*uint16)(unsafe.Pointer(&(_pBest.X1))) = uint16(_enc)
- crt.Xmemcpy(tls, (unsafe.Pointer)((*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pBest))+28*uintptr(i32(1))))), (unsafe.Pointer)(_zName), uint32(_nName+i32(1)))
- _6_pOther = (*XFuncDef)(_sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&(_db.X69))), _pBest.X6, (unsafe.Pointer)(_pBest)))
+ _pBest.XzName = (*int8)(unsafe.Pointer(elem17(_pBest, uintptr(1))))
+ _pBest.XnArg = int8(uint16(_nArg))
+ _pBest.XfuncFlags = uint16(_enc)
+ crt.Xmemcpy(tls, unsafe.Pointer(elem17(_pBest, uintptr(1))), unsafe.Pointer(_zName), uint32(_nName+int32(1)))
+ _6_pOther = (*XFuncDef)(_sqlite3HashInsert(tls, &_db.XaFunc, _pBest.XzName, unsafe.Pointer(_pBest)))
if _6_pOther == _pBest {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pBest))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pBest))
_sqlite3OomFault(tls, _db)
return nil
}
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBest.X3))))) = _6_pOther
+ *(**XFuncDef)(unsafe.Pointer(&_pBest.XpNext)) = _6_pOther
_16:
- if (_pBest != nil) && (((*(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{(_pBest.X4)}))) != nil) || (_createFlag != 0)) {
+ if (_pBest != nil) && ((_pBest.XxSFunc != nil) || (_createFlag != 0)) {
return _pBest
}
return nil
@@ -24631,49 +25270,39 @@ _16:
var _sqlite3FindFunctionØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FindFunctionØ00__func__Ø000[0], str(24410), 20)
+ crt.Xstrncpy(nil, &_sqlite3FindFunctionØ00__func__Ø000[0], str(24365), 20)
}
-// The score for a perfect match
+// C comment
+// /* The score for a perfect match */
func _matchQuality(tls *crt.TLS, _p *XFuncDef, _nArg int32, _enc uint8) (r0 int32) {
var _match int32
- if _nArg == i32(-2) {
+ if _nArg == int32(-2) {
return func() int32 {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{(*(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{(_p.X4)})))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{nil})) {
- return i32(0)
+ if func() func(*crt.TLS, *Xsqlite3_context, int32, **XMem) {
+ v := _p.XxSFunc
+ return *(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer(&v))
+ }() == nil {
+ return int32(0)
}
- return i32(6)
+ return int32(6)
}()
}
- if (int32(_p.X0) != _nArg) && (int32(_p.X0) >= i32(0)) {
- return i32(0)
+ if (int32(_p.XnArg) != _nArg) && (int32(_p.XnArg) >= int32(0)) {
+ return int32(0)
}
- if int32(_p.X0) == _nArg {
- _match = i32(4)
+ if int32(_p.XnArg) == _nArg {
+ _match = int32(4)
goto _6
}
- _match = i32(1)
+ _match = int32(1)
_6:
- if int32(_enc) == (int32(_p.X1) & i32(3)) {
- {
- p := &_match
- *p = (*p) + i32(2)
- sink1(*p)
- }
+ if int32(_enc) == (int32(_p.XfuncFlags) & int32(3)) {
+ _match += int32(2)
goto _9
}
- if ((int32(_enc) & int32(_p.X1)) & i32(2)) != i32(0) {
- {
- p := &_match
- *p = (*p) + i32(1)
- sink1(*p)
- }
+ if ((int32(_enc) & int32(_p.XfuncFlags)) & int32(2)) != int32(0) {
+ _match += int32(1)
}
_9:
return _match
@@ -24682,94 +25311,103 @@ _9:
var _sqlite3_create_function_v2Ø00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_create_function_v2Ø00__func__Ø000[0], str(24430), 27)
+ crt.Xstrncpy(nil, &_sqlite3_create_function_v2Ø00__func__Ø000[0], str(24385), 27)
}
func Xsqlite3_create_function16(tls *crt.TLS, _db *Xsqlite3, _zFunctionName unsafe.Pointer, _nArg int32, _eTextRep int32, _p unsafe.Pointer, _xSFunc func(*crt.TLS, *Xsqlite3_context, int32, **XMem), _xStep func(*crt.TLS, *Xsqlite3_context, int32, **XMem), _xFinal func(*crt.TLS, *Xsqlite3_context)) (r0 int32) {
var _rc int32
var _zFunc8 *int8
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zFunctionName == nil) {
- return _sqlite3MisuseError(tls, i32(142239))
+ return _sqlite3MisuseError(tls, int32(142239))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
func() {
- if (_db.X17) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142242), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_create_function16Ø00__func__Ø000))), unsafe.Pointer(str(23869)))
+ if _db.XmallocFailed != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142242), unsafe.Pointer(&_sqlite3_create_function16Ø00__func__Ø000), unsafe.Pointer(str(23824)))
crt.X__builtin_abort(tls)
}
}()
- _zFunc8 = _sqlite3Utf16to8(tls, _db, _zFunctionName, i32(-1), uint8(i32(2)))
+ _zFunc8 = _sqlite3Utf16to8(tls, _db, _zFunctionName, int32(-1), uint8(2))
_rc = _sqlite3CreateFunc(tls, _db, _zFunc8, _nArg, _eTextRep, _p, _xSFunc, _xStep, _xFinal, nil)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zFunc8))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zFunc8))
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
var _sqlite3_create_function16Ø00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_create_function16Ø00__func__Ø000[0], str(24457), 26)
+ crt.Xstrncpy(nil, &_sqlite3_create_function16Ø00__func__Ø000[0], str(24412), 26)
}
-// External API function used to create a new virtual-table module.
+// C comment
+// /*
+// ** External API function used to create a new virtual-table module.
+// */
func Xsqlite3_create_module(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _pModule *Xsqlite3_module, _pAux unsafe.Pointer) (r0 int32) {
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zName == nil) {
- return _sqlite3MisuseError(tls, i32(125090))
+ return _sqlite3MisuseError(tls, int32(125090))
}
return _createModule(tls, _db, _zName, _pModule, _pAux, nil)
}
-// The actual function that does the work of creating a new module.
-// This function implements the sqlite3_create_module() and
-// sqlite3_create_module_v2() interfaces.
+// C comment
+// /*
+// ** The actual function that does the work of creating a new module.
+// ** This function implements the sqlite3_create_module() and
+// ** sqlite3_create_module_v2() interfaces.
+// */
func _createModule(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _pModule *Xsqlite3_module, _pAux unsafe.Pointer, _xDestroy func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
var _rc int32
- _rc = i32(0)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- if _sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&(_db.X65))), _zName) != nil {
- _rc = _sqlite3MisuseError(tls, i32(125069))
+ _rc = int32(0)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ if _sqlite3HashFind(tls, &_db.XaModule, _zName) != nil {
+ _rc = _sqlite3MisuseError(tls, int32(125069))
goto _1
}
_sqlite3VtabCreateModule(tls, _db, _zName, _pModule, _pAux, _xDestroy)
_1:
_rc = _sqlite3ApiExit(tls, _db, _rc)
- if (_rc != i32(0)) && (_xDestroy != nil) {
+ if (_rc != int32(0)) && (_xDestroy != nil) {
_xDestroy(tls, _pAux)
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
-// Construct and install a Module object for a virtual table. When this
-// routine is called, it is guaranteed that all appropriate locks are held
-// and the module is not already part of the connection.
+// C comment
+// /*
+// ** Construct and install a Module object for a virtual table. When this
+// ** routine is called, it is guaranteed that all appropriate locks are held
+// ** and the module is not already part of the connection.
+// */
func _sqlite3VtabCreateModule(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _pModule *Xsqlite3_module, _pAux unsafe.Pointer, _xDestroy func(*crt.TLS, unsafe.Pointer)) (r0 *XModule) {
var _nName int32
var _1_zCopy *int8
var _pMod, _1_pDel *XModule
_nName = _sqlite3Strlen30(tls, _zName)
- _pMod = (*XModule)(_sqlite3DbMallocRawNN(tls, _db, uint64((u32(20)+uint32(_nName))+uint32(i32(1)))))
+ _pMod = (*XModule)(_sqlite3DbMallocRawNN(tls, _db, uint64((uint32(20)+uint32(_nName))+uint32(1))))
if _pMod == nil {
goto _0
}
- _1_zCopy = (*int8)(unsafe.Pointer((*XModule)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMod)) + 20*uintptr(i32(1))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_1_zCopy), (unsafe.Pointer)(_zName), uint32(_nName+i32(1)))
- *(**int8)(unsafe.Pointer(&(_pMod.X1))) = _1_zCopy
- *(**Xsqlite3_module)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMod.X0))))) = _pModule
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pMod.X2))) = _pAux
- *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_pMod.X3))) = _xDestroy
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMod.X4))))) = nil
- _1_pDel = (*XModule)(_sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&(_db.X65))), _1_zCopy, (unsafe.Pointer)(_pMod)))
+ _1_zCopy = (*int8)(unsafe.Pointer(elem48(_pMod, uintptr(1))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_1_zCopy), unsafe.Pointer(_zName), uint32(_nName+int32(1)))
+ _pMod.XzName = _1_zCopy
+ *(**Xsqlite3_module)(unsafe.Pointer(&_pMod.XpModule)) = _pModule
+ _pMod.XpAux = _pAux
+ _pMod.XxDestroy = _xDestroy
+ *(**XTable)(unsafe.Pointer(&_pMod.XpEpoTab)) = nil
+ _1_pDel = (*XModule)(_sqlite3HashInsert(tls, &_db.XaModule, _1_zCopy, unsafe.Pointer(_pMod)))
func() {
if _1_pDel != nil && _1_pDel != _pMod {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125043), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabCreateModuleØ00__func__Ø000))), unsafe.Pointer(str(24483)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125043), unsafe.Pointer(&_sqlite3VtabCreateModuleØ00__func__Ø000), unsafe.Pointer(str(24438)))
crt.X__builtin_abort(tls)
}
}()
if _1_pDel != nil {
_sqlite3OomFault(tls, _db)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_pDel))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_pDel))
_pMod = nil
}
_0:
@@ -24779,36 +25417,45 @@ _0:
var _sqlite3VtabCreateModuleØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabCreateModuleØ00__func__Ø000[0], str(24505), 24)
+ crt.Xstrncpy(nil, &_sqlite3VtabCreateModuleØ00__func__Ø000[0], str(24460), 24)
}
-// Return the number of values available from the current row of the
-// currently executing statement pStmt.
+// C comment
+// /*
+// ** Return the number of values available from the current row of the
+// ** currently executing statement pStmt.
+// */
func Xsqlite3_data_count(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
var _pVm *TVdbe
_pVm = (*TVdbe)(_pStmt)
- if (_pVm == nil) || ((*XMem)(_pVm.X21) == nil) {
- return i32(0)
+ if (_pVm == nil) || ((*XMem)(_pVm.XpResultSet) == nil) {
+ return int32(0)
}
- return int32(_pVm.X29)
+ return int32(_pVm.XnResColumn)
}
-// Return the sqlite3* database handle to which the prepared statement given
-// in the argument belongs. This is the same database handle that was
-// the first argument to the sqlite3_prepare() that was used to create
-// the statement in the first place.
+// C comment
+// /*
+// ** Return the sqlite3* database handle to which the prepared statement given
+// ** in the argument belongs. This is the same database handle that was
+// ** the first argument to the sqlite3_prepare() that was used to create
+// ** the statement in the first place.
+// */
func Xsqlite3_db_handle(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 *Xsqlite3) {
return func() *Xsqlite3 {
if _pStmt != nil {
- return (*Xsqlite3)((*TVdbe)(_pStmt).X0)
+ return (*Xsqlite3)((*TVdbe)(_pStmt).Xdb)
}
return nil
}()
}
-// This function is used to set the schema of a virtual table. It is only
-// valid to call this function from within the xCreate() or xConnect() of a
-// virtual table module.
+// C comment
+// /*
+// ** This function is used to set the schema of a virtual table. It is only
+// ** valid to call this function from within the xCreate() or xConnect() of a
+// ** virtual table module.
+// */
func Xsqlite3_declare_vtab(tls *crt.TLS, _db *Xsqlite3, _zCreateTable *int8) (r0 int32) {
var _rc int32
var _zErr *int8
@@ -24816,305 +25463,285 @@ func Xsqlite3_declare_vtab(tls *crt.TLS, _db *Xsqlite3, _zCreateTable *int8) (r0
var _pParse *XParse
var _6_pIdx *XIndex
var _pCtx *XVtabCtx
- _rc = i32(0)
+ _rc = int32(0)
_zErr = nil
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zCreateTable == nil) {
- return _sqlite3MisuseError(tls, i32(125730))
+ return _sqlite3MisuseError(tls, int32(125730))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _pCtx = (*XVtabCtx)(_db.X66)
- if (_pCtx == nil) || (_pCtx.X3) != 0 {
- _sqlite3Error(tls, _db, i32(21))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return _sqlite3MisuseError(tls, i32(125738))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _pCtx = (*XVtabCtx)(_db.XpVtabCtx)
+ if (_pCtx == nil) || _pCtx.XbDeclared != 0 {
+ _sqlite3Error(tls, _db, int32(21))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return _sqlite3MisuseError(tls, int32(125738))
}
- _pTab = (*XTable)(_pCtx.X1)
+ _pTab = (*XTable)(_pCtx.XpTab)
func() {
- if (_pTab.X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125741), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_declare_vtabØ00__func__Ø000))), unsafe.Pointer(str(24529)))
+ if _pTab.XnModuleArg == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125741), unsafe.Pointer(&_sqlite3_declare_vtabØ00__func__Ø000), unsafe.Pointer(str(24484)))
crt.X__builtin_abort(tls)
}
}()
- _pParse = (*XParse)(_sqlite3DbMallocZero(tls, _db, uint64(u32(484))))
+ _pParse = (*XParse)(_sqlite3DbMallocZero(tls, _db, uint64(484)))
if _pParse == nil {
- _rc = _sqlite3NomemError(tls, i32(125745))
+ _rc = _sqlite3NomemError(tls, int32(125745))
goto _7
}
- *(*uint8)(unsafe.Pointer(&(_pParse.X55))) = uint8(i32(1))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X0))))) = _db
- *(*uint32)(unsafe.Pointer(&(_pParse.X42))) = uint32(i32(1))
- if i32(0) != _sqlite3RunParser(tls, _pParse, _zCreateTable, &_zErr) || (*XTable)(_pParse.X63) == nil || (_db.X17) != 0 || (*XSelect)((*XTable)(_pParse.X63).X3) != nil || ((*XTable)(_pParse.X63).X16) != 0 {
+ _pParse.XdeclareVtab = uint8(1)
+ *(**Xsqlite3)(unsafe.Pointer(&_pParse.Xdb)) = _db
+ _pParse.XnQueryLoop = uint32(1)
+ if int32(0) != _sqlite3RunParser(tls, _pParse, _zCreateTable, &_zErr) || _pParse.XpNewTable == nil || _db.XmallocFailed != 0 || ((*XTable)(_pParse.XpNewTable).XpSelect) != nil || ((*XTable)(_pParse.XpNewTable).XnModuleArg) != 0 {
goto _12
}
- if (*XColumn)(_pTab.X1) != nil {
+ if _pTab.XaCol != nil {
goto _13
}
- _6_pNew = (*XTable)(_pParse.X63)
- *(**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X1))))) = (*XColumn)(_6_pNew.X1)
- *(*int16)(unsafe.Pointer(&(_pTab.X11))) = _6_pNew.X11
- {
- p := (*uint32)(unsafe.Pointer(&(_pTab.X9)))
- *p = (*p) | ((_6_pNew.X9) & uint32(i32(96)))
- sink5(*p)
- }
- *(*int16)(unsafe.Pointer(&(_6_pNew.X11))) = int16(i32(0))
- *(**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_6_pNew.X1))))) = nil
+ _6_pNew = (*XTable)(_pParse.XpNewTable)
+ *(**XColumn)(unsafe.Pointer(&_pTab.XaCol)) = (*XColumn)(_6_pNew.XaCol)
+ _pTab.XnCol = _6_pNew.XnCol
+ _pTab.XtabFlags |= _6_pNew.XtabFlags & uint32(96)
+ _6_pNew.XnCol = 0
+ *(**XColumn)(unsafe.Pointer(&_6_pNew.XaCol)) = nil
func() {
- if (*XIndex)(_pTab.X2) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125765), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_declare_vtabØ00__func__Ø000))), unsafe.Pointer(str(24545)))
+ if (*XIndex)(_pTab.XpIndex) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125765), unsafe.Pointer(&_sqlite3_declare_vtabØ00__func__Ø000), unsafe.Pointer(str(24500)))
crt.X__builtin_abort(tls)
}
}()
- if (((_6_pNew.X9) & uint32(i32(32))) != uint32(i32(0))) && (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32
- }{(*(*func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer, *int64) int32
- }{((*Xsqlite3_module)((*XModule)((*XVTable)(_pCtx.X0).X1).X0).X13)})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32
- }{nil}))) {
- _rc = i32(1)
+ if ((_6_pNew.XtabFlags & uint32(32)) != (0)) && (func() func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32 {
+ v := (*Xsqlite3_module)((*XModule)((*XVTable)(_pCtx.XpVTable).XpMod).XpModule).XxUpdate
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32)(unsafe.Pointer(&v))
+ }() != nil) {
+ _rc = int32(1)
}
- _6_pIdx = (*XIndex)(_6_pNew.X2)
+ _6_pIdx = (*XIndex)(_6_pNew.XpIndex)
if _6_pIdx != nil {
func() {
- if (*XIndex)(_6_pIdx.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125771), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_declare_vtabØ00__func__Ø000))), unsafe.Pointer(str(24561)))
+ if (*XIndex)(_6_pIdx.XpNext) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125771), unsafe.Pointer(&_sqlite3_declare_vtabØ00__func__Ø000), unsafe.Pointer(str(24516)))
crt.X__builtin_abort(tls)
}
}()
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X2))))) = _6_pIdx
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_6_pNew.X2))))) = nil
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_6_pIdx.X3))))) = _pTab
+ *(**XIndex)(unsafe.Pointer(&_pTab.XpIndex)) = _6_pIdx
+ *(**XIndex)(unsafe.Pointer(&_6_pNew.XpIndex)) = nil
+ *(**XTable)(unsafe.Pointer(&_6_pIdx.XpTable)) = _pTab
}
_13:
- *(*int32)(unsafe.Pointer(&(_pCtx.X3))) = i32(1)
+ _pCtx.XbDeclared = int32(1)
goto _21
_12:
- _sqlite3ErrorWithMsg(tls, _db, i32(1), func() *int8 {
+ _sqlite3ErrorWithMsg(tls, _db, int32(1), func() *int8 {
if _zErr != nil {
- return str(24576)
+ return str(24531)
}
return nil
}(), unsafe.Pointer(_zErr))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErr))
- _rc = i32(1)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErr))
+ _rc = int32(1)
_21:
- *(*uint8)(unsafe.Pointer(&(_pParse.X55))) = uint8(i32(0))
- if (*TVdbe)(_pParse.X2) != nil {
- _sqlite3VdbeFinalize(tls, (*TVdbe)(_pParse.X2))
+ _pParse.XdeclareVtab = 0
+ if _pParse.XpVdbe != nil {
+ _sqlite3VdbeFinalize(tls, (*TVdbe)(_pParse.XpVdbe))
}
- _sqlite3DeleteTable(tls, _db, (*XTable)(_pParse.X63))
+ _sqlite3DeleteTable(tls, _db, (*XTable)(_pParse.XpNewTable))
_sqlite3ParserReset(tls, _pParse)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pParse))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pParse))
_7:
func() {
- if (_rc & i32(255)) != _rc {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125793), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_declare_vtabØ00__func__Ø000))), unsafe.Pointer(str(24579)))
+ if (_rc & int32(255)) != _rc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125793), unsafe.Pointer(&_sqlite3_declare_vtabØ00__func__Ø000), unsafe.Pointer(str(24534)))
crt.X__builtin_abort(tls)
}
}()
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
var _sqlite3_declare_vtabØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_declare_vtabØ00__func__Ø000[0], str(24593), 21)
+ crt.Xstrncpy(nil, &_sqlite3_declare_vtabØ00__func__Ø000[0], str(24548), 21)
}
-// Run the parser on the given SQL string. The parser structure is
-// passed in. An SQLITE_ status code is returned. If an error occurs
-// then an and attempt is made to write an error message into
-// memory obtained from sqlite3_malloc() and to make *pzErrMsg point to that
-// error message.
+// C comment
+// /*
+// ** Run the parser on the given SQL string. The parser structure is
+// ** passed in. An SQLITE_ status code is returned. If an error occurs
+// ** then an and attempt is made to write an error message into
+// ** memory obtained from sqlite3_malloc() and to make *pzErrMsg point to that
+// ** error message.
+// */
func _sqlite3RunParser(tls *crt.TLS, _pParse *XParse, _zSql *int8, _pzErrMsg **int8) (r0 int32) {
var _nErr, _n, _tokenType, _lastTokenParsed, _mxSqlLen int32
var _pEngine unsafe.Pointer
var _db *Xsqlite3
var _20_p *XTable
- var _19_p *TAggInfo_func
+ var _19_p *XAutoincInfo
var _sEngine XyyParser
- _nErr = i32(0)
- _n = i32(0)
- _lastTokenParsed = i32(-1)
- _db = (*Xsqlite3)(_pParse.X0)
+ _nErr = int32(0)
+ _n = int32(0)
+ _lastTokenParsed = int32(-1)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _zSql == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(139953), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24614)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(139953), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24569)))
crt.X__builtin_abort(tls)
}
}()
- _mxSqlLen = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(1))))
- if (_db.X34) == i32(0) {
- *(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57))))) = i32(0)
+ _mxSqlLen = *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(1))
+ if _db.XnVdbeActive == int32(0) {
+ *(*int32)(unsafe.Pointer(&_db.Xu1)) = int32(0)
}
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(0)
- *(**int8)(unsafe.Pointer(&(_pParse.X62))) = _zSql
+ _pParse.Xrc = int32(0)
+ _pParse.XzTail = _zSql
func() {
if _pzErrMsg == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(139960), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24622)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(139960), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24577)))
crt.X__builtin_abort(tls)
}
}()
- _pEngine = (unsafe.Pointer)(&_sEngine)
+ _pEngine = unsafe.Pointer(&_sEngine)
_sqlite3ParserInit(tls, _pEngine)
func() {
- if (*XTable)(_pParse.X63) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(139972), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24634)))
+ if (*XTable)(_pParse.XpNewTable) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(139972), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24589)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XTrigger)(_pParse.X64) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(139973), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24655)))
+ if (*XTrigger)(_pParse.XpNewTrigger) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(139973), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24610)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pParse.X52) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(139974), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24678)))
+ if int32(_pParse.XnVar) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(139974), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24633)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pParse.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(139975), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24694)))
+ if _pParse.XpVList != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(139975), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24649)))
crt.X__builtin_abort(tls)
}
}()
_13:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(0))))) == i32(0) {
+ if int32(*elem1(_zSql, 0)) == int32(0) {
goto _15
}
_n = _sqlite3GetToken(tls, (*uint8)(unsafe.Pointer(_zSql)), &_tokenType)
- {
- p := &_mxSqlLen
- *p = (*p) - _n
- sink1(*p)
- }
- if _mxSqlLen < i32(0) {
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(18)
+ _mxSqlLen -= _n
+ if _mxSqlLen < int32(0) {
+ _pParse.Xrc = int32(18)
goto _14
}
goto _17
_15:
- if _lastTokenParsed == i32(1) {
- _tokenType = i32(0)
+ if _lastTokenParsed == int32(1) {
+ _tokenType = int32(0)
goto _21
}
- if _lastTokenParsed == i32(0) {
+ if _lastTokenParsed == int32(0) {
goto _14
}
- _tokenType = i32(1)
+ _tokenType = int32(1)
_21:
- {
- p := &_zSql
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 1*uintptr(_n)))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zSql)) -= uintptr(_n)
_17:
- if _tokenType < i32(163) {
+ if _tokenType < int32(163) {
goto _22
}
func() {
- if _tokenType != i32(163) && _tokenType != i32(164) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(139997), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24712)))
+ if _tokenType != int32(163) && _tokenType != int32(164) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(139997), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24667)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57)))))) != 0 {
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(9)
+ if (*(*int32)(unsafe.Pointer(&_db.Xu1))) != 0 {
+ _pParse.Xrc = int32(9)
goto _14
}
- if _tokenType == i32(164) {
- _sqlite3ErrorMsg(tls, _pParse, str(24757), _n, unsafe.Pointer(_zSql))
+ if _tokenType == int32(164) {
+ _sqlite3ErrorMsg(tls, _pParse, str(24712), _n, unsafe.Pointer(_zSql))
goto _14
}
- {
- p := &_zSql
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n)))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(_n)
goto _28
_22:
- *(**int8)(unsafe.Pointer(&((*XToken)(unsafe.Pointer(&(_pParse.X51))).X0))) = _zSql
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer(&(_pParse.X51))).X1))) = uint32(_n)
- _sqlite3Parser(tls, _pEngine, _tokenType, _pParse.X51, _pParse)
+ _pParse.XsLastToken.Xz = _zSql
+ _pParse.XsLastToken.Xn = uint32(_n)
+ _sqlite3Parser(tls, _pEngine, _tokenType, _pParse.XsLastToken, _pParse)
_lastTokenParsed = _tokenType
- {
- p := &_zSql
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n)))
- sink0(*p)
- }
- if ((_pParse.X3) != i32(0)) || ((_db.X17) != 0) {
+ *(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(_n)
+ if (_pParse.Xrc != int32(0)) || (_db.XmallocFailed != 0) {
goto _14
}
_28:
goto _13
_14:
func() {
- if _nErr != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(140016), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24784)))
+ if _nErr != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(140016), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24739)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&(_pParse.X62))) = _zSql
+ _pParse.XzTail = _zSql
_sqlite3ParserFinalize(tls, _pEngine)
- if (_db.X17) != 0 {
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = _sqlite3NomemError(tls, i32(140031))
+ if _db.XmallocFailed != 0 {
+ _pParse.Xrc = _sqlite3NomemError(tls, int32(140031))
}
- if (((_pParse.X3) != i32(0)) && ((_pParse.X3) != i32(101))) && ((_pParse.X1) == nil) {
- *(**int8)(unsafe.Pointer(&(_pParse.X1))) = _sqlite3MPrintf(tls, _db, str(24576), unsafe.Pointer(_sqlite3ErrStr(tls, _pParse.X3)))
+ if ((_pParse.Xrc != int32(0)) && (_pParse.Xrc != int32(101))) && (_pParse.XzErrMsg == nil) {
+ _pParse.XzErrMsg = _sqlite3MPrintf(tls, _db, str(24531), unsafe.Pointer(_sqlite3ErrStr(tls, _pParse.Xrc)))
}
func() {
if _pzErrMsg == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(140036), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24622)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(140036), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24577)))
crt.X__builtin_abort(tls)
}
}()
- if (_pParse.X1) != nil {
- *_pzErrMsg = _pParse.X1
- Xsqlite3_log(tls, _pParse.X3, str(24576), unsafe.Pointer(*_pzErrMsg))
- *(**int8)(unsafe.Pointer(&(_pParse.X1))) = nil
+ if _pParse.XzErrMsg != nil {
+ *_pzErrMsg = _pParse.XzErrMsg
+ Xsqlite3_log(tls, _pParse.Xrc, str(24531), unsafe.Pointer(*_pzErrMsg))
+ _pParse.XzErrMsg = nil
_nErr += 1
}
- if (((*TVdbe)(_pParse.X2) != nil) && ((_pParse.X16) > i32(0))) && (int32(_pParse.X6) == i32(0)) {
- _sqlite3VdbeDelete(tls, (*TVdbe)(_pParse.X2))
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X2))))) = nil
+ if ((_pParse.XpVdbe != nil) && (_pParse.XnErr > int32(0))) && (int32(_pParse.Xnested) == int32(0)) {
+ _sqlite3VdbeDelete(tls, (*TVdbe)(_pParse.XpVdbe))
+ *(**TVdbe)(unsafe.Pointer(&_pParse.XpVdbe)) = nil
}
- if int32(_pParse.X6) == i32(0) {
- _sqlite3DbFree(tls, _db, _pParse.X37)
- *(**XTableLock)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X37))))) = nil
- *(*int32)(unsafe.Pointer(&(_pParse.X36))) = i32(0)
+ if int32(_pParse.Xnested) == int32(0) {
+ _sqlite3DbFree(tls, _db, _pParse.XaTableLock)
+ *(**XTableLock)(unsafe.Pointer(&_pParse.XaTableLock)) = nil
+ _pParse.XnTableLock = int32(0)
}
- Xsqlite3_free(tls, (unsafe.Pointer)(_pParse.X67))
- if (_pParse.X55) == 0 {
- _sqlite3DeleteTable(tls, _db, (*XTable)(_pParse.X63))
+ Xsqlite3_free(tls, unsafe.Pointer(_pParse.XapVtabLock))
+ if _pParse.XdeclareVtab == 0 {
+ _sqlite3DeleteTable(tls, _db, (*XTable)(_pParse.XpNewTable))
}
- if (*XWith)(_pParse.X71) != nil {
- _sqlite3WithDelete(tls, _db, (*XWith)(_pParse.X71))
+ if _pParse.XpWithToFree != nil {
+ _sqlite3WithDelete(tls, _db, (*XWith)(_pParse.XpWithToFree))
}
- _sqlite3DeleteTrigger(tls, _db, (*XTrigger)(_pParse.X64))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pParse.X60))
+ _sqlite3DeleteTrigger(tls, _db, (*XTrigger)(_pParse.XpNewTrigger))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pParse.XpVList))
_46:
- if (*TAggInfo_func)(_pParse.X38) != nil {
- _19_p = (*TAggInfo_func)(_pParse.X38)
- *(**TAggInfo_func)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X38))))) = (*TAggInfo_func)(_19_p.X0)
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_19_p))
+ if _pParse.XpAinc != nil {
+ _19_p = (*XAutoincInfo)(_pParse.XpAinc)
+ *(**XAutoincInfo)(unsafe.Pointer(&_pParse.XpAinc)) = (*XAutoincInfo)(_19_p.XpNext)
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_19_p))
goto _46
}
_47:
- if (*XTable)(_pParse.X68) != nil {
- _20_p = (*XTable)(_pParse.X68)
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X68))))) = (*XTable)(_20_p.X21)
+ if _pParse.XpZombieTab != nil {
+ _20_p = (*XTable)(_pParse.XpZombieTab)
+ *(**XTable)(unsafe.Pointer(&_pParse.XpZombieTab)) = (*XTable)(_20_p.XpNextZombie)
_sqlite3DeleteTable(tls, _db, _20_p)
goto _47
}
func() {
- if _nErr != i32(0) && (_pParse.X3) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(140079), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000))), unsafe.Pointer(str(24792)))
+ if _nErr != int32(0) && _pParse.Xrc == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(140079), unsafe.Pointer(&_sqlite3RunParserØ00__func__Ø000), unsafe.Pointer(str(24747)))
crt.X__builtin_abort(tls)
}
}()
@@ -25127,70 +25754,77 @@ _47:
var _sqlite3RunParserØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RunParserØ00__func__Ø000[0], str(24825), 17)
+ crt.Xstrncpy(nil, &_sqlite3RunParserØ00__func__Ø000[0], str(24780), 17)
}
-// Initialize a new parser that has already been allocated.
+// C comment
+// /* Initialize a new parser that has already been allocated.
+// */
func _sqlite3ParserInit(tls *crt.TLS, _yypParser unsafe.Pointer) {
var _pParser *XyyParser
_pParser = (*XyyParser)(_yypParser)
- *(**XyyStackEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParser.X0))))) = (*XyyStackEntry)(unsafe.Pointer((*[100]XyyStackEntry)(unsafe.Pointer(&(_pParser.X2)))))
- *(*uint16)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[100]XyyStackEntry)(unsafe.Pointer(&(_pParser.X2))))) + 16*uintptr(i32(0)))).X0))) = uint16(i32(0))
- *(*uint8)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[100]XyyStackEntry)(unsafe.Pointer(&(_pParser.X2))))) + 16*uintptr(i32(0)))).X1))) = uint8(i32(0))
-}
-
-// Add an error message to pParse->zErrMsg and increment pParse->nErr.
-// The following formatting characters are allowed:
-//
-// %s Insert a string
-// %z A string that should be freed after use
-// %d Insert an integer
-// %T Insert a token
-// %S Insert the first element of a SrcList
-//
-// This function should be used to report any error that occurs while
-// compiling an SQL statement (i.e. within sqlite3_prepare()). The
-// last thing the sqlite3_prepare() function does is copy the error
-// stored by this function into the database handle using sqlite3Error().
-// Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used
-// during statement execution (sqlite3_step() etc.).
+ *(**XyyStackEntry)(unsafe.Pointer(&_pParser.Xyytos)) = (*XyyStackEntry)(unsafe.Pointer(&_pParser.Xyystack))
+ elem49((*XyyStackEntry)(unsafe.Pointer(&_pParser.Xyystack)), 0).Xstateno = 0
+ elem49((*XyyStackEntry)(unsafe.Pointer(&_pParser.Xyystack)), 0).Xmajor = 0
+}
+
+// C comment
+// /*
+// ** Add an error message to pParse->zErrMsg and increment pParse->nErr.
+// ** The following formatting characters are allowed:
+// **
+// ** %s Insert a string
+// ** %z A string that should be freed after use
+// ** %d Insert an integer
+// ** %T Insert a token
+// ** %S Insert the first element of a SrcList
+// **
+// ** This function should be used to report any error that occurs while
+// ** compiling an SQL statement (i.e. within sqlite3_prepare()). The
+// ** last thing the sqlite3_prepare() function does is copy the error
+// ** stored by this function into the database handle using sqlite3Error().
+// ** Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used
+// ** during statement execution (sqlite3_step() etc.).
+// */
func _sqlite3ErrorMsg(tls *crt.TLS, _pParse *XParse, _zFormat *int8, args ...interface{}) {
var _zMsg *int8
var _ap []interface{}
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_ap = args
_zMsg = _sqlite3VMPrintf(tls, _db, _zFormat, _ap)
_ap = nil
- if (_db.X21) != 0 {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zMsg))
+ if _db.XsuppressErr != 0 {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zMsg))
goto _1
}
- *(*int32)(unsafe.Pointer(&(_pParse.X16))) += 1
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pParse.X1))
- *(**int8)(unsafe.Pointer(&(_pParse.X1))) = _zMsg
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(1)
+ _pParse.XnErr += 1
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pParse.XzErrMsg))
+ _pParse.XzErrMsg = _zMsg
+ _pParse.Xrc = int32(1)
_1:
}
-// The main parser program.
-// The first argument is a pointer to a structure obtained from
-// "sqlite3ParserAlloc" which describes the current state of the parser.
-// The second argument is the major token number. The third is
-// the minor token. The fourth optional argument is whatever the
-// user wants (and specified in the grammar) and is available for
-// use by the action routines.
-//
-// Inputs:
-// <ul>
-// <li> A pointer to the parser (an opaque structure.)
-// <li> The major token number.
-// <li> The minor token number.
-// <li> An option argument of a grammar-specified type.
-// </ul>
-//
-// Outputs:
-// None.
+// C comment
+// /* The main parser program.
+// ** The first argument is a pointer to a structure obtained from
+// ** "sqlite3ParserAlloc" which describes the current state of the parser.
+// ** The second argument is the major token number. The third is
+// ** the minor token. The fourth optional argument is whatever the
+// ** user wants (and specified in the grammar) and is available for
+// ** use by the action routines.
+// **
+// ** Inputs:
+// ** <ul>
+// ** <li> A pointer to the parser (an opaque structure.)
+// ** <li> The major token number.
+// ** <li> The minor token number.
+// ** <li> An option argument of a grammar-specified type.
+// ** </ul>
+// **
+// ** Outputs:
+// ** None.
+// */
func _sqlite3Parser(tls *crt.TLS, _yyp unsafe.Pointer, _yymajor int32, _yyminor XToken, _pParse *XParse) {
var _7_cDiv int8
var _yyact uint32
@@ -25199,151 +25833,154 @@ func _sqlite3Parser(tls *crt.TLS, _yyp unsafe.Pointer, _yymajor int32, _yyminor
var _7_i *XyyStackEntry
_yypParser = (*XyyParser)(_yyp)
func() {
- if (*XyyStackEntry)(_yypParser.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(139035), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ParserØ00__func__Ø000))), unsafe.Pointer(str(24842)))
+ if (*XyyStackEntry)(_yypParser.Xyytos) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(139035), unsafe.Pointer(&_sqlite3ParserØ00__func__Ø000), unsafe.Pointer(str(24797)))
crt.X__builtin_abort(tls)
}
}()
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_yypParser.X1))))) = _pParse
+ *(**XParse)(unsafe.Pointer(&_yypParser.XpParse)) = _pParse
if _yyTraceFILE != nil {
- crt.Xfprintf(tls, _yyTraceFILE, str(24862), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyTokenName)) + 4*uintptr(_yymajor)))))
+ crt.Xfprintf(tls, _yyTraceFILE, str(24817), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyTokenName)), uintptr(_yymajor))))
}
_2:
_yyact = _yy_find_shift_action(tls, _yypParser, uint8(_yymajor))
- if _yyact <= uint32(i32(999)) {
+ if _yyact <= uint32(999) {
_yy_shift(tls, _yypParser, int32(_yyact), _yymajor, _yyminor)
- _yymajor = i32(252)
+ _yymajor = int32(252)
goto _7
}
- if _yyact <= uint32(i32(1331)) {
- _yy_reduce(tls, _yypParser, _yyact-uint32(i32(1000)))
+ if _yyact <= uint32(1331) {
+ _yy_reduce(tls, _yypParser, _yyact-uint32(1000))
goto _7
}
func() {
- if _yyact != uint32(i32(1332)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(139058), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ParserØ00__func__Ø000))), unsafe.Pointer(str(24876)))
+ if _yyact != uint32(1332) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(139058), unsafe.Pointer(&_sqlite3ParserØ00__func__Ø000), unsafe.Pointer(str(24831)))
crt.X__builtin_abort(tls)
}
}()
*(*XToken)(unsafe.Pointer(&_yyminorunion)) = _yyminor
if _yyTraceFILE != nil {
- crt.Xfprintf(tls, _yyTraceFILE, str(24901), unsafe.Pointer(_yyTracePrompt))
+ crt.Xfprintf(tls, _yyTraceFILE, str(24856), unsafe.Pointer(_yyTracePrompt))
}
_yy_syntax_error(tls, _yypParser, _yymajor, _yyminor)
_yy_destructor(tls, _yypParser, uint8(_yymajor), &_yyminorunion)
- _yymajor = i32(252)
+ _yymajor = int32(252)
_7:
- if (_yymajor != i32(252)) && (uintptr(unsafe.Pointer((*XyyStackEntry)(_yypParser.X0))) > uintptr(unsafe.Pointer((*XyyStackEntry)(unsafe.Pointer((*[100]XyyStackEntry)(unsafe.Pointer(&(_yypParser.X2)))))))) {
+ if (_yymajor != int32(252)) && (crt.P2U(_yypParser.Xyytos) > crt.P2U(unsafe.Pointer(&_yypParser.Xyystack))) {
goto _2
}
if _yyTraceFILE == nil {
goto _12
}
- _7_cDiv = i8(91)
- crt.Xfprintf(tls, _yyTraceFILE, str(24918), unsafe.Pointer(_yyTracePrompt))
- _7_i = (*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[100]XyyStackEntry)(unsafe.Pointer(&(_yypParser.X2))))) + 16*uintptr(i32(1))))
+ _7_cDiv = int8(91)
+ crt.Xfprintf(tls, _yyTraceFILE, str(24873), unsafe.Pointer(_yyTracePrompt))
+ _7_i = elem49((*XyyStackEntry)(unsafe.Pointer(&_yypParser.Xyystack)), uintptr(1))
_13:
- if uintptr(unsafe.Pointer(_7_i)) > uintptr(unsafe.Pointer((*XyyStackEntry)(_yypParser.X0))) {
+ if crt.P2U(unsafe.Pointer(_7_i)) > crt.P2U(_yypParser.Xyytos) {
goto _16
}
- crt.Xfprintf(tls, _yyTraceFILE, str(24935), int32(_7_cDiv), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyTokenName)) + 4*uintptr(_7_i.X1)))))
- _7_cDiv = int8(i32(32))
+ crt.Xfprintf(tls, _yyTraceFILE, str(24890), int32(_7_cDiv), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyTokenName)), uintptr(_7_i.Xmajor))))
+ _7_cDiv = int8(32)
*(*uintptr)(unsafe.Pointer(&_7_i)) += uintptr(16)
goto _13
_16:
- crt.Xfprintf(tls, _yyTraceFILE, str(24940))
+ crt.Xfprintf(tls, _yyTraceFILE, str(24895))
_12:
- _ = _yyminorunion
}
var _sqlite3ParserØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ParserØ00__func__Ø000[0], str(24943), 14)
+ crt.Xstrncpy(nil, &_sqlite3ParserØ00__func__Ø000[0], str(24898), 14)
}
+// C comment
+// /* #include <stdio.h> */
var _yyTraceFILE *crt.XFILE
var _yyTracePrompt *int8
+// C comment
+// /* For tracing shifts, the names of all terminals and nonterminals
+// ** are required. The following table supplies these names */
var _yyTokenName [251]*int8
func init() {
- _yyTokenName = [251]*int8{str(24957), str(24959), str(24964), str(24972), str(24978), str(24983), str(24989), str(25001), str(25010), str(25020), str(25030), str(25037), str(25041), str(25050), str(25060), str(25068), str(25071), str(25077), str(25084), str(25087), str(25091), str(25098), str(25103), str(25106), str(25109), str(25112), str(25120), str(25126), str(25129), str(25135), str(25142), str(25148), str(25156), str(25160), str(25167), str(25174), str(25177), str(25185), str(25190), str(25199), str(25208), str(25217), str(25222), str(25229), str(25234), str(25239), str(25243), str(25250), str(25260), str(25268), str(25276), str(25282), str(25285), str(25289), str(25292), str(25299), str(25306), str(25312), str(25322), str(25330), str(25339), str(25343), str(25351), str(25358), str(25363), str(25371), str(25376), str(25384), str(25391), str(25400), str(25404), str(25407), str(25411), str(25414), str(25422), str(25425), str(25432), str(25440), str(25443), str(25446), str(25449), str(25452), str(25455), str(25458), str(25465), str(25472), str(25478), str(25485), str(25492), str(25497), str(25503), str(25508), str(25514), str(25518), str(25525), str(25533), str(25540), str(25548), str(25555), str(25563), str(25574), str(155), str(25582), str(25590), str(25597), str(25603), str(25614), str(25623), str(25626), str(25633), str(25640), str(25647), str(25651), str(25662), str(25670), str(25675), str(25681), str(25685), str(25692), str(25702), str(25709), str(25716), str(25725), str(25729), str(25734), str(25739), str(25745), str(25751), str(25757), str(25764), str(25770), str(25776), str(25781), str(25787), str(25792), str(25800), str(25809), str(25814), str(25819), str(25824), str(25829), str(25835), str(25841), str(25845), str(25851), str(25857), str(25865), str(23861), str(25870), str(25875), str(25879), str(25889), str(25899), str(25902), str(25916), str(25929), str(25947), str(23842), str(25956), str(25968), str(25973), str(25984), str(25997), str(26011), str(26018), str(26029), str(26038), str(26048), str(26057), str(26064), str(26073), str(26083), str(26089), str(26094), str(26099), str(26106), str(26116), str(26124), str(26136), str(26144), str(26160), str(26167), str(26174), str(26197), str(26206), str(26217), str(26223), str(26232), str(26240), str(26260), str(26267), str(26279), str(26289), str(26298), str(26307), str(26320), str(26330), str(26335), str(26350), str(26359), str(26370), str(26375), str(26385), str(26397), str(26408), str(26420), str(26430), str(26437), str(26447), str(26456), str(26461), str(26464), str(26475), str(26486), str(26493), str(26505), str(26512), str(26522), str(26529), str(26537), str(26548), str(26559), str(26566), str(26577), str(26583), str(26598), str(26611), str(26625), str(26635), str(26646), str(26654), str(26660), str(26673), str(26690), str(26703), str(26717), str(26732), str(26744), str(26756), str(26761), str(26769), str(26785), str(26793), str(26813), str(26826), str(26838), str(26850), str(26858), str(26871), str(26874), str(26882)}
+ _yyTokenName = [251]*int8{str(24912), str(24914), str(24919), str(24927), str(24933), str(24938), str(24944), str(24956), str(24965), str(24975), str(24985), str(24992), str(24996), str(25005), str(25015), str(25023), str(25026), str(25032), str(25039), str(25042), str(25046), str(25053), str(25058), str(25061), str(25064), str(25067), str(25075), str(25081), str(25084), str(25090), str(25097), str(25103), str(25111), str(25115), str(25122), str(25129), str(25132), str(25140), str(25145), str(25154), str(25163), str(25172), str(25177), str(25184), str(25189), str(25194), str(25198), str(25205), str(25215), str(25223), str(25231), str(25237), str(25240), str(25244), str(25247), str(25254), str(25261), str(25267), str(25277), str(25285), str(25294), str(25298), str(25306), str(25313), str(25318), str(25326), str(25331), str(25339), str(25346), str(25355), str(25359), str(25362), str(25366), str(25369), str(25377), str(25380), str(25387), str(25395), str(25398), str(25401), str(25404), str(25407), str(25410), str(25413), str(25420), str(25427), str(25433), str(25440), str(25447), str(25452), str(25458), str(25463), str(25469), str(25473), str(25480), str(25488), str(25495), str(25503), str(25510), str(25518), str(25529), str(285), str(25537), str(25545), str(25552), str(25558), str(25569), str(25578), str(25581), str(25588), str(25595), str(25602), str(25606), str(25617), str(25625), str(25630), str(25636), str(25640), str(25647), str(25657), str(25664), str(25671), str(25680), str(25684), str(25689), str(25694), str(25700), str(25706), str(25712), str(25719), str(25725), str(25731), str(25736), str(25742), str(25747), str(25755), str(25764), str(25769), str(25774), str(25779), str(25784), str(25790), str(25796), str(25800), str(25806), str(25812), str(25820), str(23816), str(25825), str(25830), str(25834), str(25844), str(25854), str(25857), str(25871), str(25884), str(25902), str(23797), str(25911), str(25923), str(25928), str(25939), str(25952), str(25966), str(25973), str(25984), str(25993), str(26003), str(26012), str(26019), str(26028), str(26038), str(26044), str(26049), str(26054), str(26061), str(26071), str(26079), str(26091), str(26099), str(26115), str(26122), str(26129), str(26152), str(26161), str(26172), str(26178), str(26187), str(26195), str(26215), str(26222), str(26234), str(26244), str(26253), str(26262), str(26275), str(26285), str(26290), str(26305), str(26314), str(26325), str(26330), str(26340), str(26352), str(26363), str(26375), str(26385), str(26392), str(26402), str(26411), str(26416), str(26419), str(26430), str(26441), str(26448), str(26460), str(26467), str(26477), str(26484), str(26492), str(26503), str(26514), str(26521), str(26532), str(26538), str(26553), str(26566), str(26580), str(26590), str(26601), str(26609), str(26615), str(26628), str(26645), str(26658), str(26672), str(26687), str(26699), str(26711), str(26716), str(26724), str(26740), str(26748), str(26768), str(26781), str(26793), str(26805), str(26813), str(26826), str(26829), str(26837)}
}
-// Find the appropriate action for a parser given the terminal
-// look-ahead token iLookAhead.
+// C comment
+// /*
+// ** Find the appropriate action for a parser given the terminal
+// ** look-ahead token iLookAhead.
+// */
func _yy_find_shift_action(tls *crt.TLS, _pParser *XyyParser, _iLookAhead uint8) (r0 uint32) {
var _i, _stateno, _5_j int32
var _2_iFallback uint8
- _stateno = int32((*XyyStackEntry)(_pParser.X0).X0)
- if _stateno >= i32(1000) {
+ _stateno = int32((*XyyStackEntry)(_pParser.Xyytos).Xstateno)
+ if _stateno >= int32(1000) {
return uint32(_stateno)
}
func() {
- if _stateno > i32(455) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137121), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_find_shift_actionØ00__func__Ø000))), unsafe.Pointer(str(26889)))
+ if _stateno > int32(455) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137121), unsafe.Pointer(&_yy_find_shift_actionØ00__func__Ø000), unsafe.Pointer(str(26844)))
crt.X__builtin_abort(tls)
}
}()
_3:
- _i = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yy_shift_ofst)) + 2*uintptr(_stateno))))
+ _i = int32(*elem50((*int16)(unsafe.Pointer(&_yy_shift_ofst)), uintptr(_stateno)))
func() {
- if int32(_iLookAhead) == i32(252) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137124), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_find_shift_actionØ00__func__Ø000))), unsafe.Pointer(str(26915)))
+ if int32(_iLookAhead) == int32(252) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137124), unsafe.Pointer(&_yy_find_shift_actionØ00__func__Ø000), unsafe.Pointer(str(26870)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_i
- *p = (*p) + int32(_iLookAhead)
- sink1(*p)
- }
- if _i >= i32(0) && _i < i32(1566) && int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yy_lookahead)) + 1*uintptr(_i)))) == int32(_iLookAhead) {
+ _i += int32(_iLookAhead)
+ if _i >= int32(0) && _i < int32(1566) && int32(*elem15((*uint8)(unsafe.Pointer(&_yy_lookahead)), uintptr(_i))) == int32(_iLookAhead) {
goto _8
}
- if uint32(_iLookAhead) >= u32(69) || int32(store2(&_2_iFallback, *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyFallback)) + 1*uintptr(_iLookAhead))))) == i32(0) {
+ if uint32(_iLookAhead) >= uint32(69) || int32(store3(&_2_iFallback, *elem15((*uint8)(unsafe.Pointer(&_yyFallback)), uintptr(_iLookAhead)))) == int32(0) {
goto _10
}
if _yyTraceFILE != nil {
- crt.Xfprintf(tls, _yyTraceFILE, str(26936), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyTokenName)) + 4*uintptr(_iLookAhead)))), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyTokenName)) + 4*uintptr(_2_iFallback)))))
+ crt.Xfprintf(tls, _yyTraceFILE, str(26891), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyTokenName)), uintptr(_iLookAhead))), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyTokenName)), uintptr(_2_iFallback))))
}
func() {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyFallback)) + 1*uintptr(_2_iFallback)))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137137), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_find_shift_actionØ00__func__Ø000))), unsafe.Pointer(str(26957)))
+ if int32(*elem15((*uint8)(unsafe.Pointer(&_yyFallback)), uintptr(_2_iFallback))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137137), unsafe.Pointer(&_yy_find_shift_actionØ00__func__Ø000), unsafe.Pointer(str(26912)))
crt.X__builtin_abort(tls)
}
}()
_iLookAhead = _2_iFallback
goto _3
_10:
- _5_j = (_i - int32(_iLookAhead)) + i32(69)
- if _5_j < i32(0) || _5_j >= i32(1566) || int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yy_lookahead)) + 1*uintptr(_5_j)))) != i32(69) || int32(_iLookAhead) <= i32(0) {
+ _5_j = (_i - int32(_iLookAhead)) + int32(69)
+ if _5_j < int32(0) || _5_j >= int32(1566) || int32(*elem15((*uint8)(unsafe.Pointer(&_yy_lookahead)), uintptr(_5_j))) != int32(69) || int32(_iLookAhead) <= int32(0) {
goto _17
}
if _yyTraceFILE != nil {
- crt.Xfprintf(tls, _yyTraceFILE, str(26982), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyTokenName)) + 4*uintptr(_iLookAhead)))), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyTokenName)) + 4*uintptr(i32(69))))))
+ crt.Xfprintf(tls, _yyTraceFILE, str(26937), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyTokenName)), uintptr(_iLookAhead))), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyTokenName)), uintptr(69))))
}
- return uint32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yy_action)) + 2*uintptr(_5_j))))
+ return uint32(*elem20((*uint16)(unsafe.Pointer(&_yy_action)), uintptr(_5_j)))
_17:
- return uint32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yy_default)) + 2*uintptr(_stateno))))
+ return uint32(*elem20((*uint16)(unsafe.Pointer(&_yy_default)), uintptr(_stateno)))
_8:
- return uint32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yy_action)) + 2*uintptr(_i))))
+ return uint32(*elem20((*uint16)(unsafe.Pointer(&_yy_action)), uintptr(_i)))
}
var _yy_find_shift_actionØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_yy_find_shift_actionØ00__func__Ø000[0], str(27003), 21)
+ crt.Xstrncpy(nil, &_yy_find_shift_actionØ00__func__Ø000[0], str(26958), 21)
}
var _yy_shift_ofst [456]int16
func init() {
- _yy_shift_ofst = [456]int16{i16(5), i16(1117), i16(1312), i16(1128), i16(1274), i16(1274), i16(1274), i16(1274), i16(61), i16(-19), i16(57), i16(57), i16(183), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(66), i16(66), i16(201), i16(-29), i16(331), i16(318), i16(133), i16(259), i16(335), i16(411), i16(487), i16(563), i16(639), i16(689), i16(765), i16(841), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(891), i16(941), i16(891), i16(991), i16(1041), i16(1041), i16(1217), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1363), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(1274), i16(-70), i16(-47), i16(-47), i16(-47), i16(-47), i16(-47), i16(24), i16(11), i16(146), i16(296), i16(524), i16(444), i16(529), i16(529), i16(296), i16(3), i16(2), i16(-30), i16(1566), i16(1566), i16(1566), i16(-17), i16(-17), i16(-17), i16(145), i16(145), i16(497), i16(497), i16(265), i16(603), i16(653), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(701), i16(1078), i16(147), i16(147), i16(2), i16(164), i16(164), i16(164), i16(164), i16(164), i16(164), i16(1566), i16(1566), i16(1566), i16(223), i16(56), i16(56), i16(268), i16(269), i16(220), i16(347), i16(351), i16(415), i16(359), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(632), i16(632), i16(632), i16(296), i16(296), i16(498), i16(296), i16(296), i16(296), i16(570), i16(296), i16(296), i16(654), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(296), i16(636), i16(200), i16(596), i16(596), i16(596), i16(575), i16(-114), i16(971), i16(740), i16(454), i16(503), i16(503), i16(1134), i16(454), i16(1134), i16(353), i16(588), i16(628), i16(762), i16(503), i16(189), i16(762), i16(762), i16(916), i16(330), i16(668), i16(1245), i16(1167), i16(1167), i16(1255), i16(1255), i16(1167), i16(1277), i16(1230), i16(1172), i16(1291), i16(1291), i16(1291), i16(1291), i16(1167), i16(1310), i16(1172), i16(1277), i16(1230), i16(1230), i16(1172), i16(1167), i16(1310), i16(1204), i16(1299), i16(1167), i16(1167), i16(1310), i16(1335), i16(1167), i16(1310), i16(1167), i16(1310), i16(1335), i16(1258), i16(1258), i16(1258), i16(1329), i16(1335), i16(1258), i16(1273), i16(1258), i16(1329), i16(1258), i16(1258), i16(1256), i16(1288), i16(1256), i16(1288), i16(1256), i16(1288), i16(1256), i16(1288), i16(1167), i16(1375), i16(1167), i16(1267), i16(1335), i16(1320), i16(1320), i16(1335), i16(1287), i16(1295), i16(1294), i16(1301), i16(1172), i16(1407), i16(1408), i16(1422), i16(1422), i16(1433), i16(1433), i16(1433), i16(1433), i16(1566), i16(1566), i16(1566), i16(1566), i16(1566), i16(1566), i16(1566), i16(1566), i16(558), i16(537), i16(684), i16(719), i16(734), i16(799), i16(840), i16(1019), i16(14), i16(1020), i16(1021), i16(1025), i16(1026), i16(1027), i16(1070), i16(1072), i16(997), i16(1047), i16(999), i16(1079), i16(1126), i16(1074), i16(1141), i16(694), i16(819), i16(1174), i16(1136), i16(981), i16(1445), i16(1451), i16(1434), i16(1313), i16(1448), i16(1398), i16(1450), i16(1444), i16(1446), i16(1348), i16(1339), i16(1360), i16(1349), i16(1453), i16(1350), i16(1458), i16(1475), i16(1354), i16(1347), i16(1401), i16(1402), i16(1403), i16(1404), i16(1372), i16(1388), i16(1452), i16(1364), i16(1484), i16(1483), i16(1467), i16(1383), i16(1351), i16(1439), i16(1468), i16(1440), i16(1441), i16(1457), i16(1395), i16(1479), i16(1485), i16(1487), i16(1392), i16(1405), i16(1486), i16(1455), i16(1489), i16(1490), i16(1491), i16(1493), i16(1461), i16(1480), i16(1494), i16(1465), i16(1481), i16(1495), i16(1496), i16(1498), i16(1497), i16(1406), i16(1502), i16(1503), i16(1505), i16(1499), i16(1409), i16(1506), i16(1507), i16(1432), i16(1500), i16(1510), i16(1410), i16(1511), i16(1501), i16(1512), i16(1504), i16(1517), i16(1511), i16(1518), i16(1519), i16(1520), i16(1521), i16(1522), i16(1524), i16(1533), i16(1525), i16(1527), i16(1509), i16(1526), i16(1528), i16(1531), i16(1530), i16(1526), i16(1532), i16(1534), i16(1535), i16(1536), i16(1538), i16(1428), i16(1435), i16(1442), i16(1443), i16(1539), i16(1546), i16(1562)}
+ _yy_shift_ofst = [456]int16{int16(5), int16(1117), int16(1312), int16(1128), int16(1274), int16(1274), int16(1274), int16(1274), int16(61), int16(-19), int16(57), int16(57), int16(183), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(66), int16(66), int16(201), int16(-29), int16(331), int16(318), int16(133), int16(259), int16(335), int16(411), int16(487), int16(563), int16(639), int16(689), int16(765), int16(841), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(891), int16(941), int16(891), int16(991), int16(1041), int16(1041), int16(1217), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1363), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(1274), int16(-70), int16(-47), int16(-47), int16(-47), int16(-47), int16(-47), int16(24), int16(11), int16(146), int16(296), int16(524), int16(444), int16(529), int16(529), int16(296), int16(3), int16(2), int16(-30), int16(1566), int16(1566), int16(1566), int16(-17), int16(-17), int16(-17), int16(145), int16(145), int16(497), int16(497), int16(265), int16(603), int16(653), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(701), int16(1078), int16(147), int16(147), int16(2), int16(164), int16(164), int16(164), int16(164), int16(164), int16(164), int16(1566), int16(1566), int16(1566), int16(223), int16(56), int16(56), int16(268), int16(269), int16(220), int16(347), int16(351), int16(415), int16(359), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(632), int16(632), int16(632), int16(296), int16(296), int16(498), int16(296), int16(296), int16(296), int16(570), int16(296), int16(296), int16(654), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(296), int16(636), int16(200), int16(596), int16(596), int16(596), int16(575), int16(-114), int16(971), int16(740), int16(454), int16(503), int16(503), int16(1134), int16(454), int16(1134), int16(353), int16(588), int16(628), int16(762), int16(503), int16(189), int16(762), int16(762), int16(916), int16(330), int16(668), int16(1245), int16(1167), int16(1167), int16(1255), int16(1255), int16(1167), int16(1277), int16(1230), int16(1172), int16(1291), int16(1291), int16(1291), int16(1291), int16(1167), int16(1310), int16(1172), int16(1277), int16(1230), int16(1230), int16(1172), int16(1167), int16(1310), int16(1204), int16(1299), int16(1167), int16(1167), int16(1310), int16(1335), int16(1167), int16(1310), int16(1167), int16(1310), int16(1335), int16(1258), int16(1258), int16(1258), int16(1329), int16(1335), int16(1258), int16(1273), int16(1258), int16(1329), int16(1258), int16(1258), int16(1256), int16(1288), int16(1256), int16(1288), int16(1256), int16(1288), int16(1256), int16(1288), int16(1167), int16(1375), int16(1167), int16(1267), int16(1335), int16(1320), int16(1320), int16(1335), int16(1287), int16(1295), int16(1294), int16(1301), int16(1172), int16(1407), int16(1408), int16(1422), int16(1422), int16(1433), int16(1433), int16(1433), int16(1433), int16(1566), int16(1566), int16(1566), int16(1566), int16(1566), int16(1566), int16(1566), int16(1566), int16(558), int16(537), int16(684), int16(719), int16(734), int16(799), int16(840), int16(1019), int16(14), int16(1020), int16(1021), int16(1025), int16(1026), int16(1027), int16(1070), int16(1072), int16(997), int16(1047), int16(999), int16(1079), int16(1126), int16(1074), int16(1141), int16(694), int16(819), int16(1174), int16(1136), int16(981), int16(1445), int16(1451), int16(1434), int16(1313), int16(1448), int16(1398), int16(1450), int16(1444), int16(1446), int16(1348), int16(1339), int16(1360), int16(1349), int16(1453), int16(1350), int16(1458), int16(1475), int16(1354), int16(1347), int16(1401), int16(1402), int16(1403), int16(1404), int16(1372), int16(1388), int16(1452), int16(1364), int16(1484), int16(1483), int16(1467), int16(1383), int16(1351), int16(1439), int16(1468), int16(1440), int16(1441), int16(1457), int16(1395), int16(1479), int16(1485), int16(1487), int16(1392), int16(1405), int16(1486), int16(1455), int16(1489), int16(1490), int16(1491), int16(1493), int16(1461), int16(1480), int16(1494), int16(1465), int16(1481), int16(1495), int16(1496), int16(1498), int16(1497), int16(1406), int16(1502), int16(1503), int16(1505), int16(1499), int16(1409), int16(1506), int16(1507), int16(1432), int16(1500), int16(1510), int16(1410), int16(1511), int16(1501), int16(1512), int16(1504), int16(1517), int16(1511), int16(1518), int16(1519), int16(1520), int16(1521), int16(1522), int16(1524), int16(1533), int16(1525), int16(1527), int16(1509), int16(1526), int16(1528), int16(1531), int16(1530), int16(1526), int16(1532), int16(1534), int16(1535), int16(1536), int16(1538), int16(1428), int16(1435), int16(1442), int16(1443), int16(1539), int16(1546), int16(1562)}
}
var _yy_lookahead [1566]uint8
@@ -25361,199 +25998,206 @@ func init() {
var _yy_action [1566]uint16
func init() {
- _yy_action = [1566]uint16{u16(325), u16(411), u16(343), u16(752), u16(752), u16(203), u16(946), u16(354), u16(976), u16(98), u16(98), u16(98), u16(98), u16(91), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(1333), u16(155), u16(155), u16(2), u16(813), u16(978), u16(978), u16(98), u16(98), u16(98), u16(98), u16(20), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(92), u16(89), u16(178), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(351), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(340), u16(976), u16(262), u16(365), u16(251), u16(212), u16(169), u16(287), u16(405), u16(282), u16(404), u16(199), u16(791), u16(242), u16(412), u16(21), u16(957), u16(379), u16(280), u16(93), u16(351), u16(792), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(978), u16(978), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(813), u16(329), u16(242), u16(412), u16(913), u16(832), u16(913), u16(132), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(450), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(825), u16(349), u16(348), u16(120), u16(819), u16(120), u16(75), u16(52), u16(52), u16(957), u16(958), u16(959), u16(760), u16(984), u16(146), u16(361), u16(262), u16(370), u16(261), u16(957), u16(982), u16(961), u16(983), u16(92), u16(89), u16(178), u16(371), u16(230), u16(371), u16(978), u16(978), u16(817), u16(361), u16(360), u16(101), u16(824), u16(824), u16(826), u16(384), u16(24), u16(964), u16(381), u16(428), u16(413), u16(369), u16(985), u16(380), u16(985), u16(708), u16(325), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(373), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(957), u16(132), u16(897), u16(450), u16(978), u16(978), u16(896), u16(60), u16(94), u16(94), u16(94), u16(93), u16(351), u16(957), u16(958), u16(959), u16(961), u16(103), u16(361), u16(957), u16(385), u16(334), u16(702), u16(52), u16(52), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(698), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(455), u16(670), u16(450), u16(227), u16(61), u16(157), u16(243), u16(344), u16(114), u16(701), u16(888), u16(147), u16(832), u16(957), u16(373), u16(747), u16(957), u16(320), u16(957), u16(958), u16(959), u16(194), u16(10), u16(10), u16(402), u16(399), u16(398), u16(888), u16(890), u16(978), u16(978), u16(762), u16(171), u16(170), u16(157), u16(397), u16(337), u16(957), u16(958), u16(959), u16(702), u16(825), u16(310), u16(153), u16(957), u16(819), u16(321), u16(82), u16(23), u16(80), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(894), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(824), u16(824), u16(826), u16(277), u16(231), u16(300), u16(957), u16(958), u16(959), u16(957), u16(958), u16(959), u16(888), u16(194), u16(25), u16(450), u16(402), u16(399), u16(398), u16(957), u16(355), u16(300), u16(450), u16(957), u16(74), u16(450), u16(1), u16(397), u16(132), u16(978), u16(978), u16(957), u16(224), u16(224), u16(813), u16(10), u16(10), u16(957), u16(958), u16(959), u16(968), u16(132), u16(52), u16(52), u16(415), u16(52), u16(52), u16(739), u16(739), u16(339), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(790), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(789), u16(428), u16(418), u16(706), u16(428), u16(427), u16(1270), u16(1270), u16(262), u16(370), u16(261), u16(957), u16(957), u16(958), u16(959), u16(757), u16(957), u16(958), u16(959), u16(450), u16(756), u16(450), u16(734), u16(713), u16(957), u16(958), u16(959), u16(443), u16(711), u16(978), u16(978), u16(734), u16(394), u16(92), u16(89), u16(178), u16(447), u16(447), u16(447), u16(51), u16(51), u16(52), u16(52), u16(439), u16(778), u16(700), u16(92), u16(89), u16(178), u16(172), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(198), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(428), u16(408), u16(916), u16(699), u16(957), u16(958), u16(959), u16(92), u16(89), u16(178), u16(224), u16(224), u16(157), u16(241), u16(221), u16(419), u16(299), u16(776), u16(917), u16(416), u16(375), u16(450), u16(415), u16(58), u16(324), u16(737), u16(737), u16(920), u16(379), u16(978), u16(978), u16(379), u16(777), u16(449), u16(918), u16(363), u16(740), u16(296), u16(686), u16(9), u16(9), u16(52), u16(52), u16(234), u16(330), u16(234), u16(256), u16(417), u16(741), u16(280), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(450), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(423), u16(72), u16(450), u16(833), u16(120), u16(368), u16(450), u16(10), u16(10), u16(5), u16(301), u16(203), u16(450), u16(177), u16(976), u16(253), u16(420), u16(255), u16(776), u16(200), u16(175), u16(233), u16(10), u16(10), u16(842), u16(842), u16(36), u16(36), u16(1299), u16(978), u16(978), u16(729), u16(37), u16(37), u16(349), u16(348), u16(425), u16(203), u16(260), u16(776), u16(976), u16(232), u16(937), u16(1326), u16(876), u16(338), u16(1326), u16(422), u16(854), u16(857), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(268), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(846), u16(450), u16(985), u16(818), u16(985), u16(1209), u16(450), u16(916), u16(976), u16(720), u16(350), u16(350), u16(350), u16(935), u16(177), u16(450), u16(937), u16(1327), u16(254), u16(198), u16(1327), u16(12), u16(12), u16(917), u16(403), u16(450), u16(27), u16(27), u16(250), u16(978), u16(978), u16(118), u16(721), u16(162), u16(976), u16(38), u16(38), u16(268), u16(176), u16(918), u16(776), u16(433), u16(1275), u16(946), u16(354), u16(39), u16(39), u16(317), u16(998), u16(325), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(935), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(450), u16(330), u16(450), u16(358), u16(978), u16(978), u16(717), u16(317), u16(936), u16(341), u16(900), u16(900), u16(387), u16(673), u16(674), u16(675), u16(275), u16(996), u16(318), u16(999), u16(40), u16(40), u16(41), u16(41), u16(268), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(450), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(450), u16(356), u16(450), u16(999), u16(450), u16(692), u16(331), u16(42), u16(42), u16(791), u16(270), u16(450), u16(273), u16(450), u16(228), u16(450), u16(298), u16(450), u16(792), u16(450), u16(28), u16(28), u16(29), u16(29), u16(31), u16(31), u16(450), u16(817), u16(450), u16(978), u16(978), u16(43), u16(43), u16(44), u16(44), u16(45), u16(45), u16(11), u16(11), u16(46), u16(46), u16(893), u16(78), u16(893), u16(268), u16(268), u16(105), u16(105), u16(47), u16(47), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(450), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(325), u16(450), u16(117), u16(450), u16(749), u16(158), u16(450), u16(696), u16(48), u16(48), u16(229), u16(919), u16(450), u16(928), u16(450), u16(415), u16(450), u16(335), u16(450), u16(245), u16(450), u16(33), u16(33), u16(49), u16(49), u16(450), u16(50), u16(50), u16(246), u16(817), u16(978), u16(978), u16(34), u16(34), u16(122), u16(122), u16(123), u16(123), u16(124), u16(124), u16(56), u16(56), u16(268), u16(81), u16(249), u16(35), u16(35), u16(197), u16(196), u16(195), u16(325), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(450), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(450), u16(696), u16(450), u16(817), u16(978), u16(978), u16(975), u16(884), u16(106), u16(106), u16(268), u16(886), u16(268), u16(944), u16(2), u16(892), u16(268), u16(892), u16(336), u16(716), u16(53), u16(53), u16(107), u16(107), u16(325), u16(99), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(450), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(450), u16(746), u16(450), u16(742), u16(978), u16(978), u16(715), u16(267), u16(108), u16(108), u16(446), u16(331), u16(332), u16(133), u16(223), u16(175), u16(301), u16(225), u16(386), u16(933), u16(104), u16(104), u16(121), u16(121), u16(325), u16(99), u16(88), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(817), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(450), u16(347), u16(450), u16(167), u16(978), u16(978), u16(932), u16(815), u16(372), u16(319), u16(202), u16(202), u16(374), u16(263), u16(395), u16(202), u16(74), u16(208), u16(726), u16(727), u16(119), u16(119), u16(112), u16(112), u16(325), u16(407), u16(100), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(450), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(450), u16(757), u16(450), u16(345), u16(978), u16(978), u16(756), u16(278), u16(111), u16(111), u16(74), u16(719), u16(718), u16(709), u16(286), u16(883), u16(754), u16(1289), u16(257), u16(77), u16(109), u16(109), u16(110), u16(110), u16(908), u16(285), u16(810), u16(90), u16(853), u16(856), u16(845), u16(845), u16(97), u16(97), u16(98), u16(98), u16(98), u16(98), u16(911), u16(96), u16(96), u16(96), u16(96), u16(95), u16(95), u16(94), u16(94), u16(94), u16(93), u16(351), u16(86), u16(445), u16(450), u16(3), u16(1202), u16(450), u16(745), u16(132), u16(352), u16(120), u16(689), u16(86), u16(445), u16(785), u16(3), u16(767), u16(202), u16(377), u16(448), u16(352), u16(907), u16(120), u16(55), u16(55), u16(450), u16(57), u16(57), u16(828), u16(879), u16(448), u16(450), u16(208), u16(450), u16(709), u16(450), u16(883), u16(237), u16(434), u16(436), u16(120), u16(440), u16(429), u16(362), u16(120), u16(54), u16(54), u16(132), u16(450), u16(434), u16(832), u16(52), u16(52), u16(26), u16(26), u16(30), u16(30), u16(382), u16(132), u16(409), u16(444), u16(832), u16(694), u16(264), u16(390), u16(116), u16(269), u16(272), u16(32), u16(32), u16(83), u16(84), u16(120), u16(274), u16(120), u16(120), u16(276), u16(85), u16(352), u16(452), u16(451), u16(83), u16(84), u16(819), u16(730), u16(714), u16(428), u16(430), u16(85), u16(352), u16(452), u16(451), u16(120), u16(120), u16(819), u16(378), u16(218), u16(281), u16(828), u16(783), u16(816), u16(86), u16(445), u16(410), u16(3), u16(763), u16(774), u16(431), u16(432), u16(352), u16(302), u16(303), u16(823), u16(697), u16(824), u16(824), u16(826), u16(827), u16(19), u16(448), u16(691), u16(680), u16(679), u16(681), u16(951), u16(824), u16(824), u16(826), u16(827), u16(19), u16(289), u16(159), u16(291), u16(293), u16(7), u16(316), u16(173), u16(259), u16(434), u16(805), u16(364), u16(252), u16(910), u16(376), u16(713), u16(295), u16(435), u16(168), u16(993), u16(400), u16(832), u16(284), u16(881), u16(880), u16(205), u16(954), u16(308), u16(927), u16(86), u16(445), u16(990), u16(3), u16(925), u16(333), u16(144), u16(130), u16(352), u16(72), u16(135), u16(59), u16(83), u16(84), u16(761), u16(137), u16(366), u16(802), u16(448), u16(85), u16(352), u16(452), u16(451), u16(139), u16(226), u16(819), u16(140), u16(156), u16(62), u16(315), u16(314), u16(313), u16(215), u16(311), u16(367), u16(393), u16(683), u16(434), u16(185), u16(141), u16(912), u16(142), u16(160), u16(148), u16(812), u16(875), u16(383), u16(189), u16(67), u16(832), u16(180), u16(389), u16(248), u16(895), u16(775), u16(219), u16(824), u16(824), u16(826), u16(827), u16(19), u16(247), u16(190), u16(266), u16(154), u16(391), u16(271), u16(191), u16(192), u16(83), u16(84), u16(682), u16(406), u16(733), u16(182), u16(322), u16(85), u16(352), u16(452), u16(451), u16(732), u16(183), u16(819), u16(342), u16(132), u16(181), u16(711), u16(731), u16(421), u16(76), u16(445), u16(705), u16(3), u16(323), u16(704), u16(283), u16(724), u16(352), u16(771), u16(703), u16(966), u16(723), u16(71), u16(204), u16(6), u16(288), u16(290), u16(448), u16(772), u16(770), u16(769), u16(79), u16(292), u16(824), u16(824), u16(826), u16(827), u16(19), u16(294), u16(297), u16(438), u16(346), u16(442), u16(102), u16(861), u16(753), u16(434), u16(238), u16(426), u16(73), u16(305), u16(239), u16(304), u16(326), u16(240), u16(424), u16(306), u16(307), u16(832), u16(213), u16(688), u16(22), u16(952), u16(453), u16(214), u16(216), u16(217), u16(454), u16(677), u16(115), u16(676), u16(671), u16(125), u16(126), u16(235), u16(127), u16(669), u16(327), u16(83), u16(84), u16(359), u16(353), u16(244), u16(166), u16(328), u16(85), u16(352), u16(452), u16(451), u16(134), u16(179), u16(819), u16(357), u16(113), u16(891), u16(811), u16(889), u16(136), u16(128), u16(138), u16(743), u16(258), u16(184), u16(906), u16(143), u16(145), u16(63), u16(64), u16(65), u16(66), u16(129), u16(909), u16(905), u16(187), u16(186), u16(8), u16(13), u16(188), u16(265), u16(898), u16(149), u16(202), u16(824), u16(824), u16(826), u16(827), u16(19), u16(388), u16(987), u16(150), u16(161), u16(285), u16(685), u16(392), u16(396), u16(151), u16(722), u16(193), u16(68), u16(14), u16(401), u16(279), u16(15), u16(69), u16(236), u16(831), u16(830), u16(131), u16(859), u16(751), u16(70), u16(16), u16(414), u16(755), u16(4), u16(784), u16(220), u16(222), u16(174), u16(152), u16(437), u16(779), u16(201), u16(17), u16(77), u16(74), u16(18), u16(874), u16(860), u16(858), u16(915), u16(863), u16(914), u16(207), u16(206), u16(941), u16(163), u16(210), u16(942), u16(209), u16(164), u16(441), u16(862), u16(165), u16(211), u16(829), u16(695), u16(87), u16(312), u16(309), u16(947), u16(1291), u16(1290)}
+ _yy_action = [1566]uint16{uint16(325), uint16(411), uint16(343), uint16(752), uint16(752), uint16(203), uint16(946), uint16(354), uint16(976), uint16(98), uint16(98), uint16(98), uint16(98), uint16(91), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(1333), uint16(155), uint16(155), uint16(2), uint16(813), uint16(978), uint16(978), uint16(98), uint16(98), uint16(98), uint16(98), uint16(20), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(92), uint16(89), uint16(178), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(351), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(340), uint16(976), uint16(262), uint16(365), uint16(251), uint16(212), uint16(169), uint16(287), uint16(405), uint16(282), uint16(404), uint16(199), uint16(791), uint16(242), uint16(412), uint16(21), uint16(957), uint16(379), uint16(280), uint16(93), uint16(351), uint16(792), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(978), uint16(978), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(813), uint16(329), uint16(242), uint16(412), uint16(913), uint16(832), uint16(913), uint16(132), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(450), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(825), uint16(349), uint16(348), uint16(120), uint16(819), uint16(120), uint16(75), uint16(52), uint16(52), uint16(957), uint16(958), uint16(959), uint16(760), uint16(984), uint16(146), uint16(361), uint16(262), uint16(370), uint16(261), uint16(957), uint16(982), uint16(961), uint16(983), uint16(92), uint16(89), uint16(178), uint16(371), uint16(230), uint16(371), uint16(978), uint16(978), uint16(817), uint16(361), uint16(360), uint16(101), uint16(824), uint16(824), uint16(826), uint16(384), uint16(24), uint16(964), uint16(381), uint16(428), uint16(413), uint16(369), uint16(985), uint16(380), uint16(985), uint16(708), uint16(325), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(373), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(957), uint16(132), uint16(897), uint16(450), uint16(978), uint16(978), uint16(896), uint16(60), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(957), uint16(958), uint16(959), uint16(961), uint16(103), uint16(361), uint16(957), uint16(385), uint16(334), uint16(702), uint16(52), uint16(52), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(698), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(455), uint16(670), uint16(450), uint16(227), uint16(61), uint16(157), uint16(243), uint16(344), uint16(114), uint16(701), uint16(888), uint16(147), uint16(832), uint16(957), uint16(373), uint16(747), uint16(957), uint16(320), uint16(957), uint16(958), uint16(959), uint16(194), uint16(10), uint16(10), uint16(402), uint16(399), uint16(398), uint16(888), uint16(890), uint16(978), uint16(978), uint16(762), uint16(171), uint16(170), uint16(157), uint16(397), uint16(337), uint16(957), uint16(958), uint16(959), uint16(702), uint16(825), uint16(310), uint16(153), uint16(957), uint16(819), uint16(321), uint16(82), uint16(23), uint16(80), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(894), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(824), uint16(824), uint16(826), uint16(277), uint16(231), uint16(300), uint16(957), uint16(958), uint16(959), uint16(957), uint16(958), uint16(959), uint16(888), uint16(194), uint16(25), uint16(450), uint16(402), uint16(399), uint16(398), uint16(957), uint16(355), uint16(300), uint16(450), uint16(957), uint16(74), uint16(450), uint16(1), uint16(397), uint16(132), uint16(978), uint16(978), uint16(957), uint16(224), uint16(224), uint16(813), uint16(10), uint16(10), uint16(957), uint16(958), uint16(959), uint16(968), uint16(132), uint16(52), uint16(52), uint16(415), uint16(52), uint16(52), uint16(739), uint16(739), uint16(339), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(790), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(789), uint16(428), uint16(418), uint16(706), uint16(428), uint16(427), uint16(1270), uint16(1270), uint16(262), uint16(370), uint16(261), uint16(957), uint16(957), uint16(958), uint16(959), uint16(757), uint16(957), uint16(958), uint16(959), uint16(450), uint16(756), uint16(450), uint16(734), uint16(713), uint16(957), uint16(958), uint16(959), uint16(443), uint16(711), uint16(978), uint16(978), uint16(734), uint16(394), uint16(92), uint16(89), uint16(178), uint16(447), uint16(447), uint16(447), uint16(51), uint16(51), uint16(52), uint16(52), uint16(439), uint16(778), uint16(700), uint16(92), uint16(89), uint16(178), uint16(172), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(198), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(428), uint16(408), uint16(916), uint16(699), uint16(957), uint16(958), uint16(959), uint16(92), uint16(89), uint16(178), uint16(224), uint16(224), uint16(157), uint16(241), uint16(221), uint16(419), uint16(299), uint16(776), uint16(917), uint16(416), uint16(375), uint16(450), uint16(415), uint16(58), uint16(324), uint16(737), uint16(737), uint16(920), uint16(379), uint16(978), uint16(978), uint16(379), uint16(777), uint16(449), uint16(918), uint16(363), uint16(740), uint16(296), uint16(686), uint16(9), uint16(9), uint16(52), uint16(52), uint16(234), uint16(330), uint16(234), uint16(256), uint16(417), uint16(741), uint16(280), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(450), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(423), uint16(72), uint16(450), uint16(833), uint16(120), uint16(368), uint16(450), uint16(10), uint16(10), uint16(5), uint16(301), uint16(203), uint16(450), uint16(177), uint16(976), uint16(253), uint16(420), uint16(255), uint16(776), uint16(200), uint16(175), uint16(233), uint16(10), uint16(10), uint16(842), uint16(842), uint16(36), uint16(36), uint16(1299), uint16(978), uint16(978), uint16(729), uint16(37), uint16(37), uint16(349), uint16(348), uint16(425), uint16(203), uint16(260), uint16(776), uint16(976), uint16(232), uint16(937), uint16(1326), uint16(876), uint16(338), uint16(1326), uint16(422), uint16(854), uint16(857), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(268), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(846), uint16(450), uint16(985), uint16(818), uint16(985), uint16(1209), uint16(450), uint16(916), uint16(976), uint16(720), uint16(350), uint16(350), uint16(350), uint16(935), uint16(177), uint16(450), uint16(937), uint16(1327), uint16(254), uint16(198), uint16(1327), uint16(12), uint16(12), uint16(917), uint16(403), uint16(450), uint16(27), uint16(27), uint16(250), uint16(978), uint16(978), uint16(118), uint16(721), uint16(162), uint16(976), uint16(38), uint16(38), uint16(268), uint16(176), uint16(918), uint16(776), uint16(433), uint16(1275), uint16(946), uint16(354), uint16(39), uint16(39), uint16(317), uint16(998), uint16(325), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(935), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(450), uint16(330), uint16(450), uint16(358), uint16(978), uint16(978), uint16(717), uint16(317), uint16(936), uint16(341), uint16(900), uint16(900), uint16(387), uint16(673), uint16(674), uint16(675), uint16(275), uint16(996), uint16(318), uint16(999), uint16(40), uint16(40), uint16(41), uint16(41), uint16(268), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(450), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(450), uint16(356), uint16(450), uint16(999), uint16(450), uint16(692), uint16(331), uint16(42), uint16(42), uint16(791), uint16(270), uint16(450), uint16(273), uint16(450), uint16(228), uint16(450), uint16(298), uint16(450), uint16(792), uint16(450), uint16(28), uint16(28), uint16(29), uint16(29), uint16(31), uint16(31), uint16(450), uint16(817), uint16(450), uint16(978), uint16(978), uint16(43), uint16(43), uint16(44), uint16(44), uint16(45), uint16(45), uint16(11), uint16(11), uint16(46), uint16(46), uint16(893), uint16(78), uint16(893), uint16(268), uint16(268), uint16(105), uint16(105), uint16(47), uint16(47), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(450), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(325), uint16(450), uint16(117), uint16(450), uint16(749), uint16(158), uint16(450), uint16(696), uint16(48), uint16(48), uint16(229), uint16(919), uint16(450), uint16(928), uint16(450), uint16(415), uint16(450), uint16(335), uint16(450), uint16(245), uint16(450), uint16(33), uint16(33), uint16(49), uint16(49), uint16(450), uint16(50), uint16(50), uint16(246), uint16(817), uint16(978), uint16(978), uint16(34), uint16(34), uint16(122), uint16(122), uint16(123), uint16(123), uint16(124), uint16(124), uint16(56), uint16(56), uint16(268), uint16(81), uint16(249), uint16(35), uint16(35), uint16(197), uint16(196), uint16(195), uint16(325), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(450), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(450), uint16(696), uint16(450), uint16(817), uint16(978), uint16(978), uint16(975), uint16(884), uint16(106), uint16(106), uint16(268), uint16(886), uint16(268), uint16(944), uint16(2), uint16(892), uint16(268), uint16(892), uint16(336), uint16(716), uint16(53), uint16(53), uint16(107), uint16(107), uint16(325), uint16(99), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(450), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(450), uint16(746), uint16(450), uint16(742), uint16(978), uint16(978), uint16(715), uint16(267), uint16(108), uint16(108), uint16(446), uint16(331), uint16(332), uint16(133), uint16(223), uint16(175), uint16(301), uint16(225), uint16(386), uint16(933), uint16(104), uint16(104), uint16(121), uint16(121), uint16(325), uint16(99), uint16(88), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(817), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(450), uint16(347), uint16(450), uint16(167), uint16(978), uint16(978), uint16(932), uint16(815), uint16(372), uint16(319), uint16(202), uint16(202), uint16(374), uint16(263), uint16(395), uint16(202), uint16(74), uint16(208), uint16(726), uint16(727), uint16(119), uint16(119), uint16(112), uint16(112), uint16(325), uint16(407), uint16(100), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(450), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(450), uint16(757), uint16(450), uint16(345), uint16(978), uint16(978), uint16(756), uint16(278), uint16(111), uint16(111), uint16(74), uint16(719), uint16(718), uint16(709), uint16(286), uint16(883), uint16(754), uint16(1289), uint16(257), uint16(77), uint16(109), uint16(109), uint16(110), uint16(110), uint16(908), uint16(285), uint16(810), uint16(90), uint16(853), uint16(856), uint16(845), uint16(845), uint16(97), uint16(97), uint16(98), uint16(98), uint16(98), uint16(98), uint16(911), uint16(96), uint16(96), uint16(96), uint16(96), uint16(95), uint16(95), uint16(94), uint16(94), uint16(94), uint16(93), uint16(351), uint16(86), uint16(445), uint16(450), uint16(3), uint16(1202), uint16(450), uint16(745), uint16(132), uint16(352), uint16(120), uint16(689), uint16(86), uint16(445), uint16(785), uint16(3), uint16(767), uint16(202), uint16(377), uint16(448), uint16(352), uint16(907), uint16(120), uint16(55), uint16(55), uint16(450), uint16(57), uint16(57), uint16(828), uint16(879), uint16(448), uint16(450), uint16(208), uint16(450), uint16(709), uint16(450), uint16(883), uint16(237), uint16(434), uint16(436), uint16(120), uint16(440), uint16(429), uint16(362), uint16(120), uint16(54), uint16(54), uint16(132), uint16(450), uint16(434), uint16(832), uint16(52), uint16(52), uint16(26), uint16(26), uint16(30), uint16(30), uint16(382), uint16(132), uint16(409), uint16(444), uint16(832), uint16(694), uint16(264), uint16(390), uint16(116), uint16(269), uint16(272), uint16(32), uint16(32), uint16(83), uint16(84), uint16(120), uint16(274), uint16(120), uint16(120), uint16(276), uint16(85), uint16(352), uint16(452), uint16(451), uint16(83), uint16(84), uint16(819), uint16(730), uint16(714), uint16(428), uint16(430), uint16(85), uint16(352), uint16(452), uint16(451), uint16(120), uint16(120), uint16(819), uint16(378), uint16(218), uint16(281), uint16(828), uint16(783), uint16(816), uint16(86), uint16(445), uint16(410), uint16(3), uint16(763), uint16(774), uint16(431), uint16(432), uint16(352), uint16(302), uint16(303), uint16(823), uint16(697), uint16(824), uint16(824), uint16(826), uint16(827), uint16(19), uint16(448), uint16(691), uint16(680), uint16(679), uint16(681), uint16(951), uint16(824), uint16(824), uint16(826), uint16(827), uint16(19), uint16(289), uint16(159), uint16(291), uint16(293), uint16(7), uint16(316), uint16(173), uint16(259), uint16(434), uint16(805), uint16(364), uint16(252), uint16(910), uint16(376), uint16(713), uint16(295), uint16(435), uint16(168), uint16(993), uint16(400), uint16(832), uint16(284), uint16(881), uint16(880), uint16(205), uint16(954), uint16(308), uint16(927), uint16(86), uint16(445), uint16(990), uint16(3), uint16(925), uint16(333), uint16(144), uint16(130), uint16(352), uint16(72), uint16(135), uint16(59), uint16(83), uint16(84), uint16(761), uint16(137), uint16(366), uint16(802), uint16(448), uint16(85), uint16(352), uint16(452), uint16(451), uint16(139), uint16(226), uint16(819), uint16(140), uint16(156), uint16(62), uint16(315), uint16(314), uint16(313), uint16(215), uint16(311), uint16(367), uint16(393), uint16(683), uint16(434), uint16(185), uint16(141), uint16(912), uint16(142), uint16(160), uint16(148), uint16(812), uint16(875), uint16(383), uint16(189), uint16(67), uint16(832), uint16(180), uint16(389), uint16(248), uint16(895), uint16(775), uint16(219), uint16(824), uint16(824), uint16(826), uint16(827), uint16(19), uint16(247), uint16(190), uint16(266), uint16(154), uint16(391), uint16(271), uint16(191), uint16(192), uint16(83), uint16(84), uint16(682), uint16(406), uint16(733), uint16(182), uint16(322), uint16(85), uint16(352), uint16(452), uint16(451), uint16(732), uint16(183), uint16(819), uint16(342), uint16(132), uint16(181), uint16(711), uint16(731), uint16(421), uint16(76), uint16(445), uint16(705), uint16(3), uint16(323), uint16(704), uint16(283), uint16(724), uint16(352), uint16(771), uint16(703), uint16(966), uint16(723), uint16(71), uint16(204), uint16(6), uint16(288), uint16(290), uint16(448), uint16(772), uint16(770), uint16(769), uint16(79), uint16(292), uint16(824), uint16(824), uint16(826), uint16(827), uint16(19), uint16(294), uint16(297), uint16(438), uint16(346), uint16(442), uint16(102), uint16(861), uint16(753), uint16(434), uint16(238), uint16(426), uint16(73), uint16(305), uint16(239), uint16(304), uint16(326), uint16(240), uint16(424), uint16(306), uint16(307), uint16(832), uint16(213), uint16(688), uint16(22), uint16(952), uint16(453), uint16(214), uint16(216), uint16(217), uint16(454), uint16(677), uint16(115), uint16(676), uint16(671), uint16(125), uint16(126), uint16(235), uint16(127), uint16(669), uint16(327), uint16(83), uint16(84), uint16(359), uint16(353), uint16(244), uint16(166), uint16(328), uint16(85), uint16(352), uint16(452), uint16(451), uint16(134), uint16(179), uint16(819), uint16(357), uint16(113), uint16(891), uint16(811), uint16(889), uint16(136), uint16(128), uint16(138), uint16(743), uint16(258), uint16(184), uint16(906), uint16(143), uint16(145), uint16(63), uint16(64), uint16(65), uint16(66), uint16(129), uint16(909), uint16(905), uint16(187), uint16(186), uint16(8), uint16(13), uint16(188), uint16(265), uint16(898), uint16(149), uint16(202), uint16(824), uint16(824), uint16(826), uint16(827), uint16(19), uint16(388), uint16(987), uint16(150), uint16(161), uint16(285), uint16(685), uint16(392), uint16(396), uint16(151), uint16(722), uint16(193), uint16(68), uint16(14), uint16(401), uint16(279), uint16(15), uint16(69), uint16(236), uint16(831), uint16(830), uint16(131), uint16(859), uint16(751), uint16(70), uint16(16), uint16(414), uint16(755), uint16(4), uint16(784), uint16(220), uint16(222), uint16(174), uint16(152), uint16(437), uint16(779), uint16(201), uint16(17), uint16(77), uint16(74), uint16(18), uint16(874), uint16(860), uint16(858), uint16(915), uint16(863), uint16(914), uint16(207), uint16(206), uint16(941), uint16(163), uint16(210), uint16(942), uint16(209), uint16(164), uint16(441), uint16(862), uint16(165), uint16(211), uint16(829), uint16(695), uint16(87), uint16(312), uint16(309), uint16(947), uint16(1291), uint16(1290)}
}
var _yy_default [456]uint16
func init() {
- _yy_default = [456]uint16{u16(1280), u16(1270), u16(1270), u16(1270), u16(1202), u16(1202), u16(1202), u16(1202), u16(1270), u16(1096), u16(1125), u16(1125), u16(1254), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1201), u16(1332), u16(1332), u16(1332), u16(1332), u16(1270), u16(1100), u16(1131), u16(1332), u16(1332), u16(1332), u16(1332), u16(1203), u16(1204), u16(1332), u16(1332), u16(1332), u16(1253), u16(1255), u16(1141), u16(1140), u16(1139), u16(1138), u16(1236), u16(1112), u16(1136), u16(1129), u16(1133), u16(1203), u16(1197), u16(1198), u16(1196), u16(1200), u16(1204), u16(1332), u16(1132), u16(1167), u16(1181), u16(1166), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1175), u16(1180), u16(1187), u16(1179), u16(1176), u16(1169), u16(1168), u16(1170), u16(1171), u16(1332), u16(1019), u16(1067), u16(1332), u16(1332), u16(1332), u16(1172), u16(1332), u16(1173), u16(1184), u16(1183), u16(1182), u16(1261), u16(1288), u16(1287), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1280), u16(1270), u16(1025), u16(1025), u16(1332), u16(1270), u16(1270), u16(1270), u16(1270), u16(1270), u16(1270), u16(1266), u16(1100), u16(1091), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1258), u16(1256), u16(1332), u16(1217), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1096), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1282), u16(1332), u16(1231), u16(1096), u16(1096), u16(1096), u16(1098), u16(1080), u16(1090), u16(1004), u16(1135), u16(1114), u16(1114), u16(1321), u16(1135), u16(1321), u16(1042), u16(1302), u16(1039), u16(1125), u16(1114), u16(1199), u16(1125), u16(1125), u16(1097), u16(1090), u16(1332), u16(1324), u16(1105), u16(1105), u16(1323), u16(1323), u16(1105), u16(1146), u16(1070), u16(1135), u16(1076), u16(1076), u16(1076), u16(1076), u16(1105), u16(1016), u16(1135), u16(1146), u16(1070), u16(1070), u16(1135), u16(1105), u16(1016), u16(1235), u16(1318), u16(1105), u16(1105), u16(1016), u16(1210), u16(1105), u16(1016), u16(1105), u16(1016), u16(1210), u16(1068), u16(1068), u16(1068), u16(1057), u16(1210), u16(1068), u16(1042), u16(1068), u16(1057), u16(1068), u16(1068), u16(1118), u16(1113), u16(1118), u16(1113), u16(1118), u16(1113), u16(1118), u16(1113), u16(1105), u16(1205), u16(1105), u16(1332), u16(1210), u16(1214), u16(1214), u16(1210), u16(1130), u16(1119), u16(1128), u16(1126), u16(1135), u16(1022), u16(1060), u16(1285), u16(1285), u16(1281), u16(1281), u16(1281), u16(1281), u16(1329), u16(1329), u16(1266), u16(1297), u16(1297), u16(1044), u16(1044), u16(1297), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1292), u16(1332), u16(1219), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1152), u16(1332), u16(1000), u16(1263), u16(1332), u16(1332), u16(1262), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1320), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1234), u16(1233), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1082), u16(1332), u16(1332), u16(1332), u16(1306), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1127), u16(1332), u16(1120), u16(1332), u16(1332), u16(1311), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1272), u16(1332), u16(1332), u16(1332), u16(1271), u16(1332), u16(1332), u16(1332), u16(1332), u16(1332), u16(1154), u16(1332), u16(1153), u16(1157), u16(1332), u16(1010), u16(1332)}
+ _yy_default = [456]uint16{uint16(1280), uint16(1270), uint16(1270), uint16(1270), uint16(1202), uint16(1202), uint16(1202), uint16(1202), uint16(1270), uint16(1096), uint16(1125), uint16(1125), uint16(1254), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1201), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1270), uint16(1100), uint16(1131), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1203), uint16(1204), uint16(1332), uint16(1332), uint16(1332), uint16(1253), uint16(1255), uint16(1141), uint16(1140), uint16(1139), uint16(1138), uint16(1236), uint16(1112), uint16(1136), uint16(1129), uint16(1133), uint16(1203), uint16(1197), uint16(1198), uint16(1196), uint16(1200), uint16(1204), uint16(1332), uint16(1132), uint16(1167), uint16(1181), uint16(1166), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1175), uint16(1180), uint16(1187), uint16(1179), uint16(1176), uint16(1169), uint16(1168), uint16(1170), uint16(1171), uint16(1332), uint16(1019), uint16(1067), uint16(1332), uint16(1332), uint16(1332), uint16(1172), uint16(1332), uint16(1173), uint16(1184), uint16(1183), uint16(1182), uint16(1261), uint16(1288), uint16(1287), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1280), uint16(1270), uint16(1025), uint16(1025), uint16(1332), uint16(1270), uint16(1270), uint16(1270), uint16(1270), uint16(1270), uint16(1270), uint16(1266), uint16(1100), uint16(1091), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1258), uint16(1256), uint16(1332), uint16(1217), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1096), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1282), uint16(1332), uint16(1231), uint16(1096), uint16(1096), uint16(1096), uint16(1098), uint16(1080), uint16(1090), uint16(1004), uint16(1135), uint16(1114), uint16(1114), uint16(1321), uint16(1135), uint16(1321), uint16(1042), uint16(1302), uint16(1039), uint16(1125), uint16(1114), uint16(1199), uint16(1125), uint16(1125), uint16(1097), uint16(1090), uint16(1332), uint16(1324), uint16(1105), uint16(1105), uint16(1323), uint16(1323), uint16(1105), uint16(1146), uint16(1070), uint16(1135), uint16(1076), uint16(1076), uint16(1076), uint16(1076), uint16(1105), uint16(1016), uint16(1135), uint16(1146), uint16(1070), uint16(1070), uint16(1135), uint16(1105), uint16(1016), uint16(1235), uint16(1318), uint16(1105), uint16(1105), uint16(1016), uint16(1210), uint16(1105), uint16(1016), uint16(1105), uint16(1016), uint16(1210), uint16(1068), uint16(1068), uint16(1068), uint16(1057), uint16(1210), uint16(1068), uint16(1042), uint16(1068), uint16(1057), uint16(1068), uint16(1068), uint16(1118), uint16(1113), uint16(1118), uint16(1113), uint16(1118), uint16(1113), uint16(1118), uint16(1113), uint16(1105), uint16(1205), uint16(1105), uint16(1332), uint16(1210), uint16(1214), uint16(1214), uint16(1210), uint16(1130), uint16(1119), uint16(1128), uint16(1126), uint16(1135), uint16(1022), uint16(1060), uint16(1285), uint16(1285), uint16(1281), uint16(1281), uint16(1281), uint16(1281), uint16(1329), uint16(1329), uint16(1266), uint16(1297), uint16(1297), uint16(1044), uint16(1044), uint16(1297), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1292), uint16(1332), uint16(1219), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1152), uint16(1332), uint16(1000), uint16(1263), uint16(1332), uint16(1332), uint16(1262), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1320), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1234), uint16(1233), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1082), uint16(1332), uint16(1332), uint16(1332), uint16(1306), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1127), uint16(1332), uint16(1120), uint16(1332), uint16(1332), uint16(1311), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1272), uint16(1332), uint16(1332), uint16(1332), uint16(1271), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1332), uint16(1154), uint16(1332), uint16(1153), uint16(1157), uint16(1332), uint16(1010), uint16(1332)}
}
-// Perform a shift action.
+// C comment
+// /*
+// ** Perform a shift action.
+// */
func _yy_shift(tls *crt.TLS, _yypParser *XyyParser, _yyNewState int32, _yyMajor int32, _yyMinor XToken) {
var _yytos *XyyStackEntry
- *(*uintptr)(unsafe.Pointer((**XyyStackEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_yypParser.X0))))))) += uintptr(16)
- if uintptr(unsafe.Pointer((*XyyStackEntry)(_yypParser.X0))) >= uintptr(unsafe.Pointer((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[100]XyyStackEntry)(unsafe.Pointer(&(_yypParser.X2)))))+16*uintptr(i32(100)))))) {
- *(*uintptr)(unsafe.Pointer((**XyyStackEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_yypParser.X0))))))) += uintptr(4294967280)
+ *(*uintptr)(unsafe.Pointer(&_yypParser.Xyytos)) += uintptr(16)
+ if crt.P2U(_yypParser.Xyytos) >= crt.P2U(unsafe.Pointer(elem49((*XyyStackEntry)(unsafe.Pointer(&_yypParser.Xyystack)), uintptr(100)))) {
+ *(*uintptr)(unsafe.Pointer(&_yypParser.Xyytos)) += uintptr(4294967280)
_yyStackOverflow(tls, _yypParser)
return
}
- if _yyNewState > i32(455) {
- {
- p := &_yyNewState
- *p = (*p) + i32(332)
- sink1(*p)
- }
+ if _yyNewState > int32(455) {
+ _yyNewState += int32(332)
}
- _yytos = (*XyyStackEntry)(_yypParser.X0)
- *(*uint16)(unsafe.Pointer(&(_yytos.X0))) = uint16(_yyNewState)
- *(*uint8)(unsafe.Pointer(&(_yytos.X1))) = uint8(_yyMajor)
- *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&(_yytos.X2))))) = _yyMinor
+ _yytos = (*XyyStackEntry)(_yypParser.Xyytos)
+ _yytos.Xstateno = uint16(_yyNewState)
+ _yytos.Xmajor = uint8(_yyMajor)
+ *(*XToken)(unsafe.Pointer(&_yytos.Xminor)) = _yyMinor
_yyTraceShift(tls, _yypParser, _yyNewState)
}
-// The following routine is called if the stack overflows.
+// C comment
+// /*
+// ** The following routine is called if the stack overflows.
+// */
func _yyStackOverflow(tls *crt.TLS, _yypParser *XyyParser) {
var _pParse *XParse
- _pParse = (*XParse)(_yypParser.X1)
+ _pParse = (*XParse)(_yypParser.XpParse)
if _yyTraceFILE != nil {
- crt.Xfprintf(tls, _yyTraceFILE, str(27024), unsafe.Pointer(_yyTracePrompt))
+ crt.Xfprintf(tls, _yyTraceFILE, str(26979), unsafe.Pointer(_yyTracePrompt))
}
_0:
- if uintptr(unsafe.Pointer((*XyyStackEntry)(_yypParser.X0))) > uintptr(unsafe.Pointer((*XyyStackEntry)(unsafe.Pointer((*[100]XyyStackEntry)(unsafe.Pointer(&(_yypParser.X2))))))) {
+ if crt.P2U(_yypParser.Xyytos) > crt.P2U(unsafe.Pointer(&_yypParser.Xyystack)) {
_yy_pop_parser_stack(tls, _yypParser)
goto _0
}
- _sqlite3ErrorMsg(tls, _pParse, str(27043))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_yypParser.X1))))) = _pParse
+ _sqlite3ErrorMsg(tls, _pParse, str(26998))
+ *(**XParse)(unsafe.Pointer(&_yypParser.XpParse)) = _pParse
}
-// Pop the parser's stack once.
-//
-// If there is a destructor routine associated with the token which
-// is popped from the stack, then call it.
+// C comment
+// /*
+// ** Pop the parser's stack once.
+// **
+// ** If there is a destructor routine associated with the token which
+// ** is popped from the stack, then call it.
+// */
func _yy_pop_parser_stack(tls *crt.TLS, _pParser *XyyParser) {
var _yytos *XyyStackEntry
func() {
- if (*XyyStackEntry)(_pParser.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137054), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_pop_parser_stackØ00__func__Ø000))), unsafe.Pointer(str(27065)))
+ if (*XyyStackEntry)(_pParser.Xyytos) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137054), unsafe.Pointer(&_yy_pop_parser_stackØ00__func__Ø000), unsafe.Pointer(str(27020)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uintptr(unsafe.Pointer((*XyyStackEntry)(_pParser.X0))) <= uintptr(unsafe.Pointer((*XyyStackEntry)(unsafe.Pointer((*[100]XyyStackEntry)(unsafe.Pointer(&(_pParser.X2))))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137055), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_pop_parser_stackØ00__func__Ø000))), unsafe.Pointer(str(27083)))
+ if crt.P2U(_pParser.Xyytos) <= crt.P2U(unsafe.Pointer(&_pParser.Xyystack)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137055), unsafe.Pointer(&_yy_pop_parser_stackØ00__func__Ø000), unsafe.Pointer(str(27038)))
crt.X__builtin_abort(tls)
}
}()
- _yytos = postInc34((**XyyStackEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParser.X0))))), -16)
+ _yytos = postInc49((**XyyStackEntry)(unsafe.Pointer(&_pParser.Xyytos)), -16)
if _yyTraceFILE != nil {
- crt.Xfprintf(tls, _yyTraceFILE, str(27117), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyTokenName)) + 4*uintptr(_yytos.X1)))))
+ crt.Xfprintf(tls, _yyTraceFILE, str(27072), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyTokenName)), uintptr(_yytos.Xmajor))))
}
- _yy_destructor(tls, _pParser, _yytos.X1, (*XYYMINORTYPE)(unsafe.Pointer(&(_yytos.X2))))
+ _yy_destructor(tls, _pParser, _yytos.Xmajor, &_yytos.Xminor)
}
var _yy_pop_parser_stackØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_yy_pop_parser_stackØ00__func__Ø000[0], str(27131), 20)
+ crt.Xstrncpy(nil, &_yy_pop_parser_stackØ00__func__Ø000[0], str(27086), 20)
}
-// The following function deletes the "minor type" or semantic value
-// associated with a symbol. The symbol can be either a terminal
-// or nonterminal. "yymajor" is the symbol code, and "yypminor" is
-// a pointer to the value to be deleted. The code used to do the
-// deletions is derived from the %destructor and/or %token_destructor
-// directives of the input grammar.
+// C comment
+// /* The following function deletes the "minor type" or semantic value
+// ** associated with a symbol. The symbol can be either a terminal
+// ** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
+// ** a pointer to the value to be deleted. The code used to do the
+// ** deletions is derived from the %destructor and/or %token_destructor
+// ** directives of the input grammar.
+// */
func _yy_destructor(tls *crt.TLS, _yypParser *XyyParser, _yymajor uint8, _yypminor *XYYMINORTYPE) {
var _pParse *XParse
- _pParse = (*XParse)(_yypParser.X1)
+ _pParse = (*XParse)(_yypParser.XpParse)
switch int32(_yymajor) {
- case i32(163):
+ case int32(163):
goto _1
- case i32(172):
+ case int32(172):
goto _5
- case i32(173):
+ case int32(173):
goto _5
- case i32(177):
+ case int32(177):
goto _7
- case i32(186):
+ case int32(186):
goto _7
- case i32(187):
+ case int32(187):
goto _7
- case i32(193):
+ case int32(193):
goto _19
- case i32(194):
+ case int32(194):
goto _1
- case i32(195):
+ case int32(195):
goto _1
- case i32(196):
+ case int32(196):
goto _23
- case i32(199):
+ case int32(199):
goto _7
- case i32(200):
+ case int32(200):
goto _19
- case i32(201):
+ case int32(201):
goto _25
- case i32(202):
+ case int32(202):
goto _7
- case i32(203):
+ case int32(203):
goto _25
- case i32(204):
+ case int32(204):
goto _7
- case i32(206):
+ case int32(206):
goto _1
- case i32(207):
+ case int32(207):
goto _7
- case i32(208):
+ case int32(208):
goto _7
- case i32(209):
+ case int32(209):
goto _7
- case i32(211):
+ case int32(211):
goto _19
- case i32(212):
+ case int32(212):
goto _19
- case i32(215):
+ case int32(215):
goto _25
- case i32(216):
+ case int32(216):
goto _32
- case i32(217):
+ case int32(217):
goto _32
- case i32(218):
+ case int32(218):
goto _7
- case i32(220):
+ case int32(220):
goto _32
- case i32(224):
+ case int32(224):
goto _7
- case i32(225):
+ case int32(225):
goto _25
- case i32(226):
+ case int32(226):
goto _7
- case i32(227):
+ case int32(227):
goto _25
- case i32(232):
+ case int32(232):
goto _35
- case i32(234):
+ case int32(234):
goto _37
- case i32(236):
+ case int32(236):
goto _25
- case i32(237):
+ case int32(237):
goto _35
- case i32(241):
+ case int32(241):
goto _25
- case i32(250):
+ case int32(250):
goto _23
default:
goto _38
}
_1:
- _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.X0), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
+ _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
goto _39
_5:
- _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExpr)((*XExprSpan)(unsafe.Pointer(_yypminor)).X0))
+ _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExpr)((*XExprSpan)(unsafe.Pointer(_yypminor)).XpExpr))
goto _39
_7:
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
goto _39
_19:
- _sqlite3SrcListDelete(tls, (*Xsqlite3)(_pParse.X0), (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
+ _sqlite3SrcListDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
goto _39
_23:
- _sqlite3WithDelete(tls, (*Xsqlite3)(_pParse.X0), (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
+ _sqlite3WithDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
goto _39
_25:
- _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
+ _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
goto _39
_32:
- _sqlite3IdListDelete(tls, (*Xsqlite3)(_pParse.X0), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
+ _sqlite3IdListDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
goto _39
_35:
- _sqlite3DeleteTriggerStep(tls, (*Xsqlite3)(_pParse.X0), (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
+ _sqlite3DeleteTriggerStep(tls, (*Xsqlite3)(_pParse.Xdb), (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(_yypminor))))
goto _39
_37:
- _sqlite3IdListDelete(tls, (*Xsqlite3)(_pParse.X0), (*XIdList)((*T_ht)(unsafe.Pointer(_yypminor)).X1))
+ _sqlite3IdListDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XIdList)((*t51)(unsafe.Pointer(_yypminor)).Xb))
goto _39
_38:
goto _39
@@ -25564,17 +26208,20 @@ func _yyTraceShift(tls *crt.TLS, _yypParser *XyyParser, _yyNewState int32) {
if _yyTraceFILE == nil {
goto _0
}
- if _yyNewState < i32(456) {
- crt.Xfprintf(tls, _yyTraceFILE, str(27151), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyTokenName)) + 4*uintptr((*XyyStackEntry)(_yypParser.X0).X1)))), _yyNewState)
+ if _yyNewState < int32(456) {
+ crt.Xfprintf(tls, _yyTraceFILE, str(27106), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyTokenName)), uintptr((*XyyStackEntry)(_yypParser.Xyytos).Xmajor))), _yyNewState)
goto _2
}
- crt.Xfprintf(tls, _yyTraceFILE, str(27181), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyTokenName)) + 4*uintptr((*XyyStackEntry)(_yypParser.X0).X1)))))
+ crt.Xfprintf(tls, _yyTraceFILE, str(27136), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyTokenName)), uintptr((*XyyStackEntry)(_yypParser.Xyytos).Xmajor))))
_2:
_0:
}
-// Perform a reduce action and the shift that must immediately
-// follow the reduce.
+// C comment
+// /*
+// ** Perform a reduce action and the shift that must immediately
+// ** follow the reduce.
+// */
func _yy_reduce(tls *crt.TLS, _yypParser *XyyParser, _yyruleno uint32) {
var _yygoto, _yyact, _yysize, _81_i, _163_bNot, _164_bNot int32
var _147_n uint32
@@ -25590,592 +26237,592 @@ func _yy_reduce(tls *crt.TLS, _yypParser *XyyParser, _yyruleno uint32) {
var _70_dest XSelectDest
var _4_yylhsminor XYYMINORTYPE
var _yymsp *XyyStackEntry
- _pParse = (*XParse)(_yypParser.X1)
- _yymsp = (*XyyStackEntry)(_yypParser.X0)
- if (_yyTraceFILE != nil) && (_yyruleno < uint32(i32(332))) {
- _yysize = int32((*t35)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyRuleInfo)) + 2*uintptr(_yyruleno))).X1)
- crt.Xfprintf(tls, _yyTraceFILE, str(27195), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyRuleName)) + 4*uintptr(_yyruleno)))), int32((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(-_yysize))).X0))
+ _pParse = (*XParse)(_yypParser.XpParse)
+ _yymsp = (*XyyStackEntry)(_yypParser.Xyytos)
+ if (_yyTraceFILE != nil) && (_yyruleno < uint32(332)) {
+ _yysize = int32(elem52((*t53)(unsafe.Pointer(&_yyRuleInfo)), uintptr(_yyruleno)).Xnrhs)
+ crt.Xfprintf(tls, _yyTraceFILE, str(27150), unsafe.Pointer(_yyTracePrompt), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_yyRuleName)), uintptr(_yyruleno))), int32(elem49(_yymsp, uintptr(-_yysize)).Xstateno))
}
- if int32((*t35)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyRuleInfo))+2*uintptr(_yyruleno))).X1) != i32(0) {
+ if int32(elem52((*t53)(unsafe.Pointer(&_yyRuleInfo)), uintptr(_yyruleno)).Xnrhs) != int32(0) {
goto _2
}
- if uintptr(unsafe.Pointer((*XyyStackEntry)(_yypParser.X0))) >= uintptr(unsafe.Pointer((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[100]XyyStackEntry)(unsafe.Pointer(&(_yypParser.X2)))))+16*uintptr(i32(99)))))) {
+ if crt.P2U(_yypParser.Xyytos) >= crt.P2U(unsafe.Pointer(elem49((*XyyStackEntry)(unsafe.Pointer(&_yypParser.Xyystack)), uintptr(99)))) {
_yyStackOverflow(tls, _yypParser)
return
}
_2:
switch _yyruleno {
- case u32(0):
+ case uint32(0):
goto _5
- case u32(1):
+ case uint32(1):
goto _6
- case u32(2):
+ case uint32(2):
goto _7
- case u32(3):
+ case uint32(3):
goto _8
- case u32(4):
+ case uint32(4):
goto _9
- case u32(5):
+ case uint32(5):
goto _10
- case u32(6):
+ case uint32(6):
goto _10
- case u32(7):
+ case uint32(7):
goto _10
- case u32(8):
+ case uint32(8):
goto _13
- case u32(9):
+ case uint32(9):
goto _13
- case u32(10):
+ case uint32(10):
goto _15
- case u32(11):
+ case uint32(11):
goto _16
- case u32(12):
+ case uint32(12):
goto _17
- case u32(13):
+ case uint32(13):
goto _18
- case u32(14):
+ case uint32(14):
goto _19
- case u32(15):
+ case uint32(15):
goto _20
- case u32(16):
+ case uint32(16):
goto _21
- case u32(17):
+ case uint32(17):
goto _30
- case u32(18):
+ case uint32(18):
goto _31
- case u32(19):
+ case uint32(19):
goto _21
- case u32(20):
+ case uint32(20):
goto _33
- case u32(21):
+ case uint32(21):
goto _34
- case u32(22):
+ case uint32(22):
goto _21
- case u32(23):
+ case uint32(23):
goto _35
- case u32(24):
+ case uint32(24):
goto _36
- case u32(25):
+ case uint32(25):
goto _37
- case u32(26):
+ case uint32(26):
goto _40
- case u32(27):
+ case uint32(27):
goto _41
- case u32(28):
+ case uint32(28):
goto _42
- case u32(29):
+ case uint32(29):
goto _43
- case u32(30):
+ case uint32(30):
goto _45
- case u32(31):
+ case uint32(31):
goto _47
- case u32(32):
+ case uint32(32):
goto _45
- case u32(33):
+ case uint32(33):
goto _48
- case u32(34):
+ case uint32(34):
goto _49
- case u32(35):
+ case uint32(35):
goto _50
- case u32(36):
+ case uint32(36):
goto _51
- case u32(37):
+ case uint32(37):
goto _52
- case u32(38):
+ case uint32(38):
goto _53
- case u32(39):
+ case uint32(39):
goto _54
- case u32(40):
+ case uint32(40):
goto _55
- case u32(41):
+ case uint32(41):
goto _56
- case u32(42):
+ case uint32(42):
goto _21
- case u32(43):
+ case uint32(43):
goto _31
- case u32(44):
+ case uint32(44):
goto _57
- case u32(45):
+ case uint32(45):
goto _58
- case u32(46):
+ case uint32(46):
goto _59
- case u32(47):
+ case uint32(47):
goto _60
- case u32(48):
+ case uint32(48):
goto _61
- case u32(49):
+ case uint32(49):
goto _62
- case u32(50):
+ case uint32(50):
goto _63
- case u32(51):
+ case uint32(51):
goto _64
- case u32(52):
+ case uint32(52):
goto _65
- case u32(53):
+ case uint32(53):
goto _66
- case u32(54):
+ case uint32(54):
goto _67
- case u32(55):
+ case uint32(55):
goto _68
- case u32(56):
+ case uint32(56):
goto _69
- case u32(57):
+ case uint32(57):
goto _21
- case u32(58):
+ case uint32(58):
goto _72
- case u32(59):
+ case uint32(59):
goto _77
- case u32(60):
+ case uint32(60):
goto _37
- case u32(61):
+ case uint32(61):
goto _78
- case u32(62):
+ case uint32(62):
goto _43
- case u32(63):
+ case uint32(63):
goto _79
- case u32(64):
+ case uint32(64):
goto _80
- case u32(65):
+ case uint32(65):
goto _81
- case u32(66):
+ case uint32(66):
goto _82
- case u32(67):
+ case uint32(67):
goto _21
- case u32(68):
+ case uint32(68):
goto _83
- case u32(69):
+ case uint32(69):
goto _85
- case u32(70):
+ case uint32(70):
goto _83
- case u32(71):
+ case uint32(71):
goto _69
- case u32(72):
+ case uint32(72):
goto _86
- case u32(73):
+ case uint32(73):
goto _87
- case u32(74):
+ case uint32(74):
goto _89
- case u32(75):
+ case uint32(75):
goto _72
- case u32(76):
+ case uint32(76):
goto _21
- case u32(77):
+ case uint32(77):
goto _90
- case u32(78):
+ case uint32(78):
goto _91
- case u32(79):
+ case uint32(79):
goto _92
- case u32(80):
+ case uint32(80):
goto _93
- case u32(81):
+ case uint32(81):
goto _94
- case u32(82):
+ case uint32(82):
goto _95
- case u32(83):
+ case uint32(83):
goto _97
- case u32(84):
+ case uint32(84):
goto _95
- case u32(85):
+ case uint32(85):
goto _98
- case u32(86):
+ case uint32(86):
goto _99
- case u32(87):
+ case uint32(87):
goto _100
- case u32(88):
+ case uint32(88):
goto _101
- case u32(89):
+ case uint32(89):
goto _102
- case u32(90):
+ case uint32(90):
goto _21
- case u32(91):
+ case uint32(91):
goto _103
- case u32(92):
+ case uint32(92):
goto _109
- case u32(93):
+ case uint32(93):
goto _110
- case u32(94):
+ case uint32(94):
goto _111
- case u32(95):
+ case uint32(95):
goto _112
- case u32(96):
+ case uint32(96):
goto _37
- case u32(97):
+ case uint32(97):
goto _116
- case u32(98):
+ case uint32(98):
goto _117
- case u32(99):
+ case uint32(99):
goto _118
- case u32(100):
+ case uint32(100):
goto _119
- case u32(101):
+ case uint32(101):
goto _120
- case u32(102):
+ case uint32(102):
goto _121
- case u32(103):
+ case uint32(103):
goto _122
- case u32(104):
+ case uint32(104):
goto _123
- case u32(105):
+ case uint32(105):
goto _124
- case u32(106):
+ case uint32(106):
goto _112
- case u32(107):
+ case uint32(107):
goto _126
- case u32(108):
+ case uint32(108):
goto _127
- case u32(109):
+ case uint32(109):
goto _128
- case u32(110):
+ case uint32(110):
goto _129
- case u32(111):
+ case uint32(111):
goto _130
- case u32(112):
+ case uint32(112):
goto _131
- case u32(113):
+ case uint32(113):
goto _135
- case u32(114):
+ case uint32(114):
goto _124
- case u32(115):
+ case uint32(115):
goto _140
- case u32(116):
+ case uint32(116):
goto _141
- case u32(117):
+ case uint32(117):
goto _142
- case u32(118):
+ case uint32(118):
goto _143
- case u32(119):
+ case uint32(119):
goto _103
- case u32(120):
+ case uint32(120):
goto _145
- case u32(121):
+ case uint32(121):
goto _147
- case u32(122):
+ case uint32(122):
goto _148
- case u32(123):
+ case uint32(123):
goto _149
- case u32(124):
+ case uint32(124):
goto _150
- case u32(125):
+ case uint32(125):
goto _151
- case u32(126):
+ case uint32(126):
goto _103
- case u32(127):
+ case uint32(127):
goto _145
- case u32(128):
+ case uint32(128):
goto _135
- case u32(129):
+ case uint32(129):
goto _131
- case u32(130):
+ case uint32(130):
goto _152
- case u32(131):
+ case uint32(131):
goto _153
- case u32(132):
+ case uint32(132):
goto _154
- case u32(133):
+ case uint32(133):
goto _155
- case u32(134):
+ case uint32(134):
goto _156
- case u32(135):
+ case uint32(135):
goto _135
- case u32(136):
+ case uint32(136):
goto _131
- case u32(137):
+ case uint32(137):
goto _157
- case u32(138):
+ case uint32(138):
goto _158
- case u32(139):
+ case uint32(139):
goto _159
- case u32(140):
+ case uint32(140):
goto _160
- case u32(141):
+ case uint32(141):
goto _161
- case u32(142):
+ case uint32(142):
goto _162
- case u32(143):
+ case uint32(143):
goto _163
- case u32(144):
+ case uint32(144):
goto _69
- case u32(145):
+ case uint32(145):
goto _87
- case u32(146):
+ case uint32(146):
goto _143
- case u32(147):
+ case uint32(147):
goto _164
- case u32(148):
+ case uint32(148):
goto _165
- case u32(149):
+ case uint32(149):
goto _166
- case u32(150):
+ case uint32(150):
goto _167
- case u32(151):
+ case uint32(151):
goto _168
- case u32(152):
+ case uint32(152):
goto _171
- case u32(153):
+ case uint32(153):
goto _171
- case u32(154):
+ case uint32(154):
goto _173
- case u32(155):
+ case uint32(155):
goto _174
- case u32(156):
+ case uint32(156):
goto _168
- case u32(157):
+ case uint32(157):
goto _168
- case u32(158):
+ case uint32(158):
goto _175
- case u32(159):
+ case uint32(159):
goto _176
- case u32(160):
+ case uint32(160):
goto _177
- case u32(161):
+ case uint32(161):
goto _178
- case u32(162):
+ case uint32(162):
goto _179
- case u32(163):
+ case uint32(163):
goto _180
- case u32(164):
+ case uint32(164):
goto _181
- case u32(165):
+ case uint32(165):
goto _182
- case u32(166):
+ case uint32(166):
goto _183
- case u32(167):
+ case uint32(167):
goto _183
- case u32(168):
+ case uint32(168):
goto _183
- case u32(169):
+ case uint32(169):
goto _183
- case u32(170):
+ case uint32(170):
goto _183
- case u32(171):
+ case uint32(171):
goto _183
- case u32(172):
+ case uint32(172):
goto _183
- case u32(173):
+ case uint32(173):
goto _183
- case u32(174):
+ case uint32(174):
goto _191
- case u32(175):
+ case uint32(175):
goto _192
- case u32(176):
+ case uint32(176):
goto _193
- case u32(177):
+ case uint32(177):
goto _194
- case u32(178):
+ case uint32(178):
goto _195
- case u32(179):
+ case uint32(179):
goto _196
- case u32(180):
+ case uint32(180):
goto _197
- case u32(181):
+ case uint32(181):
goto _198
- case u32(182):
+ case uint32(182):
goto _198
- case u32(183):
+ case uint32(183):
goto _200
- case u32(184):
+ case uint32(184):
goto _201
- case u32(185):
+ case uint32(185):
goto _202
- case u32(186):
+ case uint32(186):
goto _72
- case u32(187):
+ case uint32(187):
goto _204
- case u32(188):
+ case uint32(188):
goto _202
- case u32(189):
+ case uint32(189):
goto _72
- case u32(190):
+ case uint32(190):
goto _205
- case u32(191):
+ case uint32(191):
goto _206
- case u32(192):
+ case uint32(192):
goto _207
- case u32(193):
+ case uint32(193):
goto _208
- case u32(194):
+ case uint32(194):
goto _209
- case u32(195):
+ case uint32(195):
goto _210
- case u32(196):
+ case uint32(196):
goto _211
- case u32(197):
+ case uint32(197):
goto _212
- case u32(198):
+ case uint32(198):
goto _131
- case u32(199):
+ case uint32(199):
goto _135
- case u32(200):
+ case uint32(200):
goto _213
- case u32(201):
+ case uint32(201):
goto _135
- case u32(202):
+ case uint32(202):
goto _103
- case u32(203):
+ case uint32(203):
goto _214
- case u32(204):
+ case uint32(204):
goto _215
- case u32(205):
+ case uint32(205):
goto _103
- case u32(206):
+ case uint32(206):
goto _216
- case u32(207):
+ case uint32(207):
goto _218
- case u32(208):
+ case uint32(208):
goto _219
- case u32(209):
+ case uint32(209):
goto _221
- case u32(210):
+ case uint32(210):
goto _103
- case u32(211):
+ case uint32(211):
goto _216
- case u32(212):
+ case uint32(212):
goto _222
- case u32(213):
+ case uint32(213):
goto _223
- case u32(214):
+ case uint32(214):
goto _21
- case u32(215):
+ case uint32(215):
goto _72
- case u32(216):
+ case uint32(216):
goto _224
- case u32(217):
+ case uint32(217):
goto _225
- case u32(218):
+ case uint32(218):
goto _226
- case u32(219):
+ case uint32(219):
goto _227
- case u32(220):
+ case uint32(220):
goto _228
- case u32(221):
+ case uint32(221):
goto _229
- case u32(222):
+ case uint32(222):
goto _230
- case u32(223):
+ case uint32(223):
goto _231
- case u32(224):
+ case uint32(224):
goto _112
- case u32(225):
+ case uint32(225):
goto _112
- case u32(226):
+ case uint32(226):
goto _232
- case u32(227):
+ case uint32(227):
goto _233
- case u32(228):
+ case uint32(228):
goto _234
- case u32(229):
+ case uint32(229):
goto _235
- case u32(230):
+ case uint32(230):
goto _236
- case u32(231):
+ case uint32(231):
goto _237
- case u32(232):
+ case uint32(232):
goto _238
- case u32(233):
+ case uint32(233):
goto _238
- case u32(234):
+ case uint32(234):
goto _240
- case u32(235):
+ case uint32(235):
goto _241
- case u32(236):
+ case uint32(236):
goto _243
- case u32(237):
+ case uint32(237):
goto _245
- case u32(238):
+ case uint32(238):
goto _246
- case u32(239):
+ case uint32(239):
goto _247
- case u32(240):
+ case uint32(240):
goto _248
- case u32(241):
+ case uint32(241):
goto _249
- case u32(242):
+ case uint32(242):
goto _250
- case u32(243):
+ case uint32(243):
goto _251
- case u32(244):
+ case uint32(244):
goto _252
- case u32(245):
+ case uint32(245):
goto _253
- case u32(246):
+ case uint32(246):
goto _254
- case u32(247):
+ case uint32(247):
goto _255
- case u32(248):
+ case uint32(248):
goto _256
- case u32(249):
+ case uint32(249):
goto _219
- case u32(250):
+ case uint32(250):
goto _257
- case u32(251):
+ case uint32(251):
goto _258
- case u32(252):
+ case uint32(252):
goto _259
- case u32(253):
+ case uint32(253):
goto _260
- case u32(254):
+ case uint32(254):
goto _241
- case u32(255):
+ case uint32(255):
goto _243
- case u32(256):
+ case uint32(256):
goto _261
- case u32(257):
+ case uint32(257):
goto _262
- case u32(258):
+ case uint32(258):
goto _263
- case u32(259):
+ case uint32(259):
goto _264
- case u32(260):
+ case uint32(260):
goto _265
- case u32(261):
+ case uint32(261):
goto _266
- case u32(262):
+ case uint32(262):
goto _267
- case u32(263):
+ case uint32(263):
goto _268
- case u32(264):
+ case uint32(264):
goto _269
- case u32(265):
+ case uint32(265):
goto _270
- case u32(266):
+ case uint32(266):
goto _271
- case u32(267):
+ case uint32(267):
goto _272
- case u32(268):
+ case uint32(268):
goto _272
- case u32(269):
+ case uint32(269):
goto _272
- case u32(270):
+ case uint32(270):
goto _275
- case u32(271):
+ case uint32(271):
goto _276
- case u32(272):
+ case uint32(272):
goto _277
- case u32(273):
+ case uint32(273):
goto _278
- case u32(274):
+ case uint32(274):
goto _279
default:
goto _280
}
_5:
- *(*uint8)(unsafe.Pointer(&(_pParse.X54))) = uint8(i32(1))
+ _pParse.Xexplain = uint8(1)
goto _281
_6:
- *(*uint8)(unsafe.Pointer(&(_pParse.X54))) = uint8(i32(2))
+ _pParse.Xexplain = uint8(2)
goto _281
_7:
_sqlite3FinishCoding(tls, _pParse)
goto _281
_8:
- _sqlite3BeginTransaction(tls, _pParse, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _sqlite3BeginTransaction(tls, _pParse, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_9:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))) = i32(7)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))) = int32(7)
goto _281
_10:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = int32((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(elem49(_yymsp, 0).Xmajor)
goto _281
_13:
_sqlite3CommitTransaction(tls, _pParse)
@@ -26184,1201 +26831,1133 @@ _15:
_sqlite3RollbackTransaction(tls, _pParse)
goto _281
_16:
- _sqlite3Savepoint(tls, _pParse, i32(0), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3Savepoint(tls, _pParse, int32(0), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_17:
- _sqlite3Savepoint(tls, _pParse, i32(1), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3Savepoint(tls, _pParse, int32(1), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_18:
- _sqlite3Savepoint(tls, _pParse, i32(2), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3Savepoint(tls, _pParse, int32(2), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_19:
- _sqlite3StartTable(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), i32(0), i32(0), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))
+ _sqlite3StartTable(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), int32(0), int32(0), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))
goto _281
_20:
_disableLookaside(tls, _pParse)
goto _281
_21:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))) = i32(0)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))) = int32(0)
goto _281
_30:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))) = i32(1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))) = int32(1)
goto _281
_31:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(1)
goto _281
_33:
- _sqlite3EndTable(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), uint8(*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), nil)
+ _sqlite3EndTable(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), uint8(*(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), nil)
goto _281
_34:
- _sqlite3EndTable(tls, _pParse, nil, nil, uint8(i32(0)), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
- _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.X0), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ _sqlite3EndTable(tls, _pParse, nil, nil, 0, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
+ _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
goto _281
_35:
- if (((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1) == uint32(i32(5))) && (Xsqlite3_strnicmp(tls, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X0, str(27227), i32(5)) == i32(0)) {
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = i32(96)
+ if (((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn) == uint32(5)) && (Xsqlite3_strnicmp(tls, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz, str(27182), int32(5)) == int32(0)) {
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = int32(96)
goto _284
}
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = i32(0)
- _sqlite3ErrorMsg(tls, _pParse, str(27233), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1, unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = int32(0)
+ _sqlite3ErrorMsg(tls, _pParse, str(27188), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn, unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz))
_284:
goto _281
_36:
- _sqlite3AddColumn(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3AddColumn(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_37:
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))).X1))) = uint32(i32(0))
- *(**int8)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))).X0))) = nil
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))).Xn = 0
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))).Xz = nil
goto _281
_40:
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X1))) = uint32(int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X0))+1*uintptr((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X1))))) - uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0))) / 1))
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).Xn = uint32(int32(uintptr(unsafe.Pointer(elem1((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz, uintptr((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn)))) - uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).Xz))))
goto _281
_41:
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))).X1))) = uint32(int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X0))+1*uintptr((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X1))))) - uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))).X0))) / 1))
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))).Xn = uint32(int32(uintptr(unsafe.Pointer(elem1((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz, uintptr((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn)))) - uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))).Xz))))
goto _281
_42:
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X1))) = ((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1) + uint32(int32((uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X0))-uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(-1)))).X2))))).X0)))/1))
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xn = ((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn) + uint32(int32(uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz))-uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xz))))
goto _281
_43:
- *(*XToken)(unsafe.Pointer(&(_pParse.X28))) = *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))
+ _pParse.XconstraintName = *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))
goto _281
_45:
- _sqlite3AddDefaultValue(tls, _pParse, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3AddDefaultValue(tls, _pParse, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_47:
- _sqlite3AddDefaultValue(tls, _pParse, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _sqlite3AddDefaultValue(tls, _pParse, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_48:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_34_v.X0))))) = _sqlite3PExpr(tls, _pParse, i32(155), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0), nil)
- *(**int8)(unsafe.Pointer(&(_34_v.X1))) = (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0
- *(**int8)(unsafe.Pointer(&(_34_v.X2))) = (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X2
+ *(**XExpr)(unsafe.Pointer(&_34_v.XpExpr)) = _sqlite3PExpr(tls, _pParse, int32(155), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr), nil)
+ _34_v.XzStart = (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xz
+ _34_v.XzEnd = (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XzEnd
_sqlite3AddDefaultValue(tls, _pParse, &_34_v)
goto _281
_49:
- _spanExpr(tls, &_35_v, _pParse, i32(97), *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _spanExpr(tls, &_35_v, _pParse, int32(97), *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
_sqlite3AddDefaultValue(tls, _pParse, &_35_v)
goto _281
_50:
- _sqlite3AddNotNull(tls, _pParse, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3AddNotNull(tls, _pParse, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_51:
- _sqlite3AddPrimaryKey(tls, _pParse, nil, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))
+ _sqlite3AddPrimaryKey(tls, _pParse, nil, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))
goto _281
_52:
- _sqlite3CreateIndex(tls, _pParse, nil, nil, nil, nil, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), nil, nil, i32(0), i32(0), uint8(i32(1)))
+ _sqlite3CreateIndex(tls, _pParse, nil, nil, nil, nil, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), nil, nil, int32(0), int32(0), uint8(1))
goto _281
_53:
- _sqlite3AddCheckConstraint(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0))
+ _sqlite3AddCheckConstraint(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).XpExpr))
goto _281
_54:
- _sqlite3CreateForeignKey(tls, _pParse, nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3CreateForeignKey(tls, _pParse, nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_55:
- _sqlite3DeferForeignKey(tls, _pParse, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3DeferForeignKey(tls, _pParse, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_56:
- _sqlite3AddCollateType(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3AddCollateType(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_57:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))) = i32(0)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))) = int32(0)
goto _281
_58:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = ((*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))) & (^((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1))) | ((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = ((*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))) & (^((*t54)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xmask))) | ((*t54)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xvalue)
goto _281
_59:
- *(*int32)(unsafe.Pointer(&((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0))) = i32(0)
- *(*int32)(unsafe.Pointer(&((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X1))) = i32(0)
+ (*t54)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xvalue = int32(0)
+ (*t54)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xmask = int32(0)
goto _281
_60:
- *(*int32)(unsafe.Pointer(&((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))) = i32(0)
- *(*int32)(unsafe.Pointer(&((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X1))) = i32(0)
+ (*t54)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xvalue = int32(0)
+ (*t54)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xmask = int32(0)
goto _281
_61:
- *(*int32)(unsafe.Pointer(&((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))) = *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))
- *(*int32)(unsafe.Pointer(&((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X1))) = i32(255)
+ (*t54)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xvalue = *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))
+ (*t54)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xmask = int32(255)
goto _281
_62:
- *(*int32)(unsafe.Pointer(&((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))) = (*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))) << uint(i32(8))
- *(*int32)(unsafe.Pointer(&((*crt.Xstruct_timeval)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X1))) = i32(65280)
+ (*t54)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xvalue = (*(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))) << 8
+ (*t54)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xmask = int32(65280)
goto _281
_63:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = i32(7)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = int32(7)
goto _281
_64:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = i32(8)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = int32(8)
goto _281
_65:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(9)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(9)
goto _281
_66:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(6)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(6)
goto _281
_67:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = i32(0)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = int32(0)
goto _281
_68:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))) = i32(0)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))) = int32(0)
goto _281
_69:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))
goto _281
_72:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = i32(1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = int32(1)
goto _281
_77:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = i32(0)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = int32(0)
goto _281
_78:
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer(&(_pParse.X28))).X1))) = uint32(i32(0))
+ _pParse.XconstraintName.Xn = 0
goto _281
_79:
- _sqlite3AddPrimaryKey(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), i32(0))
+ _sqlite3AddPrimaryKey(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), int32(0))
goto _281
_80:
- _sqlite3CreateIndex(tls, _pParse, nil, nil, nil, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), nil, nil, i32(0), i32(0), uint8(i32(1)))
+ _sqlite3CreateIndex(tls, _pParse, nil, nil, nil, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), nil, nil, int32(0), int32(0), uint8(1))
goto _281
_81:
- _sqlite3AddCheckConstraint(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))
+ _sqlite3AddCheckConstraint(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))
goto _281
_82:
- _sqlite3CreateForeignKey(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
- _sqlite3DeferForeignKey(tls, _pParse, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3CreateForeignKey(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
+ _sqlite3DeferForeignKey(tls, _pParse, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_83:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))) = i32(10)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))) = int32(10)
goto _281
_85:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))) = *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))) = *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))
goto _281
_86:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(4)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(4)
goto _281
_87:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(5)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(5)
goto _281
_89:
- _sqlite3DropTable(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), i32(0), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _sqlite3DropTable(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), int32(0), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_90:
- _sqlite3CreateView(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-7)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))))
+ _sqlite3CreateView(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967289)).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))))
goto _281
_91:
- _sqlite3DropTable(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), i32(1), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _sqlite3DropTable(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), int32(1), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_92:
- _70_dest = XSelectDest{X0: u8(9), X1: nil, X2: i32(0), X3: i32(0), X4: i32(0), X5: nil}
- _sqlite3Select(tls, _pParse, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), &_70_dest)
- _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.X0), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ _70_dest = XSelectDest{XeDest: uint8(9)}
+ _sqlite3Select(tls, _pParse, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), &_70_dest)
+ _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
goto _281
_93:
- _71_p = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _71_p = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
if _71_p != nil {
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_71_p.X17))))) = (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ *(**XWith)(unsafe.Pointer(&_71_p.XpWith)) = (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
_parserDoubleLinkSelect(tls, _pParse, _71_p)
goto _286
}
- _sqlite3WithDelete(tls, (*Xsqlite3)(_pParse.X0), (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ _sqlite3WithDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
_286:
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))) = _71_p
+ *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))) = _71_p
goto _281
_94:
- _74_pRhs = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- _74_pLhs = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))
- if (_74_pRhs != nil) && ((*XSelect)(_74_pRhs.X13) != nil) {
- *(*uint32)(unsafe.Pointer(&(_75_x.X1))) = uint32(i32(0))
+ _74_pRhs = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ _74_pLhs = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))
+ if (_74_pRhs != nil) && (_74_pRhs.XpPrior != nil) {
+ _75_x.Xn = 0
_parserDoubleLinkSelect(tls, _pParse, _74_pRhs)
_75_pFrom = _sqlite3SrcListAppendFromTerm(tls, _pParse, nil, nil, nil, &_75_x, _74_pRhs, nil, nil)
- _74_pRhs = _sqlite3SelectNew(tls, _pParse, nil, _75_pFrom, nil, nil, nil, nil, uint32(i32(0)), nil, nil)
+ _74_pRhs = _sqlite3SelectNew(tls, _pParse, nil, _75_pFrom, nil, nil, nil, nil, 0, nil, nil)
}
if _74_pRhs == nil {
goto _289
}
- *(*uint8)(unsafe.Pointer(&(_74_pRhs.X1))) = uint8(*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_74_pRhs.X13))))) = _74_pLhs
+ _74_pRhs.Xop = uint8(*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
+ *(**XSelect)(unsafe.Pointer(&_74_pRhs.XpPrior)) = _74_pLhs
if func() int32 {
if _74_pLhs != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137979), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137979), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&(_74_pLhs.X3)))
- *p = (*p) & uint32(i32(-1025))
- sink5(*p)
- }
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_74_pRhs.X3)))
- *p = (*p) & uint32(i32(-1025))
- sink5(*p)
+ _74_pLhs.XselFlags &= uint32(4294966271)
}
- if (*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))) != i32(116) {
- *(*uint8)(unsafe.Pointer(&(_pParse.X10))) = uint8(i32(1))
+ _74_pRhs.XselFlags &= uint32(4294966271)
+ if (*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))) != int32(116) {
+ _pParse.XhasCompound = uint8(1)
}
goto _294
_289:
- _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.X0), _74_pLhs)
+ _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.Xdb), _74_pLhs)
_294:
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = _74_pRhs
+ *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = _74_pRhs
goto _281
_95:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = int32((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(elem49(_yymsp, 0).Xmajor)
goto _281
_97:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = i32(116)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = int32(116)
goto _281
_98:
- _80_s = *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2)))))
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2))))))) = _sqlite3SelectNew(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))), (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2)))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), uint32(*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-7)))).X2)))))), (*XExpr)((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0), (*XExpr)((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1))
- if (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2)))))) == nil {
+ _80_s = *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor)))
+ *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor))))) = _sqlite3SelectNew(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))), (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor)))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), uint32(*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967289)).Xminor)))), (*XExpr)((*t55)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpLimit), (*XExpr)((*t55)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpOffset))
+ if (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor)))) == nil {
goto _295
}
- _81_z = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_80_s.X0)) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(6))))))))
- Xsqlite3_snprintf(tls, int32(u32(12)), (*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2)))))).X6))))), str(27260), preInc1((*int32)(unsafe.Pointer(&(_pParse.X34))), 1))
+ _81_z = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_80_s.Xz)) + uintptr(int32(6))))
+ Xsqlite3_snprintf(tls, int32(12), (*int8)(unsafe.Pointer(&((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor)))).XzSelName))), str(27215), preInc2(&_pParse.XnSelect, 1))
_296:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_81_z)) + 1*uintptr(i32(0))))) == i32(32) {
+ if int32(*elem1(_81_z, 0)) == int32(32) {
*(*uintptr)(unsafe.Pointer(&_81_z)) += uintptr(1)
goto _296
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_81_z)) + 1*uintptr(i32(0))))) != i32(47) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_81_z)) + 1*uintptr(i32(1))))) != i32(42) {
+ if int32(*elem1(_81_z, 0)) != int32(47) || int32(*elem1(_81_z, uintptr(1))) != int32(42) {
goto _299
}
- {
- p := &_81_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(2))))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_81_z)) += uintptr(int32(2))
_300:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_81_z)) + 1*uintptr(i32(0))))) == i32(32) {
+ if int32(*elem1(_81_z, 0)) == int32(32) {
*(*uintptr)(unsafe.Pointer(&_81_z)) += uintptr(1)
goto _300
}
- _81_i = i32(0)
+ _81_i = int32(0)
_302:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_81_z)) + 1*uintptr(_81_i)))))))) & i32(6)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_81_z, uintptr(_81_i)))))) & int32(6)) == 0 {
goto _305
}
_81_i += 1
goto _302
_305:
- Xsqlite3_snprintf(tls, int32(u32(12)), (*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2)))))).X6))))), str(27264), _81_i, unsafe.Pointer(_81_z))
+ Xsqlite3_snprintf(tls, int32(12), (*int8)(unsafe.Pointer(&((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor)))).XzSelName))), str(27219), _81_i, unsafe.Pointer(_81_z))
_299:
_295:
goto _281
_99:
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))) = _sqlite3SelectNew(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), nil, nil, nil, nil, nil, uint32(i32(512)), nil, nil)
+ *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))) = _sqlite3SelectNew(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), nil, nil, nil, nil, nil, uint32(512), nil, nil)
goto _281
_100:
- _85_pLeft = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
- _85_pRight = _sqlite3SelectNew(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), nil, nil, nil, nil, nil, uint32(i32(1536)), nil, nil)
+ _85_pLeft = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
+ _85_pRight = _sqlite3SelectNew(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), nil, nil, nil, nil, nil, uint32(1536), nil, nil)
if func() int32 {
if _85_pLeft != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138036), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138036), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&(_85_pLeft.X3)))
- *p = (*p) & uint32(i32(-1025))
- sink5(*p)
- }
+ _85_pLeft.XselFlags &= uint32(4294966271)
}
if _85_pRight != nil {
- *(*uint8)(unsafe.Pointer(&(_85_pRight.X1))) = uint8(i32(116))
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_85_pRight.X13))))) = _85_pLeft
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))) = _85_pRight
+ _85_pRight.Xop = uint8(116)
+ *(**XSelect)(unsafe.Pointer(&_85_pRight.XpPrior)) = _85_pLeft
+ *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))) = _85_pRight
goto _310
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))) = _85_pLeft
+ *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))) = _85_pLeft
_310:
goto _281
_101:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(1)
goto _281
_102:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(2)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(2)
goto _281
_103:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))))) = nil
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))))) = nil
goto _281
_109:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0))
- if ((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1) > uint32(i32(0)) {
- _sqlite3ExprListSetName(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), i32(1))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).XpExpr))
+ if ((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn) > (0) {
+ _sqlite3ExprListSetName(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), int32(1))
}
- _sqlite3ExprListSetSpan(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _sqlite3ExprListSetSpan(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_110:
- _92_p = _sqlite3Expr(tls, (*Xsqlite3)(_pParse.X0), i32(161), nil)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), _92_p)
+ _92_p = _sqlite3Expr(tls, (*Xsqlite3)(_pParse.Xdb), int32(161), nil)
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), _92_p)
goto _281
_111:
- _93_pRight = _sqlite3PExpr(tls, _pParse, i32(161), nil, nil)
- _93_pLeft = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(27), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), i32(1))
- _93_pDot = _sqlite3PExpr(tls, _pParse, i32(122), _93_pLeft, _93_pRight)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), _93_pDot)
+ _93_pRight = _sqlite3PExpr(tls, _pParse, int32(161), nil, nil)
+ _93_pLeft = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(27), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), int32(1))
+ _93_pDot = _sqlite3PExpr(tls, _pParse, int32(122), _93_pLeft, _93_pRight)
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), _93_pDot)
goto _281
_112:
- *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))
+ *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))
goto _281
_116:
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))))) = (*XSrcList)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.X0), uint64(u32(76))))
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))))) = (*XSrcList)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.Xdb), uint64(76)))
goto _281
_117:
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))) = (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- _sqlite3SrcListShiftJoinType(tls, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))) = (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ _sqlite3SrcListShiftJoinType(tls, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
goto _281
_118:
if func() int32 {
- if ((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))) != nil) && (((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))).X0) > i32(0)) {
- return i32(1)
+ if ((*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))) != nil) && (((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))).XnSrc) > int32(0)) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138098), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138098), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- *(*uint8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))).X2))))) + 68*uintptr(((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))).X0)-i32(1)))).X9))).X0))) = uint8(*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ (elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))).Xa))), uintptr(((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))).XnSrc)-int32(1))).Xfg).Xjointype = uint8(*(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
}
goto _281
_119:
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))))) = nil
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))))) = nil
goto _281
_120:
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), nil, (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
- _sqlite3SrcListIndexedBy(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), nil, (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
+ _sqlite3SrcListIndexedBy(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))
goto _281
_121:
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2))))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-7)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), nil, (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
- _sqlite3SrcListFuncArgs(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2)))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))))
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967289)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), nil, (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
+ _sqlite3SrcListFuncArgs(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor)))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))))
goto _281
_122:
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))), nil, nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))), nil, nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
goto _281
_123:
- if ((((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))) == nil) && (((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X1) == uint32(i32(0)))) && ((*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))) == nil)) && ((*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))) == nil) {
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))))) = (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
+ if ((((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))) == nil) && (((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xn) == (0))) && ((*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))) == nil)) && ((*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))) == nil) {
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))))) = (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
goto _323
}
- if ((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))).X0) != i32(1) {
+ if ((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))).XnSrc) != int32(1) {
goto _321
}
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))), nil, nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), nil, (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
- if (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))) != nil {
- _105_pNew = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))).X2))))) + 68*uintptr(((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))).X0)-i32(1))))
- _105_pOld = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))).X2)))))
- *(**int8)(unsafe.Pointer(&(_105_pNew.X2))) = _105_pOld.X2
- *(**int8)(unsafe.Pointer(&(_105_pNew.X1))) = _105_pOld.X1
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_105_pNew.X5))))) = (*XSelect)(_105_pOld.X5)
- *(**int8)(unsafe.Pointer(&(_105_pOld.X2))) = store0((**int8)(unsafe.Pointer(&(_105_pOld.X1))), nil)
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_105_pOld.X5))))) = nil
- }
- _sqlite3SrcListDelete(tls, (*Xsqlite3)(_pParse.X0), (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))))
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))), nil, nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), nil, (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
+ if (*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))) != nil {
+ _105_pNew = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))).Xa))), uintptr(((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))).XnSrc)-int32(1)))
+ _105_pOld = (*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))).Xa)))
+ _105_pNew.XzName = _105_pOld.XzName
+ _105_pNew.XzDatabase = _105_pOld.XzDatabase
+ *(**XSelect)(unsafe.Pointer(&_105_pNew.XpSelect)) = (*XSelect)(_105_pOld.XpSelect)
+ _105_pOld.XzName = store1(&_105_pOld.XzDatabase, nil)
+ *(**XSelect)(unsafe.Pointer(&_105_pOld.XpSelect)) = nil
+ }
+ _sqlite3SrcListDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))))
goto _323
_321:
- _sqlite3SrcListShiftJoinType(tls, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))))
- _106_pSubquery = _sqlite3SelectNew(tls, _pParse, nil, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), nil, nil, nil, nil, uint32(i32(2048)), nil, nil)
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))), nil, nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), _106_pSubquery, (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ _sqlite3SrcListShiftJoinType(tls, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))))
+ _106_pSubquery = _sqlite3SelectNew(tls, _pParse, nil, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), nil, nil, nil, nil, uint32(2048), nil, nil)
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))))) = _sqlite3SrcListAppendFromTerm(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))), nil, nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), _106_pSubquery, (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
_323:
goto _281
_124:
- *(**int8)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))).X0))) = nil
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))).X1))) = uint32(i32(0))
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))).Xz = nil
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))).Xn = 0
goto _281
_126:
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))) = _sqlite3SrcListAppend(tls, (*Xsqlite3)(_pParse.X0), nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))) = _sqlite3SrcListAppend(tls, (*Xsqlite3)(_pParse.Xdb), nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_127:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(1)
goto _281
_128:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = _sqlite3JoinType(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), nil, nil)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = _sqlite3JoinType(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), nil, nil)
goto _281
_129:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))) = _sqlite3JoinType(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), nil)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))) = _sqlite3JoinType(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), nil)
goto _281
_130:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))) = _sqlite3JoinType(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))) = _sqlite3JoinType(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_131:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)
+ *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr)
goto _281
_135:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))))) = nil
+ *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))))) = nil
goto _281
_140:
- *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))) = *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))
+ *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))) = *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))
goto _281
_141:
- *(**int8)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0))) = nil
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X1))) = uint32(i32(1))
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xz = nil
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xn = uint32(1)
goto _281
_142:
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))) = (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))) = (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_143:
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))))) = nil
+ *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))))) = nil
goto _281
_145:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_147:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0))
- _sqlite3ExprListSetSortOrder(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).XpExpr))
+ _sqlite3ExprListSetSortOrder(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_148:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0))
- _sqlite3ExprListSetSortOrder(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).XpExpr))
+ _sqlite3ExprListSetSortOrder(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_149:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(0)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(0)
goto _281
_150:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(1)
goto _281
_151:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))) = i32(-1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))) = int32(-1)
goto _281
_152:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))).X0))))) = nil
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))).X1))))) = nil
+ *(**XExpr)(unsafe.Pointer(&((*t55)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))).XpLimit))) = nil
+ *(**XExpr)(unsafe.Pointer(&((*t55)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))).XpOffset))) = nil
goto _281
_153:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X1))))) = nil
+ *(**XExpr)(unsafe.Pointer(&((*t55)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).XpLimit))) = (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr)
+ *(**XExpr)(unsafe.Pointer(&((*t55)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).XpOffset))) = nil
goto _281
_154:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X1))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)
+ *(**XExpr)(unsafe.Pointer(&((*t55)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpLimit))) = (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr)
+ *(**XExpr)(unsafe.Pointer(&((*t55)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpOffset))) = (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr)
goto _281
_155:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X1))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_pcache_page)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)
+ *(**XExpr)(unsafe.Pointer(&((*t55)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpOffset))) = (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr)
+ *(**XExpr)(unsafe.Pointer(&((*t55)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpLimit))) = (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr)
goto _281
_156:
- _sqlite3WithPush(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2)))))), uint8(i32(1)))
- _sqlite3SrcListIndexedBy(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
- _sqlite3DeleteFrom(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ _sqlite3WithPush(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor)))), uint8(1))
+ _sqlite3SrcListIndexedBy(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
+ _sqlite3DeleteFrom(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
goto _281
_157:
- _sqlite3WithPush(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-7)))).X2)))))), uint8(i32(1)))
- _sqlite3SrcListIndexedBy(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))
- _sqlite3ExprListCheckLength(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), str(27269))
- _sqlite3Update(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))))
+ _sqlite3WithPush(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967289)).Xminor)))), uint8(1))
+ _sqlite3SrcListIndexedBy(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))
+ _sqlite3ExprListCheckLength(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), str(27224))
+ _sqlite3Update(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))))
goto _281
_158:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
- _sqlite3ExprListSetName(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), i32(1))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
+ _sqlite3ExprListSetName(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), int32(1))
goto _281
_159:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))))) = _sqlite3ExprListAppendVector(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))))) = _sqlite3ExprListAppendVector(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
goto _281
_160:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_4_yylhsminor)))) = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
- _sqlite3ExprListSetName(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_4_yylhsminor))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), i32(1))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_4_yylhsminor)))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_4_yylhsminor)))) = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
+ _sqlite3ExprListSetName(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_4_yylhsminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), int32(1))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_4_yylhsminor)))
goto _281
_161:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))) = _sqlite3ExprListAppendVector(tls, _pParse, nil, (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))) = _sqlite3ExprListAppendVector(tls, _pParse, nil, (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
goto _281
_162:
- _sqlite3WithPush(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2)))))), uint8(i32(1)))
- _sqlite3Insert(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
+ _sqlite3WithPush(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor)))), uint8(1))
+ _sqlite3Insert(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
goto _281
_163:
- _sqlite3WithPush(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2)))))), uint8(i32(1)))
- _sqlite3Insert(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), nil, (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))))
+ _sqlite3WithPush(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor)))), uint8(1))
+ _sqlite3Insert(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), nil, (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))))
goto _281
_164:
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_165:
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = _sqlite3IdListAppend(tls, (*Xsqlite3)(_pParse.X0), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = _sqlite3IdListAppend(tls, (*Xsqlite3)(_pParse.Xdb), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_166:
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))) = _sqlite3IdListAppend(tls, (*Xsqlite3)(_pParse.X0), nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))) = _sqlite3IdListAppend(tls, (*Xsqlite3)(_pParse.Xdb), nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_167:
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0)
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))) = (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).XpExpr)
goto _281
_168:
- _spanExpr(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), _pParse, int32((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X1), *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _spanExpr(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), _pParse, int32(elem49(_yymsp, 0).Xmajor), *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_171:
- _spanExpr(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), _pParse, i32(27), *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _spanExpr(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), _pParse, int32(27), *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_173:
- _143_temp1 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(27), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), i32(1))
- _143_temp2 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(27), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), i32(1))
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(122), _143_temp1, _143_temp2)
+ _143_temp1 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(27), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), int32(1))
+ _143_temp2 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(27), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), int32(1))
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(122), _143_temp1, _143_temp2)
goto _281
_174:
- _144_temp1 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(27), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), i32(1))
- _144_temp2 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(27), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), i32(1))
- _144_temp3 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(27), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), i32(1))
- _144_temp4 = _sqlite3PExpr(tls, _pParse, i32(122), _144_temp2, _144_temp3)
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(122), _144_temp1, _144_temp4)
+ _144_temp1 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(27), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), int32(1))
+ _144_temp2 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(27), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), int32(1))
+ _144_temp3 = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(27), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), int32(1))
+ _144_temp4 = _sqlite3PExpr(tls, _pParse, int32(122), _144_temp2, _144_temp3)
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(122), _144_temp1, _144_temp4)
goto _281
_175:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0))))) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(134), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), i32(1))
- *(**int8)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X1))) = (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0
- *(**int8)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X2))) = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1)))))))
- if (*XExpr)((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0) != nil {
- {
- p := (*uint32)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0).X2)))
- *p = (*p) | uint32(i32(8388612))
- sink5(*p)
- }
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr))) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(134), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), int32(1))
+ (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XzStart = (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz
+ (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XzEnd = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz)) + uintptr((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn)))
+ if ((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr) != nil {
+ (*XExpr)((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr).Xflags |= uint32(8388612)
}
- *(*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
+ *(*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
goto _281
_176:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)) + 1*uintptr(i32(0))))) != i32(35) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)) + 1*uintptr(i32(1)))))))))&i32(4)) == 0 {
- _147_n = (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1
- _spanExpr(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), _pParse, i32(135), *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- _sqlite3ExprAssignVarNumber(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0), _147_n)
+ if int32(*elem1((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz, 0)) != int32(35) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz, uintptr(1))))))&int32(4)) == 0 {
+ _147_n = (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn
+ _spanExpr(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), _pParse, int32(135), *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ _sqlite3ExprAssignVarNumber(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr), _147_n)
goto _327
}
- _148_t = *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))
+ _148_t = *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))
func() {
- if (_148_t.X1) < uint32(i32(2)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138336), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27278)))
+ if _148_t.Xn < uint32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138336), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27233)))
crt.X__builtin_abort(tls)
}
}()
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), &_148_t, &_148_t)
- if int32(_pParse.X6) == i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(27285), unsafe.Pointer(&_148_t))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))))) = nil
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), &_148_t, &_148_t)
+ if int32(_pParse.Xnested) == int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(27240), unsafe.Pointer(&_148_t))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))) = nil
goto _331
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(157), nil, nil)
- if (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0) != nil {
- _sqlite3GetInt32(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_148_t.X0))+1*uintptr(i32(1)))), (*int32)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0).X8))))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(157), nil, nil)
+ if ((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr) != nil {
+ _sqlite3GetInt32(tls, elem1(_148_t.Xz, uintptr(1)), &((*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr).XiTable))
}
_331:
_327:
goto _281
_177:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))))) = _sqlite3ExprAddCollateToken(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), i32(1))
- *(**int8)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X2))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)) + 1*uintptr((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X1)))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))) = _sqlite3ExprAddCollateToken(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), int32(1))
+ (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XzEnd = elem1((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz, uintptr((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn))
goto _281
_178:
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))).X0))))) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(37), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), i32(1))
- _sqlite3ExprAttachSubtrees(tls, (*Xsqlite3)(_pParse.X0), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))).X0), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0), nil)
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))).XpExpr))) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(37), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), int32(1))
+ _sqlite3ExprAttachSubtrees(tls, (*Xsqlite3)(_pParse.Xdb), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))).XpExpr), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpExpr), nil)
goto _281
_179:
- if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))) != nil) && (((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))).X0) > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_pParse.X0).X31))))) + 4*uintptr(i32(6)))))) {
- _sqlite3ErrorMsg(tls, _pParse, str(27309), unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))))
+ if ((*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))) != nil) && (((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))).XnExpr) > (*elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_pParse.Xdb).XaLimit))), uintptr(6)))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(27264), unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))))
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0))))) = _sqlite3ExprFunction(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- if ((*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))) == i32(1)) && ((*XExpr)((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0) != nil) {
- {
- p := (*uint32)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0).X2)))
- *p = (*p) | uint32(i32(16))
- sink5(*p)
- }
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr))) = _sqlite3ExprFunction(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ if ((*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))) == int32(1)) && (((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr) != nil) {
+ (*XExpr)((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr).Xflags |= uint32(16)
}
- *(*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
+ *(*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
goto _281
_180:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0))))) = _sqlite3ExprFunction(tls, _pParse, nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr))) = _sqlite3ExprFunction(tls, _pParse, nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
goto _281
_181:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0))))) = _sqlite3ExprFunction(tls, _pParse, nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr))) = _sqlite3ExprFunction(tls, _pParse, nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
goto _281
_182:
- _158_pList = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0))))) = _sqlite3PExpr(tls, _pParse, i32(158), nil, nil)
- if (*XExpr)((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0) != nil {
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).X0).X6))))))) = _158_pList
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _158_pList = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).XpExpr))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(158), nil, nil)
+ if ((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr) != nil {
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)).XpExpr).Xx))))) = _158_pList
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&_4_yylhsminor)), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _338
}
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), _158_pList)
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), _158_pList)
_338:
- *(*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
+ *(*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))) = *(*XExprSpan)(unsafe.Pointer(&_4_yylhsminor))
goto _281
_183:
- _spanBinaryExpr(tls, _pParse, int32((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(-1)))).X1), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _spanBinaryExpr(tls, _pParse, int32(elem49(_yymsp, uintptr(4294967295)).Xmajor), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_191:
- *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))
- {
- p := (*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X1)))
- *p = (*p) | u32(2147483648)
- sink5(*p)
- }
+ *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xn |= uint32(2147483648)
goto _281
_192:
- _163_bNot = int32(((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X1) & u32(2147483648))
- {
- p := (*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X1)))
- *p = (*p) & uint32(i32(2147483647))
- sink5(*p)
- }
- _163_pList = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
- _163_pList = _sqlite3ExprListAppend(tls, _pParse, _163_pList, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))))) = _sqlite3ExprFunction(tls, _pParse, _163_pList, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
- _exprNot(tls, _pParse, _163_bNot, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))
- *(**int8)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X2))) = (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X2
- if (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0) != nil {
- {
- p := (*uint32)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0).X2)))
- *p = (*p) | uint32(i32(128))
- sink5(*p)
- }
+ _163_bNot = int32(((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xn) & uint32(2147483648))
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xn &= uint32(2147483647)
+ _163_pList = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
+ _163_pList = _sqlite3ExprListAppend(tls, _pParse, _163_pList, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))) = _sqlite3ExprFunction(tls, _pParse, _163_pList, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
+ _exprNot(tls, _pParse, _163_bNot, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))
+ (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XzEnd = (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XzEnd
+ if ((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr) != nil {
+ (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr).Xflags |= uint32(128)
}
goto _281
_193:
- _164_bNot = int32(((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X1) & u32(2147483648))
- {
- p := (*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X1)))
- *p = (*p) & uint32(i32(2147483647))
- sink5(*p)
- }
- _164_pList = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))
- _164_pList = _sqlite3ExprListAppend(tls, _pParse, _164_pList, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))
- _164_pList = _sqlite3ExprListAppend(tls, _pParse, _164_pList, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))))) = _sqlite3ExprFunction(tls, _pParse, _164_pList, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))
- _exprNot(tls, _pParse, _164_bNot, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
- *(**int8)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X2))) = (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X2
- if (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0) != nil {
- {
- p := (*uint32)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0).X2)))
- *p = (*p) | uint32(i32(128))
- sink5(*p)
- }
+ _164_bNot = int32(((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).Xn) & uint32(2147483648))
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).Xn &= uint32(2147483647)
+ _164_pList = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))
+ _164_pList = _sqlite3ExprListAppend(tls, _pParse, _164_pList, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))
+ _164_pList = _sqlite3ExprListAppend(tls, _pParse, _164_pList, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))) = _sqlite3ExprFunction(tls, _pParse, _164_pList, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))
+ _exprNot(tls, _pParse, _164_bNot, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
+ (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XzEnd = (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XzEnd
+ if ((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr) != nil {
+ (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr).Xflags |= uint32(128)
}
goto _281
_194:
- _spanUnaryPostfix(tls, _pParse, int32((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X1), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _spanUnaryPostfix(tls, _pParse, int32(elem49(_yymsp, 0).Xmajor), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_195:
- _spanUnaryPostfix(tls, _pParse, i32(76), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _spanUnaryPostfix(tls, _pParse, int32(76), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_196:
- _spanBinaryExpr(tls, _pParse, i32(72), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- _binaryToUnaryIfNull(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0), i32(75))
+ _spanBinaryExpr(tls, _pParse, int32(72), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ _binaryToUnaryIfNull(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr), int32(75))
goto _281
_197:
- _spanBinaryExpr(tls, _pParse, i32(148), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- _binaryToUnaryIfNull(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0), i32(76))
+ _spanBinaryExpr(tls, _pParse, int32(148), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ _binaryToUnaryIfNull(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpExpr), int32(76))
goto _281
_198:
- _spanUnaryPrefix(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), _pParse, int32((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(-1)))).X1), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _spanUnaryPrefix(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), _pParse, int32(elem49(_yymsp, uintptr(4294967295)).Xmajor), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_200:
- _spanUnaryPrefix(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), _pParse, i32(155), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _spanUnaryPrefix(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), _pParse, int32(155), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_201:
- _spanUnaryPrefix(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), _pParse, i32(156), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _spanUnaryPrefix(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), _pParse, int32(156), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_202:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(0)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(0)
goto _281
_204:
- _173_pList = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))
- _173_pList = _sqlite3ExprListAppend(tls, _pParse, _173_pList, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(73), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0), nil)
- if (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0) != nil {
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0).X6))))))) = _173_pList
+ _173_pList = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))
+ _173_pList = _sqlite3ExprListAppend(tls, _pParse, _173_pList, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(73), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr), nil)
+ if ((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr) != nil {
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr).Xx))))) = _173_pList
goto _342
}
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), _173_pList)
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), _173_pList)
_342:
- _exprNot(tls, _pParse, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
- *(**int8)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X2))) = (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X2
+ _exprNot(tls, _pParse, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
+ (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XzEnd = (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XzEnd
goto _281
_205:
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))) == nil {
- _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))))) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(134), (*XToken)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3IntTokens))+8*uintptr(*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))))), i32(1))
+ if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))) == nil {
+ _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(134), elem56((*XToken)(unsafe.Pointer(&_sqlite3IntTokens)), uintptr(*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))), int32(1))
goto _351
}
- if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))).X0) != i32(1) {
+ if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))).XnExpr) != int32(1) {
goto _345
}
- _178_pRHS = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))).X2))))) + 20*uintptr(i32(0)))).X0)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))).X2))))) + 20*uintptr(i32(0)))).X0))))) = nil
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ _178_pRHS = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))).Xa))), 0).XpExpr)
+ *(**XExpr)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))).Xa))), 0).XpExpr))) = nil
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
if func() int32 {
if _178_pRHS != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138522), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138522), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&(_178_pRHS.X2)))
- *p = (*p) & uint32(i32(-257))
- sink5(*p)
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_178_pRHS.X2)))
- *p = (*p) | uint32(i32(512))
- sink5(*p)
- }
+ _178_pRHS.Xflags &= uint32(4294967039)
+ _178_pRHS.Xflags |= uint32(512)
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, func() int32 {
- if (*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))) != 0 {
- return i32(77)
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, func() int32 {
+ if (*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))) != 0 {
+ return int32(77)
}
- return i32(78)
- }(), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0), _178_pRHS)
+ return int32(78)
+ }(), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr), _178_pRHS)
goto _351
_345:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(74), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0), nil)
- if (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0) != nil {
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0).X6))))))) = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
- _sqlite3ExprSetHeightAndFlags(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(74), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr), nil)
+ if ((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr) != nil {
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr).Xx))))) = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
+ _sqlite3ExprSetHeightAndFlags(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))
goto _353
}
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
_353:
- _exprNot(tls, _pParse, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
+ _exprNot(tls, _pParse, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
_351:
- *(**int8)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X2))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)) + 1*uintptr((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X1)))
+ (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XzEnd = elem1((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz, uintptr((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn))
goto _281
_206:
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(119), nil, nil)
- _sqlite3PExprAddSelect(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(119), nil, nil)
+ _sqlite3PExprAddSelect(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
goto _281
_207:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(74), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0), nil)
- _sqlite3PExprAddSelect(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
- _exprNot(tls, _pParse, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
- *(**int8)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X2))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)) + 1*uintptr((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X1)))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(74), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr), nil)
+ _sqlite3PExprAddSelect(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
+ _exprNot(tls, _pParse, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
+ (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XzEnd = elem1((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz, uintptr((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn))
goto _281
_208:
- _185_pSrc = _sqlite3SrcListAppend(tls, (*Xsqlite3)(_pParse.X0), nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
- _185_pSelect = _sqlite3SelectNew(tls, _pParse, nil, _185_pSrc, nil, nil, nil, nil, uint32(i32(0)), nil, nil)
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))) != nil {
+ _185_pSrc = _sqlite3SrcListAppend(tls, (*Xsqlite3)(_pParse.Xdb), nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
+ _185_pSelect = _sqlite3SelectNew(tls, _pParse, nil, _185_pSrc, nil, nil, nil, nil, 0, nil, nil)
+ if (*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))) != nil {
_sqlite3SrcListFuncArgs(tls, _pParse, func() *XSrcList {
if _185_pSelect != nil {
return _185_pSrc
}
return nil
- }(), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ }(), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(74), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0), nil)
- _sqlite3PExprAddSelect(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0), _185_pSelect)
- _exprNot(tls, _pParse, *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
- *(**int8)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X2))) = func() *int8 {
- if ((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0) != nil {
- return (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0)) + 1*uintptr((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(-1)))).X2))))).X1)))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(74), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr), nil)
+ _sqlite3PExprAddSelect(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr), _185_pSelect)
+ _exprNot(tls, _pParse, *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
+ (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XzEnd = func() *int8 {
+ if ((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xz) != nil {
+ return elem1((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xz, uintptr((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xn))
}
- return (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0)) + 1*uintptr((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(-2)))).X2))))).X1)))
+ return elem1((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xz, uintptr((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xn))
}()
goto _281
_209:
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- _186_p = store36((**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0))))), _sqlite3PExpr(tls, _pParse, i32(20), nil, nil))
- _sqlite3PExprAddSelect(tls, _pParse, _186_p, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ _186_p = store58((**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpExpr))), _sqlite3PExpr(tls, _pParse, int32(20), nil, nil))
+ _sqlite3PExprAddSelect(tls, _pParse, _186_p, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
goto _281
_210:
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(136), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), nil)
- if (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0) != nil {
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0).X6))))))) = func() *XExprList {
- if (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))) != nil {
- return _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(136), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), nil)
+ if ((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr) != nil {
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr).Xx))))) = func() *XExprList {
+ if (*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))) != nil {
+ return _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
}
- return (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))
+ return (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))
}()
- _sqlite3ExprSetHeightAndFlags(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0))
+ _sqlite3ExprSetHeightAndFlags(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).XpExpr))
goto _362
}
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))))
- _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))))
+ _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
_362:
goto _281
_211:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
goto _281
_212:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).XpExpr))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
goto _281
_213:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)
+ *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr)
goto _281
_214:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
goto _281
_215:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))) = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))) = _sqlite3ExprListAppend(tls, _pParse, nil, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
goto _281
_216:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_218:
- _sqlite3CreateIndex(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-7)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))), _sqlite3SrcListAppend(tls, (*Xsqlite3)(_pParse.X0), nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(-4)))).X2))))), nil), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-10)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-11)))).X2))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), i32(0), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2))))), uint8(i32(0)))
+ _sqlite3CreateIndex(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967289)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))), _sqlite3SrcListAppend(tls, (*Xsqlite3)(_pParse.Xdb), nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), nil), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967286)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967285)).Xminor))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), int32(0), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor))), 0)
goto _281
_219:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(2)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(2)
goto _281
_221:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))) = i32(0)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))) = int32(0)
goto _281
_222:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))) = _parserAddExprIdListTerm(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))) = _parserAddExprIdListTerm(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_223:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = _parserAddExprIdListTerm(tls, _pParse, nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = _parserAddExprIdListTerm(tls, _pParse, nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_224:
- _sqlite3DropIndex(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _sqlite3DropIndex(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_225:
_sqlite3Vacuum(tls, _pParse, nil)
goto _281
_226:
- _sqlite3Vacuum(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3Vacuum(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_227:
- _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), nil, i32(0))
+ _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), nil, int32(0))
goto _281
_228:
- _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), i32(0))
+ _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), int32(0))
goto _281
_229:
- _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), i32(0))
+ _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), int32(0))
goto _281
_230:
- _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), i32(1))
+ _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), int32(1))
goto _281
_231:
- _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), i32(1))
+ _sqlite3Pragma(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), int32(1))
goto _281
_232:
- *(**int8)(unsafe.Pointer(&(_209_all.X0))) = (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0
- *(*uint32)(unsafe.Pointer(&(_209_all.X1))) = uint32(int32((uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(0)))).X2))))).X0))-uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(-3)))).X2))))).X0)))/1)) + ((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1)
- _sqlite3FinishTrigger(tls, _pParse, (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), &_209_all)
+ _209_all.Xz = (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).Xz
+ _209_all.Xn = uint32(int32(uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xz))-uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).Xz)))) + ((*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xn)
+ _sqlite3FinishTrigger(tls, _pParse, (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), &_209_all)
goto _281
_233:
- _sqlite3BeginTrigger(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-7)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))), (*T_ht)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X0, (*XIdList)((*T_ht)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))).X1), (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-10)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-8)))).X2))))))
- *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-10)))).X2))))) = func() XToken {
- if ((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))).X1) == uint32(i32(0)) {
- return (*(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-7)))).X2))))))
+ _sqlite3BeginTrigger(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967289)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))), (*t51)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).Xa, (*XIdList)((*t51)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))).Xb), (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967286)).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967288)).Xminor))))
+ *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967286)).Xminor))) = func() XToken {
+ if ((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))).Xn) == (0) {
+ return (*(*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967289)).Xminor))))
}
- return (*(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))))
+ return (*(*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))))
}()
goto _281
_234:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(34)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(34)
goto _281
_235:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(30)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(30)
goto _281
_236:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))) = i32(48)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))) = int32(48)
goto _281
_237:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))) = i32(34)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))) = int32(34)
goto _281
_238:
- *(*int32)(unsafe.Pointer(&((*T_ht)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))) = int32((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X1)
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*T_ht)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X1))))) = nil
+ (*t51)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xa = int32(elem49(_yymsp, 0).Xmajor)
+ *(**XIdList)(unsafe.Pointer(&((*t51)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).Xb))) = nil
goto _281
_240:
- *(*int32)(unsafe.Pointer(&((*T_ht)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X0))) = i32(110)
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*T_ht)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))).X1))))) = (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ (*t51)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xa = int32(110)
+ *(**XIdList)(unsafe.Pointer(&((*t51)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))).Xb))) = (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_241:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))))) = nil
+ *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))))) = nil
goto _281
_243:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0)
+ *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))) = (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr)
goto _281
_245:
func() {
- if (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138703), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27343)))
+ if (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138703), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27298)))
crt.X__builtin_abort(tls)
}
}()
- *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XTriggerStep)((*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))).X9).X8))))) = (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
- *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2)))))).X9))))) = (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ *(**XTriggerStep)(unsafe.Pointer(&((*XTriggerStep)((*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))).XpLast).XpNext))) = (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
+ *(**XTriggerStep)(unsafe.Pointer(&((*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor)))).XpLast))) = (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_246:
func() {
- if (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138710), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27368)))
+ if (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138710), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27323)))
crt.X__builtin_abort(tls)
}
}()
- *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))).X9))))) = (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ *(**XTriggerStep)(unsafe.Pointer(&((*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))).XpLast))) = (*XTriggerStep)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_247:
- *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))) = *(*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))
- _sqlite3ErrorMsg(tls, _pParse, str(27393))
+ *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))) = *(*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))
+ _sqlite3ErrorMsg(tls, _pParse, str(27348))
goto _281
_248:
- _sqlite3ErrorMsg(tls, _pParse, str(27488))
+ _sqlite3ErrorMsg(tls, _pParse, str(27443))
goto _281
_249:
- _sqlite3ErrorMsg(tls, _pParse, str(27572))
+ _sqlite3ErrorMsg(tls, _pParse, str(27527))
goto _281
_250:
- *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-6)))).X2))))))) = _sqlite3TriggerUpdateStep(tls, (*Xsqlite3)(_pParse.X0), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), uint8(*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2)))))))
+ *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967290)).Xminor))))) = _sqlite3TriggerUpdateStep(tls, (*Xsqlite3)(_pParse.Xdb), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), uint8(*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor)))))
goto _281
_251:
- *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))) = _sqlite3TriggerInsertStep(tls, (*Xsqlite3)(_pParse.X0), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), uint8(*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))))
+ *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))) = _sqlite3TriggerInsertStep(tls, (*Xsqlite3)(_pParse.Xdb), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), uint8(*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))))
goto _281
_252:
- *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))) = _sqlite3TriggerDeleteStep(tls, (*Xsqlite3)(_pParse.X0), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))) = _sqlite3TriggerDeleteStep(tls, (*Xsqlite3)(_pParse.Xdb), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
goto _281
_253:
- *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))) = _sqlite3TriggerSelectStep(tls, (*Xsqlite3)(_pParse.X0), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))) = _sqlite3TriggerSelectStep(tls, (*Xsqlite3)(_pParse.Xdb), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
goto _281
_254:
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0))))) = _sqlite3PExpr(tls, _pParse, i32(56), nil, nil)
- if (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0) != nil {
- *(*int8)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0).X1))) = int8(i32(4))
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpExpr))) = _sqlite3PExpr(tls, _pParse, int32(56), nil, nil)
+ if ((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpExpr) != nil {
+ (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpExpr).Xaffinity = int8(4)
}
goto _281
_255:
- _spanSet(tls, (*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))).X0))))) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(56), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), i32(1))
- if (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))).X0) != nil {
- *(*int8)(unsafe.Pointer(&((*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))).X0).X1))) = int8(*(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))))
+ _spanSet(tls, (*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
+ *(**XExpr)(unsafe.Pointer(&((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))).XpExpr))) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(56), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), int32(1))
+ if ((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))).XpExpr) != nil {
+ (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))).XpExpr).Xaffinity = int8(*(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))))
}
goto _281
_256:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(1)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(1)
goto _281
_257:
- *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))) = i32(3)
+ *(*int32)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))) = int32(3)
goto _281
_258:
- _sqlite3DropTrigger(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ _sqlite3DropTrigger(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_259:
- _sqlite3Attach(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))).X0), (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X0), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ _sqlite3Attach(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))).XpExpr), (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).XpExpr), (*XExpr)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
goto _281
_260:
- _sqlite3Detach(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))).X0))
+ _sqlite3Detach(tls, _pParse, (*XExpr)((*XExprSpan)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))).XpExpr))
goto _281
_261:
_sqlite3Reindex(tls, _pParse, nil, nil)
goto _281
_262:
- _sqlite3Reindex(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3Reindex(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_263:
_sqlite3Analyze(tls, _pParse, nil, nil)
goto _281
_264:
- _sqlite3Analyze(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3Analyze(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_265:
- _sqlite3AlterRenameTable(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3AlterRenameTable(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_266:
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))).X1))) = uint32(int32((uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(_pParse.X51))).X0))-uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(i32(-1)))).X2))))).X0)))/1)) + ((*XToken)(unsafe.Pointer(&(_pParse.X51))).X1)
- _sqlite3AlterFinishAddColumn(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))
+ (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xn = uint32(int32(uintptr(unsafe.Pointer(_pParse.XsLastToken.Xz))-uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))).Xz)))) + (_pParse.XsLastToken.Xn)
+ _sqlite3AlterFinishAddColumn(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))
goto _281
_267:
_disableLookaside(tls, _pParse)
- _sqlite3AlterBeginAddColumn(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2)))))))
+ _sqlite3AlterBeginAddColumn(tls, _pParse, (*XSrcList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor)))))
goto _281
_268:
_sqlite3VtabFinishParse(tls, _pParse, nil)
goto _281
_269:
- _sqlite3VtabFinishParse(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3VtabFinishParse(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_270:
- _sqlite3VtabBeginParse(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-3)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))), *(*int32)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2))))))
+ _sqlite3VtabBeginParse(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967293)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))), *(*int32)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor))))
goto _281
_271:
_sqlite3VtabArgInit(tls, _pParse)
goto _281
_272:
- _sqlite3VtabArgExtend(tls, _pParse, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ _sqlite3VtabArgExtend(tls, _pParse, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_275:
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(1)))).X2))))))) = nil
+ *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(1)).Xminor))))) = nil
goto _281
_276:
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2))))))) = (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor))))) = (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_277:
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-2)))).X2))))))) = (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(0)))).X2))))))
+ *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967294)).Xminor))))) = (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, 0).Xminor))))
goto _281
_278:
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))))) = _sqlite3WithAdd(tls, _pParse, nil, (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))))) = _sqlite3WithAdd(tls, _pParse, nil, (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
goto _281
_279:
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-7)))).X2))))))) = _sqlite3WithAdd(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-7)))).X2)))))), (*XToken)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-5)))).X2))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-4)))).X2)))))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*XYYMINORTYPE)(unsafe.Pointer(&((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp)) + 16*uintptr(i32(-1)))).X2)))))))
+ *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967289)).Xminor))))) = _sqlite3WithAdd(tls, _pParse, (*XWith)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967289)).Xminor)))), (*XToken)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967291)).Xminor))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967292)).Xminor)))), (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&(elem49(_yymsp, uintptr(4294967295)).Xminor)))))
goto _281
_280:
func() {
- if _yyruleno == uint32(i32(277)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138857), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27657)))
+ if _yyruleno == uint32(277) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138857), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27612)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _yyruleno == uint32(i32(294)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138874), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27671)))
+ if _yyruleno == uint32(294) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138874), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27626)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _yyruleno == uint32(i32(295)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138875), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27685)))
+ if _yyruleno == uint32(295) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138875), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27640)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _yyruleno == uint32(i32(301)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138881), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27699)))
+ if _yyruleno == uint32(301) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138881), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27654)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _yyruleno == uint32(i32(303)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138883), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27713)))
+ if _yyruleno == uint32(303) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138883), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27668)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _yyruleno == uint32(i32(304)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138884), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27727)))
+ if _yyruleno == uint32(304) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138884), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27682)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _yyruleno == uint32(i32(305)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138885), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27741)))
+ if _yyruleno == uint32(305) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138885), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27696)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _yyruleno == uint32(i32(309)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138889), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27755)))
+ if _yyruleno == uint32(309) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138889), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27710)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _yyruleno == uint32(i32(312)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138892), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27769)))
+ if _yyruleno == uint32(312) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138892), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27724)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _yyruleno == uint32(i32(313)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138893), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27783)))
+ if _yyruleno == uint32(313) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138893), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27738)))
crt.X__builtin_abort(tls)
}
}()
goto _281
_281:
func() {
- if _yyruleno >= u32(332) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138915), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27797)))
+ if _yyruleno >= uint32(332) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138915), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27752)))
crt.X__builtin_abort(tls)
}
}()
- _yygoto = int32((*t35)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyRuleInfo)) + 2*uintptr(_yyruleno))).X0)
- _yysize = int32((*t35)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yyRuleInfo)) + 2*uintptr(_yyruleno))).X1)
- _yyact = _yy_find_reduce_action(tls, int32((*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yymsp))+16*uintptr(-_yysize))).X0), uint8(_yygoto))
- if _yyact > i32(999) {
+ _yygoto = int32(elem52((*t53)(unsafe.Pointer(&_yyRuleInfo)), uintptr(_yyruleno)).Xlhs)
+ _yysize = int32(elem52((*t53)(unsafe.Pointer(&_yyRuleInfo)), uintptr(_yyruleno)).Xnrhs)
+ _yyact = _yy_find_reduce_action(tls, int32(elem49(_yymsp, uintptr(-_yysize)).Xstateno), uint8(_yygoto))
+ if _yyact > int32(999) {
goto _393
}
- if _yyact > i32(455) {
- {
- p := &_yyact
- *p = (*p) + i32(332)
- sink1(*p)
- }
- }
- {
- p := &_yymsp
- *p = (*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 16*uintptr(_yysize-i32(1))))
- sink34(*p)
+ if _yyact > int32(455) {
+ _yyact += int32(332)
}
- *(**XyyStackEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_yypParser.X0))))) = _yymsp
- *(*uint16)(unsafe.Pointer(&(_yymsp.X0))) = uint16(_yyact)
- *(*uint8)(unsafe.Pointer(&(_yymsp.X1))) = uint8(_yygoto)
+ *(*uintptr)(unsafe.Pointer(&_yymsp)) -= 16 * uintptr(_yysize-int32(1))
+ *(**XyyStackEntry)(unsafe.Pointer(&_yypParser.Xyytos)) = _yymsp
+ _yymsp.Xstateno = uint16(_yyact)
+ _yymsp.Xmajor = uint8(_yygoto)
_yyTraceShift(tls, _yypParser, _yyact)
goto _395
_393:
func() {
- if _yyact != i32(1333) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138929), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_reduceØ00__func__Ø000))), unsafe.Pointer(str(27847)))
+ if _yyact != int32(1333) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138929), unsafe.Pointer(&_yy_reduceØ00__func__Ø000), unsafe.Pointer(str(27802)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (**XyyStackEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_yypParser.X0)))))
- *p = (*XyyStackEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 16*uintptr(_yysize)))
- sink34(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_yypParser.Xyytos)) -= 16 * uintptr(_yysize)
_yy_accept(tls, _yypParser)
_395:
- _ = _4_yylhsminor
- _ = _34_v
- _ = _35_v
- _ = _70_dest
- _ = _75_x
- _ = _80_s
- _ = _148_t
- _ = _209_all
}
-var _yyRuleInfo [332]struct {
- X0 uint8
- X1 uint8
-}
+// C comment
+// /* The following table contains information about every rule that
+// ** is used during the reduce.
+// */
+var _yyRuleInfo [332]t53
func init() {
- _yyRuleInfo = [332]struct {
- X0 uint8
- X1 uint8
- }{t35{X0: u8(147), X1: u8(1)}, t35{X0: u8(147), X1: u8(3)}, t35{X0: u8(148), X1: u8(1)}, t35{X0: u8(149), X1: u8(3)}, t35{X0: u8(150), X1: u8(0)}, t35{X0: u8(150), X1: u8(1)}, t35{X0: u8(150), X1: u8(1)}, t35{X0: u8(150), X1: u8(1)}, t35{X0: u8(149), X1: u8(2)}, t35{X0: u8(149), X1: u8(2)}, t35{X0: u8(149), X1: u8(2)}, t35{X0: u8(149), X1: u8(2)}, t35{X0: u8(149), X1: u8(3)}, t35{X0: u8(149), X1: u8(5)}, t35{X0: u8(154), X1: u8(6)}, t35{X0: u8(156), X1: u8(1)}, t35{X0: u8(158), X1: u8(0)}, t35{X0: u8(158), X1: u8(3)}, t35{X0: u8(157), X1: u8(1)}, t35{X0: u8(157), X1: u8(0)}, t35{X0: u8(155), X1: u8(5)}, t35{X0: u8(155), X1: u8(2)}, t35{X0: u8(162), X1: u8(0)}, t35{X0: u8(162), X1: u8(2)}, t35{X0: u8(164), X1: u8(2)}, t35{X0: u8(166), X1: u8(0)}, t35{X0: u8(166), X1: u8(4)}, t35{X0: u8(166), X1: u8(6)}, t35{X0: u8(167), X1: u8(2)}, t35{X0: u8(171), X1: u8(2)}, t35{X0: u8(171), X1: u8(2)}, t35{X0: u8(171), X1: u8(4)}, t35{X0: u8(171), X1: u8(3)}, t35{X0: u8(171), X1: u8(3)}, t35{X0: u8(171), X1: u8(2)}, t35{X0: u8(171), X1: u8(3)}, t35{X0: u8(171), X1: u8(5)}, t35{X0: u8(171), X1: u8(2)}, t35{X0: u8(171), X1: u8(4)}, t35{X0: u8(171), X1: u8(4)}, t35{X0: u8(171), X1: u8(1)}, t35{X0: u8(171), X1: u8(2)}, t35{X0: u8(176), X1: u8(0)}, t35{X0: u8(176), X1: u8(1)}, t35{X0: u8(178), X1: u8(0)}, t35{X0: u8(178), X1: u8(2)}, t35{X0: u8(180), X1: u8(2)}, t35{X0: u8(180), X1: u8(3)}, t35{X0: u8(180), X1: u8(3)}, t35{X0: u8(180), X1: u8(3)}, t35{X0: u8(181), X1: u8(2)}, t35{X0: u8(181), X1: u8(2)}, t35{X0: u8(181), X1: u8(1)}, t35{X0: u8(181), X1: u8(1)}, t35{X0: u8(181), X1: u8(2)}, t35{X0: u8(179), X1: u8(3)}, t35{X0: u8(179), X1: u8(2)}, t35{X0: u8(182), X1: u8(0)}, t35{X0: u8(182), X1: u8(2)}, t35{X0: u8(182), X1: u8(2)}, t35{X0: u8(161), X1: u8(0)}, t35{X0: u8(184), X1: u8(1)}, t35{X0: u8(185), X1: u8(2)}, t35{X0: u8(185), X1: u8(7)}, t35{X0: u8(185), X1: u8(5)}, t35{X0: u8(185), X1: u8(5)}, t35{X0: u8(185), X1: u8(10)}, t35{X0: u8(188), X1: u8(0)}, t35{X0: u8(174), X1: u8(0)}, t35{X0: u8(174), X1: u8(3)}, t35{X0: u8(189), X1: u8(0)}, t35{X0: u8(189), X1: u8(2)}, t35{X0: u8(190), X1: u8(1)}, t35{X0: u8(190), X1: u8(1)}, t35{X0: u8(149), X1: u8(4)}, t35{X0: u8(192), X1: u8(2)}, t35{X0: u8(192), X1: u8(0)}, t35{X0: u8(149), X1: u8(9)}, t35{X0: u8(149), X1: u8(4)}, t35{X0: u8(149), X1: u8(1)}, t35{X0: u8(163), X1: u8(2)}, t35{X0: u8(194), X1: u8(3)}, t35{X0: u8(197), X1: u8(1)}, t35{X0: u8(197), X1: u8(2)}, t35{X0: u8(197), X1: u8(1)}, t35{X0: u8(195), X1: u8(9)}, t35{X0: u8(206), X1: u8(4)}, t35{X0: u8(206), X1: u8(5)}, t35{X0: u8(198), X1: u8(1)}, t35{X0: u8(198), X1: u8(1)}, t35{X0: u8(198), X1: u8(0)}, t35{X0: u8(209), X1: u8(0)}, t35{X0: u8(199), X1: u8(3)}, t35{X0: u8(199), X1: u8(2)}, t35{X0: u8(199), X1: u8(4)}, t35{X0: u8(210), X1: u8(2)}, t35{X0: u8(210), X1: u8(0)}, t35{X0: u8(200), X1: u8(0)}, t35{X0: u8(200), X1: u8(2)}, t35{X0: u8(212), X1: u8(2)}, t35{X0: u8(212), X1: u8(0)}, t35{X0: u8(211), X1: u8(7)}, t35{X0: u8(211), X1: u8(9)}, t35{X0: u8(211), X1: u8(7)}, t35{X0: u8(211), X1: u8(7)}, t35{X0: u8(159), X1: u8(0)}, t35{X0: u8(159), X1: u8(2)}, t35{X0: u8(193), X1: u8(2)}, t35{X0: u8(213), X1: u8(1)}, t35{X0: u8(213), X1: u8(2)}, t35{X0: u8(213), X1: u8(3)}, t35{X0: u8(213), X1: u8(4)}, t35{X0: u8(215), X1: u8(2)}, t35{X0: u8(215), X1: u8(0)}, t35{X0: u8(214), X1: u8(0)}, t35{X0: u8(214), X1: u8(3)}, t35{X0: u8(214), X1: u8(2)}, t35{X0: u8(216), X1: u8(4)}, t35{X0: u8(216), X1: u8(0)}, t35{X0: u8(204), X1: u8(0)}, t35{X0: u8(204), X1: u8(3)}, t35{X0: u8(186), X1: u8(4)}, t35{X0: u8(186), X1: u8(2)}, t35{X0: u8(175), X1: u8(1)}, t35{X0: u8(175), X1: u8(1)}, t35{X0: u8(175), X1: u8(0)}, t35{X0: u8(202), X1: u8(0)}, t35{X0: u8(202), X1: u8(3)}, t35{X0: u8(203), X1: u8(0)}, t35{X0: u8(203), X1: u8(2)}, t35{X0: u8(205), X1: u8(0)}, t35{X0: u8(205), X1: u8(2)}, t35{X0: u8(205), X1: u8(4)}, t35{X0: u8(205), X1: u8(4)}, t35{X0: u8(149), X1: u8(6)}, t35{X0: u8(201), X1: u8(0)}, t35{X0: u8(201), X1: u8(2)}, t35{X0: u8(149), X1: u8(8)}, t35{X0: u8(218), X1: u8(5)}, t35{X0: u8(218), X1: u8(7)}, t35{X0: u8(218), X1: u8(3)}, t35{X0: u8(218), X1: u8(5)}, t35{X0: u8(149), X1: u8(6)}, t35{X0: u8(149), X1: u8(7)}, t35{X0: u8(219), X1: u8(2)}, t35{X0: u8(219), X1: u8(1)}, t35{X0: u8(220), X1: u8(0)}, t35{X0: u8(220), X1: u8(3)}, t35{X0: u8(217), X1: u8(3)}, t35{X0: u8(217), X1: u8(1)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(172), X1: u8(1)}, t35{X0: u8(173), X1: u8(1)}, t35{X0: u8(173), X1: u8(1)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(5)}, t35{X0: u8(172), X1: u8(1)}, t35{X0: u8(172), X1: u8(1)}, t35{X0: u8(172), X1: u8(1)}, t35{X0: u8(173), X1: u8(1)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(6)}, t35{X0: u8(173), X1: u8(5)}, t35{X0: u8(173), X1: u8(4)}, t35{X0: u8(172), X1: u8(1)}, t35{X0: u8(173), X1: u8(5)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(221), X1: u8(2)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(5)}, t35{X0: u8(173), X1: u8(2)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(4)}, t35{X0: u8(173), X1: u8(2)}, t35{X0: u8(173), X1: u8(2)}, t35{X0: u8(173), X1: u8(2)}, t35{X0: u8(173), X1: u8(2)}, t35{X0: u8(222), X1: u8(1)}, t35{X0: u8(222), X1: u8(2)}, t35{X0: u8(173), X1: u8(5)}, t35{X0: u8(223), X1: u8(1)}, t35{X0: u8(223), X1: u8(2)}, t35{X0: u8(173), X1: u8(5)}, t35{X0: u8(173), X1: u8(3)}, t35{X0: u8(173), X1: u8(5)}, t35{X0: u8(173), X1: u8(5)}, t35{X0: u8(173), X1: u8(4)}, t35{X0: u8(173), X1: u8(5)}, t35{X0: u8(226), X1: u8(5)}, t35{X0: u8(226), X1: u8(4)}, t35{X0: u8(227), X1: u8(2)}, t35{X0: u8(227), X1: u8(0)}, t35{X0: u8(225), X1: u8(1)}, t35{X0: u8(225), X1: u8(0)}, t35{X0: u8(208), X1: u8(0)}, t35{X0: u8(207), X1: u8(3)}, t35{X0: u8(207), X1: u8(1)}, t35{X0: u8(224), X1: u8(0)}, t35{X0: u8(224), X1: u8(3)}, t35{X0: u8(149), X1: u8(12)}, t35{X0: u8(228), X1: u8(1)}, t35{X0: u8(228), X1: u8(0)}, t35{X0: u8(177), X1: u8(0)}, t35{X0: u8(177), X1: u8(3)}, t35{X0: u8(187), X1: u8(5)}, t35{X0: u8(187), X1: u8(3)}, t35{X0: u8(229), X1: u8(0)}, t35{X0: u8(229), X1: u8(2)}, t35{X0: u8(149), X1: u8(4)}, t35{X0: u8(149), X1: u8(1)}, t35{X0: u8(149), X1: u8(2)}, t35{X0: u8(149), X1: u8(3)}, t35{X0: u8(149), X1: u8(5)}, t35{X0: u8(149), X1: u8(6)}, t35{X0: u8(149), X1: u8(5)}, t35{X0: u8(149), X1: u8(6)}, t35{X0: u8(169), X1: u8(2)}, t35{X0: u8(170), X1: u8(2)}, t35{X0: u8(149), X1: u8(5)}, t35{X0: u8(231), X1: u8(11)}, t35{X0: u8(233), X1: u8(1)}, t35{X0: u8(233), X1: u8(1)}, t35{X0: u8(233), X1: u8(2)}, t35{X0: u8(233), X1: u8(0)}, t35{X0: u8(234), X1: u8(1)}, t35{X0: u8(234), X1: u8(1)}, t35{X0: u8(234), X1: u8(3)}, t35{X0: u8(236), X1: u8(0)}, t35{X0: u8(236), X1: u8(2)}, t35{X0: u8(232), X1: u8(3)}, t35{X0: u8(232), X1: u8(2)}, t35{X0: u8(238), X1: u8(3)}, t35{X0: u8(239), X1: u8(3)}, t35{X0: u8(239), X1: u8(2)}, t35{X0: u8(237), X1: u8(7)}, t35{X0: u8(237), X1: u8(5)}, t35{X0: u8(237), X1: u8(5)}, t35{X0: u8(237), X1: u8(1)}, t35{X0: u8(173), X1: u8(4)}, t35{X0: u8(173), X1: u8(6)}, t35{X0: u8(191), X1: u8(1)}, t35{X0: u8(191), X1: u8(1)}, t35{X0: u8(191), X1: u8(1)}, t35{X0: u8(149), X1: u8(4)}, t35{X0: u8(149), X1: u8(6)}, t35{X0: u8(149), X1: u8(3)}, t35{X0: u8(241), X1: u8(0)}, t35{X0: u8(241), X1: u8(2)}, t35{X0: u8(149), X1: u8(1)}, t35{X0: u8(149), X1: u8(3)}, t35{X0: u8(149), X1: u8(1)}, t35{X0: u8(149), X1: u8(3)}, t35{X0: u8(149), X1: u8(6)}, t35{X0: u8(149), X1: u8(7)}, t35{X0: u8(242), X1: u8(1)}, t35{X0: u8(149), X1: u8(1)}, t35{X0: u8(149), X1: u8(4)}, t35{X0: u8(244), X1: u8(8)}, t35{X0: u8(246), X1: u8(0)}, t35{X0: u8(247), X1: u8(1)}, t35{X0: u8(247), X1: u8(3)}, t35{X0: u8(248), X1: u8(1)}, t35{X0: u8(196), X1: u8(0)}, t35{X0: u8(196), X1: u8(2)}, t35{X0: u8(196), X1: u8(3)}, t35{X0: u8(250), X1: u8(6)}, t35{X0: u8(250), X1: u8(8)}, t35{X0: u8(144), X1: u8(1)}, t35{X0: u8(145), X1: u8(2)}, t35{X0: u8(145), X1: u8(1)}, t35{X0: u8(146), X1: u8(1)}, t35{X0: u8(146), X1: u8(3)}, t35{X0: u8(147), X1: u8(0)}, t35{X0: u8(151), X1: u8(0)}, t35{X0: u8(151), X1: u8(1)}, t35{X0: u8(151), X1: u8(2)}, t35{X0: u8(153), X1: u8(1)}, t35{X0: u8(153), X1: u8(0)}, t35{X0: u8(149), X1: u8(2)}, t35{X0: u8(160), X1: u8(4)}, t35{X0: u8(160), X1: u8(2)}, t35{X0: u8(152), X1: u8(1)}, t35{X0: u8(152), X1: u8(1)}, t35{X0: u8(152), X1: u8(1)}, t35{X0: u8(166), X1: u8(1)}, t35{X0: u8(167), X1: u8(1)}, t35{X0: u8(168), X1: u8(1)}, t35{X0: u8(168), X1: u8(1)}, t35{X0: u8(165), X1: u8(2)}, t35{X0: u8(165), X1: u8(0)}, t35{X0: u8(171), X1: u8(2)}, t35{X0: u8(161), X1: u8(2)}, t35{X0: u8(183), X1: u8(3)}, t35{X0: u8(183), X1: u8(1)}, t35{X0: u8(184), X1: u8(0)}, t35{X0: u8(188), X1: u8(1)}, t35{X0: u8(190), X1: u8(1)}, t35{X0: u8(194), X1: u8(1)}, t35{X0: u8(195), X1: u8(1)}, t35{X0: u8(209), X1: u8(2)}, t35{X0: u8(210), X1: u8(1)}, t35{X0: u8(173), X1: u8(1)}, t35{X0: u8(221), X1: u8(1)}, t35{X0: u8(208), X1: u8(1)}, t35{X0: u8(230), X1: u8(1)}, t35{X0: u8(230), X1: u8(1)}, t35{X0: u8(230), X1: u8(1)}, t35{X0: u8(230), X1: u8(1)}, t35{X0: u8(230), X1: u8(1)}, t35{X0: u8(169), X1: u8(1)}, t35{X0: u8(235), X1: u8(0)}, t35{X0: u8(235), X1: u8(3)}, t35{X0: u8(238), X1: u8(1)}, t35{X0: u8(239), X1: u8(0)}, t35{X0: u8(240), X1: u8(1)}, t35{X0: u8(240), X1: u8(0)}, t35{X0: u8(243), X1: u8(0)}, t35{X0: u8(243), X1: u8(1)}, t35{X0: u8(245), X1: u8(1)}, t35{X0: u8(245), X1: u8(3)}, t35{X0: u8(246), X1: u8(2)}, t35{X0: u8(249), X1: u8(0)}, t35{X0: u8(249), X1: u8(4)}, t35{X0: u8(249), X1: u8(2)}}
+ _yyRuleInfo = [332]t53{t53{Xlhs: uint8(147), Xnrhs: uint8(1)}, t53{Xlhs: uint8(147), Xnrhs: uint8(3)}, t53{Xlhs: uint8(148), Xnrhs: uint8(1)}, t53{Xlhs: uint8(149), Xnrhs: uint8(3)}, t53{Xlhs: uint8(150)}, t53{Xlhs: uint8(150), Xnrhs: uint8(1)}, t53{Xlhs: uint8(150), Xnrhs: uint8(1)}, t53{Xlhs: uint8(150), Xnrhs: uint8(1)}, t53{Xlhs: uint8(149), Xnrhs: uint8(2)}, t53{Xlhs: uint8(149), Xnrhs: uint8(2)}, t53{Xlhs: uint8(149), Xnrhs: uint8(2)}, t53{Xlhs: uint8(149), Xnrhs: uint8(2)}, t53{Xlhs: uint8(149), Xnrhs: uint8(3)}, t53{Xlhs: uint8(149), Xnrhs: uint8(5)}, t53{Xlhs: uint8(154), Xnrhs: uint8(6)}, t53{Xlhs: uint8(156), Xnrhs: uint8(1)}, t53{Xlhs: uint8(158)}, t53{Xlhs: uint8(158), Xnrhs: uint8(3)}, t53{Xlhs: uint8(157), Xnrhs: uint8(1)}, t53{Xlhs: uint8(157)}, t53{Xlhs: uint8(155), Xnrhs: uint8(5)}, t53{Xlhs: uint8(155), Xnrhs: uint8(2)}, t53{Xlhs: uint8(162)}, t53{Xlhs: uint8(162), Xnrhs: uint8(2)}, t53{Xlhs: uint8(164), Xnrhs: uint8(2)}, t53{Xlhs: uint8(166)}, t53{Xlhs: uint8(166), Xnrhs: uint8(4)}, t53{Xlhs: uint8(166), Xnrhs: uint8(6)}, t53{Xlhs: uint8(167), Xnrhs: uint8(2)}, t53{Xlhs: uint8(171), Xnrhs: uint8(2)}, t53{Xlhs: uint8(171), Xnrhs: uint8(2)}, t53{Xlhs: uint8(171), Xnrhs: uint8(4)}, t53{Xlhs: uint8(171), Xnrhs: uint8(3)}, t53{Xlhs: uint8(171), Xnrhs: uint8(3)}, t53{Xlhs: uint8(171), Xnrhs: uint8(2)}, t53{Xlhs: uint8(171), Xnrhs: uint8(3)}, t53{Xlhs: uint8(171), Xnrhs: uint8(5)}, t53{Xlhs: uint8(171), Xnrhs: uint8(2)}, t53{Xlhs: uint8(171), Xnrhs: uint8(4)}, t53{Xlhs: uint8(171), Xnrhs: uint8(4)}, t53{Xlhs: uint8(171), Xnrhs: uint8(1)}, t53{Xlhs: uint8(171), Xnrhs: uint8(2)}, t53{Xlhs: uint8(176)}, t53{Xlhs: uint8(176), Xnrhs: uint8(1)}, t53{Xlhs: uint8(178)}, t53{Xlhs: uint8(178), Xnrhs: uint8(2)}, t53{Xlhs: uint8(180), Xnrhs: uint8(2)}, t53{Xlhs: uint8(180), Xnrhs: uint8(3)}, t53{Xlhs: uint8(180), Xnrhs: uint8(3)}, t53{Xlhs: uint8(180), Xnrhs: uint8(3)}, t53{Xlhs: uint8(181), Xnrhs: uint8(2)}, t53{Xlhs: uint8(181), Xnrhs: uint8(2)}, t53{Xlhs: uint8(181), Xnrhs: uint8(1)}, t53{Xlhs: uint8(181), Xnrhs: uint8(1)}, t53{Xlhs: uint8(181), Xnrhs: uint8(2)}, t53{Xlhs: uint8(179), Xnrhs: uint8(3)}, t53{Xlhs: uint8(179), Xnrhs: uint8(2)}, t53{Xlhs: uint8(182)}, t53{Xlhs: uint8(182), Xnrhs: uint8(2)}, t53{Xlhs: uint8(182), Xnrhs: uint8(2)}, t53{Xlhs: uint8(161)}, t53{Xlhs: uint8(184), Xnrhs: uint8(1)}, t53{Xlhs: uint8(185), Xnrhs: uint8(2)}, t53{Xlhs: uint8(185), Xnrhs: uint8(7)}, t53{Xlhs: uint8(185), Xnrhs: uint8(5)}, t53{Xlhs: uint8(185), Xnrhs: uint8(5)}, t53{Xlhs: uint8(185), Xnrhs: uint8(10)}, t53{Xlhs: uint8(188)}, t53{Xlhs: uint8(174)}, t53{Xlhs: uint8(174), Xnrhs: uint8(3)}, t53{Xlhs: uint8(189)}, t53{Xlhs: uint8(189), Xnrhs: uint8(2)}, t53{Xlhs: uint8(190), Xnrhs: uint8(1)}, t53{Xlhs: uint8(190), Xnrhs: uint8(1)}, t53{Xlhs: uint8(149), Xnrhs: uint8(4)}, t53{Xlhs: uint8(192), Xnrhs: uint8(2)}, t53{Xlhs: uint8(192)}, t53{Xlhs: uint8(149), Xnrhs: uint8(9)}, t53{Xlhs: uint8(149), Xnrhs: uint8(4)}, t53{Xlhs: uint8(149), Xnrhs: uint8(1)}, t53{Xlhs: uint8(163), Xnrhs: uint8(2)}, t53{Xlhs: uint8(194), Xnrhs: uint8(3)}, t53{Xlhs: uint8(197), Xnrhs: uint8(1)}, t53{Xlhs: uint8(197), Xnrhs: uint8(2)}, t53{Xlhs: uint8(197), Xnrhs: uint8(1)}, t53{Xlhs: uint8(195), Xnrhs: uint8(9)}, t53{Xlhs: uint8(206), Xnrhs: uint8(4)}, t53{Xlhs: uint8(206), Xnrhs: uint8(5)}, t53{Xlhs: uint8(198), Xnrhs: uint8(1)}, t53{Xlhs: uint8(198), Xnrhs: uint8(1)}, t53{Xlhs: uint8(198)}, t53{Xlhs: uint8(209)}, t53{Xlhs: uint8(199), Xnrhs: uint8(3)}, t53{Xlhs: uint8(199), Xnrhs: uint8(2)}, t53{Xlhs: uint8(199), Xnrhs: uint8(4)}, t53{Xlhs: uint8(210), Xnrhs: uint8(2)}, t53{Xlhs: uint8(210)}, t53{Xlhs: uint8(200)}, t53{Xlhs: uint8(200), Xnrhs: uint8(2)}, t53{Xlhs: uint8(212), Xnrhs: uint8(2)}, t53{Xlhs: uint8(212)}, t53{Xlhs: uint8(211), Xnrhs: uint8(7)}, t53{Xlhs: uint8(211), Xnrhs: uint8(9)}, t53{Xlhs: uint8(211), Xnrhs: uint8(7)}, t53{Xlhs: uint8(211), Xnrhs: uint8(7)}, t53{Xlhs: uint8(159)}, t53{Xlhs: uint8(159), Xnrhs: uint8(2)}, t53{Xlhs: uint8(193), Xnrhs: uint8(2)}, t53{Xlhs: uint8(213), Xnrhs: uint8(1)}, t53{Xlhs: uint8(213), Xnrhs: uint8(2)}, t53{Xlhs: uint8(213), Xnrhs: uint8(3)}, t53{Xlhs: uint8(213), Xnrhs: uint8(4)}, t53{Xlhs: uint8(215), Xnrhs: uint8(2)}, t53{Xlhs: uint8(215)}, t53{Xlhs: uint8(214)}, t53{Xlhs: uint8(214), Xnrhs: uint8(3)}, t53{Xlhs: uint8(214), Xnrhs: uint8(2)}, t53{Xlhs: uint8(216), Xnrhs: uint8(4)}, t53{Xlhs: uint8(216)}, t53{Xlhs: uint8(204)}, t53{Xlhs: uint8(204), Xnrhs: uint8(3)}, t53{Xlhs: uint8(186), Xnrhs: uint8(4)}, t53{Xlhs: uint8(186), Xnrhs: uint8(2)}, t53{Xlhs: uint8(175), Xnrhs: uint8(1)}, t53{Xlhs: uint8(175), Xnrhs: uint8(1)}, t53{Xlhs: uint8(175)}, t53{Xlhs: uint8(202)}, t53{Xlhs: uint8(202), Xnrhs: uint8(3)}, t53{Xlhs: uint8(203)}, t53{Xlhs: uint8(203), Xnrhs: uint8(2)}, t53{Xlhs: uint8(205)}, t53{Xlhs: uint8(205), Xnrhs: uint8(2)}, t53{Xlhs: uint8(205), Xnrhs: uint8(4)}, t53{Xlhs: uint8(205), Xnrhs: uint8(4)}, t53{Xlhs: uint8(149), Xnrhs: uint8(6)}, t53{Xlhs: uint8(201)}, t53{Xlhs: uint8(201), Xnrhs: uint8(2)}, t53{Xlhs: uint8(149), Xnrhs: uint8(8)}, t53{Xlhs: uint8(218), Xnrhs: uint8(5)}, t53{Xlhs: uint8(218), Xnrhs: uint8(7)}, t53{Xlhs: uint8(218), Xnrhs: uint8(3)}, t53{Xlhs: uint8(218), Xnrhs: uint8(5)}, t53{Xlhs: uint8(149), Xnrhs: uint8(6)}, t53{Xlhs: uint8(149), Xnrhs: uint8(7)}, t53{Xlhs: uint8(219), Xnrhs: uint8(2)}, t53{Xlhs: uint8(219), Xnrhs: uint8(1)}, t53{Xlhs: uint8(220)}, t53{Xlhs: uint8(220), Xnrhs: uint8(3)}, t53{Xlhs: uint8(217), Xnrhs: uint8(3)}, t53{Xlhs: uint8(217), Xnrhs: uint8(1)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(172), Xnrhs: uint8(1)}, t53{Xlhs: uint8(173), Xnrhs: uint8(1)}, t53{Xlhs: uint8(173), Xnrhs: uint8(1)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(5)}, t53{Xlhs: uint8(172), Xnrhs: uint8(1)}, t53{Xlhs: uint8(172), Xnrhs: uint8(1)}, t53{Xlhs: uint8(172), Xnrhs: uint8(1)}, t53{Xlhs: uint8(173), Xnrhs: uint8(1)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(6)}, t53{Xlhs: uint8(173), Xnrhs: uint8(5)}, t53{Xlhs: uint8(173), Xnrhs: uint8(4)}, t53{Xlhs: uint8(172), Xnrhs: uint8(1)}, t53{Xlhs: uint8(173), Xnrhs: uint8(5)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(221), Xnrhs: uint8(2)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(5)}, t53{Xlhs: uint8(173), Xnrhs: uint8(2)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(4)}, t53{Xlhs: uint8(173), Xnrhs: uint8(2)}, t53{Xlhs: uint8(173), Xnrhs: uint8(2)}, t53{Xlhs: uint8(173), Xnrhs: uint8(2)}, t53{Xlhs: uint8(173), Xnrhs: uint8(2)}, t53{Xlhs: uint8(222), Xnrhs: uint8(1)}, t53{Xlhs: uint8(222), Xnrhs: uint8(2)}, t53{Xlhs: uint8(173), Xnrhs: uint8(5)}, t53{Xlhs: uint8(223), Xnrhs: uint8(1)}, t53{Xlhs: uint8(223), Xnrhs: uint8(2)}, t53{Xlhs: uint8(173), Xnrhs: uint8(5)}, t53{Xlhs: uint8(173), Xnrhs: uint8(3)}, t53{Xlhs: uint8(173), Xnrhs: uint8(5)}, t53{Xlhs: uint8(173), Xnrhs: uint8(5)}, t53{Xlhs: uint8(173), Xnrhs: uint8(4)}, t53{Xlhs: uint8(173), Xnrhs: uint8(5)}, t53{Xlhs: uint8(226), Xnrhs: uint8(5)}, t53{Xlhs: uint8(226), Xnrhs: uint8(4)}, t53{Xlhs: uint8(227), Xnrhs: uint8(2)}, t53{Xlhs: uint8(227)}, t53{Xlhs: uint8(225), Xnrhs: uint8(1)}, t53{Xlhs: uint8(225)}, t53{Xlhs: uint8(208)}, t53{Xlhs: uint8(207), Xnrhs: uint8(3)}, t53{Xlhs: uint8(207), Xnrhs: uint8(1)}, t53{Xlhs: uint8(224)}, t53{Xlhs: uint8(224), Xnrhs: uint8(3)}, t53{Xlhs: uint8(149), Xnrhs: uint8(12)}, t53{Xlhs: uint8(228), Xnrhs: uint8(1)}, t53{Xlhs: uint8(228)}, t53{Xlhs: uint8(177)}, t53{Xlhs: uint8(177), Xnrhs: uint8(3)}, t53{Xlhs: uint8(187), Xnrhs: uint8(5)}, t53{Xlhs: uint8(187), Xnrhs: uint8(3)}, t53{Xlhs: uint8(229)}, t53{Xlhs: uint8(229), Xnrhs: uint8(2)}, t53{Xlhs: uint8(149), Xnrhs: uint8(4)}, t53{Xlhs: uint8(149), Xnrhs: uint8(1)}, t53{Xlhs: uint8(149), Xnrhs: uint8(2)}, t53{Xlhs: uint8(149), Xnrhs: uint8(3)}, t53{Xlhs: uint8(149), Xnrhs: uint8(5)}, t53{Xlhs: uint8(149), Xnrhs: uint8(6)}, t53{Xlhs: uint8(149), Xnrhs: uint8(5)}, t53{Xlhs: uint8(149), Xnrhs: uint8(6)}, t53{Xlhs: uint8(169), Xnrhs: uint8(2)}, t53{Xlhs: uint8(170), Xnrhs: uint8(2)}, t53{Xlhs: uint8(149), Xnrhs: uint8(5)}, t53{Xlhs: uint8(231), Xnrhs: uint8(11)}, t53{Xlhs: uint8(233), Xnrhs: uint8(1)}, t53{Xlhs: uint8(233), Xnrhs: uint8(1)}, t53{Xlhs: uint8(233), Xnrhs: uint8(2)}, t53{Xlhs: uint8(233)}, t53{Xlhs: uint8(234), Xnrhs: uint8(1)}, t53{Xlhs: uint8(234), Xnrhs: uint8(1)}, t53{Xlhs: uint8(234), Xnrhs: uint8(3)}, t53{Xlhs: uint8(236)}, t53{Xlhs: uint8(236), Xnrhs: uint8(2)}, t53{Xlhs: uint8(232), Xnrhs: uint8(3)}, t53{Xlhs: uint8(232), Xnrhs: uint8(2)}, t53{Xlhs: uint8(238), Xnrhs: uint8(3)}, t53{Xlhs: uint8(239), Xnrhs: uint8(3)}, t53{Xlhs: uint8(239), Xnrhs: uint8(2)}, t53{Xlhs: uint8(237), Xnrhs: uint8(7)}, t53{Xlhs: uint8(237), Xnrhs: uint8(5)}, t53{Xlhs: uint8(237), Xnrhs: uint8(5)}, t53{Xlhs: uint8(237), Xnrhs: uint8(1)}, t53{Xlhs: uint8(173), Xnrhs: uint8(4)}, t53{Xlhs: uint8(173), Xnrhs: uint8(6)}, t53{Xlhs: uint8(191), Xnrhs: uint8(1)}, t53{Xlhs: uint8(191), Xnrhs: uint8(1)}, t53{Xlhs: uint8(191), Xnrhs: uint8(1)}, t53{Xlhs: uint8(149), Xnrhs: uint8(4)}, t53{Xlhs: uint8(149), Xnrhs: uint8(6)}, t53{Xlhs: uint8(149), Xnrhs: uint8(3)}, t53{Xlhs: uint8(241)}, t53{Xlhs: uint8(241), Xnrhs: uint8(2)}, t53{Xlhs: uint8(149), Xnrhs: uint8(1)}, t53{Xlhs: uint8(149), Xnrhs: uint8(3)}, t53{Xlhs: uint8(149), Xnrhs: uint8(1)}, t53{Xlhs: uint8(149), Xnrhs: uint8(3)}, t53{Xlhs: uint8(149), Xnrhs: uint8(6)}, t53{Xlhs: uint8(149), Xnrhs: uint8(7)}, t53{Xlhs: uint8(242), Xnrhs: uint8(1)}, t53{Xlhs: uint8(149), Xnrhs: uint8(1)}, t53{Xlhs: uint8(149), Xnrhs: uint8(4)}, t53{Xlhs: uint8(244), Xnrhs: uint8(8)}, t53{Xlhs: uint8(246)}, t53{Xlhs: uint8(247), Xnrhs: uint8(1)}, t53{Xlhs: uint8(247), Xnrhs: uint8(3)}, t53{Xlhs: uint8(248), Xnrhs: uint8(1)}, t53{Xlhs: uint8(196)}, t53{Xlhs: uint8(196), Xnrhs: uint8(2)}, t53{Xlhs: uint8(196), Xnrhs: uint8(3)}, t53{Xlhs: uint8(250), Xnrhs: uint8(6)}, t53{Xlhs: uint8(250), Xnrhs: uint8(8)}, t53{Xlhs: uint8(144), Xnrhs: uint8(1)}, t53{Xlhs: uint8(145), Xnrhs: uint8(2)}, t53{Xlhs: uint8(145), Xnrhs: uint8(1)}, t53{Xlhs: uint8(146), Xnrhs: uint8(1)}, t53{Xlhs: uint8(146), Xnrhs: uint8(3)}, t53{Xlhs: uint8(147)}, t53{Xlhs: uint8(151)}, t53{Xlhs: uint8(151), Xnrhs: uint8(1)}, t53{Xlhs: uint8(151), Xnrhs: uint8(2)}, t53{Xlhs: uint8(153), Xnrhs: uint8(1)}, t53{Xlhs: uint8(153)}, t53{Xlhs: uint8(149), Xnrhs: uint8(2)}, t53{Xlhs: uint8(160), Xnrhs: uint8(4)}, t53{Xlhs: uint8(160), Xnrhs: uint8(2)}, t53{Xlhs: uint8(152), Xnrhs: uint8(1)}, t53{Xlhs: uint8(152), Xnrhs: uint8(1)}, t53{Xlhs: uint8(152), Xnrhs: uint8(1)}, t53{Xlhs: uint8(166), Xnrhs: uint8(1)}, t53{Xlhs: uint8(167), Xnrhs: uint8(1)}, t53{Xlhs: uint8(168), Xnrhs: uint8(1)}, t53{Xlhs: uint8(168), Xnrhs: uint8(1)}, t53{Xlhs: uint8(165), Xnrhs: uint8(2)}, t53{Xlhs: uint8(165)}, t53{Xlhs: uint8(171), Xnrhs: uint8(2)}, t53{Xlhs: uint8(161), Xnrhs: uint8(2)}, t53{Xlhs: uint8(183), Xnrhs: uint8(3)}, t53{Xlhs: uint8(183), Xnrhs: uint8(1)}, t53{Xlhs: uint8(184)}, t53{Xlhs: uint8(188), Xnrhs: uint8(1)}, t53{Xlhs: uint8(190), Xnrhs: uint8(1)}, t53{Xlhs: uint8(194), Xnrhs: uint8(1)}, t53{Xlhs: uint8(195), Xnrhs: uint8(1)}, t53{Xlhs: uint8(209), Xnrhs: uint8(2)}, t53{Xlhs: uint8(210), Xnrhs: uint8(1)}, t53{Xlhs: uint8(173), Xnrhs: uint8(1)}, t53{Xlhs: uint8(221), Xnrhs: uint8(1)}, t53{Xlhs: uint8(208), Xnrhs: uint8(1)}, t53{Xlhs: uint8(230), Xnrhs: uint8(1)}, t53{Xlhs: uint8(230), Xnrhs: uint8(1)}, t53{Xlhs: uint8(230), Xnrhs: uint8(1)}, t53{Xlhs: uint8(230), Xnrhs: uint8(1)}, t53{Xlhs: uint8(230), Xnrhs: uint8(1)}, t53{Xlhs: uint8(169), Xnrhs: uint8(1)}, t53{Xlhs: uint8(235)}, t53{Xlhs: uint8(235), Xnrhs: uint8(3)}, t53{Xlhs: uint8(238), Xnrhs: uint8(1)}, t53{Xlhs: uint8(239)}, t53{Xlhs: uint8(240), Xnrhs: uint8(1)}, t53{Xlhs: uint8(240)}, t53{Xlhs: uint8(243)}, t53{Xlhs: uint8(243), Xnrhs: uint8(1)}, t53{Xlhs: uint8(245), Xnrhs: uint8(1)}, t53{Xlhs: uint8(245), Xnrhs: uint8(3)}, t53{Xlhs: uint8(246), Xnrhs: uint8(2)}, t53{Xlhs: uint8(249)}, t53{Xlhs: uint8(249), Xnrhs: uint8(4)}, t53{Xlhs: uint8(249), Xnrhs: uint8(2)}}
}
+// C comment
+// /* For tracing reduce actions, the names of all rules are required.
+// */
var _yyRuleName [332]*int8
func init() {
- _yyRuleName = [332]*int8{str(27873), str(27893), str(27924), str(27937), str(27971), str(27985), str(28008), str(28032), str(28056), str(28081), str(28103), str(28130), str(28151), str(28184), str(28231), str(28288), str(28308), str(28324), str(28354), str(28368), str(28377), str(28443), str(28475), str(28493), str(28522), str(28550), str(28564), str(28600), str(28649), str(28681), str(28705), str(28728), str(28757), str(28785), str(28814), str(28843), str(28869), str(28916), str(28940), str(28967), str(29011), str(29037), str(29065), str(29077), str(29098), str(29110), str(29137), str(29157), str(29185), str(29213), str(29241), str(29261), str(29284), str(29303), str(29323), str(29344), str(29402), str(29456), str(29483), str(29529), str(29576), str(29593), str(29614), str(29638), str(29690), str(29729), str(29763), str(29853), str(29877), str(29888), str(29923), str(29934), str(29960), str(29983), str(30007), str(30044), str(30067), str(30080), str(30149), str(30185), str(30200), str(30229), str(30284), str(30309), str(30338), str(30374), str(30475), str(30509), str(30548), str(30570), str(30587), str(30600), str(30609), str(30637), str(30662), str(30694), str(30707), str(30714), str(30723), str(30748), str(30781), str(30796), str(30862), str(30931), str(30990), str(31053), str(31062), str(31078), str(31099), str(31121), str(31145), str(31172), str(31202), str(31221), str(31232), str(31248), str(31278), str(31306), str(31339), str(31353), str(31369), str(31403), str(31446), str(31474), str(31492), str(31511), str(31525), str(31541), str(31576), str(31591), str(31618), str(31632), str(31657), str(31694), str(31730), str(31786), str(31800), str(31825), str(31895), str(31932), str(31979), str(32002), str(32035), str(32091), str(32155), str(32184), str(32207), str(32222), str(32250), str(32277), str(32291), str(32311), str(32325), str(32345), str(32362), str(32381), str(32407), str(32427), str(32443), str(32460), str(32478), str(32510), str(32548), str(32592), str(32623), str(32641), str(32677), str(32700), str(32722), str(32753), str(32778), str(32824), str(32854), str(32888), str(32914), str(32943), str(32969), str(33007), str(33036), str(33059), str(33081), str(33107), str(33125), str(33146), str(33166), str(33185), str(33208), str(33235), str(33274), str(33287), str(33304), str(33339), str(33361), str(33394), str(33437), str(33466), str(33521), str(33573), str(33611), str(33635), str(33649), str(33671), str(33688), str(33701), str(33736), str(33755), str(33774), str(33808), str(33893), str(33915), str(33930), str(33946), str(33976), str(34023), str(34056), str(34068), str(34098), str(34135), str(34150), str(34168), str(34191), str(34223), str(34258), str(34294), str(34333), str(34365), str(34399), str(34456), str(34572), str(34596), str(34619), str(34647), str(34664), str(34696), str(34721), str(34756), str(34772), str(34798), str(34853), str(34891), str(34910), str(34936), str(34960), str(35025), str(35080), str(35131), str(35154), str(35182), str(35222), str(35245), str(35265), str(35284), str(35323), str(35375), str(35411), str(35423), str(35444), str(35460), str(35484), str(35500), str(35524), str(35566), str(35643), str(35676), str(35696), str(35734), str(35802), str(35814), str(35835), str(35866), str(35876), str(35885), str(35906), str(35937), str(35979), str(36034), str(36052), str(36077), str(36094), str(36108), str(36135), str(36147), str(36161), str(36187), str(36216), str(36244), str(36262), str(36301), str(36353), str(36388), str(36406), str(36420), str(36435), str(36458), str(36481), str(36501), str(36522), str(36550), str(36563), str(36585), str(36617), str(36656), str(36675), str(36690), str(36730), str(36756), str(36783), str(36804), str(36830), str(36847), str(36861), str(36886), str(36909), str(36928), str(36941), str(36954), str(36971), str(36989), str(37016), str(37035), str(37067), str(37079), str(37091), str(37120), str(37140), str(37157), str(37183), str(37207), str(37249), str(37282), str(37294), str(37328)}
+ _yyRuleName = [332]*int8{str(27828), str(27848), str(27879), str(27892), str(27926), str(27940), str(27963), str(27987), str(28011), str(28036), str(28058), str(28085), str(28106), str(28139), str(28186), str(28243), str(28263), str(28279), str(28309), str(28323), str(28332), str(28398), str(28430), str(28448), str(28477), str(28505), str(28519), str(28555), str(28604), str(28636), str(28660), str(28683), str(28712), str(28740), str(28769), str(28798), str(28824), str(28871), str(28895), str(28922), str(28966), str(28992), str(29020), str(29032), str(29053), str(29065), str(29092), str(29112), str(29140), str(29168), str(29196), str(29216), str(29239), str(29258), str(29278), str(29299), str(29357), str(29411), str(29438), str(29484), str(29531), str(29548), str(29569), str(29593), str(29645), str(29684), str(29718), str(29808), str(29832), str(29843), str(29878), str(29889), str(29915), str(29938), str(29962), str(29999), str(30022), str(30035), str(30104), str(30140), str(30155), str(30184), str(30239), str(30264), str(30293), str(30329), str(30430), str(30464), str(30503), str(30525), str(30542), str(30555), str(30564), str(30592), str(30617), str(30649), str(30662), str(30669), str(30678), str(30703), str(30736), str(30751), str(30817), str(30886), str(30945), str(31008), str(31017), str(31033), str(31054), str(31076), str(31100), str(31127), str(31157), str(31176), str(31187), str(31203), str(31233), str(31261), str(31294), str(31308), str(31324), str(31358), str(31401), str(31429), str(31447), str(31466), str(31480), str(31496), str(31531), str(31546), str(31573), str(31587), str(31612), str(31649), str(31685), str(31741), str(31755), str(31780), str(31850), str(31887), str(31934), str(31957), str(31990), str(32046), str(32110), str(32139), str(32162), str(32177), str(32205), str(32232), str(32246), str(32266), str(32280), str(32300), str(32317), str(32336), str(32362), str(32382), str(32398), str(32415), str(32433), str(32465), str(32503), str(32547), str(32578), str(32596), str(32632), str(32655), str(32677), str(32708), str(32733), str(32779), str(32809), str(32843), str(32869), str(32898), str(32924), str(32962), str(32991), str(33014), str(33036), str(33062), str(33080), str(33101), str(33121), str(33140), str(33163), str(33190), str(33229), str(33242), str(33259), str(33294), str(33316), str(33349), str(33392), str(33421), str(33476), str(33528), str(33566), str(33590), str(33604), str(33626), str(33643), str(33656), str(33691), str(33710), str(33729), str(33763), str(33848), str(33870), str(33885), str(33901), str(33931), str(33978), str(34011), str(34023), str(34053), str(34090), str(34105), str(34123), str(34146), str(34178), str(34213), str(34249), str(34288), str(34320), str(34354), str(34411), str(34527), str(34551), str(34574), str(34602), str(34619), str(34651), str(34676), str(34711), str(34727), str(34753), str(34808), str(34846), str(34865), str(34891), str(34915), str(34980), str(35035), str(35086), str(35109), str(35137), str(35177), str(35200), str(35220), str(35239), str(35278), str(35330), str(35366), str(35378), str(35399), str(35415), str(35439), str(35455), str(35479), str(35521), str(35598), str(35631), str(35651), str(35689), str(35757), str(35769), str(35790), str(35821), str(35831), str(35840), str(35861), str(35892), str(35934), str(35989), str(36007), str(36032), str(36049), str(36063), str(36090), str(36102), str(36116), str(36142), str(36171), str(36199), str(36217), str(36256), str(36308), str(36343), str(36361), str(36375), str(36390), str(36413), str(36436), str(36456), str(36477), str(36505), str(36518), str(36540), str(36572), str(36611), str(36630), str(36645), str(36685), str(36711), str(36738), str(36759), str(36785), str(36802), str(36816), str(36841), str(36864), str(36883), str(36896), str(36909), str(36926), str(36944), str(36971), str(36990), str(37022), str(37034), str(37046), str(37075), str(37095), str(37112), str(37138), str(37162), str(37204), str(37237), str(37249), str(37283)}
}
-// This routine is called after a single SQL statement has been
-// parsed and a VDBE program to execute that statement has been
-// prepared. This routine puts the finishing touches on the
-// VDBE program and resets the pParse structure for the next
-// parse.
-//
-// Note that if an error occurred, it might be the case that
-// no VDBE code was generated.
+// C comment
+// /*
+// ** This routine is called after a single SQL statement has been
+// ** parsed and a VDBE program to execute that statement has been
+// ** prepared. This routine puts the finishing touches on the
+// ** VDBE program and resets the pParse structure for the next
+// ** parse.
+// **
+// ** Note that if an error occurred, it might be the case that
+// ** no VDBE code was generated.
+// */
func _sqlite3FinishCoding(tls *crt.TLS, _pParse *XParse) {
var _3_iDb, _3_i int32
var _5_vtab *int8
@@ -27387,123 +27966,123 @@ func _sqlite3FinishCoding(tls *crt.TLS, _pParse *XParse) {
var _v *TVdbe
var _6_pEL *XExprList
func() {
- if (*XParse)(_pParse.X39) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99832), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FinishCodingØ00__func__Ø000))), unsafe.Pointer(str(37352)))
+ if (*XParse)(_pParse.XpToplevel) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99832), unsafe.Pointer(&_sqlite3FinishCodingØ00__func__Ø000), unsafe.Pointer(str(37307)))
crt.X__builtin_abort(tls)
}
}()
- _db = (*Xsqlite3)(_pParse.X0)
- if (_pParse.X6) != 0 {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pParse.Xnested != 0 {
return
}
- if (_db.X17) == 0 && (_pParse.X16) == 0 {
+ if _db.XmallocFailed == 0 && _pParse.XnErr == 0 {
goto _4
}
- if (_pParse.X3) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(1)
+ if _pParse.Xrc == int32(0) {
+ _pParse.Xrc = int32(1)
}
return
_4:
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
- if (_pParse.X8) != 0 && _sqlite3VdbeAssertMayAbort(tls, _v, int32(_pParse.X9)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99844), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FinishCodingØ00__func__Ø000))), unsafe.Pointer(str(37373)))
+ if _pParse.XisMultiWrite != 0 && _sqlite3VdbeAssertMayAbort(tls, _v, int32(_pParse.XmayAbort)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99844), unsafe.Pointer(&_sqlite3FinishCodingØ00__func__Ø000), unsafe.Pointer(str(37328)))
crt.X__builtin_abort(tls)
}
}()
if _v == nil {
goto _9
}
- _sqlite3VdbeAddOp0(tls, _v, i32(55))
- if int32(_db.X17) != i32(0) || (_pParse.X30) == uint32(i32(0)) && (*XExprList)(_pParse.X27) == nil {
+ _sqlite3VdbeAddOp0(tls, _v, int32(55))
+ if int32(_db.XmallocFailed) != int32(0) || _pParse.XcookieMask == (0) && _pParse.XpConstExpr == nil {
goto _12
}
func() {
- if int32(_sqlite3VdbeGetOp(tls, _v, i32(0)).X0) != i32(51) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99870), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FinishCodingØ00__func__Ø000))), unsafe.Pointer(str(37445)))
+ if int32(_sqlite3VdbeGetOp(tls, _v, int32(0)).Xopcode) != int32(51) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99870), unsafe.Pointer(&_sqlite3FinishCodingØ00__func__Ø000), unsafe.Pointer(str(37400)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeJumpHere(tls, _v, i32(0))
- _3_iDb = i32(0)
+ _sqlite3VdbeJumpHere(tls, _v, int32(0))
+ _3_iDb = int32(0)
_15:
- if _3_iDb >= (_db.X5) {
+ if _3_iDb >= _db.XnDb {
goto _18
}
- if bool2int(((_pParse.X30)&(u32(1)<<uint(_3_iDb))) != uint32(i32(0))) == i32(0) {
+ if bool2int((_pParse.XcookieMask&(uint32(1)<<uint(_3_iDb))) != (0)) == int32(0) {
goto _16
}
_sqlite3VdbeUsesBtree(tls, _v, _3_iDb)
- _4_pSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_3_iDb))).X4)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(2), _3_iDb, bool2int(((_pParse.X29)&(u32(1)<<uint(_3_iDb))) != uint32(i32(0))), _4_pSchema.X0, _4_pSchema.X1)
- if int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) == i32(0) {
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(1)))
+ _4_pSchema = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_3_iDb)).XpSchema)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(2), _3_iDb, bool2int((_pParse.XwriteMask&(uint32(1)<<uint(_3_iDb))) != (0)), _4_pSchema.Xschema_cookie, _4_pSchema.XiGeneration)
+ if int32(_db.Xinit.Xbusy) == int32(0) {
+ _sqlite3VdbeChangeP5(tls, _v, uint16(1))
}
- _sqlite3VdbeComment(tls, _v, str(37485), bool2int(((_pParse.X9) != 0) && ((_pParse.X8) != 0)))
+ _sqlite3VdbeComment(tls, _v, str(37440), bool2int((_pParse.XmayAbort != 0) && (_pParse.XisMultiWrite != 0)))
_16:
_3_iDb += 1
goto _15
_18:
- _3_i = i32(0)
+ _3_i = int32(0)
_22:
- if _3_i >= (_pParse.X56) {
+ if _3_i >= _pParse.XnVtabLock {
goto _25
}
- _5_vtab = (*int8)(unsafe.Pointer(_sqlite3GetVTable(tls, _db, *(**XTable)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParse.X67)) + 4*uintptr(_3_i))))))
- _sqlite3VdbeAddOp4(tls, _v, i32(155), i32(0), i32(0), i32(0), _5_vtab, i32(-8))
+ _5_vtab = (*int8)(unsafe.Pointer(_sqlite3GetVTable(tls, _db, *elem59((**XTable)(unsafe.Pointer(_pParse.XapVtabLock)), uintptr(_3_i)))))
+ _sqlite3VdbeAddOp4(tls, _v, int32(155), int32(0), int32(0), int32(0), _5_vtab, int32(-8))
_3_i += 1
goto _22
_25:
- *(*int32)(unsafe.Pointer(&(_pParse.X56))) = i32(0)
+ _pParse.XnVtabLock = int32(0)
_codeTableLocks(tls, _pParse)
_sqlite3AutoincrementBegin(tls, _pParse)
- if (*XExprList)(_pParse.X27) == nil {
+ if _pParse.XpConstExpr == nil {
goto _26
}
- _6_pEL = (*XExprList)(_pParse.X27)
- *(*uint8)(unsafe.Pointer(&(_pParse.X11))) = uint8(i32(0))
- _3_i = i32(0)
+ _6_pEL = (*XExprList)(_pParse.XpConstExpr)
+ _pParse.XokConstFactor = 0
+ _3_i = int32(0)
_27:
- if _3_i >= (_6_pEL.X0) {
+ if _3_i >= _6_pEL.XnExpr {
goto _30
}
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_6_pEL.X2)))))+20*uintptr(_3_i))).X0), *(*int32)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_6_pEL.X2))))) + 20*uintptr(_3_i))).X5))))))
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_6_pEL.Xa)), uintptr(_3_i)).XpExpr), *(*int32)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&_6_pEL.Xa)), uintptr(_3_i)).Xu))))
_3_i += 1
goto _27
_30:
_26:
- _sqlite3VdbeGoto(tls, _v, i32(1))
+ _sqlite3VdbeGoto(tls, _v, int32(1))
_12:
_9:
- if _v == nil || (_pParse.X16) != i32(0) || (_db.X17) != 0 {
+ if _v == nil || _pParse.XnErr != int32(0) || _db.XmallocFailed != 0 {
goto _33
}
func() {
- if (_pParse.X23) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99924), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FinishCodingØ00__func__Ø000))), unsafe.Pointer(str(37504)))
+ if _pParse.XiCacheLevel != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99924), unsafe.Pointer(&_sqlite3FinishCodingØ00__func__Ø000), unsafe.Pointer(str(37459)))
crt.X__builtin_abort(tls)
}
}()
- if ((*TAggInfo_func)(_pParse.X38) != nil) && ((_pParse.X17) == i32(0)) {
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) = i32(1)
+ if ((*XAutoincInfo)(_pParse.XpAinc) != nil) && (_pParse.XnTab == int32(0)) {
+ _pParse.XnTab = int32(1)
}
_sqlite3VdbeMakeReady(tls, _v, _pParse)
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(101)
+ _pParse.Xrc = int32(101)
goto _38
_33:
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(1)
+ _pParse.Xrc = int32(1)
_38:
}
var _sqlite3FinishCodingØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FinishCodingØ00__func__Ø000[0], str(37527), 20)
+ crt.Xstrncpy(nil, &_sqlite3FinishCodingØ00__func__Ø000[0], str(37482), 20)
}
func _sqlite3GetVdbe(tls *crt.TLS, _pParse *XParse) (r0 *TVdbe) {
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
return func() *TVdbe {
if _v != nil {
return _v
@@ -27512,60 +28091,66 @@ func _sqlite3GetVdbe(tls *crt.TLS, _pParse *XParse) (r0 *TVdbe) {
}()
}
-// Get a VDBE for the given parser context. Create a new one if necessary.
-// If an error occurs, return NULL and leave a message in pParse.
+// C comment
+// /*
+// ** Get a VDBE for the given parser context. Create a new one if necessary.
+// ** If an error occurs, return NULL and leave a message in pParse.
+// */
func _allocVdbe(tls *crt.TLS, _pParse *XParse) (r0 *TVdbe) {
var _v *TVdbe
- _v = store38((**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X2))))), _sqlite3VdbeCreate(tls, _pParse))
+ _v = store60((**TVdbe)(unsafe.Pointer(&_pParse.XpVdbe)), _sqlite3VdbeCreate(tls, _pParse))
if _v != nil {
- _sqlite3VdbeAddOp2(tls, _v, i32(51), i32(0), i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(51), int32(0), int32(1))
}
- if ((*XParse)(_pParse.X39) == nil) && ((int32((*Xsqlite3)(_pParse.X0).X13) & i32(8)) == i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pParse.X11))) = uint8(i32(1))
+ if ((*XParse)(_pParse.XpToplevel) == nil) && ((int32((*Xsqlite3)(_pParse.Xdb).XdbOptFlags) & int32(8)) == int32(0)) {
+ _pParse.XokConstFactor = uint8(1)
}
return _v
}
-// Create a new virtual database engine.
+// C comment
+// /*
+// ** Create a new virtual database engine.
+// */
func _sqlite3VdbeCreate(tls *crt.TLS, _pParse *XParse) (r0 *TVdbe) {
var _db *Xsqlite3
var _p *TVdbe
- _db = (*Xsqlite3)(_pParse.X0)
- _p = (*TVdbe)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(204))))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _p = (*TVdbe)(_sqlite3DbMallocRawNN(tls, _db, uint64(204)))
if _p == nil {
return nil
}
- crt.Xmemset(tls, (unsafe.Pointer)((*unsafe.Pointer)(unsafe.Pointer(&(_p.X17)))), i32(0), u32(120))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _db
- if (*TVdbe)(_db.X1) != nil {
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TVdbe)(_db.X1).X1))))) = _p
+ crt.Xmemset(tls, unsafe.Pointer(&_p.XaOp), int32(0), uint32(120))
+ *(**Xsqlite3)(unsafe.Pointer(&_p.Xdb)) = _db
+ if _db.XpVdbe != nil {
+ *(**TVdbe)(unsafe.Pointer(&((*TVdbe)(_db.XpVdbe).XpPrev))) = _p
}
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = (*TVdbe)(_db.X1)
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = nil
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X1))))) = _p
- *(*uint32)(unsafe.Pointer(&(_p.X5))) = uint32(i32(381479589))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3))))) = _pParse
+ *(**TVdbe)(unsafe.Pointer(&_p.XpNext)) = (*TVdbe)(_db.XpVdbe)
+ *(**TVdbe)(unsafe.Pointer(&_p.XpPrev)) = nil
+ *(**TVdbe)(unsafe.Pointer(&_db.XpVdbe)) = _p
+ _p.Xmagic = uint32(381479589)
+ *(**XParse)(unsafe.Pointer(&_p.XpParse)) = _pParse
func() {
- if (_pParse.X26) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71456), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCreateØ00__func__Ø000))), unsafe.Pointer(str(37547)))
+ if _pParse.XaLabel != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71456), unsafe.Pointer(&_sqlite3VdbeCreateØ00__func__Ø000), unsafe.Pointer(str(37502)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pParse.X25) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71457), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCreateØ00__func__Ø000))), unsafe.Pointer(str(37565)))
+ if _pParse.XnLabel != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71457), unsafe.Pointer(&_sqlite3VdbeCreateØ00__func__Ø000), unsafe.Pointer(str(37520)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pParse.X19) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71458), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCreateØ00__func__Ø000))), unsafe.Pointer(str(37583)))
+ if _pParse.XnOpAlloc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71458), unsafe.Pointer(&_sqlite3VdbeCreateØ00__func__Ø000), unsafe.Pointer(str(37538)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pParse.X20) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71459), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCreateØ00__func__Ø000))), unsafe.Pointer(str(37603)))
+ if _pParse.XszOpAlloc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71459), unsafe.Pointer(&_sqlite3VdbeCreateØ00__func__Ø000), unsafe.Pointer(str(37558)))
crt.X__builtin_abort(tls)
}
}()
@@ -27575,11 +28160,11 @@ func _sqlite3VdbeCreate(tls *crt.TLS, _pParse *XParse) (r0 *TVdbe) {
var _sqlite3VdbeCreateØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeCreateØ00__func__Ø000[0], str(37624), 18)
+ crt.Xstrncpy(nil, &_sqlite3VdbeCreateØ00__func__Ø000[0], str(37579), 18)
}
func _sqlite3VdbeAddOp2(tls *crt.TLS, _p *TVdbe, _op int32, _p1 int32, _p2 int32) (r0 int32) {
- return _sqlite3VdbeAddOp3(tls, _p, _op, _p1, _p2, i32(0))
+ return _sqlite3VdbeAddOp3(tls, _p, _op, _p1, _p2, int32(0))
}
func _sqlite3VdbeAddOp3(tls *crt.TLS, _p *TVdbe, _op int32, _p1 int32, _p2 int32, _p3 int32) (r0 int32) {
@@ -27587,51 +28172,51 @@ func _sqlite3VdbeAddOp3(tls *crt.TLS, _p *TVdbe, _op int32, _p1 int32, _p2 int32
var _2_pParse *XParse
var _pOp *XVdbeOp
var _3_x *TyColCache
- _i = _p.X27
+ _i = _p.XnOp
func() {
- if (_p.X5) != uint32(i32(381479589)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71595), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAddOp3Ø00__func__Ø000))), unsafe.Pointer(str(37642)))
+ if _p.Xmagic != uint32(381479589) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71595), unsafe.Pointer(&_sqlite3VdbeAddOp3Ø00__func__Ø000), unsafe.Pointer(str(37597)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op < i32(0) || _op >= i32(255) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71596), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAddOp3Ø00__func__Ø000))), unsafe.Pointer(str(37668)))
+ if _op < int32(0) || _op >= int32(255) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71596), unsafe.Pointer(&_sqlite3VdbeAddOp3Ø00__func__Ø000), unsafe.Pointer(str(37623)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XParse)(_p.X3).X19) <= _i {
+ if ((*XParse)(_p.XpParse).XnOpAlloc) <= _i {
return _growOp3(tls, _p, _op, _p1, _p2, _p3)
}
- *(*int32)(unsafe.Pointer(&(_p.X27))) += 1
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(_i)))
- *(*uint8)(unsafe.Pointer(&(_pOp.X0))) = uint8(_op)
- *(*uint16)(unsafe.Pointer(&(_pOp.X2))) = uint16(i32(0))
- *(*int32)(unsafe.Pointer(&(_pOp.X3))) = _p1
- *(*int32)(unsafe.Pointer(&(_pOp.X4))) = _p2
- *(*int32)(unsafe.Pointer(&(_pOp.X5))) = _p3
- *(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))) = nil
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(0))
- *(**int8)(unsafe.Pointer(&(_pOp.X7))) = nil
- if (((*Xsqlite3)(_p.X0).X6) & i32(4096)) == 0 {
+ _p.XnOp += 1
+ _pOp = elem61((*XVdbeOp)(_p.XaOp), uintptr(_i))
+ _pOp.Xopcode = uint8(_op)
+ _pOp.Xp5 = 0
+ _pOp.Xp1 = _p1
+ _pOp.Xp2 = _p2
+ _pOp.Xp3 = _p3
+ *(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)) = nil
+ _pOp.Xp4type = 0
+ _pOp.XzComment = nil
+ if (((*Xsqlite3)(_p.Xdb).Xflags) & int32(4096)) == 0 {
goto _6
}
- _2_pParse = (*XParse)(_p.X3)
- _2_jj = store1(&_2_kk, i32(0))
+ _2_pParse = (*XParse)(_p.XpParse)
+ _2_jj = store2(&_2_kk, int32(0))
_7:
- if _2_jj >= int32(_2_pParse.X13) {
+ if _2_jj >= int32(_2_pParse.XnColCache) {
goto _10
}
- _3_x = (*TyColCache)(unsafe.Pointer(uintptr(unsafe.Pointer((*TyColCache)(unsafe.Pointer((*[10]TyColCache)(unsafe.Pointer(&(_2_pParse.X48))))))) + uintptr(unsafe.Pointer((*TyColCache)(unsafe.Pointer(uintptr(unsafe.Pointer((*TyColCache)(unsafe.Pointer(uintptr(_2_jj)))))*uintptr(unsafe.Pointer((*TyColCache)(unsafe.Pointer(uintptr(20)))))))))))
- crt.Xprintf(tls, str(37685), _3_x.X4, _3_x.X0, int32(_3_x.X1))
+ _3_x = (*TyColCache)(unsafe.Pointer(uintptr(unsafe.Pointer(&_2_pParse.XaColCache)) + uintptr(unsafe.Pointer((*TyColCache)(unsafe.Pointer(uintptr(_2_jj)*uintptr(unsafe.Pointer((*TyColCache)(unsafe.Pointer(uintptr(20)))))))))))
+ crt.Xprintf(tls, str(37640), _3_x.XiReg, _3_x.XiTable, int32(_3_x.XiColumn))
_2_kk += 1
_2_jj += 1
goto _7
_10:
if _2_kk != 0 {
- crt.Xprintf(tls, str(37700))
+ crt.Xprintf(tls, str(37655))
}
- _sqlite3VdbePrintOp(tls, nil, _i, (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr(_i))))
+ _sqlite3VdbePrintOp(tls, nil, _i, elem61((*XVdbeOp)(_p.XaOp), uintptr(_i)))
_test_addop_breakpoint(tls)
_6:
return _i
@@ -27640,36 +28225,39 @@ _6:
var _sqlite3VdbeAddOp3Ø00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeAddOp3Ø00__func__Ø000[0], str(37702), 18)
-}
-
-// Add a new instruction to the list of instructions current in the
-// VDBE. Return the address of the new instruction.
-//
-// Parameters:
-//
-// p Pointer to the VDBE
-//
-// op The opcode for this instruction
-//
-// p1, p2, p3 Operands
-//
-// Use the sqlite3VdbeResolveLabel() function to fix an address and
-// the sqlite3VdbeChangeP4() function to change the value of the P4
-// operand.
+ crt.Xstrncpy(nil, &_sqlite3VdbeAddOp3Ø00__func__Ø000[0], str(37657), 18)
+}
+
+// C comment
+// /*
+// ** Add a new instruction to the list of instructions current in the
+// ** VDBE. Return the address of the new instruction.
+// **
+// ** Parameters:
+// **
+// ** p Pointer to the VDBE
+// **
+// ** op The opcode for this instruction
+// **
+// ** p1, p2, p3 Operands
+// **
+// ** Use the sqlite3VdbeResolveLabel() function to fix an address and
+// ** the sqlite3VdbeChangeP4() function to change the value of the P4
+// ** operand.
+// */
func _growOp3(tls *crt.TLS, _p *TVdbe, _op int32, _p1 int32, _p2 int32, _p3 int32) (r0 int32) {
func() {
- if ((*XParse)(_p.X3).X19) > (_p.X27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71585), unsafe.Pointer((*int8)(unsafe.Pointer(&_growOp3Ø00__func__Ø000))), unsafe.Pointer(str(37720)))
+ if ((*XParse)(_p.XpParse).XnOpAlloc) > _p.XnOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71585), unsafe.Pointer(&_growOp3Ø00__func__Ø000), unsafe.Pointer(str(37675)))
crt.X__builtin_abort(tls)
}
}()
- if _growOpArray(tls, _p, i32(1)) != 0 {
- return i32(1)
+ if _growOpArray(tls, _p, int32(1)) != 0 {
+ return int32(1)
}
func() {
- if ((*XParse)(_p.X3).X19) <= (_p.X27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71587), unsafe.Pointer((*int8)(unsafe.Pointer(&_growOp3Ø00__func__Ø000))), unsafe.Pointer(str(37748)))
+ if ((*XParse)(_p.XpParse).XnOpAlloc) <= _p.XnOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71587), unsafe.Pointer(&_growOp3Ø00__func__Ø000), unsafe.Pointer(str(37703)))
crt.X__builtin_abort(tls)
}
}()
@@ -27679,66 +28267,72 @@ func _growOp3(tls *crt.TLS, _p *TVdbe, _op int32, _p1 int32, _p2 int32, _p3 int3
var _growOp3Ø00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_growOp3Ø00__func__Ø000[0], str(37775), 8)
+ crt.Xstrncpy(nil, &_growOp3Ø00__func__Ø000[0], str(37730), 8)
}
-// Resize the Vdbe.aOp array so that it is at least nOp elements larger
-// than its current size. nOp is guaranteed to be less than or equal
-// to 1024/sizeof(Op).
-//
-// If an out-of-memory error occurs while resizing the array, return
-// SQLITE_NOMEM. In this case Vdbe.aOp and Parse.nOpAlloc remain
-// unchanged (this is so that any opcodes already allocated can be
-// correctly deallocated along with the rest of the Vdbe).
+// C comment
+// /*
+// ** Resize the Vdbe.aOp array so that it is at least nOp elements larger
+// ** than its current size. nOp is guaranteed to be less than or equal
+// ** to 1024/sizeof(Op).
+// **
+// ** If an out-of-memory error occurs while resizing the array, return
+// ** SQLITE_NOMEM. In this case Vdbe.aOp and Parse.nOpAlloc remain
+// ** unchanged (this is so that any opcodes already allocated can be
+// ** correctly deallocated along with the rest of the Vdbe).
+// */
func _growOpArray(tls *crt.TLS, _v *TVdbe, _nOp int32) (r0 int32) {
var _nNew int32
var _p *XParse
var _pNew *XVdbeOp
- _p = (*XParse)(_v.X3)
+ _p = (*XParse)(_v.XpParse)
_nNew = func() int32 {
- if (_p.X19) != 0 {
- return ((_p.X19) * i32(2))
+ if _p.XnOpAlloc != 0 {
+ return (_p.XnOpAlloc * int32(2))
}
- return i32(42)
+ return int32(42)
}()
- if _nNew > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_p.X0).X31))))) + 4*uintptr(i32(5))))) {
- _sqlite3OomFault(tls, (*Xsqlite3)(_p.X0))
- return i32(7)
+ if _nNew > (*elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_p.Xdb).XaLimit))), uintptr(5))) {
+ _sqlite3OomFault(tls, (*Xsqlite3)(_p.Xdb))
+ return int32(7)
}
func() {
- if uint32(_nOp) > u32(42) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71546), unsafe.Pointer((*int8)(unsafe.Pointer(&_growOpArrayØ00__func__Ø000))), unsafe.Pointer(str(37783)))
+ if uint32(_nOp) > uint32(42) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71546), unsafe.Pointer(&_growOpArrayØ00__func__Ø000), unsafe.Pointer(str(37738)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nNew < ((_p.X19) + _nOp) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71547), unsafe.Pointer((*int8)(unsafe.Pointer(&_growOpArrayØ00__func__Ø000))), unsafe.Pointer(str(37806)))
+ if _nNew < (_p.XnOpAlloc + _nOp) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71547), unsafe.Pointer(&_growOpArrayØ00__func__Ø000), unsafe.Pointer(str(37761)))
crt.X__builtin_abort(tls)
}
}()
- _pNew = (*XVdbeOp)(_sqlite3DbRealloc(tls, (*Xsqlite3)(_p.X0), _v.X17, uint64(uint32(_nNew)*u32(24))))
+ _pNew = (*XVdbeOp)(_sqlite3DbRealloc(tls, (*Xsqlite3)(_p.Xdb), _v.XaOp, uint64(uint32(_nNew)*uint32(24))))
if _pNew != nil {
- *(*int32)(unsafe.Pointer(&(_p.X20))) = _sqlite3DbMallocSize(tls, (*Xsqlite3)(_p.X0), (unsafe.Pointer)(_pNew))
- *(*int32)(unsafe.Pointer(&(_p.X19))) = int32(uint32(_p.X20) / u32(24))
- *(**XVdbeOp)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_v.X17))))) = _pNew
+ _p.XszOpAlloc = _sqlite3DbMallocSize(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_pNew))
+ _p.XnOpAlloc = int32(uint32(_p.XszOpAlloc) / uint32(24))
+ *(**XVdbeOp)(unsafe.Pointer(&_v.XaOp)) = _pNew
}
return func() int32 {
if _pNew != nil {
- return i32(0)
+ return int32(0)
}
- return _sqlite3NomemError(tls, i32(71554))
+ return _sqlite3NomemError(tls, int32(71554))
}()
}
var _growOpArrayØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_growOpArrayØ00__func__Ø000[0], str(37830), 12)
+ crt.Xstrncpy(nil, &_growOpArrayØ00__func__Ø000[0], str(37785), 12)
}
-// Print a single opcode. This routine is used for debugging only.
+// C comment
+// /*
+// ** Print a single opcode. This routine is used for debugging only.
+// */
func _sqlite3VdbePrintOp(tls *crt.TLS, _pOut *crt.XFILE, _pc int32, _pOp *XVdbeOp) {
var _zP4 *int8
var _zCom [100]int8
@@ -27746,16 +28340,19 @@ func _sqlite3VdbePrintOp(tls *crt.TLS, _pOut *crt.XFILE, _pc int32, _pOp *XVdbeO
if _pOut == nil {
_pOut = (*crt.XFILE)(Xstdout)
}
- _zP4 = _displayP4(tls, _pOp, (*int8)(unsafe.Pointer(&_zPtr)), int32(u32(50)))
- _displayComment(tls, _pOp, _zP4, (*int8)(unsafe.Pointer(&_zCom)), int32(u32(100)))
- crt.Xfprintf(tls, _pOut, _sqlite3VdbePrintOpØ00zFormat1Ø001, _pc, unsafe.Pointer(_sqlite3OpcodeName(tls, int32(_pOp.X0))), _pOp.X3, _pOp.X4, _pOp.X5, unsafe.Pointer(_zP4), int32(_pOp.X2), unsafe.Pointer((*int8)(unsafe.Pointer(&_zCom))))
+ _zP4 = _displayP4(tls, _pOp, (*int8)(unsafe.Pointer(&_zPtr)), int32(50))
+ _displayComment(tls, _pOp, _zP4, (*int8)(unsafe.Pointer(&_zCom)), int32(100))
+ crt.Xfprintf(tls, _pOut, _sqlite3VdbePrintOpØ00zFormat1Ø001, _pc, unsafe.Pointer(_sqlite3OpcodeName(tls, int32(_pOp.Xopcode))), _pOp.Xp1, _pOp.Xp2, _pOp.Xp3, unsafe.Pointer(_zP4), int32(_pOp.Xp5), unsafe.Pointer(&_zCom))
crt.Xfflush(tls, _pOut)
_ = _zPtr
_ = _zCom
}
-// Compute a string that describes the P4 parameter for an opcode.
-// Use zTemp for any required temporary buffer space.
+// C comment
+// /*
+// ** Compute a string that describes the P4 parameter for an opcode.
+// ** Use zTemp for any required temporary buffer space.
+// */
func _displayP4(tls *crt.TLS, _pOp *XVdbeOp, _zTemp *int8, _nTemp int32) (r0 *int8) {
var _2_j, _17_i, _17_n int32
var _17_ai *int32
@@ -27768,182 +28365,182 @@ func _displayP4(tls *crt.TLS, _pOp *XVdbeOp, _zTemp *int8, _nTemp int32) (r0 *in
var _16_pVtab *Xsqlite3_vtab
_zP4 = _zTemp
func() {
- if _nTemp < i32(20) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72711), unsafe.Pointer((*int8)(unsafe.Pointer(&_displayP4Ø00__func__Ø000))), unsafe.Pointer(str(37842)))
+ if _nTemp < int32(20) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72711), unsafe.Pointer(&_displayP4Ø00__func__Ø000), unsafe.Pointer(str(37797)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3StrAccumInit(tls, &_x, nil, _zTemp, _nTemp, i32(0))
- switch int32(_pOp.X1) {
- case i32(-16):
+ _sqlite3StrAccumInit(tls, &_x, nil, _zTemp, _nTemp, int32(0))
+ switch int32(_pOp.Xp4type) {
+ case int32(-16):
goto _6
- case i32(-15):
+ case int32(-15):
goto _15
- case i32(-14):
+ case int32(-14):
goto _14
- case i32(-13):
+ case int32(-13):
goto _13
- case i32(-12):
+ case int32(-12):
goto _12
- case i32(-11):
+ case int32(-11):
goto _8
- case i32(-10):
+ case int32(-10):
goto _7
- case i32(-9):
+ case int32(-9):
goto _9
- case i32(-8):
+ case int32(-8):
goto _11
- case i32(-7):
+ case int32(-7):
goto _10
- case i32(-5):
+ case int32(-5):
goto _3
- case i32(-4):
+ case int32(-4):
goto _5
- case i32(-3):
+ case int32(-3):
goto _4
default:
goto _16
}
_3:
- _2_pKeyInfo = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ _2_pKeyInfo = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
func() {
- if (_2_pKeyInfo.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72717), unsafe.Pointer((*int8)(unsafe.Pointer(&_displayP4Ø00__func__Ø000))), unsafe.Pointer(str(37852)))
+ if _2_pKeyInfo.XaSortOrder == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72717), unsafe.Pointer(&_displayP4Ø00__func__Ø000), unsafe.Pointer(str(37807)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3XPrintf(tls, &_x, str(37876), int32(_2_pKeyInfo.X2))
- _2_j = i32(0)
+ _sqlite3XPrintf(tls, &_x, str(37831), int32(_2_pKeyInfo.XnField))
+ _2_j = int32(0)
_19:
- if _2_j >= int32(_2_pKeyInfo.X2) {
+ if _2_j >= int32(_2_pKeyInfo.XnField) {
goto _22
}
- _3_pColl = *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_2_pKeyInfo.X6))))) + 4*uintptr(_2_j)))
+ _3_pColl = *elem62((**XCollSeq)(unsafe.Pointer(&_2_pKeyInfo.XaColl)), uintptr(_2_j))
_3_zColl = func() *int8 {
if _3_pColl != nil {
- return (_3_pColl.X0)
+ return _3_pColl.XzName
}
- return str(0)
+ return str(284)
}()
- if crt.Xstrcmp(tls, _3_zColl, str(37881)) == i32(0) {
- _3_zColl = str(37888)
+ if crt.Xstrcmp(tls, _3_zColl, str(37836)) == int32(0) {
+ _3_zColl = str(37843)
}
- _sqlite3XPrintf(tls, &_x, str(37890), unsafe.Pointer(func() *int8 {
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_pKeyInfo.X5)) + 1*uintptr(_2_j)))) != 0 {
- return str(37896)
+ _sqlite3XPrintf(tls, &_x, str(37845), unsafe.Pointer(func() *int8 {
+ if (*elem15(_2_pKeyInfo.XaSortOrder, uintptr(_2_j))) != 0 {
+ return str(37851)
}
- return str(0)
+ return str(284)
}()), unsafe.Pointer(_3_zColl))
_2_j += 1
goto _19
_22:
- _sqlite3StrAccumAppend(tls, &_x, str(37898), i32(1))
+ _sqlite3StrAccumAppend(tls, &_x, str(37853), int32(1))
goto _28
_4:
- _4_pColl = (*XCollSeq)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- _sqlite3XPrintf(tls, &_x, str(37900), unsafe.Pointer(_4_pColl.X0))
+ _4_pColl = (*XCollSeq)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ _sqlite3XPrintf(tls, &_x, str(37855), unsafe.Pointer(_4_pColl.XzName))
goto _28
_5:
- _5_pDef = (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- _sqlite3XPrintf(tls, &_x, str(37908), unsafe.Pointer(_5_pDef.X6), int32(_5_pDef.X0))
+ _5_pDef = (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ _sqlite3XPrintf(tls, &_x, str(37863), unsafe.Pointer(_5_pDef.XzName), int32(_5_pDef.XnArg))
goto _28
_6:
- _6_pDef = (*XFuncDef)((*Xsqlite3_context)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))).X1)
- _sqlite3XPrintf(tls, &_x, str(37908), unsafe.Pointer(_6_pDef.X6), int32(_6_pDef.X0))
+ _6_pDef = (*XFuncDef)((*Xsqlite3_context)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))).XpFunc)
+ _sqlite3XPrintf(tls, &_x, str(37863), unsafe.Pointer(_6_pDef.XzName), int32(_6_pDef.XnArg))
goto _28
_7:
- _sqlite3XPrintf(tls, &_x, str(6348), *(*(**int64)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))))
+ _sqlite3XPrintf(tls, &_x, str(6249), *(*(**int64)(unsafe.Pointer(&_pOp.Xp4))))
goto _28
_8:
- _sqlite3XPrintf(tls, &_x, str(37915), *(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ _sqlite3XPrintf(tls, &_x, str(37870), *(*int32)(unsafe.Pointer(&_pOp.Xp4)))
goto _28
_9:
- _sqlite3XPrintf(tls, &_x, str(7552), *(*(**float64)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))))
+ _sqlite3XPrintf(tls, &_x, str(7453), *(*(**float64)(unsafe.Pointer(&_pOp.Xp4))))
goto _28
_10:
- _10_pMem = (*XMem)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- if (int32(_10_pMem.X1) & i32(2)) != 0 {
- _zP4 = _10_pMem.X5
+ _10_pMem = (*XMem)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ if (int32(_10_pMem.Xflags) & int32(2)) != 0 {
+ _zP4 = _10_pMem.Xz
goto _36
}
- if (int32(_10_pMem.X1) & i32(4)) != 0 {
- _sqlite3XPrintf(tls, &_x, str(6348), *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_10_pMem.X0))))))
+ if (int32(_10_pMem.Xflags) & int32(4)) != 0 {
+ _sqlite3XPrintf(tls, &_x, str(6249), *(*int64)(unsafe.Pointer(&_10_pMem.Xu)))
goto _36
}
- if (int32(_10_pMem.X1) & i32(8)) != 0 {
- _sqlite3XPrintf(tls, &_x, str(7552), *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_10_pMem.X0))))))
+ if (int32(_10_pMem.Xflags) & int32(8)) != 0 {
+ _sqlite3XPrintf(tls, &_x, str(7453), *(*float64)(unsafe.Pointer(&_10_pMem.Xu)))
goto _36
}
- if (int32(_10_pMem.X1) & i32(1)) != 0 {
- _zP4 = str(155)
+ if (int32(_10_pMem.Xflags) & int32(1)) != 0 {
+ _zP4 = str(285)
goto _36
}
func() {
- if (int32(_10_pMem.X1) & i32(16)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72774), unsafe.Pointer((*int8)(unsafe.Pointer(&_displayP4Ø00__func__Ø000))), unsafe.Pointer(str(37918)))
+ if (int32(_10_pMem.Xflags) & int32(16)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72774), unsafe.Pointer(&_displayP4Ø00__func__Ø000), unsafe.Pointer(str(37873)))
crt.X__builtin_abort(tls)
}
}()
- _zP4 = str(37941)
+ _zP4 = str(37896)
_36:
goto _28
_11:
- _16_pVtab = (*Xsqlite3_vtab)((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))).X2)
- _sqlite3XPrintf(tls, &_x, str(37948), unsafe.Pointer(_16_pVtab))
+ _16_pVtab = (*Xsqlite3_vtab)((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))).XpVtab)
+ _sqlite3XPrintf(tls, &_x, str(37903), unsafe.Pointer(_16_pVtab))
goto _28
_12:
- _17_ai = *(**int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
- _17_n = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_17_ai)) + 4*uintptr(i32(0))))
- _17_i = i32(1)
+ _17_ai = *(**int32)(unsafe.Pointer(&_pOp.Xp4))
+ _17_n = *elem8(_17_ai, 0)
+ _17_i = int32(1)
_39:
if _17_i >= _17_n {
goto _42
}
- _sqlite3XPrintf(tls, &_x, str(37956), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_17_ai)) + 4*uintptr(_17_i))))
+ _sqlite3XPrintf(tls, &_x, str(37911), *elem8(_17_ai, uintptr(_17_i)))
_17_i += 1
goto _39
_42:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zTemp)) + 1*uintptr(i32(0)))) = int8(i32(91))
- _sqlite3StrAccumAppend(tls, &_x, str(37960), i32(1))
+ *elem1(_zTemp, 0) = int8(91)
+ _sqlite3StrAccumAppend(tls, &_x, str(37915), int32(1))
goto _28
_13:
- _sqlite3XPrintf(tls, &_x, str(37962))
+ _sqlite3XPrintf(tls, &_x, str(37917))
goto _28
_14:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zTemp)) + 1*uintptr(i32(0)))) = int8(i32(0))
+ *elem1(_zTemp, 0) = 0
goto _28
_15:
- _sqlite3XPrintf(tls, &_x, str(24576), unsafe.Pointer((*XTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))).X0))
+ _sqlite3XPrintf(tls, &_x, str(24531), unsafe.Pointer((*XTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))).XzName))
goto _28
_16:
- _zP4 = *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
+ _zP4 = *(**int8)(unsafe.Pointer(&_pOp.Xp4))
if _zP4 == nil {
_zP4 = _zTemp
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zTemp)) + 1*uintptr(i32(0)))) = int8(i32(0))
+ *elem1(_zTemp, 0) = 0
}
_28:
_sqlite3StrAccumFinish(tls, &_x)
func() {
if _zP4 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72819), unsafe.Pointer((*int8)(unsafe.Pointer(&_displayP4Ø00__func__Ø000))), unsafe.Pointer(str(37970)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72819), unsafe.Pointer(&_displayP4Ø00__func__Ø000), unsafe.Pointer(str(37925)))
crt.X__builtin_abort(tls)
}
}()
return _zP4
-
- _ = _x
- panic(0)
}
var _displayP4Ø00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_displayP4Ø00__func__Ø000[0], str(37977), 10)
+ crt.Xstrncpy(nil, &_displayP4Ø00__func__Ø000[0], str(37932), 10)
}
-// variable-argument wrapper around sqlite3VXPrintf(). The bFlags argument
-// can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats.
+// C comment
+// /*
+// ** variable-argument wrapper around sqlite3VXPrintf(). The bFlags argument
+// ** can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats.
+// */
func _sqlite3XPrintf(tls *crt.TLS, _p *XStrAccum, _zFormat *int8, args ...interface{}) {
var _ap []interface{}
_ap = args
@@ -27951,131 +28548,107 @@ func _sqlite3XPrintf(tls *crt.TLS, _p *XStrAccum, _zFormat *int8, args ...interf
_ap = nil
}
-// Compute a string for the "comment" field of a VDBE opcode listing.
-//
-// The Synopsis: field in comments in the vdbe.c source file gets converted
-// to an extra string that is appended to the sqlite3OpcodeName(). In the
-// absence of other comments, this synopsis becomes the comment on the opcode.
-// Some translation occurs:
-//
-// "PX" -> "r[X]"
-// "PX@PY" -> "r[X..X+Y-1]" or "r[x]" if y is 0 or 1
-// "PX@PY+1" -> "r[X..X+Y]" or "r[x]" if y is 0
-// "PY..PY" -> "r[X..Y]" or "r[x]" if y<=x
+// C comment
+// /*
+// ** Compute a string for the "comment" field of a VDBE opcode listing.
+// **
+// ** The Synopsis: field in comments in the vdbe.c source file gets converted
+// ** to an extra string that is appended to the sqlite3OpcodeName(). In the
+// ** absence of other comments, this synopsis becomes the comment on the opcode.
+// ** Some translation occurs:
+// **
+// ** "PX" -> "r[X]"
+// ** "PX@PY" -> "r[X..X+Y-1]" or "r[x]" if y is 0 or 1
+// ** "PX@PY+1" -> "r[X..X+Y]" or "r[x]" if y is 0
+// ** "PY..PY" -> "r[X..Y]" or "r[x]" if y<=x
+// */
func _displayComment(tls *crt.TLS, _pOp *XVdbeOp, _zP4 *int8, _zTemp *int8, _nTemp int32) (r0 int32) {
var _nOpName, _ii, _jj, _1_seenCom, _9_v1, _9_v2 int32
var _1_c int8
var _zOpName, _zSynopsis *int8
var _zAlt [50]int8
- _zOpName = _sqlite3OpcodeName(tls, int32(_pOp.X0))
+ _zOpName = _sqlite3OpcodeName(tls, int32(_pOp.Xopcode))
_nOpName = _sqlite3Strlen30(tls, _zOpName)
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOpName)) + 1*uintptr(_nOpName+i32(1))))) == 0 {
+ if (*elem1(_zOpName, uintptr(_nOpName+int32(1)))) == 0 {
goto _0
}
- _1_seenCom = i32(0)
- _zSynopsis = store0(func() (**int8, *int8) {
- p := &_zOpName
- return p, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_nOpName+i32(1))))
- }())
- if crt.Xstrncmp(tls, _zSynopsis, str(37987), uint32(i32(3))) != i32(0) {
+ _1_seenCom = int32(0)
+ _zSynopsis = store1(func() (**int8, *int8) { p := &_zOpName; return p, elem1(*p, uintptr(_nOpName+int32(1))) }())
+ if crt.Xstrncmp(tls, _zSynopsis, str(37942), uint32(3)) != int32(0) {
goto _1
}
- if (int32(_pOp.X2) & i32(32)) != 0 {
- Xsqlite3_snprintf(tls, int32(u32(50)), (*int8)(unsafe.Pointer(&_zAlt)), str(37991), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(3))))))))))
+ if (int32(_pOp.Xp5) & int32(32)) != 0 {
+ Xsqlite3_snprintf(tls, int32(50), (*int8)(unsafe.Pointer(&_zAlt)), str(37946), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(int32(3))))))
goto _3
}
- Xsqlite3_snprintf(tls, int32(u32(50)), (*int8)(unsafe.Pointer(&_zAlt)), str(38004), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(3))))))))))
+ Xsqlite3_snprintf(tls, int32(50), (*int8)(unsafe.Pointer(&_zAlt)), str(37959), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(int32(3))))))
_3:
_zSynopsis = (*int8)(unsafe.Pointer(&_zAlt))
_1:
- _ii = store1(&_jj, i32(0))
+ _ii = store2(&_jj, int32(0))
_4:
- if _jj >= (_nTemp-i32(1)) || int32(store3(&_1_c, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSynopsis)) + 1*uintptr(_ii))))) == i32(0) {
+ if _jj >= (_nTemp-int32(1)) || int32(store5(&_1_c, *elem1(_zSynopsis, uintptr(_ii)))) == int32(0) {
goto _8
}
- if int32(_1_c) != i32(80) {
+ if int32(_1_c) != int32(80) {
goto _9
}
- _1_c = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSynopsis)) + 1*uintptr(preInc1(&_ii, 1))))
- if int32(_1_c) == i32(52) {
- Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_jj))))))), str(24576), unsafe.Pointer(_zP4))
+ _1_c = *elem1(_zSynopsis, uintptr(preInc2(&_ii, 1)))
+ if int32(_1_c) == int32(52) {
+ Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(_jj))), str(24531), unsafe.Pointer(_zP4))
goto _13
}
- if int32(_1_c) == i32(88) {
- Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_jj))))))), str(24576), unsafe.Pointer(_pOp.X7))
- _1_seenCom = i32(1)
+ if int32(_1_c) == int32(88) {
+ Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(_jj))), str(24531), unsafe.Pointer(_pOp.XzComment))
+ _1_seenCom = int32(1)
goto _13
}
_9_v1 = _translateP(tls, _1_c, _pOp)
- Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_jj))))))), str(37915), _9_v1)
- if crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(1)))))))), str(38018), uint32(i32(2))) != i32(0) {
+ Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(_jj))), str(37870), _9_v1)
+ if crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(_ii)))))+uintptr(int32(1)))), str(37973), uint32(2)) != int32(0) {
goto _14
}
- {
- p := &_ii
- *p = (*p) + i32(3)
- sink1(*p)
- }
- {
- p := &_jj
- *p = (*p) + _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_jj))))))))
- sink1(*p)
- }
- _9_v2 = _translateP(tls, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSynopsis)) + 1*uintptr(_ii))), _pOp)
- if crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(1)))))))), str(38021), uint32(i32(2))) == i32(0) {
- {
- p := &_ii
- *p = (*p) + i32(2)
- sink1(*p)
- }
+ _ii += int32(3)
+ _jj += _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(_jj))))
+ _9_v2 = _translateP(tls, *elem1(_zSynopsis, uintptr(_ii)), _pOp)
+ if crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(_ii)))))+uintptr(int32(1)))), str(37976), uint32(2)) == int32(0) {
+ _ii += int32(2)
_9_v2 += 1
}
- if _9_v2 > i32(1) {
- Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_jj))))))), str(38024), (_9_v1+_9_v2)-i32(1))
+ if _9_v2 > int32(1) {
+ Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(_jj))), str(37979), (_9_v1+_9_v2)-int32(1))
}
goto _19
_14:
- if (crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(1)))))))), str(38029), uint32(i32(4))) == i32(0)) && ((_pOp.X5) == i32(0)) {
- {
- p := &_ii
- *p = (*p) + i32(4)
- sink1(*p)
- }
+ if (crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zSynopsis))+uintptr(_ii)))))+uintptr(int32(1)))), str(37984), uint32(4)) == int32(0)) && (_pOp.Xp3 == int32(0)) {
+ _ii += int32(4)
}
_19:
_13:
- {
- p := &_jj
- *p = (*p) + _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_jj))))))))
- sink1(*p)
- }
+ _jj += _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(_jj))))
goto _20
_9:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zTemp)) + 1*uintptr(postInc1(&_jj, int32(1))))) = _1_c
+ *elem1(_zTemp, uintptr(postInc2(&_jj, 1))) = _1_c
_20:
_ii += 1
goto _4
_8:
- if ((_1_seenCom == 0) && (_jj < (_nTemp - i32(5)))) && ((_pOp.X7) != nil) {
- Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_jj))))))), str(38034), unsafe.Pointer(_pOp.X7))
- {
- p := &_jj
- *p = (*p) + _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_jj))))))))
- sink1(*p)
- }
+ if ((_1_seenCom == 0) && (_jj < (_nTemp - int32(5)))) && (_pOp.XzComment != nil) {
+ Xsqlite3_snprintf(tls, _nTemp-_jj, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(_jj))), str(37989), unsafe.Pointer(_pOp.XzComment))
+ _jj += _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zTemp))+uintptr(_jj))))
}
if _jj < _nTemp {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zTemp)) + 1*uintptr(_jj))) = int8(i32(0))
+ *elem1(_zTemp, uintptr(_jj)) = 0
}
goto _27
_0:
- if (_pOp.X7) != nil {
- Xsqlite3_snprintf(tls, _nTemp, _zTemp, str(24576), unsafe.Pointer(_pOp.X7))
+ if _pOp.XzComment != nil {
+ Xsqlite3_snprintf(tls, _nTemp, _zTemp, str(24531), unsafe.Pointer(_pOp.XzComment))
_jj = _sqlite3Strlen30(tls, _zTemp)
goto _27
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zTemp)) + 1*uintptr(i32(0)))) = int8(i32(0))
- _jj = i32(0)
+ *elem1(_zTemp, 0) = 0
+ _jj = int32(0)
_27:
return _jj
@@ -28084,157 +28657,162 @@ _27:
}
func _sqlite3OpcodeName(tls *crt.TLS, _i int32) (r0 *int8) {
- return *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3OpcodeNameØ00azNameØ001)) + 4*uintptr(_i)))
+ return *elem0((**int8)(unsafe.Pointer(&_sqlite3OpcodeNameØ00azNameØ001)), uintptr(_i))
}
var _sqlite3OpcodeNameØ00azNameØ001 [166]*int8
func init() {
- _sqlite3OpcodeNameØ00azNameØ001 = [166]*int8{str(38039), str(38050), str(38062), str(38075), str(38087), str(38099), str(38111), str(38117), str(38123), str(38135), str(38148), str(38156), str(38187), str(38209), str(38215), str(38222), str(38237), str(38244), str(38255), str(38261), str(38279), str(38285), str(38289), str(38296), str(38345), str(38365), str(38385), str(38405), str(38425), str(38449), str(38471), str(38490), str(38513), str(38536), str(38542), str(38553), str(38565), str(38571), str(38579), str(38598), str(38617), str(38636), str(38655), str(38683), str(38725), str(38734), str(38767), str(38808), str(38852), str(38889), str(38901), str(38908), str(38925), str(38933), str(38947), str(38977), str(38983), str(39000), str(39015), str(39042), str(39062), str(39082), str(39105), str(39137), str(39160), str(39187), str(39205), str(39225), str(39251), str(39260), str(39291), str(39317), str(39344), str(39374), str(39396), str(39410), str(39440), str(39471), str(39490), str(39509), str(39527), str(39546), str(39564), str(39583), str(39594), str(39619), str(39643), str(39672), str(39702), str(39724), str(39751), str(39778), str(39803), str(39831), str(39856), str(39877), str(39898), str(39911), str(39930), str(39960), str(39976), str(40004), str(40037), str(40057), str(40069), str(40080), str(40105), str(40129), str(40154), str(40163), str(40188), str(40213), str(40225), str(40269), str(40300), str(40307), str(40320), str(40352), str(40373), str(40404), str(40435), str(40443), str(40455), str(40504), str(40526), str(40545), str(40563), str(40572), str(40595), str(40615), str(40638), str(40663), str(40684), str(40698), str(40707), str(40714), str(40727), str(40757), str(40787), str(40796), str(40809), str(40823), str(40834), str(40845), str(40858), str(40871), str(40898), str(40905), str(40929), str(40959), str(41028), str(41064), str(41099), str(41125), str(41133), str(41167), str(41175), str(41184), str(41194), str(41201), str(41227), str(41236), str(41247), str(41257), str(41269), str(41275)}
+ _sqlite3OpcodeNameØ00azNameØ001 = [166]*int8{str(37994), str(38005), str(38017), str(38030), str(38042), str(38054), str(38066), str(38072), str(38078), str(38090), str(38103), str(38111), str(38142), str(38164), str(38170), str(38177), str(38192), str(38199), str(38210), str(38216), str(38234), str(38240), str(38244), str(38251), str(38300), str(38320), str(38340), str(38360), str(38380), str(38404), str(38426), str(38445), str(38468), str(38491), str(38497), str(38508), str(38520), str(38526), str(38534), str(38553), str(38572), str(38591), str(38610), str(38638), str(38680), str(38689), str(38722), str(38763), str(38807), str(38844), str(38856), str(38863), str(38880), str(38888), str(38902), str(38932), str(38938), str(38955), str(38970), str(38997), str(39017), str(39037), str(39060), str(39092), str(39115), str(39142), str(39160), str(39180), str(39206), str(39215), str(39246), str(39272), str(39299), str(39329), str(39351), str(39365), str(39395), str(39426), str(39445), str(39464), str(39482), str(39501), str(39519), str(39538), str(39549), str(39574), str(39598), str(39627), str(39657), str(39679), str(39706), str(39733), str(39758), str(39786), str(39811), str(39832), str(39853), str(39866), str(39885), str(39915), str(39931), str(39959), str(39992), str(40012), str(40024), str(40035), str(40060), str(40084), str(40109), str(40118), str(40143), str(40168), str(40180), str(40224), str(40255), str(40262), str(40275), str(40307), str(40328), str(40359), str(40390), str(40398), str(40410), str(40459), str(40481), str(40500), str(40518), str(40527), str(40550), str(40570), str(40593), str(40618), str(40639), str(40653), str(40662), str(40669), str(40682), str(40712), str(40742), str(40751), str(40764), str(40778), str(40789), str(40800), str(40813), str(40826), str(40853), str(40860), str(40884), str(40914), str(40983), str(41019), str(41054), str(41080), str(41088), str(41122), str(41130), str(41139), str(41149), str(41156), str(41182), str(41191), str(41202), str(41212), str(41224), str(41230)}
}
-// Return an integer value for one of the parameters to the opcode pOp
-// determined by character c.
+// C comment
+// /*
+// ** Return an integer value for one of the parameters to the opcode pOp
+// ** determined by character c.
+// */
func _translateP(tls *crt.TLS, _c int8, _pOp *XVdbeOp) (r0 int32) {
- if int32(_c) == i32(49) {
- return _pOp.X3
+ if int32(_c) == int32(49) {
+ return _pOp.Xp1
}
- if int32(_c) == i32(50) {
- return _pOp.X4
+ if int32(_c) == int32(50) {
+ return _pOp.Xp2
}
- if int32(_c) == i32(51) {
- return _pOp.X5
+ if int32(_c) == int32(51) {
+ return _pOp.Xp3
}
- if int32(_c) == i32(52) {
- return *(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
+ if int32(_c) == int32(52) {
+ return *(*int32)(unsafe.Pointer(&_pOp.Xp4))
}
- return int32(_pOp.X2)
+ return int32(_pOp.Xp5)
}
var _sqlite3VdbePrintOpØ00zFormat1Ø001 *int8
func init() {
- _sqlite3VdbePrintOpØ00zFormat1Ø001 = str(41284)
+ _sqlite3VdbePrintOpØ00zFormat1Ø001 = str(41239)
}
-// This routine is just a convenient place to set a breakpoint that will
-// fire after each opcode is inserted and displayed using
-// "PRAGMA vdbe_addoptrace=on".
+// C comment
+// /* This routine is just a convenient place to set a breakpoint that will
+// ** fire after each opcode is inserted and displayed using
+// ** "PRAGMA vdbe_addoptrace=on".
+// */
func _test_addop_breakpoint(tls *crt.TLS) {
_test_addop_breakpointØ00nØ001 += 1
}
var _test_addop_breakpointØ00nØ001 int32
-// Check if the program stored in the VM associated with pParse may
-// throw an ABORT exception (causing the statement, but not entire transaction
-// to be rolled back). This condition is true if the main program or any
-// sub-programs contains any of the following:
-//
-// * OP_Halt with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
-// * OP_HaltIfNull with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
-// * OP_Destroy
-// * OP_VUpdate
-// * OP_VRename
-// * OP_FkCounter with P2==0 (immediate foreign key constraint)
-// * OP_CreateTable and OP_InitCoroutine (for CREATE TABLE AS SELECT ...)
-//
-// Then check that the value of Parse.mayAbort is true if an
-// ABORT may be thrown, or false otherwise. Return true if it does
-// match, or false otherwise. This function is intended to be used as
-// part of an assert statement in the compiler. Similar to:
-//
-// assert( sqlite3VdbeAssertMayAbort(pParse->pVdbe, pParse->mayAbort) );
+// C comment
+// /*
+// ** Check if the program stored in the VM associated with pParse may
+// ** throw an ABORT exception (causing the statement, but not entire transaction
+// ** to be rolled back). This condition is true if the main program or any
+// ** sub-programs contains any of the following:
+// **
+// ** * OP_Halt with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
+// ** * OP_HaltIfNull with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
+// ** * OP_Destroy
+// ** * OP_VUpdate
+// ** * OP_VRename
+// ** * OP_FkCounter with P2==0 (immediate foreign key constraint)
+// ** * OP_CreateTable and OP_InitCoroutine (for CREATE TABLE AS SELECT ...)
+// **
+// ** Then check that the value of Parse.mayAbort is true if an
+// ** ABORT may be thrown, or false otherwise. Return true if it does
+// ** match, or false otherwise. This function is intended to be used as
+// ** part of an assert statement in the compiler. Similar to:
+// **
+// ** assert( sqlite3VdbeAssertMayAbort(pParse->pVdbe, pParse->mayAbort) );
+// */
func _sqlite3VdbeAssertMayAbort(tls *crt.TLS, _v *TVdbe, _mayAbort int32) (r0 int32) {
var _hasAbort, _hasFkCounter, _hasCreateTable, _hasInitCoroutine, _1_opcode int32
var _pOp *XVdbeOp
var _sIter XVdbeOpIter
- _hasAbort = i32(0)
- _hasFkCounter = i32(0)
- _hasCreateTable = i32(0)
- _hasInitCoroutine = i32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_sIter), i32(0), u32(20))
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sIter.X0))))) = _v
+ _hasAbort = int32(0)
+ _hasFkCounter = int32(0)
+ _hasCreateTable = int32(0)
+ _hasInitCoroutine = int32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_sIter), int32(0), uint32(20))
+ *(**TVdbe)(unsafe.Pointer(&_sIter.Xv)) = _v
_0:
- if store40(&_pOp, _opIterNext(tls, &_sIter)) == nil {
+ if store61(&_pOp, _opIterNext(tls, &_sIter)) == nil {
goto _1
}
- _1_opcode = int32(_pOp.X0)
- if (((_1_opcode == i32(133)) || (_1_opcode == i32(12))) || (_1_opcode == i32(160))) || (((_1_opcode == i32(55)) || (_1_opcode == i32(54))) && ((((_pOp.X3) & i32(255)) == i32(19)) && ((_pOp.X4) == i32(2)))) {
- _hasAbort = i32(1)
+ _1_opcode = int32(_pOp.Xopcode)
+ if (((_1_opcode == int32(133)) || (_1_opcode == int32(12))) || (_1_opcode == int32(160))) || (((_1_opcode == int32(55)) || (_1_opcode == int32(54))) && (((_pOp.Xp1 & int32(255)) == int32(19)) && (_pOp.Xp2 == int32(2)))) {
+ _hasAbort = int32(1)
goto _1
}
- if _1_opcode == i32(137) {
- _hasCreateTable = i32(1)
+ if _1_opcode == int32(137) {
+ _hasCreateTable = int32(1)
}
- if _1_opcode == i32(15) {
- _hasInitCoroutine = i32(1)
+ if _1_opcode == int32(15) {
+ _hasInitCoroutine = int32(1)
}
- if ((_1_opcode == i32(147)) && ((_pOp.X3) == i32(0))) && ((_pOp.X4) == i32(1)) {
- _hasFkCounter = i32(1)
+ if ((_1_opcode == int32(147)) && (_pOp.Xp1 == int32(0))) && (_pOp.Xp2 == int32(1)) {
+ _hasFkCounter = int32(1)
}
goto _0
_1:
- _sqlite3DbFree(tls, (*Xsqlite3)(_v.X0), (unsafe.Pointer)(_sIter.X1))
- return bool2int((((((*Xsqlite3)(_v.X0).X17) != 0) || (_hasAbort == _mayAbort)) || _hasFkCounter != 0) || (_hasCreateTable != 0 && _hasInitCoroutine != 0))
-
- _ = _sIter
- panic(0)
+ _sqlite3DbFree(tls, (*Xsqlite3)(_v.Xdb), unsafe.Pointer(_sIter.XapSub))
+ return bool2int((((((*Xsqlite3)(_v.Xdb).XmallocFailed) != 0) || (_hasAbort == _mayAbort)) || _hasFkCounter != 0) || (_hasCreateTable != 0 && _hasInitCoroutine != 0))
}
func _opIterNext(tls *crt.TLS, _p *XVdbeOpIter) (r0 *XVdbeOp) {
var _nOp, _5_nByte, _5_j int32
var _v *TVdbe
var _pRet, _aOp *XVdbeOp
- _v = (*TVdbe)(_p.X0)
+ _v = (*TVdbe)(_p.Xv)
_pRet = nil
- if (_p.X4) > (_p.X2) {
+ if _p.XiSub > _p.XnSub {
goto _0
}
- if (_p.X4) == i32(0) {
- _aOp = (*XVdbeOp)(_v.X17)
- _nOp = _v.X27
+ if _p.XiSub == int32(0) {
+ _aOp = (*XVdbeOp)(_v.XaOp)
+ _nOp = _v.XnOp
goto _2
}
- _aOp = (*XVdbeOp)((*(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X1)) + 4*uintptr((_p.X4)-i32(1))))).X0)
- _nOp = (*(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X1)) + 4*uintptr((_p.X4)-i32(1))))).X1
+ _aOp = (*XVdbeOp)((*elem63((**XSubProgram)(unsafe.Pointer(_p.XapSub)), uintptr(_p.XiSub-int32(1)))).XaOp)
+ _nOp = (*elem63((**XSubProgram)(unsafe.Pointer(_p.XapSub)), uintptr(_p.XiSub-int32(1)))).XnOp
_2:
func() {
- if (_p.X3) >= _nOp {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71866), unsafe.Pointer((*int8)(unsafe.Pointer(&_opIterNextØ00__func__Ø000))), unsafe.Pointer(str(41321)))
+ if _p.XiAddr >= _nOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71866), unsafe.Pointer(&_opIterNextØ00__func__Ø000), unsafe.Pointer(str(41276)))
crt.X__builtin_abort(tls)
}
}()
- _pRet = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr(_p.X3)))
- *(*int32)(unsafe.Pointer(&(_p.X3))) += 1
- if (_p.X3) == _nOp {
- *(*int32)(unsafe.Pointer(&(_p.X4))) += 1
- *(*int32)(unsafe.Pointer(&(_p.X3))) = i32(0)
+ _pRet = elem61(_aOp, uintptr(_p.XiAddr))
+ _p.XiAddr += 1
+ if _p.XiAddr == _nOp {
+ _p.XiSub += 1
+ _p.XiAddr = int32(0)
}
- if int32(_pRet.X1) != i32(-13) {
+ if int32(_pRet.Xp4type) != int32(-13) {
goto _6
}
- _5_nByte = int32(uint32((_p.X2)+i32(1)) * u32(4))
- _5_j = i32(0)
+ _5_nByte = int32(uint32(_p.XnSub+int32(1)) * uint32(4))
+ _5_j = int32(0)
_7:
- if _5_j >= (_p.X2) {
+ if _5_j >= _p.XnSub {
goto _10
}
- if (*(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X1)) + 4*uintptr(_5_j)))) == (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pRet.X6)))))) {
+ if (*elem63((**XSubProgram)(unsafe.Pointer(_p.XapSub)), uintptr(_5_j))) == (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer(&_pRet.Xp4))) {
goto _10
}
_5_j += 1
goto _7
_10:
- if _5_j != (_p.X2) {
+ if _5_j != _p.XnSub {
goto _12
}
- *(***XSubProgram)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = (**XSubProgram)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_v.X0), (unsafe.Pointer)(_p.X1), uint64(_5_nByte)))
- if (**XSubProgram)(unsafe.Pointer(_p.X1)) == nil {
+ *(***XSubProgram)(unsafe.Pointer(&_p.XapSub)) = (**XSubProgram)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_v.Xdb), unsafe.Pointer(_p.XapSub), uint64(_5_nByte)))
+ if _p.XapSub == nil {
_pRet = nil
goto _14
}
- *(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X1)) + 4*uintptr(postInc1((*int32)(unsafe.Pointer(&(_p.X2))), int32(1))))) = (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pRet.X6))))))
+ *elem63((**XSubProgram)(unsafe.Pointer(_p.XapSub)), uintptr(postInc2(&_p.XnSub, 1))) = (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer(&_pRet.Xp4)))
_14:
_12:
_6:
@@ -28245,137 +28823,144 @@ _0:
var _opIterNextØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_opIterNextØ00__func__Ø000[0], str(41334), 11)
+ crt.Xstrncpy(nil, &_opIterNextØ00__func__Ø000[0], str(41289), 11)
}
func _sqlite3VdbeAddOp0(tls *crt.TLS, _p *TVdbe, _op int32) (r0 int32) {
- return _sqlite3VdbeAddOp3(tls, _p, _op, i32(0), i32(0), i32(0))
-}
-
-// Return the opcode for a given address. If the address is -1, then
-// return the most recently inserted opcode.
-//
-// If a memory allocation error has occurred prior to the calling of this
-// routine, then a pointer to a dummy VdbeOp will be returned. That opcode
-// is readable but not writable, though it is cast to a writable value.
-// The return of a dummy opcode allows the call to continue functioning
-// after an OOM fault without having to check to see if the return from
-// this routine is a valid pointer. But because the dummy.opcode is 0,
-// dummy will never be written to. This is verified by code inspection and
-// by running with Valgrind.
+ return _sqlite3VdbeAddOp3(tls, _p, _op, int32(0), int32(0), int32(0))
+}
+
+// C comment
+// /*
+// ** Return the opcode for a given address. If the address is -1, then
+// ** return the most recently inserted opcode.
+// **
+// ** If a memory allocation error has occurred prior to the calling of this
+// ** routine, then a pointer to a dummy VdbeOp will be returned. That opcode
+// ** is readable but not writable, though it is cast to a writable value.
+// ** The return of a dummy opcode allows the call to continue functioning
+// ** after an OOM fault without having to check to see if the return from
+// ** this routine is a valid pointer. But because the dummy.opcode is 0,
+// ** dummy will never be written to. This is verified by code inspection and
+// ** by running with Valgrind.
+// */
func _sqlite3VdbeGetOp(tls *crt.TLS, _p *TVdbe, _addr int32) (r0 *XVdbeOp) {
func() {
- if (_p.X5) != uint32(i32(381479589)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72518), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeGetOpØ00__func__Ø000))), unsafe.Pointer(str(37642)))
+ if _p.Xmagic != uint32(381479589) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72518), unsafe.Pointer(&_sqlite3VdbeGetOpØ00__func__Ø000), unsafe.Pointer(str(37597)))
crt.X__builtin_abort(tls)
}
}()
- if _addr < i32(0) {
- _addr = (_p.X27) - i32(1)
+ if _addr < int32(0) {
+ _addr = _p.XnOp - int32(1)
}
func() {
- if (_addr < i32(0) || _addr >= (_p.X27)) && ((*Xsqlite3)(_p.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72522), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeGetOpØ00__func__Ø000))), unsafe.Pointer(str(41345)))
+ if (_addr < int32(0) || _addr >= _p.XnOp) && ((*Xsqlite3)(_p.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72522), unsafe.Pointer(&_sqlite3VdbeGetOpØ00__func__Ø000), unsafe.Pointer(str(41300)))
crt.X__builtin_abort(tls)
}
}()
- if ((*Xsqlite3)(_p.X0).X17) != 0 {
+ if ((*Xsqlite3)(_p.Xdb).XmallocFailed) != 0 {
return &_sqlite3VdbeGetOpØ00dummyØ001
}
- return (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(_addr)))
+ return elem61((*XVdbeOp)(_p.XaOp), uintptr(_addr))
}
var _sqlite3VdbeGetOpØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeGetOpØ00__func__Ø000[0], str(41393), 17)
+ crt.Xstrncpy(nil, &_sqlite3VdbeGetOpØ00__func__Ø000[0], str(41348), 17)
}
var _sqlite3VdbeGetOpØ00dummyØ001 XVdbeOp
-// Change the P2 operand of instruction addr so that it points to
-// the address of the next instruction to be coded.
+// C comment
+// /*
+// ** Change the P2 operand of instruction addr so that it points to
+// ** the address of the next instruction to be coded.
+// */
func _sqlite3VdbeJumpHere(tls *crt.TLS, _p *TVdbe, _addr int32) {
- _sqlite3VdbeChangeP2(tls, _p, uint32(_addr), _p.X27)
+ _sqlite3VdbeChangeP2(tls, _p, uint32(_addr), _p.XnOp)
}
func _sqlite3VdbeChangeP2(tls *crt.TLS, _p *TVdbe, _addr uint32, _val int32) {
- *(*int32)(unsafe.Pointer(&(_sqlite3VdbeGetOp(tls, _p, int32(_addr)).X4))) = _val
-}
-
-// Declare to the Vdbe that the BTree object at db->aDb[i] is used.
-//
-// The prepared statements need to know in advance the complete set of
-// attached databases that will be use. A mask of these databases
-// is maintained in p->btreeMask. The p->lockMask value is the subset of
-// p->btreeMask of databases that will require a lock.
+ _sqlite3VdbeGetOp(tls, _p, int32(_addr)).Xp2 = _val
+}
+
+// C comment
+// /*
+// ** Declare to the Vdbe that the BTree object at db->aDb[i] is used.
+// **
+// ** The prepared statements need to know in advance the complete set of
+// ** attached databases that will be use. A mask of these databases
+// ** is maintained in p->btreeMask. The p->lockMask value is the subset of
+// ** p->btreeMask of databases that will require a lock.
+// */
func _sqlite3VdbeUsesBtree(tls *crt.TLS, _p *TVdbe, _i int32) {
func() {
- if _i < i32(0) || _i >= ((*Xsqlite3)(_p.X0).X5) || _i >= i32(32) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72833), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeUsesBtreeØ00__func__Ø000))), unsafe.Pointer(str(41410)))
+ if _i < int32(0) || _i >= ((*Xsqlite3)(_p.Xdb).XnDb) || _i >= int32(32) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72833), unsafe.Pointer(&_sqlite3VdbeUsesBtreeØ00__func__Ø000), unsafe.Pointer(str(41365)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _i >= i32(32) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72834), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeUsesBtreeØ00__func__Ø000))), unsafe.Pointer(str(41459)))
+ if _i >= int32(32) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72834), unsafe.Pointer(&_sqlite3VdbeUsesBtreeØ00__func__Ø000), unsafe.Pointer(str(41414)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X33)))
- *p = (*p) | (u32(1) << uint(_i))
- sink5(*p)
- }
- if (_i != i32(1)) && _sqlite3BtreeSharable(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_p.X0).X4)+16*uintptr(_i))).X1)) != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X34)))
- *p = (*p) | (u32(1) << uint(_i))
- sink5(*p)
- }
+ _p.XbtreeMask |= uint32(1) << uint(_i)
+ if (_i != int32(1)) && _sqlite3BtreeSharable(tls, (*XBtree)(elem27((*XDb)((*Xsqlite3)(_p.Xdb).XaDb), uintptr(_i)).XpBt)) != 0 {
+ _p.XlockMask |= uint32(1) << uint(_i)
}
}
var _sqlite3VdbeUsesBtreeØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeUsesBtreeØ00__func__Ø000[0], str(41489), 21)
+ crt.Xstrncpy(nil, &_sqlite3VdbeUsesBtreeØ00__func__Ø000[0], str(41444), 21)
}
-// Return true if the Btree passed as the only argument is sharable.
+// C comment
+// /*
+// ** Return true if the Btree passed as the only argument is sharable.
+// */
func _sqlite3BtreeSharable(tls *crt.TLS, _p *XBtree) (r0 int32) {
- return int32(_p.X3)
+ return int32(_p.Xsharable)
}
-// Add an opcode that includes the p4 value as an integer.
+// C comment
+// /*
+// ** Add an opcode that includes the p4 value as an integer.
+// */
func _sqlite3VdbeAddOp4Int(tls *crt.TLS, _p *TVdbe, _op int32, _p1 int32, _p2 int32, _p3 int32, _p4 int32) (r0 int32) {
var _addr int32
var _1_pOp *XVdbeOp
_addr = _sqlite3VdbeAddOp3(tls, _p, _op, _p1, _p2, _p3)
- if int32((*Xsqlite3)(_p.X0).X17) == i32(0) {
- _1_pOp = (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(_addr)))
- *(*int8)(unsafe.Pointer(&(_1_pOp.X1))) = int8(i32(-11))
- *(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_1_pOp.X6))))) = _p4
+ if int32((*Xsqlite3)(_p.Xdb).XmallocFailed) == int32(0) {
+ _1_pOp = elem61((*XVdbeOp)(_p.XaOp), uintptr(_addr))
+ _1_pOp.Xp4type = int8(-11)
+ *(*int32)(unsafe.Pointer(&_1_pOp.Xp4)) = _p4
}
return _addr
}
func _sqlite3VdbeChangeP5(tls *crt.TLS, _p *TVdbe, _p5 uint16) {
func() {
- if (_p.X27) <= i32(0) && ((*Xsqlite3)(_p.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72215), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeP5Ø00__func__Ø000))), unsafe.Pointer(str(41510)))
+ if _p.XnOp <= int32(0) && ((*Xsqlite3)(_p.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72215), unsafe.Pointer(&_sqlite3VdbeChangeP5Ø00__func__Ø000), unsafe.Pointer(str(41465)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X27) > i32(0) {
- *(*uint16)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr((_p.X27)-i32(1)))).X2))) = _p5
+ if _p.XnOp > int32(0) {
+ elem61((*XVdbeOp)(_p.XaOp), uintptr(_p.XnOp-int32(1))).Xp5 = _p5
}
}
var _sqlite3VdbeChangeP5Ø00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeChangeP5Ø00__func__Ø000[0], str(41542), 20)
+ crt.Xstrncpy(nil, &_sqlite3VdbeChangeP5Ø00__func__Ø000[0], str(41497), 20)
}
func _sqlite3VdbeComment(tls *crt.TLS, _p *TVdbe, _zFormat *int8, args ...interface{}) {
@@ -28387,58 +28972,64 @@ func _sqlite3VdbeComment(tls *crt.TLS, _p *TVdbe, _zFormat *int8, args ...interf
}
}
-// Change the comment on the most recently coded instruction. Or
-// insert a No-op and add the comment to that new instruction. This
-// makes the code easier to read during debugging. None of this happens
-// in a production build.
+// C comment
+// /*
+// ** Change the comment on the most recently coded instruction. Or
+// ** insert a No-op and add the comment to that new instruction. This
+// ** makes the code easier to read during debugging. None of this happens
+// ** in a production build.
+// */
func _vdbeVComment(tls *crt.TLS, _p *TVdbe, _zFormat *int8, _ap []interface{}) {
func() {
- if (_p.X27) <= i32(0) && (*XVdbeOp)(_p.X17) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72465), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeVCommentØ00__func__Ø000))), unsafe.Pointer(str(41562)))
+ if _p.XnOp <= int32(0) && (*XVdbeOp)(_p.XaOp) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72465), unsafe.Pointer(&_vdbeVCommentØ00__func__Ø000), unsafe.Pointer(str(41517)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XVdbeOp)(_p.X17) != nil && ((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr((_p.X27)-i32(1)))).X7) != nil && ((*Xsqlite3)(_p.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72466), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeVCommentØ00__func__Ø000))), unsafe.Pointer(str(41584)))
+ if (*XVdbeOp)(_p.XaOp) != nil && (elem61((*XVdbeOp)(_p.XaOp), uintptr(_p.XnOp-int32(1))).XzComment) != nil && ((*Xsqlite3)(_p.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72466), unsafe.Pointer(&_vdbeVCommentØ00__func__Ø000), unsafe.Pointer(str(41539)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X27) != 0 {
+ if _p.XnOp != 0 {
func() {
- if (*XVdbeOp)(_p.X17) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72468), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeVCommentØ00__func__Ø000))), unsafe.Pointer(str(41649)))
+ if _p.XaOp == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72468), unsafe.Pointer(&_vdbeVCommentØ00__func__Ø000), unsafe.Pointer(str(41604)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3DbFree(tls, (*Xsqlite3)(_p.X0), (unsafe.Pointer)((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr((_p.X27)-i32(1)))).X7))
- *(**int8)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr((_p.X27)-i32(1)))).X7))) = _sqlite3VMPrintf(tls, (*Xsqlite3)(_p.X0), _zFormat, _ap)
+ _sqlite3DbFree(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(elem61((*XVdbeOp)(_p.XaOp), uintptr(_p.XnOp-int32(1))).XzComment))
+ elem61((*XVdbeOp)(_p.XaOp), uintptr(_p.XnOp-int32(1))).XzComment = _sqlite3VMPrintf(tls, (*Xsqlite3)(_p.Xdb), _zFormat, _ap)
}
}
var _vdbeVCommentØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeVCommentØ00__func__Ø000[0], str(41656), 13)
+ crt.Xstrncpy(nil, &_vdbeVCommentØ00__func__Ø000[0], str(41611), 13)
}
-// pTab is a pointer to a Table structure representing a virtual-table.
-// Return a pointer to the VTable object used by connection db to access
-// this virtual-table, if one has been created, or NULL otherwise.
+// C comment
+// /*
+// ** pTab is a pointer to a Table structure representing a virtual-table.
+// ** Return a pointer to the VTable object used by connection db to access
+// ** this virtual-table, if one has been created, or NULL otherwise.
+// */
func _sqlite3GetVTable(tls *crt.TLS, _db *Xsqlite3, _pTab *XTable) (r0 *XVTable) {
var _pVtab *XVTable
func() {
- if (_pTab.X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125131), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GetVTableØ00__func__Ø000))), unsafe.Pointer(str(24529)))
+ if _pTab.XnModuleArg == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125131), unsafe.Pointer(&_sqlite3GetVTableØ00__func__Ø000), unsafe.Pointer(str(24484)))
crt.X__builtin_abort(tls)
}
}()
- _pVtab = (*XVTable)(_pTab.X18)
+ _pVtab = (*XVTable)(_pTab.XpVTable)
_2:
- if _pVtab == nil || (*Xsqlite3)(_pVtab.X0) == _db {
+ if _pVtab == nil || (*Xsqlite3)(_pVtab.Xdb) == _db {
goto _6
}
- _pVtab = (*XVTable)(_pVtab.X6)
+ _pVtab = (*XVTable)(_pVtab.XpNext)
goto _2
_6:
return _pVtab
@@ -28447,10 +29038,13 @@ _6:
var _sqlite3GetVTableØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3GetVTableØ00__func__Ø000[0], str(41669), 17)
+ crt.Xstrncpy(nil, &_sqlite3GetVTableØ00__func__Ø000[0], str(41624), 17)
}
-// Add an opcode that includes the p4 value as a pointer.
+// C comment
+// /*
+// ** Add an opcode that includes the p4 value as a pointer.
+// */
func _sqlite3VdbeAddOp4(tls *crt.TLS, _p *TVdbe, _op int32, _p1 int32, _p2 int32, _p3 int32, _zP4 *int8, _p4type int32) (r0 int32) {
var _addr int32
_addr = _sqlite3VdbeAddOp3(tls, _p, _op, _p1, _p2, _p3)
@@ -28463,68 +29057,68 @@ func _sqlite3VdbeChangeP4(tls *crt.TLS, _p *TVdbe, _addr int32, _zP4 *int8, _n i
var _pOp *XVdbeOp
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72388), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72388), unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
- _db = (*Xsqlite3)(_p.X0)
+ _db = (*Xsqlite3)(_p.Xdb)
func() {
- if (_p.X5) != uint32(i32(381479589)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72390), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000))), unsafe.Pointer(str(37642)))
+ if _p.Xmagic != uint32(381479589) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72390), unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000), unsafe.Pointer(str(37597)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XVdbeOp)(_p.X17) == nil && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72391), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000))), unsafe.Pointer(str(41686)))
+ if (*XVdbeOp)(_p.XaOp) == nil && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72391), unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000), unsafe.Pointer(str(41641)))
crt.X__builtin_abort(tls)
}
}()
- if (_db.X17) == 0 {
+ if _db.XmallocFailed == 0 {
goto _7
}
- if _n != i32(-8) {
- _freeP4(tls, _db, _n, (unsafe.Pointer)(_zP4))
+ if _n != int32(-8) {
+ _freeP4(tls, _db, _n, unsafe.Pointer(_zP4))
}
return
_7:
func() {
- if (_p.X27) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72396), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000))), unsafe.Pointer(str(41716)))
+ if _p.XnOp <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72396), unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000), unsafe.Pointer(str(41671)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _addr >= (_p.X27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72397), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000))), unsafe.Pointer(str(41725)))
+ if _addr >= _p.XnOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72397), unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000), unsafe.Pointer(str(41680)))
crt.X__builtin_abort(tls)
}
}()
- if _addr < i32(0) {
- _addr = (_p.X27) - i32(1)
+ if _addr < int32(0) {
+ _addr = _p.XnOp - int32(1)
}
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(_addr)))
- if (_n >= i32(0)) || ((_pOp.X1) != 0) {
+ _pOp = elem61((*XVdbeOp)(_p.XaOp), uintptr(_addr))
+ if (_n >= int32(0)) || (_pOp.Xp4type != 0) {
_vdbeChangeP4Full(tls, _p, _pOp, _zP4, _n)
return
}
- if _n == i32(-11) {
- *(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))) = int32(uintptr(unsafe.Pointer(_zP4)))
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(-11))
+ if _n == int32(-11) {
+ *(*int32)(unsafe.Pointer(&_pOp.Xp4)) = int32(crt.P2U(unsafe.Pointer(_zP4)))
+ _pOp.Xp4type = int8(-11)
goto _18
}
if _zP4 == nil {
goto _18
}
func() {
- if _n >= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72412), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000))), unsafe.Pointer(str(41737)))
+ if _n >= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72412), unsafe.Pointer(&_sqlite3VdbeChangeP4Ø00__func__Ø000), unsafe.Pointer(str(41692)))
crt.X__builtin_abort(tls)
}
}()
- *(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))) = (unsafe.Pointer)(_zP4)
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(_n)
- if _n == i32(-8) {
+ *(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)) = unsafe.Pointer(_zP4)
+ _pOp.Xp4type = int8(_n)
+ if _n == int32(-8) {
_sqlite3VtabLock(tls, (*XVTable)(unsafe.Pointer(_zP4)))
}
_18:
@@ -28533,34 +29127,34 @@ _18:
var _sqlite3VdbeChangeP4Ø00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeChangeP4Ø00__func__Ø000[0], str(41741), 20)
+ crt.Xstrncpy(nil, &_sqlite3VdbeChangeP4Ø00__func__Ø000[0], str(41696), 20)
}
func _freeP4(tls *crt.TLS, _db *Xsqlite3, _p4type int32, _p4 unsafe.Pointer) {
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72252), unsafe.Pointer((*int8)(unsafe.Pointer(&_freeP4Ø00__func__Ø000))), unsafe.Pointer(str(9475)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72252), unsafe.Pointer(&_freeP4Ø00__func__Ø000), unsafe.Pointer(str(9430)))
crt.X__builtin_abort(tls)
}
}()
switch _p4type {
- case i32(-16):
+ case int32(-16):
goto _3
- case i32(-12):
+ case int32(-12):
goto _4
- case i32(-10):
+ case int32(-10):
goto _4
- case i32(-9):
+ case int32(-9):
goto _4
- case i32(-8):
+ case int32(-8):
goto _11
- case i32(-7):
+ case int32(-7):
goto _10
- case i32(-5):
+ case int32(-5):
goto _8
- case i32(-4):
+ case int32(-4):
goto _9
- case i32(-1):
+ case int32(-1):
goto _4
default:
goto _12
@@ -28573,7 +29167,7 @@ _4:
_sqlite3DbFree(tls, _db, _p4)
goto _12
_8:
- if (_db.X79) == nil {
+ if _db.XpnBytesFreed == nil {
_sqlite3KeyInfoUnref(tls, (*XKeyInfo)(_p4))
}
goto _12
@@ -28581,7 +29175,7 @@ _9:
_freeEphemeralFunction(tls, _db, (*XFuncDef)(_p4))
goto _12
_10:
- if (_db.X79) == nil {
+ if _db.XpnBytesFreed == nil {
_sqlite3ValueFree(tls, (*XMem)(_p4))
goto _15
}
@@ -28589,7 +29183,7 @@ _10:
_15:
goto _12
_11:
- if (_db.X79) == nil {
+ if _db.XpnBytesFreed == nil {
_sqlite3VtabUnlock(tls, (*XVTable)(_p4))
}
goto _12
@@ -28599,36 +29193,42 @@ _12:
var _freeP4Ø00__func__Ø000 [7]int8
func init() {
- crt.Xstrncpy(nil, &_freeP4Ø00__func__Ø000[0], str(41761), 7)
+ crt.Xstrncpy(nil, &_freeP4Ø00__func__Ø000[0], str(41716), 7)
}
func _freeP4FuncCtx(tls *crt.TLS, _db *Xsqlite3, _p *Xsqlite3_context) {
- _freeEphemeralFunction(tls, _db, (*XFuncDef)(_p.X1))
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_p))
+ _freeEphemeralFunction(tls, _db, (*XFuncDef)(_p.XpFunc))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_p))
}
-// If the input FuncDef structure is ephemeral, then free it. If
-// the FuncDef is not ephermal, then do nothing.
+// C comment
+// /*
+// ** If the input FuncDef structure is ephemeral, then free it. If
+// ** the FuncDef is not ephermal, then do nothing.
+// */
func _freeEphemeralFunction(tls *crt.TLS, _db *Xsqlite3, _pDef *XFuncDef) {
- if (int32(_pDef.X1) & i32(16)) != i32(0) {
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_pDef))
+ if (int32(_pDef.XfuncFlags) & int32(16)) != int32(0) {
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_pDef))
}
}
-// Deallocate a KeyInfo object
+// C comment
+// /*
+// ** Deallocate a KeyInfo object
+// */
func _sqlite3KeyInfoUnref(tls *crt.TLS, _p *XKeyInfo) {
if _p == nil {
goto _0
}
func() {
- if (_p.X0) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117576), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3KeyInfoUnrefØ00__func__Ø000))), unsafe.Pointer(str(13857)))
+ if _p.XnRef <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117576), unsafe.Pointer(&_sqlite3KeyInfoUnrefØ00__func__Ø000), unsafe.Pointer(str(13812)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_p.X0))) -= 1
- if (_p.X0) == uint32(i32(0)) {
- _sqlite3DbFreeNN(tls, (*Xsqlite3)(_p.X4), (unsafe.Pointer)(_p))
+ _p.XnRef -= 1
+ if _p.XnRef == (0) {
+ _sqlite3DbFreeNN(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_p))
}
_0:
}
@@ -28636,62 +29236,74 @@ _0:
var _sqlite3KeyInfoUnrefØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3KeyInfoUnrefØ00__func__Ø000[0], str(41768), 20)
+ crt.Xstrncpy(nil, &_sqlite3KeyInfoUnrefØ00__func__Ø000[0], str(41723), 20)
}
-// Delete a P4 value if necessary.
+// C comment
+// /*
+// ** Delete a P4 value if necessary.
+// */
func _freeP4Mem(tls *crt.TLS, _db *Xsqlite3, _p *XMem) {
- if (_p.X7) != 0 {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X6))
- }
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_p))
-}
-
-// Change the value of the P4 operand for a specific instruction.
-// This routine is useful when a large program is loaded from a
-// static array using sqlite3VdbeAddOpList but we want to make a
-// few minor changes to the program.
-//
-// If n>=0 then the P4 operand is dynamic, meaning that a copy of
-// the string is made into memory obtained from sqlite3_malloc().
-// A value of n==0 means copy bytes of zP4 up to and including the
-// first null byte. If n>0 then copy n+1 bytes of zP4.
-//
-// Other values of n (P4_STATIC, P4_COLLSEQ etc.) indicate that zP4 points
-// to a string or structure that is guaranteed to exist for the lifetime of
-// the Vdbe. In these cases we can just copy the pointer.
-//
-// If addr<0 then change P4 on the most recently inserted instruction.
+ if _p.XszMalloc != 0 {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XzMalloc))
+ }
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_p))
+}
+
+// C comment
+// /*
+// ** Change the value of the P4 operand for a specific instruction.
+// ** This routine is useful when a large program is loaded from a
+// ** static array using sqlite3VdbeAddOpList but we want to make a
+// ** few minor changes to the program.
+// **
+// ** If n>=0 then the P4 operand is dynamic, meaning that a copy of
+// ** the string is made into memory obtained from sqlite3_malloc().
+// ** A value of n==0 means copy bytes of zP4 up to and including the
+// ** first null byte. If n>0 then copy n+1 bytes of zP4.
+// **
+// ** Other values of n (P4_STATIC, P4_COLLSEQ etc.) indicate that zP4 points
+// ** to a string or structure that is guaranteed to exist for the lifetime of
+// ** the Vdbe. In these cases we can just copy the pointer.
+// **
+// ** If addr<0 then change P4 on the most recently inserted instruction.
+// */
func _vdbeChangeP4Full(tls *crt.TLS, _p *TVdbe, _pOp *XVdbeOp, _zP4 *int8, _n int32) {
- if (_pOp.X1) != 0 {
- _freeP4(tls, (*Xsqlite3)(_p.X0), int32(_pOp.X1), *(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(0))
- *(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))) = nil
+ if _pOp.Xp4type != 0 {
+ _freeP4(tls, (*Xsqlite3)(_p.Xdb), int32(_pOp.Xp4type), *(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ _pOp.Xp4type = 0
+ *(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)) = nil
}
- if _n < i32(0) {
- _sqlite3VdbeChangeP4(tls, _p, int32((uintptr(unsafe.Pointer(_pOp))-uintptr(unsafe.Pointer((*XVdbeOp)(_p.X17))))/24), _zP4, _n)
+ if _n < int32(0) {
+ _sqlite3VdbeChangeP4(tls, _p, int32((uintptr(unsafe.Pointer(_pOp))-uintptr(_p.XaOp))/24), _zP4, _n)
goto _2
}
- if _n == i32(0) {
+ if _n == int32(0) {
_n = _sqlite3Strlen30(tls, _zP4)
}
- *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))) = _sqlite3DbStrNDup(tls, (*Xsqlite3)(_p.X0), _zP4, uint64(_n))
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(-1))
+ *(**int8)(unsafe.Pointer(&_pOp.Xp4)) = _sqlite3DbStrNDup(tls, (*Xsqlite3)(_p.Xdb), _zP4, uint64(_n))
+ _pOp.Xp4type = int8(-1)
_2:
}
-// Lock the virtual table so that it cannot be disconnected.
-// Locks nest. Every lock should have a corresponding unlock.
-// If an unlock is omitted, resources leaks will occur.
-//
-// If a disconnect is attempted while a virtual table is locked,
-// the disconnect is deferred until all locks have been removed.
+// C comment
+// /*
+// ** Lock the virtual table so that it cannot be disconnected.
+// ** Locks nest. Every lock should have a corresponding unlock.
+// ** If an unlock is omitted, resources leaks will occur.
+// **
+// ** If a disconnect is attempted while a virtual table is locked,
+// ** the disconnect is deferred until all locks have been removed.
+// */
func _sqlite3VtabLock(tls *crt.TLS, _pVTab *XVTable) {
- *(*int32)(unsafe.Pointer(&(_pVTab.X3))) += 1
+ _pVTab.XnRef += 1
}
-// Code an OP_TableLock instruction for each table locked by the
-// statement (configured by calls to sqlite3TableLock()).
+// C comment
+// /*
+// ** Code an OP_TableLock instruction for each table locked by the
+// ** statement (configured by calls to sqlite3TableLock()).
+// */
func _codeTableLocks(tls *crt.TLS, _pParse *XParse) {
var _i, _1_p1 int32
var _pVdbe *TVdbe
@@ -28699,18 +29311,18 @@ func _codeTableLocks(tls *crt.TLS, _pParse *XParse) {
_pVdbe = _sqlite3GetVdbe(tls, _pParse)
func() {
if _pVdbe == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99792), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeTableLocksØ00__func__Ø000))), unsafe.Pointer(str(41788)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99792), unsafe.Pointer(&_codeTableLocksØ00__func__Ø000), unsafe.Pointer(str(41743)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_2:
- if _i >= (_pParse.X36) {
+ if _i >= _pParse.XnTableLock {
goto _5
}
- _1_p = (*XTableLock)(unsafe.Pointer(uintptr(_pParse.X37) + 16*uintptr(_i)))
- _1_p1 = _1_p.X0
- _sqlite3VdbeAddOp4(tls, _pVdbe, i32(154), _1_p1, _1_p.X1, int32(_1_p.X2), _1_p.X3, i32(-2))
+ _1_p = elem64((*XTableLock)(_pParse.XaTableLock), uintptr(_i))
+ _1_p1 = _1_p.XiDb
+ _sqlite3VdbeAddOp4(tls, _pVdbe, int32(154), _1_p1, _1_p.XiTab, int32(_1_p.XisWriteLock), _1_p.XzLockName, int32(-2))
_i += 1
goto _2
_5:
@@ -28719,67 +29331,70 @@ _5:
var _codeTableLocksØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_codeTableLocksØ00__func__Ø000[0], str(41797), 15)
+ crt.Xstrncpy(nil, &_codeTableLocksØ00__func__Ø000[0], str(41752), 15)
}
-// This routine generates code that will initialize all of the
-// register used by the autoincrement tracker.
+// C comment
+// /*
+// ** This routine generates code that will initialize all of the
+// ** register used by the autoincrement tracker.
+// */
func _sqlite3AutoincrementBegin(tls *crt.TLS, _pParse *XParse) {
var _memId int32
var _db *Xsqlite3
var _pDb *XDb
var _v *TVdbe
var _1_aOp *XVdbeOp
- var _p *TAggInfo_func
- _db = (*Xsqlite3)(_pParse.X0)
- _v = (*TVdbe)(_pParse.X2)
+ var _p *XAutoincInfo
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
- if (*XTable)(_pParse.X40) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109100), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AutoincrementBeginØ00__func__Ø000))), unsafe.Pointer(str(41812)))
+ if (*XTable)(_pParse.XpTriggerTab) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109100), unsafe.Pointer(&_sqlite3AutoincrementBeginØ00__func__Ø000), unsafe.Pointer(str(41767)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XParse)(_pParse.X39) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109101), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AutoincrementBeginØ00__func__Ø000))), unsafe.Pointer(str(41835)))
+ if (*XParse)(_pParse.XpToplevel) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109101), unsafe.Pointer(&_sqlite3AutoincrementBeginØ00__func__Ø000), unsafe.Pointer(str(41790)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109103), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AutoincrementBeginØ00__func__Ø000))), unsafe.Pointer(str(41861)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109103), unsafe.Pointer(&_sqlite3AutoincrementBeginØ00__func__Ø000), unsafe.Pointer(str(41816)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*TAggInfo_func)(_pParse.X38)
+ _p = (*XAutoincInfo)(_pParse.XpAinc)
_6:
if _p == nil {
goto _9
}
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_p.X2)))
- _memId = _p.X3
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_p.XiDb))
+ _memId = _p.XregCtr
func() {
- if _sqlite3SchemaMutexHeld(tls, _db, i32(0), (*XSchema)(_pDb.X4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109121), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AutoincrementBeginØ00__func__Ø000))), unsafe.Pointer(str(41863)))
+ if _sqlite3SchemaMutexHeld(tls, _db, int32(0), (*XSchema)(_pDb.XpSchema)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109121), unsafe.Pointer(&_sqlite3AutoincrementBeginØ00__func__Ø000), unsafe.Pointer(str(41818)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3OpenTable(tls, _pParse, i32(0), _p.X2, (*XTable)((*XSchema)(_pDb.X4).X6), i32(106))
- _sqlite3VdbeLoadString(tls, _v, _memId-i32(1), (*XTable)(_p.X1).X0)
- _1_aOp = _sqlite3VdbeAddOpList(tls, _v, i32(10), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3AutoincrementBeginØ00autoIncØ002)), _sqlite3AutoincrementBeginØ00iLnØ001)
+ _sqlite3OpenTable(tls, _pParse, int32(0), _p.XiDb, (*XTable)((*XSchema)(_pDb.XpSchema).XpSeqTab), int32(106))
+ _sqlite3VdbeLoadString(tls, _v, _memId-int32(1), (*XTable)(_p.XpTab).XzName)
+ _1_aOp = _sqlite3VdbeAddOpList(tls, _v, int32(10), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3AutoincrementBeginØ00autoIncØ002)), _sqlite3AutoincrementBeginØ00iLnØ001)
if _1_aOp == nil {
goto _9
}
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(0)))).X4))) = _memId
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(0)))).X5))) = _memId + i32(1)
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(2)))).X5))) = _memId
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(3)))).X3))) = _memId - i32(1)
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(3)))).X5))) = _memId
- *(*uint16)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(3)))).X2))) = uint16(i32(16))
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(4)))).X4))) = _memId + i32(1)
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(5)))).X5))) = _memId
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(8)))).X4))) = _memId
- _p = (*TAggInfo_func)(_p.X0)
+ elem61(_1_aOp, 0).Xp2 = _memId
+ elem61(_1_aOp, 0).Xp3 = _memId + int32(1)
+ elem61(_1_aOp, uintptr(2)).Xp3 = _memId
+ elem61(_1_aOp, uintptr(3)).Xp1 = _memId - int32(1)
+ elem61(_1_aOp, uintptr(3)).Xp3 = _memId
+ elem61(_1_aOp, uintptr(3)).Xp5 = uint16(16)
+ elem61(_1_aOp, uintptr(4)).Xp2 = _memId + int32(1)
+ elem61(_1_aOp, uintptr(5)).Xp3 = _memId
+ elem61(_1_aOp, uintptr(8)).Xp2 = _memId
+ _p = (*XAutoincInfo)(_p.XpNext)
goto _6
_9:
}
@@ -28787,221 +29402,236 @@ _9:
var _sqlite3AutoincrementBeginØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AutoincrementBeginØ00__func__Ø000[0], str(41907), 26)
+ crt.Xstrncpy(nil, &_sqlite3AutoincrementBeginØ00__func__Ø000[0], str(41862), 26)
}
-// Generate code that will
-//
-// (1) acquire a lock for table pTab then
-// (2) open pTab as cursor iCur.
-//
-// If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index
-// for that table that is actually opened.
+// C comment
+// /*
+// ** Generate code that will
+// **
+// ** (1) acquire a lock for table pTab then
+// ** (2) open pTab as cursor iCur.
+// **
+// ** If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index
+// ** for that table that is actually opened.
+// */
func _sqlite3OpenTable(tls *crt.TLS, _pParse *XParse, _iCur int32, _iDb int32, _pTab *XTable, _opcode int32) {
var _v *TVdbe
var _2_pPk *XIndex
func() {
- if (_pTab.X16) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108869), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OpenTableØ00__func__Ø000))), unsafe.Pointer(str(41933)))
+ if _pTab.XnModuleArg != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108869), unsafe.Pointer(&_sqlite3OpenTableØ00__func__Ø000), unsafe.Pointer(str(41888)))
crt.X__builtin_abort(tls)
}
}()
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
- if _opcode != i32(107) && _opcode != i32(106) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108871), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OpenTableØ00__func__Ø000))), unsafe.Pointer(str(41950)))
+ if _opcode != int32(107) && _opcode != int32(106) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108871), unsafe.Pointer(&_sqlite3OpenTableØ00__func__Ø000), unsafe.Pointer(str(41905)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3TableLock(tls, _pParse, _iDb, _pTab.X7, uint8(func() int32 {
- if _opcode == i32(107) {
- return i32(1)
+ _sqlite3TableLock(tls, _pParse, _iDb, _pTab.Xtnum, uint8(func() int32 {
+ if _opcode == int32(107) {
+ return int32(1)
}
- return i32(0)
- }()), _pTab.X0)
- if ((_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
- _sqlite3VdbeAddOp4Int(tls, _v, _opcode, _iCur, _pTab.X7, _iDb, int32(_pTab.X11))
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_pTab.X0))
+ return int32(0)
+ }()), _pTab.XzName)
+ if (_pTab.XtabFlags & uint32(32)) == (0) {
+ _sqlite3VdbeAddOp4Int(tls, _v, _opcode, _iCur, _pTab.Xtnum, _iDb, int32(_pTab.XnCol))
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_pTab.XzName))
goto _8
}
_2_pPk = _sqlite3PrimaryKeyIndex(tls, _pTab)
func() {
if _2_pPk == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108879), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OpenTableØ00__func__Ø000))), unsafe.Pointer(str(41994)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108879), unsafe.Pointer(&_sqlite3OpenTableØ00__func__Ø000), unsafe.Pointer(str(41949)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_2_pPk.X11) != (_pTab.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108880), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OpenTableØ00__func__Ø000))), unsafe.Pointer(str(42001)))
+ if _2_pPk.Xtnum != _pTab.Xtnum {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108880), unsafe.Pointer(&_sqlite3OpenTableØ00__func__Ø000), unsafe.Pointer(str(41956)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp3(tls, _v, _opcode, _iCur, _2_pPk.X11, _iDb)
+ _sqlite3VdbeAddOp3(tls, _v, _opcode, _iCur, _2_pPk.Xtnum, _iDb)
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _2_pPk)
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_pTab.X0))
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_pTab.XzName))
_8:
}
var _sqlite3OpenTableØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3OpenTableØ00__func__Ø000[0], str(42023), 17)
+ crt.Xstrncpy(nil, &_sqlite3OpenTableØ00__func__Ø000[0], str(41978), 17)
}
-// Record the fact that we want to lock a table at run-time.
-//
-// The table to be locked has root page iTab and is found in database iDb.
-// A read or a write lock can be taken depending on isWritelock.
-//
-// This routine just records the fact that the lock is desired. The
-// code to make the lock occur is generated by a later call to
-// codeTableLocks() which occurs during sqlite3FinishCoding().
+// C comment
+// /*
+// ** Record the fact that we want to lock a table at run-time.
+// **
+// ** The table to be locked has root page iTab and is found in database iDb.
+// ** A read or a write lock can be taken depending on isWritelock.
+// **
+// ** This routine just records the fact that the lock is desired. The
+// ** code to make the lock occur is generated by a later call to
+// ** codeTableLocks() which occurs during sqlite3FinishCoding().
+// */
func _sqlite3TableLock(tls *crt.TLS, _pParse *XParse, _iDb int32, _iTab int32, _isWriteLock uint8, _zName *int8) {
var _i, _nBytes int32
var _pToplevel *XParse
var _p *XTableLock
_pToplevel = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
func() {
- if _iDb < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99756), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TableLockØ00__func__Ø000))), unsafe.Pointer(str(42040)))
+ if _iDb < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99756), unsafe.Pointer(&_sqlite3TableLockØ00__func__Ø000), unsafe.Pointer(str(41995)))
crt.X__builtin_abort(tls)
}
}()
- if _iDb == i32(1) {
+ if _iDb == int32(1) {
return
}
- if _sqlite3BtreeSharable(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_pParse.X0).X4)+16*uintptr(_iDb))).X1)) == 0 {
+ if _sqlite3BtreeSharable(tls, (*XBtree)(elem27((*XDb)((*Xsqlite3)(_pParse.Xdb).XaDb), uintptr(_iDb)).XpBt)) == 0 {
return
}
- _i = i32(0)
+ _i = int32(0)
_6:
- if _i >= (_pToplevel.X36) {
+ if _i >= _pToplevel.XnTableLock {
goto _9
}
- _p = (*XTableLock)(unsafe.Pointer(uintptr(_pToplevel.X37) + 16*uintptr(_i)))
- if ((_p.X0) == _iDb) && ((_p.X1) == _iTab) {
- *(*uint8)(unsafe.Pointer(&(_p.X2))) = uint8(bool2int(((_p.X2) != 0) || (_isWriteLock != 0)))
+ _p = elem64((*XTableLock)(_pToplevel.XaTableLock), uintptr(_i))
+ if (_p.XiDb == _iDb) && (_p.XiTab == _iTab) {
+ _p.XisWriteLock = uint8(bool2int((_p.XisWriteLock != 0) || (_isWriteLock != 0)))
return
}
_i += 1
goto _6
_9:
- _nBytes = int32(u32(16) * uint32((_pToplevel.X36)+i32(1)))
- *(**XTableLock)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pToplevel.X37))))) = (*XTableLock)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_pToplevel.X0), _pToplevel.X37, uint64(_nBytes)))
- if (*XTableLock)(_pToplevel.X37) != nil {
- _p = (*XTableLock)(unsafe.Pointer(uintptr(_pToplevel.X37) + 16*uintptr(postInc1((*int32)(unsafe.Pointer(&(_pToplevel.X36))), int32(1)))))
- *(*int32)(unsafe.Pointer(&(_p.X0))) = _iDb
- *(*int32)(unsafe.Pointer(&(_p.X1))) = _iTab
- *(*uint8)(unsafe.Pointer(&(_p.X2))) = _isWriteLock
- *(**int8)(unsafe.Pointer(&(_p.X3))) = _zName
+ _nBytes = int32(uint32(16) * uint32(_pToplevel.XnTableLock+int32(1)))
+ *(**XTableLock)(unsafe.Pointer(&_pToplevel.XaTableLock)) = (*XTableLock)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_pToplevel.Xdb), _pToplevel.XaTableLock, uint64(_nBytes)))
+ if _pToplevel.XaTableLock != nil {
+ _p = elem64((*XTableLock)(_pToplevel.XaTableLock), uintptr(postInc2(&_pToplevel.XnTableLock, 1)))
+ _p.XiDb = _iDb
+ _p.XiTab = _iTab
+ _p.XisWriteLock = _isWriteLock
+ _p.XzLockName = _zName
goto _14
}
- *(*int32)(unsafe.Pointer(&(_pToplevel.X36))) = i32(0)
- _sqlite3OomFault(tls, (*Xsqlite3)(_pToplevel.X0))
+ _pToplevel.XnTableLock = int32(0)
+ _sqlite3OomFault(tls, (*Xsqlite3)(_pToplevel.Xdb))
_14:
}
var _sqlite3TableLockØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TableLockØ00__func__Ø000[0], str(42047), 17)
+ crt.Xstrncpy(nil, &_sqlite3TableLockØ00__func__Ø000[0], str(42002), 17)
}
-// Return the PRIMARY KEY index of a table
+// C comment
+// /*
+// ** Return the PRIMARY KEY index of a table
+// */
func _sqlite3PrimaryKeyIndex(tls *crt.TLS, _pTab *XTable) (r0 *XIndex) {
var _p *XIndex
- _p = (*XIndex)(_pTab.X2)
+ _p = (*XIndex)(_pTab.XpIndex)
_0:
- if _p == nil || int32((uint32(_p.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(2) {
+ if _p == nil || int32((uint32(_p.XidxType)<<30)>>30) == int32(2) {
goto _4
}
- _p = (*XIndex)(_p.X5)
+ _p = (*XIndex)(_p.XpNext)
goto _0
_4:
return _p
}
-// Set the P4 on the most recently added opcode to the KeyInfo for the
-// index given.
+// C comment
+// /*
+// ** Set the P4 on the most recently added opcode to the KeyInfo for the
+// ** index given.
+// */
func _sqlite3VdbeSetP4KeyInfo(tls *crt.TLS, _pParse *XParse, _pIdx *XIndex) {
var _v *TVdbe
var _pKeyInfo *XKeyInfo
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72451), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetP4KeyInfoØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72451), unsafe.Pointer(&_sqlite3VdbeSetP4KeyInfoØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pIdx == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72452), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetP4KeyInfoØ00__func__Ø000))), unsafe.Pointer(str(42069)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72452), unsafe.Pointer(&_sqlite3VdbeSetP4KeyInfoØ00__func__Ø000), unsafe.Pointer(str(42024)))
crt.X__builtin_abort(tls)
}
}()
_pKeyInfo = _sqlite3KeyInfoOfIndex(tls, _pParse, _pIdx)
if _pKeyInfo != nil {
- _sqlite3VdbeAppendP4(tls, _v, (unsafe.Pointer)(_pKeyInfo), i32(-5))
+ _sqlite3VdbeAppendP4(tls, _v, unsafe.Pointer(_pKeyInfo), int32(-5))
}
}
var _sqlite3VdbeSetP4KeyInfoØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSetP4KeyInfoØ00__func__Ø000[0], str(42077), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSetP4KeyInfoØ00__func__Ø000[0], str(42032), 24)
}
-// Return a KeyInfo structure that is appropriate for the given Index.
-//
-// The caller should invoke sqlite3KeyInfoUnref() on the returned object
-// when it has finished using it.
+// C comment
+// /*
+// ** Return a KeyInfo structure that is appropriate for the given Index.
+// **
+// ** The caller should invoke sqlite3KeyInfoUnref() on the returned object
+// ** when it has finished using it.
+// */
func _sqlite3KeyInfoOfIndex(tls *crt.TLS, _pParse *XParse, _pIdx *XIndex) (r0 *XKeyInfo) {
var _i, _nCol, _nKey int32
var _4_zColl *int8
var _pKey *XKeyInfo
- _nCol = int32(_pIdx.X14)
- _nKey = int32(_pIdx.X13)
- if (_pParse.X16) != 0 {
+ _nCol = int32(_pIdx.XnColumn)
+ _nKey = int32(_pIdx.XnKeyCol)
+ if _pParse.XnErr != 0 {
return nil
}
- if ((uint32((_pIdx.X16)>>uint(i32(3))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _pKey = _sqlite3KeyInfoAlloc(tls, (*Xsqlite3)(_pParse.X0), _nKey, _nCol-_nKey)
+ if ((uint32(_pIdx.XidxType>>3) << 31) >> 31) != 0 {
+ _pKey = _sqlite3KeyInfoAlloc(tls, (*Xsqlite3)(_pParse.Xdb), _nKey, _nCol-_nKey)
goto _2
}
- _pKey = _sqlite3KeyInfoAlloc(tls, (*Xsqlite3)(_pParse.X0), _nCol, i32(0))
+ _pKey = _sqlite3KeyInfoAlloc(tls, (*Xsqlite3)(_pParse.Xdb), _nCol, int32(0))
_2:
if _pKey == nil {
goto _3
}
func() {
if _sqlite3KeyInfoIsWriteable(tls, _pKey) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104060), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3KeyInfoOfIndexØ00__func__Ø000))), unsafe.Pointer(str(42101)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104060), unsafe.Pointer(&_sqlite3KeyInfoOfIndexØ00__func__Ø000), unsafe.Pointer(str(42056)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_6:
if _i >= _nCol {
goto _9
}
- _4_zColl = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_i)))
- *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_pKey.X6))))) + 4*uintptr(_i))) = func() *XCollSeq {
+ _4_zColl = *elem0(_pIdx.XazColl, uintptr(_i))
+ *elem62((**XCollSeq)(unsafe.Pointer(&_pKey.XaColl)), uintptr(_i)) = func() *XCollSeq {
if _4_zColl == (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)) {
return nil
}
return _sqlite3LocateCollSeq(tls, _pParse, _4_zColl)
}()
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pKey.X5)) + 1*uintptr(_i))) = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X7)) + 1*uintptr(_i)))
+ *elem15(_pKey.XaSortOrder, uintptr(_i)) = *elem15(_pIdx.XaSortOrder, uintptr(_i))
_i += 1
goto _6
_9:
- if (_pParse.X16) != 0 {
+ if _pParse.XnErr != 0 {
_sqlite3KeyInfoUnref(tls, _pKey)
_pKey = nil
}
@@ -29009,21 +29639,24 @@ _3:
return _pKey
}
-// Allocate a KeyInfo object sufficient for an index of N key columns and
-// X extra columns.
+// C comment
+// /*
+// ** Allocate a KeyInfo object sufficient for an index of N key columns and
+// ** X extra columns.
+// */
func _sqlite3KeyInfoAlloc(tls *crt.TLS, _db *Xsqlite3, _N int32, _X int32) (r0 *XKeyInfo) {
var _nExtra int32
var _p *XKeyInfo
- _nExtra = int32(uint32(_N+_X) * u32(5))
- _p = (*XKeyInfo)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(24)+uint32(_nExtra))))
+ _nExtra = int32(uint32(_N+_X) * uint32(5))
+ _p = (*XKeyInfo)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(24)+uint32(_nExtra))))
if _p != nil {
- *(**uint8)(unsafe.Pointer(&(_p.X5))) = (*uint8)(unsafe.Pointer((**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_p.X6))))) + 4*uintptr(_N+_X)))))
- *(*uint16)(unsafe.Pointer(&(_p.X2))) = uint16(_N)
- *(*uint16)(unsafe.Pointer(&(_p.X3))) = uint16(_X)
- *(*uint8)(unsafe.Pointer(&(_p.X1))) = _db.X14
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))))) = _db
- *(*uint32)(unsafe.Pointer(&(_p.X0))) = uint32(i32(1))
- crt.Xmemset(tls, (unsafe.Pointer)((*XKeyInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p))+24*uintptr(i32(1))))), i32(0), uint32(_nExtra))
+ _p.XaSortOrder = (*uint8)(unsafe.Pointer(elem62((**XCollSeq)(unsafe.Pointer(&_p.XaColl)), uintptr(_N+_X))))
+ _p.XnField = uint16(_N)
+ _p.XnXField = uint16(_X)
+ _p.Xenc = _db.Xenc
+ *(**Xsqlite3)(unsafe.Pointer(&_p.Xdb)) = _db
+ _p.XnRef = uint32(1)
+ crt.Xmemset(tls, unsafe.Pointer(elem65(_p, uintptr(1))), int32(0), uint32(_nExtra))
goto _1
}
_sqlite3OomFault(tls, _db)
@@ -29031,138 +29664,148 @@ _1:
return _p
}
-// Return TRUE if a KeyInfo object can be change. The KeyInfo object
-// can only be changed if this is just a single reference to the object.
-//
-// This routine is used only inside of assert() statements.
+// C comment
+// /*
+// ** Return TRUE if a KeyInfo object can be change. The KeyInfo object
+// ** can only be changed if this is just a single reference to the object.
+// **
+// ** This routine is used only inside of assert() statements.
+// */
func _sqlite3KeyInfoIsWriteable(tls *crt.TLS, _p *XKeyInfo) (r0 int32) {
- return bool2int((_p.X0) == uint32(i32(1)))
+ return bool2int(_p.XnRef == uint32(1))
}
var _sqlite3KeyInfoOfIndexØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3KeyInfoOfIndexØ00__func__Ø000[0], str(42133), 22)
+ crt.Xstrncpy(nil, &_sqlite3KeyInfoOfIndexØ00__func__Ø000[0], str(42088), 22)
}
+// C comment
+// /*
+// ** Name of the default collating sequence
+// */
var _sqlite3StrBINARY [7]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StrBINARY[0], str(37881), 7)
-}
-
-// This function returns the collation sequence for database native text
-// encoding identified by the string zName, length nName.
-//
-// If the requested collation sequence is not available, or not available
-// in the database native encoding, the collation factory is invoked to
-// request it. If the collation factory does not supply such a sequence,
-// and the sequence is available in another text encoding, then that is
-// returned instead.
-//
-// If no versions of the requested collations sequence are available, or
-// another error occurs, NULL is returned and an error message written into
-// pParse.
-//
-// This routine is a wrapper around sqlite3FindCollSeq(). This routine
-// invokes the collation factory if the named collation cannot be found
-// and generates an error message.
-//
-// See also: sqlite3FindCollSeq(), sqlite3GetCollSeq()
+ crt.Xstrncpy(nil, &_sqlite3StrBINARY[0], str(37836), 7)
+}
+
+// C comment
+// /*
+// ** This function returns the collation sequence for database native text
+// ** encoding identified by the string zName, length nName.
+// **
+// ** If the requested collation sequence is not available, or not available
+// ** in the database native encoding, the collation factory is invoked to
+// ** request it. If the collation factory does not supply such a sequence,
+// ** and the sequence is available in another text encoding, then that is
+// ** returned instead.
+// **
+// ** If no versions of the requested collations sequence are available, or
+// ** another error occurs, NULL is returned and an error message written into
+// ** pParse.
+// **
+// ** This routine is a wrapper around sqlite3FindCollSeq(). This routine
+// ** invokes the collation factory if the named collation cannot be found
+// ** and generates an error message.
+// **
+// ** See also: sqlite3FindCollSeq(), sqlite3GetCollSeq()
+// */
func _sqlite3LocateCollSeq(tls *crt.TLS, _pParse *XParse, _zName *int8) (r0 *XCollSeq) {
var _enc, _initbusy uint8
var _db *Xsqlite3
var _pColl *XCollSeq
- _db = (*Xsqlite3)(_pParse.X0)
- _enc = _db.X14
- _initbusy = (*t21)(unsafe.Pointer(&(_db.X33))).X2
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _enc = _db.Xenc
+ _initbusy = _db.Xinit.Xbusy
_pColl = _sqlite3FindCollSeq(tls, _db, _enc, _zName, int32(_initbusy))
- if (_initbusy == 0) && ((_pColl == nil) || ((_pColl.X3) == nil)) {
+ if (_initbusy == 0) && ((_pColl == nil) || (_pColl.XxCmp == nil)) {
_pColl = _sqlite3GetCollSeq(tls, _pParse, _enc, _pColl, _zName)
}
return _pColl
}
-// This function is responsible for invoking the collation factory callback
-// or substituting a collation sequence of a different encoding when the
-// requested collation sequence is not available in the desired encoding.
-//
-// If it is not NULL, then pColl must point to the database native encoding
-// collation sequence with name zName, length nName.
-//
-// The return value is either the collation sequence to be used in database
-// db for collation type name zName, length nName, or NULL, if no collation
-// sequence can be found. If no collation is found, leave an error message.
-//
-// See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq()
+// C comment
+// /*
+// ** This function is responsible for invoking the collation factory callback
+// ** or substituting a collation sequence of a different encoding when the
+// ** requested collation sequence is not available in the desired encoding.
+// **
+// ** If it is not NULL, then pColl must point to the database native encoding
+// ** collation sequence with name zName, length nName.
+// **
+// ** The return value is either the collation sequence to be used in database
+// ** db for collation type name zName, length nName, or NULL, if no collation
+// ** sequence can be found. If no collation is found, leave an error message.
+// **
+// ** See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq()
+// */
func _sqlite3GetCollSeq(tls *crt.TLS, _pParse *XParse, _enc uint8, _pColl *XCollSeq, _zName *int8) (r0 *XCollSeq) {
var _db *Xsqlite3
var _p *XCollSeq
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_p = _pColl
if _p == nil {
- _p = _sqlite3FindCollSeq(tls, _db, _enc, _zName, i32(0))
+ _p = _sqlite3FindCollSeq(tls, _db, _enc, _zName, int32(0))
}
- if (_p == nil) || ((_p.X3) == nil) {
+ if (_p == nil) || (_p.XxCmp == nil) {
_callCollNeeded(tls, _db, int32(_enc), _zName)
- _p = _sqlite3FindCollSeq(tls, _db, _enc, _zName, i32(0))
+ _p = _sqlite3FindCollSeq(tls, _db, _enc, _zName, int32(0))
}
- if ((_p != nil) && ((_p.X3) == nil)) && _synthCollSeq(tls, _db, _p) != 0 {
+ if ((_p != nil) && (_p.XxCmp == nil)) && _synthCollSeq(tls, _db, _p) != 0 {
_p = nil
}
func() {
- if _p != nil && (_p.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104250), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GetCollSeqØ00__func__Ø000))), unsafe.Pointer(str(42155)))
+ if _p != nil && _p.XxCmp == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104250), unsafe.Pointer(&_sqlite3GetCollSeqØ00__func__Ø000), unsafe.Pointer(str(42110)))
crt.X__builtin_abort(tls)
}
}()
if _p == nil {
- _sqlite3ErrorMsg(tls, _pParse, str(42169), unsafe.Pointer(_zName))
+ _sqlite3ErrorMsg(tls, _pParse, str(42124), unsafe.Pointer(_zName))
}
return _p
}
-// Invoke the 'collation needed' callback to request a collation sequence
-// in the encoding enc of name zName, length nName.
+// C comment
+// /*
+// ** Invoke the 'collation needed' callback to request a collation sequence
+// ** in the encoding enc of name zName, length nName.
+// */
func _callCollNeeded(tls *crt.TLS, _db *Xsqlite3, _enc int32, _zName *int8) {
var _1_zExternal, _2_zExternal *int8
var _2_pTmp *XMem
func() {
- if (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)
- }{(_db.X53)}))) != nil && (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)
- }{(_db.X54)}))) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104169), unsafe.Pointer((*int8)(unsafe.Pointer(&_callCollNeededØ00__func__Ø000))), unsafe.Pointer(str(42200)))
+ if _db.XxCollNeeded != nil && _db.XxCollNeeded16 != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104169), unsafe.Pointer(&_callCollNeededØ00__func__Ø000), unsafe.Pointer(str(42155)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)
- }{(_db.X53)}))) == nil {
+ if _db.XxCollNeeded == nil {
goto _3
}
_1_zExternal = _sqlite3DbStrDup(tls, _db, _zName)
if _1_zExternal == nil {
return
}
- (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)
- }{(_db.X53)})))(tls, _db.X55, _db, _enc, _1_zExternal)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_zExternal))
+ func() func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8) {
+ v := _db.XxCollNeeded
+ return *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, *int8))(unsafe.Pointer(&v))
+ }()(tls, _db.XpCollNeededArg, _db, _enc, _1_zExternal)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_zExternal))
_3:
- if (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)
- }{(_db.X54)}))) == nil {
+ if _db.XxCollNeeded16 == nil {
goto _5
}
_2_pTmp = _sqlite3ValueNew(tls, _db)
- _sqlite3ValueSetStr(tls, _2_pTmp, i32(-1), (unsafe.Pointer)(_zName), uint8(i32(1)), nil)
- _2_zExternal = (*int8)(_sqlite3ValueText(tls, _2_pTmp, uint8(i32(2))))
+ _sqlite3ValueSetStr(tls, _2_pTmp, int32(-1), unsafe.Pointer(_zName), uint8(1), nil)
+ _2_zExternal = (*int8)(_sqlite3ValueText(tls, _2_pTmp, uint8(2)))
if _2_zExternal != nil {
- (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)
- }{(_db.X54)})))(tls, _db.X55, _db, int32(_db.X14), (unsafe.Pointer)(_2_zExternal))
+ func() func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer) {
+ v := _db.XxCollNeeded16
+ return *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, int32, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()(tls, _db.XpCollNeededArg, _db, int32(_db.Xenc), unsafe.Pointer(_2_zExternal))
}
_sqlite3ValueFree(tls, _2_pTmp)
_5:
@@ -29171,57 +29814,59 @@ _5:
var _callCollNeededØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_callCollNeededØ00__func__Ø000[0], str(42239), 15)
+ crt.Xstrncpy(nil, &_callCollNeededØ00__func__Ø000[0], str(42194), 15)
}
-// Make a copy of a string in memory obtained from sqliteMalloc(). These
-// functions call sqlite3MallocRaw() directly instead of sqliteMalloc(). This
-// is because when memory debugging is turned on, these two functions are
-// called via macros that record the current file and line number in the
-// ThreadData structure.
+// C comment
+// /*
+// ** Make a copy of a string in memory obtained from sqliteMalloc(). These
+// ** functions call sqlite3MallocRaw() directly instead of sqliteMalloc(). This
+// ** is because when memory debugging is turned on, these two functions are
+// ** called via macros that record the current file and line number in the
+// ** ThreadData structure.
+// */
func _sqlite3DbStrDup(tls *crt.TLS, _db *Xsqlite3, _z *int8) (r0 *int8) {
var _n uint32
var _zNew *int8
if _z == nil {
return nil
}
- _n = crt.Xstrlen(tls, _z) + uint32(i32(1))
+ _n = crt.Xstrlen(tls, _z) + uint32(1)
_zNew = (*int8)(_sqlite3DbMallocRaw(tls, _db, uint64(_n)))
if _zNew != nil {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zNew), (unsafe.Pointer)(_z), _n)
+ crt.Xmemcpy(tls, unsafe.Pointer(_zNew), unsafe.Pointer(_z), _n)
}
return _zNew
}
-// This routine is called if the collation factory fails to deliver a
-// collation function in the best encoding but there may be other versions
-// of this collation function (for other text encodings) available. Use one
-// of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if
-// possible.
+// C comment
+// /*
+// ** This routine is called if the collation factory fails to deliver a
+// ** collation function in the best encoding but there may be other versions
+// ** of this collation function (for other text encodings) available. Use one
+// ** of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if
+// ** possible.
+// */
func _synthCollSeq(tls *crt.TLS, _db *Xsqlite3, _pColl *XCollSeq) (r0 int32) {
var _i int32
var _z *int8
var _pColl2 *XCollSeq
- _z = _pColl.X0
- _i = i32(0)
+ _z = _pColl.XzName
+ _i = int32(0)
_0:
- if _i >= i32(3) {
+ if _i >= int32(3) {
goto _3
}
- _pColl2 = _sqlite3FindCollSeq(tls, _db, *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_synthCollSeqØ00aEncØ001)) + 1*uintptr(_i))), _z, i32(0))
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32
- }{(_pColl2.X3)})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32
- }{nil})) {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pColl), (unsafe.Pointer)(_pColl2), u32(20))
- *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_pColl.X4))) = nil
- return i32(0)
+ _pColl2 = _sqlite3FindCollSeq(tls, _db, *elem15((*uint8)(unsafe.Pointer(&_synthCollSeqØ00aEncØ001)), uintptr(_i)), _z, int32(0))
+ if _pColl2.XxCmp != nil {
+ crt.Xmemcpy(tls, unsafe.Pointer(_pColl), unsafe.Pointer(_pColl2), uint32(20))
+ _pColl.XxDel = nil
+ return int32(0)
}
_i += 1
goto _0
_3:
- return i32(1)
+ return int32(1)
}
var _synthCollSeqØ00aEncØ001 [3]uint8
@@ -29233,123 +29878,127 @@ func init() {
var _sqlite3GetCollSeqØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3GetCollSeqØ00__func__Ø000[0], str(42254), 18)
+ crt.Xstrncpy(nil, &_sqlite3GetCollSeqØ00__func__Ø000[0], str(42209), 18)
}
-// Change the P4 operand of the most recently coded instruction
-// to the value defined by the arguments. This is a high-speed
-// version of sqlite3VdbeChangeP4().
-//
-// The P4 operand must not have been previously defined. And the new
-// P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of
-// those cases.
+// C comment
+// /*
+// ** Change the P4 operand of the most recently coded instruction
+// ** to the value defined by the arguments. This is a high-speed
+// ** version of sqlite3VdbeChangeP4().
+// **
+// ** The P4 operand must not have been previously defined. And the new
+// ** P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of
+// ** those cases.
+// */
func _sqlite3VdbeAppendP4(tls *crt.TLS, _p *TVdbe, _pP4 unsafe.Pointer, _n int32) {
var _pOp *XVdbeOp
func() {
- if _n == i32(-11) || _n == i32(-8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72430), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000))), unsafe.Pointer(str(42272)))
+ if _n == int32(-11) || _n == int32(-8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72430), unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000), unsafe.Pointer(str(42227)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _n > i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72431), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000))), unsafe.Pointer(str(42298)))
+ if _n > int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72431), unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000), unsafe.Pointer(str(42253)))
crt.X__builtin_abort(tls)
}
}()
- if ((*Xsqlite3)(_p.X0).X17) != 0 {
- _freeP4(tls, (*Xsqlite3)(_p.X0), _n, _pP4)
+ if ((*Xsqlite3)(_p.Xdb).XmallocFailed) != 0 {
+ _freeP4(tls, (*Xsqlite3)(_p.Xdb), _n, _pP4)
goto _6
}
func() {
if _pP4 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72435), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000))), unsafe.Pointer(str(42303)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72435), unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000), unsafe.Pointer(str(42258)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X27) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72436), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000))), unsafe.Pointer(str(41716)))
+ if _p.XnOp <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72436), unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000), unsafe.Pointer(str(41671)))
crt.X__builtin_abort(tls)
}
}()
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr((_p.X27)-i32(1))))
+ _pOp = elem61((*XVdbeOp)(_p.XaOp), uintptr(_p.XnOp-int32(1)))
func() {
- if int32(_pOp.X1) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72438), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000))), unsafe.Pointer(str(42310)))
+ if int32(_pOp.Xp4type) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72438), unsafe.Pointer(&_sqlite3VdbeAppendP4Ø00__func__Ø000), unsafe.Pointer(str(42265)))
crt.X__builtin_abort(tls)
}
}()
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(_n)
- *(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))) = _pP4
+ _pOp.Xp4type = int8(_n)
+ *(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)) = _pP4
_6:
}
var _sqlite3VdbeAppendP4Ø00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeAppendP4Ø00__func__Ø000[0], str(42334), 20)
+ crt.Xstrncpy(nil, &_sqlite3VdbeAppendP4Ø00__func__Ø000[0], str(42289), 20)
}
-// Generate code to cause the string zStr to be loaded into
-// register iDest
+// C comment
+// /* Generate code to cause the string zStr to be loaded into
+// ** register iDest
+// */
func _sqlite3VdbeLoadString(tls *crt.TLS, _p *TVdbe, _iDest int32, _zStr *int8) (r0 int32) {
- return _sqlite3VdbeAddOp4(tls, _p, i32(97), i32(0), _iDest, i32(0), _zStr, i32(0))
+ return _sqlite3VdbeAddOp4(tls, _p, int32(97), int32(0), _iDest, int32(0), _zStr, int32(0))
}
-// Add a whole list of operations to the operation stack. Return a
-// pointer to the first operation inserted.
-//
-// Non-zero P2 arguments to jump instructions are automatically adjusted
-// so that the jump target is relative to the first operation inserted.
+// C comment
+// /*
+// ** Add a whole list of operations to the operation stack. Return a
+// ** pointer to the first operation inserted.
+// **
+// ** Non-zero P2 arguments to jump instructions are automatically adjusted
+// ** so that the jump target is relative to the first operation inserted.
+// */
func _sqlite3VdbeAddOpList(tls *crt.TLS, _p *TVdbe, _nOp int32, _aOp *XVdbeOpList, _iLineno int32) (r0 *XVdbeOp) {
var _i int32
var _pOut, _pFirst *XVdbeOp
func() {
- if _nOp <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72134), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAddOpListØ00__func__Ø000))), unsafe.Pointer(str(42354)))
+ if _nOp <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72134), unsafe.Pointer(&_sqlite3VdbeAddOpListØ00__func__Ø000), unsafe.Pointer(str(42309)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X5) != uint32(i32(381479589)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72135), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAddOpListØ00__func__Ø000))), unsafe.Pointer(str(37642)))
+ if _p.Xmagic != uint32(381479589) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72135), unsafe.Pointer(&_sqlite3VdbeAddOpListØ00__func__Ø000), unsafe.Pointer(str(37597)))
crt.X__builtin_abort(tls)
}
}()
- if (((_p.X27) + _nOp) > ((*XParse)(_p.X3).X19)) && _growOpArray(tls, _p, _nOp) != 0 {
+ if ((_p.XnOp + _nOp) > ((*XParse)(_p.XpParse).XnOpAlloc)) && _growOpArray(tls, _p, _nOp) != 0 {
return nil
}
- _pFirst = store40(&_pOut, (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr(_p.X27))))
- _i = i32(0)
+ _pFirst = store61(&_pOut, elem61((*XVdbeOp)(_p.XaOp), uintptr(_p.XnOp)))
+ _i = int32(0)
_6:
if _i >= _nOp {
goto _9
}
- *(*uint8)(unsafe.Pointer(&(_pOut.X0))) = _aOp.X0
- *(*int32)(unsafe.Pointer(&(_pOut.X3))) = int32(_aOp.X1)
- *(*int32)(unsafe.Pointer(&(_pOut.X4))) = int32(_aOp.X2)
+ _pOut.Xopcode = _aOp.Xopcode
+ _pOut.Xp1 = int32(_aOp.Xp1)
+ _pOut.Xp2 = int32(_aOp.Xp2)
func() {
- if int32(_aOp.X2) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72144), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAddOpListØ00__func__Ø000))), unsafe.Pointer(str(42360)))
+ if int32(_aOp.Xp2) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72144), unsafe.Pointer(&_sqlite3VdbeAddOpListØ00__func__Ø000), unsafe.Pointer(str(42315)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3OpcodeProperty)) + 1*uintptr(_aOp.X0)))) & i32(1)) != i32(0)) && (int32(_aOp.X2) > i32(0)) {
- {
- p := (*int32)(unsafe.Pointer(&(_pOut.X4)))
- *p = (*p) + (_p.X27)
- sink1(*p)
- }
+ if ((int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3OpcodeProperty)), uintptr(_aOp.Xopcode))) & int32(1)) != int32(0)) && (int32(_aOp.Xp2) > int32(0)) {
+ _pOut.Xp2 += _p.XnOp
}
- *(*int32)(unsafe.Pointer(&(_pOut.X5))) = int32(_aOp.X3)
- *(*int8)(unsafe.Pointer(&(_pOut.X1))) = int8(i32(0))
- *(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOut.X6))))) = nil
- *(*uint16)(unsafe.Pointer(&(_pOut.X2))) = uint16(i32(0))
- *(**int8)(unsafe.Pointer(&(_pOut.X7))) = nil
+ _pOut.Xp3 = int32(_aOp.Xp3)
+ _pOut.Xp4type = 0
+ *(*unsafe.Pointer)(unsafe.Pointer(&_pOut.Xp4)) = nil
+ _pOut.Xp5 = 0
+ _pOut.XzComment = nil
- if (((*Xsqlite3)(_p.X0).X6) & i32(4096)) != 0 {
- _sqlite3VdbePrintOp(tls, nil, _i+(_p.X27), (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr(_i+(_p.X27)))))
+ if (((*Xsqlite3)(_p.Xdb).Xflags) & int32(4096)) != 0 {
+ _sqlite3VdbePrintOp(tls, nil, _i+_p.XnOp, elem61((*XVdbeOp)(_p.XaOp), uintptr(_i+_p.XnOp)))
}
*(*uintptr)(unsafe.Pointer(func() **XVdbeOp {
*(*uintptr)(unsafe.Pointer(func() **XVdbeOpList { _i += 1; return &_aOp }())) += uintptr(4)
@@ -29357,20 +30006,24 @@ _6:
}())) += uintptr(24)
goto _6
_9:
- {
- p := (*int32)(unsafe.Pointer(&(_p.X27)))
- *p = (*p) + _nOp
- sink1(*p)
- }
+ _p.XnOp += _nOp
return _pFirst
}
var _sqlite3VdbeAddOpListØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeAddOpListØ00__func__Ø000[0], str(42371), 21)
+ crt.Xstrncpy(nil, &_sqlite3VdbeAddOpListØ00__func__Ø000[0], str(42326), 21)
}
+// C comment
+// /* #include "opcodes.h" */
+// /*
+// ** Properties of opcodes. The OPFLG_INITIALIZER macro is
+// ** created by mkopcodeh.awk during compilation. Data is obtained
+// ** from the comments following the "case OP_xxxx:" statements in
+// ** the vdbe.c file.
+// */
var _sqlite3OpcodeProperty [166]uint8
func init() {
@@ -29380,35 +30033,38 @@ func init() {
var _sqlite3AutoincrementBeginØ00autoIncØ002 [10]XVdbeOpList
func init() {
- _sqlite3AutoincrementBeginØ00autoIncØ002 = [10]XVdbeOpList{XVdbeOpList{X0: u8(59), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(37), X1: i8(0), X2: i8(9), X3: i8(0)}, XVdbeOpList{X0: u8(99), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(77), X1: i8(0), X2: i8(7), X3: i8(0)}, XVdbeOpList{X0: u8(125), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(99), X1: i8(0), X2: i8(1), X3: i8(0)}, XVdbeOpList{X0: u8(13), X1: i8(0), X2: i8(9), X3: i8(0)}, XVdbeOpList{X0: u8(7), X1: i8(0), X2: i8(2), X3: i8(0)}, XVdbeOpList{X0: u8(56), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(114), X1: i8(0), X2: i8(0), X3: i8(0)}}
+ _sqlite3AutoincrementBeginØ00autoIncØ002 = [10]XVdbeOpList{XVdbeOpList{Xopcode: uint8(59)}, XVdbeOpList{Xopcode: uint8(37), Xp2: int8(9)}, XVdbeOpList{Xopcode: uint8(99)}, XVdbeOpList{Xopcode: uint8(77), Xp2: int8(7)}, XVdbeOpList{Xopcode: uint8(125)}, XVdbeOpList{Xopcode: uint8(99), Xp2: int8(1)}, XVdbeOpList{Xopcode: uint8(13), Xp2: int8(9)}, XVdbeOpList{Xopcode: uint8(7), Xp2: int8(2)}, XVdbeOpList{Xopcode: uint8(56)}, XVdbeOpList{Xopcode: uint8(114)}}
}
var _sqlite3AutoincrementBeginØ00iLnØ001 int32
-// Generate code that will evaluate expression pExpr and store the
-// results in register target. The results are guaranteed to appear
-// in register target.
+// C comment
+// /*
+// ** Generate code that will evaluate expression pExpr and store the
+// ** results in register target. The results are guaranteed to appear
+// ** in register target.
+// */
func _sqlite3ExprCode(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _target int32) {
var _inReg int32
func() {
- if _target <= i32(0) || _target > (_pParse.X18) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95060), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeØ00__func__Ø000))), unsafe.Pointer(str(42392)))
+ if _target <= int32(0) || _target > _pParse.XnMem {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95060), unsafe.Pointer(&_sqlite3ExprCodeØ00__func__Ø000), unsafe.Pointer(str(42347)))
crt.X__builtin_abort(tls)
}
}()
- if (_pExpr != nil) && (int32(_pExpr.X0) == i32(157)) {
- _sqlite3VdbeAddOp2(tls, (*TVdbe)(_pParse.X2), i32(64), _pExpr.X8, _target)
+ if (_pExpr != nil) && (int32(_pExpr.Xop) == int32(157)) {
+ _sqlite3VdbeAddOp2(tls, (*TVdbe)(_pParse.XpVdbe), int32(64), _pExpr.XiTable, _target)
goto _5
}
_inReg = _sqlite3ExprCodeTarget(tls, _pParse, _pExpr, _target)
func() {
- if (*TVdbe)(_pParse.X2) == nil && ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95065), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeØ00__func__Ø000))), unsafe.Pointer(str(42425)))
+ if (*TVdbe)(_pParse.XpVdbe) == nil && ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95065), unsafe.Pointer(&_sqlite3ExprCodeØ00__func__Ø000), unsafe.Pointer(str(42380)))
crt.X__builtin_abort(tls)
}
}()
- if (_inReg != _target) && ((*TVdbe)(_pParse.X2) != nil) {
- _sqlite3VdbeAddOp2(tls, (*TVdbe)(_pParse.X2), i32(65), _inReg, _target)
+ if (_inReg != _target) && (_pParse.XpVdbe != nil) {
+ _sqlite3VdbeAddOp2(tls, (*TVdbe)(_pParse.XpVdbe), int32(65), _inReg, _target)
}
_5:
}
@@ -29416,18 +30072,21 @@ _5:
var _sqlite3ExprCodeØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCodeØ00__func__Ø000[0], str(42470), 16)
+ crt.Xstrncpy(nil, &_sqlite3ExprCodeØ00__func__Ø000[0], str(42425), 16)
}
-// Generate code into the current Vdbe to evaluate the given
-// expression. Attempt to store the results in register "target".
-// Return the register where results are stored.
-//
-// With this routine, there is no guarantee that results will
-// be stored in target. The result might be stored in some other
-// register if it is convenient to do so. The calling function
-// must check the return code and move the results to the desired
-// register.
+// C comment
+// /*
+// ** Generate code into the current Vdbe to evaluate the given
+// ** expression. Attempt to store the results in register "target".
+// ** Return the register where results are stored.
+// **
+// ** With this routine, there is no guarantee that results will
+// ** be stored in target. The result might be stored in some other
+// ** register if it is convenient to do so. The calling function
+// ** must check the return code and move the results to the desired
+// ** register.
+// */
func _sqlite3ExprCodeTarget(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _target int32) (r0 int32) {
var _op, _inReg, _regFree1, _regFree2, _r1, _r2, _p5, _8_iTab, _16_n, _31_addr, _35_nFarg, _35_i, _40_endCoalesce, _57_nCol, _60_n, _63_destIfFalse, _63_destIfNull, _66_p1, _69_addrINR, _70_endLabel, _70_nextCase, _70_nExpr, _70_i, _70_iCacheLevel int32
var _43_aff int8
@@ -29446,433 +30105,413 @@ func _sqlite3ExprCodeTarget(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _targe
var _5_pAggInfo, _32_pInfo *XAggInfo
var _5_pCol *TAggInfo_col
var _43_azAff [5]*int8
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
_inReg = _target
- _regFree1 = i32(0)
- _regFree2 = i32(0)
- _p5 = i32(0)
+ _regFree1 = int32(0)
+ _regFree2 = int32(0)
+ _p5 = int32(0)
func() {
- if _target <= i32(0) || _target > (_pParse.X18) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94349), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42392)))
+ if _target <= int32(0) || _target > _pParse.XnMem {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94349), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42347)))
crt.X__builtin_abort(tls)
}
}()
if _v == nil {
func() {
- if ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94351), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42486)))
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94351), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42441)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
}
if _pExpr == nil {
- _op = i32(101)
+ _op = int32(101)
goto _7
}
- _op = int32(_pExpr.X0)
+ _op = int32(_pExpr.Xop)
_7:
switch _op {
- case i32(19):
+ case int32(19):
goto _40
- case i32(20):
+ case int32(20):
goto _46
- case i32(37):
+ case int32(37):
goto _18
- case i32(56):
+ case int32(56):
goto _58
- case i32(61):
+ case int32(61):
goto _54
- case i32(70):
+ case int32(70):
goto _27
- case i32(71):
+ case int32(71):
goto _27
- case i32(72):
+ case int32(72):
goto _19
- case i32(73):
+ case int32(73):
goto _50
- case i32(74):
+ case int32(74):
goto _49
- case i32(75):
+ case int32(75):
goto _42
- case i32(76):
+ case int32(76):
goto _42
- case i32(77):
+ case int32(77):
goto _21
- case i32(78):
+ case int32(78):
goto _21
- case i32(79):
+ case int32(79):
goto _21
- case i32(80):
+ case int32(80):
goto _21
- case i32(81):
+ case int32(81):
goto _21
- case i32(82):
+ case int32(82):
goto _21
- case i32(84):
+ case int32(84):
goto _27
- case i32(85):
+ case int32(85):
goto _27
- case i32(86):
+ case int32(86):
goto _27
- case i32(87):
+ case int32(87):
goto _27
- case i32(88):
+ case int32(88):
goto _27
- case i32(89):
+ case int32(89):
goto _27
- case i32(90):
+ case int32(90):
goto _27
- case i32(91):
+ case int32(91):
goto _27
- case i32(92):
+ case int32(92):
goto _27
- case i32(93):
+ case int32(93):
goto _27
- case i32(94):
+ case int32(94):
goto _51
- case i32(95):
+ case int32(95):
goto _40
- case i32(97):
+ case int32(97):
goto _13
- case i32(101):
+ case int32(101):
goto _14
- case i32(119):
+ case int32(119):
goto _46
- case i32(132):
+ case int32(132):
goto _12
- case i32(133):
+ case int32(133):
goto _15
- case i32(134):
+ case int32(134):
goto _11
- case i32(135):
+ case int32(135):
goto _16
- case i32(148):
+ case int32(148):
goto _19
- case i32(151):
+ case int32(151):
goto _45
- case i32(152):
+ case int32(152):
goto _10
- case i32(153):
+ case int32(153):
goto _44
- case i32(154):
+ case int32(154):
goto _9
- case i32(155):
+ case int32(155):
goto _39
- case i32(156):
+ case int32(156):
goto _51
- case i32(157):
+ case int32(157):
goto _17
- case i32(158):
+ case int32(158):
goto _55
- case i32(159):
+ case int32(159):
goto _48
- case i32(160):
+ case int32(160):
goto _56
- case i32(162):
+ case int32(162):
goto _51
default:
goto _57
}
_9:
- _5_pAggInfo = (*XAggInfo)(_pExpr.X13)
- _5_pCol = (*TAggInfo_col)(unsafe.Pointer(uintptr(_5_pAggInfo.X8) + 24*uintptr(_pExpr.X10)))
- if (_5_pAggInfo.X0) == 0 {
+ _5_pAggInfo = (*XAggInfo)(_pExpr.XpAggInfo)
+ _5_pCol = elem66((*TAggInfo_col)(_5_pAggInfo.XaCol), uintptr(_pExpr.XiAgg))
+ if _5_pAggInfo.XdirectMode == 0 {
func() {
- if (_5_pCol.X4) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94365), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42511)))
+ if _5_pCol.XiMem <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94365), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42466)))
crt.X__builtin_abort(tls)
}
}()
- return _5_pCol.X4
+ return _5_pCol.XiMem
}
- if (_5_pAggInfo.X1) != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _5_pAggInfo.X3, _5_pCol.X3, _target)
+ if _5_pAggInfo.XuseSortingIdx != 0 {
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _5_pAggInfo.XsortingIdxPTab, _5_pCol.XiSorterColumn, _target)
return _target
}
_10:
- _8_iTab = _pExpr.X8
- if _8_iTab >= i32(0) {
+ _8_iTab = _pExpr.XiTable
+ if _8_iTab >= int32(0) {
goto _64
}
- if (_pParse.X21) > i32(0) {
- return int32(_pExpr.X9) + (_pParse.X21)
+ if _pParse.XckBase > int32(0) {
+ return int32(_pExpr.XiColumn) + _pParse.XckBase
}
- _8_iTab = _pParse.X22
+ _8_iTab = _pParse.XiSelfTab
_64:
- return _sqlite3ExprCodeGetColumn(tls, _pParse, (*XTable)(_pExpr.X14), int32(_pExpr.X9), _8_iTab, _target, _pExpr.X12)
+ return _sqlite3ExprCodeGetColumn(tls, _pParse, (*XTable)(_pExpr.XpTab), int32(_pExpr.XiColumn), _8_iTab, _target, _pExpr.Xop2)
_11:
- _codeInteger(tls, _pParse, _pExpr, i32(0), _target)
+ _codeInteger(tls, _pParse, _pExpr, int32(0), _target)
return _target
_12:
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94396), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94396), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
- _codeReal(tls, _v, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), i32(0), _target)
+ _codeReal(tls, _v, *(**int8)(unsafe.Pointer(&_pExpr.Xu)), int32(0), _target)
return _target
_13:
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94402), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94402), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeLoadString(tls, _v, _target, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))
+ _sqlite3VdbeLoadString(tls, _v, _target, *(**int8)(unsafe.Pointer(&_pExpr.Xu)))
return _target
_14:
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _target)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _target)
return _target
_15:
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94415), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94415), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(0))))) != i32(120) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(0))))) != i32(88) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94416), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42561)))
+ if int32(*elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), 0)) != int32(120) && int32(*elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), 0)) != int32(88) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94416), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42516)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(1))))) != i32(39) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94417), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42612)))
+ if int32(*elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), uintptr(1))) != int32(39) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94417), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42567)))
crt.X__builtin_abort(tls)
}
}()
- _16_z = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(2))))
- _16_n = _sqlite3Strlen30(tls, _16_z) - i32(1)
+ _16_z = elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), uintptr(2))
+ _16_n = _sqlite3Strlen30(tls, _16_z) - int32(1)
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_16_z)) + 1*uintptr(_16_n)))) != i32(39) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94420), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42637)))
+ if int32(*elem1(_16_z, uintptr(_16_n))) != int32(39) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94420), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42592)))
crt.X__builtin_abort(tls)
}
}()
_16_zBlob = (*int8)(_sqlite3HexToBlob(tls, _sqlite3VdbeDb(tls, _v), _16_z, _16_n))
- _sqlite3VdbeAddOp4(tls, _v, i32(61), _16_n/i32(2), _target, i32(0), _16_zBlob, i32(-1))
+ _sqlite3VdbeAddOp4(tls, _v, int32(61), _16_n/int32(2), _target, int32(0), _16_zBlob, int32(-1))
return _target
_16:
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94427), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94427), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94428), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42648)))
+ if (*(**int8)(unsafe.Pointer(&_pExpr.Xu))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94428), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42603)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(0))))) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94429), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42667)))
+ if int32(*elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), 0)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94429), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42622)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp2(tls, _v, i32(62), int32(_pExpr.X9), _target)
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(1))))) != i32(0) {
- _18_z = _sqlite3VListNumToName(tls, _pParse.X60, int32(_pExpr.X9))
+ _sqlite3VdbeAddOp2(tls, _v, int32(62), int32(_pExpr.XiColumn), _target)
+ if int32(*elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), uintptr(1))) != int32(0) {
+ _18_z = _sqlite3VListNumToName(tls, _pParse.XpVList, int32(_pExpr.XiColumn))
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(0))))) != i32(63) && crt.Xstrcmp(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), _18_z) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94433), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42689)))
+ if int32(*elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), 0)) != int32(63) && crt.Xstrcmp(tls, *(**int8)(unsafe.Pointer(&_pExpr.Xu)), _18_z) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94433), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42644)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParse.X60)) + 4*uintptr(i32(0)))) = i32(0)
- _sqlite3VdbeAppendP4(tls, _v, (unsafe.Pointer)(_18_z), i32(-2))
+ *elem8(_pParse.XpVList, 0) = int32(0)
+ _sqlite3VdbeAppendP4(tls, _v, unsafe.Pointer(_18_z), int32(-2))
}
return _target
_17:
- return _pExpr.X8
+ return _pExpr.XiTable
_18:
- _inReg = _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)(_pExpr.X4), _target)
+ _inReg = _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _target)
if _inReg != _target {
- _sqlite3VdbeAddOp2(tls, _v, i32(65), _inReg, _target)
+ _sqlite3VdbeAddOp2(tls, _v, int32(65), _inReg, _target)
_inReg = _target
}
- _sqlite3VdbeAddOp2(tls, _v, i32(94), _target, int32(_sqlite3AffinityType(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), nil)))
- _sqlite3ExprCacheAffinityChange(tls, _pParse, _inReg, i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(94), _target, int32(_sqlite3AffinityType(tls, *(**int8)(unsafe.Pointer(&_pExpr.Xu)), nil)))
+ _sqlite3ExprCacheAffinityChange(tls, _pParse, _inReg, int32(1))
return _inReg
_19:
_op = func() int32 {
- if _op == i32(72) {
- return i32(78)
+ if _op == int32(72) {
+ return int32(78)
}
- return i32(77)
+ return int32(77)
}()
- _p5 = i32(128)
+ _p5 = int32(128)
_21:
- _22_pLeft = (*XExpr)(_pExpr.X4)
+ _22_pLeft = (*XExpr)(_pExpr.XpLeft)
if _sqlite3ExprIsVector(tls, _22_pLeft) != 0 {
_codeVectorCompare(tls, _pParse, _pExpr, _target, uint8(_op), uint8(_p5))
goto _94
}
_r1 = _sqlite3ExprCodeTemp(tls, _pParse, _22_pLeft, &_regFree1)
- _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X5), &_regFree2)
- _codeCompare(tls, _pParse, _22_pLeft, (*XExpr)(_pExpr.X5), _op, _r1, _r2, _inReg, i32(32)|_p5)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
+ _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpRight), &_regFree2)
+ _codeCompare(tls, _pParse, _22_pLeft, (*XExpr)(_pExpr.XpRight), _op, _r1, _r2, _inReg, int32(32)|_p5)
+
_94:
goto _95
_27:
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X4), &_regFree1)
- _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X5), &_regFree2)
+
+ _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpLeft), &_regFree1)
+ _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpRight), &_regFree2)
_sqlite3VdbeAddOp3(tls, _v, _op, _r2, _r1, _target)
goto _95
_39:
- _26_pLeft = (*XExpr)(_pExpr.X4)
+ _26_pLeft = (*XExpr)(_pExpr.XpLeft)
func() {
if _26_pLeft == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94519), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42746)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94519), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42701)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_26_pLeft.X0) == i32(134) {
- _codeInteger(tls, _pParse, _26_pLeft, i32(1), _target)
+ if int32(_26_pLeft.Xop) == int32(134) {
+ _codeInteger(tls, _pParse, _26_pLeft, int32(1), _target)
return _target
}
- if int32(_26_pLeft.X0) == i32(132) {
+ if int32(_26_pLeft.Xop) == int32(132) {
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94525), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94525), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
- _codeReal(tls, _v, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_26_pLeft.X3))))), i32(1), _target)
+ _codeReal(tls, _v, *(**int8)(unsafe.Pointer(&_26_pLeft.Xu)), int32(1), _target)
return _target
}
- *(*uint8)(unsafe.Pointer(&(_tempX.X0))) = uint8(i32(134))
- *(*uint32)(unsafe.Pointer(&(_tempX.X2))) = uint32(i32(17408))
- *(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_tempX.X3))))) = i32(0)
+ _tempX.Xop = uint8(134)
+ _tempX.Xflags = uint32(17408)
+ *(*int32)(unsafe.Pointer(&_tempX.Xu)) = int32(0)
_r1 = _sqlite3ExprCodeTemp(tls, _pParse, &_tempX, &_regFree1)
- _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X4), &_regFree2)
- _sqlite3VdbeAddOp3(tls, _v, i32(89), _r2, _r1, _target)
+ _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpLeft), &_regFree2)
+ _sqlite3VdbeAddOp3(tls, _v, int32(89), _r2, _r1, _target)
goto _95
_40:
- i32(0)
- i32(0)
- _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X4), &_regFree1)
+
+ _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpLeft), &_regFree1)
_sqlite3VdbeAddOp2(tls, _v, _op, _r1, _inReg)
goto _95
_42:
- i32(0)
- i32(0)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(1), _target)
- _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X4), &_regFree1)
+
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(1), _target)
+ _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpLeft), &_regFree1)
_31_addr = _sqlite3VdbeAddOp1(tls, _v, _op, _r1)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _target)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _target)
_sqlite3VdbeJumpHere(tls, _v, _31_addr)
goto _95
_44:
- _32_pInfo = (*XAggInfo)(_pExpr.X13)
+ _32_pInfo = (*XAggInfo)(_pExpr.XpAggInfo)
if _32_pInfo == nil {
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94567), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94567), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ErrorMsg(tls, _pParse, str(42752), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ _sqlite3ErrorMsg(tls, _pParse, str(42707), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
goto _107
}
- return (*TAggInfo_func)(unsafe.Pointer(uintptr(_32_pInfo.X11) + 16*uintptr(_pExpr.X10))).X2
+ return elem67((*TAggInfo_func)(_32_pInfo.XaFunc), uintptr(_pExpr.XiAgg)).XiMem
_107:
goto _95
_45:
- _35_constMask = u32(0)
- _35_db = (*Xsqlite3)(_pParse.X0)
- _35_enc = _35_db.X14
+ _35_constMask = uint32(0)
+ _35_db = (*Xsqlite3)(_pParse.Xdb)
+ _35_enc = _35_db.Xenc
_35_pColl = nil
- if ((_pParse.X11) != 0) && _sqlite3ExprIsConstantNotJoin(tls, _pExpr) != 0 {
- return _sqlite3ExprCodeAtInit(tls, _pParse, _pExpr, i32(-1))
+ if (_pParse.XokConstFactor != 0) && _sqlite3ExprIsConstantNotJoin(tls, _pExpr) != 0 {
+ return _sqlite3ExprCodeAtInit(tls, _pParse, _pExpr, int32(-1))
}
func() {
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94590), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42778)))
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94590), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42733)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pExpr.X2) & uint32(i32(16384))) != uint32(i32(0)) {
+ if (_pExpr.Xflags & uint32(16384)) != (0) {
_35_pFarg = nil
goto _113
}
- _35_pFarg = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
+ _35_pFarg = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
_113:
_35_nFarg = func() int32 {
if _35_pFarg != nil {
- return (_35_pFarg.X0)
+ return _35_pFarg.XnExpr
}
- return i32(0)
+ return int32(0)
}()
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94597), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94597), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
- _35_zId = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))
- _35_pDef = _sqlite3FindFunction(tls, _35_db, _35_zId, _35_nFarg, _35_enc, uint8(i32(0)))
- if (_35_pDef == nil) || (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_context)
- }{(*(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_35_pDef.X5)})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_context)
- }{nil}))) {
- _sqlite3ErrorMsg(tls, _pParse, str(42816), unsafe.Pointer(_35_zId))
+ _35_zId = *(**int8)(unsafe.Pointer(&_pExpr.Xu))
+ _35_pDef = _sqlite3FindFunction(tls, _35_db, _35_zId, _35_nFarg, _35_enc, 0)
+ if (_35_pDef == nil) || (func() func(*crt.TLS, *Xsqlite3_context) {
+ v := _35_pDef.XxFinalize
+ return *(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&v))
+ }() != nil) {
+ _sqlite3ErrorMsg(tls, _pParse, str(42771), unsafe.Pointer(_35_zId))
goto _95
}
- if (int32(_35_pDef.X1) & i32(512)) == 0 {
+ if (int32(_35_pDef.XfuncFlags) & int32(512)) == 0 {
goto _120
}
_40_endCoalesce = _sqlite3VdbeMakeLabel(tls, _v)
func() {
- if _35_nFarg < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94616), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42839)))
+ if _35_nFarg < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94616), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42794)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2)))))+20*uintptr(i32(0)))).X0), _target)
- _35_i = i32(1)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), 0).XpExpr), _target)
+ _35_i = int32(1)
_123:
if _35_i >= _35_nFarg {
goto _126
}
- _sqlite3VdbeAddOp2(tls, _v, i32(76), _target, _40_endCoalesce)
- _sqlite3ExprCacheRemove(tls, _pParse, _target, i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(76), _target, _40_endCoalesce)
+ _sqlite3ExprCacheRemove(tls, _pParse, _target, int32(1))
_sqlite3ExprCachePush(tls, _pParse)
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2)))))+20*uintptr(_35_i))).X0), _target)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), uintptr(_35_i)).XpExpr), _target)
_sqlite3ExprCachePop(tls, _pParse)
_35_i += 1
goto _123
@@ -29880,51 +30519,47 @@ _126:
_sqlite3VdbeResolveLabel(tls, _v, _40_endCoalesce)
goto _95
_120:
- if (int32(_35_pDef.X1) & i32(1024)) != 0 {
+ if (int32(_35_pDef.XfuncFlags) & int32(1024)) != 0 {
func() {
- if _35_nFarg < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94634), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42848)))
+ if _35_nFarg < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94634), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42803)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2)))))+20*uintptr(i32(0)))).X0), _target)
+ return _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), 0).XpExpr), _target)
}
- if (int32(_35_pDef.X1) & i32(16384)) != 0 {
+ if (int32(_35_pDef.XfuncFlags) & int32(16384)) != 0 {
_43_azAff = [5]*int8{}
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_43_azAff)) + 4*uintptr(i32(0)))) = str(42857)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_43_azAff)) + 4*uintptr(i32(1)))) = str(42862)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_43_azAff)) + 4*uintptr(i32(2)))) = str(42867)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_43_azAff)) + 4*uintptr(i32(3)))) = str(42875)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_43_azAff)) + 4*uintptr(i32(4)))) = str(42883)
+ *elem0((**int8)(unsafe.Pointer(&_43_azAff)), 0) = str(42812)
+ *elem0((**int8)(unsafe.Pointer(&_43_azAff)), uintptr(1)) = str(42817)
+ *elem0((**int8)(unsafe.Pointer(&_43_azAff)), uintptr(2)) = str(42822)
+ *elem0((**int8)(unsafe.Pointer(&_43_azAff)), uintptr(3)) = str(42830)
+ *elem0((**int8)(unsafe.Pointer(&_43_azAff)), uintptr(4)) = str(42838)
func() {
- if _35_nFarg != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94646), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42888)))
+ if _35_nFarg != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94646), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42843)))
crt.X__builtin_abort(tls)
}
}()
- _43_aff = _sqlite3ExprAffinity(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2)))))+20*uintptr(i32(0)))).X0))
+ _43_aff = _sqlite3ExprAffinity(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), 0).XpExpr))
_sqlite3VdbeLoadString(tls, _v, _target, func() *int8 {
if _43_aff != 0 {
- return (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_43_azAff)) + 4*uintptr(int32(_43_aff)-i32(65)))))
+ return (*elem0((**int8)(unsafe.Pointer(&_43_azAff)), uintptr(int32(_43_aff)-int32(65))))
}
- return str(42897)
+ return str(42852)
}())
return _target
}
- _35_i = i32(0)
+ _35_i = int32(0)
_135:
if _35_i >= _35_nFarg {
goto _138
}
- if (_35_i < i32(32)) && _sqlite3ExprIsConstant(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2)))))+20*uintptr(_35_i))).X0)) != 0 {
- {
- p := &_35_constMask
- *p = (*p) | (u32(1) << uint(_35_i))
- sink5(*p)
- }
+ if (_35_i < int32(32)) && _sqlite3ExprIsConstant(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), uintptr(_35_i)).XpExpr)) != 0 {
+ _35_constMask |= uint32(1) << uint(_35_i)
}
- if ((int32(_35_pDef.X1) & i32(32)) != i32(0)) && (_35_pColl == nil) {
- _35_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2)))))+20*uintptr(_35_i))).X0))
+ if ((int32(_35_pDef.XfuncFlags) & int32(32)) != int32(0)) && (_35_pColl == nil) {
+ _35_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), uintptr(_35_i)).XpExpr))
}
_35_i += 1
goto _135
@@ -29933,236 +30568,230 @@ _138:
goto _143
}
if _35_constMask != 0 {
- _r1 = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _35_nFarg
- sink1(*p)
- }
+ _r1 = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _35_nFarg
goto _145
}
_r1 = _sqlite3GetTempRange(tls, _pParse, _35_nFarg)
_145:
- if (int32(_35_pDef.X1) & i32(192)) == i32(0) {
+ if (int32(_35_pDef.XfuncFlags) & int32(192)) == int32(0) {
goto _146
}
func() {
- if _35_nFarg != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94678), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42888)))
+ if _35_nFarg != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94678), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42843)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2)))))+20*uintptr(i32(0)))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94679), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42902)))
+ if (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), 0).XpExpr) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94679), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42857)))
crt.X__builtin_abort(tls)
}
}()
- _50_exprOp = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2))))) + 20*uintptr(i32(0)))).X0).X0
- if (int32(_50_exprOp) == i32(152)) || (int32(_50_exprOp) == i32(154)) {
- i32(0)
- i32(0)
- *(*uint8)(unsafe.Pointer(&((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2))))) + 20*uintptr(i32(0)))).X0).X12))) = uint8(int32(_35_pDef.X1) & i32(192))
+ _50_exprOp = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), 0).XpExpr).Xop
+ if (int32(_50_exprOp) == int32(152)) || (int32(_50_exprOp) == int32(154)) {
+ (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), 0).XpExpr).Xop2 = uint8(int32(_35_pDef.XfuncFlags) & int32(192))
}
_146:
_sqlite3ExprCachePush(tls, _pParse)
- _sqlite3ExprCodeExprList(tls, _pParse, _35_pFarg, _r1, i32(0), uint8(i32(3)))
+ _sqlite3ExprCodeExprList(tls, _pParse, _35_pFarg, _r1, int32(0), uint8(3))
_sqlite3ExprCachePop(tls, _pParse)
goto _153
_143:
- _r1 = i32(0)
+ _r1 = int32(0)
_153:
- if (_35_nFarg >= i32(2)) && (((_pExpr.X2) & uint32(i32(128))) != 0) {
- _35_pDef = _sqlite3VtabOverloadFunction(tls, _35_db, _35_pDef, _35_nFarg, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2)))))+20*uintptr(i32(1)))).X0))
+ if (_35_nFarg >= int32(2)) && ((_pExpr.Xflags & uint32(128)) != 0) {
+ _35_pDef = _sqlite3VtabOverloadFunction(tls, _35_db, _35_pDef, _35_nFarg, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), uintptr(1)).XpExpr))
goto _157
}
- if _35_nFarg > i32(0) {
- _35_pDef = _sqlite3VtabOverloadFunction(tls, _35_db, _35_pDef, _35_nFarg, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_35_pFarg.X2)))))+20*uintptr(i32(0)))).X0))
+ if _35_nFarg > int32(0) {
+ _35_pDef = _sqlite3VtabOverloadFunction(tls, _35_db, _35_pDef, _35_nFarg, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_35_pFarg.Xa)), 0).XpExpr))
}
_157:
- if (int32(_35_pDef.X1) & i32(32)) == 0 {
+ if (int32(_35_pDef.XfuncFlags) & int32(32)) == 0 {
goto _158
}
if _35_pColl == nil {
- _35_pColl = (*XCollSeq)(_35_db.X2)
+ _35_pColl = (*XCollSeq)(_35_db.XpDfltColl)
}
- _sqlite3VdbeAddOp4(tls, _v, i32(68), i32(0), i32(0), i32(0), (*int8)(unsafe.Pointer(_35_pColl)), i32(-3))
+ _sqlite3VdbeAddOp4(tls, _v, int32(68), int32(0), int32(0), int32(0), (*int8)(unsafe.Pointer(_35_pColl)), int32(-3))
_158:
- _sqlite3VdbeAddOp4(tls, _v, i32(69), int32(_35_constMask), _r1, _target, (*int8)(unsafe.Pointer(_35_pDef)), i32(-4))
+ _sqlite3VdbeAddOp4(tls, _v, int32(69), int32(_35_constMask), _r1, _target, (*int8)(unsafe.Pointer(_35_pDef)), int32(-4))
_sqlite3VdbeChangeP5(tls, _v, uint16(uint8(_35_nFarg)))
- if _35_nFarg != 0 && (_35_constMask == uint32(i32(0))) {
+ if _35_nFarg != 0 && (_35_constMask == (0)) {
_sqlite3ReleaseTempRange(tls, _pParse, _r1, _35_nFarg)
}
return _target
_46:
- if (_op == i32(119)) && (store1(&_57_nCol, (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0).X0) != i32(1)) {
- _sqlite3SubselectError(tls, _pParse, _57_nCol, i32(1))
+ if (_op == int32(119)) && (store2(&_57_nCol, (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XpEList).XnExpr) != int32(1)) {
+ _sqlite3SubselectError(tls, _pParse, _57_nCol, int32(1))
goto _164
}
- return _sqlite3CodeSubselect(tls, _pParse, _pExpr, i32(0), i32(0))
+ return _sqlite3CodeSubselect(tls, _pParse, _pExpr, int32(0), int32(0))
_164:
goto _95
_48:
- if ((*XExpr)(_pExpr.X4).X8) == i32(0) {
- *(*int32)(unsafe.Pointer(&((*XExpr)(_pExpr.X4).X8))) = _sqlite3CodeSubselect(tls, _pParse, (*XExpr)(_pExpr.X4), i32(0), i32(0))
+ if ((*XExpr)(_pExpr.XpLeft).XiTable) == int32(0) {
+ (*XExpr)(_pExpr.XpLeft).XiTable = _sqlite3CodeSubselect(tls, _pParse, (*XExpr)(_pExpr.XpLeft), int32(0), int32(0))
}
func() {
- if (_pExpr.X8) != i32(0) && int32((*XExpr)(_pExpr.X4).X0) != i32(119) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94746), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42923)))
+ if _pExpr.XiTable != int32(0) && int32((*XExpr)(_pExpr.XpLeft).Xop) != int32(119) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94746), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42878)))
crt.X__builtin_abort(tls)
}
}()
- if (_pExpr.X8) != 0 && ((_pExpr.X8) != store1(&_60_n, _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.X4)))) {
- _sqlite3ErrorMsg(tls, _pParse, str(42971), _pExpr.X8, _60_n)
+ if _pExpr.XiTable != 0 && (_pExpr.XiTable != store2(&_60_n, _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.XpLeft)))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(42926), _pExpr.XiTable, _60_n)
}
- return ((*XExpr)(_pExpr.X4).X8) + int32(_pExpr.X9)
+ return ((*XExpr)(_pExpr.XpLeft).XiTable) + int32(_pExpr.XiColumn)
_49:
_63_destIfFalse = _sqlite3VdbeMakeLabel(tls, _v)
_63_destIfNull = _sqlite3VdbeMakeLabel(tls, _v)
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _target)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _target)
_sqlite3ExprCodeIN(tls, _pParse, _pExpr, _63_destIfFalse, _63_destIfNull)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(1), _target)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(1), _target)
_sqlite3VdbeResolveLabel(tls, _v, _63_destIfFalse)
- _sqlite3VdbeAddOp2(tls, _v, i32(73), _target, i32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(73), _target, int32(0))
_sqlite3VdbeResolveLabel(tls, _v, _63_destIfNull)
return _target
_50:
- _exprCodeBetween(tls, _pParse, _pExpr, _target, nil, i32(0))
+ _exprCodeBetween(tls, _pParse, _pExpr, _target, nil, int32(0))
return _target
_51:
- return _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)(_pExpr.X4), _target)
+ return _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _target)
_54:
- _66_pTab = (*XTable)(_pExpr.X14)
- _66_p1 = (((_pExpr.X8) * (int32(_66_pTab.X11) + i32(1))) + i32(1)) + int32(_pExpr.X9)
+ _66_pTab = (*XTable)(_pExpr.XpTab)
+ _66_p1 = ((_pExpr.XiTable * (int32(_66_pTab.XnCol) + int32(1))) + int32(1)) + int32(_pExpr.XiColumn)
func() {
- if (_pExpr.X8) != i32(0) && (_pExpr.X8) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94819), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43001)))
+ if _pExpr.XiTable != int32(0) && _pExpr.XiTable != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94819), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42956)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X9) < i32(-1) || int32(_pExpr.X9) >= int32(_66_pTab.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94820), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43038)))
+ if int32(_pExpr.XiColumn) < int32(-1) || int32(_pExpr.XiColumn) >= int32(_66_pTab.XnCol) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94820), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42993)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_66_pTab.X10) >= i32(0) && int32(_pExpr.X9) == int32(_66_pTab.X10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94821), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43086)))
+ if int32(_66_pTab.XiPKey) >= int32(0) && int32(_pExpr.XiColumn) == int32(_66_pTab.XiPKey) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94821), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(43041)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _66_p1 < i32(0) || _66_p1 >= ((int32(_66_pTab.X11)*i32(2))+i32(2)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94822), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43131)))
+ if _66_p1 < int32(0) || _66_p1 >= ((int32(_66_pTab.XnCol)*int32(2))+int32(2)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94822), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(43086)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp2(tls, _v, i32(146), _66_p1, _target)
- _sqlite3VdbeComment(tls, _v, str(43160), unsafe.Pointer(func() *int8 {
- if (_pExpr.X8) != 0 {
- return str(43173)
+ _sqlite3VdbeAddOp2(tls, _v, int32(146), _66_p1, _target)
+ _sqlite3VdbeComment(tls, _v, str(43115), unsafe.Pointer(func() *int8 {
+ if _pExpr.XiTable != 0 {
+ return str(43128)
}
- return str(43177)
+ return str(43132)
}()), unsafe.Pointer(func() *int8 {
- if int32(_pExpr.X9) < i32(0) {
- return str(27227)
+ if int32(_pExpr.XiColumn) < int32(0) {
+ return str(27182)
}
- return ((*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pExpr.X14).X1) + 16*uintptr(_pExpr.X9))).X0)
+ return (elem41((*XColumn)((*XTable)(_pExpr.XpTab).XaCol), uintptr(_pExpr.XiColumn)).XzName)
}()), _target)
- if (int32(_pExpr.X9) >= i32(0)) && (int32((*XColumn)(unsafe.Pointer(uintptr(_66_pTab.X1)+16*uintptr(_pExpr.X9))).X4) == i32(69)) {
- _sqlite3VdbeAddOp1(tls, _v, i32(74), _target)
+ if (int32(_pExpr.XiColumn) >= int32(0)) && (int32(elem41((*XColumn)(_66_pTab.XaCol), uintptr(_pExpr.XiColumn)).Xaffinity) == int32(69)) {
+ _sqlite3VdbeAddOp1(tls, _v, int32(74), _target)
}
goto _95
_55:
- _sqlite3ErrorMsg(tls, _pParse, str(43181))
+ _sqlite3ErrorMsg(tls, _pParse, str(43136))
goto _95
_56:
- _69_addrINR = _sqlite3VdbeAddOp1(tls, _v, i32(23), _pExpr.X8)
+ _69_addrINR = _sqlite3VdbeAddOp1(tls, _v, int32(23), _pExpr.XiTable)
_sqlite3ExprCachePush(tls, _pParse)
- _inReg = _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)(_pExpr.X4), _target)
+ _inReg = _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _target)
_sqlite3ExprCachePop(tls, _pParse)
_sqlite3VdbeJumpHere(tls, _v, _69_addrINR)
_sqlite3VdbeChangeP3(tls, _v, uint32(_69_addrINR), _inReg)
goto _95
_57:
func() {
- if _op != i32(136) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94883), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43199)))
+ if _op != int32(136) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94883), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(43154)))
crt.X__builtin_abort(tls)
}
}()
_70_pTest = nil
- _70_iCacheLevel = _pParse.X23
+ _70_iCacheLevel = _pParse.XiCacheLevel
func() {
- if ((_pExpr.X2)&uint32(i32(2048))) != uint32(i32(0)) || (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94895), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43211)))
+ if (_pExpr.Xflags&uint32(2048)) != (0) || (*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94895), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(43166)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94896), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43267)))
+ if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XnExpr) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94896), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(43222)))
crt.X__builtin_abort(tls)
}
}()
- _70_pEList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
- _70_aListelem = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_70_pEList.X2)))))
- _70_nExpr = _70_pEList.X0
+ _70_pEList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
+ _70_aListelem = (*TExprList_item)(unsafe.Pointer(&_70_pEList.Xa))
+ _70_nExpr = _70_pEList.XnExpr
_70_endLabel = _sqlite3VdbeMakeLabel(tls, _v)
- if store36(&_70_pX, (*XExpr)(_pExpr.X4)) != nil {
+ if store58(&_70_pX, (*XExpr)(_pExpr.XpLeft)) != nil {
_tempX = *_70_pX
_exprToRegister(tls, &_tempX, _exprCodeVector(tls, _pParse, &_tempX, &_regFree1))
- crt.Xmemset(tls, (unsafe.Pointer)(&_70_opCompare), i32(0), u32(48))
- *(*uint8)(unsafe.Pointer(&(_70_opCompare.X0))) = uint8(i32(78))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_70_opCompare.X4))))) = &_tempX
+ crt.Xmemset(tls, unsafe.Pointer(&_70_opCompare), int32(0), uint32(48))
+ _70_opCompare.Xop = uint8(78)
+ *(**XExpr)(unsafe.Pointer(&_70_opCompare.XpLeft)) = &_tempX
_70_pTest = &_70_opCompare
- _regFree1 = i32(0)
+ _regFree1 = int32(0)
}
- _70_i = i32(0)
+ _70_i = int32(0)
_197:
- if _70_i >= (_70_nExpr - i32(1)) {
+ if _70_i >= (_70_nExpr - int32(1)) {
goto _200
}
_sqlite3ExprCachePush(tls, _pParse)
if _70_pX != nil {
func() {
if _70_pTest == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94919), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43293)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94919), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(43248)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_70_opCompare.X5))))) = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_70_aListelem)) + 20*uintptr(_70_i))).X0)
+ *(**XExpr)(unsafe.Pointer(&_70_opCompare.XpRight)) = (*XExpr)(elem57(_70_aListelem, uintptr(_70_i)).XpExpr)
goto _204
}
- _70_pTest = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_70_aListelem)) + 20*uintptr(_70_i))).X0)
+ _70_pTest = (*XExpr)(elem57(_70_aListelem, uintptr(_70_i)).XpExpr)
_204:
_70_nextCase = _sqlite3VdbeMakeLabel(tls, _v)
- _sqlite3ExprIfFalse(tls, _pParse, _70_pTest, _70_nextCase, i32(16))
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_70_aListelem))+20*uintptr(_70_i+i32(1)))).X0), _target)
+ _sqlite3ExprIfFalse(tls, _pParse, _70_pTest, _70_nextCase, int32(16))
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57(_70_aListelem, uintptr(_70_i+int32(1))).XpExpr), _target)
_sqlite3VdbeGoto(tls, _v, _70_endLabel)
_sqlite3ExprCachePop(tls, _pParse)
_sqlite3VdbeResolveLabel(tls, _v, _70_nextCase)
- _70_i = _70_i + i32(2)
+ _70_i = _70_i + int32(2)
goto _197
_200:
- if (_70_nExpr & i32(1)) != i32(0) {
+ if (_70_nExpr & int32(1)) != int32(0) {
_sqlite3ExprCachePush(tls, _pParse)
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_70_pEList.X2)))))+20*uintptr(_70_nExpr-i32(1)))).X0), _target)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_70_pEList.Xa)), uintptr(_70_nExpr-int32(1))).XpExpr), _target)
_sqlite3ExprCachePop(tls, _pParse)
goto _206
}
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _target)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _target)
_206:
func() {
- if ((*Xsqlite3)(_pParse.X0).X17) == 0 && (_pParse.X16) <= i32(0) && (_pParse.X23) != _70_iCacheLevel {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94940), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43302)))
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 && _pParse.XnErr <= int32(0) && _pParse.XiCacheLevel != _70_iCacheLevel {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94940), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(43257)))
crt.X__builtin_abort(tls)
}
}()
@@ -30170,29 +30799,29 @@ _206:
goto _95
_58:
func() {
- if int32(_pExpr.X1) != i32(1) && int32(_pExpr.X1) != i32(2) && int32(_pExpr.X1) != i32(3) && int32(_pExpr.X1) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94947), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(43381)))
+ if int32(_pExpr.Xaffinity) != int32(1) && int32(_pExpr.Xaffinity) != int32(2) && int32(_pExpr.Xaffinity) != int32(3) && int32(_pExpr.Xaffinity) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94947), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(43336)))
crt.X__builtin_abort(tls)
}
}()
- if (*XTable)(_pParse.X40) == nil {
- _sqlite3ErrorMsg(tls, _pParse, str(43497))
- return i32(0)
+ if _pParse.XpTriggerTab == nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(43452))
+ return int32(0)
}
- if int32(_pExpr.X1) == i32(2) {
+ if int32(_pExpr.Xaffinity) == int32(2) {
_sqlite3MayAbort(tls, _pParse)
}
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94960), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94960), unsafe.Pointer(&_sqlite3ExprCodeTargetØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pExpr.X1) == i32(4) {
- _sqlite3VdbeAddOp4(tls, _v, i32(55), i32(0), i32(4), i32(0), *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), i32(0))
+ if int32(_pExpr.Xaffinity) == int32(4) {
+ _sqlite3VdbeAddOp4(tls, _v, int32(55), int32(0), int32(4), int32(0), *(**int8)(unsafe.Pointer(&_pExpr.Xu)), int32(0))
goto _221
}
- _sqlite3HaltConstraint(tls, _pParse, i32(1811), int32(_pExpr.X1), *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), int8(i32(0)), uint8(i32(0)))
+ _sqlite3HaltConstraint(tls, _pParse, int32(1811), int32(_pExpr.Xaffinity), *(**int8)(unsafe.Pointer(&_pExpr.Xu)), 0, 0)
_221:
goto _95
_95:
@@ -30200,49 +30829,50 @@ _95:
_sqlite3ReleaseTempReg(tls, _pParse, _regFree2)
return _inReg
- _ = _tempX
_ = _43_azAff
- _ = _70_opCompare
panic(0)
}
var _sqlite3ExprCodeTargetØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCodeTargetØ00__func__Ø000[0], str(43547), 22)
+ crt.Xstrncpy(nil, &_sqlite3ExprCodeTargetØ00__func__Ø000[0], str(43502), 22)
}
-// Generate code that will extract the iColumn-th column from
-// table pTab and store the column value in a register.
-//
-// An effort is made to store the column value in register iReg. This
-// is not garanteeed for GetColumn() - the result can be stored in
-// any register. But the result is guaranteed to land in register iReg
-// for GetColumnToReg().
-//
-// There must be an open cursor to pTab in iTable when this routine
-// is called. If iColumn<0 then code is generated that extracts the rowid.
+// C comment
+// /*
+// ** Generate code that will extract the iColumn-th column from
+// ** table pTab and store the column value in a register.
+// **
+// ** An effort is made to store the column value in register iReg. This
+// ** is not garanteeed for GetColumn() - the result can be stored in
+// ** any register. But the result is guaranteed to land in register iReg
+// ** for GetColumnToReg().
+// **
+// ** There must be an open cursor to pTab in iTable when this routine
+// ** is called. If iColumn<0 then code is generated that extracts the rowid.
+// */
func _sqlite3ExprCodeGetColumn(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _iColumn int32, _iTable int32, _iReg int32, _p5 uint8) (r0 int32) {
var _i int32
var _v *TVdbe
var _p *TyColCache
- _v = (*TVdbe)(_pParse.X2)
- *func() **TyColCache { _i = i32(0); return &_p }() = (*TyColCache)(unsafe.Pointer((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48)))))
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ *func() **TyColCache { _i = int32(0); return &_p }() = (*TyColCache)(unsafe.Pointer(&_pParse.XaColCache))
_0:
- if _i >= int32(_pParse.X13) {
+ if _i >= int32(_pParse.XnColCache) {
goto _3
}
- if ((_p.X0) == _iTable) && (int32(_p.X1) == _iColumn) {
- *(*int32)(unsafe.Pointer(&(_p.X5))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X24))), int32(1))
- _sqlite3ExprCachePinRegister(tls, _pParse, _p.X4)
- return _p.X4
+ if (_p.XiTable == _iTable) && (int32(_p.XiColumn) == _iColumn) {
+ _p.Xlru = postInc2(&_pParse.XiCacheCnt, 1)
+ _sqlite3ExprCachePinRegister(tls, _pParse, _p.XiReg)
+ return _p.XiReg
}
*(*uintptr)(unsafe.Pointer(func() **TyColCache { _i += 1; return &_p }())) += uintptr(20)
goto _0
_3:
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94200), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeGetColumnØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94200), unsafe.Pointer(&_sqlite3ExprCodeGetColumnØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
@@ -30256,20 +30886,23 @@ _9:
return _iReg
}
-// When a cached column is reused, make sure that its register is
-// no longer available as a temp register. ticket #3879: that same
-// register might be in the cache in multiple places, so be sure to
-// get them all.
+// C comment
+// /*
+// ** When a cached column is reused, make sure that its register is
+// ** no longer available as a temp register. ticket #3879: that same
+// ** register might be in the cache in multiple places, so be sure to
+// ** get them all.
+// */
func _sqlite3ExprCachePinRegister(tls *crt.TLS, _pParse *XParse, _iReg int32) {
var _i int32
var _p *TyColCache
- *func() **TyColCache { _i = i32(0); return &_p }() = (*TyColCache)(unsafe.Pointer((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48)))))
+ *func() **TyColCache { _i = int32(0); return &_p }() = (*TyColCache)(unsafe.Pointer(&_pParse.XaColCache))
_0:
- if _i >= int32(_pParse.X13) {
+ if _i >= int32(_pParse.XnColCache) {
goto _3
}
- if (_p.X4) == _iReg {
- *(*uint8)(unsafe.Pointer(&(_p.X2))) = uint8(i32(0))
+ if _p.XiReg == _iReg {
+ _p.XtempReg = 0
}
*(*uintptr)(unsafe.Pointer(func() **TyColCache { _i += 1; return &_p }())) += uintptr(20)
goto _0
@@ -30279,269 +30912,287 @@ _3:
var _sqlite3ExprCodeGetColumnØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCodeGetColumnØ00__func__Ø000[0], str(43569), 25)
+ crt.Xstrncpy(nil, &_sqlite3ExprCodeGetColumnØ00__func__Ø000[0], str(43524), 25)
}
-// Generate code to extract the value of the iCol-th column of a table.
+// C comment
+// /*
+// ** Generate code to extract the value of the iCol-th column of a table.
+// */
func _sqlite3ExprCodeGetColumnOfTable(tls *crt.TLS, _v *TVdbe, _pTab *XTable, _iTabCur int32, _iCol int32, _regOut int32) {
var _3_op, _3_x int32
if _pTab == nil {
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _iTabCur, _iCol, _regOut)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _iTabCur, _iCol, _regOut)
return
}
- if (_iCol < i32(0)) || (_iCol == int32(_pTab.X10)) {
- _sqlite3VdbeAddOp2(tls, _v, i32(125), _iTabCur, _regOut)
+ if (_iCol < int32(0)) || (_iCol == int32(_pTab.XiPKey)) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(125), _iTabCur, _regOut)
goto _3
}
_3_op = func() int32 {
- if (_pTab.X16) != 0 {
- return i32(159)
+ if _pTab.XnModuleArg != 0 {
+ return int32(159)
}
- return i32(99)
+ return int32(99)
}()
_3_x = _iCol
- if (((_pTab.X9) & uint32(i32(32))) != uint32(i32(0))) && ((_pTab.X16) == 0) {
+ if ((_pTab.XtabFlags & uint32(32)) != (0)) && (_pTab.XnModuleArg == 0) {
_3_x = int32(_sqlite3ColumnOfIndex(tls, _sqlite3PrimaryKeyIndex(tls, _pTab), int16(_iCol)))
}
_sqlite3VdbeAddOp3(tls, _v, _3_op, _iTabCur, _3_x, _regOut)
_3:
- if _iCol >= i32(0) {
+ if _iCol >= int32(0) {
_sqlite3ColumnDefault(tls, _v, _pTab, _iCol, _regOut)
}
}
-// Return the column of index pIdx that corresponds to table
-// column iCol. Return -1 if not found.
+// C comment
+// /*
+// ** Return the column of index pIdx that corresponds to table
+// ** column iCol. Return -1 if not found.
+// */
func _sqlite3ColumnOfIndex(tls *crt.TLS, _pIdx *XIndex, _iCol int16) (r0 int16) {
var _i int32
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= int32(_pIdx.X14) {
+ if _i >= int32(_pIdx.XnColumn) {
goto _3
}
- if int32(_iCol) == int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i)))) {
+ if int32(_iCol) == int32(*elem50(_pIdx.XaiColumn, uintptr(_i))) {
return int16(_i)
}
_i += 1
goto _0
_3:
- return int16(i32(-1))
-}
-
-// The most recently coded instruction was an OP_Column to retrieve the
-// i-th column of table pTab. This routine sets the P4 parameter of the
-// OP_Column to the default value, if any.
-//
-// The default value of a column is specified by a DEFAULT clause in the
-// column definition. This was either supplied by the user when the table
-// was created, or added later to the table definition by an ALTER TABLE
-// command. If the latter, then the row-records in the table btree on disk
-// may not contain a value for the column and the default value, taken
-// from the P4 parameter of the OP_Column instruction, is returned instead.
-// If the former, then all row-records are guaranteed to include a value
-// for the column and the P4 value is not required.
-//
-// Column definitions created by an ALTER TABLE command may only have
-// literal default values specified: a number, null or a string. (If a more
-// complicated default expression value was provided, it is evaluated
-// when the ALTER TABLE is executed and one of the literal values written
-// into the sqlite_master table.)
-//
-// Therefore, the P4 parameter is only required if the default value for
-// the column is a literal number, string or null. The sqlite3ValueFromExpr()
-// function is capable of transforming these types of expressions into
-// sqlite3_value objects.
-//
-// If parameter iReg is not negative, code an OP_RealAffinity instruction
-// on register iReg. This is used when an equivalent integer value is
-// stored in place of an 8-byte floating point value in order to save
-// space.
+ return int16(-1)
+}
+
+// C comment
+// /*
+// ** The most recently coded instruction was an OP_Column to retrieve the
+// ** i-th column of table pTab. This routine sets the P4 parameter of the
+// ** OP_Column to the default value, if any.
+// **
+// ** The default value of a column is specified by a DEFAULT clause in the
+// ** column definition. This was either supplied by the user when the table
+// ** was created, or added later to the table definition by an ALTER TABLE
+// ** command. If the latter, then the row-records in the table btree on disk
+// ** may not contain a value for the column and the default value, taken
+// ** from the P4 parameter of the OP_Column instruction, is returned instead.
+// ** If the former, then all row-records are guaranteed to include a value
+// ** for the column and the P4 value is not required.
+// **
+// ** Column definitions created by an ALTER TABLE command may only have
+// ** literal default values specified: a number, null or a string. (If a more
+// ** complicated default expression value was provided, it is evaluated
+// ** when the ALTER TABLE is executed and one of the literal values written
+// ** into the sqlite_master table.)
+// **
+// ** Therefore, the P4 parameter is only required if the default value for
+// ** the column is a literal number, string or null. The sqlite3ValueFromExpr()
+// ** function is capable of transforming these types of expressions into
+// ** sqlite3_value objects.
+// **
+// ** If parameter iReg is not negative, code an OP_RealAffinity instruction
+// ** on register iReg. This is used when an equivalent integer value is
+// ** stored in place of an 8-byte floating point value in order to save
+// ** space.
+// */
func _sqlite3ColumnDefault(tls *crt.TLS, _v *TVdbe, _pTab *XTable, _i int32, _iReg int32) {
var _1_enc uint8
var _1_pValue *XMem
var _1_pCol *XColumn
func() {
if _pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123808), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ColumnDefaultØ00__func__Ø000))), unsafe.Pointer(str(43594)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123808), unsafe.Pointer(&_sqlite3ColumnDefaultØ00__func__Ø000), unsafe.Pointer(str(43549)))
crt.X__builtin_abort(tls)
}
}()
- if (*XSelect)(_pTab.X3) != nil {
+ if _pTab.XpSelect != nil {
goto _2
}
_1_pValue = nil
- _1_enc = _sqlite3VdbeDb(tls, _v).X14
- _1_pCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_i)))
- _sqlite3VdbeComment(tls, _v, str(8018), unsafe.Pointer(_pTab.X0), unsafe.Pointer(_1_pCol.X0))
+ _1_enc = _sqlite3VdbeDb(tls, _v).Xenc
+ _1_pCol = elem41((*XColumn)(_pTab.XaCol), uintptr(_i))
+ _sqlite3VdbeComment(tls, _v, str(7919), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(_1_pCol.XzName))
func() {
- if _i >= int32(_pTab.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123814), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ColumnDefaultØ00__func__Ø000))), unsafe.Pointer(str(43602)))
+ if _i >= int32(_pTab.XnCol) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123814), unsafe.Pointer(&_sqlite3ColumnDefaultØ00__func__Ø000), unsafe.Pointer(str(43557)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ValueFromExpr(tls, _sqlite3VdbeDb(tls, _v), (*XExpr)(_1_pCol.X1), _1_enc, uint8(_1_pCol.X4), &_1_pValue)
+ _sqlite3ValueFromExpr(tls, _sqlite3VdbeDb(tls, _v), (*XExpr)(_1_pCol.XpDflt), _1_enc, uint8(_1_pCol.Xaffinity), &_1_pValue)
if _1_pValue != nil {
- _sqlite3VdbeAppendP4(tls, _v, (unsafe.Pointer)(_1_pValue), i32(-7))
+ _sqlite3VdbeAppendP4(tls, _v, unsafe.Pointer(_1_pValue), int32(-7))
}
_2:
- if int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X4) == i32(69) {
- _sqlite3VdbeAddOp1(tls, _v, i32(74), _iReg)
+ if int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).Xaffinity) == int32(69) {
+ _sqlite3VdbeAddOp1(tls, _v, int32(74), _iReg)
}
}
var _sqlite3ColumnDefaultØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ColumnDefaultØ00__func__Ø000[0], str(43615), 21)
+ crt.Xstrncpy(nil, &_sqlite3ColumnDefaultØ00__func__Ø000[0], str(43570), 21)
}
-// Return the database associated with the Vdbe.
+// C comment
+// /*
+// ** Return the database associated with the Vdbe.
+// */
func _sqlite3VdbeDb(tls *crt.TLS, _v *TVdbe) (r0 *Xsqlite3) {
- return (*Xsqlite3)(_v.X0)
-}
-
-// Create a new sqlite3_value object, containing the value of pExpr.
-//
-// This only works for very simple expressions that consist of one constant
-// token (i.e. "5", "5.1", "'a string'"). If the expression can
-// be converted directly into a value, then the value is allocated and
-// a pointer written to *ppVal. The caller is responsible for deallocating
-// the value by passing it to sqlite3ValueFree() later on. If the expression
-// cannot be converted to a value, then *ppVal is set to NULL.
+ return (*Xsqlite3)(_v.Xdb)
+}
+
+// C comment
+// /*
+// ** Create a new sqlite3_value object, containing the value of pExpr.
+// **
+// ** This only works for very simple expressions that consist of one constant
+// ** token (i.e. "5", "5.1", "'a string'"). If the expression can
+// ** be converted directly into a value, then the value is allocated and
+// ** a pointer written to *ppVal. The caller is responsible for deallocating
+// ** the value by passing it to sqlite3ValueFree() later on. If the expression
+// ** cannot be converted to a value, then *ppVal is set to NULL.
+// */
func _sqlite3ValueFromExpr(tls *crt.TLS, _db *Xsqlite3, _pExpr *XExpr, _enc uint8, _affinity uint8, _ppVal **XMem) (r0 int32) {
return func() int32 {
if _pExpr != nil {
return _valueFromExpr(tls, _db, _pExpr, _enc, _affinity, _ppVal, nil)
}
- return i32(0)
+ return int32(0)
}()
}
-// Extract a value from the supplied expression in the manner described
-// above sqlite3ValueFromExpr(). Allocate the sqlite3_value object
-// using valueNew().
-//
-// If pCtx is NULL and an error occurs after the sqlite3_value object
-// has been allocated, it is freed before returning. Or, if pCtx is not
-// NULL, it is assumed that the caller will free any allocated object
-// in all cases.
-func _valueFromExpr(tls *crt.TLS, _db *Xsqlite3, _pExpr *XExpr, _enc uint8, _affinity uint8, _ppVal **XMem, _pCtx *t41) (r0 int32) {
+// C comment
+// /*
+// ** Extract a value from the supplied expression in the manner described
+// ** above sqlite3ValueFromExpr(). Allocate the sqlite3_value object
+// ** using valueNew().
+// **
+// ** If pCtx is NULL and an error occurs after the sqlite3_value object
+// ** has been allocated, it is freed before returning. Or, if pCtx is not
+// ** NULL, it is assumed that the caller will free any allocated object
+// ** in all cases.
+// */
+func _valueFromExpr(tls *crt.TLS, _db *Xsqlite3, _pExpr *XExpr, _enc uint8, _affinity uint8, _ppVal **XMem, _pCtx *t68) (r0 int32) {
var _op, _negInt, _rc, _16_nVal int32
var _zVal, _zNeg *int8
var _1_aff uint8
var _pVal *XMem
_zVal = nil
_pVal = nil
- _negInt = i32(1)
- _zNeg = str(0)
- _rc = i32(0)
+ _negInt = int32(1)
+ _zNeg = str(284)
+ _rc = int32(0)
func() {
if _pExpr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70976), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueFromExprØ00__func__Ø000))), unsafe.Pointer(str(43636)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70976), unsafe.Pointer(&_valueFromExprØ00__func__Ø000), unsafe.Pointer(str(43591)))
crt.X__builtin_abort(tls)
}
}()
_2:
- if (store1(&_op, int32(_pExpr.X0)) == i32(156)) || (_op == i32(162)) {
- _pExpr = (*XExpr)(_pExpr.X4)
+ if (store2(&_op, int32(_pExpr.Xop)) == int32(156)) || (_op == int32(162)) {
+ _pExpr = (*XExpr)(_pExpr.XpLeft)
goto _2
}
if func() int32 {
- if _op == i32(157) {
+ if _op == int32(157) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70978), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueFromExprØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70978), unsafe.Pointer(&_valueFromExprØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- _op = int32(_pExpr.X12)
+ _op = int32(_pExpr.Xop2)
}
func() {
- if ((_pExpr.X2)&uint32(i32(16384))) != uint32(i32(0)) && _pCtx != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70984), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueFromExprØ00__func__Ø000))), unsafe.Pointer(str(43645)))
+ if (_pExpr.Xflags&uint32(16384)) != (0) && _pCtx != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70984), unsafe.Pointer(&_valueFromExprØ00__func__Ø000), unsafe.Pointer(str(43600)))
crt.X__builtin_abort(tls)
}
}()
- if _op != i32(37) {
+ if _op != int32(37) {
goto _11
}
- _1_aff = uint8(_sqlite3AffinityType(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), nil))
- _rc = _valueFromExpr(tls, _db, (*XExpr)(_pExpr.X4), _enc, _1_aff, _ppVal, _pCtx)
+ _1_aff = uint8(_sqlite3AffinityType(tls, *(**int8)(unsafe.Pointer(&_pExpr.Xu)), nil))
+ _rc = _valueFromExpr(tls, _db, (*XExpr)(_pExpr.XpLeft), _enc, _1_aff, _ppVal, _pCtx)
if (*_ppVal) != nil {
- _sqlite3VdbeMemCast(tls, *_ppVal, _1_aff, uint8(i32(1)))
- _sqlite3ValueApplyAffinity(tls, *_ppVal, _affinity, uint8(i32(1)))
+ _sqlite3VdbeMemCast(tls, *_ppVal, _1_aff, uint8(1))
+ _sqlite3ValueApplyAffinity(tls, *_ppVal, _affinity, uint8(1))
}
return _rc
_11:
- if (_op == i32(155)) && ((int32((*XExpr)(_pExpr.X4).X0) == i32(134)) || (int32((*XExpr)(_pExpr.X4).X0) == i32(132))) {
- _pExpr = (*XExpr)(_pExpr.X4)
- _op = int32(_pExpr.X0)
- _negInt = i32(-1)
- _zNeg = str(37896)
+ if (_op == int32(155)) && ((int32((*XExpr)(_pExpr.XpLeft).Xop) == int32(134)) || (int32((*XExpr)(_pExpr.XpLeft).Xop) == int32(132))) {
+ _pExpr = (*XExpr)(_pExpr.XpLeft)
+ _op = int32(_pExpr.Xop)
+ _negInt = int32(-1)
+ _zNeg = str(37851)
}
- if _op != i32(97) && _op != i32(132) && _op != i32(134) {
+ if _op != int32(97) && _op != int32(132) && _op != int32(134) {
goto _18
}
_pVal = _valueNew(tls, _db, _pCtx)
if _pVal == nil {
goto _no_mem
}
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- _sqlite3VdbeMemSetInt64(tls, _pVal, int64(*(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))*int64(_negInt))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ _sqlite3VdbeMemSetInt64(tls, _pVal, int64(*(*int32)(unsafe.Pointer(&_pExpr.Xu)))*int64(_negInt))
goto _21
}
- _zVal = _sqlite3MPrintf(tls, _db, str(6890), unsafe.Pointer(_zNeg), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ _zVal = _sqlite3MPrintf(tls, _db, str(6791), unsafe.Pointer(_zNeg), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
if _zVal == nil {
goto _no_mem
}
- _sqlite3ValueSetStr(tls, _pVal, i32(-1), (unsafe.Pointer)(_zVal), uint8(i32(1)), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ _sqlite3ValueSetStr(tls, _pVal, int32(-1), unsafe.Pointer(_zVal), uint8(1), func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
_21:
- if ((_op == i32(134)) || (_op == i32(132))) && (int32(_affinity) == i32(65)) {
- _sqlite3ValueApplyAffinity(tls, _pVal, uint8(i32(67)), uint8(i32(1)))
+ if ((_op == int32(134)) || (_op == int32(132))) && (int32(_affinity) == int32(65)) {
+ _sqlite3ValueApplyAffinity(tls, _pVal, uint8(67), uint8(1))
goto _26
}
- _sqlite3ValueApplyAffinity(tls, _pVal, _affinity, uint8(i32(1)))
+ _sqlite3ValueApplyAffinity(tls, _pVal, _affinity, uint8(1))
_26:
- if (int32(_pVal.X1) & i32(12)) != 0 {
+ if (int32(_pVal.Xflags) & int32(12)) != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_pVal.X1)))
- *p = uint16(int32(*p) & i32(-3))
- sink14(*p)
+ p := &_pVal.Xflags
+ *p = uint16(int32(*p) & int32(-3))
}
}
- if int32(_enc) != i32(1) {
+ if int32(_enc) != int32(1) {
_rc = _sqlite3VdbeChangeEncoding(tls, _pVal, int32(_enc))
}
goto _41
_18:
- if _op != i32(155) {
+ if _op != int32(155) {
goto _30
}
- if i32(0) != _sqlite3ValueFromExpr(tls, _db, (*XExpr)(_pExpr.X4), _enc, _affinity, &_pVal) || _pVal == nil {
+ if int32(0) != _sqlite3ValueFromExpr(tls, _db, (*XExpr)(_pExpr.XpLeft), _enc, _affinity, &_pVal) || _pVal == nil {
goto _32
}
_sqlite3VdbeMemNumerify(tls, _pVal)
- if (int32(_pVal.X1) & i32(8)) != 0 {
- *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pVal.X0))))) = -(*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pVal.X0))))))
+ if (int32(_pVal.Xflags) & int32(8)) != 0 {
+ *(*float64)(unsafe.Pointer(&_pVal.Xu)) = -(*(*float64)(unsafe.Pointer(&_pVal.Xu)))
goto _36
}
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pVal.X0)))))) == i64(-9223372036854775808) {
- *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pVal.X0))))) = 9.223372036854776e+18
- *(*uint16)(unsafe.Pointer(&(_pVal.X1))) = uint16((int32(_pVal.X1) & i32(-49664)) | i32(8))
+ if (*(*int64)(unsafe.Pointer(&_pVal.Xu))) == int64(-9223372036854775808) {
+ *(*float64)(unsafe.Pointer(&_pVal.Xu)) = 9.223372036854776e+18
+ _pVal.Xflags = uint16((int32(_pVal.Xflags) & int32(-49664)) | int32(8))
goto _36
}
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pVal.X0))))) = -(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pVal.X0))))))
+ *(*int64)(unsafe.Pointer(&_pVal.Xu)) = -(*(*int64)(unsafe.Pointer(&_pVal.Xu)))
_36:
_sqlite3ValueApplyAffinity(tls, _pVal, _affinity, _enc)
_32:
goto _41
_30:
- if _op != i32(101) {
+ if _op != int32(101) {
goto _38
}
_pVal = _valueNew(tls, _db, _pCtx)
@@ -30551,18 +31202,18 @@ _30:
_sqlite3VdbeMemNumerify(tls, _pVal)
goto _41
_38:
- if _op != i32(133) {
+ if _op != int32(133) {
goto _41
}
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(0))))) != i32(120) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(0))))) != i32(88) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71051), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueFromExprØ00__func__Ø000))), unsafe.Pointer(str(42561)))
+ if int32(*elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), 0)) != int32(120) && int32(*elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), 0)) != int32(88) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71051), unsafe.Pointer(&_valueFromExprØ00__func__Ø000), unsafe.Pointer(str(42516)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(1))))) != i32(39) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71052), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueFromExprØ00__func__Ø000))), unsafe.Pointer(str(42612)))
+ if int32(*elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), uintptr(1))) != int32(39) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71052), unsafe.Pointer(&_valueFromExprØ00__func__Ø000), unsafe.Pointer(str(42567)))
crt.X__builtin_abort(tls)
}
}()
@@ -30570,125 +31221,129 @@ _38:
if _pVal == nil {
goto _no_mem
}
- _zVal = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))) + 1*uintptr(i32(2))))
- _16_nVal = _sqlite3Strlen30(tls, _zVal) - i32(1)
+ _zVal = elem1(*(**int8)(unsafe.Pointer(&_pExpr.Xu)), uintptr(2))
+ _16_nVal = _sqlite3Strlen30(tls, _zVal) - int32(1)
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zVal)) + 1*uintptr(_16_nVal)))) != i32(39) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71057), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueFromExprØ00__func__Ø000))), unsafe.Pointer(str(43689)))
+ if int32(*elem1(_zVal, uintptr(_16_nVal))) != int32(39) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71057), unsafe.Pointer(&_valueFromExprØ00__func__Ø000), unsafe.Pointer(str(43644)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemSetStr(tls, _pVal, (*int8)(_sqlite3HexToBlob(tls, _db, _zVal, _16_nVal)), _16_nVal/i32(2), uint8(i32(0)), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ _sqlite3VdbeMemSetStr(tls, _pVal, (*int8)(_sqlite3HexToBlob(tls, _db, _zVal, _16_nVal)), _16_nVal/int32(2), 0, func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
_41:
*_ppVal = _pVal
return _rc
_no_mem:
_sqlite3OomFault(tls, _db)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zVal))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zVal))
func() {
if (*_ppVal) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71075), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueFromExprØ00__func__Ø000))), unsafe.Pointer(str(43706)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71075), unsafe.Pointer(&_valueFromExprØ00__func__Ø000), unsafe.Pointer(str(43661)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pCtx != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71079), unsafe.Pointer((*int8)(unsafe.Pointer(&_valueFromExprØ00__func__Ø000))), unsafe.Pointer(str(43716)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71079), unsafe.Pointer(&_valueFromExprØ00__func__Ø000), unsafe.Pointer(str(43671)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3ValueFree(tls, _pVal)
- return _sqlite3NomemError(tls, i32(71081))
+ return _sqlite3NomemError(tls, int32(71081))
}
var _valueFromExprØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_valueFromExprØ00__func__Ø000[0], str(43724), 14)
-}
-
-// Scan the column type name zType (length nType) and return the
-// associated affinity type.
-//
-// This routine does a case-independent search of zType for the
-// substrings in the following table. If one of the substrings is
-// found, the corresponding affinity is returned. If zType contains
-// more than one of the substrings, entries toward the top of
-// the table take priority. For example, if zType is 'BLOBINT',
-// SQLITE_AFF_INTEGER is returned.
-//
-// Substring | Affinity
-// --------------------------------
-// 'INT' | SQLITE_AFF_INTEGER
-// 'CHAR' | SQLITE_AFF_TEXT
-// 'CLOB' | SQLITE_AFF_TEXT
-// 'TEXT' | SQLITE_AFF_TEXT
-// 'BLOB' | SQLITE_AFF_BLOB
-// 'REAL' | SQLITE_AFF_REAL
-// 'FLOA' | SQLITE_AFF_REAL
-// 'DOUB' | SQLITE_AFF_REAL
-//
-// If none of the substrings in the above table are found,
-// SQLITE_AFF_NUMERIC is returned.
+ crt.Xstrncpy(nil, &_valueFromExprØ00__func__Ø000[0], str(43679), 14)
+}
+
+// C comment
+// /*
+// ** Scan the column type name zType (length nType) and return the
+// ** associated affinity type.
+// **
+// ** This routine does a case-independent search of zType for the
+// ** substrings in the following table. If one of the substrings is
+// ** found, the corresponding affinity is returned. If zType contains
+// ** more than one of the substrings, entries toward the top of
+// ** the table take priority. For example, if zType is 'BLOBINT',
+// ** SQLITE_AFF_INTEGER is returned.
+// **
+// ** Substring | Affinity
+// ** --------------------------------
+// ** 'INT' | SQLITE_AFF_INTEGER
+// ** 'CHAR' | SQLITE_AFF_TEXT
+// ** 'CLOB' | SQLITE_AFF_TEXT
+// ** 'TEXT' | SQLITE_AFF_TEXT
+// ** 'BLOB' | SQLITE_AFF_BLOB
+// ** 'REAL' | SQLITE_AFF_REAL
+// ** 'FLOA' | SQLITE_AFF_REAL
+// ** 'DOUB' | SQLITE_AFF_REAL
+// **
+// ** If none of the substrings in the above table are found,
+// ** SQLITE_AFF_NUMERIC is returned.
+// */
func _sqlite3AffinityType(tls *crt.TLS, _zIn *int8, _pszEst *uint8) (r0 int8) {
var _14_v int32
var _aff int8
var _h uint32
var _zChar *int8
- _h = u32(0)
- _aff = i8(67)
+ _h = uint32(0)
+ _aff = int8(67)
_zChar = nil
func() {
if _zIn == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100847), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AffinityTypeØ00__func__Ø000))), unsafe.Pointer(str(43738)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100847), unsafe.Pointer(&_sqlite3AffinityTypeØ00__func__Ø000), unsafe.Pointer(str(43693)))
crt.X__builtin_abort(tls)
}
}()
_2:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIn)) + 1*uintptr(i32(0))))) == 0 {
+ if (*elem1(_zIn, 0)) == 0 {
goto _3
}
- _h = (_h << uint(i32(8))) + uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(int32(*_zIn)&i32(255)))))
+ _h = (_h << 8) + uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(int32(*_zIn)&int32(255))))
*(*uintptr)(unsafe.Pointer(&_zIn)) += uintptr(1)
- if _h == uint32(i32(1667785074)) {
- _aff = int8(i32(66))
+ if _h == uint32(1667785074) {
+ _aff = int8(66)
_zChar = _zIn
goto _24
}
- if _h == uint32(i32(1668050786)) {
- _aff = int8(i32(66))
+ if _h == uint32(1668050786) {
+ _aff = int8(66)
goto _24
}
- if _h == uint32(i32(1952807028)) {
- _aff = int8(i32(66))
+ if _h == uint32(1952807028) {
+ _aff = int8(66)
goto _24
}
- if _h != uint32(i32(1651273570)) || int32(_aff) != i32(67) && int32(_aff) != i32(69) {
+ if _h != uint32(1651273570) || int32(_aff) != int32(67) && int32(_aff) != int32(69) {
goto _12
}
- _aff = int8(i32(65))
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIn)) + 1*uintptr(i32(0))))) == i32(40) {
+ _aff = int8(65)
+ if int32(*elem1(_zIn, 0)) == int32(40) {
_zChar = _zIn
}
goto _24
_12:
- if (_h == uint32(i32(1919246700))) && (int32(_aff) == i32(67)) {
- _aff = int8(i32(69))
+ if (_h == uint32(1919246700)) && (int32(_aff) == int32(67)) {
+ _aff = int8(69)
goto _24
}
- if (_h == uint32(i32(1718382433))) && (int32(_aff) == i32(67)) {
- _aff = int8(i32(69))
+ if (_h == uint32(1718382433)) && (int32(_aff) == int32(67)) {
+ _aff = int8(69)
goto _24
}
- if (_h == uint32(i32(1685026146))) && (int32(_aff) == i32(67)) {
- _aff = int8(i32(69))
+ if (_h == uint32(1685026146)) && (int32(_aff) == int32(67)) {
+ _aff = int8(69)
goto _24
}
- if (_h & uint32(i32(16777215))) == uint32(i32(6909556)) {
- _aff = int8(i32(68))
+ if (_h & uint32(16777215)) == uint32(6909556) {
+ _aff = int8(68)
goto _3
}
_24:
@@ -30697,25 +31352,25 @@ _3:
if _pszEst == nil {
goto _25
}
- *_pszEst = uint8(i32(1))
- if int32(_aff) >= i32(67) {
+ *_pszEst = uint8(1)
+ if int32(_aff) >= int32(67) {
goto _26
}
if _zChar == nil {
goto _27
}
_28:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zChar)) + 1*uintptr(i32(0))))) == 0 {
+ if (*elem1(_zChar, 0)) == 0 {
goto _29
}
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zChar)) + 1*uintptr(i32(0))))))))) & i32(4)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zChar, 0))))) & int32(4)) == 0 {
goto _30
}
- _14_v = i32(0)
+ _14_v = int32(0)
_sqlite3GetInt32(tls, _zChar, &_14_v)
- _14_v = (_14_v / i32(4)) + i32(1)
- if _14_v > i32(255) {
- _14_v = i32(255)
+ _14_v = (_14_v / int32(4)) + int32(1)
+ if _14_v > int32(255) {
+ _14_v = int32(255)
}
*_pszEst = uint8(_14_v)
goto _29
@@ -30725,7 +31380,7 @@ _30:
_29:
goto _32
_27:
- *_pszEst = uint8(i32(5))
+ *_pszEst = uint8(5)
_32:
_26:
_25:
@@ -30735,158 +31390,158 @@ _25:
var _sqlite3AffinityTypeØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AffinityTypeØ00__func__Ø000[0], str(43745), 20)
+ crt.Xstrncpy(nil, &_sqlite3AffinityTypeØ00__func__Ø000[0], str(43700), 20)
}
-// If zNum represents an integer that will fit in 32-bits, then set
-// *pValue to that integer and return true. Otherwise return false.
-//
-// This routine accepts both decimal and hexadecimal notation for integers.
-//
-// Any non-numeric characters that following zNum are ignored.
-// This is different from sqlite3Atoi64() which requires the
-// input number to be zero-terminated.
+// C comment
+// /*
+// ** If zNum represents an integer that will fit in 32-bits, then set
+// ** *pValue to that integer and return true. Otherwise return false.
+// **
+// ** This routine accepts both decimal and hexadecimal notation for integers.
+// **
+// ** Any non-numeric characters that following zNum are ignored.
+// ** This is different from sqlite3Atoi64() which requires the
+// ** input number to be zero-terminated.
+// */
func _sqlite3GetInt32(tls *crt.TLS, _zNum *int8, _pValue *int32) (r0 int32) {
var _i, _c, _neg int32
var _v int64
var _3_u uint32
- _v = i64(0)
- _neg = i32(0)
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(0))))) == i32(45) {
- _neg = i32(1)
+ _v = int64(0)
+ _neg = int32(0)
+ if int32(*elem1(_zNum, 0)) == int32(45) {
+ _neg = int32(1)
*(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(1)
goto _7
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(0))))) == i32(43) {
+ if int32(*elem1(_zNum, 0)) == int32(43) {
*(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(1)
goto _7
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(0))))) != i32(48) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(1))))) != i32(120) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(1))))) != i32(88) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(2)))))))))&i32(8)) == 0 {
+ if int32(*elem1(_zNum, 0)) != int32(48) || int32(*elem1(_zNum, uintptr(1))) != int32(120) && int32(*elem1(_zNum, uintptr(1))) != int32(88) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zNum, uintptr(2))))))&int32(8)) == 0 {
goto _7
}
- _3_u = u32(0)
- {
- p := &_zNum
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(2))))
- sink0(*p)
- }
+ _3_u = uint32(0)
+ *(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(int32(2))
_8:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(0))))) == i32(48) {
+ if int32(*elem1(_zNum, 0)) == int32(48) {
*(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(1)
goto _8
}
- _i = i32(0)
+ _i = int32(0)
_10:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(_i))))))))&i32(8)) == 0 || _i >= i32(8) {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zNum, uintptr(_i))))))&int32(8)) == 0 || _i >= int32(8) {
goto _14
}
- _3_u = (_3_u * uint32(i32(16))) + uint32(_sqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(_i))))))
+ _3_u = (_3_u * uint32(16)) + uint32(_sqlite3HexToInt(tls, int32(*elem1(_zNum, uintptr(_i)))))
_i += 1
goto _10
_14:
- if ((_3_u & u32(2147483648)) == uint32(i32(0))) && ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(_i)))))))) & i32(8)) == i32(0)) {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pValue), (unsafe.Pointer)(&_3_u), uint32(i32(4)))
- return i32(1)
+ if ((_3_u & uint32(2147483648)) == (0)) && ((int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zNum, uintptr(_i)))))) & int32(8)) == int32(0)) {
+ crt.Xmemcpy(tls, unsafe.Pointer(_pValue), unsafe.Pointer(&_3_u), uint32(4))
+ return int32(1)
}
- return i32(0)
+ return int32(0)
_7:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(0))))))))) & i32(4)) == 0 {
- return i32(0)
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zNum, 0))))) & int32(4)) == 0 {
+ return int32(0)
}
_18:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(i32(0))))) == i32(48) {
+ if int32(*elem1(_zNum, 0)) == int32(48) {
*(*uintptr)(unsafe.Pointer(&_zNum)) += uintptr(1)
goto _18
}
- _i = i32(0)
+ _i = int32(0)
_21:
- if _i >= i32(11) || store1(&_c, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zNum)) + 1*uintptr(_i))))-i32(48)) < i32(0) || _c > i32(9) {
+ if _i >= int32(11) || store2(&_c, int32(*elem1(_zNum, uintptr(_i)))-int32(48)) < int32(0) || _c > int32(9) {
goto _26
}
- _v = (_v * int64(i32(10))) + int64(_c)
+ _v = (_v * int64(10)) + int64(_c)
_i += 1
goto _21
_26:
- if _i > i32(10) {
- return i32(0)
+ if _i > int32(10) {
+ return int32(0)
}
- if (_v - int64(_neg)) > int64(i32(2147483647)) {
- return i32(0)
+ if (_v - int64(_neg)) > int64(2147483647) {
+ return int32(0)
}
if _neg != 0 {
_v = -_v
}
*_pValue = int32(_v)
- return i32(1)
+ return int32(1)
}
-// Translate a single byte of Hex into an integer.
-// This routine only works if h really is a valid hexadecimal
-// character: 0..9a..fA..F
+// C comment
+// /*
+// ** Translate a single byte of Hex into an integer.
+// ** This routine only works if h really is a valid hexadecimal
+// ** character: 0..9a..fA..F
+// */
func _sqlite3HexToInt(tls *crt.TLS, _h int32) (r0 uint8) {
func() {
- if (_h < i32(48) || _h > i32(57)) && (_h < i32(97) || _h > i32(102)) && (_h < i32(65) || _h > i32(70)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28838), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3HexToIntØ00__func__Ø000))), unsafe.Pointer(str(43765)))
+ if (_h < int32(48) || _h > int32(57)) && (_h < int32(97) || _h > int32(102)) && (_h < int32(65) || _h > int32(70)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28838), unsafe.Pointer(&_sqlite3HexToIntØ00__func__Ø000), unsafe.Pointer(str(43720)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_h
- *p = (*p) + (i32(9) * (i32(1) & (_h >> uint(i32(6)))))
- sink1(*p)
- }
- return uint8(_h & i32(15))
+ _h += int32(9) * (int32(1) & (_h >> 6))
+ return uint8(_h & int32(15))
}
var _sqlite3HexToIntØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3HexToIntØ00__func__Ø000[0], str(43828), 16)
+ crt.Xstrncpy(nil, &_sqlite3HexToIntØ00__func__Ø000[0], str(43783), 16)
}
-// Cast the datatype of the value in pMem according to the affinity
-// "aff". Casting is different from applying affinity in that a cast
-// is forced. In other words, the value is converted into the desired
-// affinity even if that results in loss of data. This routine is
-// used (for example) to implement the SQL "cast()" operator.
+// C comment
+// /*
+// ** Cast the datatype of the value in pMem according to the affinity
+// ** "aff". Casting is different from applying affinity in that a cast
+// ** is forced. In other words, the value is converted into the desired
+// ** affinity even if that results in loss of data. This routine is
+// ** used (for example) to implement the SQL "cast()" operator.
+// */
func _sqlite3VdbeMemCast(tls *crt.TLS, _pMem *XMem, _aff uint8, _encoding uint8) {
- if (int32(_pMem.X1) & i32(1)) != 0 {
+ if (int32(_pMem.Xflags) & int32(1)) != 0 {
return
}
switch int32(_aff) {
- case i32(65):
+ case int32(65):
goto _2
- case i32(67):
+ case int32(67):
goto _3
- case i32(68):
+ case int32(68):
goto _4
- case i32(69):
+ case int32(69):
goto _5
default:
goto _6
}
_2:
- if (int32(_pMem.X1) & i32(16)) != i32(0) {
+ if (int32(_pMem.Xflags) & int32(16)) != int32(0) {
goto _7
}
- _sqlite3ValueApplyAffinity(tls, _pMem, uint8(i32(66)), _encoding)
+ _sqlite3ValueApplyAffinity(tls, _pMem, uint8(66), _encoding)
func() {
- if (int32(_pMem.X1)&i32(2)) == 0 && ((*Xsqlite3)(_pMem.X9).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70304), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemCastØ00__func__Ø000))), unsafe.Pointer(str(43844)))
+ if (int32(_pMem.Xflags)&int32(2)) == 0 && ((*Xsqlite3)(_pMem.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70304), unsafe.Pointer(&_sqlite3VdbeMemCastØ00__func__Ø000), unsafe.Pointer(str(43799)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pMem.X1) & i32(2)) != 0 {
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16((int32(_pMem.X1) & i32(-49664)) | i32(16))
+ if (int32(_pMem.Xflags) & int32(2)) != 0 {
+ _pMem.Xflags = uint16((int32(_pMem.Xflags) & int32(-49664)) | int32(16))
}
goto _12
_7:
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) & i32(-33264))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) & int32(-33264))
}
_12:
goto _13
@@ -30901,73 +31556,77 @@ _5:
goto _13
_6:
func() {
- if int32(_aff) != i32(66) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70324), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemCastØ00__func__Ø000))), unsafe.Pointer(str(43892)))
+ if int32(_aff) != int32(66) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70324), unsafe.Pointer(&_sqlite3VdbeMemCastØ00__func__Ø000), unsafe.Pointer(str(43847)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
+
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) | ((int32(_pMem.X1) & i32(16)) >> uint(i32(3))))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) | ((int32(_pMem.Xflags) & int32(16)) >> 3))
}
- _sqlite3ValueApplyAffinity(tls, _pMem, uint8(i32(66)), _encoding)
+ _sqlite3ValueApplyAffinity(tls, _pMem, uint8(66), _encoding)
func() {
- if (int32(_pMem.X1)&i32(2)) == 0 && ((*Xsqlite3)(_pMem.X9).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70328), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemCastØ00__func__Ø000))), unsafe.Pointer(str(43844)))
+ if (int32(_pMem.Xflags)&int32(2)) == 0 && ((*Xsqlite3)(_pMem.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70328), unsafe.Pointer(&_sqlite3VdbeMemCastØ00__func__Ø000), unsafe.Pointer(str(43799)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) & i32(-16413))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) & int32(-16413))
}
goto _13
_13:
}
-// Exported version of applyAffinity(). This one works on sqlite3_value*,
-// not the internal Mem* type.
+// C comment
+// /*
+// ** Exported version of applyAffinity(). This one works on sqlite3_value*,
+// ** not the internal Mem* type.
+// */
func _sqlite3ValueApplyAffinity(tls *crt.TLS, _pVal *XMem, _affinity uint8, _enc uint8) {
_applyAffinity(tls, _pVal, int8(_affinity), _enc)
}
-// Processing is determine by the affinity parameter:
-//
-// SQLITE_AFF_INTEGER:
-// SQLITE_AFF_REAL:
-// SQLITE_AFF_NUMERIC:
-// Try to convert pRec to an integer representation or a
-// floating-point representation if an integer representation
-// is not possible. Note that the integer representation is
-// always preferred, even if the affinity is REAL, because
-// an integer representation is more space efficient on disk.
-//
-// SQLITE_AFF_TEXT:
-// Convert pRec to a text representation.
-//
-// SQLITE_AFF_BLOB:
-// No-op. pRec is unchanged.
+// C comment
+// /*
+// ** Processing is determine by the affinity parameter:
+// **
+// ** SQLITE_AFF_INTEGER:
+// ** SQLITE_AFF_REAL:
+// ** SQLITE_AFF_NUMERIC:
+// ** Try to convert pRec to an integer representation or a
+// ** floating-point representation if an integer representation
+// ** is not possible. Note that the integer representation is
+// ** always preferred, even if the affinity is REAL, because
+// ** an integer representation is more space efficient on disk.
+// **
+// ** SQLITE_AFF_TEXT:
+// ** Convert pRec to a text representation.
+// **
+// ** SQLITE_AFF_BLOB:
+// ** No-op. pRec is unchanged.
+// */
func _applyAffinity(tls *crt.TLS, _pRec *XMem, _affinity int8, _enc uint8) {
- if int32(_affinity) < i32(67) {
+ if int32(_affinity) < int32(67) {
goto _0
}
func() {
- if int32(_affinity) != i32(68) && int32(_affinity) != i32(69) && int32(_affinity) != i32(67) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78494), unsafe.Pointer((*int8)(unsafe.Pointer(&_applyAffinityØ00__func__Ø000))), unsafe.Pointer(str(43913)))
+ if int32(_affinity) != int32(68) && int32(_affinity) != int32(69) && int32(_affinity) != int32(67) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78494), unsafe.Pointer(&_applyAffinityØ00__func__Ø000), unsafe.Pointer(str(43868)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pRec.X1) & i32(4)) != i32(0) {
+ if (int32(_pRec.Xflags) & int32(4)) != int32(0) {
goto _5
}
- if (int32(_pRec.X1) & i32(8)) != i32(0) {
+ if (int32(_pRec.Xflags) & int32(8)) != int32(0) {
goto _6
}
- if (int32(_pRec.X1) & i32(2)) != 0 {
- _applyNumericAffinity(tls, _pRec, i32(1))
+ if (int32(_pRec.Xflags) & int32(2)) != 0 {
+ _applyNumericAffinity(tls, _pRec, int32(1))
}
goto _8
_6:
@@ -30976,20 +31635,19 @@ _8:
_5:
goto _10
_0:
- if int32(_affinity) != i32(66) {
+ if int32(_affinity) != int32(66) {
goto _10
}
- if i32(0) != (int32(_pRec.X1) & i32(2)) {
+ if int32(0) != (int32(_pRec.Xflags) & int32(2)) {
goto _11
}
- if (int32(_pRec.X1) & i32(12)) != 0 {
- _sqlite3VdbeMemStringify(tls, _pRec, _enc, uint8(i32(1)))
+ if (int32(_pRec.Xflags) & int32(12)) != 0 {
+ _sqlite3VdbeMemStringify(tls, _pRec, _enc, uint8(1))
}
_11:
{
- p := (*uint16)(unsafe.Pointer(&(_pRec.X1)))
- *p = uint16(int32(*p) & i32(-13))
- sink14(*p)
+ p := &_pRec.Xflags
+ *p = uint16(int32(*p) & int32(-13))
}
_10:
}
@@ -30997,50 +31655,51 @@ _10:
var _applyAffinityØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_applyAffinityØ00__func__Ø000[0], str(44003), 14)
-}
-
-// Try to convert a value into a numeric representation if we can
-// do so without loss of information. In other words, if the string
-// looks like a number, convert it into a number. If it does not
-// look like a number, leave it alone.
-//
-// If the bTryForInt flag is true, then extra effort is made to give
-// an integer representation. Strings that look like floating point
-// values but which have no fractional component (example: '48.00')
-// will have a MEM_Int representation when bTryForInt is true.
-//
-// If bTryForInt is false, then if the input string contains a decimal
-// point or exponential notation, the result is only MEM_Real, even
-// if there is an exact integer representation of the quantity.
+ crt.Xstrncpy(nil, &_applyAffinityØ00__func__Ø000[0], str(43958), 14)
+}
+
+// C comment
+// /*
+// ** Try to convert a value into a numeric representation if we can
+// ** do so without loss of information. In other words, if the string
+// ** looks like a number, convert it into a number. If it does not
+// ** look like a number, leave it alone.
+// **
+// ** If the bTryForInt flag is true, then extra effort is made to give
+// ** an integer representation. Strings that look like floating point
+// ** values but which have no fractional component (example: '48.00')
+// ** will have a MEM_Int representation when bTryForInt is true.
+// **
+// ** If bTryForInt is false, then if the input string contains a decimal
+// ** point or exponential notation, the result is only MEM_Real, even
+// ** if there is an exact integer representation of the quantity.
+// */
func _applyNumericAffinity(tls *crt.TLS, _pRec *XMem, _bTryForInt int32) {
var _iValue int64
var _rValue float64
var _enc uint8
- _enc = _pRec.X2
+ _enc = _pRec.Xenc
func() {
- if (int32(_pRec.X1) & i32(14)) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78458), unsafe.Pointer((*int8)(unsafe.Pointer(&_applyNumericAffinityØ00__func__Ø000))), unsafe.Pointer(str(44017)))
+ if (int32(_pRec.Xflags) & int32(14)) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78458), unsafe.Pointer(&_applyNumericAffinityØ00__func__Ø000), unsafe.Pointer(str(43972)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3AtoF(tls, _pRec.X5, &_rValue, _pRec.X4, _enc) == i32(0) {
+ if _sqlite3AtoF(tls, _pRec.Xz, &_rValue, _pRec.Xn, _enc) == int32(0) {
return
}
- if i32(0) == _sqlite3Atoi64(tls, _pRec.X5, &_iValue, _pRec.X4, _enc) {
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pRec.X0))))) = _iValue
+ if int32(0) == _sqlite3Atoi64(tls, _pRec.Xz, &_iValue, _pRec.Xn, _enc) {
+ *(*int64)(unsafe.Pointer(&_pRec.Xu)) = _iValue
{
- p := (*uint16)(unsafe.Pointer(&(_pRec.X1)))
- *p = uint16(int32(*p) | i32(4))
- sink14(*p)
+ p := &_pRec.Xflags
+ *p = uint16(int32(*p) | int32(4))
}
goto _4
}
- *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pRec.X0))))) = _rValue
+ *(*float64)(unsafe.Pointer(&_pRec.Xu)) = _rValue
{
- p := (*uint16)(unsafe.Pointer(&(_pRec.X1)))
- *p = uint16(int32(*p) | i32(8))
- sink14(*p)
+ p := &_pRec.Xflags
+ *p = uint16(int32(*p) | int32(8))
}
if _bTryForInt != 0 {
_sqlite3VdbeIntegerAffinity(tls, _pRec)
@@ -31051,324 +31710,343 @@ _4:
var _applyNumericAffinityØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_applyNumericAffinityØ00__func__Ø000[0], str(44069), 21)
+ crt.Xstrncpy(nil, &_applyNumericAffinityØ00__func__Ø000[0], str(44024), 21)
}
-// The MEM structure is already a MEM_Real. Try to also make it a
-// MEM_Int if we can.
+// C comment
+// /*
+// ** The MEM structure is already a MEM_Real. Try to also make it a
+// ** MEM_Int if we can.
+// */
func _sqlite3VdbeIntegerAffinity(tls *crt.TLS, _pMem *XMem) {
var _ix int64
func() {
- if (int32(_pMem.X1) & i32(8)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70217), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIntegerAffinityØ00__func__Ø000))), unsafe.Pointer(str(44090)))
+ if (int32(_pMem.Xflags) & int32(8)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70217), unsafe.Pointer(&_sqlite3VdbeIntegerAffinityØ00__func__Ø000), unsafe.Pointer(str(44045)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70218), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIntegerAffinityØ00__func__Ø000))), unsafe.Pointer(str(6728)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70218), unsafe.Pointer(&_sqlite3VdbeIntegerAffinityØ00__func__Ø000), unsafe.Pointer(str(6629)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70219), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIntegerAffinityØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70219), unsafe.Pointer(&_sqlite3VdbeIntegerAffinityØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pMem))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70220), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIntegerAffinityØ00__func__Ø000))), unsafe.Pointer(str(6321)))
+ if (int32(uintptr(unsafe.Pointer(_pMem))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70220), unsafe.Pointer(&_sqlite3VdbeIntegerAffinityØ00__func__Ø000), unsafe.Pointer(str(6222)))
crt.X__builtin_abort(tls)
}
}()
- _ix = _doubleToInt64(tls, *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
- if (((*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))) == float64(_ix)) && (_ix > i64(-9223372036854775808))) && (_ix < i64(9223372036854775807)) {
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = _ix
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16((int32(_pMem.X1) & i32(-49664)) | i32(4))
+ _ix = _doubleToInt64(tls, *(*float64)(unsafe.Pointer(&_pMem.Xu)))
+ if (((*(*float64)(unsafe.Pointer(&_pMem.Xu))) == float64(_ix)) && (_ix > int64(-9223372036854775808))) && (_ix < int64(9223372036854775807)) {
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = _ix
+ _pMem.Xflags = uint16((int32(_pMem.Xflags) & int32(-49664)) | int32(4))
}
}
var _sqlite3VdbeIntegerAffinityØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeIntegerAffinityØ00__func__Ø000[0], str(44113), 27)
+ crt.Xstrncpy(nil, &_sqlite3VdbeIntegerAffinityØ00__func__Ø000[0], str(44068), 27)
}
var _sqlite3VdbeMemCastØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemCastØ00__func__Ø000[0], str(44140), 19)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemCastØ00__func__Ø000[0], str(44095), 19)
}
-// Convert pMem so that it has types MEM_Real or MEM_Int or both.
-// Invalidate any prior representations.
-//
-// Every effort is made to force the conversion, even if the input
-// is a string that does not look completely like a number. Convert
-// as much of the string as we can and ignore the rest.
+// C comment
+// /*
+// ** Convert pMem so that it has types MEM_Real or MEM_Int or both.
+// ** Invalidate any prior representations.
+// **
+// ** Every effort is made to force the conversion, even if the input
+// ** is a string that does not look completely like a number. Convert
+// ** as much of the string as we can and ignore the rest.
+// */
func _sqlite3VdbeMemNumerify(tls *crt.TLS, _pMem *XMem) (r0 int32) {
- if (int32(_pMem.X1) & i32(13)) != i32(0) {
+ if (int32(_pMem.Xflags) & int32(13)) != int32(0) {
goto _0
}
func() {
- if (int32(_pMem.X1) & i32(18)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70276), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemNumerifyØ00__func__Ø000))), unsafe.Pointer(str(44159)))
+ if (int32(_pMem.Xflags) & int32(18)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70276), unsafe.Pointer(&_sqlite3VdbeMemNumerifyØ00__func__Ø000), unsafe.Pointer(str(44114)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70277), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemNumerifyØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70277), unsafe.Pointer(&_sqlite3VdbeMemNumerifyØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) == _sqlite3Atoi64(tls, _pMem.X5, (*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))), _pMem.X4, _pMem.X2) {
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16((int32(_pMem.X1) & i32(-49664)) | i32(4))
+ if int32(0) == _sqlite3Atoi64(tls, _pMem.Xz, (*int64)(unsafe.Pointer(&_pMem.Xu)), _pMem.Xn, _pMem.Xenc) {
+ _pMem.Xflags = uint16((int32(_pMem.Xflags) & int32(-49664)) | int32(4))
goto _7
}
- *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = _sqlite3VdbeRealValue(tls, _pMem)
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16((int32(_pMem.X1) & i32(-49664)) | i32(8))
+ *(*float64)(unsafe.Pointer(&_pMem.Xu)) = _sqlite3VdbeRealValue(tls, _pMem)
+ _pMem.Xflags = uint16((int32(_pMem.Xflags) & int32(-49664)) | int32(8))
_sqlite3VdbeIntegerAffinity(tls, _pMem)
_7:
_0:
func() {
- if (int32(_pMem.X1) & i32(13)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70286), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemNumerifyØ00__func__Ø000))), unsafe.Pointer(str(44197)))
+ if (int32(_pMem.Xflags) & int32(13)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70286), unsafe.Pointer(&_sqlite3VdbeMemNumerifyØ00__func__Ø000), unsafe.Pointer(str(44152)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&(_pMem.X1)))
- *p = uint16(int32(*p) & i32(-16403))
- sink14(*p)
+ p := &_pMem.Xflags
+ *p = uint16(int32(*p) & int32(-16403))
}
- return i32(0)
+ return int32(0)
}
var _sqlite3VdbeMemNumerifyØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemNumerifyØ00__func__Ø000[0], str(44244), 23)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemNumerifyØ00__func__Ø000[0], str(44199), 23)
}
-// Convert pMem to type integer. Invalidate any prior representations.
+// C comment
+// /*
+// ** Convert pMem to type integer. Invalidate any prior representations.
+// */
func _sqlite3VdbeMemIntegerify(tls *crt.TLS, _pMem *XMem) (r0 int32) {
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70244), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemIntegerifyØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70244), unsafe.Pointer(&_sqlite3VdbeMemIntegerifyØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70245), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemIntegerifyØ00__func__Ø000))), unsafe.Pointer(str(6728)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70245), unsafe.Pointer(&_sqlite3VdbeMemIntegerifyØ00__func__Ø000), unsafe.Pointer(str(6629)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pMem))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70246), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemIntegerifyØ00__func__Ø000))), unsafe.Pointer(str(6321)))
+ if (int32(uintptr(unsafe.Pointer(_pMem))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70246), unsafe.Pointer(&_sqlite3VdbeMemIntegerifyØ00__func__Ø000), unsafe.Pointer(str(6222)))
crt.X__builtin_abort(tls)
}
}()
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = _sqlite3VdbeIntValue(tls, _pMem)
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16((int32(_pMem.X1) & i32(-49664)) | i32(4))
- return i32(0)
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = _sqlite3VdbeIntValue(tls, _pMem)
+ _pMem.Xflags = uint16((int32(_pMem.Xflags) & int32(-49664)) | int32(4))
+ return int32(0)
}
var _sqlite3VdbeMemIntegerifyØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemIntegerifyØ00__func__Ø000[0], str(44267), 25)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemIntegerifyØ00__func__Ø000[0], str(44222), 25)
}
-// Convert pMem so that it is of type MEM_Real.
-// Invalidate any prior representations.
+// C comment
+// /*
+// ** Convert pMem so that it is of type MEM_Real.
+// ** Invalidate any prior representations.
+// */
func _sqlite3VdbeMemRealify(tls *crt.TLS, _pMem *XMem) (r0 int32) {
func() {
- if (*Xsqlite3)(_pMem.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70258), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemRealifyØ00__func__Ø000))), unsafe.Pointer(str(4667)))
+ if (*Xsqlite3)(_pMem.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pMem.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70258), unsafe.Pointer(&_sqlite3VdbeMemRealifyØ00__func__Ø000), unsafe.Pointer(str(4568)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pMem))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70259), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemRealifyØ00__func__Ø000))), unsafe.Pointer(str(6321)))
+ if (int32(uintptr(unsafe.Pointer(_pMem))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70259), unsafe.Pointer(&_sqlite3VdbeMemRealifyØ00__func__Ø000), unsafe.Pointer(str(6222)))
crt.X__builtin_abort(tls)
}
}()
- *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = _sqlite3VdbeRealValue(tls, _pMem)
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16((int32(_pMem.X1) & i32(-49664)) | i32(8))
- return i32(0)
+ *(*float64)(unsafe.Pointer(&_pMem.Xu)) = _sqlite3VdbeRealValue(tls, _pMem)
+ _pMem.Xflags = uint16((int32(_pMem.Xflags) & int32(-49664)) | int32(8))
+ return int32(0)
}
var _sqlite3VdbeMemRealifyØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemRealifyØ00__func__Ø000[0], str(44292), 22)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemRealifyØ00__func__Ø000[0], str(44247), 22)
}
-// Allocate and return a pointer to a new sqlite3_value object. If
-// the second argument to this function is NULL, the object is allocated
-// by calling sqlite3ValueNew().
-//
-// Otherwise, if the second argument is non-zero, then this function is
-// being called indirectly by sqlite3Stat4ProbeSetValue(). If it has not
-// already been allocated, allocate the UnpackedRecord structure that
-// that function will return to its caller here. Then return a pointer to
-// an sqlite3_value within the UnpackedRecord.a[] array.
-func _valueNew(tls *crt.TLS, _db *Xsqlite3, _p *t41) (r0 *XMem) {
+// C comment
+// /*
+// ** Allocate and return a pointer to a new sqlite3_value object. If
+// ** the second argument to this function is NULL, the object is allocated
+// ** by calling sqlite3ValueNew().
+// **
+// ** Otherwise, if the second argument is non-zero, then this function is
+// ** being called indirectly by sqlite3Stat4ProbeSetValue(). If it has not
+// ** already been allocated, allocate the UnpackedRecord structure that
+// ** that function will return to its caller here. Then return a pointer to
+// ** an sqlite3_value within the UnpackedRecord.a[] array.
+// */
+func _valueNew(tls *crt.TLS, _db *Xsqlite3, _p *t68) (r0 *XMem) {
return _sqlite3ValueNew(tls, _db)
}
-// Convert a BLOB literal of the form "x'hhhhhh'" into its binary
-// value. Return a pointer to its binary value. Space to hold the
-// binary value has been obtained from malloc and must be freed by
-// the calling routine.
+// C comment
+// /*
+// ** Convert a BLOB literal of the form "x'hhhhhh'" into its binary
+// ** value. Return a pointer to its binary value. Space to hold the
+// ** binary value has been obtained from malloc and must be freed by
+// ** the calling routine.
+// */
func _sqlite3HexToBlob(tls *crt.TLS, _db *Xsqlite3, _z *int8, _n int32) (r0 unsafe.Pointer) {
var _i int32
var _zBlob *int8
- _zBlob = (*int8)(_sqlite3DbMallocRawNN(tls, _db, uint64((_n/i32(2))+i32(1))))
+ _zBlob = (*int8)(_sqlite3DbMallocRawNN(tls, _db, uint64((_n/int32(2))+int32(1))))
_n -= 1
if _zBlob == nil {
goto _0
}
- _i = i32(0)
+ _i = int32(0)
_1:
if _i >= _n {
goto _4
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBlob)) + 1*uintptr(_i/i32(2)))) = int8((int32(_sqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))))) << uint(i32(4))) | int32(_sqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i+i32(1))))))))
- {
- p := &_i
- *p = (*p) + i32(2)
- sink1(*p)
- }
+ *elem1(_zBlob, uintptr(_i/int32(2))) = int8((int32(_sqlite3HexToInt(tls, int32(*elem1(_z, uintptr(_i))))) << 4) | int32(_sqlite3HexToInt(tls, int32(*elem1(_z, uintptr(_i+int32(1)))))))
+ _i += int32(2)
goto _1
_4:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBlob)) + 1*uintptr(_i/i32(2)))) = int8(i32(0))
+ *elem1(_zBlob, uintptr(_i/int32(2))) = 0
_0:
- return (unsafe.Pointer)(_zBlob)
+ return unsafe.Pointer(_zBlob)
}
func _sqlite3VdbeAddOp1(tls *crt.TLS, _p *TVdbe, _op int32, _p1 int32) (r0 int32) {
- return _sqlite3VdbeAddOp3(tls, _p, _op, _p1, i32(0), i32(0))
+ return _sqlite3VdbeAddOp3(tls, _p, _op, _p1, int32(0), int32(0))
}
-// Record in the column cache that a particular column from a
-// particular table is stored in a particular register.
+// C comment
+// /*
+// ** Record in the column cache that a particular column from a
+// ** particular table is stored in a particular register.
+// */
func _sqlite3ExprCacheStore(tls *crt.TLS, _pParse *XParse, _iTab int32, _iCol int32, _iReg int32) {
var _i, _minLru, _idxLru int32
var _p *TyColCache
func() {
- if _iReg <= i32(0) && (_pParse.X16) == 0 && ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94005), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCacheStoreØ00__func__Ø000))), unsafe.Pointer(str(44314)))
+ if _iReg <= int32(0) && _pParse.XnErr == 0 && ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94005), unsafe.Pointer(&_sqlite3ExprCacheStoreØ00__func__Ø000), unsafe.Pointer(str(44269)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iCol < i32(-1) || _iCol >= i32(32768) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94006), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCacheStoreØ00__func__Ø000))), unsafe.Pointer(str(44365)))
+ if _iCol < int32(-1) || _iCol >= int32(32768) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94006), unsafe.Pointer(&_sqlite3ExprCacheStoreØ00__func__Ø000), unsafe.Pointer(str(44320)))
crt.X__builtin_abort(tls)
}
}()
- if (int32((*Xsqlite3)(_pParse.X0).X13) & i32(2)) != i32(0) {
+ if (int32((*Xsqlite3)(_pParse.Xdb).XdbOptFlags) & int32(2)) != int32(0) {
return
}
- *func() **TyColCache { _i = i32(0); return &_p }() = (*TyColCache)(unsafe.Pointer((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48)))))
+ *func() **TyColCache { _i = int32(0); return &_p }() = (*TyColCache)(unsafe.Pointer(&_pParse.XaColCache))
_8:
- if _i >= int32(_pParse.X13) {
+ if _i >= int32(_pParse.XnColCache) {
goto _11
}
func() {
- if (_p.X0) == _iTab && int32(_p.X1) == _iCol {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94021), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCacheStoreØ00__func__Ø000))), unsafe.Pointer(str(44388)))
+ if _p.XiTable == _iTab && int32(_p.XiColumn) == _iCol {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94021), unsafe.Pointer(&_sqlite3ExprCacheStoreØ00__func__Ø000), unsafe.Pointer(str(44343)))
crt.X__builtin_abort(tls)
}
}()
*(*uintptr)(unsafe.Pointer(func() **TyColCache { _i += 1; return &_p }())) += uintptr(20)
goto _8
_11:
- if int32(_pParse.X13) < i32(10) {
+ if int32(_pParse.XnColCache) < int32(10) {
goto _15
}
- _minLru = i32(2147483647)
- _idxLru = i32(-1)
- *func() **TyColCache { _i = i32(0); return &_p }() = (*TyColCache)(unsafe.Pointer((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48)))))
+ _minLru = int32(2147483647)
+ _idxLru = int32(-1)
+ *func() **TyColCache { _i = int32(0); return &_p }() = (*TyColCache)(unsafe.Pointer(&_pParse.XaColCache))
_16:
- if _i >= i32(10) {
+ if _i >= int32(10) {
goto _19
}
- if (_p.X5) < _minLru {
+ if _p.Xlru < _minLru {
_idxLru = _i
- _minLru = _p.X5
+ _minLru = _p.Xlru
}
*(*uintptr)(unsafe.Pointer(func() **TyColCache { _i += 1; return &_p }())) += uintptr(20)
goto _16
_19:
- _p = (*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(_idxLru)))
+ _p = elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(_idxLru))
goto _21
_15:
- _p = (*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(postInc2((*uint8)(unsafe.Pointer(&(_pParse.X13))), uint8(1)))))
+ _p = elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(postInc3(&_pParse.XnColCache, byte(1))))
_21:
- *(*int32)(unsafe.Pointer(&(_p.X3))) = _pParse.X23
- *(*int32)(unsafe.Pointer(&(_p.X0))) = _iTab
- *(*int16)(unsafe.Pointer(&(_p.X1))) = int16(_iCol)
- *(*int32)(unsafe.Pointer(&(_p.X4))) = _iReg
- *(*uint8)(unsafe.Pointer(&(_p.X2))) = uint8(i32(0))
- *(*int32)(unsafe.Pointer(&(_p.X5))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X24))), int32(1))
+ _p.XiLevel = _pParse.XiCacheLevel
+ _p.XiTable = _iTab
+ _p.XiColumn = int16(_iCol)
+ _p.XiReg = _iReg
+ _p.XtempReg = 0
+ _p.Xlru = postInc2(&_pParse.XiCacheCnt, 1)
}
var _sqlite3ExprCacheStoreØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCacheStoreØ00__func__Ø000[0], str(44424), 22)
+ crt.Xstrncpy(nil, &_sqlite3ExprCacheStoreØ00__func__Ø000[0], str(44379), 22)
}
-// Generate an instruction that will put the integer describe by
-// text z[0..n-1] into register iMem.
-//
-// Expr.u.zToken is always UTF8 and zero-terminated.
+// C comment
+// /*
+// ** Generate an instruction that will put the integer describe by
+// ** text z[0..n-1] into register iMem.
+// **
+// ** Expr.u.zToken is always UTF8 and zero-terminated.
+// */
func _codeInteger(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _negFlag int32, _iMem int32) {
var _1_i, _2_c int32
var _2_value int64
var _2_z *int8
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
- if ((_pExpr.X2) & uint32(i32(1024))) == 0 {
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ if (_pExpr.Xflags & uint32(1024)) == 0 {
goto _0
}
- _1_i = *(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))
+ _1_i = *(*int32)(unsafe.Pointer(&_pExpr.Xu))
func() {
- if _1_i < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93949), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeIntegerØ00__func__Ø000))), unsafe.Pointer(str(44446)))
+ if _1_i < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93949), unsafe.Pointer(&_codeIntegerØ00__func__Ø000), unsafe.Pointer(str(44401)))
crt.X__builtin_abort(tls)
}
}()
if _negFlag != 0 {
_1_i = -_1_i
}
- _sqlite3VdbeAddOp2(tls, _v, i32(56), _1_i, _iMem)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), _1_i, _iMem)
goto _4
_0:
- _2_z = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))
+ _2_z = *(**int8)(unsafe.Pointer(&_pExpr.Xu))
func() {
if _2_z == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93956), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeIntegerØ00__func__Ø000))), unsafe.Pointer(str(44451)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93956), unsafe.Pointer(&_codeIntegerØ00__func__Ø000), unsafe.Pointer(str(44406)))
crt.X__builtin_abort(tls)
}
}()
_2_c = _sqlite3DecOrHexToI64(tls, _2_z, &_2_value)
- if _2_c != i32(1) && (_2_c != i32(2) || _negFlag != 0) && (_negFlag == 0 || _2_value != i64(-9223372036854775808)) {
+ if _2_c != int32(1) && (_2_c != int32(2) || _negFlag != 0) && (_negFlag == 0 || _2_value != int64(-9223372036854775808)) {
goto _11
}
- if Xsqlite3_strnicmp(tls, _2_z, str(44456), i32(2)) == i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(44459), unsafe.Pointer(func() *int8 {
+ if Xsqlite3_strnicmp(tls, _2_z, str(44411), int32(2)) == int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(44414), unsafe.Pointer(func() *int8 {
if _negFlag != 0 {
- return str(37896)
+ return str(37851)
}
- return str(0)
+ return str(284)
}()), unsafe.Pointer(_2_z))
goto _15
}
@@ -31378,13 +32056,13 @@ _15:
_11:
if _negFlag != 0 {
_2_value = func() int64 {
- if _2_c == i32(2) {
- return i64(-9223372036854775808)
+ if _2_c == int32(2) {
+ return int64(-9223372036854775808)
}
return (-_2_value)
}()
}
- _sqlite3VdbeAddOp4Dup8(tls, _v, i32(57), i32(0), _iMem, i32(0), (*uint8)(unsafe.Pointer(&_2_value)), i32(-10))
+ _sqlite3VdbeAddOp4Dup8(tls, _v, int32(57), int32(0), _iMem, int32(0), (*uint8)(unsafe.Pointer(&_2_value)), int32(-10))
_16:
_4:
}
@@ -31392,28 +32070,31 @@ _4:
var _codeIntegerØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_codeIntegerØ00__func__Ø000[0], str(44485), 12)
+ crt.Xstrncpy(nil, &_codeIntegerØ00__func__Ø000[0], str(44440), 12)
}
-// Transform a UTF-8 integer literal, in either decimal or hexadecimal,
-// into a 64-bit signed integer. This routine accepts hexadecimal literals,
-// whereas sqlite3Atoi64() does not.
-//
-// Returns:
-//
-// 0 Successful transformation. Fits in a 64-bit signed integer.
-// 1 Integer too large for a 64-bit signed integer or is malformed
-// 2 Special case of 9223372036854775808
+// C comment
+// /*
+// ** Transform a UTF-8 integer literal, in either decimal or hexadecimal,
+// ** into a 64-bit signed integer. This routine accepts hexadecimal literals,
+// ** whereas sqlite3Atoi64() does not.
+// **
+// ** Returns:
+// **
+// ** 0 Successful transformation. Fits in a 64-bit signed integer.
+// ** 1 Integer too large for a 64-bit signed integer or is malformed
+// ** 2 Special case of 9223372036854775808
+// */
func _sqlite3DecOrHexToI64(tls *crt.TLS, _z *int8, _pOut *int64) (r0 int32) {
var _1_i, _1_k int32
var _1_u uint64
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(48) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(120) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(88) {
+ if int32(*elem1(_z, 0)) != int32(48) || int32(*elem1(_z, uintptr(1))) != int32(120) && int32(*elem1(_z, uintptr(1))) != int32(88) {
goto _2
}
- _1_u = u64(0)
- _1_i = i32(2)
+ _1_u = uint64(0)
+ _1_i = int32(2)
_3:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_1_i)))) != i32(48) {
+ if int32(*elem1(_z, uintptr(_1_i))) != int32(48) {
goto _6
}
_1_i += 1
@@ -31421,94 +32102,106 @@ _3:
_6:
_1_k = _1_i
_7:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_1_k)))))))) & i32(8)) == 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_z, uintptr(_1_k)))))) & int32(8)) == 0 {
goto _10
}
- _1_u = (_1_u * uint64(i32(16))) + uint64(_sqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_1_k))))))
+ _1_u = (_1_u * uint64(16)) + uint64(_sqlite3HexToInt(tls, int32(*elem1(_z, uintptr(_1_k)))))
_1_k += 1
goto _7
_10:
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pOut), (unsafe.Pointer)(&_1_u), uint32(i32(8)))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pOut), unsafe.Pointer(&_1_u), uint32(8))
return func() int32 {
- if (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_1_k)))) == i32(0)) && ((_1_k - _1_i) <= i32(16)) {
- return i32(0)
+ if (int32(*elem1(_z, uintptr(_1_k))) == int32(0)) && ((_1_k - _1_i) <= int32(16)) {
+ return int32(0)
}
- return i32(1)
+ return int32(1)
}()
_2:
- return _sqlite3Atoi64(tls, _z, _pOut, _sqlite3Strlen30(tls, _z), uint8(i32(1)))
-}
-
-// Generate an instruction that will put the floating point
-// value described by z[0..n-1] into register iMem.
-//
-// The z[] string will probably not be zero-terminated. But the
-// z[n] character is guaranteed to be something that does not look
-// like the continuation of the number.
+ return _sqlite3Atoi64(tls, _z, _pOut, _sqlite3Strlen30(tls, _z), uint8(1))
+}
+
+// C comment
+// /*
+// ** Generate an instruction that will put the floating point
+// ** value described by z[0..n-1] into register iMem.
+// **
+// ** The z[] string will probably not be zero-terminated. But the
+// ** z[n] character is guaranteed to be something that does not look
+// ** like the continuation of the number.
+// */
func _codeReal(tls *crt.TLS, _v *TVdbe, _z *int8, _negateFlag int32, _iMem int32) {
var _1_value float64
if func() int32 {
if _z != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93928), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeRealØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93928), unsafe.Pointer(&_codeRealØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _2
}
- _sqlite3AtoF(tls, _z, &_1_value, _sqlite3Strlen30(tls, _z), uint8(i32(1)))
+ _sqlite3AtoF(tls, _z, &_1_value, _sqlite3Strlen30(tls, _z), uint8(1))
func() {
if _sqlite3IsNaN(tls, _1_value) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93931), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeRealØ00__func__Ø000))), unsafe.Pointer(str(44497)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93931), unsafe.Pointer(&_codeRealØ00__func__Ø000), unsafe.Pointer(str(44452)))
crt.X__builtin_abort(tls)
}
}()
if _negateFlag != 0 {
_1_value = -_1_value
}
- _sqlite3VdbeAddOp4Dup8(tls, _v, i32(132), i32(0), _iMem, i32(0), (*uint8)(unsafe.Pointer(&_1_value)), i32(-9))
+ _sqlite3VdbeAddOp4Dup8(tls, _v, int32(132), int32(0), _iMem, int32(0), (*uint8)(unsafe.Pointer(&_1_value)), int32(-9))
_2:
}
var _codeRealØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_codeRealØ00__func__Ø000[0], str(44518), 9)
+ crt.Xstrncpy(nil, &_codeRealØ00__func__Ø000[0], str(44473), 9)
}
-// Add an opcode that includes the p4 value with a P4_INT64 or
-// P4_REAL type.
+// C comment
+// /*
+// ** Add an opcode that includes the p4 value with a P4_INT64 or
+// ** P4_REAL type.
+// */
func _sqlite3VdbeAddOp4Dup8(tls *crt.TLS, _p *TVdbe, _op int32, _p1 int32, _p2 int32, _p3 int32, _zP4 *uint8, _p4type int32) (r0 int32) {
var _p4copy *int8
- _p4copy = (*int8)(_sqlite3DbMallocRawNN(tls, _sqlite3VdbeDb(tls, _p), uint64(i32(8))))
+ _p4copy = (*int8)(_sqlite3DbMallocRawNN(tls, _sqlite3VdbeDb(tls, _p), uint64(8)))
if _p4copy != nil {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_p4copy), (unsafe.Pointer)(_zP4), uint32(i32(8)))
+ crt.Xmemcpy(tls, unsafe.Pointer(_p4copy), unsafe.Pointer(_zP4), uint32(8))
}
return _sqlite3VdbeAddOp4(tls, _p, _op, _p1, _p2, _p3, _p4copy, _p4type)
}
-// Record the fact that an affinity change has occurred on iCount
-// registers starting with iStart.
+// C comment
+// /*
+// ** Record the fact that an affinity change has occurred on iCount
+// ** registers starting with iStart.
+// */
func _sqlite3ExprCacheAffinityChange(tls *crt.TLS, _pParse *XParse, _iStart int32, _iCount int32) {
_sqlite3ExprCacheRemove(tls, _pParse, _iStart, _iCount)
}
-// Indicate that registers between iReg..iReg+nReg-1 are being overwritten.
-// Purge the range of registers from the column cache.
+// C comment
+// /*
+// ** Indicate that registers between iReg..iReg+nReg-1 are being overwritten.
+// ** Purge the range of registers from the column cache.
+// */
func _sqlite3ExprCacheRemove(tls *crt.TLS, _pParse *XParse, _iReg int32, _nReg int32) {
var _i int32
var _1_p *TyColCache
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= int32(_pParse.X13) {
+ if _i >= int32(_pParse.XnColCache) {
goto _1
}
- _1_p = (*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(_i)))
- if ((_1_p.X4) >= _iReg) && ((_1_p.X4) < (_iReg + _nReg)) {
+ _1_p = elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(_i))
+ if (_1_p.XiReg >= _iReg) && (_1_p.XiReg < (_iReg + _nReg)) {
_cacheEntryClear(tls, _pParse, _i)
goto _4
}
@@ -31518,125 +32211,136 @@ _4:
_1:
}
-// Erase column-cache entry number i
+// C comment
+// /*
+// ** Erase column-cache entry number i
+// */
func _cacheEntryClear(tls *crt.TLS, _pParse *XParse, _i int32) {
- if ((*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(_i))).X2) == 0 {
+ if (elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(_i)).XtempReg) == 0 {
goto _0
}
- if int32(_pParse.X7) < i32(8) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[8]int32)(unsafe.Pointer(&(_pParse.X49))))) + 4*uintptr(postInc2((*uint8)(unsafe.Pointer(&(_pParse.X7))), uint8(1))))) = (*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(_i))).X4
+ if int32(_pParse.XnTempReg) < int32(8) {
+ *elem8((*int32)(unsafe.Pointer(&_pParse.XaTempReg)), uintptr(postInc3(&_pParse.XnTempReg, byte(1)))) = elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(_i)).XiReg
}
_0:
- *(*uint8)(unsafe.Pointer(&(_pParse.X13))) -= 1
- if _i < int32(_pParse.X13) {
- *(*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(_i))) = *(*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(_pParse.X13)))
- }
-}
-
-// Return true if expression pExpr is a vector, or false otherwise.
-//
-// A vector is defined as any expression that results in two or more
-// columns of result. Every TK_VECTOR node is an vector because the
-// parser will not generate a TK_VECTOR with fewer than two entries.
-// But a TK_SELECT might be either a vector or a scalar. It is only
-// considered a vector if it has two or more result columns.
+ _pParse.XnColCache -= 1
+ if _i < int32(_pParse.XnColCache) {
+ *elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(_i)) = *elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(_pParse.XnColCache))
+ }
+}
+
+// C comment
+// /*
+// ** Return true if expression pExpr is a vector, or false otherwise.
+// **
+// ** A vector is defined as any expression that results in two or more
+// ** columns of result. Every TK_VECTOR node is an vector because the
+// ** parser will not generate a TK_VECTOR with fewer than two entries.
+// ** But a TK_SELECT might be either a vector or a scalar. It is only
+// ** considered a vector if it has two or more result columns.
+// */
func _sqlite3ExprIsVector(tls *crt.TLS, _pExpr *XExpr) (r0 int32) {
- return bool2int(_sqlite3ExprVectorSize(tls, _pExpr) > i32(1))
+ return bool2int(_sqlite3ExprVectorSize(tls, _pExpr) > int32(1))
}
-// If the expression passed as the only argument is of type TK_VECTOR
-// return the number of expressions in the vector. Or, if the expression
-// is a sub-select, return the number of columns in the sub-select. For
-// any other type of expression, return 1.
+// C comment
+// /*
+// ** If the expression passed as the only argument is of type TK_VECTOR
+// ** return the number of expressions in the vector. Or, if the expression
+// ** is a sub-select, return the number of columns in the sub-select. For
+// ** any other type of expression, return 1.
+// */
func _sqlite3ExprVectorSize(tls *crt.TLS, _pExpr *XExpr) (r0 int32) {
var _op uint8
- _op = _pExpr.X0
- if int32(_op) == i32(157) {
- _op = _pExpr.X12
- }
- if int32(_op) == i32(158) {
- return (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0
- }
- if int32(_op) == i32(119) {
- return (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0).X0
- }
- return i32(1)
-}
-
-// Expression pExpr is a comparison between two vector values. Compute
-// the result of the comparison (1, 0, or NULL) and write that
-// result into register dest.
-//
-// The caller must satisfy the following preconditions:
-//
-// if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ
-// if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ
-// otherwise: op==pExpr->op and p5==0
+ _op = _pExpr.Xop
+ if int32(_op) == int32(157) {
+ _op = _pExpr.Xop2
+ }
+ if int32(_op) == int32(158) {
+ return (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XnExpr
+ }
+ if int32(_op) == int32(119) {
+ return (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XpEList).XnExpr
+ }
+ return int32(1)
+}
+
+// C comment
+// /*
+// ** Expression pExpr is a comparison between two vector values. Compute
+// ** the result of the comparison (1, 0, or NULL) and write that
+// ** result into register dest.
+// **
+// ** The caller must satisfy the following preconditions:
+// **
+// ** if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ
+// ** if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ
+// ** otherwise: op==pExpr->op and p5==0
+// */
func _codeVectorCompare(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _dest int32, _op uint8, _p5 uint8) {
var _nLeft, _i, _regLeft, _regRight, _addrDone, _2_regFree1, _2_regFree2, _2_r1, _2_r2 int32
var _opx uint8
var _v *TVdbe
var _pLeft, _pRight, _2_pL, _2_pR *XExpr
- _v = (*TVdbe)(_pParse.X2)
- _pLeft = (*XExpr)(_pExpr.X4)
- _pRight = (*XExpr)(_pExpr.X5)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _pLeft = (*XExpr)(_pExpr.XpLeft)
+ _pRight = (*XExpr)(_pExpr.XpRight)
_nLeft = _sqlite3ExprVectorSize(tls, _pLeft)
- _regLeft = i32(0)
- _regRight = i32(0)
+ _regLeft = int32(0)
+ _regRight = int32(0)
_opx = _op
_addrDone = _sqlite3VdbeMakeLabel(tls, _v)
if _nLeft != _sqlite3ExprVectorSize(tls, _pRight) {
- _sqlite3ErrorMsg(tls, _pParse, str(43181))
+ _sqlite3ErrorMsg(tls, _pParse, str(43136))
return
}
func() {
- if int32(_pExpr.X0) != i32(78) && int32(_pExpr.X0) != i32(77) && int32(_pExpr.X0) != i32(72) && int32(_pExpr.X0) != i32(148) && int32(_pExpr.X0) != i32(81) && int32(_pExpr.X0) != i32(79) && int32(_pExpr.X0) != i32(80) && int32(_pExpr.X0) != i32(82) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91429), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000))), unsafe.Pointer(str(44527)))
+ if int32(_pExpr.Xop) != int32(78) && int32(_pExpr.Xop) != int32(77) && int32(_pExpr.Xop) != int32(72) && int32(_pExpr.Xop) != int32(148) && int32(_pExpr.Xop) != int32(81) && int32(_pExpr.Xop) != int32(79) && int32(_pExpr.Xop) != int32(80) && int32(_pExpr.Xop) != int32(82) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91429), unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000), unsafe.Pointer(str(44482)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) != int32(_op) && (int32(_pExpr.X0) != i32(72) || int32(_op) != i32(78)) && (int32(_pExpr.X0) != i32(148) || int32(_op) != i32(77)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91434), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000))), unsafe.Pointer(str(44687)))
+ if int32(_pExpr.Xop) != int32(_op) && (int32(_pExpr.Xop) != int32(72) || int32(_op) != int32(78)) && (int32(_pExpr.Xop) != int32(148) || int32(_op) != int32(77)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91434), unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000), unsafe.Pointer(str(44642)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p5) != i32(0) && int32(_pExpr.X0) == int32(_op) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91436), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000))), unsafe.Pointer(str(44774)))
+ if int32(_p5) != int32(0) && int32(_pExpr.Xop) == int32(_op) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91436), unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000), unsafe.Pointer(str(44729)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p5) != i32(128) && int32(_pExpr.X0) != int32(_op) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91437), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000))), unsafe.Pointer(str(44797)))
+ if int32(_p5) != int32(128) && int32(_pExpr.Xop) != int32(_op) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91437), unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000), unsafe.Pointer(str(44752)))
crt.X__builtin_abort(tls)
}
}()
{
p := &_p5
- *p = uint8(int32(*p) | i32(32))
- sink2(*p)
+ *p = uint8(int32(*p) | int32(32))
}
- if int32(_opx) == i32(80) {
- _opx = uint8(i32(81))
+ if int32(_opx) == int32(80) {
+ _opx = uint8(81)
}
- if int32(_opx) == i32(82) {
- _opx = uint8(i32(79))
+ if int32(_opx) == int32(82) {
+ _opx = uint8(79)
}
_regLeft = _exprCodeSubselect(tls, _pParse, _pLeft)
_regRight = _exprCodeSubselect(tls, _pParse, _pRight)
- _i = i32(0)
+ _i = int32(0)
_24:
- _2_regFree1 = i32(0)
- _2_regFree2 = i32(0)
+ _2_regFree1 = int32(0)
+ _2_regFree2 = int32(0)
func() {
- if _i < i32(0) || _i >= _nLeft {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91450), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000))), unsafe.Pointer(str(44832)))
+ if _i < int32(0) || _i >= _nLeft {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91450), unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000), unsafe.Pointer(str(44787)))
crt.X__builtin_abort(tls)
}
}()
- if _i > i32(0) {
+ if _i > int32(0) {
_sqlite3ExprCachePush(tls, _pParse)
}
_2_r1 = _exprVectorRegister(tls, _pParse, _pLeft, _i, _regLeft, &_2_pL, &_2_regFree1)
@@ -31644,38 +32348,36 @@ _24:
_codeCompare(tls, _pParse, _2_pL, _2_pR, int32(_opx), _2_r1, _2_r2, _dest, int32(_p5))
_sqlite3ReleaseTempReg(tls, _pParse, _2_regFree1)
_sqlite3ReleaseTempReg(tls, _pParse, _2_regFree2)
- if _i > i32(0) {
+ if _i > int32(0) {
_sqlite3ExprCachePop(tls, _pParse)
}
- if _i == (_nLeft - i32(1)) {
+ if _i == (_nLeft - int32(1)) {
goto _27
}
- if int32(_opx) == i32(78) {
- _sqlite3VdbeAddOp2(tls, _v, i32(22), _dest, _addrDone)
+ if int32(_opx) == int32(78) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(22), _dest, _addrDone)
{
p := &_p5
- *p = uint8(int32(*p) | i32(8))
- sink2(*p)
+ *p = uint8(int32(*p) | int32(8))
}
goto _37
}
- if int32(_opx) == i32(77) {
- _sqlite3VdbeAddOp2(tls, _v, i32(21), _dest, _addrDone)
+ if int32(_opx) == int32(77) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(21), _dest, _addrDone)
{
p := &_p5
- *p = uint8(int32(*p) | i32(8))
- sink2(*p)
+ *p = uint8(int32(*p) | int32(8))
}
goto _37
}
func() {
- if int32(_op) != i32(81) && int32(_op) != i32(79) && int32(_op) != i32(80) && int32(_op) != i32(82) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91474), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000))), unsafe.Pointer(str(44848)))
+ if int32(_op) != int32(81) && int32(_op) != int32(79) && int32(_op) != int32(80) && int32(_op) != int32(82) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91474), unsafe.Pointer(&_codeVectorCompareØ00__func__Ø000), unsafe.Pointer(str(44803)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp2(tls, _v, i32(83), i32(0), _addrDone)
- if _i == (_nLeft - i32(2)) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(83), int32(0), _addrDone)
+ if _i == (_nLeft - int32(2)) {
_opx = _op
}
_37:
@@ -31685,61 +32387,67 @@ _27:
_sqlite3VdbeResolveLabel(tls, _v, _addrDone)
}
-// Create a new symbolic label for an instruction that has yet to be
-// coded. The symbolic label is really just a negative number. The
-// label can be used as the P2 value of an operation. Later, when
-// the label is resolved to a specific address, the VDBE will scan
-// through its operation list and change all values of P2 which match
-// the label into the resolved address.
-//
-// The VDBE knows that a P2 value is a label because labels are
-// always negative and P2 values are suppose to be non-negative.
-// Hence, a negative P2 value is a label that has yet to be resolved.
-//
-// Zero is returned if a malloc() fails.
+// C comment
+// /*
+// ** Create a new symbolic label for an instruction that has yet to be
+// ** coded. The symbolic label is really just a negative number. The
+// ** label can be used as the P2 value of an operation. Later, when
+// ** the label is resolved to a specific address, the VDBE will scan
+// ** through its operation list and change all values of P2 which match
+// ** the label into the resolved address.
+// **
+// ** The VDBE knows that a P2 value is a label because labels are
+// ** always negative and P2 values are suppose to be non-negative.
+// ** Hence, a negative P2 value is a label that has yet to be resolved.
+// **
+// ** Zero is returned if a malloc() fails.
+// */
func _sqlite3VdbeMakeLabel(tls *crt.TLS, _v *TVdbe) (r0 int32) {
var _i int32
var _p *XParse
- _p = (*XParse)(_v.X3)
- _i = postInc1((*int32)(unsafe.Pointer(&(_p.X25))), int32(1))
+ _p = (*XParse)(_v.XpParse)
+ _i = postInc2(&_p.XnLabel, 1)
func() {
- if (_v.X5) != uint32(i32(381479589)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71784), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeLabelØ00__func__Ø000))), unsafe.Pointer(str(44897)))
+ if _v.Xmagic != uint32(381479589) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71784), unsafe.Pointer(&_sqlite3VdbeMakeLabelØ00__func__Ø000), unsafe.Pointer(str(44852)))
crt.X__builtin_abort(tls)
}
}()
- if (_i & (_i - i32(1))) == i32(0) {
- *(**int32)(unsafe.Pointer(&(_p.X26))) = (*int32)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_p.X0), (unsafe.Pointer)(_p.X26), uint64(uint32((_i*i32(2))+i32(1))*u32(4))))
+ if (_i & (_i - int32(1))) == int32(0) {
+ _p.XaLabel = (*int32)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_p.XaLabel), uint64(uint32((_i*int32(2))+int32(1))*uint32(4))))
}
- if (_p.X26) != nil {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X26)) + 4*uintptr(_i))) = i32(-1)
+ if _p.XaLabel != nil {
+ *elem8(_p.XaLabel, uintptr(_i)) = int32(-1)
}
- return i32(-1) - _i
+ return int32(-1) - _i
}
var _sqlite3VdbeMakeLabelØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMakeLabelØ00__func__Ø000[0], str(44923), 21)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMakeLabelØ00__func__Ø000[0], str(44878), 21)
}
var _codeVectorCompareØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_codeVectorCompareØ00__func__Ø000[0], str(44944), 18)
+ crt.Xstrncpy(nil, &_codeVectorCompareØ00__func__Ø000[0], str(44899), 18)
}
-// If expression pExpr is of type TK_SELECT, generate code to evaluate
-// it. Return the register in which the result is stored (or, if the
-// sub-select returns more than one column, the first in an array
-// of registers in which the result is stored).
-//
-// If pExpr is not a TK_SELECT expression, return 0.
+// C comment
+// /*
+// ** If expression pExpr is of type TK_SELECT, generate code to evaluate
+// ** it. Return the register in which the result is stored (or, if the
+// ** sub-select returns more than one column, the first in an array
+// ** of registers in which the result is stored).
+// **
+// ** If pExpr is not a TK_SELECT expression, return 0.
+// */
func _exprCodeSubselect(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr) (r0 int32) {
var _reg int32
- _reg = i32(0)
- if int32(_pExpr.X0) == i32(119) {
- _reg = _sqlite3CodeSubselect(tls, _pParse, _pExpr, i32(0), i32(0))
+ _reg = int32(0)
+ if int32(_pExpr.Xop) == int32(119) {
+ _reg = _sqlite3CodeSubselect(tls, _pParse, _pExpr, int32(0), int32(0))
}
return _reg
}
@@ -31755,64 +32463,64 @@ func _sqlite3CodeSubselect(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _rHasNu
var _4_pLeft, _8_p, _12_pE2 *XExpr
var _4_pKeyInfo *XKeyInfo
var _6_dest, _19_dest XSelectDest
- _jmpIfDynamic = i32(-1)
- _rReg = i32(0)
+ _jmpIfDynamic = int32(-1)
+ _rReg = int32(0)
_v = _sqlite3GetVdbe(tls, _pParse)
if func() int32 {
if _v == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93411), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93411), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return i32(0)
+ return int32(0)
}
_sqlite3ExprCachePush(tls, _pParse)
- if ((_pExpr.X2) & uint32(i32(32))) == uint32(i32(0)) {
- _jmpIfDynamic = _sqlite3VdbeAddOp0(tls, _v, i32(20))
+ if (_pExpr.Xflags & uint32(32)) == (0) {
+ _jmpIfDynamic = _sqlite3VdbeAddOp0(tls, _v, int32(20))
}
- if int32(_pParse.X54) == i32(2) {
- _2_zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.X0), str(44962), unsafe.Pointer(func() *int8 {
- if _jmpIfDynamic >= i32(0) {
- return str(0)
+ if int32(_pParse.Xexplain) == int32(2) {
+ _2_zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.Xdb), str(44917), unsafe.Pointer(func() *int8 {
+ if _jmpIfDynamic >= int32(0) {
+ return str(284)
}
- return str(44987)
+ return str(44942)
}()), unsafe.Pointer(func() *int8 {
- if int32(_pExpr.X0) == i32(74) {
- return str(44999)
+ if int32(_pExpr.Xop) == int32(74) {
+ return str(44954)
}
- return str(45004)
- }()), _pParse.X59)
- _sqlite3VdbeAddOp4(tls, _v, i32(165), _pParse.X58, i32(0), i32(0), _2_zMsg, i32(-1))
+ return str(44959)
+ }()), _pParse.XiNextSelectId)
+ _sqlite3VdbeAddOp4(tls, _v, int32(165), _pParse.XiSelectId, int32(0), int32(0), _2_zMsg, int32(-1))
}
- switch int32(_pExpr.X0) {
- case i32(20):
+ switch int32(_pExpr.Xop) {
+ case int32(20):
goto _11
- case i32(74):
+ case int32(74):
goto _10
- case i32(119):
+ case int32(119):
goto _11
default:
goto _11
}
_10:
- _4_pLeft = (*XExpr)(_pExpr.X4)
+ _4_pLeft = (*XExpr)(_pExpr.XpLeft)
_4_pKeyInfo = nil
_4_nVal = _sqlite3ExprVectorSize(tls, _4_pLeft)
func() {
- if _isRowid != 0 && _4_nVal != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93447), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(45011)))
+ if _isRowid != 0 && _4_nVal != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93447), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(44966)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _4_addr = _sqlite3VdbeAddOp2(tls, _v, i32(110), _pExpr.X8, func() int32 {
+ _pExpr.XiTable = postInc2(&_pParse.XnTab, 1)
+ _4_addr = _sqlite3VdbeAddOp2(tls, _v, int32(110), _pExpr.XiTable, func() int32 {
if _isRowid != 0 {
- return i32(0)
+ return int32(0)
}
return _4_nVal
}())
@@ -31820,71 +32528,71 @@ _10:
if _isRowid != 0 {
return nil
}
- return _sqlite3KeyInfoAlloc(tls, (*Xsqlite3)(_pParse.X0), _4_nVal, i32(1))
+ return _sqlite3KeyInfoAlloc(tls, (*Xsqlite3)(_pParse.Xdb), _4_nVal, int32(1))
}()
- if ((_pExpr.X2) & uint32(i32(2048))) == uint32(i32(0)) {
+ if (_pExpr.Xflags & uint32(2048)) == (0) {
goto _21
}
- _5_pSelect = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
- _5_pEList = (*XExprList)(_5_pSelect.X0)
+ _5_pSelect = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
+ _5_pEList = (*XExprList)(_5_pSelect.XpEList)
func() {
if _isRowid != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93476), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(45031)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93476), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(44986)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
- if (_5_pEList.X0) == _4_nVal {
- return i32(1)
+ if _5_pEList.XnExpr == _4_nVal {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93479), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93479), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _26
}
- _sqlite3SelectDestInit(tls, &_6_dest, i32(11), _pExpr.X8)
- *(**int8)(unsafe.Pointer(&(_6_dest.X1))) = _exprINAffinity(tls, _pParse, _pExpr)
- *(*int32)(unsafe.Pointer(&(_5_pSelect.X4))) = i32(0)
+ _sqlite3SelectDestInit(tls, &_6_dest, int32(11), _pExpr.XiTable)
+ _6_dest.XzAffSdst = _exprINAffinity(tls, _pParse, _pExpr)
+ _5_pSelect.XiLimit = int32(0)
if _sqlite3Select(tls, _pParse, _5_pSelect, &_6_dest) != 0 {
- _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_6_dest.X1))
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_6_dest.XzAffSdst))
_sqlite3KeyInfoUnref(tls, _4_pKeyInfo)
- return i32(0)
+ return int32(0)
}
- _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_6_dest.X1))
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_6_dest.XzAffSdst))
func() {
if _4_pKeyInfo == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93493), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(45040)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93493), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(44995)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _5_pEList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93494), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(45052)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93494), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(45007)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_5_pEList.X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93495), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(45062)))
+ if _5_pEList.XnExpr <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93495), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(45017)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3KeyInfoIsWriteable(tls, _4_pKeyInfo) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93496), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(45078)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93496), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(45033)))
crt.X__builtin_abort(tls)
}
}()
- _6_i = i32(0)
+ _6_i = int32(0)
_36:
if _6_i >= _4_nVal {
goto _39
}
_8_p = _sqlite3VectorFieldSubexpr(tls, _4_pLeft, _6_i)
- *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_4_pKeyInfo.X6))))) + 4*uintptr(_6_i))) = _sqlite3BinaryCompareCollSeq(tls, _pParse, _8_p, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_5_pEList.X2)))))+20*uintptr(_6_i))).X0))
+ *elem62((**XCollSeq)(unsafe.Pointer(&_4_pKeyInfo.XaColl)), uintptr(_6_i)) = _sqlite3BinaryCompareCollSeq(tls, _pParse, _8_p, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_5_pEList.Xa)), uintptr(_6_i)).XpExpr))
_6_i += 1
goto _36
_39:
@@ -31892,59 +32600,59 @@ _26:
goto _43
_21:
if func() int32 {
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))) != nil {
- return i32(1)
+ if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))) != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93504), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93504), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _43
}
- _9_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
+ _9_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
_9_affinity = _sqlite3ExprAffinity(tls, _4_pLeft)
if _9_affinity == 0 {
- _9_affinity = int8(i32(65))
+ _9_affinity = int8(65)
}
if _4_pKeyInfo != nil {
func() {
if _sqlite3KeyInfoIsWriteable(tls, _4_pKeyInfo) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93523), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(45078)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93523), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(45033)))
crt.X__builtin_abort(tls)
}
}()
- *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_4_pKeyInfo.X6))))) + 4*uintptr(i32(0)))) = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.X4))
+ *elem62((**XCollSeq)(unsafe.Pointer(&_4_pKeyInfo.XaColl)), 0) = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.XpLeft))
}
_9_r1 = _sqlite3GetTempReg(tls, _pParse)
_9_r2 = _sqlite3GetTempReg(tls, _pParse)
if _isRowid != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _9_r2)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _9_r2)
}
- *func() **TExprList_item { _9_i = _9_pList.X0; return &_9_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_9_pList.X2)))))
+ *func() **TExprList_item { _9_i = _9_pList.XnExpr; return &_9_pItem }() = (*TExprList_item)(unsafe.Pointer(&_9_pList.Xa))
_49:
- if _9_i <= i32(0) {
+ if _9_i <= int32(0) {
goto _52
}
- _12_pE2 = (*XExpr)(_9_pItem.X0)
- if (_jmpIfDynamic >= i32(0)) && (_sqlite3ExprIsConstant(tls, _12_pE2) == 0) {
+ _12_pE2 = (*XExpr)(_9_pItem.XpExpr)
+ if (_jmpIfDynamic >= int32(0)) && (_sqlite3ExprIsConstant(tls, _12_pE2) == 0) {
_sqlite3VdbeChangeToNoop(tls, _v, _jmpIfDynamic)
- _jmpIfDynamic = i32(-1)
+ _jmpIfDynamic = int32(-1)
}
if _isRowid != 0 && _sqlite3ExprIsInteger(tls, _12_pE2, &_12_iValToIns) != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(119), _pExpr.X8, _9_r2, _12_iValToIns)
+ _sqlite3VdbeAddOp3(tls, _v, int32(119), _pExpr.XiTable, _9_r2, _12_iValToIns)
goto _57
}
_9_r3 = _sqlite3ExprCodeTarget(tls, _pParse, _12_pE2, _9_r1)
if _isRowid != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(17), _9_r3, _sqlite3VdbeCurrentAddr(tls, _v)+i32(2))
- _sqlite3VdbeAddOp3(tls, _v, i32(118), _pExpr.X8, _9_r2, _9_r3)
+ _sqlite3VdbeAddOp2(tls, _v, int32(17), _9_r3, _sqlite3VdbeCurrentAddr(tls, _v)+int32(2))
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), _pExpr.XiTable, _9_r2, _9_r3)
goto _59
}
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _9_r3, i32(1), _9_r2, &_9_affinity, i32(1))
- _sqlite3ExprCacheAffinityChange(tls, _pParse, _9_r3, i32(1))
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _pExpr.X8, _9_r2, _9_r3, i32(1))
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _9_r3, int32(1), _9_r2, &_9_affinity, int32(1))
+ _sqlite3ExprCacheAffinityChange(tls, _pParse, _9_r3, int32(1))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _pExpr.XiTable, _9_r2, _9_r3, int32(1))
_59:
_57:
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _9_i -= 1; return &_9_pItem }())) += uintptr(20)
@@ -31954,136 +32662,129 @@ _52:
_sqlite3ReleaseTempReg(tls, _pParse, _9_r2)
_43:
if _4_pKeyInfo != nil {
- _sqlite3VdbeChangeP4(tls, _v, _4_addr, (*int8)((unsafe.Pointer)(_4_pKeyInfo)), i32(-5))
+ _sqlite3VdbeChangeP4(tls, _v, _4_addr, (*int8)(unsafe.Pointer(_4_pKeyInfo)), int32(-5))
}
goto _61
_11:
func() {
- if int32(_pExpr.X0) != i32(20) && int32(_pExpr.X0) != i32(119) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93593), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(45114)))
+ if int32(_pExpr.Xop) != int32(20) && int32(_pExpr.Xop) != int32(119) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93593), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(45069)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_pExpr.X2) & uint32(i32(2048))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93594), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000))), unsafe.Pointer(str(45159)))
+ if (_pExpr.Xflags & uint32(2048)) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93594), unsafe.Pointer(&_sqlite3CodeSubselectØ00__func__Ø000), unsafe.Pointer(str(45114)))
crt.X__builtin_abort(tls)
}
}()
- _19_pSel = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
+ _19_pSel = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
_19_nReg = func() int32 {
- if int32(_pExpr.X0) == i32(119) {
- return ((*XExprList)(_19_pSel.X0).X0)
- }
- return i32(1)
- }()
- _sqlite3SelectDestInit(tls, &_19_dest, i32(0), (_pParse.X18)+i32(1))
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _19_nReg
- sink1(*p)
- }
- if int32(_pExpr.X0) == i32(119) {
- *(*uint8)(unsafe.Pointer(&(_19_dest.X0))) = uint8(i32(10))
- *(*int32)(unsafe.Pointer(&(_19_dest.X3))) = _19_dest.X2
- *(*int32)(unsafe.Pointer(&(_19_dest.X4))) = _19_nReg
- _sqlite3VdbeAddOp3(tls, _v, i32(59), i32(0), _19_dest.X2, ((_19_dest.X2)+_19_nReg)-i32(1))
- _sqlite3VdbeComment(tls, _v, str(45196))
+ if int32(_pExpr.Xop) == int32(119) {
+ return ((*XExprList)(_19_pSel.XpEList).XnExpr)
+ }
+ return int32(1)
+ }()
+ _sqlite3SelectDestInit(tls, &_19_dest, int32(0), _pParse.XnMem+int32(1))
+ _pParse.XnMem += _19_nReg
+ if int32(_pExpr.Xop) == int32(119) {
+ _19_dest.XeDest = uint8(10)
+ _19_dest.XiSdst = _19_dest.XiSDParm
+ _19_dest.XnSdst = _19_nReg
+ _sqlite3VdbeAddOp3(tls, _v, int32(59), int32(0), _19_dest.XiSDParm, (_19_dest.XiSDParm+_19_nReg)-int32(1))
+ _sqlite3VdbeComment(tls, _v, str(45151))
goto _70
}
- *(*uint8)(unsafe.Pointer(&(_19_dest.X0))) = uint8(i32(3))
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _19_dest.X2)
- _sqlite3VdbeComment(tls, _v, str(45217))
+ _19_dest.XeDest = uint8(3)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _19_dest.XiSDParm)
+ _sqlite3VdbeComment(tls, _v, str(45172))
_70:
- _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExpr)(_19_pSel.X15))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_19_pSel.X15))))) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(134), (*XToken)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3IntTokens))+8*uintptr(i32(1)))), i32(0))
- *(*int32)(unsafe.Pointer(&(_19_pSel.X4))) = i32(0)
- {
- p := (*uint32)(unsafe.Pointer(&(_19_pSel.X3)))
- *p = (*p) & uint32(i32(-1025))
- sink5(*p)
- }
+ _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExpr)(_19_pSel.XpLimit))
+ *(**XExpr)(unsafe.Pointer(&_19_pSel.XpLimit)) = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(134), elem56((*XToken)(unsafe.Pointer(&_sqlite3IntTokens)), uintptr(1)), int32(0))
+ _19_pSel.XiLimit = int32(0)
+ _19_pSel.XselFlags &= uint32(4294966271)
if _sqlite3Select(tls, _pParse, _19_pSel, &_19_dest) != 0 {
- return i32(0)
- }
- _rReg = _19_dest.X2
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(131072))
- sink5(*p)
+ return int32(0)
}
+ _rReg = _19_dest.XiSDParm
+ _pExpr.Xflags |= uint32(131072)
goto _61
_61:
if _rHasNullFlag != 0 {
- _sqlite3SetHasNullFlag(tls, _v, _pExpr.X8, _rHasNullFlag)
+ _sqlite3SetHasNullFlag(tls, _v, _pExpr.XiTable, _rHasNullFlag)
}
- if _jmpIfDynamic >= i32(0) {
+ if _jmpIfDynamic >= int32(0) {
_sqlite3VdbeJumpHere(tls, _v, _jmpIfDynamic)
}
_sqlite3ExprCachePop(tls, _pParse)
return _rReg
-
- _ = _6_dest
- _ = _19_dest
- panic(0)
}
var _sqlite3CodeSubselectØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CodeSubselectØ00__func__Ø000[0], str(45236), 21)
+ crt.Xstrncpy(nil, &_sqlite3CodeSubselectØ00__func__Ø000[0], str(45191), 21)
}
-// Remember the current column cache context. Any new entries added
-// added to the column cache after this call are removed when the
-// corresponding pop occurs.
+// C comment
+// /*
+// ** Remember the current column cache context. Any new entries added
+// ** added to the column cache after this call are removed when the
+// ** corresponding pop occurs.
+// */
func _sqlite3ExprCachePush(tls *crt.TLS, _pParse *XParse) {
- *(*int32)(unsafe.Pointer(&(_pParse.X23))) += 1
- if (((*Xsqlite3)(_pParse.X0).X6) & i32(4096)) != 0 {
- crt.Xprintf(tls, str(45257), _pParse.X23)
+ _pParse.XiCacheLevel += 1
+ if (((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(4096)) != 0 {
+ crt.Xprintf(tls, str(45212), _pParse.XiCacheLevel)
}
}
-// Initialize a SelectDest structure.
+// C comment
+// /*
+// ** Initialize a SelectDest structure.
+// */
func _sqlite3SelectDestInit(tls *crt.TLS, _pDest *XSelectDest, _eDest int32, _iParm int32) {
- *(*uint8)(unsafe.Pointer(&(_pDest.X0))) = uint8(_eDest)
- *(*int32)(unsafe.Pointer(&(_pDest.X2))) = _iParm
- *(**int8)(unsafe.Pointer(&(_pDest.X1))) = nil
- *(*int32)(unsafe.Pointer(&(_pDest.X3))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_pDest.X4))) = i32(0)
-}
-
-// Argument pExpr is an (?, ?...) IN(...) expression. This
-// function allocates and returns a nul-terminated string containing
-// the affinities to be used for each column of the comparison.
-//
-// It is the responsibility of the caller to ensure that the returned
-// string is eventually freed using sqlite3DbFree().
+ _pDest.XeDest = uint8(_eDest)
+ _pDest.XiSDParm = _iParm
+ _pDest.XzAffSdst = nil
+ _pDest.XiSdst = int32(0)
+ _pDest.XnSdst = int32(0)
+}
+
+// C comment
+// /*
+// ** Argument pExpr is an (?, ?...) IN(...) expression. This
+// ** function allocates and returns a nul-terminated string containing
+// ** the affinities to be used for each column of the comparison.
+// **
+// ** It is the responsibility of the caller to ensure that the returned
+// ** string is eventually freed using sqlite3DbFree().
+// */
func _exprINAffinity(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr) (r0 *int8) {
var _nVal, _1_i int32
var _2_a int8
var _zRet *int8
var _pSelect *XSelect
var _pLeft, _2_pA *XExpr
- _pLeft = (*XExpr)(_pExpr.X4)
+ _pLeft = (*XExpr)(_pExpr.XpLeft)
_nVal = _sqlite3ExprVectorSize(tls, _pLeft)
_pSelect = func() *XSelect {
- if ((_pExpr.X2) & uint32(i32(2048))) != 0 {
- return (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
+ if (_pExpr.Xflags & uint32(2048)) != 0 {
+ return (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
}
return nil
}()
func() {
- if int32(_pExpr.X0) != i32(74) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93318), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprINAffinityØ00__func__Ø000))), unsafe.Pointer(str(45269)))
+ if int32(_pExpr.Xop) != int32(74) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93318), unsafe.Pointer(&_exprINAffinityØ00__func__Ø000), unsafe.Pointer(str(45224)))
crt.X__builtin_abort(tls)
}
}()
- _zRet = (*int8)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_pParse.X0), uint64(_nVal+i32(1))))
+ _zRet = (*int8)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_pParse.Xdb), uint64(_nVal+int32(1))))
if _zRet == nil {
goto _4
}
- _1_i = i32(0)
+ _1_i = int32(0)
_5:
if _1_i >= _nVal {
goto _8
@@ -32091,15 +32792,15 @@ _5:
_2_pA = _sqlite3VectorFieldSubexpr(tls, _pLeft, _1_i)
_2_a = _sqlite3ExprAffinity(tls, _2_pA)
if _pSelect != nil {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRet)) + 1*uintptr(_1_i))) = _sqlite3CompareAffinity(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSelect.X0).X2)))))+20*uintptr(_1_i))).X0), _2_a)
+ *elem1(_zRet, uintptr(_1_i)) = _sqlite3CompareAffinity(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSelect.XpEList).Xa))), uintptr(_1_i)).XpExpr), _2_a)
goto _10
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRet)) + 1*uintptr(_1_i))) = _2_a
+ *elem1(_zRet, uintptr(_1_i)) = _2_a
_10:
_1_i += 1
goto _5
_8:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRet)) + 1*uintptr(_nVal))) = int8(i32(0))
+ *elem1(_zRet, uintptr(_nVal)) = 0
_4:
return _zRet
}
@@ -32107,26 +32808,29 @@ _4:
var _exprINAffinityØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_exprINAffinityØ00__func__Ø000[0], str(45286), 15)
-}
-
-// Return a pointer to a subexpression of pVector that is the i-th
-// column of the vector (numbered starting with 0). The caller must
-// ensure that i is within range.
-//
-// If pVector is really a scalar (and "scalar" here includes subqueries
-// that return a single column!) then return pVector unmodified.
-//
-// pVector retains ownership of the returned subexpression.
-//
-// If the vector is a (SELECT ...) then the expression returned is
-// just the expression for the i-th term of the result set, and may
-// not be ready for evaluation because the table cursor has not yet
-// been positioned.
+ crt.Xstrncpy(nil, &_exprINAffinityØ00__func__Ø000[0], str(45241), 15)
+}
+
+// C comment
+// /*
+// ** Return a pointer to a subexpression of pVector that is the i-th
+// ** column of the vector (numbered starting with 0). The caller must
+// ** ensure that i is within range.
+// **
+// ** If pVector is really a scalar (and "scalar" here includes subqueries
+// ** that return a single column!) then return pVector unmodified.
+// **
+// ** pVector retains ownership of the returned subexpression.
+// **
+// ** If the vector is a (SELECT ...) then the expression returned is
+// ** just the expression for the i-th term of the result set, and may
+// ** not be ready for evaluation because the table cursor has not yet
+// ** been positioned.
+// */
func _sqlite3VectorFieldSubexpr(tls *crt.TLS, _pVector *XExpr, _i int32) (r0 *XExpr) {
func() {
if _i >= _sqlite3ExprVectorSize(tls, _pVector) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91269), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VectorFieldSubexprØ00__func__Ø000))), unsafe.Pointer(str(45301)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91269), unsafe.Pointer(&_sqlite3VectorFieldSubexprØ00__func__Ø000), unsafe.Pointer(str(45256)))
crt.X__builtin_abort(tls)
}
}()
@@ -32134,15 +32838,15 @@ func _sqlite3VectorFieldSubexpr(tls *crt.TLS, _pVector *XExpr, _i int32) (r0 *XE
goto _2
}
func() {
- if int32(_pVector.X12) != i32(0) && int32(_pVector.X0) != i32(157) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91271), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VectorFieldSubexprØ00__func__Ø000))), unsafe.Pointer(str(45334)))
+ if int32(_pVector.Xop2) != int32(0) && int32(_pVector.Xop) != int32(157) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91271), unsafe.Pointer(&_sqlite3VectorFieldSubexprØ00__func__Ø000), unsafe.Pointer(str(45289)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pVector.X0) == i32(119)) || (int32(_pVector.X12) == i32(119)) {
- return (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pVector.X6)))))).X0).X2))))) + 20*uintptr(_i))).X0)
+ if (int32(_pVector.Xop) == int32(119)) || (int32(_pVector.Xop2) == int32(119)) {
+ return (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pVector.Xx))).XpEList).Xa))), uintptr(_i)).XpExpr)
}
- return (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pVector.X6)))))).X2))))) + 20*uintptr(_i))).X0)
+ return (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pVector.Xx))).Xa))), uintptr(_i)).XpExpr)
_2:
return _pVector
@@ -32151,102 +32855,108 @@ _2:
var _sqlite3VectorFieldSubexprØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VectorFieldSubexprØ00__func__Ø000[0], str(45378), 26)
-}
-
-// Return the 'affinity' of the expression pExpr if any.
-//
-// If pExpr is a column, a reference to a column via an 'AS' alias,
-// or a sub-select with a column as the return value, then the
-// affinity of that column is returned. Otherwise, 0x00 is returned,
-// indicating no affinity for the expression.
-//
-// i.e. the WHERE clause expressions in the following statements all
-// have an affinity:
-//
-// CREATE TABLE t1(a);
-// SELECT * FROM t1 WHERE a;
-// SELECT a AS b FROM t1 WHERE b;
-// SELECT * FROM t1 WHERE (select a from t1);
+ crt.Xstrncpy(nil, &_sqlite3VectorFieldSubexprØ00__func__Ø000[0], str(45333), 26)
+}
+
+// C comment
+// /*
+// ** Return the 'affinity' of the expression pExpr if any.
+// **
+// ** If pExpr is a column, a reference to a column via an 'AS' alias,
+// ** or a sub-select with a column as the return value, then the
+// ** affinity of that column is returned. Otherwise, 0x00 is returned,
+// ** indicating no affinity for the expression.
+// **
+// ** i.e. the WHERE clause expressions in the following statements all
+// ** have an affinity:
+// **
+// ** CREATE TABLE t1(a);
+// ** SELECT * FROM t1 WHERE a;
+// ** SELECT a AS b FROM t1 WHERE b;
+// ** SELECT * FROM t1 WHERE (select a from t1);
+// */
func _sqlite3ExprAffinity(tls *crt.TLS, _pExpr *XExpr) (r0 int8) {
var _op int32
_pExpr = _sqlite3ExprSkipCollate(tls, _pExpr)
- if ((_pExpr.X2) & uint32(i32(512))) != 0 {
- return int8(i32(0))
+ if (_pExpr.Xflags & uint32(512)) != 0 {
+ return 0
}
- _op = int32(_pExpr.X0)
- if _op == i32(119) {
+ _op = int32(_pExpr.Xop)
+ if _op == int32(119) {
func() {
- if ((_pExpr.X2) & uint32(i32(2048))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90949), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAffinityØ00__func__Ø000))), unsafe.Pointer(str(45404)))
+ if (_pExpr.Xflags & uint32(2048)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90949), unsafe.Pointer(&_sqlite3ExprAffinityØ00__func__Ø000), unsafe.Pointer(str(45359)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3ExprAffinity(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0).X2)))))+20*uintptr(i32(0)))).X0))
+ return _sqlite3ExprAffinity(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XpEList).Xa))), 0).XpExpr))
}
- if _op == i32(157) {
- _op = int32(_pExpr.X12)
+ if _op == int32(157) {
+ _op = int32(_pExpr.Xop2)
}
- if _op == i32(37) {
+ if _op == int32(37) {
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90955), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAffinityØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90955), unsafe.Pointer(&_sqlite3ExprAffinityØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3AffinityType(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), nil)
+ return _sqlite3AffinityType(tls, *(**int8)(unsafe.Pointer(&_pExpr.Xu)), nil)
}
- if ((_op == i32(154)) || (_op == i32(152))) && ((*XTable)(_pExpr.X14) != nil) {
- return _sqlite3TableColumnAffinity(tls, (*XTable)(_pExpr.X14), int32(_pExpr.X9))
+ if ((_op == int32(154)) || (_op == int32(152))) && (_pExpr.XpTab != nil) {
+ return _sqlite3TableColumnAffinity(tls, (*XTable)(_pExpr.XpTab), int32(_pExpr.XiColumn))
}
- if _op == i32(159) {
+ if _op == int32(159) {
func() {
- if (((*XExpr)(_pExpr.X4).X2) & uint32(i32(2048))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90963), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAffinityØ00__func__Ø000))), unsafe.Pointer(str(45430)))
+ if (((*XExpr)(_pExpr.XpLeft).Xflags) & uint32(2048)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90963), unsafe.Pointer(&_sqlite3ExprAffinityØ00__func__Ø000), unsafe.Pointer(str(45385)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3ExprAffinity(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)(_pExpr.X4).X6)))))).X0).X2)))))+20*uintptr(_pExpr.X9))).X0))
+ return _sqlite3ExprAffinity(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)(_pExpr.XpLeft).Xx)))).XpEList).Xa))), uintptr(_pExpr.XiColumn)).XpExpr))
}
- return _pExpr.X1
+ return _pExpr.Xaffinity
}
-// Skip over any TK_COLLATE operators and any unlikely()
-// or likelihood() function at the root of an expression.
+// C comment
+// /*
+// ** Skip over any TK_COLLATE operators and any unlikely()
+// ** or likelihood() function at the root of an expression.
+// */
func _sqlite3ExprSkipCollate(tls *crt.TLS, _pExpr *XExpr) (r0 *XExpr) {
_0:
- if _pExpr == nil || ((_pExpr.X2)&uint32(i32(4096))) == uint32(i32(0)) {
+ if _pExpr == nil || (_pExpr.Xflags&uint32(4096)) == (0) {
goto _1
}
- if ((_pExpr.X2) & uint32(i32(262144))) != uint32(i32(0)) {
+ if (_pExpr.Xflags & uint32(262144)) != (0) {
func() {
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91009), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprSkipCollateØ00__func__Ø000))), unsafe.Pointer(str(42778)))
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91009), unsafe.Pointer(&_sqlite3ExprSkipCollateØ00__func__Ø000), unsafe.Pointer(str(42733)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91010), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprSkipCollateØ00__func__Ø000))), unsafe.Pointer(str(45463)))
+ if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XnExpr) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91010), unsafe.Pointer(&_sqlite3ExprSkipCollateØ00__func__Ø000), unsafe.Pointer(str(45418)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) != i32(151) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91011), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprSkipCollateØ00__func__Ø000))), unsafe.Pointer(str(45487)))
+ if int32(_pExpr.Xop) != int32(151) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91011), unsafe.Pointer(&_sqlite3ExprSkipCollateØ00__func__Ø000), unsafe.Pointer(str(45442)))
crt.X__builtin_abort(tls)
}
}()
- _pExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2))))) + 20*uintptr(i32(0)))).X0)
+ _pExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), 0).XpExpr)
goto _10
}
func() {
- if int32(_pExpr.X0) != i32(94) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91014), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprSkipCollateØ00__func__Ø000))), unsafe.Pointer(str(45510)))
+ if int32(_pExpr.Xop) != int32(94) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91014), unsafe.Pointer(&_sqlite3ExprSkipCollateØ00__func__Ø000), unsafe.Pointer(str(45465)))
crt.X__builtin_abort(tls)
}
}()
- _pExpr = (*XExpr)(_pExpr.X4)
+ _pExpr = (*XExpr)(_pExpr.XpLeft)
_10:
goto _0
_1:
@@ -32256,58 +32966,64 @@ _1:
var _sqlite3ExprSkipCollateØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprSkipCollateØ00__func__Ø000[0], str(45532), 23)
+ crt.Xstrncpy(nil, &_sqlite3ExprSkipCollateØ00__func__Ø000[0], str(45487), 23)
}
var _sqlite3ExprAffinityØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprAffinityØ00__func__Ø000[0], str(45555), 20)
+ crt.Xstrncpy(nil, &_sqlite3ExprAffinityØ00__func__Ø000[0], str(45510), 20)
}
-// Return the affinity character for a single column of a table.
+// C comment
+// /*
+// ** Return the affinity character for a single column of a table.
+// */
func _sqlite3TableColumnAffinity(tls *crt.TLS, _pTab *XTable, _iCol int32) (r0 int8) {
func() {
- if _iCol >= int32(_pTab.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90923), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TableColumnAffinityØ00__func__Ø000))), unsafe.Pointer(str(45575)))
+ if _iCol >= int32(_pTab.XnCol) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90923), unsafe.Pointer(&_sqlite3TableColumnAffinityØ00__func__Ø000), unsafe.Pointer(str(45530)))
crt.X__builtin_abort(tls)
}
}()
return int8(func() int32 {
- if _iCol >= i32(0) {
- return int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_iCol))).X4)
+ if _iCol >= int32(0) {
+ return int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_iCol)).Xaffinity)
}
- return i32(68)
+ return int32(68)
}())
}
var _sqlite3TableColumnAffinityØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TableColumnAffinityØ00__func__Ø000[0], str(45591), 27)
+ crt.Xstrncpy(nil, &_sqlite3TableColumnAffinityØ00__func__Ø000[0], str(45546), 27)
}
-// pExpr is an operand of a comparison operator. aff2 is the
-// type affinity of the other operand. This routine returns the
-// type affinity that should be used for the comparison operator.
+// C comment
+// /*
+// ** pExpr is an operand of a comparison operator. aff2 is the
+// ** type affinity of the other operand. This routine returns the
+// ** type affinity that should be used for the comparison operator.
+// */
func _sqlite3CompareAffinity(tls *crt.TLS, _pExpr *XExpr, _aff2 int8) (r0 int8) {
var _aff1 int8
_aff1 = _sqlite3ExprAffinity(tls, _pExpr)
if _aff1 == 0 || _aff2 == 0 {
goto _1
}
- if (int32(_aff1) >= i32(67)) || (int32(_aff2) >= i32(67)) {
- return int8(i32(67))
+ if (int32(_aff1) >= int32(67)) || (int32(_aff2) >= int32(67)) {
+ return int8(67)
}
- return int8(i32(65))
+ return int8(65)
_1:
if (_aff1 == 0) && (_aff2 == 0) {
- return int8(i32(65))
+ return int8(65)
}
func() {
- if int32(_aff1) != i32(0) && int32(_aff2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91112), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CompareAffinityØ00__func__Ø000))), unsafe.Pointer(str(45618)))
+ if int32(_aff1) != int32(0) && int32(_aff2) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91112), unsafe.Pointer(&_sqlite3CompareAffinityØ00__func__Ø000), unsafe.Pointer(str(45573)))
crt.X__builtin_abort(tls)
}
}()
@@ -32317,20 +33033,23 @@ _1:
var _sqlite3CompareAffinityØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CompareAffinityØ00__func__Ø000[0], str(45637), 23)
+ crt.Xstrncpy(nil, &_sqlite3CompareAffinityØ00__func__Ø000[0], str(45592), 23)
}
-// Generate code for the SELECT statement given in the p argument.
-//
-// The results are returned according to the SelectDest structure.
-// See comments in sqliteInt.h for further information.
-//
-// This routine returns the number of errors. If any errors are
-// encountered, then an appropriate error message is left in
-// pParse->zErrMsg.
-//
-// This routine does NOT free the Select structure passed in. The
-// calling function needs to do that.
+// C comment
+// /*
+// ** Generate code for the SELECT statement given in the p argument.
+// **
+// ** The results are returned according to the SelectDest structure.
+// ** See comments in sqliteInt.h for further information.
+// **
+// ** This routine returns the number of errors. If any errors are
+// ** encountered, then an appropriate error message is left in
+// ** pParse->zErrMsg.
+// **
+// ** This routine does NOT free the Select structure passed in. The
+// ** calling function needs to do that.
+// */
func _sqlite3Select(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pDest *XSelectDest) (r0 int32) {
var _i, _j, _isAgg, _rc, _iEnd, _iRestoreSelectId, _6_isAggSub, _18_addrTop, _19_topAddr, _19_onceAddr, _19_retAddr, _40_iAMem, _40_iBMem, _40_iUseFlag, _40_iAbortFlag, _40_groupBySort, _40_addrEnd, _40_sortPTab, _40_sortOut, _40_orderByGrp, _41_k, _49_addr1, _49_addrOutputRow, _49_regOutputRow, _49_addrSetAbort, _49_addrTopOfLoop, _49_addrSortingIdx, _49_addrReset, _49_regReset, _51_regBase, _51_regRecord, _51_nCol, _51_nGroupBy, _55_r1, _64_iDb, _64_iCsr, _64_iRoot int32
var _34_wctrlFlags uint16
@@ -32354,126 +33073,118 @@ func _sqlite3Select(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pDest *XSelectD
var _sSort XSortCtx
var _sDistinct XDistinctCtx
_pEList = nil
- _rc = i32(1)
- _iRestoreSelectId = _pParse.X58
- *(*int32)(unsafe.Pointer(&(_pParse.X58))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X59))), int32(1))
- _db = (*Xsqlite3)(_pParse.X0)
- if ((_p == nil) || ((_db.X17) != 0)) || (_pParse.X16) != 0 {
- return i32(1)
- }
- if _sqlite3AuthCheck(tls, _pParse, i32(21), nil, nil, nil) != 0 {
- return i32(1)
- }
- crt.Xmemset(tls, (unsafe.Pointer)(&_sAggInfo), i32(0), u32(48))
- *(*int32)(unsafe.Pointer(&(_pParse.X35))) += 1
- if (Xsqlite3SelectTrace & i32(1)) != 0 {
+ _rc = int32(1)
+ _iRestoreSelectId = _pParse.XiSelectId
+ _pParse.XiSelectId = postInc2(&_pParse.XiNextSelectId, 1)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if ((_p == nil) || (_db.XmallocFailed != 0)) || _pParse.XnErr != 0 {
+ return int32(1)
+ }
+ if _sqlite3AuthCheck(tls, _pParse, int32(21), nil, nil, nil) != 0 {
+ return int32(1)
+ }
+ crt.Xmemset(tls, unsafe.Pointer(&_sAggInfo), int32(0), uint32(48))
+ _pParse.XnSelectIndent += 1
+ if (Xsqlite3SelectTrace & int32(1)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(45671)
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(45626)
}())
}
- if (Xsqlite3SelectTrace & i32(256)) != 0 {
- _sqlite3TreeViewSelect(tls, nil, _p, uint8(i32(0)))
+ if (Xsqlite3SelectTrace & int32(256)) != 0 {
+ _sqlite3TreeViewSelect(tls, nil, _p, 0)
}
func() {
- if (*XExprList)(_p.X12) != nil && int32(_pDest.X0) == i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121570), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(45690)))
+ if (*XExprList)(_p.XpOrderBy) != nil && int32(_pDest.XeDest) == int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121570), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(45645)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExprList)(_p.X12) != nil && int32(_pDest.X0) == i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121571), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(45735)))
+ if (*XExprList)(_p.XpOrderBy) != nil && int32(_pDest.XeDest) == int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121571), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(45690)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExprList)(_p.X12) != nil && int32(_pDest.X0) == i32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121572), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(45776)))
+ if (*XExprList)(_p.XpOrderBy) != nil && int32(_pDest.XeDest) == int32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121572), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(45731)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExprList)(_p.X12) != nil && int32(_pDest.X0) == i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121573), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(45822)))
+ if (*XExprList)(_p.XpOrderBy) != nil && int32(_pDest.XeDest) == int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121573), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(45777)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pDest.X0) <= i32(8) {
+ if int32(_pDest.XeDest) <= int32(8) {
func() {
- if int32(_pDest.X0) != i32(3) && int32(_pDest.X0) != i32(1) && int32(_pDest.X0) != i32(2) && int32(_pDest.X0) != i32(4) && int32(_pDest.X0) != i32(7) && int32(_pDest.X0) != i32(6) && int32(_pDest.X0) != i32(8) && int32(_pDest.X0) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121575), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(45864)))
+ if int32(_pDest.XeDest) != int32(3) && int32(_pDest.XeDest) != int32(1) && int32(_pDest.XeDest) != int32(2) && int32(_pDest.XeDest) != int32(4) && int32(_pDest.XeDest) != int32(7) && int32(_pDest.XeDest) != int32(6) && int32(_pDest.XeDest) != int32(8) && int32(_pDest.XeDest) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121575), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(45819)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.X12))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = nil
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) & uint32(i32(-2))
- sink5(*p)
- }
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.XpOrderBy))
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = nil
+ _p.XselFlags &= uint32(4294967294)
}
_sqlite3SelectPrep(tls, _pParse, _p, nil)
- crt.Xmemset(tls, (unsafe.Pointer)(&_sSort), i32(0), u32(32))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sSort.X0))))) = (*XExprList)(_p.X12)
- _pTabList = (*XSrcList)(_p.X8)
- if (_pParse.X16) != 0 || ((_db.X17) != 0) {
+ crt.Xmemset(tls, unsafe.Pointer(&_sSort), int32(0), uint32(32))
+ *(**XExprList)(unsafe.Pointer(&_sSort.XpOrderBy)) = (*XExprList)(_p.XpOrderBy)
+ _pTabList = (*XSrcList)(_p.XpSrc)
+ if _pParse.XnErr != 0 || (_db.XmallocFailed != 0) {
goto _select_end
}
func() {
- if (*XExprList)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121592), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46087)))
+ if (*XExprList)(_p.XpEList) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121592), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46042)))
crt.X__builtin_abort(tls)
}
}()
- _isAgg = bool2int(((_p.X3) & uint32(i32(8))) != uint32(i32(0)))
- if (Xsqlite3SelectTrace & i32(256)) == 0 {
+ _isAgg = bool2int((_p.XselFlags & uint32(8)) != (0))
+ if (Xsqlite3SelectTrace & int32(256)) == 0 {
goto _32
}
- if (Xsqlite3SelectTrace & i32(256)) != 0 {
+ if (Xsqlite3SelectTrace & int32(256)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(46100)
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(46055)
}())
}
- _sqlite3TreeViewSelect(tls, nil, _p, uint8(i32(0)))
+ _sqlite3TreeViewSelect(tls, nil, _p, 0)
_32:
- _i = i32(0)
+ _i = int32(0)
_34:
- if (*XSelect)(_p.X13) != nil || _i >= (_pTabList.X0) {
+ if _p.XpPrior != nil || _i >= _pTabList.XnSrc {
goto _38
}
- _6_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(_i)))
- _6_pSub = (*XSelect)(_6_pItem.X5)
- _6_pTab = (*XTable)(_6_pItem.X4)
+ _6_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_i))
+ _6_pSub = (*XSelect)(_6_pItem.XpSelect)
+ _6_pTab = (*XTable)(_6_pItem.XpTab)
if _6_pSub == nil {
goto _35
}
- if int32(_6_pTab.X11) != ((*XExprList)(_6_pSub.X0).X0) {
- _sqlite3ErrorMsg(tls, _pParse, str(46124), int32(_6_pTab.X11), unsafe.Pointer(_6_pTab.X0), (*XExprList)(_6_pSub.X0).X0)
+ if int32(_6_pTab.XnCol) != ((*XExprList)(_6_pSub.XpEList).XnExpr) {
+ _sqlite3ErrorMsg(tls, _pParse, str(46079), int32(_6_pTab.XnCol), unsafe.Pointer(_6_pTab.XzName), (*XExprList)(_6_pSub.XpEList).XnExpr)
goto _select_end
}
- _6_isAggSub = bool2int(((_6_pSub.X3) & uint32(i32(8))) != uint32(i32(0)))
+ _6_isAggSub = bool2int((_6_pSub.XselFlags & uint32(8)) != (0))
if _flattenSubquery(tls, _pParse, _p, _i, _isAgg, _6_isAggSub) == 0 {
goto _41
}
if _6_isAggSub != 0 {
- _isAgg = i32(1)
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) | uint32(i32(8))
- sink5(*p)
- }
+ _isAgg = int32(1)
+ _p.XselFlags |= uint32(8)
}
- _i = i32(-1)
+ _i = int32(-1)
_41:
- _pTabList = (*XSrcList)(_p.X8)
- if (_db.X17) != 0 {
+ _pTabList = (*XSrcList)(_p.XpSrc)
+ if _db.XmallocFailed != 0 {
goto _select_end
}
- if int32(_pDest.X0) > i32(8) {
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sSort.X0))))) = (*XExprList)(_p.X12)
+ if int32(_pDest.XeDest) > int32(8) {
+ *(**XExprList)(unsafe.Pointer(&_sSort.XpOrderBy)) = (*XExprList)(_p.XpOrderBy)
}
_35:
_i += 1
@@ -32483,408 +33194,384 @@ _38:
if _v == nil {
goto _select_end
}
- if (*XSelect)(_p.X13) == nil {
+ if _p.XpPrior == nil {
goto _46
}
_rc = _multiSelect(tls, _pParse, _p, _pDest)
- *(*int32)(unsafe.Pointer(&(_pParse.X58))) = _iRestoreSelectId
- if (Xsqlite3SelectTrace & i32(1)) != 0 {
+ _pParse.XiSelectId = _iRestoreSelectId
+ if (Xsqlite3SelectTrace & int32(1)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(46164)
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(46119)
}())
}
- *(*int32)(unsafe.Pointer(&(_pParse.X35))) -= 1
+ _pParse.XnSelectIndent -= 1
return _rc
_46:
- _i = i32(0)
+ _i = int32(0)
_48:
- if _i >= (_pTabList.X0) {
+ if _i >= _pTabList.XnSrc {
goto _51
}
- _12_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(_i)))
- if (_12_pItem.X14) == uint64(i32(0)) {
- _sqlite3AuthCheck(tls, _pParse, i32(20), _12_pItem.X2, str(0), _12_pItem.X1)
+ _12_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_i))
+ if _12_pItem.XcolUsed == (0) {
+ _sqlite3AuthCheck(tls, _pParse, int32(20), _12_pItem.XzName, str(284), _12_pItem.XzDatabase)
}
- _12_pSub = (*XSelect)(_12_pItem.X5)
+ _12_pSub = (*XSelect)(_12_pItem.XpSelect)
if _12_pSub == nil {
goto _49
}
- if (_12_pItem.X6) == 0 {
+ if _12_pItem.XaddrFillSub == 0 {
goto _54
}
- if int32((uint32(((*t28)(unsafe.Pointer(&(_12_pItem.X9))).X1)>>uint(i32(4)))<<uint(i32(31)))>>uint(i32(31))) == i32(0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _12_pItem.X7, _12_pItem.X6)
+ if int32((uint32((_12_pItem.Xfg.XnotIndexed)>>4)<<31)>>31) == int32(0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _12_pItem.XregReturn, _12_pItem.XaddrFillSub)
}
goto _49
_54:
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X57)))
- *p = (*p) + _sqlite3SelectExprHeight(tls, _p)
- sink1(*p)
- }
- if (int32((*t28)(unsafe.Pointer(&(_12_pItem.X9))).X0)&i32(32)) != i32(0) || _pushDownWhereTerms(tls, _pParse, _12_pSub, (*XExpr)(_p.X9), _12_pItem.X11) == 0 {
+ _pParse.XnHeight += _sqlite3SelectExprHeight(tls, _p)
+ if (int32(_12_pItem.Xfg.Xjointype)&int32(32)) != int32(0) || _pushDownWhereTerms(tls, _pParse, _12_pSub, (*XExpr)(_p.XpWhere), _12_pItem.XiCursor) == 0 {
goto _57
}
- if (Xsqlite3SelectTrace & i32(256)) == 0 {
+ if (Xsqlite3SelectTrace & int32(256)) == 0 {
goto _58
}
- if (Xsqlite3SelectTrace & i32(256)) != 0 {
+ if (Xsqlite3SelectTrace & int32(256)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(46196)
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(46151)
}())
}
- _sqlite3TreeViewSelect(tls, nil, _p, uint8(i32(0)))
+ _sqlite3TreeViewSelect(tls, nil, _p, 0)
_58:
_57:
- if (((_i == i32(0)) && (((_pTabList.X0) == i32(1)) || ((int32((*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(i32(1)))).X9))).X0) & i32(10)) != i32(0)))) && (((_p.X3) & uint32(i32(2))) == uint32(i32(0)))) && ((int32(_db.X13) & i32(256)) == i32(0)) {
- _18_addrTop = _sqlite3VdbeCurrentAddr(tls, _v) + i32(1)
- *(*int32)(unsafe.Pointer(&(_12_pItem.X7))) = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp3(tls, _v, i32(15), _12_pItem.X7, i32(0), _18_addrTop)
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer((*XTable)(_12_pItem.X4).X0))
- *(*int32)(unsafe.Pointer(&(_12_pItem.X6))) = _18_addrTop
- _sqlite3SelectDestInit(tls, &_12_dest, i32(13), _12_pItem.X7)
- *(*uint8)(unsafe.Pointer(&(_12_pItem.X10))) = uint8(_pParse.X59)
+ if (((_i == int32(0)) && ((_pTabList.XnSrc == int32(1)) || ((int32((elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(1)).Xfg).Xjointype) & int32(10)) != int32(0)))) && ((_p.XselFlags & uint32(2)) == (0))) && ((int32(_db.XdbOptFlags) & int32(256)) == int32(0)) {
+ _18_addrTop = _sqlite3VdbeCurrentAddr(tls, _v) + int32(1)
+ _12_pItem.XregReturn = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp3(tls, _v, int32(15), _12_pItem.XregReturn, int32(0), _18_addrTop)
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer((*XTable)(_12_pItem.XpTab).XzName))
+ _12_pItem.XaddrFillSub = _18_addrTop
+ _sqlite3SelectDestInit(tls, &_12_dest, int32(13), _12_pItem.XregReturn)
+ _12_pItem.XiSelectId = uint8(_pParse.XiNextSelectId)
_sqlite3Select(tls, _pParse, _12_pSub, &_12_dest)
- *(*int16)(unsafe.Pointer(&((*XTable)(_12_pItem.X4).X12))) = _12_pSub.X2
- storebits3((*int8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&(_12_pItem.X9))).X1))), int8(i32(1)), 16, 4)
- *(*int32)(unsafe.Pointer(&(_12_pItem.X8))) = _12_dest.X3
- _sqlite3VdbeEndCoroutine(tls, _v, _12_pItem.X7)
- _sqlite3VdbeJumpHere(tls, _v, _18_addrTop-i32(1))
+ (*XTable)(_12_pItem.XpTab).XnRowLogEst = _12_pSub.XnSelectRow
+ storebits5(&(_12_pItem.Xfg.XnotIndexed), int8(1), 16, 4)
+ _12_pItem.XregResult = _12_dest.XiSdst
+ _sqlite3VdbeEndCoroutine(tls, _v, _12_pItem.XregReturn)
+ _sqlite3VdbeJumpHere(tls, _v, _18_addrTop-int32(1))
_sqlite3ClearTempRegCache(tls, _pParse)
goto _65
}
- _19_onceAddr = i32(0)
+ _19_onceAddr = int32(0)
func() {
- if (_12_pItem.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121778), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46227)))
+ if _12_pItem.XaddrFillSub != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121778), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46182)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_12_pItem.X7))) = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _19_topAddr = _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _12_pItem.X7)
- *(*int32)(unsafe.Pointer(&(_12_pItem.X6))) = _19_topAddr + i32(1)
- if int32((uint32(((*t28)(unsafe.Pointer(&(_12_pItem.X9))).X1)>>uint(i32(3)))<<uint(i32(31)))>>uint(i32(31))) == i32(0) {
- _19_onceAddr = _sqlite3VdbeAddOp0(tls, _v, i32(20))
- _sqlite3VdbeComment(tls, _v, str(46249), unsafe.Pointer((*XTable)(_12_pItem.X4).X0))
+ _12_pItem.XregReturn = preInc2(&_pParse.XnMem, 1)
+ _19_topAddr = _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _12_pItem.XregReturn)
+ _12_pItem.XaddrFillSub = _19_topAddr + int32(1)
+ if int32((uint32((_12_pItem.Xfg.XnotIndexed)>>3)<<31)>>31) == int32(0) {
+ _19_onceAddr = _sqlite3VdbeAddOp0(tls, _v, int32(20))
+ _sqlite3VdbeComment(tls, _v, str(46204), unsafe.Pointer((*XTable)(_12_pItem.XpTab).XzName))
goto _69
}
- _sqlite3VdbeNoopComment(tls, _v, str(46249), unsafe.Pointer((*XTable)(_12_pItem.X4).X0))
+ _sqlite3VdbeNoopComment(tls, _v, str(46204), unsafe.Pointer((*XTable)(_12_pItem.XpTab).XzName))
_69:
_19_pPrior = _isSelfJoinView(tls, _pTabList, _12_pItem)
if _19_pPrior != nil {
- _sqlite3VdbeAddOp2(tls, _v, i32(108), _12_pItem.X11, _19_pPrior.X11)
+ _sqlite3VdbeAddOp2(tls, _v, int32(108), _12_pItem.XiCursor, _19_pPrior.XiCursor)
goto _71
}
- _sqlite3SelectDestInit(tls, &_12_dest, i32(12), _12_pItem.X11)
- *(*uint8)(unsafe.Pointer(&(_12_pItem.X10))) = uint8(_pParse.X59)
+ _sqlite3SelectDestInit(tls, &_12_dest, int32(12), _12_pItem.XiCursor)
+ _12_pItem.XiSelectId = uint8(_pParse.XiNextSelectId)
_sqlite3Select(tls, _pParse, _12_pSub, &_12_dest)
_71:
- *(*int16)(unsafe.Pointer(&((*XTable)(_12_pItem.X4).X12))) = _12_pSub.X2
+ (*XTable)(_12_pItem.XpTab).XnRowLogEst = _12_pSub.XnSelectRow
if _19_onceAddr != 0 {
_sqlite3VdbeJumpHere(tls, _v, _19_onceAddr)
}
- _19_retAddr = _sqlite3VdbeAddOp1(tls, _v, i32(52), _12_pItem.X7)
- _sqlite3VdbeComment(tls, _v, str(46266), unsafe.Pointer((*XTable)(_12_pItem.X4).X0))
+ _19_retAddr = _sqlite3VdbeAddOp1(tls, _v, int32(52), _12_pItem.XregReturn)
+ _sqlite3VdbeComment(tls, _v, str(46221), unsafe.Pointer((*XTable)(_12_pItem.XpTab).XzName))
_sqlite3VdbeChangeP1(tls, _v, uint32(_19_topAddr), _19_retAddr)
_sqlite3ClearTempRegCache(tls, _pParse)
_65:
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
goto _select_end
}
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X57)))
- *p = (*p) - _sqlite3SelectExprHeight(tls, _p)
- sink1(*p)
- }
+ _pParse.XnHeight -= _sqlite3SelectExprHeight(tls, _p)
_49:
_i += 1
goto _48
_51:
- _pEList = (*XExprList)(_p.X0)
- _pWhere = (*XExpr)(_p.X9)
- _pGroupBy = (*XExprList)(_p.X10)
- _pHaving = (*XExpr)(_p.X11)
- *(*uint8)(unsafe.Pointer(&(_sDistinct.X0))) = uint8(bool2int(((_p.X3) & uint32(i32(1))) != uint32(i32(0))))
- if (Xsqlite3SelectTrace & i32(1024)) == 0 {
+ _pEList = (*XExprList)(_p.XpEList)
+ _pWhere = (*XExpr)(_p.XpWhere)
+ _pGroupBy = (*XExprList)(_p.XpGroupBy)
+ _pHaving = (*XExpr)(_p.XpHaving)
+ _sDistinct.XisTnct = uint8(bool2int((_p.XselFlags & uint32(1)) != (0)))
+ if (Xsqlite3SelectTrace & int32(1024)) == 0 {
goto _74
}
- if (Xsqlite3SelectTrace & i32(1024)) != 0 {
+ if (Xsqlite3SelectTrace & int32(1024)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(46273)
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(46228)
}())
}
- _sqlite3TreeViewSelect(tls, nil, _p, uint8(i32(0)))
+ _sqlite3TreeViewSelect(tls, nil, _p, 0)
_74:
- if ((_p.X3)&uint32(i32(9))) != uint32(i32(1)) || _sqlite3ExprListCompare(tls, (*XExprList)(_sSort.X0), _pEList, i32(-1)) != i32(0) {
+ if (_p.XselFlags&uint32(9)) != uint32(1) || _sqlite3ExprListCompare(tls, (*XExprList)(_sSort.XpOrderBy), _pEList, int32(-1)) != int32(0) {
goto _77
}
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) & uint32(i32(-2))
- sink5(*p)
- }
- _pGroupBy = store42((**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X10))))), _sqlite3ExprListDup(tls, _db, _pEList, i32(0)))
+ _p.XselFlags &= uint32(4294967294)
+ _pGroupBy = store70((**XExprList)(unsafe.Pointer(&_p.XpGroupBy)), _sqlite3ExprListDup(tls, _db, _pEList, int32(0)))
func() {
- if (_sDistinct.X0) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121849), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46306)))
+ if _sDistinct.XisTnct == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121849), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46261)))
crt.X__builtin_abort(tls)
}
}()
- if (Xsqlite3SelectTrace & i32(1024)) == 0 {
+ if (Xsqlite3SelectTrace & int32(1024)) == 0 {
goto _80
}
- if (Xsqlite3SelectTrace & i32(1024)) != 0 {
+ if (Xsqlite3SelectTrace & int32(1024)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(46323)
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(46278)
}())
}
- _sqlite3TreeViewSelect(tls, nil, _p, uint8(i32(0)))
+ _sqlite3TreeViewSelect(tls, nil, _p, 0)
_80:
_77:
- if (*XExprList)(_sSort.X0) != nil {
- _27_pKeyInfo = _keyInfoFromExprList(tls, _pParse, (*XExprList)(_sSort.X0), i32(0), _pEList.X0)
- *(*int32)(unsafe.Pointer(&(_sSort.X2))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- *(*int32)(unsafe.Pointer(&(_sSort.X5))) = _sqlite3VdbeAddOp4(tls, _v, i32(110), _sSort.X2, (((*XExprList)(_sSort.X0).X0)+i32(1))+(_pEList.X0), i32(0), (*int8)(unsafe.Pointer(_27_pKeyInfo)), i32(-5))
+ if _sSort.XpOrderBy != nil {
+ _27_pKeyInfo = _keyInfoFromExprList(tls, _pParse, (*XExprList)(_sSort.XpOrderBy), int32(0), _pEList.XnExpr)
+ _sSort.XiECursor = postInc2(&_pParse.XnTab, 1)
+ _sSort.XaddrSortIndex = _sqlite3VdbeAddOp4(tls, _v, int32(110), _sSort.XiECursor, (((*XExprList)(_sSort.XpOrderBy).XnExpr)+int32(1))+_pEList.XnExpr, int32(0), (*int8)(unsafe.Pointer(_27_pKeyInfo)), int32(-5))
goto _83
}
- *(*int32)(unsafe.Pointer(&(_sSort.X5))) = i32(-1)
+ _sSort.XaddrSortIndex = int32(-1)
_83:
- if int32(_pDest.X0) == i32(12) {
- _sqlite3VdbeAddOp2(tls, _v, i32(110), _pDest.X2, _pEList.X0)
+ if int32(_pDest.XeDest) == int32(12) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(110), _pDest.XiSDParm, _pEList.XnExpr)
}
_iEnd = _sqlite3VdbeMakeLabel(tls, _v)
- if ((_p.X3) & uint32(i32(16384))) == uint32(i32(0)) {
- *(*int16)(unsafe.Pointer(&(_p.X2))) = int16(i32(320))
+ if (_p.XselFlags & uint32(16384)) == (0) {
+ _p.XnSelectRow = int16(320)
}
_computeLimitRegisters(tls, _pParse, _p, _iEnd)
- if ((_p.X4) == i32(0)) && ((_sSort.X5) >= i32(0)) {
- _sqlite3VdbeChangeOpcode(tls, _v, uint32(_sSort.X5), uint8(i32(111)))
+ if (_p.XiLimit == int32(0)) && (_sSort.XaddrSortIndex >= int32(0)) {
+ _sqlite3VdbeChangeOpcode(tls, _v, uint32(_sSort.XaddrSortIndex), uint8(111))
{
- p := (*uint8)(unsafe.Pointer(&(_sSort.X7)))
- *p = uint8(int32(*p) | i32(1))
- sink2(*p)
+ p := &_sSort.XsortFlags
+ *p = uint8(int32(*p) | int32(1))
}
}
- if ((_p.X3) & uint32(i32(1))) != 0 {
- *(*int32)(unsafe.Pointer(&(_sDistinct.X2))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- *(*int32)(unsafe.Pointer(&(_sDistinct.X3))) = _sqlite3VdbeAddOp4(tls, _v, i32(110), _sDistinct.X2, i32(0), i32(0), (*int8)(unsafe.Pointer(_keyInfoFromExprList(tls, _pParse, (*XExprList)(_p.X0), i32(0), i32(0)))), i32(-5))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(8)))
- *(*uint8)(unsafe.Pointer(&(_sDistinct.X1))) = uint8(i32(3))
+ if (_p.XselFlags & uint32(1)) != 0 {
+ _sDistinct.XtabTnct = postInc2(&_pParse.XnTab, 1)
+ _sDistinct.XaddrTnct = _sqlite3VdbeAddOp4(tls, _v, int32(110), _sDistinct.XtabTnct, int32(0), int32(0), (*int8)(unsafe.Pointer(_keyInfoFromExprList(tls, _pParse, (*XExprList)(_p.XpEList), int32(0), int32(0)))), int32(-5))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(8))
+ _sDistinct.XeTnctType = uint8(3)
goto _89
}
- *(*uint8)(unsafe.Pointer(&(_sDistinct.X1))) = uint8(i32(0))
+ _sDistinct.XeTnctType = 0
_89:
if _isAgg != 0 || _pGroupBy != nil {
goto _91
}
_34_wctrlFlags = uint16(func() int32 {
- if (_sDistinct.X0) != 0 {
- return i32(256)
+ if _sDistinct.XisTnct != 0 {
+ return int32(256)
}
- return i32(0)
+ return int32(0)
}())
- i32(0)
+
{
p := &_34_wctrlFlags
- *p = uint16(uint32(*p) | ((_p.X3) & uint32(i32(16384))))
- sink14(*p)
+ *p = uint16(uint32(*p) | (_p.XselFlags & uint32(16384)))
}
- _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pTabList, _pWhere, (*XExprList)(_sSort.X0), (*XExprList)(_p.X0), _34_wctrlFlags, int32(_p.X2))
+ _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pTabList, _pWhere, (*XExprList)(_sSort.XpOrderBy), (*XExprList)(_p.XpEList), _34_wctrlFlags, int32(_p.XnSelectRow))
if _pWInfo == nil {
goto _select_end
}
- if int32(_sqlite3WhereOutputRowCount(tls, _pWInfo)) < int32(_p.X2) {
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _sqlite3WhereOutputRowCount(tls, _pWInfo)
+ if int32(_sqlite3WhereOutputRowCount(tls, _pWInfo)) < int32(_p.XnSelectRow) {
+ _p.XnSelectRow = _sqlite3WhereOutputRowCount(tls, _pWInfo)
}
- if ((_sDistinct.X0) != 0) && _sqlite3WhereIsDistinct(tls, _pWInfo) != 0 {
- *(*uint8)(unsafe.Pointer(&(_sDistinct.X1))) = uint8(_sqlite3WhereIsDistinct(tls, _pWInfo))
+ if (_sDistinct.XisTnct != 0) && _sqlite3WhereIsDistinct(tls, _pWInfo) != 0 {
+ _sDistinct.XeTnctType = uint8(_sqlite3WhereIsDistinct(tls, _pWInfo))
}
- if (*XExprList)(_sSort.X0) == nil {
+ if _sSort.XpOrderBy == nil {
goto _98
}
- *(*int32)(unsafe.Pointer(&(_sSort.X1))) = _sqlite3WhereIsOrdered(tls, _pWInfo)
- *(*uint8)(unsafe.Pointer(&(_sSort.X8))) = uint8(_sqlite3WhereOrderedInnerLoop(tls, _pWInfo))
- if (_sSort.X1) == ((*XExprList)(_sSort.X0).X0) {
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sSort.X0))))) = nil
+ _sSort.XnOBSat = _sqlite3WhereIsOrdered(tls, _pWInfo)
+ _sSort.XbOrderedInnerLoop = uint8(_sqlite3WhereOrderedInnerLoop(tls, _pWInfo))
+ if _sSort.XnOBSat == ((*XExprList)(_sSort.XpOrderBy).XnExpr) {
+ *(**XExprList)(unsafe.Pointer(&_sSort.XpOrderBy)) = nil
}
_98:
- if ((_sSort.X5) >= i32(0)) && ((*XExprList)(_sSort.X0) == nil) {
- _sqlite3VdbeChangeToNoop(tls, _v, _sSort.X5)
+ if (_sSort.XaddrSortIndex >= int32(0)) && ((*XExprList)(_sSort.XpOrderBy) == nil) {
+ _sqlite3VdbeChangeToNoop(tls, _v, _sSort.XaddrSortIndex)
}
- _selectInnerLoop(tls, _pParse, _p, _pEList, i32(-1), &_sSort, &_sDistinct, _pDest, _sqlite3WhereContinueLabel(tls, _pWInfo), _sqlite3WhereBreakLabel(tls, _pWInfo))
+ _selectInnerLoop(tls, _pParse, _p, _pEList, int32(-1), &_sSort, &_sDistinct, _pDest, _sqlite3WhereContinueLabel(tls, _pWInfo), _sqlite3WhereBreakLabel(tls, _pWInfo))
_sqlite3WhereEnd(tls, _pWInfo)
goto _102
_91:
- _40_sortPTab = i32(0)
- _40_sortOut = i32(0)
- _40_orderByGrp = i32(0)
+ _40_sortPTab = int32(0)
+ _40_sortOut = int32(0)
+ _40_orderByGrp = int32(0)
if _pGroupBy == nil {
goto _103
}
- *func() **TExprList_item { _41_k = (*XExprList)(_p.X0).X0; return &_41_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.X0).X2)))))
+ *func() **TExprList_item { _41_k = (*XExprList)(_p.XpEList).XnExpr; return &_41_pItem }() = (*TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.XpEList).Xa)))
_104:
- if _41_k <= i32(0) {
+ if _41_k <= int32(0) {
goto _107
}
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_41_pItem.X5))))).X1))) = uint16(i32(0))
+ (*t71)(unsafe.Pointer(&_41_pItem.Xu)).XiAlias = 0
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _41_k -= 1; return &_41_pItem }())) += uintptr(20)
goto _104
_107:
- *func() **TExprList_item { _41_k = _pGroupBy.X0; return &_41_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pGroupBy.X2)))))
+ *func() **TExprList_item { _41_k = _pGroupBy.XnExpr; return &_41_pItem }() = (*TExprList_item)(unsafe.Pointer(&_pGroupBy.Xa))
_108:
- if _41_k <= i32(0) {
+ if _41_k <= int32(0) {
goto _111
}
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_41_pItem.X5))))).X1))) = uint16(i32(0))
+ (*t71)(unsafe.Pointer(&_41_pItem.Xu)).XiAlias = 0
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _41_k -= 1; return &_41_pItem }())) += uintptr(20)
goto _108
_111:
func() {
- if i32(66) != int32(_sqlite3LogEst(tls, uint64(i32(100)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121981), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46358)))
+ if int32(66) != int32(_sqlite3LogEst(tls, uint64(100))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121981), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46313)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_p.X2) > i32(66) {
- *(*int16)(unsafe.Pointer(&(_p.X2))) = int16(i32(66))
+ if int32(_p.XnSelectRow) > int32(66) {
+ _p.XnSelectRow = int16(66)
}
goto _115
_103:
func() {
- if i32(0) != int32(_sqlite3LogEst(tls, uint64(i32(1)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121984), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46381)))
+ if int32(0) != int32(_sqlite3LogEst(tls, uint64(1))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121984), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46336)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_p.X2))) = int16(i32(0))
+ _p.XnSelectRow = 0
_115:
- if _sqlite3ExprListCompare(tls, _pGroupBy, (*XExprList)(_sSort.X0), i32(-1)) == i32(0) {
- _40_orderByGrp = i32(1)
+ if _sqlite3ExprListCompare(tls, _pGroupBy, (*XExprList)(_sSort.XpOrderBy), int32(-1)) == int32(0) {
+ _40_orderByGrp = int32(1)
}
_40_addrEnd = _sqlite3VdbeMakeLabel(tls, _v)
- crt.Xmemset(tls, (unsafe.Pointer)(&_40_sNC), i32(0), u32(32))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_40_sNC.X0))))) = _pParse
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_40_sNC.X1))))) = _pTabList
- *(**XAggInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_40_sNC.X3))))) = &_sAggInfo
- *(*int32)(unsafe.Pointer(&(_sAggInfo.X5))) = (_pParse.X18) + i32(1)
- *(*int32)(unsafe.Pointer(&(_sAggInfo.X4))) = func() int32 {
+ crt.Xmemset(tls, unsafe.Pointer(&_40_sNC), int32(0), uint32(32))
+ *(**XParse)(unsafe.Pointer(&_40_sNC.XpParse)) = _pParse
+ *(**XSrcList)(unsafe.Pointer(&_40_sNC.XpSrcList)) = _pTabList
+ *(**XAggInfo)(unsafe.Pointer(&_40_sNC.XpAggInfo)) = &_sAggInfo
+ _sAggInfo.XmnReg = _pParse.XnMem + int32(1)
+ _sAggInfo.XnSortingColumn = func() int32 {
if _pGroupBy != nil {
- return (_pGroupBy.X0)
+ return _pGroupBy.XnExpr
}
- return i32(0)
+ return int32(0)
}()
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sAggInfo.X7))))) = _pGroupBy
+ *(**XExprList)(unsafe.Pointer(&_sAggInfo.XpGroupBy)) = _pGroupBy
_sqlite3ExprAnalyzeAggList(tls, &_40_sNC, _pEList)
- _sqlite3ExprAnalyzeAggList(tls, &_40_sNC, (*XExprList)(_sSort.X0))
+ _sqlite3ExprAnalyzeAggList(tls, &_40_sNC, (*XExprList)(_sSort.XpOrderBy))
if _pHaving == nil {
goto _121
}
if _pGroupBy != nil {
func() {
- if _pWhere != (*XExpr)(_p.X9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122018), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46401)))
+ if _pWhere != (*XExpr)(_p.XpWhere) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122018), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46356)))
crt.X__builtin_abort(tls)
}
}()
- _havingToWhere(tls, _pParse, _pGroupBy, _pHaving, (**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))))
- _pWhere = (*XExpr)(_p.X9)
+ _havingToWhere(tls, _pParse, _pGroupBy, _pHaving, (**XExpr)(unsafe.Pointer(&_p.XpWhere)))
+ _pWhere = (*XExpr)(_p.XpWhere)
}
_sqlite3ExprAnalyzeAggregates(tls, &_40_sNC, _pHaving)
_121:
- *(*int32)(unsafe.Pointer(&(_sAggInfo.X10))) = _sAggInfo.X9
- _i = i32(0)
+ _sAggInfo.XnAccumulator = _sAggInfo.XnColumn
+ _i = int32(0)
_125:
- if _i >= (_sAggInfo.X12) {
+ if _i >= _sAggInfo.XnFunc {
goto _128
}
func() {
- if (((*XExpr)((*TAggInfo_func)(unsafe.Pointer(uintptr(_sAggInfo.X11) + 16*uintptr(_i))).X0).X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122026), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46419)))
+ if (((*XExpr)(elem67((*TAggInfo_func)(_sAggInfo.XaFunc), uintptr(_i)).XpExpr).Xflags) & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122026), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46374)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&(_40_sNC.X7)))
- *p = uint16(int32(*p) | i32(8))
- sink14(*p)
+ p := &_40_sNC.XncFlags
+ *p = uint16(int32(*p) | int32(8))
}
- _sqlite3ExprAnalyzeAggList(tls, &_40_sNC, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)((*TAggInfo_func)(unsafe.Pointer(uintptr(_sAggInfo.X11) + 16*uintptr(_i))).X0).X6)))))))
+ _sqlite3ExprAnalyzeAggList(tls, &_40_sNC, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)(elem67((*TAggInfo_func)(_sAggInfo.XaFunc), uintptr(_i)).XpExpr).Xx)))))
{
- p := (*uint16)(unsafe.Pointer(&(_40_sNC.X7)))
- *p = uint16(int32(*p) & i32(-9))
- sink14(*p)
+ p := &_40_sNC.XncFlags
+ *p = uint16(int32(*p) & int32(-9))
}
_i += 1
goto _125
_128:
- *(*int32)(unsafe.Pointer(&(_sAggInfo.X6))) = _pParse.X18
- if (_db.X17) != 0 {
+ _sAggInfo.XmxReg = _pParse.XnMem
+ if _db.XmallocFailed != 0 {
goto _select_end
}
if _pGroupBy == nil {
goto _132
}
- *(*int32)(unsafe.Pointer(&(_sAggInfo.X2))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _49_pKeyInfo = _keyInfoFromExprList(tls, _pParse, _pGroupBy, i32(0), _sAggInfo.X9)
- _49_addrSortingIdx = _sqlite3VdbeAddOp4(tls, _v, i32(111), _sAggInfo.X2, _sAggInfo.X4, i32(0), (*int8)(unsafe.Pointer(_49_pKeyInfo)), i32(-5))
- _40_iUseFlag = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _40_iAbortFlag = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _49_regOutputRow = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ _sAggInfo.XsortingIdx = postInc2(&_pParse.XnTab, 1)
+ _49_pKeyInfo = _keyInfoFromExprList(tls, _pParse, _pGroupBy, int32(0), _sAggInfo.XnColumn)
+ _49_addrSortingIdx = _sqlite3VdbeAddOp4(tls, _v, int32(111), _sAggInfo.XsortingIdx, _sAggInfo.XnSortingColumn, int32(0), (*int8)(unsafe.Pointer(_49_pKeyInfo)), int32(-5))
+ _40_iUseFlag = preInc2(&_pParse.XnMem, 1)
+ _40_iAbortFlag = preInc2(&_pParse.XnMem, 1)
+ _49_regOutputRow = preInc2(&_pParse.XnMem, 1)
_49_addrOutputRow = _sqlite3VdbeMakeLabel(tls, _v)
- _49_regReset = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ _49_regReset = preInc2(&_pParse.XnMem, 1)
_49_addrReset = _sqlite3VdbeMakeLabel(tls, _v)
- _40_iAMem = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + (_pGroupBy.X0)
- sink1(*p)
- }
- _40_iBMem = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + (_pGroupBy.X0)
- sink1(*p)
- }
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _40_iAbortFlag)
- _sqlite3VdbeComment(tls, _v, str(46475))
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _40_iUseFlag)
- _sqlite3VdbeComment(tls, _v, str(46492))
- _sqlite3VdbeAddOp3(tls, _v, i32(59), i32(0), _40_iAMem, (_40_iAMem+(_pGroupBy.X0))-i32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _49_regReset, _49_addrReset)
- _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pTabList, _pWhere, _pGroupBy, nil, uint16(i32(64)|func() int32 {
+ _40_iAMem = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _pGroupBy.XnExpr
+ _40_iBMem = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _pGroupBy.XnExpr
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _40_iAbortFlag)
+ _sqlite3VdbeComment(tls, _v, str(46430))
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _40_iUseFlag)
+ _sqlite3VdbeComment(tls, _v, str(46447))
+ _sqlite3VdbeAddOp3(tls, _v, int32(59), int32(0), _40_iAMem, (_40_iAMem+_pGroupBy.XnExpr)-int32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _49_regReset, _49_addrReset)
+ _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pTabList, _pWhere, _pGroupBy, nil, uint16(int32(64)|func() int32 {
if _40_orderByGrp != 0 {
- return i32(512)
+ return int32(512)
}
- return i32(0)
- }()), i32(0))
+ return int32(0)
+ }()), int32(0))
if _pWInfo == nil {
goto _select_end
}
- if _sqlite3WhereIsOrdered(tls, _pWInfo) == (_pGroupBy.X0) {
- _40_groupBySort = i32(0)
+ if _sqlite3WhereIsOrdered(tls, _pWInfo) == _pGroupBy.XnExpr {
+ _40_groupBySort = int32(0)
goto _137
}
_explainTempTable(tls, _pParse, func() *int8 {
- if ((_sDistinct.X0) != 0) && (((_p.X3) & uint32(i32(1))) == uint32(i32(0))) {
- return str(25716)
+ if (_sDistinct.XisTnct != 0) && ((_p.XselFlags & uint32(1)) == (0)) {
+ return str(25671)
}
- return str(46519)
+ return str(46474)
}())
- _40_groupBySort = i32(1)
- _51_nGroupBy = _pGroupBy.X0
+ _40_groupBySort = int32(1)
+ _51_nGroupBy = _pGroupBy.XnExpr
_51_nCol = _51_nGroupBy
_j = _51_nGroupBy
- _i = i32(0)
+ _i = int32(0)
_141:
- if _i >= (_sAggInfo.X9) {
+ if _i >= _sAggInfo.XnColumn {
goto _144
}
- if ((*TAggInfo_col)(unsafe.Pointer(uintptr(_sAggInfo.X8) + 24*uintptr(_i))).X3) >= _j {
+ if (elem66((*TAggInfo_col)(_sAggInfo.XaCol), uintptr(_i)).XiSorterColumn) >= _j {
_51_nCol += 1
_j += 1
}
@@ -32893,413 +33580,413 @@ _141:
_144:
_51_regBase = _sqlite3GetTempRange(tls, _pParse, _51_nCol)
_sqlite3ExprCacheClear(tls, _pParse)
- _sqlite3ExprCodeExprList(tls, _pParse, _pGroupBy, _51_regBase, i32(0), uint8(i32(0)))
+ _sqlite3ExprCodeExprList(tls, _pParse, _pGroupBy, _51_regBase, int32(0), 0)
_j = _51_nGroupBy
- _i = i32(0)
+ _i = int32(0)
_146:
- if _i >= (_sAggInfo.X9) {
+ if _i >= _sAggInfo.XnColumn {
goto _149
}
- _54_pCol = (*TAggInfo_col)(unsafe.Pointer(uintptr(_sAggInfo.X8) + 24*uintptr(_i)))
- if (_54_pCol.X3) >= _j {
+ _54_pCol = elem66((*TAggInfo_col)(_sAggInfo.XaCol), uintptr(_i))
+ if _54_pCol.XiSorterColumn >= _j {
_55_r1 = _j + _51_regBase
- _sqlite3ExprCodeGetColumnToReg(tls, _pParse, (*XTable)(_54_pCol.X0), _54_pCol.X2, _54_pCol.X1, _55_r1)
+ _sqlite3ExprCodeGetColumnToReg(tls, _pParse, (*XTable)(_54_pCol.XpTab), _54_pCol.XiColumn, _54_pCol.XiTable, _55_r1)
_j += 1
}
_i += 1
goto _146
_149:
_51_regRecord = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _51_regBase, _51_nCol, _51_regRecord)
- _sqlite3VdbeAddOp2(tls, _v, i32(127), _sAggInfo.X2, _51_regRecord)
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _51_regBase, _51_nCol, _51_regRecord)
+ _sqlite3VdbeAddOp2(tls, _v, int32(127), _sAggInfo.XsortingIdx, _51_regRecord)
_sqlite3ReleaseTempReg(tls, _pParse, _51_regRecord)
_sqlite3ReleaseTempRange(tls, _pParse, _51_regBase, _51_nCol)
_sqlite3WhereEnd(tls, _pWInfo)
- *(*int32)(unsafe.Pointer(&(_sAggInfo.X3))) = store1(&_40_sortPTab, postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1)))
+ _sAggInfo.XsortingIdxPTab = store2(&_40_sortPTab, postInc2(&_pParse.XnTab, 1))
_40_sortOut = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp3(tls, _v, i32(113), _40_sortPTab, _40_sortOut, _51_nCol)
- _sqlite3VdbeAddOp2(tls, _v, i32(35), _sAggInfo.X2, _40_addrEnd)
- _sqlite3VdbeComment(tls, _v, str(46528))
- *(*uint8)(unsafe.Pointer(&(_sAggInfo.X1))) = uint8(i32(1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(113), _40_sortPTab, _40_sortOut, _51_nCol)
+ _sqlite3VdbeAddOp2(tls, _v, int32(35), _sAggInfo.XsortingIdx, _40_addrEnd)
+ _sqlite3VdbeComment(tls, _v, str(46483))
+ _sAggInfo.XuseSortingIdx = uint8(1)
_sqlite3ExprCacheClear(tls, _pParse)
_137:
- if (_40_orderByGrp != 0 && ((int32(_db.X13) & i32(4)) == i32(0))) && (_40_groupBySort != 0 || _sqlite3WhereIsSorted(tls, _pWInfo) != 0) {
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sSort.X0))))) = nil
- _sqlite3VdbeChangeToNoop(tls, _v, _sSort.X5)
+ if (_40_orderByGrp != 0 && ((int32(_db.XdbOptFlags) & int32(4)) == int32(0))) && (_40_groupBySort != 0 || _sqlite3WhereIsSorted(tls, _pWInfo) != 0) {
+ *(**XExprList)(unsafe.Pointer(&_sSort.XpOrderBy)) = nil
+ _sqlite3VdbeChangeToNoop(tls, _v, _sSort.XaddrSortIndex)
}
_49_addrTopOfLoop = _sqlite3VdbeCurrentAddr(tls, _v)
_sqlite3ExprCacheClear(tls, _pParse)
if _40_groupBySort != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(123), _sAggInfo.X2, _40_sortOut, _40_sortPTab)
+ _sqlite3VdbeAddOp3(tls, _v, int32(123), _sAggInfo.XsortingIdx, _40_sortOut, _40_sortPTab)
}
- _j = i32(0)
+ _j = int32(0)
_156:
- if _j >= (_pGroupBy.X0) {
+ if _j >= _pGroupBy.XnExpr {
goto _159
}
if _40_groupBySort != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _40_sortPTab, _j, _40_iBMem+_j)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _40_sortPTab, _j, _40_iBMem+_j)
goto _161
}
- *(*uint8)(unsafe.Pointer(&(_sAggInfo.X0))) = uint8(i32(1))
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pGroupBy.X2)))))+20*uintptr(_j))).X0), _40_iBMem+_j)
+ _sAggInfo.XdirectMode = uint8(1)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pGroupBy.Xa)), uintptr(_j)).XpExpr), _40_iBMem+_j)
_161:
_j += 1
goto _156
_159:
- _sqlite3VdbeAddOp4(tls, _v, i32(98), _40_iAMem, _40_iBMem, _pGroupBy.X0, (*int8)(unsafe.Pointer(_sqlite3KeyInfoRef(tls, _49_pKeyInfo))), i32(-5))
+ _sqlite3VdbeAddOp4(tls, _v, int32(98), _40_iAMem, _40_iBMem, _pGroupBy.XnExpr, (*int8)(unsafe.Pointer(_sqlite3KeyInfoRef(tls, _49_pKeyInfo))), int32(-5))
_49_addr1 = _sqlite3VdbeCurrentAddr(tls, _v)
- _sqlite3VdbeAddOp3(tls, _v, i32(18), _49_addr1+i32(1), i32(0), _49_addr1+i32(1))
- _sqlite3ExprCodeMove(tls, _pParse, _40_iBMem, _40_iAMem, _pGroupBy.X0)
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _49_regOutputRow, _49_addrOutputRow)
- _sqlite3VdbeComment(tls, _v, str(46542))
- _sqlite3VdbeAddOp2(tls, _v, i32(46), _40_iAbortFlag, _40_addrEnd)
- _sqlite3VdbeComment(tls, _v, str(46557))
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _49_regReset, _49_addrReset)
- _sqlite3VdbeComment(tls, _v, str(46574))
+ _sqlite3VdbeAddOp3(tls, _v, int32(18), _49_addr1+int32(1), int32(0), _49_addr1+int32(1))
+ _sqlite3ExprCodeMove(tls, _pParse, _40_iBMem, _40_iAMem, _pGroupBy.XnExpr)
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _49_regOutputRow, _49_addrOutputRow)
+ _sqlite3VdbeComment(tls, _v, str(46497))
+ _sqlite3VdbeAddOp2(tls, _v, int32(46), _40_iAbortFlag, _40_addrEnd)
+ _sqlite3VdbeComment(tls, _v, str(46512))
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _49_regReset, _49_addrReset)
+ _sqlite3VdbeComment(tls, _v, str(46529))
_sqlite3VdbeJumpHere(tls, _v, _49_addr1)
_updateAccumulator(tls, _pParse, &_sAggInfo)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(1), _40_iUseFlag)
- _sqlite3VdbeComment(tls, _v, str(46592))
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(1), _40_iUseFlag)
+ _sqlite3VdbeComment(tls, _v, str(46547))
if _40_groupBySort != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(3), _sAggInfo.X2, _49_addrTopOfLoop)
+ _sqlite3VdbeAddOp2(tls, _v, int32(3), _sAggInfo.XsortingIdx, _49_addrTopOfLoop)
goto _163
}
_sqlite3WhereEnd(tls, _pWInfo)
_sqlite3VdbeChangeToNoop(tls, _v, _49_addrSortingIdx)
_163:
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _49_regOutputRow, _49_addrOutputRow)
- _sqlite3VdbeComment(tls, _v, str(46621))
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _49_regOutputRow, _49_addrOutputRow)
+ _sqlite3VdbeComment(tls, _v, str(46576))
_sqlite3VdbeGoto(tls, _v, _40_addrEnd)
_49_addrSetAbort = _sqlite3VdbeCurrentAddr(tls, _v)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(1), _40_iAbortFlag)
- _sqlite3VdbeComment(tls, _v, str(46638))
- _sqlite3VdbeAddOp1(tls, _v, i32(52), _49_regOutputRow)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(1), _40_iAbortFlag)
+ _sqlite3VdbeComment(tls, _v, str(46593))
+ _sqlite3VdbeAddOp1(tls, _v, int32(52), _49_regOutputRow)
_sqlite3VdbeResolveLabel(tls, _v, _49_addrOutputRow)
_49_addrOutputRow = _sqlite3VdbeCurrentAddr(tls, _v)
- _sqlite3VdbeAddOp2(tls, _v, i32(46), _40_iUseFlag, _49_addrOutputRow+i32(2))
- _sqlite3VdbeComment(tls, _v, str(46653))
- _sqlite3VdbeAddOp1(tls, _v, i32(52), _49_regOutputRow)
+ _sqlite3VdbeAddOp2(tls, _v, int32(46), _40_iUseFlag, _49_addrOutputRow+int32(2))
+ _sqlite3VdbeComment(tls, _v, str(46608))
+ _sqlite3VdbeAddOp1(tls, _v, int32(52), _49_regOutputRow)
_finalizeAggFunctions(tls, _pParse, &_sAggInfo)
- _sqlite3ExprIfFalse(tls, _pParse, _pHaving, _49_addrOutputRow+i32(1), i32(16))
- _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.X0), i32(-1), &_sSort, &_sDistinct, _pDest, _49_addrOutputRow+i32(1), _49_addrSetAbort)
- _sqlite3VdbeAddOp1(tls, _v, i32(52), _49_regOutputRow)
- _sqlite3VdbeComment(tls, _v, str(46690))
+ _sqlite3ExprIfFalse(tls, _pParse, _pHaving, _49_addrOutputRow+int32(1), int32(16))
+ _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.XpEList), int32(-1), &_sSort, &_sDistinct, _pDest, _49_addrOutputRow+int32(1), _49_addrSetAbort)
+ _sqlite3VdbeAddOp1(tls, _v, int32(52), _49_regOutputRow)
+ _sqlite3VdbeComment(tls, _v, str(46645))
_sqlite3VdbeResolveLabel(tls, _v, _49_addrReset)
_resetAccumulator(tls, _pParse, &_sAggInfo)
- _sqlite3VdbeAddOp1(tls, _v, i32(52), _49_regReset)
+ _sqlite3VdbeAddOp1(tls, _v, int32(52), _49_regReset)
goto _164
_132:
_63_pDel = nil
- if store44(&_63_pTab, _isSimpleCount(tls, _p, &_sAggInfo)) == nil {
+ if store72(&_63_pTab, _isSimpleCount(tls, _p, &_sAggInfo)) == nil {
goto _165
}
- _64_iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_63_pTab.X20))
- _64_iCsr = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ _64_iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_63_pTab.XpSchema))
+ _64_iCsr = postInc2(&_pParse.XnTab, 1)
_64_pKeyInfo = nil
_64_pBest = nil
- _64_iRoot = _63_pTab.X7
+ _64_iRoot = _63_pTab.Xtnum
_sqlite3CodeVerifySchema(tls, _pParse, _64_iDb)
- _sqlite3TableLock(tls, _pParse, _64_iDb, _63_pTab.X7, uint8(i32(0)), _63_pTab.X0)
- if ((_63_pTab.X9) & uint32(i32(32))) != uint32(i32(0)) {
+ _sqlite3TableLock(tls, _pParse, _64_iDb, _63_pTab.Xtnum, 0, _63_pTab.XzName)
+ if (_63_pTab.XtabFlags & uint32(32)) != (0) {
_64_pBest = _sqlite3PrimaryKeyIndex(tls, _63_pTab)
}
- _64_pIdx = (*XIndex)(_63_pTab.X2)
+ _64_pIdx = (*XIndex)(_63_pTab.XpIndex)
_167:
if _64_pIdx == nil {
goto _170
}
- if (((int32((uint32((_64_pIdx.X16)>>uint(i32(2)))<<uint(i32(31)))>>uint(i32(31))) == i32(0)) && (int32(_64_pIdx.X12) < int32(_63_pTab.X13))) && ((*XExpr)(_64_pIdx.X9) == nil)) && ((_64_pBest == nil) || (int32(_64_pIdx.X12) < int32(_64_pBest.X12))) {
+ if (((int32((uint32(_64_pIdx.XidxType>>2)<<31)>>31) == int32(0)) && (int32(_64_pIdx.XszIdxRow) < int32(_63_pTab.XszTabRow))) && ((*XExpr)(_64_pIdx.XpPartIdxWhere) == nil)) && ((_64_pBest == nil) || (int32(_64_pIdx.XszIdxRow) < int32(_64_pBest.XszIdxRow))) {
_64_pBest = _64_pIdx
}
- _64_pIdx = (*XIndex)(_64_pIdx.X5)
+ _64_pIdx = (*XIndex)(_64_pIdx.XpNext)
goto _167
_170:
if _64_pBest != nil {
- _64_iRoot = _64_pBest.X11
+ _64_iRoot = _64_pBest.Xtnum
_64_pKeyInfo = _sqlite3KeyInfoOfIndex(tls, _pParse, _64_pBest)
}
- _sqlite3VdbeAddOp4Int(tls, _v, i32(106), _64_iCsr, _64_iRoot, _64_iDb, i32(1))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(106), _64_iCsr, _64_iRoot, _64_iDb, int32(1))
if _64_pKeyInfo != nil {
- _sqlite3VdbeChangeP4(tls, _v, i32(-1), (*int8)(unsafe.Pointer(_64_pKeyInfo)), i32(-5))
+ _sqlite3VdbeChangeP4(tls, _v, int32(-1), (*int8)(unsafe.Pointer(_64_pKeyInfo)), int32(-5))
}
- _sqlite3VdbeAddOp2(tls, _v, i32(102), _64_iCsr, (*TAggInfo_func)(unsafe.Pointer(uintptr(_sAggInfo.X11)+16*uintptr(i32(0)))).X2)
- _sqlite3VdbeAddOp1(tls, _v, i32(114), _64_iCsr)
+ _sqlite3VdbeAddOp2(tls, _v, int32(102), _64_iCsr, elem67((*TAggInfo_func)(_sAggInfo.XaFunc), 0).XiMem)
+ _sqlite3VdbeAddOp1(tls, _v, int32(114), _64_iCsr)
_explainSimpleCount(tls, _pParse, _63_pTab, _64_pBest)
goto _178
_165:
_69_pMinMax = nil
- _69_flag = u8(0)
+ _69_flag = uint8(0)
func() {
- if (*XExprList)(_p.X10) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122352), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46719)))
+ if (*XExprList)(_p.XpGroupBy) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122352), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46674)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_69_flag) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122353), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46734)))
+ if int32(_69_flag) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122353), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46689)))
crt.X__builtin_abort(tls)
}
}()
- if (*XExpr)(_p.X11) == nil {
+ if (*XExpr)(_p.XpHaving) == nil {
_69_flag = _minMaxQuery(tls, &_sAggInfo, &_69_pMinMax)
}
func() {
- if int32(_69_flag) != i32(0) && (_69_pMinMax == nil || (_69_pMinMax.X0) != i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122357), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46742)))
+ if int32(_69_flag) != int32(0) && (_69_pMinMax == nil || _69_pMinMax.XnExpr != int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122357), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46697)))
crt.X__builtin_abort(tls)
}
}()
if _69_flag == 0 {
goto _188
}
- _69_pMinMax = _sqlite3ExprListDup(tls, _db, _69_pMinMax, i32(0))
+ _69_pMinMax = _sqlite3ExprListDup(tls, _db, _69_pMinMax, int32(0))
_63_pDel = _69_pMinMax
func() {
- if (_db.X17) == 0 && _69_pMinMax == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122362), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46787)))
+ if _db.XmallocFailed == 0 && _69_pMinMax == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122362), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46742)))
crt.X__builtin_abort(tls)
}
}()
- if (_db.X17) == 0 {
- *(*uint8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_69_pMinMax.X2))))) + 20*uintptr(i32(0)))).X3))) = uint8(func() int32 {
- if int32(_69_flag) != i32(1) {
- return i32(1)
+ if _db.XmallocFailed == 0 {
+ elem57((*TExprList_item)(unsafe.Pointer(&_69_pMinMax.Xa)), 0).XsortOrder = uint8(func() int32 {
+ if int32(_69_flag) != int32(1) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- *(*uint8)(unsafe.Pointer(&((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_69_pMinMax.X2))))) + 20*uintptr(i32(0)))).X0).X0))) = uint8(i32(152))
+ (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_69_pMinMax.Xa)), 0).XpExpr).Xop = uint8(152)
}
_188:
_resetAccumulator(tls, _pParse, &_sAggInfo)
- _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pTabList, _pWhere, _69_pMinMax, nil, uint16(_69_flag), i32(0))
+ _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pTabList, _pWhere, _69_pMinMax, nil, uint16(_69_flag), int32(0))
if _pWInfo == nil {
_sqlite3ExprListDelete(tls, _db, _63_pDel)
goto _select_end
}
_updateAccumulator(tls, _pParse, &_sAggInfo)
func() {
- if _69_pMinMax != nil && (_69_pMinMax.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122380), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000))), unsafe.Pointer(str(46818)))
+ if _69_pMinMax != nil && _69_pMinMax.XnExpr != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122380), unsafe.Pointer(&_sqlite3SelectØ00__func__Ø000), unsafe.Pointer(str(46773)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3WhereIsOrdered(tls, _pWInfo) > i32(0) {
+ if _sqlite3WhereIsOrdered(tls, _pWInfo) > int32(0) {
_sqlite3VdbeGoto(tls, _v, _sqlite3WhereBreakLabel(tls, _pWInfo))
- _sqlite3VdbeComment(tls, _v, str(46850), unsafe.Pointer(func() *int8 {
- if int32(_69_flag) == i32(1) {
- return str(7709)
+ _sqlite3VdbeComment(tls, _v, str(46805), unsafe.Pointer(func() *int8 {
+ if int32(_69_flag) == int32(1) {
+ return str(7610)
}
- return str(7713)
+ return str(7614)
}()))
}
_sqlite3WhereEnd(tls, _pWInfo)
_finalizeAggFunctions(tls, _pParse, &_sAggInfo)
_178:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sSort.X0))))) = nil
- _sqlite3ExprIfFalse(tls, _pParse, _pHaving, _40_addrEnd, i32(16))
- _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.X0), i32(-1), nil, nil, _pDest, _40_addrEnd, _40_addrEnd)
+ *(**XExprList)(unsafe.Pointer(&_sSort.XpOrderBy)) = nil
+ _sqlite3ExprIfFalse(tls, _pParse, _pHaving, _40_addrEnd, int32(16))
+ _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.XpEList), int32(-1), nil, nil, _pDest, _40_addrEnd, _40_addrEnd)
_sqlite3ExprListDelete(tls, _db, _63_pDel)
_164:
_sqlite3VdbeResolveLabel(tls, _v, _40_addrEnd)
_102:
- if int32(_sDistinct.X1) == i32(3) {
- _explainTempTable(tls, _pParse, str(25716))
+ if int32(_sDistinct.XeTnctType) == int32(3) {
+ _explainTempTable(tls, _pParse, str(25671))
}
- if (*XExprList)(_sSort.X0) != nil {
+ if _sSort.XpOrderBy != nil {
_explainTempTable(tls, _pParse, func() *int8 {
- if (_sSort.X1) > i32(0) {
- return str(46864)
+ if _sSort.XnOBSat > int32(0) {
+ return str(46819)
}
- return str(46887)
+ return str(46842)
}())
- _generateSortTail(tls, _pParse, _p, &_sSort, _pEList.X0, _pDest)
+ _generateSortTail(tls, _pParse, _p, &_sSort, _pEList.XnExpr, _pDest)
}
_sqlite3VdbeResolveLabel(tls, _v, _iEnd)
- _rc = bool2int((_pParse.X16) > i32(0))
+ _rc = bool2int(_pParse.XnErr > int32(0))
_select_end:
- *(*int32)(unsafe.Pointer(&(_pParse.X58))) = _iRestoreSelectId
- if (_rc == i32(0)) && (int32(_pDest.X0) == i32(9)) {
+ _pParse.XiSelectId = _iRestoreSelectId
+ if (_rc == int32(0)) && (int32(_pDest.XeDest) == int32(9)) {
_generateColumnNames(tls, _pParse, _pTabList, _pEList)
}
- _sqlite3DbFree(tls, _db, _sAggInfo.X8)
- _sqlite3DbFree(tls, _db, _sAggInfo.X11)
- if (Xsqlite3SelectTrace & i32(1)) != 0 {
+ _sqlite3DbFree(tls, _db, _sAggInfo.XaCol)
+ _sqlite3DbFree(tls, _db, _sAggInfo.XaFunc)
+ if (Xsqlite3SelectTrace & int32(1)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(46896)
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(46851)
}())
}
- *(*int32)(unsafe.Pointer(&(_pParse.X35))) -= 1
+ _pParse.XnSelectIndent -= 1
return _rc
-
- _ = _sDistinct
- _ = _sSort
- _ = _sAggInfo
- _ = _12_dest
- _ = _40_sNC
- panic(0)
}
-// Do an authorization check using the code and arguments given. Return
-// either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY
-// is returned, then the error count and error message in pParse are
-// modified appropriately.
+// C comment
+// /*
+// ** Do an authorization check using the code and arguments given. Return
+// ** either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY
+// ** is returned, then the error count and error message in pParse are
+// ** modified appropriately.
+// */
func _sqlite3AuthCheck(tls *crt.TLS, _pParse *XParse, _code int32, _zArg1 *int8, _zArg2 *int8, _zArg3 *int8) (r0 int32) {
var _rc int32
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pParse.X0)
- if (((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0) || ((_pParse.X55) != 0) {
- return i32(0)
- }
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32
- }{(_db.X59)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32
- }{nil})) {
- return i32(0)
- }
- _rc = (_db.X59)(tls, _db.X60, _code, _zArg1, _zArg2, _zArg3, _pParse.X65)
- if _rc == i32(1) {
- _sqlite3ErrorMsg(tls, _pParse, str(7980))
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(23)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if ((_db.Xinit.Xbusy) != 0) || (_pParse.XdeclareVtab != 0) {
+ return int32(0)
+ }
+ if _db.XxAuth == nil {
+ return int32(0)
+ }
+ _rc = _db.XxAuth(tls, _db.XpAuthArg, _code, _zArg1, _zArg2, _zArg3, _pParse.XzAuthContext)
+ if _rc == int32(1) {
+ _sqlite3ErrorMsg(tls, _pParse, str(7881))
+ _pParse.Xrc = int32(23)
goto _6
}
- if (_rc != i32(0)) && (_rc != i32(2)) {
- _rc = i32(1)
+ if (_rc != int32(0)) && (_rc != int32(2)) {
+ _rc = int32(1)
_sqliteAuthBadReturnCode(tls, _pParse)
}
_6:
return _rc
}
-// Write an error message into pParse->zErrMsg that explains that the
-// user-supplied authorization function returned an illegal value.
+// C comment
+// /*
+// ** Write an error message into pParse->zErrMsg that explains that the
+// ** user-supplied authorization function returned an illegal value.
+// */
func _sqliteAuthBadReturnCode(tls *crt.TLS, _pParse *XParse) {
- _sqlite3ErrorMsg(tls, _pParse, str(46912))
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(1)
+ _sqlite3ErrorMsg(tls, _pParse, str(46867))
+ _pParse.Xrc = int32(1)
}
var Xsqlite3SelectTrace int32
-// A version of printf() that understands %lld. Used for debugging.
-// The printf() built into some versions of windows does not understand %lld
-// and segfaults if you give it a long long int.
+// C comment
+// /*
+// ** A version of printf() that understands %lld. Used for debugging.
+// ** The printf() built into some versions of windows does not understand %lld
+// ** and segfaults if you give it a long long int.
+// */
func _sqlite3DebugPrintf(tls *crt.TLS, _zFormat *int8, args ...interface{}) {
var _ap []interface{}
var _acc XStrAccum
var _zBuf [500]int8
- _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zBuf)), int32(u32(500)), i32(0))
+ _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zBuf)), int32(500), int32(0))
_ap = args
_sqlite3VXPrintf(tls, &_acc, _zFormat, _ap)
_ap = nil
_sqlite3StrAccumFinish(tls, &_acc)
- crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(24576), unsafe.Pointer((*int8)(unsafe.Pointer(&_zBuf))))
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(24531), unsafe.Pointer(&_zBuf))
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
- _ = _acc
_ = _zBuf
}
-// Generate a human-readable description of a Select object.
-func _sqlite3TreeViewSelect(tls *crt.TLS, _pView *t45, _p *XSelect, _moreToFollow uint8) {
+// C comment
+// /*
+// ** Generate a human-readable description of a Select object.
+// */
+func _sqlite3TreeViewSelect(tls *crt.TLS, _pView *t73, _p *XSelect, _moreToFollow uint8) {
var _n, _cnt, _6_i int32
var _21_zOp *int8
var _7_zLine [100]int8
var _7_x XStrAccum
var _7_pItem *TSrcList_item
- _n = i32(0)
- _cnt = i32(0)
+ _n = int32(0)
+ _cnt = int32(0)
if _p == nil {
- _sqlite3TreeViewLine(tls, _pView, str(46935))
+ _sqlite3TreeViewLine(tls, _pView, str(46890))
return
}
_pView = _sqlite3TreeViewPush(tls, _pView, _moreToFollow)
- if (*XWith)(_p.X17) != nil {
- _sqlite3TreeViewWith(tls, _pView, (*XWith)(_p.X17), uint8(i32(1)))
- _cnt = i32(1)
- _sqlite3TreeViewPush(tls, _pView, uint8(i32(1)))
+ if _p.XpWith != nil {
+ _sqlite3TreeViewWith(tls, _pView, (*XWith)(_p.XpWith), uint8(1))
+ _cnt = int32(1)
+ _sqlite3TreeViewPush(tls, _pView, uint8(1))
}
_1:
- _sqlite3TreeViewLine(tls, _pView, str(46946), unsafe.Pointer(func() *int8 {
- if ((_p.X3) & uint32(i32(1))) != 0 {
- return str(46992)
+ _sqlite3TreeViewLine(tls, _pView, str(46901), unsafe.Pointer(func() *int8 {
+ if (_p.XselFlags & uint32(1)) != 0 {
+ return str(46947)
}
- return str(0)
+ return str(284)
}()), unsafe.Pointer(func() *int8 {
- if ((_p.X3) & uint32(i32(8))) != 0 {
- return str(47002)
+ if (_p.XselFlags & uint32(8)) != 0 {
+ return str(46957)
}
- return str(0)
- }()), unsafe.Pointer(_p), _p.X3, int32(_p.X2))
- if postInc1(&_cnt, int32(1)) != 0 {
+ return str(284)
+ }()), unsafe.Pointer(_p), _p.XselFlags, int32(_p.XnSelectRow))
+ if postInc2(&_cnt, 1) != 0 {
_sqlite3TreeViewPop(tls, _pView)
}
- if (*XSelect)(_p.X13) != nil {
- _n = i32(1000)
+ if _p.XpPrior != nil {
+ _n = int32(1000)
goto _9
}
- _n = i32(0)
- if ((*XSrcList)(_p.X8) != nil) && ((*XSrcList)(_p.X8).X0) != 0 {
+ _n = int32(0)
+ if (_p.XpSrc != nil) && ((*XSrcList)(_p.XpSrc).XnSrc) != 0 {
_n += 1
}
- if (*XExpr)(_p.X9) != nil {
+ if _p.XpWhere != nil {
_n += 1
}
- if (*XExprList)(_p.X10) != nil {
+ if _p.XpGroupBy != nil {
_n += 1
}
- if (*XExpr)(_p.X11) != nil {
+ if _p.XpHaving != nil {
_n += 1
}
- if (*XExprList)(_p.X12) != nil {
+ if _p.XpOrderBy != nil {
_n += 1
}
- if (*XExpr)(_p.X15) != nil {
+ if _p.XpLimit != nil {
_n += 1
}
- if (*XExpr)(_p.X16) != nil {
+ if _p.XpOffset != nil {
_n += 1
}
_9:
- _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(_p.X0), uint8(bool2int(postInc1(&_n, int32(-1)) > i32(0))), str(47012))
- if (*XSrcList)(_p.X8) == nil || ((*XSrcList)(_p.X8).X0) == 0 {
+ _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(_p.XpEList), uint8(bool2int(postInc2(&_n, -1) > int32(0))), str(46967))
+ if _p.XpSrc == nil || ((*XSrcList)(_p.XpSrc).XnSrc) == 0 {
goto _19
}
- _pView = _sqlite3TreeViewPush(tls, _pView, uint8(bool2int(postInc1(&_n, int32(-1)) > i32(0))))
- _sqlite3TreeViewLine(tls, _pView, str(25729))
- _6_i = i32(0)
+ _pView = _sqlite3TreeViewPush(tls, _pView, uint8(bool2int(postInc2(&_n, -1) > int32(0))))
+ _sqlite3TreeViewLine(tls, _pView, str(25684))
+ _6_i = int32(0)
_20:
- if _6_i >= ((*XSrcList)(_p.X8).X0) {
+ if _6_i >= ((*XSrcList)(_p.XpSrc).XnSrc) {
goto _23
}
- _7_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.X8).X2))))) + 68*uintptr(_6_i)))
- _sqlite3StrAccumInit(tls, &_7_x, nil, (*int8)(unsafe.Pointer(&_7_zLine)), int32(u32(100)), i32(0))
- _sqlite3XPrintf(tls, &_7_x, str(47023), _7_pItem.X11)
- if (_7_pItem.X1) != nil {
- _sqlite3XPrintf(tls, &_7_x, str(47030), unsafe.Pointer(_7_pItem.X1), unsafe.Pointer(_7_pItem.X2))
+ _7_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.XpSrc).Xa))), uintptr(_6_i))
+ _sqlite3StrAccumInit(tls, &_7_x, nil, (*int8)(unsafe.Pointer(&_7_zLine)), int32(100), int32(0))
+ _sqlite3XPrintf(tls, &_7_x, str(46978), _7_pItem.XiCursor)
+ if _7_pItem.XzDatabase != nil {
+ _sqlite3XPrintf(tls, &_7_x, str(46985), unsafe.Pointer(_7_pItem.XzDatabase), unsafe.Pointer(_7_pItem.XzName))
goto _26
}
- if (_7_pItem.X2) != nil {
- _sqlite3XPrintf(tls, &_7_x, str(47037), unsafe.Pointer(_7_pItem.X2))
+ if _7_pItem.XzName != nil {
+ _sqlite3XPrintf(tls, &_7_x, str(46992), unsafe.Pointer(_7_pItem.XzName))
}
_26:
- if (*XTable)(_7_pItem.X4) != nil {
- _sqlite3XPrintf(tls, &_7_x, str(47041), unsafe.Pointer((*XTable)(_7_pItem.X4).X0))
+ if _7_pItem.XpTab != nil {
+ _sqlite3XPrintf(tls, &_7_x, str(46996), unsafe.Pointer((*XTable)(_7_pItem.XpTab).XzName))
}
- if (_7_pItem.X3) != nil {
- _sqlite3XPrintf(tls, &_7_x, str(47053), unsafe.Pointer(_7_pItem.X3))
+ if _7_pItem.XzAlias != nil {
+ _sqlite3XPrintf(tls, &_7_x, str(47008), unsafe.Pointer(_7_pItem.XzAlias))
}
- if (int32((*t28)(unsafe.Pointer(&(_7_pItem.X9))).X0) & i32(8)) != 0 {
- _sqlite3XPrintf(tls, &_7_x, str(47062))
+ if (int32(_7_pItem.Xfg.Xjointype) & int32(8)) != 0 {
+ _sqlite3XPrintf(tls, &_7_x, str(47017))
}
_sqlite3StrAccumFinish(tls, &_7_x)
- _sqlite3TreeViewItem(tls, _pView, (*int8)(unsafe.Pointer(&_7_zLine)), uint8(bool2int(_6_i < (((*XSrcList)(_p.X8).X0)-i32(1)))))
- if (*XSelect)(_7_pItem.X5) != nil {
- _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(_7_pItem.X5), uint8(i32(0)))
+ _sqlite3TreeViewItem(tls, _pView, (*int8)(unsafe.Pointer(&_7_zLine)), uint8(bool2int(_6_i < (((*XSrcList)(_p.XpSrc).XnSrc)-int32(1)))))
+ if _7_pItem.XpSelect != nil {
+ _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(_7_pItem.XpSelect), 0)
}
- if ((uint32(((*t28)(unsafe.Pointer(&(_7_pItem.X9))).X1)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_7_pItem.X15)))))), uint8(i32(0)), str(47073))
+ if ((uint32((_7_pItem.Xfg.XnotIndexed)>>2) << 31) >> 31) != 0 {
+ _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_7_pItem.Xu1))), 0, str(47028))
}
_sqlite3TreeViewPop(tls, _pView)
_6_i += 1
@@ -33307,150 +33994,154 @@ _26:
_23:
_sqlite3TreeViewPop(tls, _pView)
_19:
- if (*XExpr)(_p.X9) != nil {
- _sqlite3TreeViewItem(tls, _pView, str(25770), uint8(bool2int(postInc1(&_n, int32(-1)) > i32(0))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_p.X9), uint8(i32(0)))
+ if _p.XpWhere != nil {
+ _sqlite3TreeViewItem(tls, _pView, str(25725), uint8(bool2int(postInc2(&_n, -1) > int32(0))))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_p.XpWhere), 0)
_sqlite3TreeViewPop(tls, _pView)
}
- if (*XExprList)(_p.X10) != nil {
- _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(_p.X10), uint8(bool2int(postInc1(&_n, int32(-1)) > i32(0))), str(47084))
+ if _p.XpGroupBy != nil {
+ _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(_p.XpGroupBy), uint8(bool2int(postInc2(&_n, -1) > int32(0))), str(47039))
}
- if (*XExpr)(_p.X11) != nil {
- _sqlite3TreeViewItem(tls, _pView, str(25757), uint8(bool2int(postInc1(&_n, int32(-1)) > i32(0))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_p.X11), uint8(i32(0)))
+ if _p.XpHaving != nil {
+ _sqlite3TreeViewItem(tls, _pView, str(25712), uint8(bool2int(postInc2(&_n, -1) > int32(0))))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_p.XpHaving), 0)
_sqlite3TreeViewPop(tls, _pView)
}
- if (*XExprList)(_p.X12) != nil {
- _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(_p.X12), uint8(bool2int(postInc1(&_n, int32(-1)) > i32(0))), str(47092))
+ if _p.XpOrderBy != nil {
+ _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(_p.XpOrderBy), uint8(bool2int(postInc2(&_n, -1) > int32(0))), str(47047))
}
- if (*XExpr)(_p.X15) != nil {
- _sqlite3TreeViewItem(tls, _pView, str(25764), uint8(bool2int(postInc1(&_n, int32(-1)) > i32(0))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_p.X15), uint8(i32(0)))
+ if _p.XpLimit != nil {
+ _sqlite3TreeViewItem(tls, _pView, str(25719), uint8(bool2int(postInc2(&_n, -1) > int32(0))))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_p.XpLimit), 0)
_sqlite3TreeViewPop(tls, _pView)
}
- if (*XExpr)(_p.X16) != nil {
- _sqlite3TreeViewItem(tls, _pView, str(25292), uint8(bool2int(postInc1(&_n, int32(-1)) > i32(0))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_p.X16), uint8(i32(0)))
+ if _p.XpOffset != nil {
+ _sqlite3TreeViewItem(tls, _pView, str(25247), uint8(bool2int(postInc2(&_n, -1) > int32(0))))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_p.XpOffset), 0)
_sqlite3TreeViewPop(tls, _pView)
}
- if (*XSelect)(_p.X13) == nil {
+ if _p.XpPrior == nil {
goto _38
}
- _21_zOp = str(25675)
- switch int32(_p.X1) {
- case i32(116):
+ _21_zOp = str(25630)
+ switch int32(_p.Xop) {
+ case int32(116):
goto _40
- case i32(117):
+ case int32(117):
goto _42
- case i32(118):
+ case int32(118):
goto _41
default:
goto _43
}
_40:
- _21_zOp = str(47100)
+ _21_zOp = str(47055)
goto _43
_41:
- _21_zOp = str(25692)
+ _21_zOp = str(25647)
goto _43
_42:
- _21_zOp = str(25685)
+ _21_zOp = str(25640)
goto _43
_43:
- _sqlite3TreeViewItem(tls, _pView, _21_zOp, uint8(i32(1)))
+ _sqlite3TreeViewItem(tls, _pView, _21_zOp, uint8(1))
_38:
- _p = (*XSelect)(_p.X13)
+ _p = (*XSelect)(_p.XpPrior)
if _p != nil {
goto _1
}
_sqlite3TreeViewPop(tls, _pView)
_ = _n
_ = _cnt
- _ = _7_x
_ = _7_zLine
}
-// Generate a single line of output for the tree, with a prefix that contains
-// all the appropriate tree lines
-func _sqlite3TreeViewLine(tls *crt.TLS, _p *t45, _zFormat *int8, args ...interface{}) {
+// C comment
+// /*
+// ** Generate a single line of output for the tree, with a prefix that contains
+// ** all the appropriate tree lines
+// */
+func _sqlite3TreeViewLine(tls *crt.TLS, _p *t73, _zFormat *int8, args ...interface{}) {
var _i int32
var _ap []interface{}
var _acc XStrAccum
var _zBuf [500]int8
- _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zBuf)), int32(u32(500)), i32(0))
+ _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zBuf)), int32(500), int32(0))
if _p == nil {
goto _0
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_p.X0) || uint32(_i) >= u32(99) {
+ if _i >= _p.XiLevel || uint32(_i) >= uint32(99) {
goto _5
}
_sqlite3StrAccumAppend(tls, &_acc, func() *int8 {
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[100]uint8)(unsafe.Pointer(&(_p.X1))))) + 1*uintptr(_i)))) != 0 {
- return str(47110)
+ if (*elem15((*uint8)(unsafe.Pointer(&_p.XbLine)), uintptr(_i))) != 0 {
+ return str(47065)
}
- return str(47115)
- }(), i32(4))
+ return str(47070)
+ }(), int32(4))
_i += 1
goto _1
_5:
_sqlite3StrAccumAppend(tls, &_acc, func() *int8 {
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[100]uint8)(unsafe.Pointer(&(_p.X1))))) + 1*uintptr(_i)))) != 0 {
- return str(47120)
+ if (*elem15((*uint8)(unsafe.Pointer(&_p.XbLine)), uintptr(_i))) != 0 {
+ return str(47075)
}
- return str(47125)
- }(), i32(4))
+ return str(47080)
+ }(), int32(4))
_0:
_ap = args
_sqlite3VXPrintf(tls, &_acc, _zFormat, _ap)
_ap = nil
func() {
- if (_acc.X3) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(26243), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TreeViewLineØ00__func__Ø000))), unsafe.Pointer(str(47130)))
+ if _acc.XnChar <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(26243), unsafe.Pointer(&_sqlite3TreeViewLineØ00__func__Ø000), unsafe.Pointer(str(47085)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zBuf)) + 1*uintptr((_acc.X3)-uint32(i32(1)))))) != i32(10) {
- _sqlite3StrAccumAppend(tls, &_acc, str(37700), i32(1))
+ if int32(*elem1((*int8)(unsafe.Pointer(&_zBuf)), uintptr(_acc.XnChar-uint32(1)))) != int32(10) {
+ _sqlite3StrAccumAppend(tls, &_acc, str(37655), int32(1))
}
_sqlite3StrAccumFinish(tls, &_acc)
- crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(24576), unsafe.Pointer((*int8)(unsafe.Pointer(&_zBuf))))
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(24531), unsafe.Pointer(&_zBuf))
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
- _ = _acc
_ = _zBuf
}
var _sqlite3TreeViewLineØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TreeViewLineØ00__func__Ø000[0], str(47142), 20)
+ crt.Xstrncpy(nil, &_sqlite3TreeViewLineØ00__func__Ø000[0], str(47097), 20)
}
-// Add a new subitem to the tree. The moreToFollow flag indicates that this
-// is not the last item in the tree.
-func _sqlite3TreeViewPush(tls *crt.TLS, _p *t45, _moreToFollow uint8) (r0 *t45) {
+// C comment
+// /*
+// ** Add a new subitem to the tree. The moreToFollow flag indicates that this
+// ** is not the last item in the tree.
+// */
+func _sqlite3TreeViewPush(tls *crt.TLS, _p *t73, _moreToFollow uint8) (r0 *t73) {
if _p != nil {
goto _0
}
- _p = (*t45)(Xsqlite3_malloc64(tls, uint64(u32(104))))
+ _p = (*t73)(Xsqlite3_malloc64(tls, uint64(104)))
if _p == nil {
return nil
}
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(104))
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(104))
goto _2
_0:
- *(*int32)(unsafe.Pointer(&(_p.X0))) += 1
+ _p.XiLevel += 1
_2:
func() {
- if int32(_moreToFollow) != i32(0) && int32(_moreToFollow) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(26210), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TreeViewPushØ00__func__Ø000))), unsafe.Pointer(str(47162)))
+ if int32(_moreToFollow) != int32(0) && int32(_moreToFollow) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(26210), unsafe.Pointer(&_sqlite3TreeViewPushØ00__func__Ø000), unsafe.Pointer(str(47117)))
crt.X__builtin_abort(tls)
}
}()
- if uint32(_p.X0) < u32(100) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[100]uint8)(unsafe.Pointer(&(_p.X1))))) + 1*uintptr(_p.X0))) = _moreToFollow
+ if uint32(_p.XiLevel) < uint32(100) {
+ *elem15((*uint8)(unsafe.Pointer(&_p.XbLine)), uintptr(_p.XiLevel)) = _moreToFollow
}
return _p
}
@@ -33458,11 +34149,14 @@ _2:
var _sqlite3TreeViewPushØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TreeViewPushØ00__func__Ø000[0], str(47197), 20)
+ crt.Xstrncpy(nil, &_sqlite3TreeViewPushØ00__func__Ø000[0], str(47152), 20)
}
-// Generate a human-readable description of a WITH clause.
-func _sqlite3TreeViewWith(tls *crt.TLS, _pView *t45, _pWith *XWith, _moreToFollow uint8) {
+// C comment
+// /*
+// ** Generate a human-readable description of a WITH clause.
+// */
+func _sqlite3TreeViewWith(tls *crt.TLS, _pView *t73, _pWith *XWith, _moreToFollow uint8) {
var _i, _5_j int32
var _5_cSep int8
var _4_x XStrAccum
@@ -33471,102 +34165,110 @@ func _sqlite3TreeViewWith(tls *crt.TLS, _pView *t45, _pWith *XWith, _moreToFollo
if _pWith == nil {
return
}
- if (_pWith.X0) == i32(0) {
+ if _pWith.XnCte == int32(0) {
return
}
- if (*XWith)(_pWith.X1) != nil {
- _sqlite3TreeViewLine(tls, _pView, str(47217), unsafe.Pointer(_pWith), unsafe.Pointer((*XWith)(_pWith.X1)))
+ if _pWith.XpOuter != nil {
+ _sqlite3TreeViewLine(tls, _pView, str(47172), unsafe.Pointer(_pWith), _pWith.XpOuter)
goto _3
}
- _sqlite3TreeViewLine(tls, _pView, str(47242), unsafe.Pointer(_pWith))
+ _sqlite3TreeViewLine(tls, _pView, str(47197), unsafe.Pointer(_pWith))
_3:
- if (_pWith.X0) <= i32(0) {
+ if _pWith.XnCte <= int32(0) {
goto _4
}
- _pView = _sqlite3TreeViewPush(tls, _pView, uint8(i32(1)))
- _i = i32(0)
+ _pView = _sqlite3TreeViewPush(tls, _pView, uint8(1))
+ _i = int32(0)
_5:
- if _i >= (_pWith.X0) {
+ if _i >= _pWith.XnCte {
goto _8
}
- _4_pCte = (*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pWith.X2))))) + 16*uintptr(_i)))
- _sqlite3StrAccumInit(tls, &_4_x, nil, (*int8)(unsafe.Pointer(&_4_zLine)), int32(u32(1000)), i32(0))
- _sqlite3XPrintf(tls, &_4_x, str(24576), unsafe.Pointer(_4_pCte.X0))
- if (*XExprList)(_4_pCte.X1) == nil || ((*XExprList)(_4_pCte.X1).X0) <= i32(0) {
+ _4_pCte = elem43((*TCte)(unsafe.Pointer(&_pWith.Xa)), uintptr(_i))
+ _sqlite3StrAccumInit(tls, &_4_x, nil, (*int8)(unsafe.Pointer(&_4_zLine)), int32(1000), int32(0))
+ _sqlite3XPrintf(tls, &_4_x, str(24531), unsafe.Pointer(_4_pCte.XzName))
+ if _4_pCte.XpCols == nil || ((*XExprList)(_4_pCte.XpCols).XnExpr) <= int32(0) {
goto _10
}
- _5_cSep = int8(i32(40))
- _5_j = i32(0)
+ _5_cSep = int8(40)
+ _5_j = int32(0)
_11:
- if _5_j >= ((*XExprList)(_4_pCte.X1).X0) {
+ if _5_j >= ((*XExprList)(_4_pCte.XpCols).XnExpr) {
goto _14
}
- _sqlite3XPrintf(tls, &_4_x, str(24935), int32(_5_cSep), unsafe.Pointer((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_4_pCte.X1).X2)))))+20*uintptr(_5_j))).X1))
- _5_cSep = int8(i32(44))
+ _sqlite3XPrintf(tls, &_4_x, str(24890), int32(_5_cSep), unsafe.Pointer(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_4_pCte.XpCols).Xa))), uintptr(_5_j)).XzName))
+ _5_cSep = int8(44)
_5_j += 1
goto _11
_14:
- _sqlite3XPrintf(tls, &_4_x, str(37898))
+ _sqlite3XPrintf(tls, &_4_x, str(37853))
_10:
- _sqlite3XPrintf(tls, &_4_x, str(47254))
+ _sqlite3XPrintf(tls, &_4_x, str(47209))
_sqlite3StrAccumFinish(tls, &_4_x)
- _sqlite3TreeViewItem(tls, _pView, (*int8)(unsafe.Pointer(&_4_zLine)), uint8(bool2int(_i < ((_pWith.X0)-i32(1)))))
- _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(_4_pCte.X2), uint8(i32(0)))
+ _sqlite3TreeViewItem(tls, _pView, (*int8)(unsafe.Pointer(&_4_zLine)), uint8(bool2int(_i < (_pWith.XnCte-int32(1)))))
+ _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(_4_pCte.XpSelect), 0)
_sqlite3TreeViewPop(tls, _pView)
_i += 1
goto _5
_8:
_sqlite3TreeViewPop(tls, _pView)
_4:
- _ = _4_x
_ = _4_zLine
}
-// Shorthand for starting a new tree item that consists of a single label
-func _sqlite3TreeViewItem(tls *crt.TLS, _p *t45, _zLabel *int8, _moreFollows uint8) {
+// C comment
+// /*
+// ** Shorthand for starting a new tree item that consists of a single label
+// */
+func _sqlite3TreeViewItem(tls *crt.TLS, _p *t73, _zLabel *int8, _moreFollows uint8) {
_p = _sqlite3TreeViewPush(tls, _p, _moreFollows)
- _sqlite3TreeViewLine(tls, _p, str(24576), unsafe.Pointer(_zLabel))
+ _sqlite3TreeViewLine(tls, _p, str(24531), unsafe.Pointer(_zLabel))
}
-// Finished with one layer of the tree
-func _sqlite3TreeViewPop(tls *crt.TLS, _p *t45) {
+// C comment
+// /*
+// ** Finished with one layer of the tree
+// */
+func _sqlite3TreeViewPop(tls *crt.TLS, _p *t73) {
if _p == nil {
return
}
- *(*int32)(unsafe.Pointer(&(_p.X0))) -= 1
- if (_p.X0) < i32(0) {
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ _p.XiLevel -= 1
+ if _p.XiLevel < int32(0) {
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
}
}
-func _sqlite3TreeViewExprList(tls *crt.TLS, _pView *t45, _pList *XExprList, _moreToFollow uint8, _zLabel *int8) {
+func _sqlite3TreeViewExprList(tls *crt.TLS, _pView *t73, _pList *XExprList, _moreToFollow uint8, _zLabel *int8) {
_pView = _sqlite3TreeViewPush(tls, _pView, _moreToFollow)
_sqlite3TreeViewBareExprList(tls, _pView, _pList, _zLabel)
_sqlite3TreeViewPop(tls, _pView)
}
-// Generate a human-readable explanation of an expression list.
-func _sqlite3TreeViewBareExprList(tls *crt.TLS, _pView *t45, _pList *XExprList, _zLabel *int8) {
+// C comment
+// /*
+// ** Generate a human-readable explanation of an expression list.
+// */
+func _sqlite3TreeViewBareExprList(tls *crt.TLS, _pView *t73, _pList *XExprList, _zLabel *int8) {
var _2_i, _3_j int32
- if (_zLabel == nil) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zLabel)) + 1*uintptr(i32(0))))) == i32(0)) {
- _zLabel = str(44999)
+ if (_zLabel == nil) || (int32(*elem1(_zLabel, 0)) == int32(0)) {
+ _zLabel = str(44954)
}
if _pList == nil {
- _sqlite3TreeViewLine(tls, _pView, str(47258), unsafe.Pointer(_zLabel))
+ _sqlite3TreeViewLine(tls, _pView, str(47213), unsafe.Pointer(_zLabel))
goto _3
}
- _sqlite3TreeViewLine(tls, _pView, str(24576), unsafe.Pointer(_zLabel))
- _2_i = i32(0)
+ _sqlite3TreeViewLine(tls, _pView, str(24531), unsafe.Pointer(_zLabel))
+ _2_i = int32(0)
_4:
- if _2_i >= (_pList.X0) {
+ if _2_i >= _pList.XnExpr {
goto _7
}
- _3_j = int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(_2_i))).X5))))).X0)
+ _3_j = int32((*t71)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_2_i)).Xu))).XiOrderByCol)
if _3_j != 0 {
- _sqlite3TreeViewPush(tls, _pView, uint8(i32(0)))
- _sqlite3TreeViewLine(tls, _pView, str(47269), _3_j)
+ _sqlite3TreeViewPush(tls, _pView, 0)
+ _sqlite3TreeViewLine(tls, _pView, str(47224), _3_j)
}
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_2_i))).X0), uint8(bool2int(_2_i < ((_pList.X0)-i32(1)))))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_2_i)).XpExpr), uint8(bool2int(_2_i < (_pList.XnExpr-int32(1)))))
if _3_j != 0 {
_sqlite3TreeViewPop(tls, _pView)
}
@@ -33576,8 +34278,11 @@ _7:
_3:
}
-// Generate a human-readable explanation of an expression tree.
-func _sqlite3TreeViewExpr(tls *crt.TLS, _pView *t45, _pExpr *XExpr, _moreToFollow uint8) {
+// C comment
+// /*
+// ** Generate a human-readable explanation of an expression tree.
+// */
+func _sqlite3TreeViewExpr(tls *crt.TLS, _pView *t73, _pExpr *XExpr, _moreToFollow uint8) {
var _zBinOp, _zUniOp, _38_zType *int8
var _24_pFarg *XExprList
var _35_pX, _35_pY, _35_pZ *XExpr
@@ -33586,382 +34291,382 @@ func _sqlite3TreeViewExpr(tls *crt.TLS, _pView *t45, _pExpr *XExpr, _moreToFollo
_zUniOp = nil
_pView = _sqlite3TreeViewPush(tls, _pView, _moreToFollow)
if _pExpr == nil {
- _sqlite3TreeViewLine(tls, _pView, str(47284))
+ _sqlite3TreeViewLine(tls, _pView, str(47239))
_sqlite3TreeViewPop(tls, _pView)
return
}
- if (_pExpr.X2) == 0 {
+ if _pExpr.Xflags == 0 {
goto _1
}
- if ((_pExpr.X2) & uint32(i32(1))) != uint32(i32(0)) {
- Xsqlite3_snprintf(tls, int32(u32(60)), (*int8)(unsafe.Pointer(&_zFlgs)), str(47288), _pExpr.X2, int32(_pExpr.X11))
+ if (_pExpr.Xflags & uint32(1)) != (0) {
+ Xsqlite3_snprintf(tls, int32(60), (*int8)(unsafe.Pointer(&_zFlgs)), str(47243), _pExpr.Xflags, int32(_pExpr.XiRightJoinTable))
goto _3
}
- Xsqlite3_snprintf(tls, int32(u32(60)), (*int8)(unsafe.Pointer(&_zFlgs)), str(47309), _pExpr.X2)
+ Xsqlite3_snprintf(tls, int32(60), (*int8)(unsafe.Pointer(&_zFlgs)), str(47264), _pExpr.Xflags)
_3:
goto _4
_1:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zFlgs)) + 1*uintptr(i32(0)))) = int8(i32(0))
+ *elem1((*int8)(unsafe.Pointer(&_zFlgs)), 0) = 0
_4:
- switch int32(_pExpr.X0) {
- case i32(19):
+ switch int32(_pExpr.Xop) {
+ case int32(19):
goto _41
- case i32(20):
+ case int32(20):
goto _48
- case i32(27):
+ case int32(27):
goto _15
- case i32(37):
+ case int32(37):
goto _16
- case i32(50):
+ case int32(50):
goto _55
- case i32(56):
+ case int32(56):
goto _54
- case i32(61):
+ case int32(61):
goto _52
- case i32(70):
+ case int32(70):
goto _26
- case i32(71):
+ case int32(71):
goto _25
- case i32(72):
+ case int32(72):
goto _23
- case i32(73):
+ case int32(73):
goto _51
- case i32(74):
+ case int32(74):
goto _50
- case i32(75):
+ case int32(75):
goto _42
- case i32(76):
+ case int32(76):
goto _43
- case i32(77):
+ case int32(77):
goto _21
- case i32(78):
+ case int32(78):
goto _22
- case i32(79):
+ case int32(79):
goto _19
- case i32(80):
+ case int32(80):
goto _18
- case i32(81):
+ case int32(81):
goto _17
- case i32(82):
+ case int32(82):
goto _20
- case i32(84):
+ case int32(84):
goto _31
- case i32(85):
+ case int32(85):
goto _32
- case i32(86):
+ case int32(86):
goto _34
- case i32(87):
+ case int32(87):
goto _35
- case i32(88):
+ case int32(88):
goto _27
- case i32(89):
+ case int32(89):
goto _29
- case i32(90):
+ case int32(90):
goto _28
- case i32(91):
+ case int32(91):
goto _33
- case i32(92):
+ case int32(92):
goto _30
- case i32(93):
+ case int32(93):
goto _36
- case i32(94):
+ case int32(94):
goto _45
- case i32(95):
+ case int32(95):
goto _40
- case i32(97):
+ case int32(97):
goto _10
- case i32(101):
+ case int32(101):
goto _11
- case i32(119):
+ case int32(119):
goto _49
- case i32(122):
+ case int32(122):
goto _37
- case i32(132):
+ case int32(132):
goto _9
- case i32(133):
+ case int32(133):
goto _12
- case i32(134):
+ case int32(134):
goto _8
- case i32(135):
+ case int32(135):
goto _13
- case i32(136):
+ case int32(136):
goto _53
- case i32(148):
+ case int32(148):
goto _24
- case i32(151):
+ case int32(151):
goto _46
- case i32(152):
+ case int32(152):
goto _7
- case i32(153):
+ case int32(153):
goto _46
- case i32(154):
+ case int32(154):
goto _6
- case i32(155):
+ case int32(155):
goto _38
- case i32(156):
+ case int32(156):
goto _39
- case i32(157):
+ case int32(157):
goto _14
- case i32(158):
+ case int32(158):
goto _56
- case i32(159):
+ case int32(159):
goto _57
- case i32(160):
+ case int32(160):
goto _58
- case i32(162):
+ case int32(162):
goto _44
default:
goto _59
}
_6:
- _sqlite3TreeViewLine(tls, _pView, str(47322), _pExpr.X8, int32(_pExpr.X9), unsafe.Pointer((*int8)(unsafe.Pointer(&_zFlgs))))
+ _sqlite3TreeViewLine(tls, _pView, str(47277), _pExpr.XiTable, int32(_pExpr.XiColumn), unsafe.Pointer(&_zFlgs))
goto _60
_7:
- if (_pExpr.X8) < i32(0) {
- _sqlite3TreeViewLine(tls, _pView, str(47335), int32(_pExpr.X9), unsafe.Pointer((*int8)(unsafe.Pointer(&_zFlgs))))
+ if _pExpr.XiTable < int32(0) {
+ _sqlite3TreeViewLine(tls, _pView, str(47290), int32(_pExpr.XiColumn), unsafe.Pointer(&_zFlgs))
goto _62
}
- _sqlite3TreeViewLine(tls, _pView, str(47348), _pExpr.X8, int32(_pExpr.X9), unsafe.Pointer((*int8)(unsafe.Pointer(&_zFlgs))))
+ _sqlite3TreeViewLine(tls, _pView, str(47303), _pExpr.XiTable, int32(_pExpr.XiColumn), unsafe.Pointer(&_zFlgs))
_62:
goto _60
_8:
- if ((_pExpr.X2) & uint32(i32(1024))) != 0 {
- _sqlite3TreeViewLine(tls, _pView, str(37915), *(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))
+ if (_pExpr.Xflags & uint32(1024)) != 0 {
+ _sqlite3TreeViewLine(tls, _pView, str(37870), *(*int32)(unsafe.Pointer(&_pExpr.Xu)))
goto _64
}
- _sqlite3TreeViewLine(tls, _pView, str(24576), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ _sqlite3TreeViewLine(tls, _pView, str(24531), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
_64:
goto _60
_9:
- _sqlite3TreeViewLine(tls, _pView, str(24576), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ _sqlite3TreeViewLine(tls, _pView, str(24531), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
goto _60
_10:
- _sqlite3TreeViewLine(tls, _pView, str(47358), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ _sqlite3TreeViewLine(tls, _pView, str(47313), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
goto _60
_11:
- _sqlite3TreeViewLine(tls, _pView, str(155))
+ _sqlite3TreeViewLine(tls, _pView, str(285))
goto _60
_12:
- _sqlite3TreeViewLine(tls, _pView, str(24576), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ _sqlite3TreeViewLine(tls, _pView, str(24531), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
goto _60
_13:
- _sqlite3TreeViewLine(tls, _pView, str(47361), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))), int32(_pExpr.X9))
+ _sqlite3TreeViewLine(tls, _pView, str(47316), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))), int32(_pExpr.XiColumn))
goto _60
_14:
- _sqlite3TreeViewLine(tls, _pView, str(47377), _pExpr.X8)
+ _sqlite3TreeViewLine(tls, _pView, str(47332), _pExpr.XiTable)
goto _60
_15:
- _sqlite3TreeViewLine(tls, _pView, str(47390), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ _sqlite3TreeViewLine(tls, _pView, str(47345), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
goto _60
_16:
- _sqlite3TreeViewLine(tls, _pView, str(47398), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X4), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(47353), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpLeft), 0)
goto _60
_17:
- _zBinOp = str(25452)
+ _zBinOp = str(25407)
goto _60
_18:
- _zBinOp = str(25449)
+ _zBinOp = str(25404)
goto _60
_19:
- _zBinOp = str(25446)
+ _zBinOp = str(25401)
goto _60
_20:
- _zBinOp = str(25455)
+ _zBinOp = str(25410)
goto _60
_21:
- _zBinOp = str(25440)
+ _zBinOp = str(25395)
goto _60
_22:
- _zBinOp = str(25443)
+ _zBinOp = str(25398)
goto _60
_23:
- _zBinOp = str(25411)
+ _zBinOp = str(25366)
goto _60
_24:
- _zBinOp = str(47406)
+ _zBinOp = str(47361)
goto _60
_25:
- _zBinOp = str(25407)
+ _zBinOp = str(25362)
goto _60
_26:
- _zBinOp = str(25404)
+ _zBinOp = str(25359)
goto _60
_27:
- _zBinOp = str(25841)
+ _zBinOp = str(25796)
goto _60
_28:
- _zBinOp = str(47412)
+ _zBinOp = str(47367)
goto _60
_29:
- _zBinOp = str(47416)
+ _zBinOp = str(47371)
goto _60
_30:
- _zBinOp = str(25514)
+ _zBinOp = str(25469)
goto _60
_31:
- _zBinOp = str(25465)
+ _zBinOp = str(25420)
goto _60
_32:
- _zBinOp = str(25472)
+ _zBinOp = str(25427)
goto _60
_33:
- _zBinOp = str(47420)
+ _zBinOp = str(47375)
goto _60
_34:
- _zBinOp = str(25478)
+ _zBinOp = str(25433)
goto _60
_35:
- _zBinOp = str(25485)
+ _zBinOp = str(25440)
goto _60
_36:
- _zBinOp = str(25518)
+ _zBinOp = str(25473)
goto _60
_37:
- _zBinOp = str(25725)
+ _zBinOp = str(25680)
goto _60
_38:
- _zUniOp = str(47424)
+ _zUniOp = str(47379)
goto _60
_39:
- _zUniOp = str(47431)
+ _zUniOp = str(47386)
goto _60
_40:
- _zUniOp = str(25533)
+ _zUniOp = str(25488)
goto _60
_41:
- _zUniOp = str(25087)
+ _zUniOp = str(25042)
goto _60
_42:
- _zUniOp = str(25425)
+ _zUniOp = str(25380)
goto _60
_43:
- _zUniOp = str(25432)
+ _zUniOp = str(25387)
goto _60
_44:
- _sqlite3TreeViewLine(tls, _pView, str(47437), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X4), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(47392), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpLeft), 0)
goto _60
_45:
- _sqlite3TreeViewLine(tls, _pView, str(47445), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X4), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(47400), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpLeft), 0)
goto _60
_46:
- if ((_pExpr.X2) & uint32(i32(16384))) != uint32(i32(0)) {
+ if (_pExpr.Xflags & uint32(16384)) != (0) {
_24_pFarg = nil
goto _66
}
- _24_pFarg = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
+ _24_pFarg = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
_66:
- if int32(_pExpr.X0) == i32(153) {
- _sqlite3TreeViewLine(tls, _pView, str(47456), int32(_pExpr.X12), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ if int32(_pExpr.Xop) == int32(153) {
+ _sqlite3TreeViewLine(tls, _pView, str(47411), int32(_pExpr.Xop2), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
goto _68
}
- _sqlite3TreeViewLine(tls, _pView, str(47474), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ _sqlite3TreeViewLine(tls, _pView, str(47429), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
_68:
if _24_pFarg != nil {
- _sqlite3TreeViewExprList(tls, _pView, _24_pFarg, uint8(i32(0)), nil)
+ _sqlite3TreeViewExprList(tls, _pView, _24_pFarg, 0, nil)
}
goto _60
_48:
- _sqlite3TreeViewLine(tls, _pView, str(47486))
- _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(47441))
+ _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))), 0)
goto _60
_49:
- _sqlite3TreeViewLine(tls, _pView, str(47498))
- _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(47453))
+ _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))), 0)
goto _60
_50:
- _sqlite3TreeViewLine(tls, _pView, str(25422))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X4), uint8(i32(1)))
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(25377))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpLeft), uint8(1))
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))), 0)
goto _71
}
- _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))), uint8(i32(0)), nil)
+ _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))), 0, nil)
_71:
goto _60
_51:
- _35_pX = (*XExpr)(_pExpr.X4)
- _35_pY = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2))))) + 20*uintptr(i32(0)))).X0)
- _35_pZ = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2))))) + 20*uintptr(i32(1)))).X0)
- _sqlite3TreeViewLine(tls, _pView, str(25414))
- _sqlite3TreeViewExpr(tls, _pView, _35_pX, uint8(i32(1)))
- _sqlite3TreeViewExpr(tls, _pView, _35_pY, uint8(i32(1)))
- _sqlite3TreeViewExpr(tls, _pView, _35_pZ, uint8(i32(0)))
+ _35_pX = (*XExpr)(_pExpr.XpLeft)
+ _35_pY = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), 0).XpExpr)
+ _35_pZ = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), uintptr(1)).XpExpr)
+ _sqlite3TreeViewLine(tls, _pView, str(25369))
+ _sqlite3TreeViewExpr(tls, _pView, _35_pX, uint8(1))
+ _sqlite3TreeViewExpr(tls, _pView, _35_pY, uint8(1))
+ _sqlite3TreeViewExpr(tls, _pView, _35_pZ, 0)
goto _60
_52:
- _sqlite3TreeViewLine(tls, _pView, str(37908), unsafe.Pointer(func() *int8 {
- if (_pExpr.X8) != 0 {
- return str(47510)
+ _sqlite3TreeViewLine(tls, _pView, str(37863), unsafe.Pointer(func() *int8 {
+ if _pExpr.XiTable != 0 {
+ return str(47465)
}
- return str(47514)
- }()), int32(_pExpr.X9))
+ return str(47469)
+ }()), int32(_pExpr.XiColumn))
goto _60
_53:
- _sqlite3TreeViewLine(tls, _pView, str(25809))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X4), uint8(i32(1)))
- _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))), uint8(i32(0)), nil)
+ _sqlite3TreeViewLine(tls, _pView, str(25764))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpLeft), uint8(1))
+ _sqlite3TreeViewExprList(tls, _pView, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))), 0, nil)
goto _60
_54:
- _38_zType = str(47518)
- switch int32(_pExpr.X1) {
- case i32(1):
+ _38_zType = str(47473)
+ switch int32(_pExpr.Xaffinity) {
+ case int32(1):
goto _75
- case i32(2):
+ case int32(2):
goto _76
- case i32(3):
+ case int32(3):
goto _77
- case i32(4):
+ case int32(4):
goto _78
default:
goto _79
}
_75:
- _38_zType = str(47522)
+ _38_zType = str(47477)
goto _79
_76:
- _38_zType = str(47531)
+ _38_zType = str(47486)
goto _79
_77:
- _38_zType = str(47537)
+ _38_zType = str(47492)
goto _79
_78:
- _38_zType = str(47542)
+ _38_zType = str(47497)
goto _79
_79:
- _sqlite3TreeViewLine(tls, _pView, str(47549), unsafe.Pointer(_38_zType), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))))
+ _sqlite3TreeViewLine(tls, _pView, str(47504), unsafe.Pointer(_38_zType), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pExpr.Xu))))
goto _60
_55:
- _sqlite3TreeViewLine(tls, _pView, str(47562), _pExpr.X8, int32(_pExpr.X9), unsafe.Pointer((*int8)(unsafe.Pointer(&_zFlgs))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X5), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(47517), _pExpr.XiTable, int32(_pExpr.XiColumn), unsafe.Pointer(&_zFlgs))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpRight), 0)
goto _60
_56:
- _sqlite3TreeViewBareExprList(tls, _pView, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))), str(47578))
+ _sqlite3TreeViewBareExprList(tls, _pView, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))), str(47533))
goto _60
_57:
- _sqlite3TreeViewLine(tls, _pView, str(47585), int32(_pExpr.X9))
- _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)(_pExpr.X4).X6)))))), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(47540), int32(_pExpr.XiColumn))
+ _sqlite3TreeViewSelect(tls, _pView, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)(_pExpr.XpLeft).Xx)))), 0)
goto _60
_58:
- _sqlite3TreeViewLine(tls, _pView, str(47602), _pExpr.X8)
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X4), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(47557), _pExpr.XiTable)
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpLeft), 0)
goto _60
_59:
- _sqlite3TreeViewLine(tls, _pView, str(47617), int32(_pExpr.X0))
+ _sqlite3TreeViewLine(tls, _pView, str(47572), int32(_pExpr.Xop))
goto _60
_60:
if _zBinOp != nil {
- _sqlite3TreeViewLine(tls, _pView, str(6890), unsafe.Pointer(_zBinOp), unsafe.Pointer((*int8)(unsafe.Pointer(&_zFlgs))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X4), uint8(i32(1)))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X5), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(6791), unsafe.Pointer(_zBinOp), unsafe.Pointer(&_zFlgs))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpLeft), uint8(1))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpRight), 0)
goto _82
}
if _zUniOp != nil {
- _sqlite3TreeViewLine(tls, _pView, str(6890), unsafe.Pointer(_zUniOp), unsafe.Pointer((*int8)(unsafe.Pointer(&_zFlgs))))
- _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.X4), uint8(i32(0)))
+ _sqlite3TreeViewLine(tls, _pView, str(6791), unsafe.Pointer(_zUniOp), unsafe.Pointer(&_zFlgs))
+ _sqlite3TreeViewExpr(tls, _pView, (*XExpr)(_pExpr.XpLeft), 0)
}
_82:
_sqlite3TreeViewPop(tls, _pView)
@@ -33971,46 +34676,49 @@ _82:
var _sqlite3SelectØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SelectØ00__func__Ø000[0], str(47623), 14)
+ crt.Xstrncpy(nil, &_sqlite3SelectØ00__func__Ø000[0], str(47578), 14)
}
-// This routine sets up a SELECT statement for processing. The
-// following is accomplished:
-//
-// * VDBE Cursor numbers are assigned to all FROM-clause terms.
-// * Ephemeral Table objects are created for all FROM-clause subqueries.
-// * ON and USING clauses are shifted into WHERE statements
-// * Wildcards "*" and "TABLE.*" in result sets are expanded.
-// * Identifiers in expression are matched to tables.
-//
-// This routine acts recursively on all subqueries within the SELECT.
+// C comment
+// /*
+// ** This routine sets up a SELECT statement for processing. The
+// ** following is accomplished:
+// **
+// ** * VDBE Cursor numbers are assigned to all FROM-clause terms.
+// ** * Ephemeral Table objects are created for all FROM-clause subqueries.
+// ** * ON and USING clauses are shifted into WHERE statements
+// ** * Wildcards "*" and "TABLE.*" in result sets are expanded.
+// ** * Identifiers in expression are matched to tables.
+// **
+// ** This routine acts recursively on all subqueries within the SELECT.
+// */
func _sqlite3SelectPrep(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pOuterNC *XNameContext) {
var _db *Xsqlite3
if func() int32 {
if _p == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121240), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectPrepØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121240), unsafe.Pointer(&_sqlite3SelectPrepØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
- _db = (*Xsqlite3)(_pParse.X0)
- if (_db.X17) != 0 {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _db.XmallocFailed != 0 {
return
}
- if ((_p.X3) & uint32(i32(128))) != 0 {
+ if (_p.XselFlags & uint32(128)) != 0 {
return
}
_sqlite3SelectExpand(tls, _pParse, _p)
- if (_pParse.X16) != 0 || ((_db.X17) != 0) {
+ if _pParse.XnErr != 0 || (_db.XmallocFailed != 0) {
return
}
_sqlite3ResolveSelectNames(tls, _pParse, _p, _pOuterNC)
- if (_pParse.X16) != 0 || ((_db.X17) != 0) {
+ if _pParse.XnErr != 0 || (_db.XmallocFailed != 0) {
return
}
_sqlite3SelectAddTypeInfo(tls, _pParse, _p)
@@ -34019,66 +34727,74 @@ func _sqlite3SelectPrep(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pOuterNC *X
var _sqlite3SelectPrepØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SelectPrepØ00__func__Ø000[0], str(47637), 18)
+ crt.Xstrncpy(nil, &_sqlite3SelectPrepØ00__func__Ø000[0], str(47592), 18)
}
-// This routine "expands" a SELECT statement and all of its subqueries.
-// For additional information on what it means to "expand" a SELECT
-// statement, see the comment on the selectExpand worker callback above.
-//
-// Expanding a SELECT statement is the first step in processing a
-// SELECT statement. The SELECT statement must be expanded before
-// name resolution is performed.
-//
-// If anything goes wrong, an error message is written into pParse.
-// The calling function can detect the problem by looking at pParse->nErr
-// and/or pParse->db->mallocFailed.
+// C comment
+// /*
+// ** This routine "expands" a SELECT statement and all of its subqueries.
+// ** For additional information on what it means to "expand" a SELECT
+// ** statement, see the comment on the selectExpand worker callback above.
+// **
+// ** Expanding a SELECT statement is the first step in processing a
+// ** SELECT statement. The SELECT statement must be expanded before
+// ** name resolution is performed.
+// **
+// ** If anything goes wrong, an error message is written into pParse.
+// ** The calling function can detect the problem by looking at pParse->nErr
+// ** and/or pParse->db->mallocFailed.
+// */
func _sqlite3SelectExpand(tls *crt.TLS, _pParse *XParse, _pSelect *XSelect) {
var _w XWalker
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _sqlite3ExprWalkNoop
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_w.X0))))) = _pParse
- if (_pParse.X10) != 0 {
- *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X2))))) = _convertCompoundSelectToSubquery
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _sqlite3ExprWalkNoop
+ *(**XParse)(unsafe.Pointer(&_w.XpParse)) = _pParse
+ if _pParse.XhasCompound != 0 {
+ *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&_w.XxSelectCallback)) = _convertCompoundSelectToSubquery
_sqlite3WalkSelect(tls, &_w, _pSelect)
}
- *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X2))))) = _selectExpander
- *(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&(_w.X3))))) = _selectPopWith
+ *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&_w.XxSelectCallback)) = _selectExpander
+ *(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer(&_w.XxSelectCallback2)) = _selectPopWith
_sqlite3WalkSelect(tls, &_w, _pSelect)
- _ = _w
}
-// No-op routine for the parse-tree walker.
-//
-// When this routine is the Walker.xExprCallback then expression trees
-// are walked without any actions being taken at each node. Presumably,
-// when this routine is used for Walker.xExprCallback then
-// Walker.xSelectCallback is set to do something useful for every
-// subquery in the parser tree.
+// C comment
+// /*
+// ** No-op routine for the parse-tree walker.
+// **
+// ** When this routine is the Walker.xExprCallback then expression trees
+// ** are walked without any actions being taken at each node. Presumably,
+// ** when this routine is used for Walker.xExprCallback then
+// ** Walker.xSelectCallback is set to do something useful for every
+// ** subquery in the parser tree.
+// */
func _sqlite3ExprWalkNoop(tls *crt.TLS, _NotUsed *XWalker, _NotUsed2 *XExpr) (r0 int32) {
_ = _NotUsed2
- return i32(0)
-}
-
-// Detect compound SELECT statements that use an ORDER BY clause with
-// an alternative collating sequence.
-//
-// SELECT ... FROM t1 EXCEPT SELECT ... FROM t2 ORDER BY .. COLLATE ...
-//
-// These are rewritten as a subquery:
-//
-// SELECT * FROM (SELECT ... FROM t1 EXCEPT SELECT ... FROM t2)
-// ORDER BY ... COLLATE ...
-//
-// This transformation is necessary because the multiSelectOrderBy() routine
-// above that generates the code for a compound SELECT with an ORDER BY clause
-// uses a merge algorithm that requires the same collating sequence on the
-// result columns as on the ORDER BY clause. See ticket
-// http://www.sqlite.org/src/info/6709574d2a
-//
-// This transformation is only needed for EXCEPT, INTERSECT, and UNION.
-// The UNION ALL operator works fine with multiSelectOrderBy() even when
-// there are COLLATE terms in the ORDER BY.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Detect compound SELECT statements that use an ORDER BY clause with
+// ** an alternative collating sequence.
+// **
+// ** SELECT ... FROM t1 EXCEPT SELECT ... FROM t2 ORDER BY .. COLLATE ...
+// **
+// ** These are rewritten as a subquery:
+// **
+// ** SELECT * FROM (SELECT ... FROM t1 EXCEPT SELECT ... FROM t2)
+// ** ORDER BY ... COLLATE ...
+// **
+// ** This transformation is necessary because the multiSelectOrderBy() routine
+// ** above that generates the code for a compound SELECT with an ORDER BY clause
+// ** uses a merge algorithm that requires the same collating sequence on the
+// ** result columns as on the ORDER BY clause. See ticket
+// ** http://www.sqlite.org/src/info/6709574d2a
+// **
+// ** This transformation is only needed for EXCEPT, INTERSECT, and UNION.
+// ** The UNION ALL operator works fine with multiSelectOrderBy() even when
+// ** there are COLLATE terms in the ORDER BY.
+// */
func _convertCompoundSelectToSubquery(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) (r0 int32) {
var _i int32
var _dummy XToken
@@ -34087,150 +34803,142 @@ func _convertCompoundSelectToSubquery(tls *crt.TLS, _pWalker *XWalker, _p *XSele
var _a *TExprList_item
var _pNew, _pX *XSelect
var _pParse *XParse
- if (*XSelect)(_p.X13) == nil {
- return i32(0)
+ if (*XSelect)(_p.XpPrior) == nil {
+ return int32(0)
}
- if (*XExprList)(_p.X12) == nil {
- return i32(0)
+ if (*XExprList)(_p.XpOrderBy) == nil {
+ return int32(0)
}
_pX = _p
_2:
- if _pX == nil || int32(_pX.X1) != i32(116) && int32(_pX.X1) != i32(119) {
+ if _pX == nil || int32(_pX.Xop) != int32(116) && int32(_pX.Xop) != int32(119) {
goto _7
}
- _pX = (*XSelect)(_pX.X13)
+ _pX = (*XSelect)(_pX.XpPrior)
goto _2
_7:
if _pX == nil {
- return i32(0)
+ return int32(0)
}
- _a = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.X12).X2)))))
- _i = ((*XExprList)(_p.X12).X0) - i32(1)
+ _a = (*TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.XpOrderBy).Xa)))
+ _i = ((*XExprList)(_p.XpOrderBy).XnExpr) - int32(1)
_9:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _12
}
- if (((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a)) + 20*uintptr(_i))).X0).X2) & uint32(i32(256))) != 0 {
+ if (((*XExpr)(elem57(_a, uintptr(_i)).XpExpr).Xflags) & uint32(256)) != 0 {
goto _12
}
_i -= 1
goto _9
_12:
- if _i < i32(0) {
- return i32(0)
+ if _i < int32(0) {
+ return int32(0)
}
- _pParse = (*XParse)(_pWalker.X0)
- _db = (*Xsqlite3)(_pParse.X0)
- _pNew = (*XSelect)(_sqlite3DbMallocZero(tls, _db, uint64(u32(80))))
+ _pParse = (*XParse)(_pWalker.XpParse)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pNew = (*XSelect)(_sqlite3DbMallocZero(tls, _db, uint64(80)))
if _pNew == nil {
- return i32(2)
+ return int32(2)
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_dummy), i32(0), u32(8))
+ crt.Xmemset(tls, unsafe.Pointer(&_dummy), int32(0), uint32(8))
_pNewSrc = _sqlite3SrcListAppendFromTerm(tls, _pParse, nil, nil, nil, &_dummy, _pNew, nil, nil)
if _pNewSrc == nil {
- return i32(2)
+ return int32(2)
}
*_pNew = *_p
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X8))))) = _pNewSrc
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _sqlite3ExprListAppend(tls, _pParse, nil, _sqlite3Expr(tls, _db, i32(161), nil))
- *(*uint8)(unsafe.Pointer(&(_p.X1))) = uint8(i32(119))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))) = nil
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X10))))) = nil
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X11))))) = nil
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X12))))) = nil
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = nil
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X14))))) = nil
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X17))))) = nil
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) & uint32(i32(-257))
- sink5(*p)
- }
- func() {
- if ((_p.X3) & uint32(i32(65536))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120599), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertCompoundSelectToSubqueryØ00__func__Ø000))), unsafe.Pointer(str(47655)))
- crt.X__builtin_abort(tls)
- }
- }()
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) | uint32(i32(65536))
- sink5(*p)
- }
- func() {
- if (*XSelect)(_pNew.X13) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120601), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertCompoundSelectToSubqueryØ00__func__Ø000))), unsafe.Pointer(str(47687)))
- crt.X__builtin_abort(tls)
- }
- }()
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XSelect)(_pNew.X13).X14))))) = _pNew
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X15))))) = nil
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X16))))) = nil
- return i32(0)
-
- _ = _dummy
- panic(0)
-}
-
-// This routine is called by the parser to add a new term to the
-// end of a growing FROM clause. The "p" parameter is the part of
-// the FROM clause that has already been constructed. "p" is NULL
-// if this is the first term of the FROM clause. pTable and pDatabase
-// are the name of the table and database named in the FROM clause term.
-// pDatabase is NULL if the database name qualifier is missing - the
-// usual case. If the term has an alias, then pAlias points to the
-// alias token. If the term is a subquery, then pSubquery is the
-// SELECT statement that the subquery encodes. The pTable and
-// pDatabase parameters are NULL for subqueries. The pOn and pUsing
-// parameters are the content of the ON and USING clauses.
-//
-// Return a new SrcList which encodes is the FROM with the new
-// term added.
+ *(**XSrcList)(unsafe.Pointer(&_p.XpSrc)) = _pNewSrc
+ *(**XExprList)(unsafe.Pointer(&_p.XpEList)) = _sqlite3ExprListAppend(tls, _pParse, nil, _sqlite3Expr(tls, _db, int32(161), nil))
+ _p.Xop = uint8(119)
+ *(**XExpr)(unsafe.Pointer(&_p.XpWhere)) = nil
+ *(**XExprList)(unsafe.Pointer(&_pNew.XpGroupBy)) = nil
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpHaving)) = nil
+ *(**XExprList)(unsafe.Pointer(&_pNew.XpOrderBy)) = nil
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = nil
+ *(**XSelect)(unsafe.Pointer(&_p.XpNext)) = nil
+ *(**XWith)(unsafe.Pointer(&_p.XpWith)) = nil
+ _p.XselFlags &= uint32(4294967039)
+ func() {
+ if (_p.XselFlags & uint32(65536)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120599), unsafe.Pointer(&_convertCompoundSelectToSubqueryØ00__func__Ø000), unsafe.Pointer(str(47610)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _p.XselFlags |= uint32(65536)
+ func() {
+ if (*XSelect)(_pNew.XpPrior) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120601), unsafe.Pointer(&_convertCompoundSelectToSubqueryØ00__func__Ø000), unsafe.Pointer(str(47642)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ *(**XSelect)(unsafe.Pointer(&((*XSelect)(_pNew.XpPrior).XpNext))) = _pNew
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpLimit)) = nil
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpOffset)) = nil
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** This routine is called by the parser to add a new term to the
+// ** end of a growing FROM clause. The "p" parameter is the part of
+// ** the FROM clause that has already been constructed. "p" is NULL
+// ** if this is the first term of the FROM clause. pTable and pDatabase
+// ** are the name of the table and database named in the FROM clause term.
+// ** pDatabase is NULL if the database name qualifier is missing - the
+// ** usual case. If the term has an alias, then pAlias points to the
+// ** alias token. If the term is a subquery, then pSubquery is the
+// ** SELECT statement that the subquery encodes. The pTable and
+// ** pDatabase parameters are NULL for subqueries. The pOn and pUsing
+// ** parameters are the content of the ON and USING clauses.
+// **
+// ** Return a new SrcList which encodes is the FROM with the new
+// ** term added.
+// */
func _sqlite3SrcListAppendFromTerm(tls *crt.TLS, _pParse *XParse, _p *XSrcList, _pTable *XToken, _pDatabase *XToken, _pAlias *XToken, _pSubquery *XSelect, _pOn *XExpr, _pUsing *XIdList) (r0 *XSrcList) {
var _db *Xsqlite3
var _pItem *TSrcList_item
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
if (_p == nil) && ((_pOn != nil) || (_pUsing != nil)) {
- _sqlite3ErrorMsg(tls, _pParse, str(47703), unsafe.Pointer(func() *int8 {
+ _sqlite3ErrorMsg(tls, _pParse, str(47658), unsafe.Pointer(func() *int8 {
if _pOn != nil {
- return str(25623)
+ return str(25578)
}
- return str(25739)
+ return str(25694)
}()))
goto _append_from_error
}
_p = _sqlite3SrcListAppend(tls, _db, _p, _pTable, _pDatabase)
if (_p == nil) || func() int32 {
- if (_p.X0) == i32(0) {
+ if _p.XnSrc == int32(0) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103550), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListAppendFromTermØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103550), unsafe.Pointer(&_sqlite3SrcListAppendFromTermØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _append_from_error
}
- _pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_p.X2))))) + 68*uintptr((_p.X0)-i32(1))))
+ _pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_p.XnSrc-int32(1)))
func() {
if _pAlias == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103554), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListAppendFromTermØ00__func__Ø000))), unsafe.Pointer(str(47739)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103554), unsafe.Pointer(&_sqlite3SrcListAppendFromTermØ00__func__Ø000), unsafe.Pointer(str(47694)))
crt.X__builtin_abort(tls)
}
}()
- if (_pAlias.X1) != 0 {
- *(**int8)(unsafe.Pointer(&(_pItem.X3))) = _sqlite3NameFromToken(tls, _db, _pAlias)
+ if _pAlias.Xn != 0 {
+ _pItem.XzAlias = _sqlite3NameFromToken(tls, _db, _pAlias)
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pItem.X5))))) = _pSubquery
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pItem.X12))))) = _pOn
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pItem.X13))))) = _pUsing
+ *(**XSelect)(unsafe.Pointer(&_pItem.XpSelect)) = _pSubquery
+ *(**XExpr)(unsafe.Pointer(&_pItem.XpOn)) = _pOn
+ *(**XIdList)(unsafe.Pointer(&_pItem.XpUsing)) = _pUsing
return _p
_append_from_error:
func() {
if _p != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103564), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListAppendFromTermØ00__func__Ø000))), unsafe.Pointer(str(47749)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103564), unsafe.Pointer(&_sqlite3SrcListAppendFromTermØ00__func__Ø000), unsafe.Pointer(str(47704)))
crt.X__builtin_abort(tls)
}
}()
@@ -34240,74 +34948,77 @@ _append_from_error:
return nil
}
-// Append a new table name to the given SrcList. Create a new SrcList if
-// need be. A new entry is created in the SrcList even if pTable is NULL.
-//
-// A SrcList is returned, or NULL if there is an OOM error. The returned
-// SrcList might be the same as the SrcList that was input or it might be
-// a new one. If an OOM error does occurs, then the prior value of pList
-// that is input to this routine is automatically freed.
-//
-// If pDatabase is not null, it means that the table has an optional
-// database name prefix. Like this: "database.table". The pDatabase
-// points to the table name and the pTable points to the database name.
-// The SrcList.a[].zName field is filled with the table name which might
-// come from pTable (if pDatabase is NULL) or from pDatabase.
-// SrcList.a[].zDatabase is filled with the database name from pTable,
-// or with NULL if no database is specified.
-//
-// In other words, if call like this:
-//
-// sqlite3SrcListAppend(D,A,B,0);
-//
-// Then B is a table name and the database name is unspecified. If called
-// like this:
-//
-// sqlite3SrcListAppend(D,A,B,C);
-//
-// Then C is the table name and B is the database name. If C is defined
-// then so is B. In other words, we never have a case where:
-//
-// sqlite3SrcListAppend(D,A,0,C);
-//
-// Both pTable and pDatabase are assumed to be quoted. They are dequoted
-// before being added to the SrcList.
+// C comment
+// /*
+// ** Append a new table name to the given SrcList. Create a new SrcList if
+// ** need be. A new entry is created in the SrcList even if pTable is NULL.
+// **
+// ** A SrcList is returned, or NULL if there is an OOM error. The returned
+// ** SrcList might be the same as the SrcList that was input or it might be
+// ** a new one. If an OOM error does occurs, then the prior value of pList
+// ** that is input to this routine is automatically freed.
+// **
+// ** If pDatabase is not null, it means that the table has an optional
+// ** database name prefix. Like this: "database.table". The pDatabase
+// ** points to the table name and the pTable points to the database name.
+// ** The SrcList.a[].zName field is filled with the table name which might
+// ** come from pTable (if pDatabase is NULL) or from pDatabase.
+// ** SrcList.a[].zDatabase is filled with the database name from pTable,
+// ** or with NULL if no database is specified.
+// **
+// ** In other words, if call like this:
+// **
+// ** sqlite3SrcListAppend(D,A,B,0);
+// **
+// ** Then B is a table name and the database name is unspecified. If called
+// ** like this:
+// **
+// ** sqlite3SrcListAppend(D,A,B,C);
+// **
+// ** Then C is the table name and B is the database name. If C is defined
+// ** then so is B. In other words, we never have a case where:
+// **
+// ** sqlite3SrcListAppend(D,A,0,C);
+// **
+// ** Both pTable and pDatabase are assumed to be quoted. They are dequoted
+// ** before being added to the SrcList.
+// */
func _sqlite3SrcListAppend(tls *crt.TLS, _db *Xsqlite3, _pList *XSrcList, _pTable *XToken, _pDatabase *XToken) (r0 *XSrcList) {
var _5_pTemp *XToken
var _pItem *TSrcList_item
func() {
if _pDatabase != nil && _pTable == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103446), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListAppendØ00__func__Ø000))), unsafe.Pointer(str(47754)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103446), unsafe.Pointer(&_sqlite3SrcListAppendØ00__func__Ø000), unsafe.Pointer(str(47709)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103447), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListAppendØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103447), unsafe.Pointer(&_sqlite3SrcListAppendØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
if _pList != nil {
goto _5
}
- _pList = (*XSrcList)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(76))))
+ _pList = (*XSrcList)(_sqlite3DbMallocRawNN(tls, _db, uint64(76)))
if _pList == nil {
return nil
}
- *(*uint32)(unsafe.Pointer(&(_pList.X1))) = uint32(i32(1))
- *(*int32)(unsafe.Pointer(&(_pList.X0))) = i32(1)
- crt.Xmemset(tls, (unsafe.Pointer)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pList.X2)))))+68*uintptr(i32(0))))), i32(0), u32(68))
- *(*int32)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pList.X2))))) + 68*uintptr(i32(0)))).X11))) = i32(-1)
+ _pList.XnAlloc = uint32(1)
+ _pList.XnSrc = int32(1)
+ crt.Xmemset(tls, unsafe.Pointer(elem6((*TSrcList_item)(unsafe.Pointer(&_pList.Xa)), 0)), int32(0), uint32(68))
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pList.Xa)), 0).XiCursor = int32(-1)
goto _7
_5:
- _pList = _sqlite3SrcListEnlarge(tls, _db, _pList, i32(1), _pList.X0)
+ _pList = _sqlite3SrcListEnlarge(tls, _db, _pList, int32(1), _pList.XnSrc)
_7:
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
_sqlite3SrcListDelete(tls, _db, _pList)
return nil
}
- _pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pList.X2))))) + 68*uintptr((_pList.X0)-i32(1))))
- if (_pDatabase != nil) && ((_pDatabase.X0) == nil) {
+ _pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_pList.XnSrc-int32(1)))
+ if (_pDatabase != nil) && (_pDatabase.Xz == nil) {
_pDatabase = nil
}
if _pDatabase != nil {
@@ -34315,100 +35026,99 @@ _7:
_pDatabase = _pTable
_pTable = _5_pTemp
}
- *(**int8)(unsafe.Pointer(&(_pItem.X2))) = _sqlite3NameFromToken(tls, _db, _pTable)
- *(**int8)(unsafe.Pointer(&(_pItem.X1))) = _sqlite3NameFromToken(tls, _db, _pDatabase)
+ _pItem.XzName = _sqlite3NameFromToken(tls, _db, _pTable)
+ _pItem.XzDatabase = _sqlite3NameFromToken(tls, _db, _pDatabase)
return _pList
}
var _sqlite3SrcListAppendØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SrcListAppendØ00__func__Ø000[0], str(47780), 21)
-}
-
-// Expand the space allocated for the given SrcList object by
-// creating nExtra new slots beginning at iStart. iStart is zero based.
-// New slots are zeroed.
-//
-// For example, suppose a SrcList initially contains two entries: A,B.
-// To append 3 new entries onto the end, do this:
-//
-// sqlite3SrcListEnlarge(db, pSrclist, 3, 2);
-//
-// After the call above it would contain: A, B, nil, nil, nil.
-// If the iStart argument had been 1 instead of 2, then the result
-// would have been: A, nil, nil, nil, B. To prepend the new slots,
-// the iStart value would be 0. The result then would
-// be: nil, nil, nil, A, B.
-//
-// If a memory allocation fails the SrcList is unchanged. The
-// db->mallocFailed flag will be set to true.
+ crt.Xstrncpy(nil, &_sqlite3SrcListAppendØ00__func__Ø000[0], str(47735), 21)
+}
+
+// C comment
+// /*
+// ** Expand the space allocated for the given SrcList object by
+// ** creating nExtra new slots beginning at iStart. iStart is zero based.
+// ** New slots are zeroed.
+// **
+// ** For example, suppose a SrcList initially contains two entries: A,B.
+// ** To append 3 new entries onto the end, do this:
+// **
+// ** sqlite3SrcListEnlarge(db, pSrclist, 3, 2);
+// **
+// ** After the call above it would contain: A, B, nil, nil, nil.
+// ** If the iStart argument had been 1 instead of 2, then the result
+// ** would have been: A, nil, nil, nil, B. To prepend the new slots,
+// ** the iStart value would be 0. The result then would
+// ** be: nil, nil, nil, A, B.
+// **
+// ** If a memory allocation fails the SrcList is unchanged. The
+// ** db->mallocFailed flag will be set to true.
+// */
func _sqlite3SrcListEnlarge(tls *crt.TLS, _db *Xsqlite3, _pSrc *XSrcList, _nExtra int32, _iStart int32) (r0 *XSrcList) {
var _i, _1_nAlloc, _1_nGot int32
var _1_pNew *XSrcList
func() {
- if _iStart < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103366), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000))), unsafe.Pointer(str(47801)))
+ if _iStart < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103366), unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000), unsafe.Pointer(str(47756)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nExtra < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103367), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000))), unsafe.Pointer(str(47811)))
+ if _nExtra < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103367), unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000), unsafe.Pointer(str(47766)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pSrc == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103368), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000))), unsafe.Pointer(str(47821)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103368), unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000), unsafe.Pointer(str(47776)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iStart > (_pSrc.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103369), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000))), unsafe.Pointer(str(47829)))
+ if _iStart > _pSrc.XnSrc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103369), unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000), unsafe.Pointer(str(47784)))
crt.X__builtin_abort(tls)
}
}()
- if (uint32(_pSrc.X0) + uint32(_nExtra)) <= (_pSrc.X1) {
+ if (uint32(_pSrc.XnSrc) + uint32(_nExtra)) <= _pSrc.XnAlloc {
goto _8
}
- _1_nAlloc = ((_pSrc.X0) * i32(2)) + _nExtra
- _1_pNew = (*XSrcList)(_sqlite3DbRealloc(tls, _db, (unsafe.Pointer)(_pSrc), uint64(u32(76)+(uint32(_1_nAlloc-i32(1))*u32(68)))))
+ _1_nAlloc = (_pSrc.XnSrc * int32(2)) + _nExtra
+ _1_pNew = (*XSrcList)(_sqlite3DbRealloc(tls, _db, unsafe.Pointer(_pSrc), uint64(uint32(76)+(uint32(_1_nAlloc-int32(1))*uint32(68)))))
if _1_pNew == nil {
func() {
- if (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103379), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000))), unsafe.Pointer(str(47848)))
+ if _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103379), unsafe.Pointer(&_sqlite3SrcListEnlargeØ00__func__Ø000), unsafe.Pointer(str(47803)))
crt.X__builtin_abort(tls)
}
}()
return _pSrc
}
_pSrc = _1_pNew
- _1_nGot = int32(((uint32(_sqlite3DbMallocSize(tls, _db, (unsafe.Pointer)(_1_pNew))) - u32(76)) / u32(68)) + uint32(i32(1)))
- *(*uint32)(unsafe.Pointer(&(_pSrc.X1))) = uint32(_1_nGot)
+ _1_nGot = int32(((uint32(_sqlite3DbMallocSize(tls, _db, unsafe.Pointer(_1_pNew))) - uint32(76)) / uint32(68)) + uint32(1))
+ _pSrc.XnAlloc = uint32(_1_nGot)
_8:
- _i = (_pSrc.X0) - i32(1)
+ _i = _pSrc.XnSrc - int32(1)
_12:
if _i < _iStart {
goto _15
}
- *(*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(_i+_nExtra))) = *(*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(_i)))
+ *elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_i+_nExtra)) = *elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_i))
_i -= 1
goto _12
_15:
- {
- p := (*int32)(unsafe.Pointer(&(_pSrc.X0)))
- *p = (*p) + _nExtra
- sink1(*p)
- }
- crt.Xmemset(tls, (unsafe.Pointer)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(_iStart)))), i32(0), u32(68)*uint32(_nExtra))
+ _pSrc.XnSrc += _nExtra
+ crt.Xmemset(tls, unsafe.Pointer(elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_iStart))), int32(0), uint32(68)*uint32(_nExtra))
_i = _iStart
_16:
if _i >= (_iStart + _nExtra) {
goto _19
}
- *(*int32)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(_i))).X11))) = i32(-1)
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_i)).XiCursor = int32(-1)
_i += 1
goto _16
_19:
@@ -34418,24 +35128,27 @@ _19:
var _sqlite3SrcListEnlargeØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SrcListEnlargeØ00__func__Ø000[0], str(47865), 22)
+ crt.Xstrncpy(nil, &_sqlite3SrcListEnlargeØ00__func__Ø000[0], str(47820), 22)
}
-// Given a token, return a string that consists of the text of that
-// token. Space to hold the returned string
-// is obtained from sqliteMalloc() and must be freed by the calling
-// function.
-//
-// Any quotation marks (ex: "name", 'name', [name], or `name`) that
-// surround the body of the token are removed.
-//
-// Tokens are often just pointers into the original SQL text and so
-// are not \000 terminated and are not persistent. The returned string
-// is \000 terminated and is persistent.
+// C comment
+// /*
+// ** Given a token, return a string that consists of the text of that
+// ** token. Space to hold the returned string
+// ** is obtained from sqliteMalloc() and must be freed by the calling
+// ** function.
+// **
+// ** Any quotation marks (ex: "name", 'name', [name], or `name`) that
+// ** surround the body of the token are removed.
+// **
+// ** Tokens are often just pointers into the original SQL text and so
+// ** are not \000 terminated and are not persistent. The returned string
+// ** is \000 terminated and is persistent.
+// */
func _sqlite3NameFromToken(tls *crt.TLS, _db *Xsqlite3, _pName *XToken) (r0 *int8) {
var _zName *int8
if _pName != nil {
- _zName = _sqlite3DbStrNDup(tls, _db, _pName.X0, uint64(_pName.X1))
+ _zName = _sqlite3DbStrNDup(tls, _db, _pName.Xz, uint64(_pName.Xn))
_sqlite3Dequote(tls, _zName)
goto _1
}
@@ -34447,54 +35160,53 @@ _1:
var _sqlite3SrcListAppendFromTermØ00__func__Ø000 [29]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SrcListAppendFromTermØ00__func__Ø000[0], str(47887), 29)
+ crt.Xstrncpy(nil, &_sqlite3SrcListAppendFromTermØ00__func__Ø000[0], str(47842), 29)
}
-// Add a new element to the end of an expression list. If pList is
-// initially NULL, then create a new expression list.
-//
-// If a memory allocation error occurs, the entire list is freed and
-// NULL is returned. If non-NULL is returned, then it is guaranteed
-// that the new entry was successfully appended.
+// C comment
+// /*
+// ** Add a new element to the end of an expression list. If pList is
+// ** initially NULL, then create a new expression list.
+// **
+// ** If a memory allocation error occurs, the entire list is freed and
+// ** NULL is returned. If non-NULL is returned, then it is guaranteed
+// ** that the new entry was successfully appended.
+// */
func _sqlite3ExprListAppend(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _pExpr *XExpr) (r0 *XExprList) {
var _db *Xsqlite3
var _3_pNew *XExprList
var _pItem *TExprList_item
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92370), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListAppendØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92370), unsafe.Pointer(&_sqlite3ExprListAppendØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
if _pList != nil {
goto _2
}
- _pList = (*XExprList)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(28))))
+ _pList = (*XExprList)(_sqlite3DbMallocRawNN(tls, _db, uint64(28)))
if _pList == nil {
goto _no_mem
}
- *(*int32)(unsafe.Pointer(&(_pList.X0))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_pList.X1))) = i32(1)
+ _pList.XnExpr = int32(0)
+ _pList.XnAlloc = int32(1)
goto _5
_2:
- if (_pList.X0) != (_pList.X1) {
+ if _pList.XnExpr != _pList.XnAlloc {
goto _5
}
- _3_pNew = (*XExprList)(_sqlite3DbRealloc(tls, _db, (unsafe.Pointer)(_pList), uint64(u32(28)+(uint32((i32(2)*(_pList.X1))-i32(1))*u32(20)))))
+ _3_pNew = (*XExprList)(_sqlite3DbRealloc(tls, _db, unsafe.Pointer(_pList), uint64(uint32(28)+(uint32((int32(2)*_pList.XnAlloc)-int32(1))*uint32(20)))))
if _3_pNew == nil {
goto _no_mem
}
_pList = _3_pNew
- {
- p := (*int32)(unsafe.Pointer(&(_pList.X1)))
- *p = (*p) * i32(2)
- sink1(*p)
- }
+ _pList.XnAlloc *= int32(2)
_5:
- _pItem = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(postInc1((*int32)(unsafe.Pointer(&(_pList.X0))), int32(1)))))
- crt.Xmemset(tls, (unsafe.Pointer)(_pItem), i32(0), u32(20))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pItem.X0))))) = _pExpr
+ _pItem = elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(postInc2(&_pList.XnExpr, 1)))
+ crt.Xmemset(tls, unsafe.Pointer(_pItem), int32(0), uint32(20))
+ *(**XExpr)(unsafe.Pointer(&_pItem.XpExpr)) = _pExpr
return _pList
_no_mem:
@@ -34506,113 +35218,108 @@ _no_mem:
var _sqlite3ExprListAppendØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprListAppendØ00__func__Ø000[0], str(47916), 22)
+ crt.Xstrncpy(nil, &_sqlite3ExprListAppendØ00__func__Ø000[0], str(47871), 22)
}
-// Allocate a new expression node from a zero-terminated token that has
-// already been dequoted.
+// C comment
+// /*
+// ** Allocate a new expression node from a zero-terminated token that has
+// ** already been dequoted.
+// */
func _sqlite3Expr(tls *crt.TLS, _db *Xsqlite3, _op int32, _zToken *int8) (r0 *XExpr) {
var _x XToken
- *(**int8)(unsafe.Pointer(&(_x.X0))) = _zToken
- *(*uint32)(unsafe.Pointer(&(_x.X1))) = uint32(func() int32 {
+ _x.Xz = _zToken
+ _x.Xn = uint32(func() int32 {
if _zToken != nil {
return _sqlite3Strlen30(tls, _zToken)
}
- return i32(0)
+ return int32(0)
}())
- return _sqlite3ExprAlloc(tls, _db, _op, &_x, i32(0))
-
- _ = _x
- panic(0)
-}
-
-// This routine is the core allocator for Expr nodes.
-//
-// Construct a new expression node and return a pointer to it. Memory
-// for this node and for the pToken argument is a single allocation
-// obtained from sqlite3DbMalloc(). The calling function
-// is responsible for making sure the node eventually gets freed.
-//
-// If dequote is true, then the token (if it exists) is dequoted.
-// If dequote is false, no dequoting is performed. The deQuote
-// parameter is ignored if pToken is NULL or if the token does not
-// appear to be quoted. If the quotes were of the form "..." (double-quotes)
-// then the EP_DblQuoted flag is set on the expression node.
-//
-// Special case: If op==TK_INTEGER and pToken points to a string that
-// can be translated into a 32-bit integer, then the token is not
-// stored in u.zToken. Instead, the integer values is written
-// into u.iValue and the EP_IntValue flag is set. No extra storage
-// is allocated to hold the integer text and the dequote flag is ignored.
+ return _sqlite3ExprAlloc(tls, _db, _op, &_x, int32(0))
+}
+
+// C comment
+// /*
+// ** This routine is the core allocator for Expr nodes.
+// **
+// ** Construct a new expression node and return a pointer to it. Memory
+// ** for this node and for the pToken argument is a single allocation
+// ** obtained from sqlite3DbMalloc(). The calling function
+// ** is responsible for making sure the node eventually gets freed.
+// **
+// ** If dequote is true, then the token (if it exists) is dequoted.
+// ** If dequote is false, no dequoting is performed. The deQuote
+// ** parameter is ignored if pToken is NULL or if the token does not
+// ** appear to be quoted. If the quotes were of the form "..." (double-quotes)
+// ** then the EP_DblQuoted flag is set on the expression node.
+// **
+// ** Special case: If op==TK_INTEGER and pToken points to a string that
+// ** can be translated into a 32-bit integer, then the token is not
+// ** stored in u.zToken. Instead, the integer values is written
+// ** into u.iValue and the EP_IntValue flag is set. No extra storage
+// ** is allocated to hold the integer text and the dequote flag is ignored.
+// */
func _sqlite3ExprAlloc(tls *crt.TLS, _db *Xsqlite3, _op int32, _pToken *XToken, _dequote int32) (r0 *XExpr) {
var _nExtra, _iValue int32
var _pNew *XExpr
- _nExtra = i32(0)
- _iValue = i32(0)
+ _nExtra = int32(0)
+ _iValue = int32(0)
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91630), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAllocØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91630), unsafe.Pointer(&_sqlite3ExprAllocØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
if _pToken == nil {
goto _2
}
- if ((_op != i32(134)) || ((_pToken.X0) == nil)) || (_sqlite3GetInt32(tls, _pToken.X0, &_iValue) == i32(0)) {
- _nExtra = int32((_pToken.X1) + uint32(i32(1)))
+ if ((_op != int32(134)) || (_pToken.Xz == nil)) || (_sqlite3GetInt32(tls, _pToken.Xz, &_iValue) == int32(0)) {
+ _nExtra = int32(_pToken.Xn + uint32(1))
func() {
- if _iValue < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91635), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAllocØ00__func__Ø000))), unsafe.Pointer(str(47938)))
+ if _iValue < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91635), unsafe.Pointer(&_sqlite3ExprAllocØ00__func__Ø000), unsafe.Pointer(str(47893)))
crt.X__builtin_abort(tls)
}
}()
}
_2:
- _pNew = (*XExpr)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(48)+uint32(_nExtra))))
+ _pNew = (*XExpr)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(48)+uint32(_nExtra))))
if _pNew == nil {
goto _8
}
- crt.Xmemset(tls, (unsafe.Pointer)(_pNew), i32(0), u32(48))
- *(*uint8)(unsafe.Pointer(&(_pNew.X0))) = uint8(_op)
- *(*int16)(unsafe.Pointer(&(_pNew.X10))) = int16(i32(-1))
+ crt.Xmemset(tls, unsafe.Pointer(_pNew), int32(0), uint32(48))
+ _pNew.Xop = uint8(_op)
+ _pNew.XiAgg = int16(-1)
if _pToken == nil {
goto _9
}
- if _nExtra == i32(0) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X2)))
- *p = (*p) | uint32(i32(1024))
- sink5(*p)
- }
- *(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pNew.X3))))) = _iValue
+ if _nExtra == int32(0) {
+ _pNew.Xflags |= uint32(1024)
+ *(*int32)(unsafe.Pointer(&_pNew.Xu)) = _iValue
goto _11
}
- *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pNew.X3))))) = (*int8)(unsafe.Pointer((*XExpr)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew)) + 48*uintptr(i32(1))))))
+ *(**int8)(unsafe.Pointer(&_pNew.Xu)) = (*int8)(unsafe.Pointer(elem58(_pNew, uintptr(1))))
func() {
- if (_pToken.X0) == nil && (_pToken.X1) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91649), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAllocØ00__func__Ø000))), unsafe.Pointer(str(47948)))
+ if _pToken.Xz == nil && _pToken.Xn != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91649), unsafe.Pointer(&_sqlite3ExprAllocØ00__func__Ø000), unsafe.Pointer(str(47903)))
crt.X__builtin_abort(tls)
}
}()
- if (_pToken.X1) != 0 {
- crt.Xmemcpy(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pNew.X3)))))), (unsafe.Pointer)(_pToken.X0), _pToken.X1)
+ if _pToken.Xn != 0 {
+ crt.Xmemcpy(tls, unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pNew.Xu))), unsafe.Pointer(_pToken.Xz), _pToken.Xn)
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pNew.X3))))))) + 1*uintptr(_pToken.X1))) = int8(i32(0))
- if _dequote == 0 || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pNew.X3))))))) + 1*uintptr(i32(0)))))))))&i32(128)) == 0 {
+ *elem1(*(**int8)(unsafe.Pointer(&_pNew.Xu)), uintptr(_pToken.Xn)) = 0
+ if _dequote == 0 || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(*(**int8)(unsafe.Pointer(&_pNew.Xu)), 0)))))&int32(128)) == 0 {
goto _17
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pNew.X3))))))) + 1*uintptr(i32(0))))) == i32(34) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X2)))
- *p = (*p) | uint32(i32(64))
- sink5(*p)
- }
+ if int32(*elem1(*(**int8)(unsafe.Pointer(&_pNew.Xu)), 0)) == int32(34) {
+ _pNew.Xflags |= uint32(64)
}
- _sqlite3Dequote(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pNew.X3))))))
+ _sqlite3Dequote(tls, *(**int8)(unsafe.Pointer(&_pNew.Xu)))
_17:
_11:
_9:
- *(*int32)(unsafe.Pointer(&(_pNew.X7))) = i32(1)
+ _pNew.XnHeight = int32(1)
_8:
return _pNew
}
@@ -34620,260 +35327,273 @@ _8:
var _sqlite3ExprAllocØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprAllocØ00__func__Ø000[0], str(47977), 17)
+ crt.Xstrncpy(nil, &_sqlite3ExprAllocØ00__func__Ø000[0], str(47932), 17)
}
var _convertCompoundSelectToSubqueryØ00__func__Ø000 [32]int8
func init() {
- crt.Xstrncpy(nil, &_convertCompoundSelectToSubqueryØ00__func__Ø000[0], str(47994), 32)
-}
-
-// Call sqlite3WalkExpr() for every expression in Select statement p.
-// Invoke sqlite3WalkSelect() for subqueries in the FROM clause and
-// on the compound select chain, p->pPrior.
-//
-// If it is not NULL, the xSelectCallback() callback is invoked before
-// the walk of the expressions and FROM clause. The xSelectCallback2()
-// method, if it is not NULL, is invoked following the walk of the
-// expressions and FROM clause.
-//
-// Return WRC_Continue under normal conditions. Return WRC_Abort if
-// there is an abort request.
-//
-// If the Walker does not have an xSelectCallback() then this routine
-// is a no-op returning WRC_Continue.
+ crt.Xstrncpy(nil, &_convertCompoundSelectToSubqueryØ00__func__Ø000[0], str(47949), 32)
+}
+
+// C comment
+// /*
+// ** Call sqlite3WalkExpr() for every expression in Select statement p.
+// ** Invoke sqlite3WalkSelect() for subqueries in the FROM clause and
+// ** on the compound select chain, p->pPrior.
+// **
+// ** If it is not NULL, the xSelectCallback() callback is invoked before
+// ** the walk of the expressions and FROM clause. The xSelectCallback2()
+// ** method, if it is not NULL, is invoked following the walk of the
+// ** expressions and FROM clause.
+// **
+// ** Return WRC_Continue under normal conditions. Return WRC_Abort if
+// ** there is an abort request.
+// **
+// ** If the Walker does not have an xSelectCallback() then this routine
+// ** is a no-op returning WRC_Continue.
+// */
func _sqlite3WalkSelect(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) (r0 int32) {
var _rc int32
- if (_p == nil) || ((*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XWalker, *XSelect) int32
- }{(*(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- }{(_pWalker.X2)})))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XWalker, *XSelect) int32
- }{nil}))) && (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XWalker, *XSelect)
- }{(*(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
- }{(_pWalker.X3)})))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XWalker, *XSelect)
- }{nil})))) {
- return i32(0)
- }
- _rc = i32(0)
- *(*int32)(unsafe.Pointer(&(_pWalker.X4))) += 1
+ if (_p == nil) || ((func() func(*crt.TLS, *XWalker, *XSelect) int32 {
+ v := _pWalker.XxSelectCallback
+ return *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&v))
+ }() == nil) && (func() func(*crt.TLS, *XWalker, *XSelect) {
+ v := _pWalker.XxSelectCallback2
+ return *(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer(&v))
+ }() == nil)) {
+ return int32(0)
+ }
+ _rc = int32(0)
+ _pWalker.XwalkerDepth += 1
_3:
if _p == nil {
goto _4
}
- if (*(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- }{(_pWalker.X2)}))) == nil {
+ if _pWalker.XxSelectCallback == nil {
goto _5
}
- _rc = (*(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- }{(_pWalker.X2)})))(tls, _pWalker, _p)
+ _rc = func() func(*crt.TLS, *XWalker, *XSelect) int32 {
+ v := _pWalker.XxSelectCallback
+ return *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&v))
+ }()(tls, _pWalker, _p)
if _rc != 0 {
goto _4
}
_5:
if _sqlite3WalkSelectExpr(tls, _pWalker, _p) != 0 || _sqlite3WalkSelectFrom(tls, _pWalker, _p) != 0 {
- *(*int32)(unsafe.Pointer(&(_pWalker.X4))) -= 1
- return i32(2)
+ _pWalker.XwalkerDepth -= 1
+ return int32(2)
}
- if (*(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
- }{(_pWalker.X3)}))) != nil {
- (*(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
- }{(_pWalker.X3)})))(tls, _pWalker, _p)
+ if _pWalker.XxSelectCallback2 != nil {
+ func() func(*crt.TLS, *XWalker, *XSelect) {
+ v := _pWalker.XxSelectCallback2
+ return *(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer(&v))
+ }()(tls, _pWalker, _p)
}
- _p = (*XSelect)(_p.X13)
+ _p = (*XSelect)(_p.XpPrior)
goto _3
_4:
- *(*int32)(unsafe.Pointer(&(_pWalker.X4))) -= 1
- return _rc & i32(2)
+ _pWalker.XwalkerDepth -= 1
+ return _rc & int32(2)
}
-// Walk all expressions associated with SELECT statement p. Do
-// not invoke the SELECT callback on p, but do (of course) invoke
-// any expr callbacks and SELECT callbacks that come from subqueries.
-// Return WRC_Abort or WRC_Continue.
+// C comment
+// /*
+// ** Walk all expressions associated with SELECT statement p. Do
+// ** not invoke the SELECT callback on p, but do (of course) invoke
+// ** any expr callbacks and SELECT callbacks that come from subqueries.
+// ** Return WRC_Abort or WRC_Continue.
+// */
func _sqlite3WalkSelectExpr(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) (r0 int32) {
- if _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(_p.X0)) != 0 {
- return i32(2)
+ if _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(_p.XpEList)) != 0 {
+ return int32(2)
}
- if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_p.X9)) != 0 {
- return i32(2)
+ if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_p.XpWhere)) != 0 {
+ return int32(2)
}
- if _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(_p.X10)) != 0 {
- return i32(2)
+ if _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(_p.XpGroupBy)) != 0 {
+ return int32(2)
}
- if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_p.X11)) != 0 {
- return i32(2)
+ if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_p.XpHaving)) != 0 {
+ return int32(2)
}
- if _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(_p.X12)) != 0 {
- return i32(2)
+ if _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(_p.XpOrderBy)) != 0 {
+ return int32(2)
}
- if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_p.X15)) != 0 {
- return i32(2)
+ if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_p.XpLimit)) != 0 {
+ return int32(2)
}
- if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_p.X16)) != 0 {
- return i32(2)
+ if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_p.XpOffset)) != 0 {
+ return int32(2)
}
- return i32(0)
+ return int32(0)
}
-// Call sqlite3WalkExpr() for every expression in list p or until
-// an abort request is seen.
+// C comment
+// /*
+// ** Call sqlite3WalkExpr() for every expression in list p or until
+// ** an abort request is seen.
+// */
func _sqlite3WalkExprList(tls *crt.TLS, _pWalker *XWalker, _p *XExprList) (r0 int32) {
var _i int32
var _pItem *TExprList_item
if _p == nil {
goto _0
}
- *func() **TExprList_item { _i = _p.X0; return &_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_p.X2)))))
+ *func() **TExprList_item { _i = _p.XnExpr; return &_pItem }() = (*TExprList_item)(unsafe.Pointer(&_p.Xa))
_1:
- if _i <= i32(0) {
+ if _i <= int32(0) {
goto _4
}
- if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_pItem.X0)) != 0 {
- return i32(2)
+ if _sqlite3WalkExpr(tls, _pWalker, (*XExpr)(_pItem.XpExpr)) != 0 {
+ return int32(2)
}
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i -= 1; return &_pItem }())) += uintptr(20)
goto _1
_4:
_0:
- return i32(0)
+ return int32(0)
}
+// C comment
+// /* Forward declarations */
func _sqlite3WalkExpr(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
return func() int32 {
if _pExpr != nil {
return _walkExpr(tls, _pWalker, _pExpr)
}
- return i32(0)
- }()
-}
-
-// Walk an expression tree. Invoke the callback once for each node
-// of the expression, while descending. (In other words, the callback
-// is invoked before visiting children.)
-//
-// The return value from the callback should be one of the WRC_*
-// constants to specify how to proceed with the walk.
-//
-// WRC_Continue Continue descending down the tree.
-//
-// WRC_Prune Do not descend into child nodes, but allow
-// the walk to continue with sibling nodes.
-//
-// WRC_Abort Do no more callbacks. Unwind the stack and
-// return from the top-level walk call.
-//
-// The return value from this routine is WRC_Abort to abandon the tree walk
-// and WRC_Continue to continue.
+ return int32(0)
+ }()
+}
+
+// C comment
+// /*
+// ** Walk an expression tree. Invoke the callback once for each node
+// ** of the expression, while descending. (In other words, the callback
+// ** is invoked before visiting children.)
+// **
+// ** The return value from the callback should be one of the WRC_*
+// ** constants to specify how to proceed with the walk.
+// **
+// ** WRC_Continue Continue descending down the tree.
+// **
+// ** WRC_Prune Do not descend into child nodes, but allow
+// ** the walk to continue with sibling nodes.
+// **
+// ** WRC_Abort Do no more callbacks. Unwind the stack and
+// ** return from the top-level walk call.
+// **
+// ** The return value from this routine is WRC_Abort to abandon the tree walk
+// ** and WRC_Continue to continue.
+// */
func _walkExpr(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
var _rc int32
- _rc = (*(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- }{(_pWalker.X1)})))(tls, _pWalker, _pExpr)
- if _rc != 0 || (((_pExpr.X2) & uint32(i32(8404992))) != uint32(i32(0))) {
- return _rc & i32(2)
+ _rc = func() func(*crt.TLS, *XWalker, *XExpr) int32 {
+ v := _pWalker.XxExprCallback
+ return *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&v))
+ }()(tls, _pWalker, _pExpr)
+ if _rc != 0 || ((_pExpr.Xflags & uint32(8404992)) != (0)) {
+ return _rc & int32(2)
}
- if ((*XExpr)(_pExpr.X4) != nil) && _walkExpr(tls, _pWalker, (*XExpr)(_pExpr.X4)) != 0 {
- return i32(2)
+ if (_pExpr.XpLeft != nil) && _walkExpr(tls, _pWalker, (*XExpr)(_pExpr.XpLeft)) != 0 {
+ return int32(2)
}
- if ((*XExpr)(_pExpr.X5) != nil) && _walkExpr(tls, _pWalker, (*XExpr)(_pExpr.X5)) != 0 {
- return i32(2)
+ if (_pExpr.XpRight != nil) && _walkExpr(tls, _pWalker, (*XExpr)(_pExpr.XpRight)) != 0 {
+ return int32(2)
}
- if ((_pExpr.X2) & uint32(i32(2048))) == uint32(i32(0)) {
+ if (_pExpr.Xflags & uint32(2048)) == (0) {
goto _6
}
- if _sqlite3WalkSelect(tls, _pWalker, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))) != 0 {
- return i32(2)
+ if _sqlite3WalkSelect(tls, _pWalker, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))) != 0 {
+ return int32(2)
}
goto _9
_6:
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))) == nil {
+ if (*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))) == nil {
goto _9
}
- if _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))) != 0 {
- return i32(2)
+ if _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))) != 0 {
+ return int32(2)
}
_9:
- return i32(0)
+ return int32(0)
}
-// Walk the parse trees associated with all subqueries in the
-// FROM clause of SELECT statement p. Do not invoke the select
-// callback on p, but do invoke it on each FROM clause subquery
-// and on any subqueries further down in the tree. Return
-// WRC_Abort or WRC_Continue;
+// C comment
+// /*
+// ** Walk the parse trees associated with all subqueries in the
+// ** FROM clause of SELECT statement p. Do not invoke the select
+// ** callback on p, but do invoke it on each FROM clause subquery
+// ** and on any subqueries further down in the tree. Return
+// ** WRC_Abort or WRC_Continue;
+// */
func _sqlite3WalkSelectFrom(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) (r0 int32) {
var _i int32
var _pSrc *XSrcList
var _pItem *TSrcList_item
- _pSrc = (*XSrcList)(_p.X8)
+ _pSrc = (*XSrcList)(_p.XpSrc)
if func() int32 {
if _pSrc != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89291), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalkSelectFromØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89291), unsafe.Pointer(&_sqlite3WalkSelectFromØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _2
}
- *func() **TSrcList_item { _i = _pSrc.X0; return &_pItem }() = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))
+ *func() **TSrcList_item { _i = _pSrc.XnSrc; return &_pItem }() = (*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa))
_3:
- if _i <= i32(0) {
+ if _i <= int32(0) {
goto _6
}
- if _sqlite3WalkSelect(tls, _pWalker, (*XSelect)(_pItem.X5)) != 0 {
- return i32(2)
+ if _sqlite3WalkSelect(tls, _pWalker, (*XSelect)(_pItem.XpSelect)) != 0 {
+ return int32(2)
}
- if (((uint32(((*t28)(unsafe.Pointer(&(_pItem.X9))).X1)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0) && _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_pItem.X15))))))) != 0 {
- return i32(2)
+ if (((uint32((_pItem.Xfg.XnotIndexed)>>2) << 31) >> 31) != 0) && _sqlite3WalkExprList(tls, _pWalker, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pItem.Xu1)))) != 0 {
+ return int32(2)
}
*(*uintptr)(unsafe.Pointer(func() **TSrcList_item { _i -= 1; return &_pItem }())) += uintptr(68)
goto _3
_6:
_2:
- return i32(0)
+ return int32(0)
}
var _sqlite3WalkSelectFromØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalkSelectFromØ00__func__Ø000[0], str(48026), 22)
-}
-
-// This routine is a Walker callback for "expanding" a SELECT statement.
-// "Expanding" means to do the following:
-//
-// (1) Make sure VDBE cursor numbers have been assigned to every
-// element of the FROM clause.
-//
-// (2) Fill in the pTabList->a[].pTab fields in the SrcList that
-// defines FROM clause. When views appear in the FROM clause,
-// fill pTabList->a[].pSelect with a copy of the SELECT statement
-// that implements the view. A copy is made of the view's SELECT
-// statement so that we can freely modify or delete that statement
-// without worrying about messing up the persistent representation
-// of the view.
-//
-// (3) Add terms to the WHERE clause to accommodate the NATURAL keyword
-// on joins and the ON and USING clause of joins.
-//
-// (4) Scan the list of columns in the result set (pEList) looking
-// for instances of the "*" operator or the TABLE.* operator.
-// If found, expand each "*" to be every column in every table
-// and TABLE.* to be every column in TABLE.
-//
+ crt.Xstrncpy(nil, &_sqlite3WalkSelectFromØ00__func__Ø000[0], str(47981), 22)
+}
+
+// C comment
+// /*
+// ** This routine is a Walker callback for "expanding" a SELECT statement.
+// ** "Expanding" means to do the following:
+// **
+// ** (1) Make sure VDBE cursor numbers have been assigned to every
+// ** element of the FROM clause.
+// **
+// ** (2) Fill in the pTabList->a[].pTab fields in the SrcList that
+// ** defines FROM clause. When views appear in the FROM clause,
+// ** fill pTabList->a[].pSelect with a copy of the SELECT statement
+// ** that implements the view. A copy is made of the view's SELECT
+// ** statement so that we can freely modify or delete that statement
+// ** without worrying about messing up the persistent representation
+// ** of the view.
+// **
+// ** (3) Add terms to the WHERE clause to accommodate the NATURAL keyword
+// ** on joins and the ON and USING clause of joins.
+// **
+// ** (4) Scan the list of columns in the result set (pEList) looking
+// ** for instances of the "*" operator or the TABLE.* operator.
+// ** If found, expand each "*" to be every column in every table
+// ** and TABLE.* to be every column in TABLE.
+// **
+// */
func _selectExpander(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) (r0 int32) {
var _11_nCol int16
var _i, _j, _k, _15_flags, _15_longNames, _19_tableSeen, _21_iDb int32
@@ -34889,306 +35609,298 @@ func _selectExpander(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) (r0 int32) {
var _6_pSel, _21_pSub *XSelect
var _pE, _pRight, _pExpr, _31_pLeft *XExpr
var _pParse *XParse
- _pParse = (*XParse)(_pWalker.X0)
- _db = (*Xsqlite3)(_pParse.X0)
- _selFlags = uint16(_p.X3)
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) | uint32(i32(64))
- sink5(*p)
- }
- if (_db.X17) != 0 {
- return i32(2)
+ _pParse = (*XParse)(_pWalker.XpParse)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _selFlags = uint16(_p.XselFlags)
+ _p.XselFlags |= uint32(64)
+ if _db.XmallocFailed != 0 {
+ return int32(2)
}
if func() int32 {
- if (*XSrcList)(_p.X8) == nil {
+ if (*XSrcList)(_p.XpSrc) == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120864), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120864), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
- }() != 0 || ((int32(_selFlags) & i32(64)) != i32(0)) {
- return i32(1)
+ return int32(0)
+ }() != 0 || ((int32(_selFlags) & int32(64)) != int32(0)) {
+ return int32(1)
}
- _pTabList = (*XSrcList)(_p.X8)
- _pEList = (*XExprList)(_p.X0)
- if (*XWith)(_p.X17) != nil {
- _sqlite3WithPush(tls, _pParse, (*XWith)(_p.X17), uint8(i32(0)))
+ _pTabList = (*XSrcList)(_p.XpSrc)
+ _pEList = (*XExprList)(_p.XpEList)
+ if _p.XpWith != nil {
+ _sqlite3WithPush(tls, _pParse, (*XWith)(_p.XpWith), 0)
}
_sqlite3SrcListAssignCursors(tls, _pParse, _pTabList)
- *func() **TSrcList_item { _i = i32(0); return &_pFrom }() = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))
+ *func() **TSrcList_item { _i = int32(0); return &_pFrom }() = (*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa))
_6:
- if _i >= (_pTabList.X0) {
+ if _i >= _pTabList.XnSrc {
goto _9
}
func() {
- if int32((uint32(((*t28)(unsafe.Pointer(&(_pFrom.X9))).X1)>>uint(i32(5)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) && (*XTable)(_pFrom.X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120884), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48048)))
+ if int32((uint32((_pFrom.Xfg.XnotIndexed)>>5)<<31)>>31) != int32(0) && (*XTable)(_pFrom.XpTab) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120884), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48003)))
crt.X__builtin_abort(tls)
}
}()
- if ((uint32(((*t28)(unsafe.Pointer(&(_pFrom.X9))).X1)>>uint(i32(5))) << uint(i32(31))) >> uint(i32(31))) != 0 {
+ if ((uint32((_pFrom.Xfg.XnotIndexed)>>5) << 31) >> 31) != 0 {
goto _7
}
func() {
- if (*XTable)(_pFrom.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120886), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48091)))
+ if (*XTable)(_pFrom.XpTab) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120886), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48046)))
crt.X__builtin_abort(tls)
}
}()
if _withExpand(tls, _pWalker, _pFrom) != 0 {
- return i32(2)
+ return int32(2)
}
- if (*XTable)(_pFrom.X4) != nil {
+ if _pFrom.XpTab != nil {
goto _30
}
- if (_pFrom.X2) != nil {
+ if _pFrom.XzName != nil {
goto _19
}
- _6_pSel = (*XSelect)(_pFrom.X5)
+ _6_pSel = (*XSelect)(_pFrom.XpSelect)
func() {
if _6_pSel == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120895), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48106)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120895), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48061)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XTable)(_pFrom.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120896), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48091)))
+ if (*XTable)(_pFrom.XpTab) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120896), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48046)))
crt.X__builtin_abort(tls)
}
}()
if _sqlite3WalkSelect(tls, _pWalker, _6_pSel) != 0 {
- return i32(2)
+ return int32(2)
}
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFrom.X4))))) = store44(&_4_pTab, (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(u32(80)))))
+ *(**XTable)(unsafe.Pointer(&_pFrom.XpTab)) = store72(&_4_pTab, (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(80))))
if _4_pTab == nil {
- return i32(2)
+ return int32(2)
}
- *(*uint32)(unsafe.Pointer(&(_4_pTab.X8))) = uint32(i32(1))
- *(**int8)(unsafe.Pointer(&(_4_pTab.X0))) = _sqlite3MPrintf(tls, _db, str(48114), (unsafe.Pointer)(_4_pTab))
+ _4_pTab.XnTabRef = uint32(1)
+ _4_pTab.XzName = _sqlite3MPrintf(tls, _db, str(48069), unsafe.Pointer(_4_pTab))
_26:
- if (*XSelect)(_6_pSel.X13) != nil {
- _6_pSel = (*XSelect)(_6_pSel.X13)
+ if _6_pSel.XpPrior != nil {
+ _6_pSel = (*XSelect)(_6_pSel.XpPrior)
goto _26
}
- _sqlite3ColumnsFromExprList(tls, _pParse, (*XExprList)(_6_pSel.X0), (*int16)(unsafe.Pointer(&(_4_pTab.X11))), (**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_4_pTab.X1))))))
- *(*int16)(unsafe.Pointer(&(_4_pTab.X10))) = int16(i32(-1))
- *(*int16)(unsafe.Pointer(&(_4_pTab.X12))) = int16(i32(200))
+ _sqlite3ColumnsFromExprList(tls, _pParse, (*XExprList)(_6_pSel.XpEList), &_4_pTab.XnCol, (**XColumn)(unsafe.Pointer(&_4_pTab.XaCol)))
+ _4_pTab.XiPKey = int16(-1)
+ _4_pTab.XnRowLogEst = int16(200)
func() {
- if i32(200) != int32(_sqlite3LogEst(tls, uint64(i32(1048576)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120905), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48127)))
+ if int32(200) != int32(_sqlite3LogEst(tls, uint64(1048576))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120905), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48082)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_4_pTab.X9)))
- *p = (*p) | uint32(i32(2))
- sink5(*p)
- }
+ _4_pTab.XtabFlags |= uint32(2)
goto _30
_19:
func() {
- if (*XTable)(_pFrom.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120910), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48091)))
+ if (*XTable)(_pFrom.XpTab) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120910), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48046)))
crt.X__builtin_abort(tls)
}
}()
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFrom.X4))))) = store44(&_4_pTab, _sqlite3LocateTableItem(tls, _pParse, uint32(i32(0)), _pFrom))
+ *(**XTable)(unsafe.Pointer(&_pFrom.XpTab)) = store72(&_4_pTab, _sqlite3LocateTableItem(tls, _pParse, 0, _pFrom))
if _4_pTab == nil {
- return i32(2)
+ return int32(2)
}
- if (_4_pTab.X8) >= uint32(i32(65535)) {
- _sqlite3ErrorMsg(tls, _pParse, str(48155), unsafe.Pointer(_4_pTab.X0))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFrom.X4))))) = nil
- return i32(2)
+ if _4_pTab.XnTabRef >= uint32(65535) {
+ _sqlite3ErrorMsg(tls, _pParse, str(48110), unsafe.Pointer(_4_pTab.XzName))
+ *(**XTable)(unsafe.Pointer(&_pFrom.XpTab)) = nil
+ return int32(2)
}
- *(*uint32)(unsafe.Pointer(&(_4_pTab.X8))) += 1
- if ((_4_pTab.X16) == 0) && _cannotBeFunction(tls, _pParse, _pFrom) != 0 {
- return i32(2)
+ _4_pTab.XnTabRef += 1
+ if (_4_pTab.XnModuleArg == 0) && _cannotBeFunction(tls, _pParse, _pFrom) != 0 {
+ return int32(2)
}
- if (_4_pTab.X16) == 0 && (*XSelect)(_4_pTab.X3) == nil {
+ if _4_pTab.XnModuleArg == 0 && _4_pTab.XpSelect == nil {
goto _38
}
if _sqlite3ViewGetColumnNames(tls, _pParse, _4_pTab) != 0 {
- return i32(2)
+ return int32(2)
}
func() {
- if (*XSelect)(_pFrom.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120927), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48194)))
+ if (*XSelect)(_pFrom.XpSelect) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120927), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48149)))
crt.X__builtin_abort(tls)
}
}()
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFrom.X5))))) = _sqlite3SelectDup(tls, _db, (*XSelect)(_4_pTab.X3), i32(0))
- _sqlite3SelectSetName(tls, (*XSelect)(_pFrom.X5), _4_pTab.X0)
- _11_nCol = _4_pTab.X11
- *(*int16)(unsafe.Pointer(&(_4_pTab.X11))) = int16(i32(-1))
- _sqlite3WalkSelect(tls, _pWalker, (*XSelect)(_pFrom.X5))
- *(*int16)(unsafe.Pointer(&(_4_pTab.X11))) = _11_nCol
+ *(**XSelect)(unsafe.Pointer(&_pFrom.XpSelect)) = _sqlite3SelectDup(tls, _db, (*XSelect)(_4_pTab.XpSelect), int32(0))
+ _sqlite3SelectSetName(tls, (*XSelect)(_pFrom.XpSelect), _4_pTab.XzName)
+ _11_nCol = _4_pTab.XnCol
+ _4_pTab.XnCol = int16(-1)
+ _sqlite3WalkSelect(tls, _pWalker, (*XSelect)(_pFrom.XpSelect))
+ _4_pTab.XnCol = _11_nCol
_38:
_30:
if _sqlite3IndexedByLookup(tls, _pParse, _pFrom) != 0 {
- return i32(2)
+ return int32(2)
}
_7:
*(*uintptr)(unsafe.Pointer(func() **TSrcList_item { _i += 1; return &_pFrom }())) += uintptr(68)
goto _6
_9:
- if ((_db.X17) != 0) || _sqliteProcessJoin(tls, _pParse, _p) != 0 {
- return i32(2)
+ if (_db.XmallocFailed != 0) || _sqliteProcessJoin(tls, _pParse, _p) != 0 {
+ return int32(2)
}
- _k = i32(0)
+ _k = int32(0)
_45:
- if _k >= (_pEList.X0) {
+ if _k >= _pEList.XnExpr {
goto _48
}
- _pE = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_k))).X0)
- if int32(_pE.X0) == i32(161) {
+ _pE = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_k)).XpExpr)
+ if int32(_pE.Xop) == int32(161) {
goto _48
}
func() {
- if int32(_pE.X0) == i32(122) && (*XExpr)(_pE.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120964), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48212)))
+ if int32(_pE.Xop) == int32(122) && (*XExpr)(_pE.XpRight) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120964), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48167)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pE.X0) == i32(122) && ((*XExpr)(_pE.X4) == nil || int32((*XExpr)(_pE.X4).X0) != i32(27)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120965), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48244)))
+ if int32(_pE.Xop) == int32(122) && ((*XExpr)(_pE.XpLeft) == nil || int32((*XExpr)(_pE.XpLeft).Xop) != int32(27)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120965), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48199)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pE.X0) == i32(122)) && (int32((*XExpr)(_pE.X5).X0) == i32(161)) {
+ if (int32(_pE.Xop) == int32(122)) && (int32((*XExpr)(_pE.XpRight).Xop) == int32(161)) {
goto _48
}
_k += 1
goto _45
_48:
- if _k >= (_pEList.X0) {
+ if _k >= _pEList.XnExpr {
goto _59
}
- _15_a = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))
+ _15_a = (*TExprList_item)(unsafe.Pointer(&_pEList.Xa))
_15_pNew = nil
- _15_flags = (*Xsqlite3)(_pParse.X0).X6
- _15_longNames = bool2int(((_15_flags & i32(4)) != i32(0)) && ((_15_flags & i32(64)) == i32(0)))
- _k = i32(0)
+ _15_flags = (*Xsqlite3)(_pParse.Xdb).Xflags
+ _15_longNames = bool2int(((_15_flags & int32(4)) != int32(0)) && ((_15_flags & int32(64)) == int32(0)))
+ _k = int32(0)
_61:
- if _k >= (_pEList.X0) {
+ if _k >= _pEList.XnExpr {
goto _64
}
- _pE = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_a)) + 20*uintptr(_k))).X0)
- _pRight = (*XExpr)(_pE.X5)
+ _pE = (*XExpr)(elem57(_15_a, uintptr(_k)).XpExpr)
+ _pRight = (*XExpr)(_pE.XpRight)
func() {
- if int32(_pE.X0) == i32(122) && _pRight == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120983), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48301)))
+ if int32(_pE.Xop) == int32(122) && _pRight == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120983), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48256)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pE.X0) == i32(161) || int32(_pE.X0) == i32(122) && int32(_pRight.X0) == i32(161) {
+ if int32(_pE.Xop) == int32(161) || int32(_pE.Xop) == int32(122) && int32(_pRight.Xop) == int32(161) {
goto _70
}
- _15_pNew = _sqlite3ExprListAppend(tls, _pParse, _15_pNew, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_a))+20*uintptr(_k))).X0))
+ _15_pNew = _sqlite3ExprListAppend(tls, _pParse, _15_pNew, (*XExpr)(elem57(_15_a, uintptr(_k)).XpExpr))
if _15_pNew != nil {
- *(**int8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_15_pNew.X2))))) + 20*uintptr((_15_pNew.X0)-i32(1)))).X1))) = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_a)) + 20*uintptr(_k))).X1
- *(**int8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_15_pNew.X2))))) + 20*uintptr((_15_pNew.X0)-i32(1)))).X2))) = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_a)) + 20*uintptr(_k))).X2
- *(**int8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_a)) + 20*uintptr(_k))).X1))) = nil
- *(**int8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_a)) + 20*uintptr(_k))).X2))) = nil
+ elem57((*TExprList_item)(unsafe.Pointer(&_15_pNew.Xa)), uintptr(_15_pNew.XnExpr-int32(1))).XzName = elem57(_15_a, uintptr(_k)).XzName
+ elem57((*TExprList_item)(unsafe.Pointer(&_15_pNew.Xa)), uintptr(_15_pNew.XnExpr-int32(1))).XzSpan = elem57(_15_a, uintptr(_k)).XzSpan
+ elem57(_15_a, uintptr(_k)).XzName = nil
+ elem57(_15_a, uintptr(_k)).XzSpan = nil
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_a)) + 20*uintptr(_k))).X0))))) = nil
+ *(**XExpr)(unsafe.Pointer(&(elem57(_15_a, uintptr(_k)).XpExpr))) = nil
goto _72
_70:
- _19_tableSeen = i32(0)
+ _19_tableSeen = int32(0)
_19_zTName = nil
- if int32(_pE.X0) == i32(122) {
+ if int32(_pE.Xop) == int32(122) {
func() {
- if (*XExpr)(_pE.X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121003), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48329)))
+ if (*XExpr)(_pE.XpLeft) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121003), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48284)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (((*XExpr)(_pE.X4).X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121004), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48342)))
+ if (((*XExpr)(_pE.XpLeft).Xflags) & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121004), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48297)))
crt.X__builtin_abort(tls)
}
}()
- _19_zTName = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&((*XExpr)(_pE.X4).X3)))))
+ _19_zTName = *(**int8)(unsafe.Pointer(&((*XExpr)(_pE.XpLeft).Xu)))
}
- *func() **TSrcList_item { _i = i32(0); return &_pFrom }() = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))
+ *func() **TSrcList_item { _i = int32(0); return &_pFrom }() = (*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa))
_78:
- if _i >= (_pTabList.X0) {
+ if _i >= _pTabList.XnSrc {
goto _81
}
- _21_pTab = (*XTable)(_pFrom.X4)
- _21_pSub = (*XSelect)(_pFrom.X5)
- _21_zTabName = _pFrom.X3
+ _21_pTab = (*XTable)(_pFrom.XpTab)
+ _21_pSub = (*XSelect)(_pFrom.XpSelect)
+ _21_zTabName = _pFrom.XzAlias
_21_zSchemaName = nil
if _21_zTabName == nil {
- _21_zTabName = _21_pTab.X0
+ _21_zTabName = _21_pTab.XzName
}
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
goto _81
}
- if _21_pSub != nil && ((_21_pSub.X3)&uint32(i32(2048))) != uint32(i32(0)) {
+ if _21_pSub != nil && (_21_pSub.XselFlags&uint32(2048)) != (0) {
goto _85
}
_21_pSub = nil
- if (_19_zTName != nil) && (_sqlite3StrICmp(tls, _19_zTName, _21_zTabName) != i32(0)) {
+ if (_19_zTName != nil) && (_sqlite3StrICmp(tls, _19_zTName, _21_zTabName) != int32(0)) {
goto _79
}
- _21_iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_21_pTab.X20))
+ _21_iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_21_pTab.XpSchema))
_21_zSchemaName = func() *int8 {
- if _21_iDb >= i32(0) {
- return ((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_21_iDb))).X0)
+ if _21_iDb >= int32(0) {
+ return (elem27((*XDb)(_db.XaDb), uintptr(_21_iDb)).XzDbSName)
}
- return str(48383)
+ return str(48338)
}()
_85:
- _j = i32(0)
+ _j = int32(0)
_90:
- if _j >= int32(_21_pTab.X11) {
+ if _j >= int32(_21_pTab.XnCol) {
goto _93
}
- _25_zName = (*XColumn)(unsafe.Pointer(uintptr(_21_pTab.X1) + 16*uintptr(_j))).X0
+ _25_zName = elem41((*XColumn)(_21_pTab.XaCol), uintptr(_j)).XzName
func() {
if _25_zName == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121031), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectExpanderØ00__func__Ø000))), unsafe.Pointer(str(48385)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121031), unsafe.Pointer(&_selectExpanderØ00__func__Ø000), unsafe.Pointer(str(48340)))
crt.X__builtin_abort(tls)
}
}()
- if ((_19_zTName != nil) && (_21_pSub != nil)) && (_sqlite3MatchSpanName(tls, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_21_pSub.X0).X2)))))+20*uintptr(_j))).X2, nil, _19_zTName, nil) == i32(0)) {
+ if ((_19_zTName != nil) && (_21_pSub != nil)) && (_sqlite3MatchSpanName(tls, elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_21_pSub.XpEList).Xa))), uintptr(_j)).XzSpan, nil, _19_zTName, nil) == int32(0)) {
goto _91
}
- if (((_p.X3) & uint32(i32(131072))) == uint32(i32(0))) && ((int32((*XColumn)(unsafe.Pointer(uintptr(_21_pTab.X1)+16*uintptr(_j))).X6) & i32(2)) != i32(0)) {
+ if ((_p.XselFlags & uint32(131072)) == (0)) && ((int32(elem41((*XColumn)(_21_pTab.XaCol), uintptr(_j)).XcolFlags) & int32(2)) != int32(0)) {
goto _91
}
- _19_tableSeen = i32(1)
- if _i <= i32(0) || _19_zTName != nil {
+ _19_tableSeen = int32(1)
+ if _i <= int32(0) || _19_zTName != nil {
goto _102
}
- if ((int32((*t28)(unsafe.Pointer(&(_pFrom.X9))).X0) & i32(4)) != i32(0)) && _tableAndColumnIndex(tls, _pTabList, _i, _25_zName, nil, nil) != 0 {
+ if ((int32(_pFrom.Xfg.Xjointype) & int32(4)) != int32(0)) && _tableAndColumnIndex(tls, _pTabList, _i, _25_zName, nil, nil) != 0 {
goto _91
}
- if _sqlite3IdListIndex(tls, (*XIdList)(_pFrom.X13), _25_zName) >= i32(0) {
+ if _sqlite3IdListIndex(tls, (*XIdList)(_pFrom.XpUsing), _25_zName) >= int32(0) {
goto _91
}
_102:
- _pRight = _sqlite3Expr(tls, _db, i32(27), _25_zName)
+ _pRight = _sqlite3Expr(tls, _db, int32(27), _25_zName)
_25_zColname = _25_zName
_25_zToFree = nil
- if _15_longNames == 0 && (_pTabList.X0) <= i32(1) {
+ if _15_longNames == 0 && _pTabList.XnSrc <= int32(1) {
goto _107
}
- _31_pLeft = _sqlite3Expr(tls, _db, i32(27), _21_zTabName)
- _pExpr = _sqlite3PExpr(tls, _pParse, i32(122), _31_pLeft, _pRight)
+ _31_pLeft = _sqlite3Expr(tls, _db, int32(27), _21_zTabName)
+ _pExpr = _sqlite3PExpr(tls, _pParse, int32(122), _31_pLeft, _pRight)
if _21_zSchemaName != nil {
- _31_pLeft = _sqlite3Expr(tls, _db, i32(27), _21_zSchemaName)
- _pExpr = _sqlite3PExpr(tls, _pParse, i32(122), _31_pLeft, _pExpr)
+ _31_pLeft = _sqlite3Expr(tls, _db, int32(27), _21_zSchemaName)
+ _pExpr = _sqlite3PExpr(tls, _pParse, int32(122), _31_pLeft, _pExpr)
}
if _15_longNames != 0 {
- _25_zColname = _sqlite3MPrintf(tls, _db, str(8018), unsafe.Pointer(_21_zTabName), unsafe.Pointer(_25_zName))
+ _25_zColname = _sqlite3MPrintf(tls, _db, str(7919), unsafe.Pointer(_21_zTabName), unsafe.Pointer(_25_zName))
_25_zToFree = _25_zColname
}
goto _110
@@ -35197,20 +35909,20 @@ _107:
_110:
_15_pNew = _sqlite3ExprListAppend(tls, _pParse, _15_pNew, _pExpr)
_sqlite3TokenInit(tls, &_25_sColname, _25_zColname)
- _sqlite3ExprListSetName(tls, _pParse, _15_pNew, &_25_sColname, i32(0))
- if _15_pNew == nil || ((_p.X3)&uint32(i32(2048))) == uint32(i32(0)) {
+ _sqlite3ExprListSetName(tls, _pParse, _15_pNew, &_25_sColname, int32(0))
+ if _15_pNew == nil || (_p.XselFlags&uint32(2048)) == (0) {
goto _112
}
- _35_pX = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_15_pNew.X2))))) + 20*uintptr((_15_pNew.X0)-i32(1))))
+ _35_pX = elem57((*TExprList_item)(unsafe.Pointer(&_15_pNew.Xa)), uintptr(_15_pNew.XnExpr-int32(1)))
if _21_pSub != nil {
- *(**int8)(unsafe.Pointer(&(_35_pX.X2))) = _sqlite3DbStrDup(tls, _db, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_21_pSub.X0).X2)))))+20*uintptr(_j))).X2)
+ _35_pX.XzSpan = _sqlite3DbStrDup(tls, _db, elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_21_pSub.XpEList).Xa))), uintptr(_j)).XzSpan)
goto _114
}
- *(**int8)(unsafe.Pointer(&(_35_pX.X2))) = _sqlite3MPrintf(tls, _db, str(48391), unsafe.Pointer(_21_zSchemaName), unsafe.Pointer(_21_zTabName), unsafe.Pointer(_25_zColname))
+ _35_pX.XzSpan = _sqlite3MPrintf(tls, _db, str(48346), unsafe.Pointer(_21_zSchemaName), unsafe.Pointer(_21_zTabName), unsafe.Pointer(_25_zColname))
_114:
- storebits3((*int8)(unsafe.Pointer(&(_35_pX.X4))), int8(i32(1)), 2, 1)
+ storebits5(&_35_pX.Xdone, int8(1), 2, 1)
_112:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_25_zToFree))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_25_zToFree))
_91:
_j += 1
goto _90
@@ -35223,10 +35935,10 @@ _81:
goto _115
}
if _19_zTName != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(48400), unsafe.Pointer(_19_zTName))
+ _sqlite3ErrorMsg(tls, _pParse, str(48355), unsafe.Pointer(_19_zTName))
goto _117
}
- _sqlite3ErrorMsg(tls, _pParse, str(48418))
+ _sqlite3ErrorMsg(tls, _pParse, str(48373))
_117:
_115:
_72:
@@ -35234,37 +35946,36 @@ _72:
goto _61
_64:
_sqlite3ExprListDelete(tls, _db, _pEList)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _15_pNew
+ *(**XExprList)(unsafe.Pointer(&_p.XpEList)) = _15_pNew
_59:
- if ((*XExprList)(_p.X0) != nil) && (((*XExprList)(_p.X0).X0) > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(2)))))) {
- _sqlite3ErrorMsg(tls, _pParse, str(48438))
- return i32(2)
+ if (_p.XpEList != nil) && (((*XExprList)(_p.XpEList).XnExpr) > (*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(2)))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(48393))
+ return int32(2)
}
- return i32(0)
-
- _ = _25_sColname
- panic(0)
+ return int32(0)
}
var _selectExpanderØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_selectExpanderØ00__func__Ø000[0], str(48469), 15)
+ crt.Xstrncpy(nil, &_selectExpanderØ00__func__Ø000[0], str(48424), 15)
}
-// The code generator maintains a stack of active WITH clauses
-// with the inner-most WITH clause being at the top of the stack.
-//
-// This routine pushes the WITH clause passed as the second argument
-// onto the top of the stack. If argument bFree is true, then this
-// WITH clause will never be popped from the stack. In this case it
-// should be freed along with the Parse object. In other cases, when
-// bFree==0, the With object will be freed along with the SELECT
-// statement with which it is associated.
+// C comment
+// /* The code generator maintains a stack of active WITH clauses
+// ** with the inner-most WITH clause being at the top of the stack.
+// **
+// ** This routine pushes the WITH clause passed as the second argument
+// ** onto the top of the stack. If argument bFree is true, then this
+// ** WITH clause will never be popped from the stack. In this case it
+// ** should be freed along with the Parse object. In other cases, when
+// ** bFree==0, the With object will be freed along with the SELECT
+// ** statement with which it is associated.
+// */
func _sqlite3WithPush(tls *crt.TLS, _pParse *XParse, _pWith *XWith, _bFree uint8) {
func() {
- if int32(_bFree) != i32(0) && ((*XWith)(_pParse.X70) != nil || (*XWith)(_pParse.X71) != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120664), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WithPushØ00__func__Ø000))), unsafe.Pointer(str(48484)))
+ if int32(_bFree) != int32(0) && ((*XWith)(_pParse.XpWith) != nil || (*XWith)(_pParse.XpWithToFree) != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120664), unsafe.Pointer(&_sqlite3WithPushØ00__func__Ø000), unsafe.Pointer(str(48439)))
crt.X__builtin_abort(tls)
}
}()
@@ -35272,15 +35983,15 @@ func _sqlite3WithPush(tls *crt.TLS, _pParse *XParse, _pWith *XWith, _bFree uint8
goto _4
}
func() {
- if (*XWith)(_pParse.X70) == _pWith {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120666), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WithPushØ00__func__Ø000))), unsafe.Pointer(str(48541)))
+ if (*XWith)(_pParse.XpWith) == _pWith {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120666), unsafe.Pointer(&_sqlite3WithPushØ00__func__Ø000), unsafe.Pointer(str(48496)))
crt.X__builtin_abort(tls)
}
}()
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWith.X1))))) = (*XWith)(_pParse.X70)
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X70))))) = _pWith
+ *(**XWith)(unsafe.Pointer(&_pWith.XpOuter)) = (*XWith)(_pParse.XpWith)
+ *(**XWith)(unsafe.Pointer(&_pParse.XpWith)) = _pWith
if _bFree != 0 {
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X71))))) = _pWith
+ *(**XWith)(unsafe.Pointer(&_pParse.XpWithToFree)) = _pWith
}
_4:
}
@@ -35288,33 +35999,36 @@ _4:
var _sqlite3WithPushØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WithPushØ00__func__Ø000[0], str(48562), 16)
+ crt.Xstrncpy(nil, &_sqlite3WithPushØ00__func__Ø000[0], str(48517), 16)
}
-// Assign VdbeCursor index numbers to all tables in a SrcList
+// C comment
+// /*
+// ** Assign VdbeCursor index numbers to all tables in a SrcList
+// */
func _sqlite3SrcListAssignCursors(tls *crt.TLS, _pParse *XParse, _pList *XSrcList) {
var _i int32
var _pItem *TSrcList_item
func() {
- if _pList == nil && ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103482), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListAssignCursorsØ00__func__Ø000))), unsafe.Pointer(str(48578)))
+ if _pList == nil && ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103482), unsafe.Pointer(&_sqlite3SrcListAssignCursorsØ00__func__Ø000), unsafe.Pointer(str(48533)))
crt.X__builtin_abort(tls)
}
}()
if _pList == nil {
goto _3
}
- *func() **TSrcList_item { _i = i32(0); return &_pItem }() = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pList.X2)))))
+ *func() **TSrcList_item { _i = int32(0); return &_pItem }() = (*TSrcList_item)(unsafe.Pointer(&_pList.Xa))
_4:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnSrc {
goto _7
}
- if (_pItem.X11) >= i32(0) {
+ if _pItem.XiCursor >= int32(0) {
goto _7
}
- *(*int32)(unsafe.Pointer(&(_pItem.X11))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- if (*XSelect)(_pItem.X5) != nil {
- _sqlite3SrcListAssignCursors(tls, _pParse, (*XSrcList)((*XSelect)(_pItem.X5).X8))
+ _pItem.XiCursor = postInc2(&_pParse.XnTab, 1)
+ if _pItem.XpSelect != nil {
+ _sqlite3SrcListAssignCursors(tls, _pParse, (*XSrcList)((*XSelect)(_pItem.XpSelect).XpSrc))
}
*(*uintptr)(unsafe.Pointer(func() **TSrcList_item { _i += 1; return &_pItem }())) += uintptr(68)
goto _4
@@ -35325,22 +36039,25 @@ _3:
var _sqlite3SrcListAssignCursorsØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SrcListAssignCursorsØ00__func__Ø000[0], str(48612), 28)
-}
-
-// This function checks if argument pFrom refers to a CTE declared by
-// a WITH clause on the stack currently maintained by the parser. And,
-// if currently processing a CTE expression, if it is a recursive
-// reference to the current CTE.
-//
-// If pFrom falls into either of the two categories above, pFrom->pTab
-// and other fields are populated accordingly. The caller should check
-// (pFrom->pTab!=0) to determine whether or not a successful match
-// was found.
-//
-// Whether or not a match is found, SQLITE_OK is returned if no error
-// occurs. If an error does occur, an error message is stored in the
-// parser and some error code other than SQLITE_OK returned.
+ crt.Xstrncpy(nil, &_sqlite3SrcListAssignCursorsØ00__func__Ø000[0], str(48567), 28)
+}
+
+// C comment
+// /*
+// ** This function checks if argument pFrom refers to a CTE declared by
+// ** a WITH clause on the stack currently maintained by the parser. And,
+// ** if currently processing a CTE expression, if it is a recursive
+// ** reference to the current CTE.
+// **
+// ** If pFrom falls into either of the two categories above, pFrom->pTab
+// ** and other fields are populated accordingly. The caller should check
+// ** (pFrom->pTab!=0) to determine whether or not a successful match
+// ** was found.
+// **
+// ** Whether or not a match is found, SQLITE_OK is returned if no error
+// ** occurs. If an error does occur, an error message is stored in the
+// ** parser and some error code other than SQLITE_OK returned.
+// */
func _withExpand(tls *crt.TLS, _pWalker *XWalker, _pFrom *TSrcList_item) (r0 int32) {
var _1_bMayRecursive, _3_i int32
var _db *Xsqlite3
@@ -35352,171 +36069,166 @@ func _withExpand(tls *crt.TLS, _pWalker *XWalker, _pFrom *TSrcList_item) (r0 int
var _1_pEList *XExprList
var _1_pSel, _1_pLeft, _7_pPrior *XSelect
var _pParse *XParse
- _pParse = (*XParse)(_pWalker.X0)
- _db = (*Xsqlite3)(_pParse.X0)
+ _pParse = (*XParse)(_pWalker.XpParse)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
- if (*XTable)(_pFrom.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120697), unsafe.Pointer((*int8)(unsafe.Pointer(&_withExpandØ00__func__Ø000))), unsafe.Pointer(str(48091)))
+ if (*XTable)(_pFrom.XpTab) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120697), unsafe.Pointer(&_withExpandØ00__func__Ø000), unsafe.Pointer(str(48046)))
crt.X__builtin_abort(tls)
}
}()
- _pCte = _searchWith(tls, (*XWith)(_pParse.X70), _pFrom, &_pWith)
+ _pCte = _searchWith(tls, (*XWith)(_pParse.XpWith), _pFrom, &_pWith)
if _pCte == nil {
goto _2
}
- if (_pCte.X3) != nil {
- _sqlite3ErrorMsg(tls, _pParse, _pCte.X3, unsafe.Pointer(_pCte.X0))
- return i32(1)
+ if _pCte.XzCteErr != nil {
+ _sqlite3ErrorMsg(tls, _pParse, _pCte.XzCteErr, unsafe.Pointer(_pCte.XzName))
+ return int32(1)
}
if _cannotBeFunction(tls, _pParse, _pFrom) != 0 {
- return i32(1)
+ return int32(1)
}
func() {
- if (*XTable)(_pFrom.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120718), unsafe.Pointer((*int8)(unsafe.Pointer(&_withExpandØ00__func__Ø000))), unsafe.Pointer(str(48091)))
+ if (*XTable)(_pFrom.XpTab) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120718), unsafe.Pointer(&_withExpandØ00__func__Ø000), unsafe.Pointer(str(48046)))
crt.X__builtin_abort(tls)
}
}()
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFrom.X4))))) = store44(&_1_pTab, (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(u32(80)))))
+ *(**XTable)(unsafe.Pointer(&_pFrom.XpTab)) = store72(&_1_pTab, (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(80))))
if _1_pTab == nil {
- return i32(2)
+ return int32(2)
}
- *(*uint32)(unsafe.Pointer(&(_1_pTab.X8))) = uint32(i32(1))
- *(**int8)(unsafe.Pointer(&(_1_pTab.X0))) = _sqlite3DbStrDup(tls, _db, _pCte.X0)
- *(*int16)(unsafe.Pointer(&(_1_pTab.X10))) = int16(i32(-1))
- *(*int16)(unsafe.Pointer(&(_1_pTab.X12))) = int16(i32(200))
+ _1_pTab.XnTabRef = uint32(1)
+ _1_pTab.XzName = _sqlite3DbStrDup(tls, _db, _pCte.XzName)
+ _1_pTab.XiPKey = int16(-1)
+ _1_pTab.XnRowLogEst = int16(200)
func() {
- if i32(200) != int32(_sqlite3LogEst(tls, uint64(i32(1048576)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120724), unsafe.Pointer((*int8)(unsafe.Pointer(&_withExpandØ00__func__Ø000))), unsafe.Pointer(str(48127)))
+ if int32(200) != int32(_sqlite3LogEst(tls, uint64(1048576))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120724), unsafe.Pointer(&_withExpandØ00__func__Ø000), unsafe.Pointer(str(48082)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_1_pTab.X9)))
- *p = (*p) | uint32(i32(66))
- sink5(*p)
- }
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFrom.X5))))) = _sqlite3SelectDup(tls, _db, (*XSelect)(_pCte.X2), i32(0))
- if (_db.X17) != 0 {
- return _sqlite3NomemError(tls, i32(120727))
+ _1_pTab.XtabFlags |= uint32(66)
+ *(**XSelect)(unsafe.Pointer(&_pFrom.XpSelect)) = _sqlite3SelectDup(tls, _db, (*XSelect)(_pCte.XpSelect), int32(0))
+ if _db.XmallocFailed != 0 {
+ return _sqlite3NomemError(tls, int32(120727))
}
func() {
- if (*XSelect)(_pFrom.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120728), unsafe.Pointer((*int8)(unsafe.Pointer(&_withExpandØ00__func__Ø000))), unsafe.Pointer(str(48640)))
+ if _pFrom.XpSelect == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120728), unsafe.Pointer(&_withExpandØ00__func__Ø000), unsafe.Pointer(str(48595)))
crt.X__builtin_abort(tls)
}
}()
- _1_pSel = (*XSelect)(_pFrom.X5)
- _1_bMayRecursive = bool2int((int32(_1_pSel.X1) == i32(116)) || (int32(_1_pSel.X1) == i32(115)))
+ _1_pSel = (*XSelect)(_pFrom.XpSelect)
+ _1_bMayRecursive = bool2int((int32(_1_pSel.Xop) == int32(116)) || (int32(_1_pSel.Xop) == int32(115)))
if _1_bMayRecursive == 0 {
goto _14
}
- _3_pSrc = (*XSrcList)((*XSelect)(_pFrom.X5).X8)
- _3_i = i32(0)
+ _3_pSrc = (*XSrcList)((*XSelect)(_pFrom.XpSelect).XpSrc)
+ _3_i = int32(0)
_15:
- if _3_i >= (_3_pSrc.X0) {
+ if _3_i >= _3_pSrc.XnSrc {
goto _18
}
- _4_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_3_pSrc.X2))))) + 68*uintptr(_3_i)))
- if (((_4_pItem.X1) == nil) && ((_4_pItem.X2) != nil)) && (i32(0) == _sqlite3StrICmp(tls, _4_pItem.X2, _pCte.X0)) {
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_4_pItem.X4))))) = _1_pTab
- storebits3((*int8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&(_4_pItem.X9))).X1))), int8(i32(1)), 32, 5)
- *(*uint32)(unsafe.Pointer(&(_1_pTab.X8))) += 1
- {
- p := (*uint32)(unsafe.Pointer(&(_1_pSel.X3)))
- *p = (*p) | uint32(i32(8192))
- sink5(*p)
- }
+ _4_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_3_pSrc.Xa)), uintptr(_3_i))
+ if ((_4_pItem.XzDatabase == nil) && (_4_pItem.XzName != nil)) && (int32(0) == _sqlite3StrICmp(tls, _4_pItem.XzName, _pCte.XzName)) {
+ *(**XTable)(unsafe.Pointer(&_4_pItem.XpTab)) = _1_pTab
+ storebits5(&(_4_pItem.Xfg.XnotIndexed), int8(1), 32, 5)
+ _1_pTab.XnTabRef += 1
+ _1_pSel.XselFlags |= uint32(8192)
}
_3_i += 1
goto _15
_18:
_14:
- if (_1_pTab.X8) > uint32(i32(2)) {
- _sqlite3ErrorMsg(tls, _pParse, str(48655), unsafe.Pointer(_pCte.X0))
- return i32(1)
+ if _1_pTab.XnTabRef > uint32(2) {
+ _sqlite3ErrorMsg(tls, _pParse, str(48610), unsafe.Pointer(_pCte.XzName))
+ return int32(1)
}
func() {
- if (_1_pTab.X8) != uint32(i32(1)) && (((_1_pSel.X3)&uint32(i32(8192))) == 0 || (_1_pTab.X8) != uint32(i32(2))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120757), unsafe.Pointer((*int8)(unsafe.Pointer(&_withExpandØ00__func__Ø000))), unsafe.Pointer(str(48698)))
+ if _1_pTab.XnTabRef != uint32(1) && ((_1_pSel.XselFlags&uint32(8192)) == 0 || _1_pTab.XnTabRef != uint32(2)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120757), unsafe.Pointer(&_withExpandØ00__func__Ø000), unsafe.Pointer(str(48653)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&(_pCte.X3))) = str(48771)
- _1_pSavedWith = (*XWith)(_pParse.X70)
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X70))))) = _pWith
+ _pCte.XzCteErr = str(48726)
+ _1_pSavedWith = (*XWith)(_pParse.XpWith)
+ *(**XWith)(unsafe.Pointer(&_pParse.XpWith)) = _pWith
if _1_bMayRecursive != 0 {
- _7_pPrior = (*XSelect)(_1_pSel.X13)
+ _7_pPrior = (*XSelect)(_1_pSel.XpPrior)
func() {
- if (*XWith)(_7_pPrior.X17) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120764), unsafe.Pointer((*int8)(unsafe.Pointer(&_withExpandØ00__func__Ø000))), unsafe.Pointer(str(48794)))
+ if (*XWith)(_7_pPrior.XpWith) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120764), unsafe.Pointer(&_withExpandØ00__func__Ø000), unsafe.Pointer(str(48749)))
crt.X__builtin_abort(tls)
}
}()
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_7_pPrior.X17))))) = (*XWith)(_1_pSel.X17)
+ *(**XWith)(unsafe.Pointer(&_7_pPrior.XpWith)) = (*XWith)(_1_pSel.XpWith)
_sqlite3WalkSelect(tls, _pWalker, _7_pPrior)
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_7_pPrior.X17))))) = nil
+ *(**XWith)(unsafe.Pointer(&_7_pPrior.XpWith)) = nil
goto _30
}
_sqlite3WalkSelect(tls, _pWalker, _1_pSel)
_30:
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X70))))) = _pWith
+ *(**XWith)(unsafe.Pointer(&_pParse.XpWith)) = _pWith
_1_pLeft = _1_pSel
_31:
- if (*XSelect)(_1_pLeft.X13) == nil {
+ if _1_pLeft.XpPrior == nil {
goto _34
}
- _1_pLeft = (*XSelect)(_1_pLeft.X13)
+ _1_pLeft = (*XSelect)(_1_pLeft.XpPrior)
goto _31
_34:
- _1_pEList = (*XExprList)(_1_pLeft.X0)
- if (*XExprList)(_pCte.X1) == nil {
+ _1_pEList = (*XExprList)(_1_pLeft.XpEList)
+ if _pCte.XpCols == nil {
goto _35
}
- if (_1_pEList != nil) && ((_1_pEList.X0) != ((*XExprList)(_pCte.X1).X0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(48811), unsafe.Pointer(_pCte.X0), _1_pEList.X0, (*XExprList)(_pCte.X1).X0)
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X70))))) = _1_pSavedWith
- return i32(1)
+ if (_1_pEList != nil) && (_1_pEList.XnExpr != ((*XExprList)(_pCte.XpCols).XnExpr)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(48766), unsafe.Pointer(_pCte.XzName), _1_pEList.XnExpr, (*XExprList)(_pCte.XpCols).XnExpr)
+ *(**XWith)(unsafe.Pointer(&_pParse.XpWith)) = _1_pSavedWith
+ return int32(1)
}
- _1_pEList = (*XExprList)(_pCte.X1)
+ _1_pEList = (*XExprList)(_pCte.XpCols)
_35:
- _sqlite3ColumnsFromExprList(tls, _pParse, _1_pEList, (*int16)(unsafe.Pointer(&(_1_pTab.X11))), (**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pTab.X1))))))
+ _sqlite3ColumnsFromExprList(tls, _pParse, _1_pEList, &_1_pTab.XnCol, (**XColumn)(unsafe.Pointer(&_1_pTab.XaCol)))
if _1_bMayRecursive == 0 {
goto _38
}
- if ((_1_pSel.X3) & uint32(i32(8192))) != 0 {
- *(**int8)(unsafe.Pointer(&(_pCte.X3))) = str(48849)
+ if (_1_pSel.XselFlags & uint32(8192)) != 0 {
+ _pCte.XzCteErr = str(48804)
goto _40
}
- *(**int8)(unsafe.Pointer(&(_pCte.X3))) = str(48883)
+ _pCte.XzCteErr = str(48838)
_40:
_sqlite3WalkSelect(tls, _pWalker, _1_pSel)
_38:
- *(**int8)(unsafe.Pointer(&(_pCte.X3))) = nil
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X70))))) = _1_pSavedWith
+ _pCte.XzCteErr = nil
+ *(**XWith)(unsafe.Pointer(&_pParse.XpWith)) = _1_pSavedWith
_2:
- return i32(0)
+ return int32(0)
}
var _withExpandØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_withExpandØ00__func__Ø000[0], str(48921), 11)
+ crt.Xstrncpy(nil, &_withExpandØ00__func__Ø000[0], str(48876), 11)
}
-// Argument pWith (which may be NULL) points to a linked list of nested
-// WITH contexts, from inner to outermost. If the table identified by
-// FROM clause element pItem is really a common-table-expression (CTE)
-// then return a pointer to the CTE definition for that table. Otherwise
-// return NULL.
-//
-// If a non-NULL value is returned, set *ppContext to point to the With
-// object that the returned CTE belongs to.
+// C comment
+// /*
+// ** Argument pWith (which may be NULL) points to a linked list of nested
+// ** WITH contexts, from inner to outermost. If the table identified by
+// ** FROM clause element pItem is really a common-table-expression (CTE)
+// ** then return a pointer to the CTE definition for that table. Otherwise
+// ** return NULL.
+// **
+// ** If a non-NULL value is returned, set *ppContext to point to the With
+// ** object that the returned CTE belongs to.
+// */
func _searchWith(tls *crt.TLS, _pWith *XWith, _pItem *TSrcList_item, _ppContext **XWith) (r0 *TCte) {
var _2_i int32
var _zName *int8
var _1_p *XWith
- if (_pItem.X1) != nil || store0(&_zName, _pItem.X2) == nil {
+ if _pItem.XzDatabase != nil || store1(&_zName, _pItem.XzName) == nil {
goto _1
}
_1_p = _pWith
@@ -35524,99 +36236,90 @@ _2:
if _1_p == nil {
goto _5
}
- _2_i = i32(0)
+ _2_i = int32(0)
_6:
- if _2_i >= (_1_p.X0) {
+ if _2_i >= _1_p.XnCte {
goto _9
}
- if _sqlite3StrICmp(tls, _zName, (*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_1_p.X2)))))+16*uintptr(_2_i))).X0) == i32(0) {
+ if _sqlite3StrICmp(tls, _zName, elem43((*TCte)(unsafe.Pointer(&_1_p.Xa)), uintptr(_2_i)).XzName) == int32(0) {
*_ppContext = _1_p
- return (*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_1_p.X2))))) + 16*uintptr(_2_i)))
+ return elem43((*TCte)(unsafe.Pointer(&_1_p.Xa)), uintptr(_2_i))
}
_2_i += 1
goto _6
_9:
- _1_p = (*XWith)(_1_p.X1)
+ _1_p = (*XWith)(_1_p.XpOuter)
goto _2
_5:
_1:
return nil
}
-// Check to see if the FROM clause term pFrom has table-valued function
-// arguments. If it does, leave an error message in pParse and return
-// non-zero, since pFrom is not allowed to be a table-valued function.
+// C comment
+// /*
+// ** Check to see if the FROM clause term pFrom has table-valued function
+// ** arguments. If it does, leave an error message in pParse and return
+// ** non-zero, since pFrom is not allowed to be a table-valued function.
+// */
func _cannotBeFunction(tls *crt.TLS, _pParse *XParse, _pFrom *TSrcList_item) (r0 int32) {
- if ((uint32(((*t28)(unsafe.Pointer(&(_pFrom.X9))).X1)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(48932), unsafe.Pointer(_pFrom.X2))
- return i32(1)
+ if ((uint32((_pFrom.Xfg.XnotIndexed)>>2) << 31) >> 31) != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(48887), unsafe.Pointer(_pFrom.XzName))
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}
-// Convert an integer into a LogEst. In other words, compute an
-// approximation for 10*log2(x).
+// C comment
+// /*
+// ** Convert an integer into a LogEst. In other words, compute an
+// ** approximation for 10*log2(x).
+// */
func _sqlite3LogEst(tls *crt.TLS, _x uint64) (r0 int16) {
var _y int16
- _y = i16(40)
- if _x >= uint64(i32(8)) {
+ _y = int16(40)
+ if _x >= uint64(8) {
goto _0
}
- if _x < uint64(i32(2)) {
- return int16(i32(0))
+ if _x < uint64(2) {
+ return 0
}
_1:
- if _x < uint64(i32(8)) {
+ if _x < uint64(8) {
{
p := &_y
- *p = int16(int32(*p) - i32(10))
- sink18(*p)
- }
- {
- p := &_x
- *p = (*p) << uint(i32(1))
- sink17(*p)
+ *p = int16(int32(*p) - int32(10))
}
+ _x <<= 1
goto _1
}
goto _4
_0:
_5:
- if _x > uint64(i32(255)) {
+ if _x > uint64(255) {
{
p := &_y
- *p = int16(int32(*p) + i32(40))
- sink18(*p)
- }
- {
- p := &_x
- *p = (*p) >> uint(i32(4))
- sink17(*p)
+ *p = int16(int32(*p) + int32(40))
}
+ _x >>= 4
goto _5
}
_6:
- if _x > uint64(i32(15)) {
+ if _x > uint64(15) {
{
p := &_y
- *p = int16(int32(*p) + i32(10))
- sink18(*p)
- }
- {
- p := &_x
- *p = (*p) >> uint(i32(1))
- sink17(*p)
+ *p = int16(int32(*p) + int32(10))
}
+ _x >>= 1
goto _6
}
_4:
- return int16((int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3LogEstØ00aØ001)) + 2*uintptr(_x&uint64(i32(7)))))) + int32(_y)) - i32(10))
+ return int16((int32(*elem50((*int16)(unsafe.Pointer(&_sqlite3LogEstØ00aØ001)), uintptr(_x&uint64(7)))) + int32(_y)) - int32(10))
}
var _sqlite3LogEstØ00aØ001 [8]int16
func init() {
- _sqlite3LogEstØ00aØ001 = [8]int16{i16(0), i16(2), i16(3), i16(5), i16(6), i16(7), i16(8), i16(9)}
+ _sqlite3LogEstØ00aØ001 = [8]int16{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)}
}
func _sqlite3SelectDup(tls *crt.TLS, _db *Xsqlite3, _pDup *XSelect, _flags int32) (r0 *XSelect) {
@@ -35627,7 +36330,7 @@ func _sqlite3SelectDup(tls *crt.TLS, _db *Xsqlite3, _pDup *XSelect, _flags int32
_pp = &_pRet
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92317), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectDupØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92317), unsafe.Pointer(&_sqlite3SelectDupØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
@@ -35636,33 +36339,33 @@ _2:
if _p == nil {
goto _5
}
- _1_pNew = (*XSelect)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(80))))
+ _1_pNew = (*XSelect)(_sqlite3DbMallocRawNN(tls, _db, uint64(80)))
if _1_pNew == nil {
goto _5
}
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X0))))) = _sqlite3ExprListDup(tls, _db, (*XExprList)(_p.X0), _flags)
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X8))))) = _sqlite3SrcListDup(tls, _db, (*XSrcList)(_p.X8), _flags)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X9))))) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.X9), _flags)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X10))))) = _sqlite3ExprListDup(tls, _db, (*XExprList)(_p.X10), _flags)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X11))))) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.X11), _flags)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X12))))) = _sqlite3ExprListDup(tls, _db, (*XExprList)(_p.X12), _flags)
- *(*uint8)(unsafe.Pointer(&(_1_pNew.X1))) = _p.X1
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X14))))) = _pNext
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X13))))) = nil
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X15))))) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.X15), _flags)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X16))))) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.X16), _flags)
- *(*int32)(unsafe.Pointer(&(_1_pNew.X4))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_1_pNew.X5))) = i32(0)
- *(*uint32)(unsafe.Pointer(&(_1_pNew.X3))) = (_p.X3) & uint32(i32(-33))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_1_pNew.X7))))) + 4*uintptr(i32(0)))) = i32(-1)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_1_pNew.X7))))) + 4*uintptr(i32(1)))) = i32(-1)
- *(*int16)(unsafe.Pointer(&(_1_pNew.X2))) = _p.X2
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X17))))) = _withDup(tls, _db, (*XWith)(_p.X17))
- _sqlite3SelectSetName(tls, _1_pNew, (*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6))))))
+ *(**XExprList)(unsafe.Pointer(&_1_pNew.XpEList)) = _sqlite3ExprListDup(tls, _db, (*XExprList)(_p.XpEList), _flags)
+ *(**XSrcList)(unsafe.Pointer(&_1_pNew.XpSrc)) = _sqlite3SrcListDup(tls, _db, (*XSrcList)(_p.XpSrc), _flags)
+ *(**XExpr)(unsafe.Pointer(&_1_pNew.XpWhere)) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.XpWhere), _flags)
+ *(**XExprList)(unsafe.Pointer(&_1_pNew.XpGroupBy)) = _sqlite3ExprListDup(tls, _db, (*XExprList)(_p.XpGroupBy), _flags)
+ *(**XExpr)(unsafe.Pointer(&_1_pNew.XpHaving)) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.XpHaving), _flags)
+ *(**XExprList)(unsafe.Pointer(&_1_pNew.XpOrderBy)) = _sqlite3ExprListDup(tls, _db, (*XExprList)(_p.XpOrderBy), _flags)
+ _1_pNew.Xop = _p.Xop
+ *(**XSelect)(unsafe.Pointer(&_1_pNew.XpNext)) = _pNext
+ *(**XSelect)(unsafe.Pointer(&_1_pNew.XpPrior)) = nil
+ *(**XExpr)(unsafe.Pointer(&_1_pNew.XpLimit)) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.XpLimit), _flags)
+ *(**XExpr)(unsafe.Pointer(&_1_pNew.XpOffset)) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.XpOffset), _flags)
+ _1_pNew.XiLimit = int32(0)
+ _1_pNew.XiOffset = int32(0)
+ _1_pNew.XselFlags = _p.XselFlags & uint32(4294967263)
+ *elem8((*int32)(unsafe.Pointer(&_1_pNew.XaddrOpenEphm)), 0) = int32(-1)
+ *elem8((*int32)(unsafe.Pointer(&_1_pNew.XaddrOpenEphm)), uintptr(1)) = int32(-1)
+ _1_pNew.XnSelectRow = _p.XnSelectRow
+ *(**XWith)(unsafe.Pointer(&_1_pNew.XpWith)) = _withDup(tls, _db, (*XWith)(_p.XpWith))
+ _sqlite3SelectSetName(tls, _1_pNew, (*int8)(unsafe.Pointer(&_p.XzSelName)))
*_pp = _1_pNew
- _pp = (**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X13)))))
+ _pp = (**XSelect)(unsafe.Pointer(&_1_pNew.XpPrior))
_pNext = _1_pNew
- _p = (*XSelect)(_p.X13)
+ _p = (*XSelect)(_p.XpPrior)
goto _2
_5:
return _pRet
@@ -35671,7 +36374,7 @@ _5:
var _sqlite3SelectDupØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SelectDupØ00__func__Ø000[0], str(48955), 17)
+ crt.Xstrncpy(nil, &_sqlite3SelectDupØ00__func__Ø000[0], str(48910), 17)
}
func _sqlite3ExprListDup(tls *crt.TLS, _db *Xsqlite3, _p *XExprList, _flags int32) (r0 *XExprList) {
@@ -35682,79 +36385,79 @@ func _sqlite3ExprListDup(tls *crt.TLS, _db *Xsqlite3, _p *XExprList, _flags int3
_pPriorSelectCol = nil
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92200), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92200), unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
if _p == nil {
return nil
}
- _pNew = (*XExprList)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(28)+(u32(20)*uint32((_p.X0)-i32(1))))))
+ _pNew = (*XExprList)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(28)+(uint32(20)*uint32(_p.XnExpr-int32(1))))))
if _pNew == nil {
return nil
}
- *(*int32)(unsafe.Pointer(&(_pNew.X1))) = store1((*int32)(unsafe.Pointer(&(_pNew.X0))), _p.X0)
- _pItem = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pNew.X2)))))
- _pOldItem = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_p.X2)))))
- _i = i32(0)
+ _pNew.XnAlloc = store2(&_pNew.XnExpr, _p.XnExpr)
+ _pItem = (*TExprList_item)(unsafe.Pointer(&_pNew.Xa))
+ _pOldItem = (*TExprList_item)(unsafe.Pointer(&_p.Xa))
+ _i = int32(0)
_4:
- if _i >= (_p.X0) {
+ if _i >= _p.XnExpr {
goto _7
}
- _1_pOldExpr = (*XExpr)(_pOldItem.X0)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pItem.X0))))) = _sqlite3ExprDup(tls, _db, _1_pOldExpr, _flags)
- if _1_pOldExpr == nil || int32(_1_pOldExpr.X0) != i32(159) || store36(&_1_pNewExpr, (*XExpr)(_pItem.X0)) == nil {
+ _1_pOldExpr = (*XExpr)(_pOldItem.XpExpr)
+ *(**XExpr)(unsafe.Pointer(&_pItem.XpExpr)) = _sqlite3ExprDup(tls, _db, _1_pOldExpr, _flags)
+ if _1_pOldExpr == nil || int32(_1_pOldExpr.Xop) != int32(159) || store58(&_1_pNewExpr, (*XExpr)(_pItem.XpExpr)) == nil {
goto _10
}
func() {
- if int32(_1_pNewExpr.X9) != i32(0) && _i <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92216), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000))), unsafe.Pointer(str(48972)))
+ if int32(_1_pNewExpr.XiColumn) != int32(0) && _i <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92216), unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000), unsafe.Pointer(str(48927)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_1_pNewExpr.X9) == i32(0) {
+ if int32(_1_pNewExpr.XiColumn) == int32(0) {
func() {
- if (*XExpr)(_1_pOldExpr.X4) != (*XExpr)(_1_pOldExpr.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92218), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000))), unsafe.Pointer(str(49000)))
+ if (*XExpr)(_1_pOldExpr.XpLeft) != (*XExpr)(_1_pOldExpr.XpRight) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92218), unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000), unsafe.Pointer(str(48955)))
crt.X__builtin_abort(tls)
}
}()
- _pPriorSelectCol = store36((**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNewExpr.X4))))), (*XExpr)(_1_pNewExpr.X5))
+ _pPriorSelectCol = store58((**XExpr)(unsafe.Pointer(&_1_pNewExpr.XpLeft)), (*XExpr)(_1_pNewExpr.XpRight))
goto _17
}
func() {
- if _i <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92221), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000))), unsafe.Pointer(str(12970)))
+ if _i <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92221), unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000), unsafe.Pointer(str(12925)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pItem))+20*uintptr(i32(-1)))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92222), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000))), unsafe.Pointer(str(49034)))
+ if (*XExpr)(elem57(_pItem, uintptr(4294967295)).XpExpr) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92222), unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000), unsafe.Pointer(str(48989)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_1_pNewExpr.X9) != (int32((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pItem))+20*uintptr(i32(-1)))).X0).X9) + i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92223), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000))), unsafe.Pointer(str(49053)))
+ if int32(_1_pNewExpr.XiColumn) != (int32((*XExpr)(elem57(_pItem, uintptr(4294967295)).XpExpr).XiColumn) + int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92223), unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000), unsafe.Pointer(str(49008)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pPriorSelectCol != (*XExpr)((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pItem))+20*uintptr(i32(-1)))).X0).X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92224), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000))), unsafe.Pointer(str(49099)))
+ if _pPriorSelectCol != (*XExpr)((*XExpr)(elem57(_pItem, uintptr(4294967295)).XpExpr).XpLeft) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92224), unsafe.Pointer(&_sqlite3ExprListDupØ00__func__Ø000), unsafe.Pointer(str(49054)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNewExpr.X4))))) = _pPriorSelectCol
+ *(**XExpr)(unsafe.Pointer(&_1_pNewExpr.XpLeft)) = _pPriorSelectCol
_17:
_10:
- *(**int8)(unsafe.Pointer(&(_pItem.X1))) = _sqlite3DbStrDup(tls, _db, _pOldItem.X1)
- *(**int8)(unsafe.Pointer(&(_pItem.X2))) = _sqlite3DbStrDup(tls, _db, _pOldItem.X2)
- *(*uint8)(unsafe.Pointer(&(_pItem.X3))) = _pOldItem.X3
- storebits3((*int8)(unsafe.Pointer(&(_pItem.X4))), int8(i32(0)), 1, 0)
- storebits3((*int8)(unsafe.Pointer(&(_pItem.X4))), int8((uint32((_pOldItem.X4)>>uint(i32(1)))<<uint(i32(31)))>>uint(i32(31))), 2, 1)
- *(*t37)(unsafe.Pointer(&(_pItem.X5))) = _pOldItem.X5
+ _pItem.XzName = _sqlite3DbStrDup(tls, _db, _pOldItem.XzName)
+ _pItem.XzSpan = _sqlite3DbStrDup(tls, _db, _pOldItem.XzSpan)
+ _pItem.XsortOrder = _pOldItem.XsortOrder
+ storebits5(&_pItem.Xdone, 0, 1, 0)
+ storebits5(&_pItem.Xdone, int8((uint32(_pOldItem.Xdone>>1)<<31)>>31), 2, 1)
+ _pItem.Xu = _pOldItem.Xu
*(*uintptr)(unsafe.Pointer(func() **TExprList_item {
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i += 1; return &_pItem }())) += uintptr(20)
return &_pOldItem
@@ -35767,28 +36470,31 @@ _7:
var _sqlite3ExprListDupØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprListDupØ00__func__Ø000[0], str(49139), 19)
-}
-
-// The following group of routines make deep copies of expressions,
-// expression lists, ID lists, and select statements. The copies can
-// be deleted (by being passed to their respective ...Delete() routines)
-// without effecting the originals.
-//
-// The expression list, ID, and source lists return by sqlite3ExprListDup(),
-// sqlite3IdListDup(), and sqlite3SrcListDup() can not be further expanded
-// by subsequent calls to sqlite*ListAppend() routines.
-//
-// Any tables that the SrcList might point to are not duplicated.
-//
-// The flags parameter contains a combination of the EXPRDUP_XXX flags.
-// If the EXPRDUP_REDUCE flag is set, then the structure returned is a
-// truncated version of the usual Expr structure that will be stored as
-// part of the in-memory representation of the database schema.
+ crt.Xstrncpy(nil, &_sqlite3ExprListDupØ00__func__Ø000[0], str(49094), 19)
+}
+
+// C comment
+// /*
+// ** The following group of routines make deep copies of expressions,
+// ** expression lists, ID lists, and select statements. The copies can
+// ** be deleted (by being passed to their respective ...Delete() routines)
+// ** without effecting the originals.
+// **
+// ** The expression list, ID, and source lists return by sqlite3ExprListDup(),
+// ** sqlite3IdListDup(), and sqlite3SrcListDup() can not be further expanded
+// ** by subsequent calls to sqlite*ListAppend() routines.
+// **
+// ** Any tables that the SrcList might point to are not duplicated.
+// **
+// ** The flags parameter contains a combination of the EXPRDUP_XXX flags.
+// ** If the EXPRDUP_REDUCE flag is set, then the structure returned is a
+// ** truncated version of the usual Expr structure that will be stored as
+// ** part of the in-memory representation of the database schema.
+// */
func _sqlite3ExprDup(tls *crt.TLS, _db *Xsqlite3, _p *XExpr, _flags int32) (r0 *XExpr) {
func() {
- if _flags != i32(0) && _flags != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92192), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprDupØ00__func__Ø000))), unsafe.Pointer(str(49158)))
+ if _flags != int32(0) && _flags != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92192), unsafe.Pointer(&_sqlite3ExprDupØ00__func__Ø000), unsafe.Pointer(str(49113)))
crt.X__builtin_abort(tls)
}
}()
@@ -35803,15 +36509,18 @@ func _sqlite3ExprDup(tls *crt.TLS, _db *Xsqlite3, _p *XExpr, _flags int32) (r0 *
var _sqlite3ExprDupØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprDupØ00__func__Ø000[0], str(49192), 15)
+ crt.Xstrncpy(nil, &_sqlite3ExprDupØ00__func__Ø000[0], str(49147), 15)
}
-// This function is similar to sqlite3ExprDup(), except that if pzBuffer
-// is not NULL then *pzBuffer is assumed to point to a buffer large enough
-// to store the copy of expression p, the copies of p->u.zToken
-// (if applicable), and the copies of the p->pLeft and p->pRight expressions,
-// if any. Before returning, *pzBuffer is set to the first byte past the
-// portion of the buffer copied into by this function.
+// C comment
+// /*
+// ** This function is similar to sqlite3ExprDup(), except that if pzBuffer
+// ** is not NULL then *pzBuffer is assumed to point to a buffer large enough
+// ** to store the copy of expression p, the copies of p->u.zToken
+// ** (if applicable), and the copies of the p->pLeft and p->pRight expressions,
+// ** if any. Before returning, *pzBuffer is set to the first byte past the
+// ** portion of the buffer copied into by this function.
+// */
func _exprDup(tls *crt.TLS, _db *Xsqlite3, _p *XExpr, _dupFlags int32, _pzBuffer **uint8) (r0 *XExpr) {
var _3_nNewSize, _3_nToken int32
var _staticFlag, _3_nStructSize, _7_nSize uint32
@@ -35820,111 +36529,95 @@ func _exprDup(tls *crt.TLS, _db *Xsqlite3, _p *XExpr, _dupFlags int32, _pzBuffer
var _pNew *XExpr
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92059), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprDupØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92059), unsafe.Pointer(&_exprDupØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92060), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprDupØ00__func__Ø000))), unsafe.Pointer(str(9660)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92060), unsafe.Pointer(&_exprDupØ00__func__Ø000), unsafe.Pointer(str(9615)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _dupFlags != i32(0) && _dupFlags != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92061), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprDupØ00__func__Ø000))), unsafe.Pointer(str(49207)))
+ if _dupFlags != int32(0) && _dupFlags != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92061), unsafe.Pointer(&_exprDupØ00__func__Ø000), unsafe.Pointer(str(49162)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pzBuffer != nil && _dupFlags != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92062), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprDupØ00__func__Ø000))), unsafe.Pointer(str(49247)))
+ if _pzBuffer != nil && _dupFlags != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92062), unsafe.Pointer(&_exprDupØ00__func__Ø000), unsafe.Pointer(str(49202)))
crt.X__builtin_abort(tls)
}
}()
if _pzBuffer != nil {
_zAlloc = *_pzBuffer
- _staticFlag = uint32(i32(32768))
+ _staticFlag = uint32(32768)
goto _11
}
_zAlloc = (*uint8)(_sqlite3DbMallocRawNN(tls, _db, uint64(_dupedExprSize(tls, _p, _dupFlags))))
- _staticFlag = uint32(i32(0))
+ _staticFlag = 0
_11:
_pNew = (*XExpr)(unsafe.Pointer(_zAlloc))
if _pNew == nil {
goto _12
}
_3_nStructSize = uint32(_dupedExprStructSize(tls, _p, _dupFlags))
- _3_nNewSize = int32(_3_nStructSize & uint32(i32(4095)))
- if (((_p.X2) & uint32(i32(1024))) == uint32(i32(0))) && ((*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))) != nil) {
- _3_nToken = _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))) + i32(1)
+ _3_nNewSize = int32(_3_nStructSize & uint32(4095))
+ if ((_p.Xflags & uint32(1024)) == (0)) && ((*(**int8)(unsafe.Pointer(&_p.Xu))) != nil) {
+ _3_nToken = _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer(&_p.Xu))) + int32(1)
goto _15
}
- _3_nToken = i32(0)
+ _3_nToken = int32(0)
_15:
if _dupFlags != 0 {
func() {
- if bool2int(((_p.X2)&uint32(i32(8192))) != uint32(i32(0))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92089), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprDupØ00__func__Ø000))), unsafe.Pointer(str(49287)))
+ if bool2int((_p.Xflags&uint32(8192)) != (0)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92089), unsafe.Pointer(&_exprDupØ00__func__Ø000), unsafe.Pointer(str(49242)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zAlloc), (unsafe.Pointer)(_p), uint32(_3_nNewSize))
+ crt.Xmemcpy(tls, unsafe.Pointer(_zAlloc), unsafe.Pointer(_p), uint32(_3_nNewSize))
goto _19
}
_7_nSize = uint32(_exprStructSize(tls, _p))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zAlloc), (unsafe.Pointer)(_p), _7_nSize)
- if _7_nSize < u32(48) {
- crt.Xmemset(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAlloc))+1*uintptr(_7_nSize)))), i32(0), u32(48)-_7_nSize)
+ crt.Xmemcpy(tls, unsafe.Pointer(_zAlloc), unsafe.Pointer(_p), _7_nSize)
+ if _7_nSize < uint32(48) {
+ crt.Xmemset(tls, unsafe.Pointer(elem15(_zAlloc, uintptr(_7_nSize))), int32(0), uint32(48)-_7_nSize)
}
_19:
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X2)))
- *p = (*p) & uint32(i32(-122881))
- sink5(*p)
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X2)))
- *p = (*p) | (_3_nStructSize & uint32(i32(24576)))
- sink5(*p)
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X2)))
- *p = (*p) | _staticFlag
- sink5(*p)
- }
+ _pNew.Xflags &= uint32(4294844415)
+ _pNew.Xflags |= _3_nStructSize & uint32(24576)
+ _pNew.Xflags |= _staticFlag
if _3_nToken != 0 {
- _9_zToken = store0((**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pNew.X3))))), (*int8)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAlloc))+1*uintptr(_3_nNewSize))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_9_zToken), (unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))), uint32(_3_nToken))
+ _9_zToken = store1((**int8)(unsafe.Pointer(&_pNew.Xu)), (*int8)(unsafe.Pointer(elem15(_zAlloc, uintptr(_3_nNewSize)))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_9_zToken), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_p.Xu))), uint32(_3_nToken))
}
- if uint32(i32(0)) != (((_p.X2) | (_pNew.X2)) & uint32(i32(8404992))) {
+ if (0) != ((_p.Xflags | _pNew.Xflags) & uint32(8404992)) {
goto _22
}
- if ((_p.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pNew.X6))))))) = _sqlite3SelectDup(tls, _db, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))), _dupFlags)
+ if (_p.Xflags & uint32(2048)) != (0) {
+ *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pNew.Xx)))) = _sqlite3SelectDup(tls, _db, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))), _dupFlags)
goto _24
}
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pNew.X6))))))) = _sqlite3ExprListDup(tls, _db, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))), _dupFlags)
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pNew.Xx)))) = _sqlite3ExprListDup(tls, _db, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))), _dupFlags)
_24:
_22:
- if ((_pNew.X2) & uint32(i32(24576))) == uint32(i32(0)) {
+ if (_pNew.Xflags & uint32(24576)) == (0) {
goto _25
}
- {
- p := &_zAlloc
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_dupedExprNodeSize(tls, _p, _dupFlags))))
- sink13(*p)
- }
- if ((_pNew.X2) & uint32(i32(8404992))) == uint32(i32(0)) {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X4))))) = func() *XExpr {
- if (*XExpr)(_p.X4) != nil {
- return _exprDup(tls, _db, (*XExpr)(_p.X4), i32(1), &_zAlloc)
+ *(*uintptr)(unsafe.Pointer(&_zAlloc)) += uintptr(_dupedExprNodeSize(tls, _p, _dupFlags))
+ if (_pNew.Xflags & uint32(8404992)) == (0) {
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpLeft)) = func() *XExpr {
+ if _p.XpLeft != nil {
+ return _exprDup(tls, _db, (*XExpr)(_p.XpLeft), int32(1), &_zAlloc)
}
return nil
}()
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X5))))) = func() *XExpr {
- if (*XExpr)(_p.X5) != nil {
- return _exprDup(tls, _db, (*XExpr)(_p.X5), i32(1), &_zAlloc)
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpRight)) = func() *XExpr {
+ if _p.XpRight != nil {
+ return _exprDup(tls, _db, (*XExpr)(_p.XpRight), int32(1), &_zAlloc)
}
return nil
}()
@@ -35934,28 +36627,28 @@ _22:
}
goto _32
_25:
- if ((_p.X2) & uint32(i32(8404992))) != uint32(i32(0)) {
+ if (_p.Xflags & uint32(8404992)) != (0) {
goto _33
}
- if int32(_pNew.X0) == i32(159) {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X4))))) = (*XExpr)(_p.X4)
+ if int32(_pNew.Xop) == int32(159) {
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpLeft)) = (*XExpr)(_p.XpLeft)
func() {
- if int32(_p.X9) != i32(0) && (*XExpr)(_p.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92135), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprDupØ00__func__Ø000))), unsafe.Pointer(str(49321)))
+ if int32(_p.XiColumn) != int32(0) && (*XExpr)(_p.XpRight) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92135), unsafe.Pointer(&_exprDupØ00__func__Ø000), unsafe.Pointer(str(49276)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)(_p.X5) != nil && (*XExpr)(_p.X5) != (*XExpr)(_p.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92136), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprDupØ00__func__Ø000))), unsafe.Pointer(str(49351)))
+ if (*XExpr)(_p.XpRight) != nil && (*XExpr)(_p.XpRight) != (*XExpr)(_p.XpLeft) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92136), unsafe.Pointer(&_exprDupØ00__func__Ø000), unsafe.Pointer(str(49306)))
crt.X__builtin_abort(tls)
}
}()
goto _41
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X4))))) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.X4), i32(0))
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpLeft)) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.XpLeft), int32(0))
_41:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X5))))) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.X5), i32(0))
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpRight)) = _sqlite3ExprDup(tls, _db, (*XExpr)(_p.XpRight), int32(0))
_33:
_32:
_12:
@@ -35965,135 +36658,135 @@ _12:
var _exprDupØ00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_exprDupØ00__func__Ø000[0], str(49387), 8)
+ crt.Xstrncpy(nil, &_exprDupØ00__func__Ø000[0], str(49342), 8)
}
-// Return the number of bytes required to create a duplicate of the
-// expression passed as the first argument. The second argument is a
-// mask containing EXPRDUP_XXX flags.
-//
-// The value returned includes space to create a copy of the Expr struct
-// itself and the buffer referred to by Expr.u.zToken, if any.
-//
-// If the EXPRDUP_REDUCE flag is set, then the return value includes
-// space to duplicate all Expr nodes in the tree formed by Expr.pLeft
-// and Expr.pRight variables (but not for any structures pointed to or
-// descended from the Expr.x.pList or Expr.x.pSelect variables).
+// C comment
+// /*
+// ** Return the number of bytes required to create a duplicate of the
+// ** expression passed as the first argument. The second argument is a
+// ** mask containing EXPRDUP_XXX flags.
+// **
+// ** The value returned includes space to create a copy of the Expr struct
+// ** itself and the buffer referred to by Expr.u.zToken, if any.
+// **
+// ** If the EXPRDUP_REDUCE flag is set, then the return value includes
+// ** space to duplicate all Expr nodes in the tree formed by Expr.pLeft
+// ** and Expr.pRight variables (but not for any structures pointed to or
+// ** descended from the Expr.x.pList or Expr.x.pSelect variables).
+// */
func _dupedExprSize(tls *crt.TLS, _p *XExpr, _flags int32) (r0 int32) {
var _nByte int32
- _nByte = i32(0)
+ _nByte = int32(0)
if _p == nil {
goto _0
}
_nByte = _dupedExprNodeSize(tls, _p, _flags)
- if (_flags & i32(1)) != 0 {
- {
- p := &_nByte
- *p = (*p) + (_dupedExprSize(tls, (*XExpr)(_p.X4), _flags) + _dupedExprSize(tls, (*XExpr)(_p.X5), _flags))
- sink1(*p)
- }
+ if (_flags & int32(1)) != 0 {
+ _nByte += _dupedExprSize(tls, (*XExpr)(_p.XpLeft), _flags) + _dupedExprSize(tls, (*XExpr)(_p.XpRight), _flags)
}
_0:
return _nByte
}
-// This function returns the space in bytes required to store the copy
-// of the Expr structure and a copy of the Expr.u.zToken string (if that
-// string is defined.)
+// C comment
+// /*
+// ** This function returns the space in bytes required to store the copy
+// ** of the Expr structure and a copy of the Expr.u.zToken string (if that
+// ** string is defined.)
+// */
func _dupedExprNodeSize(tls *crt.TLS, _p *XExpr, _flags int32) (r0 int32) {
var _nByte int32
- _nByte = _dupedExprStructSize(tls, _p, _flags) & i32(4095)
- if (((_p.X2) & uint32(i32(1024))) == uint32(i32(0))) && ((*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))) != nil) {
- {
- p := &_nByte
- *p = (*p) + (_sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))) + i32(1))
- sink1(*p)
- }
- }
- return (_nByte + i32(7)) & i32(-8)
-}
-
-// The dupedExpr*Size() routines each return the number of bytes required
-// to store a copy of an expression or expression tree. They differ in
-// how much of the tree is measured.
-//
-// dupedExprStructSize() Size of only the Expr structure
-// dupedExprNodeSize() Size of Expr + space for token
-// dupedExprSize() Expr + token + subtree components
-//
-// ***************************************************************************
-//
-// The dupedExprStructSize() function returns two values OR-ed together:
-// (1) the space required for a copy of the Expr structure only and
-// (2) the EP_xxx flags that indicate what the structure size should be.
-// The return values is always one of:
-//
-// EXPR_FULLSIZE
-// EXPR_REDUCEDSIZE | EP_Reduced
-// EXPR_TOKENONLYSIZE | EP_TokenOnly
-//
-// The size of the structure can be found by masking the return value
-// of this routine with 0xfff. The flags can be found by masking the
-// return value with EP_Reduced|EP_TokenOnly.
-//
-// Note that with flags==EXPRDUP_REDUCE, this routines works on full-size
-// (unreduced) Expr objects as they or originally constructed by the parser.
-// During expression analysis, extra information is computed and moved into
-// later parts of teh Expr object and that extra information might get chopped
-// off if the expression is reduced. Note also that it does not work to
-// make an EXPRDUP_REDUCE copy of a reduced expression. It is only legal
-// to reduce a pristine expression tree from the parser. The implementation
-// of dupedExprStructSize() contain multiple assert() statements that attempt
-// to enforce this constraint.
+ _nByte = _dupedExprStructSize(tls, _p, _flags) & int32(4095)
+ if ((_p.Xflags & uint32(1024)) == (0)) && ((*(**int8)(unsafe.Pointer(&_p.Xu))) != nil) {
+ _nByte += _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer(&_p.Xu))) + int32(1)
+ }
+ return (_nByte + int32(7)) & int32(-8)
+}
+
+// C comment
+// /*
+// ** The dupedExpr*Size() routines each return the number of bytes required
+// ** to store a copy of an expression or expression tree. They differ in
+// ** how much of the tree is measured.
+// **
+// ** dupedExprStructSize() Size of only the Expr structure
+// ** dupedExprNodeSize() Size of Expr + space for token
+// ** dupedExprSize() Expr + token + subtree components
+// **
+// ***************************************************************************
+// **
+// ** The dupedExprStructSize() function returns two values OR-ed together:
+// ** (1) the space required for a copy of the Expr structure only and
+// ** (2) the EP_xxx flags that indicate what the structure size should be.
+// ** The return values is always one of:
+// **
+// ** EXPR_FULLSIZE
+// ** EXPR_REDUCEDSIZE | EP_Reduced
+// ** EXPR_TOKENONLYSIZE | EP_TokenOnly
+// **
+// ** The size of the structure can be found by masking the return value
+// ** of this routine with 0xfff. The flags can be found by masking the
+// ** return value with EP_Reduced|EP_TokenOnly.
+// **
+// ** Note that with flags==EXPRDUP_REDUCE, this routines works on full-size
+// ** (unreduced) Expr objects as they or originally constructed by the parser.
+// ** During expression analysis, extra information is computed and moved into
+// ** later parts of teh Expr object and that extra information might get chopped
+// ** off if the expression is reduced. Note also that it does not work to
+// ** make an EXPRDUP_REDUCE copy of a reduced expression. It is only legal
+// ** to reduce a pristine expression tree from the parser. The implementation
+// ** of dupedExprStructSize() contain multiple assert() statements that attempt
+// ** to enforce this constraint.
+// */
func _dupedExprStructSize(tls *crt.TLS, _p *XExpr, _flags int32) (r0 int32) {
var _nSize int32
func() {
- if _flags != i32(1) && _flags != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91989), unsafe.Pointer((*int8)(unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000))), unsafe.Pointer(str(49395)))
+ if _flags != int32(1) && _flags != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91989), unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000), unsafe.Pointer(str(49350)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- i32(0)
- if (i32(0) == _flags) || (int32(_p.X0) == i32(159)) {
- _nSize = int32(u32(48))
+
+ if (int32(0) == _flags) || (int32(_p.Xop) == int32(159)) {
+ _nSize = int32(48)
goto _5
}
func() {
- if ((_p.X2) & uint32(i32(24576))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91995), unsafe.Pointer((*int8)(unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000))), unsafe.Pointer(str(49429)))
+ if (_p.Xflags & uint32(24576)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91995), unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000), unsafe.Pointer(str(49384)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X2) & uint32(i32(1))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91996), unsafe.Pointer((*int8)(unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000))), unsafe.Pointer(str(49474)))
+ if (_p.Xflags & uint32(1)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91996), unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000), unsafe.Pointer(str(49429)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X2) & uint32(i32(65536))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91997), unsafe.Pointer((*int8)(unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000))), unsafe.Pointer(str(49507)))
+ if (_p.Xflags & uint32(65536)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91997), unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000), unsafe.Pointer(str(49462)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X2) & uint32(i32(131072))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91998), unsafe.Pointer((*int8)(unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000))), unsafe.Pointer(str(49540)))
+ if (_p.Xflags & uint32(131072)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91998), unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000), unsafe.Pointer(str(49495)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XExpr)(_p.X4) != nil) || ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))) != nil) {
- _nSize = int32(u32(8220))
+ if (_p.XpLeft != nil) || ((*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))) != nil) {
+ _nSize = int32(8220)
goto _16
}
func() {
- if (*XExpr)(_p.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92002), unsafe.Pointer((*int8)(unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000))), unsafe.Pointer(str(21256)))
+ if (*XExpr)(_p.XpRight) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92002), unsafe.Pointer(&_dupedExprStructSizeØ00__func__Ø000), unsafe.Pointer(str(21211)))
crt.X__builtin_abort(tls)
}
}()
- _nSize = int32(u32(16396))
+ _nSize = int32(16396)
_16:
_5:
return _nSize
@@ -36102,20 +36795,23 @@ _5:
var _dupedExprStructSizeØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_dupedExprStructSizeØ00__func__Ø000[0], str(49573), 20)
+ crt.Xstrncpy(nil, &_dupedExprStructSizeØ00__func__Ø000[0], str(49528), 20)
}
-// Return the number of bytes allocated for the expression structure
-// passed as the first argument. This is always one of EXPR_FULLSIZE,
-// EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE.
+// C comment
+// /*
+// ** Return the number of bytes allocated for the expression structure
+// ** passed as the first argument. This is always one of EXPR_FULLSIZE,
+// ** EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE.
+// */
func _exprStructSize(tls *crt.TLS, _p *XExpr) (r0 int32) {
- if ((_p.X2) & uint32(i32(16384))) != uint32(i32(0)) {
- return int32(u32(12))
+ if (_p.Xflags & uint32(16384)) != (0) {
+ return int32(12)
}
- if ((_p.X2) & uint32(i32(8192))) != uint32(i32(0)) {
- return int32(u32(28))
+ if (_p.Xflags & uint32(8192)) != (0) {
+ return int32(28)
}
- return int32(u32(48))
+ return int32(48)
}
func _sqlite3SrcListDup(tls *crt.TLS, _db *Xsqlite3, _p *XSrcList, _flags int32) (r0 *XSrcList) {
@@ -36125,54 +36821,54 @@ func _sqlite3SrcListDup(tls *crt.TLS, _db *Xsqlite3, _p *XSrcList, _flags int32)
var _1_pNewItem, _1_pOldItem *TSrcList_item
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92250), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListDupØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92250), unsafe.Pointer(&_sqlite3SrcListDupØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
if _p == nil {
return nil
}
- _nByte = int32(u32(76) + func() uint32 {
- if (_p.X0) > i32(0) {
- return (u32(68) * uint32((_p.X0)-i32(1)))
+ _nByte = int32(uint32(76) + func() uint32 {
+ if _p.XnSrc > int32(0) {
+ return (uint32(68) * uint32(_p.XnSrc-int32(1)))
}
- return uint32(i32(0))
+ return (0)
}())
_pNew = (*XSrcList)(_sqlite3DbMallocRawNN(tls, _db, uint64(_nByte)))
if _pNew == nil {
return nil
}
- *(*int32)(unsafe.Pointer(&(_pNew.X0))) = int32(store5((*uint32)(unsafe.Pointer(&(_pNew.X1))), uint32(_p.X0)))
- _i = i32(0)
+ _pNew.XnSrc = int32(store23(&_pNew.XnAlloc, uint32(_p.XnSrc)))
+ _i = int32(0)
_6:
- if _i >= (_p.X0) {
+ if _i >= _p.XnSrc {
goto _9
}
- _1_pNewItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pNew.X2))))) + 68*uintptr(_i)))
- _1_pOldItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_p.X2))))) + 68*uintptr(_i)))
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNewItem.X0))))) = (*XSchema)(_1_pOldItem.X0)
- *(**int8)(unsafe.Pointer(&(_1_pNewItem.X1))) = _sqlite3DbStrDup(tls, _db, _1_pOldItem.X1)
- *(**int8)(unsafe.Pointer(&(_1_pNewItem.X2))) = _sqlite3DbStrDup(tls, _db, _1_pOldItem.X2)
- *(**int8)(unsafe.Pointer(&(_1_pNewItem.X3))) = _sqlite3DbStrDup(tls, _db, _1_pOldItem.X3)
- *(*t28)(unsafe.Pointer(&(_1_pNewItem.X9))) = _1_pOldItem.X9
- *(*int32)(unsafe.Pointer(&(_1_pNewItem.X11))) = _1_pOldItem.X11
- *(*int32)(unsafe.Pointer(&(_1_pNewItem.X6))) = _1_pOldItem.X6
- *(*int32)(unsafe.Pointer(&(_1_pNewItem.X7))) = _1_pOldItem.X7
- if ((uint32(((*t28)(unsafe.Pointer(&(_1_pNewItem.X9))).X1)>>uint(i32(1))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- *(**int8)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_1_pNewItem.X15))))) = _sqlite3DbStrDup(tls, _db, *(**int8)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_1_pOldItem.X15))))))
- }
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNewItem.X16))))) = (*XIndex)(_1_pOldItem.X16)
- if ((uint32(((*t28)(unsafe.Pointer(&(_1_pNewItem.X9))).X1)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_1_pNewItem.X15))))))) = _sqlite3ExprListDup(tls, _db, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_1_pOldItem.X15)))))), _flags)
- }
- _1_pTab = store44((**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNewItem.X4))))), (*XTable)(_1_pOldItem.X4))
+ _1_pNewItem = elem6((*TSrcList_item)(unsafe.Pointer(&_pNew.Xa)), uintptr(_i))
+ _1_pOldItem = elem6((*TSrcList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_i))
+ *(**XSchema)(unsafe.Pointer(&_1_pNewItem.XpSchema)) = (*XSchema)(_1_pOldItem.XpSchema)
+ _1_pNewItem.XzDatabase = _sqlite3DbStrDup(tls, _db, _1_pOldItem.XzDatabase)
+ _1_pNewItem.XzName = _sqlite3DbStrDup(tls, _db, _1_pOldItem.XzName)
+ _1_pNewItem.XzAlias = _sqlite3DbStrDup(tls, _db, _1_pOldItem.XzAlias)
+ _1_pNewItem.Xfg = _1_pOldItem.Xfg
+ _1_pNewItem.XiCursor = _1_pOldItem.XiCursor
+ _1_pNewItem.XaddrFillSub = _1_pOldItem.XaddrFillSub
+ _1_pNewItem.XregReturn = _1_pOldItem.XregReturn
+ if ((uint32((_1_pNewItem.Xfg.XnotIndexed)>>1) << 31) >> 31) != 0 {
+ *(**int8)(unsafe.Pointer(&_1_pNewItem.Xu1)) = _sqlite3DbStrDup(tls, _db, *(**int8)(unsafe.Pointer(&_1_pOldItem.Xu1)))
+ }
+ *(**XIndex)(unsafe.Pointer(&_1_pNewItem.XpIBIndex)) = (*XIndex)(_1_pOldItem.XpIBIndex)
+ if ((uint32((_1_pNewItem.Xfg.XnotIndexed)>>2) << 31) >> 31) != 0 {
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_1_pNewItem.Xu1)))) = _sqlite3ExprListDup(tls, _db, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_1_pOldItem.Xu1))), _flags)
+ }
+ _1_pTab = store72((**XTable)(unsafe.Pointer(&_1_pNewItem.XpTab)), (*XTable)(_1_pOldItem.XpTab))
if _1_pTab != nil {
- *(*uint32)(unsafe.Pointer(&(_1_pTab.X8))) += 1
+ _1_pTab.XnTabRef += 1
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNewItem.X5))))) = _sqlite3SelectDup(tls, _db, (*XSelect)(_1_pOldItem.X5), _flags)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNewItem.X12))))) = _sqlite3ExprDup(tls, _db, (*XExpr)(_1_pOldItem.X12), _flags)
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNewItem.X13))))) = _sqlite3IdListDup(tls, _db, (*XIdList)(_1_pOldItem.X13))
- *(*uint64)(unsafe.Pointer(&(_1_pNewItem.X14))) = _1_pOldItem.X14
+ *(**XSelect)(unsafe.Pointer(&_1_pNewItem.XpSelect)) = _sqlite3SelectDup(tls, _db, (*XSelect)(_1_pOldItem.XpSelect), _flags)
+ *(**XExpr)(unsafe.Pointer(&_1_pNewItem.XpOn)) = _sqlite3ExprDup(tls, _db, (*XExpr)(_1_pOldItem.XpOn), _flags)
+ *(**XIdList)(unsafe.Pointer(&_1_pNewItem.XpUsing)) = _sqlite3IdListDup(tls, _db, (*XIdList)(_1_pOldItem.XpUsing))
+ _1_pNewItem.XcolUsed = _1_pOldItem.XcolUsed
_i += 1
goto _6
_9:
@@ -36182,7 +36878,7 @@ _9:
var _sqlite3SrcListDupØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SrcListDupØ00__func__Ø000[0], str(49593), 18)
+ crt.Xstrncpy(nil, &_sqlite3SrcListDupØ00__func__Ø000[0], str(49548), 18)
}
func _sqlite3IdListDup(tls *crt.TLS, _db *Xsqlite3, _p *XIdList) (r0 *XIdList) {
@@ -36191,32 +36887,32 @@ func _sqlite3IdListDup(tls *crt.TLS, _db *Xsqlite3, _p *XIdList) (r0 *XIdList) {
var _2_pNewItem, _2_pOldItem *TIdList_item
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92290), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3IdListDupØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92290), unsafe.Pointer(&_sqlite3IdListDupØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
if _p == nil {
return nil
}
- _pNew = (*XIdList)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(8))))
+ _pNew = (*XIdList)(_sqlite3DbMallocRawNN(tls, _db, uint64(8)))
if _pNew == nil {
return nil
}
- *(*int32)(unsafe.Pointer(&(_pNew.X1))) = _p.X1
- *(**TIdList_item)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X0))))) = (*TIdList_item)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(_p.X1)*u32(8))))
- if (*TIdList_item)(_pNew.X0) == nil {
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_pNew))
+ _pNew.XnId = _p.XnId
+ *(**TIdList_item)(unsafe.Pointer(&_pNew.Xa)) = (*TIdList_item)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(_p.XnId)*uint32(8))))
+ if (*TIdList_item)(_pNew.Xa) == nil {
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_pNew))
return nil
}
- _i = i32(0)
+ _i = int32(0)
_5:
- if _i >= (_p.X1) {
+ if _i >= _p.XnId {
goto _8
}
- _2_pNewItem = (*TIdList_item)(unsafe.Pointer(uintptr(_pNew.X0) + 8*uintptr(_i)))
- _2_pOldItem = (*TIdList_item)(unsafe.Pointer(uintptr(_p.X0) + 8*uintptr(_i)))
- *(**int8)(unsafe.Pointer(&(_2_pNewItem.X0))) = _sqlite3DbStrDup(tls, _db, _2_pOldItem.X0)
- *(*int32)(unsafe.Pointer(&(_2_pNewItem.X1))) = _2_pOldItem.X1
+ _2_pNewItem = elem42((*TIdList_item)(_pNew.Xa), uintptr(_i))
+ _2_pOldItem = elem42((*TIdList_item)(_p.Xa), uintptr(_i))
+ _2_pNewItem.XzName = _sqlite3DbStrDup(tls, _db, _2_pOldItem.XzName)
+ _2_pNewItem.Xidx = _2_pOldItem.Xidx
_i += 1
goto _5
_8:
@@ -36226,7 +36922,7 @@ _8:
var _sqlite3IdListDupØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3IdListDupØ00__func__Ø000[0], str(49611), 17)
+ crt.Xstrncpy(nil, &_sqlite3IdListDupØ00__func__Ø000[0], str(49566), 17)
}
func _withDup(tls *crt.TLS, _db *Xsqlite3, _p *XWith) (r0 *XWith) {
@@ -36236,20 +36932,20 @@ func _withDup(tls *crt.TLS, _db *Xsqlite3, _p *XWith) (r0 *XWith) {
if _p == nil {
goto _0
}
- _1_nByte = int32(u32(24) + (u32(16) * uint32((_p.X0)-i32(1))))
+ _1_nByte = int32(uint32(24) + (uint32(16) * uint32(_p.XnCte-int32(1))))
_pRet = (*XWith)(_sqlite3DbMallocZero(tls, _db, uint64(_1_nByte)))
if _pRet == nil {
goto _1
}
- *(*int32)(unsafe.Pointer(&(_pRet.X0))) = _p.X0
- _2_i = i32(0)
+ _pRet.XnCte = _p.XnCte
+ _2_i = int32(0)
_2:
- if _2_i >= (_p.X0) {
+ if _2_i >= _p.XnCte {
goto _5
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pRet.X2))))) + 16*uintptr(_2_i))).X2))))) = _sqlite3SelectDup(tls, _db, (*XSelect)((*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_p.X2)))))+16*uintptr(_2_i))).X2), i32(0))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pRet.X2))))) + 16*uintptr(_2_i))).X1))))) = _sqlite3ExprListDup(tls, _db, (*XExprList)((*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_p.X2)))))+16*uintptr(_2_i))).X1), i32(0))
- *(**int8)(unsafe.Pointer(&((*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pRet.X2))))) + 16*uintptr(_2_i))).X0))) = _sqlite3DbStrDup(tls, _db, (*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_p.X2)))))+16*uintptr(_2_i))).X0)
+ *(**XSelect)(unsafe.Pointer(&(elem43((*TCte)(unsafe.Pointer(&_pRet.Xa)), uintptr(_2_i)).XpSelect))) = _sqlite3SelectDup(tls, _db, (*XSelect)(elem43((*TCte)(unsafe.Pointer(&_p.Xa)), uintptr(_2_i)).XpSelect), int32(0))
+ *(**XExprList)(unsafe.Pointer(&(elem43((*TCte)(unsafe.Pointer(&_pRet.Xa)), uintptr(_2_i)).XpCols))) = _sqlite3ExprListDup(tls, _db, (*XExprList)(elem43((*TCte)(unsafe.Pointer(&_p.Xa)), uintptr(_2_i)).XpCols), int32(0))
+ elem43((*TCte)(unsafe.Pointer(&_pRet.Xa)), uintptr(_2_i)).XzName = _sqlite3DbStrDup(tls, _db, elem43((*TCte)(unsafe.Pointer(&_p.Xa)), uintptr(_2_i)).XzName)
_2_i += 1
goto _2
_5:
@@ -36258,24 +36954,30 @@ _0:
return _pRet
}
-// Set the name of a Select object
+// C comment
+// /*
+// ** Set the name of a Select object
+// */
func _sqlite3SelectSetName(tls *crt.TLS, _p *XSelect, _zName *int8) {
if (_p != nil) && (_zName != nil) {
- Xsqlite3_snprintf(tls, int32(u32(12)), (*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6))))), str(24576), unsafe.Pointer(_zName))
- }
-}
-
-// Given an expression list (which is really the list of expressions
-// that form the result set of a SELECT statement) compute appropriate
-// column names for a table that would hold the expression list.
-//
-// All column names will be unique.
-//
-// Only the column names are computed. Column.zType, Column.zColl,
-// and other fields of Column are zeroed.
-//
-// Return SQLITE_OK on success. If a memory allocation error occurs,
-// store NULL in *paCol and 0 in *pnCol and return SQLITE_NOMEM.
+ Xsqlite3_snprintf(tls, int32(12), (*int8)(unsafe.Pointer(&_p.XzSelName)), str(24531), unsafe.Pointer(_zName))
+ }
+}
+
+// C comment
+// /*
+// ** Given an expression list (which is really the list of expressions
+// ** that form the result set of a SELECT statement) compute appropriate
+// ** column names for a table that would hold the expression list.
+// **
+// ** All column names will be unique.
+// **
+// ** Only the column names are computed. Column.zType, Column.zColl,
+// ** and other fields of Column are zeroed.
+// **
+// ** Return SQLITE_OK on success. If a memory allocation error occurs,
+// ** store NULL in *paCol and 0 in *pnCol and return SQLITE_NOMEM.
+// */
func _sqlite3ColumnsFromExprList(tls *crt.TLS, _pParse *XParse, _pEList *XExprList, _pnCol *int16, _paCol **XColumn) (r0 int32) {
var _i, _j, _nCol, _nName, _7_iCol int32
var _cnt uint32
@@ -36285,242 +36987,248 @@ func _sqlite3ColumnsFromExprList(tls *crt.TLS, _pParse *XParse, _pEList *XExprLi
var _5_pTab *XTable
var _p, _5_pColExpr *XExpr
var _aCol, _pCol *XColumn
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_sqlite3HashInit(tls, &_ht)
if _pEList != nil {
- _nCol = _pEList.X0
- _aCol = (*XColumn)(_sqlite3DbMallocZero(tls, _db, uint64(u32(16)*uint32(_nCol))))
+ _nCol = _pEList.XnExpr
+ _aCol = (*XColumn)(_sqlite3DbMallocZero(tls, _db, uint64(uint32(16)*uint32(_nCol))))
goto _1
}
- _nCol = i32(0)
+ _nCol = int32(0)
_aCol = nil
_1:
func() {
if _nCol != int32(int16(_nCol)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118197), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ColumnsFromExprListØ00__func__Ø000))), unsafe.Pointer(str(49628)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118197), unsafe.Pointer(&_sqlite3ColumnsFromExprListØ00__func__Ø000), unsafe.Pointer(str(49583)))
crt.X__builtin_abort(tls)
}
}()
*_pnCol = int16(_nCol)
*_paCol = _aCol
- *func() **XColumn { _i = i32(0); return &_pCol }() = _aCol
+ *func() **XColumn { _i = int32(0); return &_pCol }() = _aCol
_4:
- if _i >= _nCol || (_db.X17) != 0 {
+ if _i >= _nCol || _db.XmallocFailed != 0 {
goto _8
}
- _p = _sqlite3ExprSkipCollate(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))+20*uintptr(_i))).X0))
- if store0(&_zName, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))+20*uintptr(_i))).X1) != nil {
+ _p = _sqlite3ExprSkipCollate(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XpExpr))
+ if store1(&_zName, elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XzName) != nil {
goto _10
}
_5_pColExpr = _p
_11:
- if int32(_5_pColExpr.X0) == i32(122) {
- _5_pColExpr = (*XExpr)(_5_pColExpr.X5)
+ if int32(_5_pColExpr.Xop) == int32(122) {
+ _5_pColExpr = (*XExpr)(_5_pColExpr.XpRight)
func() {
if _5_pColExpr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118212), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ColumnsFromExprListØ00__func__Ø000))), unsafe.Pointer(str(49644)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118212), unsafe.Pointer(&_sqlite3ColumnsFromExprListØ00__func__Ø000), unsafe.Pointer(str(49599)))
crt.X__builtin_abort(tls)
}
}()
goto _11
}
- if int32(_5_pColExpr.X0) != i32(152) || (*XTable)(_5_pColExpr.X14) == nil {
+ if int32(_5_pColExpr.Xop) != int32(152) || (*XTable)(_5_pColExpr.XpTab) == nil {
goto _16
}
- _7_iCol = int32(_5_pColExpr.X9)
- _5_pTab = (*XTable)(_5_pColExpr.X14)
- if _7_iCol < i32(0) {
- _7_iCol = int32(_5_pTab.X10)
+ _7_iCol = int32(_5_pColExpr.XiColumn)
+ _5_pTab = (*XTable)(_5_pColExpr.XpTab)
+ if _7_iCol < int32(0) {
+ _7_iCol = int32(_5_pTab.XiPKey)
}
_zName = func() *int8 {
- if _7_iCol >= i32(0) {
- return ((*XColumn)(unsafe.Pointer(uintptr(_5_pTab.X1) + 16*uintptr(_7_iCol))).X0)
+ if _7_iCol >= int32(0) {
+ return (elem41((*XColumn)(_5_pTab.XaCol), uintptr(_7_iCol)).XzName)
}
- return str(27227)
+ return str(27182)
}()
goto _24
_16:
- if int32(_5_pColExpr.X0) == i32(27) {
+ if int32(_5_pColExpr.Xop) == int32(27) {
func() {
- if ((_5_pColExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118221), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ColumnsFromExprListØ00__func__Ø000))), unsafe.Pointer(str(49656)))
+ if (_5_pColExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118221), unsafe.Pointer(&_sqlite3ColumnsFromExprListØ00__func__Ø000), unsafe.Pointer(str(49611)))
crt.X__builtin_abort(tls)
}
}()
- _zName = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_5_pColExpr.X3)))))
+ _zName = *(**int8)(unsafe.Pointer(&_5_pColExpr.Xu))
goto _24
}
- _zName = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_i))).X2
+ _zName = elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XzSpan
_24:
_10:
- _zName = _sqlite3MPrintf(tls, _db, str(24576), unsafe.Pointer(_zName))
- _cnt = uint32(i32(0))
+ _zName = _sqlite3MPrintf(tls, _db, str(24531), unsafe.Pointer(_zName))
+ _cnt = 0
_25:
if _zName == nil || _sqlite3HashFind(tls, &_ht, _zName) == nil {
goto _26
}
_nName = _sqlite3Strlen30(tls, _zName)
- if _nName <= i32(0) {
+ if _nName <= int32(0) {
goto _28
}
- _j = _nName - i32(1)
+ _j = _nName - int32(1)
_29:
- if _j <= i32(0) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zName)) + 1*uintptr(_j))))))))&i32(4)) == 0 {
+ if _j <= int32(0) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zName, uintptr(_j))))))&int32(4)) == 0 {
goto _33
}
_j -= 1
goto _29
_33:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zName)) + 1*uintptr(_j)))) == i32(58) {
+ if int32(*elem1(_zName, uintptr(_j))) == int32(58) {
_nName = _j
}
_28:
- _zName = _sqlite3MPrintf(tls, _db, str(49696), _nName, unsafe.Pointer(_zName), preInc5(&_cnt, uint32(1)))
- if _cnt > uint32(i32(3)) {
- Xsqlite3_randomness(tls, int32(u32(4)), (unsafe.Pointer)(&_cnt))
+ _zName = _sqlite3MPrintf(tls, _db, str(49651), _nName, unsafe.Pointer(_zName), preInc23(&_cnt, uint32(1)))
+ if _cnt > uint32(3) {
+ Xsqlite3_randomness(tls, int32(4), unsafe.Pointer(&_cnt))
}
goto _25
_26:
- *(**int8)(unsafe.Pointer(&(_pCol.X0))) = _zName
- if (_zName != nil) && (_sqlite3HashInsert(tls, &_ht, _zName, (unsafe.Pointer)(_pCol)) == (unsafe.Pointer)(_pCol)) {
+ _pCol.XzName = _zName
+ if (_zName != nil) && (_sqlite3HashInsert(tls, &_ht, _zName, unsafe.Pointer(_pCol)) == unsafe.Pointer(_pCol)) {
_sqlite3OomFault(tls, _db)
}
*(*uintptr)(unsafe.Pointer(func() **XColumn { _i += 1; return &_pCol }())) += uintptr(16)
goto _4
_8:
_sqlite3HashClear(tls, &_ht)
- if (_db.X17) == 0 {
+ if _db.XmallocFailed == 0 {
goto _38
}
- _j = i32(0)
+ _j = int32(0)
_39:
if _j >= _i {
goto _42
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)((*XColumn)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aCol))+16*uintptr(_j))).X0))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(elem41(_aCol, uintptr(_j)).XzName))
_j += 1
goto _39
_42:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_aCol))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_aCol))
*_paCol = nil
- *_pnCol = int16(i32(0))
- return _sqlite3NomemError(tls, i32(118257))
+ *_pnCol = 0
+ return _sqlite3NomemError(tls, int32(118257))
_38:
- return i32(0)
-
- _ = _ht
- panic(0)
+ return int32(0)
}
var _sqlite3ColumnsFromExprListØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ColumnsFromExprListØ00__func__Ø000[0], str(49704), 27)
+ crt.Xstrncpy(nil, &_sqlite3ColumnsFromExprListØ00__func__Ø000[0], str(49659), 27)
}
-// Locate the table identified by *p.
-//
-// This is a wrapper around sqlite3LocateTable(). The difference between
-// sqlite3LocateTable() and this function is that this function restricts
-// the search to schema (p->pSchema) if it is not NULL. p->pSchema may be
-// non-NULL if it is part of a view or trigger program definition. See
-// sqlite3FixSrcList() for details.
+// C comment
+// /*
+// ** Locate the table identified by *p.
+// **
+// ** This is a wrapper around sqlite3LocateTable(). The difference between
+// ** sqlite3LocateTable() and this function is that this function restricts
+// ** the search to schema (p->pSchema) if it is not NULL. p->pSchema may be
+// ** non-NULL if it is part of a view or trigger program definition. See
+// ** sqlite3FixSrcList() for details.
+// */
func _sqlite3LocateTableItem(tls *crt.TLS, _pParse *XParse, _flags uint32, _p *TSrcList_item) (r0 *XTable) {
var _1_iDb int32
var _zDb *int8
func() {
- if (*XSchema)(_p.X0) != nil && (_p.X1) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100094), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3LocateTableItemØ00__func__Ø000))), unsafe.Pointer(str(49731)))
+ if (*XSchema)(_p.XpSchema) != nil && _p.XzDatabase != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100094), unsafe.Pointer(&_sqlite3LocateTableItemØ00__func__Ø000), unsafe.Pointer(str(49686)))
crt.X__builtin_abort(tls)
}
}()
- if (*XSchema)(_p.X0) != nil {
- _1_iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_p.X0))
- _zDb = (*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_pParse.X0).X4) + 16*uintptr(_1_iDb))).X0
+ if _p.XpSchema != nil {
+ _1_iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_p.XpSchema))
+ _zDb = elem27((*XDb)((*Xsqlite3)(_pParse.Xdb).XaDb), uintptr(_1_iDb)).XzDbSName
goto _4
}
- _zDb = _p.X1
+ _zDb = _p.XzDatabase
_4:
- return _sqlite3LocateTable(tls, _pParse, _flags, _p.X2, _zDb)
+ return _sqlite3LocateTable(tls, _pParse, _flags, _p.XzName, _zDb)
}
var _sqlite3LocateTableItemØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3LocateTableItemØ00__func__Ø000[0], str(49764), 23)
+ crt.Xstrncpy(nil, &_sqlite3LocateTableItemØ00__func__Ø000[0], str(49719), 23)
}
-// Locate the in-memory structure that describes a particular database
-// table given the name of that table and (optionally) the name of the
-// database containing the table. Return NULL if not found. Also leave an
-// error message in pParse->zErrMsg.
-//
-// The difference between this routine and sqlite3FindTable() is that this
-// routine leaves an error message in pParse->zErrMsg where
-// sqlite3FindTable() does not.
+// C comment
+// /*
+// ** Locate the in-memory structure that describes a particular database
+// ** table given the name of that table and (optionally) the name of the
+// ** database containing the table. Return NULL if not found. Also leave an
+// ** error message in pParse->zErrMsg.
+// **
+// ** The difference between this routine and sqlite3FindTable() is that this
+// ** routine leaves an error message in pParse->zErrMsg where
+// ** sqlite3FindTable() does not.
+// */
func _sqlite3LocateTable(tls *crt.TLS, _pParse *XParse, _flags uint32, _zName *int8, _zDbase *int8) (r0 *XTable) {
var _2_zMsg *int8
var _p *XTable
var _3_pMod *XModule
- if i32(0) != _sqlite3ReadSchema(tls, _pParse) {
+ if int32(0) != _sqlite3ReadSchema(tls, _pParse) {
return nil
}
- _p = _sqlite3FindTable(tls, (*Xsqlite3)(_pParse.X0), _zName, _zDbase)
+ _p = _sqlite3FindTable(tls, (*Xsqlite3)(_pParse.Xdb), _zName, _zDbase)
if _p != nil {
goto _1
}
_2_zMsg = func() *int8 {
- if (_flags & uint32(i32(1))) != 0 {
- return str(49787)
+ if (_flags & uint32(1)) != 0 {
+ return str(49742)
}
- return str(49800)
+ return str(49755)
}()
- if _sqlite3FindDbName(tls, (*Xsqlite3)(_pParse.X0), _zDbase) >= i32(1) {
+ if _sqlite3FindDbName(tls, (*Xsqlite3)(_pParse.Xdb), _zDbase) >= int32(1) {
goto _4
}
- _3_pMod = (*XModule)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&((*Xsqlite3)(_pParse.X0).X65))), _zName))
- if (_3_pMod == nil) && (Xsqlite3_strnicmp(tls, _zName, str(49814), i32(7)) == i32(0)) {
- _3_pMod = _sqlite3PragmaVtabRegister(tls, (*Xsqlite3)(_pParse.X0), _zName)
+ _3_pMod = (*XModule)(_sqlite3HashFind(tls, &((*Xsqlite3)(_pParse.Xdb).XaModule), _zName))
+ if (_3_pMod == nil) && (Xsqlite3_strnicmp(tls, _zName, str(49769), int32(7)) == int32(0)) {
+ _3_pMod = _sqlite3PragmaVtabRegister(tls, (*Xsqlite3)(_pParse.Xdb), _zName)
}
if (_3_pMod != nil) && _sqlite3VtabEponymousTableInit(tls, _pParse, _3_pMod) != 0 {
- return (*XTable)(_3_pMod.X4)
+ return (*XTable)(_3_pMod.XpEpoTab)
}
_4:
- if (_flags & uint32(i32(2))) != uint32(i32(0)) {
+ if (_flags & uint32(2)) != (0) {
goto _9
}
if _zDbase != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(49822), unsafe.Pointer(_2_zMsg), unsafe.Pointer(_zDbase), unsafe.Pointer(_zName))
+ _sqlite3ErrorMsg(tls, _pParse, str(49777), unsafe.Pointer(_2_zMsg), unsafe.Pointer(_zDbase), unsafe.Pointer(_zName))
goto _11
}
- _sqlite3ErrorMsg(tls, _pParse, str(49832), unsafe.Pointer(_2_zMsg), unsafe.Pointer(_zName))
+ _sqlite3ErrorMsg(tls, _pParse, str(49787), unsafe.Pointer(_2_zMsg), unsafe.Pointer(_zName))
_11:
- *(*uint8)(unsafe.Pointer(&(_pParse.X5))) = uint8(i32(1))
+ _pParse.XcheckSchema = uint8(1)
_9:
_1:
return _p
}
-// This routine is a no-op if the database schema is already initialized.
-// Otherwise, the schema is loaded. An error code is returned.
+// C comment
+// /*
+// ** This routine is a no-op if the database schema is already initialized.
+// ** Otherwise, the schema is loaded. An error code is returned.
+// */
func _sqlite3ReadSchema(tls *crt.TLS, _pParse *XParse) (r0 int32) {
var _rc int32
var _db *Xsqlite3
- _rc = i32(0)
- _db = (*Xsqlite3)(_pParse.X0)
+ _rc = int32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116068), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ReadSchemaØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116068), unsafe.Pointer(&_sqlite3ReadSchemaØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 {
- _rc = _sqlite3Init(tls, _db, (**int8)(unsafe.Pointer(&(_pParse.X1))))
+ if (_db.Xinit.Xbusy) == 0 {
+ _rc = _sqlite3Init(tls, _db, &_pParse.XzErrMsg)
}
- if _rc != i32(0) {
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = _rc
- *(*int32)(unsafe.Pointer(&(_pParse.X16))) += 1
+ if _rc != int32(0) {
+ _pParse.Xrc = _rc
+ _pParse.XnErr += 1
}
return _rc
}
@@ -36528,47 +37236,50 @@ func _sqlite3ReadSchema(tls *crt.TLS, _pParse *XParse) (r0 int32) {
var _sqlite3ReadSchemaØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ReadSchemaØ00__func__Ø000[0], str(49839), 18)
+ crt.Xstrncpy(nil, &_sqlite3ReadSchemaØ00__func__Ø000[0], str(49794), 18)
}
-// Initialize all database files - the main database file, the file
-// used to store temporary tables, and any additional database files
-// created using ATTACH statements. Return a success code. If an
-// error occurs, write an error message into *pzErrMsg.
-//
-// After a database is initialized, the DB_SchemaLoaded bit is set
-// bit is set in the flags field of the Db structure. If the database
-// file was of zero-length, then the DB_Empty flag is also set.
+// C comment
+// /*
+// ** Initialize all database files - the main database file, the file
+// ** used to store temporary tables, and any additional database files
+// ** created using ATTACH statements. Return a success code. If an
+// ** error occurs, write an error message into *pzErrMsg.
+// **
+// ** After a database is initialized, the DB_SchemaLoaded bit is set
+// ** bit is set in the flags field of the Db structure. If the database
+// ** file was of zero-length, then the DB_Empty flag is also set.
+// */
func _sqlite3Init(tls *crt.TLS, _db *Xsqlite3, _pzErrMsg **int8) (r0 int32) {
var _i, _rc, _commit_internal int32
- _commit_internal = bool2int(((_db.X6) & i32(2)) == 0)
+ _commit_internal = bool2int((_db.Xflags & int32(2)) == 0)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116025), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116025), unsafe.Pointer(&_sqlite3InitØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3BtreeHoldsMutex(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X1)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116026), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitØ00__func__Ø000))), unsafe.Pointer(str(49857)))
+ if _sqlite3BtreeHoldsMutex(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), 0).XpBt)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116026), unsafe.Pointer(&_sqlite3InitØ00__func__Ø000), unsafe.Pointer(str(49812)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116027), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitØ00__func__Ø000))), unsafe.Pointer(str(49896)))
+ if int32(_db.Xinit.Xbusy) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116027), unsafe.Pointer(&_sqlite3InitØ00__func__Ø000), unsafe.Pointer(str(49851)))
crt.X__builtin_abort(tls)
}
}()
- _rc = i32(0)
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X2))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_db.X14))) = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X4).X8
- _i = i32(0)
+ _rc = int32(0)
+ _db.Xinit.Xbusy = uint8(1)
+ _db.Xenc = (*XSchema)(elem27((*XDb)(_db.XaDb), 0).XpSchema).Xenc
+ _i = int32(0)
_6:
- if _rc != i32(0) || _i >= (_db.X5) {
+ if _rc != int32(0) || _i >= _db.XnDb {
goto _10
}
- if ((int32((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_i))).X4).X9) & i32(1)) == i32(1)) || (_i == i32(1)) {
+ if ((int32((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpSchema).XschemaFlags) & int32(1)) == int32(1)) || (_i == int32(1)) {
goto _7
}
_rc = _sqlite3InitOne(tls, _db, _i, _pzErrMsg)
@@ -36580,21 +37291,21 @@ _7:
goto _6
_10:
func() {
- if (_db.X5) <= i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116044), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitØ00__func__Ø000))), unsafe.Pointer(str(49913)))
+ if _db.XnDb <= int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116044), unsafe.Pointer(&_sqlite3InitØ00__func__Ø000), unsafe.Pointer(str(49868)))
crt.X__builtin_abort(tls)
}
}()
- if _rc != i32(0) || (int32((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X4).X9)&i32(1)) == i32(1) {
+ if _rc != int32(0) || (int32((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema).XschemaFlags)&int32(1)) == int32(1) {
goto _17
}
- _rc = _sqlite3InitOne(tls, _db, i32(1), _pzErrMsg)
+ _rc = _sqlite3InitOne(tls, _db, int32(1), _pzErrMsg)
if _rc != 0 {
- _sqlite3ResetOneSchema(tls, _db, i32(1))
+ _sqlite3ResetOneSchema(tls, _db, int32(1))
}
_17:
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X2))) = uint8(i32(0))
- if (_rc == i32(0)) && _commit_internal != 0 {
+ _db.Xinit.Xbusy = 0
+ if (_rc == int32(0)) && _commit_internal != 0 {
_sqlite3CommitInternalChanges(tls, _db)
}
return _rc
@@ -36603,15 +37314,18 @@ _17:
var _sqlite3InitØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3InitØ00__func__Ø000[0], str(49923), 12)
+ crt.Xstrncpy(nil, &_sqlite3InitØ00__func__Ø000[0], str(49878), 12)
}
-// Attempt to read the database schema and initialize internal
-// data structures for a single database file. The index of the
-// database file is given by iDb. iDb==0 is used for the main
-// database. iDb==1 should never be used. iDb>=2 is used for
-// auxiliary databases. Return one of the SQLITE_ error codes to
-// indicate success or failure.
+// C comment
+// /*
+// ** Attempt to read the database schema and initialize internal
+// ** data structures for a single database file. The index of the
+// ** database file is given by iDb. iDb==0 is used for the main
+// ** database. iDb==1 should never be used. iDb>=2 is used for
+// ** auxiliary databases. Return one of the SQLITE_ error codes to
+// ** indicate success or failure.
+// */
func _sqlite3InitOne(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _pzErrMsg **int8) (r0 int32) {
var _rc, _i, _size, _openedTransaction int32
var _zMasterName, _17_zSql *int8
@@ -36621,210 +37335,205 @@ func _sqlite3InitOne(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _pzErrMsg **int8)
var _meta [5]int32
var _azArg [4]*int8
var _initData XInitData
- _openedTransaction = i32(0)
+ _openedTransaction = int32(0)
func() {
- if _iDb < i32(0) || _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115814), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _iDb < int32(0) || _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115814), unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115815), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000))), unsafe.Pointer(str(49935)))
+ if (elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115815), unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000), unsafe.Pointer(str(49890)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115816), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115816), unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iDb != i32(1) && _sqlite3BtreeHoldsMutex(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X1)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115817), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000))), unsafe.Pointer(str(49956)))
+ if _iDb != int32(1) && _sqlite3BtreeHoldsMutex(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpBt)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115817), unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000), unsafe.Pointer(str(49911)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg)) + 4*uintptr(i32(0)))) = store0(&_zMasterName, func() *int8 {
- if i32(1) != 0 && (_iDb == i32(1)) {
- return str(50007)
+ *elem0((**int8)(unsafe.Pointer(&_azArg)), 0) = store1(&_zMasterName, func() *int8 {
+ if int32(1) != 0 && (_iDb == int32(1)) {
+ return str(49962)
}
- return str(50026)
+ return str(49981)
}())
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg)) + 4*uintptr(i32(1)))) = str(50040)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg)) + 4*uintptr(i32(2)))) = str(50042)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg)) + 4*uintptr(i32(3)))) = nil
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_initData.X0))))) = _db
- *(*int32)(unsafe.Pointer(&(_initData.X2))) = _iDb
- *(*int32)(unsafe.Pointer(&(_initData.X3))) = i32(0)
- *(***int8)(unsafe.Pointer(&(_initData.X1))) = _pzErrMsg
- _sqlite3InitCallback(tls, (unsafe.Pointer)(&_initData), i32(3), (**int8)(unsafe.Pointer(&_azArg)), nil)
- if (_initData.X3) != 0 {
- _rc = _initData.X3
+ *elem0((**int8)(unsafe.Pointer(&_azArg)), uintptr(1)) = str(49995)
+ *elem0((**int8)(unsafe.Pointer(&_azArg)), uintptr(2)) = str(49997)
+ *elem0((**int8)(unsafe.Pointer(&_azArg)), uintptr(3)) = nil
+ *(**Xsqlite3)(unsafe.Pointer(&_initData.Xdb)) = _db
+ _initData.XiDb = _iDb
+ _initData.Xrc = int32(0)
+ _initData.XpzErrMsg = _pzErrMsg
+ _sqlite3InitCallback(tls, unsafe.Pointer(&_initData), int32(3), (**int8)(unsafe.Pointer(&_azArg)), nil)
+ if _initData.Xrc != 0 {
+ _rc = _initData.Xrc
goto _error_out
}
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb)))
- if (*XBtree)(_pDb.X1) != nil {
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb))
+ if (*XBtree)(_pDb.XpBt) != nil {
goto _14
}
- if i32(1) != 0 && func() int32 {
- if _iDb == i32(1) {
- return i32(1)
+ if int32(1) != 0 && func() int32 {
+ if _iDb == int32(1) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115843), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115843), unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
{
- p := (*uint16)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(1)))).X4).X9)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ p := &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema).XschemaFlags)
+ *p = uint16(int32(*p) | int32(1))
}
}
- return i32(0)
+ return int32(0)
_14:
- _sqlite3BtreeEnter(tls, (*XBtree)(_pDb.X1))
- if _sqlite3BtreeIsInReadTrans(tls, (*XBtree)(_pDb.X1)) != 0 {
+ _sqlite3BtreeEnter(tls, (*XBtree)(_pDb.XpBt))
+ if _sqlite3BtreeIsInReadTrans(tls, (*XBtree)(_pDb.XpBt)) != 0 {
goto _19
}
- _rc = _sqlite3BtreeBeginTrans(tls, (*XBtree)(_pDb.X1), i32(0))
- if _rc != i32(0) {
+ _rc = _sqlite3BtreeBeginTrans(tls, (*XBtree)(_pDb.XpBt), int32(0))
+ if _rc != int32(0) {
_sqlite3SetString(tls, _pzErrMsg, _db, _sqlite3ErrStr(tls, _rc))
goto _initone_error_out
}
- _openedTransaction = i32(1)
+ _openedTransaction = int32(1)
_19:
- _i = i32(0)
+ _i = int32(0)
_21:
- if _i >= i32(5) {
+ if _i >= int32(5) {
goto _24
}
- _sqlite3BtreeGetMeta(tls, (*XBtree)(_pDb.X1), _i+i32(1), (*uint32)(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_meta))+4*uintptr(_i))))))
+ _sqlite3BtreeGetMeta(tls, (*XBtree)(_pDb.XpBt), _i+int32(1), (*uint32)(unsafe.Pointer(elem8((*int32)(unsafe.Pointer(&_meta)), uintptr(_i)))))
_i += 1
goto _21
_24:
- *(*int32)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X0))) = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_meta)) + 4*uintptr(i32(0))))
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_meta)) + 4*uintptr(i32(4))))) == 0 {
+ (*XSchema)(_pDb.XpSchema).Xschema_cookie = *elem8((*int32)(unsafe.Pointer(&_meta)), 0)
+ if (*elem8((*int32)(unsafe.Pointer(&_meta)), uintptr(4))) == 0 {
goto _25
}
- if _iDb != i32(0) {
+ if _iDb != int32(0) {
goto _26
}
- _8_encoding = uint8(int32(uint8(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_meta)) + 4*uintptr(i32(4)))))) & i32(3))
- if int32(_8_encoding) == i32(0) {
- _8_encoding = uint8(i32(1))
+ _8_encoding = uint8(int32(uint8(*elem8((*int32)(unsafe.Pointer(&_meta)), uintptr(4)))) & int32(3))
+ if int32(_8_encoding) == int32(0) {
+ _8_encoding = uint8(1)
}
- *(*uint8)(unsafe.Pointer(&(_db.X14))) = _8_encoding
+ _db.Xenc = _8_encoding
goto _28
_26:
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_meta)) + 4*uintptr(i32(4))))) != int32(_db.X14) {
- _sqlite3SetString(tls, _pzErrMsg, _db, str(50118))
- _rc = i32(1)
+ if (*elem8((*int32)(unsafe.Pointer(&_meta)), uintptr(4))) != int32(_db.Xenc) {
+ _sqlite3SetString(tls, _pzErrMsg, _db, str(50073))
+ _rc = int32(1)
goto _initone_error_out
}
_28:
goto _30
_25:
{
- p := (*uint16)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4).X9)))
- *p = uint16(int32(*p) | i32(4))
- sink14(*p)
+ p := &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).XschemaFlags)
+ *p = uint16(int32(*p) | int32(4))
}
_30:
- *(*uint8)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X8))) = _db.X14
- if ((*XSchema)(_pDb.X4).X10) != i32(0) {
+ (*XSchema)(_pDb.XpSchema).Xenc = _db.Xenc
+ if ((*XSchema)(_pDb.XpSchema).Xcache_size) != int32(0) {
goto _31
}
- _size = _sqlite3AbsInt32(tls, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_meta)) + 4*uintptr(i32(2)))))
- if _size == i32(0) {
- _size = i32(-2000)
+ _size = _sqlite3AbsInt32(tls, *elem8((*int32)(unsafe.Pointer(&_meta)), uintptr(2)))
+ if _size == int32(0) {
+ _size = int32(-2000)
}
- *(*int32)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X10))) = _size
- _sqlite3BtreeSetCacheSize(tls, (*XBtree)(_pDb.X1), (*XSchema)(_pDb.X4).X10)
+ (*XSchema)(_pDb.XpSchema).Xcache_size = _size
+ _sqlite3BtreeSetCacheSize(tls, (*XBtree)(_pDb.XpBt), (*XSchema)(_pDb.XpSchema).Xcache_size)
_31:
- *(*uint8)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X7))) = uint8(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_meta)) + 4*uintptr(i32(1)))))
- if int32((*XSchema)(_pDb.X4).X7) == i32(0) {
- *(*uint8)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X7))) = uint8(i32(1))
+ (*XSchema)(_pDb.XpSchema).Xfile_format = uint8(*elem8((*int32)(unsafe.Pointer(&_meta)), uintptr(1)))
+ if int32((*XSchema)(_pDb.XpSchema).Xfile_format) == int32(0) {
+ (*XSchema)(_pDb.XpSchema).Xfile_format = uint8(1)
}
- if int32((*XSchema)(_pDb.X4).X7) > i32(4) {
- _sqlite3SetString(tls, _pzErrMsg, _db, str(50186))
- _rc = i32(1)
+ if int32((*XSchema)(_pDb.XpSchema).Xfile_format) > int32(4) {
+ _sqlite3SetString(tls, _pzErrMsg, _db, str(50141))
+ _rc = int32(1)
goto _initone_error_out
}
- if (_iDb == i32(0)) && ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_meta)) + 4*uintptr(i32(1))))) >= i32(4)) {
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-32769)
- sink1(*p)
- }
+ if (_iDb == int32(0)) && ((*elem8((*int32)(unsafe.Pointer(&_meta)), uintptr(1))) >= int32(4)) {
+ _db.Xflags &= int32(-32769)
}
func() {
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115952), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000))), unsafe.Pointer(str(50210)))
+ if (_db.Xinit.Xbusy) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115952), unsafe.Pointer(&_sqlite3InitOneØ00__func__Ø000), unsafe.Pointer(str(50165)))
crt.X__builtin_abort(tls)
}
}()
- _17_zSql = _sqlite3MPrintf(tls, _db, str(50224), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0), unsafe.Pointer(_zMasterName))
- _18_xAuth = _db.X59
- *(*func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32)(unsafe.Pointer(&(_db.X59))) = nil
- _rc = Xsqlite3_exec(tls, _db, _17_zSql, _sqlite3InitCallback, (unsafe.Pointer)(&_initData), nil)
- *(*func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32)(unsafe.Pointer(&(_db.X59))) = _18_xAuth
- if _rc == i32(0) {
- _rc = _initData.X3
+ _17_zSql = _sqlite3MPrintf(tls, _db, str(50179), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName), unsafe.Pointer(_zMasterName))
+ _18_xAuth = _db.XxAuth
+ _db.XxAuth = nil
+ _rc = Xsqlite3_exec(tls, _db, _17_zSql, _sqlite3InitCallback, unsafe.Pointer(&_initData), nil)
+ _db.XxAuth = _18_xAuth
+ if _rc == int32(0) {
+ _rc = _initData.Xrc
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_17_zSql))
- if _rc == i32(0) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_17_zSql))
+ if _rc == int32(0) {
_sqlite3AnalysisLoad(tls, _db, _iDb)
}
- if (_db.X17) != 0 {
- _rc = _sqlite3NomemError(tls, i32(115978))
+ if _db.XmallocFailed != 0 {
+ _rc = _sqlite3NomemError(tls, int32(115978))
_sqlite3ResetAllSchemasOfConnection(tls, _db)
}
- if (_rc == i32(0)) || ((_db.X6)&i32(65536)) != 0 {
+ if (_rc == int32(0)) || (_db.Xflags&int32(65536)) != 0 {
{
- p := (*uint16)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4).X9)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ p := &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).XschemaFlags)
+ *p = uint16(int32(*p) | int32(1))
}
- _rc = i32(0)
+ _rc = int32(0)
}
_initone_error_out:
if _openedTransaction != 0 {
- _sqlite3BtreeCommit(tls, (*XBtree)(_pDb.X1))
+ _sqlite3BtreeCommit(tls, (*XBtree)(_pDb.XpBt))
}
- _sqlite3BtreeLeave(tls, (*XBtree)(_pDb.X1))
+ _sqlite3BtreeLeave(tls, (*XBtree)(_pDb.XpBt))
_error_out:
- if (_rc == i32(7)) || (_rc == i32(3082)) {
+ if (_rc == int32(7)) || (_rc == int32(3082)) {
_sqlite3OomFault(tls, _db)
}
return _rc
_ = _azArg
_ = _meta
- _ = _initData
panic(0)
}
var _sqlite3InitOneØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3InitOneØ00__func__Ø000[0], str(50279), 15)
+ crt.Xstrncpy(nil, &_sqlite3InitOneØ00__func__Ø000[0], str(50234), 15)
}
-// This is the callback routine for the code that initializes the
-// database. See sqlite3Init() below for additional information.
-// This routine is also called from the OP_ParseSchema opcode of the VDBE.
-//
-// Each callback contains the following information:
-//
-// argv[0] = name of thing being created
-// argv[1] = root page number for table or index. 0 for trigger or view.
-// argv[2] = SQL text for the CREATE statement.
-//
+// C comment
+// /*
+// ** This is the callback routine for the code that initializes the
+// ** database. See sqlite3Init() below for additional information.
+// ** This routine is also called from the OP_ParseSchema opcode of the VDBE.
+// **
+// ** Each callback contains the following information:
+// **
+// ** argv[0] = name of thing being created
+// ** argv[1] = root page number for table or index. 0 for trigger or view.
+// ** argv[2] = SQL text for the CREATE statement.
+// **
+// */
func _sqlite3InitCallback(tls *crt.TLS, _pInit unsafe.Pointer, _argc int32, _argv **int8, _NotUsed **int8) (r0 int32) {
var _iDb, _3_rc, _3_rcp int32
var _3_pStmt unsafe.Pointer
@@ -36833,91 +37542,90 @@ func _sqlite3InitCallback(tls *crt.TLS, _pInit unsafe.Pointer, _argc int32, _arg
var _10_pIndex *XIndex
var _pData *XInitData
_pData = (*XInitData)(_pInit)
- _db = (*Xsqlite3)(_pData.X0)
- _iDb = _pData.X2
+ _db = (*Xsqlite3)(_pData.Xdb)
+ _iDb = _pData.XiDb
func() {
- if _argc != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115722), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000))), unsafe.Pointer(str(50294)))
+ if _argc != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115722), unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000), unsafe.Pointer(str(50249)))
crt.X__builtin_abort(tls)
}
}()
_ = _argc
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115724), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115724), unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4).X9)))
- *p = uint16(int32(*p) & i32(-5))
- sink14(*p)
+ p := &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).XschemaFlags)
+ *p = uint16(int32(*p) & int32(-5))
}
- if (_db.X17) != 0 {
- _corruptSchema(tls, _pData, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), nil)
- return i32(1)
+ if _db.XmallocFailed != 0 {
+ _corruptSchema(tls, _pData, *elem0(_argv, 0), nil)
+ return int32(1)
}
func() {
- if _iDb < i32(0) || _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115731), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _iDb < int32(0) || _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115731), unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
if _argv == nil {
- return i32(0)
+ return int32(0)
}
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))) == nil {
- _corruptSchema(tls, _pData, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), nil)
+ if (*elem0(_argv, uintptr(1))) == nil {
+ _corruptSchema(tls, _pData, *elem0(_argv, 0), nil)
goto _32
}
- if Xsqlite3_strnicmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2)))), str(50302), i32(7)) != i32(0) {
+ if Xsqlite3_strnicmp(tls, *elem0(_argv, uintptr(2)), str(50257), int32(7)) != int32(0) {
goto _11
}
- _3_saved_iDb = (*t21)(unsafe.Pointer(&(_db.X33))).X1
+ _3_saved_iDb = _db.Xinit.XiDb
func() {
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115746), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000))), unsafe.Pointer(str(50210)))
+ if (_db.Xinit.Xbusy) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115746), unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000), unsafe.Pointer(str(50165)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X1))) = uint8(_iDb)
- *(*int32)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X0))) = _sqlite3Atoi(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X3))) = uint8(i32(0))
- _3_rcp = Xsqlite3_prepare(tls, _db, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2)))), i32(-1), &_3_pStmt, nil)
- _3_rc = _db.X10
+ _db.Xinit.XiDb = uint8(_iDb)
+ _db.Xinit.XnewTnum = _sqlite3Atoi(tls, *elem0(_argv, uintptr(1)))
+ _db.Xinit.XorphanTrigger = 0
+ _3_rcp = Xsqlite3_prepare(tls, _db, *elem0(_argv, uintptr(2)), int32(-1), &_3_pStmt, nil)
+ _3_rc = _db.XerrCode
func() {
- if (_3_rc & i32(255)) != (_3_rcp & i32(255)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115752), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000))), unsafe.Pointer(str(50310)))
+ if (_3_rc & int32(255)) != (_3_rcp & int32(255)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115752), unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000), unsafe.Pointer(str(50265)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X1))) = _3_saved_iDb
+ _db.Xinit.XiDb = _3_saved_iDb
func() {
- if int32(_3_saved_iDb) != i32(0) && ((_db.X6)&i32(268435456)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115754), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000))), unsafe.Pointer(str(50332)))
+ if int32(_3_saved_iDb) != int32(0) && (_db.Xflags&int32(268435456)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115754), unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000), unsafe.Pointer(str(50287)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) == _3_rc {
+ if int32(0) == _3_rc {
goto _19
}
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X3) != 0 {
+ if (_db.Xinit.XorphanTrigger) != 0 {
func() {
- if _iDb != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115757), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000))), unsafe.Pointer(str(50379)))
+ if _iDb != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115757), unsafe.Pointer(&_sqlite3InitCallbackØ00__func__Ø000), unsafe.Pointer(str(50334)))
crt.X__builtin_abort(tls)
}
}()
goto _23
}
- *(*int32)(unsafe.Pointer(&(_pData.X3))) = _3_rc
- if _3_rc == i32(7) {
+ _pData.Xrc = _3_rc
+ if _3_rc == int32(7) {
_sqlite3OomFault(tls, _db)
goto _27
}
- if (_3_rc != i32(9)) && ((_3_rc & i32(255)) != i32(6)) {
- _corruptSchema(tls, _pData, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), Xsqlite3_errmsg(tls, _db))
+ if (_3_rc != int32(9)) && ((_3_rc & int32(255)) != int32(6)) {
+ _corruptSchema(tls, _pData, *elem0(_argv, 0), Xsqlite3_errmsg(tls, _db))
}
_27:
_23:
@@ -36925,78 +37633,87 @@ _19:
Xsqlite3_finalize(tls, _3_pStmt)
goto _32
_11:
- if ((*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) == nil) || (((*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2))))) != nil) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2)))))) + 1*uintptr(i32(0))))) != i32(0))) {
- _corruptSchema(tls, _pData, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), nil)
+ if ((*elem0(_argv, 0)) == nil) || (((*elem0(_argv, uintptr(2))) != nil) && (int32(*elem1(*elem0(_argv, uintptr(2)), 0)) != int32(0))) {
+ _corruptSchema(tls, _pData, *elem0(_argv, 0), nil)
goto _32
}
- _10_pIndex = _sqlite3FindIndex(tls, _db, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0)
+ _10_pIndex = _sqlite3FindIndex(tls, _db, *elem0(_argv, 0), elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName)
if _10_pIndex == nil {
goto _35
}
- if _sqlite3GetInt32(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))), (*int32)(unsafe.Pointer(&(_10_pIndex.X11)))) == i32(0) {
- _corruptSchema(tls, _pData, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), str(50386))
+ if _sqlite3GetInt32(tls, *elem0(_argv, uintptr(1)), &_10_pIndex.Xtnum) == int32(0) {
+ _corruptSchema(tls, _pData, *elem0(_argv, 0), str(50341))
}
_35:
_32:
- return i32(0)
+ return int32(0)
}
var _sqlite3InitCallbackØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3InitCallbackØ00__func__Ø000[0], str(50403), 20)
+ crt.Xstrncpy(nil, &_sqlite3InitCallbackØ00__func__Ø000[0], str(50358), 20)
}
-// Fill the InitData structure with an error message that indicates
-// that the database is corrupt.
+// C comment
+// /*
+// ** Fill the InitData structure with an error message that indicates
+// ** that the database is corrupt.
+// */
func _corruptSchema(tls *crt.TLS, _pData *XInitData, _zObj *int8, _zExtra *int8) {
var _1_z *int8
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pData.X0)
- if (_db.X17) != 0 || ((_db.X6)&i32(65536)) != i32(0) {
+ _db = (*Xsqlite3)(_pData.Xdb)
+ if _db.XmallocFailed != 0 || (_db.Xflags&int32(65536)) != int32(0) {
goto _1
}
if _zObj == nil {
- _zObj = str(50423)
+ _zObj = str(50378)
}
- _1_z = _sqlite3MPrintf(tls, _db, str(50425), unsafe.Pointer(_zObj))
+ _1_z = _sqlite3MPrintf(tls, _db, str(50380), unsafe.Pointer(_zObj))
if _zExtra != nil {
- _1_z = _sqlite3MPrintf(tls, _db, str(50456), unsafe.Pointer(_1_z), unsafe.Pointer(_zExtra))
+ _1_z = _sqlite3MPrintf(tls, _db, str(50411), unsafe.Pointer(_1_z), unsafe.Pointer(_zExtra))
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(*(_pData.X1)))
- *(_pData.X1) = _1_z
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(*_pData.XpzErrMsg))
+ *_pData.XpzErrMsg = _1_z
_1:
- *(*int32)(unsafe.Pointer(&(_pData.X3))) = func() int32 {
- if (_db.X17) != 0 {
- return _sqlite3NomemError(tls, i32(115702))
+ _pData.Xrc = func() int32 {
+ if _db.XmallocFailed != 0 {
+ return _sqlite3NomemError(tls, int32(115702))
}
- return _sqlite3CorruptError(tls, i32(115702))
+ return _sqlite3CorruptError(tls, int32(115702))
}()
}
-// Return a 32-bit integer value extracted from a string. If the
-// string is not an integer, just return 0.
+// C comment
+// /*
+// ** Return a 32-bit integer value extracted from a string. If the
+// ** string is not an integer, just return 0.
+// */
func _sqlite3Atoi(tls *crt.TLS, _z *int8) (r0 int32) {
var _x int32
- _x = i32(0)
+ _x = int32(0)
if _z != nil {
_sqlite3GetInt32(tls, _z, &_x)
}
return _x
}
-// Two versions of the official API. Legacy and new use. In the legacy
-// version, the original SQL text is not saved in the prepared statement
-// and so if a schema change occurs, SQLITE_SCHEMA is returned by
-// sqlite3_step(). In the new version, the original SQL text is retained
-// and the statement is automatically recompiled if an schema change
-// occurs.
+// C comment
+// /*
+// ** Two versions of the official API. Legacy and new use. In the legacy
+// ** version, the original SQL text is not saved in the prepared statement
+// ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
+// ** sqlite3_step(). In the new version, the original SQL text is retained
+// ** and the statement is automatically recompiled if an schema change
+// ** occurs.
+// */
func Xsqlite3_prepare(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _nBytes int32, _ppStmt *unsafe.Pointer, _pzTail **int8) (r0 int32) {
var _rc int32
- _rc = _sqlite3LockAndPrepare(tls, _db, _zSql, _nBytes, i32(0), nil, _ppStmt, _pzTail)
+ _rc = _sqlite3LockAndPrepare(tls, _db, _zSql, _nBytes, int32(0), nil, _ppStmt, _pzTail)
func() {
- if _rc != i32(0) && _ppStmt != nil && *_ppStmt != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116414), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_prepareØ00__func__Ø000))), unsafe.Pointer(str(50464)))
+ if _rc != int32(0) && _ppStmt != nil && (*_ppStmt) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116414), unsafe.Pointer(&_sqlite3_prepareØ00__func__Ø000), unsafe.Pointer(str(50419)))
crt.X__builtin_abort(tls)
}
}()
@@ -37006,31 +37723,34 @@ func Xsqlite3_prepare(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _nBytes int32, _
func _sqlite3LockAndPrepare(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _nBytes int32, _saveSqlFlag int32, _pOld *TVdbe, _ppStmt *unsafe.Pointer, _pzTail **int8) (r0 int32) {
var _rc int32
if _ppStmt == nil {
- return _sqlite3MisuseError(tls, i32(116341))
+ return _sqlite3MisuseError(tls, int32(116341))
}
*_ppStmt = nil
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zSql == nil) {
- return _sqlite3MisuseError(tls, i32(116345))
+ return _sqlite3MisuseError(tls, int32(116345))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
_sqlite3BtreeEnterAll(tls, _db)
_rc = _sqlite3Prepare(tls, _db, _zSql, _nBytes, _saveSqlFlag, _pOld, _ppStmt, _pzTail)
- if _rc == i32(17) {
+ if _rc == int32(17) {
Xsqlite3_finalize(tls, *_ppStmt)
_rc = _sqlite3Prepare(tls, _db, _zSql, _nBytes, _saveSqlFlag, _pOld, _ppStmt, _pzTail)
}
_sqlite3BtreeLeaveAll(tls, _db)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
func() {
- if _rc != i32(0) && *_ppStmt != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116356), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3LockAndPrepareØ00__func__Ø000))), unsafe.Pointer(str(50505)))
+ if _rc != int32(0) && (*_ppStmt) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116356), unsafe.Pointer(&_sqlite3LockAndPrepareØ00__func__Ø000), unsafe.Pointer(str(50460)))
crt.X__builtin_abort(tls)
}
}()
return _rc
}
-// Compile the UTF-8 encoded SQL statement zSql into a statement handle.
+// C comment
+// /*
+// ** Compile the UTF-8 encoded SQL statement zSql into a statement handle.
+// */
func _sqlite3Prepare(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _nBytes int32, _saveSqlFlag int32, _pReprepare *TVdbe, _ppStmt *unsafe.Pointer, _pzTail **int8) (r0 int32) {
var _rc, _i, _4_mxLen, _12_iFirst, _12_mx int32
var _zErrMsg, _3_zDb, _4_zSqlCopy *int8
@@ -37039,41 +37759,41 @@ func _sqlite3Prepare(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _nBytes int32, _s
var _sParse XParse
var _21_pT *XTriggerPrg
_zErrMsg = nil
- _rc = i32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_sParse), i32(0), u32(160))
- crt.Xmemset(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&_sParse))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(u32(400))))))))), i32(0), u32(84))
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sParse.X61))))) = _pReprepare
+ _rc = int32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_sParse), int32(0), uint32(160))
+ crt.Xmemset(tls, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_sParse))+uintptr(uint32(400))))), int32(0), uint32(84))
+ *(**TVdbe)(unsafe.Pointer(&_sParse.XpReprepare)) = _pReprepare
func() {
- if _ppStmt == nil || *_ppStmt != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116195), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000))), unsafe.Pointer(str(50533)))
+ if _ppStmt == nil || (*_ppStmt) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116195), unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000), unsafe.Pointer(str(50488)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116197), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116197), unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_5:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _8
}
- _1_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _1_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _1_pBt == nil {
goto _9
}
func() {
if _sqlite3BtreeHoldsMutex(tls, _1_pBt) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116225), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000))), unsafe.Pointer(str(50554)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116225), unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000), unsafe.Pointer(str(50509)))
crt.X__builtin_abort(tls)
}
}()
_rc = _sqlite3BtreeSchemaLocked(tls, _1_pBt)
if _rc != 0 {
- _3_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X0
- _sqlite3ErrorWithMsg(tls, _db, _rc, str(50582), unsafe.Pointer(_3_zDb))
+ _3_zDb = elem27((*XDb)(_db.XaDb), uintptr(_i)).XzDbSName
+ _sqlite3ErrorWithMsg(tls, _db, _rc, str(50537), unsafe.Pointer(_3_zDb))
goto _end_prepare
}
_9:
@@ -37081,137 +37801,137 @@ _9:
goto _5
_8:
_sqlite3VtabUnlockList(tls, _db)
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sParse.X0))))) = _db
- if _nBytes < i32(0) || _nBytes != i32(0) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(_nBytes-i32(1))))) == i32(0) {
+ *(**Xsqlite3)(unsafe.Pointer(&_sParse.Xdb)) = _db
+ if _nBytes < int32(0) || _nBytes != int32(0) && int32(*elem1(_zSql, uintptr(_nBytes-int32(1)))) == int32(0) {
goto _15
}
- _4_mxLen = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(1))))
+ _4_mxLen = *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(1))
if _nBytes > _4_mxLen {
- _sqlite3ErrorWithMsg(tls, _db, i32(18), str(50612))
- _rc = _sqlite3ApiExit(tls, _db, i32(18))
+ _sqlite3ErrorWithMsg(tls, _db, int32(18), str(50567))
+ _rc = _sqlite3ApiExit(tls, _db, int32(18))
goto _end_prepare
}
_4_zSqlCopy = _sqlite3DbStrNDup(tls, _db, _zSql, uint64(_nBytes))
if _4_zSqlCopy != nil {
_sqlite3RunParser(tls, &_sParse, _4_zSqlCopy, &_zErrMsg)
- *(**int8)(unsafe.Pointer(&(_sParse.X62))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(int32((uintptr(unsafe.Pointer(_sParse.X62))-uintptr(unsafe.Pointer(_4_zSqlCopy)))/1))))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_4_zSqlCopy))
+ _sParse.XzTail = elem1(_zSql, uintptr(int32(uintptr(unsafe.Pointer(_sParse.XzTail))-uintptr(unsafe.Pointer(_4_zSqlCopy)))))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_4_zSqlCopy))
goto _18
}
- *(**int8)(unsafe.Pointer(&(_sParse.X62))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(_nBytes)))
+ _sParse.XzTail = elem1(_zSql, uintptr(_nBytes))
_18:
goto _19
_15:
_sqlite3RunParser(tls, &_sParse, _zSql, &_zErrMsg)
_19:
func() {
- if uint32(i32(0)) != (_sParse.X42) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116260), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000))), unsafe.Pointer(str(50631)))
+ if (0) != _sParse.XnQueryLoop {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116260), unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000), unsafe.Pointer(str(50586)))
crt.X__builtin_abort(tls)
}
}()
- if (_sParse.X3) == i32(101) {
- *(*int32)(unsafe.Pointer(&(_sParse.X3))) = i32(0)
+ if _sParse.Xrc == int32(101) {
+ _sParse.Xrc = int32(0)
}
- if (_sParse.X5) != 0 {
+ if _sParse.XcheckSchema != 0 {
_schemaIsValid(tls, &_sParse)
}
- if (_db.X17) != 0 {
- *(*int32)(unsafe.Pointer(&(_sParse.X3))) = _sqlite3NomemError(tls, i32(116267))
+ if _db.XmallocFailed != 0 {
+ _sParse.Xrc = _sqlite3NomemError(tls, int32(116267))
}
if _pzTail != nil {
- *_pzTail = _sParse.X62
+ *_pzTail = _sParse.XzTail
}
- _rc = _sParse.X3
- if _rc != i32(0) || (*TVdbe)(_sParse.X2) == nil || (_sParse.X54) == 0 {
+ _rc = _sParse.Xrc
+ if _rc != int32(0) || _sParse.XpVdbe == nil || _sParse.Xexplain == 0 {
goto _28
}
- if int32(_sParse.X54) == i32(2) {
- _sqlite3VdbeSetNumCols(tls, (*TVdbe)(_sParse.X2), i32(4))
- _12_iFirst = i32(8)
- _12_mx = i32(12)
+ if int32(_sParse.Xexplain) == int32(2) {
+ _sqlite3VdbeSetNumCols(tls, (*TVdbe)(_sParse.XpVdbe), int32(4))
+ _12_iFirst = int32(8)
+ _12_mx = int32(12)
goto _30
}
- _sqlite3VdbeSetNumCols(tls, (*TVdbe)(_sParse.X2), i32(8))
- _12_iFirst = i32(0)
- _12_mx = i32(8)
+ _sqlite3VdbeSetNumCols(tls, (*TVdbe)(_sParse.XpVdbe), int32(8))
+ _12_iFirst = int32(0)
+ _12_mx = int32(8)
_30:
_i = _12_iFirst
_31:
if _i >= _12_mx {
goto _34
}
- _sqlite3VdbeSetColName(tls, (*TVdbe)(_sParse.X2), _i-_12_iFirst, i32(0), *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3PrepareØ00azColNameØ001)) + 4*uintptr(_i))), nil)
+ _sqlite3VdbeSetColName(tls, (*TVdbe)(_sParse.XpVdbe), _i-_12_iFirst, int32(0), *elem0((**int8)(unsafe.Pointer(&_sqlite3PrepareØ00azColNameØ001)), uintptr(_i)), nil)
_i += 1
goto _31
_34:
_28:
- if int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) == i32(0) {
- _16_pVdbe = (*TVdbe)(_sParse.X2)
- _sqlite3VdbeSetSql(tls, _16_pVdbe, _zSql, int32((uintptr(unsafe.Pointer(_sParse.X62))-uintptr(unsafe.Pointer(_zSql)))/1), _saveSqlFlag)
+ if int32(_db.Xinit.Xbusy) == int32(0) {
+ _16_pVdbe = (*TVdbe)(_sParse.XpVdbe)
+ _sqlite3VdbeSetSql(tls, _16_pVdbe, _zSql, int32(uintptr(unsafe.Pointer(_sParse.XzTail))-uintptr(unsafe.Pointer(_zSql))), _saveSqlFlag)
}
- if ((*TVdbe)(_sParse.X2) != nil) && ((_rc != i32(0)) || ((_db.X17) != 0)) {
- _sqlite3VdbeFinalize(tls, (*TVdbe)(_sParse.X2))
+ if (_sParse.XpVdbe != nil) && ((_rc != int32(0)) || (_db.XmallocFailed != 0)) {
+ _sqlite3VdbeFinalize(tls, (*TVdbe)(_sParse.XpVdbe))
func() {
if (*_ppStmt) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116303), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000))), unsafe.Pointer(str(50652)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116303), unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000), unsafe.Pointer(str(50607)))
crt.X__builtin_abort(tls)
}
}()
goto _41
}
- *_ppStmt = _sParse.X2
+ *_ppStmt = _sParse.XpVdbe
_41:
if _zErrMsg != nil {
- _sqlite3ErrorWithMsg(tls, _db, _rc, str(24576), unsafe.Pointer(_zErrMsg))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErrMsg))
+ _sqlite3ErrorWithMsg(tls, _db, _rc, str(24531), unsafe.Pointer(_zErrMsg))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErrMsg))
goto _43
}
_sqlite3Error(tls, _db, _rc)
_43:
- if (*XTriggerPrg)(_sParse.X69) != nil {
- _21_pT = (*XTriggerPrg)(_sParse.X69)
- *(**XTriggerPrg)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sParse.X69))))) = (*XTriggerPrg)(_21_pT.X1)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_21_pT))
+ if _sParse.XpTriggerPrg != nil {
+ _21_pT = (*XTriggerPrg)(_sParse.XpTriggerPrg)
+ *(**XTriggerPrg)(unsafe.Pointer(&_sParse.XpTriggerPrg)) = (*XTriggerPrg)(_21_pT.XpNext)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_21_pT))
goto _43
}
_end_prepare:
_sqlite3ParserReset(tls, &_sParse)
_rc = _sqlite3ApiExit(tls, _db, _rc)
func() {
- if (_rc & (_db.X11)) != _rc {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116326), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000))), unsafe.Pointer(str(134)))
+ if (_rc & _db.XerrMask) != _rc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116326), unsafe.Pointer(&_sqlite3PrepareØ00__func__Ø000), unsafe.Pointer(str(50618)))
crt.X__builtin_abort(tls)
}
}()
return _rc
-
- _ = _sParse
- panic(0)
}
var _sqlite3PrepareØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PrepareØ00__func__Ø000[0], str(50663), 15)
+ crt.Xstrncpy(nil, &_sqlite3PrepareØ00__func__Ø000[0], str(50639), 15)
}
-// Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared
-// btree as the argument handle holds an exclusive lock on the
-// sqlite_master table. Otherwise SQLITE_OK.
+// C comment
+// /*
+// ** Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared
+// ** btree as the argument handle holds an exclusive lock on the
+// ** sqlite_master table. Otherwise SQLITE_OK.
+// */
func _sqlite3BtreeSchemaLocked(tls *crt.TLS, _p *XBtree) (r0 int32) {
var _rc int32
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68723), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSchemaLockedØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68723), unsafe.Pointer(&_sqlite3BtreeSchemaLockedØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
- _rc = _querySharedCacheTableLock(tls, _p, uint32(i32(1)), uint8(i32(1)))
+ _rc = _querySharedCacheTableLock(tls, _p, uint32(1), uint8(1))
func() {
- if _rc != i32(0) && _rc != i32(262) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68726), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSchemaLockedØ00__func__Ø000))), unsafe.Pointer(str(50678)))
+ if _rc != int32(0) && _rc != int32(262) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68726), unsafe.Pointer(&_sqlite3BtreeSchemaLockedØ00__func__Ø000), unsafe.Pointer(str(50654)))
crt.X__builtin_abort(tls)
}
}()
@@ -37222,159 +37942,164 @@ func _sqlite3BtreeSchemaLocked(tls *crt.TLS, _p *XBtree) (r0 int32) {
var _sqlite3BtreeSchemaLockedØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeSchemaLockedØ00__func__Ø000[0], str(50725), 25)
+ crt.Xstrncpy(nil, &_sqlite3BtreeSchemaLockedØ00__func__Ø000[0], str(50701), 25)
}
-// Query to see if Btree handle p may obtain a lock of type eLock
-// (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return
-// SQLITE_OK if the lock may be obtained (by calling
-// setSharedCacheTableLock()), or SQLITE_LOCKED if not.
+// C comment
+// /*
+// ** Query to see if Btree handle p may obtain a lock of type eLock
+// ** (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return
+// ** SQLITE_OK if the lock may be obtained (by calling
+// ** setSharedCacheTableLock()), or SQLITE_LOCKED if not.
+// */
func _querySharedCacheTableLock(tls *crt.TLS, _p *XBtree, _iTab uint32, _eLock uint8) (r0 int32) {
var _pBt *XBtShared
var _pIter *XBtLock
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
if _sqlite3BtreeHoldsMutex(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59285), unsafe.Pointer((*int8)(unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(17487)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59285), unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(17442)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_eLock) != i32(1) && int32(_eLock) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59286), unsafe.Pointer((*int8)(unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(50750)))
+ if int32(_eLock) != int32(1) && int32(_eLock) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59286), unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(50726)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59287), unsafe.Pointer((*int8)(unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(23676)))
+ if (*Xsqlite3)(_p.Xdb) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59287), unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(23631)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (((*Xsqlite3)(_p.X0).X6)&i32(16384)) != 0 && int32(_eLock) != i32(2) && _iTab != uint32(i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59288), unsafe.Pointer((*int8)(unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(50788)))
+ if (((*Xsqlite3)(_p.Xdb).Xflags)&int32(16384)) != 0 && int32(_eLock) != int32(2) && _iTab != uint32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59288), unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(50764)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_eLock) != i32(1) && (_p != (*XBtree)(_pBt.X26) || int32(_p.X2) != i32(2)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59294), unsafe.Pointer((*int8)(unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(50855)))
+ if int32(_eLock) != int32(1) && (_p != (*XBtree)(_pBt.XpWriter) || int32(_p.XinTrans) != int32(2)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59294), unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(50831)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_eLock) != i32(1) && int32(_pBt.X8) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59295), unsafe.Pointer((*int8)(unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(50920)))
+ if int32(_eLock) != int32(1) && int32(_pBt.XinTransaction) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59295), unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(50896)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X3) == 0 {
- return i32(0)
+ if _p.Xsharable == 0 {
+ return int32(0)
}
- if ((*XBtree)(_pBt.X26) != _p) && ((int32(_pBt.X10) & i32(32)) != i32(0)) {
- return i32(262)
+ if ((*XBtree)(_pBt.XpWriter) != _p) && ((int32(_pBt.XbtsFlags) & int32(32)) != int32(0)) {
+ return int32(262)
}
- _pIter = (*XBtLock)(_pBt.X25)
+ _pIter = (*XBtLock)(_pBt.XpLock)
_21:
if _pIter == nil {
goto _24
}
func() {
- if int32(_pIter.X2) != i32(1) && int32(_pIter.X2) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59320), unsafe.Pointer((*int8)(unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(50972)))
+ if int32(_pIter.XeLock) != int32(1) && int32(_pIter.XeLock) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59320), unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(50948)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_eLock) != i32(1) && (*XBtree)(_pIter.X0) != _p && int32(_pIter.X2) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59321), unsafe.Pointer((*int8)(unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(51024)))
+ if int32(_eLock) != int32(1) && (*XBtree)(_pIter.XpBtree) != _p && int32(_pIter.XeLock) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59321), unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(51000)))
crt.X__builtin_abort(tls)
}
}()
- if (*XBtree)(_pIter.X0) == _p || (_pIter.X1) != _iTab || int32(_pIter.X2) == int32(_eLock) {
+ if (*XBtree)(_pIter.XpBtree) == _p || _pIter.XiTable != _iTab || int32(_pIter.XeLock) == int32(_eLock) {
goto _34
}
- if int32(_eLock) == i32(2) {
+ if int32(_eLock) == int32(2) {
func() {
- if _p != (*XBtree)(_pBt.X26) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59325), unsafe.Pointer((*int8)(unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(51088)))
+ if _p != (*XBtree)(_pBt.XpWriter) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59325), unsafe.Pointer(&_querySharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(51064)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) | i32(64))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) | int32(64))
}
}
- return i32(262)
+ return int32(262)
_34:
- _pIter = (*XBtLock)(_pIter.X3)
+ _pIter = (*XBtLock)(_pIter.XpNext)
goto _21
_24:
- return i32(0)
+ return int32(0)
}
var _querySharedCacheTableLockØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_querySharedCacheTableLockØ00__func__Ø000[0], str(51104), 26)
+ crt.Xstrncpy(nil, &_querySharedCacheTableLockØ00__func__Ø000[0], str(51080), 26)
}
-// Check schema cookies in all databases. If any cookie is out
-// of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies
-// make no changes to pParse->rc.
+// C comment
+// /*
+// ** Check schema cookies in all databases. If any cookie is out
+// ** of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies
+// ** make no changes to pParse->rc.
+// */
func _schemaIsValid(tls *crt.TLS, _pParse *XParse) {
var _iDb, _rc, _cookie, _1_openedTransaction int32
var _db *Xsqlite3
var _1_pBt *XBtree
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
- if (_pParse.X5) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116091), unsafe.Pointer((*int8)(unsafe.Pointer(&_schemaIsValidØ00__func__Ø000))), unsafe.Pointer(str(51130)))
+ if _pParse.XcheckSchema == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116091), unsafe.Pointer(&_schemaIsValidØ00__func__Ø000), unsafe.Pointer(str(51106)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116092), unsafe.Pointer((*int8)(unsafe.Pointer(&_schemaIsValidØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116092), unsafe.Pointer(&_schemaIsValidØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- _iDb = i32(0)
+ _iDb = int32(0)
_4:
- if _iDb >= (_db.X5) {
+ if _iDb >= _db.XnDb {
goto _7
}
- _1_openedTransaction = i32(0)
- _1_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X1)
+ _1_openedTransaction = int32(0)
+ _1_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpBt)
if _1_pBt == nil {
goto _5
}
if _sqlite3BtreeIsInReadTrans(tls, _1_pBt) != 0 {
goto _9
}
- _rc = _sqlite3BtreeBeginTrans(tls, _1_pBt, i32(0))
- if (_rc == i32(7)) || (_rc == i32(3082)) {
+ _rc = _sqlite3BtreeBeginTrans(tls, _1_pBt, int32(0))
+ if (_rc == int32(7)) || (_rc == int32(3082)) {
_sqlite3OomFault(tls, _db)
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
return
}
- _1_openedTransaction = i32(1)
+ _1_openedTransaction = int32(1)
_9:
- _sqlite3BtreeGetMeta(tls, _1_pBt, i32(1), (*uint32)(unsafe.Pointer(&_cookie)))
+ _sqlite3BtreeGetMeta(tls, _1_pBt, int32(1), (*uint32)(unsafe.Pointer(&_cookie)))
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116114), unsafe.Pointer((*int8)(unsafe.Pointer(&_schemaIsValidØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116114), unsafe.Pointer(&_schemaIsValidØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- if _cookie != ((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4).X0) {
+ if _cookie != ((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).Xschema_cookie) {
_sqlite3ResetOneSchema(tls, _db, _iDb)
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(17)
+ _pParse.Xrc = int32(17)
}
if _1_openedTransaction != 0 {
_sqlite3BtreeCommit(tls, _1_pBt)
@@ -37388,237 +38113,239 @@ _7:
var _schemaIsValidØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_schemaIsValidØ00__func__Ø000[0], str(51185), 14)
+ crt.Xstrncpy(nil, &_schemaIsValidØ00__func__Ø000[0], str(51161), 14)
}
-// Return non-zero if a read (or write) transaction is active.
+// C comment
+// /*
+// ** Return non-zero if a read (or write) transaction is active.
+// */
func _sqlite3BtreeIsInReadTrans(tls *crt.TLS, _p *XBtree) (r0 int32) {
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68674), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIsInReadTransØ00__func__Ø000))), unsafe.Pointer(str(9660)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68674), unsafe.Pointer(&_sqlite3BtreeIsInReadTransØ00__func__Ø000), unsafe.Pointer(str(9615)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68675), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIsInReadTransØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68675), unsafe.Pointer(&_sqlite3BtreeIsInReadTransØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int(int32(_p.X2) != i32(0))
+ return bool2int(int32(_p.XinTrans) != int32(0))
}
var _sqlite3BtreeIsInReadTransØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeIsInReadTransØ00__func__Ø000[0], str(51199), 26)
-}
-
-// Attempt to start a new transaction. A write-transaction
-// is started if the second argument is nonzero, otherwise a read-
-// transaction. If the second argument is 2 or more and exclusive
-// transaction is started, meaning that no other process is allowed
-// to access the database. A preexisting transaction may not be
-// upgraded to exclusive by calling this routine a second time - the
-// exclusivity flag only works for a new transaction.
-//
-// A write-transaction must be started before attempting any
-// changes to the database. None of the following routines
-// will work unless a transaction is started first:
-//
-// sqlite3BtreeCreateTable()
-// sqlite3BtreeCreateIndex()
-// sqlite3BtreeClearTable()
-// sqlite3BtreeDropTable()
-// sqlite3BtreeInsert()
-// sqlite3BtreeDelete()
-// sqlite3BtreeUpdateMeta()
-//
-// If an initial attempt to acquire the lock fails because of lock contention
-// and the database was previously unlocked, then invoke the busy handler
-// if there is one. But if there was previously a read-lock, do not
-// invoke the busy handler - just return SQLITE_BUSY. SQLITE_BUSY is
-// returned when there is already a read-lock in order to avoid a deadlock.
-//
-// Suppose there are two processes A and B. A has a read lock and B has
-// a reserved lock. B tries to promote to exclusive but is blocked because
-// of A's read lock. A tries to promote to reserved but is blocked by B.
-// One or the other of the two processes must give way or there can be
-// no progress. By returning SQLITE_BUSY and not invoking the busy callback
-// when A already has a read lock, we encourage A to give up and let B
-// proceed.
+ crt.Xstrncpy(nil, &_sqlite3BtreeIsInReadTransØ00__func__Ø000[0], str(51175), 26)
+}
+
+// C comment
+// /*
+// ** Attempt to start a new transaction. A write-transaction
+// ** is started if the second argument is nonzero, otherwise a read-
+// ** transaction. If the second argument is 2 or more and exclusive
+// ** transaction is started, meaning that no other process is allowed
+// ** to access the database. A preexisting transaction may not be
+// ** upgraded to exclusive by calling this routine a second time - the
+// ** exclusivity flag only works for a new transaction.
+// **
+// ** A write-transaction must be started before attempting any
+// ** changes to the database. None of the following routines
+// ** will work unless a transaction is started first:
+// **
+// ** sqlite3BtreeCreateTable()
+// ** sqlite3BtreeCreateIndex()
+// ** sqlite3BtreeClearTable()
+// ** sqlite3BtreeDropTable()
+// ** sqlite3BtreeInsert()
+// ** sqlite3BtreeDelete()
+// ** sqlite3BtreeUpdateMeta()
+// **
+// ** If an initial attempt to acquire the lock fails because of lock contention
+// ** and the database was previously unlocked, then invoke the busy handler
+// ** if there is one. But if there was previously a read-lock, do not
+// ** invoke the busy handler - just return SQLITE_BUSY. SQLITE_BUSY is
+// ** returned when there is already a read-lock in order to avoid a deadlock.
+// **
+// ** Suppose there are two processes A and B. A has a read lock and B has
+// ** a reserved lock. B tries to promote to exclusive but is blocked because
+// ** of A's read lock. A tries to promote to reserved but is blocked by B.
+// ** One or the other of the two processes must give way or there can be
+// ** no progress. By returning SQLITE_BUSY and not invoking the busy callback
+// ** when A already has a read lock, we encourage A to give up and let B
+// ** proceed.
+// */
func _sqlite3BtreeBeginTrans(tls *crt.TLS, _p *XBtree, _wrflag int32) (r0 int32) {
var _rc int32
var _3_pBlock *Xsqlite3
var _pBt *XBtShared
var _5_pIter *XBtLock
var _19_pPage1 *XMemPage
- _pBt = (*XBtShared)(_p.X1)
- _rc = i32(0)
+ _pBt = (*XBtShared)(_p.XpBt)
+ _rc = int32(0)
_sqlite3BtreeEnter(tls, _p)
func() {
- if int32((*XBtShared)(_p.X1).X8) == i32(0) && ((*XBtShared)(_p.X1).X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62247), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000))), unsafe.Pointer(str(9977)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) == int32(0) && ((*XBtShared)(_p.XpBt).XnTransaction) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62247), unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000), unsafe.Pointer(str(9932)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XBtShared)(_p.X1).X8) < int32(_p.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62247), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000))), unsafe.Pointer(str(10038)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) < int32(_p.XinTrans) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62247), unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000), unsafe.Pointer(str(9993)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_p.X2) == i32(2)) || ((int32(_p.X2) == i32(1)) && (_wrflag == 0)) {
+ if (int32(_p.XinTrans) == int32(2)) || ((int32(_p.XinTrans) == int32(1)) && (_wrflag == 0)) {
goto _trans_begun
}
func() {
- if int32(_pBt.X8) != i32(2) && int32(_pBt.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62256), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000))), unsafe.Pointer(str(51225)))
+ if int32(_pBt.XinTransaction) != int32(2) && int32(_pBt.XbDoTruncate) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62256), unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000), unsafe.Pointer(str(51201)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_pBt.X10) & i32(1)) != i32(0)) && _wrflag != 0 {
- _rc = i32(8)
+ if ((int32(_pBt.XbtsFlags) & int32(1)) != int32(0)) && _wrflag != 0 {
+ _rc = int32(8)
goto _trans_begun
}
_3_pBlock = nil
- if (_wrflag != 0 && (int32(_pBt.X8) == i32(2))) || ((int32(_pBt.X10) & i32(64)) != i32(0)) {
- _3_pBlock = (*Xsqlite3)((*XBtree)(_pBt.X26).X0)
+ if (_wrflag != 0 && (int32(_pBt.XinTransaction) == int32(2))) || ((int32(_pBt.XbtsFlags) & int32(64)) != int32(0)) {
+ _3_pBlock = (*Xsqlite3)((*XBtree)(_pBt.XpWriter).Xdb)
goto _17
}
- if _wrflag <= i32(1) {
+ if _wrflag <= int32(1) {
goto _17
}
- _5_pIter = (*XBtLock)(_pBt.X25)
+ _5_pIter = (*XBtLock)(_pBt.XpLock)
_18:
if _5_pIter == nil {
goto _21
}
- if (*XBtree)(_5_pIter.X0) != _p {
- _3_pBlock = (*Xsqlite3)((*XBtree)(_5_pIter.X0).X0)
+ if (*XBtree)(_5_pIter.XpBtree) != _p {
+ _3_pBlock = (*Xsqlite3)((*XBtree)(_5_pIter.XpBtree).Xdb)
goto _21
}
- _5_pIter = (*XBtLock)(_5_pIter.X3)
+ _5_pIter = (*XBtLock)(_5_pIter.XpNext)
goto _18
_21:
_17:
if _3_pBlock != nil {
- _rc = i32(262)
+ _rc = int32(262)
goto _trans_begun
}
- _rc = _querySharedCacheTableLock(tls, _p, uint32(i32(1)), uint8(i32(1)))
- if i32(0) != _rc {
+ _rc = _querySharedCacheTableLock(tls, _p, uint32(1), uint8(1))
+ if int32(0) != _rc {
goto _trans_begun
}
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) & i32(-9))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) & int32(-9))
}
- if (_pBt.X18) == uint32(i32(0)) {
+ if _pBt.XnPage == (0) {
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) | i32(8))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) | int32(8))
}
}
_25:
_27:
- if ((*XMemPage)(_pBt.X3) == nil) && (i32(0) == store1(&_rc, _lockBtree(tls, _pBt))) {
+ if ((*XMemPage)(_pBt.XpPage1) == nil) && (int32(0) == store2(&_rc, _lockBtree(tls, _pBt))) {
goto _27
}
- if _rc != i32(0) || _wrflag == 0 {
+ if _rc != int32(0) || _wrflag == 0 {
goto _31
}
- if (int32(_pBt.X10) & i32(1)) != i32(0) {
- _rc = i32(8)
+ if (int32(_pBt.XbtsFlags) & int32(1)) != int32(0) {
+ _rc = int32(8)
goto _33
}
- _rc = _sqlite3PagerBegin(tls, (*XPager)(_pBt.X0), bool2int(_wrflag > i32(1)), _sqlite3TempInMemory(tls, (*Xsqlite3)(_p.X0)))
- if _rc == i32(0) {
+ _rc = _sqlite3PagerBegin(tls, (*XPager)(_pBt.XpPager), bool2int(_wrflag > int32(1)), _sqlite3TempInMemory(tls, (*Xsqlite3)(_p.Xdb)))
+ if _rc == int32(0) {
_rc = _newDatabase(tls, _pBt)
}
_33:
_31:
- if _rc != i32(0) {
+ if _rc != int32(0) {
_unlockBtreeIfUnused(tls, _pBt)
}
- if (((_rc & i32(255)) == i32(5)) && (int32(_pBt.X8) == i32(0))) && _btreeInvokeBusyHandler(tls, (unsafe.Pointer)(_pBt)) != 0 {
+ if (((_rc & int32(255)) == int32(5)) && (int32(_pBt.XinTransaction) == int32(0))) && _btreeInvokeBusyHandler(tls, unsafe.Pointer(_pBt)) != 0 {
goto _25
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _trans_begun
}
- if int32(_p.X2) != i32(0) {
+ if int32(_p.XinTrans) != int32(0) {
goto _39
}
- *(*int32)(unsafe.Pointer(&(_pBt.X17))) += 1
- if (_p.X3) != 0 {
+ _pBt.XnTransaction += 1
+ if _p.Xsharable != 0 {
func() {
- if (*XBtree)((*XBtLock)(unsafe.Pointer(&(_p.X11))).X0) != _p || ((*XBtLock)(unsafe.Pointer(&(_p.X11))).X1) != uint32(i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62332), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000))), unsafe.Pointer(str(51293)))
+ if (*XBtree)(_p.Xlock.XpBtree) != _p || (_p.Xlock.XiTable) != uint32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62332), unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000), unsafe.Pointer(str(51269)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&((*XBtLock)(unsafe.Pointer(&(_p.X11))).X2))) = uint8(i32(1))
- *(**XBtLock)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XBtLock)(unsafe.Pointer(&(_p.X11))).X3))))) = (*XBtLock)(_pBt.X25)
- *(**XBtLock)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X25))))) = (*XBtLock)(unsafe.Pointer(&(_p.X11)))
+ _p.Xlock.XeLock = uint8(1)
+ *(**XBtLock)(unsafe.Pointer(&(_p.Xlock.XpNext))) = (*XBtLock)(_pBt.XpLock)
+ *(**XBtLock)(unsafe.Pointer(&_pBt.XpLock)) = &_p.Xlock
}
_39:
- *(*uint8)(unsafe.Pointer(&(_p.X2))) = uint8(func() int32 {
+ _p.XinTrans = uint8(func() int32 {
if _wrflag != 0 {
- return i32(2)
+ return int32(2)
}
- return i32(1)
+ return int32(1)
}())
- if int32(_p.X2) > int32(_pBt.X8) {
- *(*uint8)(unsafe.Pointer(&(_pBt.X8))) = _p.X2
+ if int32(_p.XinTrans) > int32(_pBt.XinTransaction) {
+ _pBt.XinTransaction = _p.XinTrans
}
if _wrflag == 0 {
goto _47
}
- _19_pPage1 = (*XMemPage)(_pBt.X3)
+ _19_pPage1 = (*XMemPage)(_pBt.XpPage1)
func() {
- if (*XBtree)(_pBt.X26) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62346), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000))), unsafe.Pointer(str(51332)))
+ if _pBt.XpWriter != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62346), unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000), unsafe.Pointer(str(51308)))
crt.X__builtin_abort(tls)
}
}()
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X26))))) = _p
+ *(**XBtree)(unsafe.Pointer(&_pBt.XpWriter)) = _p
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) & i32(-33))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) & int32(-33))
}
- if _wrflag > i32(1) {
+ if _wrflag > int32(1) {
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) | i32(32))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) | int32(32))
}
}
- if (_pBt.X18) == _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_19_pPage1.X19))+1*uintptr(i32(28))))) {
+ if _pBt.XnPage == _sqlite3Get4byte(tls, elem15(_19_pPage1.XaData, uintptr(28))) {
goto _51
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_19_pPage1.X23))
- if _rc == i32(0) {
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_19_pPage1.X19))+1*uintptr(i32(28)))), _pBt.X18)
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_19_pPage1.XpDbPage))
+ if _rc == int32(0) {
+ _sqlite3Put4byte(tls, elem15(_19_pPage1.XaData, uintptr(28)), _pBt.XnPage)
}
_51:
_47:
_trans_begun:
- if (_rc == i32(0)) && _wrflag != 0 {
- _rc = _sqlite3PagerOpenSavepoint(tls, (*XPager)(_pBt.X0), (*Xsqlite3)(_p.X0).X75)
+ if (_rc == int32(0)) && _wrflag != 0 {
+ _rc = _sqlite3PagerOpenSavepoint(tls, (*XPager)(_pBt.XpPager), (*Xsqlite3)(_p.Xdb).XnSavepoint)
}
func() {
- if int32((*XBtShared)(_p.X1).X8) == i32(0) && ((*XBtShared)(_p.X1).X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62377), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000))), unsafe.Pointer(str(9977)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) == int32(0) && ((*XBtShared)(_p.XpBt).XnTransaction) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62377), unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000), unsafe.Pointer(str(9932)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XBtShared)(_p.X1).X8) < int32(_p.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62377), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000))), unsafe.Pointer(str(10038)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) < int32(_p.XinTrans) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62377), unsafe.Pointer(&_sqlite3BtreeBeginTransØ00__func__Ø000), unsafe.Pointer(str(9993)))
crt.X__builtin_abort(tls)
}
}()
@@ -37629,148 +38356,150 @@ _trans_begun:
var _sqlite3BtreeBeginTransØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeBeginTransØ00__func__Ø000[0], str(51346), 23)
+ crt.Xstrncpy(nil, &_sqlite3BtreeBeginTransØ00__func__Ø000[0], str(51322), 23)
}
-// Get a reference to pPage1 of the database file. This will
-// also acquire a readlock on that file.
-//
-// SQLITE_OK is returned on success. If the file is not a
-// well-formed database file, then SQLITE_CORRUPT is returned.
-// SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM
-// is returned if we run out of memory.
+// C comment
+// /*
+// ** Get a reference to pPage1 of the database file. This will
+// ** also acquire a readlock on that file.
+// **
+// ** SQLITE_OK is returned on success. If the file is not a
+// ** well-formed database file, then SQLITE_CORRUPT is returned.
+// ** SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM
+// ** is returned if we run out of memory.
+// */
func _lockBtree(tls *crt.TLS, _pBt *XBtShared) (r0 int32) {
var _rc, _nPage, _nPageFile, _nPageHeader, _6_isOpen int32
var _2_pageSize, _2_usableSize uint32
var _2_page1 *uint8
var _pPage1 *XMemPage
- _nPageFile = i32(0)
+ _nPageFile = int32(0)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61941), unsafe.Pointer((*int8)(unsafe.Pointer(&_lockBtreeØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61941), unsafe.Pointer(&_lockBtreeØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XMemPage)(_pBt.X3) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61942), unsafe.Pointer((*int8)(unsafe.Pointer(&_lockBtreeØ00__func__Ø000))), unsafe.Pointer(str(51369)))
+ if (*XMemPage)(_pBt.XpPage1) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61942), unsafe.Pointer(&_lockBtreeØ00__func__Ø000), unsafe.Pointer(str(51345)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerSharedLock(tls, (*XPager)(_pBt.X0))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerSharedLock(tls, (*XPager)(_pBt.XpPager))
+ if _rc != int32(0) {
return _rc
}
- _rc = _btreeGetPage(tls, _pBt, uint32(i32(1)), &_pPage1, i32(0))
- if _rc != i32(0) {
+ _rc = _btreeGetPage(tls, _pBt, uint32(1), &_pPage1, int32(0))
+ if _rc != int32(0) {
return _rc
}
- _nPage = store1(&_nPageHeader, int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(28))))))+uintptr(unsafe.Pointer(_pPage1.X19)))))))
- _sqlite3PagerPagecount(tls, (*XPager)(_pBt.X0), &_nPageFile)
- if (_nPage == i32(0)) || (crt.Xmemcmp(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(24))))))+uintptr(unsafe.Pointer(_pPage1.X19))))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(92))))))+uintptr(unsafe.Pointer(_pPage1.X19))))), uint32(i32(4))) != i32(0)) {
+ _nPage = store2(&_nPageHeader, int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(int32(28))+uintptr(unsafe.Pointer(_pPage1.XaData)))))))
+ _sqlite3PagerPagecount(tls, (*XPager)(_pBt.XpPager), &_nPageFile)
+ if (_nPage == int32(0)) || (crt.Xmemcmp(tls, unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(24))+uintptr(unsafe.Pointer(_pPage1.XaData))))), unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(92))+uintptr(unsafe.Pointer(_pPage1.XaData))))), uint32(4)) != int32(0)) {
_nPage = _nPageFile
}
- if _nPage <= i32(0) {
+ if _nPage <= int32(0) {
goto _8
}
- _2_page1 = _pPage1.X19
- _rc = i32(26)
- if crt.Xmemcmp(tls, (unsafe.Pointer)(_2_page1), (unsafe.Pointer)(&_zMagicHeader), uint32(i32(16))) != i32(0) {
+ _2_page1 = _pPage1.XaData
+ _rc = int32(26)
+ if crt.Xmemcmp(tls, unsafe.Pointer(_2_page1), unsafe.Pointer(&_zMagicHeader), uint32(16)) != int32(0) {
goto _page1_init_failed
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_page1)) + 1*uintptr(i32(18))))) > i32(2) {
+ if int32(*elem15(_2_page1, uintptr(18))) > int32(2) {
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) | int32(1))
}
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_page1)) + 1*uintptr(i32(19))))) > i32(2) {
+ if int32(*elem15(_2_page1, uintptr(19))) > int32(2) {
goto _page1_init_failed
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_page1)) + 1*uintptr(i32(19))))) != i32(2) || (int32(_pBt.X10)&i32(16)) != i32(0) {
+ if int32(*elem15(_2_page1, uintptr(19))) != int32(2) || (int32(_pBt.XbtsFlags)&int32(16)) != int32(0) {
goto _13
}
- _6_isOpen = i32(0)
- _rc = _sqlite3PagerOpenWal(tls, (*XPager)(_pBt.X0), &_6_isOpen)
- if _rc != i32(0) {
+ _6_isOpen = int32(0)
+ _rc = _sqlite3PagerOpenWal(tls, (*XPager)(_pBt.XpPager), &_6_isOpen)
+ if _rc != int32(0) {
goto _page1_init_failed
}
- if _6_isOpen == i32(0) {
+ if _6_isOpen == int32(0) {
_releasePage(tls, _pPage1)
- return i32(0)
+ return int32(0)
}
- _rc = i32(26)
+ _rc = int32(26)
goto _17
_13:
_17:
- if crt.Xmemcmp(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_page1))+1*uintptr(i32(21))))), (unsafe.Pointer)(str(51384)), uint32(i32(3))) != i32(0) {
+ if crt.Xmemcmp(tls, unsafe.Pointer(elem15(_2_page1, uintptr(21))), unsafe.Pointer(str(51360)), uint32(3)) != int32(0) {
goto _page1_init_failed
}
- _2_pageSize = uint32((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_page1)) + 1*uintptr(i32(16))))) << uint(i32(8))) | (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_page1)) + 1*uintptr(i32(17))))) << uint(i32(16))))
- if ((((_2_pageSize - uint32(i32(1))) & _2_pageSize) != uint32(i32(0))) || (_2_pageSize > uint32(i32(65536)))) || (_2_pageSize <= uint32(i32(256))) {
+ _2_pageSize = uint32((int32(*elem15(_2_page1, uintptr(16))) << 8) | (int32(*elem15(_2_page1, uintptr(17))) << 16))
+ if ((((_2_pageSize - uint32(1)) & _2_pageSize) != (0)) || (_2_pageSize > uint32(65536))) || (_2_pageSize <= uint32(256)) {
goto _page1_init_failed
}
func() {
- if (_2_pageSize & uint32(i32(7))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62030), unsafe.Pointer((*int8)(unsafe.Pointer(&_lockBtreeØ00__func__Ø000))), unsafe.Pointer(str(51388)))
+ if (_2_pageSize & uint32(7)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62030), unsafe.Pointer(&_lockBtreeØ00__func__Ø000), unsafe.Pointer(str(51364)))
crt.X__builtin_abort(tls)
}
}()
- _2_usableSize = _2_pageSize - uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_page1)) + 1*uintptr(i32(20)))))
- if _2_pageSize != (_pBt.X15) {
+ _2_usableSize = _2_pageSize - uint32(*elem15(_2_page1, uintptr(20)))
+ if _2_pageSize != _pBt.XpageSize {
_releasePage(tls, _pPage1)
- *(*uint32)(unsafe.Pointer(&(_pBt.X16))) = _2_usableSize
- *(*uint32)(unsafe.Pointer(&(_pBt.X15))) = _2_pageSize
+ _pBt.XusableSize = _2_usableSize
+ _pBt.XpageSize = _2_pageSize
_freeTempSpace(tls, _pBt)
- _rc = _sqlite3PagerSetPagesize(tls, (*XPager)(_pBt.X0), (*uint32)(unsafe.Pointer(&(_pBt.X15))), int32(_2_pageSize-_2_usableSize))
+ _rc = _sqlite3PagerSetPagesize(tls, (*XPager)(_pBt.XpPager), &_pBt.XpageSize, int32(_2_pageSize-_2_usableSize))
return _rc
}
- if ((((*Xsqlite3)(_pBt.X1).X6) & i32(65536)) == i32(0)) && (_nPage > _nPageFile) {
- _rc = _sqlite3CorruptError(tls, i32(62055))
+ if ((((*Xsqlite3)(_pBt.Xdb).Xflags) & int32(65536)) == int32(0)) && (_nPage > _nPageFile) {
+ _rc = _sqlite3CorruptError(tls, int32(62055))
goto _page1_init_failed
}
- if _2_usableSize < uint32(i32(480)) {
+ if _2_usableSize < uint32(480) {
goto _page1_init_failed
}
- *(*uint32)(unsafe.Pointer(&(_pBt.X15))) = _2_pageSize
- *(*uint32)(unsafe.Pointer(&(_pBt.X16))) = _2_usableSize
- *(*uint8)(unsafe.Pointer(&(_pBt.X5))) = uint8(func() int32 {
- if _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_page1))+1*uintptr(i32(52))))) != 0 {
- return i32(1)
+ _pBt.XpageSize = _2_pageSize
+ _pBt.XusableSize = _2_usableSize
+ _pBt.XautoVacuum = uint8(func() int32 {
+ if _sqlite3Get4byte(tls, elem15(_2_page1, uintptr(52))) != 0 {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- *(*uint8)(unsafe.Pointer(&(_pBt.X6))) = uint8(func() int32 {
- if _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_page1))+1*uintptr(i32(64))))) != 0 {
- return i32(1)
+ _pBt.XincrVacuum = uint8(func() int32 {
+ if _sqlite3Get4byte(tls, elem15(_2_page1, uintptr(64))) != 0 {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
_8:
- *(*uint16)(unsafe.Pointer(&(_pBt.X11))) = uint16(((((_pBt.X16) - uint32(i32(12))) * uint32(i32(64))) / uint32(i32(255))) - uint32(i32(23)))
- *(*uint16)(unsafe.Pointer(&(_pBt.X12))) = uint16(((((_pBt.X16) - uint32(i32(12))) * uint32(i32(32))) / uint32(i32(255))) - uint32(i32(23)))
- *(*uint16)(unsafe.Pointer(&(_pBt.X13))) = uint16((_pBt.X16) - uint32(i32(35)))
- *(*uint16)(unsafe.Pointer(&(_pBt.X14))) = uint16(((((_pBt.X16) - uint32(i32(12))) * uint32(i32(32))) / uint32(i32(255))) - uint32(i32(23)))
- if int32(_pBt.X11) > i32(127) {
- *(*uint8)(unsafe.Pointer(&(_pBt.X9))) = uint8(i32(127))
+ _pBt.XmaxLocal = uint16((((_pBt.XusableSize - uint32(12)) * uint32(64)) / uint32(255)) - uint32(23))
+ _pBt.XminLocal = uint16((((_pBt.XusableSize - uint32(12)) * uint32(32)) / uint32(255)) - uint32(23))
+ _pBt.XmaxLeaf = uint16(_pBt.XusableSize - uint32(35))
+ _pBt.XminLeaf = uint16((((_pBt.XusableSize - uint32(12)) * uint32(32)) / uint32(255)) - uint32(23))
+ if int32(_pBt.XmaxLocal) > int32(127) {
+ _pBt.Xmax1bytePayload = uint8(127)
goto _33
}
- *(*uint8)(unsafe.Pointer(&(_pBt.X9))) = uint8(_pBt.X11)
+ _pBt.Xmax1bytePayload = uint8(_pBt.XmaxLocal)
_33:
func() {
- if (int32(_pBt.X13) + i32(23)) > int32((_pBt.X15)-uint32(i32(8))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62094), unsafe.Pointer((*int8)(unsafe.Pointer(&_lockBtreeØ00__func__Ø000))), unsafe.Pointer(str(51406)))
+ if (int32(_pBt.XmaxLeaf) + int32(23)) > int32(_pBt.XpageSize-uint32(8)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62094), unsafe.Pointer(&_lockBtreeØ00__func__Ø000), unsafe.Pointer(str(51382)))
crt.X__builtin_abort(tls)
}
}()
- *(**XMemPage)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X3))))) = _pPage1
- *(*uint32)(unsafe.Pointer(&(_pBt.X18))) = uint32(_nPage)
- return i32(0)
+ *(**XMemPage)(unsafe.Pointer(&_pBt.XpPage1)) = _pPage1
+ _pBt.XnPage = uint32(_nPage)
+ return int32(0)
_page1_init_failed:
_releasePage(tls, _pPage1)
- *(**XMemPage)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X3))))) = nil
+ *(**XMemPage)(unsafe.Pointer(&_pBt.XpPage1)) = nil
return _rc
_ = _nPageHeader
@@ -37780,240 +38509,243 @@ _page1_init_failed:
var _lockBtreeØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_lockBtreeØ00__func__Ø000[0], str(51445), 10)
-}
-
-// This function is called to obtain a shared lock on the database file.
-// It is illegal to call sqlite3PagerGet() until after this function
-// has been successfully called. If a shared-lock is already held when
-// this function is called, it is a no-op.
-//
-// The following operations are also performed by this function.
-//
-// 1) If the pager is currently in PAGER_OPEN state (no lock held
-// on the database file), then an attempt is made to obtain a
-// SHARED lock on the database file. Immediately after obtaining
-// the SHARED lock, the file-system is checked for a hot-journal,
-// which is played back if present. Following any hot-journal
-// rollback, the contents of the cache are validated by checking
-// the 'change-counter' field of the database file header and
-// discarded if they are found to be invalid.
-//
-// 2) If the pager is running in exclusive-mode, and there are currently
-// no outstanding references to any pages, and is in the error state,
-// then an attempt is made to clear the error state by discarding
-// the contents of the page cache and rolling back any open journal
-// file.
-//
-// If everything is successful, SQLITE_OK is returned. If an IO error
-// occurs while locking the database, checking for a hot-journal file or
-// rolling back a journal file, the IO error code is returned.
+ crt.Xstrncpy(nil, &_lockBtreeØ00__func__Ø000[0], str(51421), 10)
+}
+
+// C comment
+// /*
+// ** This function is called to obtain a shared lock on the database file.
+// ** It is illegal to call sqlite3PagerGet() until after this function
+// ** has been successfully called. If a shared-lock is already held when
+// ** this function is called, it is a no-op.
+// **
+// ** The following operations are also performed by this function.
+// **
+// ** 1) If the pager is currently in PAGER_OPEN state (no lock held
+// ** on the database file), then an attempt is made to obtain a
+// ** SHARED lock on the database file. Immediately after obtaining
+// ** the SHARED lock, the file-system is checked for a hot-journal,
+// ** which is played back if present. Following any hot-journal
+// ** rollback, the contents of the cache are validated by checking
+// ** the 'change-counter' field of the database file header and
+// ** discarded if they are found to be invalid.
+// **
+// ** 2) If the pager is running in exclusive-mode, and there are currently
+// ** no outstanding references to any pages, and is in the error state,
+// ** then an attempt is made to clear the error state by discarding
+// ** the contents of the page cache and rolling back any open journal
+// ** file.
+// **
+// ** If everything is successful, SQLITE_OK is returned. If an IO error
+// ** occurs while locking the database, checking for a hot-journal file or
+// ** rolling back a journal file, the IO error code is returned.
+// */
func _sqlite3PagerSharedLock(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc, _1_bHotJournal, _8_bExists, _9_fout, _9_f int32
var _15_nPage uint32
var _15_dbFileVers [16]int8
var _8_pVfs *Xsqlite3_vfs
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.X59)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52037), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(51455)))
+ if _sqlite3PcacheRefCount(tls, (*XPCache)(_pPager.XpPCache)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52037), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(51431)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52038), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52038), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) != i32(0) && int32(_pPager.X14) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52039), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(51497)))
+ if int32(_pPager.XeState) != int32(0) && int32(_pPager.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52039), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(51473)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X26) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52040), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(11754)))
+ if _pPager.XerrCode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52040), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(11709)))
crt.X__builtin_abort(tls)
}
}()
- if (*XWal)(_pPager.X60) != nil || int32(_pPager.X14) != i32(0) {
+ if (*XWal)(_pPager.XpWal) != nil || int32(_pPager.XeState) != int32(0) {
goto _10
}
- _1_bHotJournal = i32(1)
+ _1_bHotJournal = int32(1)
func() {
- if (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52045), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(11747)))
+ if _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52045), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(11702)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X10) != i32(0) && int32(_pPager.X15) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52046), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(51556)))
+ if int32(_pPager.XtempFile) != int32(0) && int32(_pPager.XeLock) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52046), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(51532)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _pager_wait_on_lock(tls, _pPager, i32(1))
- if _rc != i32(0) {
+ _rc = _pager_wait_on_lock(tls, _pPager, int32(1))
+ if _rc != int32(0) {
func() {
- if int32(_pPager.X15) != i32(0) && int32(_pPager.X15) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52050), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(51609)))
+ if int32(_pPager.XeLock) != int32(0) && int32(_pPager.XeLock) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52050), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(51585)))
crt.X__builtin_abort(tls)
}
}()
goto _failed
}
- if int32(_pPager.X15) <= i32(1) {
+ if int32(_pPager.XeLock) <= int32(1) {
_rc = _hasHotJournal(tls, _pPager, &_1_bHotJournal)
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _failed
}
if _1_bHotJournal == 0 {
goto _22
}
- if (_pPager.X12) != 0 {
- _rc = i32(776)
+ if _pPager.XreadOnly != 0 {
+ _rc = int32(776)
goto _failed
}
- _rc = _pagerLockDb(tls, _pPager, i32(4))
- if _rc != i32(0) {
+ _rc = _pagerLockDb(tls, _pPager, int32(4))
+ if _rc != int32(0) {
goto _failed
}
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil {
goto _25
}
- _8_pVfs = (*Xsqlite3_vfs)(_pPager.X0)
- _rc = _sqlite3OsAccess(tls, _8_pVfs, _pPager.X52, i32(0), &_8_bExists)
- if _rc != i32(0) || _8_bExists == 0 {
+ _8_pVfs = (*Xsqlite3_vfs)(_pPager.XpVfs)
+ _rc = _sqlite3OsAccess(tls, _8_pVfs, _pPager.XzJournal, int32(0), &_8_bExists)
+ if _rc != int32(0) || _8_bExists == 0 {
goto _27
}
- _9_fout = i32(0)
- _9_f = i32(2050)
+ _9_fout = int32(0)
+ _9_f = int32(2050)
func() {
- if (_pPager.X10) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52110), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(51663)))
+ if _pPager.XtempFile != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52110), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(51639)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsOpen(tls, _8_pVfs, _pPager.X52, (*Xsqlite3_file)(_pPager.X32), _9_f, &_9_fout)
+ _rc = _sqlite3OsOpen(tls, _8_pVfs, _pPager.XzJournal, (*Xsqlite3_file)(_pPager.Xjfd), _9_f, &_9_fout)
func() {
- if _rc == i32(0) && (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52112), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(13510)))
+ if _rc == int32(0) && (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52112), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(13465)))
crt.X__builtin_abort(tls)
}
}()
- if (_rc == i32(0)) && (_9_fout&i32(1)) != 0 {
- _rc = _sqlite3CantopenError(tls, i32(52114))
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X32))
+ if (_rc == int32(0)) && (_9_fout&int32(1)) != 0 {
+ _rc = _sqlite3CantopenError(tls, int32(52114))
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xjfd))
}
_27:
_25:
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil {
goto _35
}
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52129), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52129), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
_rc = _pagerSyncHotJournal(tls, _pPager)
- if _rc == i32(0) {
- _rc = _pager_playback(tls, _pPager, bool2int((_pPager.X10) == 0))
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(0))
+ if _rc == int32(0) {
+ _rc = _pager_playback(tls, _pPager, bool2int(_pPager.XtempFile == 0))
+ _pPager.XeState = 0
}
goto _40
_35:
- if (_pPager.X1) == 0 {
- _pagerUnlockDb(tls, _pPager, i32(1))
+ if _pPager.XexclusiveMode == 0 {
+ _pagerUnlockDb(tls, _pPager, int32(1))
}
_40:
- if _rc != i32(0) {
+ if _rc != int32(0) {
_pager_error(tls, _pPager, _rc)
goto _failed
}
func() {
- if int32(_pPager.X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52160), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(51681)))
+ if int32(_pPager.XeState) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52160), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(51657)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X15) != i32(1) && ((_pPager.X1) == 0 || int32(_pPager.X15) <= i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52161), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(51708)))
+ if int32(_pPager.XeLock) != int32(1) && (_pPager.XexclusiveMode == 0 || int32(_pPager.XeLock) <= int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52161), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(51684)))
crt.X__builtin_abort(tls)
}
}()
_22:
- if (_pPager.X10) != 0 || (_pPager.X21) == 0 {
+ if _pPager.XtempFile != 0 || _pPager.XhasHeldSharedLock == 0 {
goto _49
}
- _15_nPage = u32(0)
+ _15_nPage = uint32(0)
_rc = _pagerPagecount(tls, _pPager, &_15_nPage)
if _rc != 0 {
goto _failed
}
- if _15_nPage <= uint32(i32(0)) {
+ if _15_nPage <= (0) {
goto _51
}
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.X31), (unsafe.Pointer)(&_15_dbFileVers), int32(u32(16)), int64(i32(24)))
- if (_rc != i32(0)) && (_rc != i32(522)) {
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.Xfd), unsafe.Pointer(&_15_dbFileVers), int32(16), int64(24))
+ if (_rc != int32(0)) && (_rc != int32(522)) {
goto _failed
}
goto _54
_51:
- crt.Xmemset(tls, (unsafe.Pointer)(&_15_dbFileVers), i32(0), u32(16))
+ crt.Xmemset(tls, unsafe.Pointer(&_15_dbFileVers), int32(0), uint32(16))
_54:
- if crt.Xmemcmp(tls, (unsafe.Pointer)((*[16]int8)(unsafe.Pointer(&(_pPager.X40)))), (unsafe.Pointer)(&_15_dbFileVers), u32(16)) == i32(0) {
+ if crt.Xmemcmp(tls, unsafe.Pointer(&_pPager.XdbFileVers), unsafe.Pointer(&_15_dbFileVers), uint32(16)) == int32(0) {
goto _55
}
_pager_reset(tls, _pPager)
- if (_pPager.X20) != 0 {
- _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.X31), int64(i32(0)), nil)
+ if _pPager.XbUseFetch != 0 {
+ _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.Xfd), 0, nil)
}
_55:
_49:
_rc = _pagerOpenWalIfPresent(tls, _pPager)
func() {
- if (*XWal)(_pPager.X60) != nil && _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52219), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(51793)))
+ if (*XWal)(_pPager.XpWal) != nil && _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52219), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(51769)))
crt.X__builtin_abort(tls)
}
}()
_10:
- if (*XWal)(_pPager.X60) != nil {
+ if (*XWal)(_pPager.XpWal) != nil {
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52224), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52224), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
_rc = _pagerBeginReadTransaction(tls, _pPager)
}
- if ((int32(_pPager.X10) == i32(0)) && (int32(_pPager.X14) == i32(0))) && (_rc == i32(0)) {
- _rc = _pagerPagecount(tls, _pPager, (*uint32)(unsafe.Pointer(&(_pPager.X22))))
+ if ((int32(_pPager.XtempFile) == int32(0)) && (int32(_pPager.XeState) == int32(0))) && (_rc == int32(0)) {
+ _rc = _pagerPagecount(tls, _pPager, &_pPager.XdbSize)
}
_failed:
- if _rc != i32(0) {
+ if _rc != int32(0) {
func() {
- if (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52234), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(11747)))
+ if _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52234), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(11702)))
crt.X__builtin_abort(tls)
}
}()
_pager_unlock(tls, _pPager)
func() {
- if int32(_pPager.X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52236), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000))), unsafe.Pointer(str(51681)))
+ if int32(_pPager.XeState) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52236), unsafe.Pointer(&_sqlite3PagerSharedLockØ00__func__Ø000), unsafe.Pointer(str(51657)))
crt.X__builtin_abort(tls)
}
}()
goto _71
}
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_pPager.X21))) = uint8(i32(1))
+ _pPager.XeState = uint8(1)
+ _pPager.XhasHeldSharedLock = uint8(1)
_71:
return _rc
@@ -38024,32 +38756,35 @@ _71:
var _sqlite3PagerSharedLockØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerSharedLockØ00__func__Ø000[0], str(51826), 23)
-}
-
-// Try to obtain a lock of type locktype on the database file. If
-// a similar or greater lock is already held, this function is a no-op
-// (returning SQLITE_OK immediately).
-//
-// Otherwise, attempt to obtain the lock using sqlite3OsLock(). Invoke
-// the busy callback if the lock is currently not available. Repeat
-// until the busy callback returns false or until the attempt to
-// obtain the lock succeeds.
-//
-// Return SQLITE_OK on success and an error code if we cannot obtain
-// the lock. If the lock is obtained successfully, set the Pager.state
-// variable to locktype before returning.
+ crt.Xstrncpy(nil, &_sqlite3PagerSharedLockØ00__func__Ø000[0], str(51802), 23)
+}
+
+// C comment
+// /*
+// ** Try to obtain a lock of type locktype on the database file. If
+// ** a similar or greater lock is already held, this function is a no-op
+// ** (returning SQLITE_OK immediately).
+// **
+// ** Otherwise, attempt to obtain the lock using sqlite3OsLock(). Invoke
+// ** the busy callback if the lock is currently not available. Repeat
+// ** until the busy callback returns false or until the attempt to
+// ** obtain the lock succeeds.
+// **
+// ** Return SQLITE_OK on success and an error code if we cannot obtain
+// ** the lock. If the lock is obtained successfully, set the Pager.state
+// ** variable to locktype before returning.
+// */
func _pager_wait_on_lock(tls *crt.TLS, _pPager *XPager, _locktype int32) (r0 int32) {
var _rc int32
func() {
- if int32(_pPager.X15) < _locktype && (int32(_pPager.X15) != i32(0) || _locktype != i32(1)) && (int32(_pPager.X15) != i32(2) || _locktype != i32(4)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50819), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_wait_on_lockØ00__func__Ø000))), unsafe.Pointer(str(51849)))
+ if int32(_pPager.XeLock) < _locktype && (int32(_pPager.XeLock) != int32(0) || _locktype != int32(1)) && (int32(_pPager.XeLock) != int32(2) || _locktype != int32(4)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50819), unsafe.Pointer(&_pager_wait_on_lockØ00__func__Ø000), unsafe.Pointer(str(51825)))
crt.X__builtin_abort(tls)
}
}()
_6:
_rc = _pagerLockDb(tls, _pPager, _locktype)
- if (_rc == i32(5)) && (_pPager.X53)(tls, _pPager.X54) != 0 {
+ if (_rc == int32(5)) && _pPager.XxBusyHandler(tls, _pPager.XpBusyHandlerArg) != 0 {
goto _6
}
return _rc
@@ -38058,37 +38793,40 @@ _6:
var _pager_wait_on_lockØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_pager_wait_on_lockØ00__func__Ø000[0], str(51990), 19)
+ crt.Xstrncpy(nil, &_pager_wait_on_lockØ00__func__Ø000[0], str(51966), 19)
}
-// Lock the database file to level eLock, which must be either SHARED_LOCK,
-// RESERVED_LOCK or EXCLUSIVE_LOCK. If the caller is successful, set the
-// Pager.eLock variable to the new locking state.
-//
-// Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
-// called, do not modify it unless the new locking state is EXCLUSIVE_LOCK.
-// See the comment above the #define of UNKNOWN_LOCK for an explanation
-// of this.
+// C comment
+// /*
+// ** Lock the database file to level eLock, which must be either SHARED_LOCK,
+// ** RESERVED_LOCK or EXCLUSIVE_LOCK. If the caller is successful, set the
+// ** Pager.eLock variable to the new locking state.
+// **
+// ** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
+// ** called, do not modify it unless the new locking state is EXCLUSIVE_LOCK.
+// ** See the comment above the #define of UNKNOWN_LOCK for an explanation
+// ** of this.
+// */
func _pagerLockDb(tls *crt.TLS, _pPager *XPager, _eLock int32) (r0 int32) {
var _rc int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if _eLock != i32(1) && _eLock != i32(2) && _eLock != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48076), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerLockDbØ00__func__Ø000))), unsafe.Pointer(str(52009)))
+ if _eLock != int32(1) && _eLock != int32(2) && _eLock != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48076), unsafe.Pointer(&_pagerLockDbØ00__func__Ø000), unsafe.Pointer(str(51985)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pPager.X15) >= _eLock && int32(_pPager.X15) != i32(5) {
+ if int32(_pPager.XeLock) >= _eLock && int32(_pPager.XeLock) != int32(5) {
goto _5
}
_rc = func() int32 {
- if (_pPager.X11) != 0 {
- return i32(0)
+ if _pPager.XnoLock != 0 {
+ return int32(0)
}
- return _sqlite3OsLock(tls, (*Xsqlite3_file)(_pPager.X31), _eLock)
+ return _sqlite3OsLock(tls, (*Xsqlite3_file)(_pPager.Xfd), _eLock)
}()
- if (_rc == i32(0)) && ((int32(_pPager.X15) != i32(5)) || (_eLock == i32(4))) {
- *(*uint8)(unsafe.Pointer(&(_pPager.X15))) = uint8(_eLock)
+ if (_rc == int32(0)) && ((int32(_pPager.XeLock) != int32(5)) || (_eLock == int32(4))) {
+ _pPager.XeLock = uint8(_eLock)
}
_5:
return _rc
@@ -38097,129 +38835,132 @@ _5:
var _pagerLockDbØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_pagerLockDbØ00__func__Ø000[0], str(52077), 12)
-}
-
-// This function is called after transitioning from PAGER_UNLOCK to
-// PAGER_SHARED state. It tests if there is a hot journal present in
-// the file-system for the given pager. A hot journal is one that
-// needs to be played back. According to this function, a hot-journal
-// file exists if the following criteria are met:
-//
-// * The journal file exists in the file system, and
-// * No process holds a RESERVED or greater lock on the database file, and
-// * The database file itself is greater than 0 bytes in size, and
-// * The first byte of the journal file exists and is not 0x00.
-//
-// If the current size of the database file is 0 but a journal file
-// exists, that is probably an old journal left over from a prior
-// database with the same name. In this case the journal file is
-// just deleted using OsDelete, *pExists is set to 0 and SQLITE_OK
-// is returned.
-//
-// This routine does not check if there is a master journal filename
-// at the end of the file. If there is, and that master journal file
-// does not exist, then the journal file is not really hot. In this
-// case this routine will return a false-positive. The pager_playback()
-// routine will discover that the journal file is not really hot and
-// will not roll it back.
-//
-// If a hot-journal file is found to exist, *pExists is set to 1 and
-// SQLITE_OK returned. If no hot-journal file is present, *pExists is
-// set to 0 and SQLITE_OK returned. If an IO error occurs while trying
-// to determine whether or not a hot-journal file exists, the IO error
-// code is returned and the value of *pExists is undefined.
+ crt.Xstrncpy(nil, &_pagerLockDbØ00__func__Ø000[0], str(52053), 12)
+}
+
+// C comment
+// /*
+// ** This function is called after transitioning from PAGER_UNLOCK to
+// ** PAGER_SHARED state. It tests if there is a hot journal present in
+// ** the file-system for the given pager. A hot journal is one that
+// ** needs to be played back. According to this function, a hot-journal
+// ** file exists if the following criteria are met:
+// **
+// ** * The journal file exists in the file system, and
+// ** * No process holds a RESERVED or greater lock on the database file, and
+// ** * The database file itself is greater than 0 bytes in size, and
+// ** * The first byte of the journal file exists and is not 0x00.
+// **
+// ** If the current size of the database file is 0 but a journal file
+// ** exists, that is probably an old journal left over from a prior
+// ** database with the same name. In this case the journal file is
+// ** just deleted using OsDelete, *pExists is set to 0 and SQLITE_OK
+// ** is returned.
+// **
+// ** This routine does not check if there is a master journal filename
+// ** at the end of the file. If there is, and that master journal file
+// ** does not exist, then the journal file is not really hot. In this
+// ** case this routine will return a false-positive. The pager_playback()
+// ** routine will discover that the journal file is not really hot and
+// ** will not roll it back.
+// **
+// ** If a hot-journal file is found to exist, *pExists is set to 1 and
+// ** SQLITE_OK returned. If no hot-journal file is present, *pExists is
+// ** set to 0 and SQLITE_OK returned. If an IO error occurs while trying
+// ** to determine whether or not a hot-journal file exists, the IO error
+// ** code is returned and the value of *pExists is undefined.
+// */
func _hasHotJournal(tls *crt.TLS, _pPager *XPager, _pExists *int32) (r0 int32) {
var _rc, _exists, _jrnlOpen, _2_locked, _8_f int32
var _3_nPage uint32
var _9_first uint8
var _pVfs *Xsqlite3_vfs
- _pVfs = (*Xsqlite3_vfs)(_pPager.X0)
- _rc = i32(0)
- _exists = i32(1)
- _jrnlOpen = bool2int((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil)
+ _pVfs = (*Xsqlite3_vfs)(_pPager.XpVfs)
+ _rc = int32(0)
+ _exists = int32(1)
+ _jrnlOpen = bool2int((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil)
func() {
- if (_pPager.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51916), unsafe.Pointer((*int8)(unsafe.Pointer(&_hasHotJournalØ00__func__Ø000))), unsafe.Pointer(str(12385)))
+ if _pPager.XuseJournal == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51916), unsafe.Pointer(&_hasHotJournalØ00__func__Ø000), unsafe.Pointer(str(12340)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51917), unsafe.Pointer((*int8)(unsafe.Pointer(&_hasHotJournalØ00__func__Ø000))), unsafe.Pointer(str(16508)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51917), unsafe.Pointer(&_hasHotJournalØ00__func__Ø000), unsafe.Pointer(str(16463)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51918), unsafe.Pointer((*int8)(unsafe.Pointer(&_hasHotJournalØ00__func__Ø000))), unsafe.Pointer(str(51681)))
+ if int32(_pPager.XeState) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51918), unsafe.Pointer(&_hasHotJournalØ00__func__Ø000), unsafe.Pointer(str(51657)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _jrnlOpen != i32(0) && (_sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.X32))&i32(2048)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51920), unsafe.Pointer((*int8)(unsafe.Pointer(&_hasHotJournalØ00__func__Ø000))), unsafe.Pointer(str(52089)))
+ if _jrnlOpen != int32(0) && (_sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.Xjfd))&int32(2048)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51920), unsafe.Pointer(&_hasHotJournalØ00__func__Ø000), unsafe.Pointer(str(52065)))
crt.X__builtin_abort(tls)
}
}()
- *_pExists = i32(0)
+ *_pExists = int32(0)
if _jrnlOpen == 0 {
- _rc = _sqlite3OsAccess(tls, _pVfs, _pPager.X52, i32(0), &_exists)
+ _rc = _sqlite3OsAccess(tls, _pVfs, _pPager.XzJournal, int32(0), &_exists)
}
- if _rc != i32(0) || _exists == 0 {
+ if _rc != int32(0) || _exists == 0 {
goto _11
}
- _2_locked = i32(0)
- _rc = _sqlite3OsCheckReservedLock(tls, (*Xsqlite3_file)(_pPager.X31), &_2_locked)
- if _rc != i32(0) || _2_locked != 0 {
+ _2_locked = int32(0)
+ _rc = _sqlite3OsCheckReservedLock(tls, (*Xsqlite3_file)(_pPager.Xfd), &_2_locked)
+ if _rc != int32(0) || _2_locked != 0 {
goto _13
}
func() {
- if int32(_pPager.X10) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51943), unsafe.Pointer((*int8)(unsafe.Pointer(&_hasHotJournalØ00__func__Ø000))), unsafe.Pointer(str(11043)))
+ if int32(_pPager.XtempFile) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51943), unsafe.Pointer(&_hasHotJournalØ00__func__Ø000), unsafe.Pointer(str(10998)))
crt.X__builtin_abort(tls)
}
}()
_rc = _pagerPagecount(tls, _pPager, &_3_nPage)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _16
}
- if _3_nPage != uint32(i32(0)) || _jrnlOpen != 0 {
+ if _3_nPage != (0) || _jrnlOpen != 0 {
goto _18
}
_sqlite3BeginBenignMalloc(tls)
- if _pagerLockDb(tls, _pPager, i32(2)) != i32(0) {
+ if _pagerLockDb(tls, _pPager, int32(2)) != int32(0) {
goto _19
}
- _sqlite3OsDelete(tls, _pVfs, _pPager.X52, i32(0))
- if (_pPager.X1) == 0 {
- _pagerUnlockDb(tls, _pPager, i32(1))
+ _sqlite3OsDelete(tls, _pVfs, _pPager.XzJournal, int32(0))
+ if _pPager.XexclusiveMode == 0 {
+ _pagerUnlockDb(tls, _pPager, int32(1))
}
_19:
_sqlite3EndBenignMalloc(tls)
goto _21
_18:
if _jrnlOpen == 0 {
- _8_f = i32(2049)
- _rc = _sqlite3OsOpen(tls, _pVfs, _pPager.X52, (*Xsqlite3_file)(_pPager.X32), _8_f, &_8_f)
+ _8_f = int32(2049)
+ _rc = _sqlite3OsOpen(tls, _pVfs, _pPager.XzJournal, (*Xsqlite3_file)(_pPager.Xjfd), _8_f, &_8_f)
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _23
}
- _9_first = u8(0)
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(&_9_first), i32(1), int64(i32(0)))
- if _rc == i32(522) {
- _rc = i32(0)
+ _9_first = uint8(0)
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(&_9_first), int32(1), 0)
+ if _rc == int32(522) {
+ _rc = int32(0)
}
if _jrnlOpen == 0 {
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X32))
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xjfd))
}
- *_pExists = bool2int(int32(_9_first) != i32(0))
+ *_pExists = bool2int(int32(_9_first) != int32(0))
goto _27
_23:
- if _rc == i32(14) {
- *_pExists = i32(1)
- _rc = i32(0)
+ if _rc == int32(14) {
+ *_pExists = int32(1)
+ _rc = int32(0)
}
_27:
_21:
@@ -38232,166 +38973,176 @@ _11:
var _hasHotJournalØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_hasHotJournalØ00__func__Ø000[0], str(52189), 14)
+ crt.Xstrncpy(nil, &_hasHotJournalØ00__func__Ø000[0], str(52165), 14)
}
func _sqlite3OsCheckReservedLock(tls *crt.TLS, _id *Xsqlite3_file, _pResOut *int32) (r0 int32) {
- return (*(*func(*crt.TLS, *Xsqlite3_file, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32) int32
- }{((*Xsqlite3_io_methods)(_id.X0).X9)})))(tls, _id, _pResOut)
-}
-
-// This function is called as part of the transition from PAGER_OPEN
-// to PAGER_READER state to determine the size of the database file
-// in pages (assuming the page size currently stored in Pager.pageSize).
-//
-// If no error occurs, SQLITE_OK is returned and the size of the database
-// in pages is stored in *pnPage. Otherwise, an error code (perhaps
-// SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified.
+ return func() func(*crt.TLS, *Xsqlite3_file, *int32) int32 {
+ v := (*Xsqlite3_io_methods)(_id.XpMethods).XxCheckReservedLock
+ return *(*func(*crt.TLS, *Xsqlite3_file, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _id, _pResOut)
+}
+
+// C comment
+// /*
+// ** This function is called as part of the transition from PAGER_OPEN
+// ** to PAGER_READER state to determine the size of the database file
+// ** in pages (assuming the page size currently stored in Pager.pageSize).
+// **
+// ** If no error occurs, SQLITE_OK is returned and the size of the database
+// ** in pages is stored in *pnPage. Otherwise, an error code (perhaps
+// ** SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified.
+// */
func _pagerPagecount(tls *crt.TLS, _pPager *XPager, _pnPage *uint32) (r0 int32) {
var _1_rc int32
var _1_n int64
var _nPage uint32
func() {
- if int32(_pPager.X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50166), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPagecountØ00__func__Ø000))), unsafe.Pointer(str(51681)))
+ if int32(_pPager.XeState) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50166), unsafe.Pointer(&_pagerPagecountØ00__func__Ø000), unsafe.Pointer(str(51657)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X15) < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50167), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPagecountØ00__func__Ø000))), unsafe.Pointer(str(52203)))
+ if int32(_pPager.XeLock) < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50167), unsafe.Pointer(&_pagerPagecountØ00__func__Ø000), unsafe.Pointer(str(52179)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50168), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPagecountØ00__func__Ø000))), unsafe.Pointer(str(16508)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50168), unsafe.Pointer(&_pagerPagecountØ00__func__Ø000), unsafe.Pointer(str(16463)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X10) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50169), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPagecountØ00__func__Ø000))), unsafe.Pointer(str(11043)))
+ if int32(_pPager.XtempFile) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50169), unsafe.Pointer(&_pagerPagecountØ00__func__Ø000), unsafe.Pointer(str(10998)))
crt.X__builtin_abort(tls)
}
}()
- _nPage = _sqlite3WalDbsize(tls, (*XWal)(_pPager.X60))
- if _nPage != uint32(i32(0)) || func() int32 {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) != nil {
- return i32(1)
+ _nPage = _sqlite3WalDbsize(tls, (*XWal)(_pPager.XpWal))
+ if _nPage != (0) || func() int32 {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50177), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerPagecountØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50177), unsafe.Pointer(&_pagerPagecountØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _11
}
- _1_n = i64(0)
- _1_rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.X31), &_1_n)
- if _1_rc != i32(0) {
+ _1_n = int64(0)
+ _1_rc = _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.Xfd), &_1_n)
+ if _1_rc != int32(0) {
return _1_rc
}
- _nPage = uint32(((_1_n + int64(_pPager.X48)) - int64(i32(1))) / int64(_pPager.X48))
+ _nPage = uint32(((_1_n + int64(_pPager.XpageSize)) - int64(1)) / int64(_pPager.XpageSize))
_11:
- if _nPage > (_pPager.X49) {
- *(*uint32)(unsafe.Pointer(&(_pPager.X49))) = _nPage
+ if _nPage > _pPager.XmxPgno {
+ _pPager.XmxPgno = _nPage
}
*_pnPage = _nPage
- return i32(0)
+ return int32(0)
}
var _pagerPagecountØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_pagerPagecountØ00__func__Ø000[0], str(52230), 15)
+ crt.Xstrncpy(nil, &_pagerPagecountØ00__func__Ø000[0], str(52206), 15)
}
-// Return the size of the database in pages (or zero, if unknown).
+// C comment
+// /*
+// ** Return the size of the database in pages (or zero, if unknown).
+// */
func _sqlite3WalDbsize(tls *crt.TLS, _pWal *XWal) (r0 uint32) {
if (_pWal != nil) && func() int32 {
- if int32(_pWal.X9) >= i32(0) {
- return i32(1)
+ if int32(_pWal.XreadLock) >= int32(0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57179), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalDbsizeØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57179), unsafe.Pointer(&_sqlite3WalDbsizeØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- return (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X7
+ return _pWal.Xhdr.XnPage
}
- return uint32(i32(0))
+ return 0
}
var _sqlite3WalDbsizeØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalDbsizeØ00__func__Ø000[0], str(52245), 17)
-}
-
-// Check if the *-wal file that corresponds to the database opened by pPager
-// exists if the database is not empy, or verify that the *-wal file does
-// not exist (by deleting it) if the database file is empty.
-//
-// If the database is not empty and the *-wal file exists, open the pager
-// in WAL mode. If the database is empty or if no *-wal file exists and
-// if no error occurs, make sure Pager.journalMode is not set to
-// PAGER_JOURNALMODE_WAL.
-//
-// Return SQLITE_OK or an error code.
-//
-// The caller must hold a SHARED lock on the database file to call this
-// function. Because an EXCLUSIVE lock on the db file is required to delete
-// a WAL on a none-empty database, this ensures there is no race condition
-// between the xAccess() below and an xDelete() being executed by some
-// other connection.
+ crt.Xstrncpy(nil, &_sqlite3WalDbsizeØ00__func__Ø000[0], str(52221), 17)
+}
+
+// C comment
+// /*
+// ** Check if the *-wal file that corresponds to the database opened by pPager
+// ** exists if the database is not empy, or verify that the *-wal file does
+// ** not exist (by deleting it) if the database file is empty.
+// **
+// ** If the database is not empty and the *-wal file exists, open the pager
+// ** in WAL mode. If the database is empty or if no *-wal file exists and
+// ** if no error occurs, make sure Pager.journalMode is not set to
+// ** PAGER_JOURNALMODE_WAL.
+// **
+// ** Return SQLITE_OK or an error code.
+// **
+// ** The caller must hold a SHARED lock on the database file to call this
+// ** function. Because an EXCLUSIVE lock on the db file is required to delete
+// ** a WAL on a none-empty database, this ensures there is no race condition
+// ** between the xAccess() below and an xDelete() being executed by some
+// ** other connection.
+// */
func _pagerOpenWalIfPresent(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc, _1_isWal int32
var _1_nPage uint32
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if int32(_pPager.X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50219), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerOpenWalIfPresentØ00__func__Ø000))), unsafe.Pointer(str(51681)))
+ if int32(_pPager.XeState) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50219), unsafe.Pointer(&_pagerOpenWalIfPresentØ00__func__Ø000), unsafe.Pointer(str(51657)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X15) < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50220), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerOpenWalIfPresentØ00__func__Ø000))), unsafe.Pointer(str(52203)))
+ if int32(_pPager.XeLock) < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50220), unsafe.Pointer(&_pagerOpenWalIfPresentØ00__func__Ø000), unsafe.Pointer(str(52179)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X10) != 0 {
+ if _pPager.XtempFile != 0 {
goto _4
}
_rc = _pagerPagecount(tls, _pPager, &_1_nPage)
if _rc != 0 {
return _rc
}
- if _1_nPage != uint32(i32(0)) {
+ if _1_nPage != (0) {
goto _6
}
- _rc = _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pPager.X0), _pPager.X61, i32(0))
- if _rc == i32(5898) {
- _rc = i32(0)
+ _rc = _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pPager.XpVfs), _pPager.XzWal, int32(0))
+ if _rc == int32(5898) {
+ _rc = int32(0)
}
- _1_isWal = i32(0)
+ _1_isWal = int32(0)
goto _8
_6:
- _rc = _sqlite3OsAccess(tls, (*Xsqlite3_vfs)(_pPager.X0), _pPager.X61, i32(0), &_1_isWal)
+ _rc = _sqlite3OsAccess(tls, (*Xsqlite3_vfs)(_pPager.XpVfs), _pPager.XzWal, int32(0), &_1_isWal)
_8:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _9
}
if _1_isWal != 0 {
_rc = _sqlite3PagerOpenWal(tls, _pPager, nil)
goto _12
}
- if int32(_pPager.X2) == i32(5) {
- *(*uint8)(unsafe.Pointer(&(_pPager.X2))) = uint8(i32(0))
+ if int32(_pPager.XjournalMode) == int32(5) {
+ _pPager.XjournalMode = 0
}
_12:
_9:
@@ -38402,70 +39153,73 @@ _4:
var _pagerOpenWalIfPresentØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_pagerOpenWalIfPresentØ00__func__Ø000[0], str(52262), 22)
-}
-
-// The caller must be holding a SHARED lock on the database file to call
-// this function.
-//
-// If the pager passed as the first argument is open on a real database
-// file (not a temp file or an in-memory database), and the WAL file
-// is not already open, make an attempt to open it now. If successful,
-// return SQLITE_OK. If an error occurs or the VFS used by the pager does
-// not support the xShmXXX() methods, return an error code. *pbOpen is
-// not modified in either case.
-//
-// If the pager is open on a temp-file (or in-memory database), or if
-// the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK
-// without doing anything.
+ crt.Xstrncpy(nil, &_pagerOpenWalIfPresentØ00__func__Ø000[0], str(52238), 22)
+}
+
+// C comment
+// /*
+// ** The caller must be holding a SHARED lock on the database file to call
+// ** this function.
+// **
+// ** If the pager passed as the first argument is open on a real database
+// ** file (not a temp file or an in-memory database), and the WAL file
+// ** is not already open, make an attempt to open it now. If successful,
+// ** return SQLITE_OK. If an error occurs or the VFS used by the pager does
+// ** not support the xShmXXX() methods, return an error code. *pbOpen is
+// ** not modified in either case.
+// **
+// ** If the pager is open on a temp-file (or in-memory database), or if
+// ** the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK
+// ** without doing anything.
+// */
func _sqlite3PagerOpenWal(tls *crt.TLS, _pPager *XPager, _pbOpen *int32) (r0 int32) {
var _rc int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54344), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54344), unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) != i32(0) && _pbOpen == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54345), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000))), unsafe.Pointer(str(52284)))
+ if int32(_pPager.XeState) != int32(0) && _pbOpen == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54345), unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000), unsafe.Pointer(str(52260)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) != i32(1) && _pbOpen != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54346), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000))), unsafe.Pointer(str(52321)))
+ if int32(_pPager.XeState) != int32(1) && _pbOpen != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54346), unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000), unsafe.Pointer(str(52297)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pbOpen != nil && (*_pbOpen) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54347), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000))), unsafe.Pointer(str(52361)))
+ if _pbOpen != nil && (*_pbOpen) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54347), unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000), unsafe.Pointer(str(52337)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pbOpen == nil && ((_pPager.X10) != 0 || (*XWal)(_pPager.X60) != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54348), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000))), unsafe.Pointer(str(52385)))
+ if _pbOpen == nil && (_pPager.XtempFile != 0 || _pPager.XpWal != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54348), unsafe.Pointer(&_sqlite3PagerOpenWalØ00__func__Ø000), unsafe.Pointer(str(52361)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X10) != 0 || (*XWal)(_pPager.X60) != nil {
+ if _pPager.XtempFile != 0 || _pPager.XpWal != nil {
goto _16
}
if _sqlite3PagerWalSupported(tls, _pPager) == 0 {
- return i32(14)
+ return int32(14)
}
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X32))
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xjfd))
_rc = _pagerOpenWal(tls, _pPager)
- if _rc == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pPager.X2))) = uint8(i32(5))
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(0))
+ if _rc == int32(0) {
+ _pPager.XjournalMode = uint8(5)
+ _pPager.XeState = 0
}
goto _19
_16:
- *_pbOpen = i32(1)
+ *_pbOpen = int32(1)
_19:
return _rc
}
@@ -38473,46 +39227,50 @@ _19:
var _sqlite3PagerOpenWalØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerOpenWalØ00__func__Ø000[0], str(52435), 20)
+ crt.Xstrncpy(nil, &_sqlite3PagerOpenWalØ00__func__Ø000[0], str(52411), 20)
}
-// Return true if the underlying VFS for the given pager supports the
-// primitives necessary for write-ahead logging.
+// C comment
+// /*
+// ** Return true if the underlying VFS for the given pager supports the
+// ** primitives necessary for write-ahead logging.
+// */
func _sqlite3PagerWalSupported(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _pMethods *Xsqlite3_io_methods
- _pMethods = (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0)
- if (_pPager.X11) != 0 {
- return i32(0)
+ _pMethods = (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods)
+ if _pPager.XnoLock != 0 {
+ return int32(0)
}
- return bool2int(((_pPager.X1) != 0) || (((_pMethods.X0) >= i32(2)) && ((*(*func(*crt.TLS, *Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32
- }{(_pMethods.X13)}))) != nil)))
+ return bool2int((_pPager.XexclusiveMode != 0) || ((_pMethods.XiVersion >= int32(2)) && (_pMethods.XxShmMap != nil)))
}
-// Call sqlite3WalOpen() to open the WAL handle. If the pager is in
-// exclusive-locking mode when this function is called, take an EXCLUSIVE
-// lock on the database file and use heap-memory to store the wal-index
-// in. Otherwise, use the normal shared-memory.
+// C comment
+// /*
+// ** Call sqlite3WalOpen() to open the WAL handle. If the pager is in
+// ** exclusive-locking mode when this function is called, take an EXCLUSIVE
+// ** lock on the database file and use heap-memory to store the wal-index
+// ** in. Otherwise, use the normal shared-memory.
+// */
func _pagerOpenWal(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (*XWal)(_pPager.X60) != nil || int32(_pPager.X10) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54296), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerOpenWalØ00__func__Ø000))), unsafe.Pointer(str(52455)))
+ if (*XWal)(_pPager.XpWal) != nil || int32(_pPager.XtempFile) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54296), unsafe.Pointer(&_pagerOpenWalØ00__func__Ø000), unsafe.Pointer(str(52431)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X15) != i32(1) && int32(_pPager.X15) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54297), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerOpenWalØ00__func__Ø000))), unsafe.Pointer(str(52494)))
+ if int32(_pPager.XeLock) != int32(1) && int32(_pPager.XeLock) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54297), unsafe.Pointer(&_pagerOpenWalØ00__func__Ø000), unsafe.Pointer(str(52470)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X1) != 0 {
+ if _pPager.XexclusiveMode != 0 {
_rc = _pagerExclusiveLock(tls, _pPager)
}
- if _rc == i32(0) {
- _rc = _sqlite3WalOpen(tls, (*Xsqlite3_vfs)(_pPager.X0), (*Xsqlite3_file)(_pPager.X31), _pPager.X61, int32(_pPager.X1), _pPager.X50, (**XWal)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X60))))))
+ if _rc == int32(0) {
+ _rc = _sqlite3WalOpen(tls, (*Xsqlite3_vfs)(_pPager.XpVfs), (*Xsqlite3_file)(_pPager.Xfd), _pPager.XzWal, int32(_pPager.XexclusiveMode), _pPager.XjournalSizeLimit, (**XWal)(unsafe.Pointer(&_pPager.XpWal)))
}
_pagerFixMaplimit(tls, _pPager)
return _rc
@@ -38521,22 +39279,25 @@ func _pagerOpenWal(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _pagerOpenWalØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_pagerOpenWalØ00__func__Ø000[0], str(52554), 13)
+ crt.Xstrncpy(nil, &_pagerOpenWalØ00__func__Ø000[0], str(52530), 13)
}
-// Attempt to take an exclusive lock on the database file. If a PENDING lock
-// is obtained instead, immediately release it.
+// C comment
+// /*
+// ** Attempt to take an exclusive lock on the database file. If a PENDING lock
+// ** is obtained instead, immediately release it.
+// */
func _pagerExclusiveLock(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc int32
func() {
- if int32(_pPager.X15) != i32(1) && int32(_pPager.X15) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54276), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerExclusiveLockØ00__func__Ø000))), unsafe.Pointer(str(52494)))
+ if int32(_pPager.XeLock) != int32(1) && int32(_pPager.XeLock) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54276), unsafe.Pointer(&_pagerExclusiveLockØ00__func__Ø000), unsafe.Pointer(str(52470)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _pagerLockDb(tls, _pPager, i32(4))
- if _rc != i32(0) {
- _pagerUnlockDb(tls, _pPager, i32(1))
+ _rc = _pagerLockDb(tls, _pPager, int32(4))
+ if _rc != int32(0) {
+ _pagerUnlockDb(tls, _pPager, int32(1))
}
return _rc
}
@@ -38544,76 +39305,77 @@ func _pagerExclusiveLock(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _pagerExclusiveLockØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_pagerExclusiveLockØ00__func__Ø000[0], str(52567), 19)
-}
-
-// Open a connection to the WAL file zWalName. The database file must
-// already be opened on connection pDbFd. The buffer that zWalName points
-// to must remain valid for the lifetime of the returned Wal* handle.
-//
-// A SHARED lock should be held on the database file when this function
-// is called. The purpose of this SHARED lock is to prevent any other
-// client from unlinking the WAL or wal-index file. If another process
-// were to do this just after this client opened one of these files, the
-// system would be badly broken.
-//
-// If the log file is successfully opened, SQLITE_OK is returned and
-// *ppWal is set to point to a new WAL handle. If an error occurs,
-// an SQLite error code is returned and *ppWal is left unmodified.
+ crt.Xstrncpy(nil, &_pagerExclusiveLockØ00__func__Ø000[0], str(52543), 19)
+}
+
+// C comment
+// /*
+// ** Open a connection to the WAL file zWalName. The database file must
+// ** already be opened on connection pDbFd. The buffer that zWalName points
+// ** to must remain valid for the lifetime of the returned Wal* handle.
+// **
+// ** A SHARED lock should be held on the database file when this function
+// ** is called. The purpose of this SHARED lock is to prevent any other
+// ** client from unlinking the WAL or wal-index file. If another process
+// ** were to do this just after this client opened one of these files, the
+// ** system would be badly broken.
+// **
+// ** If the log file is successfully opened, SQLITE_OK is returned and
+// ** *ppWal is set to point to a new WAL handle. If an error occurs,
+// ** an SQLite error code is returned and *ppWal is left unmodified.
+// */
func _sqlite3WalOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _pDbFd *Xsqlite3_file, _zWalName *int8, _bNoShm int32, _mxWalSize int64, _ppWal **XWal) (r0 int32) {
var _rc, _flags, _4_iDC int32
var _pRet *XWal
func() {
- if _zWalName == nil || (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zWalName)) + 1*uintptr(i32(0))))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55767), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalOpenØ00__func__Ø000))), unsafe.Pointer(str(52586)))
+ if _zWalName == nil || (*elem1(_zWalName, 0)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55767), unsafe.Pointer(&_sqlite3WalOpenØ00__func__Ø000), unsafe.Pointer(str(52562)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pDbFd == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(55768), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalOpenØ00__func__Ø000))), unsafe.Pointer(str(52610)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(55768), unsafe.Pointer(&_sqlite3WalOpenØ00__func__Ø000), unsafe.Pointer(str(52586)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- i32(0)
- i32(0)
+
*_ppWal = nil
- _pRet = (*XWal)(_sqlite3MallocZero(tls, uint64(u32(120)+uint32(_pVfs.X1))))
+ _pRet = (*XWal)(_sqlite3MallocZero(tls, uint64(uint32(120)+uint32(_pVfs.XszOsFile))))
if _pRet == nil {
- return _sqlite3NomemError(tls, i32(55790))
- }
- *(**Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRet.X0))))) = _pVfs
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRet.X2))))) = (*Xsqlite3_file)(unsafe.Pointer((*XWal)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pRet)) + 120*uintptr(i32(1))))))
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRet.X1))))) = _pDbFd
- *(*int16)(unsafe.Pointer(&(_pRet.X9))) = int16(i32(-1))
- *(*int64)(unsafe.Pointer(&(_pRet.X4))) = _mxWalSize
- *(**int8)(unsafe.Pointer(&(_pRet.X21))) = _zWalName
- *(*uint8)(unsafe.Pointer(&(_pRet.X16))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_pRet.X17))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_pRet.X11))) = uint8(func() int32 {
+ return _sqlite3NomemError(tls, int32(55790))
+ }
+ *(**Xsqlite3_vfs)(unsafe.Pointer(&_pRet.XpVfs)) = _pVfs
+ *(**Xsqlite3_file)(unsafe.Pointer(&_pRet.XpWalFd)) = (*Xsqlite3_file)(unsafe.Pointer(elem74(_pRet, uintptr(1))))
+ *(**Xsqlite3_file)(unsafe.Pointer(&_pRet.XpDbFd)) = _pDbFd
+ _pRet.XreadLock = int16(-1)
+ _pRet.XmxWalSize = _mxWalSize
+ _pRet.XzWalName = _zWalName
+ _pRet.XsyncHeader = uint8(1)
+ _pRet.XpadToSectorBoundary = uint8(1)
+ _pRet.XexclusiveMode = uint8(func() int32 {
if _bNoShm != 0 {
- return i32(2)
+ return int32(2)
}
- return i32(0)
+ return int32(0)
}())
- _flags = i32(524294)
- _rc = _sqlite3OsOpen(tls, _pVfs, _zWalName, (*Xsqlite3_file)(_pRet.X2), _flags, &_flags)
- if (_rc == i32(0)) && (_flags&i32(1)) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pRet.X14))) = uint8(i32(1))
- }
- if _rc != i32(0) {
- _walIndexClose(tls, _pRet, i32(0))
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pRet.X2))
- Xsqlite3_free(tls, (unsafe.Pointer)(_pRet))
+ _flags = int32(524294)
+ _rc = _sqlite3OsOpen(tls, _pVfs, _zWalName, (*Xsqlite3_file)(_pRet.XpWalFd), _flags, &_flags)
+ if (_rc == int32(0)) && (_flags&int32(1)) != 0 {
+ _pRet.XreadOnly = uint8(1)
+ }
+ if _rc != int32(0) {
+ _walIndexClose(tls, _pRet, int32(0))
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pRet.XpWalFd))
+ Xsqlite3_free(tls, unsafe.Pointer(_pRet))
goto _11
}
_4_iDC = _sqlite3OsDeviceCharacteristics(tls, _pDbFd)
- if (_4_iDC & i32(1024)) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pRet.X16))) = uint8(i32(0))
+ if (_4_iDC & int32(1024)) != 0 {
+ _pRet.XsyncHeader = 0
}
- if (_4_iDC & i32(4096)) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pRet.X17))) = uint8(i32(0))
+ if (_4_iDC & int32(4096)) != 0 {
+ _pRet.XpadToSectorBoundary = 0
}
*_ppWal = _pRet
_11:
@@ -38623,38 +39385,41 @@ _11:
var _sqlite3WalOpenØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalOpenØ00__func__Ø000[0], str(52616), 15)
+ crt.Xstrncpy(nil, &_sqlite3WalOpenØ00__func__Ø000[0], str(52592), 15)
}
-// Begin a read transaction on the WAL.
-//
-// This routine used to be called "pagerOpenSnapshot()" because it essentially
-// makes a snapshot of the database at the current point in time and preserves
-// that snapshot for use by the reader in spite of concurrently changes by
-// other writers or checkpointers.
+// C comment
+// /*
+// ** Begin a read transaction on the WAL.
+// **
+// ** This routine used to be called "pagerOpenSnapshot()" because it essentially
+// ** makes a snapshot of the database at the current point in time and preserves
+// ** that snapshot for use by the reader in spite of concurrently changes by
+// ** other writers or checkpointers.
+// */
func _pagerBeginReadTransaction(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc, _changed int32
- _changed = i32(0)
+ _changed = int32(0)
func() {
- if (*XWal)(_pPager.X60) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50128), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerBeginReadTransactionØ00__func__Ø000))), unsafe.Pointer(str(15826)))
+ if (*XWal)(_pPager.XpWal) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50128), unsafe.Pointer(&_pagerBeginReadTransactionØ00__func__Ø000), unsafe.Pointer(str(15781)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) != i32(0) && int32(_pPager.X14) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50129), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerBeginReadTransactionØ00__func__Ø000))), unsafe.Pointer(str(51497)))
+ if int32(_pPager.XeState) != int32(0) && int32(_pPager.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50129), unsafe.Pointer(&_pagerBeginReadTransactionØ00__func__Ø000), unsafe.Pointer(str(51473)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3WalEndReadTransaction(tls, (*XWal)(_pPager.X60))
- _rc = _sqlite3WalBeginReadTransaction(tls, (*XWal)(_pPager.X60), &_changed)
- if _rc == i32(0) && _changed == 0 {
+ _sqlite3WalEndReadTransaction(tls, (*XWal)(_pPager.XpWal))
+ _rc = _sqlite3WalBeginReadTransaction(tls, (*XWal)(_pPager.XpWal), &_changed)
+ if _rc == int32(0) && _changed == 0 {
goto _6
}
_pager_reset(tls, _pPager)
- if (_pPager.X20) != 0 {
- _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.X31), int64(i32(0)), nil)
+ if _pPager.XbUseFetch != 0 {
+ _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pPager.Xfd), 0, nil)
}
_6:
return _rc
@@ -38663,27 +39428,30 @@ _6:
var _pagerBeginReadTransactionØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_pagerBeginReadTransactionØ00__func__Ø000[0], str(52631), 26)
-}
-
-// Begin a read transaction on the database.
-//
-// This routine used to be called sqlite3OpenSnapshot() and with good reason:
-// it takes a snapshot of the state of the WAL and wal-index for the current
-// instant in time. The current thread will continue to use this snapshot.
-// Other threads might append new content to the WAL and wal-index but
-// that extra content is ignored by the current thread.
-//
-// If the database contents have changes since the previous read
-// transaction, then *pChanged is set to 1 before returning. The
-// Pager layer will use this to know that is cache is stale and
-// needs to be flushed.
+ crt.Xstrncpy(nil, &_pagerBeginReadTransactionØ00__func__Ø000[0], str(52607), 26)
+}
+
+// C comment
+// /*
+// ** Begin a read transaction on the database.
+// **
+// ** This routine used to be called sqlite3OpenSnapshot() and with good reason:
+// ** it takes a snapshot of the state of the WAL and wal-index for the current
+// ** instant in time. The current thread will continue to use this snapshot.
+// ** Other threads might append new content to the WAL and wal-index but
+// ** that extra content is ignored by the current thread.
+// **
+// ** If the database contents have changes since the previous read
+// ** transaction, then *pChanged is set to 1 before returning. The
+// ** Pager layer will use this to know that is cache is stale and
+// ** needs to be flushed.
+// */
func _sqlite3WalBeginReadTransaction(tls *crt.TLS, _pWal *XWal, _pChanged *int32) (r0 int32) {
var _rc, _cnt int32
- _cnt = i32(0)
+ _cnt = int32(0)
_0:
- _rc = _walTryBeginRead(tls, _pWal, _pChanged, i32(0), preInc1(&_cnt, 1))
- if _rc == i32(-1) {
+ _rc = _walTryBeginRead(tls, _pWal, _pChanged, int32(0), preInc2(&_cnt, 1))
+ if _rc == int32(-1) {
goto _0
}
return _rc
@@ -38692,137 +39460,140 @@ _0:
panic(0)
}
-// Attempt to start a read transaction. This might fail due to a race or
-// other transient condition. When that happens, it returns WAL_RETRY to
-// indicate to the caller that it is safe to retry immediately.
-//
-// On success return SQLITE_OK. On a permanent failure (such an
-// I/O error or an SQLITE_BUSY because another process is running
-// recovery) return a positive error code.
-//
-// The useWal parameter is true to force the use of the WAL and disable
-// the case where the WAL is bypassed because it has been completely
-// checkpointed. If useWal==0 then this routine calls walIndexReadHdr()
-// to make a copy of the wal-index header into pWal->hdr. If the
-// wal-index header has changed, *pChanged is set to 1 (as an indication
-// to the caller that the local paget cache is obsolete and needs to be
-// flushed.) When useWal==1, the wal-index header is assumed to already
-// be loaded and the pChanged parameter is unused.
-//
-// The caller must set the cnt parameter to the number of prior calls to
-// this routine during the current read attempt that returned WAL_RETRY.
-// This routine will start taking more aggressive measures to clear the
-// race conditions after multiple WAL_RETRY returns, and after an excessive
-// number of errors will ultimately return SQLITE_PROTOCOL. The
-// SQLITE_PROTOCOL return indicates that some other process has gone rogue
-// and is not honoring the locking protocol. There is a vanishingly small
-// chance that SQLITE_PROTOCOL could be returned because of a run of really
-// bad luck when there is lots of contention for the wal-index, but that
-// possibility is so small that it can be safely neglected, we believe.
-//
-// On success, this routine obtains a read lock on
-// WAL_READ_LOCK(pWal->readLock). The pWal->readLock integer is
-// in the range 0 <= pWal->readLock < WAL_NREADER. If pWal->readLock==(-1)
-// that means the Wal does not hold any read lock. The reader must not
-// access any database page that is modified by a WAL frame up to and
-// including frame number aReadMark[pWal->readLock]. The reader will
-// use WAL frames up to and including pWal->hdr.mxFrame if pWal->readLock>0
-// Or if pWal->readLock==0, then the reader will ignore the WAL
-// completely and get all content directly from the database file.
-// If the useWal parameter is 1 then the WAL will never be ignored and
-// this routine will always set pWal->readLock>0 on success.
-// When the read transaction is completed, the caller must release the
-// lock on WAL_READ_LOCK(pWal->readLock) and set pWal->readLock to -1.
-//
-// This routine uses the nBackfill and aReadMark[] fields of the header
-// to select a particular WAL_READ_LOCK() that strives to let the
-// checkpoint process do as much work as possible. This routine might
-// update values of the aReadMark[] array in the header, but if it does
-// so it takes care to hold an exclusive lock on the corresponding
-// WAL_READ_LOCK() while changing values.
+// C comment
+// /*
+// ** Attempt to start a read transaction. This might fail due to a race or
+// ** other transient condition. When that happens, it returns WAL_RETRY to
+// ** indicate to the caller that it is safe to retry immediately.
+// **
+// ** On success return SQLITE_OK. On a permanent failure (such an
+// ** I/O error or an SQLITE_BUSY because another process is running
+// ** recovery) return a positive error code.
+// **
+// ** The useWal parameter is true to force the use of the WAL and disable
+// ** the case where the WAL is bypassed because it has been completely
+// ** checkpointed. If useWal==0 then this routine calls walIndexReadHdr()
+// ** to make a copy of the wal-index header into pWal->hdr. If the
+// ** wal-index header has changed, *pChanged is set to 1 (as an indication
+// ** to the caller that the local paget cache is obsolete and needs to be
+// ** flushed.) When useWal==1, the wal-index header is assumed to already
+// ** be loaded and the pChanged parameter is unused.
+// **
+// ** The caller must set the cnt parameter to the number of prior calls to
+// ** this routine during the current read attempt that returned WAL_RETRY.
+// ** This routine will start taking more aggressive measures to clear the
+// ** race conditions after multiple WAL_RETRY returns, and after an excessive
+// ** number of errors will ultimately return SQLITE_PROTOCOL. The
+// ** SQLITE_PROTOCOL return indicates that some other process has gone rogue
+// ** and is not honoring the locking protocol. There is a vanishingly small
+// ** chance that SQLITE_PROTOCOL could be returned because of a run of really
+// ** bad luck when there is lots of contention for the wal-index, but that
+// ** possibility is so small that it can be safely neglected, we believe.
+// **
+// ** On success, this routine obtains a read lock on
+// ** WAL_READ_LOCK(pWal->readLock). The pWal->readLock integer is
+// ** in the range 0 <= pWal->readLock < WAL_NREADER. If pWal->readLock==(-1)
+// ** that means the Wal does not hold any read lock. The reader must not
+// ** access any database page that is modified by a WAL frame up to and
+// ** including frame number aReadMark[pWal->readLock]. The reader will
+// ** use WAL frames up to and including pWal->hdr.mxFrame if pWal->readLock>0
+// ** Or if pWal->readLock==0, then the reader will ignore the WAL
+// ** completely and get all content directly from the database file.
+// ** If the useWal parameter is 1 then the WAL will never be ignored and
+// ** this routine will always set pWal->readLock>0 on success.
+// ** When the read transaction is completed, the caller must release the
+// ** lock on WAL_READ_LOCK(pWal->readLock) and set pWal->readLock to -1.
+// **
+// ** This routine uses the nBackfill and aReadMark[] fields of the header
+// ** to select a particular WAL_READ_LOCK() that strives to let the
+// ** checkpoint process do as much work as possible. This routine might
+// ** update values of the aReadMark[] array in the header, but if it does
+// ** so it takes care to hold an exclusive lock on the corresponding
+// ** WAL_READ_LOCK() while changing values.
+// */
func _walTryBeginRead(tls *crt.TLS, _pWal *XWal, _pChanged *int32, _useWal int32, _cnt int32) (r0 int32) {
var _mxI, _i, _rc, _1_nDelay int32
var _mxReadMark, _mxFrame, _13_thisMark uint32
var _pInfo *XWalCkptInfo
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if int32(_pWal.X9) >= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56667), unsafe.Pointer((*int8)(unsafe.Pointer(&_walTryBeginReadØ00__func__Ø000))), unsafe.Pointer(str(52657)))
+ if int32(_pWal.XreadLock) >= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56667), unsafe.Pointer(&_walTryBeginReadØ00__func__Ø000), unsafe.Pointer(str(52633)))
crt.X__builtin_abort(tls)
}
}()
- if _cnt <= i32(5) {
+ if _cnt <= int32(5) {
goto _2
}
- _1_nDelay = i32(1)
- if _cnt > i32(100) {
- *(*uint8)(unsafe.Pointer(&(_pWal.X23))) = uint8(i32(1))
- return i32(15)
+ _1_nDelay = int32(1)
+ if _cnt > int32(100) {
+ _pWal.XlockError = uint8(1)
+ return int32(15)
}
- if _cnt >= i32(10) {
- _1_nDelay = ((_cnt - i32(9)) * (_cnt - i32(9))) * i32(39)
+ if _cnt >= int32(10) {
+ _1_nDelay = ((_cnt - int32(9)) * (_cnt - int32(9))) * int32(39)
}
- _sqlite3OsSleep(tls, (*Xsqlite3_vfs)(_pWal.X0), _1_nDelay)
+ _sqlite3OsSleep(tls, (*Xsqlite3_vfs)(_pWal.XpVfs), _1_nDelay)
_2:
if _useWal != 0 {
goto _5
}
_rc = _walIndexReadHdr(tls, _pWal, _pChanged)
- if _rc != i32(5) {
+ if _rc != int32(5) {
goto _6
}
- if (*(**uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pWal.X7)) + 4*uintptr(i32(0))))) == nil {
- _rc = i32(-1)
+ if (*elem36(_pWal.XapWiData, 0)) == nil {
+ _rc = int32(-1)
goto _11
}
- if i32(0) == store1(&_rc, _walLockShared(tls, _pWal, i32(2))) {
- _walUnlockShared(tls, _pWal, i32(2))
- _rc = i32(-1)
+ if int32(0) == store2(&_rc, _walLockShared(tls, _pWal, int32(2))) {
+ _walUnlockShared(tls, _pWal, int32(2))
+ _rc = int32(-1)
goto _11
}
- if _rc == i32(5) {
- _rc = i32(261)
+ if _rc == int32(5) {
+ _rc = int32(261)
}
_11:
_6:
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
_5:
_pInfo = _walCkptInfo(tls, _pWal)
- if _useWal != 0 || (_pInfo.X0) != ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
+ if _useWal != 0 || _pInfo.XnBackfill != (_pWal.Xhdr.XmxFrame) {
goto _14
}
- _rc = _walLockShared(tls, _pWal, i32(3))
+ _rc = _walLockShared(tls, _pWal, int32(3))
_walShmBarrier(tls, _pWal)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _15
}
- if crt.Xmemcmp(tls, (unsafe.Pointer)(_walIndexHdr(tls, _pWal)), (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), u32(48)) != 0 {
- _walUnlockShared(tls, _pWal, i32(3))
- return i32(-1)
+ if crt.Xmemcmp(tls, unsafe.Pointer(_walIndexHdr(tls, _pWal)), unsafe.Pointer(&_pWal.Xhdr), uint32(48)) != 0 {
+ _walUnlockShared(tls, _pWal, int32(3))
+ return int32(-1)
}
- *(*int16)(unsafe.Pointer(&(_pWal.X9))) = int16(i32(0))
- return i32(0)
+ _pWal.XreadLock = 0
+ return int32(0)
_15:
- if _rc != i32(5) {
+ if _rc != int32(5) {
return _rc
}
_14:
- _mxReadMark = uint32(i32(0))
- _mxI = i32(0)
- _mxFrame = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
- _i = i32(1)
+ _mxReadMark = 0
+ _mxI = int32(0)
+ _mxFrame = _pWal.Xhdr.XmxFrame
+ _i = int32(1)
_19:
- if _i >= i32(5) {
+ if _i >= int32(5) {
goto _22
}
- _13_thisMark = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pInfo.X1))))) + 4*uintptr(_i)))
+ _13_thisMark = *elem7((*uint32)(unsafe.Pointer(&_pInfo.XaReadMark)), uintptr(_i))
if (_mxReadMark <= _13_thisMark) && (_13_thisMark <= _mxFrame) {
func() {
- if _13_thisMark == u32(4294967295) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56781), unsafe.Pointer((*int8)(unsafe.Pointer(&_walTryBeginReadØ00__func__Ø000))), unsafe.Pointer(str(52674)))
+ if _13_thisMark == uint32(4294967295) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56781), unsafe.Pointer(&_walTryBeginReadØ00__func__Ø000), unsafe.Pointer(str(52650)))
crt.X__builtin_abort(tls)
}
}()
@@ -38832,167 +39603,175 @@ _19:
_i += 1
goto _19
_22:
- if (int32(_pWal.X14)&i32(2)) != i32(0) || _mxReadMark >= _mxFrame && _mxI != i32(0) {
+ if (int32(_pWal.XreadOnly)&int32(2)) != int32(0) || _mxReadMark >= _mxFrame && _mxI != int32(0) {
goto _29
}
- _i = i32(1)
+ _i = int32(1)
_30:
- if _i >= i32(5) {
+ if _i >= int32(5) {
goto _33
}
- _rc = _walLockExclusive(tls, _pWal, i32(3)+_i, i32(1))
- if _rc == i32(0) {
- _mxReadMark = store5((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pInfo.X1)))))+4*uintptr(_i))), _mxFrame)
+ _rc = _walLockExclusive(tls, _pWal, int32(3)+_i, int32(1))
+ if _rc == int32(0) {
+ _mxReadMark = store23(elem7((*uint32)(unsafe.Pointer(&_pInfo.XaReadMark)), uintptr(_i)), _mxFrame)
_mxI = _i
- _walUnlockExclusive(tls, _pWal, i32(3)+_i, i32(1))
+ _walUnlockExclusive(tls, _pWal, int32(3)+_i, int32(1))
goto _33
}
- if _rc != i32(5) {
+ if _rc != int32(5) {
return _rc
}
_i += 1
goto _30
_33:
_29:
- if _mxI == i32(0) {
+ if _mxI == int32(0) {
func() {
- if _rc != i32(5) && (int32(_pWal.X14)&i32(2)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56802), unsafe.Pointer((*int8)(unsafe.Pointer(&_walTryBeginReadØ00__func__Ø000))), unsafe.Pointer(str(52702)))
+ if _rc != int32(5) && (int32(_pWal.XreadOnly)&int32(2)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56802), unsafe.Pointer(&_walTryBeginReadØ00__func__Ø000), unsafe.Pointer(str(52678)))
crt.X__builtin_abort(tls)
}
}()
return func() int32 {
- if _rc == i32(5) {
- return i32(-1)
+ if _rc == int32(5) {
+ return int32(-1)
}
- return i32(520)
+ return int32(520)
}()
}
- _rc = _walLockShared(tls, _pWal, i32(3)+_mxI)
+ _rc = _walLockShared(tls, _pWal, int32(3)+_mxI)
if _rc != 0 {
return func() int32 {
- if _rc == i32(5) {
- return i32(-1)
+ if _rc == int32(5) {
+ return int32(-1)
}
return _rc
}()
}
- *(*uint32)(unsafe.Pointer(&(_pWal.X19))) = (_pInfo.X0) + uint32(i32(1))
+ _pWal.XminFrame = _pInfo.XnBackfill + uint32(1)
_walShmBarrier(tls, _pWal)
- if ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pInfo.X1))))) + 4*uintptr(_mxI)))) != _mxReadMark) || crt.Xmemcmp(tls, (unsafe.Pointer)(_walIndexHdr(tls, _pWal)), (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), u32(48)) != 0 {
- _walUnlockShared(tls, _pWal, i32(3)+_mxI)
- return i32(-1)
+ if ((*elem7((*uint32)(unsafe.Pointer(&_pInfo.XaReadMark)), uintptr(_mxI))) != _mxReadMark) || crt.Xmemcmp(tls, unsafe.Pointer(_walIndexHdr(tls, _pWal)), unsafe.Pointer(&_pWal.Xhdr), uint32(48)) != 0 {
+ _walUnlockShared(tls, _pWal, int32(3)+_mxI)
+ return int32(-1)
}
func() {
- if _mxReadMark > ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(56852), unsafe.Pointer((*int8)(unsafe.Pointer(&_walTryBeginReadØ00__func__Ø000))), unsafe.Pointer(str(52758)))
+ if _mxReadMark > (_pWal.Xhdr.XmxFrame) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(56852), unsafe.Pointer(&_walTryBeginReadØ00__func__Ø000), unsafe.Pointer(str(52734)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_pWal.X9))) = int16(_mxI)
+ _pWal.XreadLock = int16(_mxI)
return _rc
}
var _walTryBeginReadØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_walTryBeginReadØ00__func__Ø000[0], str(52788), 16)
+ crt.Xstrncpy(nil, &_walTryBeginReadØ00__func__Ø000[0], str(52764), 16)
}
+// C comment
+// /*
+// ** The header string that appears at the beginning of every
+// ** SQLite database.
+// */
var _zMagicHeader [16]int8
func init() {
- crt.Xstrncpy(nil, &_zMagicHeader[0], str(52804), 16)
-}
-
-// Begin a write-transaction on the specified pager object. If a
-// write-transaction has already been opened, this function is a no-op.
-//
-// If the exFlag argument is false, then acquire at least a RESERVED
-// lock on the database file. If exFlag is true, then acquire at least
-// an EXCLUSIVE lock. If such a lock is already held, no locking
-// functions need be called.
-//
-// If the subjInMemory argument is non-zero, then any sub-journal opened
-// within this transaction will be opened as an in-memory file. This
-// has no effect if the sub-journal is already opened (as it may be when
-// running in exclusive mode) or if the transaction does not require a
-// sub-journal. If the subjInMemory argument is zero, then any required
-// sub-journal is implemented in-memory if pPager is an in-memory database,
-// or using a temporary file otherwise.
+ crt.Xstrncpy(nil, &_zMagicHeader[0], str(52780), 16)
+}
+
+// C comment
+// /*
+// ** Begin a write-transaction on the specified pager object. If a
+// ** write-transaction has already been opened, this function is a no-op.
+// **
+// ** If the exFlag argument is false, then acquire at least a RESERVED
+// ** lock on the database file. If exFlag is true, then acquire at least
+// ** an EXCLUSIVE lock. If such a lock is already held, no locking
+// ** functions need be called.
+// **
+// ** If the subjInMemory argument is non-zero, then any sub-journal opened
+// ** within this transaction will be opened as an in-memory file. This
+// ** has no effect if the sub-journal is already opened (as it may be when
+// ** running in exclusive mode) or if the transaction does not require a
+// ** sub-journal. If the subjInMemory argument is zero, then any required
+// ** sub-journal is implemented in-memory if pPager is an in-memory database,
+// ** or using a temporary file otherwise.
+// */
func _sqlite3PagerBegin(tls *crt.TLS, _pPager *XPager, _exFlag int32, _subjInMemory int32) (r0 int32) {
var _rc int32
- _rc = i32(0)
- if (_pPager.X26) != 0 {
- return _pPager.X26
+ _rc = int32(0)
+ if _pPager.XerrCode != 0 {
+ return _pPager.XerrCode
}
func() {
- if int32(_pPager.X14) < i32(1) || int32(_pPager.X14) >= i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52679), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000))), unsafe.Pointer(str(52820)))
+ if int32(_pPager.XeState) < int32(1) || int32(_pPager.XeState) >= int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52679), unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000), unsafe.Pointer(str(52796)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pPager.X19))) = uint8(_subjInMemory)
+ _pPager.XsubjInMemory = uint8(_subjInMemory)
if func() int32 {
- if int32(_pPager.X14) == i32(1) {
- return i32(1)
+ if int32(_pPager.XeState) == int32(1) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52682), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52682), unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _6
}
func() {
- if (*XBitvec)(_pPager.X30) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52683), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000))), unsafe.Pointer(str(13488)))
+ if (*XBitvec)(_pPager.XpInJournal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52683), unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000), unsafe.Pointer(str(13443)))
crt.X__builtin_abort(tls)
}
}()
- if (*XWal)(_pPager.X60) == nil {
+ if (*XWal)(_pPager.XpWal) == nil {
goto _9
}
- if (_pPager.X1) == 0 || _sqlite3WalExclusiveMode(tls, (*XWal)(_pPager.X60), i32(-1)) == 0 {
+ if _pPager.XexclusiveMode == 0 || _sqlite3WalExclusiveMode(tls, (*XWal)(_pPager.XpWal), int32(-1)) == 0 {
goto _11
}
- _rc = _pagerLockDb(tls, _pPager, i32(4))
- if _rc != i32(0) {
+ _rc = _pagerLockDb(tls, _pPager, int32(4))
+ if _rc != int32(0) {
return _rc
}
- _sqlite3WalExclusiveMode(tls, (*XWal)(_pPager.X60), i32(1))
+ _sqlite3WalExclusiveMode(tls, (*XWal)(_pPager.XpWal), int32(1))
_11:
- _rc = _sqlite3WalBeginWriteTransaction(tls, (*XWal)(_pPager.X60))
+ _rc = _sqlite3WalBeginWriteTransaction(tls, (*XWal)(_pPager.XpWal))
goto _13
_9:
- _rc = _pagerLockDb(tls, _pPager, i32(2))
- if (_rc == i32(0)) && _exFlag != 0 {
- _rc = _pager_wait_on_lock(tls, _pPager, i32(4))
+ _rc = _pagerLockDb(tls, _pPager, int32(2))
+ if (_rc == int32(0)) && _exFlag != 0 {
+ _rc = _pager_wait_on_lock(tls, _pPager, int32(4))
}
_13:
- if _rc == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(2))
- *(*uint32)(unsafe.Pointer(&(_pPager.X25))) = _pPager.X22
- *(*uint32)(unsafe.Pointer(&(_pPager.X24))) = _pPager.X22
- *(*uint32)(unsafe.Pointer(&(_pPager.X23))) = _pPager.X22
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = int64(i32(0))
+ if _rc == int32(0) {
+ _pPager.XeState = uint8(2)
+ _pPager.XdbHintSize = _pPager.XdbSize
+ _pPager.XdbFileSize = _pPager.XdbSize
+ _pPager.XdbOrigSize = _pPager.XdbSize
+ _pPager.XjournalOff = 0
}
func() {
- if _rc != i32(0) && int32(_pPager.X14) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52732), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000))), unsafe.Pointer(str(52879)))
+ if _rc != int32(0) && int32(_pPager.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52732), unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000), unsafe.Pointer(str(52855)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc == i32(0) && int32(_pPager.X14) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52733), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000))), unsafe.Pointer(str(52925)))
+ if _rc == int32(0) && int32(_pPager.XeState) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52733), unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000), unsafe.Pointer(str(52901)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(52734), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(52734), unsafe.Pointer(&_sqlite3PagerBeginØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
@@ -39003,46 +39782,49 @@ _6:
var _sqlite3PagerBeginØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerBeginØ00__func__Ø000[0], str(52978), 18)
+ crt.Xstrncpy(nil, &_sqlite3PagerBeginØ00__func__Ø000[0], str(52954), 18)
}
-// This function starts a write transaction on the WAL.
-//
-// A read transaction must have already been started by a prior call
-// to sqlite3WalBeginReadTransaction().
-//
-// If another thread or process has written into the database since
-// the read transaction was started, then it is not possible for this
-// thread to write as doing so would cause a fork. So this routine
-// returns SQLITE_BUSY in that case and no write transaction is started.
-//
-// There can only be a single writer active at a time.
+// C comment
+// /*
+// ** This function starts a write transaction on the WAL.
+// **
+// ** A read transaction must have already been started by a prior call
+// ** to sqlite3WalBeginReadTransaction().
+// **
+// ** If another thread or process has written into the database since
+// ** the read transaction was started, then it is not possible for this
+// ** thread to write as doing so would cause a fork. So this routine
+// ** returns SQLITE_BUSY in that case and no write transaction is started.
+// **
+// ** There can only be a single writer active at a time.
+// */
func _sqlite3WalBeginWriteTransaction(tls *crt.TLS, _pWal *XWal) (r0 int32) {
var _rc int32
func() {
- if int32(_pWal.X9) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57204), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalBeginWriteTransactionØ00__func__Ø000))), unsafe.Pointer(str(19227)))
+ if int32(_pWal.XreadLock) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57204), unsafe.Pointer(&_sqlite3WalBeginWriteTransactionØ00__func__Ø000), unsafe.Pointer(str(19182)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pWal.X12) != i32(0) || (_pWal.X20) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57205), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalBeginWriteTransactionØ00__func__Ø000))), unsafe.Pointer(str(52996)))
+ if int32(_pWal.XwriteLock) != int32(0) || _pWal.XiReCksum != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57205), unsafe.Pointer(&_sqlite3WalBeginWriteTransactionØ00__func__Ø000), unsafe.Pointer(str(52972)))
crt.X__builtin_abort(tls)
}
}()
- if (_pWal.X14) != 0 {
- return i32(8)
+ if _pWal.XreadOnly != 0 {
+ return int32(8)
}
- _rc = _walLockExclusive(tls, _pWal, i32(0), i32(1))
+ _rc = _walLockExclusive(tls, _pWal, int32(0), int32(1))
if _rc != 0 {
return _rc
}
- *(*uint8)(unsafe.Pointer(&(_pWal.X12))) = uint8(i32(1))
- if crt.Xmemcmp(tls, (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), (unsafe.Pointer)(_walIndexHdr(tls, _pWal)), u32(48)) != i32(0) {
- _walUnlockExclusive(tls, _pWal, i32(0), i32(1))
- *(*uint8)(unsafe.Pointer(&(_pWal.X12))) = uint8(i32(0))
- _rc = i32(517)
+ _pWal.XwriteLock = uint8(1)
+ if crt.Xmemcmp(tls, unsafe.Pointer(&_pWal.Xhdr), unsafe.Pointer(_walIndexHdr(tls, _pWal)), uint32(48)) != int32(0) {
+ _walUnlockExclusive(tls, _pWal, int32(0), int32(1))
+ _pWal.XwriteLock = 0
+ _rc = int32(517)
}
return _rc
}
@@ -39050,361 +39832,357 @@ func _sqlite3WalBeginWriteTransaction(tls *crt.TLS, _pWal *XWal) (r0 int32) {
var _sqlite3WalBeginWriteTransactionØ00__func__Ø000 [32]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalBeginWriteTransactionØ00__func__Ø000[0], str(53036), 32)
-}
-
-// This function returns true if main-memory should be used instead of
-// a temporary file for transient pager files and statement journals.
-// The value returned depends on the value of db->temp_store (runtime
-// parameter) and the compile time value of SQLITE_TEMP_STORE. The
-// following table describes the relationship between these two values
-// and this functions return value.
-//
-// SQLITE_TEMP_STORE db->temp_store Location of temporary database
-// ----------------- -------------- ------------------------------
-// 0 any file (return 0)
-// 1 1 file (return 0)
-// 1 2 memory (return 1)
-// 1 0 file (return 0)
-// 2 1 file (return 0)
-// 2 2 memory (return 1)
-// 2 0 memory (return 1)
-// 3 any memory (return 1)
+ crt.Xstrncpy(nil, &_sqlite3WalBeginWriteTransactionØ00__func__Ø000[0], str(53012), 32)
+}
+
+// C comment
+// /*
+// ** This function returns true if main-memory should be used instead of
+// ** a temporary file for transient pager files and statement journals.
+// ** The value returned depends on the value of db->temp_store (runtime
+// ** parameter) and the compile time value of SQLITE_TEMP_STORE. The
+// ** following table describes the relationship between these two values
+// ** and this functions return value.
+// **
+// ** SQLITE_TEMP_STORE db->temp_store Location of temporary database
+// ** ----------------- -------------- ------------------------------
+// ** 0 any file (return 0)
+// ** 1 1 file (return 0)
+// ** 1 2 memory (return 1)
+// ** 1 0 file (return 0)
+// ** 2 1 file (return 0)
+// ** 2 2 memory (return 1)
+// ** 2 0 memory (return 1)
+// ** 3 any memory (return 1)
+// */
func _sqlite3TempInMemory(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
- return bool2int(int32(_db.X16) == i32(2))
+ return bool2int(int32(_db.Xtemp_store) == int32(2))
}
-// If pBt points to an empty file then convert that empty file
-// into a new empty database by initializing the first page of
-// the database.
+// C comment
+// /*
+// ** If pBt points to an empty file then convert that empty file
+// ** into a new empty database by initializing the first page of
+// ** the database.
+// */
func _newDatabase(tls *crt.TLS, _pBt *XBtShared) (r0 int32) {
var _rc int32
var _data *uint8
var _pP1 *XMemPage
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62159), unsafe.Pointer((*int8)(unsafe.Pointer(&_newDatabaseØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62159), unsafe.Pointer(&_newDatabaseØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
- if (_pBt.X18) > uint32(i32(0)) {
- return i32(0)
+ if _pBt.XnPage > (0) {
+ return int32(0)
}
- _pP1 = (*XMemPage)(_pBt.X3)
+ _pP1 = (*XMemPage)(_pBt.XpPage1)
func() {
if _pP1 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62164), unsafe.Pointer((*int8)(unsafe.Pointer(&_newDatabaseØ00__func__Ø000))), unsafe.Pointer(str(53068)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62164), unsafe.Pointer(&_newDatabaseØ00__func__Ø000), unsafe.Pointer(str(53044)))
crt.X__builtin_abort(tls)
}
}()
- _data = _pP1.X19
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pP1.X23))
+ _data = _pP1.XaData
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pP1.XpDbPage))
if _rc != 0 {
return _rc
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_data), (unsafe.Pointer)(&_zMagicHeader), u32(16))
- i32(0)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(i32(16)))) = uint8(((_pBt.X15) >> uint(i32(8))) & uint32(i32(255)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(i32(17)))) = uint8(((_pBt.X15) >> uint(i32(16))) & uint32(i32(255)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(i32(18)))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(i32(19)))) = uint8(i32(1))
+ crt.Xmemcpy(tls, unsafe.Pointer(_data), unsafe.Pointer(&_zMagicHeader), uint32(16))
+
+ *elem15(_data, uintptr(16)) = uint8((_pBt.XpageSize >> 8) & uint32(255))
+ *elem15(_data, uintptr(17)) = uint8((_pBt.XpageSize >> 16) & uint32(255))
+ *elem15(_data, uintptr(18)) = uint8(1)
+ *elem15(_data, uintptr(19)) = uint8(1)
func() {
- if (_pBt.X16) > (_pBt.X15) || ((_pBt.X16)+uint32(i32(255))) < (_pBt.X15) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62174), unsafe.Pointer((*int8)(unsafe.Pointer(&_newDatabaseØ00__func__Ø000))), unsafe.Pointer(str(53075)))
+ if _pBt.XusableSize > _pBt.XpageSize || (_pBt.XusableSize+uint32(255)) < _pBt.XpageSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62174), unsafe.Pointer(&_newDatabaseØ00__func__Ø000), unsafe.Pointer(str(53051)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(i32(20)))) = uint8((_pBt.X15) - (_pBt.X16))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(i32(21)))) = uint8(i32(64))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(i32(22)))) = uint8(i32(32))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(i32(23)))) = uint8(i32(32))
- crt.Xmemset(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(i32(24))))), i32(0), uint32(i32(76)))
- _zeroPage(tls, _pP1, i32(13))
+ *elem15(_data, uintptr(20)) = uint8(_pBt.XpageSize - _pBt.XusableSize)
+ *elem15(_data, uintptr(21)) = uint8(64)
+ *elem15(_data, uintptr(22)) = uint8(32)
+ *elem15(_data, uintptr(23)) = uint8(32)
+ crt.Xmemset(tls, unsafe.Pointer(elem15(_data, uintptr(24))), int32(0), uint32(76))
+ _zeroPage(tls, _pP1, int32(13))
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) | i32(2))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) | int32(2))
}
func() {
- if int32(_pBt.X5) != i32(1) && int32(_pBt.X5) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62183), unsafe.Pointer((*int8)(unsafe.Pointer(&_newDatabaseØ00__func__Ø000))), unsafe.Pointer(str(53144)))
+ if int32(_pBt.XautoVacuum) != int32(1) && int32(_pBt.XautoVacuum) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62183), unsafe.Pointer(&_newDatabaseØ00__func__Ø000), unsafe.Pointer(str(53120)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pBt.X6) != i32(1) && int32(_pBt.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62184), unsafe.Pointer((*int8)(unsafe.Pointer(&_newDatabaseØ00__func__Ø000))), unsafe.Pointer(str(53185)))
+ if int32(_pBt.XincrVacuum) != int32(1) && int32(_pBt.XincrVacuum) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62184), unsafe.Pointer(&_newDatabaseØ00__func__Ø000), unsafe.Pointer(str(53161)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(i32(52)))), uint32(_pBt.X5))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(i32(64)))), uint32(_pBt.X6))
- *(*uint32)(unsafe.Pointer(&(_pBt.X18))) = uint32(i32(1))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(i32(31)))) = uint8(i32(1))
- return i32(0)
+ _sqlite3Put4byte(tls, elem15(_data, uintptr(52)), uint32(_pBt.XautoVacuum))
+ _sqlite3Put4byte(tls, elem15(_data, uintptr(64)), uint32(_pBt.XincrVacuum))
+ _pBt.XnPage = uint32(1)
+ *elem15(_data, uintptr(31)) = uint8(1)
+ return int32(0)
}
var _newDatabaseØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_newDatabaseØ00__func__Ø000[0], str(53226), 12)
+ crt.Xstrncpy(nil, &_newDatabaseØ00__func__Ø000[0], str(53202), 12)
}
-// Set up a raw page so that it looks like a database page holding
-// no entries.
+// C comment
+// /*
+// ** Set up a raw page so that it looks like a database page holding
+// ** no entries.
+// */
func _zeroPage(tls *crt.TLS, _pPage *XMemPage, _flags int32) {
var _first uint16
var _hdr uint8
var _data *uint8
var _pBt *XBtShared
- _data = _pPage.X19
- _pBt = (*XBtShared)(_pPage.X18)
- _hdr = _pPage.X6
+ _data = _pPage.XaData
+ _pBt = (*XBtShared)(_pPage.XpBt)
+ _hdr = _pPage.XhdrOffset
func() {
- if _sqlite3PagerPagenumber(tls, (*XPgHdr)(_pPage.X23)) != (_pPage.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60959), unsafe.Pointer((*int8)(unsafe.Pointer(&_zeroPageØ00__func__Ø000))), unsafe.Pointer(str(53238)))
+ if _sqlite3PagerPagenumber(tls, (*XPgHdr)(_pPage.XpDbPage)) != _pPage.Xpgno {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60959), unsafe.Pointer(&_zeroPageØ00__func__Ø000), unsafe.Pointer(str(53214)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerGetExtra(tls, (*XPgHdr)(_pPage.X23)) != (unsafe.Pointer)(_pPage) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60960), unsafe.Pointer((*int8)(unsafe.Pointer(&_zeroPageØ00__func__Ø000))), unsafe.Pointer(str(20336)))
+ if _sqlite3PagerGetExtra(tls, (*XPgHdr)(_pPage.XpDbPage)) != unsafe.Pointer(_pPage) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60960), unsafe.Pointer(&_zeroPageØ00__func__Ø000), unsafe.Pointer(str(20291)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerGetData(tls, (*XPgHdr)(_pPage.X23)) != (unsafe.Pointer)(_data) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60961), unsafe.Pointer((*int8)(unsafe.Pointer(&_zeroPageØ00__func__Ø000))), unsafe.Pointer(str(53290)))
+ if _sqlite3PagerGetData(tls, (*XPgHdr)(_pPage.XpDbPage)) != unsafe.Pointer(_data) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60961), unsafe.Pointer(&_zeroPageØ00__func__Ø000), unsafe.Pointer(str(53266)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60962), unsafe.Pointer((*int8)(unsafe.Pointer(&_zeroPageØ00__func__Ø000))), unsafe.Pointer(str(53334)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60962), unsafe.Pointer(&_zeroPageØ00__func__Ø000), unsafe.Pointer(str(53310)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60963), unsafe.Pointer((*int8)(unsafe.Pointer(&_zeroPageØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60963), unsafe.Pointer(&_zeroPageØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pBt.X10) & i32(4)) != 0 {
- crt.Xmemset(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr)))), i32(0), (_pBt.X16)-uint32(_hdr))
+ if (int32(_pBt.XbtsFlags) & int32(4)) != 0 {
+ crt.Xmemset(tls, unsafe.Pointer(elem15(_data, uintptr(_hdr))), int32(0), _pBt.XusableSize-uint32(_hdr))
}
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr))) = uint8(int8(_flags))
+ *elem15(_data, uintptr(_hdr)) = uint8(int8(_flags))
_first = uint16(int32(_hdr) + func() int32 {
- if (_flags & i32(8)) == i32(0) {
- return i32(12)
+ if (_flags & int32(8)) == int32(0) {
+ return int32(12)
}
- return i32(8)
+ return int32(8)
}())
- crt.Xmemset(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_hdr)+i32(1))))), i32(0), uint32(i32(4)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(int32(_hdr)+i32(7)))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_hdr)+i32(5)))))) + 1*uintptr(i32(0)))) = uint8((_pBt.X16) >> uint(i32(8)))
+ crt.Xmemset(tls, unsafe.Pointer(elem15(_data, uintptr(int32(_hdr)+int32(1)))), int32(0), uint32(4))
+ *elem15(_data, uintptr(int32(_hdr)+int32(7))) = 0
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_data, uintptr(int32(_hdr)+int32(5))), 0) = uint8(_pBt.XusableSize >> 8)
return _data
- }()))+1*uintptr(int32(_hdr)+i32(5)))))) + 1*uintptr(i32(1)))) = uint8(_pBt.X16)
- *(*uint16)(unsafe.Pointer(&(_pPage.X13))) = uint16((_pBt.X16) - uint32(_first))
+ }(), uintptr(int32(_hdr)+int32(5))), uintptr(1)) = uint8(_pBt.XusableSize)
+ _pPage.XnFree = uint16(_pBt.XusableSize - uint32(_first))
_decodeFlags(tls, _pPage, _flags)
- *(*uint16)(unsafe.Pointer(&(_pPage.X12))) = _first
- *(**uint8)(unsafe.Pointer(&(_pPage.X20))) = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_pBt.X16)))
- *(**uint8)(unsafe.Pointer(&(_pPage.X21))) = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_first)))
- *(**uint8)(unsafe.Pointer(&(_pPage.X22))) = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_pPage.X7)))
- *(*uint8)(unsafe.Pointer(&(_pPage.X9))) = uint8(i32(0))
+ _pPage.XcellOffset = _first
+ _pPage.XaDataEnd = elem15(_data, uintptr(_pBt.XusableSize))
+ _pPage.XaCellIdx = elem15(_data, uintptr(_first))
+ _pPage.XaDataOfst = elem15(_data, uintptr(_pPage.XchildPtrSize))
+ _pPage.XnOverflow = 0
func() {
- if (_pBt.X15) < uint32(i32(512)) || (_pBt.X15) > uint32(i32(65536)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60979), unsafe.Pointer((*int8)(unsafe.Pointer(&_zeroPageØ00__func__Ø000))), unsafe.Pointer(str(53374)))
+ if _pBt.XpageSize < uint32(512) || _pBt.XpageSize > uint32(65536) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60979), unsafe.Pointer(&_zeroPageØ00__func__Ø000), unsafe.Pointer(str(53350)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pPage.X15))) = uint16((_pBt.X15) - uint32(i32(1)))
- *(*uint16)(unsafe.Pointer(&(_pPage.X14))) = uint16(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pPage.X0))) = uint8(i32(1))
+ _pPage.XmaskPage = uint16(_pBt.XpageSize - uint32(1))
+ _pPage.XnCell = 0
+ _pPage.XisInit = uint8(1)
}
-// Return the page number for page pPg.
+// C comment
+// /*
+// ** Return the page number for page pPg.
+// */
func _sqlite3PagerPagenumber(tls *crt.TLS, _pPg *XPgHdr) (r0 uint32) {
- return _pPg.X5
+ return _pPg.Xpgno
}
var _zeroPageØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_zeroPageØ00__func__Ø000[0], str(53417), 9)
+ crt.Xstrncpy(nil, &_zeroPageØ00__func__Ø000[0], str(53393), 9)
}
func _sqlite3PagerIswriteable(tls *crt.TLS, _pPg *XPgHdr) (r0 int32) {
- return int32(_pPg.X6) & i32(4)
-}
-
-// Decode the flags byte (the first byte of the header) for a page
-// and initialize fields of the MemPage structure accordingly.
-//
-// Only the following combinations are supported. Anything different
-// indicates a corrupt database files:
-//
-// PTF_ZERODATA
-// PTF_ZERODATA | PTF_LEAF
-// PTF_LEAFDATA | PTF_INTKEY
-// PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF
+ return int32(_pPg.Xflags) & int32(4)
+}
+
+// C comment
+// /*
+// ** Decode the flags byte (the first byte of the header) for a page
+// ** and initialize fields of the MemPage structure accordingly.
+// **
+// ** Only the following combinations are supported. Anything different
+// ** indicates a corrupt database files:
+// **
+// ** PTF_ZERODATA
+// ** PTF_ZERODATA | PTF_LEAF
+// ** PTF_LEAFDATA | PTF_INTKEY
+// ** PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF
+// */
func _decodeFlags(tls *crt.TLS, _pPage *XMemPage, _flagByte int32) (r0 int32) {
var _pBt *XBtShared
func() {
- if int32(_pPage.X6) != func() int32 {
- if (_pPage.X4) == uint32(i32(1)) {
- return i32(100)
+ if int32(_pPage.XhdrOffset) != func() int32 {
+ if _pPage.Xpgno == uint32(1) {
+ return int32(100)
}
- return i32(0)
+ return int32(0)
}() {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60762), unsafe.Pointer((*int8)(unsafe.Pointer(&_decodeFlagsØ00__func__Ø000))), unsafe.Pointer(str(53426)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60762), unsafe.Pointer(&_decodeFlagsØ00__func__Ø000), unsafe.Pointer(str(53402)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60763), unsafe.Pointer((*int8)(unsafe.Pointer(&_decodeFlagsØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60763), unsafe.Pointer(&_decodeFlagsØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pPage.X5))) = uint8(_flagByte >> uint(i32(3)))
- i32(0)
- {
- p := &_flagByte
- *p = (*p) & i32(-9)
- sink1(*p)
- }
- *(*uint8)(unsafe.Pointer(&(_pPage.X7))) = uint8(i32(4) - (i32(4) * int32(_pPage.X5)))
- *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *uint8) uint16)(unsafe.Pointer(&(_pPage.X24))))) = _cellSizePtr
- _pBt = (*XBtShared)(_pPage.X18)
- if _flagByte != i32(5) {
+ _pPage.Xleaf = uint8(_flagByte >> 3)
+
+ _flagByte &= int32(-9)
+ _pPage.XchildPtrSize = uint8(int32(4) - (int32(4) * int32(_pPage.Xleaf)))
+ *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&_pPage.XxCellSize)) = _cellSizePtr
+ _pBt = (*XBtShared)(_pPage.XpBt)
+ if _flagByte != int32(5) {
goto _6
}
- i32(0)
- i32(0)
- *(*uint8)(unsafe.Pointer(&(_pPage.X2))) = uint8(i32(1))
- if (_pPage.X5) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pPage.X3))) = uint8(i32(1))
- *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer))(unsafe.Pointer(&(_pPage.X25))))) = _btreeParseCellPtr
+
+ _pPage.XintKey = uint8(1)
+ if _pPage.Xleaf != 0 {
+ _pPage.XintKeyLeaf = uint8(1)
+ *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&_pPage.XxParseCell)) = _btreeParseCellPtr
goto _8
}
- *(*uint8)(unsafe.Pointer(&(_pPage.X3))) = uint8(i32(0))
- *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *uint8) uint16)(unsafe.Pointer(&(_pPage.X24))))) = _cellSizePtrNoPayload
- *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer))(unsafe.Pointer(&(_pPage.X25))))) = _btreeParseCellPtrNoPayload
+ _pPage.XintKeyLeaf = 0
+ *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&_pPage.XxCellSize)) = _cellSizePtrNoPayload
+ *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&_pPage.XxParseCell)) = _btreeParseCellPtrNoPayload
_8:
- *(*uint16)(unsafe.Pointer(&(_pPage.X10))) = _pBt.X13
- *(*uint16)(unsafe.Pointer(&(_pPage.X11))) = _pBt.X14
+ _pPage.XmaxLocal = _pBt.XmaxLeaf
+ _pPage.XminLocal = _pBt.XminLeaf
goto _11
_6:
- if _flagByte == i32(2) {
- i32(0)
- i32(0)
- *(*uint8)(unsafe.Pointer(&(_pPage.X2))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pPage.X3))) = uint8(i32(0))
- *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer))(unsafe.Pointer(&(_pPage.X25))))) = _btreeParseCellPtrIndex
- *(*uint16)(unsafe.Pointer(&(_pPage.X10))) = _pBt.X11
- *(*uint16)(unsafe.Pointer(&(_pPage.X11))) = _pBt.X12
+ if _flagByte == int32(2) {
+ _pPage.XintKey = 0
+ _pPage.XintKeyLeaf = 0
+ *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&_pPage.XxParseCell)) = _btreeParseCellPtrIndex
+ _pPage.XmaxLocal = _pBt.XmaxLocal
+ _pPage.XminLocal = _pBt.XminLocal
goto _11
}
- return _sqlite3CorruptError(tls, i32(60802))
+ return _sqlite3CorruptError(tls, int32(60802))
_11:
- *(*uint8)(unsafe.Pointer(&(_pPage.X8))) = _pBt.X9
- return i32(0)
+ _pPage.Xmax1bytePayload = _pBt.Xmax1bytePayload
+ return int32(0)
}
var _decodeFlagsØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_decodeFlagsØ00__func__Ø000[0], str(53471), 12)
+ crt.Xstrncpy(nil, &_decodeFlagsØ00__func__Ø000[0], str(53447), 12)
}
-// The following routines are implementations of the MemPage.xCellSize
-// method.
-//
-// Compute the total number of bytes that a Cell needs in the cell
-// data area of the btree-page. The return number includes the cell
-// data header and the local payload, but not any overflow page or
-// the space used by the cell pointer.
-//
-// cellSizePtrNoPayload() => table internal nodes
-// cellSizePtr() => all index nodes & table leaf nodes
+// C comment
+// /*
+// ** The following routines are implementations of the MemPage.xCellSize
+// ** method.
+// **
+// ** Compute the total number of bytes that a Cell needs in the cell
+// ** data area of the btree-page. The return number includes the cell
+// ** data header and the local payload, but not any overflow page or
+// ** the space used by the cell pointer.
+// **
+// ** cellSizePtrNoPayload() => table internal nodes
+// ** cellSizePtr() => all index nodes & table leaf nodes
+// */
func _cellSizePtr(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8) (r0 uint16) {
var _5_minLocal int32
var _nSize uint32
var _pIter, _pEnd *uint8
var _debuginfo XCellInfo
- _pIter = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_pPage.X7)))))))
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_pPage.X25)})))(tls, _pPage, _pCell, &_debuginfo)
+ _pIter = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell)) + uintptr(_pPage.XchildPtrSize)))
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _pPage.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _pPage, _pCell, &_debuginfo)
_nSize = uint32(*_pIter)
- if _nSize < uint32(i32(128)) {
+ if _nSize < uint32(128) {
goto _0
}
- _pEnd = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIter)) + 1*uintptr(i32(8))))
- {
- p := &_nSize
- *p = (*p) & uint32(i32(127))
- sink5(*p)
- }
+ _pEnd = elem15(_pIter, uintptr(8))
+ _nSize &= uint32(127)
_1:
- _nSize = (_nSize << uint(i32(7))) | uint32(int32(*preInc13(&_pIter, 1))&i32(127))
- if (int32(*_pIter) >= i32(128)) && (uintptr(unsafe.Pointer(_pIter)) < uintptr(unsafe.Pointer(_pEnd))) {
+ _nSize = (_nSize << 7) | uint32(int32(*preInc15(&_pIter, 1))&int32(127))
+ if (int32(*_pIter) >= int32(128)) && (crt.P2U(unsafe.Pointer(_pIter)) < crt.P2U(unsafe.Pointer(_pEnd))) {
goto _1
}
_0:
*(*uintptr)(unsafe.Pointer(&_pIter)) += uintptr(1)
- if (_pPage.X2) == 0 {
+ if _pPage.XintKey == 0 {
goto _3
}
- _pEnd = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIter)) + 1*uintptr(i32(9))))
+ _pEnd = elem15(_pIter, uintptr(9))
_4:
- if (int32(*postInc13(&_pIter, 1))&i32(128)) != 0 && (uintptr(unsafe.Pointer(_pIter)) < uintptr(unsafe.Pointer(_pEnd))) {
+ if (int32(*postInc15(&_pIter, 1))&int32(128)) != 0 && (crt.P2U(unsafe.Pointer(_pIter)) < crt.P2U(unsafe.Pointer(_pEnd))) {
goto _4
}
_3:
- if _nSize > uint32(_pPage.X10) {
+ if _nSize > uint32(_pPage.XmaxLocal) {
goto _7
}
- {
- p := &_nSize
- *p = (*p) + uint32(int32((uintptr(unsafe.Pointer(_pIter))-uintptr(unsafe.Pointer(_pCell)))/1))
- sink5(*p)
- }
- if _nSize < uint32(i32(4)) {
- _nSize = uint32(i32(4))
+ _nSize += uint32(int32(uintptr(unsafe.Pointer(_pIter)) - uintptr(unsafe.Pointer(_pCell))))
+ if _nSize < uint32(4) {
+ _nSize = uint32(4)
}
goto _9
_7:
- _5_minLocal = int32(_pPage.X11)
- _nSize = uint32(_5_minLocal) + ((_nSize - uint32(_5_minLocal)) % (((*XBtShared)(_pPage.X18).X16) - uint32(i32(4))))
- if _nSize > uint32(_pPage.X10) {
+ _5_minLocal = int32(_pPage.XminLocal)
+ _nSize = uint32(_5_minLocal) + ((_nSize - uint32(_5_minLocal)) % (((*XBtShared)(_pPage.XpBt).XusableSize) - uint32(4)))
+ if _nSize > uint32(_pPage.XmaxLocal) {
_nSize = uint32(_5_minLocal)
}
- {
- p := &_nSize
- *p = (*p) + uint32(i32(4)+int32(uint16(int32((uintptr(unsafe.Pointer(_pIter))-uintptr(unsafe.Pointer(_pCell)))/1))))
- sink5(*p)
- }
+ _nSize += uint32(int32(4) + int32(uint16(int32(uintptr(unsafe.Pointer(_pIter))-uintptr(unsafe.Pointer(_pCell))))))
_9:
func() {
- if _nSize != uint32(_debuginfo.X4) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60301), unsafe.Pointer((*int8)(unsafe.Pointer(&_cellSizePtrØ00__func__Ø000))), unsafe.Pointer(str(53483)))
+ if _nSize != uint32(_debuginfo.XnSize) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60301), unsafe.Pointer(&_cellSizePtrØ00__func__Ø000), unsafe.Pointer(str(53459)))
crt.X__builtin_abort(tls)
}
}()
return uint16(_nSize)
-
- _ = _debuginfo
- panic(0)
}
var _cellSizePtrØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_cellSizePtrØ00__func__Ø000[0], str(53520), 12)
+ crt.Xstrncpy(nil, &_cellSizePtrØ00__func__Ø000[0], str(53496), 12)
}
func _btreeParseCellPtr(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pInfo *XCellInfo) {
@@ -39412,81 +40190,73 @@ func _btreeParseCellPtr(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pInfo *X
var _iKey uint64
var _pIter, _1_pEnd, _3_pEnd *uint8
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60140), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60140), unsafe.Pointer(&_btreeParseCellPtrØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X5) != i32(0) && int32(_pPage.X5) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60141), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrØ00__func__Ø000))), unsafe.Pointer(str(53532)))
+ if int32(_pPage.Xleaf) != int32(0) && int32(_pPage.Xleaf) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60141), unsafe.Pointer(&_btreeParseCellPtrØ00__func__Ø000), unsafe.Pointer(str(53508)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPage.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60142), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrØ00__func__Ø000))), unsafe.Pointer(str(53565)))
+ if _pPage.XintKeyLeaf == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60142), unsafe.Pointer(&_btreeParseCellPtrØ00__func__Ø000), unsafe.Pointer(str(53541)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60143), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrØ00__func__Ø000))), unsafe.Pointer(str(53583)))
+ if int32(_pPage.XchildPtrSize) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60143), unsafe.Pointer(&_btreeParseCellPtrØ00__func__Ø000), unsafe.Pointer(str(53559)))
crt.X__builtin_abort(tls)
}
}()
_pIter = _pCell
_nPayload = uint32(*_pIter)
- if _nPayload < uint32(i32(128)) {
+ if _nPayload < uint32(128) {
goto _9
}
- _1_pEnd = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIter)) + 1*uintptr(i32(8))))
- {
- p := &_nPayload
- *p = (*p) & uint32(i32(127))
- sink5(*p)
- }
+ _1_pEnd = elem15(_pIter, uintptr(8))
+ _nPayload &= uint32(127)
_10:
- _nPayload = (_nPayload << uint(i32(7))) | uint32(int32(*preInc13(&_pIter, 1))&i32(127))
- if (int32(*_pIter) >= i32(128)) && (uintptr(unsafe.Pointer(_pIter)) < uintptr(unsafe.Pointer(_1_pEnd))) {
+ _nPayload = (_nPayload << 7) | uint32(int32(*preInc15(&_pIter, 1))&int32(127))
+ if (int32(*_pIter) >= int32(128)) && (crt.P2U(unsafe.Pointer(_pIter)) < crt.P2U(unsafe.Pointer(_1_pEnd))) {
goto _10
}
_9:
*(*uintptr)(unsafe.Pointer(&_pIter)) += uintptr(1)
_iKey = uint64(*_pIter)
- if _iKey < uint64(i32(128)) {
+ if _iKey < uint64(128) {
goto _12
}
- _3_pEnd = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIter)) + 1*uintptr(i32(7))))
- {
- p := &_iKey
- *p = (*p) & uint64(i32(127))
- sink17(*p)
- }
+ _3_pEnd = elem15(_pIter, uintptr(7))
+ _iKey &= uint64(127)
_13:
- _iKey = (_iKey << uint(i32(7))) | uint64(int32(*preInc13(&_pIter, 1))&i32(127))
- if int32(*_pIter) < i32(128) {
+ _iKey = (_iKey << 7) | uint64(int32(*preInc15(&_pIter, 1))&int32(127))
+ if int32(*_pIter) < int32(128) {
goto _14
}
- if uintptr(unsafe.Pointer(_pIter)) >= uintptr(unsafe.Pointer(_3_pEnd)) {
- _iKey = (_iKey << uint(i32(8))) | uint64(*preInc13(&_pIter, 1))
+ if crt.P2U(unsafe.Pointer(_pIter)) >= crt.P2U(unsafe.Pointer(_3_pEnd)) {
+ _iKey = (_iKey << 8) | uint64(*preInc15(&_pIter, 1))
goto _14
}
goto _13
_14:
_12:
*(*uintptr)(unsafe.Pointer(&_pIter)) += uintptr(1)
- *(*int64)(unsafe.Pointer(&(_pInfo.X0))) = *(*int64)(unsafe.Pointer(&_iKey))
- *(*uint32)(unsafe.Pointer(&(_pInfo.X2))) = _nPayload
- *(**uint8)(unsafe.Pointer(&(_pInfo.X1))) = _pIter
- if _nPayload > uint32(_pPage.X10) {
+ _pInfo.XnKey = *(*int64)(unsafe.Pointer(&_iKey))
+ _pInfo.XnPayload = _nPayload
+ _pInfo.XpPayload = _pIter
+ if _nPayload > uint32(_pPage.XmaxLocal) {
goto _17
}
- *(*uint16)(unsafe.Pointer(&(_pInfo.X4))) = uint16(_nPayload + uint32(uint16(int32((uintptr(unsafe.Pointer(_pIter))-uintptr(unsafe.Pointer(_pCell)))/1))))
- if int32(_pInfo.X4) < i32(4) {
- *(*uint16)(unsafe.Pointer(&(_pInfo.X4))) = uint16(i32(4))
+ _pInfo.XnSize = uint16(_nPayload + uint32(uint16(int32(uintptr(unsafe.Pointer(_pIter))-uintptr(unsafe.Pointer(_pCell))))))
+ if int32(_pInfo.XnSize) < int32(4) {
+ _pInfo.XnSize = uint16(4)
}
- *(*uint16)(unsafe.Pointer(&(_pInfo.X3))) = uint16(_nPayload)
+ _pInfo.XnLocal = uint16(_nPayload)
goto _19
_17:
_btreeParseCellAdjustSizeForOverflow(tls, _pPage, _pCell, _pInfo)
@@ -39496,382 +40266,264 @@ _19:
var _btreeParseCellPtrØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_btreeParseCellPtrØ00__func__Ø000[0], str(53606), 18)
+ crt.Xstrncpy(nil, &_btreeParseCellPtrØ00__func__Ø000[0], str(53582), 18)
}
-// This is common tail processing for btreeParseCellPtr() and
-// btreeParseCellPtrIndex() for the case when the cell does not fit entirely
-// on a single B-tree page. Make necessary adjustments to the CellInfo
-// structure.
+// C comment
+// /*
+// ** This is common tail processing for btreeParseCellPtr() and
+// ** btreeParseCellPtrIndex() for the case when the cell does not fit entirely
+// ** on a single B-tree page. Make necessary adjustments to the CellInfo
+// ** structure.
+// */
func _btreeParseCellAdjustSizeForOverflow(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pInfo *XCellInfo) {
var _minLocal, _maxLocal, _surplus int32
- _minLocal = int32(_pPage.X11)
- _maxLocal = int32(_pPage.X10)
- _surplus = int32(uint32(_minLocal) + (((_pInfo.X2) - uint32(_minLocal)) % (((*XBtShared)(_pPage.X18).X16) - uint32(i32(4)))))
+ _minLocal = int32(_pPage.XminLocal)
+ _maxLocal = int32(_pPage.XmaxLocal)
+ _surplus = int32(uint32(_minLocal) + ((_pInfo.XnPayload - uint32(_minLocal)) % (((*XBtShared)(_pPage.XpBt).XusableSize) - uint32(4))))
if _surplus <= _maxLocal {
- *(*uint16)(unsafe.Pointer(&(_pInfo.X3))) = uint16(_surplus)
+ _pInfo.XnLocal = uint16(_surplus)
goto _1
}
- *(*uint16)(unsafe.Pointer(&(_pInfo.X3))) = uint16(_minLocal)
+ _pInfo.XnLocal = uint16(_minLocal)
_1:
- *(*uint16)(unsafe.Pointer(&(_pInfo.X4))) = uint16(int32(uint16(int32((uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pInfo.X1))+1*uintptr(_pInfo.X3)))))-uintptr(unsafe.Pointer(_pCell)))/1))) + i32(4))
+ _pInfo.XnSize = uint16(int32(uint16(int32(uintptr(unsafe.Pointer(elem15(_pInfo.XpPayload, uintptr(_pInfo.XnLocal))))-uintptr(unsafe.Pointer(_pCell))))) + int32(4))
}
func _cellSizePtrNoPayload(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8) (r0 uint16) {
var _pIter, _pEnd *uint8
var _debuginfo XCellInfo
- _pIter = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4))))))))
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_pPage.X25)})))(tls, _pPage, _pCell, &_debuginfo)
+ _pIter = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell)) + uintptr(int32(4))))
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _pPage.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _pPage, _pCell, &_debuginfo)
func() {
- if int32(_pPage.X7) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60319), unsafe.Pointer((*int8)(unsafe.Pointer(&_cellSizePtrNoPayloadØ00__func__Ø000))), unsafe.Pointer(str(53624)))
+ if int32(_pPage.XchildPtrSize) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60319), unsafe.Pointer(&_cellSizePtrNoPayloadØ00__func__Ø000), unsafe.Pointer(str(53600)))
crt.X__builtin_abort(tls)
}
}()
- _pEnd = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pIter)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(9))))))))
+ _pEnd = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pIter)) + uintptr(int32(9))))
_2:
- if (int32(*postInc13(&_pIter, 1))&i32(128)) != 0 && (uintptr(unsafe.Pointer(_pIter)) < uintptr(unsafe.Pointer(_pEnd))) {
+ if (int32(*postInc15(&_pIter, 1))&int32(128)) != 0 && (crt.P2U(unsafe.Pointer(_pIter)) < crt.P2U(unsafe.Pointer(_pEnd))) {
goto _2
}
func() {
- if int32(_debuginfo.X4) != int32(uint16(int32((uintptr(unsafe.Pointer(_pIter))-uintptr(unsafe.Pointer(_pCell)))/1))) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60322), unsafe.Pointer((*int8)(unsafe.Pointer(&_cellSizePtrNoPayloadØ00__func__Ø000))), unsafe.Pointer(str(53647)))
+ if int32(_debuginfo.XnSize) != int32(uint16(int32(uintptr(unsafe.Pointer(_pIter))-uintptr(unsafe.Pointer(_pCell))))) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60322), unsafe.Pointer(&_cellSizePtrNoPayloadØ00__func__Ø000), unsafe.Pointer(str(53623)))
crt.X__builtin_abort(tls)
}
}()
- return uint16(int32((uintptr(unsafe.Pointer(_pIter)) - uintptr(unsafe.Pointer(_pCell))) / 1))
-
- _ = _debuginfo
- panic(0)
+ return uint16(int32(uintptr(unsafe.Pointer(_pIter)) - uintptr(unsafe.Pointer(_pCell))))
}
var _cellSizePtrNoPayloadØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_cellSizePtrNoPayloadØ00__func__Ø000[0], str(53699), 21)
-}
-
-// The following routines are implementations of the MemPage.xParseCell()
-// method.
-//
-// Parse a cell content block and fill in the CellInfo structure.
-//
-// btreeParseCellPtr() => table btree leaf nodes
-// btreeParseCellNoPayload() => table btree internal nodes
-// btreeParseCellPtrIndex() => index btree nodes
-//
-// There is also a wrapper function btreeParseCell() that works for
-// all MemPage types and that references the cell by index rather than
-// by pointer.
+ crt.Xstrncpy(nil, &_cellSizePtrNoPayloadØ00__func__Ø000[0], str(53675), 21)
+}
+
+// C comment
+// /*
+// ** The following routines are implementations of the MemPage.xParseCell()
+// ** method.
+// **
+// ** Parse a cell content block and fill in the CellInfo structure.
+// **
+// ** btreeParseCellPtr() => table btree leaf nodes
+// ** btreeParseCellNoPayload() => table btree internal nodes
+// ** btreeParseCellPtrIndex() => index btree nodes
+// **
+// ** There is also a wrapper function btreeParseCell() that works for
+// ** all MemPage types and that references the cell by index rather than
+// ** by pointer.
+// */
func _btreeParseCellPtrNoPayload(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pInfo *XCellInfo) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60119), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrNoPayloadØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60119), unsafe.Pointer(&_btreeParseCellPtrNoPayloadØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X5) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60120), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrNoPayloadØ00__func__Ø000))), unsafe.Pointer(str(53720)))
+ if int32(_pPage.Xleaf) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60120), unsafe.Pointer(&_btreeParseCellPtrNoPayloadØ00__func__Ø000), unsafe.Pointer(str(53696)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X7) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60121), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrNoPayloadØ00__func__Ø000))), unsafe.Pointer(str(53624)))
+ if int32(_pPage.XchildPtrSize) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60121), unsafe.Pointer(&_btreeParseCellPtrNoPayloadØ00__func__Ø000), unsafe.Pointer(str(53600)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pInfo.X4))) = uint16(i32(4) + int32(_sqlite3GetVarint(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell))+1*uintptr(i32(4)))), (*uint64)(unsafe.Pointer((*int64)(unsafe.Pointer(&(_pInfo.X0))))))))
- *(*uint32)(unsafe.Pointer(&(_pInfo.X2))) = uint32(i32(0))
- *(*uint16)(unsafe.Pointer(&(_pInfo.X3))) = uint16(i32(0))
- *(**uint8)(unsafe.Pointer(&(_pInfo.X1))) = nil
+ _pInfo.XnSize = uint16(int32(4) + int32(_sqlite3GetVarint(tls, elem15(_pCell, uintptr(4)), (*uint64)(unsafe.Pointer(&_pInfo.XnKey)))))
+ _pInfo.XnPayload = 0
+ _pInfo.XnLocal = 0
+ _pInfo.XpPayload = nil
}
var _btreeParseCellPtrNoPayloadØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_btreeParseCellPtrNoPayloadØ00__func__Ø000[0], str(53735), 27)
+ crt.Xstrncpy(nil, &_btreeParseCellPtrNoPayloadØ00__func__Ø000[0], str(53711), 27)
}
-// Read a 64-bit variable-length integer from memory starting at p[0].
-// Return the number of bytes read. The value is stored in *v.
+// C comment
+// /*
+// ** Read a 64-bit variable-length integer from memory starting at p[0].
+// ** Return the number of bytes read. The value is stored in *v.
+// */
func _sqlite3GetVarint(tls *crt.TLS, _p *uint8, _v *uint64) (r0 uint8) {
var _a, _b, _s uint32
_a = uint32(*_p)
- if (_a & uint32(i32(128))) == 0 {
+ if (_a & uint32(128)) == 0 {
*_v = uint64(_a)
- return uint8(i32(1))
+ return uint8(1)
}
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
_b = uint32(*_p)
- if (_b & uint32(i32(128))) == 0 {
- {
- p := &_a
- *p = (*p) & uint32(i32(127))
- sink5(*p)
- }
- _a = _a << uint(i32(7))
- {
- p := &_a
- *p = (*p) | _b
- sink5(*p)
- }
+ if (_b & uint32(128)) == 0 {
+ _a &= uint32(127)
+ _a = _a << 7
+ _a |= _b
*_v = uint64(_a)
- return uint8(i32(2))
+ return uint8(2)
}
- i32(0)
- i32(0)
+
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
- _a = _a << uint(i32(14))
- {
- p := &_a
- *p = (*p) | uint32(*_p)
- sink5(*p)
- }
- if (_a & uint32(i32(128))) == 0 {
- {
- p := &_a
- *p = (*p) & uint32(i32(2080895))
- sink5(*p)
- }
- {
- p := &_b
- *p = (*p) & uint32(i32(127))
- sink5(*p)
- }
- _b = _b << uint(i32(7))
- {
- p := &_a
- *p = (*p) | _b
- sink5(*p)
- }
+ _a = _a << 14
+ _a |= uint32(*_p)
+ if (_a & uint32(128)) == 0 {
+ _a &= uint32(2080895)
+ _b &= uint32(127)
+ _b = _b << 7
+ _a |= _b
*_v = uint64(_a)
- return uint8(i32(3))
- }
- {
- p := &_a
- *p = (*p) & uint32(i32(2080895))
- sink5(*p)
+ return uint8(3)
}
+ _a &= uint32(2080895)
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
- _b = _b << uint(i32(14))
- {
- p := &_b
- *p = (*p) | uint32(*_p)
- sink5(*p)
- }
- if (_b & uint32(i32(128))) == 0 {
- {
- p := &_b
- *p = (*p) & uint32(i32(2080895))
- sink5(*p)
- }
- _a = _a << uint(i32(7))
- {
- p := &_a
- *p = (*p) | _b
- sink5(*p)
- }
+ _b = _b << 14
+ _b |= uint32(*_p)
+ if (_b & uint32(128)) == 0 {
+ _b &= uint32(2080895)
+ _a = _a << 7
+ _a |= _b
*_v = uint64(_a)
- return uint8(i32(4))
- }
- {
- p := &_b
- *p = (*p) & uint32(i32(2080895))
- sink5(*p)
+ return uint8(4)
}
+ _b &= uint32(2080895)
_s = _a
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
- _a = _a << uint(i32(14))
- {
- p := &_a
- *p = (*p) | uint32(*_p)
- sink5(*p)
- }
- if (_a & uint32(i32(128))) == 0 {
- _b = _b << uint(i32(7))
- {
- p := &_a
- *p = (*p) | _b
- sink5(*p)
- }
- _s = _s >> uint(i32(18))
- *_v = (uint64(_s) << uint(i32(32))) | uint64(_a)
- return uint8(i32(5))
- }
- _s = _s << uint(i32(7))
- {
- p := &_s
- *p = (*p) | _b
- sink5(*p)
- }
+ _a = _a << 14
+ _a |= uint32(*_p)
+ if (_a & uint32(128)) == 0 {
+ _b = _b << 7
+ _a |= _b
+ _s = _s >> 18
+ *_v = (uint64(_s) << 32) | uint64(_a)
+ return uint8(5)
+ }
+ _s = _s << 7
+ _s |= _b
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
- _b = _b << uint(i32(14))
- {
- p := &_b
- *p = (*p) | uint32(*_p)
- sink5(*p)
- }
- if (_b & uint32(i32(128))) == 0 {
- {
- p := &_a
- *p = (*p) & uint32(i32(2080895))
- sink5(*p)
- }
- _a = _a << uint(i32(7))
- {
- p := &_a
- *p = (*p) | _b
- sink5(*p)
- }
- _s = _s >> uint(i32(18))
- *_v = (uint64(_s) << uint(i32(32))) | uint64(_a)
- return uint8(i32(6))
+ _b = _b << 14
+ _b |= uint32(*_p)
+ if (_b & uint32(128)) == 0 {
+ _a &= uint32(2080895)
+ _a = _a << 7
+ _a |= _b
+ _s = _s >> 18
+ *_v = (uint64(_s) << 32) | uint64(_a)
+ return uint8(6)
}
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
- _a = _a << uint(i32(14))
- {
- p := &_a
- *p = (*p) | uint32(*_p)
- sink5(*p)
- }
- if (_a & uint32(i32(128))) == 0 {
- {
- p := &_a
- *p = (*p) & u32(4028612735)
- sink5(*p)
- }
- {
- p := &_b
- *p = (*p) & uint32(i32(2080895))
- sink5(*p)
- }
- _b = _b << uint(i32(7))
- {
- p := &_a
- *p = (*p) | _b
- sink5(*p)
- }
- _s = _s >> uint(i32(11))
- *_v = (uint64(_s) << uint(i32(32))) | uint64(_a)
- return uint8(i32(7))
- }
- {
- p := &_a
- *p = (*p) & uint32(i32(2080895))
- sink5(*p)
- }
+ _a = _a << 14
+ _a |= uint32(*_p)
+ if (_a & uint32(128)) == 0 {
+ _a &= uint32(4028612735)
+ _b &= uint32(2080895)
+ _b = _b << 7
+ _a |= _b
+ _s = _s >> 11
+ *_v = (uint64(_s) << 32) | uint64(_a)
+ return uint8(7)
+ }
+ _a &= uint32(2080895)
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
- _b = _b << uint(i32(14))
- {
- p := &_b
- *p = (*p) | uint32(*_p)
- sink5(*p)
- }
- if (_b & uint32(i32(128))) == 0 {
- {
- p := &_b
- *p = (*p) & u32(4028612735)
- sink5(*p)
- }
- _a = _a << uint(i32(7))
- {
- p := &_a
- *p = (*p) | _b
- sink5(*p)
- }
- _s = _s >> uint(i32(4))
- *_v = (uint64(_s) << uint(i32(32))) | uint64(_a)
- return uint8(i32(8))
+ _b = _b << 14
+ _b |= uint32(*_p)
+ if (_b & uint32(128)) == 0 {
+ _b &= uint32(4028612735)
+ _a = _a << 7
+ _a |= _b
+ _s = _s >> 4
+ *_v = (uint64(_s) << 32) | uint64(_a)
+ return uint8(8)
}
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
- _a = _a << uint(i32(15))
- {
- p := &_a
- *p = (*p) | uint32(*_p)
- sink5(*p)
- }
- {
- p := &_b
- *p = (*p) & uint32(i32(2080895))
- sink5(*p)
- }
- _b = _b << uint(i32(8))
- {
- p := &_a
- *p = (*p) | _b
- sink5(*p)
- }
- _s = _s << uint(i32(4))
- _b = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(-4)))))
- {
- p := &_b
- *p = (*p) & uint32(i32(127))
- sink5(*p)
- }
- _b = _b >> uint(i32(3))
- {
- p := &_s
- *p = (*p) | _b
- sink5(*p)
- }
- *_v = (uint64(_s) << uint(i32(32))) | uint64(_a)
- return uint8(i32(9))
+ _a = _a << 15
+ _a |= uint32(*_p)
+ _b &= uint32(2080895)
+ _b = _b << 8
+ _a |= _b
+ _s = _s << 4
+ _b = uint32(*elem15(_p, uintptr(4294967292)))
+ _b &= uint32(127)
+ _b = _b >> 3
+ _s |= _b
+ *_v = (uint64(_s) << 32) | uint64(_a)
+ return uint8(9)
}
func _btreeParseCellPtrIndex(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pInfo *XCellInfo) {
var _nPayload uint32
var _pIter, _1_pEnd *uint8
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60207), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrIndexØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60207), unsafe.Pointer(&_btreeParseCellPtrIndexØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X5) != i32(0) && int32(_pPage.X5) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60208), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrIndexØ00__func__Ø000))), unsafe.Pointer(str(53532)))
+ if int32(_pPage.Xleaf) != int32(0) && int32(_pPage.Xleaf) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60208), unsafe.Pointer(&_btreeParseCellPtrIndexØ00__func__Ø000), unsafe.Pointer(str(53508)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60209), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeParseCellPtrIndexØ00__func__Ø000))), unsafe.Pointer(str(53762)))
+ if int32(_pPage.XintKeyLeaf) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60209), unsafe.Pointer(&_btreeParseCellPtrIndexØ00__func__Ø000), unsafe.Pointer(str(53738)))
crt.X__builtin_abort(tls)
}
}()
- _pIter = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_pPage.X7)))))))
+ _pIter = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell)) + uintptr(_pPage.XchildPtrSize)))
_nPayload = uint32(*_pIter)
- if _nPayload < uint32(i32(128)) {
+ if _nPayload < uint32(128) {
goto _7
}
- _1_pEnd = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIter)) + 1*uintptr(i32(8))))
- {
- p := &_nPayload
- *p = (*p) & uint32(i32(127))
- sink5(*p)
- }
+ _1_pEnd = elem15(_pIter, uintptr(8))
+ _nPayload &= uint32(127)
_8:
- _nPayload = (_nPayload << uint(i32(7))) | uint32(int32(*preInc13(&_pIter, 1))&i32(127))
- if (int32(*_pIter) >= i32(128)) && (uintptr(unsafe.Pointer(_pIter)) < uintptr(unsafe.Pointer(_1_pEnd))) {
+ _nPayload = (_nPayload << 7) | uint32(int32(*preInc15(&_pIter, 1))&int32(127))
+ if (int32(*_pIter) >= int32(128)) && (crt.P2U(unsafe.Pointer(_pIter)) < crt.P2U(unsafe.Pointer(_1_pEnd))) {
goto _8
}
_7:
*(*uintptr)(unsafe.Pointer(&_pIter)) += uintptr(1)
- *(*int64)(unsafe.Pointer(&(_pInfo.X0))) = int64(_nPayload)
- *(*uint32)(unsafe.Pointer(&(_pInfo.X2))) = _nPayload
- *(**uint8)(unsafe.Pointer(&(_pInfo.X1))) = _pIter
- if _nPayload > uint32(_pPage.X10) {
+ _pInfo.XnKey = int64(_nPayload)
+ _pInfo.XnPayload = _nPayload
+ _pInfo.XpPayload = _pIter
+ if _nPayload > uint32(_pPage.XmaxLocal) {
goto _10
}
- *(*uint16)(unsafe.Pointer(&(_pInfo.X4))) = uint16(_nPayload + uint32(uint16(int32((uintptr(unsafe.Pointer(_pIter))-uintptr(unsafe.Pointer(_pCell)))/1))))
- if int32(_pInfo.X4) < i32(4) {
- *(*uint16)(unsafe.Pointer(&(_pInfo.X4))) = uint16(i32(4))
+ _pInfo.XnSize = uint16(_nPayload + uint32(uint16(int32(uintptr(unsafe.Pointer(_pIter))-uintptr(unsafe.Pointer(_pCell))))))
+ if int32(_pInfo.XnSize) < int32(4) {
+ _pInfo.XnSize = uint16(4)
}
- *(*uint16)(unsafe.Pointer(&(_pInfo.X3))) = uint16(_nPayload)
+ _pInfo.XnLocal = uint16(_nPayload)
goto _12
_10:
_btreeParseCellAdjustSizeForOverflow(tls, _pPage, _pCell, _pInfo)
@@ -39881,63 +40533,65 @@ _12:
var _btreeParseCellPtrIndexØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_btreeParseCellPtrIndexØ00__func__Ø000[0], str(53783), 23)
+ crt.Xstrncpy(nil, &_btreeParseCellPtrIndexØ00__func__Ø000[0], str(53759), 23)
}
-// Invoke the busy handler for a btree.
+// C comment
+// /*
+// ** Invoke the busy handler for a btree.
+// */
func _btreeInvokeBusyHandler(tls *crt.TLS, _pArg unsafe.Pointer) (r0 int32) {
var _pBt *XBtShared
_pBt = (*XBtShared)(_pArg)
func() {
- if (*Xsqlite3)(_pBt.X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61201), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInvokeBusyHandlerØ00__func__Ø000))), unsafe.Pointer(str(53806)))
+ if _pBt.Xdb == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61201), unsafe.Pointer(&_btreeInvokeBusyHandlerØ00__func__Ø000), unsafe.Pointer(str(53782)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pBt.X1).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61202), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInvokeBusyHandlerØ00__func__Ø000))), unsafe.Pointer(str(53814)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pBt.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61202), unsafe.Pointer(&_btreeInvokeBusyHandlerØ00__func__Ø000), unsafe.Pointer(str(53790)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3InvokeBusyHandler(tls, (*t19)(unsafe.Pointer(&((*Xsqlite3)(_pBt.X1).X71))))
+ return _sqlite3InvokeBusyHandler(tls, &((*Xsqlite3)(_pBt.Xdb).XbusyHandler))
}
var _btreeInvokeBusyHandlerØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_btreeInvokeBusyHandlerØ00__func__Ø000[0], str(53849), 23)
+ crt.Xstrncpy(nil, &_btreeInvokeBusyHandlerØ00__func__Ø000[0], str(53825), 23)
}
-// Invoke the given busy handler.
-//
-// This routine is called when an operation failed with a lock.
-// If this routine returns non-zero, the lock is retried. If it
-// returns 0, the operation aborts with an SQLITE_BUSY error.
-func _sqlite3InvokeBusyHandler(tls *crt.TLS, _p *t19) (r0 int32) {
+// C comment
+// /*
+// ** Invoke the given busy handler.
+// **
+// ** This routine is called when an operation failed with a lock.
+// ** If this routine returns non-zero, the lock is retried. If it
+// ** returns 0, the operation aborts with an SQLITE_BUSY error.
+// */
+func _sqlite3InvokeBusyHandler(tls *crt.TLS, _p *t75) (r0 int32) {
var _rc int32
if (func() int32 {
if _p == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(141968), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InvokeBusyHandlerØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(141968), unsafe.Pointer(&_sqlite3InvokeBusyHandlerØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
- }() != 0 || (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{(_p.X0)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{nil})))) || ((_p.X2) < i32(0)) {
- return i32(0)
- }
- _rc = (_p.X0)(tls, _p.X1, _p.X2)
- if _rc == i32(0) {
- *(*int32)(unsafe.Pointer(&(_p.X2))) = i32(-1)
+ return int32(0)
+ }() != 0 || (_p.XxFunc == nil)) || (_p.XnBusy < int32(0)) {
+ return int32(0)
+ }
+ _rc = _p.XxFunc(tls, _p.XpArg, _p.XnBusy)
+ if _rc == int32(0) {
+ _p.XnBusy = int32(-1)
goto _6
}
- *(*int32)(unsafe.Pointer(&(_p.X2))) += 1
+ _p.XnBusy += 1
_6:
return _rc
}
@@ -39945,98 +40599,101 @@ _6:
var _sqlite3InvokeBusyHandlerØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3InvokeBusyHandlerØ00__func__Ø000[0], str(53872), 25)
+ crt.Xstrncpy(nil, &_sqlite3InvokeBusyHandlerØ00__func__Ø000[0], str(53848), 25)
}
func _sqlite3PagerOpenSavepoint(tls *crt.TLS, _pPager *XPager, _nSavepoint int32) (r0 int32) {
func() {
- if int32(_pPager.X14) < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53654), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenSavepointØ00__func__Ø000))), unsafe.Pointer(str(10980)))
+ if int32(_pPager.XeState) < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53654), unsafe.Pointer(&_sqlite3PagerOpenSavepointØ00__func__Ø000), unsafe.Pointer(str(10935)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53655), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenSavepointØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53655), unsafe.Pointer(&_sqlite3PagerOpenSavepointØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
- if (_nSavepoint > (_pPager.X38)) && ((_pPager.X3) != 0) {
+ if (_nSavepoint > _pPager.XnSavepoint) && (_pPager.XuseJournal != 0) {
return _pagerOpenSavepoint(tls, _pPager, _nSavepoint)
}
- return i32(0)
+ return int32(0)
}
var _sqlite3PagerOpenSavepointØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerOpenSavepointØ00__func__Ø000[0], str(53897), 26)
+ crt.Xstrncpy(nil, &_sqlite3PagerOpenSavepointØ00__func__Ø000[0], str(53873), 26)
}
-// Check that there are at least nSavepoint savepoints open. If there are
-// currently less than nSavepoints open, then open one or more savepoints
-// to make up the difference. If the number of savepoints is already
-// equal to nSavepoint, then this function is a no-op.
-//
-// If a memory allocation fails, SQLITE_NOMEM is returned. If an error
-// occurs while opening the sub-journal file, then an IO error code is
-// returned. Otherwise, SQLITE_OK.
+// C comment
+// /*
+// ** Check that there are at least nSavepoint savepoints open. If there are
+// ** currently less than nSavepoints open, then open one or more savepoints
+// ** to make up the difference. If the number of savepoints is already
+// ** equal to nSavepoint, then this function is a no-op.
+// **
+// ** If a memory allocation fails, SQLITE_NOMEM is returned. If an error
+// ** occurs while opening the sub-journal file, then an IO error code is
+// ** returned. Otherwise, SQLITE_OK.
+// */
func _pagerOpenSavepoint(tls *crt.TLS, _pPager *XPager, _nSavepoint int32) (r0 int32) {
var _rc, _nCurrent, _ii int32
var _aNew *XPagerSavepoint
- _rc = i32(0)
- _nCurrent = _pPager.X38
+ _rc = int32(0)
+ _nCurrent = _pPager.XnSavepoint
func() {
- if int32(_pPager.X14) < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53614), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerOpenSavepointØ00__func__Ø000))), unsafe.Pointer(str(10980)))
+ if int32(_pPager.XeState) < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53614), unsafe.Pointer(&_pagerOpenSavepointØ00__func__Ø000), unsafe.Pointer(str(10935)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53615), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerOpenSavepointØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53615), unsafe.Pointer(&_pagerOpenSavepointØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nSavepoint <= _nCurrent || (_pPager.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53616), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerOpenSavepointØ00__func__Ø000))), unsafe.Pointer(str(53923)))
+ if _nSavepoint <= _nCurrent || _pPager.XuseJournal == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53616), unsafe.Pointer(&_pagerOpenSavepointØ00__func__Ø000), unsafe.Pointer(str(53899)))
crt.X__builtin_abort(tls)
}
}()
- _aNew = (*XPagerSavepoint)(_sqlite3Realloc(tls, _pPager.X37, uint64(u32(44)*uint32(_nSavepoint))))
+ _aNew = (*XPagerSavepoint)(_sqlite3Realloc(tls, _pPager.XaSavepoint, uint64(uint32(44)*uint32(_nSavepoint))))
if _aNew == nil {
- return _sqlite3NomemError(tls, i32(53626))
+ return _sqlite3NomemError(tls, int32(53626))
}
- crt.Xmemset(tls, (unsafe.Pointer)((*XPagerSavepoint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aNew))+44*uintptr(_nCurrent)))), i32(0), uint32(_nSavepoint-_nCurrent)*u32(44))
- *(**XPagerSavepoint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X37))))) = _aNew
+ crt.Xmemset(tls, unsafe.Pointer(elem31(_aNew, uintptr(_nCurrent))), int32(0), uint32(_nSavepoint-_nCurrent)*uint32(44))
+ *(**XPagerSavepoint)(unsafe.Pointer(&_pPager.XaSavepoint)) = _aNew
_ii = _nCurrent
_8:
if _ii >= _nSavepoint {
goto _11
}
- *(*uint32)(unsafe.Pointer(&((*XPagerSavepoint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aNew)) + 44*uintptr(_ii))).X3))) = _pPager.X22
- if ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil) && ((_pPager.X34) > int64(i32(0))) {
- *(*int64)(unsafe.Pointer(&((*XPagerSavepoint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aNew)) + 44*uintptr(_ii))).X0))) = _pPager.X34
+ elem31(_aNew, uintptr(_ii)).XnOrig = _pPager.XdbSize
+ if ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil) && (_pPager.XjournalOff > (0)) {
+ elem31(_aNew, uintptr(_ii)).XiOffset = _pPager.XjournalOff
goto _14
}
- *(*int64)(unsafe.Pointer(&((*XPagerSavepoint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aNew)) + 44*uintptr(_ii))).X0))) = int64(_pPager.X47)
+ elem31(_aNew, uintptr(_ii)).XiOffset = int64(_pPager.XsectorSize)
_14:
- *(*uint32)(unsafe.Pointer(&((*XPagerSavepoint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aNew)) + 44*uintptr(_ii))).X4))) = _pPager.X29
- *(**XBitvec)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPagerSavepoint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aNew)) + 44*uintptr(_ii))).X2))))) = _sqlite3BitvecCreate(tls, _pPager.X22)
- if (*XBitvec)((*XPagerSavepoint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aNew))+44*uintptr(_ii))).X2) == nil {
- return _sqlite3NomemError(tls, i32(53642))
+ elem31(_aNew, uintptr(_ii)).XiSubRec = _pPager.XnSubRec
+ *(**XBitvec)(unsafe.Pointer(&(elem31(_aNew, uintptr(_ii)).XpInSavepoint))) = _sqlite3BitvecCreate(tls, _pPager.XdbSize)
+ if (elem31(_aNew, uintptr(_ii)).XpInSavepoint) == nil {
+ return _sqlite3NomemError(tls, int32(53642))
}
- if (*XWal)(_pPager.X60) != nil {
- _sqlite3WalSavepoint(tls, (*XWal)(_pPager.X60), (*uint32)(unsafe.Pointer((*[4]uint32)(unsafe.Pointer(&((*XPagerSavepoint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aNew)) + 44*uintptr(_ii))).X5))))))
+ if (*XWal)(_pPager.XpWal) != nil {
+ _sqlite3WalSavepoint(tls, (*XWal)(_pPager.XpWal), (*uint32)(unsafe.Pointer(&(elem31(_aNew, uintptr(_ii)).XaWalData))))
}
- *(*int32)(unsafe.Pointer(&(_pPager.X38))) = _ii + i32(1)
+ _pPager.XnSavepoint = _ii + int32(1)
_ii += 1
goto _8
_11:
func() {
- if (_pPager.X38) != _nSavepoint {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53649), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerOpenSavepointØ00__func__Ø000))), unsafe.Pointer(str(53965)))
+ if _pPager.XnSavepoint != _nSavepoint {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53649), unsafe.Pointer(&_pagerOpenSavepointØ00__func__Ø000), unsafe.Pointer(str(53941)))
crt.X__builtin_abort(tls)
}
}()
@@ -40047,62 +40704,68 @@ _11:
var _pagerOpenSavepointØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_pagerOpenSavepointØ00__func__Ø000[0], str(53996), 19)
+ crt.Xstrncpy(nil, &_pagerOpenSavepointØ00__func__Ø000[0], str(53972), 19)
}
-// Argument aWalData must point to an array of WAL_SAVEPOINT_NDATA u32
-// values. This function populates the array with values required to
-// "rollback" the write position of the WAL handle back to the current
-// point in the event of a savepoint rollback (via WalSavepointUndo()).
+// C comment
+// /*
+// ** Argument aWalData must point to an array of WAL_SAVEPOINT_NDATA u32
+// ** values. This function populates the array with values required to
+// ** "rollback" the write position of the WAL handle back to the current
+// ** point in the event of a savepoint rollback (via WalSavepointUndo()).
+// */
func _sqlite3WalSavepoint(tls *crt.TLS, _pWal *XWal, _aWalData *uint32) {
func() {
- if (_pWal.X12) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57300), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalSavepointØ00__func__Ø000))), unsafe.Pointer(str(15606)))
+ if _pWal.XwriteLock == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57300), unsafe.Pointer(&_sqlite3WalSavepointØ00__func__Ø000), unsafe.Pointer(str(15561)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(0)))) = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(1)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(0))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(2)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(1))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aWalData)) + 4*uintptr(i32(3)))) = _pWal.X22
+ *elem7(_aWalData, 0) = _pWal.Xhdr.XmxFrame
+ *elem7(_aWalData, uintptr(1)) = *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), 0)
+ *elem7(_aWalData, uintptr(2)) = *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), uintptr(1))
+ *elem7(_aWalData, uintptr(3)) = _pWal.XnCkpt
}
var _sqlite3WalSavepointØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalSavepointØ00__func__Ø000[0], str(54015), 20)
+ crt.Xstrncpy(nil, &_sqlite3WalSavepointØ00__func__Ø000[0], str(53991), 20)
}
func _assertTruncateConstraint(tls *crt.TLS, _pPager *XPager) {
- _sqlite3PcacheIterateDirty(tls, (*XPCache)(_pPager.X59), _assertTruncateConstraintCb)
+ _sqlite3PcacheIterateDirty(tls, (*XPCache)(_pPager.XpPCache), _assertTruncateConstraintCb)
}
-// For all dirty pages currently in the cache, invoke the specified
-// callback. This is only used if the SQLITE_CHECK_PAGES macro is
-// defined.
+// C comment
+// /*
+// ** For all dirty pages currently in the cache, invoke the specified
+// ** callback. This is only used if the SQLITE_CHECK_PAGES macro is
+// ** defined.
+// */
func _sqlite3PcacheIterateDirty(tls *crt.TLS, _pCache *XPCache, _xIter func(*crt.TLS, *XPgHdr)) {
var _pDirty *XPgHdr
- _pDirty = (*XPgHdr)(_pCache.X0)
+ _pDirty = (*XPgHdr)(_pCache.XpDirty)
_0:
if _pDirty == nil {
goto _3
}
_xIter(tls, _pDirty)
- _pDirty = (*XPgHdr)(_pDirty.X9)
+ _pDirty = (*XPgHdr)(_pDirty.XpDirtyNext)
goto _0
_3:
}
func _assertTruncateConstraintCb(tls *crt.TLS, _pPg *XPgHdr) {
func() {
- if (int32(_pPg.X6) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50854), unsafe.Pointer((*int8)(unsafe.Pointer(&_assertTruncateConstraintCbØ00__func__Ø000))), unsafe.Pointer(str(54035)))
+ if (int32(_pPg.Xflags) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50854), unsafe.Pointer(&_assertTruncateConstraintCbØ00__func__Ø000), unsafe.Pointer(str(54011)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _subjRequiresPage(tls, _pPg) != 0 && (_pPg.X5) > ((*XPager)(_pPg.X4).X22) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50855), unsafe.Pointer((*int8)(unsafe.Pointer(&_assertTruncateConstraintCbØ00__func__Ø000))), unsafe.Pointer(str(54058)))
+ if _subjRequiresPage(tls, _pPg) != 0 && _pPg.Xpgno > ((*XPager)(_pPg.XpPager).XdbSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50855), unsafe.Pointer(&_assertTruncateConstraintCbØ00__func__Ø000), unsafe.Pointer(str(54034)))
crt.X__builtin_abort(tls)
}
}()
@@ -40111,60 +40774,63 @@ func _assertTruncateConstraintCb(tls *crt.TLS, _pPg *XPgHdr) {
var _assertTruncateConstraintCbØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_assertTruncateConstraintCbØ00__func__Ø000[0], str(54115), 27)
-}
-
-// This function may only be called if the b-tree connection already
-// has a read or write transaction open on the database.
-//
-// Read the meta-information out of a database file. Meta[0]
-// is the number of free pages currently in the database. Meta[1]
-// through meta[15] are available for use by higher layers. Meta[0]
-// is read-only, the others are read/write.
-//
-// The schema layer numbers meta values differently. At the schema
-// layer (and the SetCookie and ReadCookie opcodes) the number of
-// free pages is not visible. So Cookie[0] is the same as Meta[1].
-//
-// This routine treats Meta[BTREE_DATA_VERSION] as a special case. Instead
-// of reading the value out of the header, it instead loads the "DataVersion"
-// from the pager. The BTREE_DATA_VERSION value is not actually stored in the
-// database file. It is a number computed by the pager. But its access
-// pattern is the same as header meta values, and so it is convenient to
-// read it from this routine.
+ crt.Xstrncpy(nil, &_assertTruncateConstraintCbØ00__func__Ø000[0], str(54091), 27)
+}
+
+// C comment
+// /*
+// ** This function may only be called if the b-tree connection already
+// ** has a read or write transaction open on the database.
+// **
+// ** Read the meta-information out of a database file. Meta[0]
+// ** is the number of free pages currently in the database. Meta[1]
+// ** through meta[15] are available for use by higher layers. Meta[0]
+// ** is read-only, the others are read/write.
+// **
+// ** The schema layer numbers meta values differently. At the schema
+// ** layer (and the SetCookie and ReadCookie opcodes) the number of
+// ** free pages is not visible. So Cookie[0] is the same as Meta[1].
+// **
+// ** This routine treats Meta[BTREE_DATA_VERSION] as a special case. Instead
+// ** of reading the value out of the header, it instead loads the "DataVersion"
+// ** from the pager. The BTREE_DATA_VERSION value is not actually stored in the
+// ** database file. It is a number computed by the pager. But its access
+// ** pattern is the same as header meta values, and so it is convenient to
+// ** read it from this routine.
+// */
func _sqlite3BtreeGetMeta(tls *crt.TLS, _p *XBtree, _idx int32, _pMeta *uint32) {
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
_sqlite3BtreeEnter(tls, _p)
func() {
- if int32(_p.X2) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67861), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeGetMetaØ00__func__Ø000))), unsafe.Pointer(str(54142)))
+ if int32(_p.XinTrans) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67861), unsafe.Pointer(&_sqlite3BtreeGetMetaØ00__func__Ø000), unsafe.Pointer(str(54118)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if i32(0) != _querySharedCacheTableLock(tls, _p, uint32(i32(1)), uint8(i32(1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67862), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeGetMetaØ00__func__Ø000))), unsafe.Pointer(str(54164)))
+ if int32(0) != _querySharedCacheTableLock(tls, _p, uint32(1), uint8(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67862), unsafe.Pointer(&_sqlite3BtreeGetMetaØ00__func__Ø000), unsafe.Pointer(str(54140)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XMemPage)(_pBt.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67863), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeGetMetaØ00__func__Ø000))), unsafe.Pointer(str(54228)))
+ if _pBt.XpPage1 == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67863), unsafe.Pointer(&_sqlite3BtreeGetMetaØ00__func__Ø000), unsafe.Pointer(str(54204)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _idx < i32(0) || _idx > i32(15) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67864), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeGetMetaØ00__func__Ø000))), unsafe.Pointer(str(54240)))
+ if _idx < int32(0) || _idx > int32(15) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67864), unsafe.Pointer(&_sqlite3BtreeGetMetaØ00__func__Ø000), unsafe.Pointer(str(54216)))
crt.X__builtin_abort(tls)
}
}()
- if _idx == i32(15) {
- *_pMeta = _sqlite3PagerDataVersion(tls, (*XPager)(_pBt.X0)) + (_p.X8)
+ if _idx == int32(15) {
+ *_pMeta = _sqlite3PagerDataVersion(tls, (*XPager)(_pBt.XpPager)) + _p.XiDataVersion
goto _10
}
- *_pMeta = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(36)+(_idx*i32(4))))))
+ *_pMeta = _sqlite3Get4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(int32(36)+(_idx*int32(4)))))
_10:
_sqlite3BtreeLeave(tls, _p)
}
@@ -40172,197 +40838,212 @@ _10:
var _sqlite3BtreeGetMetaØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeGetMetaØ00__func__Ø000[0], str(54258), 20)
+ crt.Xstrncpy(nil, &_sqlite3BtreeGetMetaØ00__func__Ø000[0], str(54234), 20)
}
-// Return the pPager->iDataVersion value
+// C comment
+// /*
+// ** Return the pPager->iDataVersion value
+// */
func _sqlite3PagerDataVersion(tls *crt.TLS, _pPager *XPager) (r0 uint32) {
func() {
- if int32(_pPager.X14) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48656), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerDataVersionØ00__func__Ø000))), unsafe.Pointer(str(54278)))
+ if int32(_pPager.XeState) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48656), unsafe.Pointer(&_sqlite3PagerDataVersionØ00__func__Ø000), unsafe.Pointer(str(54254)))
crt.X__builtin_abort(tls)
}
}()
- return _pPager.X39
+ return _pPager.XiDataVersion
}
var _sqlite3PagerDataVersionØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerDataVersionØ00__func__Ø000[0], str(54304), 24)
+ crt.Xstrncpy(nil, &_sqlite3PagerDataVersionØ00__func__Ø000[0], str(54280), 24)
}
-// Reset the schema for the database at index iDb. Also reset the
-// TEMP schema.
+// C comment
+// /*
+// ** Reset the schema for the database at index iDb. Also reset the
+// ** TEMP schema.
+// */
func _sqlite3ResetOneSchema(tls *crt.TLS, _db *Xsqlite3, _iDb int32) {
var _pDb *XDb
func() {
- if _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100217), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ResetOneSchemaØ00__func__Ø000))), unsafe.Pointer(str(54328)))
+ if _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100217), unsafe.Pointer(&_sqlite3ResetOneSchemaØ00__func__Ø000), unsafe.Pointer(str(54304)))
crt.X__builtin_abort(tls)
}
}()
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb)))
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb))
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100221), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ResetOneSchemaØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100221), unsafe.Pointer(&_sqlite3ResetOneSchemaØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSchema)(_pDb.X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100222), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ResetOneSchemaØ00__func__Ø000))), unsafe.Pointer(str(54340)))
+ if (*XSchema)(_pDb.XpSchema) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100222), unsafe.Pointer(&_sqlite3ResetOneSchemaØ00__func__Ø000), unsafe.Pointer(str(54316)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3SchemaClear(tls, _pDb.X4)
- if _iDb != i32(1) {
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(1))))
+ _sqlite3SchemaClear(tls, _pDb.XpSchema)
+ if _iDb != int32(1) {
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(1))
func() {
- if (*XSchema)(_pDb.X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100231), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ResetOneSchemaØ00__func__Ø000))), unsafe.Pointer(str(54340)))
+ if (*XSchema)(_pDb.XpSchema) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100231), unsafe.Pointer(&_sqlite3ResetOneSchemaØ00__func__Ø000), unsafe.Pointer(str(54316)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3SchemaClear(tls, _pDb.X4)
+ _sqlite3SchemaClear(tls, _pDb.XpSchema)
}
}
var _sqlite3ResetOneSchemaØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ResetOneSchemaØ00__func__Ø000[0], str(54356), 22)
+ crt.Xstrncpy(nil, &_sqlite3ResetOneSchemaØ00__func__Ø000[0], str(54332), 22)
}
-// Do both phases of a commit.
+// C comment
+// /*
+// ** Do both phases of a commit.
+// */
func _sqlite3BtreeCommit(tls *crt.TLS, _p *XBtree) (r0 int32) {
var _rc int32
_sqlite3BtreeEnter(tls, _p)
_rc = _sqlite3BtreeCommitPhaseOne(tls, _p, nil)
- if _rc == i32(0) {
- _rc = _sqlite3BtreeCommitPhaseTwo(tls, _p, i32(0))
+ if _rc == int32(0) {
+ _rc = _sqlite3BtreeCommitPhaseTwo(tls, _p, int32(0))
}
_sqlite3BtreeLeave(tls, _p)
return _rc
}
-// This routine does the first phase of a two-phase commit. This routine
-// causes a rollback journal to be created (if it does not already exist)
-// and populated with enough information so that if a power loss occurs
-// the database can be restored to its original state by playing back
-// the journal. Then the contents of the journal are flushed out to
-// the disk. After the journal is safely on oxide, the changes to the
-// database are written into the database file and flushed to oxide.
-// At the end of this call, the rollback journal still exists on the
-// disk and we are still holding all locks, so the transaction has not
-// committed. See sqlite3BtreeCommitPhaseTwo() for the second phase of the
-// commit process.
-//
-// This call is a no-op if no write-transaction is currently active on pBt.
-//
-// Otherwise, sync the database file for the btree pBt. zMaster points to
-// the name of a master journal file that should be written into the
-// individual journal file, or is NULL, indicating no master journal file
-// (single database transaction).
-//
-// When this is called, the master journal should already have been
-// created, populated with this journal pointer and synced to disk.
-//
-// Once this is routine has returned, the only thing required to commit
-// the write-transaction for this database file is to delete the journal.
+// C comment
+// /*
+// ** This routine does the first phase of a two-phase commit. This routine
+// ** causes a rollback journal to be created (if it does not already exist)
+// ** and populated with enough information so that if a power loss occurs
+// ** the database can be restored to its original state by playing back
+// ** the journal. Then the contents of the journal are flushed out to
+// ** the disk. After the journal is safely on oxide, the changes to the
+// ** database are written into the database file and flushed to oxide.
+// ** At the end of this call, the rollback journal still exists on the
+// ** disk and we are still holding all locks, so the transaction has not
+// ** committed. See sqlite3BtreeCommitPhaseTwo() for the second phase of the
+// ** commit process.
+// **
+// ** This call is a no-op if no write-transaction is currently active on pBt.
+// **
+// ** Otherwise, sync the database file for the btree pBt. zMaster points to
+// ** the name of a master journal file that should be written into the
+// ** individual journal file, or is NULL, indicating no master journal file
+// ** (single database transaction).
+// **
+// ** When this is called, the master journal should already have been
+// ** created, populated with this journal pointer and synced to disk.
+// **
+// ** Once this is routine has returned, the only thing required to commit
+// ** the write-transaction for this database file is to delete the journal.
+// */
func _sqlite3BtreeCommitPhaseOne(tls *crt.TLS, _p *XBtree, _zMaster *int8) (r0 int32) {
var _rc int32
var _1_pBt *XBtShared
- _rc = i32(0)
- if int32(_p.X2) != i32(2) {
+ _rc = int32(0)
+ if int32(_p.XinTrans) != int32(2) {
goto _0
}
- _1_pBt = (*XBtShared)(_p.X1)
+ _1_pBt = (*XBtShared)(_p.XpBt)
_sqlite3BtreeEnter(tls, _p)
- if (_1_pBt.X5) == 0 {
+ if _1_pBt.XautoVacuum == 0 {
goto _1
}
_rc = _autoVacuumCommit(tls, _1_pBt)
- if _rc != i32(0) {
+ if _rc != int32(0) {
_sqlite3BtreeLeave(tls, _p)
return _rc
}
_1:
- if (_1_pBt.X7) != 0 {
- _sqlite3PagerTruncateImage(tls, (*XPager)(_1_pBt.X0), _1_pBt.X18)
+ if _1_pBt.XbDoTruncate != 0 {
+ _sqlite3PagerTruncateImage(tls, (*XPager)(_1_pBt.XpPager), _1_pBt.XnPage)
}
- _rc = _sqlite3PagerCommitPhaseOne(tls, (*XPager)(_1_pBt.X0), _zMaster, i32(0))
+ _rc = _sqlite3PagerCommitPhaseOne(tls, (*XPager)(_1_pBt.XpPager), _zMaster, int32(0))
_sqlite3BtreeLeave(tls, _p)
_0:
return _rc
}
-// This routine is called prior to sqlite3PagerCommit when a transaction
-// is committed for an auto-vacuum database.
-//
-// If SQLITE_OK is returned, then *pnTrunc is set to the number of pages
-// the database file should be truncated to during the commit process.
-// i.e. the database has been reorganized so that only the first *pnTrunc
-// pages are in use.
+// C comment
+// /*
+// ** This routine is called prior to sqlite3PagerCommit when a transaction
+// ** is committed for an auto-vacuum database.
+// **
+// ** If SQLITE_OK is returned, then *pnTrunc is set to the number of pages
+// ** the database file should be truncated to during the commit process.
+// ** i.e. the database has been reorganized so that only the first *pnTrunc
+// ** pages are in use.
+// */
func _autoVacuumCommit(tls *crt.TLS, _pBt *XBtShared) (r0 int32) {
var _rc, _nRef int32
var _1_nFin, _1_nFree, _1_iFree, _1_nOrig uint32
var _pPager *XPager
- _rc = i32(0)
- _pPager = (*XPager)(_pBt.X0)
+ _rc = int32(0)
+ _pPager = (*XPager)(_pBt.XpPager)
_nRef = _sqlite3PagerRefcount(tls, _pPager)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62757), unsafe.Pointer((*int8)(unsafe.Pointer(&_autoVacuumCommitØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62757), unsafe.Pointer(&_autoVacuumCommitØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
_invalidateAllOverflowCache(tls, _pBt)
func() {
- if (_pBt.X5) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62759), unsafe.Pointer((*int8)(unsafe.Pointer(&_autoVacuumCommitØ00__func__Ø000))), unsafe.Pointer(str(54378)))
+ if _pBt.XautoVacuum == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62759), unsafe.Pointer(&_autoVacuumCommitØ00__func__Ø000), unsafe.Pointer(str(54354)))
crt.X__builtin_abort(tls)
}
}()
- if (_pBt.X6) != 0 {
+ if _pBt.XincrVacuum != 0 {
goto _4
}
_1_nOrig = _btreePagecount(tls, _pBt)
- if (_ptrmapPageno(tls, _pBt, _1_nOrig) == _1_nOrig) || (_1_nOrig == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1)))) {
- return _sqlite3CorruptError(tls, i32(62772))
+ if (_ptrmapPageno(tls, _pBt, _1_nOrig) == _1_nOrig) || (_1_nOrig == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1))) {
+ return _sqlite3CorruptError(tls, int32(62772))
}
- _1_nFree = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(36)))))
+ _1_nFree = _sqlite3Get4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(36)))
_1_nFin = _finalDbSize(tls, _pBt, _1_nOrig, _1_nFree)
if _1_nFin > _1_nOrig {
- return _sqlite3CorruptError(tls, i32(62777))
+ return _sqlite3CorruptError(tls, int32(62777))
}
if _1_nFin < _1_nOrig {
- _rc = _saveAllCursors(tls, _pBt, uint32(i32(0)), nil)
+ _rc = _saveAllCursors(tls, _pBt, 0, nil)
}
_1_iFree = _1_nOrig
_9:
- if _1_iFree <= _1_nFin || _rc != i32(0) {
+ if _1_iFree <= _1_nFin || _rc != int32(0) {
goto _13
}
- _rc = _incrVacuumStep(tls, _pBt, _1_nFin, _1_iFree, i32(1))
+ _rc = _incrVacuumStep(tls, _pBt, _1_nFin, _1_iFree, int32(1))
_1_iFree -= 1
goto _9
_13:
- if ((_rc == i32(101)) || (_rc == i32(0))) && (_1_nFree > uint32(i32(0))) {
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.X3).X23))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(32)))), uint32(i32(0)))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(36)))), uint32(i32(0)))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(28)))), _1_nFin)
- *(*uint8)(unsafe.Pointer(&(_pBt.X7))) = uint8(i32(1))
- *(*uint32)(unsafe.Pointer(&(_pBt.X18))) = _1_nFin
- }
- if _rc != i32(0) {
+ if ((_rc == int32(101)) || (_rc == int32(0))) && (_1_nFree > (0)) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.XpPage1).XpDbPage))
+ _sqlite3Put4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(32)), 0)
+ _sqlite3Put4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(36)), 0)
+ _sqlite3Put4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(28)), _1_nFin)
+ _pBt.XbDoTruncate = uint8(1)
+ _pBt.XnPage = _1_nFin
+ }
+ if _rc != int32(0) {
_sqlite3PagerRollback(tls, _pPager)
}
_4:
func() {
if _nRef < _sqlite3PagerRefcount(tls, _pPager) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62797), unsafe.Pointer((*int8)(unsafe.Pointer(&_autoVacuumCommitØ00__func__Ø000))), unsafe.Pointer(str(54394)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62797), unsafe.Pointer(&_autoVacuumCommitØ00__func__Ø000), unsafe.Pointer(str(54370)))
crt.X__builtin_abort(tls)
}
}()
@@ -40372,30 +41053,32 @@ _4:
var _autoVacuumCommitØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_autoVacuumCommitØ00__func__Ø000[0], str(54429), 17)
+ crt.Xstrncpy(nil, &_autoVacuumCommitØ00__func__Ø000[0], str(54405), 17)
}
-// Invalidate the overflow page-list cache for all cursors opened
-// on the shared btree structure pBt.
+// C comment
+// /*
+// ** Invalidate the overflow page-list cache for all cursors opened
+// ** on the shared btree structure pBt.
+// */
func _invalidateAllOverflowCache(tls *crt.TLS, _pBt *XBtShared) {
var _p *XBtCursor
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59514), unsafe.Pointer((*int8)(unsafe.Pointer(&_invalidateAllOverflowCacheØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59514), unsafe.Pointer(&_invalidateAllOverflowCacheØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*XBtCursor)(_pBt.X2)
+ _p = (*XBtCursor)(_pBt.XpCursor)
_2:
if _p == nil {
goto _5
}
{
- p := (*uint8)(unsafe.Pointer(&(_p.X10)))
- *p = uint8(int32(*p) & i32(-5))
- sink2(*p)
+ p := &_p.XcurFlags
+ *p = uint8(int32(*p) & int32(-5))
}
- _p = (*XBtCursor)(_p.X2)
+ _p = (*XBtCursor)(_p.XpNext)
goto _2
_5:
}
@@ -40403,88 +41086,94 @@ _5:
var _invalidateAllOverflowCacheØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_invalidateAllOverflowCacheØ00__func__Ø000[0], str(54446), 27)
+ crt.Xstrncpy(nil, &_invalidateAllOverflowCacheØ00__func__Ø000[0], str(54422), 27)
}
-// The database opened by the first argument is an auto-vacuum database
-// nOrig pages in size containing nFree free pages. Return the expected
-// size of the database in pages following an auto-vacuum operation.
+// C comment
+// /*
+// ** The database opened by the first argument is an auto-vacuum database
+// ** nOrig pages in size containing nFree free pages. Return the expected
+// ** size of the database in pages following an auto-vacuum operation.
+// */
func _finalDbSize(tls *crt.TLS, _pBt *XBtShared, _nOrig uint32, _nFree uint32) (r0 uint32) {
var _nEntry int32
var _nPtrmap, _nFin uint32
- _nEntry = int32((_pBt.X16) / uint32(i32(5)))
+ _nEntry = int32(_pBt.XusableSize / uint32(5))
_nPtrmap = (((_nFree - _nOrig) + _ptrmapPageno(tls, _pBt, _nOrig)) + uint32(_nEntry)) / uint32(_nEntry)
_nFin = (_nOrig - _nFree) - _nPtrmap
- if (_nOrig > ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1)))) && (_nFin < ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1)))) {
+ if (_nOrig > ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1))) && (_nFin < ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1))) {
_nFin -= 1
}
_1:
- if (_ptrmapPageno(tls, _pBt, _nFin) == _nFin) || (_nFin == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1)))) {
+ if (_ptrmapPageno(tls, _pBt, _nFin) == _nFin) || (_nFin == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1))) {
_nFin -= 1
goto _1
}
return _nFin
}
-// Perform a single step of an incremental-vacuum. If successful, return
-// SQLITE_OK. If there is no work to do (and therefore no point in
-// calling this function again), return SQLITE_DONE. Or, if an error
-// occurs, return some other error code.
-//
-// More specifically, this function attempts to re-organize the database so
-// that the last page of the file currently in use is no longer in use.
-//
-// Parameter nFin is the number of pages that this database would contain
-// were this function called until it returns SQLITE_DONE.
-//
-// If the bCommit parameter is non-zero, this function assumes that the
-// caller will keep calling incrVacuumStep() until it returns SQLITE_DONE
-// or an error. bCommit is passed true for an auto-vacuum-on-commit
-// operation, or false for an incremental vacuum.
+// C comment
+// /*
+// ** Perform a single step of an incremental-vacuum. If successful, return
+// ** SQLITE_OK. If there is no work to do (and therefore no point in
+// ** calling this function again), return SQLITE_DONE. Or, if an error
+// ** occurs, return some other error code.
+// **
+// ** More specifically, this function attempts to re-organize the database so
+// ** that the last page of the file currently in use is no longer in use.
+// **
+// ** Parameter nFin is the number of pages that this database would contain
+// ** were this function called until it returns SQLITE_DONE.
+// **
+// ** If the bCommit parameter is non-zero, this function assumes that the
+// ** caller will keep calling incrVacuumStep() until it returns SQLITE_DONE
+// ** or an error. bCommit is passed true for an auto-vacuum-on-commit
+// ** operation, or false for an incremental vacuum.
+// */
func _incrVacuumStep(tls *crt.TLS, _pBt *XBtShared, _nFin uint32, _iLastPg uint32, _bCommit int32) (r0 int32) {
var _rc int32
var _nFreeList, _1_iPtrPage, _6_iFreePg, _8_iFreePg, _8_iNear uint32
var _1_eType, _8_eMode uint8
var _6_pFreePg, _8_pLastPg, _11_pFreePg *XMemPage
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62592), unsafe.Pointer((*int8)(unsafe.Pointer(&_incrVacuumStepØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62592), unsafe.Pointer(&_incrVacuumStepØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _iLastPg <= _nFin {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62593), unsafe.Pointer((*int8)(unsafe.Pointer(&_incrVacuumStepØ00__func__Ø000))), unsafe.Pointer(str(54473)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62593), unsafe.Pointer(&_incrVacuumStepØ00__func__Ø000), unsafe.Pointer(str(54449)))
crt.X__builtin_abort(tls)
}
}()
- if _ptrmapPageno(tls, _pBt, _iLastPg) == _iLastPg || _iLastPg == ((uint32(_sqlite3PendingByte)/(_pBt.X15))+uint32(i32(1))) {
+ if _ptrmapPageno(tls, _pBt, _iLastPg) == _iLastPg || _iLastPg == ((uint32(_sqlite3PendingByte)/_pBt.XpageSize)+uint32(1)) {
goto _5
}
- _nFreeList = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(36)))))
- if _nFreeList == uint32(i32(0)) {
- return i32(101)
+ _nFreeList = _sqlite3Get4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(36)))
+ if _nFreeList == (0) {
+ return int32(101)
}
_rc = _ptrmapGet(tls, _pBt, _iLastPg, &_1_eType, &_1_iPtrPage)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- if int32(_1_eType) == i32(1) {
- return _sqlite3CorruptError(tls, i32(62609))
+ if int32(_1_eType) == int32(1) {
+ return _sqlite3CorruptError(tls, int32(62609))
}
- if int32(_1_eType) != i32(2) {
+ if int32(_1_eType) != int32(2) {
goto _9
}
- if _bCommit != i32(0) {
+ if _bCommit != int32(0) {
goto _10
}
- _rc = _allocateBtreePage(tls, _pBt, &_6_pFreePg, &_6_iFreePg, _iLastPg, uint8(i32(1)))
- if _rc != i32(0) {
+ _rc = _allocateBtreePage(tls, _pBt, &_6_pFreePg, &_6_iFreePg, _iLastPg, uint8(1))
+ if _rc != int32(0) {
return _rc
}
func() {
if _6_iFreePg != _iLastPg {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62625), unsafe.Pointer((*int8)(unsafe.Pointer(&_incrVacuumStepØ00__func__Ø000))), unsafe.Pointer(str(54486)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62625), unsafe.Pointer(&_incrVacuumStepØ00__func__Ø000), unsafe.Pointer(str(54462)))
crt.X__builtin_abort(tls)
}
}()
@@ -40492,19 +41181,19 @@ func _incrVacuumStep(tls *crt.TLS, _pBt *XBtShared, _nFin uint32, _iLastPg uint3
_10:
goto _14
_9:
- _8_eMode = u8(0)
- _8_iNear = u32(0)
- _rc = _btreeGetPage(tls, _pBt, _iLastPg, &_8_pLastPg, i32(0))
- if _rc != i32(0) {
+ _8_eMode = uint8(0)
+ _8_iNear = uint32(0)
+ _rc = _btreeGetPage(tls, _pBt, _iLastPg, &_8_pLastPg, int32(0))
+ if _rc != int32(0) {
return _rc
}
- if _bCommit == i32(0) {
- _8_eMode = uint8(i32(2))
+ if _bCommit == int32(0) {
+ _8_eMode = uint8(2)
_8_iNear = _nFin
}
_16:
_rc = _allocateBtreePage(tls, _pBt, &_11_pFreePg, &_8_iFreePg, _8_iNear, _8_eMode)
- if _rc != i32(0) {
+ if _rc != int32(0) {
_releasePage(tls, _8_pLastPg)
return _rc
}
@@ -40514,57 +41203,60 @@ _16:
}
func() {
if _8_iFreePg >= _iLastPg {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62659), unsafe.Pointer((*int8)(unsafe.Pointer(&_incrVacuumStepØ00__func__Ø000))), unsafe.Pointer(str(54503)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62659), unsafe.Pointer(&_incrVacuumStepØ00__func__Ø000), unsafe.Pointer(str(54479)))
crt.X__builtin_abort(tls)
}
}()
_rc = _relocatePage(tls, _pBt, _8_pLastPg, _1_eType, _1_iPtrPage, _8_iFreePg, _bCommit)
_releasePage(tls, _8_pLastPg)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
_14:
_5:
- if _bCommit != i32(0) {
+ if _bCommit != int32(0) {
goto _23
}
_24:
_iLastPg -= 1
- if (_iLastPg == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1)))) || (_ptrmapPageno(tls, _pBt, _iLastPg) == _iLastPg) {
+ if (_iLastPg == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1))) || (_ptrmapPageno(tls, _pBt, _iLastPg) == _iLastPg) {
goto _24
}
- *(*uint8)(unsafe.Pointer(&(_pBt.X7))) = uint8(i32(1))
- *(*uint32)(unsafe.Pointer(&(_pBt.X18))) = _iLastPg
+ _pBt.XbDoTruncate = uint8(1)
+ _pBt.XnPage = _iLastPg
_23:
- return i32(0)
+ return int32(0)
}
var _incrVacuumStepØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_incrVacuumStepØ00__func__Ø000[0], str(54519), 15)
-}
-
-// Allocate a new page from the database file.
-//
-// The new page is marked as dirty. (In other words, sqlite3PagerWrite()
-// has already been called on the new page.) The new page has also
-// been referenced and the calling routine is responsible for calling
-// sqlite3PagerUnref() on the new page when it is done.
-//
-// SQLITE_OK is returned on success. Any other return value indicates
-// an error. *ppPage is set to NULL in the event of an error.
-//
-// If the "nearby" parameter is not 0, then an effort is made to
-// locate a page close to the page number "nearby". This can be used in an
-// attempt to keep related pages close to each other in the database file,
-// which in turn can make database access faster.
-//
-// If the eMode parameter is BTALLOC_EXACT and the nearby page exists
-// anywhere on the free-list, then it is guaranteed to be returned. If
-// eMode is BTALLOC_LT then the page returned will be less than or equal
-// to nearby if any such page exists. If eMode is BTALLOC_ANY then there
-// are no restrictions on which page is returned.
+ crt.Xstrncpy(nil, &_incrVacuumStepØ00__func__Ø000[0], str(54495), 15)
+}
+
+// C comment
+// /*
+// ** Allocate a new page from the database file.
+// **
+// ** The new page is marked as dirty. (In other words, sqlite3PagerWrite()
+// ** has already been called on the new page.) The new page has also
+// ** been referenced and the calling routine is responsible for calling
+// ** sqlite3PagerUnref() on the new page when it is done.
+// **
+// ** SQLITE_OK is returned on success. Any other return value indicates
+// ** an error. *ppPage is set to NULL in the event of an error.
+// **
+// ** If the "nearby" parameter is not 0, then an effort is made to
+// ** locate a page close to the page number "nearby". This can be used in an
+// ** attempt to keep related pages close to each other in the database file,
+// ** which in turn can make database access faster.
+// **
+// ** If the eMode parameter is BTALLOC_EXACT and the nearby page exists
+// ** anywhere on the free-list, then it is guaranteed to be returned. If
+// ** eMode is BTALLOC_LT then the page returned will be less than or equal
+// ** to nearby if any such page exists. If eMode is BTALLOC_ANY then there
+// ** are no restrictions on which page is returned.
+// */
func _allocateBtreePage(tls *crt.TLS, _pBt *XBtShared, _ppPage **XMemPage, _pPgno *uint32, _nearby uint32, _eMode uint8) (r0 int32) {
var _rc, _34_dist, _35_d2, _39_noContent, _43_bNoContent int32
var _n, _k, _mxPage, _2_iTrunk, _2_nSearch, _22_iNewTrunk, _29_closest, _29_iPage, _30_i uint32
@@ -40574,43 +41266,43 @@ func _allocateBtreePage(tls *crt.TLS, _pBt *XBtShared, _ppPage **XMemPage, _pPgn
_pTrunk = nil
_pPrevTrunk = nil
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64690), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64690), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_eMode) != i32(0) && (_nearby <= uint32(i32(0)) || (_pBt.X5) == 0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64691), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54534)))
+ if int32(_eMode) != int32(0) && (_nearby <= (0) || _pBt.XautoVacuum == 0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64691), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54510)))
crt.X__builtin_abort(tls)
}
}()
- _pPage1 = (*XMemPage)(_pBt.X3)
+ _pPage1 = (*XMemPage)(_pBt.XpPage1)
_mxPage = _btreePagecount(tls, _pBt)
- _n = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(36)))))
+ _n = _sqlite3Get4byte(tls, elem15(_pPage1.XaData, uintptr(36)))
if _n >= _mxPage {
- return _sqlite3CorruptError(tls, i32(64699))
+ return _sqlite3CorruptError(tls, int32(64699))
}
- if _n <= uint32(i32(0)) {
+ if _n <= (0) {
goto _7
}
- _2_searchList = u8(0)
- _2_nSearch = u32(0)
- if int32(_eMode) != i32(1) {
+ _2_searchList = uint8(0)
+ _2_nSearch = uint32(0)
+ if int32(_eMode) != int32(1) {
goto _8
}
if _nearby > _mxPage {
goto _9
}
func() {
- if _nearby <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64715), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54599)))
+ if _nearby <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64715), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54575)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pBt.X5) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64716), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54378)))
+ if _pBt.XautoVacuum == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64716), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54354)))
crt.X__builtin_abort(tls)
}
}()
@@ -40618,34 +41310,34 @@ func _allocateBtreePage(tls *crt.TLS, _pBt *XBtShared, _ppPage **XMemPage, _pPgn
if _rc != 0 {
return _rc
}
- if int32(_4_eType) == i32(2) {
- _2_searchList = uint8(i32(1))
+ if int32(_4_eType) == int32(2) {
+ _2_searchList = uint8(1)
}
_9:
goto _17
_8:
- if int32(_eMode) == i32(2) {
- _2_searchList = uint8(i32(1))
+ if int32(_eMode) == int32(2) {
+ _2_searchList = uint8(1)
}
_17:
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage1.X23))
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage1.XpDbPage))
if _rc != 0 {
return _rc
}
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(36)))), _n-uint32(i32(1)))
+ _sqlite3Put4byte(tls, elem15(_pPage1.XaData, uintptr(36)), _n-uint32(1))
_19:
_pPrevTrunk = _pTrunk
if _pPrevTrunk != nil {
- _2_iTrunk = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPrevTrunk.X19))+1*uintptr(i32(0)))))
+ _2_iTrunk = _sqlite3Get4byte(tls, elem15(_pPrevTrunk.XaData, 0))
goto _21
}
- _2_iTrunk = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(32)))))
+ _2_iTrunk = _sqlite3Get4byte(tls, elem15(_pPage1.XaData, uintptr(32)))
_21:
- if (_2_iTrunk > _mxPage) || (postInc5(&_2_nSearch, uint32(1)) > _n) {
- _rc = _sqlite3CorruptError(tls, i32(64755))
+ if (_2_iTrunk > _mxPage) || (postInc23(&_2_nSearch, uint32(1)) > _n) {
+ _rc = _sqlite3CorruptError(tls, int32(64755))
goto _24
}
- _rc = _btreeGetUnusedPage(tls, _pBt, _2_iTrunk, &_pTrunk, i32(0))
+ _rc = _btreeGetUnusedPage(tls, _pBt, _2_iTrunk, &_pTrunk, int32(0))
_24:
if _rc != 0 {
_pTrunk = nil
@@ -40653,120 +41345,120 @@ _24:
}
func() {
if _pTrunk == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64763), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54608)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64763), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54584)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pTrunk.X19) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64764), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54618)))
+ if _pTrunk.XaData == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64764), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54594)))
crt.X__builtin_abort(tls)
}
}()
- _k = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(i32(4)))))
- if _k != uint32(i32(0)) || _2_searchList != 0 {
+ _k = _sqlite3Get4byte(tls, elem15(_pTrunk.XaData, uintptr(4)))
+ if _k != (0) || _2_searchList != 0 {
goto _31
}
func() {
if _pPrevTrunk != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64772), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54635)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64772), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54611)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pTrunk.X23))
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pTrunk.XpDbPage))
if _rc != 0 {
goto _end_allocate_page
}
*_pPgno = _2_iTrunk
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(32))))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(i32(0))))), uint32(i32(4)))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_pPage1.XaData, uintptr(32))), unsafe.Pointer(elem15(_pTrunk.XaData, 0)), uint32(4))
*_ppPage = _pTrunk
_pTrunk = nil
goto _57
_31:
- if _k > (((_pBt.X16) / uint32(i32(4))) - uint32(i32(2))) {
- _rc = _sqlite3CorruptError(tls, i32(64784))
+ if _k > ((_pBt.XusableSize / uint32(4)) - uint32(2)) {
+ _rc = _sqlite3CorruptError(tls, int32(64784))
goto _end_allocate_page
}
- if _2_searchList == 0 || _nearby != _2_iTrunk && (_2_iTrunk >= _nearby || int32(_eMode) != i32(2)) {
+ if _2_searchList == 0 || _nearby != _2_iTrunk && (_2_iTrunk >= _nearby || int32(_eMode) != int32(2)) {
goto _41
}
*_pPgno = _2_iTrunk
*_ppPage = _pTrunk
- _2_searchList = uint8(i32(0))
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pTrunk.X23))
+ _2_searchList = 0
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pTrunk.XpDbPage))
if _rc != 0 {
goto _end_allocate_page
}
- if _k != uint32(i32(0)) {
+ if _k != (0) {
goto _43
}
if _pPrevTrunk == nil {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(32))))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(i32(0))))), uint32(i32(4)))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_pPage1.XaData, uintptr(32))), unsafe.Pointer(elem15(_pTrunk.XaData, 0)), uint32(4))
goto _45
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPrevTrunk.X23))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPrevTrunk.XpDbPage))
+ if _rc != int32(0) {
goto _end_allocate_page
}
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPrevTrunk.X19))+1*uintptr(i32(0))))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(i32(0))))), uint32(i32(4)))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_pPrevTrunk.XaData, 0)), unsafe.Pointer(elem15(_pTrunk.XaData, 0)), uint32(4))
_45:
goto _47
_43:
- _22_iNewTrunk = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(i32(8)))))
+ _22_iNewTrunk = _sqlite3Get4byte(tls, elem15(_pTrunk.XaData, uintptr(8)))
if _22_iNewTrunk > _mxPage {
- _rc = _sqlite3CorruptError(tls, i32(64818))
+ _rc = _sqlite3CorruptError(tls, int32(64818))
goto _end_allocate_page
}
- _rc = _btreeGetUnusedPage(tls, _pBt, _22_iNewTrunk, &_22_pNewTrunk, i32(0))
- if _rc != i32(0) {
+ _rc = _btreeGetUnusedPage(tls, _pBt, _22_iNewTrunk, &_22_pNewTrunk, int32(0))
+ if _rc != int32(0) {
goto _end_allocate_page
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_22_pNewTrunk.X23))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_22_pNewTrunk.XpDbPage))
+ if _rc != int32(0) {
_releasePage(tls, _22_pNewTrunk)
goto _end_allocate_page
}
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_22_pNewTrunk.X19))+1*uintptr(i32(0))))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(i32(0))))), uint32(i32(4)))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_22_pNewTrunk.X19))+1*uintptr(i32(4)))), _k-uint32(i32(1)))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_22_pNewTrunk.X19))+1*uintptr(i32(8))))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(i32(12))))), (_k-uint32(i32(1)))*uint32(i32(4)))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_22_pNewTrunk.XaData, 0)), unsafe.Pointer(elem15(_pTrunk.XaData, 0)), uint32(4))
+ _sqlite3Put4byte(tls, elem15(_22_pNewTrunk.XaData, uintptr(4)), _k-uint32(1))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_22_pNewTrunk.XaData, uintptr(8))), unsafe.Pointer(elem15(_pTrunk.XaData, uintptr(12))), (_k-uint32(1))*uint32(4))
_releasePage(tls, _22_pNewTrunk)
if _pPrevTrunk == nil {
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage1.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64836), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54649)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage1.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64836), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54625)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(32)))), _22_iNewTrunk)
+ _sqlite3Put4byte(tls, elem15(_pPage1.XaData, uintptr(32)), _22_iNewTrunk)
goto _54
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPrevTrunk.X23))
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPrevTrunk.XpDbPage))
if _rc != 0 {
goto _end_allocate_page
}
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPrevTrunk.X19))+1*uintptr(i32(0)))), _22_iNewTrunk)
+ _sqlite3Put4byte(tls, elem15(_pPrevTrunk.XaData, 0), _22_iNewTrunk)
_54:
_47:
_pTrunk = nil
goto _57
_41:
- if _k <= uint32(i32(0)) {
+ if _k <= (0) {
goto _57
}
- _29_aData = _pTrunk.X19
- if _nearby <= uint32(i32(0)) {
+ _29_aData = _pTrunk.XaData
+ if _nearby <= (0) {
goto _58
}
- _29_closest = uint32(i32(0))
- if int32(_eMode) != i32(2) {
+ _29_closest = 0
+ if int32(_eMode) != int32(2) {
goto _59
}
- _30_i = uint32(i32(0))
+ _30_i = 0
_60:
if _30_i >= _k {
goto _63
}
- _29_iPage = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_29_aData))+1*uintptr(uint32(i32(8))+(_30_i*uint32(i32(4)))))))
+ _29_iPage = _sqlite3Get4byte(tls, elem15(_29_aData, uintptr(uint32(8)+(_30_i*uint32(4)))))
if _29_iPage <= _nearby {
_29_closest = _30_i
goto _63
@@ -40776,13 +41468,13 @@ _60:
_63:
goto _65
_59:
- _34_dist = _sqlite3AbsInt32(tls, int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_29_aData))+1*uintptr(i32(8)))))-_nearby))
- _30_i = uint32(i32(1))
+ _34_dist = _sqlite3AbsInt32(tls, int32(_sqlite3Get4byte(tls, elem15(_29_aData, uintptr(8)))-_nearby))
+ _30_i = uint32(1)
_66:
if _30_i >= _k {
goto _69
}
- _35_d2 = _sqlite3AbsInt32(tls, int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_29_aData))+1*uintptr(uint32(i32(8))+(_30_i*uint32(i32(4)))))))-_nearby))
+ _35_d2 = _sqlite3AbsInt32(tls, int32(_sqlite3Get4byte(tls, elem15(_29_aData, uintptr(uint32(8)+(_30_i*uint32(4)))))-_nearby))
if _35_d2 < _34_dist {
_29_closest = _30_i
_34_dist = _35_d2
@@ -40793,42 +41485,42 @@ _69:
_65:
goto _71
_58:
- _29_closest = uint32(i32(0))
+ _29_closest = 0
_71:
- _29_iPage = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_29_aData))+1*uintptr(uint32(i32(8))+(_29_closest*uint32(i32(4)))))))
+ _29_iPage = _sqlite3Get4byte(tls, elem15(_29_aData, uintptr(uint32(8)+(_29_closest*uint32(4)))))
if _29_iPage > _mxPage {
- _rc = _sqlite3CorruptError(tls, i32(64883))
+ _rc = _sqlite3CorruptError(tls, int32(64883))
goto _end_allocate_page
}
- if _2_searchList != 0 && (_29_iPage != _nearby && (_29_iPage >= _nearby || int32(_eMode) != i32(2))) {
+ if _2_searchList != 0 && (_29_iPage != _nearby && (_29_iPage >= _nearby || int32(_eMode) != int32(2))) {
goto _76
}
*_pPgno = _29_iPage
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pTrunk.X23))
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pTrunk.XpDbPage))
if _rc != 0 {
goto _end_allocate_page
}
- if _29_closest < (_k - uint32(i32(1))) {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_29_aData))+1*uintptr(uint32(i32(8))+(_29_closest*uint32(i32(4))))))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_29_aData))+1*uintptr(uint32(i32(4))+(_k*uint32(i32(4))))))), uint32(i32(4)))
+ if _29_closest < (_k - uint32(1)) {
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_29_aData, uintptr(uint32(8)+(_29_closest*uint32(4))))), unsafe.Pointer(elem15(_29_aData, uintptr(uint32(4)+(_k*uint32(4))))), uint32(4))
}
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_29_aData))+1*uintptr(i32(4)))), _k-uint32(i32(1)))
+ _sqlite3Put4byte(tls, elem15(_29_aData, uintptr(4)), _k-uint32(1))
_39_noContent = func() int32 {
if _btreeGetHasContent(tls, _pBt, *_pPgno) == 0 {
- return i32(1)
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}()
_rc = _btreeGetUnusedPage(tls, _pBt, *_pPgno, _ppPage, _39_noContent)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _81
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*_ppPage).X23))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*_ppPage).XpDbPage))
+ if _rc != int32(0) {
_releasePage(tls, *_ppPage)
*_ppPage = nil
}
_81:
- _2_searchList = uint8(i32(0))
+ _2_searchList = 0
_76:
_57:
_releasePage(tls, _pPrevTrunk)
@@ -40839,47 +41531,47 @@ _57:
goto _83
_7:
_43_bNoContent = func() int32 {
- if i32(0) == int32(_pBt.X7) {
- return i32(1)
+ if int32(0) == int32(_pBt.XbDoTruncate) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}()
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.X3).X23))
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.XpPage1).XpDbPage))
if _rc != 0 {
return _rc
}
- *(*uint32)(unsafe.Pointer(&(_pBt.X18))) += 1
- if (_pBt.X18) == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1))) {
- *(*uint32)(unsafe.Pointer(&(_pBt.X18))) += 1
+ _pBt.XnPage += 1
+ if _pBt.XnPage == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1)) {
+ _pBt.XnPage += 1
}
- if (_pBt.X5) == 0 || _ptrmapPageno(tls, _pBt, _pBt.X18) != (_pBt.X18) {
+ if _pBt.XautoVacuum == 0 || _ptrmapPageno(tls, _pBt, _pBt.XnPage) != _pBt.XnPage {
goto _89
}
_44_pPg = nil
func() {
- if (_pBt.X18) == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64950), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54690)))
+ if _pBt.XnPage == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64950), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54666)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _btreeGetUnusedPage(tls, _pBt, _pBt.X18, &_44_pPg, _43_bNoContent)
- if _rc == i32(0) {
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_44_pPg.X23))
+ _rc = _btreeGetUnusedPage(tls, _pBt, _pBt.XnPage, &_44_pPg, _43_bNoContent)
+ if _rc == int32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_44_pPg.XpDbPage))
_releasePage(tls, _44_pPg)
}
if _rc != 0 {
return _rc
}
- *(*uint32)(unsafe.Pointer(&(_pBt.X18))) += 1
- if (_pBt.X18) == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1))) {
- *(*uint32)(unsafe.Pointer(&(_pBt.X18))) += 1
+ _pBt.XnPage += 1
+ if _pBt.XnPage == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1)) {
+ _pBt.XnPage += 1
}
_89:
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(28))))))+uintptr(unsafe.Pointer((*XMemPage)(_pBt.X3).X19)))), _pBt.X18)
- *_pPgno = _pBt.X18
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(int32(28))+uintptr(unsafe.Pointer((*XMemPage)(_pBt.XpPage1).XaData)))), _pBt.XnPage)
+ *_pPgno = _pBt.XnPage
func() {
- if (*_pPgno) == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64964), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54725)))
+ if (*_pPgno) == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64964), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54701)))
crt.X__builtin_abort(tls)
}
}()
@@ -40887,15 +41579,15 @@ _89:
if _rc != 0 {
return _rc
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*_ppPage).X23))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*_ppPage).XpDbPage))
+ if _rc != int32(0) {
_releasePage(tls, *_ppPage)
*_ppPage = nil
}
_83:
func() {
- if (*_pPgno) == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64975), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54725)))
+ if (*_pPgno) == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64975), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54701)))
crt.X__builtin_abort(tls)
}
}()
@@ -40903,14 +41595,14 @@ _end_allocate_page:
_releasePage(tls, _pTrunk)
_releasePage(tls, _pPrevTrunk)
func() {
- if _rc == i32(0) && _sqlite3PagerPageRefcount(tls, (*XPgHdr)((*_ppPage).X23)) > i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64980), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54756)))
+ if _rc == int32(0) && _sqlite3PagerPageRefcount(tls, (*XPgHdr)((*_ppPage).XpDbPage)) > int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64980), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54732)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc == i32(0) && int32((*_ppPage).X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64981), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000))), unsafe.Pointer(str(54821)))
+ if _rc == int32(0) && int32((*_ppPage).XisInit) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64981), unsafe.Pointer(&_allocateBtreePageØ00__func__Ø000), unsafe.Pointer(str(54797)))
crt.X__builtin_abort(tls)
}
}()
@@ -40923,28 +41615,31 @@ _end_allocate_page:
var _allocateBtreePageØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_allocateBtreePageØ00__func__Ø000[0], str(54859), 18)
+ crt.Xstrncpy(nil, &_allocateBtreePageØ00__func__Ø000[0], str(54835), 18)
}
-// Get an unused page.
-//
-// This works just like btreeGetPage() with the addition:
-//
-// * If the page is already in use for some other purpose, immediately
-// release it and return an SQLITE_CURRUPT error.
-// * Make sure the isInit flag is clear
+// C comment
+// /*
+// ** Get an unused page.
+// **
+// ** This works just like btreeGetPage() with the addition:
+// **
+// ** * If the page is already in use for some other purpose, immediately
+// ** release it and return an SQLITE_CURRUPT error.
+// ** * Make sure the isInit flag is clear
+// */
func _btreeGetUnusedPage(tls *crt.TLS, _pBt *XBtShared, _pgno uint32, _ppPage **XMemPage, _flags int32) (r0 int32) {
var _rc int32
_rc = _btreeGetPage(tls, _pBt, _pgno, _ppPage, _flags)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _0
}
- if _sqlite3PagerPageRefcount(tls, (*XPgHdr)((*_ppPage).X23)) > i32(1) {
+ if _sqlite3PagerPageRefcount(tls, (*XPgHdr)((*_ppPage).XpDbPage)) > int32(1) {
_releasePage(tls, *_ppPage)
*_ppPage = nil
- return _sqlite3CorruptError(tls, i32(61159))
+ return _sqlite3CorruptError(tls, int32(61159))
}
- *(*uint8)(unsafe.Pointer(&((*_ppPage).X0))) = uint8(i32(0))
+ (*_ppPage).XisInit = 0
goto _2
_0:
*_ppPage = nil
@@ -40952,111 +41647,126 @@ _2:
return _rc
}
-// Return the number of references to the specified page.
+// C comment
+// /*
+// ** Return the number of references to the specified page.
+// */
func _sqlite3PagerPageRefcount(tls *crt.TLS, _pPage *XPgHdr) (r0 int32) {
return _sqlite3PcachePageRefcount(tls, _pPage)
}
-// Compute the absolute value of a 32-bit signed integer, of possible. Or
-// if the integer has a value of -2147483648, return +2147483647
+// C comment
+// /*
+// ** Compute the absolute value of a 32-bit signed integer, of possible. Or
+// ** if the integer has a value of -2147483648, return +2147483647
+// */
func _sqlite3AbsInt32(tls *crt.TLS, _x int32) (r0 int32) {
- if _x >= i32(0) {
+ if _x >= int32(0) {
return _x
}
- if _x == i32(-2147483648) {
- return i32(2147483647)
+ if _x == int32(-2147483648) {
+ return int32(2147483647)
}
return -_x
}
-// Query the BtShared.pHasContent vector.
-//
-// This function is called when a free-list leaf page is removed from the
-// free-list for reuse. It returns false if it is safe to retrieve the
-// page from the pager layer with the 'no-content' flag set. True otherwise.
+// C comment
+// /*
+// ** Query the BtShared.pHasContent vector.
+// **
+// ** This function is called when a free-list leaf page is removed from the
+// ** free-list for reuse. It returns false if it is safe to retrieve the
+// ** page from the pager layer with the 'no-content' flag set. True otherwise.
+// */
func _btreeGetHasContent(tls *crt.TLS, _pBt *XBtShared, _pgno uint32) (r0 int32) {
var _p *XBitvec
- _p = (*XBitvec)(_pBt.X22)
+ _p = (*XBitvec)(_pBt.XpHasContent)
return bool2int((_p != nil) && ((_pgno > _sqlite3BitvecSize(tls, _p)) || _sqlite3BitvecTest(tls, _p, _pgno) != 0))
}
-// Return the value of the iSize parameter specified when Bitvec *p
-// was created.
+// C comment
+// /*
+// ** Return the value of the iSize parameter specified when Bitvec *p
+// ** was created.
+// */
func _sqlite3BitvecSize(tls *crt.TLS, _p *XBitvec) (r0 uint32) {
- return _p.X0
-}
-
-// Move the open database page pDbPage to location iFreePage in the
-// database. The pDbPage reference remains valid.
-//
-// The isCommit flag indicates that there is no need to remember that
-// the journal needs to be sync()ed before database page pDbPage->pgno
-// can be written to. The caller has already promised not to write to that
-// page.
+ return _p.XiSize
+}
+
+// C comment
+// /*
+// ** Move the open database page pDbPage to location iFreePage in the
+// ** database. The pDbPage reference remains valid.
+// **
+// ** The isCommit flag indicates that there is no need to remember that
+// ** the journal needs to be sync()ed before database page pDbPage->pgno
+// ** can be written to. The caller has already promised not to write to that
+// ** page.
+// */
func _relocatePage(tls *crt.TLS, _pBt *XBtShared, _pDbPage *XMemPage, _eType uint8, _iPtrPage uint32, _iFreePage uint32, _isCommit int32) (r0 int32) {
var _rc int32
var _iDbPage, _4_nextOvfl uint32
var _pPager *XPager
var _pPtrPage *XMemPage
- _iDbPage = _pDbPage.X4
- _pPager = (*XPager)(_pBt.X0)
+ _iDbPage = _pDbPage.Xpgno
+ _pPager = (*XPager)(_pBt.XpPager)
func() {
- if int32(_eType) != i32(4) && int32(_eType) != i32(3) && int32(_eType) != i32(5) && int32(_eType) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62508), unsafe.Pointer((*int8)(unsafe.Pointer(&_relocatePageØ00__func__Ø000))), unsafe.Pointer(str(54877)))
+ if int32(_eType) != int32(4) && int32(_eType) != int32(3) && int32(_eType) != int32(5) && int32(_eType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62508), unsafe.Pointer(&_relocatePageØ00__func__Ø000), unsafe.Pointer(str(54853)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62510), unsafe.Pointer((*int8)(unsafe.Pointer(&_relocatePageØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62510), unsafe.Pointer(&_relocatePageØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtShared)(_pDbPage.X18) != _pBt {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62511), unsafe.Pointer((*int8)(unsafe.Pointer(&_relocatePageØ00__func__Ø000))), unsafe.Pointer(str(54977)))
+ if (*XBtShared)(_pDbPage.XpBt) != _pBt {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62511), unsafe.Pointer(&_relocatePageØ00__func__Ø000), unsafe.Pointer(str(54953)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerMovepage(tls, _pPager, (*XPgHdr)(_pDbPage.X23), _iFreePage, _isCommit)
- if _rc != i32(0) {
+ _rc = _sqlite3PagerMovepage(tls, _pPager, (*XPgHdr)(_pDbPage.XpDbPage), _iFreePage, _isCommit)
+ if _rc != int32(0) {
return _rc
}
- *(*uint32)(unsafe.Pointer(&(_pDbPage.X4))) = _iFreePage
- if int32(_eType) != i32(5) && int32(_eType) != i32(1) {
+ _pDbPage.Xpgno = _iFreePage
+ if int32(_eType) != int32(5) && int32(_eType) != int32(1) {
goto _11
}
_rc = _setChildPtrmaps(tls, _pDbPage)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
goto _13
_11:
- _4_nextOvfl = _sqlite3Get4byte(tls, _pDbPage.X19)
- if _4_nextOvfl == uint32(i32(0)) {
+ _4_nextOvfl = _sqlite3Get4byte(tls, _pDbPage.XaData)
+ if _4_nextOvfl == (0) {
goto _14
}
- _ptrmapPut(tls, _pBt, _4_nextOvfl, uint8(i32(4)), _iFreePage, &_rc)
- if _rc != i32(0) {
+ _ptrmapPut(tls, _pBt, _4_nextOvfl, uint8(4), _iFreePage, &_rc)
+ if _rc != int32(0) {
return _rc
}
_14:
_13:
- if int32(_eType) == i32(1) {
+ if int32(_eType) == int32(1) {
goto _16
}
- _rc = _btreeGetPage(tls, _pBt, _iPtrPage, &_pPtrPage, i32(0))
- if _rc != i32(0) {
+ _rc = _btreeGetPage(tls, _pBt, _iPtrPage, &_pPtrPage, int32(0))
+ if _rc != int32(0) {
return _rc
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPtrPage.X23))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPtrPage.XpDbPage))
+ if _rc != int32(0) {
_releasePage(tls, _pPtrPage)
return _rc
}
_rc = _modifyPagePointer(tls, _pPtrPage, _iDbPage, _iFreePage, _eType)
_releasePage(tls, _pPtrPage)
- if _rc == i32(0) {
+ if _rc == int32(0) {
_ptrmapPut(tls, _pBt, _iFreePage, _eType, _iPtrPage, &_rc)
}
_16:
@@ -41066,62 +41776,65 @@ _16:
var _relocatePageØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_relocatePageØ00__func__Ø000[0], str(54995), 13)
-}
-
-// Move the page pPg to location pgno in the file.
-//
-// There must be no references to the page previously located at
-// pgno (which we call pPgOld) though that page is allowed to be
-// in cache. If the page previously located at pgno is not already
-// in the rollback journal, it is not put there by by this routine.
-//
-// References to the page pPg remain valid. Updating any
-// meta-data associated with pPg (i.e. data stored in the nExtra bytes
-// allocated along with the page) is the responsibility of the caller.
-//
-// A transaction must be active when this routine is called. It used to be
-// required that a statement transaction was not active, but this restriction
-// has been removed (CREATE INDEX needs to move a page when a statement
-// transaction is active).
-//
-// If the fourth argument, isCommit, is non-zero, then this page is being
-// moved as part of a database reorganization just before the transaction
-// is being committed. In this case, it is guaranteed that the database page
-// pPg refers to will not be written to again within this transaction.
-//
-// This function may return SQLITE_NOMEM or an IO error code if an error
-// occurs. Otherwise, it returns SQLITE_OK.
+ crt.Xstrncpy(nil, &_relocatePageØ00__func__Ø000[0], str(54971), 13)
+}
+
+// C comment
+// /*
+// ** Move the page pPg to location pgno in the file.
+// **
+// ** There must be no references to the page previously located at
+// ** pgno (which we call pPgOld) though that page is allowed to be
+// ** in cache. If the page previously located at pgno is not already
+// ** in the rollback journal, it is not put there by by this routine.
+// **
+// ** References to the page pPg remain valid. Updating any
+// ** meta-data associated with pPg (i.e. data stored in the nExtra bytes
+// ** allocated along with the page) is the responsibility of the caller.
+// **
+// ** A transaction must be active when this routine is called. It used to be
+// ** required that a statement transaction was not active, but this restriction
+// ** has been removed (CREATE INDEX needs to move a page when a statement
+// ** transaction is active).
+// **
+// ** If the fourth argument, isCommit, is non-zero, then this page is being
+// ** moved as part of a database reorganization just before the transaction
+// ** is being committed. In this case, it is guaranteed that the database page
+// ** pPg refers to will not be written to again within this transaction.
+// **
+// ** This function may return SQLITE_NOMEM or an IO error code if an error
+// ** occurs. Otherwise, it returns SQLITE_OK.
+// */
func _sqlite3PagerMovepage(tls *crt.TLS, _pPager *XPager, _pPg *XPgHdr, _pgno uint32, _isCommit int32) (r0 int32) {
var _rc int32
var _needSyncPgno, _origPgno uint32
var _pPgOld, _8_pPgHdr *XPgHdr
- _needSyncPgno = u32(0)
+ _needSyncPgno = uint32(0)
func() {
- if int32(_pPg.X7) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53886), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000))), unsafe.Pointer(str(55008)))
+ if int32(_pPg.XnRef) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53886), unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000), unsafe.Pointer(str(54984)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) != i32(3) && int32(_pPager.X14) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53887), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000))), unsafe.Pointer(str(55020)))
+ if int32(_pPager.XeState) != int32(3) && int32(_pPager.XeState) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53887), unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000), unsafe.Pointer(str(54996)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53890), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53890), unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X10) == 0 && (_pPager.X13) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53895), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000))), unsafe.Pointer(str(55096)))
+ if _pPager.XtempFile == 0 && _pPager.XmemDb != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53895), unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000), unsafe.Pointer(str(55072)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X10) == 0 {
+ if _pPager.XtempFile == 0 {
goto _10
}
_rc = _sqlite3PagerWrite(tls, _pPg)
@@ -41129,33 +41842,32 @@ func _sqlite3PagerMovepage(tls *crt.TLS, _pPager *XPager, _pPg *XPgHdr, _pgno ui
return _rc
}
_10:
- if ((int32(_pPg.X6) & i32(2)) != i32(0)) && (i32(0) != store1(&_rc, _subjournalPageIfRequired(tls, _pPg))) {
+ if ((int32(_pPg.Xflags) & int32(2)) != int32(0)) && (int32(0) != store2(&_rc, _subjournalPageIfRequired(tls, _pPg))) {
return _rc
}
- if (int32(_pPg.X6)&i32(8)) != 0 && (_isCommit == 0) {
- _needSyncPgno = _pPg.X5
+ if (int32(_pPg.Xflags)&int32(8)) != 0 && (_isCommit == 0) {
+ _needSyncPgno = _pPg.Xpgno
func() {
- if int32(_pPager.X2) != i32(2) && _pageInJournal(tls, _pPager, _pPg) == 0 && (_pPg.X5) <= (_pPager.X23) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53938), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000))), unsafe.Pointer(str(55123)))
+ if int32(_pPager.XjournalMode) != int32(2) && _pageInJournal(tls, _pPager, _pPg) == 0 && _pPg.Xpgno <= _pPager.XdbOrigSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53938), unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000), unsafe.Pointer(str(55099)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pPg.X6) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53940), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000))), unsafe.Pointer(str(54035)))
+ if (int32(_pPg.Xflags) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53940), unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000), unsafe.Pointer(str(54011)))
crt.X__builtin_abort(tls)
}
}()
}
{
- p := (*uint16)(unsafe.Pointer(&(_pPg.X6)))
- *p = uint16(int32(*p) & i32(-9))
- sink14(*p)
+ p := &_pPg.Xflags
+ *p = uint16(int32(*p) & int32(-9))
}
_pPgOld = _sqlite3PagerLookup(tls, _pPager, _pgno)
func() {
- if _pPgOld != nil && int32(_pPgOld.X7) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53950), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000))), unsafe.Pointer(str(55228)))
+ if _pPgOld != nil && int32(_pPgOld.XnRef) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53950), unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000), unsafe.Pointer(str(55204)))
crt.X__builtin_abort(tls)
}
}()
@@ -41163,101 +41875,106 @@ _10:
goto _25
}
{
- p := (*uint16)(unsafe.Pointer(&(_pPg.X6)))
- *p = uint16(int32(*p) | (int32(_pPgOld.X6) & i32(8)))
- sink14(*p)
+ p := &_pPg.Xflags
+ *p = uint16(int32(*p) | (int32(_pPgOld.Xflags) & int32(8)))
}
- if (_pPager.X10) != 0 {
- _sqlite3PcacheMove(tls, _pPgOld, (_pPager.X22)+uint32(i32(1)))
+ if _pPager.XtempFile != 0 {
+ _sqlite3PcacheMove(tls, _pPgOld, _pPager.XdbSize+uint32(1))
goto _27
}
_sqlite3PcacheDrop(tls, _pPgOld)
_27:
_25:
- _origPgno = _pPg.X5
+ _origPgno = _pPg.Xpgno
_sqlite3PcacheMove(tls, _pPg, _pgno)
_sqlite3PcacheMakeDirty(tls, _pPg)
- if ((_pPager.X10) != 0) && (_pPgOld != nil) {
+ if (_pPager.XtempFile != 0) && (_pPgOld != nil) {
_sqlite3PcacheMove(tls, _pPgOld, _origPgno)
_sqlite3PagerUnrefNotNull(tls, _pPgOld)
}
if _needSyncPgno == 0 {
goto _30
}
- _rc = _sqlite3PagerGet(tls, _pPager, _needSyncPgno, &_8_pPgHdr, i32(0))
- if _rc == i32(0) {
+ _rc = _sqlite3PagerGet(tls, _pPager, _needSyncPgno, &_8_pPgHdr, int32(0))
+ if _rc == int32(0) {
goto _31
}
- if _needSyncPgno <= (_pPager.X23) {
+ if _needSyncPgno <= _pPager.XdbOrigSize {
func() {
- if (_pPager.X58) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53994), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000))), unsafe.Pointer(str(55255)))
+ if _pPager.XpTmpSpace == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53994), unsafe.Pointer(&_sqlite3PagerMovepageØ00__func__Ø000), unsafe.Pointer(str(55231)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3BitvecClear(tls, (*XBitvec)(_pPager.X30), _needSyncPgno, (unsafe.Pointer)(_pPager.X58))
+ _sqlite3BitvecClear(tls, (*XBitvec)(_pPager.XpInJournal), _needSyncPgno, unsafe.Pointer(_pPager.XpTmpSpace))
}
return _rc
_31:
{
- p := (*uint16)(unsafe.Pointer(&(_8_pPgHdr.X6)))
- *p = uint16(int32(*p) | i32(8))
- sink14(*p)
+ p := &_8_pPgHdr.Xflags
+ *p = uint16(int32(*p) | int32(8))
}
_sqlite3PcacheMakeDirty(tls, _8_pPgHdr)
_sqlite3PagerUnrefNotNull(tls, _8_pPgHdr)
_30:
- return i32(0)
+ return int32(0)
}
var _sqlite3PagerMovepageØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerMovepageØ00__func__Ø000[0], str(55276), 21)
+ crt.Xstrncpy(nil, &_sqlite3PagerMovepageØ00__func__Ø000[0], str(55252), 21)
}
-// Change the page number of page p to newPgno.
+// C comment
+// /*
+// ** Change the page number of page p to newPgno.
+// */
func _sqlite3PcacheMove(tls *crt.TLS, _p *XPgHdr, _newPgno uint32) {
var _pCache *XPCache
- _pCache = (*XPCache)(_p.X8)
+ _pCache = (*XPCache)(_p.XpCache)
func() {
- if int32(_p.X7) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44751), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMoveØ00__func__Ø000))), unsafe.Pointer(str(13857)))
+ if int32(_p.XnRef) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44751), unsafe.Pointer(&_sqlite3PcacheMoveØ00__func__Ø000), unsafe.Pointer(str(13812)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _newPgno <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44752), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMoveØ00__func__Ø000))), unsafe.Pointer(str(55297)))
+ if _newPgno <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44752), unsafe.Pointer(&_sqlite3PcacheMoveØ00__func__Ø000), unsafe.Pointer(str(55273)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3PcachePageSanity(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44753), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheMoveØ00__func__Ø000))), unsafe.Pointer(str(13867)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44753), unsafe.Pointer(&_sqlite3PcacheMoveØ00__func__Ø000), unsafe.Pointer(str(13822)))
crt.X__builtin_abort(tls)
}
}()
- (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, uint32, uint32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint32, uint32)
- }{((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X9)})))(tls, _pCache.X12, (*Xsqlite3_pcache_page)(_p.X0), _p.X5, _newPgno)
- *(*uint32)(unsafe.Pointer(&(_p.X5))) = _newPgno
- if (int32(_p.X6)&i32(2)) != 0 && (int32(_p.X6)&i32(8)) != 0 {
- _pcacheManageDirtyList(tls, _p, uint8(i32(3)))
+ func() func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, uint32, uint32) {
+ v := _sqlite3Config.Xpcache2.XxRekey
+ return *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3_pcache_page, uint32, uint32))(unsafe.Pointer(&v))
+ }()(tls, _pCache.XpCache, (*Xsqlite3_pcache_page)(_p.XpPage), _p.Xpgno, _newPgno)
+ _p.Xpgno = _newPgno
+ if (int32(_p.Xflags)&int32(2)) != 0 && (int32(_p.Xflags)&int32(8)) != 0 {
+ _pcacheManageDirtyList(tls, _p, uint8(3))
}
}
var _sqlite3PcacheMoveØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheMoveØ00__func__Ø000[0], str(55307), 18)
+ crt.Xstrncpy(nil, &_sqlite3PcacheMoveØ00__func__Ø000[0], str(55283), 18)
}
-// Clear the i-th bit.
-//
-// pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage
-// that BitvecClear can use to rebuilt its hash table.
+// C comment
+// /*
+// ** Clear the i-th bit.
+// **
+// ** pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage
+// ** that BitvecClear can use to rebuilt its hash table.
+// */
func _sqlite3BitvecClear(tls *crt.TLS, _p *XBitvec, _i uint32, _pBuf unsafe.Pointer) {
var _1_bin, _4_j, _6_h uint32
var _4_aiValues *uint32
@@ -41265,57 +41982,56 @@ func _sqlite3BitvecClear(tls *crt.TLS, _p *XBitvec, _i uint32, _pBuf unsafe.Poin
return
}
func() {
- if _i <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(43951), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BitvecClearØ00__func__Ø000))), unsafe.Pointer(str(12970)))
+ if _i <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(43951), unsafe.Pointer(&_sqlite3BitvecClearØ00__func__Ø000), unsafe.Pointer(str(12925)))
crt.X__builtin_abort(tls)
}
}()
_i -= 1
_3:
- if (_p.X2) == 0 {
+ if _p.XiDivisor == 0 {
goto _4
}
- _1_bin = _i / (_p.X2)
- _i = _i % (_p.X2)
- _p = *(**XBitvec)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]unsafe.Pointer)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_1_bin)))
+ _1_bin = _i / _p.XiDivisor
+ _i = _i % _p.XiDivisor
+ _p = *elem32((**XBitvec)(unsafe.Pointer((*[125]unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))), uintptr(_1_bin))
if _p == nil {
return
}
goto _3
_4:
- if (_p.X0) <= u32(4000) {
+ if _p.XiSize <= uint32(4000) {
{
- p := (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[500]uint8)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 1*uintptr(_i/uint32(i32(8)))))
- *p = uint8(int32(*p) & (^(i32(1) << uint(int32(_i&uint32(i32(7)))))))
- sink2(*p)
+ p := elem15((*uint8)(unsafe.Pointer((*[500]uint8)(unsafe.Pointer(&_p.Xu)))), uintptr(_i/uint32(8)))
+ *p = uint8(int32(*p) & (^(int32(1) << uint(int32(_i&uint32(7))))))
}
goto _7
}
_4_aiValues = (*uint32)(_pBuf)
- crt.Xmemcpy(tls, (unsafe.Pointer)(_4_aiValues), (unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3)))))), u32(500))
- crt.Xmemset(tls, (unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3)))))), i32(0), u32(500))
- *(*uint32)(unsafe.Pointer(&(_p.X1))) = uint32(i32(0))
- _4_j = uint32(i32(0))
+ crt.Xmemcpy(tls, unsafe.Pointer(_4_aiValues), unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu))), uint32(500))
+ crt.Xmemset(tls, unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu))), int32(0), uint32(500))
+ _p.XnSet = 0
+ _4_j = 0
_8:
- if _4_j >= u32(125) {
+ if _4_j >= uint32(125) {
goto _11
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_4_aiValues)) + 4*uintptr(_4_j)))) == 0 || (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_4_aiValues)) + 4*uintptr(_4_j)))) == (_i+uint32(i32(1))) {
+ if (*elem7(_4_aiValues, uintptr(_4_j))) == 0 || (*elem7(_4_aiValues, uintptr(_4_j))) == (_i+uint32(1)) {
goto _13
}
- _6_h = (((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_4_aiValues)) + 4*uintptr(_4_j)))) - uint32(i32(1))) * uint32(i32(1))) % u32(125)
- *(*uint32)(unsafe.Pointer(&(_p.X1))) += 1
+ _6_h = (((*elem7(_4_aiValues, uintptr(_4_j))) - uint32(1)) * uint32(1)) % uint32(125)
+ _p.XnSet += 1
_14:
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_6_h)))) == 0 {
+ if (*elem7((*uint32)(unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu)))), uintptr(_6_h))) == 0 {
goto _15
}
_6_h += 1
- if _6_h >= u32(125) {
- _6_h = uint32(i32(0))
+ if _6_h >= uint32(125) {
+ _6_h = 0
}
goto _14
_15:
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[125]uint32)(unsafe.Pointer((*t22)(unsafe.Pointer(&(_p.X3))))))) + 4*uintptr(_6_h))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_4_aiValues)) + 4*uintptr(_4_j)))
+ *elem7((*uint32)(unsafe.Pointer((*[125]uint32)(unsafe.Pointer(&_p.Xu)))), uintptr(_6_h)) = *elem7(_4_aiValues, uintptr(_4_j))
_13:
_4_j += 1
goto _8
@@ -41326,47 +42042,50 @@ _7:
var _sqlite3BitvecClearØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BitvecClearØ00__func__Ø000[0], str(55325), 19)
+ crt.Xstrncpy(nil, &_sqlite3BitvecClearØ00__func__Ø000[0], str(55301), 19)
}
-// Set the pointer-map entries for all children of page pPage. Also, if
-// pPage contains cells that point to overflow pages, set the pointer
-// map entries for the overflow pages as well.
+// C comment
+// /*
+// ** Set the pointer-map entries for all children of page pPage. Also, if
+// ** pPage contains cells that point to overflow pages, set the pointer
+// ** map entries for the overflow pages as well.
+// */
func _setChildPtrmaps(tls *crt.TLS, _pPage *XMemPage) (r0 int32) {
var _i, _nCell, _rc int32
var _pgno, _2_childPgno, _3_childPgno uint32
var _1_pCell *uint8
var _pBt *XBtShared
- _pBt = (*XBtShared)(_pPage.X18)
- _pgno = _pPage.X4
+ _pBt = (*XBtShared)(_pPage.XpBt)
+ _pgno = _pPage.Xpgno
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62396), unsafe.Pointer((*int8)(unsafe.Pointer(&_setChildPtrmapsØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62396), unsafe.Pointer(&_setChildPtrmapsØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
_rc = _btreeInitPage(tls, _pPage)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- _nCell = int32(_pPage.X14)
- _i = i32(0)
+ _nCell = int32(_pPage.XnCell)
+ _i = int32(0)
_3:
if _i >= _nCell {
goto _6
}
- _1_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_i))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_i))))) + 1*uintptr(i32(1)))))))))))))
+ _1_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData)) + uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_i)), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_i)), uintptr(1)))))))
_ptrmapPutOvflPtr(tls, _pPage, _1_pCell, &_rc)
- if (_pPage.X5) == 0 {
+ if _pPage.Xleaf == 0 {
_2_childPgno = _sqlite3Get4byte(tls, _1_pCell)
- _ptrmapPut(tls, _pBt, _2_childPgno, uint8(i32(5)), _pgno, &_rc)
+ _ptrmapPut(tls, _pBt, _2_childPgno, uint8(5), _pgno, &_rc)
}
_i += 1
goto _3
_6:
- if (_pPage.X5) == 0 {
- _3_childPgno = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(int32(_pPage.X6)+i32(8)))))
- _ptrmapPut(tls, _pBt, _3_childPgno, uint8(i32(5)), _pgno, &_rc)
+ if _pPage.Xleaf == 0 {
+ _3_childPgno = _sqlite3Get4byte(tls, elem15(_pPage.XaData, uintptr(int32(_pPage.XhdrOffset)+int32(8))))
+ _ptrmapPut(tls, _pBt, _3_childPgno, uint8(5), _pgno, &_rc)
}
return _rc
}
@@ -41374,16 +42093,19 @@ _6:
var _setChildPtrmapsØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_setChildPtrmapsØ00__func__Ø000[0], str(55344), 16)
+ crt.Xstrncpy(nil, &_setChildPtrmapsØ00__func__Ø000[0], str(55320), 16)
}
-// Initialize the auxiliary information for a disk block.
-//
-// Return SQLITE_OK on success. If we see that the page does
-// not contain a well-formed database page, then return
-// SQLITE_CORRUPT. Note that a return of SQLITE_OK does not
-// guarantee that the page is well-formed. It only shows that
-// we failed to detect any corruption.
+// C comment
+// /*
+// ** Initialize the auxiliary information for a disk block.
+// **
+// ** Return SQLITE_OK on success. If we see that the page does
+// ** not contain a well-formed database page, then return
+// ** SQLITE_CORRUPT. Note that a return of SQLITE_OK does not
+// ** guarantee that the page is well-formed. It only shows that
+// ** we failed to detect any corruption.
+// */
func _btreeInitPage(tls *crt.TLS, _pPage *XMemPage) (r0 int32) {
var _1_pc, _1_usableSize, _1_nFree, _1_top, _1_iCellFirst, _1_iCellLast, _3_i, _3_sz int32
var _7_next, _7_size uint32
@@ -41392,150 +42114,154 @@ func _btreeInitPage(tls *crt.TLS, _pPage *XMemPage) (r0 int32) {
var _1_data *uint8
var _1_pBt *XBtShared
func() {
- if (*XBtShared)(_pPage.X18) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60819), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInitPageØ00__func__Ø000))), unsafe.Pointer(str(55360)))
+ if (*XBtShared)(_pPage.XpBt) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60819), unsafe.Pointer(&_btreeInitPageØ00__func__Ø000), unsafe.Pointer(str(55336)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)((*XBtShared)(_pPage.X18).X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60820), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInitPageØ00__func__Ø000))), unsafe.Pointer(str(55374)))
+ if (*Xsqlite3)((*XBtShared)(_pPage.XpBt).Xdb) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60820), unsafe.Pointer(&_btreeInitPageØ00__func__Ø000), unsafe.Pointer(str(55350)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60821), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInitPageØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60821), unsafe.Pointer(&_btreeInitPageØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPage.X4) != _sqlite3PagerPagenumber(tls, (*XPgHdr)(_pPage.X23)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60822), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInitPageØ00__func__Ø000))), unsafe.Pointer(str(55392)))
+ if _pPage.Xpgno != _sqlite3PagerPagenumber(tls, (*XPgHdr)(_pPage.XpDbPage)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60822), unsafe.Pointer(&_btreeInitPageØ00__func__Ø000), unsafe.Pointer(str(55368)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pPage != (*XMemPage)(_sqlite3PagerGetExtra(tls, (*XPgHdr)(_pPage.X23))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60823), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInitPageØ00__func__Ø000))), unsafe.Pointer(str(55444)))
+ if _pPage != (*XMemPage)(_sqlite3PagerGetExtra(tls, (*XPgHdr)(_pPage.XpDbPage))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60823), unsafe.Pointer(&_btreeInitPageØ00__func__Ø000), unsafe.Pointer(str(55420)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPage.X19) != (*uint8)(_sqlite3PagerGetData(tls, (*XPgHdr)(_pPage.X23))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60824), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInitPageØ00__func__Ø000))), unsafe.Pointer(str(55490)))
+ if _pPage.XaData != (*uint8)(_sqlite3PagerGetData(tls, (*XPgHdr)(_pPage.XpDbPage))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60824), unsafe.Pointer(&_btreeInitPageØ00__func__Ø000), unsafe.Pointer(str(55466)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPage.X0) != 0 {
+ if _pPage.XisInit != 0 {
goto _12
}
- _1_pBt = (*XBtShared)(_pPage.X18)
- _1_hdr = _pPage.X6
- _1_data = _pPage.X19
- if _decodeFlags(tls, _pPage, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data)) + 1*uintptr(_1_hdr))))) != 0 {
- return _sqlite3CorruptError(tls, i32(60844))
+ _1_pBt = (*XBtShared)(_pPage.XpBt)
+ _1_hdr = _pPage.XhdrOffset
+ _1_data = _pPage.XaData
+ if _decodeFlags(tls, _pPage, int32(*elem15(_1_data, uintptr(_1_hdr)))) != 0 {
+ return _sqlite3CorruptError(tls, int32(60844))
}
func() {
- if (_1_pBt.X15) < uint32(i32(512)) || (_1_pBt.X15) > uint32(i32(65536)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60845), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInitPageØ00__func__Ø000))), unsafe.Pointer(str(53374)))
+ if _1_pBt.XpageSize < uint32(512) || _1_pBt.XpageSize > uint32(65536) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60845), unsafe.Pointer(&_btreeInitPageØ00__func__Ø000), unsafe.Pointer(str(53350)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pPage.X15))) = uint16((_1_pBt.X15) - uint32(i32(1)))
- *(*uint8)(unsafe.Pointer(&(_pPage.X9))) = uint8(i32(0))
- _1_usableSize = int32(_1_pBt.X16)
- *(*uint16)(unsafe.Pointer(&(_pPage.X12))) = store14(&_1_cellOffset, uint16((int32(_1_hdr)+i32(8))+int32(_pPage.X7)))
- *(**uint8)(unsafe.Pointer(&(_pPage.X20))) = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data)) + 1*uintptr(_1_usableSize)))
- *(**uint8)(unsafe.Pointer(&(_pPage.X21))) = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data)) + 1*uintptr(_1_cellOffset)))
- *(**uint8)(unsafe.Pointer(&(_pPage.X22))) = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data)) + 1*uintptr(_pPage.X7)))
- _1_top = ((((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(int32(_1_hdr)+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(int32(_1_hdr)+i32(5)))))) + 1*uintptr(i32(1)))))) - i32(1)) & i32(65535)) + i32(1)
- *(*uint16)(unsafe.Pointer(&(_pPage.X14))) = uint16((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(int32(_1_hdr)+i32(3)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(int32(_1_hdr)+i32(3)))))) + 1*uintptr(i32(1))))))
- if uint32(_pPage.X14) > (((_1_pBt.X15) - uint32(i32(8))) / uint32(i32(6))) {
- return _sqlite3CorruptError(tls, i32(60862))
+ _pPage.XmaskPage = uint16(_1_pBt.XpageSize - uint32(1))
+ _pPage.XnOverflow = 0
+ _1_usableSize = int32(_1_pBt.XusableSize)
+ _pPage.XcellOffset = store76(&_1_cellOffset, uint16((int32(_1_hdr)+int32(8))+int32(_pPage.XchildPtrSize)))
+ _pPage.XaDataEnd = elem15(_1_data, uintptr(_1_usableSize))
+ _pPage.XaCellIdx = elem15(_1_data, uintptr(_1_cellOffset))
+ _pPage.XaDataOfst = elem15(_1_data, uintptr(_pPage.XchildPtrSize))
+ _1_top = ((((int32(*elem15(elem15(_1_data, uintptr(int32(_1_hdr)+int32(5))), 0)) << 8) | int32(*elem15(elem15(_1_data, uintptr(int32(_1_hdr)+int32(5))), uintptr(1)))) - int32(1)) & int32(65535)) + int32(1)
+ _pPage.XnCell = uint16((int32(*elem15(elem15(_1_data, uintptr(int32(_1_hdr)+int32(3))), 0)) << 8) | int32(*elem15(elem15(_1_data, uintptr(int32(_1_hdr)+int32(3))), uintptr(1))))
+ if uint32(_pPage.XnCell) > ((_1_pBt.XpageSize - uint32(8)) / uint32(6)) {
+ return _sqlite3CorruptError(tls, int32(60862))
}
func() {
- if int32(_pPage.X14) <= i32(0) && _1_top != _1_usableSize && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60869), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeInitPageØ00__func__Ø000))), unsafe.Pointer(str(55542)))
+ if int32(_pPage.XnCell) <= int32(0) && _1_top != _1_usableSize && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60869), unsafe.Pointer(&_btreeInitPageØ00__func__Ø000), unsafe.Pointer(str(55518)))
crt.X__builtin_abort(tls)
}
}()
- _1_iCellFirst = int32(_1_cellOffset) + (i32(2) * int32(_pPage.X14))
- _1_iCellLast = _1_usableSize - i32(4)
- if (((*Xsqlite3)(_1_pBt.X1).X6) & i32(536870912)) == 0 {
+ _1_iCellFirst = int32(_1_cellOffset) + (int32(2) * int32(_pPage.XnCell))
+ _1_iCellLast = _1_usableSize - int32(4)
+ if (((*Xsqlite3)(_1_pBt.Xdb).Xflags) & int32(536870912)) == 0 {
goto _22
}
- if (_pPage.X5) == 0 {
+ if _pPage.Xleaf == 0 {
_1_iCellLast -= 1
}
- _3_i = i32(0)
+ _3_i = int32(0)
_24:
- if _3_i >= int32(_pPage.X14) {
+ if _3_i >= int32(_pPage.XnCell) {
goto _27
}
- _1_pc = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(int32(_1_cellOffset)+(_3_i*i32(2))))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(int32(_1_cellOffset)+(_3_i*i32(2))))))) + 1*uintptr(i32(1)))))
+ _1_pc = (int32(*elem15(elem15(_1_data, uintptr(int32(_1_cellOffset)+(_3_i*int32(2)))), 0)) << 8) | int32(*elem15(elem15(_1_data, uintptr(int32(_1_cellOffset)+(_3_i*int32(2)))), uintptr(1)))
if (_1_pc < _1_iCellFirst) || (_1_pc > _1_iCellLast) {
- return _sqlite3CorruptError(tls, i32(60890))
+ return _sqlite3CorruptError(tls, int32(60890))
}
- _3_sz = int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pPage.X24)})))(tls, _pPage, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(_1_pc)))))
+ _3_sz = int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pPage.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pPage, elem15(_1_data, uintptr(_1_pc))))
if (_1_pc + _3_sz) > _1_usableSize {
- return _sqlite3CorruptError(tls, i32(60895))
+ return _sqlite3CorruptError(tls, int32(60895))
}
_3_i += 1
goto _24
_27:
- if (_pPage.X5) == 0 {
+ if _pPage.Xleaf == 0 {
_1_iCellLast += 1
}
_22:
- _1_pc = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(int32(_1_hdr)+i32(1)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(int32(_1_hdr)+i32(1)))))) + 1*uintptr(i32(1)))))
- _1_nFree = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data)) + 1*uintptr(int32(_1_hdr)+i32(7))))) + _1_top
- if _1_pc <= i32(0) {
+ _1_pc = (int32(*elem15(elem15(_1_data, uintptr(int32(_1_hdr)+int32(1))), 0)) << 8) | int32(*elem15(elem15(_1_data, uintptr(int32(_1_hdr)+int32(1))), uintptr(1)))
+ _1_nFree = int32(*elem15(_1_data, uintptr(int32(_1_hdr)+int32(7)))) + _1_top
+ if _1_pc <= int32(0) {
goto _32
}
if _1_pc < _1_iCellFirst {
- return _sqlite3CorruptError(tls, i32(60913))
+ return _sqlite3CorruptError(tls, int32(60913))
}
_33:
if _1_pc > _1_iCellLast {
- return _sqlite3CorruptError(tls, i32(60917))
+ return _sqlite3CorruptError(tls, int32(60917))
}
- _7_next = uint32((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(_1_pc))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(_1_pc))))) + 1*uintptr(i32(1))))))
- _7_size = uint32((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(_1_pc+i32(2)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_data))+1*uintptr(_1_pc+i32(2)))))) + 1*uintptr(i32(1))))))
+ _7_next = uint32((int32(*elem15(elem15(_1_data, uintptr(_1_pc)), 0)) << 8) | int32(*elem15(elem15(_1_data, uintptr(_1_pc)), uintptr(1))))
+ _7_size = uint32((int32(*elem15(elem15(_1_data, uintptr(_1_pc+int32(2))), 0)) << 8) | int32(*elem15(elem15(_1_data, uintptr(_1_pc+int32(2))), uintptr(1))))
_1_nFree = int32(uint32(_1_nFree) + _7_size)
- if _7_next <= ((uint32(_1_pc) + _7_size) + uint32(i32(3))) {
+ if _7_next <= ((uint32(_1_pc) + _7_size) + uint32(3)) {
goto _35
}
_1_pc = int32(_7_next)
goto _33
_35:
- if _7_next > uint32(i32(0)) {
- return _sqlite3CorruptError(tls, i32(60926))
+ if _7_next > (0) {
+ return _sqlite3CorruptError(tls, int32(60926))
}
if (uint32(_1_pc) + _7_size) > uint32(_1_usableSize) {
- return _sqlite3CorruptError(tls, i32(60929))
+ return _sqlite3CorruptError(tls, int32(60929))
}
_32:
if _1_nFree > _1_usableSize {
- return _sqlite3CorruptError(tls, i32(60941))
+ return _sqlite3CorruptError(tls, int32(60941))
}
- *(*uint16)(unsafe.Pointer(&(_pPage.X13))) = uint16(_1_nFree - _1_iCellFirst)
- *(*uint8)(unsafe.Pointer(&(_pPage.X0))) = uint8(i32(1))
+ _pPage.XnFree = uint16(_1_nFree - _1_iCellFirst)
+ _pPage.XisInit = uint8(1)
_12:
- return i32(0)
+ return int32(0)
}
var _btreeInitPageØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_btreeInitPageØ00__func__Ø000[0], str(55590), 14)
+ crt.Xstrncpy(nil, &_btreeInitPageØ00__func__Ø000[0], str(55566), 14)
}
-// If the cell pCell, part of page pPage contains a pointer
-// to an overflow page, insert an entry into the pointer-map
-// for the overflow page.
+// C comment
+// /*
+// ** If the cell pCell, part of page pPage contains a pointer
+// ** to an overflow page, insert an entry into the pointer-map
+// ** for the overflow page.
+// */
func _ptrmapPutOvflPtr(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pRC *int32) {
var _1_ovfl uint32
var _info XCellInfo
@@ -41544,34 +42270,37 @@ func _ptrmapPutOvflPtr(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pRC *int3
}
func() {
if _pCell == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60344), unsafe.Pointer((*int8)(unsafe.Pointer(&_ptrmapPutOvflPtrØ00__func__Ø000))), unsafe.Pointer(str(55604)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60344), unsafe.Pointer(&_ptrmapPutOvflPtrØ00__func__Ø000), unsafe.Pointer(str(55580)))
crt.X__builtin_abort(tls)
}
}()
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_pPage.X25)})))(tls, _pPage, _pCell, &_info)
- if uint32(_info.X3) < (_info.X2) {
- _1_ovfl = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell))+1*uintptr(int32(_info.X4)-i32(4)))))
- _ptrmapPut(tls, (*XBtShared)(_pPage.X18), _1_ovfl, uint8(i32(3)), _pPage.X4, _pRC)
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _pPage.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _pPage, _pCell, &_info)
+ if uint32(_info.XnLocal) < _info.XnPayload {
+ _1_ovfl = _sqlite3Get4byte(tls, elem15(_pCell, uintptr(int32(_info.XnSize)-int32(4))))
+ _ptrmapPut(tls, (*XBtShared)(_pPage.XpBt), _1_ovfl, uint8(3), _pPage.Xpgno, _pRC)
}
- _ = _info
}
var _ptrmapPutOvflPtrØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_ptrmapPutOvflPtrØ00__func__Ø000[0], str(55613), 17)
+ crt.Xstrncpy(nil, &_ptrmapPutOvflPtrØ00__func__Ø000[0], str(55589), 17)
}
-// Write an entry into the pointer map.
-//
-// This routine updates the pointer map entry for page number 'key'
-// so that it maps to type 'eType' and parent page number 'pgno'.
-//
-// If *pRC is initially non-zero (non-SQLITE_OK) then this routine is
-// a no-op. If an error occurs, the appropriate error code is written
-// into *pRC.
+// C comment
+// /*
+// ** Write an entry into the pointer map.
+// **
+// ** This routine updates the pointer map entry for page number 'key'
+// ** so that it maps to type 'eType' and parent page number 'pgno'.
+// **
+// ** If *pRC is initially non-zero (non-SQLITE_OK) then this routine is
+// ** a no-op. If an error occurs, the appropriate error code is written
+// ** into *pRC.
+// */
func _ptrmapPut(tls *crt.TLS, _pBt *XBtShared, _key uint32, _eType uint8, _parent uint32, _pRC *int32) {
var _offset, _rc int32
var _iPtrmap uint32
@@ -41581,52 +42310,52 @@ func _ptrmapPut(tls *crt.TLS, _pBt *XBtShared, _key uint32, _eType uint8, _paren
return
}
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59967), unsafe.Pointer((*int8)(unsafe.Pointer(&_ptrmapPutØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59967), unsafe.Pointer(&_ptrmapPutØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if i32(0) != bool2int(_ptrmapPageno(tls, _pBt, (uint32(_sqlite3PendingByte)/(_pBt.X15))+uint32(i32(1))) == ((uint32(_sqlite3PendingByte)/(_pBt.X15))+uint32(i32(1)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59969), unsafe.Pointer((*int8)(unsafe.Pointer(&_ptrmapPutØ00__func__Ø000))), unsafe.Pointer(str(55630)))
+ if int32(0) != bool2int(_ptrmapPageno(tls, _pBt, (uint32(_sqlite3PendingByte)/_pBt.XpageSize)+uint32(1)) == ((uint32(_sqlite3PendingByte)/_pBt.XpageSize)+uint32(1))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59969), unsafe.Pointer(&_ptrmapPutØ00__func__Ø000), unsafe.Pointer(str(55606)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pBt.X5) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59971), unsafe.Pointer((*int8)(unsafe.Pointer(&_ptrmapPutØ00__func__Ø000))), unsafe.Pointer(str(54378)))
+ if _pBt.XautoVacuum == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59971), unsafe.Pointer(&_ptrmapPutØ00__func__Ø000), unsafe.Pointer(str(54354)))
crt.X__builtin_abort(tls)
}
}()
- if _key == uint32(i32(0)) {
- *_pRC = _sqlite3CorruptError(tls, i32(59973))
+ if _key == (0) {
+ *_pRC = _sqlite3CorruptError(tls, int32(59973))
return
}
_iPtrmap = _ptrmapPageno(tls, _pBt, _key)
- _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.X0), _iPtrmap, &_pDbPage, i32(0))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.XpPager), _iPtrmap, &_pDbPage, int32(0))
+ if _rc != int32(0) {
*_pRC = _rc
return
}
- _offset = int32(uint32(i32(5)) * ((_key - _iPtrmap) - uint32(i32(1))))
- if _offset < i32(0) {
- *_pRC = _sqlite3CorruptError(tls, i32(59984))
+ _offset = int32(uint32(5) * ((_key - _iPtrmap) - uint32(1)))
+ if _offset < int32(0) {
+ *_pRC = _sqlite3CorruptError(tls, int32(59984))
goto _ptrmap_exit
}
func() {
- if _offset > (int32(_pBt.X16) - i32(5)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59987), unsafe.Pointer((*int8)(unsafe.Pointer(&_ptrmapPutØ00__func__Ø000))), unsafe.Pointer(str(20097)))
+ if _offset > (int32(_pBt.XusableSize) - int32(5)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59987), unsafe.Pointer(&_ptrmapPutØ00__func__Ø000), unsafe.Pointer(str(20052)))
crt.X__builtin_abort(tls)
}
}()
_pPtrmap = (*uint8)(_sqlite3PagerGetData(tls, _pDbPage))
- if int32(_eType) == int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPtrmap)) + 1*uintptr(_offset)))) && _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPtrmap))+1*uintptr(_offset+i32(1))))) == _parent {
+ if int32(_eType) == int32(*elem15(_pPtrmap, uintptr(_offset))) && _sqlite3Get4byte(tls, elem15(_pPtrmap, uintptr(_offset+int32(1)))) == _parent {
goto _ptrmap_exit
}
- *_pRC = store1(&_rc, _sqlite3PagerWrite(tls, _pDbPage))
- if _rc == i32(0) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPtrmap)) + 1*uintptr(_offset))) = _eType
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPtrmap))+1*uintptr(_offset+i32(1)))), _parent)
+ *_pRC = store2(&_rc, _sqlite3PagerWrite(tls, _pDbPage))
+ if _rc == int32(0) {
+ *elem15(_pPtrmap, uintptr(_offset)) = _eType
+ _sqlite3Put4byte(tls, elem15(_pPtrmap, uintptr(_offset+int32(1))), _parent)
}
_ptrmap_exit:
_sqlite3PagerUnref(tls, _pDbPage)
@@ -41635,71 +42364,75 @@ _ptrmap_exit:
var _ptrmapPutØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_ptrmapPutØ00__func__Ø000[0], str(55676), 10)
-}
-
-// Somewhere on pPage is a pointer to page iFrom. Modify this pointer so
-// that it points to iTo. Parameter eType describes the type of pointer to
-// be modified, as follows:
-//
-// PTRMAP_BTREE: pPage is a btree-page. The pointer points at a child
-// page of pPage.
-//
-// PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow
-// page pointed to by one of the cells on pPage.
-//
-// PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next
-// overflow page in the list.
+ crt.Xstrncpy(nil, &_ptrmapPutØ00__func__Ø000[0], str(55652), 10)
+}
+
+// C comment
+// /*
+// ** Somewhere on pPage is a pointer to page iFrom. Modify this pointer so
+// ** that it points to iTo. Parameter eType describes the type of pointer to
+// ** be modified, as follows:
+// **
+// ** PTRMAP_BTREE: pPage is a btree-page. The pointer points at a child
+// ** page of pPage.
+// **
+// ** PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow
+// ** page pointed to by one of the cells on pPage.
+// **
+// ** PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next
+// ** overflow page in the list.
+// */
func _modifyPagePointer(tls *crt.TLS, _pPage *XMemPage, _iFrom uint32, _iTo uint32, _eType uint8) (r0 int32) {
var _3_i, _3_nCell, _3_rc int32
var _4_pCell *uint8
var _5_info XCellInfo
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62435), unsafe.Pointer((*int8)(unsafe.Pointer(&_modifyPagePointerØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62435), unsafe.Pointer(&_modifyPagePointerØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62436), unsafe.Pointer((*int8)(unsafe.Pointer(&_modifyPagePointerØ00__func__Ø000))), unsafe.Pointer(str(53334)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62436), unsafe.Pointer(&_modifyPagePointerØ00__func__Ø000), unsafe.Pointer(str(53310)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_eType) != i32(4) {
+ if int32(_eType) != int32(4) {
goto _4
}
- if _sqlite3Get4byte(tls, _pPage.X19) != _iFrom {
- return _sqlite3CorruptError(tls, i32(62440))
+ if _sqlite3Get4byte(tls, _pPage.XaData) != _iFrom {
+ return _sqlite3CorruptError(tls, int32(62440))
}
- _sqlite3Put4byte(tls, _pPage.X19, _iTo)
+ _sqlite3Put4byte(tls, _pPage.XaData, _iTo)
goto _6
_4:
_3_rc = _btreeInitPage(tls, _pPage)
if _3_rc != 0 {
return _3_rc
}
- _3_nCell = int32(_pPage.X14)
- _3_i = i32(0)
+ _3_nCell = int32(_pPage.XnCell)
+ _3_i = int32(0)
_8:
if _3_i >= _3_nCell {
goto _11
}
- _4_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_3_i))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_3_i))))) + 1*uintptr(i32(1)))))))))))))
- if int32(_eType) != i32(3) {
+ _4_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData)) + uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_3_i)), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_3_i)), uintptr(1)))))))
+ if int32(_eType) != int32(3) {
goto _12
}
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_pPage.X25)})))(tls, _pPage, _4_pCell, &_5_info)
- if uint32(_5_info.X3) >= (_5_info.X2) {
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _pPage.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _pPage, _4_pCell, &_5_info)
+ if uint32(_5_info.XnLocal) >= _5_info.XnPayload {
goto _13
}
- if uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_4_pCell))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_5_info.X4))))))))) > uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((*XBtShared)(_pPage.X18).X16))))))))) {
- return _sqlite3CorruptError(tls, i32(62459))
+ if crt.P2U(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_4_pCell))+uintptr(_5_info.XnSize))))) > crt.P2U(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData))+uintptr((*XBtShared)(_pPage.XpBt).XusableSize))))) {
+ return _sqlite3CorruptError(tls, int32(62459))
}
- if _iFrom == _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_4_pCell))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_5_info.X4)))))))))-uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4))))))))) {
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_4_pCell))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_5_info.X4)))))))))-uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))), _iTo)
+ if _iFrom == _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_4_pCell))+uintptr(_5_info.XnSize)))))-uintptr(int32(4))))) {
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_4_pCell))+uintptr(_5_info.XnSize)))))-uintptr(int32(4)))), _iTo)
goto _11
}
_13:
@@ -41716,199 +42449,202 @@ _11:
if _3_i != _3_nCell {
goto _18
}
- if (int32(_eType) != i32(5)) || (_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(int32(_pPage.X6)+i32(8))))) != _iFrom) {
- return _sqlite3CorruptError(tls, i32(62477))
+ if (int32(_eType) != int32(5)) || (_sqlite3Get4byte(tls, elem15(_pPage.XaData, uintptr(int32(_pPage.XhdrOffset)+int32(8)))) != _iFrom) {
+ return _sqlite3CorruptError(tls, int32(62477))
}
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(int32(_pPage.X6)+i32(8)))), _iTo)
+ _sqlite3Put4byte(tls, elem15(_pPage.XaData, uintptr(int32(_pPage.XhdrOffset)+int32(8))), _iTo)
_18:
_6:
- return i32(0)
-
- _ = _5_info
- panic(0)
+ return int32(0)
}
var _modifyPagePointerØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_modifyPagePointerØ00__func__Ø000[0], str(55686), 18)
+ crt.Xstrncpy(nil, &_modifyPagePointerØ00__func__Ø000[0], str(55662), 18)
}
-// Truncate the in-memory database file image to nPage pages. This
-// function does not actually modify the database file on disk. It
-// just sets the internal state of the pager object so that the
-// truncation will be done when the current transaction is committed.
-//
-// This function is only called right before committing a transaction.
-// Once this function has been called, the transaction must either be
-// rolled back or committed. It is not safe to call this function and
-// then continue writing to the database.
+// C comment
+// /*
+// ** Truncate the in-memory database file image to nPage pages. This
+// ** function does not actually modify the database file on disk. It
+// ** just sets the internal state of the pager object so that the
+// ** truncation will be done when the current transaction is committed.
+// **
+// ** This function is only called right before committing a transaction.
+// ** Once this function has been called, the transaction must either be
+// ** rolled back or committed. It is not safe to call this function and
+// ** then continue writing to the database.
+// */
func _sqlite3PagerTruncateImage(tls *crt.TLS, _pPager *XPager, _nPage uint32) {
func() {
- if (_pPager.X22) < _nPage {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50876), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerTruncateImageØ00__func__Ø000))), unsafe.Pointer(str(55704)))
+ if _pPager.XdbSize < _nPage {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50876), unsafe.Pointer(&_sqlite3PagerTruncateImageØ00__func__Ø000), unsafe.Pointer(str(55680)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X14) < i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50877), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerTruncateImageØ00__func__Ø000))), unsafe.Pointer(str(13332)))
+ if int32(_pPager.XeState) < int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50877), unsafe.Pointer(&_sqlite3PagerTruncateImageØ00__func__Ø000), unsafe.Pointer(str(13287)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_pPager.X22))) = _nPage
+ _pPager.XdbSize = _nPage
}
var _sqlite3PagerTruncateImageØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerTruncateImageØ00__func__Ø000[0], str(55726), 26)
-}
-
-// Sync the database file for the pager pPager. zMaster points to the name
-// of a master journal file that should be written into the individual
-// journal file. zMaster may be NULL, which is interpreted as no master
-// journal (a single database transaction).
-//
-// This routine ensures that:
-//
-// * The database file change-counter is updated,
-// * the journal is synced (unless the atomic-write optimization is used),
-// * all dirty pages are written to the database file,
-// * the database file is truncated (if required), and
-// * the database file synced.
-//
-// The only thing that remains to commit the transaction is to finalize
-// (delete, truncate or zero the first part of) the journal file (or
-// delete the master journal file if specified).
-//
-// Note that if zMaster==NULL, this does not overwrite a previous value
-// passed to an sqlite3PagerCommitPhaseOne() call.
-//
-// If the final parameter - noSync - is true, then the database file itself
-// is not synced. The caller must call sqlite3PagerSync() directly to
-// sync the database file before calling CommitPhaseTwo() to delete the
-// journal file in this case.
+ crt.Xstrncpy(nil, &_sqlite3PagerTruncateImageØ00__func__Ø000[0], str(55702), 26)
+}
+
+// C comment
+// /*
+// ** Sync the database file for the pager pPager. zMaster points to the name
+// ** of a master journal file that should be written into the individual
+// ** journal file. zMaster may be NULL, which is interpreted as no master
+// ** journal (a single database transaction).
+// **
+// ** This routine ensures that:
+// **
+// ** * The database file change-counter is updated,
+// ** * the journal is synced (unless the atomic-write optimization is used),
+// ** * all dirty pages are written to the database file,
+// ** * the database file is truncated (if required), and
+// ** * the database file synced.
+// **
+// ** The only thing that remains to commit the transaction is to finalize
+// ** (delete, truncate or zero the first part of) the journal file (or
+// ** delete the master journal file if specified).
+// **
+// ** Note that if zMaster==NULL, this does not overwrite a previous value
+// ** passed to an sqlite3PagerCommitPhaseOne() call.
+// **
+// ** If the final parameter - noSync - is true, then the database file itself
+// ** is not synced. The caller must call sqlite3PagerSync() directly to
+// ** sync the database file before calling CommitPhaseTwo() to delete the
+// ** journal file in this case.
+// */
func _sqlite3PagerCommitPhaseOne(tls *crt.TLS, _pPager *XPager, _zMaster *int8, _noSync int32) (r0 int32) {
var _rc int32
var _9_nNew uint32
var _3_pList, _3_pPageOne *XPgHdr
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if int32(_pPager.X14) != i32(2) && int32(_pPager.X14) != i32(3) && int32(_pPager.X14) != i32(4) && int32(_pPager.X14) != i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53228), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000))), unsafe.Pointer(str(55752)))
+ if int32(_pPager.XeState) != int32(2) && int32(_pPager.XeState) != int32(3) && int32(_pPager.XeState) != int32(4) && int32(_pPager.XeState) != int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53228), unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000), unsafe.Pointer(str(55728)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53233), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53233), unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
- if (_pPager.X26) != 0 {
+ if _pPager.XerrCode != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53236), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53236), unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return _pPager.X26
+ return _pPager.XerrCode
}
- if _sqlite3FaultSim(tls, i32(400)) != 0 {
- return i32(10)
+ if _sqlite3FaultSim(tls, int32(400)) != 0 {
+ return int32(10)
}
- if int32(_pPager.X14) < i32(3) {
- return i32(0)
+ if int32(_pPager.XeState) < int32(3) {
+ return int32(0)
}
func() {
- if int32(_pPager.X13) != i32(0) && (_pPager.X10) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53247), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000))), unsafe.Pointer(str(55898)))
+ if int32(_pPager.XmemDb) != int32(0) && _pPager.XtempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53247), unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000), unsafe.Pointer(str(55874)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil && (_pPager.X10) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53248), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000))), unsafe.Pointer(str(19565)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil && _pPager.XtempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53248), unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000), unsafe.Pointer(str(19520)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) == _pagerFlushOnCommit(tls, _pPager, i32(1)) {
- _sqlite3BackupRestart(tls, (*Xsqlite3_backup)(_pPager.X36))
+ if int32(0) == _pagerFlushOnCommit(tls, _pPager, int32(1)) {
+ _sqlite3BackupRestart(tls, (*Xsqlite3_backup)(_pPager.XpBackup))
goto _commit_phase_one_exit
}
- if (*XWal)(_pPager.X60) == nil {
+ if (*XWal)(_pPager.XpWal) == nil {
goto _20
}
- _3_pList = _sqlite3PcacheDirtyList(tls, (*XPCache)(_pPager.X59))
+ _3_pList = _sqlite3PcacheDirtyList(tls, (*XPCache)(_pPager.XpPCache))
_3_pPageOne = nil
if _3_pList == nil {
- _rc = _sqlite3PagerGet(tls, _pPager, uint32(i32(1)), &_3_pPageOne, i32(0))
+ _rc = _sqlite3PagerGet(tls, _pPager, uint32(1), &_3_pPageOne, int32(0))
_3_pList = _3_pPageOne
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_pList.X3))))) = nil
+ *(**XPgHdr)(unsafe.Pointer(&_3_pList.XpDirty)) = nil
}
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53265), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53265), unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
if _3_pList != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53266), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53266), unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- _rc = _pagerWalFrames(tls, _pPager, _3_pList, _pPager.X22, i32(1))
+ _rc = _pagerWalFrames(tls, _pPager, _3_pList, _pPager.XdbSize, int32(1))
}
_sqlite3PagerUnref(tls, _3_pPageOne)
- if _rc == i32(0) {
- _sqlite3PcacheCleanAll(tls, (*XPCache)(_pPager.X59))
+ if _rc == int32(0) {
+ _sqlite3PcacheCleanAll(tls, (*XPCache)(_pPager.XpPCache))
}
goto _28
_20:
- _rc = _pager_incr_changecounter(tls, _pPager, i32(0))
- if _rc != i32(0) {
+ _rc = _pager_incr_changecounter(tls, _pPager, int32(0))
+ if _rc != int32(0) {
goto _commit_phase_one_exit
}
_rc = _writeMasterJournal(tls, _pPager, _zMaster)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _commit_phase_one_exit
}
- _rc = _syncJournal(tls, _pPager, i32(0))
- if _rc != i32(0) {
+ _rc = _syncJournal(tls, _pPager, int32(0))
+ if _rc != int32(0) {
goto _commit_phase_one_exit
}
- _rc = _pager_write_pagelist(tls, _pPager, _sqlite3PcacheDirtyList(tls, (*XPCache)(_pPager.X59)))
- if _rc != i32(0) {
+ _rc = _pager_write_pagelist(tls, _pPager, _sqlite3PcacheDirtyList(tls, (*XPCache)(_pPager.XpPCache)))
+ if _rc != int32(0) {
func() {
- if _rc == i32(2826) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53349), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000))), unsafe.Pointer(str(55927)))
+ if _rc == int32(2826) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53349), unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000), unsafe.Pointer(str(55903)))
crt.X__builtin_abort(tls)
}
}()
goto _commit_phase_one_exit
}
- _sqlite3PcacheCleanAll(tls, (*XPCache)(_pPager.X59))
- if (_pPager.X22) <= (_pPager.X24) {
+ _sqlite3PcacheCleanAll(tls, (*XPCache)(_pPager.XpPCache))
+ if _pPager.XdbSize <= _pPager.XdbFileSize {
goto _35
}
- _9_nNew = (_pPager.X22) - uint32(bool2int((_pPager.X22) == uint32((_sqlite3PendingByte/(_pPager.X48))+i32(1))))
+ _9_nNew = _pPager.XdbSize - uint32(bool2int(_pPager.XdbSize == uint32((_sqlite3PendingByte/_pPager.XpageSize)+int32(1))))
func() {
- if int32(_pPager.X14) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53362), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000))), unsafe.Pointer(str(55952)))
+ if int32(_pPager.XeState) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53362), unsafe.Pointer(&_sqlite3PagerCommitPhaseOneØ00__func__Ø000), unsafe.Pointer(str(55928)))
crt.X__builtin_abort(tls)
}
}()
_rc = _pager_truncate(tls, _pPager, _9_nNew)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _commit_phase_one_exit
}
_35:
@@ -41917,8 +42653,8 @@ _35:
}
_28:
_commit_phase_one_exit:
- if (_rc == i32(0)) && ((*XWal)(_pPager.X60) == nil) {
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(5))
+ if (_rc == int32(0)) && ((*XWal)(_pPager.XpWal) == nil) {
+ _pPager.XeState = uint8(5)
}
return _rc
}
@@ -41926,17 +42662,17 @@ _commit_phase_one_exit:
var _sqlite3PagerCommitPhaseOneØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerCommitPhaseOneØ00__func__Ø000[0], str(55987), 27)
+ crt.Xstrncpy(nil, &_sqlite3PagerCommitPhaseOneØ00__func__Ø000[0], str(55963), 27)
}
func _sqlite3FaultSim(tls *crt.TLS, _iTest int32) (r0 int32) {
var _xCallback func(*crt.TLS, int32) int32
- _xCallback = _sqlite3Config.X37
+ _xCallback = _sqlite3Config.XxTestCallback
return func() int32 {
if _xCallback != nil {
return _xCallback(tls, _iTest)
}
- return i32(0)
+ return int32(0)
}()
}
@@ -41945,34 +42681,34 @@ func _pagerWalFrames(tls *crt.TLS, _pPager *XPager, _pList *XPgHdr, _nTruncate u
var _p *XPgHdr
var _2_ppNext **XPgHdr
func() {
- if (*XWal)(_pPager.X60) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50067), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000))), unsafe.Pointer(str(56014)))
+ if _pPager.XpWal == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50067), unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000), unsafe.Pointer(str(55990)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50068), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000))), unsafe.Pointer(str(56027)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50068), unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000), unsafe.Pointer(str(56003)))
crt.X__builtin_abort(tls)
}
}()
_p = _pList
_4:
- if _p == nil || (*XPgHdr)(_p.X3) == nil {
+ if _p == nil || _p.XpDirty == nil {
goto _8
}
func() {
- if (_p.X5) >= ((*XPgHdr)(_p.X3).X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50072), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000))), unsafe.Pointer(str(56033)))
+ if _p.Xpgno >= ((*XPgHdr)(_p.XpDirty).Xpgno) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50072), unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000), unsafe.Pointer(str(56009)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*XPgHdr)(_p.X3)
+ _p = (*XPgHdr)(_p.XpDirty)
goto _4
_8:
func() {
- if (*XPgHdr)(_pList.X3) != nil && _isCommit == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50076), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000))), unsafe.Pointer(str(56059)))
+ if (*XPgHdr)(_pList.XpDirty) != nil && _isCommit == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50076), unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000), unsafe.Pointer(str(56035)))
crt.X__builtin_abort(tls)
}
}()
@@ -41980,39 +42716,35 @@ _8:
goto _14
}
_2_ppNext = &_pList
- _nList = i32(0)
+ _nList = int32(0)
_p = _pList
_15:
- if store25(_2_ppNext, _p) == nil {
+ if store34(_2_ppNext, _p) == nil {
goto _18
}
- if (_p.X5) <= _nTruncate {
- _2_ppNext = (**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3)))))
+ if _p.Xpgno <= _nTruncate {
+ _2_ppNext = (**XPgHdr)(unsafe.Pointer(&_p.XpDirty))
_nList += 1
}
- _p = (*XPgHdr)(_p.X3)
+ _p = (*XPgHdr)(_p.XpDirty)
goto _15
_18:
func() {
if _pList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50090), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000))), unsafe.Pointer(str(56027)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50090), unsafe.Pointer(&_pagerWalFramesØ00__func__Ø000), unsafe.Pointer(str(56003)))
crt.X__builtin_abort(tls)
}
}()
goto _22
_14:
- _nList = i32(1)
+ _nList = int32(1)
_22:
- {
- p := (*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&(_pPager.X55))))) + 4*uintptr(i32(2))))
- *p = (*p) + _nList
- sink1(*p)
- }
- if (_pList.X5) == uint32(i32(1)) {
+ *elem8((*int32)(unsafe.Pointer(&_pPager.XaStat)), uintptr(2)) += _nList
+ if _pList.Xpgno == uint32(1) {
_pager_write_changecounter(tls, _pList)
}
- _rc = _sqlite3WalFrames(tls, (*XWal)(_pPager.X60), _pPager.X48, _pList, _nTruncate, _isCommit, int32(_pPager.X8))
- if _rc != i32(0) || (*Xsqlite3_backup)(_pPager.X36) == nil {
+ _rc = _sqlite3WalFrames(tls, (*XWal)(_pPager.XpWal), _pPager.XpageSize, _pList, _nTruncate, _isCommit, int32(_pPager.XwalSyncFlags))
+ if _rc != int32(0) || _pPager.XpBackup == nil {
goto _25
}
_p = _pList
@@ -42020,8 +42752,8 @@ _26:
if _p == nil {
goto _29
}
- _sqlite3BackupUpdate(tls, (*Xsqlite3_backup)(_pPager.X36), _p.X5, (*uint8)(_p.X1))
- _p = (*XPgHdr)(_p.X3)
+ _sqlite3BackupUpdate(tls, (*Xsqlite3_backup)(_pPager.XpBackup), _p.Xpgno, (*uint8)(_p.XpData))
+ _p = (*XPgHdr)(_p.XpDirty)
goto _26
_29:
_25:
@@ -42031,25 +42763,31 @@ _25:
var _pagerWalFramesØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_pagerWalFramesØ00__func__Ø000[0], str(56088), 15)
+ crt.Xstrncpy(nil, &_pagerWalFramesØ00__func__Ø000[0], str(56064), 15)
}
-// Update the value of the change-counter at offsets 24 and 92 in
-// the header and the sqlite version number at offset 96.
-//
-// This is an unconditional update. See also the pager_incr_changecounter()
-// routine which only updates the change-counter if the update is actually
-// needed, as determined by the pPager->changeCountDone state variable.
+// C comment
+// /*
+// ** Update the value of the change-counter at offsets 24 and 92 in
+// ** the header and the sqlite version number at offset 96.
+// **
+// ** This is an unconditional update. See also the pager_incr_changecounter()
+// ** routine which only updates the change-counter if the update is actually
+// ** needed, as determined by the pPager->changeCountDone state variable.
+// */
func _pager_write_changecounter(tls *crt.TLS, _pPg *XPgHdr) {
var _change_counter uint32
- _change_counter = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer((*[16]int8)(unsafe.Pointer(&((*XPager)(_pPg.X4).X40)))))))) + uint32(i32(1))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*int8)(_pPg.X1)))))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(24)))))))), _change_counter)
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*int8)(_pPg.X1)))))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(92)))))))), _change_counter)
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*int8)(_pPg.X1)))))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(96)))))))), uint32(i32(3019003)))
+ _change_counter = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(&((*XPager)(_pPg.XpPager).XdbFileVers)))))) + uint32(1)
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(_pPg.XpData)+uintptr(int32(24)))), _change_counter)
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(_pPg.XpData)+uintptr(int32(92)))), _change_counter)
+ _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr(_pPg.XpData)+uintptr(int32(96)))), uint32(3019003))
}
-// Write a set of frames to the log. The caller must hold the write-lock
-// on the log file (obtained using sqlite3WalBeginWriteTransaction()).
+// C comment
+// /*
+// ** Write a set of frames to the log. The caller must hold the write-lock
+// ** on the log file (obtained using sqlite3WalBeginWriteTransaction()).
+// */
func _sqlite3WalFrames(tls *crt.TLS, _pWal *XWal, _szPage int32, _pList *XPgHdr, _nTruncate uint32, _isCommit int32, _sync_flags int32) (r0 int32) {
var _rc, _nExtra, _szFrame, _6_nDbSize, _11_bSync, _12_sectorSize int32
var _iOffset, _8_iOff, _15_sz int64
@@ -42061,148 +42799,142 @@ func _sqlite3WalFrames(tls *crt.TLS, _pWal *XWal, _szPage int32, _pList *XPgHdr,
var _pLive *XWalIndexHdr
var _w XWalWriter
_pLast = nil
- _nExtra = i32(0)
- _iFirst = u32(0)
+ _nExtra = int32(0)
+ _iFirst = uint32(0)
func() {
if _pList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57536), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000))), unsafe.Pointer(str(56027)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57536), unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000), unsafe.Pointer(str(56003)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pWal.X12) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57537), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000))), unsafe.Pointer(str(15606)))
+ if _pWal.XwriteLock == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57537), unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000), unsafe.Pointer(str(15561)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_isCommit != i32(0)) != (_nTruncate != uint32(i32(0))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57541), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000))), unsafe.Pointer(str(56103)))
+ if (_isCommit != int32(0)) != (_nTruncate != (0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57541), unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000), unsafe.Pointer(str(56079)))
crt.X__builtin_abort(tls)
}
}()
_pLive = _walIndexHdr(tls, _pWal)
- if crt.Xmemcmp(tls, (unsafe.Pointer)((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18)))), (unsafe.Pointer)(_pLive), u32(48)) != i32(0) {
- _iFirst = (_pLive.X6) + uint32(i32(1))
+ if crt.Xmemcmp(tls, unsafe.Pointer(&_pWal.Xhdr), unsafe.Pointer(_pLive), uint32(48)) != int32(0) {
+ _iFirst = _pLive.XmxFrame + uint32(1)
}
- if i32(0) != store1(&_rc, _walRestartLog(tls, _pWal)) {
+ if int32(0) != store2(&_rc, _walRestartLog(tls, _pWal)) {
return _rc
}
- _iFrame = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
- if _iFrame != uint32(i32(0)) {
+ _iFrame = _pWal.Xhdr.XmxFrame
+ if _iFrame != (0) {
goto _8
}
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aWalHdr))+1*uintptr(i32(0)))), uint32(i32(931071618)))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aWalHdr))+1*uintptr(i32(4)))), uint32(i32(3007000)))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aWalHdr))+1*uintptr(i32(8)))), uint32(_szPage))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aWalHdr))+1*uintptr(i32(12)))), _pWal.X22)
- if (_pWal.X22) == uint32(i32(0)) {
- Xsqlite3_randomness(tls, i32(8), (unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X9)))))
- }
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aWalHdr))+1*uintptr(i32(16))))), (unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X9)))), uint32(i32(8)))
- _walChecksumBytes(tls, i32(1), (*uint8)(unsafe.Pointer(&_3_aWalHdr)), i32(24), nil, (*uint32)(unsafe.Pointer(&_3_aCksum)))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aWalHdr))+1*uintptr(i32(24)))), *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aCksum)) + 4*uintptr(i32(0)))))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aWalHdr))+1*uintptr(i32(28)))), *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aCksum)) + 4*uintptr(i32(1)))))
- *(*uint32)(unsafe.Pointer(&(_pWal.X8))) = uint32(_szPage)
- *(*uint8)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X4))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(0)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aCksum)) + 4*uintptr(i32(0))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(1)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_aCksum)) + 4*uintptr(i32(1))))
- *(*uint8)(unsafe.Pointer(&(_pWal.X15))) = uint8(i32(1))
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pWal.X2), (unsafe.Pointer)(&_3_aWalHdr), int32(u32(32)), int64(i32(0)))
- if _rc != i32(0) {
+ _sqlite3Put4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aWalHdr)), 0), uint32(931071618))
+ _sqlite3Put4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aWalHdr)), uintptr(4)), uint32(3007000))
+ _sqlite3Put4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aWalHdr)), uintptr(8)), uint32(_szPage))
+ _sqlite3Put4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aWalHdr)), uintptr(12)), _pWal.XnCkpt)
+ if _pWal.XnCkpt == (0) {
+ Xsqlite3_randomness(tls, int32(8), unsafe.Pointer(&(_pWal.Xhdr.XaSalt)))
+ }
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15((*uint8)(unsafe.Pointer(&_3_aWalHdr)), uintptr(16))), unsafe.Pointer(&(_pWal.Xhdr.XaSalt)), uint32(8))
+ _walChecksumBytes(tls, int32(1), (*uint8)(unsafe.Pointer(&_3_aWalHdr)), int32(24), nil, (*uint32)(unsafe.Pointer(&_3_aCksum)))
+ _sqlite3Put4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aWalHdr)), uintptr(24)), *elem7((*uint32)(unsafe.Pointer(&_3_aCksum)), 0))
+ _sqlite3Put4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_aWalHdr)), uintptr(28)), *elem7((*uint32)(unsafe.Pointer(&_3_aCksum)), uintptr(1)))
+ _pWal.XszPage = uint32(_szPage)
+ _pWal.Xhdr.XbigEndCksum = 0
+ *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), 0) = *elem7((*uint32)(unsafe.Pointer(&_3_aCksum)), 0)
+ *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), uintptr(1)) = *elem7((*uint32)(unsafe.Pointer(&_3_aCksum)), uintptr(1))
+ _pWal.XtruncateOnCommit = uint8(1)
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pWal.XpWalFd), unsafe.Pointer(&_3_aWalHdr), int32(32), 0)
+ if _rc != int32(0) {
return _rc
}
- if (_pWal.X16) == 0 || _sync_flags == 0 {
+ if _pWal.XsyncHeader == 0 || _sync_flags == 0 {
goto _12
}
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pWal.X2), _sync_flags&i32(19))
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pWal.XpWalFd), _sync_flags&int32(19))
if _rc != 0 {
return _rc
}
_12:
_8:
func() {
- if int32(_pWal.X8) != _szPage {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57605), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000))), unsafe.Pointer(str(56133)))
+ if int32(_pWal.XszPage) != _szPage {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57605), unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000), unsafe.Pointer(str(56109)))
crt.X__builtin_abort(tls)
}
}()
- *(**XWal)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_w.X0))))) = _pWal
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_w.X1))))) = (*Xsqlite3_file)(_pWal.X2)
- *(*int64)(unsafe.Pointer(&(_w.X2))) = int64(i32(0))
- *(*int32)(unsafe.Pointer(&(_w.X3))) = _sync_flags
- *(*int32)(unsafe.Pointer(&(_w.X4))) = _szPage
- _iOffset = int64(i32(32)) + (int64((_iFrame+uint32(i32(1)))-uint32(i32(1))) * int64(_szPage+i32(24)))
- _szFrame = _szPage + i32(24)
+ *(**XWal)(unsafe.Pointer(&_w.XpWal)) = _pWal
+ *(**Xsqlite3_file)(unsafe.Pointer(&_w.XpFd)) = (*Xsqlite3_file)(_pWal.XpWalFd)
+ _w.XiSyncPoint = 0
+ _w.XsyncFlags = _sync_flags
+ _w.XszPage = _szPage
+ _iOffset = int64(32) + (int64((_iFrame+uint32(1))-uint32(1)) * int64(_szPage+int32(24)))
+ _szFrame = _szPage + int32(24)
_p = _pList
_16:
if _p == nil {
goto _19
}
- if _iFirst == 0 || (*XPgHdr)(_p.X3) == nil && _isCommit != i32(0) {
+ if _iFirst == 0 || _p.XpDirty == nil && _isCommit != int32(0) {
goto _22
}
- _7_iWrite = uint32(i32(0))
- _rc = _sqlite3WalFindFrame(tls, _pWal, _p.X5, &_7_iWrite)
+ _7_iWrite = 0
+ _rc = _sqlite3WalFindFrame(tls, _pWal, _p.Xpgno, &_7_iWrite)
func() {
- if _rc != i32(0) && _7_iWrite != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57627), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000))), unsafe.Pointer(str(56159)))
+ if _rc != int32(0) && _7_iWrite != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57627), unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000), unsafe.Pointer(str(56135)))
crt.X__builtin_abort(tls)
}
}()
if _7_iWrite < _iFirst {
goto _26
}
- _8_iOff = (int64(i32(32)) + (int64(_7_iWrite-uint32(i32(1))) * int64(_szPage+i32(24)))) + int64(i32(24))
- if ((_pWal.X20) == uint32(i32(0))) || (_7_iWrite < (_pWal.X20)) {
- *(*uint32)(unsafe.Pointer(&(_pWal.X20))) = _7_iWrite
+ _8_iOff = (int64(32) + (int64(_7_iWrite-uint32(1)) * int64(_szPage+int32(24)))) + int64(24)
+ if (_pWal.XiReCksum == (0)) || (_7_iWrite < _pWal.XiReCksum) {
+ _pWal.XiReCksum = _7_iWrite
}
- _8_pData = _p.X1
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pWal.X2), _8_pData, _szPage, _8_iOff)
+ _8_pData = _p.XpData
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pWal.XpWalFd), _8_pData, _szPage, _8_iOff)
if _rc != 0 {
return _rc
}
{
- p := (*uint16)(unsafe.Pointer(&(_p.X6)))
- *p = uint16(int32(*p) & i32(-65))
- sink14(*p)
+ p := &_p.Xflags
+ *p = uint16(int32(*p) & int32(-65))
}
goto _17
_26:
_22:
_iFrame += 1
func() {
- if _iOffset != (int64(i32(32)) + (int64(_iFrame-uint32(i32(1))) * int64(_szPage+i32(24)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57647), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000))), unsafe.Pointer(str(56186)))
+ if _iOffset != (int64(32) + (int64(_iFrame-uint32(1)) * int64(_szPage+int32(24)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57647), unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000), unsafe.Pointer(str(56162)))
crt.X__builtin_abort(tls)
}
}()
_6_nDbSize = int32(func() uint32 {
- if _isCommit != 0 && ((*XPgHdr)(_p.X3) == nil) {
+ if _isCommit != 0 && ((*XPgHdr)(_p.XpDirty) == nil) {
return _nTruncate
}
- return uint32(i32(0))
+ return (0)
}())
_rc = _walWriteOneFrame(tls, &_w, _p, _6_nDbSize, _iOffset)
if _rc != 0 {
return _rc
}
_pLast = _p
+ _iOffset += int64(_szFrame)
{
- p := &_iOffset
- *p = (*p) + int64(_szFrame)
- sink6(*p)
- }
- {
- p := (*uint16)(unsafe.Pointer(&(_p.X6)))
- *p = uint16(int32(*p) | i32(64))
- sink14(*p)
+ p := &_p.Xflags
+ *p = uint16(int32(*p) | int32(64))
}
_17:
- _p = (*XPgHdr)(_p.X3)
+ _p = (*XPgHdr)(_p.XpDirty)
goto _16
_19:
- if _isCommit == 0 || (_pWal.X20) == 0 {
+ if _isCommit == 0 || _pWal.XiReCksum == 0 {
goto _37
}
_rc = _walRewriteChecksums(tls, _pWal, _iFrame)
@@ -42210,91 +42942,86 @@ _19:
return _rc
}
_37:
- if _isCommit == 0 || (_sync_flags&i32(32)) == i32(0) {
+ if _isCommit == 0 || (_sync_flags&int32(32)) == int32(0) {
goto _40
}
- _11_bSync = i32(1)
- if (_pWal.X17) == 0 {
+ _11_bSync = int32(1)
+ if _pWal.XpadToSectorBoundary == 0 {
goto _41
}
- _12_sectorSize = _sqlite3SectorSize(tls, (*Xsqlite3_file)(_pWal.X2))
- *(*int64)(unsafe.Pointer(&(_w.X2))) = (((_iOffset + int64(_12_sectorSize)) - int64(i32(1))) / int64(_12_sectorSize)) * int64(_12_sectorSize)
- _11_bSync = bool2int((_w.X2) == _iOffset)
+ _12_sectorSize = _sqlite3SectorSize(tls, (*Xsqlite3_file)(_pWal.XpWalFd))
+ _w.XiSyncPoint = (((_iOffset + int64(_12_sectorSize)) - int64(1)) / int64(_12_sectorSize)) * int64(_12_sectorSize)
+ _11_bSync = bool2int(_w.XiSyncPoint == _iOffset)
_42:
- if _iOffset >= (_w.X2) {
+ if _iOffset >= _w.XiSyncPoint {
goto _43
}
_rc = _walWriteOneFrame(tls, &_w, _pLast, int32(_nTruncate), _iOffset)
if _rc != 0 {
return _rc
}
- {
- p := &_iOffset
- *p = (*p) + int64(_szFrame)
- sink6(*p)
- }
+ _iOffset += int64(_szFrame)
_nExtra += 1
goto _42
_43:
_41:
if _11_bSync != 0 {
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57691), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57691), unsafe.Pointer(&_sqlite3WalFramesØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_w.X1), _sync_flags&i32(19))
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_w.XpFd), _sync_flags&int32(19))
}
_40:
- if _isCommit == 0 || (_pWal.X15) == 0 || (_pWal.X4) < int64(i32(0)) {
+ if _isCommit == 0 || _pWal.XtruncateOnCommit == 0 || _pWal.XmxWalSize < (0) {
goto _50
}
- _15_sz = _pWal.X4
- if (int64(i32(32)) + (int64(((_iFrame+uint32(_nExtra))+uint32(i32(1)))-uint32(i32(1))) * int64(_szPage+i32(24)))) > (_pWal.X4) {
- _15_sz = int64(i32(32)) + (int64(((_iFrame+uint32(_nExtra))+uint32(i32(1)))-uint32(i32(1))) * int64(_szPage+i32(24)))
+ _15_sz = _pWal.XmxWalSize
+ if (int64(32) + (int64(((_iFrame+uint32(_nExtra))+uint32(1))-uint32(1)) * int64(_szPage+int32(24)))) > _pWal.XmxWalSize {
+ _15_sz = int64(32) + (int64(((_iFrame+uint32(_nExtra))+uint32(1))-uint32(1)) * int64(_szPage+int32(24)))
}
_walLimitSize(tls, _pWal, _15_sz)
- *(*uint8)(unsafe.Pointer(&(_pWal.X15))) = uint8(i32(0))
+ _pWal.XtruncateOnCommit = 0
_50:
- _iFrame = (*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6
+ _iFrame = _pWal.Xhdr.XmxFrame
_p = _pList
_52:
- if _p == nil || _rc != i32(0) {
+ if _p == nil || _rc != int32(0) {
goto _56
}
- if (int32(_p.X6) & i32(64)) == i32(0) {
+ if (int32(_p.Xflags) & int32(64)) == int32(0) {
goto _53
}
_iFrame += 1
- _rc = _walIndexAppend(tls, _pWal, _iFrame, _p.X5)
+ _rc = _walIndexAppend(tls, _pWal, _iFrame, _p.Xpgno)
_53:
- _p = (*XPgHdr)(_p.X3)
+ _p = (*XPgHdr)(_p.XpDirty)
goto _52
_56:
- if (_rc == i32(0)) && (_nExtra > i32(0)) {
+ if (_rc == int32(0)) && (_nExtra > int32(0)) {
_iFrame += 1
_nExtra -= 1
- _rc = _walIndexAppend(tls, _pWal, _iFrame, _pLast.X5)
+ _rc = _walIndexAppend(tls, _pWal, _iFrame, _pLast.Xpgno)
goto _56
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _61
}
- *(*uint16)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X5))) = uint16((_szPage & i32(65280)) | (_szPage >> uint(i32(16))))
- *(*uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6))) = _iFrame
+ _pWal.Xhdr.XszPage = uint16((_szPage & int32(65280)) | (_szPage >> 16))
+ _pWal.Xhdr.XmxFrame = _iFrame
if _isCommit != 0 {
- *(*uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X2))) += 1
- *(*uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X7))) = _nTruncate
+ _pWal.Xhdr.XiChange += 1
+ _pWal.Xhdr.XnPage = _nTruncate
}
if _isCommit != 0 {
_walIndexWriteHdr(tls, _pWal)
- *(*uint32)(unsafe.Pointer(&(_pWal.X3))) = _iFrame
+ _pWal.XiCallback = _iFrame
}
_61:
return _rc
- _ = _w
_ = _3_aWalHdr
_ = _3_aCksum
panic(0)
@@ -42303,60 +43030,63 @@ _61:
var _sqlite3WalFramesØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WalFramesØ00__func__Ø000[0], str(56226), 17)
+ crt.Xstrncpy(nil, &_sqlite3WalFramesØ00__func__Ø000[0], str(56202), 17)
}
-// This function is called just before writing a set of frames to the log
-// file (see sqlite3WalFrames()). It checks to see if, instead of appending
-// to the current log file, it is possible to overwrite the start of the
-// existing log file with the new frames (i.e. "reset" the log). If so,
-// it sets pWal->hdr.mxFrame to 0. Otherwise, pWal->hdr.mxFrame is left
-// unchanged.
-//
-// SQLITE_OK is returned if no error is encountered (regardless of whether
-// or not pWal->hdr.mxFrame is modified). An SQLite error code is returned
-// if an error occurs.
+// C comment
+// /*
+// ** This function is called just before writing a set of frames to the log
+// ** file (see sqlite3WalFrames()). It checks to see if, instead of appending
+// ** to the current log file, it is possible to overwrite the start of the
+// ** existing log file with the new frames (i.e. "reset" the log). If so,
+// ** it sets pWal->hdr.mxFrame to 0. Otherwise, pWal->hdr.mxFrame is left
+// ** unchanged.
+// **
+// ** SQLITE_OK is returned if no error is encountered (regardless of whether
+// ** or not pWal->hdr.mxFrame is modified). An SQLite error code is returned
+// ** if an error occurs.
+// */
func _walRestartLog(tls *crt.TLS, _pWal *XWal) (r0 int32) {
var _rc, _cnt, _5_notUsed int32
var _2_salt1 uint32
var _1_pInfo *XWalCkptInfo
- _rc = i32(0)
- if int32(_pWal.X9) != i32(0) {
+ _rc = int32(0)
+ if int32(_pWal.XreadLock) != int32(0) {
goto _0
}
_1_pInfo = _walCkptInfo(tls, _pWal)
func() {
- if (_1_pInfo.X0) != ((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57356), unsafe.Pointer((*int8)(unsafe.Pointer(&_walRestartLogØ00__func__Ø000))), unsafe.Pointer(str(22957)))
+ if _1_pInfo.XnBackfill != (_pWal.Xhdr.XmxFrame) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57356), unsafe.Pointer(&_walRestartLogØ00__func__Ø000), unsafe.Pointer(str(22912)))
crt.X__builtin_abort(tls)
}
}()
- if (_1_pInfo.X0) <= uint32(i32(0)) {
+ if _1_pInfo.XnBackfill <= (0) {
goto _3
}
- Xsqlite3_randomness(tls, i32(4), (unsafe.Pointer)(&_2_salt1))
- _rc = _walLockExclusive(tls, _pWal, i32(4), i32(4))
- if _rc == i32(0) {
+ Xsqlite3_randomness(tls, int32(4), unsafe.Pointer(&_2_salt1))
+ _rc = _walLockExclusive(tls, _pWal, int32(4), int32(4))
+ if _rc == int32(0) {
_walRestartHdr(tls, _pWal, _2_salt1)
- _walUnlockExclusive(tls, _pWal, i32(4), i32(4))
+ _walUnlockExclusive(tls, _pWal, int32(4), int32(4))
goto _6
}
- if _rc != i32(5) {
+ if _rc != int32(5) {
return _rc
}
_6:
_3:
- _walUnlockShared(tls, _pWal, i32(3))
- *(*int16)(unsafe.Pointer(&(_pWal.X9))) = int16(i32(-1))
- _cnt = i32(0)
+ _walUnlockShared(tls, _pWal, int32(3))
+ _pWal.XreadLock = int16(-1)
+ _cnt = int32(0)
_7:
- _rc = _walTryBeginRead(tls, _pWal, &_5_notUsed, i32(1), preInc1(&_cnt, 1))
- if _rc == i32(-1) {
+ _rc = _walTryBeginRead(tls, _pWal, &_5_notUsed, int32(1), preInc2(&_cnt, 1))
+ if _rc == int32(-1) {
goto _7
}
func() {
- if (_rc & i32(255)) == i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57384), unsafe.Pointer((*int8)(unsafe.Pointer(&_walRestartLogØ00__func__Ø000))), unsafe.Pointer(str(56243)))
+ if (_rc & int32(255)) == int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57384), unsafe.Pointer(&_walRestartLogØ00__func__Ø000), unsafe.Pointer(str(56219)))
crt.X__builtin_abort(tls)
}
}()
@@ -42364,164 +43094,167 @@ _0:
return _rc
_ = _cnt
- _ = _5_notUsed
panic(0)
}
var _walRestartLogØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_walRestartLogØ00__func__Ø000[0], str(56266), 14)
+ crt.Xstrncpy(nil, &_walRestartLogØ00__func__Ø000[0], str(56242), 14)
}
-// Write out a single frame of the WAL
+// C comment
+// /*
+// ** Write out a single frame of the WAL
+// */
func _walWriteOneFrame(tls *crt.TLS, _p *XWalWriter, _pPage *XPgHdr, _nTruncate int32, _iOffset int64) (r0 int32) {
var _rc int32
var _pData unsafe.Pointer
var _aFrame [24]uint8
- _pData = _pPage.X1
- _walEncodeFrame(tls, (*XWal)(_p.X0), _pPage.X5, uint32(_nTruncate), (*uint8)(_pData), (*uint8)(unsafe.Pointer(&_aFrame)))
- _rc = _walWriteToLog(tls, _p, (unsafe.Pointer)(&_aFrame), int32(u32(24)), _iOffset)
+ _pData = _pPage.XpData
+ _walEncodeFrame(tls, (*XWal)(_p.XpWal), _pPage.Xpgno, uint32(_nTruncate), (*uint8)(_pData), (*uint8)(unsafe.Pointer(&_aFrame)))
+ _rc = _walWriteToLog(tls, _p, unsafe.Pointer(&_aFrame), int32(24), _iOffset)
if _rc != 0 {
return _rc
}
- _rc = _walWriteToLog(tls, _p, _pData, _p.X4, _iOffset+int64(u32(24)))
+ _rc = _walWriteToLog(tls, _p, _pData, _p.XszPage, _iOffset+int64(24))
return _rc
_ = _aFrame
panic(0)
}
-// This function encodes a single frame header and writes it to a buffer
-// supplied by the caller. A frame-header is made up of a series of
-// 4-byte big-endian integers, as follows:
-//
-// 0: Page number.
-// 4: For commit records, the size of the database image in pages
-// after the commit. For all other records, zero.
-// 8: Salt-1 (copied from the wal-header)
-// 12: Salt-2 (copied from the wal-header)
-// 16: Checksum-1.
-// 20: Checksum-2.
+// C comment
+// /*
+// ** This function encodes a single frame header and writes it to a buffer
+// ** supplied by the caller. A frame-header is made up of a series of
+// ** 4-byte big-endian integers, as follows:
+// **
+// ** 0: Page number.
+// ** 4: For commit records, the size of the database image in pages
+// ** after the commit. For all other records, zero.
+// ** 8: Salt-1 (copied from the wal-header)
+// ** 12: Salt-2 (copied from the wal-header)
+// ** 16: Checksum-1.
+// ** 20: Checksum-2.
+// */
func _walEncodeFrame(tls *crt.TLS, _pWal *XWal, _iPage uint32, _nTruncate uint32, _aData *uint8, _aFrame *uint8) {
var _nativeCksum int32
var _aCksum *uint32
- _aCksum = (*uint32)(unsafe.Pointer((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8)))))
- i32(0)
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(0)))), _iPage)
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(4)))), _nTruncate)
- if (_pWal.X20) == uint32(i32(0)) {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(8))))), (unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X9)))), uint32(i32(8)))
- _nativeCksum = bool2int(int32((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X4) == i32(0))
- _walChecksumBytes(tls, _nativeCksum, _aFrame, i32(8), _aCksum, _aCksum)
- _walChecksumBytes(tls, _nativeCksum, _aData, int32(_pWal.X8), _aCksum, _aCksum)
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(16)))), *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aCksum)) + 4*uintptr(i32(0)))))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(20)))), *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aCksum)) + 4*uintptr(i32(1)))))
+ _aCksum = (*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum)))
+
+ _sqlite3Put4byte(tls, elem15(_aFrame, 0), _iPage)
+ _sqlite3Put4byte(tls, elem15(_aFrame, uintptr(4)), _nTruncate)
+ if _pWal.XiReCksum == (0) {
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_aFrame, uintptr(8))), unsafe.Pointer(&(_pWal.Xhdr.XaSalt)), uint32(8))
+ _nativeCksum = bool2int(int32(_pWal.Xhdr.XbigEndCksum) == int32(0))
+ _walChecksumBytes(tls, _nativeCksum, _aFrame, int32(8), _aCksum, _aCksum)
+ _walChecksumBytes(tls, _nativeCksum, _aData, int32(_pWal.XszPage), _aCksum, _aCksum)
+ _sqlite3Put4byte(tls, elem15(_aFrame, uintptr(16)), *elem7(_aCksum, 0))
+ _sqlite3Put4byte(tls, elem15(_aFrame, uintptr(20)), *elem7(_aCksum, uintptr(1)))
goto _1
}
- crt.Xmemset(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrame))+1*uintptr(i32(8))))), i32(0), uint32(i32(16)))
+ crt.Xmemset(tls, unsafe.Pointer(elem15(_aFrame, uintptr(8))), int32(0), uint32(16))
_1:
}
-// Write iAmt bytes of content into the WAL file beginning at iOffset.
-// Do a sync when crossing the p->iSyncPoint boundary.
-//
-// In other words, if iSyncPoint is in between iOffset and iOffset+iAmt,
-// first write the part before iSyncPoint, then sync, then write the
-// rest.
+// C comment
+// /*
+// ** Write iAmt bytes of content into the WAL file beginning at iOffset.
+// ** Do a sync when crossing the p->iSyncPoint boundary.
+// **
+// ** In other words, if iSyncPoint is in between iOffset and iOffset+iAmt,
+// ** first write the part before iSyncPoint, then sync, then write the
+// ** rest.
+// */
func _walWriteToLog(tls *crt.TLS, _p *XWalWriter, _pContent unsafe.Pointer, _iAmt int32, _iOffset int64) (r0 int32) {
var _rc, _1_iFirstAmt int32
- if _iOffset >= (_p.X2) || (_iOffset+int64(_iAmt)) < (_p.X2) {
+ if _iOffset >= _p.XiSyncPoint || (_iOffset+int64(_iAmt)) < _p.XiSyncPoint {
goto _1
}
- _1_iFirstAmt = int32((_p.X2) - _iOffset)
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_p.X1), _pContent, _1_iFirstAmt, _iOffset)
+ _1_iFirstAmt = int32(_p.XiSyncPoint - _iOffset)
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_p.XpFd), _pContent, _1_iFirstAmt, _iOffset)
if _rc != 0 {
return _rc
}
- {
- p := &_iOffset
- *p = (*p) + int64(_1_iFirstAmt)
- sink6(*p)
- }
- {
- p := &_iAmt
- *p = (*p) - _1_iFirstAmt
- sink1(*p)
- }
- _pContent = (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_1_iFirstAmt))))) + uintptr(unsafe.Pointer((*int8)(_pContent))))))
+ _iOffset += int64(_1_iFirstAmt)
+ _iAmt -= _1_iFirstAmt
+ _pContent = unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_1_iFirstAmt) + uintptr(_pContent))))
func() {
- if ((_p.X3) & i32(3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57427), unsafe.Pointer((*int8)(unsafe.Pointer(&_walWriteToLogØ00__func__Ø000))), unsafe.Pointer(str(56280)))
+ if (_p.XsyncFlags & int32(3)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57427), unsafe.Pointer(&_walWriteToLogØ00__func__Ø000), unsafe.Pointer(str(56256)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_p.X1), (_p.X3)&i32(19))
- if (_iAmt == i32(0)) || _rc != 0 {
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_p.XpFd), _p.XsyncFlags&int32(19))
+ if (_iAmt == int32(0)) || _rc != 0 {
return _rc
}
_1:
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_p.X1), _pContent, _iAmt, _iOffset)
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_p.XpFd), _pContent, _iAmt, _iOffset)
return _rc
}
var _walWriteToLogØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_walWriteToLogØ00__func__Ø000[0], str(56333), 14)
+ crt.Xstrncpy(nil, &_walWriteToLogØ00__func__Ø000[0], str(56309), 14)
}
-// This function is called as part of committing a transaction within which
-// one or more frames have been overwritten. It updates the checksums for
-// all frames written to the wal file by the current transaction starting
-// with the earliest to have been overwritten.
-//
-// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+// C comment
+// /*
+// ** This function is called as part of committing a transaction within which
+// ** one or more frames have been overwritten. It updates the checksums for
+// ** all frames written to the wal file by the current transaction starting
+// ** with the earliest to have been overwritten.
+// **
+// ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+// */
func _walRewriteChecksums(tls *crt.TLS, _pWal *XWal, _iLast uint32) (r0 int32) {
var _szPage, _rc int32
var _iCksumOff, _3_iOff int64
var _iRead, _4_iPgno, _4_nDbSize uint32
var _aBuf *uint8
var _aFrame [24]uint8
- _szPage = int32(_pWal.X8)
- _rc = i32(0)
- _aBuf = (*uint8)(Xsqlite3_malloc(tls, _szPage+i32(24)))
+ _szPage = int32(_pWal.XszPage)
+ _rc = int32(0)
+ _aBuf = (*uint8)(Xsqlite3_malloc(tls, _szPage+int32(24)))
if _aBuf == nil {
- return _sqlite3NomemError(tls, i32(57477))
+ return _sqlite3NomemError(tls, int32(57477))
}
func() {
- if (_pWal.X20) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(57484), unsafe.Pointer((*int8)(unsafe.Pointer(&_walRewriteChecksumsØ00__func__Ø000))), unsafe.Pointer(str(56347)))
+ if _pWal.XiReCksum <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(57484), unsafe.Pointer(&_walRewriteChecksumsØ00__func__Ø000), unsafe.Pointer(str(56323)))
crt.X__builtin_abort(tls)
}
}()
- if (_pWal.X20) == uint32(i32(1)) {
- _iCksumOff = int64(i32(24))
+ if _pWal.XiReCksum == uint32(1) {
+ _iCksumOff = int64(24)
goto _4
}
- _iCksumOff = (int64(i32(32)) + (int64(((_pWal.X20)-uint32(i32(1)))-uint32(i32(1))) * int64(_szPage+i32(24)))) + int64(i32(16))
+ _iCksumOff = (int64(32) + (int64((_pWal.XiReCksum-uint32(1))-uint32(1)) * int64(_szPage+int32(24)))) + int64(16)
_4:
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.X2), (unsafe.Pointer)(_aBuf), int32(u32(8)), _iCksumOff)
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(0)))) = _sqlite3Get4byte(tls, _aBuf)
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&((*XWalIndexHdr)(unsafe.Pointer(&(_pWal.X18))).X8))))) + 4*uintptr(i32(1)))) = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aBuf))+1*uintptr(u32(4)))))
- _iRead = _pWal.X20
- *(*uint32)(unsafe.Pointer(&(_pWal.X20))) = uint32(i32(0))
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.XpWalFd), unsafe.Pointer(_aBuf), int32(8), _iCksumOff)
+ *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), 0) = _sqlite3Get4byte(tls, _aBuf)
+ *elem7((*uint32)(unsafe.Pointer(&(_pWal.Xhdr.XaFrameCksum))), uintptr(1)) = _sqlite3Get4byte(tls, elem15(_aBuf, uintptr(4)))
+ _iRead = _pWal.XiReCksum
+ _pWal.XiReCksum = 0
_5:
- if _rc != i32(0) || _iRead > _iLast {
+ if _rc != int32(0) || _iRead > _iLast {
goto _9
}
- _3_iOff = int64(i32(32)) + (int64(_iRead-uint32(i32(1))) * int64(_szPage+i32(24)))
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.X2), (unsafe.Pointer)(_aBuf), _szPage+i32(24), _3_iOff)
- if _rc == i32(0) {
+ _3_iOff = int64(32) + (int64(_iRead-uint32(1)) * int64(_szPage+int32(24)))
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pWal.XpWalFd), unsafe.Pointer(_aBuf), _szPage+int32(24), _3_iOff)
+ if _rc == int32(0) {
_4_iPgno = _sqlite3Get4byte(tls, _aBuf)
- _4_nDbSize = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aBuf))+1*uintptr(i32(4)))))
- _walEncodeFrame(tls, _pWal, _4_iPgno, _4_nDbSize, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aBuf))+1*uintptr(i32(24)))), (*uint8)(unsafe.Pointer(&_aFrame)))
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pWal.X2), (unsafe.Pointer)(&_aFrame), int32(u32(24)), _3_iOff)
+ _4_nDbSize = _sqlite3Get4byte(tls, elem15(_aBuf, uintptr(4)))
+ _walEncodeFrame(tls, _pWal, _4_iPgno, _4_nDbSize, elem15(_aBuf, uintptr(24)), (*uint8)(unsafe.Pointer(&_aFrame)))
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pWal.XpWalFd), unsafe.Pointer(&_aFrame), int32(24), _3_iOff)
}
_iRead += 1
goto _5
_9:
- Xsqlite3_free(tls, (unsafe.Pointer)(_aBuf))
+ Xsqlite3_free(tls, unsafe.Pointer(_aBuf))
return _rc
_ = _aFrame
@@ -42531,97 +43264,100 @@ _9:
var _walRewriteChecksumsØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_walRewriteChecksumsØ00__func__Ø000[0], str(56364), 20)
-}
-
-// This routine is called to increment the value of the database file
-// change-counter, stored as a 4-byte big-endian integer starting at
-// byte offset 24 of the pager file. The secondary change counter at
-// 92 is also updated, as is the SQLite version number at offset 96.
-//
-// But this only happens if the pPager->changeCountDone flag is false.
-// To avoid excess churning of page 1, the update only happens once.
-// See also the pager_write_changecounter() routine that does an
-// unconditional update of the change counters.
-//
-// If the isDirectMode flag is zero, then this is done by calling
-// sqlite3PagerWrite() on page 1, then modifying the contents of the
-// page data. In this case the file will be updated when the current
-// transaction is committed.
-//
-// The isDirectMode flag may only be non-zero if the library was compiled
-// with the SQLITE_ENABLE_ATOMIC_WRITE macro defined. In this case,
-// if isDirect is non-zero, then the database file is updated directly
-// by writing an updated version of page 1 using a call to the
-// sqlite3OsWrite() function.
+ crt.Xstrncpy(nil, &_walRewriteChecksumsØ00__func__Ø000[0], str(56340), 20)
+}
+
+// C comment
+// /*
+// ** This routine is called to increment the value of the database file
+// ** change-counter, stored as a 4-byte big-endian integer starting at
+// ** byte offset 24 of the pager file. The secondary change counter at
+// ** 92 is also updated, as is the SQLite version number at offset 96.
+// **
+// ** But this only happens if the pPager->changeCountDone flag is false.
+// ** To avoid excess churning of page 1, the update only happens once.
+// ** See also the pager_write_changecounter() routine that does an
+// ** unconditional update of the change counters.
+// **
+// ** If the isDirectMode flag is zero, then this is done by calling
+// ** sqlite3PagerWrite() on page 1, then modifying the contents of the
+// ** page data. In this case the file will be updated when the current
+// ** transaction is committed.
+// **
+// ** The isDirectMode flag may only be non-zero if the library was compiled
+// ** with the SQLITE_ENABLE_ATOMIC_WRITE macro defined. In this case,
+// ** if isDirect is non-zero, then the database file is updated directly
+// ** by writing an updated version of page 1 using a call to the
+// ** sqlite3OsWrite() function.
+// */
func _pager_incr_changecounter(tls *crt.TLS, _pPager *XPager, _isDirectMode int32) (r0 int32) {
var _rc int32
var _4_zBuf, _6_pCopy unsafe.Pointer
var _1_pPgHdr *XPgHdr
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if int32(_pPager.X14) != i32(3) && int32(_pPager.X14) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53073), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000))), unsafe.Pointer(str(55020)))
+ if int32(_pPager.XeState) != int32(3) && int32(_pPager.XeState) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53073), unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000), unsafe.Pointer(str(54996)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53076), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53076), unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _isDirectMode != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53090), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000))), unsafe.Pointer(str(56384)))
+ if _isDirectMode != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53090), unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000), unsafe.Pointer(str(56360)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X16) != 0 || func() int32 {
- if (_pPager.X22) > uint32(i32(0)) {
- return i32(1)
+ if _pPager.XchangeCountDone != 0 || func() int32 {
+ if _pPager.XdbSize > (0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53096), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53096), unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _10
}
func() {
- if (_pPager.X10) != 0 || (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53099), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000))), unsafe.Pointer(str(56400)))
+ if _pPager.XtempFile != 0 || (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53099), unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000), unsafe.Pointer(str(56376)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerGet(tls, _pPager, uint32(i32(1)), &_1_pPgHdr, i32(0))
+ _rc = _sqlite3PagerGet(tls, _pPager, uint32(1), &_1_pPgHdr, int32(0))
func() {
- if _1_pPgHdr != nil && _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53103), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000))), unsafe.Pointer(str(56440)))
+ if _1_pPgHdr != nil && _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53103), unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000), unsafe.Pointer(str(56416)))
crt.X__builtin_abort(tls)
}
}()
- if i32(1) != 0 && func() int32 {
- if _rc == i32(0) {
- return i32(1)
+ if int32(1) != 0 && func() int32 {
+ if _rc == int32(0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53110), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53110), unsafe.Pointer(&_pager_incr_changecounterØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
_rc = _sqlite3PagerWrite(tls, _1_pPgHdr)
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _21
}
_pager_write_changecounter(tls, _1_pPgHdr)
goto _22
_22:
- *(*uint8)(unsafe.Pointer(&(_pPager.X16))) = uint8(i32(1))
+ _pPager.XchangeCountDone = uint8(1)
_21:
_sqlite3PagerUnref(tls, _1_pPgHdr)
_10:
@@ -42635,80 +43371,75 @@ _10:
var _pager_incr_changecounterØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_pager_incr_changecounterØ00__func__Ø000[0], str(56467), 25)
-}
-
-// Write the supplied master journal name into the journal file for pager
-// pPager at the current location. The master journal name must be the last
-// thing written to a journal file. If the pager is in full-sync mode, the
-// journal file descriptor is advanced to the next sector boundary before
-// anything is written. The format is:
-//
-// + 4 bytes: PAGER_MJ_PGNO.
-// + N bytes: Master journal filename in utf-8.
-// + 4 bytes: N (length of master journal name in bytes, no nul-terminator).
-// + 4 bytes: Master journal name checksum.
-// + 8 bytes: aJournalMagic[].
-//
-// The master journal page checksum is the sum of the bytes in the master
-// journal name, where each byte is interpreted as a signed 8-bit integer.
-//
-// If zMaster is a NULL pointer (occurs for a single database transaction),
-// this call is a no-op.
+ crt.Xstrncpy(nil, &_pager_incr_changecounterØ00__func__Ø000[0], str(56443), 25)
+}
+
+// C comment
+// /*
+// ** Write the supplied master journal name into the journal file for pager
+// ** pPager at the current location. The master journal name must be the last
+// ** thing written to a journal file. If the pager is in full-sync mode, the
+// ** journal file descriptor is advanced to the next sector boundary before
+// ** anything is written. The format is:
+// **
+// ** + 4 bytes: PAGER_MJ_PGNO.
+// ** + N bytes: Master journal filename in utf-8.
+// ** + 4 bytes: N (length of master journal name in bytes, no nul-terminator).
+// ** + 4 bytes: Master journal name checksum.
+// ** + 8 bytes: aJournalMagic[].
+// **
+// ** The master journal page checksum is the sum of the bytes in the master
+// ** journal name, where each byte is interpreted as a signed 8-bit integer.
+// **
+// ** If zMaster is a NULL pointer (occurs for a single database transaction),
+// ** this call is a no-op.
+// */
func _writeMasterJournal(tls *crt.TLS, _pPager *XPager, _zMaster *int8) (r0 int32) {
var _rc, _nMaster int32
var _iHdrOff, _jrnlSize int64
var _cksum uint32
- _cksum = u32(0)
+ _cksum = uint32(0)
func() {
- if int32(_pPager.X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48585), unsafe.Pointer((*int8)(unsafe.Pointer(&_writeMasterJournalØ00__func__Ø000))), unsafe.Pointer(str(12025)))
+ if int32(_pPager.XsetMaster) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48585), unsafe.Pointer(&_writeMasterJournalØ00__func__Ø000), unsafe.Pointer(str(11980)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XWal)(_pPager.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48586), unsafe.Pointer((*int8)(unsafe.Pointer(&_writeMasterJournalØ00__func__Ø000))), unsafe.Pointer(str(12168)))
+ if (*XWal)(_pPager.XpWal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48586), unsafe.Pointer(&_writeMasterJournalØ00__func__Ø000), unsafe.Pointer(str(12123)))
crt.X__builtin_abort(tls)
}
}()
- if ((_zMaster == nil) || (int32(_pPager.X2) == i32(4))) || ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil) {
- return i32(0)
+ if ((_zMaster == nil) || (int32(_pPager.XjournalMode) == int32(4))) || ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil) {
+ return int32(0)
}
- *(*uint8)(unsafe.Pointer(&(_pPager.X17))) = uint8(i32(1))
+ _pPager.XsetMaster = uint8(1)
func() {
- if (_pPager.X35) > (_pPager.X34) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(48595), unsafe.Pointer((*int8)(unsafe.Pointer(&_writeMasterJournalØ00__func__Ø000))), unsafe.Pointer(str(13683)))
+ if _pPager.XjournalHdr > _pPager.XjournalOff {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(48595), unsafe.Pointer(&_writeMasterJournalØ00__func__Ø000), unsafe.Pointer(str(13638)))
crt.X__builtin_abort(tls)
}
}()
- _nMaster = i32(0)
+ _nMaster = int32(0)
_9:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMaster)) + 1*uintptr(_nMaster)))) == 0 {
+ if (*elem1(_zMaster, uintptr(_nMaster))) == 0 {
goto _12
}
- {
- p := &_cksum
- *p = (*p) + uint32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMaster)) + 1*uintptr(_nMaster))))
- sink5(*p)
- }
+ _cksum += uint32(*elem1(_zMaster, uintptr(_nMaster)))
_nMaster += 1
goto _9
_12:
- if (_pPager.X5) != 0 {
- *(*int64)(unsafe.Pointer(&(_pPager.X34))) = _journalHdrOffset(tls, _pPager)
+ if _pPager.XfullSync != 0 {
+ _pPager.XjournalOff = _journalHdrOffset(tls, _pPager)
}
- _iHdrOff = _pPager.X34
- if ((((i32(0) != store1(&_rc, _write32bits(tls, (*Xsqlite3_file)(_pPager.X32), _iHdrOff, uint32((_sqlite3PendingByte/(_pPager.X48))+i32(1))))) || (i32(0) != store1(&_rc, _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(_zMaster), _nMaster, _iHdrOff+int64(i32(4)))))) || (i32(0) != store1(&_rc, _write32bits(tls, (*Xsqlite3_file)(_pPager.X32), (_iHdrOff+int64(i32(4)))+int64(_nMaster), uint32(_nMaster))))) || (i32(0) != store1(&_rc, _write32bits(tls, (*Xsqlite3_file)(_pPager.X32), ((_iHdrOff+int64(i32(4)))+int64(_nMaster))+int64(i32(4)), _cksum)))) || (i32(0) != store1(&_rc, _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(&_aJournalMagic), i32(8), ((_iHdrOff+int64(i32(4)))+int64(_nMaster))+int64(i32(8))))) {
+ _iHdrOff = _pPager.XjournalOff
+ if ((((int32(0) != store2(&_rc, _write32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), _iHdrOff, uint32((_sqlite3PendingByte/_pPager.XpageSize)+int32(1))))) || (int32(0) != store2(&_rc, _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(_zMaster), _nMaster, _iHdrOff+int64(4))))) || (int32(0) != store2(&_rc, _write32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), (_iHdrOff+int64(4))+int64(_nMaster), uint32(_nMaster))))) || (int32(0) != store2(&_rc, _write32bits(tls, (*Xsqlite3_file)(_pPager.Xjfd), ((_iHdrOff+int64(4))+int64(_nMaster))+int64(4), _cksum)))) || (int32(0) != store2(&_rc, _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(&_aJournalMagic), int32(8), ((_iHdrOff+int64(4))+int64(_nMaster))+int64(8)))) {
return _rc
}
- {
- p := (*int64)(unsafe.Pointer(&(_pPager.X34)))
- *p = (*p) + int64(_nMaster+i32(20))
- sink6(*p)
- }
- if (i32(0) == store1(&_rc, _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.X32), &_jrnlSize))) && (_jrnlSize > (_pPager.X34)) {
- _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.X32), _pPager.X34)
+ _pPager.XjournalOff += int64(_nMaster + int32(20))
+ if (int32(0) == store2(&_rc, _sqlite3OsFileSize(tls, (*Xsqlite3_file)(_pPager.Xjfd), &_jrnlSize))) && (_jrnlSize > _pPager.XjournalOff) {
+ _rc = _sqlite3OsTruncate(tls, (*Xsqlite3_file)(_pPager.Xjfd), _pPager.XjournalOff)
}
return _rc
}
@@ -42716,151 +43447,154 @@ _12:
var _writeMasterJournalØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_writeMasterJournalØ00__func__Ø000[0], str(56492), 19)
-}
-
-// Sync the journal. In other words, make sure all the pages that have
-// been written to the journal have actually reached the surface of the
-// disk and can be restored in the event of a hot-journal rollback.
-//
-// If the Pager.noSync flag is set, then this function is a no-op.
-// Otherwise, the actions required depend on the journal-mode and the
-// device characteristics of the file-system, as follows:
-//
-// * If the journal file is an in-memory journal file, no action need
-// be taken.
-//
-// * Otherwise, if the device does not support the SAFE_APPEND property,
-// then the nRec field of the most recently written journal header
-// is updated to contain the number of journal records that have
-// been written following it. If the pager is operating in full-sync
-// mode, then the journal file is synced before this field is updated.
-//
-// * If the device does not support the SEQUENTIAL property, then
-// journal file is synced.
-//
-// Or, in pseudo-code:
-//
-// if( NOT <in-memory journal> ){
-// if( NOT SAFE_APPEND ){
-// if( <full-sync mode> ) xSync(<journal file>);
-// <update nRec field>
-// }
-// if( NOT SEQUENTIAL ) xSync(<journal file>);
-// }
-//
-// If successful, this routine clears the PGHDR_NEED_SYNC flag of every
-// page currently held in memory before returning SQLITE_OK. If an IO
-// error is encountered, then the IO error code is returned to the caller.
+ crt.Xstrncpy(nil, &_writeMasterJournalØ00__func__Ø000[0], str(56468), 19)
+}
+
+// C comment
+// /*
+// ** Sync the journal. In other words, make sure all the pages that have
+// ** been written to the journal have actually reached the surface of the
+// ** disk and can be restored in the event of a hot-journal rollback.
+// **
+// ** If the Pager.noSync flag is set, then this function is a no-op.
+// ** Otherwise, the actions required depend on the journal-mode and the
+// ** device characteristics of the file-system, as follows:
+// **
+// ** * If the journal file is an in-memory journal file, no action need
+// ** be taken.
+// **
+// ** * Otherwise, if the device does not support the SAFE_APPEND property,
+// ** then the nRec field of the most recently written journal header
+// ** is updated to contain the number of journal records that have
+// ** been written following it. If the pager is operating in full-sync
+// ** mode, then the journal file is synced before this field is updated.
+// **
+// ** * If the device does not support the SEQUENTIAL property, then
+// ** journal file is synced.
+// **
+// ** Or, in pseudo-code:
+// **
+// ** if( NOT <in-memory journal> ){
+// ** if( NOT SAFE_APPEND ){
+// ** if( <full-sync mode> ) xSync(<journal file>);
+// ** <update nRec field>
+// ** }
+// ** if( NOT SEQUENTIAL ) xSync(<journal file>);
+// ** }
+// **
+// ** If successful, this routine clears the PGHDR_NEED_SYNC flag of every
+// ** page currently held in memory before returning SQLITE_OK. If an IO
+// ** error is encountered, then the IO error code is returned to the caller.
+// */
func _syncJournal(tls *crt.TLS, _pPager *XPager, _newHdr int32) (r0 int32) {
var _rc, _2_iDc int32
var _3_iNextHdrOffset int64
var _3_aMagic [8]uint8
var _3_zHeader [12]uint8
func() {
- if int32(_pPager.X14) != i32(3) && int32(_pPager.X14) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51120), unsafe.Pointer((*int8)(unsafe.Pointer(&_syncJournalØ00__func__Ø000))), unsafe.Pointer(str(55020)))
+ if int32(_pPager.XeState) != int32(3) && int32(_pPager.XeState) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51120), unsafe.Pointer(&_syncJournalØ00__func__Ø000), unsafe.Pointer(str(54996)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51123), unsafe.Pointer((*int8)(unsafe.Pointer(&_syncJournalØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51123), unsafe.Pointer(&_syncJournalØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XWal)(_pPager.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51124), unsafe.Pointer((*int8)(unsafe.Pointer(&_syncJournalØ00__func__Ø000))), unsafe.Pointer(str(12168)))
+ if (*XWal)(_pPager.XpWal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51124), unsafe.Pointer(&_syncJournalØ00__func__Ø000), unsafe.Pointer(str(12123)))
crt.X__builtin_abort(tls)
}
}()
_rc = _sqlite3PagerExclusiveLock(tls, _pPager)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- if (_pPager.X4) != 0 {
+ if _pPager.XnoSync != 0 {
goto _8
}
func() {
- if (_pPager.X10) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51130), unsafe.Pointer((*int8)(unsafe.Pointer(&_syncJournalØ00__func__Ø000))), unsafe.Pointer(str(51663)))
+ if _pPager.XtempFile != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51130), unsafe.Pointer(&_syncJournalØ00__func__Ø000), unsafe.Pointer(str(51639)))
crt.X__builtin_abort(tls)
}
}()
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil || int32(_pPager.X2) == i32(4) {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil || int32(_pPager.XjournalMode) == int32(4) {
goto _12
}
- _2_iDc = _sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.X31))
+ _2_iDc = _sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.Xfd))
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51133), unsafe.Pointer((*int8)(unsafe.Pointer(&_syncJournalØ00__func__Ø000))), unsafe.Pointer(str(13626)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51133), unsafe.Pointer(&_syncJournalØ00__func__Ø000), unsafe.Pointer(str(13581)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) != (_2_iDc & i32(512)) {
+ if int32(0) != (_2_iDc & int32(512)) {
goto _15
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_3_zHeader), (unsafe.Pointer)(&_aJournalMagic), u32(8))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_3_zHeader))+1*uintptr(u32(8)))), uint32(_pPager.X27))
+ crt.Xmemcpy(tls, unsafe.Pointer(&_3_zHeader), unsafe.Pointer(&_aJournalMagic), uint32(8))
+ _sqlite3Put4byte(tls, elem15((*uint8)(unsafe.Pointer(&_3_zHeader)), uintptr(8)), uint32(_pPager.XnRec))
_3_iNextHdrOffset = _journalHdrOffset(tls, _pPager)
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(&_3_aMagic), i32(8), _3_iNextHdrOffset)
- if (_rc == i32(0)) && (i32(0) == crt.Xmemcmp(tls, (unsafe.Pointer)(&_3_aMagic), (unsafe.Pointer)(&_aJournalMagic), uint32(i32(8)))) {
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(&_syncJournalØ00zerobyteØ001), i32(1), _3_iNextHdrOffset)
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(&_3_aMagic), int32(8), _3_iNextHdrOffset)
+ if (_rc == int32(0)) && (int32(0) == crt.Xmemcmp(tls, unsafe.Pointer(&_3_aMagic), unsafe.Pointer(&_aJournalMagic), uint32(8))) {
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(&_syncJournalØ00zerobyteØ001), int32(1), _3_iNextHdrOffset)
}
- if (_rc != i32(0)) && (_rc != i32(522)) {
+ if (_rc != int32(0)) && (_rc != int32(522)) {
return _rc
}
- if (_pPager.X5) == 0 || i32(0) != (_2_iDc&i32(1024)) {
+ if _pPager.XfullSync == 0 || int32(0) != (_2_iDc&int32(1024)) {
goto _21
}
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.X32), int32(_pPager.X9))
- if _rc != i32(0) {
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.Xjfd), int32(_pPager.XsyncFlags))
+ if _rc != int32(0) {
return _rc
}
_21:
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X32), (unsafe.Pointer)(&_3_zHeader), int32(u32(12)), _pPager.X35)
- if _rc != i32(0) {
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xjfd), unsafe.Pointer(&_3_zHeader), int32(12), _pPager.XjournalHdr)
+ if _rc != int32(0) {
return _rc
}
_15:
- if i32(0) != (_2_iDc & i32(1024)) {
+ if int32(0) != (_2_iDc & int32(1024)) {
goto _24
}
- _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.X32), int32(_pPager.X9)|func() int32 {
- if int32(_pPager.X9) == i32(3) {
- return i32(16)
+ _rc = _sqlite3OsSync(tls, (*Xsqlite3_file)(_pPager.Xjfd), int32(_pPager.XsyncFlags)|func() int32 {
+ if int32(_pPager.XsyncFlags) == int32(3) {
+ return int32(16)
}
- return i32(0)
+ return int32(0)
}())
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
_24:
- *(*int64)(unsafe.Pointer(&(_pPager.X35))) = _pPager.X34
- if _newHdr == 0 || i32(0) != (_2_iDc&i32(512)) {
+ _pPager.XjournalHdr = _pPager.XjournalOff
+ if _newHdr == 0 || int32(0) != (_2_iDc&int32(512)) {
goto _29
}
- *(*int32)(unsafe.Pointer(&(_pPager.X27))) = i32(0)
+ _pPager.XnRec = int32(0)
_rc = _writeJournalHdr(tls, _pPager)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
_29:
goto _31
_12:
- *(*int64)(unsafe.Pointer(&(_pPager.X35))) = _pPager.X34
+ _pPager.XjournalHdr = _pPager.XjournalOff
_31:
_8:
- _sqlite3PcacheClearSyncFlags(tls, (*XPCache)(_pPager.X59))
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(4))
+ _sqlite3PcacheClearSyncFlags(tls, (*XPCache)(_pPager.XpPCache))
+ _pPager.XeState = uint8(4)
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51224), unsafe.Pointer((*int8)(unsafe.Pointer(&_syncJournalØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51224), unsafe.Pointer(&_syncJournalØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
_ = _3_aMagic
_ = _3_zHeader
@@ -42870,44 +43604,47 @@ _8:
var _syncJournalØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_syncJournalØ00__func__Ø000[0], str(56511), 12)
+ crt.Xstrncpy(nil, &_syncJournalØ00__func__Ø000[0], str(56487), 12)
}
-// This function may only be called while a write-transaction is active in
-// rollback. If the connection is in WAL mode, this call is a no-op.
-// Otherwise, if the connection does not already have an EXCLUSIVE lock on
-// the database file, an attempt is made to obtain one.
-//
-// If the EXCLUSIVE lock is already held or the attempt to obtain it is
-// successful, or the connection is in WAL mode, SQLITE_OK is returned.
-// Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is
-// returned.
+// C comment
+// /*
+// ** This function may only be called while a write-transaction is active in
+// ** rollback. If the connection is in WAL mode, this call is a no-op.
+// ** Otherwise, if the connection does not already have an EXCLUSIVE lock on
+// ** the database file, an attempt is made to obtain one.
+// **
+// ** If the EXCLUSIVE lock is already held or the attempt to obtain it is
+// ** successful, or the connection is in WAL mode, SQLITE_OK is returned.
+// ** Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is
+// ** returned.
+// */
func _sqlite3PagerExclusiveLock(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc int32
- _rc = _pPager.X26
+ _rc = _pPager.XerrCode
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53181), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerExclusiveLockØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53181), unsafe.Pointer(&_sqlite3PagerExclusiveLockØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _2
}
func() {
- if int32(_pPager.X14) != i32(3) && int32(_pPager.X14) != i32(4) && int32(_pPager.X14) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53183), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerExclusiveLockØ00__func__Ø000))), unsafe.Pointer(str(56523)))
+ if int32(_pPager.XeState) != int32(3) && int32(_pPager.XeState) != int32(4) && int32(_pPager.XeState) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53183), unsafe.Pointer(&_sqlite3PagerExclusiveLockØ00__func__Ø000), unsafe.Pointer(str(56499)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53187), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerExclusiveLockØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53187), unsafe.Pointer(&_sqlite3PagerExclusiveLockØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) == bool2int((*XWal)(_pPager.X60) != nil) {
- _rc = _pager_wait_on_lock(tls, _pPager, i32(4))
+ if int32(0) == bool2int((*XWal)(_pPager.XpWal) != nil) {
+ _rc = _pager_wait_on_lock(tls, _pPager, int32(4))
}
_2:
return _rc
@@ -42916,142 +43653,147 @@ _2:
var _sqlite3PagerExclusiveLockØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerExclusiveLockØ00__func__Ø000[0], str(56638), 26)
+ crt.Xstrncpy(nil, &_sqlite3PagerExclusiveLockØ00__func__Ø000[0], str(56614), 26)
}
var _syncJournalØ00zerobyteØ001 uint8
-// Clear the PGHDR_NEED_SYNC flag from all dirty pages.
+// C comment
+// /*
+// ** Clear the PGHDR_NEED_SYNC flag from all dirty pages.
+// */
func _sqlite3PcacheClearSyncFlags(tls *crt.TLS, _pCache *XPCache) {
var _p *XPgHdr
- _p = (*XPgHdr)(_pCache.X0)
+ _p = (*XPgHdr)(_pCache.XpDirty)
_0:
if _p == nil {
goto _3
}
{
- p := (*uint16)(unsafe.Pointer(&(_p.X6)))
- *p = uint16(int32(*p) & i32(-9))
- sink14(*p)
+ p := &_p.Xflags
+ *p = uint16(int32(*p) & int32(-9))
}
- _p = (*XPgHdr)(_p.X9)
+ _p = (*XPgHdr)(_p.XpDirtyNext)
goto _0
_3:
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCache.X2))))) = (*XPgHdr)(_pCache.X1)
-}
-
-// The argument is the first in a linked list of dirty pages connected
-// by the PgHdr.pDirty pointer. This function writes each one of the
-// in-memory pages in the list to the database file. The argument may
-// be NULL, representing an empty list. In this case this function is
-// a no-op.
-//
-// The pager must hold at least a RESERVED lock when this function
-// is called. Before writing anything to the database file, this lock
-// is upgraded to an EXCLUSIVE lock. If the lock cannot be obtained,
-// SQLITE_BUSY is returned and no data is written to the database file.
-//
-// If the pager is a temp-file pager and the actual file-system file
-// is not yet open, it is created and opened before any data is
-// written out.
-//
-// Once the lock has been upgraded and, if necessary, the file opened,
-// the pages are written out to the database file in list order. Writing
-// a page is skipped if it meets either of the following criteria:
-//
-// * The page number is greater than Pager.dbSize, or
-// * The PGHDR_DONT_WRITE flag is set on the page.
-//
-// If writing out a page causes the database file to grow, Pager.dbFileSize
-// is updated accordingly. If page 1 is written out, then the value cached
-// in Pager.dbFileVers[] is updated to match the new value stored in
-// the database file.
-//
-// If everything is successful, SQLITE_OK is returned. If an IO error
-// occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot
-// be obtained, SQLITE_BUSY is returned.
+ *(**XPgHdr)(unsafe.Pointer(&_pCache.XpSynced)) = (*XPgHdr)(_pCache.XpDirtyTail)
+}
+
+// C comment
+// /*
+// ** The argument is the first in a linked list of dirty pages connected
+// ** by the PgHdr.pDirty pointer. This function writes each one of the
+// ** in-memory pages in the list to the database file. The argument may
+// ** be NULL, representing an empty list. In this case this function is
+// ** a no-op.
+// **
+// ** The pager must hold at least a RESERVED lock when this function
+// ** is called. Before writing anything to the database file, this lock
+// ** is upgraded to an EXCLUSIVE lock. If the lock cannot be obtained,
+// ** SQLITE_BUSY is returned and no data is written to the database file.
+// **
+// ** If the pager is a temp-file pager and the actual file-system file
+// ** is not yet open, it is created and opened before any data is
+// ** written out.
+// **
+// ** Once the lock has been upgraded and, if necessary, the file opened,
+// ** the pages are written out to the database file in list order. Writing
+// ** a page is skipped if it meets either of the following criteria:
+// **
+// ** * The page number is greater than Pager.dbSize, or
+// ** * The PGHDR_DONT_WRITE flag is set on the page.
+// **
+// ** If writing out a page causes the database file to grow, Pager.dbFileSize
+// ** is updated accordingly. If page 1 is written out, then the value cached
+// ** in Pager.dbFileVers[] is updated to match the new value stored in
+// ** the database file.
+// **
+// ** If everything is successful, SQLITE_OK is returned. If an IO error
+// ** occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot
+// ** be obtained, SQLITE_BUSY is returned.
+// */
func _pager_write_pagelist(tls *crt.TLS, _pPager *XPager, _pList *XPgHdr) (r0 int32) {
var _rc int32
var _2_szFile, _4_offset int64
var _3_pgno uint32
var _4_pData *int8
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (*XWal)(_pPager.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51264), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000))), unsafe.Pointer(str(12168)))
+ if (*XWal)(_pPager.XpWal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51264), unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000), unsafe.Pointer(str(12123)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X10) == 0 && int32(_pPager.X14) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51265), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000))), unsafe.Pointer(str(56664)))
+ if _pPager.XtempFile == 0 && int32(_pPager.XeState) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51265), unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000), unsafe.Pointer(str(56640)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X15) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51266), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000))), unsafe.Pointer(str(18888)))
+ if int32(_pPager.XeLock) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51266), unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000), unsafe.Pointer(str(18843)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil && (*XPgHdr)(_pList.X3) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51267), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000))), unsafe.Pointer(str(56719)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil && (*XPgHdr)(_pList.XpDirty) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51267), unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000), unsafe.Pointer(str(56695)))
crt.X__builtin_abort(tls)
}
}()
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
func() {
- if (_pPager.X10) == 0 || _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51274), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000))), unsafe.Pointer(str(56758)))
+ if _pPager.XtempFile == 0 || _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51274), unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000), unsafe.Pointer(str(56734)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _pagerOpentemp(tls, _pPager, (*Xsqlite3_file)(_pPager.X31), int32(_pPager.X46))
+ _rc = _pagerOpentemp(tls, _pPager, (*Xsqlite3_file)(_pPager.Xfd), int32(_pPager.XvfsFlags))
}
func() {
- if _rc == i32(0) && (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51281), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000))), unsafe.Pointer(str(56792)))
+ if _rc == int32(0) && (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51281), unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000), unsafe.Pointer(str(56768)))
crt.X__builtin_abort(tls)
}
}()
- if ((_rc == i32(0)) && ((_pPager.X25) < (_pPager.X22))) && (((*XPgHdr)(_pList.X3) != nil) || ((_pList.X5) > (_pPager.X25))) {
- _2_szFile = int64(_pPager.X48) * int64(_pPager.X22)
- _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pPager.X31), i32(5), (unsafe.Pointer)(&_2_szFile))
- *(*uint32)(unsafe.Pointer(&(_pPager.X25))) = _pPager.X22
+ if ((_rc == int32(0)) && (_pPager.XdbHintSize < _pPager.XdbSize)) && ((_pList.XpDirty != nil) || (_pList.Xpgno > _pPager.XdbHintSize)) {
+ _2_szFile = int64(_pPager.XpageSize) * int64(_pPager.XdbSize)
+ _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pPager.Xfd), int32(5), unsafe.Pointer(&_2_szFile))
+ _pPager.XdbHintSize = _pPager.XdbSize
}
_20:
- if _rc != i32(0) || _pList == nil {
+ if _rc != int32(0) || _pList == nil {
goto _22
}
- _3_pgno = _pList.X5
- if _3_pgno > (_pPager.X22) || i32(0) != (int32(_pList.X6)&i32(16)) {
+ _3_pgno = _pList.Xpgno
+ if _3_pgno > _pPager.XdbSize || int32(0) != (int32(_pList.Xflags)&int32(16)) {
goto _25
}
- _4_offset = int64(_3_pgno-uint32(i32(1))) * int64(_pPager.X48)
+ _4_offset = int64(_3_pgno-uint32(1)) * int64(_pPager.XpageSize)
func() {
- if (int32(_pList.X6) & i32(8)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51306), unsafe.Pointer((*int8)(unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000))), unsafe.Pointer(str(56828)))
+ if (int32(_pList.Xflags) & int32(8)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51306), unsafe.Pointer(&_pager_write_pagelistØ00__func__Ø000), unsafe.Pointer(str(56804)))
crt.X__builtin_abort(tls)
}
}()
- if (_pList.X5) == uint32(i32(1)) {
+ if _pList.Xpgno == uint32(1) {
_pager_write_changecounter(tls, _pList)
}
- _4_pData = (*int8)(_pList.X1)
- _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.X31), (unsafe.Pointer)(_4_pData), _pPager.X48, _4_offset)
- if _3_pgno == uint32(i32(1)) {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[16]int8)(unsafe.Pointer(&(_pPager.X40)))), (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_4_pData))+1*uintptr(i32(24))))), u32(16))
+ _4_pData = (*int8)(_pList.XpData)
+ _rc = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_pPager.Xfd), unsafe.Pointer(_4_pData), _pPager.XpageSize, _4_offset)
+ if _3_pgno == uint32(1) {
+ crt.Xmemcpy(tls, unsafe.Pointer(&_pPager.XdbFileVers), unsafe.Pointer(elem1(_4_pData, uintptr(24))), uint32(16))
}
- if _3_pgno > (_pPager.X24) {
- *(*uint32)(unsafe.Pointer(&(_pPager.X24))) = _3_pgno
+ if _3_pgno > _pPager.XdbFileSize {
+ _pPager.XdbFileSize = _3_pgno
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&(_pPager.X55))))) + 4*uintptr(i32(2)))) += 1
- _sqlite3BackupUpdate(tls, (*Xsqlite3_backup)(_pPager.X36), _3_pgno, (*uint8)(_pList.X1))
+ *elem8((*int32)(unsafe.Pointer(&_pPager.XaStat)), uintptr(2)) += 1
+ _sqlite3BackupUpdate(tls, (*Xsqlite3_backup)(_pPager.XpBackup), _3_pgno, (*uint8)(_pList.XpData))
goto _31
_25:
_31:
- _pList = (*XPgHdr)(_pList.X3)
+ _pList = (*XPgHdr)(_pList.XpDirty)
goto _20
_22:
return _rc
@@ -43063,33 +43805,32 @@ _22:
var _pager_write_pagelistØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_pager_write_pagelistØ00__func__Ø000[0], str(56862), 21)
-}
-
-// Open a temporary file.
-//
-// Write the file descriptor into *pFile. Return SQLITE_OK on success
-// or some other error code if we fail. The OS will automatically
-// delete the temporary file when it is closed.
-//
-// The flags passed to the VFS layer xOpen() call are those specified
-// by parameter vfsFlags ORed with the following:
-//
-// SQLITE_OPEN_READWRITE
-// SQLITE_OPEN_CREATE
-// SQLITE_OPEN_EXCLUSIVE
-// SQLITE_OPEN_DELETEONCLOSE
+ crt.Xstrncpy(nil, &_pager_write_pagelistØ00__func__Ø000[0], str(56838), 21)
+}
+
+// C comment
+// /*
+// ** Open a temporary file.
+// **
+// ** Write the file descriptor into *pFile. Return SQLITE_OK on success
+// ** or some other error code if we fail. The OS will automatically
+// ** delete the temporary file when it is closed.
+// **
+// ** The flags passed to the VFS layer xOpen() call are those specified
+// ** by parameter vfsFlags ORed with the following:
+// **
+// ** SQLITE_OPEN_READWRITE
+// ** SQLITE_OPEN_CREATE
+// ** SQLITE_OPEN_EXCLUSIVE
+// ** SQLITE_OPEN_DELETEONCLOSE
+// */
func _pagerOpentemp(tls *crt.TLS, _pPager *XPager, _pFile *Xsqlite3_file, _vfsFlags int32) (r0 int32) {
var _rc int32
- {
- p := &_vfsFlags
- *p = (*p) | i32(30)
- sink1(*p)
- }
- _rc = _sqlite3OsOpen(tls, (*Xsqlite3_vfs)(_pPager.X0), nil, _pFile, _vfsFlags, nil)
+ _vfsFlags |= int32(30)
+ _rc = _sqlite3OsOpen(tls, (*Xsqlite3_vfs)(_pPager.XpVfs), nil, _pFile, _vfsFlags, nil)
func() {
- if _rc == i32(0) && (*Xsqlite3_io_methods)(_pFile.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50570), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerOpentempØ00__func__Ø000))), unsafe.Pointer(str(56883)))
+ if _rc == int32(0) && (*Xsqlite3_io_methods)(_pFile.XpMethods) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50570), unsafe.Pointer(&_pagerOpentempØ00__func__Ø000), unsafe.Pointer(str(56859)))
crt.X__builtin_abort(tls)
}
}()
@@ -43099,214 +43840,226 @@ func _pagerOpentemp(tls *crt.TLS, _pPager *XPager, _pFile *Xsqlite3_file, _vfsFl
var _pagerOpentempØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_pagerOpentempØ00__func__Ø000[0], str(56914), 14)
-}
-
-// Commit the transaction currently in progress.
-//
-// This routine implements the second phase of a 2-phase commit. The
-// sqlite3BtreeCommitPhaseOne() routine does the first phase and should
-// be invoked prior to calling this routine. The sqlite3BtreeCommitPhaseOne()
-// routine did all the work of writing information out to disk and flushing the
-// contents so that they are written onto the disk platter. All this
-// routine has to do is delete or truncate or zero the header in the
-// the rollback journal (which causes the transaction to commit) and
-// drop locks.
-//
-// Normally, if an error occurs while the pager layer is attempting to
-// finalize the underlying journal file, this function returns an error and
-// the upper layer will attempt a rollback. However, if the second argument
-// is non-zero then this b-tree transaction is part of a multi-file
-// transaction. In this case, the transaction has already been committed
-// (by deleting a master journal file) and the caller will ignore this
-// functions return code. So, even if an error occurs in the pager layer,
-// reset the b-tree objects internal state to indicate that the write
-// transaction has been closed. This is quite safe, as the pager will have
-// transitioned to the error state.
-//
-// This will release the write lock on the database file. If there
-// are no active cursors, it also releases the read lock.
+ crt.Xstrncpy(nil, &_pagerOpentempØ00__func__Ø000[0], str(56890), 14)
+}
+
+// C comment
+// /*
+// ** Commit the transaction currently in progress.
+// **
+// ** This routine implements the second phase of a 2-phase commit. The
+// ** sqlite3BtreeCommitPhaseOne() routine does the first phase and should
+// ** be invoked prior to calling this routine. The sqlite3BtreeCommitPhaseOne()
+// ** routine did all the work of writing information out to disk and flushing the
+// ** contents so that they are written onto the disk platter. All this
+// ** routine has to do is delete or truncate or zero the header in the
+// ** the rollback journal (which causes the transaction to commit) and
+// ** drop locks.
+// **
+// ** Normally, if an error occurs while the pager layer is attempting to
+// ** finalize the underlying journal file, this function returns an error and
+// ** the upper layer will attempt a rollback. However, if the second argument
+// ** is non-zero then this b-tree transaction is part of a multi-file
+// ** transaction. In this case, the transaction has already been committed
+// ** (by deleting a master journal file) and the caller will ignore this
+// ** functions return code. So, even if an error occurs in the pager layer,
+// ** reset the b-tree objects internal state to indicate that the write
+// ** transaction has been closed. This is quite safe, as the pager will have
+// ** transitioned to the error state.
+// **
+// ** This will release the write lock on the database file. If there
+// ** are no active cursors, it also releases the read lock.
+// */
func _sqlite3BtreeCommitPhaseTwo(tls *crt.TLS, _p *XBtree, _bCleanup int32) (r0 int32) {
var _1_rc int32
var _1_pBt *XBtShared
- if int32(_p.X2) == i32(0) {
- return i32(0)
+ if int32(_p.XinTrans) == int32(0) {
+ return int32(0)
}
_sqlite3BtreeEnter(tls, _p)
func() {
- if int32((*XBtShared)(_p.X1).X8) == i32(0) && ((*XBtShared)(_p.X1).X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62924), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000))), unsafe.Pointer(str(9977)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) == int32(0) && ((*XBtShared)(_p.XpBt).XnTransaction) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62924), unsafe.Pointer(&_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000), unsafe.Pointer(str(9932)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XBtShared)(_p.X1).X8) < int32(_p.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62924), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000))), unsafe.Pointer(str(10038)))
+ if int32((*XBtShared)(_p.XpBt).XinTransaction) < int32(_p.XinTrans) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62924), unsafe.Pointer(&_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000), unsafe.Pointer(str(9993)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_p.X2) != i32(2) {
+ if int32(_p.XinTrans) != int32(2) {
goto _6
}
- _1_pBt = (*XBtShared)(_p.X1)
+ _1_pBt = (*XBtShared)(_p.XpBt)
func() {
- if int32(_1_pBt.X8) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62932), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000))), unsafe.Pointer(str(56928)))
+ if int32(_1_pBt.XinTransaction) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62932), unsafe.Pointer(&_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000), unsafe.Pointer(str(56904)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_1_pBt.X17) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62933), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000))), unsafe.Pointer(str(56960)))
+ if _1_pBt.XnTransaction <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62933), unsafe.Pointer(&_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000), unsafe.Pointer(str(56936)))
crt.X__builtin_abort(tls)
}
}()
- _1_rc = _sqlite3PagerCommitPhaseTwo(tls, (*XPager)(_1_pBt.X0))
- if (_1_rc != i32(0)) && (_bCleanup == i32(0)) {
+ _1_rc = _sqlite3PagerCommitPhaseTwo(tls, (*XPager)(_1_pBt.XpPager))
+ if (_1_rc != int32(0)) && (_bCleanup == int32(0)) {
_sqlite3BtreeLeave(tls, _p)
return _1_rc
}
- *(*uint32)(unsafe.Pointer(&(_p.X8))) -= 1
- *(*uint8)(unsafe.Pointer(&(_1_pBt.X8))) = uint8(i32(1))
+ _p.XiDataVersion -= 1
+ _1_pBt.XinTransaction = uint8(1)
_btreeClearHasContent(tls, _1_pBt)
_6:
_btreeEndTransaction(tls, _p)
_sqlite3BtreeLeave(tls, _p)
- return i32(0)
+ return int32(0)
}
var _sqlite3BtreeCommitPhaseTwoØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000[0], str(56980), 27)
-}
-
-// When this function is called, the database file has been completely
-// updated to reflect the changes made by the current transaction and
-// synced to disk. The journal file still exists in the file-system
-// though, and if a failure occurs at this point it will eventually
-// be used as a hot-journal and the current transaction rolled back.
-//
-// This function finalizes the journal file, either by deleting,
-// truncating or partially zeroing it, so that it cannot be used
-// for hot-journal rollback. Once this is done the transaction is
-// irrevocably committed.
-//
-// If an error occurs, an IO error code is returned and the pager
-// moves into the error state. Otherwise, SQLITE_OK is returned.
+ crt.Xstrncpy(nil, &_sqlite3BtreeCommitPhaseTwoØ00__func__Ø000[0], str(56956), 27)
+}
+
+// C comment
+// /*
+// ** When this function is called, the database file has been completely
+// ** updated to reflect the changes made by the current transaction and
+// ** synced to disk. The journal file still exists in the file-system
+// ** though, and if a failure occurs at this point it will eventually
+// ** be used as a hot-journal and the current transaction rolled back.
+// **
+// ** This function finalizes the journal file, either by deleting,
+// ** truncating or partially zeroing it, so that it cannot be used
+// ** for hot-journal rollback. Once this is done the transaction is
+// ** irrevocably committed.
+// **
+// ** If an error occurs, an IO error code is returned and the pager
+// ** moves into the error state. Otherwise, SQLITE_OK is returned.
+// */
func _sqlite3PagerCommitPhaseTwo(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc int32
- _rc = i32(0)
+ _rc = int32(0)
if func() int32 {
- if (_pPager.X26) != 0 {
+ if _pPager.XerrCode != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53404), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseTwoØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53404), unsafe.Pointer(&_sqlite3PagerCommitPhaseTwoØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return _pPager.X26
+ return _pPager.XerrCode
}
func() {
- if int32(_pPager.X14) != i32(2) && int32(_pPager.X14) != i32(5) && ((*XWal)(_pPager.X60) == nil || int32(_pPager.X14) != i32(3)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53406), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseTwoØ00__func__Ø000))), unsafe.Pointer(str(57007)))
+ if int32(_pPager.XeState) != int32(2) && int32(_pPager.XeState) != int32(5) && ((*XWal)(_pPager.XpWal) == nil || int32(_pPager.XeState) != int32(3)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53406), unsafe.Pointer(&_sqlite3PagerCommitPhaseTwoØ00__func__Ø000), unsafe.Pointer(str(56983)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53410), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseTwoØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53410), unsafe.Pointer(&_sqlite3PagerCommitPhaseTwoØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_pPager.X14) == i32(2)) && ((_pPager.X1) != 0)) && (int32(_pPager.X2) == i32(1)) {
+ if ((int32(_pPager.XeState) == int32(2)) && (_pPager.XexclusiveMode != 0)) && (int32(_pPager.XjournalMode) == int32(1)) {
func() {
- if (_pPager.X34) != int64(_pPager.X47) && (_pPager.X34) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53427), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCommitPhaseTwoØ00__func__Ø000))), unsafe.Pointer(str(57150)))
+ if _pPager.XjournalOff != int64(_pPager.XsectorSize) && _pPager.XjournalOff != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53427), unsafe.Pointer(&_sqlite3PagerCommitPhaseTwoØ00__func__Ø000), unsafe.Pointer(str(57126)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(1))
- return i32(0)
+ _pPager.XeState = uint8(1)
+ return int32(0)
}
- *(*uint32)(unsafe.Pointer(&(_pPager.X39))) += 1
- _rc = _pager_end_transaction(tls, _pPager, int32(_pPager.X17), i32(1))
+ _pPager.XiDataVersion += 1
+ _rc = _pager_end_transaction(tls, _pPager, int32(_pPager.XsetMaster), int32(1))
return _pager_error(tls, _pPager, _rc)
}
var _sqlite3PagerCommitPhaseTwoØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerCommitPhaseTwoØ00__func__Ø000[0], str(57216), 27)
+ crt.Xstrncpy(nil, &_sqlite3PagerCommitPhaseTwoØ00__func__Ø000[0], str(57192), 27)
}
-// Set the number of result columns that will be returned by this SQL
-// statement. This is now set at compile time, rather than during
-// execution of the vdbe program so that sqlite3_column_count() can
-// be called on an SQL statement before sqlite3_step().
+// C comment
+// /*
+// ** Set the number of result columns that will be returned by this SQL
+// ** statement. This is now set at compile time, rather than during
+// ** execution of the vdbe program so that sqlite3_column_count() can
+// ** be called on an SQL statement before sqlite3_step().
+// */
func _sqlite3VdbeSetNumCols(tls *crt.TLS, _p *TVdbe, _nResColumn int32) {
var _n int32
var _db *Xsqlite3
var _pColName *XMem
- _db = (*Xsqlite3)(_p.X0)
- _releaseMemArray(tls, (*XMem)(_p.X20), int32(_p.X29)*i32(2))
- _sqlite3DbFree(tls, _db, _p.X20)
- _n = _nResColumn * i32(2)
- *(*uint16)(unsafe.Pointer(&(_p.X29))) = uint16(_nResColumn)
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X20))))) = store20(&_pColName, (*XMem)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(48)*uint32(_n)))))
- if (*XMem)(_p.X20) == nil {
+ _db = (*Xsqlite3)(_p.Xdb)
+ _releaseMemArray(tls, (*XMem)(_p.XaColName), int32(_p.XnResColumn)*int32(2))
+ _sqlite3DbFree(tls, _db, _p.XaColName)
+ _n = _nResColumn * int32(2)
+ _p.XnResColumn = uint16(_nResColumn)
+ *(**XMem)(unsafe.Pointer(&_p.XaColName)) = store25(&_pColName, (*XMem)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(48)*uint32(_n)))))
+ if (*XMem)(_p.XaColName) == nil {
return
}
- _initMemArray(tls, (*XMem)(_p.X20), _n, (*Xsqlite3)(_p.X0), uint16(i32(1)))
+ _initMemArray(tls, (*XMem)(_p.XaColName), _n, (*Xsqlite3)(_p.Xdb), uint16(1))
_ = _pColName
}
-// Release an array of N Mem elements
+// C comment
+// /*
+// ** Release an array of N Mem elements
+// */
func _releaseMemArray(tls *crt.TLS, _p *XMem, _N int32) {
var _1_db *Xsqlite3
var _1_pEnd *XMem
if _p == nil || _N == 0 {
goto _1
}
- _1_pEnd = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 48*uintptr(_N)))
- _1_db = (*Xsqlite3)(_p.X9)
- if (_1_db.X79) == nil {
+ _1_pEnd = elem25(_p, uintptr(_N))
+ _1_db = (*Xsqlite3)(_p.Xdb)
+ if _1_db.XpnBytesFreed == nil {
goto _2
}
_3:
- if (_p.X7) != 0 {
- _sqlite3DbFree(tls, _1_db, (unsafe.Pointer)(_p.X6))
+ if _p.XszMalloc != 0 {
+ _sqlite3DbFree(tls, _1_db, unsafe.Pointer(_p.XzMalloc))
}
- if uintptr(unsafe.Pointer(preInc20(&_p, 48))) < uintptr(unsafe.Pointer(_1_pEnd)) {
+ if crt.P2U(unsafe.Pointer(preInc25(&_p, 48))) < crt.P2U(unsafe.Pointer(_1_pEnd)) {
goto _3
}
return
_2:
func() {
- if (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p))+48*uintptr(i32(1)))) != _1_pEnd && (*Xsqlite3)((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p))+48*uintptr(i32(0)))).X9) != (*Xsqlite3)((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p))+48*uintptr(i32(1)))).X9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72960), unsafe.Pointer((*int8)(unsafe.Pointer(&_releaseMemArrayØ00__func__Ø000))), unsafe.Pointer(str(57243)))
+ if elem25(_p, uintptr(1)) != _1_pEnd && (*Xsqlite3)(elem25(_p, 0).Xdb) != (*Xsqlite3)(elem25(_p, uintptr(1)).Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72960), unsafe.Pointer(&_releaseMemArrayØ00__func__Ø000), unsafe.Pointer(str(57219)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3VdbeCheckMemInvariants(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72961), unsafe.Pointer((*int8)(unsafe.Pointer(&_releaseMemArrayØ00__func__Ø000))), unsafe.Pointer(str(6177)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72961), unsafe.Pointer(&_releaseMemArrayØ00__func__Ø000), unsafe.Pointer(str(6078)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_p.X1) & i32(9312)) != 0 {
+ if (int32(_p.Xflags) & int32(9312)) != 0 {
_sqlite3VdbeMemRelease(tls, _p)
goto _13
}
- if (_p.X7) != 0 {
- _sqlite3DbFreeNN(tls, _1_db, (unsafe.Pointer)(_p.X6))
- *(*int32)(unsafe.Pointer(&(_p.X7))) = i32(0)
+ if _p.XszMalloc != 0 {
+ _sqlite3DbFreeNN(tls, _1_db, unsafe.Pointer(_p.XzMalloc))
+ _p.XszMalloc = int32(0)
}
_13:
- *(*uint16)(unsafe.Pointer(&(_p.X1))) = uint16(i32(128))
- if uintptr(unsafe.Pointer(preInc20(&_p, 48))) < uintptr(unsafe.Pointer(_1_pEnd)) {
+ _p.Xflags = uint16(128)
+ if crt.P2U(unsafe.Pointer(preInc25(&_p, 48))) < crt.P2U(unsafe.Pointer(_1_pEnd)) {
goto _2
}
_1:
@@ -43315,71 +44068,78 @@ _1:
var _releaseMemArrayØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_releaseMemArrayØ00__func__Ø000[0], str(57277), 16)
+ crt.Xstrncpy(nil, &_releaseMemArrayØ00__func__Ø000[0], str(57253), 16)
}
-// Initialize an array of N Mem element.
+// C comment
+// /*
+// ** Initialize an array of N Mem element.
+// */
func _initMemArray(tls *crt.TLS, _p *XMem, _N int32, _db *Xsqlite3, _flags uint16) {
_0:
- if postInc1(&_N, int32(-1)) > i32(0) {
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))) = _db
- *(*uint16)(unsafe.Pointer(&(_p.X1))) = _flags
- *(*int32)(unsafe.Pointer(&(_p.X7))) = i32(0)
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X11))))) = nil
+ if postInc2(&_N, -1) > int32(0) {
+ *(**Xsqlite3)(unsafe.Pointer(&_p.Xdb)) = _db
+ _p.Xflags = _flags
+ _p.XszMalloc = int32(0)
+ *(**XMem)(unsafe.Pointer(&_p.XpScopyFrom)) = nil
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(48)
goto _0
}
}
-// Set the name of the idx'th column to be returned by the SQL statement.
-// zName must be a pointer to a nul terminated string.
-//
-// This call must be made after a call to sqlite3VdbeSetNumCols().
-//
-// The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC
-// or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed
-// to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed.
+// C comment
+// /*
+// ** Set the name of the idx'th column to be returned by the SQL statement.
+// ** zName must be a pointer to a nul terminated string.
+// **
+// ** This call must be made after a call to sqlite3VdbeSetNumCols().
+// **
+// ** The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC
+// ** or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed
+// ** to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed.
+// */
func _sqlite3VdbeSetColName(tls *crt.TLS, _p *TVdbe, _idx int32, _var int32, _zName *int8, _xDel func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
var _rc int32
var _pColName *XMem
func() {
- if _idx >= int32(_p.X29) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73615), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000))), unsafe.Pointer(str(57293)))
+ if _idx >= int32(_p.XnResColumn) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73615), unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000), unsafe.Pointer(str(57269)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _var >= i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73616), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000))), unsafe.Pointer(str(57311)))
+ if _var >= int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73616), unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000), unsafe.Pointer(str(57287)))
crt.X__builtin_abort(tls)
}
}()
- if ((*Xsqlite3)(_p.X0).X17) != 0 {
+ if ((*Xsqlite3)(_p.Xdb).XmallocFailed) != 0 {
func() {
- if _zName != nil && *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if _zName != nil && *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73618), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000))), unsafe.Pointer(str(57325)))
+ }{func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()})) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73618), unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000), unsafe.Pointer(str(57301)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3NomemError(tls, i32(73619))
+ return _sqlite3NomemError(tls, int32(73619))
}
func() {
- if (*XMem)(_p.X20) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73621), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000))), unsafe.Pointer(str(57356)))
+ if (*XMem)(_p.XaColName) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73621), unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000), unsafe.Pointer(str(57332)))
crt.X__builtin_abort(tls)
}
}()
- _pColName = (*XMem)(unsafe.Pointer(uintptr(_p.X20) + 48*uintptr(_idx+(_var*int32(_p.X29)))))
- _rc = _sqlite3VdbeMemSetStr(tls, _pColName, _zName, i32(-1), uint8(i32(1)), _xDel)
+ _pColName = elem25((*XMem)(_p.XaColName), uintptr(_idx+(_var*int32(_p.XnResColumn))))
+ _rc = _sqlite3VdbeMemSetStr(tls, _pColName, _zName, int32(-1), uint8(1), _xDel)
func() {
- if _rc == i32(0) && _zName != nil && (int32(_pColName.X1)&i32(512)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73624), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000))), unsafe.Pointer(str(57371)))
+ if _rc == int32(0) && _zName != nil && (int32(_pColName.Xflags)&int32(512)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73624), unsafe.Pointer(&_sqlite3VdbeSetColNameØ00__func__Ø000), unsafe.Pointer(str(57347)))
crt.X__builtin_abort(tls)
}
}()
@@ -43389,20 +44149,23 @@ func _sqlite3VdbeSetColName(tls *crt.TLS, _p *TVdbe, _idx int32, _var int32, _zN
var _sqlite3VdbeSetColNameØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSetColNameØ00__func__Ø000[0], str(57420), 22)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSetColNameØ00__func__Ø000[0], str(57396), 22)
}
var _sqlite3PrepareØ00azColNameØ001 [12]*int8
func init() {
- _sqlite3PrepareØ00azColNameØ001 = [12]*int8{str(57442), str(57447), str(57454), str(57457), str(57460), str(57463), str(57466), str(57469), str(57477), str(57486), str(26370), str(57492)}
+ _sqlite3PrepareØ00azColNameØ001 = [12]*int8{str(57418), str(57423), str(57430), str(57433), str(57436), str(57439), str(57442), str(57445), str(57453), str(57462), str(26325), str(57468)}
}
-// Remember the SQL string for a prepared statement.
+// C comment
+// /*
+// ** Remember the SQL string for a prepared statement.
+// */
func _sqlite3VdbeSetSql(tls *crt.TLS, _p *TVdbe, _z *int8, _n int32, _isPrepareV2 int32) {
func() {
- if _isPrepareV2 != i32(1) && _isPrepareV2 != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71478), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetSqlØ00__func__Ø000))), unsafe.Pointer(str(57499)))
+ if _isPrepareV2 != int32(1) && _isPrepareV2 != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71478), unsafe.Pointer(&_sqlite3VdbeSetSqlØ00__func__Ø000), unsafe.Pointer(str(57475)))
crt.X__builtin_abort(tls)
}
}()
@@ -43410,34 +44173,37 @@ func _sqlite3VdbeSetSql(tls *crt.TLS, _p *TVdbe, _z *int8, _n int32, _isPrepareV
return
}
if _isPrepareV2 == 0 {
- *(*uint32)(unsafe.Pointer(&(_p.X41))) = uint32(i32(0))
+ _p.Xexpmask = 0
}
func() {
- if (_p.X36) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71484), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetSqlØ00__func__Ø000))), unsafe.Pointer(str(57532)))
+ if _p.XzSql != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71484), unsafe.Pointer(&_sqlite3VdbeSetSqlØ00__func__Ø000), unsafe.Pointer(str(57508)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&(_p.X36))) = _sqlite3DbStrNDup(tls, (*Xsqlite3)(_p.X0), _z, uint64(_n))
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(uint8(_isPrepareV2)), 512, 9)
+ _p.XzSql = _sqlite3DbStrNDup(tls, (*Xsqlite3)(_p.Xdb), _z, uint64(_n))
+ storebits26(&_p.Xexpired, int16(uint8(_isPrepareV2)), 512, 9)
}
var _sqlite3VdbeSetSqlØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSetSqlØ00__func__Ø000[0], str(57543), 18)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSetSqlØ00__func__Ø000[0], str(57519), 18)
}
-// Clean up and delete a VDBE after execution. Return an integer which is
-// the result code. Write any error message text into *pzErrMsg.
+// C comment
+// /*
+// ** Clean up and delete a VDBE after execution. Return an integer which is
+// ** the result code. Write any error message text into *pzErrMsg.
+// */
func _sqlite3VdbeFinalize(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _rc int32
- _rc = i32(0)
- if ((_p.X5) == uint32(i32(770837923))) || ((_p.X5) == uint32(i32(832317811))) {
+ _rc = int32(0)
+ if (_p.Xmagic == uint32(770837923)) || (_p.Xmagic == uint32(832317811)) {
_rc = _sqlite3VdbeReset(tls, _p)
func() {
- if (_rc & ((*Xsqlite3)(_p.X0).X11)) != _rc {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74365), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeFinalizeØ00__func__Ø000))), unsafe.Pointer(str(57561)))
+ if (_rc & ((*Xsqlite3)(_p.Xdb).XerrMask)) != _rc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74365), unsafe.Pointer(&_sqlite3VdbeFinalizeØ00__func__Ø000), unsafe.Pointer(str(57537)))
crt.X__builtin_abort(tls)
}
}()
@@ -43446,166 +44212,168 @@ func _sqlite3VdbeFinalize(tls *crt.TLS, _p *TVdbe) (r0 int32) {
return _rc
}
-// Clean up a VDBE after execution but do not delete the VDBE just yet.
-// Write any error messages into *pzErrMsg. Return the result code.
-//
-// After this routine is run, the VDBE should be ready to be executed
-// again.
-//
-// To look at it another way, this routine resets the state of the
-// virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to
-// VDBE_MAGIC_INIT.
+// C comment
+// /*
+// ** Clean up a VDBE after execution but do not delete the VDBE just yet.
+// ** Write any error messages into *pzErrMsg. Return the result code.
+// **
+// ** After this routine is run, the VDBE should be ready to be executed
+// ** again.
+// **
+// ** To look at it another way, this routine resets the state of the
+// ** virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to
+// ** VDBE_MAGIC_INIT.
+// */
func _sqlite3VdbeReset(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _db *Xsqlite3
- _db = (*Xsqlite3)(_p.X0)
+ _db = (*Xsqlite3)(_p.Xdb)
_sqlite3VdbeHalt(tls, _p)
- if (_p.X9) < i32(0) {
+ if _p.Xpc < int32(0) {
goto _0
}
_sqlite3VdbeTransferError(tls, _p)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X22))
- *(**int8)(unsafe.Pointer(&(_p.X22))) = nil
- if ((uint32((_p.X32)>>uint(i32(5))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 1, 0)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XzErrMsg))
+ _p.XzErrMsg = nil
+ if ((uint32(_p.Xexpired>>5) << 31) >> 31) != 0 {
+ storebits26(&_p.Xexpired, int16(1), 1, 0)
}
goto _4
_0:
- if (_p.X10) != 0 && (((uint32(_p.X32) << uint(i32(31))) >> uint(i32(31))) != 0) {
- _sqlite3ErrorWithMsg(tls, _db, _p.X10, func() *int8 {
- if (_p.X22) != nil {
- return str(24576)
+ if _p.Xrc != 0 && (((uint32(_p.Xexpired) << 31) >> 31) != 0) {
+ _sqlite3ErrorWithMsg(tls, _db, _p.Xrc, func() *int8 {
+ if _p.XzErrMsg != nil {
+ return str(24531)
}
return nil
- }(), unsafe.Pointer(_p.X22))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X22))
- *(**int8)(unsafe.Pointer(&(_p.X22))) = nil
+ }(), unsafe.Pointer(_p.XzErrMsg))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XzErrMsg))
+ _p.XzErrMsg = nil
}
_4:
_Cleanup(tls, _p)
- *(*uint32)(unsafe.Pointer(&(_p.X5))) = uint32(i32(1224384374))
- return (_p.X10) & (_db.X11)
-}
-
-// This routine is called the when a VDBE tries to halt. If the VDBE
-// has made changes and is in autocommit mode, then commit those
-// changes. If a rollback is needed, then do the rollback.
-//
-// This routine is the only way to move the state of a VM from
-// SQLITE_MAGIC_RUN to SQLITE_MAGIC_HALT. It is harmless to
-// call this on a VM that is in the SQLITE_MAGIC_HALT state.
-//
-// Return an error code. If the commit could not complete because of
-// lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it
-// means the close did not happen and needs to be repeated.
+ _p.Xmagic = uint32(1224384374)
+ return _p.Xrc & _db.XerrMask
+}
+
+// C comment
+// /*
+// ** This routine is called the when a VDBE tries to halt. If the VDBE
+// ** has made changes and is in autocommit mode, then commit those
+// ** changes. If a rollback is needed, then do the rollback.
+// **
+// ** This routine is the only way to move the state of a VM from
+// ** SQLITE_MAGIC_RUN to SQLITE_MAGIC_HALT. It is harmless to
+// ** call this on a VM that is in the SQLITE_MAGIC_HALT state.
+// **
+// ** Return an error code. If the commit could not complete because of
+// ** lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it
+// ** means the close did not happen and needs to be repeated.
+// */
func _sqlite3VdbeHalt(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _rc, _3_mrc, _3_eStatementOp, _3_isSpecialError int32
var _db *Xsqlite3
- _db = (*Xsqlite3)(_p.X0)
- if (_p.X5) != uint32(i32(770837923)) {
- return i32(0)
+ _db = (*Xsqlite3)(_p.Xdb)
+ if _p.Xmagic != uint32(770837923) {
+ return int32(0)
}
- if (_db.X17) != 0 {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _sqlite3NomemError(tls, i32(74044))
+ if _db.XmallocFailed != 0 {
+ _p.Xrc = _sqlite3NomemError(tls, int32(74044))
}
_closeAllCursors(tls, _p)
_checkActiveVdbeCnt(tls, _db)
- if (_p.X9) < i32(0) || ((uint32((_p.X32)>>uint(i32(8)))<<uint(i32(31)))>>uint(i32(31))) == 0 {
+ if _p.Xpc < int32(0) || ((uint32(_p.Xexpired>>8)<<31)>>31) == 0 {
goto _3
}
- _3_eStatementOp = i32(0)
+ _3_eStatementOp = int32(0)
_sqlite3VdbeEnter(tls, _p)
- _3_mrc = (_p.X10) & i32(255)
- _3_isSpecialError = bool2int((((_3_mrc == i32(7)) || (_3_mrc == i32(10))) || (_3_mrc == i32(9))) || (_3_mrc == i32(13)))
+ _3_mrc = _p.Xrc & int32(255)
+ _3_isSpecialError = bool2int((((_3_mrc == int32(7)) || (_3_mrc == int32(10))) || (_3_mrc == int32(9))) || (_3_mrc == int32(13)))
if _3_isSpecialError == 0 {
goto _7
}
- if ((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != 0 && _3_mrc == i32(9) {
+ if ((uint32(_p.Xexpired>>7)<<31)>>31) != 0 && _3_mrc == int32(9) {
goto _9
}
- if ((_3_mrc == i32(7)) || (_3_mrc == i32(13))) && (((uint32((_p.X32)>>uint(i32(6))) << uint(i32(31))) >> uint(i32(31))) != 0) {
- _3_eStatementOp = i32(2)
+ if ((_3_mrc == int32(7)) || (_3_mrc == int32(13))) && (((uint32(_p.Xexpired>>6) << 31) >> 31) != 0) {
+ _3_eStatementOp = int32(2)
goto _13
}
- _sqlite3RollbackAll(tls, _db, i32(516))
+ _sqlite3RollbackAll(tls, _db, int32(516))
_sqlite3CloseSavepoints(tls, _db)
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(1))
- *(*int32)(unsafe.Pointer(&(_p.X11))) = i32(0)
+ _db.XautoCommit = uint8(1)
+ _p.XnChange = int32(0)
_13:
_9:
_7:
- if (_p.X10) == i32(0) {
- _sqlite3VdbeCheckFk(tls, _p, i32(0))
+ if _p.Xrc == int32(0) {
+ _sqlite3VdbeCheckFk(tls, _p, int32(0))
}
- if (_db.X64) > i32(0) && (**XVTable)(unsafe.Pointer(_db.X67)) == nil || (_db.X15) == 0 || (_db.X36) != bool2int(int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) == i32(0)) {
+ if _db.XnVTrans > int32(0) && (**XVTable)(unsafe.Pointer(_db.XaVTrans)) == nil || _db.XautoCommit == 0 || _db.XnVdbeWrite != bool2int(int32((uint32(_p.Xexpired>>7)<<31)>>31) == int32(0)) {
goto _18
}
- if (_p.X10) != i32(0) && (int32(_p.X30) != i32(3) || _3_isSpecialError != 0) {
+ if _p.Xrc != int32(0) && (int32(_p.XerrorAction) != int32(3) || _3_isSpecialError != 0) {
goto _21
}
- _rc = _sqlite3VdbeCheckFk(tls, _p, i32(1))
- if _rc == i32(0) {
+ _rc = _sqlite3VdbeCheckFk(tls, _p, int32(1))
+ if _rc == int32(0) {
goto _22
}
if func() int32 {
- if ((uint32((_p.X32)>>uint(i32(7))) << uint(i32(31))) >> uint(i32(31))) != 0 {
+ if ((uint32(_p.Xexpired>>7) << 31) >> 31) != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74109), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74109), unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
_sqlite3VdbeLeave(tls, _p)
- return i32(1)
+ return int32(1)
}
- _rc = i32(787)
+ _rc = int32(787)
goto _26
_22:
_rc = _vdbeCommit(tls, _db, _p)
_26:
- if (_rc == i32(5)) && (((uint32((_p.X32)>>uint(i32(7))) << uint(i32(31))) >> uint(i32(31))) != 0) {
+ if (_rc == int32(5)) && (((uint32(_p.Xexpired>>7) << 31) >> 31) != 0) {
_sqlite3VdbeLeave(tls, _p)
- return i32(5)
+ return int32(5)
}
- if _rc != i32(0) {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _rc
- _sqlite3RollbackAll(tls, _db, i32(0))
- *(*int32)(unsafe.Pointer(&(_p.X11))) = i32(0)
+ if _rc != int32(0) {
+ _p.Xrc = _rc
+ _sqlite3RollbackAll(tls, _db, int32(0))
+ _p.XnChange = int32(0)
goto _31
}
- *(*int64)(unsafe.Pointer(&(_db.X77))) = int64(i32(0))
- *(*int64)(unsafe.Pointer(&(_db.X78))) = int64(i32(0))
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-33554433)
- sink1(*p)
- }
+ _db.XnDeferredCons = 0
+ _db.XnDeferredImmCons = 0
+ _db.Xflags &= int32(-33554433)
_sqlite3CommitInternalChanges(tls, _db)
_31:
goto _32
_21:
- _sqlite3RollbackAll(tls, _db, i32(0))
- *(*int32)(unsafe.Pointer(&(_p.X11))) = i32(0)
+ _sqlite3RollbackAll(tls, _db, int32(0))
+ _p.XnChange = int32(0)
_32:
- *(*int32)(unsafe.Pointer(&(_db.X76))) = i32(0)
+ _db.XnStatement = int32(0)
goto _34
_18:
- if _3_eStatementOp != i32(0) {
+ if _3_eStatementOp != int32(0) {
goto _34
}
- if ((_p.X10) == i32(0)) || (int32(_p.X30) == i32(3)) {
- _3_eStatementOp = i32(1)
+ if (_p.Xrc == int32(0)) || (int32(_p.XerrorAction) == int32(3)) {
+ _3_eStatementOp = int32(1)
goto _39
}
- if int32(_p.X30) == i32(2) {
- _3_eStatementOp = i32(2)
+ if int32(_p.XerrorAction) == int32(2) {
+ _3_eStatementOp = int32(2)
goto _39
}
- _sqlite3RollbackAll(tls, _db, i32(516))
+ _sqlite3RollbackAll(tls, _db, int32(516))
_sqlite3CloseSavepoints(tls, _db)
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(1))
- *(*int32)(unsafe.Pointer(&(_p.X11))) = i32(0)
+ _db.XautoCommit = uint8(1)
+ _p.XnChange = int32(0)
_39:
_34:
if _3_eStatementOp == 0 {
@@ -43615,169 +44383,178 @@ _34:
if _rc == 0 {
goto _41
}
- if ((_p.X10) == i32(0)) || (((_p.X10) & i32(255)) == i32(19)) {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _rc
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X22))
- *(**int8)(unsafe.Pointer(&(_p.X22))) = nil
+ if (_p.Xrc == int32(0)) || ((_p.Xrc & int32(255)) == int32(19)) {
+ _p.Xrc = _rc
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XzErrMsg))
+ _p.XzErrMsg = nil
}
- _sqlite3RollbackAll(tls, _db, i32(516))
+ _sqlite3RollbackAll(tls, _db, int32(516))
_sqlite3CloseSavepoints(tls, _db)
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(1))
- *(*int32)(unsafe.Pointer(&(_p.X11))) = i32(0)
+ _db.XautoCommit = uint8(1)
+ _p.XnChange = int32(0)
_41:
_40:
- if ((uint32((_p.X32)>>uint(i32(4))) << uint(i32(31))) >> uint(i32(31))) == 0 {
+ if ((uint32(_p.Xexpired>>4) << 31) >> 31) == 0 {
goto _44
}
- if _3_eStatementOp != i32(2) {
- _sqlite3VdbeSetChanges(tls, _db, _p.X11)
+ if _3_eStatementOp != int32(2) {
+ _sqlite3VdbeSetChanges(tls, _db, _p.XnChange)
goto _46
}
- _sqlite3VdbeSetChanges(tls, _db, i32(0))
+ _sqlite3VdbeSetChanges(tls, _db, int32(0))
_46:
- *(*int32)(unsafe.Pointer(&(_p.X11))) = i32(0)
+ _p.XnChange = int32(0)
_44:
_sqlite3VdbeLeave(tls, _p)
_3:
- if (_p.X9) < i32(0) {
+ if _p.Xpc < int32(0) {
goto _47
}
- *(*int32)(unsafe.Pointer(&(_db.X34))) -= 1
- if ((uint32((_p.X32)>>uint(i32(7))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- *(*int32)(unsafe.Pointer(&(_db.X36))) -= 1
+ _db.XnVdbeActive -= 1
+ if ((uint32(_p.Xexpired>>7) << 31) >> 31) == 0 {
+ _db.XnVdbeWrite -= 1
}
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- *(*int32)(unsafe.Pointer(&(_db.X35))) -= 1
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) != 0 {
+ _db.XnVdbeRead -= 1
}
func() {
- if (_db.X34) < (_db.X35) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74194), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000))), unsafe.Pointer(str(57587)))
+ if _db.XnVdbeActive < _db.XnVdbeRead {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74194), unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000), unsafe.Pointer(str(57563)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_db.X35) < (_db.X36) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74195), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000))), unsafe.Pointer(str(57618)))
+ if _db.XnVdbeRead < _db.XnVdbeWrite {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74195), unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000), unsafe.Pointer(str(57594)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_db.X36) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74196), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000))), unsafe.Pointer(str(57648)))
+ if _db.XnVdbeWrite < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74196), unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000), unsafe.Pointer(str(57624)))
crt.X__builtin_abort(tls)
}
}()
_47:
- *(*uint32)(unsafe.Pointer(&(_p.X5))) = uint32(i32(832317811))
+ _p.Xmagic = uint32(832317811)
_checkActiveVdbeCnt(tls, _db)
- if (_db.X17) != 0 {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _sqlite3NomemError(tls, i32(74201))
+ if _db.XmallocFailed != 0 {
+ _p.Xrc = _sqlite3NomemError(tls, int32(74201))
}
- if (_db.X15) != 0 {
+ if _db.XautoCommit != 0 {
}
func() {
- if (_db.X34) <= i32(0) && int32(_db.X15) != i32(0) && (_db.X76) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74212), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000))), unsafe.Pointer(str(57666)))
+ if _db.XnVdbeActive <= int32(0) && int32(_db.XautoCommit) != int32(0) && _db.XnStatement != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74212), unsafe.Pointer(&_sqlite3VdbeHaltØ00__func__Ø000), unsafe.Pointer(str(57642)))
crt.X__builtin_abort(tls)
}
}()
return func() int32 {
- if (_p.X10) == i32(5) {
- return i32(5)
+ if _p.Xrc == int32(5) {
+ return int32(5)
}
- return i32(0)
+ return int32(0)
}()
}
-// Close all cursors.
-//
-// Also release any dynamic memory held by the VM in the Vdbe.aMem memory
-// cell array. This is necessary as the memory cell array may contain
-// pointers to VdbeFrame objects, which may in turn contain pointers to
-// open cursors.
+// C comment
+// /*
+// ** Close all cursors.
+// **
+// ** Also release any dynamic memory held by the VM in the Vdbe.aMem memory
+// ** cell array. This is necessary as the memory cell array may contain
+// ** pointers to VdbeFrame objects, which may in turn contain pointers to
+// ** open cursors.
+// */
func _closeAllCursors(tls *crt.TLS, _p *TVdbe) {
var _1_pFrame, _3_pDel *XVdbeFrame
- if (*XVdbeFrame)(_p.X38) == nil {
+ if _p.XpFrame == nil {
goto _0
}
- _1_pFrame = (*XVdbeFrame)(_p.X38)
+ _1_pFrame = (*XVdbeFrame)(_p.XpFrame)
_1:
- if (*XVdbeFrame)(_1_pFrame.X1) == nil {
+ if _1_pFrame.XpParent == nil {
goto _4
}
- _1_pFrame = (*XVdbeFrame)(_1_pFrame.X1)
+ _1_pFrame = (*XVdbeFrame)(_1_pFrame.XpParent)
goto _1
_4:
_sqlite3VdbeFrameRestore(tls, _1_pFrame)
- *(**XVdbeFrame)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X38))))) = nil
- *(*int32)(unsafe.Pointer(&(_p.X40))) = i32(0)
+ *(**XVdbeFrame)(unsafe.Pointer(&_p.XpFrame)) = nil
+ _p.XnFrame = int32(0)
_0:
func() {
- if (_p.X40) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73539), unsafe.Pointer((*int8)(unsafe.Pointer(&_closeAllCursorsØ00__func__Ø000))), unsafe.Pointer(str(57726)))
+ if _p.XnFrame != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73539), unsafe.Pointer(&_closeAllCursorsØ00__func__Ø000), unsafe.Pointer(str(57702)))
crt.X__builtin_abort(tls)
}
}()
_closeCursorsInFrame(tls, _p)
- if (*XMem)(_p.X18) != nil {
- _releaseMemArray(tls, (*XMem)(_p.X18), _p.X6)
+ if _p.XaMem != nil {
+ _releaseMemArray(tls, (*XMem)(_p.XaMem), _p.XnMem)
}
_7:
- if (*XVdbeFrame)(_p.X39) != nil {
- _3_pDel = (*XVdbeFrame)(_p.X39)
- *(**XVdbeFrame)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X39))))) = (*XVdbeFrame)(_3_pDel.X1)
+ if _p.XpDelFrame != nil {
+ _3_pDel = (*XVdbeFrame)(_p.XpDelFrame)
+ *(**XVdbeFrame)(unsafe.Pointer(&_p.XpDelFrame)) = (*XVdbeFrame)(_3_pDel.XpParent)
_sqlite3VdbeFrameDelete(tls, _3_pDel)
goto _7
}
- if (*XAuxData)(_p.X43) != nil {
- _sqlite3VdbeDeleteAuxData(tls, (*Xsqlite3)(_p.X0), (**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X43))))), i32(-1), i32(0))
+ if _p.XpAuxData != nil {
+ _sqlite3VdbeDeleteAuxData(tls, (*Xsqlite3)(_p.Xdb), (**XAuxData)(unsafe.Pointer(&_p.XpAuxData)), int32(-1), int32(0))
}
func() {
- if (*XAuxData)(_p.X43) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73552), unsafe.Pointer((*int8)(unsafe.Pointer(&_closeAllCursorsØ00__func__Ø000))), unsafe.Pointer(str(57739)))
+ if (*XAuxData)(_p.XpAuxData) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73552), unsafe.Pointer(&_closeAllCursorsØ00__func__Ø000), unsafe.Pointer(str(57715)))
crt.X__builtin_abort(tls)
}
}()
}
-// Copy the values stored in the VdbeFrame structure to its Vdbe. This
-// is used, for example, when a trigger sub-program is halted to restore
-// control to the main program.
+// C comment
+// /*
+// ** Copy the values stored in the VdbeFrame structure to its Vdbe. This
+// ** is used, for example, when a trigger sub-program is halted to restore
+// ** control to the main program.
+// */
func _sqlite3VdbeFrameRestore(tls *crt.TLS, _pFrame *XVdbeFrame) (r0 int32) {
var _v *TVdbe
- _v = (*TVdbe)(_pFrame.X0)
+ _v = (*TVdbe)(_pFrame.Xv)
_closeCursorsInFrame(tls, _v)
- *(**XVdbeOp)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_v.X17))))) = (*XVdbeOp)(_pFrame.X2)
- *(*int32)(unsafe.Pointer(&(_v.X27))) = _pFrame.X12
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_v.X18))))) = (*XMem)(_pFrame.X4)
- *(*int32)(unsafe.Pointer(&(_v.X6))) = _pFrame.X13
- *(***XVdbeCursor)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_v.X23))))) = (**XVdbeCursor)(unsafe.Pointer(_pFrame.X5))
- *(*int32)(unsafe.Pointer(&(_v.X7))) = _pFrame.X10
- *(*int64)(unsafe.Pointer(&((*Xsqlite3)(_v.X0).X7))) = _pFrame.X8
- *(*int32)(unsafe.Pointer(&(_v.X11))) = _pFrame.X16
- *(*int32)(unsafe.Pointer(&((*Xsqlite3)(_v.X0).X29))) = _pFrame.X17
- _sqlite3VdbeDeleteAuxData(tls, (*Xsqlite3)(_v.X0), (**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_v.X43))))), i32(-1), i32(0))
- *(**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_v.X43))))) = (*XAuxData)(_pFrame.X9)
- *(**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFrame.X9))))) = nil
- return _pFrame.X11
-}
-
-// Close all cursors in the current frame.
+ *(**XVdbeOp)(unsafe.Pointer(&_v.XaOp)) = (*XVdbeOp)(_pFrame.XaOp)
+ _v.XnOp = _pFrame.XnOp
+ *(**XMem)(unsafe.Pointer(&_v.XaMem)) = (*XMem)(_pFrame.XaMem)
+ _v.XnMem = _pFrame.XnMem
+ *(***XVdbeCursor)(unsafe.Pointer(&_v.XapCsr)) = (**XVdbeCursor)(unsafe.Pointer(_pFrame.XapCsr))
+ _v.XnCursor = _pFrame.XnCursor
+ (*Xsqlite3)(_v.Xdb).XlastRowid = _pFrame.XlastRowid
+ _v.XnChange = _pFrame.XnChange
+ (*Xsqlite3)(_v.Xdb).XnChange = _pFrame.XnDbChange
+ _sqlite3VdbeDeleteAuxData(tls, (*Xsqlite3)(_v.Xdb), (**XAuxData)(unsafe.Pointer(&_v.XpAuxData)), int32(-1), int32(0))
+ *(**XAuxData)(unsafe.Pointer(&_v.XpAuxData)) = (*XAuxData)(_pFrame.XpAuxData)
+ *(**XAuxData)(unsafe.Pointer(&_pFrame.XpAuxData)) = nil
+ return _pFrame.Xpc
+}
+
+// C comment
+// /*
+// ** Close all cursors in the current frame.
+// */
func _closeCursorsInFrame(tls *crt.TLS, _p *TVdbe) {
var _1_i int32
var _2_pC *XVdbeCursor
- if (**XVdbeCursor)(unsafe.Pointer(_p.X23)) == nil {
+ if _p.XapCsr == nil {
goto _0
}
- _1_i = i32(0)
+ _1_i = int32(0)
_1:
- if _1_i >= (_p.X7) {
+ if _1_i >= _p.XnCursor {
goto _4
}
- _2_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_1_i)))
+ _2_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_1_i))
if _2_pC != nil {
_sqlite3VdbeFreeCursor(tls, _p, _2_pC)
- *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_1_i))) = nil
+ *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_1_i)) = nil
}
_1_i += 1
goto _1
@@ -43785,65 +44562,69 @@ _4:
_0:
}
-// Close a VDBE cursor and release all the resources that cursor
-// happens to hold.
+// C comment
+// /*
+// ** Close a VDBE cursor and release all the resources that cursor
+// ** happens to hold.
+// */
func _sqlite3VdbeFreeCursor(tls *crt.TLS, _p *TVdbe, _pCx *XVdbeCursor) {
- var _7_pVCur *Xsqlite3_file
+ var _7_pVCur *Xsqlite3_vtab_cursor
var _7_pModule *Xsqlite3_module
if _pCx == nil {
return
}
func() {
- if (*XBtree)(_pCx.X8) != nil && int32(_pCx.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73451), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeFreeCursorØ00__func__Ø000))), unsafe.Pointer(str(57754)))
+ if (*XBtree)(_pCx.XpBtx) != nil && int32(_pCx.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73451), unsafe.Pointer(&_sqlite3VdbeFreeCursorØ00__func__Ø000), unsafe.Pointer(str(57730)))
crt.X__builtin_abort(tls)
}
}()
- switch int32(_pCx.X0) {
- case i32(0):
+ switch int32(_pCx.XeCurType) {
+ case int32(0):
goto _6
- case i32(1):
+ case int32(1):
goto _5
- case i32(2):
+ case int32(2):
goto _7
default:
goto _8
}
_5:
- _sqlite3VdbeSorterClose(tls, (*Xsqlite3)(_p.X0), _pCx)
+ _sqlite3VdbeSorterClose(tls, (*Xsqlite3)(_p.Xdb), _pCx)
goto _8
_6:
- if ((uint32(_pCx.X7) << uint(i32(31))) >> uint(i32(31))) == 0 {
+ if ((uint32(_pCx.XisEphemeral) << 31) >> 31) == 0 {
goto _9
}
- if (*XBtree)(_pCx.X8) != nil {
- _sqlite3BtreeClose(tls, (*XBtree)(_pCx.X8))
+ if _pCx.XpBtx != nil {
+ _sqlite3BtreeClose(tls, (*XBtree)(_pCx.XpBtx))
}
goto _11
_9:
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCx.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73463), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeFreeCursorØ00__func__Ø000))), unsafe.Pointer(str(57799)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCx.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73463), unsafe.Pointer(&_sqlite3VdbeFreeCursorØ00__func__Ø000), unsafe.Pointer(str(57775)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3BtreeCloseCursor(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCx.X14)))))))
+ _sqlite3BtreeCloseCursor(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCx.Xuc))))
_11:
goto _8
_7:
- _7_pVCur = (*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCx.X14))))))
- _7_pModule = (*Xsqlite3_module)((*Xsqlite3_vtab)(_7_pVCur.X0).X0)
+ _7_pVCur = (*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCx.Xuc)))
+ _7_pModule = (*Xsqlite3_module)((*Xsqlite3_vtab)(_7_pVCur.XpVtab).XpModule)
func() {
- if ((*Xsqlite3_vtab)(_7_pVCur.X0).X1) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73472), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeFreeCursorØ00__func__Ø000))), unsafe.Pointer(str(57818)))
+ if ((*Xsqlite3_vtab)(_7_pVCur.XpVtab).XnRef) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73472), unsafe.Pointer(&_sqlite3VdbeFreeCursorØ00__func__Ø000), unsafe.Pointer(str(57794)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&((*Xsqlite3_vtab)(_7_pVCur.X0).X1))) -= 1
- (*(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_7_pModule.X7)})))(tls, _7_pVCur)
+ (*Xsqlite3_vtab)(_7_pVCur.XpVtab).XnRef -= 1
+ func() func(*crt.TLS, *Xsqlite3_vtab_cursor) int32 {
+ v := _7_pModule.XxClose
+ return *(*func(*crt.TLS, *Xsqlite3_vtab_cursor) int32)(unsafe.Pointer(&v))
+ }()(tls, _7_pVCur)
goto _8
_8:
}
@@ -43851,88 +44632,97 @@ _8:
var _sqlite3VdbeFreeCursorØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeFreeCursorØ00__func__Ø000[0], str(57839), 22)
+ crt.Xstrncpy(nil, &_sqlite3VdbeFreeCursorØ00__func__Ø000[0], str(57815), 22)
}
-// Free any cursor components allocated by sqlite3VdbeSorterXXX routines.
+// C comment
+// /*
+// ** Free any cursor components allocated by sqlite3VdbeSorterXXX routines.
+// */
func _sqlite3VdbeSorterClose(tls *crt.TLS, _db *Xsqlite3, _pCsr *XVdbeCursor) {
var _pSorter *XVdbeSorter
func() {
- if int32(_pCsr.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87275), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterCloseØ00__func__Ø000))), unsafe.Pointer(str(57861)))
+ if int32(_pCsr.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87275), unsafe.Pointer(&_sqlite3VdbeSorterCloseØ00__func__Ø000), unsafe.Pointer(str(57837)))
crt.X__builtin_abort(tls)
}
}()
- _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCsr.X14))))))
+ _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCsr.Xuc)))
if _pSorter != nil {
_sqlite3VdbeSorterReset(tls, _db, _pSorter)
- Xsqlite3_free(tls, (unsafe.Pointer)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pSorter))
- *(**XVdbeSorter)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCsr.X14))))))) = nil
+ Xsqlite3_free(tls, unsafe.Pointer(_pSorter.Xlist.XaMemory))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pSorter))
+ *(**XVdbeSorter)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pCsr.Xuc)))) = nil
}
}
var _sqlite3VdbeSorterCloseØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSorterCloseØ00__func__Ø000[0], str(57892), 23)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSorterCloseØ00__func__Ø000[0], str(57868), 23)
}
-// Reset a sorting cursor back to its original empty state.
+// C comment
+// /*
+// ** Reset a sorting cursor back to its original empty state.
+// */
func _sqlite3VdbeSorterReset(tls *crt.TLS, _db *Xsqlite3, _pSorter *XVdbeSorter) {
var _i int32
var _2_pTask *XSortSubtask
- _vdbeSorterJoinAll(tls, _pSorter, i32(0))
+ _vdbeSorterJoinAll(tls, _pSorter, int32(0))
func() {
- if (_pSorter.X13) == 0 && (*XPmaReader)(_pSorter.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87243), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterResetØ00__func__Ø000))), unsafe.Pointer(str(57915)))
+ if _pSorter.XbUseThreads == 0 && (*XPmaReader)(_pSorter.XpReader) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87243), unsafe.Pointer(&_sqlite3VdbeSorterResetØ00__func__Ø000), unsafe.Pointer(str(57891)))
crt.X__builtin_abort(tls)
}
}()
- if (*XPmaReader)(_pSorter.X4) != nil {
- _vdbePmaReaderClear(tls, (*XPmaReader)(_pSorter.X4))
- _sqlite3DbFree(tls, _db, _pSorter.X4)
- *(**XPmaReader)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSorter.X4))))) = nil
+ if _pSorter.XpReader != nil {
+ _vdbePmaReaderClear(tls, (*XPmaReader)(_pSorter.XpReader))
+ _sqlite3DbFree(tls, _db, _pSorter.XpReader)
+ *(**XPmaReader)(unsafe.Pointer(&_pSorter.XpReader)) = nil
}
- _vdbeMergeEngineFree(tls, (*XMergeEngine)(_pSorter.X5))
- *(**XMergeEngine)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSorter.X5))))) = nil
- _i = i32(0)
+ _vdbeMergeEngineFree(tls, (*XMergeEngine)(_pSorter.XpMerger))
+ *(**XMergeEngine)(unsafe.Pointer(&_pSorter.XpMerger)) = nil
+ _i = int32(0)
_4:
- if _i >= int32(_pSorter.X15) {
+ if _i >= int32(_pSorter.XnTask) {
goto _7
}
- _2_pTask = (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17))))) + 60*uintptr(_i)))
+ _2_pTask = elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), uintptr(_i))
_vdbeSortSubtaskCleanup(tls, _db, _2_pTask)
- *(**XVdbeSorter)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pTask.X2))))) = _pSorter
+ *(**XVdbeSorter)(unsafe.Pointer(&_2_pTask.XpSorter)) = _pSorter
_i += 1
goto _4
_7:
- if ((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1) == nil {
- _vdbeSorterRecordFree(tls, nil, (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0))
- }
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0))))) = nil
- *(*int32)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X2))) = i32(0)
- *(*uint8)(unsafe.Pointer(&(_pSorter.X12))) = uint8(i32(0))
- *(*int32)(unsafe.Pointer(&(_pSorter.X10))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_pSorter.X2))) = i32(0)
- _sqlite3DbFree(tls, _db, _pSorter.X8)
- *(**XUnpackedRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSorter.X8))))) = nil
-}
-
-// Join all outstanding threads launched by SorterWrite() to create
-// level-0 PMAs.
+ if (_pSorter.Xlist.XaMemory) == nil {
+ _vdbeSorterRecordFree(tls, nil, (*XSorterRecord)(_pSorter.Xlist.XpList))
+ }
+ *(**XSorterRecord)(unsafe.Pointer(&(_pSorter.Xlist.XpList))) = nil
+ _pSorter.Xlist.XszPMA = int32(0)
+ _pSorter.XbUsePMA = 0
+ _pSorter.XiMemory = int32(0)
+ _pSorter.XmxKeysize = int32(0)
+ _sqlite3DbFree(tls, _db, _pSorter.XpUnpacked)
+ *(**XUnpackedRecord)(unsafe.Pointer(&_pSorter.XpUnpacked)) = nil
+}
+
+// C comment
+// /*
+// ** Join all outstanding threads launched by SorterWrite() to create
+// ** level-0 PMAs.
+// */
func _vdbeSorterJoinAll(tls *crt.TLS, _pSorter *XVdbeSorter, _rcin int32) (r0 int32) {
var _rc, _i, _1_rc2 int32
var _1_pTask *XSortSubtask
_rc = _rcin
- _i = int32(_pSorter.X15) - i32(1)
+ _i = int32(_pSorter.XnTask) - int32(1)
_0:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _3
}
- _1_pTask = (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17))))) + 60*uintptr(_i)))
+ _1_pTask = elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), uintptr(_i))
_1_rc2 = _vdbeSorterJoinThread(tls, _1_pTask)
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _1_rc2
}
_i -= 1
@@ -43941,184 +44731,203 @@ _3:
return _rc
}
-// Join thread pTask->thread.
+// C comment
+// /*
+// ** Join thread pTask->thread.
+// */
func _vdbeSorterJoinThread(tls *crt.TLS, _pTask *XSortSubtask) (r0 int32) {
var _rc int32
var _1_pRet unsafe.Pointer
- _rc = i32(0)
- if (*XSQLiteThread)(_pTask.X0) != nil {
- _1_pRet = (unsafe.Pointer)(uintptr(1))
- _sqlite3ThreadJoin(tls, (*XSQLiteThread)(_pTask.X0), &_1_pRet)
- _rc = int32(uintptr(_1_pRet))
+ _rc = int32(0)
+ if _pTask.XpThread != nil {
+ _1_pRet = crt.U2P(1)
+ _sqlite3ThreadJoin(tls, (*XSQLiteThread)(_pTask.XpThread), &_1_pRet)
+ _rc = int32(crt.P2U(_1_pRet))
func() {
- if (_pTask.X1) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87133), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterJoinThreadØ00__func__Ø000))), unsafe.Pointer(str(57959)))
+ if _pTask.XbDone != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87133), unsafe.Pointer(&_vdbeSorterJoinThreadØ00__func__Ø000), unsafe.Pointer(str(57935)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pTask.X1))) = i32(0)
- *(**XSQLiteThread)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTask.X0))))) = nil
+ _pTask.XbDone = int32(0)
+ *(**XSQLiteThread)(unsafe.Pointer(&_pTask.XpThread)) = nil
}
return _rc
}
-// Get the results of the thread
+// C comment
+// /* Get the results of the thread */
func _sqlite3ThreadJoin(tls *crt.TLS, _p *XSQLiteThread, _ppOut *unsafe.Pointer) (r0 int32) {
var _rc int32
func() {
if _ppOut == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(26937), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ThreadJoinØ00__func__Ø000))), unsafe.Pointer(str(57975)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(26937), unsafe.Pointer(&_sqlite3ThreadJoinØ00__func__Ø000), unsafe.Pointer(str(57951)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
if _p == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(26938), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ThreadJoinØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(26938), unsafe.Pointer(&_sqlite3ThreadJoinØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return _sqlite3NomemError(tls, i32(26938))
+ return _sqlite3NomemError(tls, int32(26938))
}
- if (_p.X1) != 0 {
- *_ppOut = _p.X2
- _rc = i32(0)
+ if _p.Xdone != 0 {
+ *_ppOut = _p.XpOut
+ _rc = int32(0)
goto _6
}
_rc = func() int32 {
- if crt.Xpthread_join(tls, _p.X0, _ppOut) != 0 {
- return i32(1)
+ if crt.Xpthread_join(tls, _p.Xtid, _ppOut) != 0 {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}()
_6:
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
return _rc
}
var _sqlite3ThreadJoinØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ThreadJoinØ00__func__Ø000[0], str(57984), 18)
+ crt.Xstrncpy(nil, &_sqlite3ThreadJoinØ00__func__Ø000[0], str(57960), 18)
}
var _vdbeSorterJoinThreadØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterJoinThreadØ00__func__Ø000[0], str(58002), 21)
+ crt.Xstrncpy(nil, &_vdbeSorterJoinThreadØ00__func__Ø000[0], str(57978), 21)
}
var _sqlite3VdbeSorterResetØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSorterResetØ00__func__Ø000[0], str(58023), 23)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSorterResetØ00__func__Ø000[0], str(57999), 23)
}
-// Free all memory belonging to the PmaReader object passed as the
-// argument. All structure fields are set to zero before returning.
+// C comment
+// /*
+// ** Free all memory belonging to the PmaReader object passed as the
+// ** argument. All structure fields are set to zero before returning.
+// */
func _vdbePmaReaderClear(tls *crt.TLS, _pReadr *XPmaReader) {
- Xsqlite3_free(tls, (unsafe.Pointer)(_pReadr.X5))
- Xsqlite3_free(tls, (unsafe.Pointer)(_pReadr.X7))
- if (_pReadr.X9) != nil {
- _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pReadr.X4), int64(i32(0)), (unsafe.Pointer)(_pReadr.X9))
+ Xsqlite3_free(tls, unsafe.Pointer(_pReadr.XaAlloc))
+ Xsqlite3_free(tls, unsafe.Pointer(_pReadr.XaBuffer))
+ if _pReadr.XaMap != nil {
+ _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pReadr.XpFd), 0, unsafe.Pointer(_pReadr.XaMap))
}
- _vdbeIncrFree(tls, (*XIncrMerger)(_pReadr.X10))
- crt.Xmemset(tls, (unsafe.Pointer)(_pReadr), i32(0), u32(52))
+ _vdbeIncrFree(tls, (*XIncrMerger)(_pReadr.XpIncr))
+ crt.Xmemset(tls, unsafe.Pointer(_pReadr), int32(0), uint32(52))
}
-// Free all resources associated with the IncrMerger object indicated by
-// the first argument.
+// C comment
+// /*
+// ** Free all resources associated with the IncrMerger object indicated by
+// ** the first argument.
+// */
func _vdbeIncrFree(tls *crt.TLS, _pIncr *XIncrMerger) {
if _pIncr == nil {
goto _0
}
- if (_pIncr.X5) == 0 {
+ if _pIncr.XbUseThread == 0 {
goto _1
}
- _vdbeSorterJoinThread(tls, (*XSortSubtask)(_pIncr.X0))
- if (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6)))))+12*uintptr(i32(0)))).X0) != nil {
- _sqlite3OsCloseFree(tls, (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6)))))+12*uintptr(i32(0)))).X0))
+ _vdbeSorterJoinThread(tls, (*XSortSubtask)(_pIncr.XpTask))
+ if (elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), 0).XpFd) != nil {
+ _sqlite3OsCloseFree(tls, (*Xsqlite3_file)(elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), 0).XpFd))
}
- if (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6)))))+12*uintptr(i32(1)))).X0) != nil {
- _sqlite3OsCloseFree(tls, (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6)))))+12*uintptr(i32(1)))).X0))
+ if (elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), uintptr(1)).XpFd) != nil {
+ _sqlite3OsCloseFree(tls, (*Xsqlite3_file)(elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), uintptr(1)).XpFd))
}
_1:
- _vdbeMergeEngineFree(tls, (*XMergeEngine)(_pIncr.X1))
- Xsqlite3_free(tls, (unsafe.Pointer)(_pIncr))
+ _vdbeMergeEngineFree(tls, (*XMergeEngine)(_pIncr.XpMerger))
+ Xsqlite3_free(tls, unsafe.Pointer(_pIncr))
_0:
}
func _sqlite3OsCloseFree(tls *crt.TLS, _pFile *Xsqlite3_file) {
func() {
if _pFile == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(20383), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OsCloseFreeØ00__func__Ø000))), unsafe.Pointer(str(58046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(20383), unsafe.Pointer(&_sqlite3OsCloseFreeØ00__func__Ø000), unsafe.Pointer(str(58022)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3OsClose(tls, _pFile)
- Xsqlite3_free(tls, (unsafe.Pointer)(_pFile))
+ Xsqlite3_free(tls, unsafe.Pointer(_pFile))
}
var _sqlite3OsCloseFreeØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3OsCloseFreeØ00__func__Ø000[0], str(58052), 19)
+ crt.Xstrncpy(nil, &_sqlite3OsCloseFreeØ00__func__Ø000[0], str(58028), 19)
}
-// Free the MergeEngine object passed as the only argument.
+// C comment
+// /*
+// ** Free the MergeEngine object passed as the only argument.
+// */
func _vdbeMergeEngineFree(tls *crt.TLS, _pMerger *XMergeEngine) {
var _i int32
if _pMerger == nil {
goto _0
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_pMerger.X0) {
+ if _i >= _pMerger.XnTree {
goto _4
}
- _vdbePmaReaderClear(tls, (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3)+52*uintptr(_i))))
+ _vdbePmaReaderClear(tls, elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(_i)))
_i += 1
goto _1
_4:
_0:
- Xsqlite3_free(tls, (unsafe.Pointer)(_pMerger))
+ Xsqlite3_free(tls, unsafe.Pointer(_pMerger))
}
-// Free all resources owned by the object indicated by argument pTask. All
-// fields of *pTask are zeroed before returning.
+// C comment
+// /*
+// ** Free all resources owned by the object indicated by argument pTask. All
+// ** fields of *pTask are zeroed before returning.
+// */
func _vdbeSortSubtaskCleanup(tls *crt.TLS, _db *Xsqlite3, _pTask *XSortSubtask) {
- _sqlite3DbFree(tls, _db, _pTask.X3)
- if ((*t47)(unsafe.Pointer(&(_pTask.X4))).X1) != nil {
- Xsqlite3_free(tls, (unsafe.Pointer)((*t47)(unsafe.Pointer(&(_pTask.X4))).X1))
+ _sqlite3DbFree(tls, _db, _pTask.XpUnpacked)
+ if (_pTask.Xlist.XaMemory) != nil {
+ Xsqlite3_free(tls, unsafe.Pointer(_pTask.Xlist.XaMemory))
goto _1
}
func() {
- if ((*t47)(unsafe.Pointer(&(_pTask.X4))).X1) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87067), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSortSubtaskCleanupØ00__func__Ø000))), unsafe.Pointer(str(58071)))
+ if (_pTask.Xlist.XaMemory) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87067), unsafe.Pointer(&_vdbeSortSubtaskCleanupØ00__func__Ø000), unsafe.Pointer(str(58047)))
crt.X__builtin_abort(tls)
}
}()
- _vdbeSorterRecordFree(tls, nil, (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pTask.X4))).X0))
+ _vdbeSorterRecordFree(tls, nil, (*XSorterRecord)(_pTask.Xlist.XpList))
_1:
- if (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X0) != nil {
- _sqlite3OsCloseFree(tls, (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X0))
+ if (_pTask.Xfile.XpFd) != nil {
+ _sqlite3OsCloseFree(tls, (*Xsqlite3_file)(_pTask.Xfile.XpFd))
}
- if (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X0) != nil {
- _sqlite3OsCloseFree(tls, (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X0))
+ if (_pTask.Xfile2.XpFd) != nil {
+ _sqlite3OsCloseFree(tls, (*Xsqlite3_file)(_pTask.Xfile2.XpFd))
}
- crt.Xmemset(tls, (unsafe.Pointer)(_pTask), i32(0), u32(60))
+ crt.Xmemset(tls, unsafe.Pointer(_pTask), int32(0), uint32(60))
}
var _vdbeSortSubtaskCleanupØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSortSubtaskCleanupØ00__func__Ø000[0], str(58094), 23)
+ crt.Xstrncpy(nil, &_vdbeSortSubtaskCleanupØ00__func__Ø000[0], str(58070), 23)
}
-// Free the list of sorted records starting at pRecord.
+// C comment
+// /*
+// ** Free the list of sorted records starting at pRecord.
+// */
func _vdbeSorterRecordFree(tls *crt.TLS, _db *Xsqlite3, _pRecord *XSorterRecord) {
var _p, _pNext *XSorterRecord
_p = _pRecord
@@ -44126,27 +44935,30 @@ _0:
if _p == nil {
goto _3
}
- _pNext = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_p.X1))))))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p))
+ _pNext = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p))
_p = _pNext
goto _0
_3:
}
-// If parameter iOp is less than zero, then invoke the destructor for
-// all auxiliary data pointers currently cached by the VM passed as
-// the first argument.
-//
-// Or, if iOp is greater than or equal to zero, then the destructor is
-// only invoked for those auxiliary data pointers created by the user
-// function invoked by the OP_Function opcode at instruction iOp of
-// VM pVdbe, and only then if:
-//
-// * the associated function parameter is the 32nd or later (counting
-// from left to right), or
-//
-// * the corresponding bit in argument mask is clear (where the first
-// function parameter corresponds to bit 0 etc.).
+// C comment
+// /*
+// ** If parameter iOp is less than zero, then invoke the destructor for
+// ** all auxiliary data pointers currently cached by the VM passed as
+// ** the first argument.
+// **
+// ** Or, if iOp is greater than or equal to zero, then the destructor is
+// ** only invoked for those auxiliary data pointers created by the user
+// ** function invoked by the OP_Function opcode at instruction iOp of
+// ** VM pVdbe, and only then if:
+// **
+// ** * the associated function parameter is the 32nd or later (counting
+// ** from left to right), or
+// **
+// ** * the corresponding bit in argument mask is clear (where the first
+// ** function parameter corresponds to bit 0 etc.).
+// */
func _sqlite3VdbeDeleteAuxData(tls *crt.TLS, _db *Xsqlite3, _pp **XAuxData, _iOp int32, _mask int32) {
var _1_pAux *XAuxData
_0:
@@ -44154,17 +44966,17 @@ _0:
goto _1
}
_1_pAux = *_pp
- if _iOp >= i32(0) && ((_1_pAux.X0) != _iOp || (_1_pAux.X1) < i32(0) || (_1_pAux.X1) <= i32(31) && (uint32(_mask)&(u32(1)<<uint(_1_pAux.X1))) != 0) {
+ if _iOp >= int32(0) && (_1_pAux.XiAuxOp != _iOp || _1_pAux.XiAuxArg < int32(0) || _1_pAux.XiAuxArg <= int32(31) && (uint32(_mask)&(uint32(1)<<uint(_1_pAux.XiAuxArg))) != 0) {
goto _6
}
- if (_1_pAux.X3) != nil {
- (_1_pAux.X3)(tls, _1_pAux.X2)
+ if _1_pAux.XxDeleteAux != nil {
+ _1_pAux.XxDeleteAux(tls, _1_pAux.XpAux)
}
- *_pp = (*XAuxData)(_1_pAux.X4)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_pAux))
+ *_pp = (*XAuxData)(_1_pAux.XpNextAux)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_pAux))
goto _8
_6:
- _pp = (**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pAux.X4)))))
+ _pp = (**XAuxData)(unsafe.Pointer(&_1_pAux.XpNextAux))
_8:
goto _0
_1:
@@ -44173,134 +44985,143 @@ _1:
var _closeAllCursorsØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_closeAllCursorsØ00__func__Ø000[0], str(58117), 16)
+ crt.Xstrncpy(nil, &_closeAllCursorsØ00__func__Ø000[0], str(58093), 16)
}
-// Delete a VdbeFrame object and its contents. VdbeFrame objects are
-// allocated by the OP_Program opcode in sqlite3VdbeExec().
+// C comment
+// /*
+// ** Delete a VdbeFrame object and its contents. VdbeFrame objects are
+// ** allocated by the OP_Program opcode in sqlite3VdbeExec().
+// */
func _sqlite3VdbeFrameDelete(tls *crt.TLS, _p *XVdbeFrame) {
var _i int32
var _aMem *XMem
var _apCsr **XVdbeCursor
- _aMem = (*XMem)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(u32(80))))))
- _apCsr = (**XVdbeCursor)(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_p.X14)))))
- _i = i32(0)
+ _aMem = (*XMem)(unsafe.Pointer(elem15((*uint8)(unsafe.Pointer(_p)), uintptr(80))))
+ _apCsr = (**XVdbeCursor)(unsafe.Pointer(elem25(_aMem, uintptr(_p.XnChildMem))))
+ _i = int32(0)
_0:
- if _i >= (_p.X15) {
+ if _i >= _p.XnChildCsr {
goto _3
}
- _sqlite3VdbeFreeCursor(tls, (*TVdbe)(_p.X0), *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apCsr)) + 4*uintptr(_i))))
+ _sqlite3VdbeFreeCursor(tls, (*TVdbe)(_p.Xv), *elem77(_apCsr, uintptr(_i)))
_i += 1
goto _0
_3:
- _releaseMemArray(tls, _aMem, _p.X14)
- _sqlite3VdbeDeleteAuxData(tls, (*Xsqlite3)((*TVdbe)(_p.X0).X0), (**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))), i32(-1), i32(0))
- _sqlite3DbFree(tls, (*Xsqlite3)((*TVdbe)(_p.X0).X0), (unsafe.Pointer)(_p))
+ _releaseMemArray(tls, _aMem, _p.XnChildMem)
+ _sqlite3VdbeDeleteAuxData(tls, (*Xsqlite3)((*TVdbe)(_p.Xv).Xdb), (**XAuxData)(unsafe.Pointer(&_p.XpAuxData)), int32(-1), int32(0))
+ _sqlite3DbFree(tls, (*Xsqlite3)((*TVdbe)(_p.Xv).Xdb), unsafe.Pointer(_p))
}
func _checkActiveVdbeCnt(tls *crt.TLS, _db *Xsqlite3) {
var _cnt, _nWrite, _nRead int32
var _p *TVdbe
- _cnt = i32(0)
- _nWrite = i32(0)
- _nRead = i32(0)
- _p = (*TVdbe)(_db.X1)
+ _cnt = int32(0)
+ _nWrite = int32(0)
+ _nRead = int32(0)
+ _p = (*TVdbe)(_db.XpVdbe)
_0:
if _p == nil {
goto _1
}
- if Xsqlite3_stmt_busy(tls, (unsafe.Pointer)(_p)) == 0 {
+ if Xsqlite3_stmt_busy(tls, unsafe.Pointer(_p)) == 0 {
goto _2
}
_cnt += 1
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) == i32(0) {
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) == int32(0) {
_nWrite += 1
}
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) != 0 {
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) != 0 {
_nRead += 1
}
_2:
- _p = (*TVdbe)(_p.X2)
+ _p = (*TVdbe)(_p.XpNext)
goto _0
_1:
func() {
- if _cnt != (_db.X34) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73910), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkActiveVdbeCntØ00__func__Ø000))), unsafe.Pointer(str(58133)))
+ if _cnt != _db.XnVdbeActive {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73910), unsafe.Pointer(&_checkActiveVdbeCntØ00__func__Ø000), unsafe.Pointer(str(58109)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nWrite != (_db.X36) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73911), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkActiveVdbeCntØ00__func__Ø000))), unsafe.Pointer(str(58154)))
+ if _nWrite != _db.XnVdbeWrite {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73911), unsafe.Pointer(&_checkActiveVdbeCntØ00__func__Ø000), unsafe.Pointer(str(58130)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nRead != (_db.X35) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73912), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkActiveVdbeCntØ00__func__Ø000))), unsafe.Pointer(str(58177)))
+ if _nRead != _db.XnVdbeRead {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73912), unsafe.Pointer(&_checkActiveVdbeCntØ00__func__Ø000), unsafe.Pointer(str(58153)))
crt.X__builtin_abort(tls)
}
}()
}
-// Return true if the prepared statement is in need of being reset.
+// C comment
+// /*
+// ** Return true if the prepared statement is in need of being reset.
+// */
func Xsqlite3_stmt_busy(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
var _v *TVdbe
_v = (*TVdbe)(_pStmt)
- return bool2int(((_v != nil) && ((_v.X5) == uint32(i32(770837923)))) && ((_v.X9) >= i32(0)))
+ return bool2int(((_v != nil) && (_v.Xmagic == uint32(770837923))) && (_v.Xpc >= int32(0)))
}
var _checkActiveVdbeCntØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_checkActiveVdbeCntØ00__func__Ø000[0], str(58198), 19)
-}
-
-// If SQLite is compiled to support shared-cache mode and to be threadsafe,
-// this routine obtains the mutex associated with each BtShared structure
-// that may be accessed by the VM passed as an argument. In doing so it also
-// sets the BtShared.db member of each of the BtShared structures, ensuring
-// that the correct busy-handler callback is invoked if required.
-//
-// If SQLite is not threadsafe but does support shared-cache mode, then
-// sqlite3BtreeEnter() is invoked to set the BtShared.db variables
-// of all of BtShared structures accessible via the database handle
-// associated with the VM.
-//
-// If SQLite is not threadsafe and does not support shared-cache mode, this
-// function is a no-op.
-//
-// The p->btreeMask field is a bitmask of all btrees that the prepared
-// statement p will ever use. Let N be the number of bits in p->btreeMask
-// corresponding to btrees that use shared cache. Then the runtime of
-// this routine is N*N. But as N is rarely more than 1, this should not
-// be a problem.
+ crt.Xstrncpy(nil, &_checkActiveVdbeCntØ00__func__Ø000[0], str(58174), 19)
+}
+
+// C comment
+// /*
+// ** If SQLite is compiled to support shared-cache mode and to be threadsafe,
+// ** this routine obtains the mutex associated with each BtShared structure
+// ** that may be accessed by the VM passed as an argument. In doing so it also
+// ** sets the BtShared.db member of each of the BtShared structures, ensuring
+// ** that the correct busy-handler callback is invoked if required.
+// **
+// ** If SQLite is not threadsafe but does support shared-cache mode, then
+// ** sqlite3BtreeEnter() is invoked to set the BtShared.db variables
+// ** of all of BtShared structures accessible via the database handle
+// ** associated with the VM.
+// **
+// ** If SQLite is not threadsafe and does not support shared-cache mode, this
+// ** function is a no-op.
+// **
+// ** The p->btreeMask field is a bitmask of all btrees that the prepared
+// ** statement p will ever use. Let N be the number of bits in p->btreeMask
+// ** corresponding to btrees that use shared cache. Then the runtime of
+// ** this routine is N*N. But as N is rarely more than 1, this should not
+// ** be a problem.
+// */
func _sqlite3VdbeEnter(tls *crt.TLS, _p *TVdbe) {
var _i, _nDb int32
var _db *Xsqlite3
var _aDb *XDb
- if (_p.X34) == uint32(i32(0)) {
+ if _p.XlockMask == (0) {
return
}
- _db = (*Xsqlite3)(_p.X0)
- _aDb = (*XDb)(_db.X4)
- _nDb = _db.X5
- _i = i32(0)
+ _db = (*Xsqlite3)(_p.Xdb)
+ _aDb = (*XDb)(_db.XaDb)
+ _nDb = _db.XnDb
+ _i = int32(0)
_1:
if _i >= _nDb {
goto _4
}
- if ((_i != i32(1)) && (((_p.X34) & (u32(1) << uint(_i))) != uint32(i32(0)))) && func() int32 {
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDb))+16*uintptr(_i))).X1) != nil {
- return i32(1)
+ if ((_i != int32(1)) && ((_p.XlockMask & (uint32(1) << uint(_i))) != (0))) && func() int32 {
+ if (*XBtree)(elem27(_aDb, uintptr(_i)).XpBt) != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72873), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeEnterØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72873), unsafe.Pointer(&_sqlite3VdbeEnterØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- _sqlite3BtreeEnter(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDb))+16*uintptr(_i))).X1))
+ _sqlite3BtreeEnter(tls, (*XBtree)(elem27(_aDb, uintptr(_i)).XpBt))
}
_i += 1
goto _1
@@ -44310,67 +45131,73 @@ _4:
var _sqlite3VdbeEnterØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeEnterØ00__func__Ø000[0], str(58217), 17)
+ crt.Xstrncpy(nil, &_sqlite3VdbeEnterØ00__func__Ø000[0], str(58193), 17)
}
func _sqlite3VdbeCheckFk(tls *crt.TLS, _p *TVdbe, _deferred int32) (r0 int32) {
var _db *Xsqlite3
- _db = (*Xsqlite3)(_p.X0)
- if (_deferred != 0 && (((_db.X77) + (_db.X78)) > int64(i32(0)))) || ((_deferred == 0) && ((_p.X14) > int64(i32(0)))) {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(787)
- *(*uint8)(unsafe.Pointer(&(_p.X30))) = uint8(i32(2))
- _sqlite3VdbeError(tls, _p, str(58234))
- return i32(1)
+ _db = (*Xsqlite3)(_p.Xdb)
+ if (_deferred != 0 && ((_db.XnDeferredCons + _db.XnDeferredImmCons) > (0))) || ((_deferred == 0) && (_p.XnFkConstraint > (0))) {
+ _p.Xrc = int32(787)
+ _p.XerrorAction = uint8(2)
+ _sqlite3VdbeError(tls, _p, str(58210))
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}
-// Change the error string stored in Vdbe.zErrMsg
+// C comment
+// /*
+// ** Change the error string stored in Vdbe.zErrMsg
+// */
func _sqlite3VdbeError(tls *crt.TLS, _p *TVdbe, _zFormat *int8, args ...interface{}) {
var _ap []interface{}
- _sqlite3DbFree(tls, (*Xsqlite3)(_p.X0), (unsafe.Pointer)(_p.X22))
+ _sqlite3DbFree(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_p.XzErrMsg))
_ap = args
- *(**int8)(unsafe.Pointer(&(_p.X22))) = _sqlite3VMPrintf(tls, (*Xsqlite3)(_p.X0), _zFormat, _ap)
+ _p.XzErrMsg = _sqlite3VMPrintf(tls, (*Xsqlite3)(_p.Xdb), _zFormat, _ap)
_ap = nil
}
var _sqlite3VdbeHaltØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeHaltØ00__func__Ø000[0], str(58264), 16)
+ crt.Xstrncpy(nil, &_sqlite3VdbeHaltØ00__func__Ø000[0], str(58240), 16)
}
func _sqlite3VdbeLeave(tls *crt.TLS, _p *TVdbe) {
- if (_p.X34) == uint32(i32(0)) {
+ if _p.XlockMask == (0) {
return
}
_vdbeLeave(tls, _p)
}
-// Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter().
+// C comment
+// /*
+// ** Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter().
+// */
func _vdbeLeave(tls *crt.TLS, _p *TVdbe) {
var _i, _nDb int32
var _db *Xsqlite3
var _aDb *XDb
- _db = (*Xsqlite3)(_p.X0)
- _aDb = (*XDb)(_db.X4)
- _nDb = _db.X5
- _i = i32(0)
+ _db = (*Xsqlite3)(_p.Xdb)
+ _aDb = (*XDb)(_db.XaDb)
+ _nDb = _db.XnDb
+ _i = int32(0)
_0:
if _i >= _nDb {
goto _3
}
- if ((_i != i32(1)) && (((_p.X34) & (u32(1) << uint(_i))) != uint32(i32(0)))) && func() int32 {
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDb))+16*uintptr(_i))).X1) != nil {
- return i32(1)
+ if ((_i != int32(1)) && ((_p.XlockMask & (uint32(1) << uint(_i))) != (0))) && func() int32 {
+ if (*XBtree)(elem27(_aDb, uintptr(_i)).XpBt) != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72893), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeLeaveØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72893), unsafe.Pointer(&_vdbeLeaveØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- _sqlite3BtreeLeave(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aDb))+16*uintptr(_i))).X1))
+ _sqlite3BtreeLeave(tls, (*XBtree)(elem27(_aDb, uintptr(_i)).XpBt))
}
_i += 1
goto _0
@@ -44380,13 +45207,16 @@ _3:
var _vdbeLeaveØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeLeaveØ00__func__Ø000[0], str(58280), 10)
+ crt.Xstrncpy(nil, &_vdbeLeaveØ00__func__Ø000[0], str(58256), 10)
}
-// A read or write transaction may or may not be active on database handle
-// db. If a transaction is active, commit it. If there is a
-// write-transaction spanning more than one database file, this routine
-// takes care of the master journal trickery.
+// C comment
+// /*
+// ** A read or write transaction may or may not be active on database handle
+// ** db. If a transaction is active, commit it. If there is a
+// ** write-transaction spanning more than one database file, this routine
+// ** takes care of the master journal trickery.
+// */
func _vdbeCommit(tls *crt.TLS, _db *Xsqlite3, _p *TVdbe) (r0 int32) {
var _i, _nTrans, _rc, _needXcommit, _13_res, _13_retryCount, _13_nMainFile int32
var _13_offset int64
@@ -44396,26 +45226,26 @@ func _vdbeCommit(tls *crt.TLS, _db *Xsqlite3, _p *TVdbe) (r0 int32) {
var _2_pPager *XPager
var _13_pMaster *Xsqlite3_file
var _13_pVfs *Xsqlite3_vfs
- _nTrans = i32(0)
- _rc = i32(0)
- _needXcommit = i32(0)
+ _nTrans = int32(0)
+ _rc = int32(0)
+ _needXcommit = int32(0)
_rc = _sqlite3VtabSync(tls, _db, _p)
- _i = i32(0)
+ _i = int32(0)
_0:
- if _rc != i32(0) || _i >= (_db.X5) {
+ if _rc != int32(0) || _i >= _db.XnDb {
goto _4
}
- _1_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _1_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _sqlite3BtreeIsInTrans(tls, _1_pBt) == 0 {
goto _5
}
- _needXcommit = i32(1)
+ _needXcommit = int32(1)
_sqlite3BtreeEnter(tls, _1_pBt)
_2_pPager = _sqlite3BtreePager(tls, _1_pBt)
- if (int32((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_i))).X2) != i32(1)) && ((*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_vdbeCommitØ00aMJNeededØ001)) + 1*uintptr(_sqlite3PagerGetJournalMode(tls, _2_pPager))))) != 0) {
+ if (int32(elem27((*XDb)(_db.XaDb), uintptr(_i)).Xsafety_level) != int32(1)) && ((*elem15((*uint8)(unsafe.Pointer(&_vdbeCommitØ00aMJNeededØ001)), uintptr(_sqlite3PagerGetJournalMode(tls, _2_pPager)))) != 0) {
func() {
- if _i == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73684), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeCommitØ00__func__Ø000))), unsafe.Pointer(str(58290)))
+ if _i == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73684), unsafe.Pointer(&_vdbeCommitØ00__func__Ø000), unsafe.Pointer(str(58266)))
crt.X__builtin_abort(tls)
}
}()
@@ -44427,100 +45257,100 @@ _5:
_i += 1
goto _0
_4:
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- if _needXcommit == 0 || (_db.X46) == nil {
+ if _needXcommit == 0 || _db.XxCommitCallback == nil {
goto _12
}
- _rc = (_db.X46)(tls, _db.X45)
+ _rc = _db.XxCommitCallback(tls, _db.XpCommitArg)
if _rc != 0 {
- return i32(531)
+ return int32(531)
}
_12:
- if i32(0) != _sqlite3Strlen30(tls, _sqlite3BtreeGetFilename(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X1))) && _nTrans > i32(1) {
+ if int32(0) != _sqlite3Strlen30(tls, _sqlite3BtreeGetFilename(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), 0).XpBt))) && _nTrans > int32(1) {
goto _15
}
- _i = i32(0)
+ _i = int32(0)
_16:
- if _rc != i32(0) || _i >= (_db.X5) {
+ if _rc != int32(0) || _i >= _db.XnDb {
goto _20
}
- _8_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _8_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _8_pBt != nil {
_rc = _sqlite3BtreeCommitPhaseOne(tls, _8_pBt, nil)
}
_i += 1
goto _16
_20:
- _i = i32(0)
+ _i = int32(0)
_22:
- if _rc != i32(0) || _i >= (_db.X5) {
+ if _rc != int32(0) || _i >= _db.XnDb {
goto _26
}
- _10_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _10_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _10_pBt != nil {
- _rc = _sqlite3BtreeCommitPhaseTwo(tls, _10_pBt, i32(0))
+ _rc = _sqlite3BtreeCommitPhaseTwo(tls, _10_pBt, int32(0))
}
_i += 1
goto _22
_26:
- if _rc == i32(0) {
+ if _rc == int32(0) {
_sqlite3VtabCommit(tls, _db)
}
goto _29
_15:
- _13_pVfs = (*Xsqlite3_vfs)(_db.X0)
+ _13_pVfs = (*Xsqlite3_vfs)(_db.XpVfs)
_13_zMaster = nil
- _13_zMainFile = _sqlite3BtreeGetFilename(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X1))
+ _13_zMainFile = _sqlite3BtreeGetFilename(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), 0).XpBt))
_13_pMaster = nil
- _13_offset = i64(0)
- _13_retryCount = i32(0)
+ _13_offset = int64(0)
+ _13_retryCount = int32(0)
_13_nMainFile = _sqlite3Strlen30(tls, _13_zMainFile)
- _13_zMaster = _sqlite3MPrintf(tls, _db, str(58295), unsafe.Pointer(_13_zMainFile))
+ _13_zMaster = _sqlite3MPrintf(tls, _db, str(58271), unsafe.Pointer(_13_zMainFile))
if _13_zMaster == nil {
- return _sqlite3NomemError(tls, i32(73756))
+ return _sqlite3NomemError(tls, int32(73756))
}
_30:
if _13_retryCount == 0 {
goto _32
}
- if _13_retryCount > i32(100) {
- Xsqlite3_log(tls, i32(13), str(58311), unsafe.Pointer(_13_zMaster))
- _sqlite3OsDelete(tls, _13_pVfs, _13_zMaster, i32(0))
+ if _13_retryCount > int32(100) {
+ Xsqlite3_log(tls, int32(13), str(58287), unsafe.Pointer(_13_zMaster))
+ _sqlite3OsDelete(tls, _13_pVfs, _13_zMaster, int32(0))
goto _34
}
- if _13_retryCount == i32(1) {
- Xsqlite3_log(tls, i32(13), str(58325), unsafe.Pointer(_13_zMaster))
+ if _13_retryCount == int32(1) {
+ Xsqlite3_log(tls, int32(13), str(58301), unsafe.Pointer(_13_zMaster))
}
_32:
_13_retryCount += 1
- Xsqlite3_randomness(tls, int32(u32(4)), (unsafe.Pointer)(&_14_iRandom))
- Xsqlite3_snprintf(tls, i32(13), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_13_zMaster))+1*uintptr(_13_nMainFile))), str(58340), (_14_iRandom>>uint(i32(8)))&uint32(i32(16777215)), _14_iRandom&uint32(i32(255)))
+ Xsqlite3_randomness(tls, int32(4), unsafe.Pointer(&_14_iRandom))
+ Xsqlite3_snprintf(tls, int32(13), elem1(_13_zMaster, uintptr(_13_nMainFile)), str(58316), (_14_iRandom>>8)&uint32(16777215), _14_iRandom&uint32(255))
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_13_zMaster)) + 1*uintptr(_sqlite3Strlen30(tls, _13_zMaster)-i32(3))))) != i32(57) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73774), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeCommitØ00__func__Ø000))), unsafe.Pointer(str(58353)))
+ if int32(*elem1(_13_zMaster, uintptr(_sqlite3Strlen30(tls, _13_zMaster)-int32(3)))) != int32(57) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73774), unsafe.Pointer(&_vdbeCommitØ00__func__Ø000), unsafe.Pointer(str(58329)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsAccess(tls, _13_pVfs, _13_zMaster, i32(0), &_13_res)
- if (_rc == i32(0)) && _13_res != 0 {
+ _rc = _sqlite3OsAccess(tls, _13_pVfs, _13_zMaster, int32(0), &_13_res)
+ if (_rc == int32(0)) && _13_res != 0 {
goto _30
}
_34:
- if _rc == i32(0) {
- _rc = _sqlite3OsOpenMalloc(tls, _13_pVfs, _13_zMaster, &_13_pMaster, i32(16406), nil)
+ if _rc == int32(0) {
+ _rc = _sqlite3OsOpenMalloc(tls, _13_pVfs, _13_zMaster, &_13_pMaster, int32(16406), nil)
}
- if _rc != i32(0) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_13_zMaster))
+ if _rc != int32(0) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_13_zMaster))
return _rc
}
- _i = i32(0)
+ _i = int32(0)
_42:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _45
}
- _20_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _20_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _sqlite3BtreeIsInTrans(tls, _20_pBt) == 0 {
goto _46
}
@@ -44529,21 +45359,17 @@ _42:
goto _43
}
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_zFile)) + 1*uintptr(i32(0))))) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73803), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeCommitØ00__func__Ø000))), unsafe.Pointer(str(58394)))
+ if int32(*elem1(_21_zFile, 0)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73803), unsafe.Pointer(&_vdbeCommitØ00__func__Ø000), unsafe.Pointer(str(58370)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3OsWrite(tls, _13_pMaster, (unsafe.Pointer)(_21_zFile), _sqlite3Strlen30(tls, _21_zFile)+i32(1), _13_offset)
- {
- p := &_13_offset
- *p = (*p) + int64(_sqlite3Strlen30(tls, _21_zFile)+i32(1))
- sink6(*p)
- }
- if _rc != i32(0) {
+ _rc = _sqlite3OsWrite(tls, _13_pMaster, unsafe.Pointer(_21_zFile), _sqlite3Strlen30(tls, _21_zFile)+int32(1), _13_offset)
+ _13_offset += int64(_sqlite3Strlen30(tls, _21_zFile) + int32(1))
+ if _rc != int32(0) {
_sqlite3OsCloseFree(tls, _13_pMaster)
- _sqlite3OsDelete(tls, _13_pVfs, _13_zMaster, i32(0))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_13_zMaster))
+ _sqlite3OsDelete(tls, _13_pVfs, _13_zMaster, int32(0))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_13_zMaster))
return _rc
}
_46:
@@ -44551,18 +45377,18 @@ _43:
_i += 1
goto _42
_45:
- if (i32(0) == (_sqlite3OsDeviceCharacteristics(tls, _13_pMaster) & i32(1024))) && (i32(0) != store1(&_rc, _sqlite3OsSync(tls, _13_pMaster, i32(2)))) {
+ if (int32(0) == (_sqlite3OsDeviceCharacteristics(tls, _13_pMaster) & int32(1024))) && (int32(0) != store2(&_rc, _sqlite3OsSync(tls, _13_pMaster, int32(2)))) {
_sqlite3OsCloseFree(tls, _13_pMaster)
- _sqlite3OsDelete(tls, _13_pVfs, _13_zMaster, i32(0))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_13_zMaster))
+ _sqlite3OsDelete(tls, _13_pVfs, _13_zMaster, int32(0))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_13_zMaster))
return _rc
}
- _i = i32(0)
+ _i = int32(0)
_53:
- if _rc != i32(0) || _i >= (_db.X5) {
+ if _rc != int32(0) || _i >= _db.XnDb {
goto _57
}
- _25_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _25_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _25_pBt != nil {
_rc = _sqlite3BtreeCommitPhaseOne(tls, _25_pBt, _13_zMaster)
}
@@ -44571,30 +45397,30 @@ _53:
_57:
_sqlite3OsCloseFree(tls, _13_pMaster)
func() {
- if _rc == i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73844), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeCommitØ00__func__Ø000))), unsafe.Pointer(str(58406)))
+ if _rc == int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73844), unsafe.Pointer(&_vdbeCommitØ00__func__Ø000), unsafe.Pointer(str(58382)))
crt.X__builtin_abort(tls)
}
}()
- if _rc != i32(0) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_13_zMaster))
+ if _rc != int32(0) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_13_zMaster))
return _rc
}
- _rc = _sqlite3OsDelete(tls, _13_pVfs, _13_zMaster, i32(1))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_13_zMaster))
+ _rc = _sqlite3OsDelete(tls, _13_pVfs, _13_zMaster, int32(1))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_13_zMaster))
_13_zMaster = nil
if _rc != 0 {
return _rc
}
_sqlite3BeginBenignMalloc(tls)
- _i = i32(0)
+ _i = int32(0)
_63:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _66
}
- _29_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _29_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _29_pBt != nil {
- _sqlite3BtreeCommitPhaseTwo(tls, _29_pBt, i32(1))
+ _sqlite3BtreeCommitPhaseTwo(tls, _29_pBt, int32(1))
}
_i += 1
goto _63
@@ -44605,53 +45431,56 @@ _29:
return _rc
}
-// Invoke the xSync method of all virtual tables in the sqlite3.aVTrans
-// array. Return the error code for the first error that occurs, or
-// SQLITE_OK if all xSync operations are successful.
-//
-// If an error message is available, leave it in p->zErrMsg.
+// C comment
+// /*
+// ** Invoke the xSync method of all virtual tables in the sqlite3.aVTrans
+// ** array. Return the error code for the first error that occurs, or
+// ** SQLITE_OK if all xSync operations are successful.
+// **
+// ** If an error message is available, leave it in p->zErrMsg.
+// */
func _sqlite3VtabSync(tls *crt.TLS, _db *Xsqlite3, _p *TVdbe) (r0 int32) {
var _i, _rc int32
var _1_pVtab *Xsqlite3_vtab
var _aVTrans **XVTable
var _1_x func(*crt.TLS, *Xsqlite3_vtab) int32
- _rc = i32(0)
- _aVTrans = (**XVTable)(unsafe.Pointer(_db.X67))
- *(***XVTable)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_db.X67))))) = nil
- _i = i32(0)
+ _rc = int32(0)
+ _aVTrans = (**XVTable)(unsafe.Pointer(_db.XaVTrans))
+ *(***XVTable)(unsafe.Pointer(&_db.XaVTrans)) = nil
+ _i = int32(0)
_0:
- if _rc != i32(0) || _i >= (_db.X64) {
+ if _rc != int32(0) || _i >= _db.XnVTrans {
goto _4
}
- _1_pVtab = (*Xsqlite3_vtab)((*(**XVTable)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aVTrans)) + 4*uintptr(_i)))).X2)
- if (_1_pVtab != nil) && (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab) int32
- }{store49(&_1_x, *(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_module)(_1_pVtab.X0).X15)})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab) int32
- }{nil}))) {
+ _1_pVtab = (*Xsqlite3_vtab)((*elem28(_aVTrans, uintptr(_i))).XpVtab)
+ if (_1_pVtab != nil) && (store81(&_1_x, func() func(*crt.TLS, *Xsqlite3_vtab) int32 {
+ v := (*Xsqlite3_module)(_1_pVtab.XpModule).XxSync
+ return *(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&v))
+ }()) != nil) {
_rc = _1_x(tls, _1_pVtab)
_sqlite3VtabImportErrmsg(tls, _p, _1_pVtab)
}
_i += 1
goto _0
_4:
- *(***XVTable)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_db.X67))))) = _aVTrans
+ *(***XVTable)(unsafe.Pointer(&_db.XaVTrans)) = _aVTrans
return _rc
}
-// Transfer error message text from an sqlite3_vtab.zErrMsg (text stored
-// in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored
-// in memory obtained from sqlite3DbMalloc).
+// C comment
+// /*
+// ** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored
+// ** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored
+// ** in memory obtained from sqlite3DbMalloc).
+// */
func _sqlite3VtabImportErrmsg(tls *crt.TLS, _p *TVdbe, _pVtab *Xsqlite3_vtab) {
var _1_db *Xsqlite3
- if (_pVtab.X2) != nil {
- _1_db = (*Xsqlite3)(_p.X0)
- _sqlite3DbFree(tls, _1_db, (unsafe.Pointer)(_p.X22))
- *(**int8)(unsafe.Pointer(&(_p.X22))) = _sqlite3DbStrDup(tls, _1_db, _pVtab.X2)
- Xsqlite3_free(tls, (unsafe.Pointer)(_pVtab.X2))
- *(**int8)(unsafe.Pointer(&(_pVtab.X2))) = nil
+ if _pVtab.XzErrMsg != nil {
+ _1_db = (*Xsqlite3)(_p.Xdb)
+ _sqlite3DbFree(tls, _1_db, unsafe.Pointer(_p.XzErrMsg))
+ _p.XzErrMsg = _sqlite3DbStrDup(tls, _1_db, _pVtab.XzErrMsg)
+ Xsqlite3_free(tls, unsafe.Pointer(_pVtab.XzErrMsg))
+ _pVtab.XzErrMsg = nil
}
}
@@ -44661,197 +45490,222 @@ func init() {
_vdbeCommitØ00aMJNeededØ001 = [6]uint8{1, 1, 0, 1, 0, 0}
}
-// Return the current journal mode.
+// C comment
+// /*
+// ** Return the current journal mode.
+// */
func _sqlite3PagerGetJournalMode(tls *crt.TLS, _pPager *XPager) (r0 int32) {
- return int32(_pPager.X2)
+ return int32(_pPager.XjournalMode)
}
var _vdbeCommitØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeCommitØ00__func__Ø000[0], str(58422), 11)
+ crt.Xstrncpy(nil, &_vdbeCommitØ00__func__Ø000[0], str(58398), 11)
}
-// Return the full pathname of the underlying database file. Return
-// an empty string if the database is in-memory or a TEMP database.
-//
-// The pager filename is invariant as long as the pager is
-// open so it is safe to access without the BtShared mutex.
+// C comment
+// /*
+// ** Return the full pathname of the underlying database file. Return
+// ** an empty string if the database is in-memory or a TEMP database.
+// **
+// ** The pager filename is invariant as long as the pager is
+// ** open so it is safe to access without the BtShared mutex.
+// */
func _sqlite3BtreeGetFilename(tls *crt.TLS, _p *XBtree) (r0 *int8) {
func() {
- if (*XPager)((*XBtShared)(_p.X1).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68620), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeGetFilenameØ00__func__Ø000))), unsafe.Pointer(str(58433)))
+ if (*XPager)((*XBtShared)(_p.XpBt).XpPager) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68620), unsafe.Pointer(&_sqlite3BtreeGetFilenameØ00__func__Ø000), unsafe.Pointer(str(58409)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3PagerFilename(tls, (*XPager)((*XBtShared)(_p.X1).X0), i32(1))
+ return _sqlite3PagerFilename(tls, (*XPager)((*XBtShared)(_p.XpBt).XpPager), int32(1))
}
var _sqlite3BtreeGetFilenameØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeGetFilenameØ00__func__Ø000[0], str(58451), 24)
+ crt.Xstrncpy(nil, &_sqlite3BtreeGetFilenameØ00__func__Ø000[0], str(58427), 24)
}
-// Return the full pathname of the database file.
-//
-// Except, if the pager is in-memory only, then return an empty string if
-// nullIfMemDb is true. This routine is called with nullIfMemDb==1 when
-// used to report the filename to the user, for compatibility with legacy
-// behavior. But when the Btree needs to know the filename for matching to
-// shared cache, it uses nullIfMemDb==0 so that in-memory databases can
-// participate in shared-cache.
+// C comment
+// /*
+// ** Return the full pathname of the database file.
+// **
+// ** Except, if the pager is in-memory only, then return an empty string if
+// ** nullIfMemDb is true. This routine is called with nullIfMemDb==1 when
+// ** used to report the filename to the user, for compatibility with legacy
+// ** behavior. But when the Btree needs to know the filename for matching to
+// ** shared cache, it uses nullIfMemDb==0 so that in-memory databases can
+// ** participate in shared-cache.
+// */
func _sqlite3PagerFilename(tls *crt.TLS, _pPager *XPager, _nullIfMemDb int32) (r0 *int8) {
return func() *int8 {
- if _nullIfMemDb != 0 && ((_pPager.X13) != 0) {
- return str(0)
+ if _nullIfMemDb != 0 && (_pPager.XmemDb != 0) {
+ return str(284)
}
- return (_pPager.X51)
+ return _pPager.XzFilename
}()
}
-// Invoke the xCommit method of all virtual tables in the
-// sqlite3.aVTrans array. Then clear the array itself.
+// C comment
+// /*
+// ** Invoke the xCommit method of all virtual tables in the
+// ** sqlite3.aVTrans array. Then clear the array itself.
+// */
func _sqlite3VtabCommit(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
- _callFinaliser(tls, _db, int32(u32(64)))
- return i32(0)
+ _callFinaliser(tls, _db, int32(64))
+ return int32(0)
}
+// C comment
+// /*
+// ** Convenience functions for opening and closing files using
+// ** sqlite3_malloc() to obtain space for the file-handle structure.
+// */
func _sqlite3OsOpenMalloc(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zFile *int8, _ppFile **Xsqlite3_file, _flags int32, _pOutFlags *int32) (r0 int32) {
var _rc int32
var _pFile *Xsqlite3_file
- _pFile = (*Xsqlite3_file)(_sqlite3MallocZero(tls, uint64(_pVfs.X1)))
+ _pFile = (*Xsqlite3_file)(_sqlite3MallocZero(tls, uint64(_pVfs.XszOsFile)))
if _pFile == nil {
goto _0
}
_rc = _sqlite3OsOpen(tls, _pVfs, _zFile, _pFile, _flags, _pOutFlags)
- if _rc != i32(0) {
- Xsqlite3_free(tls, (unsafe.Pointer)(_pFile))
+ if _rc != int32(0) {
+ Xsqlite3_free(tls, unsafe.Pointer(_pFile))
goto _2
}
*_ppFile = _pFile
_2:
goto _3
_0:
- _rc = _sqlite3NomemError(tls, i32(20378))
+ _rc = _sqlite3NomemError(tls, int32(20378))
_3:
return _rc
}
-// Return the pathname of the journal file for this database. The return
-// value of this routine is the same regardless of whether the journal file
-// has been created or not.
-//
-// The pager journal filename is invariant as long as the pager is
-// open so it is safe to access without the BtShared mutex.
+// C comment
+// /*
+// ** Return the pathname of the journal file for this database. The return
+// ** value of this routine is the same regardless of whether the journal file
+// ** has been created or not.
+// **
+// ** The pager journal filename is invariant as long as the pager is
+// ** open so it is safe to access without the BtShared mutex.
+// */
func _sqlite3BtreeGetJournalname(tls *crt.TLS, _p *XBtree) (r0 *int8) {
func() {
- if (*XPager)((*XBtShared)(_p.X1).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68633), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeGetJournalnameØ00__func__Ø000))), unsafe.Pointer(str(58433)))
+ if (*XPager)((*XBtShared)(_p.XpBt).XpPager) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68633), unsafe.Pointer(&_sqlite3BtreeGetJournalnameØ00__func__Ø000), unsafe.Pointer(str(58409)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3PagerJournalname(tls, (*XPager)((*XBtShared)(_p.X1).X0))
+ return _sqlite3PagerJournalname(tls, (*XPager)((*XBtShared)(_p.XpBt).XpPager))
}
var _sqlite3BtreeGetJournalnameØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeGetJournalnameØ00__func__Ø000[0], str(58475), 27)
+ crt.Xstrncpy(nil, &_sqlite3BtreeGetJournalnameØ00__func__Ø000[0], str(58451), 27)
}
-// Return the full pathname of the journal file.
+// C comment
+// /*
+// ** Return the full pathname of the journal file.
+// */
func _sqlite3PagerJournalname(tls *crt.TLS, _pPager *XPager) (r0 *int8) {
- return _pPager.X52
+ return _pPager.XzJournal
}
-// This routine is called when a commit occurs.
+// C comment
+// /*
+// ** This routine is called when a commit occurs.
+// */
func _sqlite3CommitInternalChanges(tls *crt.TLS, _db *Xsqlite3) {
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-3)
- sink1(*p)
- }
+ _db.Xflags &= int32(-3)
}
func _sqlite3VdbeCloseStatement(tls *crt.TLS, _p *TVdbe, _eOp int32) (r0 int32) {
- if ((*Xsqlite3)(_p.X0).X76) != 0 && (_p.X12) != 0 {
+ if ((*Xsqlite3)(_p.Xdb).XnStatement) != 0 && _p.XiStatement != 0 {
return _vdbeCloseStatement(tls, _p, _eOp)
}
- return i32(0)
+ return int32(0)
}
-// If the Vdbe passed as the first argument opened a statement-transaction,
-// close it now. Argument eOp must be either SAVEPOINT_ROLLBACK or
-// SAVEPOINT_RELEASE. If it is SAVEPOINT_ROLLBACK, then the statement
-// transaction is rolled back. If eOp is SAVEPOINT_RELEASE, then the
-// statement transaction is committed.
-//
-// If an IO error occurs, an SQLITE_IOERR_XXX error code is returned.
-// Otherwise SQLITE_OK.
+// C comment
+// /*
+// ** If the Vdbe passed as the first argument opened a statement-transaction,
+// ** close it now. Argument eOp must be either SAVEPOINT_ROLLBACK or
+// ** SAVEPOINT_RELEASE. If it is SAVEPOINT_ROLLBACK, then the statement
+// ** transaction is rolled back. If eOp is SAVEPOINT_RELEASE, then the
+// ** statement transaction is committed.
+// **
+// ** If an IO error occurs, an SQLITE_IOERR_XXX error code is returned.
+// ** Otherwise SQLITE_OK.
+// */
func _vdbeCloseStatement(tls *crt.TLS, _p *TVdbe, _eOp int32) (r0 int32) {
var _rc, _i, _iSavepoint, _1_rc2 int32
var _db *Xsqlite3
var _1_pBt *XBtree
- _db = (*Xsqlite3)(_p.X0)
- _rc = i32(0)
- _iSavepoint = (_p.X12) - i32(1)
+ _db = (*Xsqlite3)(_p.Xdb)
+ _rc = int32(0)
+ _iSavepoint = _p.XiStatement - int32(1)
func() {
- if _eOp != i32(2) && _eOp != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73934), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeCloseStatementØ00__func__Ø000))), unsafe.Pointer(str(58502)))
+ if _eOp != int32(2) && _eOp != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73934), unsafe.Pointer(&_vdbeCloseStatementØ00__func__Ø000), unsafe.Pointer(str(58478)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_db.X76) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73935), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeCloseStatementØ00__func__Ø000))), unsafe.Pointer(str(58552)))
+ if _db.XnStatement <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73935), unsafe.Pointer(&_vdbeCloseStatementØ00__func__Ø000), unsafe.Pointer(str(58528)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X12) != ((_db.X76) + (_db.X75)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73936), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeCloseStatementØ00__func__Ø000))), unsafe.Pointer(str(58569)))
+ if _p.XiStatement != (_db.XnStatement + _db.XnSavepoint) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73936), unsafe.Pointer(&_vdbeCloseStatementØ00__func__Ø000), unsafe.Pointer(str(58545)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_7:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _10
}
- _1_rc2 = i32(0)
- _1_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _1_rc2 = int32(0)
+ _1_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _1_pBt == nil {
goto _11
}
- if _eOp == i32(2) {
- _1_rc2 = _sqlite3BtreeSavepoint(tls, _1_pBt, i32(2), _iSavepoint)
+ if _eOp == int32(2) {
+ _1_rc2 = _sqlite3BtreeSavepoint(tls, _1_pBt, int32(2), _iSavepoint)
}
- if _1_rc2 == i32(0) {
- _1_rc2 = _sqlite3BtreeSavepoint(tls, _1_pBt, i32(1), _iSavepoint)
+ if _1_rc2 == int32(0) {
+ _1_rc2 = _sqlite3BtreeSavepoint(tls, _1_pBt, int32(1), _iSavepoint)
}
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _1_rc2
}
_11:
_i += 1
goto _7
_10:
- *(*int32)(unsafe.Pointer(&(_db.X76))) -= 1
- *(*int32)(unsafe.Pointer(&(_p.X12))) = i32(0)
- if _rc != i32(0) {
+ _db.XnStatement -= 1
+ _p.XiStatement = int32(0)
+ if _rc != int32(0) {
goto _15
}
- if _eOp == i32(2) {
- _rc = _sqlite3VtabSavepoint(tls, _db, i32(2), _iSavepoint)
+ if _eOp == int32(2) {
+ _rc = _sqlite3VtabSavepoint(tls, _db, int32(2), _iSavepoint)
}
- if _rc == i32(0) {
- _rc = _sqlite3VtabSavepoint(tls, _db, i32(1), _iSavepoint)
+ if _rc == int32(0) {
+ _rc = _sqlite3VtabSavepoint(tls, _db, int32(1), _iSavepoint)
}
_15:
- if _eOp == i32(2) {
- *(*int64)(unsafe.Pointer(&(_db.X77))) = _p.X15
- *(*int64)(unsafe.Pointer(&(_db.X78))) = _p.X16
+ if _eOp == int32(2) {
+ _db.XnDeferredCons = _p.XnStmtDefCons
+ _db.XnDeferredImmCons = _p.XnStmtDefImmCons
}
return _rc
}
@@ -44859,57 +45713,60 @@ _15:
var _vdbeCloseStatementØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeCloseStatementØ00__func__Ø000[0], str(58616), 19)
+ crt.Xstrncpy(nil, &_vdbeCloseStatementØ00__func__Ø000[0], str(58592), 19)
}
-// The second argument to this function, op, is always SAVEPOINT_ROLLBACK
-// or SAVEPOINT_RELEASE. This function either releases or rolls back the
-// savepoint identified by parameter iSavepoint, depending on the value
-// of op.
-//
-// Normally, iSavepoint is greater than or equal to zero. However, if op is
-// SAVEPOINT_ROLLBACK, then iSavepoint may also be -1. In this case the
-// contents of the entire transaction are rolled back. This is different
-// from a normal transaction rollback, as no locks are released and the
-// transaction remains open.
+// C comment
+// /*
+// ** The second argument to this function, op, is always SAVEPOINT_ROLLBACK
+// ** or SAVEPOINT_RELEASE. This function either releases or rolls back the
+// ** savepoint identified by parameter iSavepoint, depending on the value
+// ** of op.
+// **
+// ** Normally, iSavepoint is greater than or equal to zero. However, if op is
+// ** SAVEPOINT_ROLLBACK, then iSavepoint may also be -1. In this case the
+// ** contents of the entire transaction are rolled back. This is different
+// ** from a normal transaction rollback, as no locks are released and the
+// ** transaction remains open.
+// */
func _sqlite3BtreeSavepoint(tls *crt.TLS, _p *XBtree, _op int32, _iSavepoint int32) (r0 int32) {
var _rc int32
var _1_pBt *XBtShared
- _rc = i32(0)
- if _p == nil || int32(_p.X2) != i32(2) {
+ _rc = int32(0)
+ if _p == nil || int32(_p.XinTrans) != int32(2) {
goto _1
}
- _1_pBt = (*XBtShared)(_p.X1)
+ _1_pBt = (*XBtShared)(_p.XpBt)
func() {
- if _op != i32(1) && _op != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63136), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSavepointØ00__func__Ø000))), unsafe.Pointer(str(14924)))
+ if _op != int32(1) && _op != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63136), unsafe.Pointer(&_sqlite3BtreeSavepointØ00__func__Ø000), unsafe.Pointer(str(14879)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iSavepoint < i32(0) && (_iSavepoint != i32(-1) || _op != i32(2)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63137), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSavepointØ00__func__Ø000))), unsafe.Pointer(str(58635)))
+ if _iSavepoint < int32(0) && (_iSavepoint != int32(-1) || _op != int32(2)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63137), unsafe.Pointer(&_sqlite3BtreeSavepointØ00__func__Ø000), unsafe.Pointer(str(58611)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
- if _op == i32(2) {
- _rc = _saveAllCursors(tls, _1_pBt, uint32(i32(0)), nil)
+ if _op == int32(2) {
+ _rc = _saveAllCursors(tls, _1_pBt, 0, nil)
}
- if _rc == i32(0) {
- _rc = _sqlite3PagerSavepoint(tls, (*XPager)(_1_pBt.X0), _op, _iSavepoint)
+ if _rc == int32(0) {
+ _rc = _sqlite3PagerSavepoint(tls, (*XPager)(_1_pBt.XpPager), _op, _iSavepoint)
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _11
}
- if (_iSavepoint < i32(0)) && ((int32(_1_pBt.X10) & i32(8)) != i32(0)) {
- *(*uint32)(unsafe.Pointer(&(_1_pBt.X18))) = uint32(i32(0))
+ if (_iSavepoint < int32(0)) && ((int32(_1_pBt.XbtsFlags) & int32(8)) != int32(0)) {
+ _1_pBt.XnPage = 0
}
_rc = _newDatabase(tls, _1_pBt)
- *(*uint32)(unsafe.Pointer(&(_1_pBt.X18))) = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(28))))))+uintptr(unsafe.Pointer((*XMemPage)(_1_pBt.X3).X19)))))
+ _1_pBt.XnPage = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(int32(28))+uintptr(unsafe.Pointer((*XMemPage)(_1_pBt.XpPage1).XaData)))))
func() {
- if (_1_pBt.X18) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63155), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSavepointØ00__func__Ø000))), unsafe.Pointer(str(58695)))
+ if _1_pBt.XnPage <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63155), unsafe.Pointer(&_sqlite3BtreeSavepointØ00__func__Ø000), unsafe.Pointer(str(58671)))
crt.X__builtin_abort(tls)
}
}()
@@ -44922,81 +45779,87 @@ _1:
var _sqlite3BtreeSavepointØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeSavepointØ00__func__Ø000[0], str(58708), 22)
-}
-
-// Invoke either the xSavepoint, xRollbackTo or xRelease method of all
-// virtual tables that currently have an open transaction. Pass iSavepoint
-// as the second argument to the virtual table method invoked.
-//
-// If op is SAVEPOINT_BEGIN, the xSavepoint method is invoked. If it is
-// SAVEPOINT_ROLLBACK, the xRollbackTo method. Otherwise, if op is
-// SAVEPOINT_RELEASE, then the xRelease method of each virtual table with
-// an open transaction is invoked.
-//
-// If any virtual table method returns an error code other than SQLITE_OK,
-// processing is abandoned and the error returned to the caller of this
-// function immediately. If all calls to virtual table methods are successful,
-// SQLITE_OK is returned.
+ crt.Xstrncpy(nil, &_sqlite3BtreeSavepointØ00__func__Ø000[0], str(58684), 22)
+}
+
+// C comment
+// /*
+// ** Invoke either the xSavepoint, xRollbackTo or xRelease method of all
+// ** virtual tables that currently have an open transaction. Pass iSavepoint
+// ** as the second argument to the virtual table method invoked.
+// **
+// ** If op is SAVEPOINT_BEGIN, the xSavepoint method is invoked. If it is
+// ** SAVEPOINT_ROLLBACK, the xRollbackTo method. Otherwise, if op is
+// ** SAVEPOINT_RELEASE, then the xRelease method of each virtual table with
+// ** an open transaction is invoked.
+// **
+// ** If any virtual table method returns an error code other than SQLITE_OK,
+// ** processing is abandoned and the error returned to the caller of this
+// ** function immediately. If all calls to virtual table methods are successful,
+// ** SQLITE_OK is returned.
+// */
func _sqlite3VtabSavepoint(tls *crt.TLS, _db *Xsqlite3, _op int32, _iSavepoint int32) (r0 int32) {
var _rc, _1_i int32
var _2_pVTab *XVTable
var _2_pMod *Xsqlite3_module
var _3_xMethod func(*crt.TLS, *Xsqlite3_vtab, int32) int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if _op != i32(1) && _op != i32(2) && _op != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125979), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabSavepointØ00__func__Ø000))), unsafe.Pointer(str(58730)))
+ if _op != int32(1) && _op != int32(2) && _op != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125979), unsafe.Pointer(&_sqlite3VtabSavepointØ00__func__Ø000), unsafe.Pointer(str(58706)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iSavepoint < i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125980), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabSavepointØ00__func__Ø000))), unsafe.Pointer(str(58797)))
+ if _iSavepoint < int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125980), unsafe.Pointer(&_sqlite3VtabSavepointØ00__func__Ø000), unsafe.Pointer(str(58773)))
crt.X__builtin_abort(tls)
}
}()
- if (**XVTable)(unsafe.Pointer(_db.X67)) == nil {
+ if _db.XaVTrans == nil {
goto _6
}
- _1_i = i32(0)
+ _1_i = int32(0)
_7:
- if _rc != i32(0) || _1_i >= (_db.X64) {
+ if _rc != int32(0) || _1_i >= _db.XnVTrans {
goto _11
}
- _2_pVTab = *(**XVTable)(unsafe.Pointer(uintptr((unsafe.Pointer)(_db.X67)) + 4*uintptr(_1_i)))
- _2_pMod = (*Xsqlite3_module)((*XModule)(_2_pVTab.X1).X0)
- if (*Xsqlite3_vtab)(_2_pVTab.X2) == nil || (_2_pMod.X0) < i32(2) {
+ _2_pVTab = *elem28((**XVTable)(unsafe.Pointer(_db.XaVTrans)), uintptr(_1_i))
+ _2_pMod = (*Xsqlite3_module)((*XModule)(_2_pVTab.XpMod).XpModule)
+ if _2_pVTab.XpVtab == nil || _2_pMod.XiVersion < int32(2) {
goto _13
}
switch _op {
- case i32(0):
+ case int32(0):
goto _15
- case i32(2):
+ case int32(2):
goto _16
default:
goto _17
}
_15:
- _3_xMethod = *(*func(*crt.TLS, *Xsqlite3_vtab, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{(_2_pMod.X20)}))
- *(*int32)(unsafe.Pointer(&(_2_pVTab.X5))) = _iSavepoint + i32(1)
+ _3_xMethod = func() func(*crt.TLS, *Xsqlite3_vtab, int32) int32 {
+ v := _2_pMod.XxSavepoint
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, int32) int32)(unsafe.Pointer(&v))
+ }()
+ _2_pVTab.XiSavepoint = _iSavepoint + int32(1)
goto _18
_16:
- _3_xMethod = *(*func(*crt.TLS, *Xsqlite3_vtab, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{(_2_pMod.X22)}))
+ _3_xMethod = func() func(*crt.TLS, *Xsqlite3_vtab, int32) int32 {
+ v := _2_pMod.XxRollbackTo
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, int32) int32)(unsafe.Pointer(&v))
+ }()
goto _18
_17:
- _3_xMethod = *(*func(*crt.TLS, *Xsqlite3_vtab, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{(_2_pMod.X21)}))
+ _3_xMethod = func() func(*crt.TLS, *Xsqlite3_vtab, int32) int32 {
+ v := _2_pMod.XxRelease
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, int32) int32)(unsafe.Pointer(&v))
+ }()
goto _18
_18:
- if (_3_xMethod != nil) && ((_2_pVTab.X5) > _iSavepoint) {
- _rc = _3_xMethod(tls, (*Xsqlite3_vtab)(_2_pVTab.X2), _iSavepoint)
+ if (_3_xMethod != nil) && (_2_pVTab.XiSavepoint > _iSavepoint) {
+ _rc = _3_xMethod(tls, (*Xsqlite3_vtab)(_2_pVTab.XpVtab), _iSavepoint)
}
_13:
_1_i += 1
@@ -45009,55 +45872,57 @@ _6:
var _sqlite3VtabSavepointØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabSavepointØ00__func__Ø000[0], str(58812), 21)
+ crt.Xstrncpy(nil, &_sqlite3VtabSavepointØ00__func__Ø000[0], str(58788), 21)
}
-// This routine sets the value to be returned by subsequent calls to
-// sqlite3_changes() on the database handle 'db'.
+// C comment
+// /*
+// ** This routine sets the value to be returned by subsequent calls to
+// ** sqlite3_changes() on the database handle 'db'.
+// */
func _sqlite3VdbeSetChanges(tls *crt.TLS, _db *Xsqlite3, _nChange int32) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75914), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetChangesØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75914), unsafe.Pointer(&_sqlite3VdbeSetChangesØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_db.X29))) = _nChange
- {
- p := (*int32)(unsafe.Pointer(&(_db.X30)))
- *p = (*p) + _nChange
- sink1(*p)
- }
+ _db.XnChange = _nChange
+ _db.XnTotalChange += _nChange
}
var _sqlite3VdbeSetChangesØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSetChangesØ00__func__Ø000[0], str(58833), 22)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSetChangesØ00__func__Ø000[0], str(58809), 22)
}
-// Copy the error code and error message belonging to the VDBE passed
-// as the first argument to its database handle (so that they will be
-// returned by calls to sqlite3_errcode() and sqlite3_errmsg()).
-//
-// This function does not clear the VDBE error code or message, just
-// copies them to the database handle.
+// C comment
+// /*
+// ** Copy the error code and error message belonging to the VDBE passed
+// ** as the first argument to its database handle (so that they will be
+// ** returned by calls to sqlite3_errcode() and sqlite3_errmsg()).
+// **
+// ** This function does not clear the VDBE error code or message, just
+// ** copies them to the database handle.
+// */
func _sqlite3VdbeTransferError(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _rc int32
var _db *Xsqlite3
- _db = (*Xsqlite3)(_p.X0)
- _rc = _p.X10
- if (_p.X22) == nil {
+ _db = (*Xsqlite3)(_p.Xdb)
+ _rc = _p.Xrc
+ if _p.XzErrMsg == nil {
goto _0
}
- *(*uint8)(unsafe.Pointer(&(_db.X18))) += 1
+ _db.XbBenignMalloc += 1
_sqlite3BeginBenignMalloc(tls)
- if (*XMem)(_db.X56) == nil {
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X56))))) = _sqlite3ValueNew(tls, _db)
+ if (*XMem)(_db.XpErr) == nil {
+ *(**XMem)(unsafe.Pointer(&_db.XpErr)) = _sqlite3ValueNew(tls, _db)
}
- _sqlite3ValueSetStr(tls, (*XMem)(_db.X56), i32(-1), (unsafe.Pointer)(_p.X22), uint8(i32(1)), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ _sqlite3ValueSetStr(tls, (*XMem)(_db.XpErr), int32(-1), unsafe.Pointer(_p.XzErrMsg), uint8(1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
_sqlite3EndBenignMalloc(tls)
- *(*uint8)(unsafe.Pointer(&(_db.X18))) -= 1
- *(*int32)(unsafe.Pointer(&(_db.X10))) = _rc
+ _db.XbBenignMalloc -= 1
+ _db.XerrCode = _rc
goto _2
_0:
_sqlite3Error(tls, _db, _rc)
@@ -45065,39 +45930,42 @@ _2:
return _rc
}
-// Clean up the VM after a single run.
+// C comment
+// /*
+// ** Clean up the VM after a single run.
+// */
func _Cleanup(tls *crt.TLS, _p *TVdbe) {
var _i int32
var _db *Xsqlite3
- _db = (*Xsqlite3)(_p.X0)
- if (**XVdbeCursor)(unsafe.Pointer(_p.X23)) == nil {
+ _db = (*Xsqlite3)(_p.Xdb)
+ if _p.XapCsr == nil {
goto _4
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_p.X7) {
+ if _i >= _p.XnCursor {
goto _4
}
func() {
- if (*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_i)))) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73565), unsafe.Pointer((*int8)(unsafe.Pointer(&_CleanupØ00__func__Ø000))), unsafe.Pointer(str(58855)))
+ if (*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_i))) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73565), unsafe.Pointer(&_CleanupØ00__func__Ø000), unsafe.Pointer(str(58831)))
crt.X__builtin_abort(tls)
}
}()
_i += 1
goto _1
_4:
- if (*XMem)(_p.X18) == nil {
+ if _p.XaMem == nil {
goto _7
}
- _i = i32(0)
+ _i = int32(0)
_8:
- if _i >= (_p.X6) {
+ if _i >= _p.XnMem {
goto _11
}
func() {
- if int32((*XMem)(unsafe.Pointer(uintptr(_p.X18)+48*uintptr(_i))).X1) != i32(128) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73567), unsafe.Pointer((*int8)(unsafe.Pointer(&_CleanupØ00__func__Ø000))), unsafe.Pointer(str(58870)))
+ if int32(elem25((*XMem)(_p.XaMem), uintptr(_i)).Xflags) != int32(128) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73567), unsafe.Pointer(&_CleanupØ00__func__Ø000), unsafe.Pointer(str(58846)))
crt.X__builtin_abort(tls)
}
}()
@@ -45105,192 +45973,203 @@ _8:
goto _8
_11:
_7:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X22))
- *(**int8)(unsafe.Pointer(&(_p.X22))) = nil
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X21))))) = nil
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XzErrMsg))
+ _p.XzErrMsg = nil
+ *(**XMem)(unsafe.Pointer(&_p.XpResultSet)) = nil
}
var _CleanupØ00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_CleanupØ00__func__Ø000[0], str(58902), 8)
+ crt.Xstrncpy(nil, &_CleanupØ00__func__Ø000[0], str(58878), 8)
}
var _sqlite3VdbeFinalizeØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeFinalizeØ00__func__Ø000[0], str(58910), 20)
+ crt.Xstrncpy(nil, &_sqlite3VdbeFinalizeØ00__func__Ø000[0], str(58886), 20)
}
-// Delete an entire VDBE.
+// C comment
+// /*
+// ** Delete an entire VDBE.
+// */
func _sqlite3VdbeDelete(tls *crt.TLS, _p *TVdbe) {
var _db *Xsqlite3
if func() int32 {
if _p == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74449), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeDeleteØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74449), unsafe.Pointer(&_sqlite3VdbeDeleteØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
- _db = (*Xsqlite3)(_p.X0)
+ _db = (*Xsqlite3)(_p.Xdb)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74451), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeDeleteØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74451), unsafe.Pointer(&_sqlite3VdbeDeleteØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeClearObject(tls, _db, _p)
- if (*TVdbe)(_p.X1) != nil {
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TVdbe)(_p.X1).X2))))) = (*TVdbe)(_p.X2)
+ if _p.XpPrev != nil {
+ *(**TVdbe)(unsafe.Pointer(&((*TVdbe)(_p.XpPrev).XpNext))) = (*TVdbe)(_p.XpNext)
goto _6
}
func() {
- if (*TVdbe)(_db.X1) != _p {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74456), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeDeleteØ00__func__Ø000))), unsafe.Pointer(str(58930)))
+ if (*TVdbe)(_db.XpVdbe) != _p {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74456), unsafe.Pointer(&_sqlite3VdbeDeleteØ00__func__Ø000), unsafe.Pointer(str(58906)))
crt.X__builtin_abort(tls)
}
}()
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X1))))) = (*TVdbe)(_p.X2)
+ *(**TVdbe)(unsafe.Pointer(&_db.XpVdbe)) = (*TVdbe)(_p.XpNext)
_6:
- if (*TVdbe)(_p.X2) != nil {
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TVdbe)(_p.X2).X1))))) = (*TVdbe)(_p.X1)
+ if _p.XpNext != nil {
+ *(**TVdbe)(unsafe.Pointer(&((*TVdbe)(_p.XpNext).XpPrev))) = (*TVdbe)(_p.XpPrev)
}
- *(*uint32)(unsafe.Pointer(&(_p.X5))) = uint32(i32(1443283912))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = nil
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_p))
+ _p.Xmagic = uint32(1443283912)
+ *(**Xsqlite3)(unsafe.Pointer(&_p.Xdb)) = nil
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_p))
}
var _sqlite3VdbeDeleteØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeDeleteØ00__func__Ø000[0], str(58943), 18)
+ crt.Xstrncpy(nil, &_sqlite3VdbeDeleteØ00__func__Ø000[0], str(58919), 18)
}
-// Free all memory associated with the Vdbe passed as the second argument,
-// except for object itself, which is preserved.
-//
-// The difference between this function and sqlite3VdbeDelete() is that
-// VdbeDelete() also unlinks the Vdbe from the list of VMs associated with
-// the database connection and frees the object itself.
+// C comment
+// /*
+// ** Free all memory associated with the Vdbe passed as the second argument,
+// ** except for object itself, which is preserved.
+// **
+// ** The difference between this function and sqlite3VdbeDelete() is that
+// ** VdbeDelete() also unlinks the Vdbe from the list of VMs associated with
+// ** the database connection and frees the object itself.
+// */
func _sqlite3VdbeClearObject(tls *crt.TLS, _db *Xsqlite3, _p *TVdbe) {
var _pSub, _pNext *XSubProgram
func() {
- if (*Xsqlite3)(_p.X0) != nil && (*Xsqlite3)(_p.X0) != _db {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74417), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeClearObjectØ00__func__Ø000))), unsafe.Pointer(str(58961)))
+ if (*Xsqlite3)(_p.Xdb) != nil && (*Xsqlite3)(_p.Xdb) != _db {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74417), unsafe.Pointer(&_sqlite3VdbeClearObjectØ00__func__Ø000), unsafe.Pointer(str(58937)))
crt.X__builtin_abort(tls)
}
}()
- _releaseMemArray(tls, (*XMem)(_p.X20), int32(_p.X29)*i32(2))
- _pSub = (*XSubProgram)(_p.X42)
+ _releaseMemArray(tls, (*XMem)(_p.XaColName), int32(_p.XnResColumn)*int32(2))
+ _pSub = (*XSubProgram)(_p.XpProgram)
_3:
if _pSub == nil {
goto _6
}
- _pNext = (*XSubProgram)(_pSub.X6)
- _vdbeFreeOpArray(tls, _db, (*XVdbeOp)(_pSub.X0), _pSub.X1)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pSub))
+ _pNext = (*XSubProgram)(_pSub.XpNext)
+ _vdbeFreeOpArray(tls, _db, (*XVdbeOp)(_pSub.XaOp), _pSub.XnOp)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pSub))
_pSub = _pNext
goto _3
_6:
- if (_p.X5) != uint32(i32(381479589)) {
- _releaseMemArray(tls, (*XMem)(_p.X24), int32(_p.X4))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X25))
- _sqlite3DbFree(tls, _db, _p.X37)
+ if _p.Xmagic != uint32(381479589) {
+ _releaseMemArray(tls, (*XMem)(_p.XaVar), int32(_p.XnVar))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XpVList))
+ _sqlite3DbFree(tls, _db, _p.XpFree)
}
- _vdbeFreeOpArray(tls, _db, (*XVdbeOp)(_p.X17), _p.X27)
- _sqlite3DbFree(tls, _db, _p.X20)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X36))
+ _vdbeFreeOpArray(tls, _db, (*XVdbeOp)(_p.XaOp), _p.XnOp)
+ _sqlite3DbFree(tls, _db, _p.XaColName)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XzSql))
}
var _sqlite3VdbeClearObjectØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeClearObjectØ00__func__Ø000[0], str(58983), 23)
+ crt.Xstrncpy(nil, &_sqlite3VdbeClearObjectØ00__func__Ø000[0], str(58959), 23)
}
-// Free the space allocated for aOp and any p4 values allocated for the
-// opcodes contained within. If aOp is not NULL it is assumed to contain
-// nOp entries.
+// C comment
+// /*
+// ** Free the space allocated for aOp and any p4 values allocated for the
+// ** opcodes contained within. If aOp is not NULL it is assumed to contain
+// ** nOp entries.
+// */
func _vdbeFreeOpArray(tls *crt.TLS, _db *Xsqlite3, _aOp *XVdbeOp, _nOp int32) {
var _1_pOp *XVdbeOp
if _aOp == nil {
goto _0
}
- _1_pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr(_nOp-i32(1))))
+ _1_pOp = elem61(_aOp, uintptr(_nOp-int32(1)))
_1:
- if uintptr(unsafe.Pointer(_1_pOp)) < uintptr(unsafe.Pointer(_aOp)) {
+ if crt.P2U(unsafe.Pointer(_1_pOp)) < crt.P2U(unsafe.Pointer(_aOp)) {
goto _4
}
- if (_1_pOp.X1) != 0 {
- _freeP4(tls, _db, int32(_1_pOp.X1), *(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_1_pOp.X6))))))
+ if _1_pOp.Xp4type != 0 {
+ _freeP4(tls, _db, int32(_1_pOp.Xp4type), *(*unsafe.Pointer)(unsafe.Pointer(&_1_pOp.Xp4)))
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_pOp.X7))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_pOp.XzComment))
*(*uintptr)(unsafe.Pointer(&_1_pOp)) += uintptr(4294967272)
goto _1
_4:
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_aOp))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_aOp))
_0:
}
-// Free all memory allocations in the pParse object
+// C comment
+// /*
+// ** Free all memory allocations in the pParse object
+// */
func _sqlite3ParserReset(tls *crt.TLS, _pParse *XParse) {
var _1_db *Xsqlite3
if _pParse == nil {
goto _0
}
- _1_db = (*Xsqlite3)(_pParse.X0)
- _sqlite3DbFree(tls, _1_db, (unsafe.Pointer)(_pParse.X26))
- _sqlite3ExprListDelete(tls, _1_db, (*XExprList)(_pParse.X27))
+ _1_db = (*Xsqlite3)(_pParse.Xdb)
+ _sqlite3DbFree(tls, _1_db, unsafe.Pointer(_pParse.XaLabel))
+ _sqlite3ExprListDelete(tls, _1_db, (*XExprList)(_pParse.XpConstExpr))
if _1_db != nil {
func() {
- if ((*t7)(unsafe.Pointer(&(_1_db.X58))).X0) < uint32(_pParse.X12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116168), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ParserResetØ00__func__Ø000))), unsafe.Pointer(str(59006)))
+ if (_1_db.Xlookaside.XbDisable) < uint32(_pParse.XdisableLookaside) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116168), unsafe.Pointer(&_sqlite3ParserResetØ00__func__Ø000), unsafe.Pointer(str(58982)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_1_db.X58))).X0)))
- *p = (*p) - uint32(_pParse.X12)
- sink5(*p)
- }
+ _1_db.Xlookaside.XbDisable -= uint32(_pParse.XdisableLookaside)
}
- *(*uint8)(unsafe.Pointer(&(_pParse.X12))) = uint8(i32(0))
+ _pParse.XdisableLookaside = 0
_0:
}
var _sqlite3ParserResetØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ParserResetØ00__func__Ø000[0], str(59057), 19)
+ crt.Xstrncpy(nil, &_sqlite3ParserResetØ00__func__Ø000[0], str(59033), 19)
}
-// The following routine destroys a virtual machine that is created by
-// the sqlite3_compile() routine. The integer returned is an SQLITE_
-// success/failure code that describes the result of executing the virtual
-// machine.
-//
-// This routine sets the error code and string returned by
-// sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
+// C comment
+// /*
+// ** The following routine destroys a virtual machine that is created by
+// ** the sqlite3_compile() routine. The integer returned is an SQLITE_
+// ** success/failure code that describes the result of executing the virtual
+// ** machine.
+// **
+// ** This routine sets the error code and string returned by
+// ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
+// */
func Xsqlite3_finalize(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
var _rc int32
var _2_db *Xsqlite3
var _2_v *TVdbe
if _pStmt == nil {
- _rc = i32(0)
+ _rc = int32(0)
goto _1
}
_2_v = (*TVdbe)(_pStmt)
- _2_db = (*Xsqlite3)(_2_v.X0)
+ _2_db = (*Xsqlite3)(_2_v.Xdb)
if _vdbeSafety(tls, _2_v) != 0 {
- return _sqlite3MisuseError(tls, i32(76202))
+ return _sqlite3MisuseError(tls, int32(76202))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_2_db.X3))
- if (_2_v.X26) > int64(i32(0)) {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_2_db.Xmutex))
+ if _2_v.XstartTime > (0) {
_invokeProfileCallback(tls, _2_db, _2_v)
}
_rc = _sqlite3VdbeFinalize(tls, _2_v)
@@ -45300,129 +46179,130 @@ _1:
return _rc
}
-// Invoke the profile callback. This routine is only called if we already
-// know that the profile callback is defined and needs to be invoked.
+// C comment
+// /*
+// ** Invoke the profile callback. This routine is only called if we already
+// ** know that the profile callback is defined and needs to be invoked.
+// */
func _invokeProfileCallback(tls *crt.TLS, _db *Xsqlite3, _p *TVdbe) {
var _iNow, _iElapse int64
func() {
- if (_p.X26) <= int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76160), unsafe.Pointer((*int8)(unsafe.Pointer(&_invokeProfileCallbackØ00__func__Ø000))), unsafe.Pointer(str(59076)))
+ if _p.XstartTime <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76160), unsafe.Pointer(&_invokeProfileCallbackØ00__func__Ø000), unsafe.Pointer(str(59052)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, uint64)
- }{(_db.X43)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, uint64)
- }{nil})) && (int32(_db.X24)&i32(2)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76161), unsafe.Pointer((*int8)(unsafe.Pointer(&_invokeProfileCallbackØ00__func__Ø000))), unsafe.Pointer(str(59091)))
+ if _db.XxProfile == nil && (int32(_db.XmTrace)&int32(2)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76161), unsafe.Pointer(&_invokeProfileCallbackØ00__func__Ø000), unsafe.Pointer(str(59067)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76162), unsafe.Pointer((*int8)(unsafe.Pointer(&_invokeProfileCallbackØ00__func__Ø000))), unsafe.Pointer(str(49896)))
+ if int32(_db.Xinit.Xbusy) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76162), unsafe.Pointer(&_invokeProfileCallbackØ00__func__Ø000), unsafe.Pointer(str(49851)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X36) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76163), unsafe.Pointer((*int8)(unsafe.Pointer(&_invokeProfileCallbackØ00__func__Ø000))), unsafe.Pointer(str(59149)))
+ if _p.XzSql == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76163), unsafe.Pointer(&_invokeProfileCallbackØ00__func__Ø000), unsafe.Pointer(str(59125)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3OsCurrentTimeInt64(tls, (*Xsqlite3_vfs)(_db.X0), &_iNow)
- _iElapse = (_iNow - (_p.X26)) * int64(i32(1000000))
- if (_db.X43) != nil {
- (_db.X43)(tls, _db.X44, _p.X36, uint64(_iElapse))
+ _sqlite3OsCurrentTimeInt64(tls, (*Xsqlite3_vfs)(_db.XpVfs), &_iNow)
+ _iElapse = (_iNow - _p.XstartTime) * int64(1000000)
+ if _db.XxProfile != nil {
+ _db.XxProfile(tls, _db.XpProfileArg, _p.XzSql, uint64(_iElapse))
}
- if (int32(_db.X24) & i32(2)) != 0 {
- (_db.X41)(tls, uint32(i32(2)), _db.X42, (unsafe.Pointer)(_p), (unsafe.Pointer)(&_iElapse))
+ if (int32(_db.XmTrace) & int32(2)) != 0 {
+ _db.XxTrace(tls, uint32(2), _db.XpTraceArg, unsafe.Pointer(_p), unsafe.Pointer(&_iElapse))
}
- *(*int64)(unsafe.Pointer(&(_p.X26))) = int64(i32(0))
+ _p.XstartTime = 0
}
var _invokeProfileCallbackØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_invokeProfileCallbackØ00__func__Ø000[0], str(59160), 22)
+ crt.Xstrncpy(nil, &_invokeProfileCallbackØ00__func__Ø000[0], str(59136), 22)
}
var _sqlite3LockAndPrepareØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3LockAndPrepareØ00__func__Ø000[0], str(59182), 22)
+ crt.Xstrncpy(nil, &_sqlite3LockAndPrepareØ00__func__Ø000[0], str(59158), 22)
}
var _sqlite3_prepareØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_prepareØ00__func__Ø000[0], str(59204), 16)
+ crt.Xstrncpy(nil, &_sqlite3_prepareØ00__func__Ø000[0], str(59180), 16)
}
-// Return UTF-8 encoded English language explanation of the most recent
-// error.
+// C comment
+// /*
+// ** Return UTF-8 encoded English language explanation of the most recent
+// ** error.
+// */
func Xsqlite3_errmsg(tls *crt.TLS, _db *Xsqlite3) (r0 *int8) {
var _z *int8
if _db == nil {
- return _sqlite3ErrStr(tls, _sqlite3NomemError(tls, i32(142705)))
+ return _sqlite3ErrStr(tls, _sqlite3NomemError(tls, int32(142705)))
}
if _sqlite3SafetyCheckSickOrOk(tls, _db) == 0 {
- return _sqlite3ErrStr(tls, _sqlite3MisuseError(tls, i32(142708)))
+ return _sqlite3ErrStr(tls, _sqlite3MisuseError(tls, int32(142708)))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- if (_db.X17) != 0 {
- _z = _sqlite3ErrStr(tls, _sqlite3NomemError(tls, i32(142712)))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ if _db.XmallocFailed != 0 {
+ _z = _sqlite3ErrStr(tls, _sqlite3NomemError(tls, int32(142712)))
goto _3
}
- _z = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, (*XMem)(_db.X56))))
+ _z = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, (*XMem)(_db.XpErr))))
func() {
- if (_db.X17) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142716), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_errmsgØ00__func__Ø000))), unsafe.Pointer(str(23869)))
+ if _db.XmallocFailed != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142716), unsafe.Pointer(&_sqlite3_errmsgØ00__func__Ø000), unsafe.Pointer(str(23824)))
crt.X__builtin_abort(tls)
}
}()
if _z == nil {
- _z = _sqlite3ErrStr(tls, _db.X10)
+ _z = _sqlite3ErrStr(tls, _db.XerrCode)
}
_3:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _z
}
-// Return a static string that describes the kind of error specified in the
-// argument.
+// C comment
+// /*
+// ** Return a static string that describes the kind of error specified in the
+// ** argument.
+// */
func _sqlite3ErrStr(tls *crt.TLS, _rc int32) (r0 *int8) {
var _zErr *int8
- _zErr = str(59220)
+ _zErr = str(59196)
switch _rc {
- case i32(516):
+ case int32(516):
goto _1
default:
goto _2
}
_1:
- _zErr = str(59234)
+ _zErr = str(59210)
goto _3
_2:
- {
- p := &_rc
- *p = (*p) & i32(255)
- sink1(*p)
- }
+ _rc &= int32(255)
if (func() int32 {
- if _rc >= i32(0) {
- return i32(1)
+ if _rc >= int32(0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(141905), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ErrStrØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(141905), unsafe.Pointer(&_sqlite3ErrStrØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() != 0 && (_rc < i32(27))) && ((*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3ErrStrØ00aMsgØ001)) + 4*uintptr(_rc)))) != nil) {
- _zErr = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3ErrStrØ00aMsgØ001)) + 4*uintptr(_rc)))
+ }() != 0 && (_rc < int32(27))) && ((*elem0((**int8)(unsafe.Pointer(&_sqlite3ErrStrØ00aMsgØ001)), uintptr(_rc))) != nil) {
+ _zErr = *elem0((**int8)(unsafe.Pointer(&_sqlite3ErrStrØ00aMsgØ001)), uintptr(_rc))
}
goto _3
_3:
@@ -45432,31 +46312,34 @@ _3:
var _sqlite3ErrStrØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ErrStrØ00__func__Ø000[0], str(59256), 14)
+ crt.Xstrncpy(nil, &_sqlite3ErrStrØ00__func__Ø000[0], str(59232), 14)
}
var _sqlite3ErrStrØ00aMsgØ001 [27]*int8
func init() {
- _sqlite3ErrStrØ00aMsgØ001 = [27]*int8{str(59270), str(59283), nil, str(59319), str(59344), str(59375), str(59394), str(59419), str(59433), str(59470), str(59482), str(59497), str(59530), str(59548), str(59573), str(59602), str(59619), str(59642), str(6810), str(59670), str(59688), str(59706), str(59745), str(59776), str(59797), str(59829), str(59863)}
+ _sqlite3ErrStrØ00aMsgØ001 = [27]*int8{str(59246), str(59259), nil, str(59295), str(59320), str(59351), str(59370), str(59395), str(59409), str(59446), str(59458), str(59473), str(59506), str(59524), str(59549), str(59578), str(59595), str(59618), str(6711), str(59646), str(59664), str(59682), str(59721), str(59752), str(59773), str(59805), str(59839)}
}
var _sqlite3_errmsgØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_errmsgØ00__func__Ø000[0], str(59902), 15)
+ crt.Xstrncpy(nil, &_sqlite3_errmsgØ00__func__Ø000[0], str(59878), 15)
}
-// Locate the in-memory structure that describes
-// a particular index given the name of that index
-// and the name of the database that contains the index.
-// Return NULL if not found.
-//
-// If zDatabase is 0, all databases are searched for the
-// table and the first matching index is returned. (No checking
-// for duplicate index names is done.) The search order is
-// TEMP first, then MAIN, then any auxiliary databases added
-// using the ATTACH command.
+// C comment
+// /*
+// ** Locate the in-memory structure that describes
+// ** a particular index given the name of that index
+// ** and the name of the database that contains the index.
+// ** Return NULL if not found.
+// **
+// ** If zDatabase is 0, all databases are searched for the
+// ** table and the first matching index is returned. (No checking
+// ** for duplicate index names is done.) The search order is
+// ** TEMP first, then MAIN, then any auxiliary databases added
+// ** using the ATTACH command.
+// */
func _sqlite3FindIndex(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _zDb *int8) (r0 *XIndex) {
var _i, _1_j int32
var _1_pSchema *XSchema
@@ -45464,38 +46347,38 @@ func _sqlite3FindIndex(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _zDb *int8) (r
_p = nil
func() {
if _zDb == nil && _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100120), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindIndexØ00__func__Ø000))), unsafe.Pointer(str(59917)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100120), unsafe.Pointer(&_sqlite3FindIndexØ00__func__Ø000), unsafe.Pointer(str(59893)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_3:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _6
}
_1_j = func() int32 {
- if _i < i32(2) {
- return (_i ^ i32(1))
+ if _i < int32(2) {
+ return (_i ^ int32(1))
}
return _i
}()
- _1_pSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_1_j))).X4)
+ _1_pSchema = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_1_j)).XpSchema)
func() {
if _1_pSchema == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100124), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindIndexØ00__func__Ø000))), unsafe.Pointer(str(59959)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100124), unsafe.Pointer(&_sqlite3FindIndexØ00__func__Ø000), unsafe.Pointer(str(59935)))
crt.X__builtin_abort(tls)
}
}()
- if (_zDb != nil) && _sqlite3StrICmp(tls, _zDb, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_1_j))).X0) != 0 {
+ if (_zDb != nil) && _sqlite3StrICmp(tls, _zDb, elem27((*XDb)(_db.XaDb), uintptr(_1_j)).XzDbSName) != 0 {
goto _4
}
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _1_j, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100126), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindIndexØ00__func__Ø000))), unsafe.Pointer(str(59967)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100126), unsafe.Pointer(&_sqlite3FindIndexØ00__func__Ø000), unsafe.Pointer(str(59943)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*XIndex)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&(_1_pSchema.X3))), _zName))
+ _p = (*XIndex)(_sqlite3HashFind(tls, &_1_pSchema.XidxHash, _zName))
if _p != nil {
goto _6
}
@@ -45509,1203 +46392,240 @@ _6:
var _sqlite3FindIndexØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FindIndexØ00__func__Ø000[0], str(60000), 17)
+ crt.Xstrncpy(nil, &_sqlite3FindIndexØ00__func__Ø000[0], str(59976), 17)
}
-// Free any prior content in *pz and replace it with a copy of zNew.
+// C comment
+// /*
+// ** Free any prior content in *pz and replace it with a copy of zNew.
+// */
func _sqlite3SetString(tls *crt.TLS, _pz **int8, _db *Xsqlite3, _zNew *int8) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(*_pz))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(*_pz))
*_pz = _sqlite3DbStrDup(tls, _db, _zNew)
}
-// Change the "soft" limit on the number of pages in the cache.
-// Unused and unmodified pages will be recycled when the number of
-// pages in the cache exceeds this soft limit. But the size of the
-// cache is allowed to grow larger than this limit if it contains
-// dirty pages or pages still in active use.
+// C comment
+// /*
+// ** Change the "soft" limit on the number of pages in the cache.
+// ** Unused and unmodified pages will be recycled when the number of
+// ** pages in the cache exceeds this soft limit. But the size of the
+// ** cache is allowed to grow larger than this limit if it contains
+// ** dirty pages or pages still in active use.
+// */
func _sqlite3BtreeSetCacheSize(tls *crt.TLS, _p *XBtree, _mxPage int32) (r0 int32) {
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61662), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSetCacheSizeØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61662), unsafe.Pointer(&_sqlite3BtreeSetCacheSizeØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
- _sqlite3PagerSetCachesize(tls, (*XPager)(_pBt.X0), _mxPage)
+ _sqlite3PagerSetCachesize(tls, (*XPager)(_pBt.XpPager), _mxPage)
_sqlite3BtreeLeave(tls, _p)
- return i32(0)
+ return int32(0)
}
var _sqlite3BtreeSetCacheSizeØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeSetCacheSizeØ00__func__Ø000[0], str(60017), 25)
+ crt.Xstrncpy(nil, &_sqlite3BtreeSetCacheSizeØ00__func__Ø000[0], str(59993), 25)
}
-// Change the maximum number of in-memory pages that are allowed
-// before attempting to recycle clean and unused pages.
+// C comment
+// /*
+// ** Change the maximum number of in-memory pages that are allowed
+// ** before attempting to recycle clean and unused pages.
+// */
func _sqlite3PagerSetCachesize(tls *crt.TLS, _pPager *XPager, _mxPage int32) {
- _sqlite3PcacheSetCachesize(tls, (*XPCache)(_pPager.X59), _mxPage)
+ _sqlite3PcacheSetCachesize(tls, (*XPCache)(_pPager.XpPCache), _mxPage)
}
-// Set the suggested cache-size value.
+// C comment
+// /*
+// ** Set the suggested cache-size value.
+// */
func _sqlite3PcacheSetCachesize(tls *crt.TLS, _pCache *XPCache, _mxPage int32) {
func() {
- if (_pCache.X12) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44939), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheSetCachesizeØ00__func__Ø000))), unsafe.Pointer(str(15958)))
+ if _pCache.XpCache == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44939), unsafe.Pointer(&_sqlite3PcacheSetCachesizeØ00__func__Ø000), unsafe.Pointer(str(15913)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pCache.X4))) = _mxPage
- ((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X5)(tls, _pCache.X12, _numberOfCachePages(tls, _pCache))
+ _pCache.XszCache = _mxPage
+ (_sqlite3Config.Xpcache2.XxCachesize)(tls, _pCache.XpCache, _numberOfCachePages(tls, _pCache))
}
var _sqlite3PcacheSetCachesizeØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheSetCachesizeØ00__func__Ø000[0], str(60042), 26)
-}
-
-// Load the content of the sqlite_stat1 and sqlite_stat3/4 tables. The
-// contents of sqlite_stat1 are used to populate the Index.aiRowEst[]
-// arrays. The contents of sqlite_stat3/4 are used to populate the
-// Index.aSample[] arrays.
-//
-// If the sqlite_stat1 table is not present in the database, SQLITE_ERROR
-// is returned. In this case, even if SQLITE_ENABLE_STAT3/4 was defined
-// during compilation and the sqlite_stat3/4 table is present, no data is
-// read from it.
-//
-// If SQLITE_ENABLE_STAT3/4 was defined during compilation and the
-// sqlite_stat4 table is not present in the database, SQLITE_ERROR is
-// returned. However, in this case, data is read from the sqlite_stat1
-// table (if it is present) before returning.
-//
-// If an OOM error occurs, this function always sets db->mallocFailed.
-// This means if the caller does not care about other errors, the return
-// code may be ignored.
-func _sqlite3AnalysisLoad(tls *crt.TLS, _db *Xsqlite3, _iDb int32) (r0 int32) {
- var _rc int32
- var _zSql *int8
- var _pSchema *XSchema
- var _i *XHashElem
- var _1_pTab *XTable
- var _2_pIdx, _6_pIdx *XIndex
- var _sInfo XanalysisInfo
- _rc = i32(0)
- _pSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4)
- func() {
- if _iDb < i32(0) || _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98771), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AnalysisLoadØ00__func__Ø000))), unsafe.Pointer(str(21738)))
- crt.X__builtin_abort(tls)
- }
- }()
- func() {
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98772), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AnalysisLoadØ00__func__Ø000))), unsafe.Pointer(str(60068)))
- crt.X__builtin_abort(tls)
- }
- }()
- func() {
- if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98775), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AnalysisLoadØ00__func__Ø000))), unsafe.Pointer(str(51150)))
- crt.X__builtin_abort(tls)
- }
- }()
- _i = (*XHashElem)((*XHash)(unsafe.Pointer(&(_pSchema.X2))).X2)
-_7:
- if _i == nil {
- goto _10
- }
- _1_pTab = (*XTable)(_i.X2)
- {
- p := (*uint32)(unsafe.Pointer(&(_1_pTab.X9)))
- *p = (*p) & uint32(i32(-17))
- sink5(*p)
- }
- _i = (*XHashElem)(_i.X0)
- goto _7
-_10:
- _i = (*XHashElem)((*XHash)(unsafe.Pointer(&(_pSchema.X3))).X2)
-_11:
- if _i == nil {
- goto _14
- }
- _2_pIdx = (*XIndex)(_i.X2)
- storebits3((*int8)(unsafe.Pointer(&(_2_pIdx.X16))), int8(i32(0)), 128, 7)
- _i = (*XHashElem)(_i.X0)
- goto _11
-_14:
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sInfo.X0))))) = _db
- *(**int8)(unsafe.Pointer(&(_sInfo.X1))) = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- if _sqlite3FindTable(tls, _db, str(60088), _sInfo.X1) == nil {
- goto _15
- }
- _zSql = _sqlite3MPrintf(tls, _db, str(60101), unsafe.Pointer(_sInfo.X1))
- if _zSql == nil {
- _rc = _sqlite3NomemError(tls, i32(98796))
- goto _17
- }
- _rc = Xsqlite3_exec(tls, _db, _zSql, _analysisLoader, (unsafe.Pointer)(&_sInfo), nil)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zSql))
-_17:
-_15:
- func() {
- if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98804), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AnalysisLoadØ00__func__Ø000))), unsafe.Pointer(str(51150)))
- crt.X__builtin_abort(tls)
- }
- }()
- _i = (*XHashElem)((*XHash)(unsafe.Pointer(&(_pSchema.X3))).X2)
-_20:
- if _i == nil {
- goto _23
- }
- _6_pIdx = (*XIndex)(_i.X2)
- if ((uint32((_6_pIdx.X16)>>uint(i32(7))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- _sqlite3DefaultRowEst(tls, _6_pIdx)
- }
- _i = (*XHashElem)(_i.X0)
- goto _20
-_23:
- if _rc == i32(7) {
- _sqlite3OomFault(tls, _db)
- }
- return _rc
-
- _ = _sInfo
- panic(0)
+ crt.Xstrncpy(nil, &_sqlite3PcacheSetCachesizeØ00__func__Ø000[0], str(60018), 26)
}
-var _sqlite3AnalysisLoadØ00__func__Ø000 [20]int8
-
-func init() {
- crt.Xstrncpy(nil, &_sqlite3AnalysisLoadØ00__func__Ø000[0], str(60142), 20)
-}
-
-// Locate the in-memory structure that describes a particular database
-// table given the name of that table and (optionally) the name of the
-// database containing the table. Return NULL if not found.
-//
-// If zDatabase is 0, all databases are searched for the table and the
-// first matching table is returned. (No checking for duplicate table
-// names is done.) The search order is TEMP first, then MAIN, then any
-// auxiliary databases added using the ATTACH command.
-//
-// See also sqlite3LocateTable().
-func _sqlite3FindTable(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _zDatabase *int8) (r0 *XTable) {
- var _i, _2_j int32
- var _p *XTable
- _p = nil
- func() {
- if _zDatabase == nil && _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99999), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindTableØ00__func__Ø000))), unsafe.Pointer(str(60162)))
- crt.X__builtin_abort(tls)
- }
- }()
-_3:
- _i = i32(0)
-_5:
- if _i >= (_db.X5) {
- goto _8
- }
- _2_j = func() int32 {
- if _i < i32(2) {
- return (_i ^ i32(1))
- }
- return _i
- }()
- if _zDatabase != nil && _sqlite3StrICmp(tls, _zDatabase, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_2_j))).X0) != i32(0) {
- goto _12
- }
- func() {
- if _sqlite3SchemaMutexHeld(tls, _db, _2_j, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100011), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindTableØ00__func__Ø000))), unsafe.Pointer(str(59967)))
- crt.X__builtin_abort(tls)
- }
- }()
- _p = (*XTable)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_2_j))).X4).X2))), _zName))
- if _p != nil {
- return _p
+// C comment
+// /*
+// ** Execute SQL code. Return one of the SQLITE_ success/failure
+// ** codes. Also write an error message into memory obtained from
+// ** malloc() and make *pzErrMsg point to that message.
+// **
+// ** If the SQL is a query, then for each row in the query result
+// ** the xCallback() function is called. pArg becomes the first
+// ** argument to xCallback(). If xCallback=NULL then no callback
+// ** is invoked, even for queries.
+// */
+func Xsqlite3_exec(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _xCallback func(*crt.TLS, unsafe.Pointer, int32, **int8, **int8) int32, _pArg unsafe.Pointer, _pzErrMsg **int8) (r0 int32) {
+ var _rc, _callbackIsInit, _1_nCol, _4_i, _14_nErrMsg int32
+ var _zLeftover *int8
+ var _pStmt unsafe.Pointer
+ var _azCols, _1_azVals **int8
+ _rc = int32(0)
+ _pStmt = nil
+ _azCols = nil
+ if _sqlite3SafetyCheckOk(tls, _db) == 0 {
+ return _sqlite3MisuseError(tls, int32(111141))
}
-_12:
- _i += 1
- goto _5
-_8:
- if _sqlite3StrICmp(tls, _zName, str(50026)) != i32(0) {
- goto _4
+ if _zSql == nil {
+ _zSql = str(284)
}
- if Xsqlite3_stricmp(tls, _zDatabase, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X0) != i32(0) {
- goto _4
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _sqlite3Error(tls, _db, int32(0))
+_2:
+ if _rc != int32(0) || (*elem1(_zSql, 0)) == 0 {
+ goto _exec_out
}
- _zName = str(50007)
- goto _3
-_4:
- return nil
-}
-
-var _sqlite3FindTableØ00__func__Ø000 [17]int8
-
-func init() {
- crt.Xstrncpy(nil, &_sqlite3FindTableØ00__func__Ø000[0], str(60210), 17)
-}
-
-// This callback is invoked once for each index when reading the
-// sqlite_stat1 table.
-//
-// argv[0] = name of the table
-// argv[1] = name of the index (might be NULL)
-// argv[2] = results of analysis - on integer for each column
-//
-// Entries for which argv[1]==NULL simply record the number of rows in
-// the table.
-func _analysisLoader(tls *crt.TLS, _pData unsafe.Pointer, _argc int32, _argv **int8, _NotUsed **int8) (r0 int32) {
- var _6_nCol int32
- var _z *int8
- var _6_aiRowEst *uint32
- var _pTable *XTable
- var _pIndex *XIndex
- var _8_fakeIdx XIndex
- var _pInfo *XanalysisInfo
- _pInfo = (*XanalysisInfo)(_pData)
+ _1_azVals = nil
+ _pStmt = nil
+ _rc = Xsqlite3_prepare_v2(tls, _db, _zSql, int32(-1), &_pStmt, &_zLeftover)
func() {
- if _argc != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98427), unsafe.Pointer((*int8)(unsafe.Pointer(&_analysisLoaderØ00__func__Ø000))), unsafe.Pointer(str(50294)))
+ if _rc != int32(0) && _pStmt != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(111152), unsafe.Pointer(&_sqlite3_execØ00__func__Ø000), unsafe.Pointer(str(60044)))
crt.X__builtin_abort(tls)
}
}()
- _ = _argc
-
- if ((_argv == nil) || ((*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) == nil)) || ((*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2))))) == nil) {
- return i32(0)
- }
- _pTable = _sqlite3FindTable(tls, (*Xsqlite3)(_pInfo.X0), *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), _pInfo.X1)
- if _pTable == nil {
- return i32(0)
- }
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))) == nil {
- _pIndex = nil
- goto _9
- }
- if Xsqlite3_stricmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))) == i32(0) {
- _pIndex = _sqlite3PrimaryKeyIndex(tls, _pTable)
- goto _9
- }
- _pIndex = _sqlite3FindIndex(tls, (*Xsqlite3)(_pInfo.X0), *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))), _pInfo.X1)
-_9:
- _z = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2))))
- if _pIndex == nil {
- goto _10
+ if _rc != int32(0) {
+ goto _2
}
- _6_aiRowEst = nil
- _6_nCol = int32(_pIndex.X13) + i32(1)
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(0)), 4, 2)
- _decodeIntArray(tls, _z, _6_nCol, _6_aiRowEst, _pIndex.X2, _pIndex)
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(1)), 128, 7)
- if (*XExpr)(_pIndex.X9) == nil {
- *(*int16)(unsafe.Pointer(&(_pTable.X12))) = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X2)) + 2*uintptr(i32(0))))
- {
- p := (*uint32)(unsafe.Pointer(&(_pTable.X9)))
- *p = (*p) | uint32(i32(16))
- sink5(*p)
- }
+ if _pStmt == nil {
+ _zSql = _zLeftover
+ goto _2
}
- goto _12
+ _callbackIsInit = int32(0)
+ _1_nCol = Xsqlite3_column_count(tls, _pStmt)
_10:
- *(*int16)(unsafe.Pointer(&(_8_fakeIdx.X12))) = _pTable.X13
- _decodeIntArray(tls, _z, i32(1), nil, (*int16)(unsafe.Pointer(&(_pTable.X12))), &_8_fakeIdx)
- *(*int16)(unsafe.Pointer(&(_pTable.X13))) = _8_fakeIdx.X12
- {
- p := (*uint32)(unsafe.Pointer(&(_pTable.X9)))
- *p = (*p) | uint32(i32(16))
- sink5(*p)
+ _rc = Xsqlite3_step(tls, _pStmt)
+ if _xCallback == nil || int32(100) != _rc && (int32(101) != _rc || _callbackIsInit != 0 || (_db.Xflags&int32(256)) == 0) {
+ goto _16
}
-_12:
- return i32(0)
-
- _ = _8_fakeIdx
- panic(0)
-}
-
-var _analysisLoaderØ00__func__Ø000 [15]int8
-
-func init() {
- crt.Xstrncpy(nil, &_analysisLoaderØ00__func__Ø000[0], str(60227), 15)
-}
-
-// The first argument points to a nul-terminated string containing a
-// list of space separated integers. Read the first nOut of these into
-// the array aOut[].
-func _decodeIntArray(tls *crt.TLS, _zIntArray *int8, _nOut int32, _aOut *uint32, _aLog *int16, _pIndex *XIndex) {
- var _c, _i int32
- var _v uint32
- var _z *int8
- _z = _zIntArray
- func() {
- if _z == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98365), unsafe.Pointer((*int8)(unsafe.Pointer(&_decodeIntArrayØ00__func__Ø000))), unsafe.Pointer(str(44451)))
- crt.X__builtin_abort(tls)
- }
- }()
- _i = i32(0)
-_2:
- if (*_z) == 0 || _i >= _nOut {
- goto _6
+ if _callbackIsInit != 0 {
+ goto _17
}
- _v = uint32(i32(0))
-_7:
- if (store1(&_c, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0)))))) >= i32(48)) && (_c <= i32(57)) {
- _v = ((_v * uint32(i32(10))) + uint32(_c)) - uint32(i32(48))
- *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
- goto _7
+ _azCols = (**int8)(_sqlite3DbMallocRaw(tls, _db, uint64(uint32((int32(2)*_1_nCol)+int32(1))*uint32(4))))
+ if _azCols == nil {
+ goto _exec_out
}
- func() {
- if _aOut != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98377), unsafe.Pointer((*int8)(unsafe.Pointer(&_decodeIntArrayØ00__func__Ø000))), unsafe.Pointer(str(60242)))
- crt.X__builtin_abort(tls)
- }
- }()
-
- func() {
- if _aLog == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98379), unsafe.Pointer((*int8)(unsafe.Pointer(&_decodeIntArrayØ00__func__Ø000))), unsafe.Pointer(str(60250)))
- crt.X__builtin_abort(tls)
- }
- }()
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aLog)) + 2*uintptr(_i))) = _sqlite3LogEst(tls, uint64(_v))
- if int32(*_z) == i32(32) {
- *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
+ _4_i = int32(0)
+_19:
+ if _4_i >= _1_nCol {
+ goto _22
}
- _i += 1
- goto _2
-_6:
+ *elem0(_azCols, uintptr(_4_i)) = Xsqlite3_column_name(tls, _pStmt, _4_i)
func() {
- if _pIndex == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98385), unsafe.Pointer((*int8)(unsafe.Pointer(&_decodeIntArrayØ00__func__Ø000))), unsafe.Pointer(str(60258)))
+ if (*elem0(_azCols, uintptr(_4_i))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(111182), unsafe.Pointer(&_sqlite3_execØ00__func__Ø000), unsafe.Pointer(str(60070)))
crt.X__builtin_abort(tls)
}
}()
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(0)), 4, 2)
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(0)), 64, 6)
+ _4_i += 1
+ goto _19
+_22:
+ _callbackIsInit = int32(1)
_17:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) == 0 {
- goto _18
- }
- if Xsqlite3_strglob(tls, str(60268), _z) == i32(0) {
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(1)), 4, 2)
- goto _23
- }
- if Xsqlite3_strglob(tls, str(60279), _z) == i32(0) {
- *(*int16)(unsafe.Pointer(&(_pIndex.X12))) = _sqlite3LogEst(tls, uint64(_sqlite3Atoi(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(3)))))))))))
- goto _23
- }
- if Xsqlite3_strglob(tls, str(60289), _z) == i32(0) {
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(1)), 64, 6)
- }
-_23:
- if (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(0)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(32)) {
- *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
- goto _23
- }
-_25:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) == i32(32) {
- *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
+ if _rc != int32(100) {
goto _25
}
- goto _17
-_18:
-}
-
-var _decodeIntArrayØ00__func__Ø000 [15]int8
-
-func init() {
- crt.Xstrncpy(nil, &_decodeIntArrayØ00__func__Ø000[0], str(60301), 15)
-}
-
-// The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and
-// non-zero if there is no match.
-func Xsqlite3_strglob(tls *crt.TLS, _zGlobPattern *int8, _zString *int8) (r0 int32) {
- return _patternCompare(tls, (*uint8)(unsafe.Pointer(_zGlobPattern)), (*uint8)(unsafe.Pointer(_zString)), &_globInfo, uint32(i32(91)))
-}
-
-// Compare two UTF-8 strings for equality where the first string is
-// a GLOB or LIKE expression. Return values:
-//
-// SQLITE_MATCH: Match
-// SQLITE_NOMATCH: No match
-// SQLITE_NOWILDCARDMATCH: No match in spite of having * or % wildcards.
-//
-// Globbing rules:
-//
-// '*' Matches any sequence of zero or more characters.
-//
-// '?' Matches exactly one character.
-//
-// [...] Matches one character from the enclosed list of
-// characters.
-//
-// [^...] Matches one character not in the enclosed list.
-//
-// With the [...] and [^...] matching, a ']' character can be included
-// in the list by making it the first character after '[' or '^'. A
-// range of characters can be specified using '-'. Example:
-// "[a-z]" matches any single lower-case letter. To match a '-', make
-// it the last character in the list.
-//
-// Like matching rules:
-//
-// '%' Matches any sequence of zero or more characters
-//
-// *** '_' Matches any one character
-//
-// Ec Where E is the "esc" character and c is any other
-// character, including '%', '_', and esc, match exactly c.
-//
-// The comments within this routine usually assume glob matching.
-//
-// This routine is usually quick, but can be N**2 in the worst case.
-func _patternCompare(tls *crt.TLS, _zPattern *uint8, _zString *uint8, _pInfo *TcompareInfo, _matchOther uint32) (r0 int32) {
- var _9_bMatch, _13_bMatch, _17_bMatch, _21_seen, _21_invert int32
- var _c, _c2, _matchOne, _matchAll, _13_cx, _21_prior_c uint32
- var _noCase uint8
- var _zEscaped *uint8
- _matchOne = uint32(_pInfo.X1)
- _matchAll = uint32(_pInfo.X0)
- _noCase = _pInfo.X3
- _zEscaped = nil
-_0:
- if store5(&_c, func() uint32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPattern)) + 1*uintptr(i32(0))))) < i32(128) {
- return uint32(*postInc13(&_zPattern, 1))
- }
- return _sqlite3Utf8Read(tls, &_zPattern)
- }()) == uint32(i32(0)) {
- goto _1
- }
- if _c != _matchAll {
- goto _4
- }
-_5:
- if store5(&_c, func() uint32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPattern)) + 1*uintptr(i32(0))))) < i32(128) {
- return uint32(*postInc13(&_zPattern, 1))
- }
- return _sqlite3Utf8Read(tls, &_zPattern)
- }()) != _matchAll && _c != _matchOne {
- goto _6
- }
- if (_c == _matchOne) && (_sqlite3Utf8Read(tls, &_zString) == uint32(i32(0))) {
- return i32(2)
- }
- goto _5
-_6:
- if _c == uint32(i32(0)) {
- return i32(0)
- }
- if _c != _matchOther {
- goto _14
- }
- if int32(_pInfo.X2) != i32(0) {
- goto _15
- }
- _c = _sqlite3Utf8Read(tls, &_zPattern)
- if _c == uint32(i32(0)) {
- return i32(2)
- }
- goto _17
-_15:
- func() {
- if _matchOther >= uint32(i32(128)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106217), unsafe.Pointer((*int8)(unsafe.Pointer(&_patternCompareØ00__func__Ø000))), unsafe.Pointer(str(60316)))
- crt.X__builtin_abort(tls)
- }
- }()
-_20:
- if (*_zString) == 0 {
- goto _21
- }
- _9_bMatch = _patternCompare(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPattern))+1*uintptr(i32(-1)))), _zString, _pInfo, _matchOther)
- if _9_bMatch != i32(1) {
- return _9_bMatch
- }
- if int32(*postInc13(&_zString, 1)) < i32(192) {
- goto _23
- }
-_24:
- if (int32(*_zString) & i32(192)) == i32(128) {
- *(*uintptr)(unsafe.Pointer(&_zString)) += uintptr(1)
- goto _24
- }
-_23:
- goto _20
-_21:
- return i32(2)
-
-_17:
-_14:
- if _c > uint32(i32(128)) {
- goto _26
- }
- if _noCase != 0 {
- _13_cx = _c & uint32(^(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(_c))))) & i32(32)))
- _c = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(_c)))))
- goto _28
- }
- _13_cx = _c
-_28:
- if store5(&_c2, uint32(*postInc13(&_zString, 1))) == uint32(i32(0)) {
- goto _30
- }
- if (_c2 != _c) && (_c2 != _13_cx) {
- goto _28
- }
- _13_bMatch = _patternCompare(tls, _zPattern, _zString, _pInfo, _matchOther)
- if _13_bMatch != i32(1) {
- return _13_bMatch
- }
- goto _28
-_30:
- goto _34
+ _1_azVals = elem0(_azCols, uintptr(_1_nCol))
+ _4_i = int32(0)
_26:
-_35:
- if store5(&_c2, func() uint32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zString)) + 1*uintptr(i32(0))))) < i32(128) {
- return uint32(*postInc13(&_zString, 1))
- }
- return _sqlite3Utf8Read(tls, &_zString)
- }()) == uint32(i32(0)) {
- goto _36
- }
- if _c2 != _c {
- goto _35
- }
- _17_bMatch = _patternCompare(tls, _zPattern, _zString, _pInfo, _matchOther)
- if _17_bMatch != i32(1) {
- return _17_bMatch
- }
- goto _35
-_36:
-_34:
- return i32(2)
-
-_4:
- if _c != _matchOther {
- goto _41
- }
- if int32(_pInfo.X2) != i32(0) {
- goto _42
- }
- _c = _sqlite3Utf8Read(tls, &_zPattern)
- if _c == uint32(i32(0)) {
- return i32(1)
- }
- _zEscaped = _zPattern
- goto _44
-_42:
- _21_prior_c = uint32(i32(0))
- _21_seen = i32(0)
- _21_invert = i32(0)
- _c = _sqlite3Utf8Read(tls, &_zString)
- if _c == uint32(i32(0)) {
- return i32(1)
- }
- _c2 = _sqlite3Utf8Read(tls, &_zPattern)
- if _c2 == uint32(i32(94)) {
- _21_invert = i32(1)
- _c2 = _sqlite3Utf8Read(tls, &_zPattern)
- }
- if _c2 != uint32(i32(93)) {
- goto _47
- }
- if _c == uint32(i32(93)) {
- _21_seen = i32(1)
- }
- _c2 = _sqlite3Utf8Read(tls, &_zPattern)
-_47:
- if _c2 == 0 || _c2 == uint32(i32(93)) {
- goto _50
- }
- if _c2 != uint32(i32(45)) || int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPattern)) + 1*uintptr(i32(0))))) == i32(93) || int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPattern)) + 1*uintptr(i32(0))))) == i32(0) || _21_prior_c <= uint32(i32(0)) {
- goto _55
- }
- _c2 = _sqlite3Utf8Read(tls, &_zPattern)
- if (_c >= _21_prior_c) && (_c <= _c2) {
- _21_seen = i32(1)
- }
- _21_prior_c = uint32(i32(0))
- goto _58
-_55:
- if _c == _c2 {
- _21_seen = i32(1)
- }
- _21_prior_c = _c2
-_58:
- _c2 = _sqlite3Utf8Read(tls, &_zPattern)
- goto _47
-_50:
- if (_c2 == uint32(i32(0))) || ((_21_seen ^ _21_invert) == i32(0)) {
- return i32(1)
- }
- goto _0
-_44:
-_41:
- _c2 = func() uint32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zString)) + 1*uintptr(i32(0))))) < i32(128) {
- return uint32(*postInc13(&_zString, 1))
- }
- return _sqlite3Utf8Read(tls, &_zString)
- }()
- if _c == _c2 {
- goto _0
- }
- if (((_noCase != 0) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(_c))))) == int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(_c2))))))) && (_c < uint32(i32(128)))) && (_c2 < uint32(i32(128))) {
- goto _0
- }
- if ((_c == _matchOne) && (_zPattern != _zEscaped)) && (_c2 != uint32(i32(0))) {
- goto _0
- }
- return i32(1)
-
-_1:
- return func() int32 {
- if int32(*_zString) == i32(0) {
- return i32(0)
- }
- return i32(1)
- }()
-}
-
-func _sqlite3Utf8Read(tls *crt.TLS, _pz **uint8) (r0 uint32) {
- var _c uint32
- _c = uint32(*postInc13(_pz, 1))
- if _c < uint32(i32(192)) {
- goto _0
- }
- _c = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3Utf8Trans1)) + 1*uintptr(_c-uint32(i32(192))))))
-_1:
- if (int32(*(*_pz)) & i32(192)) == i32(128) {
- _c = (_c << uint(i32(6))) + uint32(i32(63)&int32(*postInc13(_pz, 1)))
- goto _1
+ if _4_i >= _1_nCol {
+ goto _29
}
- if ((_c < uint32(i32(128))) || ((_c & u32(4294965248)) == uint32(i32(55296)))) || ((_c & u32(4294967294)) == uint32(i32(65534))) {
- _c = uint32(i32(65533))
+ *elem0(_1_azVals, uintptr(_4_i)) = (*int8)(unsafe.Pointer(Xsqlite3_column_text(tls, _pStmt, _4_i)))
+ if ((*elem0(_1_azVals, uintptr(_4_i))) == nil) && (Xsqlite3_column_type(tls, _pStmt, _4_i) != int32(5)) {
+ _sqlite3OomFault(tls, _db)
+ goto _exec_out
}
-_0:
- return _c
-}
-
-var _patternCompareØ00__func__Ø000 [15]int8
-
-func init() {
- crt.Xstrncpy(nil, &_patternCompareØ00__func__Ø000[0], str(60332), 15)
-}
-
-var _globInfo TcompareInfo
-
-func init() {
- _globInfo = TcompareInfo{X0: u8(42), X1: u8(63), X2: u8(91), X3: u8(0)}
-}
-
-// Fill the Index.aiRowEst[] array with default information - information
-// to be used when we have not run the ANALYZE command.
-//
-// aiRowEst[0] is supposed to contain the number of elements in the index.
-// Since we do not know, guess 1 million. aiRowEst[1] is an estimate of the
-// number of rows in the table that match any particular value of the
-// first column of the index. aiRowEst[2] is an estimate of the number
-// of rows that match any particular combination of the first 2 columns
-// of the index. And so forth. It must always be the case that
-// *
-// aiRowEst[N]<=aiRowEst[N-1]
-// aiRowEst[N]>=1
-//
-// Apart from that, we have little to go on besides intuition as to
-// how aiRowEst[] should be initialized. The numbers generated here
-// are based on typical values found in actual indices.
-func _sqlite3DefaultRowEst(tls *crt.TLS, _pIdx *XIndex) {
- var _nCopy, _i int32
- var _a *int16
- var _aVal [5]int16
- _aVal = [5]int16{i16(33), i16(32), i16(30), i16(28), i16(26)}
- _a = _pIdx.X2
- _nCopy = func() int32 {
- if i32(5) < int32(_pIdx.X13) {
- return i32(5)
- }
- return int32(_pIdx.X13)
- }()
- func() {
- if ((uint32((_pIdx.X16)>>uint(i32(7))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103155), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000))), unsafe.Pointer(str(60347)))
- crt.X__builtin_abort(tls)
- }
- }()
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a)) + 2*uintptr(i32(0)))) = (*XTable)(_pIdx.X3).X12
- if (*XExpr)(_pIdx.X9) != nil {
- {
- p := (*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a)) + 2*uintptr(i32(0))))
- *p = int16(int32(*p) - i32(10))
- sink18(*p)
- }
+ _4_i += 1
+ goto _26
+_29:
+ *elem0(_1_azVals, uintptr(_4_i)) = nil
+_25:
+ if _xCallback(tls, _pArg, _1_nCol, _1_azVals, _azCols) != 0 {
+ _rc = int32(4)
+ _sqlite3VdbeFinalize(tls, (*TVdbe)(_pStmt))
+ _pStmt = nil
+ _sqlite3Error(tls, _db, int32(4))
+ goto _exec_out
}
- func() {
- if i32(10) != int32(_sqlite3LogEst(tls, uint64(i32(2)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103161), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000))), unsafe.Pointer(str(60363)))
- crt.X__builtin_abort(tls)
- }
- }()
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a)) + 2*uintptr(i32(0))))) < i32(33) {
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a)) + 2*uintptr(i32(0)))) = int16(i32(33))
+_16:
+ if _rc == int32(100) {
+ goto _33
}
- func() {
- if i32(33) != int32(_sqlite3LogEst(tls, uint64(i32(10)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103162), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000))), unsafe.Pointer(str(60384)))
- crt.X__builtin_abort(tls)
- }
- }()
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a))+2*uintptr(i32(1))))), (unsafe.Pointer)(&_aVal), uint32(_nCopy)*u32(2))
- _i = _nCopy + i32(1)
-_10:
- if _i > int32(_pIdx.X13) {
- goto _13
+ _rc = _sqlite3VdbeFinalize(tls, (*TVdbe)(_pStmt))
+ _pStmt = nil
+ _zSql = _zLeftover
+_34:
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zSql, 0))))) & int32(1)) != 0 {
+ *(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(1)
+ goto _34
}
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a)) + 2*uintptr(_i))) = int16(i32(23))
- func() {
- if i32(23) != int32(_sqlite3LogEst(tls, uint64(i32(5)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103168), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000))), unsafe.Pointer(str(60406)))
- crt.X__builtin_abort(tls)
- }
- }()
- _i += 1
+ goto _11
+_33:
goto _10
-_13:
- func() {
- if i32(0) != int32(_sqlite3LogEst(tls, uint64(i32(1)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103171), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000))), unsafe.Pointer(str(46381)))
- crt.X__builtin_abort(tls)
- }
- }()
- if int32(_pIdx.X15) != i32(0) {
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a)) + 2*uintptr(_pIdx.X13))) = int16(i32(0))
- }
- _ = _aVal
-}
-
-var _sqlite3DefaultRowEstØ00__func__Ø000 [21]int8
-
-func init() {
- crt.Xstrncpy(nil, &_sqlite3DefaultRowEstØ00__func__Ø000[0], str(60427), 21)
-}
-
-// Parameter zName points to a nul-terminated buffer containing the name
-// of a database ("main", "temp" or the name of an attached db). This
-// function returns the index of the named database in db->aDb[], or
-// -1 if the named db cannot be found.
-func _sqlite3FindDbName(tls *crt.TLS, _db *Xsqlite3, _zName *int8) (r0 int32) {
- var _i int32
- var _1_pDb *XDb
- _i = i32(-1)
- if _zName == nil {
- goto _0
- }
- *func() **XDb { _i = (_db.X5) - i32(1); return &_1_pDb }() = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i)))
-_1:
- if _i < i32(0) {
- goto _4
- }
- if i32(0) == Xsqlite3_stricmp(tls, _1_pDb.X0, _zName) {
- goto _4
- }
- if (_i == i32(0)) && (i32(0) == Xsqlite3_stricmp(tls, str(60448), _zName)) {
- goto _4
- }
- *(*uintptr)(unsafe.Pointer(func() **XDb { _i -= 1; return &_1_pDb }())) += uintptr(4294967280)
- goto _1
-_4:
-_0:
- return _i
-}
-
-// Check to see if zTabName is really the name of a pragma. If it is,
-// then register an eponymous virtual table for that pragma and return
-// a pointer to the Module object for the new virtual table.
-func _sqlite3PragmaVtabRegister(tls *crt.TLS, _db *Xsqlite3, _zName *int8) (r0 *XModule) {
- var _pName *XPragmaName
- func() {
- if Xsqlite3_strnicmp(tls, _zName, str(49814), i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115653), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaVtabRegisterØ00__func__Ø000))), unsafe.Pointer(str(60453)))
- crt.X__builtin_abort(tls)
- }
- }()
- _pName = _pragmaLocate(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zName))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(7)))))))))
- if _pName == nil {
- return nil
- }
- if (int32(_pName.X2) & i32(48)) == i32(0) {
- return nil
- }
- func() {
- if _sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&(_db.X65))), _zName) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115657), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaVtabRegisterØ00__func__Ø000))), unsafe.Pointer(str(60494)))
- crt.X__builtin_abort(tls)
- }
- }()
- return _sqlite3VtabCreateModule(tls, _db, _zName, &_pragmaVtabModule, (unsafe.Pointer)(_pName), nil)
-}
-
-var _sqlite3PragmaVtabRegisterØ00__func__Ø000 [26]int8
-
-func init() {
- crt.Xstrncpy(nil, &_sqlite3PragmaVtabRegisterØ00__func__Ø000[0], str(60534), 26)
-}
-
-// Locate a pragma in the aPragmaName[] array.
-func _pragmaLocate(tls *crt.TLS, _zName *int8) (r0 *XPragmaName) {
- var _upr, _lwr, _mid, _rc int32
- _mid = i32(0)
- _lwr = i32(0)
- _upr = i32(66)
-_0:
- if _lwr > _upr {
- goto _1
- }
- _mid = (_lwr + _upr) / i32(2)
- _rc = Xsqlite3_stricmp(tls, _zName, (*XPragmaName)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPragmaName))+12*uintptr(_mid))).X0)
- if _rc == i32(0) {
- goto _1
- }
- if _rc < i32(0) {
- _upr = _mid - i32(1)
- goto _4
- }
- _lwr = _mid + i32(1)
-_4:
- goto _0
-_1:
- return func() *XPragmaName {
- if _lwr > _upr {
- return nil
- }
- return (*XPragmaName)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPragmaName)) + 12*uintptr(_mid)))
- }()
-}
-
-var _aPragmaName [67]XPragmaName
-
-func init() {
- _aPragmaName = [67]XPragmaName{XPragmaName{X0: str(60560), X1: u8(0), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(8)}, XPragmaName{X0: str(60575), X1: u8(1), X2: u8(149), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(60587), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(1048576)}, XPragmaName{X0: str(60603), X1: u8(3), X2: u8(16), X3: u8(46), X4: u8(1), X5: u32(0)}, XPragmaName{X0: str(60616), X1: u8(4), X2: u8(149), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(60627), X1: u8(5), X2: u8(148), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(60639), X1: u8(6), X2: u8(2), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(60659), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(536870912)}, XPragmaName{X0: str(60675), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(16)}, XPragmaName{X0: str(60696), X1: u8(7), X2: u8(16), X3: u8(29), X4: u8(2), X5: u32(0)}, XPragmaName{X0: str(60711), X1: u8(8), X2: u8(16), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(60727), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(128)}, XPragmaName{X0: str(60741), X1: u8(0), X2: u8(24), X3: u8(0), X4: u8(0), X5: u32(15)}, XPragmaName{X0: str(60754), X1: u8(10), X2: u8(17), X3: u8(26), X4: u8(3), X5: u32(0)}, XPragmaName{X0: str(60768), X1: u8(11), X2: u8(149), X3: u8(0), X4: u8(1), X5: u32(0)}, XPragmaName{X0: str(60787), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(33554432)}, XPragmaName{X0: str(60806), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(256)}, XPragmaName{X0: str(60829), X1: u8(12), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(60838), X1: u8(13), X2: u8(1), X3: u8(39), X4: u8(4), X5: u32(0)}, XPragmaName{X0: str(60856), X1: u8(14), X2: u8(97), X3: u8(31), X4: u8(8), X5: u32(0)}, XPragmaName{X0: str(60873), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(524288)}, XPragmaName{X0: str(60886), X1: u8(0), X2: u8(24), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(60901), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(4)}, XPragmaName{X0: str(60919), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(8)}, XPragmaName{X0: str(60929), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(8192)}, XPragmaName{X0: str(60954), X1: u8(15), X2: u8(3), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(60973), X1: u8(16), X2: u8(97), X3: u8(12), X4: u8(3), X5: u32(0)}, XPragmaName{X0: str(60984), X1: u8(17), X2: u8(97), X3: u8(21), X4: u8(5), X5: u32(0)}, XPragmaName{X0: str(60995), X1: u8(16), X2: u8(97), X3: u8(15), X4: u8(6), X5: u32(1)}, XPragmaName{X0: str(61007), X1: u8(18), X2: u8(1), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61023), X1: u8(19), X2: u8(145), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61036), X1: u8(20), X2: u8(144), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61055), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(32768)}, XPragmaName{X0: str(61074), X1: u8(41), X2: u8(16), X3: u8(47), X4: u8(2), X5: u32(0)}, XPragmaName{X0: str(61086), X1: u8(22), X2: u8(144), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61099), X1: u8(23), X2: u8(145), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61114), X1: u8(24), X2: u8(0), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61124), X1: u8(25), X2: u8(33), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61133), X1: u8(23), X2: u8(145), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61144), X1: u8(26), X2: u8(148), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61154), X1: u8(42), X2: u8(0), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61167), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(67108864)}, XPragmaName{X0: str(61178), X1: u8(18), X2: u8(1), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61190), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(16384)}, XPragmaName{X0: str(61207), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(262144)}, XPragmaName{X0: str(61226), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(131072)}, XPragmaName{X0: str(61252), X1: u8(0), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(1)}, XPragmaName{X0: str(61267), X1: u8(27), X2: u8(16), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61281), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(64)}, XPragmaName{X0: str(61300), X1: u8(28), X2: u8(2), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61314), X1: u8(29), X2: u8(16), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61330), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(512)}, XPragmaName{X0: str(61340), X1: u8(43), X2: u8(145), X3: u8(7), X4: u8(5), X5: u32(0)}, XPragmaName{X0: str(61346), X1: u8(30), X2: u8(149), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61358), X1: u8(31), X2: u8(97), X3: u8(1), X4: u8(6), X5: u32(0)}, XPragmaName{X0: str(61369), X1: u8(32), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61380), X1: u8(33), X2: u8(4), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61401), X1: u8(34), X2: u8(16), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61409), X1: u8(0), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(6)}, XPragmaName{X0: str(61422), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(4096)}, XPragmaName{X0: str(61438), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(1537)}, XPragmaName{X0: str(61449), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(134217728)}, XPragmaName{X0: str(61458), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(1024)}, XPragmaName{X0: str(61471), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(1)}, XPragmaName{X0: str(61482), X1: u8(35), X2: u8(0), X3: u8(0), X4: u8(0), X5: u32(0)}, XPragmaName{X0: str(61501), X1: u8(36), X2: u8(1), X3: u8(43), X4: u8(3), X5: u32(0)}, XPragmaName{X0: str(61516), X1: u8(2), X2: u8(20), X3: u8(0), X4: u8(0), X5: u32(67584)}}
-}
-
-var _pragmaVtabModule Xsqlite3_module
-
-func init() {
- _pragmaVtabModule = Xsqlite3_module{X0: i32(0), X1: nil, X2: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32
- }{_pragmaVtabConnect})), X3: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, *Xsqlite3_index_info) int32
- }{_pragmaVtabBestIndex})), X4: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab) int32
- }{_pragmaVtabDisconnect})), X5: nil, X6: *(*func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, **Xsqlite3_file) int32
- }{_pragmaVtabOpen})), X7: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_file) int32
- }{_pragmaVtabClose})), X8: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_file, int32, *int8, int32, **XMem) int32
- }{_pragmaVtabFilter})), X9: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_file) int32
- }{_pragmaVtabNext})), X10: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_file) int32
- }{_pragmaVtabEof})), X11: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_file, *Xsqlite3_context, int32) int32
- }{_pragmaVtabColumn})), X12: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_file, *int64) int32
- }{_pragmaVtabRowid})), X13: nil, X14: nil, X15: nil, X16: nil, X17: nil, X18: nil, X19: nil, X20: nil, X21: nil, X22: nil}
-}
-
-// Pragma virtual table module xConnect method.
-func _pragmaVtabConnect(tls *crt.TLS, _db *Xsqlite3, _pAux unsafe.Pointer, _argc int32, _argv **int8, _ppVtab **Xsqlite3_vtab, _pzErr **int8) (r0 int32) {
- var _rc, _i, _j int32
- var _cSep int8
- var _acc XStrAccum
- var _zBuf [200]int8
- var _pPragma *XPragmaName
- var _pTab *XPragmaVtab
- _pPragma = (*XPragmaName)(_pAux)
- _pTab = nil
- _cSep = i8(40)
-
- _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zBuf)), int32(u32(200)), i32(0))
- _sqlite3StrAccumAppendAll(tls, &_acc, str(61532))
- *func() *int32 { _i = i32(0); return &_j }() = int32(_pPragma.X3)
-_0:
- if _i >= int32(_pPragma.X4) {
- goto _3
- }
- _sqlite3XPrintf(tls, &_acc, str(61547), int32(_cSep), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_pragCName)) + 4*uintptr(_j)))))
- _cSep = int8(i32(44))
- *func() *int32 { _i += 1; return &_j }() += 1
- goto _0
-_3:
- if _i == i32(0) {
- _sqlite3XPrintf(tls, &_acc, str(61554), unsafe.Pointer(_pPragma.X0))
- _cSep = int8(i32(44))
- _i += 1
- }
- _j = i32(0)
- if (int32(_pPragma.X2) & i32(32)) != 0 {
- _sqlite3StrAccumAppendAll(tls, &_acc, str(61560))
- _j += 1
- }
- if (int32(_pPragma.X2) & i32(192)) != 0 {
- _sqlite3StrAccumAppendAll(tls, &_acc, str(61572))
- _j += 1
- }
- _sqlite3StrAccumAppend(tls, &_acc, str(37898), i32(1))
- _sqlite3StrAccumFinish(tls, &_acc)
- func() {
- if crt.Xstrlen(tls, (*int8)(unsafe.Pointer(&_zBuf))) >= u32(199) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115419), unsafe.Pointer((*int8)(unsafe.Pointer(&_pragmaVtabConnectØ00__func__Ø000))), unsafe.Pointer(str(61587)))
- crt.X__builtin_abort(tls)
- }
- }()
- _rc = Xsqlite3_declare_vtab(tls, _db, (*int8)(unsafe.Pointer(&_zBuf)))
- if _rc != i32(0) {
- goto _9
- }
- _pTab = (*XPragmaVtab)(Xsqlite3_malloc(tls, int32(u32(24))))
- if _pTab == nil {
- _rc = i32(7)
- goto _11
- }
- crt.Xmemset(tls, (unsafe.Pointer)(_pTab), i32(0), u32(24))
- *(**XPragmaName)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X2))))) = _pPragma
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X1))))) = _db
- *(*uint8)(unsafe.Pointer(&(_pTab.X4))) = uint8(_i)
- *(*uint8)(unsafe.Pointer(&(_pTab.X3))) = uint8(_j)
_11:
- goto _12
-_9:
- *_pzErr = Xsqlite3_mprintf(tls, str(24576), unsafe.Pointer(Xsqlite3_errmsg(tls, _db)))
-_12:
- *_ppVtab = (*Xsqlite3_vtab)(unsafe.Pointer(_pTab))
- return _rc
-
- _ = _acc
- _ = _zBuf
- panic(0)
-}
-
-// Append the complete text of zero-terminated string z[] to the p string.
-func _sqlite3StrAccumAppendAll(tls *crt.TLS, _p *XStrAccum, _z *int8) {
- _sqlite3StrAccumAppend(tls, _p, _z, _sqlite3Strlen30(tls, _z))
-}
-
-var _pragCName [49]*int8
-
-func init() {
- _pragCName = [49]*int8{str(60616), str(61617), str(61621), str(61626), str(61631), str(61639), str(61650), str(61653), str(61657), str(61661), str(61666), str(61671), str(61676), str(61617), str(61621), str(61676), str(61617), str(61621), str(61682), str(61687), str(61692), str(61696), str(61621), str(61700), str(61707), str(61714), str(61696), str(61621), str(61722), str(61696), str(61621), str(61727), str(61696), str(61730), str(26370), str(61736), str(61739), str(61749), str(61759), str(61730), str(27227), str(61765), str(61772), str(61777), str(61782), str(61786), str(61799), str(61807), str(61816)}
-}
-
-var _pragmaVtabConnectØ00__func__Ø000 [18]int8
-
-func init() {
- crt.Xstrncpy(nil, &_pragmaVtabConnectØ00__func__Ø000[0], str(61823), 18)
-}
-
-// Figure out the best index to use to search a pragma virtual table.
-//
-// There are not really any index choices. But we want to encourage the
-// query planner to give == constraints on as many hidden parameters as
-// possible, and especially on the first hidden parameter. So return a
-// high cost if hidden parameters are unconstrained.
-func _pragmaVtabBestIndex(tls *crt.TLS, _tab *Xsqlite3_vtab, _pIdxInfo *Xsqlite3_index_info) (r0 int32) {
- var _i, _j int32
- var _seen [2]int32
- var _pTab *XPragmaVtab
- var _pConstraint *Tsqlite3_index_constraint
- _pTab = (*XPragmaVtab)(unsafe.Pointer(_tab))
- *(*float64)(unsafe.Pointer(&(_pIdxInfo.X9))) = float64(1)
- if int32(_pTab.X3) == i32(0) {
- return i32(0)
- }
- _pConstraint = (*Tsqlite3_index_constraint)(_pIdxInfo.X1)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_seen)) + 4*uintptr(i32(0)))) = i32(0)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_seen)) + 4*uintptr(i32(1)))) = i32(0)
- _i = i32(0)
-_1:
- if _i >= (_pIdxInfo.X0) {
- goto _4
- }
- if int32(_pConstraint.X2) == i32(0) {
- goto _2
- }
- if int32(_pConstraint.X1) != i32(2) {
- goto _2
- }
- if (_pConstraint.X0) < int32(_pTab.X4) {
- goto _2
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_azCols))
+ _azCols = nil
+ goto _2
+_exec_out:
+ if _pStmt != nil {
+ _sqlite3VdbeFinalize(tls, (*TVdbe)(_pStmt))
}
- _j = (_pConstraint.X0) - int32(_pTab.X4)
- func() {
- if _j >= i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115472), unsafe.Pointer((*int8)(unsafe.Pointer(&_pragmaVtabBestIndexØ00__func__Ø000))), unsafe.Pointer(str(61841)))
- crt.X__builtin_abort(tls)
- }
- }()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_seen)) + 4*uintptr(_j))) = _i + i32(1)
-_2:
- *(*uintptr)(unsafe.Pointer(func() **Tsqlite3_index_constraint { _i += 1; return &_pConstraint }())) += uintptr(12)
- goto _1
-_4:
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_seen)) + 4*uintptr(i32(0))))) == i32(0) {
- *(*float64)(unsafe.Pointer(&(_pIdxInfo.X9))) = 2.147483647e+09
- *(*int64)(unsafe.Pointer(&(_pIdxInfo.X10))) = int64(i32(2147483647))
- return i32(0)
- }
- _j = (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_seen)) + 4*uintptr(i32(0))))) - i32(1)
- *(*int32)(unsafe.Pointer(&((*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr(_pIdxInfo.X4) + 8*uintptr(_j))).X0))) = i32(1)
- *(*uint8)(unsafe.Pointer(&((*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr(_pIdxInfo.X4) + 8*uintptr(_j))).X1))) = uint8(i32(1))
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_seen)) + 4*uintptr(i32(1))))) == i32(0) {
- return i32(0)
- }
- *(*float64)(unsafe.Pointer(&(_pIdxInfo.X9))) = float64(20)
- *(*int64)(unsafe.Pointer(&(_pIdxInfo.X10))) = int64(i32(20))
- _j = (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_seen)) + 4*uintptr(i32(1))))) - i32(1)
- *(*int32)(unsafe.Pointer(&((*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr(_pIdxInfo.X4) + 8*uintptr(_j))).X0))) = i32(2)
- *(*uint8)(unsafe.Pointer(&((*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr(_pIdxInfo.X4) + 8*uintptr(_j))).X1))) = uint8(i32(1))
- return i32(0)
-
- _ = _seen
- panic(0)
-}
-
-var _pragmaVtabBestIndexØ00__func__Ø000 [20]int8
-
-func init() {
- crt.Xstrncpy(nil, &_pragmaVtabBestIndexØ00__func__Ø000[0], str(61847), 20)
-}
-
-// Pragma virtual table module xDisconnect method.
-func _pragmaVtabDisconnect(tls *crt.TLS, _pVtab *Xsqlite3_vtab) (r0 int32) {
- var _pTab *XPragmaVtab
- _pTab = (*XPragmaVtab)(unsafe.Pointer(_pVtab))
- Xsqlite3_free(tls, (unsafe.Pointer)(_pTab))
- return i32(0)
-}
-
-// Create a new cursor for the pragma virtual table
-func _pragmaVtabOpen(tls *crt.TLS, _pVtab *Xsqlite3_vtab, _ppCursor **Xsqlite3_file) (r0 int32) {
- var _pCsr *XPragmaVtabCursor
- _pCsr = (*XPragmaVtabCursor)(Xsqlite3_malloc(tls, int32(u32(24))))
- if _pCsr == nil {
- return i32(7)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_azCols))
+ _rc = _sqlite3ApiExit(tls, _db, _rc)
+ if _rc == int32(0) || _pzErrMsg == nil {
+ goto _38
}
- crt.Xmemset(tls, (unsafe.Pointer)(_pCsr), i32(0), u32(24))
- *(**Xsqlite3_vtab)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_file)(unsafe.Pointer(&(_pCsr.X0))).X0))))) = _pVtab
- *_ppCursor = (*Xsqlite3_file)(unsafe.Pointer(&(_pCsr.X0)))
- return i32(0)
-}
-
-// Close a pragma virtual table cursor
-func _pragmaVtabClose(tls *crt.TLS, _cur *Xsqlite3_file) (r0 int32) {
- var _pCsr *XPragmaVtabCursor
- _pCsr = (*XPragmaVtabCursor)(unsafe.Pointer(_cur))
- _pragmaVtabCursorClear(tls, _pCsr)
- Xsqlite3_free(tls, (unsafe.Pointer)(_pCsr))
- return i32(0)
-}
-
-// Clear all content from pragma virtual table cursor.
-func _pragmaVtabCursorClear(tls *crt.TLS, _pCsr *XPragmaVtabCursor) {
- var _i int32
- Xsqlite3_finalize(tls, _pCsr.X1)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pCsr.X1))) = nil
- _i = i32(0)
-_0:
- if _i >= i32(2) {
- goto _3
+ _14_nErrMsg = int32(1) + _sqlite3Strlen30(tls, Xsqlite3_errmsg(tls, _db))
+ *_pzErrMsg = (*int8)(_sqlite3Malloc(tls, uint64(_14_nErrMsg)))
+ if (*_pzErrMsg) != nil {
+ crt.Xmemcpy(tls, unsafe.Pointer(*_pzErrMsg), unsafe.Pointer(Xsqlite3_errmsg(tls, _db)), uint32(_14_nErrMsg))
+ goto _40
}
- Xsqlite3_free(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]*int8)(unsafe.Pointer(&(_pCsr.X3))))) + 4*uintptr(_i)))))
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]*int8)(unsafe.Pointer(&(_pCsr.X3))))) + 4*uintptr(_i))) = nil
- _i += 1
- goto _0
-_3:
-}
-
-// Pragma virtual table module xFilter method.
-func _pragmaVtabFilter(tls *crt.TLS, _pVtabCursor *Xsqlite3_file, _idxNum int32, _idxStr *int8, _argc int32, _argv **XMem) (r0 int32) {
- var _rc, _i, _j int32
- var _zSql *int8
- var _acc XStrAccum
- var _pTab *XPragmaVtab
- var _pCsr *XPragmaVtabCursor
- _pCsr = (*XPragmaVtabCursor)(unsafe.Pointer(_pVtabCursor))
- _pTab = (*XPragmaVtab)(unsafe.Pointer((*Xsqlite3_vtab)(_pVtabCursor.X0)))
-
- _pragmaVtabCursorClear(tls, _pCsr)
- _j = func() int32 {
- if (int32((*XPragmaName)(_pTab.X2).X2) & i32(32)) != i32(0) {
- return i32(0)
- }
- return i32(1)
- }()
- _i = i32(0)
-_2:
- if _i >= _argc {
- goto _5
+ _rc = _sqlite3NomemError(tls, int32(111233))
+ _sqlite3Error(tls, _db, int32(7))
+_40:
+ goto _42
+_38:
+ if _pzErrMsg != nil {
+ *_pzErrMsg = nil
}
+_42:
func() {
- if _j >= i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115558), unsafe.Pointer((*int8)(unsafe.Pointer(&_pragmaVtabFilterØ00__func__Ø000))), unsafe.Pointer(str(61867)))
+ if (_rc & _db.XerrMask) != _rc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(111240), unsafe.Pointer(&_sqlite3_execØ00__func__Ø000), unsafe.Pointer(str(50618)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]*int8)(unsafe.Pointer(&(_pCsr.X3))))) + 4*uintptr(_j))) = Xsqlite3_mprintf(tls, str(24576), unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i))))))
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]*int8)(unsafe.Pointer(&(_pCsr.X3))))) + 4*uintptr(_j)))) == nil {
- return i32(7)
- }
- *func() *int32 { _i += 1; return &_j }() += 1
- goto _2
-_5:
- _sqlite3StrAccumInit(tls, &_acc, nil, nil, i32(0), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_pTab.X1).X31))))) + 4*uintptr(i32(1)))))
- _sqlite3StrAccumAppendAll(tls, &_acc, str(61892))
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]*int8)(unsafe.Pointer(&(_pCsr.X3))))) + 4*uintptr(i32(1))))) != nil {
- _sqlite3XPrintf(tls, &_acc, str(61900), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]*int8)(unsafe.Pointer(&(_pCsr.X3))))) + 4*uintptr(i32(1))))))
- }
- _sqlite3StrAccumAppendAll(tls, &_acc, (*XPragmaName)(_pTab.X2).X0)
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]*int8)(unsafe.Pointer(&(_pCsr.X3))))) + 4*uintptr(i32(0))))) != nil {
- _sqlite3XPrintf(tls, &_acc, str(61904), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]*int8)(unsafe.Pointer(&(_pCsr.X3))))) + 4*uintptr(i32(0))))))
- }
- _zSql = _sqlite3StrAccumFinish(tls, &_acc)
- if _zSql == nil {
- return i32(7)
- }
- _rc = Xsqlite3_prepare_v2(tls, (*Xsqlite3)(_pTab.X1), _zSql, i32(-1), (*unsafe.Pointer)(unsafe.Pointer(&(_pCsr.X1))), nil)
- Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
- if _rc != i32(0) {
- *(**int8)(unsafe.Pointer(&((*Xsqlite3_vtab)(unsafe.Pointer(&(_pTab.X0))).X2))) = Xsqlite3_mprintf(tls, str(24576), unsafe.Pointer(Xsqlite3_errmsg(tls, (*Xsqlite3)(_pTab.X1))))
- return _rc
- }
- return _pragmaVtabNext(tls, _pVtabCursor)
-
- _ = _acc
- panic(0)
-}
-
-var _pragmaVtabFilterØ00__func__Ø000 [17]int8
-
-func init() {
- crt.Xstrncpy(nil, &_pragmaVtabFilterØ00__func__Ø000[0], str(61908), 17)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return _rc
}
func Xsqlite3_prepare_v2(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _nBytes int32, _ppStmt *unsafe.Pointer, _pzTail **int8) (r0 int32) {
var _rc int32
- _rc = _sqlite3LockAndPrepare(tls, _db, _zSql, _nBytes, i32(1), nil, _ppStmt, _pzTail)
+ _rc = _sqlite3LockAndPrepare(tls, _db, _zSql, _nBytes, int32(1), nil, _ppStmt, _pzTail)
func() {
- if _rc != i32(0) && _ppStmt != nil && *_ppStmt != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116426), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_prepare_v2Ø00__func__Ø000))), unsafe.Pointer(str(50464)))
+ if _rc != int32(0) && _ppStmt != nil && (*_ppStmt) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116426), unsafe.Pointer(&_sqlite3_prepare_v2Ø00__func__Ø000), unsafe.Pointer(str(50419)))
crt.X__builtin_abort(tls)
}
}()
@@ -46715,323 +46635,317 @@ func Xsqlite3_prepare_v2(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _nBytes int32
var _sqlite3_prepare_v2Ø00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_prepare_v2Ø00__func__Ø000[0], str(61925), 19)
+ crt.Xstrncpy(nil, &_sqlite3_prepare_v2Ø00__func__Ø000[0], str(60083), 19)
}
-// Advance the pragma virtual table cursor to the next row
-func _pragmaVtabNext(tls *crt.TLS, _pVtabCursor *Xsqlite3_file) (r0 int32) {
- var _rc int32
- var _pCsr *XPragmaVtabCursor
- _pCsr = (*XPragmaVtabCursor)(unsafe.Pointer(_pVtabCursor))
- _rc = i32(0)
- *(*int64)(unsafe.Pointer(&(_pCsr.X2))) += 1
- func() {
- if (_pCsr.X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115529), unsafe.Pointer((*int8)(unsafe.Pointer(&_pragmaVtabNextØ00__func__Ø000))), unsafe.Pointer(str(61944)))
- crt.X__builtin_abort(tls)
- }
- }()
- if i32(100) != Xsqlite3_step(tls, _pCsr.X1) {
- _rc = Xsqlite3_finalize(tls, _pCsr.X1)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pCsr.X1))) = nil
- _pragmaVtabCursorClear(tls, _pCsr)
- }
- return _rc
-}
-
-var _pragmaVtabNextØ00__func__Ø000 [15]int8
+var _sqlite3_execØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_pragmaVtabNextØ00__func__Ø000[0], str(61958), 15)
+ crt.Xstrncpy(nil, &_sqlite3_execØ00__func__Ø000[0], str(60102), 13)
}
-// This is the top-level implementation of sqlite3_step(). Call
-// sqlite3Step() to do most of the work. If a schema error occurs,
-// call sqlite3Reprepare() and try again.
+// C comment
+// /*
+// ** This is the top-level implementation of sqlite3_step(). Call
+// ** sqlite3Step() to do most of the work. If a schema error occurs,
+// ** call sqlite3Reprepare() and try again.
+// */
func Xsqlite3_step(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
var _rc, _rc2, _cnt, _2_savedPc int32
var _3_zErr *int8
var _db *Xsqlite3
var _v *TVdbe
- _rc = i32(0)
- _rc2 = i32(0)
+ _rc = int32(0)
+ _rc2 = int32(0)
_v = (*TVdbe)(_pStmt)
- _cnt = i32(0)
+ _cnt = int32(0)
if _vdbeSafetyNotNull(tls, _v) != 0 {
- return _sqlite3MisuseError(tls, i32(76755))
+ return _sqlite3MisuseError(tls, int32(76755))
}
- _db = (*Xsqlite3)(_v.X0)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- storebits18((*int16)(unsafe.Pointer(&(_v.X32))), int16(i32(0)), 2, 1)
+ _db = (*Xsqlite3)(_v.Xdb)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ storebits26(&_v.Xexpired, 0, 2, 1)
_1:
- if store1(&_rc, _sqlite3Step(tls, _v)) != i32(17) || postInc1(&_cnt, int32(1)) >= i32(50) {
+ if store2(&_rc, _sqlite3Step(tls, _v)) != int32(17) || postInc2(&_cnt, 1) >= int32(50) {
goto _2
}
- _2_savedPc = _v.X9
- _rc2 = store1(&_rc, _sqlite3Reprepare(tls, _v))
- if _rc != i32(0) {
+ _2_savedPc = _v.Xpc
+ _rc2 = store2(&_rc, _sqlite3Reprepare(tls, _v))
+ if _rc != int32(0) {
goto _2
}
Xsqlite3_reset(tls, _pStmt)
- if _2_savedPc >= i32(0) {
- storebits18((*int16)(unsafe.Pointer(&(_v.X32))), int16(i32(1)), 2, 1)
+ if _2_savedPc >= int32(0) {
+ storebits26(&_v.Xexpired, int16(1), 2, 1)
}
func() {
- if int32((uint32(_v.X32)<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76767), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_stepØ00__func__Ø000))), unsafe.Pointer(str(61973)))
+ if int32((uint32(_v.Xexpired)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76767), unsafe.Pointer(&_sqlite3_stepØ00__func__Ø000), unsafe.Pointer(str(60115)))
crt.X__builtin_abort(tls)
}
}()
goto _1
_2:
- if _rc2 == i32(0) {
+ if _rc2 == int32(0) {
goto _8
}
- _3_zErr = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, (*XMem)(_db.X56))))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_v.X22))
- if (_db.X17) == 0 {
- *(**int8)(unsafe.Pointer(&(_v.X22))) = _sqlite3DbStrDup(tls, _db, _3_zErr)
- *(*int32)(unsafe.Pointer(&(_v.X10))) = _rc2
+ _3_zErr = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, (*XMem)(_db.XpErr))))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_v.XzErrMsg))
+ if _db.XmallocFailed == 0 {
+ _v.XzErrMsg = _sqlite3DbStrDup(tls, _db, _3_zErr)
+ _v.Xrc = _rc2
goto _10
}
- *(**int8)(unsafe.Pointer(&(_v.X22))) = nil
- *(*int32)(unsafe.Pointer(&(_v.X10))) = store1(&_rc, _sqlite3NomemError(tls, i32(76785)))
+ _v.XzErrMsg = nil
+ _v.Xrc = store2(&_rc, _sqlite3NomemError(tls, int32(76785)))
_10:
_8:
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
_ = _cnt
panic(0)
}
-// Execute the statement pStmt, either until a row of data is ready, the
-// statement is completely executed or an error occurs.
-//
-// This routine implements the bulk of the logic behind the sqlite_step()
-// API. The only thing omitted is the automatic recompile if a
-// schema change has occurred. That detail is handled by the
-// outer sqlite3_step() wrapper procedure.
+// C comment
+// /*
+// ** Execute the statement pStmt, either until a row of data is ready, the
+// ** statement is completely executed or an error occurs.
+// **
+// ** This routine implements the bulk of the logic behind the sqlite_step()
+// ** API. The only thing omitted is the automatic recompile if a
+// ** schema change has occurred. That detail is handled by the
+// ** outer sqlite3_step() wrapper procedure.
+// */
func _sqlite3Step(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _rc int32
var _db *Xsqlite3
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76621), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StepØ00__func__Ø000))), unsafe.Pointer(str(9660)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76621), unsafe.Pointer(&_sqlite3StepØ00__func__Ø000), unsafe.Pointer(str(9615)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X5) != uint32(i32(770837923)) {
- Xsqlite3_reset(tls, (unsafe.Pointer)(_p))
+ if _p.Xmagic != uint32(770837923) {
+ Xsqlite3_reset(tls, unsafe.Pointer(_p))
}
- _db = (*Xsqlite3)(_p.X0)
- if (_db.X17) != 0 {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(7)
- return _sqlite3NomemError(tls, i32(76654))
+ _db = (*Xsqlite3)(_p.Xdb)
+ if _db.XmallocFailed != 0 {
+ _p.Xrc = int32(7)
+ return _sqlite3NomemError(tls, int32(76654))
}
- if ((_p.X9) <= i32(0)) && (((uint32(_p.X32) << uint(i32(31))) >> uint(i32(31))) != 0) {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(17)
- _rc = i32(1)
+ if (_p.Xpc <= int32(0)) && (((uint32(_p.Xexpired) << 31) >> 31) != 0) {
+ _p.Xrc = int32(17)
+ _rc = int32(1)
goto _end_of_step
}
- if (_p.X9) >= i32(0) {
+ if _p.Xpc >= int32(0) {
goto _6
}
- if (_db.X34) == i32(0) {
- *(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57))))) = i32(0)
+ if _db.XnVdbeActive == int32(0) {
+ *(*int32)(unsafe.Pointer(&_db.Xu1)) = int32(0)
}
func() {
- if (_db.X36) <= i32(0) && int32(_db.X15) != i32(0) && ((_db.X77) != int64(i32(0)) || (_db.X78) != int64(i32(0))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76671), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StepØ00__func__Ø000))), unsafe.Pointer(str(61987)))
+ if _db.XnVdbeWrite <= int32(0) && int32(_db.XautoCommit) != int32(0) && (_db.XnDeferredCons != (0) || _db.XnDeferredImmCons != (0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76671), unsafe.Pointer(&_sqlite3StepØ00__func__Ø000), unsafe.Pointer(str(60129)))
crt.X__builtin_abort(tls)
}
}()
- if ((((_db.X43) != nil) || ((int32(_db.X24) & i32(2)) != i32(0))) && (((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0)) && ((_p.X36) != nil) {
- _sqlite3OsCurrentTimeInt64(tls, (*Xsqlite3_vfs)(_db.X0), (*int64)(unsafe.Pointer(&(_p.X26))))
+ if (((_db.XxProfile != nil) || ((int32(_db.XmTrace) & int32(2)) != int32(0))) && ((_db.Xinit.Xbusy) == 0)) && (_p.XzSql != nil) {
+ _sqlite3OsCurrentTimeInt64(tls, (*Xsqlite3_vfs)(_db.XpVfs), &_p.XstartTime)
goto _17
}
func() {
- if (_p.X26) != int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76680), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StepØ00__func__Ø000))), unsafe.Pointer(str(62078)))
+ if _p.XstartTime != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76680), unsafe.Pointer(&_sqlite3StepØ00__func__Ø000), unsafe.Pointer(str(60220)))
crt.X__builtin_abort(tls)
}
}()
_17:
- *(*int32)(unsafe.Pointer(&(_db.X34))) += 1
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_db.X36))) += 1
+ _db.XnVdbeActive += 1
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) == int32(0) {
+ _db.XnVdbeWrite += 1
}
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- *(*int32)(unsafe.Pointer(&(_db.X35))) += 1
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) != 0 {
+ _db.XnVdbeRead += 1
}
- *(*int32)(unsafe.Pointer(&(_p.X9))) = i32(0)
+ _p.Xpc = int32(0)
_6:
- *(*int32)(unsafe.Pointer(&(_p.X28))) = i32(0)
- if ((uint32((_p.X32)>>uint(i32(2))) << uint(i32(30))) >> uint(i32(30))) != 0 {
+ _p.XrcApp = int32(0)
+ if ((uint32(_p.Xexpired>>2) << 30) >> 30) != 0 {
_rc = _sqlite3VdbeList(tls, _p)
goto _23
}
- *(*int32)(unsafe.Pointer(&(_db.X37))) += 1
+ _db.XnVdbeExec += 1
_rc = _sqlite3VdbeExec(tls, _p)
- *(*int32)(unsafe.Pointer(&(_db.X37))) -= 1
+ _db.XnVdbeExec -= 1
_23:
- if _rc == i32(100) {
+ if _rc == int32(100) {
goto _25
}
- if (_p.X26) > int64(i32(0)) {
+ if _p.XstartTime > (0) {
_invokeProfileCallback(tls, _db, _p)
}
_25:
- if _rc != i32(101) {
+ if _rc != int32(101) {
goto _26
}
func() {
- if (_p.X10) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76709), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StepØ00__func__Ø000))), unsafe.Pointer(str(62094)))
+ if _p.Xrc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76709), unsafe.Pointer(&_sqlite3StepØ00__func__Ø000), unsafe.Pointer(str(60236)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _doWalCallbacks(tls, _db)
- if (_p.X10) != i32(0) {
- _rc = i32(1)
+ _p.Xrc = _doWalCallbacks(tls, _db)
+ if _p.Xrc != int32(0) {
+ _rc = int32(1)
}
_26:
- *(*int32)(unsafe.Pointer(&(_db.X10))) = _rc
- if i32(7) == _sqlite3ApiExit(tls, (*Xsqlite3)(_p.X0), _p.X10) {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _sqlite3NomemError(tls, i32(76718))
+ _db.XerrCode = _rc
+ if int32(7) == _sqlite3ApiExit(tls, (*Xsqlite3)(_p.Xdb), _p.Xrc) {
+ _p.Xrc = _sqlite3NomemError(tls, int32(76718))
}
_end_of_step:
func() {
- if _rc != i32(100) && _rc != i32(101) && _rc != i32(1) && (_rc&i32(255)) != i32(5) && _rc != i32(21) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76728), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StepØ00__func__Ø000))), unsafe.Pointer(str(62111)))
+ if _rc != int32(100) && _rc != int32(101) && _rc != int32(1) && (_rc&int32(255)) != int32(5) && _rc != int32(21) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76728), unsafe.Pointer(&_sqlite3StepØ00__func__Ø000), unsafe.Pointer(str(60253)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X10) == i32(100) || (_p.X10) == i32(101)) && (_p.X10) != (_p.X28) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76731), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StepØ00__func__Ø000))), unsafe.Pointer(str(62212)))
+ if (_p.Xrc == int32(100) || _p.Xrc == int32(101)) && _p.Xrc != _p.XrcApp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76731), unsafe.Pointer(&_sqlite3StepØ00__func__Ø000), unsafe.Pointer(str(60354)))
crt.X__builtin_abort(tls)
}
}()
- if ((((uint32((_p.X32)>>uint(i32(9))) << uint(i32(31))) >> uint(i32(31))) != 0) && (_rc != i32(100))) && (_rc != i32(101)) {
+ if ((((uint32(_p.Xexpired>>9) << 31) >> 31) != 0) && (_rc != int32(100))) && (_rc != int32(101)) {
_rc = _sqlite3VdbeTransferError(tls, _p)
}
- return _rc & (_db.X11)
+ return _rc & _db.XerrMask
}
var _sqlite3StepØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StepØ00__func__Ø000[0], str(62273), 12)
+ crt.Xstrncpy(nil, &_sqlite3StepØ00__func__Ø000[0], str(60415), 12)
}
-// Terminate the current execution of an SQL statement and reset it
-// back to its starting state so that it can be reused. A success code from
-// the prior execution is returned.
-//
-// This routine sets the error code and string returned by
-// sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
+// C comment
+// /*
+// ** Terminate the current execution of an SQL statement and reset it
+// ** back to its starting state so that it can be reused. A success code from
+// ** the prior execution is returned.
+// **
+// ** This routine sets the error code and string returned by
+// ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
+// */
func Xsqlite3_reset(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
var _rc int32
var _2_db *Xsqlite3
var _2_v *TVdbe
if _pStmt == nil {
- _rc = i32(0)
+ _rc = int32(0)
goto _1
}
_2_v = (*TVdbe)(_pStmt)
- _2_db = (*Xsqlite3)(_2_v.X0)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_2_db.X3))
- if (_2_v.X26) > int64(i32(0)) {
+ _2_db = (*Xsqlite3)(_2_v.Xdb)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_2_db.Xmutex))
+ if _2_v.XstartTime > (0) {
_invokeProfileCallback(tls, _2_db, _2_v)
}
_rc = _sqlite3VdbeReset(tls, _2_v)
_sqlite3VdbeRewind(tls, _2_v)
func() {
- if (_rc & (_2_db.X11)) != _rc {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76231), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_resetØ00__func__Ø000))), unsafe.Pointer(str(62285)))
+ if (_rc & _2_db.XerrMask) != _rc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76231), unsafe.Pointer(&_sqlite3_resetØ00__func__Ø000), unsafe.Pointer(str(60427)))
crt.X__builtin_abort(tls)
}
}()
_rc = _sqlite3ApiExit(tls, _2_db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_2_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_2_db.Xmutex))
_1:
return _rc
}
-// Rewind the VDBE back to the beginning in preparation for
-// running it.
+// C comment
+// /*
+// ** Rewind the VDBE back to the beginning in preparation for
+// ** running it.
+// */
func _sqlite3VdbeRewind(tls *crt.TLS, _p *TVdbe) {
var _i int32
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73299), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRewindØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73299), unsafe.Pointer(&_sqlite3VdbeRewindØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X5) != uint32(i32(381479589)) && (_p.X5) != uint32(i32(1224384374)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73300), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRewindØ00__func__Ø000))), unsafe.Pointer(str(62310)))
+ if _p.Xmagic != uint32(381479589) && _p.Xmagic != uint32(1224384374) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73300), unsafe.Pointer(&_sqlite3VdbeRewindØ00__func__Ø000), unsafe.Pointer(str(60452)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X27) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73304), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRewindØ00__func__Ø000))), unsafe.Pointer(str(41716)))
+ if _p.XnOp <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73304), unsafe.Pointer(&_sqlite3VdbeRewindØ00__func__Ø000), unsafe.Pointer(str(41671)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_p.X5))) = uint32(i32(770837923))
- _i = i32(0)
+ _p.Xmagic = uint32(770837923)
+ _i = int32(0)
_7:
- if _i >= (_p.X6) {
+ if _i >= _p.XnMem {
goto _10
}
func() {
- if (*Xsqlite3)((*XMem)(unsafe.Pointer(uintptr(_p.X18)+48*uintptr(_i))).X9) != (*Xsqlite3)(_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73311), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRewindØ00__func__Ø000))), unsafe.Pointer(str(62366)))
+ if (*Xsqlite3)(elem25((*XMem)(_p.XaMem), uintptr(_i)).Xdb) != (*Xsqlite3)(_p.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73311), unsafe.Pointer(&_sqlite3VdbeRewindØ00__func__Ø000), unsafe.Pointer(str(60508)))
crt.X__builtin_abort(tls)
}
}()
_i += 1
goto _7
_10:
- *(*int32)(unsafe.Pointer(&(_p.X9))) = i32(-1)
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(0)
- *(*uint8)(unsafe.Pointer(&(_p.X30))) = uint8(i32(2))
- *(*int32)(unsafe.Pointer(&(_p.X11))) = i32(0)
- *(*uint32)(unsafe.Pointer(&(_p.X8))) = uint32(i32(1))
- *(*uint8)(unsafe.Pointer(&(_p.X31))) = uint8(i32(255))
- *(*int32)(unsafe.Pointer(&(_p.X12))) = i32(0)
- *(*int64)(unsafe.Pointer(&(_p.X14))) = int64(i32(0))
+ _p.Xpc = int32(-1)
+ _p.Xrc = int32(0)
+ _p.XerrorAction = uint8(2)
+ _p.XnChange = int32(0)
+ _p.XcacheCtr = uint32(1)
+ _p.XminWriteFileFormat = uint8(255)
+ _p.XiStatement = int32(0)
+ _p.XnFkConstraint = 0
}
var _sqlite3VdbeRewindØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeRewindØ00__func__Ø000[0], str(62387), 18)
+ crt.Xstrncpy(nil, &_sqlite3VdbeRewindØ00__func__Ø000[0], str(60529), 18)
}
var _sqlite3_resetØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_resetØ00__func__Ø000[0], str(62405), 14)
-}
-
-// Give a listing of the program in the virtual machine.
-//
-// The interface is the same as sqlite3VdbeExec(). But instead of
-// running the code, it invokes the callback once for each instruction.
-// This feature is used to implement "EXPLAIN".
-//
-// When p->explain==1, each instruction is listed. When
-// p->explain==2, only OP_Explain instructions are listed and these
-// are shown in a different format. p->explain==2 is used to implement
-// EXPLAIN QUERY PLAN.
-//
-// When p->explain==1, first the main program is listed, then each of
-// the trigger subprograms are listed one by one.
+ crt.Xstrncpy(nil, &_sqlite3_resetØ00__func__Ø000[0], str(60547), 14)
+}
+
+// C comment
+// /*
+// ** Give a listing of the program in the virtual machine.
+// **
+// ** The interface is the same as sqlite3VdbeExec(). But instead of
+// ** running the code, it invokes the callback once for each instruction.
+// ** This feature is used to implement "EXPLAIN".
+// **
+// ** When p->explain==1, each instruction is listed. When
+// ** p->explain==2, only OP_Explain instructions are listed and these
+// ** are shown in a different format. p->explain==2 is used to implement
+// ** EXPLAIN QUERY PLAN.
+// **
+// ** When p->explain==1, first the main program is listed, then each of
+// ** the trigger subprograms are listed one by one.
+// */
func _sqlite3VdbeList(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _nRow, _nSub, _i, _rc, _10_j, _13_nByte, _13_j int32
var _8_zP4 *int8
@@ -47039,217 +46953,204 @@ func _sqlite3VdbeList(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _pSub, _pMem *XMem
var _8_pOp *XVdbeOp
var _apSub **XSubProgram
- _nSub = i32(0)
+ _nSub = int32(0)
_apSub = nil
_pSub = nil
- _db = (*Xsqlite3)(_p.X0)
- _rc = i32(0)
- _pMem = (*XMem)(unsafe.Pointer(uintptr(_p.X18) + 48*uintptr(i32(1))))
+ _db = (*Xsqlite3)(_p.Xdb)
+ _rc = int32(0)
+ _pMem = elem25((*XMem)(_p.XaMem), uintptr(1))
func() {
- if ((uint32((_p.X32)>>uint(i32(2))) << uint(i32(30))) >> uint(i32(30))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73035), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000))), unsafe.Pointer(str(62419)))
+ if ((uint32(_p.Xexpired>>2) << 30) >> 30) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73035), unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000), unsafe.Pointer(str(60561)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X5) != uint32(i32(770837923)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73036), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000))), unsafe.Pointer(str(62430)))
+ if _p.Xmagic != uint32(770837923) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73036), unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000), unsafe.Pointer(str(60572)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X10) != i32(0) && (_p.X10) != i32(5) && (_p.X10) != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73037), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000))), unsafe.Pointer(str(62455)))
+ if _p.Xrc != int32(0) && _p.Xrc != int32(5) && _p.Xrc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73037), unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000), unsafe.Pointer(str(60597)))
crt.X__builtin_abort(tls)
}
}()
- _releaseMemArray(tls, _pMem, i32(8))
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X21))))) = nil
- if (_p.X10) == _sqlite3NomemError(tls, i32(73046)) {
+ _releaseMemArray(tls, _pMem, int32(8))
+ *(**XMem)(unsafe.Pointer(&_p.XpResultSet)) = nil
+ if _p.Xrc == _sqlite3NomemError(tls, int32(73046)) {
_sqlite3OomFault(tls, _db)
- return i32(1)
+ return int32(1)
}
- _nRow = _p.X27
- if int32((uint32((_p.X32)>>uint(i32(2)))<<uint(i32(30)))>>uint(i32(30))) != i32(1) {
+ _nRow = _p.XnOp
+ if int32((uint32(_p.Xexpired>>2)<<30)>>30) != int32(1) {
goto _9
}
func() {
- if (_p.X6) <= i32(9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73066), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000))), unsafe.Pointer(str(62517)))
+ if _p.XnMem <= int32(9) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73066), unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000), unsafe.Pointer(str(60659)))
crt.X__builtin_abort(tls)
}
}()
- _pSub = (*XMem)(unsafe.Pointer(uintptr(_p.X18) + 48*uintptr(i32(9))))
- if (int32(_pSub.X1) & i32(16)) != 0 {
- _nSub = int32(uint32(_pSub.X4) / u32(4))
- _apSub = (**XSubProgram)(unsafe.Pointer(_pSub.X5))
+ _pSub = elem25((*XMem)(_p.XaMem), uintptr(9))
+ if (int32(_pSub.Xflags) & int32(16)) != 0 {
+ _nSub = int32(uint32(_pSub.Xn) / uint32(4))
+ _apSub = (**XSubProgram)(unsafe.Pointer(_pSub.Xz))
}
- _i = i32(0)
+ _i = int32(0)
_13:
if _i >= _nSub {
goto _16
}
- {
- p := &_nRow
- *p = (*p) + ((*(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apSub)) + 4*uintptr(_i)))).X1)
- sink1(*p)
- }
+ _nRow += (*elem63(_apSub, uintptr(_i))).XnOp
_i += 1
goto _13
_16:
_9:
- _i = postInc1((*int32)(unsafe.Pointer(&(_p.X9))), int32(1))
- if ((_i < _nRow) && (int32((uint32((_p.X32)>>uint(i32(2)))<<uint(i32(30)))>>uint(i32(30))) == i32(2))) && (int32((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr(_i))).X0) != i32(165)) {
+ _i = postInc2(&_p.Xpc, 1)
+ if ((_i < _nRow) && (int32((uint32(_p.Xexpired>>2)<<30)>>30) == int32(2))) && (int32(elem61((*XVdbeOp)(_p.XaOp), uintptr(_i)).Xopcode) != int32(165)) {
goto _9
}
if _i >= _nRow {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(0)
- _rc = i32(101)
+ _p.Xrc = int32(0)
+ _rc = int32(101)
goto _23
}
- if (*(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57)))))) != 0 {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(9)
- _rc = i32(1)
- _sqlite3VdbeError(tls, _p, _sqlite3ErrStr(tls, _p.X10))
+ if (*(*int32)(unsafe.Pointer(&_db.Xu1))) != 0 {
+ _p.Xrc = int32(9)
+ _rc = int32(1)
+ _sqlite3VdbeError(tls, _p, _sqlite3ErrStr(tls, _p.Xrc))
goto _23
}
- if _i < (_p.X27) {
- _8_pOp = (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(_i)))
+ if _i < _p.XnOp {
+ _8_pOp = elem61((*XVdbeOp)(_p.XaOp), uintptr(_i))
goto _25
}
- {
- p := &_i
- *p = (*p) - (_p.X27)
- sink1(*p)
- }
- _10_j = i32(0)
+ _i -= _p.XnOp
+ _10_j = int32(0)
_26:
- if _i < ((*(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apSub)) + 4*uintptr(_10_j)))).X1) {
+ if _i < ((*elem63(_apSub, uintptr(_10_j))).XnOp) {
goto _29
}
- {
- p := &_i
- *p = (*p) - ((*(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apSub)) + 4*uintptr(_10_j)))).X1)
- sink1(*p)
- }
+ _i -= (*elem63(_apSub, uintptr(_10_j))).XnOp
_10_j += 1
goto _26
_29:
- _8_pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((*(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apSub)) + 4*uintptr(_10_j)))).X0) + 24*uintptr(_i)))
+ _8_pOp = elem61((*XVdbeOp)((*elem63(_apSub, uintptr(_10_j))).XaOp), uintptr(_i))
_25:
- if int32((uint32((_p.X32)>>uint(i32(2)))<<uint(i32(30)))>>uint(i32(30))) != i32(1) {
+ if int32((uint32(_p.Xexpired>>2)<<30)>>30) != int32(1) {
goto _30
}
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64(_i)
+ _pMem.Xflags = uint16(4)
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64(_i)
*(*uintptr)(unsafe.Pointer(&_pMem)) += uintptr(48)
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(2562))
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = _sqlite3OpcodeName(tls, int32(_8_pOp.X0))
+ _pMem.Xflags = uint16(2562)
+ _pMem.Xz = _sqlite3OpcodeName(tls, int32(_8_pOp.Xopcode))
func() {
- if (_pMem.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73113), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000))), unsafe.Pointer(str(62527)))
+ if _pMem.Xz == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73113), unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000), unsafe.Pointer(str(60669)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = _sqlite3Strlen30(tls, _pMem.X5)
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = uint8(i32(1))
+ _pMem.Xn = _sqlite3Strlen30(tls, _pMem.Xz)
+ _pMem.Xenc = uint8(1)
*(*uintptr)(unsafe.Pointer(&_pMem)) += uintptr(48)
- if int32(_8_pOp.X1) != i32(-13) {
+ if int32(_8_pOp.Xp4type) != int32(-13) {
goto _33
}
- _13_nByte = int32(uint32(_nSub+i32(1)) * u32(4))
- _13_j = i32(0)
+ _13_nByte = int32(uint32(_nSub+int32(1)) * uint32(4))
+ _13_j = int32(0)
_34:
if _13_j >= _nSub {
goto _37
}
- if (*(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apSub)) + 4*uintptr(_13_j)))) == (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_8_pOp.X6)))))) {
+ if (*elem63(_apSub, uintptr(_13_j))) == (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer(&_8_pOp.Xp4))) {
goto _37
}
_13_j += 1
goto _34
_37:
- if (_13_j == _nSub) && (i32(0) == _sqlite3VdbeMemGrow(tls, _pSub, _13_nByte, bool2int(_nSub != i32(0)))) {
- _apSub = (**XSubProgram)(unsafe.Pointer(_pSub.X5))
- *(**XSubProgram)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apSub)) + 4*uintptr(postInc1(&_nSub, int32(1))))) = (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_8_pOp.X6))))))
+ if (_13_j == _nSub) && (int32(0) == _sqlite3VdbeMemGrow(tls, _pSub, _13_nByte, bool2int(_nSub != int32(0)))) {
+ _apSub = (**XSubProgram)(unsafe.Pointer(_pSub.Xz))
+ *elem63(_apSub, uintptr(postInc2(&_nSub, 1))) = (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer(&_8_pOp.Xp4)))
{
- p := (*uint16)(unsafe.Pointer(&(_pSub.X1)))
- *p = uint16(int32(*p) | i32(16))
- sink14(*p)
+ p := &_pSub.Xflags
+ *p = uint16(int32(*p) | int32(16))
}
- *(*int32)(unsafe.Pointer(&(_pSub.X4))) = int32(uint32(_nSub) * u32(4))
+ _pSub.Xn = int32(uint32(_nSub) * uint32(4))
}
_33:
_30:
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64(_8_pOp.X3)
+ _pMem.Xflags = uint16(4)
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64(_8_pOp.Xp1)
*(*uintptr)(unsafe.Pointer(&_pMem)) += uintptr(48)
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64(_8_pOp.X4)
+ _pMem.Xflags = uint16(4)
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64(_8_pOp.Xp2)
*(*uintptr)(unsafe.Pointer(&_pMem)) += uintptr(48)
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64(_8_pOp.X5)
+ _pMem.Xflags = uint16(4)
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64(_8_pOp.Xp3)
*(*uintptr)(unsafe.Pointer(&_pMem)) += uintptr(48)
- if _sqlite3VdbeMemClearAndResize(tls, _pMem, i32(100)) != 0 {
+ if _sqlite3VdbeMemClearAndResize(tls, _pMem, int32(100)) != 0 {
func() {
- if ((*Xsqlite3)(_p.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73151), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000))), unsafe.Pointer(str(62538)))
+ if ((*Xsqlite3)(_p.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73151), unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000), unsafe.Pointer(str(60680)))
crt.X__builtin_abort(tls)
}
}()
- return i32(1)
+ return int32(1)
}
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(514))
- _8_zP4 = _displayP4(tls, _8_pOp, _pMem.X5, _pMem.X7)
- if _8_zP4 != (_pMem.X5) {
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = i32(0)
- _sqlite3VdbeMemSetStr(tls, _pMem, _8_zP4, i32(-1), uint8(i32(1)), nil)
+ _pMem.Xflags = uint16(514)
+ _8_zP4 = _displayP4(tls, _8_pOp, _pMem.Xz, _pMem.XszMalloc)
+ if _8_zP4 != _pMem.Xz {
+ _pMem.Xn = int32(0)
+ _sqlite3VdbeMemSetStr(tls, _pMem, _8_zP4, int32(-1), uint8(1), nil)
goto _45
}
func() {
- if (_pMem.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73160), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000))), unsafe.Pointer(str(62527)))
+ if _pMem.Xz == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73160), unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000), unsafe.Pointer(str(60669)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = _sqlite3Strlen30(tls, _pMem.X5)
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = uint8(i32(1))
+ _pMem.Xn = _sqlite3Strlen30(tls, _pMem.Xz)
+ _pMem.Xenc = uint8(1)
_45:
*(*uintptr)(unsafe.Pointer(&_pMem)) += uintptr(48)
- if int32((uint32((_p.X32)>>uint(i32(2)))<<uint(i32(30)))>>uint(i32(30))) != i32(1) {
+ if int32((uint32(_p.Xexpired>>2)<<30)>>30) != int32(1) {
goto _48
}
- if _sqlite3VdbeMemClearAndResize(tls, _pMem, i32(4)) != 0 {
+ if _sqlite3VdbeMemClearAndResize(tls, _pMem, int32(4)) != 0 {
func() {
- if ((*Xsqlite3)(_p.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73168), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000))), unsafe.Pointer(str(62538)))
+ if ((*Xsqlite3)(_p.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73168), unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000), unsafe.Pointer(str(60680)))
crt.X__builtin_abort(tls)
}
}()
- return i32(1)
+ return int32(1)
}
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(514))
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = i32(2)
- Xsqlite3_snprintf(tls, i32(3), _pMem.X5, str(62558), int32(_8_pOp.X2))
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = uint8(i32(1))
+ _pMem.Xflags = uint16(514)
+ _pMem.Xn = int32(2)
+ Xsqlite3_snprintf(tls, int32(3), _pMem.Xz, str(60700), int32(_8_pOp.Xp5))
+ _pMem.Xenc = uint8(1)
*(*uintptr)(unsafe.Pointer(&_pMem)) += uintptr(48)
- if _sqlite3VdbeMemClearAndResize(tls, _pMem, i32(500)) != 0 {
+ if _sqlite3VdbeMemClearAndResize(tls, _pMem, int32(500)) != 0 {
func() {
- if ((*Xsqlite3)(_p.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73179), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000))), unsafe.Pointer(str(62538)))
+ if ((*Xsqlite3)(_p.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73179), unsafe.Pointer(&_sqlite3VdbeListØ00__func__Ø000), unsafe.Pointer(str(60680)))
crt.X__builtin_abort(tls)
}
}()
- return i32(1)
+ return int32(1)
}
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(514))
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = _displayComment(tls, _8_pOp, _8_zP4, _pMem.X5, i32(500))
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = uint8(i32(1))
+ _pMem.Xflags = uint16(514)
+ _pMem.Xn = _displayComment(tls, _8_pOp, _8_zP4, _pMem.Xz, int32(500))
+ _pMem.Xenc = uint8(1)
_48:
- *(*uint16)(unsafe.Pointer(&(_p.X29))) = uint16(i32(8) - (i32(4) * (int32((uint32((_p.X32)>>uint(i32(2)))<<uint(i32(30)))>>uint(i32(30))) - i32(1))))
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X21))))) = (*XMem)(unsafe.Pointer(uintptr(_p.X18) + 48*uintptr(i32(1))))
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(0)
- _rc = i32(100)
+ _p.XnResColumn = uint16(int32(8) - (int32(4) * (int32((uint32(_p.Xexpired>>2)<<30)>>30) - int32(1))))
+ *(**XMem)(unsafe.Pointer(&_p.XpResultSet)) = elem25((*XMem)(_p.XaMem), uintptr(1))
+ _p.Xrc = int32(0)
+ _rc = int32(100)
_23:
return _rc
}
@@ -47257,11 +47158,14 @@ _23:
var _sqlite3VdbeListØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeListØ00__func__Ø000[0], str(62563), 16)
+ crt.Xstrncpy(nil, &_sqlite3VdbeListØ00__func__Ø000[0], str(60705), 16)
}
-// Execute as much of a VDBE program as we can.
-// This is the core of sqlite3_step().
+// C comment
+// /*
+// ** Execute as much of a VDBE program as we can.
+// ** This is the core of sqlite3_step().
+// */
func _sqlite3VdbeExec(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _nExtraDelete, _rc, _iCompare, _3_i, _3_once, _25_pcDest, _27_pcx, _45_cnt, _51_n, _51_p1, _51_p2, _55_n, _60_i, _87_n, _88_i, _113_res, _113_res2, _140_n, _140_i, _140_p1, _140_p2, _140_idx, _140_bRev, _143_k, _143_mx, _151_v1, _151_v2, _169_c, _179_p2, _179_len, _179_i, _215_nHdr, _215_nVarint, _215_nField, _215_file_format, _215_i, _215_j, _229_p1, _229_nName, _229_iSavepoint, _229_ii, _240_isTransaction, _244_isSchemaChange, _256_desiredAutoCommit, _256_iRollback, _266_iMeta, _266_iGen, _277_iMeta, _277_iDb, _277_iCookie, _282_nField, _282_p2, _282_iDb, _282_wrFlag, _295_pgno, _303_res, _303_oc, _303_nField, _303_eqOnly, _313_i, _324_alreadyExists, _324_takeJump, _324_ii, _324_res, _334_res, _340_res, _340_cnt, _356_seekResult, _356_op, _366_opflags, _377_res, _377_nKeyCol, _390_res, _394_res, _397_res, _400_res, _406_res, _414_res, _417_i, _420_iMoved, _420_iDb, _424_nChange, _430_pgno, _430_flags, _434_iDb, _445_nRoot, _445_nErr, _454_iSet, _454_exists, _458_nMem, _458_nByte, _485_n, _486_i, _496_i, _499_eNew, _499_eOld, _515_p1, _526_nArg, _526_iQuery, _526_res, _526_i, _532_res, _536_nArg, _536_i, _548_i int32
var _66_nByte, _73_iA, _73_iB, _94_iA, _94_iB, _215_nByte, _215_nZero, _228_nEntry, _303_iKey, _340_v, _367_iKey, _382_v, _394_sz, _408_rowid, _451_val, _479_x, _536_rowid int64
@@ -47287,7 +47191,6 @@ func _sqlite3VdbeExec(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _179_sMem, _486_t, _519_sMem XMem
var _aMem, _pIn1, _pIn2, _pIn3, _pOut, _49_pVar, _60_pMem, _179_pDest, _179_pReg, _215_pRec, _215_pData0, _215_pLast, _340_pMem, _356_pData, _356_pKey, _445_pnErr, _458_pRt, _458_pMem, _458_pEnd, _465_pIn, _486_pMem, _493_pMem, _496_pMem, _526_pQuery, _526_pArgc, _528_pDest, _535_pName, _536_pX *XMem
var _526_apArg, _536_apArg **XMem
- var _522_pVCur, _526_pVCur *Xsqlite3_file
var _179_pCrsr, _228_pCrsr, _334_pCrsr, _379_pCrsr, _390_pCrsr, _394_pCrsr, _397_pCrsr, _406_pCrsr *XBtCursor
var _324_pFree, _324_pIdxKey *XUnpackedRecord
var _303_r, _324_r, _406_r, _414_r XUnpackedRecord
@@ -47300,582 +47203,583 @@ func _sqlite3VdbeExec(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _140_pColl *XCollSeq
var _382_pVtab, _522_pVtab, _526_pVtab, _528_pVtab, _532_pVtab, _535_pVtab, _536_pVtab *Xsqlite3_vtab
var _179_pC, _282_pCur, _291_pOrig, _291_pCx, _292_pCx, _298_pCx, _299_pC, _301_pCx, _303_pC, _324_pC, _334_pC, _340_pC, _356_pC, _366_pC, _377_pC, _378_pC, _379_pC, _382_pC, _388_pC, _390_pC, _394_pC, _397_pC, _400_pC, _403_pC, _406_pC, _408_pC, _408_pTabCur, _414_pC, _427_pC, _522_pCur, _526_pCur, _528_pCur, _532_pCur *XVdbeCursor
+ var _522_pVCur, _526_pVCur *Xsqlite3_vtab_cursor
var _382_pModule, _522_pModule, _526_pModule, _528_pModule, _532_pModule, _536_pModule *Xsqlite3_module
var _229_pNew, _229_pSavepoint, _229_pTmp *XSavepoint
var _434_initData XInitData
var _550_x func(*crt.TLS, unsafe.Pointer, *int8)
- _aOp = (*XVdbeOp)(_p.X17)
+ _aOp = (*XVdbeOp)(_p.XaOp)
_pOp = _aOp
- _nExtraDelete = i32(0)
- _rc = i32(0)
- _db = (*Xsqlite3)(_p.X0)
- _resetSchemaOnFault = u8(0)
- _encoding = _db.X14
- _iCompare = i32(0)
- _nVmStep = u32(0)
- _nProgressLimit = u32(0)
- _aMem = (*XMem)(_p.X18)
+ _nExtraDelete = int32(0)
+ _rc = int32(0)
+ _db = (*Xsqlite3)(_p.Xdb)
+ _resetSchemaOnFault = uint8(0)
+ _encoding = _db.Xenc
+ _iCompare = int32(0)
+ _nVmStep = uint32(0)
+ _nProgressLimit = uint32(0)
+ _aMem = (*XMem)(_p.XaMem)
_pIn1 = nil
_pIn2 = nil
_pIn3 = nil
_pOut = nil
func() {
- if (_p.X5) != uint32(i32(770837923)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78878), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62430)))
+ if _p.Xmagic != uint32(770837923) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78878), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60572)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeEnter(tls, _p)
- if (_p.X10) == i32(7) {
+ if _p.Xrc == int32(7) {
goto _no_mem
}
func() {
- if (_p.X10) != i32(0) && ((_p.X10)&i32(255)) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78885), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62579)))
+ if _p.Xrc != int32(0) && (_p.Xrc&int32(255)) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78885), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60721)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((uint32((_p.X32)>>uint(i32(8)))<<uint(i32(31)))>>uint(i32(31))) == 0 && int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78886), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62625)))
+ if ((uint32(_p.Xexpired>>8)<<31)>>31) == 0 && int32((uint32(_p.Xexpired>>7)<<31)>>31) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78886), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60767)))
crt.X__builtin_abort(tls)
}
}()
- *(*int64)(unsafe.Pointer(&(_p.X13))) = int64(i32(0))
+ _p.XiCurrentTime = 0
func() {
- if int32((uint32((_p.X32)>>uint(i32(2)))<<uint(i32(30)))>>uint(i32(30))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78888), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62656)))
+ if int32((uint32(_p.Xexpired>>2)<<30)>>30) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78888), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60798)))
crt.X__builtin_abort(tls)
}
}()
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X21))))) = nil
- *(*int32)(unsafe.Pointer(&((*t19)(unsafe.Pointer(&(_db.X71))).X2))) = i32(0)
- if (*(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57)))))) != 0 {
+ *(**XMem)(unsafe.Pointer(&_p.XpResultSet)) = nil
+ _db.XbusyHandler.XnBusy = int32(0)
+ if (*(*int32)(unsafe.Pointer(&_db.Xu1))) != 0 {
goto _abort_due_to_interrupt
}
- if (_db.X61) != nil {
- _2_iPrior = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_p.X35))))) + 4*uintptr(i32(4))))
+ if _db.XxProgress != nil {
+ _2_iPrior = *elem7((*uint32)(unsafe.Pointer(&_p.XaCounter)), uintptr(4))
func() {
- if uint32(i32(0)) >= (_db.X63) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78896), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62670)))
+ if (0) >= _db.XnProgressOps {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78896), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60812)))
crt.X__builtin_abort(tls)
}
}()
- _nProgressLimit = (_db.X63) - (_2_iPrior % (_db.X63))
+ _nProgressLimit = _db.XnProgressOps - (_2_iPrior % _db.XnProgressOps)
}
_sqlite3BeginBenignMalloc(tls)
- if (_p.X9) != i32(0) || (((*Xsqlite3)(_p.X0).X6)&i32(134218753)) == i32(0) {
+ if _p.Xpc != int32(0) || (((*Xsqlite3)(_p.Xdb).Xflags)&int32(134218753)) == int32(0) {
goto _16
}
- _3_once = i32(1)
+ _3_once = int32(1)
_sqlite3VdbePrintSql(tls, _p)
- if (((*Xsqlite3)(_p.X0).X6) & i32(1024)) == 0 {
+ if (((*Xsqlite3)(_p.Xdb).Xflags) & int32(1024)) == 0 {
goto _17
}
- crt.Xprintf(tls, str(62691))
- _3_i = i32(0)
+ crt.Xprintf(tls, str(60833))
+ _3_i = int32(0)
_18:
- if _3_i >= (_p.X27) {
+ if _3_i >= _p.XnOp {
goto _21
}
- _sqlite3VdbePrintOp(tls, (*crt.XFILE)(Xstdout), _3_i, (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp))+24*uintptr(_3_i))))
+ _sqlite3VdbePrintOp(tls, (*crt.XFILE)(Xstdout), _3_i, elem61(_aOp, uintptr(_3_i)))
_3_i += 1
goto _18
_21:
_17:
- if (((*Xsqlite3)(_p.X0).X6) & i32(134217728)) == 0 {
+ if (((*Xsqlite3)(_p.Xdb).Xflags) & int32(134217728)) == 0 {
goto _22
}
- _3_i = i32(0)
+ _3_i = int32(0)
_23:
- if _3_i >= (_p.X27) {
+ if _3_i >= _p.XnOp {
goto _26
}
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp))+24*uintptr(_3_i))).X0) != i32(165) {
+ if int32(elem61(_aOp, uintptr(_3_i)).Xopcode) != int32(165) {
goto _27
}
if _3_once != 0 {
- crt.Xprintf(tls, str(62714))
+ crt.Xprintf(tls, str(60856))
}
- crt.Xprintf(tls, str(62732), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr(_3_i))).X6)))))))
- _3_once = i32(0)
+ crt.Xprintf(tls, str(60874), unsafe.Pointer(*(**int8)(unsafe.Pointer(&(elem61(_aOp, uintptr(_3_i)).Xp4)))))
+ _3_once = int32(0)
_27:
_3_i += 1
goto _23
_26:
_22:
- if (((*Xsqlite3)(_p.X0).X6) & i32(1)) != 0 {
- crt.Xprintf(tls, str(62736))
+ if (((*Xsqlite3)(_p.Xdb).Xflags) & int32(1)) != 0 {
+ crt.Xprintf(tls, str(60878))
}
_16:
_sqlite3EndBenignMalloc(tls)
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr(_p.X9)))
+ _pOp = elem61(_aOp, uintptr(_p.Xpc))
_30:
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78930), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78930), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uintptr(unsafe.Pointer(_pOp)) < uintptr(unsafe.Pointer(_aOp)) || uintptr(unsafe.Pointer(_pOp)) >= uintptr(unsafe.Pointer((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp))+24*uintptr(_p.X27))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78932), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62749)))
+ if crt.P2U(unsafe.Pointer(_pOp)) < crt.P2U(unsafe.Pointer(_aOp)) || crt.P2U(unsafe.Pointer(_pOp)) >= crt.P2U(unsafe.Pointer(elem61(_aOp, uintptr(_p.XnOp)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78932), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60891)))
crt.X__builtin_abort(tls)
}
}()
_nVmStep += 1
- if ((_db.X6) & i32(1)) != 0 {
+ if (_db.Xflags & int32(1)) != 0 {
_sqlite3VdbePrintOp(tls, (*crt.XFILE)(Xstdout), int32((uintptr(unsafe.Pointer(_pOp))-uintptr(unsafe.Pointer(_aOp)))/24), _pOp)
}
- _11_opProperty = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3OpcodeProperty)) + 1*uintptr(_pOp.X0)))
- if (int32(_11_opProperty) & i32(2)) == i32(0) {
+ _11_opProperty = *elem15((*uint8)(unsafe.Pointer(&_sqlite3OpcodeProperty)), uintptr(_pOp.Xopcode))
+ if (int32(_11_opProperty) & int32(2)) == int32(0) {
goto _40
}
func() {
- if (_pOp.X3) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78967), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62778)))
+ if _pOp.Xp1 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78967), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60920)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X3) > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78968), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62788)))
+ if _pOp.Xp1 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78968), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60930)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X3))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78969), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62822)))
+ if (int32(elem25(_aMem, uintptr(_pOp.Xp1)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78969), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60964)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3VdbeCheckMemInvariants(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X3)))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78970), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62849)))
+ if _sqlite3VdbeCheckMemInvariants(tls, elem25(_aMem, uintptr(_pOp.Xp1))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78970), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60991)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X3, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X3))))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp1, elem25(_aMem, uintptr(_pOp.Xp1)))
}
_40:
- if (int32(_11_opProperty) & i32(4)) == i32(0) {
+ if (int32(_11_opProperty) & int32(4)) == int32(0) {
goto _50
}
func() {
- if (_pOp.X4) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78974), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62895)))
+ if _pOp.Xp2 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78974), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61037)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X4) > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78975), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62905)))
+ if _pOp.Xp2 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78975), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61047)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X4))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78976), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62939)))
+ if (int32(elem25(_aMem, uintptr(_pOp.Xp2)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78976), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61081)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3VdbeCheckMemInvariants(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X4)))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78977), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62966)))
+ if _sqlite3VdbeCheckMemInvariants(tls, elem25(_aMem, uintptr(_pOp.Xp2))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78977), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61108)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X4, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X4))))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp2, elem25(_aMem, uintptr(_pOp.Xp2)))
}
_50:
- if (int32(_11_opProperty) & i32(8)) == i32(0) {
+ if (int32(_11_opProperty) & int32(8)) == int32(0) {
goto _60
}
func() {
- if (_pOp.X5) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78981), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63012)))
+ if _pOp.Xp3 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78981), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61154)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X5) > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78982), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63022)))
+ if _pOp.Xp3 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78982), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61164)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X5))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78983), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63056)))
+ if (int32(elem25(_aMem, uintptr(_pOp.Xp3)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78983), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61198)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3VdbeCheckMemInvariants(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X5)))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78984), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63083)))
+ if _sqlite3VdbeCheckMemInvariants(tls, elem25(_aMem, uintptr(_pOp.Xp3))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78984), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61225)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X5, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X5))))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp3, elem25(_aMem, uintptr(_pOp.Xp3)))
}
_60:
- if (int32(_11_opProperty) & i32(16)) != i32(0) {
+ if (int32(_11_opProperty) & int32(16)) != int32(0) {
func() {
- if (_pOp.X4) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78988), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62895)))
+ if _pOp.Xp2 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78988), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61037)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X4) > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78989), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62905)))
+ if _pOp.Xp2 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78989), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61047)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemAboutToChange(tls, _p, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X4))))
+ _sqlite3VdbeMemAboutToChange(tls, _p, elem25(_aMem, uintptr(_pOp.Xp2)))
}
- if (int32(_11_opProperty) & i32(32)) != i32(0) {
+ if (int32(_11_opProperty) & int32(32)) != int32(0) {
func() {
- if (_pOp.X5) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78993), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63012)))
+ if _pOp.Xp3 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78993), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61154)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X5) > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78994), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63022)))
+ if _pOp.Xp3 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78994), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61164)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemAboutToChange(tls, _p, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X5))))
+ _sqlite3VdbeMemAboutToChange(tls, _p, elem25(_aMem, uintptr(_pOp.Xp3)))
}
_pOrigOp = _pOp
- switch int32(_pOp.X0) {
- case i32(0):
+ switch int32(_pOp.Xopcode) {
+ case int32(0):
goto _144
- case i32(1):
+ case int32(1):
goto _145
- case i32(2):
+ case int32(2):
goto _146
- case i32(3):
+ case int32(3):
goto _184
- case i32(4):
+ case int32(4):
goto _185
- case i32(5):
+ case int32(5):
goto _185
- case i32(6):
+ case int32(6):
goto _1549
- case i32(7):
+ case int32(7):
goto _1549
- case i32(8):
+ case int32(8):
goto _225
- case i32(9):
+ case int32(9):
goto _226
- case i32(10):
+ case int32(10):
goto _227
- case i32(11):
+ case int32(11):
goto _235
- case i32(12):
+ case int32(12):
goto _239
- case i32(13):
+ case int32(13):
goto _81
- case i32(14):
+ case int32(14):
goto _82
- case i32(15):
+ case int32(15):
goto _84
- case i32(16):
+ case int32(16):
goto _86
- case i32(17):
+ case int32(17):
goto _117
- case i32(18):
+ case int32(18):
goto _129
- case i32(19):
+ case int32(19):
goto _132
- case i32(20):
+ case int32(20):
goto _134
- case i32(21):
+ case int32(21):
goto _135
- case i32(22):
+ case int32(22):
goto _135
- case i32(23):
+ case int32(23):
goto _139
- case i32(24):
+ case int32(24):
goto _159
- case i32(25):
+ case int32(25):
goto _159
- case i32(26):
+ case int32(26):
goto _159
- case i32(27):
+ case int32(27):
goto _159
- case i32(28):
+ case int32(28):
goto _163
- case i32(29):
+ case int32(29):
goto _163
- case i32(30):
+ case int32(30):
goto _163
- case i32(31):
+ case int32(31):
goto _166
- case i32(32):
+ case int32(32):
goto _1258
- case i32(33):
+ case int32(33):
goto _179
- case i32(34):
+ case int32(34):
goto _180
- case i32(35):
+ case int32(35):
goto _181
- case i32(36):
+ case int32(36):
goto _181
- case i32(37):
+ case int32(37):
goto _183
- case i32(38):
+ case int32(38):
goto _194
- case i32(39):
+ case int32(39):
goto _194
- case i32(40):
+ case int32(40):
goto _194
- case i32(41):
+ case int32(41):
goto _194
- case i32(42):
+ case int32(42):
goto _211
- case i32(43):
+ case int32(43):
goto _212
- case i32(44):
+ case int32(44):
goto _213
- case i32(45):
+ case int32(45):
goto _216
- case i32(46):
+ case int32(46):
goto _218
- case i32(47):
+ case int32(47):
goto _220
- case i32(48):
+ case int32(48):
goto _221
- case i32(49):
+ case int32(49):
goto _228
- case i32(50):
+ case int32(50):
goto _237
- case i32(51):
+ case int32(51):
goto _242
- case i32(52):
+ case int32(52):
goto _83
- case i32(53):
+ case int32(53):
goto _85
- case i32(54):
+ case int32(54):
goto _87
- case i32(55):
+ case int32(55):
goto _88
- case i32(56):
+ case int32(56):
goto _89
- case i32(57):
+ case int32(57):
goto _90
- case i32(58):
+ case int32(58):
goto _93
- case i32(59):
+ case int32(59):
goto _94
- case i32(60):
+ case int32(60):
goto _95
- case i32(61):
+ case int32(61):
goto _96
- case i32(62):
+ case int32(62):
goto _97
- case i32(63):
+ case int32(63):
goto _98
- case i32(64):
+ case int32(64):
goto _99
- case i32(65):
+ case int32(65):
goto _100
- case i32(66):
+ case int32(66):
goto _101
- case i32(67):
+ case int32(67):
goto _102
- case i32(68):
+ case int32(68):
goto _109
- case i32(69):
+ case int32(69):
goto _110
- case i32(70):
+ case int32(70):
goto _130
- case i32(71):
+ case int32(71):
goto _130
- case i32(72):
+ case int32(72):
goto _111
- case i32(73):
+ case int32(73):
goto _116
- case i32(74):
+ case int32(74):
goto _118
- case i32(75):
+ case int32(75):
goto _137
- case i32(76):
+ case int32(76):
goto _138
- case i32(77):
+ case int32(77):
goto _120
- case i32(78):
+ case int32(78):
goto _120
- case i32(79):
+ case int32(79):
goto _120
- case i32(80):
+ case int32(80):
goto _120
- case i32(81):
+ case int32(81):
goto _120
- case i32(82):
+ case int32(82):
goto _120
- case i32(83):
+ case int32(83):
goto _126
- case i32(84):
+ case int32(84):
goto _112
- case i32(85):
+ case int32(85):
goto _112
- case i32(86):
+ case int32(86):
goto _112
- case i32(87):
+ case int32(87):
goto _112
- case i32(88):
+ case int32(88):
goto _104
- case i32(89):
+ case int32(89):
goto _104
- case i32(90):
+ case int32(90):
goto _104
- case i32(91):
+ case int32(91):
goto _104
- case i32(92):
+ case int32(92):
goto _104
- case i32(93):
+ case int32(93):
goto _103
- case i32(94):
+ case int32(94):
goto _119
- case i32(95):
+ case int32(95):
goto _133
- case i32(96):
+ case int32(96):
goto _127
- case i32(97):
+ case int32(97):
goto _92
- case i32(98):
+ case int32(98):
goto _128
- case i32(99):
+ case int32(99):
goto _140
- case i32(100):
+ case int32(100):
goto _141
- case i32(101):
+ case int32(101):
goto _142
- case i32(102):
+ case int32(102):
goto _143
- case i32(103):
+ case int32(103):
goto _147
- case i32(104):
+ case int32(104):
goto _148
- case i32(105):
+ case int32(105):
goto _149
- case i32(106):
+ case int32(106):
goto _1013
- case i32(107):
+ case int32(107):
goto _1013
- case i32(108):
+ case int32(108):
goto _152
- case i32(109):
+ case int32(109):
goto _153
- case i32(110):
+ case int32(110):
goto _153
- case i32(111):
+ case int32(111):
goto _155
- case i32(112):
+ case int32(112):
goto _156
- case i32(113):
+ case int32(113):
goto _157
- case i32(114):
+ case int32(114):
goto _158
- case i32(116):
+ case int32(116):
goto _168
- case i32(117):
+ case int32(117):
goto _169
- case i32(118):
+ case int32(118):
goto _170
- case i32(119):
+ case int32(119):
goto _170
- case i32(120):
+ case int32(120):
goto _172
- case i32(121):
+ case int32(121):
goto _173
- case i32(122):
+ case int32(122):
goto _174
- case i32(123):
+ case int32(123):
goto _175
- case i32(124):
+ case int32(124):
goto _176
- case i32(125):
+ case int32(125):
goto _177
- case i32(126):
+ case int32(126):
goto _178
- case i32(127):
+ case int32(127):
goto _189
- case i32(128):
+ case int32(128):
goto _189
- case i32(129):
+ case int32(129):
goto _191
- case i32(130):
+ case int32(130):
goto _192
- case i32(131):
+ case int32(131):
goto _192
- case i32(132):
+ case int32(132):
goto _91
- case i32(133):
+ case int32(133):
goto _198
- case i32(134):
+ case int32(134):
goto _199
- case i32(135):
+ case int32(135):
goto _200
- case i32(136):
+ case int32(136):
goto _201
- case i32(137):
+ case int32(137):
goto _201
- case i32(138):
+ case int32(138):
goto _203
- case i32(139):
+ case int32(139):
goto _204
- case i32(140):
+ case int32(140):
goto _205
- case i32(141):
+ case int32(141):
goto _206
- case i32(142):
+ case int32(142):
goto _207
- case i32(143):
+ case int32(143):
goto _208
- case i32(144):
+ case int32(144):
goto _209
- case i32(145):
+ case int32(145):
goto _210
- case i32(146):
+ case int32(146):
goto _214
- case i32(147):
+ case int32(147):
goto _215
- case i32(148):
+ case int32(148):
goto _217
- case i32(149):
+ case int32(149):
goto _219
- case i32(150):
+ case int32(150):
goto _222
- case i32(151):
+ case int32(151):
goto _223
- case i32(152):
+ case int32(152):
goto _224
- case i32(153):
+ case int32(153):
goto _229
- case i32(154):
+ case int32(154):
goto _230
- case i32(155):
+ case int32(155):
goto _231
- case i32(156):
+ case int32(156):
goto _232
- case i32(157):
+ case int32(157):
goto _233
- case i32(158):
+ case int32(158):
goto _234
- case i32(159):
+ case int32(159):
goto _236
- case i32(160):
+ case int32(160):
goto _238
- case i32(161):
+ case int32(161):
goto _240
- case i32(162):
+ case int32(162):
goto _241
default:
goto _243
@@ -47883,483 +47787,474 @@ _60:
_81:
_jump_to_p2_and_check_for_interrupt:
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr((_pOp.X4)-i32(1))))
+ _pOp = elem61(_aOp, uintptr(_pOp.Xp2-int32(1)))
_check_for_interrupt:
- if (*(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57)))))) != 0 {
+ if (*(*int32)(unsafe.Pointer(&_db.Xu1))) != 0 {
goto _abort_due_to_interrupt
}
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_db.X61)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{nil})) || _nVmStep < _nProgressLimit {
+ if _db.XxProgress == nil || _nVmStep < _nProgressLimit {
goto _246
}
func() {
- if (_db.X63) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79076), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63129)))
+ if _db.XnProgressOps == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79076), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61271)))
crt.X__builtin_abort(tls)
}
}()
- _nProgressLimit = (_nVmStep + (_db.X63)) - (_nVmStep % (_db.X63))
- if (_db.X61)(tls, _db.X62) != 0 {
- _rc = i32(9)
+ _nProgressLimit = (_nVmStep + _db.XnProgressOps) - (_nVmStep % _db.XnProgressOps)
+ if _db.XxProgress(tls, _db.XpProgressArg) != 0 {
+ _rc = int32(9)
goto _abort_due_to_error
}
_246:
goto _250
_82:
func() {
- if (_pOp.X3) <= i32(0) || (_pOp.X3) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79094), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63149)))
+ if _pOp.Xp1 <= int32(0) || _pOp.Xp1 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79094), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61291)))
crt.X__builtin_abort(tls)
}
}()
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if bool2int((int32(_pIn1.X1)&i32(9312)) != i32(0)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79096), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63196)))
+ if bool2int((int32(_pIn1.Xflags)&int32(9312)) != int32(0)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79096), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61338)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeMemAboutToChange(tls, _p, _pIn1)
- *(*uint16)(unsafe.Pointer(&(_pIn1.X1))) = uint16(i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0))))) = int64(int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24))
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X3, _pIn1)
+ _pIn1.Xflags = uint16(4)
+ *(*int64)(unsafe.Pointer(&_pIn1.Xu)) = int64(int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp1, _pIn1)
}
_jump_to_p2:
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr((_pOp.X4)-i32(1))))
+ _pOp = elem61(_aOp, uintptr(_pOp.Xp2-int32(1)))
goto _250
_83:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if int32(_pIn1.X1) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79116), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63220)))
+ if int32(_pIn1.Xflags) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79116), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61362)))
crt.X__builtin_abort(tls)
}
}()
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0))))))))
- *(*uint16)(unsafe.Pointer(&(_pIn1.X1))) = uint16(i32(128))
+ _pOp = elem61(_aOp, uintptr(*(*int64)(unsafe.Pointer(&_pIn1.Xu))))
+ _pIn1.Xflags = uint16(128)
goto _250
_84:
func() {
- if (_pOp.X3) <= i32(0) || (_pOp.X3) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79134), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63149)))
+ if _pOp.Xp1 <= int32(0) || _pOp.Xp1 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79134), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61291)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X4) < i32(0) || (_pOp.X4) >= (_p.X27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79135), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63241)))
+ if _pOp.Xp2 < int32(0) || _pOp.Xp2 >= _p.XnOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79135), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61383)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X5) < i32(0) || (_pOp.X5) >= (_p.X27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79136), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63270)))
+ if _pOp.Xp3 < int32(0) || _pOp.Xp3 >= _p.XnOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79136), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61412)))
crt.X__builtin_abort(tls)
}
}()
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if (int32(_pOut.X1) & i32(9312)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79138), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63299)))
+ if (int32(_pOut.Xflags) & int32(9312)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79138), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61441)))
crt.X__builtin_abort(tls)
}
}()
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64((_pOp.X5) - i32(1))
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(4))
- if (_pOp.X4) != 0 {
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(_pOp.Xp3 - int32(1))
+ _pOut.Xflags = uint16(4)
+ if _pOp.Xp2 != 0 {
goto _jump_to_p2
}
goto _250
_85:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if int32(_pIn1.X1) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79156), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63220)))
+ if int32(_pIn1.Xflags) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79156), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61362)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) < int64(i32(0)) || (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) >= int64(_p.X27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79157), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63321)))
+ if (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) < (0) || (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) >= int64(_p.XnOp) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79157), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61463)))
crt.X__builtin_abort(tls)
}
}()
- _24_pCaller = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0))))))))
+ _24_pCaller = elem61(_aOp, uintptr(*(*int64)(unsafe.Pointer(&_pIn1.Xu))))
func() {
- if int32(_24_pCaller.X0) != i32(16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79159), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63354)))
+ if int32(_24_pCaller.Xopcode) != int32(16) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79159), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61496)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_24_pCaller.X4) < i32(0) || (_24_pCaller.X4) >= (_p.X27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79160), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63380)))
+ if _24_pCaller.Xp2 < int32(0) || _24_pCaller.Xp2 >= _p.XnOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79160), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61522)))
crt.X__builtin_abort(tls)
}
}()
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr((_24_pCaller.X4)-i32(1))))
- *(*uint16)(unsafe.Pointer(&(_pIn1.X1))) = uint16(i32(128))
+ _pOp = elem61(_aOp, uintptr(_24_pCaller.Xp2-int32(1)))
+ _pIn1.Xflags = uint16(128)
goto _250
_86:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if bool2int((int32(_pIn1.X1)&i32(9312)) != i32(0)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79182), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63196)))
+ if bool2int((int32(_pIn1.Xflags)&int32(9312)) != int32(0)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79182), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61338)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pIn1.X1))) = uint16(i32(4))
- _25_pcDest = int32(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0))))))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0))))) = int64(int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24))
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X3, _pIn1)
+ _pIn1.Xflags = uint16(4)
+ _25_pcDest = int32(*(*int64)(unsafe.Pointer(&_pIn1.Xu)))
+ *(*int64)(unsafe.Pointer(&_pIn1.Xu)) = int64(int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp1, _pIn1)
}
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr(_25_pcDest)))
+ _pOp = elem61(_aOp, uintptr(_25_pcDest))
goto _250
_87:
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- if (int32(_pIn3.X1) & i32(1)) == i32(0) {
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
+ if (int32(_pIn3.Xflags) & int32(1)) == int32(0) {
goto _250
}
_88:
_27_pcx = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
- if (_pOp.X3) != i32(0) || (*XVdbeFrame)(_p.X38) == nil {
+ if _pOp.Xp1 != int32(0) || _p.XpFrame == nil {
goto _286
}
- _27_pFrame = (*XVdbeFrame)(_p.X38)
- *(**XVdbeFrame)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X38))))) = (*XVdbeFrame)(_27_pFrame.X1)
- *(*int32)(unsafe.Pointer(&(_p.X40))) -= 1
- _sqlite3VdbeSetChanges(tls, _db, _p.X11)
+ _27_pFrame = (*XVdbeFrame)(_p.XpFrame)
+ *(**XVdbeFrame)(unsafe.Pointer(&_p.XpFrame)) = (*XVdbeFrame)(_27_pFrame.XpParent)
+ _p.XnFrame -= 1
+ _sqlite3VdbeSetChanges(tls, _db, _p.XnChange)
_27_pcx = _sqlite3VdbeFrameRestore(tls, _27_pFrame)
- if (_pOp.X4) == i32(4) {
- _27_pcx = ((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(_27_pcx))).X4) - i32(1)
+ if _pOp.Xp2 == int32(4) {
+ _27_pcx = (elem61((*XVdbeOp)(_p.XaOp), uintptr(_27_pcx)).Xp2) - int32(1)
}
- _aOp = (*XVdbeOp)(_p.X17)
- _aMem = (*XMem)(_p.X18)
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr(_27_pcx)))
+ _aOp = (*XVdbeOp)(_p.XaOp)
+ _aMem = (*XMem)(_p.XaMem)
+ _pOp = elem61(_aOp, uintptr(_27_pcx))
goto _250
_286:
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _pOp.X3
- *(*uint8)(unsafe.Pointer(&(_p.X30))) = uint8(_pOp.X4)
- *(*int32)(unsafe.Pointer(&(_p.X9))) = _27_pcx
+ _p.Xrc = _pOp.Xp1
+ _p.XerrorAction = uint8(_pOp.Xp2)
+ _p.Xpc = _27_pcx
func() {
- if int32(_pOp.X2) > i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79263), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63417)))
+ if int32(_pOp.Xp5) > int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79263), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61559)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X10) == 0 {
+ if _p.Xrc == 0 {
goto _290
}
- if (_pOp.X2) == 0 {
+ if _pOp.Xp5 == 0 {
goto _291
}
- _sqlite3VdbeError(tls, _p, str(63428), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3VdbeExecØ00azTypeØ001)) + 4*uintptr(int32(_pOp.X2)-i32(1))))))
- if (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) != nil {
- *(**int8)(unsafe.Pointer(&(_p.X22))) = _sqlite3MPrintf(tls, _db, str(63449), unsafe.Pointer(_p.X22), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))))
+ _sqlite3VdbeError(tls, _p, str(61570), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00azTypeØ001)), uintptr(int32(_pOp.Xp5)-int32(1)))))
+ if (*(**int8)(unsafe.Pointer(&_pOp.Xp4))) != nil {
+ _p.XzErrMsg = _sqlite3MPrintf(tls, _db, str(61591), unsafe.Pointer(_p.XzErrMsg), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pOp.Xp4))))
}
goto _293
_291:
- _sqlite3VdbeError(tls, _p, str(24576), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))))
+ _sqlite3VdbeError(tls, _p, str(24531), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pOp.Xp4))))
_293:
- Xsqlite3_log(tls, _pOp.X3, str(63456), _27_pcx, unsafe.Pointer(_p.X36), unsafe.Pointer(_p.X22))
+ Xsqlite3_log(tls, _pOp.Xp1, str(61598), _27_pcx, unsafe.Pointer(_p.XzSql), unsafe.Pointer(_p.XzErrMsg))
_290:
_rc = _sqlite3VdbeHalt(tls, _p)
func() {
- if _rc != i32(5) && _rc != i32(0) && _rc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79282), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63480)))
+ if _rc != int32(5) && _rc != int32(0) && _rc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79282), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61622)))
crt.X__builtin_abort(tls)
}
}()
- if _rc == i32(5) {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(5)
+ if _rc == int32(5) {
+ _p.Xrc = int32(5)
goto _299
}
func() {
- if _rc != i32(0) && ((_p.X10)&i32(255)) != i32(19) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79286), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63533)))
+ if _rc != int32(0) && (_p.Xrc&int32(255)) != int32(19) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79286), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61675)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc != i32(0) && (_db.X77) <= int64(i32(0)) && (_db.X78) <= int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79287), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63582)))
+ if _rc != int32(0) && _db.XnDeferredCons <= (0) && _db.XnDeferredImmCons <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79287), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61724)))
crt.X__builtin_abort(tls)
}
}()
_rc = func() int32 {
- if (_p.X10) != 0 {
- return i32(1)
+ if _p.Xrc != 0 {
+ return int32(1)
}
- return i32(101)
+ return int32(101)
}()
_299:
goto _vdbe_return
_89:
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(_pOp.X3)
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(_pOp.Xp1)
goto _250
_90:
_pOut = _out2Prerelease(tls, _p, _pOp)
func() {
- if (*(**int64)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79312), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63645)))
+ if (*(**int64)(unsafe.Pointer(&_pOp.Xp4))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79312), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61787)))
crt.X__builtin_abort(tls)
}
}()
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = *(*(**int64)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = *(*(**int64)(unsafe.Pointer(&_pOp.Xp4)))
goto _250
_91:
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(8))
+ _pOut.Xflags = uint16(8)
func() {
- if _sqlite3IsNaN(tls, *(*(**float64)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79327), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63661)))
+ if _sqlite3IsNaN(tls, *(*(**float64)(unsafe.Pointer(&_pOp.Xp4)))) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79327), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61803)))
crt.X__builtin_abort(tls)
}
}()
- *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = *(*(**float64)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ *(*float64)(unsafe.Pointer(&_pOut.Xu)) = *(*(**float64)(unsafe.Pointer(&_pOp.Xp4)))
goto _250
_92:
func() {
- if (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79342), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63691)))
+ if (*(**int8)(unsafe.Pointer(&_pOp.Xp4))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79342), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61833)))
crt.X__builtin_abort(tls)
}
}()
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*uint8)(unsafe.Pointer(&(_pOp.X0))) = uint8(i32(58))
- *(*int32)(unsafe.Pointer(&(_pOp.X3))) = _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- if int32(_encoding) == i32(1) {
+ _pOp.Xopcode = uint8(58)
+ _pOp.Xp1 = _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer(&_pOp.Xp4)))
+ if int32(_encoding) == int32(1) {
goto _315
}
- _rc = _sqlite3VdbeMemSetStr(tls, _pOut, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))), i32(-1), uint8(i32(1)), nil)
+ _rc = _sqlite3VdbeMemSetStr(tls, _pOut, *(**int8)(unsafe.Pointer(&_pOp.Xp4)), int32(-1), uint8(1), nil)
func() {
- if _rc != i32(0) && _rc != i32(18) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79350), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63704)))
+ if _rc != int32(0) && _rc != int32(18) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79350), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61846)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) != _sqlite3VdbeChangeEncoding(tls, _pOut, int32(_encoding)) {
+ if int32(0) != _sqlite3VdbeChangeEncoding(tls, _pOut, int32(_encoding)) {
goto _no_mem
}
func() {
- if (_pOut.X7) <= i32(0) || (_pOut.X6) != (_pOut.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79352), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63739)))
+ if _pOut.XszMalloc <= int32(0) || _pOut.XzMalloc != _pOut.Xz {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79352), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61881)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if bool2int((int32(_pOut.X1)&i32(9312)) != i32(0)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79353), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63782)))
+ if bool2int((int32(_pOut.Xflags)&int32(9312)) != int32(0)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79353), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61924)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pOut.X7))) = i32(0)
+ _pOut.XszMalloc = int32(0)
{
- p := (*uint16)(unsafe.Pointer(&(_pOut.X1)))
- *p = uint16(int32(*p) | i32(2048))
- sink14(*p)
+ p := &_pOut.Xflags
+ *p = uint16(int32(*p) | int32(2048))
}
- if int32(_pOp.X1) == i32(-1) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))))
+ if int32(_pOp.Xp4type) == int32(-1) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pOp.Xp4))))
}
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(-1))
- *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))) = _pOut.X5
- *(*int32)(unsafe.Pointer(&(_pOp.X3))) = _pOut.X4
+ _pOp.Xp4type = int8(-1)
+ *(**int8)(unsafe.Pointer(&_pOp.Xp4)) = _pOut.Xz
+ _pOp.Xp1 = _pOut.Xn
_315:
- if (_pOp.X3) > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0))))) {
+ if _pOp.Xp1 > (*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0)) {
goto _too_big
}
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79368), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79368), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
_93:
func() {
- if (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79385), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63691)))
+ if (*(**int8)(unsafe.Pointer(&_pOp.Xp4))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79385), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61833)))
crt.X__builtin_abort(tls)
}
}()
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(2562))
- *(**int8)(unsafe.Pointer(&(_pOut.X5))) = *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
- *(*int32)(unsafe.Pointer(&(_pOut.X4))) = _pOp.X3
- *(*uint8)(unsafe.Pointer(&(_pOut.X2))) = _encoding
- if (_pOp.X5) <= i32(0) {
+ _pOut.Xflags = uint16(2562)
+ _pOut.Xz = *(**int8)(unsafe.Pointer(&_pOp.Xp4))
+ _pOut.Xn = _pOp.Xp1
+ _pOut.Xenc = _encoding
+ if _pOp.Xp3 <= int32(0) {
goto _331
}
func() {
- if (_pOp.X5) > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79394), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63022)))
+ if _pOp.Xp3 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79394), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61164)))
crt.X__builtin_abort(tls)
}
}()
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
func() {
- if (int32(_pIn3.X1) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79396), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63806)))
+ if (int32(_pIn3.Xflags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79396), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61948)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0)))))) == int64(_pOp.X2) {
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(2576))
+ if (*(*int64)(unsafe.Pointer(&_pIn3.Xu))) == int64(_pOp.Xp5) {
+ _pOut.Xflags = uint16(2576)
}
_331:
goto _250
_94:
_pOut = _out2Prerelease(tls, _p, _pOp)
- _45_cnt = (_pOp.X5) - (_pOp.X4)
+ _45_cnt = _pOp.Xp3 - _pOp.Xp2
func() {
- if (_pOp.X5) > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79420), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63022)))
+ if _pOp.Xp3 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79420), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61164)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = store14(&_45_nullFlag, uint16(func() int32 {
- if (_pOp.X3) != 0 {
- return i32(257)
+ _pOut.Xflags = store76(&_45_nullFlag, uint16(func() int32 {
+ if _pOp.Xp1 != 0 {
+ return int32(257)
}
- return i32(1)
+ return int32(1)
}()))
- *(*int32)(unsafe.Pointer(&(_pOut.X4))) = i32(0)
+ _pOut.Xn = int32(0)
_341:
- if _45_cnt > i32(0) {
+ if _45_cnt > int32(0) {
*(*uintptr)(unsafe.Pointer(&_pOut)) += uintptr(48)
_sqlite3VdbeMemAboutToChange(tls, _p, _pOut)
_sqlite3VdbeMemSetNull(tls, _pOut)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = _45_nullFlag
- *(*int32)(unsafe.Pointer(&(_pOut.X4))) = i32(0)
+ _pOut.Xflags = _45_nullFlag
+ _pOut.Xn = int32(0)
_45_cnt -= 1
goto _341
}
goto _250
_95:
func() {
- if (_pOp.X3) <= i32(0) || (_pOp.X3) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79443), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63149)))
+ if _pOp.Xp1 <= int32(0) || _pOp.Xp1 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79443), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61291)))
crt.X__builtin_abort(tls)
}
}()
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-160)) | i32(1))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-160)) | int32(1))
goto _250
_96:
func() {
- if (_pOp.X3) > i32(1000000000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79456), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63828)))
+ if _pOp.Xp1 > int32(1000000000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79456), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61970)))
crt.X__builtin_abort(tls)
}
}()
_pOut = _out2Prerelease(tls, _p, _pOp)
- _sqlite3VdbeMemSetStr(tls, _pOut, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))), _pOp.X3, uint8(i32(0)), nil)
- *(*uint8)(unsafe.Pointer(&(_pOut.X2))) = _encoding
+ _sqlite3VdbeMemSetStr(tls, _pOut, *(**int8)(unsafe.Pointer(&_pOp.Xp4)), _pOp.Xp1, 0, nil)
+ _pOut.Xenc = _encoding
goto _250
_97:
func() {
- if (_pOp.X3) <= i32(0) || (_pOp.X3) > int32(_p.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79475), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63857)))
+ if _pOp.Xp1 <= int32(0) || _pOp.Xp1 > int32(_p.XnVar) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79475), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61999)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) != nil && (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) != _sqlite3VListNumToName(tls, _p.X25, _pOp.X3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79476), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63887)))
+ if (*(**int8)(unsafe.Pointer(&_pOp.Xp4))) != nil && (*(**int8)(unsafe.Pointer(&_pOp.Xp4))) != _sqlite3VListNumToName(tls, _p.XpVList, _pOp.Xp1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79476), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62029)))
crt.X__builtin_abort(tls)
}
}()
- _49_pVar = (*XMem)(unsafe.Pointer(uintptr(_p.X24) + 48*uintptr((_pOp.X3)-i32(1))))
+ _49_pVar = elem25((*XMem)(_p.XaVar), uintptr(_pOp.Xp1-int32(1)))
if _sqlite3VdbeMemTooBig(tls, _49_pVar) != 0 {
goto _too_big
}
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
- _sqlite3VdbeMemShallowCopy(tls, _pOut, _49_pVar, i32(2048))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp2))
+ _sqlite3VdbeMemShallowCopy(tls, _pOut, _49_pVar, int32(2048))
goto _250
_98:
- _51_n = _pOp.X5
- _51_p1 = _pOp.X3
- _51_p2 = _pOp.X4
+ _51_n = _pOp.Xp3
+ _51_p1 = _pOp.Xp1
+ _51_p2 = _pOp.Xp2
func() {
- if _51_n <= i32(0) || _51_p1 <= i32(0) || _51_p2 <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79504), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63955)))
+ if _51_n <= int32(0) || _51_p1 <= int32(0) || _51_p2 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79504), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62097)))
crt.X__builtin_abort(tls)
}
}()
func() {
if (_51_p1+_51_n) > _51_p2 && (_51_p2+_51_n) > _51_p1 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79505), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63975)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79505), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62117)))
crt.X__builtin_abort(tls)
}
}()
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_51_p1)))
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_51_p2)))
+ _pIn1 = elem25(_aMem, uintptr(_51_p1))
+ _pOut = elem25(_aMem, uintptr(_51_p2))
_362:
func() {
- if uintptr(unsafe.Pointer(_pOut)) > uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(((_p.X6)+i32(1))-(_p.X7)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79510), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63996)))
+ if crt.P2U(unsafe.Pointer(_pOut)) > crt.P2U(unsafe.Pointer(elem25(_aMem, uintptr((_p.XnMem+int32(1))-_p.XnCursor)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79510), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62138)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uintptr(unsafe.Pointer(_pIn1)) > uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(((_p.X6)+i32(1))-(_p.X7)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79511), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64034)))
+ if crt.P2U(unsafe.Pointer(_pIn1)) > crt.P2U(unsafe.Pointer(elem25(_aMem, uintptr((_p.XnMem+int32(1))-_p.XnCursor)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79511), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62176)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pIn1.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79512), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64072)))
+ if (int32(_pIn1.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79512), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62214)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeMemAboutToChange(tls, _p, _pOut)
_sqlite3VdbeMemMove(tls, _pOut, _pIn1)
- if (uintptr(unsafe.Pointer((*XMem)(_pOut.X11))) >= uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_51_p1)))))) && (uintptr(unsafe.Pointer((*XMem)(_pOut.X11))) < uintptr(unsafe.Pointer(_pOut))) {
- {
- p := (**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pOut.X11)))))
- *p = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 48*uintptr((_pOp.X4)-_51_p1)))
- sink20(*p)
- }
+ if (crt.P2U(_pOut.XpScopyFrom) >= crt.P2U(unsafe.Pointer(elem25(_aMem, uintptr(_51_p1))))) && (crt.P2U(_pOut.XpScopyFrom) < crt.P2U(unsafe.Pointer(_pOut))) {
+ *(*uintptr)(unsafe.Pointer(&_pOut.XpScopyFrom)) += 48 * uintptr(_pOp.Xp2-_51_p1)
}
- if ((int32(_pOut.X1) & i32(4096)) != i32(0)) && _sqlite3VdbeMemMakeWriteable(tls, _pOut) != 0 {
+ if ((int32(_pOut.Xflags) & int32(4096)) != int32(0)) && _sqlite3VdbeMemMakeWriteable(tls, _pOut) != 0 {
goto _no_mem
}
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, postInc1(&_51_p2, int32(1)), _pOut)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, postInc2(&_51_p2, 1), _pOut)
}
*(*uintptr)(unsafe.Pointer(&_pIn1)) += uintptr(48)
*(*uintptr)(unsafe.Pointer(&_pOut)) += uintptr(48)
- if preInc1(&_51_n, -1) != 0 {
+ if preInc2(&_51_n, -1) != 0 {
goto _362
}
goto _250
_99:
- _55_n = _pOp.X5
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _55_n = _pOp.Xp3
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp2))
func() {
if _pOut == _pIn1 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79542), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64089)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79542), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62231)))
crt.X__builtin_abort(tls)
}
}()
_376:
- _sqlite3VdbeMemShallowCopy(tls, _pOut, _pIn1, i32(4096))
- if ((int32(_pOut.X1) & i32(4096)) != i32(0)) && _sqlite3VdbeMemMakeWriteable(tls, _pOut) != 0 {
+ _sqlite3VdbeMemShallowCopy(tls, _pOut, _pIn1, int32(4096))
+ if ((int32(_pOut.Xflags) & int32(4096)) != int32(0)) && _sqlite3VdbeMemMakeWriteable(tls, _pOut) != 0 {
goto _no_mem
}
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pOut.X11))))) = nil
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, ((_pOp.X4)+(_pOp.X5))-_55_n, _pOut)
+ *(**XMem)(unsafe.Pointer(&_pOut.XpScopyFrom)) = nil
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, (_pOp.Xp2+_pOp.Xp3)-_55_n, _pOut)
}
- if postInc1(&_55_n, int32(-1)) == i32(0) {
+ if postInc2(&_55_n, -1) == int32(0) {
goto _377
}
*(*uintptr)(unsafe.Pointer(&_pOut)) += uintptr(48)
@@ -48368,199 +48263,194 @@ _376:
_377:
goto _250
_100:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp2))
func() {
if _pOut == _pIn1 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79573), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64089)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79573), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62231)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemShallowCopy(tls, _pOut, _pIn1, i32(4096))
- if (*XMem)(_pOut.X11) == nil {
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pOut.X11))))) = _pIn1
+ _sqlite3VdbeMemShallowCopy(tls, _pOut, _pIn1, int32(4096))
+ if (*XMem)(_pOut.XpScopyFrom) == nil {
+ *(**XMem)(unsafe.Pointer(&_pOut.XpScopyFrom)) = _pIn1
}
goto _250
_101:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if (int32(_pIn1.X1) & i32(4)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79591), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64100)))
+ if (int32(_pIn1.Xflags) & int32(4)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79591), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62242)))
crt.X__builtin_abort(tls)
}
}()
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
- _sqlite3VdbeMemSetInt64(tls, _pOut, *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0))))))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp2))
+ _sqlite3VdbeMemSetInt64(tls, _pOut, *(*int64)(unsafe.Pointer(&_pIn1.Xu)))
goto _250
_102:
func() {
- if int32(_p.X29) != (_pOp.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79609), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64127)))
+ if int32(_p.XnResColumn) != _pOp.Xp2 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79609), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62269)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X3) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79610), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62778)))
+ if _pOp.Xp1 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79610), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(60920)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_pOp.X3) + (_pOp.X4)) > ((((_p.X6) + i32(1)) - (_p.X7)) + i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79611), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64150)))
+ if (_pOp.Xp1 + _pOp.Xp2) > (((_p.XnMem + int32(1)) - _p.XnCursor) + int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79611), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62292)))
crt.X__builtin_abort(tls)
}
}()
- if ((*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_db.X61)})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{nil}))) && (_nVmStep >= _nProgressLimit)) && ((_db.X61)(tls, _db.X62) != i32(0)) {
- _rc = i32(9)
+ if ((_db.XxProgress != nil) && (_nVmStep >= _nProgressLimit)) && (_db.XxProgress(tls, _db.XpProgressArg) != int32(0)) {
+ _rc = int32(9)
goto _abort_due_to_error
}
- if i32(0) != store1(&_rc, _sqlite3VdbeCheckFk(tls, _p, i32(0))) {
+ if int32(0) != store2(&_rc, _sqlite3VdbeCheckFk(tls, _p, int32(0))) {
func() {
- if ((_db.X6) & i32(128)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79629), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64194)))
+ if (_db.Xflags & int32(128)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79629), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62336)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((uint32((_p.X32)>>uint(i32(6))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79630), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64221)))
+ if ((uint32(_p.Xexpired>>6) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79630), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62363)))
crt.X__builtin_abort(tls)
}
}()
goto _abort_due_to_error
}
func() {
- if (_p.X12) != i32(0) && ((_db.X6)&i32(128)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79649), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64240)))
+ if _p.XiStatement != int32(0) && (_db.Xflags&int32(128)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79649), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62382)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3VdbeCloseStatement(tls, _p, i32(1))
+ _rc = _sqlite3VdbeCloseStatement(tls, _p, int32(1))
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79651), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79651), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_p.X8))) = ((_p.X8) + uint32(i32(2))) | uint32(i32(1))
- _60_pMem = store20((**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X21))))), (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X3))))
- _60_i = i32(0)
+ _p.XcacheCtr = (_p.XcacheCtr + uint32(2)) | uint32(1)
+ _60_pMem = store25((**XMem)(unsafe.Pointer(&_p.XpResultSet)), elem25(_aMem, uintptr(_pOp.Xp1)))
+ _60_i = int32(0)
_406:
- if _60_i >= (_pOp.X4) {
+ if _60_i >= _pOp.Xp2 {
goto _409
}
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_60_pMem))+48*uintptr(_60_i))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79662), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64287)))
+ if (int32(elem25(_60_pMem, uintptr(_60_i)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79662), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62429)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_60_pMem))+48*uintptr(_60_i))).X1) & i32(4096)) != i32(0)) && _sqlite3VdbeMemMakeWriteable(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_60_pMem))+48*uintptr(_60_i)))) != 0 {
+ if ((int32(elem25(_60_pMem, uintptr(_60_i)).Xflags) & int32(4096)) != int32(0)) && _sqlite3VdbeMemMakeWriteable(tls, elem25(_60_pMem, uintptr(_60_i))) != 0 {
goto _no_mem
}
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_60_pMem))+48*uintptr(_60_i))).X1)&i32(4096)) != i32(0) && (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_60_pMem))+48*uintptr(_60_i))).X1)&i32(18)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79664), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64308)))
+ if (int32(elem25(_60_pMem, uintptr(_60_i)).Xflags)&int32(4096)) != int32(0) && (int32(elem25(_60_pMem, uintptr(_60_i)).Xflags)&int32(18)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79664), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62450)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemNulTerminate(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_60_pMem))+48*uintptr(_60_i))))
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, (_pOp.X3)+_60_i, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_60_pMem))+48*uintptr(_60_i))))
+ _sqlite3VdbeMemNulTerminate(tls, elem25(_60_pMem, uintptr(_60_i)))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp1+_60_i, elem25(_60_pMem, uintptr(_60_i)))
}
_60_i += 1
goto _406
_409:
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
goto _no_mem
}
- if (int32(_db.X24) & i32(4)) != 0 {
- (_db.X41)(tls, uint32(i32(4)), _db.X42, (unsafe.Pointer)(_p), nil)
+ if (int32(_db.XmTrace) & int32(4)) != 0 {
+ _db.XxTrace(tls, uint32(4), _db.XpTraceArg, unsafe.Pointer(_p), nil)
}
- *(*int32)(unsafe.Pointer(&(_p.X9))) = int32((uintptr(unsafe.Pointer(_pOp))-uintptr(unsafe.Pointer(_aOp)))/24) + i32(1)
- _rc = i32(100)
+ _p.Xpc = int32((uintptr(unsafe.Pointer(_pOp))-uintptr(unsafe.Pointer(_aOp)))/24) + int32(1)
+ _rc = int32(100)
goto _vdbe_return
_103:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pIn2 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pIn2 = elem25(_aMem, uintptr(_pOp.Xp2))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp3))
func() {
if _pIn1 == _pOut {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79701), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64382)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79701), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62524)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_pIn1.X1) | int32(_pIn2.X1)) & i32(1)) != 0 {
+ if ((int32(_pIn1.Xflags) | int32(_pIn2.Xflags)) & int32(1)) != 0 {
_sqlite3VdbeMemSetNull(tls, _pOut)
goto _250
}
if func() int32 {
- if (int32(_pIn1.X1) & i32(16384)) != 0 {
+ if (int32(_pIn1.Xflags) & int32(16384)) != 0 {
return _sqlite3VdbeMemExpandBlob(tls, _pIn1)
}
- return i32(0)
+ return int32(0)
}() != 0 || func() int32 {
- if (int32(_pIn2.X1) & i32(16384)) != 0 {
+ if (int32(_pIn2.Xflags) & int32(16384)) != 0 {
return _sqlite3VdbeMemExpandBlob(tls, _pIn2)
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _no_mem
}
- if ((int32(_pIn1.X1) & i32(18)) == i32(0)) && _sqlite3VdbeMemStringify(tls, _pIn1, _encoding, uint8(i32(0))) != 0 {
+ if ((int32(_pIn1.Xflags) & int32(18)) == int32(0)) && _sqlite3VdbeMemStringify(tls, _pIn1, _encoding, 0) != 0 {
goto _no_mem
}
- if ((int32(_pIn2.X1) & i32(18)) == i32(0)) && _sqlite3VdbeMemStringify(tls, _pIn2, _encoding, uint8(i32(0))) != 0 {
+ if ((int32(_pIn2.Xflags) & int32(18)) == int32(0)) && _sqlite3VdbeMemStringify(tls, _pIn2, _encoding, 0) != 0 {
goto _no_mem
}
- _66_nByte = int64((_pIn1.X4) + (_pIn2.X4))
- if _66_nByte > int64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0))))) {
+ _66_nByte = int64(_pIn1.Xn + _pIn2.Xn)
+ if _66_nByte > int64(*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0)) {
goto _too_big
}
- if _sqlite3VdbeMemGrow(tls, _pOut, int32(_66_nByte)+i32(2), bool2int(_pOut == _pIn2)) != 0 {
+ if _sqlite3VdbeMemGrow(tls, _pOut, int32(_66_nByte)+int32(2), bool2int(_pOut == _pIn2)) != 0 {
goto _no_mem
}
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(2))
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(2))
if _pOut != _pIn2 {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pOut.X5), (unsafe.Pointer)(_pIn2.X5), uint32(_pIn2.X4))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pOut.Xz), unsafe.Pointer(_pIn2.Xz), uint32(_pIn2.Xn))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOut.X5))+1*uintptr(_pIn2.X4)))), (unsafe.Pointer)(_pIn1.X5), uint32(_pIn1.X4))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOut.X5)) + 1*uintptr(_66_nByte))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOut.X5)) + 1*uintptr(_66_nByte+int64(i32(1))))) = int8(i32(0))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem1(_pOut.Xz, uintptr(_pIn2.Xn))), unsafe.Pointer(_pIn1.Xz), uint32(_pIn1.Xn))
+ *elem1(_pOut.Xz, uintptr(_66_nByte)) = 0
+ *elem1(_pOut.Xz, uintptr(_66_nByte+int64(1))) = 0
{
- p := (*uint16)(unsafe.Pointer(&(_pOut.X1)))
- *p = uint16(int32(*p) | i32(512))
- sink14(*p)
+ p := &_pOut.Xflags
+ *p = uint16(int32(*p) | int32(512))
}
- *(*int32)(unsafe.Pointer(&(_pOut.X4))) = int32(_66_nByte)
- *(*uint8)(unsafe.Pointer(&(_pOut.X2))) = _encoding
+ _pOut.Xn = int32(_66_nByte)
+ _pOut.Xenc = _encoding
goto _250
_104:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
_73_type1 = _numericType(tls, _pIn1)
- _pIn2 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _pIn2 = elem25(_aMem, uintptr(_pOp.Xp2))
_73_type2 = _numericType(tls, _pIn2)
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- _73_flags = uint16(int32(_pIn1.X1) | int32(_pIn2.X1))
- if ((int32(_73_type1) & int32(_73_type2)) & i32(4)) == i32(0) {
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp3))
+ _73_flags = uint16(int32(_pIn1.Xflags) | int32(_pIn2.Xflags))
+ if ((int32(_73_type1) & int32(_73_type2)) & int32(4)) == int32(0) {
goto _436
}
- _73_iA = *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))
- _73_iB = *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn2.X0)))))
- _73_bIntint = int8(i32(1))
- switch int32(_pOp.X0) {
- case i32(88):
+ _73_iA = *(*int64)(unsafe.Pointer(&_pIn1.Xu))
+ _73_iB = *(*int64)(unsafe.Pointer(&_pIn2.Xu))
+ _73_bIntint = int8(1)
+ switch int32(_pOp.Xopcode) {
+ case int32(88):
goto _438
- case i32(89):
+ case int32(89):
goto _439
- case i32(90):
+ case int32(90):
goto _440
- case i32(91):
+ case int32(91):
goto _441
default:
goto _442
@@ -48582,95 +48472,71 @@ _440:
}
goto _444
_441:
- if _73_iA == int64(i32(0)) {
+ if _73_iA == (0) {
goto _arithmetic_result_is_null
}
- if (_73_iA == int64(i32(-1))) && (_73_iB == i64(-9223372036854775808)) {
+ if (_73_iA == int64(-1)) && (_73_iB == int64(-9223372036854775808)) {
goto _fp_math
}
- {
- p := &_73_iB
- *p = (*p) / _73_iA
- sink6(*p)
- }
+ _73_iB /= _73_iA
goto _444
_442:
- if _73_iA == int64(i32(0)) {
+ if _73_iA == (0) {
goto _arithmetic_result_is_null
}
- if _73_iA == int64(i32(-1)) {
- _73_iA = int64(i32(1))
- }
- {
- p := &_73_iB
- *p = (*p) % _73_iA
- sink6(*p)
+ if _73_iA == int64(-1) {
+ _73_iA = int64(1)
}
+ _73_iB %= _73_iA
goto _444
_444:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = _73_iB
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(4))
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = _73_iB
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(4))
goto _454
_436:
- if (int32(_73_flags) & i32(1)) != i32(0) {
+ if (int32(_73_flags) & int32(1)) != int32(0) {
goto _arithmetic_result_is_null
}
- _73_bIntint = int8(i32(0))
+ _73_bIntint = 0
_fp_math:
_73_rA = _sqlite3VdbeRealValue(tls, _pIn1)
_73_rB = _sqlite3VdbeRealValue(tls, _pIn2)
- switch int32(_pOp.X0) {
- case i32(88):
+ switch int32(_pOp.Xopcode) {
+ case int32(88):
goto _456
- case i32(89):
+ case int32(89):
goto _457
- case i32(90):
+ case int32(90):
goto _458
- case i32(91):
+ case int32(91):
goto _459
default:
goto _460
}
_456:
- {
- p := &_73_rB
- *p = (*p) + _73_rA
- sink4(*p)
- }
+ _73_rB += _73_rA
goto _461
_457:
- {
- p := &_73_rB
- *p = (*p) - _73_rA
- sink4(*p)
- }
+ _73_rB -= _73_rA
goto _461
_458:
- {
- p := &_73_rB
- *p = (*p) * _73_rA
- sink4(*p)
- }
+ _73_rB *= _73_rA
goto _461
_459:
if _73_rA == float64(0) {
goto _arithmetic_result_is_null
}
- {
- p := &_73_rB
- *p = (*p) / _73_rA
- sink4(*p)
- }
+ _73_rB /= _73_rA
goto _461
_460:
_73_iA = int64(_73_rA)
_73_iB = int64(_73_rB)
- if _73_iA == int64(i32(0)) {
+ if _73_iA == (0) {
goto _arithmetic_result_is_null
}
- if _73_iA == int64(i32(-1)) {
- _73_iA = int64(i32(1))
+ if _73_iA == int64(-1) {
+ _73_iA = int64(1)
}
_73_rB = float64(_73_iB % _73_iA)
goto _461
@@ -48678,9 +48544,9 @@ _461:
if _sqlite3IsNaN(tls, _73_rB) != 0 {
goto _arithmetic_result_is_null
}
- *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = _73_rB
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(8))
- if (((int32(_73_type1) | int32(_73_type2)) & i32(8)) == i32(0)) && (_73_bIntint == 0) {
+ *(*float64)(unsafe.Pointer(&_pOut.Xu)) = _73_rB
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(8))
+ if (((int32(_73_type1) | int32(_73_type2)) & int32(8)) == int32(0)) && (_73_bIntint == 0) {
_sqlite3VdbeIntegerAffinity(tls, _pOut)
}
_454:
@@ -48690,112 +48556,113 @@ _arithmetic_result_is_null:
goto _250
_109:
func() {
- if int32(_pOp.X1) != i32(-3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79874), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64393)))
+ if int32(_pOp.Xp4type) != int32(-3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79874), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62535)))
crt.X__builtin_abort(tls)
}
}()
- if (_pOp.X3) != 0 {
- _sqlite3VdbeMemSetInt64(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X3))), int64(i32(0)))
+ if _pOp.Xp1 != 0 {
+ _sqlite3VdbeMemSetInt64(tls, elem25(_aMem, uintptr(_pOp.Xp1)), 0)
}
goto _250
_110:
func() {
- if int32(_pOp.X1) != i32(-4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79926), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64417)))
+ if int32(_pOp.Xp4type) != int32(-4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79926), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62559)))
crt.X__builtin_abort(tls)
}
}()
- _87_n = int32(_pOp.X2)
+ _87_n = int32(_pOp.Xp5)
func() {
- if (_pOp.X5) <= i32(0) || (_pOp.X5) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79928), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64441)))
+ if _pOp.Xp3 <= int32(0) || _pOp.Xp3 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79928), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62583)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _87_n != i32(0) && ((_pOp.X4) <= i32(0) || ((_pOp.X4)+_87_n) > ((((_p.X6)+i32(1))-(_p.X7))+i32(1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79929), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64488)))
+ if _87_n != int32(0) && (_pOp.Xp2 <= int32(0) || (_pOp.Xp2+_87_n) > (((_p.XnMem+int32(1))-_p.XnCursor)+int32(1))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79929), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62630)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X5) >= (_pOp.X4) && (_pOp.X5) < ((_pOp.X4)+_87_n) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79930), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64549)))
+ if _pOp.Xp3 >= _pOp.Xp2 && _pOp.Xp3 < (_pOp.Xp2+_87_n) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79930), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62691)))
crt.X__builtin_abort(tls)
}
}()
- _87_pCtx = (*Xsqlite3_context)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(32)+(uint32(_87_n-i32(1))*u32(4)))))
+ _87_pCtx = (*Xsqlite3_context)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(32)+(uint32(_87_n-int32(1))*uint32(4)))))
if _87_pCtx == nil {
goto _no_mem
}
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_87_pCtx.X0))))) = nil
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_87_pCtx.X1))))) = (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- *(*int32)(unsafe.Pointer(&(_87_pCtx.X4))) = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_87_pCtx.X3))))) = _p
- *(*uint8)(unsafe.Pointer(&(_87_pCtx.X8))) = uint8(_87_n)
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(-16))
- *(**Xsqlite3_context)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))) = _87_pCtx
- *(*uint8)(unsafe.Pointer(&(_pOp.X0))) = uint8(i32(72))
+ *(**XMem)(unsafe.Pointer(&_87_pCtx.XpOut)) = nil
+ *(**XFuncDef)(unsafe.Pointer(&_87_pCtx.XpFunc)) = (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ _87_pCtx.XiOp = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
+ *(**TVdbe)(unsafe.Pointer(&_87_pCtx.XpVdbe)) = _p
+ _87_pCtx.Xargc = uint8(_87_n)
+ _pOp.Xp4type = int8(-16)
+ *(**Xsqlite3_context)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))) = _87_pCtx
+ _pOp.Xopcode = uint8(72)
_111:
func() {
- if int32(_pOp.X1) != i32(-16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79947), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64587)))
+ if int32(_pOp.Xp4type) != int32(-16) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79947), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62729)))
crt.X__builtin_abort(tls)
}
}()
- _88_pCtx = (*Xsqlite3_context)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- if (*XMem)(_88_pCtx.X0) == _pOut {
+ _88_pCtx = (*Xsqlite3_context)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp3))
+ if (*XMem)(_88_pCtx.XpOut) == _pOut {
goto _486
}
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_88_pCtx.X0))))) = _pOut
- _88_i = int32(_88_pCtx.X8) - i32(1)
+ *(**XMem)(unsafe.Pointer(&_88_pCtx.XpOut)) = _pOut
+ _88_i = int32(_88_pCtx.Xargc) - int32(1)
_487:
- if _88_i < i32(0) {
+ if _88_i < int32(0) {
goto _490
}
- *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_88_pCtx.X9))))) + 4*uintptr(_88_i))) = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr((_pOp.X4)+_88_i)))
+ *elem19((**XMem)(unsafe.Pointer(&_88_pCtx.Xargv)), uintptr(_88_i)) = elem25(_aMem, uintptr(_pOp.Xp2+_88_i))
_88_i -= 1
goto _487
_490:
_486:
_sqlite3VdbeMemAboutToChange(tls, _p, _pOut)
- _88_i = i32(0)
+ _88_i = int32(0)
_491:
- if _88_i >= int32(_88_pCtx.X8) {
+ if _88_i >= int32(_88_pCtx.Xargc) {
goto _494
}
func() {
- if (int32((*(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_88_pCtx.X9))))) + 4*uintptr(_88_i)))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(79963), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64611)))
+ if (int32((*elem19((**XMem)(unsafe.Pointer(&_88_pCtx.Xargv)), uintptr(_88_i))).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(79963), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62753)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, (_pOp.X4)+_88_i, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_88_pCtx.X9))))) + 4*uintptr(_88_i))))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp2+_88_i, *elem19((**XMem)(unsafe.Pointer(&_88_pCtx.Xargv)), uintptr(_88_i)))
}
_88_i += 1
goto _491
_494:
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(1))
- *(*uint8)(unsafe.Pointer(&(_88_pCtx.X7))) = uint8(i32(0))
- (*(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{((*XFuncDef)(_88_pCtx.X1).X4)})))(tls, _88_pCtx, int32(_88_pCtx.X8), (**XMem)(unsafe.Pointer((*[1]unsafe.Pointer)(unsafe.Pointer(&(_88_pCtx.X9))))))
- if (_88_pCtx.X7) == 0 {
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(1))
+ _88_pCtx.XfErrorOrAux = 0
+ func() func(*crt.TLS, *Xsqlite3_context, int32, **XMem) {
+ v := (*XFuncDef)(_88_pCtx.XpFunc).XxSFunc
+ return *(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer(&v))
+ }()(tls, _88_pCtx, int32(_88_pCtx.Xargc), (**XMem)(unsafe.Pointer(&_88_pCtx.Xargv)))
+ if _88_pCtx.XfErrorOrAux == 0 {
goto _498
}
- if (_88_pCtx.X5) != 0 {
- _sqlite3VdbeError(tls, _p, str(24576), unsafe.Pointer(Xsqlite3_value_text(tls, _pOut)))
- _rc = _88_pCtx.X5
+ if _88_pCtx.XisError != 0 {
+ _sqlite3VdbeError(tls, _p, str(24531), unsafe.Pointer(Xsqlite3_value_text(tls, _pOut)))
+ _rc = _88_pCtx.XisError
}
- _sqlite3VdbeDeleteAuxData(tls, _db, (**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X43))))), _88_pCtx.X4, _pOp.X3)
+ _sqlite3VdbeDeleteAuxData(tls, _db, (**XAuxData)(unsafe.Pointer(&_p.XpAuxData)), _88_pCtx.XiOp, _pOp.Xp1)
if _rc != 0 {
goto _abort_due_to_error
}
_498:
- if (int32(_pOut.X1) & i32(18)) == 0 {
+ if (int32(_pOut.Xflags) & int32(18)) == 0 {
goto _501
}
_sqlite3VdbeChangeEncoding(tls, _pOut, int32(_encoding))
@@ -48803,197 +48670,172 @@ _498:
goto _too_big
}
_501:
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X5, _pOut)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp3, _pOut)
}
goto _250
_112:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pIn2 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- if ((int32(_pIn1.X1) | int32(_pIn2.X1)) & i32(1)) != 0 {
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pIn2 = elem25(_aMem, uintptr(_pOp.Xp2))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp3))
+ if ((int32(_pIn1.Xflags) | int32(_pIn2.Xflags)) & int32(1)) != 0 {
_sqlite3VdbeMemSetNull(tls, _pOut)
goto _250
}
_94_iA = _sqlite3VdbeIntValue(tls, _pIn2)
_94_iB = _sqlite3VdbeIntValue(tls, _pIn1)
- _94_op = _pOp.X0
- if int32(_94_op) == i32(84) {
- {
- p := &_94_iA
- *p = (*p) & _94_iB
- sink6(*p)
- }
+ _94_op = _pOp.Xopcode
+ if int32(_94_op) == int32(84) {
+ _94_iA &= _94_iB
goto _509
}
- if int32(_94_op) == i32(85) {
- {
- p := &_94_iA
- *p = (*p) | _94_iB
- sink6(*p)
- }
+ if int32(_94_op) == int32(85) {
+ _94_iA |= _94_iB
goto _509
}
- if _94_iB == int64(i32(0)) {
+ if _94_iB == (0) {
goto _509
}
func() {
- if int32(_94_op) != i32(87) && int32(_94_op) != i32(86) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80046), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64637)))
+ if int32(_94_op) != int32(87) && int32(_94_op) != int32(86) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80046), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62779)))
crt.X__builtin_abort(tls)
}
}()
- if _94_iB < int64(i32(0)) {
- i32(0)
- _94_op = uint8(i32(173) - int32(_94_op))
+ if _94_iB < (0) {
+ _94_op = uint8(int32(173) - int32(_94_op))
_94_iB = func() int64 {
- if _94_iB > int64(i32(-64)) {
+ if _94_iB > int64(-64) {
return (-_94_iB)
}
- return int64(i32(64))
+ return int64(64)
}()
}
- if _94_iB >= int64(i32(64)) {
+ if _94_iB >= int64(64) {
_94_iA = int64(func() int32 {
- if (_94_iA >= int64(i32(0))) || (int32(_94_op) == i32(86)) {
- return i32(0)
+ if (_94_iA >= (0)) || (int32(_94_op) == int32(86)) {
+ return int32(0)
}
- return i32(-1)
+ return int32(-1)
}())
goto _520
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_94_uA), (unsafe.Pointer)(&_94_iA), u32(8))
- if int32(_94_op) == i32(86) {
- {
- p := &_94_uA
- *p = (*p) << uint(int32(_94_iB))
- sink17(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer(&_94_uA), unsafe.Pointer(&_94_iA), uint32(8))
+ if int32(_94_op) == int32(86) {
+ _94_uA <<= uint(int32(_94_iB))
goto _522
}
- {
- p := &_94_uA
- *p = (*p) >> uint(int32(_94_iB))
- sink17(*p)
- }
- if _94_iA < int64(i32(0)) {
- {
- p := &_94_uA
- *p = (*p) | (u64(18446744073709551615) << uint(int32(int64(i32(64))-_94_iB)))
- sink17(*p)
- }
+ _94_uA >>= uint(int32(_94_iB))
+ if _94_iA < (0) {
+ _94_uA |= uint64(18446744073709551615) << uint(int32(int64(64)-_94_iB))
}
_522:
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_94_iA), (unsafe.Pointer)(&_94_uA), u32(8))
+ crt.Xmemcpy(tls, unsafe.Pointer(&_94_iA), unsafe.Pointer(&_94_uA), uint32(8))
_520:
_509:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = _94_iA
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(4))
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = _94_iA
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(4))
goto _250
_116:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
_sqlite3VdbeMemAboutToChange(tls, _p, _pIn1)
_sqlite3VdbeMemIntegerify(tls, _pIn1)
- {
- p := (*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))
- *p = (*p) + int64(_pOp.X4)
- sink6(*p)
- }
+ *(*int64)(unsafe.Pointer(&_pIn1.Xu)) += int64(_pOp.Xp2)
goto _250
_117:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- if (int32(_pIn1.X1) & i32(4)) != i32(0) {
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ if (int32(_pIn1.Xflags) & int32(4)) != int32(0) {
goto _524
}
- _applyAffinity(tls, _pIn1, int8(i32(67)), _encoding)
- if (int32(_pIn1.X1) & i32(4)) != i32(0) {
+ _applyAffinity(tls, _pIn1, int8(67), _encoding)
+ if (int32(_pIn1.Xflags) & int32(4)) != int32(0) {
goto _525
}
- if (_pOp.X4) == i32(0) {
- _rc = i32(20)
+ if _pOp.Xp2 == int32(0) {
+ _rc = int32(20)
goto _abort_due_to_error
}
goto _jump_to_p2
_525:
_524:
- *(*uint16)(unsafe.Pointer(&(_pIn1.X1))) = uint16((int32(_pIn1.X1) & i32(-49664)) | i32(4))
+ _pIn1.Xflags = uint16((int32(_pIn1.Xflags) & int32(-49664)) | int32(4))
goto _250
_118:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- if (int32(_pIn1.X1) & i32(4)) != 0 {
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ if (int32(_pIn1.Xflags) & int32(4)) != 0 {
_sqlite3VdbeMemRealify(tls, _pIn1)
}
goto _250
_119:
func() {
- if (_pOp.X4) < i32(65) || (_pOp.X4) > i32(69) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80151), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64675)))
+ if _pOp.Xp2 < int32(65) || _pOp.Xp2 > int32(69) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80151), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62817)))
crt.X__builtin_abort(tls)
}
}()
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
_sqlite3VdbeMemAboutToChange(tls, _p, _pIn1)
_rc = func() int32 {
- if (int32(_pIn1.X1) & i32(16384)) != 0 {
+ if (int32(_pIn1.Xflags) & int32(16384)) != 0 {
return _sqlite3VdbeMemExpandBlob(tls, _pIn1)
}
- return i32(0)
+ return int32(0)
}()
- _sqlite3VdbeMemCast(tls, _pIn1, uint8(_pOp.X4), _encoding)
+ _sqlite3VdbeMemCast(tls, _pIn1, uint8(_pOp.Xp2), _encoding)
if _rc != 0 {
goto _abort_due_to_error
}
goto _250
_120:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- _113_flags1 = _pIn1.X1
- _113_flags3 = _pIn3.X1
- if ((int32(_113_flags1) | int32(_113_flags3)) & i32(1)) == 0 {
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
+ _113_flags1 = _pIn1.Xflags
+ _113_flags3 = _pIn3.Xflags
+ if ((int32(_113_flags1) | int32(_113_flags3)) & int32(1)) == 0 {
goto _535
}
- if (int32(_pOp.X2) & i32(128)) == 0 {
+ if (int32(_pOp.Xp5) & int32(128)) == 0 {
goto _536
}
func() {
- if int32(_pOp.X0) != i32(78) && int32(_pOp.X0) != i32(77) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80285), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64728)))
+ if int32(_pOp.Xopcode) != int32(78) && int32(_pOp.Xopcode) != int32(77) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80285), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62870)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_113_flags1) & i32(256)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80286), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64769)))
+ if (int32(_113_flags1) & int32(256)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80286), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62911)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pOp.X2) & i32(16)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80287), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64795)))
+ if (int32(_pOp.Xp5) & int32(16)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80287), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62937)))
crt.X__builtin_abort(tls)
}
}()
- if (((int32(_113_flags1) & int32(_113_flags3)) & i32(1)) != i32(0)) && ((int32(_113_flags3) & i32(256)) == i32(0)) {
- _113_res = i32(0)
+ if (((int32(_113_flags1) & int32(_113_flags3)) & int32(1)) != int32(0)) && ((int32(_113_flags3) & int32(256)) == int32(0)) {
+ _113_res = int32(0)
goto _546
}
- _113_res = i32(1)
+ _113_res = int32(1)
_546:
goto _547
_536:
- if (int32(_pOp.X2) & i32(32)) == 0 {
+ if (int32(_pOp.Xp5) & int32(32)) == 0 {
goto _548
}
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
- _iCompare = i32(1)
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp2))
+ _iCompare = int32(1)
_sqlite3VdbeMemAboutToChange(tls, _p, _pOut)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(1))
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X4, _pOut)
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(1))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp2, _pOut)
}
goto _550
_548:
- if (int32(_pOp.X2) & i32(16)) != 0 {
+ if (int32(_pOp.Xp5) & int32(16)) != 0 {
goto _jump_to_p2
}
_550:
@@ -49001,141 +48843,141 @@ _550:
_547:
goto _compare_op
_535:
- _113_affinity = int8(int32(_pOp.X2) & i32(71))
- if int32(_113_affinity) < i32(67) {
+ _113_affinity = int8(int32(_pOp.Xp5) & int32(71))
+ if int32(_113_affinity) < int32(67) {
goto _553
}
- if ((int32(_113_flags1) | int32(_113_flags3)) & i32(2)) == 0 {
+ if ((int32(_113_flags1) | int32(_113_flags3)) & int32(2)) == 0 {
goto _554
}
- if (int32(_113_flags1) & i32(14)) == i32(2) {
- _applyNumericAffinity(tls, _pIn1, i32(0))
- _113_flags3 = _pIn3.X1
+ if (int32(_113_flags1) & int32(14)) == int32(2) {
+ _applyNumericAffinity(tls, _pIn1, int32(0))
+ _113_flags3 = _pIn3.Xflags
}
- if (int32(_113_flags3) & i32(14)) == i32(2) {
- _applyNumericAffinity(tls, _pIn3, i32(0))
+ if (int32(_113_flags3) & int32(14)) == int32(2) {
+ _applyNumericAffinity(tls, _pIn3, int32(0))
}
_554:
- if ((int32(_pIn1.X1) & int32(_pIn3.X1)) & i32(4)) == i32(0) {
+ if ((int32(_pIn1.Xflags) & int32(_pIn3.Xflags)) & int32(4)) == int32(0) {
goto _557
}
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0)))))) > (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) {
- _113_res = i32(1)
+ if (*(*int64)(unsafe.Pointer(&_pIn3.Xu))) > (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) {
+ _113_res = int32(1)
goto _compare_op
}
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0)))))) < (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) {
- _113_res = i32(-1)
+ if (*(*int64)(unsafe.Pointer(&_pIn3.Xu))) < (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) {
+ _113_res = int32(-1)
goto _compare_op
}
- _113_res = i32(0)
+ _113_res = int32(0)
goto _compare_op
_557:
goto _561
_553:
- if int32(_113_affinity) != i32(66) {
+ if int32(_113_affinity) != int32(66) {
goto _561
}
- if ((int32(_113_flags1) & i32(2)) == i32(0)) && ((int32(_113_flags1) & i32(12)) != i32(0)) {
- _sqlite3VdbeMemStringify(tls, _pIn1, _encoding, uint8(i32(1)))
- _113_flags1 = uint16((int32(_pIn1.X1) & i32(-33280)) | (int32(_113_flags1) & i32(33279)))
+ if ((int32(_113_flags1) & int32(2)) == int32(0)) && ((int32(_113_flags1) & int32(12)) != int32(0)) {
+ _sqlite3VdbeMemStringify(tls, _pIn1, _encoding, uint8(1))
+ _113_flags1 = uint16((int32(_pIn1.Xflags) & int32(-33280)) | (int32(_113_flags1) & int32(33279)))
func() {
if _pIn1 == _pIn3 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80343), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64828)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80343), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62970)))
crt.X__builtin_abort(tls)
}
}()
}
- if ((int32(_113_flags3) & i32(2)) == i32(0)) && ((int32(_113_flags3) & i32(12)) != i32(0)) {
- _sqlite3VdbeMemStringify(tls, _pIn3, _encoding, uint8(i32(1)))
- _113_flags3 = uint16((int32(_pIn3.X1) & i32(-33280)) | (int32(_113_flags3) & i32(33279)))
+ if ((int32(_113_flags3) & int32(2)) == int32(0)) && ((int32(_113_flags3) & int32(12)) != int32(0)) {
+ _sqlite3VdbeMemStringify(tls, _pIn3, _encoding, uint8(1))
+ _113_flags3 = uint16((int32(_pIn3.Xflags) & int32(-33280)) | (int32(_113_flags3) & int32(33279)))
}
_561:
func() {
- if int32(_pOp.X1) != i32(-3) && (*XCollSeq)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80353), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64839)))
+ if int32(_pOp.Xp4type) != int32(-3) && (*XCollSeq)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80353), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62981)))
crt.X__builtin_abort(tls)
}
}()
- _113_res = _sqlite3MemCompare(tls, _pIn3, _pIn1, (*XCollSeq)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))))
+ _113_res = _sqlite3MemCompare(tls, _pIn3, _pIn1, (*XCollSeq)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))))
_compare_op:
- switch int32(_pOp.X0) {
- case i32(77):
+ switch int32(_pOp.Xopcode) {
+ case int32(77):
goto _573
- case i32(78):
+ case int32(78):
goto _572
- case i32(79):
+ case int32(79):
goto _576
- case i32(80):
+ case int32(80):
goto _575
- case i32(81):
+ case int32(81):
goto _574
default:
goto _577
}
_572:
- _113_res2 = bool2int(_113_res == i32(0))
+ _113_res2 = bool2int(_113_res == int32(0))
goto _578
_573:
_113_res2 = _113_res
goto _578
_574:
- _113_res2 = bool2int(_113_res < i32(0))
+ _113_res2 = bool2int(_113_res < int32(0))
goto _578
_575:
- _113_res2 = bool2int(_113_res <= i32(0))
+ _113_res2 = bool2int(_113_res <= int32(0))
goto _578
_576:
- _113_res2 = bool2int(_113_res > i32(0))
+ _113_res2 = bool2int(_113_res > int32(0))
goto _578
_577:
- _113_res2 = bool2int(_113_res >= i32(0))
+ _113_res2 = bool2int(_113_res >= int32(0))
goto _578
_578:
func() {
- if (int32(_pIn1.X1) & i32(1024)) != (int32(_113_flags1) & i32(1024)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80367), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64883)))
+ if (int32(_pIn1.Xflags) & int32(1024)) != (int32(_113_flags1) & int32(1024)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80367), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63025)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pIn1.X1))) = _113_flags1
+ _pIn1.Xflags = _113_flags1
func() {
- if (int32(_pIn3.X1) & i32(1024)) != (int32(_113_flags3) & i32(1024)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80369), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64929)))
+ if (int32(_pIn3.Xflags) & int32(1024)) != (int32(_113_flags3) & int32(1024)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80369), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63071)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pIn3.X1))) = _113_flags3
- if (int32(_pOp.X2) & i32(32)) == 0 {
+ _pIn3.Xflags = _113_flags3
+ if (int32(_pOp.Xp5) & int32(32)) == 0 {
goto _583
}
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp2))
_iCompare = _113_res
- _113_res2 = bool2int(_113_res2 != i32(0))
- if (int32(_pOp.X2) & i32(8)) == i32(0) {
+ _113_res2 = bool2int(_113_res2 != int32(0))
+ if (int32(_pOp.Xp5) & int32(8)) == int32(0) {
goto _584
}
func() {
- if int32(_pOp.X0) != i32(77) && int32(_pOp.X0) != i32(78) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80384), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64975)))
+ if int32(_pOp.Xopcode) != int32(77) && int32(_pOp.Xopcode) != int32(78) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80384), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63117)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _113_res2 != i32(0) && _113_res2 != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80385), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65016)))
+ if _113_res2 != int32(0) && _113_res2 != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80385), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63158)))
crt.X__builtin_abort(tls)
}
}()
- if bool2int(int32(_pOp.X0) == i32(78)) == _113_res2 {
+ if bool2int(int32(_pOp.Xopcode) == int32(78)) == _113_res2 {
goto _250
}
_584:
_sqlite3VdbeMemAboutToChange(tls, _p, _pOut)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(_113_res2)
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X4, _pOut)
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(4))
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(_113_res2)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp2, _pOut)
}
goto _593
_583:
@@ -49146,180 +48988,180 @@ _593:
goto _250
_126:
func() {
- if uintptr(unsafe.Pointer(_pOp)) <= uintptr(unsafe.Pointer(_aOp)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80414), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65035)))
+ if crt.P2U(unsafe.Pointer(_pOp)) <= crt.P2U(unsafe.Pointer(_aOp)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80414), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63177)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(-1)))).X0) != i32(81) && int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(-1)))).X0) != i32(79) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80415), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65043)))
+ if int32(elem61(_pOp, uintptr(4294967295)).Xopcode) != int32(81) && int32(elem61(_pOp, uintptr(4294967295)).Xopcode) != int32(79) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80415), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63185)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(-1)))).X2) & i32(32)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80416), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65090)))
+ if (int32(elem61(_pOp, uintptr(4294967295)).Xp5) & int32(32)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80416), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63232)))
crt.X__builtin_abort(tls)
}
}()
- if _iCompare != i32(0) {
+ if _iCompare != int32(0) {
goto _jump_to_p2
}
goto _250
_127:
func() {
- if int32(_pOp.X1) != i32(-12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80436), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65118)))
+ if int32(_pOp.Xp4type) != int32(-12) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80436), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63260)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(**int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80437), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65143)))
+ if (*(**int32)(unsafe.Pointer(&_pOp.Xp4))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80437), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63285)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(1)))).X0) != i32(98) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80438), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65154)))
+ if int32(elem61(_pOp, uintptr(1)).Xopcode) != int32(98) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80438), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63296)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(1)))).X2) & i32(1)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80439), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65180)))
+ if (int32(elem61(_pOp, uintptr(1)).Xp5) & int32(1)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80439), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63322)))
crt.X__builtin_abort(tls)
}
}()
goto _250
_128:
- if (int32(_pOp.X2) & i32(1)) == i32(0) {
+ if (int32(_pOp.Xp5) & int32(1)) == int32(0) {
_140_aPermute = nil
goto _612
}
func() {
- if uintptr(unsafe.Pointer(_pOp)) <= uintptr(unsafe.Pointer(_aOp)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80477), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65035)))
+ if crt.P2U(unsafe.Pointer(_pOp)) <= crt.P2U(unsafe.Pointer(_aOp)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80477), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63177)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(-1)))).X0) != i32(96) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80478), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65207)))
+ if int32(elem61(_pOp, uintptr(4294967295)).Xopcode) != int32(96) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80478), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63349)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(-1)))).X1) != i32(-12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80479), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65238)))
+ if int32(elem61(_pOp, uintptr(4294967295)).Xp4type) != int32(-12) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80479), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63380)))
crt.X__builtin_abort(tls)
}
}()
- _140_aPermute = (*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(*(**int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(-1)))).X6))))))) + uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(i32(1))))))*uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(4)))))))))))
+ _140_aPermute = (*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(*(**int32)(unsafe.Pointer(&(elem61(_pOp, uintptr(4294967295)).Xp4))))) + uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(int32(1))*uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(4)))))))))))
func() {
if _140_aPermute == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80481), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65266)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80481), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63408)))
crt.X__builtin_abort(tls)
}
}()
_612:
- _140_n = _pOp.X5
- _140_pKeyInfo = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ _140_n = _pOp.Xp3
+ _140_pKeyInfo = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
func() {
- if _140_n <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80485), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(1358)))
+ if _140_n <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80485), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(1376)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _140_pKeyInfo == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80486), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(45040)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80486), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(44995)))
crt.X__builtin_abort(tls)
}
}()
- _140_p1 = _pOp.X3
- _140_p2 = _pOp.X4
+ _140_p1 = _pOp.Xp1
+ _140_p2 = _pOp.Xp2
if _140_aPermute == nil {
goto _625
}
- _143_mx = i32(0)
- _143_k = i32(0)
+ _143_mx = int32(0)
+ _143_k = int32(0)
_626:
if _143_k >= _140_n {
goto _629
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_140_aPermute)) + 4*uintptr(_143_k)))) > _143_mx {
- _143_mx = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_140_aPermute)) + 4*uintptr(_143_k)))
+ if (*elem8(_140_aPermute, uintptr(_143_k))) > _143_mx {
+ _143_mx = *elem8(_140_aPermute, uintptr(_143_k))
}
_143_k += 1
goto _626
_629:
func() {
- if _140_p1 <= i32(0) || (_140_p1+_143_mx) > ((((_p.X6)+i32(1))-(_p.X7))+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80493), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65278)))
+ if _140_p1 <= int32(0) || (_140_p1+_143_mx) > (((_p.XnMem+int32(1))-_p.XnCursor)+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80493), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63420)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _140_p2 <= i32(0) || (_140_p2+_143_mx) > ((((_p.X6)+i32(1))-(_p.X7))+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80494), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65320)))
+ if _140_p2 <= int32(0) || (_140_p2+_143_mx) > (((_p.XnMem+int32(1))-_p.XnCursor)+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80494), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63462)))
crt.X__builtin_abort(tls)
}
}()
goto _637
_625:
func() {
- if _140_p1 <= i32(0) || (_140_p1+_140_n) > ((((_p.X6)+i32(1))-(_p.X7))+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80496), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65362)))
+ if _140_p1 <= int32(0) || (_140_p1+_140_n) > (((_p.XnMem+int32(1))-_p.XnCursor)+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80496), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63504)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _140_p2 <= i32(0) || (_140_p2+_140_n) > ((((_p.X6)+i32(1))-(_p.X7))+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80497), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65403)))
+ if _140_p2 <= int32(0) || (_140_p2+_140_n) > (((_p.XnMem+int32(1))-_p.XnCursor)+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80497), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63545)))
crt.X__builtin_abort(tls)
}
}()
_637:
- _140_i = i32(0)
+ _140_i = int32(0)
_644:
if _140_i >= _140_n {
goto _647
}
_140_idx = func() int32 {
if _140_aPermute != nil {
- return (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_140_aPermute)) + 4*uintptr(_140_i))))
+ return (*elem8(_140_aPermute, uintptr(_140_i)))
}
return _140_i
}()
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_140_p1+_140_idx))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80502), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65444)))
+ if (int32(elem25(_aMem, uintptr(_140_p1+_140_idx)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80502), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63586)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_140_p2+_140_idx))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80503), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65470)))
+ if (int32(elem25(_aMem, uintptr(_140_p2+_140_idx)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80503), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63612)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _140_p1+_140_idx, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_140_p1+_140_idx))))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _140_p1+_140_idx, elem25(_aMem, uintptr(_140_p1+_140_idx)))
}
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _140_p2+_140_idx, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_140_p2+_140_idx))))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _140_p2+_140_idx, elem25(_aMem, uintptr(_140_p2+_140_idx)))
}
func() {
- if _140_i >= int32(_140_pKeyInfo.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80506), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65496)))
+ if _140_i >= int32(_140_pKeyInfo.XnField) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80506), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63638)))
crt.X__builtin_abort(tls)
}
}()
- _140_pColl = *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_140_pKeyInfo.X6))))) + 4*uintptr(_140_i)))
- _140_bRev = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_140_pKeyInfo.X5)) + 1*uintptr(_140_i))))
- _iCompare = _sqlite3MemCompare(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_140_p1+_140_idx))), (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_140_p2+_140_idx))), _140_pColl)
+ _140_pColl = *elem62((**XCollSeq)(unsafe.Pointer(&_140_pKeyInfo.XaColl)), uintptr(_140_i))
+ _140_bRev = int32(*elem15(_140_pKeyInfo.XaSortOrder, uintptr(_140_i)))
+ _iCompare = _sqlite3MemCompare(tls, elem25(_aMem, uintptr(_140_p1+_140_idx)), elem25(_aMem, uintptr(_140_p2+_140_idx)), _140_pColl)
if _iCompare == 0 {
goto _658
}
@@ -49333,100 +49175,99 @@ _658:
_647:
goto _250
_129:
- if _iCompare < i32(0) {
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr((_pOp.X3)-i32(1))))
+ if _iCompare < int32(0) {
+ _pOp = elem61(_aOp, uintptr(_pOp.Xp1-int32(1)))
goto _663
}
- if _iCompare == i32(0) {
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr((_pOp.X4)-i32(1))))
+ if _iCompare == int32(0) {
+ _pOp = elem61(_aOp, uintptr(_pOp.Xp2-int32(1)))
goto _663
}
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr((_pOp.X5)-i32(1))))
+ _pOp = elem61(_aOp, uintptr(_pOp.Xp3-int32(1)))
_663:
goto _250
_130:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- if (int32(_pIn1.X1) & i32(1)) != 0 {
- _151_v1 = i32(2)
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ if (int32(_pIn1.Xflags) & int32(1)) != 0 {
+ _151_v1 = int32(2)
goto _665
}
- _151_v1 = bool2int(_sqlite3VdbeIntValue(tls, _pIn1) != int64(i32(0)))
+ _151_v1 = bool2int(_sqlite3VdbeIntValue(tls, _pIn1) != (0))
_665:
- _pIn2 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
- if (int32(_pIn2.X1) & i32(1)) != 0 {
- _151_v2 = i32(2)
+ _pIn2 = elem25(_aMem, uintptr(_pOp.Xp2))
+ if (int32(_pIn2.Xflags) & int32(1)) != 0 {
+ _151_v2 = int32(2)
goto _667
}
- _151_v2 = bool2int(_sqlite3VdbeIntValue(tls, _pIn2) != int64(i32(0)))
+ _151_v2 = bool2int(_sqlite3VdbeIntValue(tls, _pIn2) != (0))
_667:
- if int32(_pOp.X0) == i32(71) {
- _151_v1 = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3VdbeExecØ00and_logicØ002)) + 1*uintptr((_151_v1*i32(3))+_151_v2))))
+ if int32(_pOp.Xopcode) == int32(71) {
+ _151_v1 = int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3VdbeExecØ00and_logicØ002)), uintptr((_151_v1*int32(3))+_151_v2)))
goto _669
}
- _151_v1 = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3VdbeExecØ00or_logicØ003)) + 1*uintptr((_151_v1*i32(3))+_151_v2))))
+ _151_v1 = int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3VdbeExecØ00or_logicØ003)), uintptr((_151_v1*int32(3))+_151_v2)))
_669:
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- if _151_v1 == i32(2) {
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(1))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp3))
+ if _151_v1 == int32(2) {
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(1))
goto _671
}
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(_151_v1)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(4))
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(_151_v1)
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(4))
_671:
goto _250
_132:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp2))
_sqlite3VdbeMemSetNull(tls, _pOut)
- if (int32(_pIn1.X1) & i32(1)) == i32(0) {
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(bool2int(_sqlite3VdbeIntValue(tls, _pIn1) == 0))
+ if (int32(_pIn1.Xflags) & int32(1)) == int32(0) {
+ _pOut.Xflags = uint16(4)
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(bool2int(_sqlite3VdbeIntValue(tls, _pIn1) == 0))
}
goto _250
_133:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp2))
_sqlite3VdbeMemSetNull(tls, _pOut)
- if (int32(_pIn1.X1) & i32(1)) == i32(0) {
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = ^_sqlite3VdbeIntValue(tls, _pIn1)
+ if (int32(_pIn1.Xflags) & int32(1)) == int32(0) {
+ _pOut.Xflags = uint16(4)
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = ^_sqlite3VdbeIntValue(tls, _pIn1)
}
goto _250
_134:
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr(i32(0)))).X0) != i32(51) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80644), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65515)))
+ if int32(elem61((*XVdbeOp)(_p.XaOp), 0).Xopcode) != int32(51) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80644), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63657)))
crt.X__builtin_abort(tls)
}
}()
- if (*XVdbeFrame)(_p.X38) == nil {
+ if _p.XpFrame == nil {
goto _676
}
- _164_iAddr = uint32(int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer((*XVdbeOp)(_p.X17)))) / 24))
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XVdbeFrame)(_p.X38).X6)) + 1*uintptr(_164_iAddr/uint32(i32(8)))))) & (i32(1) << uint(int32(_164_iAddr&uint32(i32(7)))))) != i32(0) {
+ _164_iAddr = uint32(int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(_p.XaOp)) / 24))
+ if (int32(*elem15((*XVdbeFrame)(_p.XpFrame).XaOnce, uintptr(_164_iAddr/uint32(8)))) & (int32(1) << uint(int32(_164_iAddr&uint32(7))))) != int32(0) {
goto _jump_to_p2
}
{
- p := (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XVdbeFrame)(_p.X38).X6)) + 1*uintptr(_164_iAddr/uint32(i32(8)))))
- *p = uint8(int32(*p) | (i32(1) << uint(int32(_164_iAddr&uint32(i32(7))))))
- sink2(*p)
+ p := elem15((*XVdbeFrame)(_p.XpFrame).XaOnce, uintptr(_164_iAddr/uint32(8)))
+ *p = uint8(int32(*p) | (int32(1) << uint(int32(_164_iAddr&uint32(7)))))
}
goto _678
_676:
- if ((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(i32(0)))).X3) == (_pOp.X3) {
+ if (elem61((*XVdbeOp)(_p.XaOp), 0).Xp1) == _pOp.Xp1 {
goto _jump_to_p2
}
_678:
- *(*int32)(unsafe.Pointer(&(_pOp.X3))) = (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(i32(0)))).X3
+ _pOp.Xp1 = elem61((*XVdbeOp)(_p.XaOp), 0).Xp1
goto _250
_135:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- if (int32(_pIn1.X1) & i32(1)) != 0 {
- _169_c = _pOp.X5
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ if (int32(_pIn1.Xflags) & int32(1)) != 0 {
+ _169_c = _pOp.Xp3
goto _681
}
_169_c = bool2int(_sqlite3VdbeRealValue(tls, _pIn1) != float64(0))
- if int32(_pOp.X0) == i32(22) {
+ if int32(_pOp.Xopcode) == int32(22) {
_169_c = bool2int(_169_c == 0)
}
_681:
@@ -49435,115 +49276,115 @@ _681:
}
goto _250
_137:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- if (int32(_pIn1.X1) & i32(1)) != i32(0) {
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ if (int32(_pIn1.Xflags) & int32(1)) != int32(0) {
goto _jump_to_p2
}
goto _250
_138:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- if (int32(_pIn1.X1) & i32(1)) == i32(0) {
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ if (int32(_pIn1.Xflags) & int32(1)) == int32(0) {
goto _jump_to_p2
}
goto _250
_139:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80733), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80733), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80734), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65574)))
+ if (*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80734), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63716)))
crt.X__builtin_abort(tls)
}
}()
- if ((*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))).X2) != 0 {
- _sqlite3VdbeMemSetNull(tls, (*XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(_aMem))+uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(_pOp.X5)))))*uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(48))))))))))))
+ if ((*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))).XnullRow) != 0 {
+ _sqlite3VdbeMemSetNull(tls, (*XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(_aMem))+uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(_pOp.Xp3)*uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(48))))))))))))
goto _jump_to_p2
}
goto _250
_140:
- _179_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
- _179_p2 = _pOp.X4
+ _179_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
+ _179_p2 = _pOp.Xp2
_rc = _sqlite3VdbeCursorMoveto(tls, &_179_pC, &_179_p2)
if _rc != 0 {
goto _abort_due_to_error
}
func() {
- if (_pOp.X5) <= i32(0) || (_pOp.X5) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80792), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64441)))
+ if _pOp.Xp3 <= int32(0) || _pOp.Xp3 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80792), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62583)))
crt.X__builtin_abort(tls)
}
}()
- _179_pDest = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _179_pDest = elem25(_aMem, uintptr(_pOp.Xp3))
_sqlite3VdbeMemAboutToChange(tls, _p, _179_pDest)
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80795), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80795), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _179_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80796), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80796), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _179_p2 >= int32(_179_pC.X18) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80797), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65601)))
+ if _179_p2 >= int32(_179_pC.XnField) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80797), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63743)))
crt.X__builtin_abort(tls)
}
}()
- _179_aOffset = _179_pC.X21
+ _179_aOffset = _179_pC.XaOffset
func() {
- if int32(_179_pC.X0) == i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80799), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65615)))
+ if int32(_179_pC.XeCurType) == int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80799), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63757)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_179_pC.X0) == i32(3) && (_179_pC.X2) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80800), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65642)))
+ if int32(_179_pC.XeCurType) == int32(3) && _179_pC.XnullRow == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80800), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63784)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_179_pC.X0) == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80801), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65686)))
+ if int32(_179_pC.XeCurType) == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80801), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63828)))
crt.X__builtin_abort(tls)
}
}()
- if (_179_pC.X11) == (_p.X8) {
+ if _179_pC.XcacheStatus == _p.XcacheCtr {
goto _710
}
- if (_179_pC.X2) == 0 {
+ if _179_pC.XnullRow == 0 {
goto _711
}
- if int32(_179_pC.X0) == i32(3) {
+ if int32(_179_pC.XeCurType) == int32(3) {
func() {
- if (*(*int32)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_179_pC.X14)))))) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80806), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65715)))
+ if (*(*int32)(unsafe.Pointer(&_179_pC.Xuc))) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80806), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63857)))
crt.X__builtin_abort(tls)
}
}()
- _179_pReg = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(*(*int32)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_179_pC.X14))))))))
+ _179_pReg = elem25(_aMem, uintptr(*(*int32)(unsafe.Pointer(&_179_pC.Xuc))))
func() {
- if (int32(_179_pReg.X1) & i32(16)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80808), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65739)))
+ if (int32(_179_pReg.Xflags) & int32(16)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80808), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63881)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_179_pReg.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80809), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65762)))
+ if (int32(_179_pReg.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80809), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63904)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_179_pC.X23))) = store5((*uint32)(unsafe.Pointer(&(_179_pC.X24))), store5(&_179_avail, uint32(_179_pReg.X4)))
- *(**uint8)(unsafe.Pointer(&(_179_pC.X22))) = (*uint8)(unsafe.Pointer(_179_pReg.X5))
+ _179_pC.XpayloadSize = store23(&_179_pC.XszRow, store23(&_179_avail, uint32(_179_pReg.Xn)))
+ _179_pC.XaRow = (*uint8)(unsafe.Pointer(_179_pReg.Xz))
goto _719
}
_sqlite3VdbeMemSetNull(tls, _179_pDest)
@@ -49551,68 +49392,68 @@ _140:
_719:
goto _720
_711:
- _179_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_179_pC.X14))))))
+ _179_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_179_pC.Xuc)))
func() {
- if int32(_179_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80818), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_179_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80818), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _179_pCrsr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80819), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65807)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80819), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63949)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3BtreeCursorIsValid(tls, _179_pCrsr) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80820), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65813)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80820), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63955)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_179_pC.X23))) = _sqlite3BtreePayloadSize(tls, _179_pCrsr)
- *(**uint8)(unsafe.Pointer(&(_179_pC.X22))) = (*uint8)(_sqlite3BtreePayloadFetch(tls, _179_pCrsr, &_179_avail))
+ _179_pC.XpayloadSize = _sqlite3BtreePayloadSize(tls, _179_pCrsr)
+ _179_pC.XaRow = (*uint8)(_sqlite3BtreePayloadFetch(tls, _179_pCrsr, &_179_avail))
func() {
- if _179_avail > uint32(i32(65536)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80823), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65846)))
+ if _179_avail > uint32(65536) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80823), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63988)))
crt.X__builtin_abort(tls)
}
}()
- if (_179_pC.X23) <= _179_avail {
- *(*uint32)(unsafe.Pointer(&(_179_pC.X24))) = _179_pC.X23
+ if _179_pC.XpayloadSize <= _179_avail {
+ _179_pC.XszRow = _179_pC.XpayloadSize
goto _732
}
- if (_179_pC.X23) > uint32(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0))))) {
+ if _179_pC.XpayloadSize > uint32(*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0)) {
goto _too_big
}
- *(*uint32)(unsafe.Pointer(&(_179_pC.X24))) = _179_avail
+ _179_pC.XszRow = _179_avail
_732:
_720:
- *(*uint32)(unsafe.Pointer(&(_179_pC.X11))) = _p.X8
- *(*uint32)(unsafe.Pointer(&(_179_pC.X16))) = uint32(uint8(func() int32 {
- if int32(*(_179_pC.X22)) < int32(u8(128)) {
- return func() int32 { _179_offset = uint32(*(_179_pC.X22)); return i32(1) }()
+ _179_pC.XcacheStatus = _p.XcacheCtr
+ _179_pC.XiHdrOffset = uint32(uint8(func() int32 {
+ if int32(*_179_pC.XaRow) < int32(128) {
+ return func() int32 { _179_offset = uint32(*_179_pC.XaRow); return int32(1) }()
}
- return int32(_sqlite3GetVarint32(tls, _179_pC.X22, &_179_offset))
+ return int32(_sqlite3GetVarint32(tls, _179_pC.XaRow, &_179_offset))
}()))
- *(*uint16)(unsafe.Pointer(&(_179_pC.X19))) = uint16(i32(0))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_aOffset)) + 4*uintptr(i32(0)))) = _179_offset
+ _179_pC.XnHdrParsed = 0
+ *elem7(_179_aOffset, 0) = _179_offset
if _179_avail >= _179_offset {
goto _735
}
- *(**uint8)(unsafe.Pointer(&(_179_pC.X22))) = nil
- *(*uint32)(unsafe.Pointer(&(_179_pC.X24))) = uint32(i32(0))
- if (_179_offset > uint32(i32(98307))) || (_179_offset > (_179_pC.X23)) {
- _rc = _sqlite3CorruptError(tls, i32(80856))
+ _179_pC.XaRow = nil
+ _179_pC.XszRow = 0
+ if (_179_offset > uint32(98307)) || (_179_offset > _179_pC.XpayloadSize) {
+ _rc = _sqlite3CorruptError(tls, int32(80856))
goto _abort_due_to_error
}
goto _739
_735:
- if _179_offset > uint32(i32(0)) {
- _179_zData = _179_pC.X22
+ if _179_offset > (0) {
+ _179_zData = _179_pC.XaRow
func() {
- if int32(_179_pC.X19) > _179_p2 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80865), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65859)))
+ if int32(_179_pC.XnHdrParsed) > _179_p2 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80865), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64001)))
crt.X__builtin_abort(tls)
}
}()
@@ -49620,78 +49461,66 @@ _735:
}
_739:
_710:
- if int32(_179_pC.X19) > _179_p2 {
+ if int32(_179_pC.XnHdrParsed) > _179_p2 {
goto _742
}
- if (_179_pC.X16) >= (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_aOffset)) + 4*uintptr(i32(0))))) {
+ if _179_pC.XiHdrOffset >= (*elem7(_179_aOffset, 0)) {
goto _743
}
- if (_179_pC.X22) != nil {
+ if _179_pC.XaRow != nil {
goto _744
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_179_sMem), i32(0), u32(48))
- _rc = _sqlite3VdbeMemFromBtree(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_179_pC.X14)))))), uint32(i32(0)), *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_aOffset)) + 4*uintptr(i32(0)))), &_179_sMem)
- if _rc != i32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(&_179_sMem), int32(0), uint32(48))
+ _rc = _sqlite3VdbeMemFromBtree(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_179_pC.Xuc))), 0, *elem7(_179_aOffset, 0), &_179_sMem)
+ if _rc != int32(0) {
goto _abort_due_to_error
}
- _179_zData = (*uint8)(unsafe.Pointer(_179_sMem.X5))
+ _179_zData = (*uint8)(unsafe.Pointer(_179_sMem.Xz))
goto _op_column_read_header
_744:
- _179_zData = _179_pC.X22
+ _179_zData = _179_pC.XaRow
_op_column_read_header:
- _179_i = int32(_179_pC.X19)
- _179_offset64 = uint64(*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_aOffset)) + 4*uintptr(_179_i))))
- _179_zHdr = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_179_zData)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_179_pC.X16)))))))
- _179_zEndHdr = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_179_zData)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_aOffset)) + 4*uintptr(i32(0)))))))))))
+ _179_i = int32(_179_pC.XnHdrParsed)
+ _179_offset64 = uint64(*elem7(_179_aOffset, uintptr(_179_i)))
+ _179_zHdr = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_179_zData)) + uintptr(_179_pC.XiHdrOffset)))
+ _179_zEndHdr = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_179_zData)) + uintptr(*elem7(_179_aOffset, 0))))
_747:
- if store5(&_179_t, uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_zHdr)) + 1*uintptr(i32(0)))))) < uint32(i32(128)) {
+ if store23(&_179_t, uint32(*elem15(_179_zHdr, 0))) < uint32(128) {
*(*uintptr)(unsafe.Pointer(&_179_zHdr)) += uintptr(1)
- {
- p := &_179_offset64
- *p = (*p) + uint64(_sqlite3VdbeOneByteSerialTypeLen(tls, uint8(_179_t)))
- sink17(*p)
- }
+ _179_offset64 += uint64(_sqlite3VdbeOneByteSerialTypeLen(tls, uint8(_179_t)))
goto _749
}
- {
- p := &_179_zHdr
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3GetVarint32(tls, _179_zHdr, &_179_t))))
- sink13(*p)
- }
- {
- p := &_179_offset64
- *p = (*p) + uint64(_sqlite3VdbeSerialTypeLen(tls, _179_t))
- sink17(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_179_zHdr)) += uintptr(_sqlite3GetVarint32(tls, _179_zHdr, &_179_t))
+ _179_offset64 += uint64(_sqlite3VdbeSerialTypeLen(tls, _179_t))
_749:
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]uint32)(unsafe.Pointer(&(_179_pC.X25))))) + 4*uintptr(postInc1(&_179_i, int32(1))))) = _179_t
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_aOffset)) + 4*uintptr(_179_i))) = uint32(_179_offset64 & uint64(u32(4294967295)))
- if (_179_i <= _179_p2) && (uintptr(unsafe.Pointer(_179_zHdr)) < uintptr(unsafe.Pointer(_179_zEndHdr))) {
+ *elem7((*uint32)(unsafe.Pointer(&_179_pC.XaType)), uintptr(postInc2(&_179_i, 1))) = _179_t
+ *elem7(_179_aOffset, uintptr(_179_i)) = uint32(_179_offset64 & uint64(4294967295))
+ if (_179_i <= _179_p2) && (crt.P2U(unsafe.Pointer(_179_zHdr)) < crt.P2U(unsafe.Pointer(_179_zEndHdr))) {
goto _747
}
- if (uintptr(unsafe.Pointer(_179_zHdr)) < uintptr(unsafe.Pointer(_179_zEndHdr)) || uintptr(unsafe.Pointer(_179_zHdr)) <= uintptr(unsafe.Pointer(_179_zEndHdr)) && _179_offset64 == uint64(_179_pC.X23)) && _179_offset64 <= uint64(_179_pC.X23) {
+ if (crt.P2U(unsafe.Pointer(_179_zHdr)) < crt.P2U(unsafe.Pointer(_179_zEndHdr)) || crt.P2U(unsafe.Pointer(_179_zHdr)) <= crt.P2U(unsafe.Pointer(_179_zEndHdr)) && _179_offset64 == uint64(_179_pC.XpayloadSize)) && _179_offset64 <= uint64(_179_pC.XpayloadSize) {
goto _754
}
- if (_179_pC.X22) == nil {
+ if _179_pC.XaRow == nil {
_sqlite3VdbeMemRelease(tls, &_179_sMem)
}
- _rc = _sqlite3CorruptError(tls, i32(80915))
+ _rc = _sqlite3CorruptError(tls, int32(80915))
goto _abort_due_to_error
_754:
- *(*uint16)(unsafe.Pointer(&(_179_pC.X19))) = uint16(_179_i)
- *(*uint32)(unsafe.Pointer(&(_179_pC.X16))) = uint32(int32((uintptr(unsafe.Pointer(_179_zHdr)) - uintptr(unsafe.Pointer(_179_zData))) / 1))
- if (_179_pC.X22) == nil {
+ _179_pC.XnHdrParsed = uint16(_179_i)
+ _179_pC.XiHdrOffset = uint32(int32(uintptr(unsafe.Pointer(_179_zHdr)) - uintptr(unsafe.Pointer(_179_zData))))
+ if _179_pC.XaRow == nil {
_sqlite3VdbeMemRelease(tls, &_179_sMem)
}
goto _757
_743:
- _179_t = uint32(i32(0))
+ _179_t = 0
_757:
- if int32(_179_pC.X19) > _179_p2 {
+ if int32(_179_pC.XnHdrParsed) > _179_p2 {
goto _758
}
- if int32(_pOp.X1) == i32(-7) {
- _sqlite3VdbeMemShallowCopy(tls, _179_pDest, (*XMem)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))), i32(2048))
+ if int32(_pOp.Xp4type) == int32(-7) {
+ _sqlite3VdbeMemShallowCopy(tls, _179_pDest, (*XMem)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))), int32(2048))
goto _760
}
_sqlite3VdbeMemSetNull(tls, _179_pDest)
@@ -49700,151 +49529,150 @@ _760:
_758:
goto _761
_742:
- _179_t = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]uint32)(unsafe.Pointer(&(_179_pC.X25))))) + 4*uintptr(_179_p2)))
+ _179_t = *elem7((*uint32)(unsafe.Pointer(&_179_pC.XaType)), uintptr(_179_p2))
_761:
func() {
- if _179_p2 >= int32(_179_pC.X19) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80946), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65878)))
+ if _179_p2 >= int32(_179_pC.XnHdrParsed) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80946), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64020)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80947), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80947), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3VdbeCheckMemInvariants(tls, _179_pDest) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80948), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65896)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80948), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64038)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_179_pDest.X1) & i32(9312)) != i32(0) {
+ if (int32(_179_pDest.Xflags) & int32(9312)) != int32(0) {
_sqlite3VdbeMemSetNull(tls, _179_pDest)
}
func() {
- if _179_t != (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]uint32)(unsafe.Pointer(&(_179_pC.X25))))) + 4*uintptr(_179_p2)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(80952), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65933)))
+ if _179_t != (*elem7((*uint32)(unsafe.Pointer(&_179_pC.XaType)), uintptr(_179_p2))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(80952), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64075)))
crt.X__builtin_abort(tls)
}
}()
- if (_179_pC.X24) < (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_aOffset)) + 4*uintptr(_179_p2+i32(1))))) {
+ if _179_pC.XszRow < (*elem7(_179_aOffset, uintptr(_179_p2+int32(1)))) {
goto _771
}
- _179_zData = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_179_pC.X22)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_aOffset)) + 4*uintptr(_179_p2))))))))))
- if _179_t < uint32(i32(12)) {
+ _179_zData = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_179_pC.XaRow)) + uintptr(*elem7(_179_aOffset, uintptr(_179_p2)))))
+ if _179_t < uint32(12) {
_sqlite3VdbeSerialGet(tls, _179_zData, _179_t, _179_pDest)
goto _773
}
- *(*int32)(unsafe.Pointer(&(_179_pDest.X4))) = store1(&_179_len, int32((_179_t-uint32(i32(12)))/uint32(i32(2))))
- *(*uint8)(unsafe.Pointer(&(_179_pDest.X2))) = _encoding
- if (_179_pDest.X7) >= (_179_len + i32(2)) {
+ _179_pDest.Xn = store2(&_179_len, int32((_179_t-uint32(12))/uint32(2)))
+ _179_pDest.Xenc = _encoding
+ if _179_pDest.XszMalloc >= (_179_len + int32(2)) {
goto _774
}
- *(*uint16)(unsafe.Pointer(&(_179_pDest.X1))) = uint16(i32(1))
- if _sqlite3VdbeMemGrow(tls, _179_pDest, _179_len+i32(2), i32(0)) != 0 {
+ _179_pDest.Xflags = uint16(1)
+ if _sqlite3VdbeMemGrow(tls, _179_pDest, _179_len+int32(2), int32(0)) != 0 {
goto _no_mem
}
goto _776
_774:
- *(**int8)(unsafe.Pointer(&(_179_pDest.X5))) = _179_pDest.X6
+ _179_pDest.Xz = _179_pDest.XzMalloc
_776:
- crt.Xmemcpy(tls, (unsafe.Pointer)(_179_pDest.X5), (unsafe.Pointer)(_179_zData), uint32(_179_len))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_pDest.X5)) + 1*uintptr(_179_len))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_pDest.X5)) + 1*uintptr(_179_len+i32(1)))) = int8(i32(0))
- *(*uint16)(unsafe.Pointer(&(_179_pDest.X1))) = *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3VdbeExecØ00aFlagØ004)) + 2*uintptr(_179_t&uint32(i32(1)))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_179_pDest.Xz), unsafe.Pointer(_179_zData), uint32(_179_len))
+ *elem1(_179_pDest.Xz, uintptr(_179_len)) = 0
+ *elem1(_179_pDest.Xz, uintptr(_179_len+int32(1))) = 0
+ _179_pDest.Xflags = *elem20((*uint16)(unsafe.Pointer(&_sqlite3VdbeExecØ00aFlagØ004)), uintptr(_179_t&uint32(1)))
_773:
goto _op_column_out
_771:
- *(*uint8)(unsafe.Pointer(&(_179_pDest.X2))) = _encoding
- if (((int32(_pOp.X2) & i32(192)) != i32(0)) && (((_179_t >= uint32(i32(12))) && ((_179_t & uint32(i32(1))) == uint32(i32(0)))) || ((int32(_pOp.X2) & i32(128)) != i32(0)))) || (store1(&_179_len, int32(_sqlite3VdbeSerialTypeLen(tls, _179_t))) == i32(0)) {
+ _179_pDest.Xenc = _encoding
+ if (((int32(_pOp.Xp5) & int32(192)) != int32(0)) && (((_179_t >= uint32(12)) && ((_179_t & uint32(1)) == (0))) || ((int32(_pOp.Xp5) & int32(128)) != int32(0)))) || (store2(&_179_len, int32(_sqlite3VdbeSerialTypeLen(tls, _179_t))) == int32(0)) {
_sqlite3VdbeSerialGet(tls, (*uint8)(unsafe.Pointer(&_sqlite3VdbeExecØ00aZeroØ005)), _179_t, _179_pDest)
goto _783
}
- _rc = _sqlite3VdbeMemFromBtree(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_179_pC.X14)))))), *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_179_aOffset)) + 4*uintptr(_179_p2))), uint32(_179_len), _179_pDest)
- if _rc != i32(0) {
+ _rc = _sqlite3VdbeMemFromBtree(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_179_pC.Xuc))), *elem7(_179_aOffset, uintptr(_179_p2)), uint32(_179_len), _179_pDest)
+ if _rc != int32(0) {
goto _abort_due_to_error
}
- _sqlite3VdbeSerialGet(tls, (*uint8)(unsafe.Pointer(_179_pDest.X5)), _179_t, _179_pDest)
+ _sqlite3VdbeSerialGet(tls, (*uint8)(unsafe.Pointer(_179_pDest.Xz)), _179_t, _179_pDest)
{
- p := (*uint16)(unsafe.Pointer(&(_179_pDest.X1)))
- *p = uint16(int32(*p) & i32(-4097))
- sink14(*p)
+ p := &_179_pDest.Xflags
+ *p = uint16(int32(*p) & int32(-4097))
}
_783:
_op_column_out:
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X5, _179_pDest)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp3, _179_pDest)
}
goto _250
_141:
- _213_zAffinity = *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
+ _213_zAffinity = *(**int8)(unsafe.Pointer(&_pOp.Xp4))
func() {
if _213_zAffinity == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81025), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65950)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81025), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64092)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X4) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81026), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62895)))
+ if _pOp.Xp2 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81026), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61037)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_213_zAffinity)) + 1*uintptr(_pOp.X4)))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81027), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65963)))
+ if int32(*elem1(_213_zAffinity, uintptr(_pOp.Xp2))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81027), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64105)))
crt.X__builtin_abort(tls)
}
}()
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
_792:
func() {
- if uintptr(unsafe.Pointer(_pIn1)) > uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(_p.X18)+48*uintptr(((_p.X6)+i32(1))-(_p.X7)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81030), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65985)))
+ if crt.P2U(unsafe.Pointer(_pIn1)) > crt.P2U(unsafe.Pointer(elem25((*XMem)(_p.XaMem), uintptr((_p.XnMem+int32(1))-_p.XnCursor)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81030), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64127)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pIn1.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81031), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64072)))
+ if (int32(_pIn1.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81031), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62214)))
crt.X__builtin_abort(tls)
}
}()
- _applyAffinity(tls, _pIn1, *postInc0(&_213_zAffinity, 1), _encoding)
+ _applyAffinity(tls, _pIn1, *postInc1(&_213_zAffinity, 1), _encoding)
*(*uintptr)(unsafe.Pointer(&_pIn1)) += uintptr(48)
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_213_zAffinity)) + 1*uintptr(i32(0))))) != 0 {
+ if (*elem1(_213_zAffinity, 0)) != 0 {
goto _792
}
goto _250
_142:
- _215_nData = uint64(i32(0))
- _215_nHdr = i32(0)
- _215_nZero = int64(i32(0))
- _215_nField = _pOp.X3
- _215_zAffinity = *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
+ _215_nData = 0
+ _215_nHdr = int32(0)
+ _215_nZero = 0
+ _215_nField = _pOp.Xp1
+ _215_zAffinity = *(**int8)(unsafe.Pointer(&_pOp.Xp4))
func() {
- if _215_nField <= i32(0) || (_pOp.X4) <= i32(0) || ((_pOp.X4)+_215_nField) > ((((_p.X6)+i32(1))-(_p.X7))+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81092), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66028)))
+ if _215_nField <= int32(0) || _pOp.Xp2 <= int32(0) || (_pOp.Xp2+_215_nField) > (((_p.XnMem+int32(1))-_p.XnCursor)+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81092), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64170)))
crt.X__builtin_abort(tls)
}
}()
- _215_pData0 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_215_nField)))
- _215_nField = _pOp.X4
- _215_pLast = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_215_pData0)) + 48*uintptr(_215_nField-i32(1))))
- _215_file_format = int32(_p.X31)
+ _215_pData0 = elem25(_aMem, uintptr(_215_nField))
+ _215_nField = _pOp.Xp2
+ _215_pLast = elem25(_215_pData0, uintptr(_215_nField-int32(1)))
+ _215_file_format = int32(_p.XminWriteFileFormat)
func() {
- if (_pOp.X5) >= (_pOp.X3) && (_pOp.X5) < ((_pOp.X3)+(_pOp.X4)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81099), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66096)))
+ if _pOp.Xp3 >= _pOp.Xp1 && _pOp.Xp3 < (_pOp.Xp1+_pOp.Xp2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81099), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64238)))
crt.X__builtin_abort(tls)
}
}()
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp3))
_sqlite3VdbeMemAboutToChange(tls, _p, _pOut)
func() {
- if uintptr(unsafe.Pointer(_215_pData0)) > uintptr(unsafe.Pointer(_215_pLast)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81105), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66140)))
+ if crt.P2U(unsafe.Pointer(_215_pData0)) > crt.P2U(unsafe.Pointer(_215_pLast)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81105), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64282)))
crt.X__builtin_abort(tls)
}
}()
@@ -49853,27 +49681,27 @@ _142:
}
_215_pRec = _215_pData0
_807:
- _applyAffinity(tls, postInc20(&_215_pRec, 48), *postInc0(&_215_zAffinity, 1), _encoding)
+ _applyAffinity(tls, postInc25(&_215_pRec, 48), *postInc1(&_215_zAffinity, 1), _encoding)
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_215_zAffinity)) + 1*uintptr(i32(0))))) != i32(0) && uintptr(unsafe.Pointer(_215_pRec)) > uintptr(unsafe.Pointer(_215_pLast)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81110), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66154)))
+ if int32(*elem1(_215_zAffinity, 0)) != int32(0) && crt.P2U(unsafe.Pointer(_215_pRec)) > crt.P2U(unsafe.Pointer(_215_pLast)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81110), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64296)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_215_zAffinity)) + 1*uintptr(i32(0))))) != 0 {
+ if (*elem1(_215_zAffinity, 0)) != 0 {
goto _807
}
_806:
_215_pRec = _215_pLast
_811:
func() {
- if (int32(_215_pRec.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81133), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66185)))
+ if (int32(_215_pRec.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81133), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64327)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_215_pRec.X8))) = store5(&_215_serial_type, _sqlite3VdbeSerialType(tls, _215_pRec, _215_file_format, &_215_len))
- if (int32(_215_pRec.X1) & i32(16384)) == 0 {
+ _215_pRec.XuTemp = store23(&_215_serial_type, _sqlite3VdbeSerialType(tls, _215_pRec, _215_file_format, &_215_len))
+ if (int32(_215_pRec.Xflags) & int32(16384)) == 0 {
goto _814
}
if _215_nData == 0 {
@@ -49884,279 +49712,246 @@ _811:
}
goto _817
_815:
- {
- p := &_215_nZero
- *p = (*p) + int64(*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_215_pRec.X0))))))
- sink6(*p)
- }
- {
- p := &_215_len
- *p = (*p) - uint32(*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_215_pRec.X0))))))
- sink5(*p)
- }
+ _215_nZero += int64(*(*int32)(unsafe.Pointer(&_215_pRec.Xu)))
+ _215_len -= uint32(*(*int32)(unsafe.Pointer(&_215_pRec.Xu)))
_817:
_814:
- {
- p := &_215_nData
- *p = (*p) + uint64(_215_len)
- sink17(*p)
- }
- {
- p := &_215_nHdr
- *p = (*p) + func() int32 {
- if _215_serial_type <= uint32(i32(127)) {
- return i32(1)
- }
- return _sqlite3VarintLen(tls, uint64(_215_serial_type))
- }()
- sink1(*p)
- }
+ _215_nData += uint64(_215_len)
+ _215_nHdr += func() int32 {
+ if _215_serial_type <= uint32(127) {
+ return int32(1)
+ }
+ return _sqlite3VarintLen(tls, uint64(_215_serial_type))
+ }()
if _215_pRec == _215_pData0 {
goto _821
}
*(*uintptr)(unsafe.Pointer(&_215_pRec)) += uintptr(4294967248)
goto _811
_821:
- if _215_nHdr <= i32(126) {
- {
- p := &_215_nHdr
- *p = (*p) + i32(1)
- sink1(*p)
- }
+ if _215_nHdr <= int32(126) {
+ _215_nHdr += int32(1)
goto _823
}
_215_nVarint = _sqlite3VarintLen(tls, uint64(_215_nHdr))
- {
- p := &_215_nHdr
- *p = (*p) + _215_nVarint
- sink1(*p)
- }
+ _215_nHdr += _215_nVarint
if _215_nVarint < _sqlite3VarintLen(tls, uint64(_215_nHdr)) {
_215_nHdr += 1
}
_823:
_215_nByte = int64(uint64(_215_nHdr) + _215_nData)
- if (_215_nByte + _215_nZero) > int64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0))))) {
+ if (_215_nByte + _215_nZero) > int64(*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0)) {
goto _too_big
}
if _sqlite3VdbeMemClearAndResize(tls, _pOut, int32(_215_nByte)) != 0 {
goto _no_mem
}
- _215_zNewRecord = (*uint8)(unsafe.Pointer(_pOut.X5))
+ _215_zNewRecord = (*uint8)(unsafe.Pointer(_pOut.Xz))
_215_i = int32(uint8(func() int32 {
- if uint32(_215_nHdr) < u32(128) {
- return func() int32 { *_215_zNewRecord = uint8(_215_nHdr); return i32(1) }()
+ if uint32(_215_nHdr) < uint32(128) {
+ return func() int32 { *_215_zNewRecord = uint8(_215_nHdr); return int32(1) }()
}
return _sqlite3PutVarint(tls, _215_zNewRecord, uint64(_215_nHdr))
}()))
_215_j = _215_nHdr
func() {
- if uintptr(unsafe.Pointer(_215_pData0)) > uintptr(unsafe.Pointer(_215_pLast)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81184), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66140)))
+ if crt.P2U(unsafe.Pointer(_215_pData0)) > crt.P2U(unsafe.Pointer(_215_pLast)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81184), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64282)))
crt.X__builtin_abort(tls)
}
}()
_215_pRec = _215_pData0
_831:
- _215_serial_type = _215_pRec.X8
- {
- p := &_215_i
- *p = (*p) + int32(uint8(func() int32 {
- if _215_serial_type < u32(128) {
- return func() int32 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_215_zNewRecord)) + 1*uintptr(_215_i))) = uint8(_215_serial_type)
- return i32(1)
- }()
- }
- return _sqlite3PutVarint(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_215_zNewRecord))+1*uintptr(_215_i))), uint64(_215_serial_type))
- }()))
- sink1(*p)
- }
+ _215_serial_type = _215_pRec.XuTemp
+ _215_i += int32(uint8(func() int32 {
+ if _215_serial_type < uint32(128) {
+ return func() int32 { *elem15(_215_zNewRecord, uintptr(_215_i)) = uint8(_215_serial_type); return int32(1) }()
+ }
+ return _sqlite3PutVarint(tls, elem15(_215_zNewRecord, uintptr(_215_i)), uint64(_215_serial_type))
+ }()))
{
p := &_215_j
- *p = int32(uint32(*p) + _sqlite3VdbeSerialPut(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_215_zNewRecord))+1*uintptr(_215_j))), _215_pRec, _215_serial_type))
- sink1(*p)
+ *p = int32(uint32(*p) + _sqlite3VdbeSerialPut(tls, elem15(_215_zNewRecord, uintptr(_215_j)), _215_pRec, _215_serial_type))
}
- if uintptr(unsafe.Pointer(preInc20(&_215_pRec, 48))) <= uintptr(unsafe.Pointer(_215_pLast)) {
+ if crt.P2U(unsafe.Pointer(preInc25(&_215_pRec, 48))) <= crt.P2U(unsafe.Pointer(_215_pLast)) {
goto _831
}
func() {
if _215_i != _215_nHdr {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81195), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66202)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81195), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64344)))
crt.X__builtin_abort(tls)
}
}()
func() {
if int64(_215_j) != _215_nByte {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81196), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66210)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81196), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64352)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X5) <= i32(0) || (_pOp.X5) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81198), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64441)))
+ if _pOp.Xp3 <= int32(0) || _pOp.Xp3 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81198), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62583)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pOut.X4))) = int32(_215_nByte)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(16))
+ _pOut.Xn = int32(_215_nByte)
+ _pOut.Xflags = uint16(16)
if _215_nZero != 0 {
- *(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int32(_215_nZero)
+ *(*int32)(unsafe.Pointer(&_pOut.Xu)) = int32(_215_nZero)
{
- p := (*uint16)(unsafe.Pointer(&(_pOut.X1)))
- *p = uint16(int32(*p) | i32(16384))
- sink14(*p)
+ p := &_pOut.Xflags
+ *p = uint16(int32(*p) | int32(16384))
}
}
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X5, _pOut)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp3, _pOut)
}
goto _250
_143:
func() {
- if int32((*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))).X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81221), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66219)))
+ if int32((*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))).XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81221), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64361)))
crt.X__builtin_abort(tls)
}
}()
- _228_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&((*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))).X14))))))
+ _228_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&((*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))).Xuc))))
func() {
if _228_pCrsr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81223), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65807)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81223), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63949)))
crt.X__builtin_abort(tls)
}
}()
- _228_nEntry = int64(i32(0))
+ _228_nEntry = 0
_rc = _sqlite3BtreeCount(tls, _228_pCrsr, &_228_nEntry)
if _rc != 0 {
goto _abort_due_to_error
}
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = _228_nEntry
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = _228_nEntry
goto _250
_144:
- _229_p1 = _pOp.X3
- _229_zName = *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
+ _229_p1 = _pOp.Xp1
+ _229_zName = *(**int8)(unsafe.Pointer(&_pOp.Xp4))
func() {
- if (*XSavepoint)(_db.X73) != nil && int32(_db.X15) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81255), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66262)))
+ if (*XSavepoint)(_db.XpSavepoint) != nil && int32(_db.XautoCommit) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81255), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64404)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _229_p1 != i32(0) && _229_p1 != i32(1) && _229_p1 != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81256), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66301)))
+ if _229_p1 != int32(0) && _229_p1 != int32(1) && _229_p1 != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81256), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64443)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSavepoint)(_db.X73) == nil && int32(_db.X23) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81257), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66368)))
+ if _db.XpSavepoint == nil && int32(_db.XisTransactionSavepoint) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81257), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64510)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _checkSavepointCount(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81258), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66416)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81258), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64558)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81259), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66440)))
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81259), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64582)))
crt.X__builtin_abort(tls)
}
}()
- if _229_p1 != i32(0) {
+ if _229_p1 != int32(0) {
goto _862
}
- if (_db.X36) > i32(0) {
- _sqlite3VdbeError(tls, _p, str(66453))
- _rc = i32(5)
+ if _db.XnVdbeWrite > int32(0) {
+ _sqlite3VdbeError(tls, _p, str(64595))
+ _rc = int32(5)
goto _864
}
_229_nName = _sqlite3Strlen30(tls, _229_zName)
func() {
- if int32(_db.X15) != i32(0) && (_db.X64) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81276), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66504)))
+ if int32(_db.XautoCommit) != int32(0) && _db.XnVTrans != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81276), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64646)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3VtabSavepoint(tls, _db, i32(0), (_db.X76)+(_db.X75))
- if _rc != i32(0) {
+ _rc = _sqlite3VtabSavepoint(tls, _db, int32(0), _db.XnStatement+_db.XnSavepoint)
+ if _rc != int32(0) {
goto _abort_due_to_error
}
- _229_pNew = (*XSavepoint)(_sqlite3DbMallocRawNN(tls, _db, uint64((u32(24)+uint32(_229_nName))+uint32(i32(1)))))
+ _229_pNew = (*XSavepoint)(_sqlite3DbMallocRawNN(tls, _db, uint64((uint32(24)+uint32(_229_nName))+uint32(1))))
if _229_pNew == nil {
goto _869
}
- *(**int8)(unsafe.Pointer(&(_229_pNew.X0))) = (*int8)(unsafe.Pointer((*XSavepoint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_229_pNew)) + 24*uintptr(i32(1))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_229_pNew.X0), (unsafe.Pointer)(_229_zName), uint32(_229_nName+i32(1)))
- if (_db.X15) != 0 {
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_db.X23))) = uint8(i32(1))
+ _229_pNew.XzName = (*int8)(unsafe.Pointer(elem82(_229_pNew, uintptr(1))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_229_pNew.XzName), unsafe.Pointer(_229_zName), uint32(_229_nName+int32(1)))
+ if _db.XautoCommit != 0 {
+ _db.XautoCommit = 0
+ _db.XisTransactionSavepoint = uint8(1)
goto _871
}
- *(*int32)(unsafe.Pointer(&(_db.X75))) += 1
+ _db.XnSavepoint += 1
_871:
- *(**XSavepoint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_229_pNew.X3))))) = (*XSavepoint)(_db.X73)
- *(**XSavepoint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X73))))) = _229_pNew
- *(*int64)(unsafe.Pointer(&(_229_pNew.X1))) = _db.X77
- *(*int64)(unsafe.Pointer(&(_229_pNew.X2))) = _db.X78
+ *(**XSavepoint)(unsafe.Pointer(&_229_pNew.XpNext)) = (*XSavepoint)(_db.XpSavepoint)
+ *(**XSavepoint)(unsafe.Pointer(&_db.XpSavepoint)) = _229_pNew
+ _229_pNew.XnDeferredCons = _db.XnDeferredCons
+ _229_pNew.XnDeferredImmCons = _db.XnDeferredImmCons
_869:
_864:
goto _872
_862:
- _229_iSavepoint = i32(0)
- _229_pSavepoint = (*XSavepoint)(_db.X73)
+ _229_iSavepoint = int32(0)
+ _229_pSavepoint = (*XSavepoint)(_db.XpSavepoint)
_873:
- if _229_pSavepoint == nil || _sqlite3StrICmp(tls, _229_pSavepoint.X0, _229_zName) == 0 {
+ if _229_pSavepoint == nil || _sqlite3StrICmp(tls, _229_pSavepoint.XzName, _229_zName) == 0 {
goto _877
}
_229_iSavepoint += 1
- _229_pSavepoint = (*XSavepoint)(_229_pSavepoint.X3)
+ _229_pSavepoint = (*XSavepoint)(_229_pSavepoint.XpNext)
goto _873
_877:
if _229_pSavepoint == nil {
- _sqlite3VdbeError(tls, _p, str(66540), unsafe.Pointer(_229_zName))
- _rc = i32(1)
+ _sqlite3VdbeError(tls, _p, str(64682), unsafe.Pointer(_229_zName))
+ _rc = int32(1)
goto _882
}
- if ((_db.X36) > i32(0)) && (_229_p1 == i32(1)) {
- _sqlite3VdbeError(tls, _p, str(66562))
- _rc = i32(5)
+ if (_db.XnVdbeWrite > int32(0)) && (_229_p1 == int32(1)) {
+ _sqlite3VdbeError(tls, _p, str(64704))
+ _rc = int32(5)
goto _882
}
- _240_isTransaction = bool2int(((*XSavepoint)(_229_pSavepoint.X3) == nil) && ((_db.X23) != 0))
- if _240_isTransaction == 0 || _229_p1 != i32(1) {
+ _240_isTransaction = bool2int(((*XSavepoint)(_229_pSavepoint.XpNext) == nil) && (_db.XisTransactionSavepoint != 0))
+ if _240_isTransaction == 0 || _229_p1 != int32(1) {
goto _885
}
- if store1(&_rc, _sqlite3VdbeCheckFk(tls, _p, i32(1))) != i32(0) {
+ if store2(&_rc, _sqlite3VdbeCheckFk(tls, _p, int32(1))) != int32(0) {
goto _vdbe_return
}
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(1))
- if _sqlite3VdbeHalt(tls, _p) == i32(5) {
- *(*int32)(unsafe.Pointer(&(_p.X9))) = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(0))
- *(*int32)(unsafe.Pointer(&(_p.X10))) = store1(&_rc, i32(5))
+ _db.XautoCommit = uint8(1)
+ if _sqlite3VdbeHalt(tls, _p) == int32(5) {
+ _p.Xpc = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
+ _db.XautoCommit = 0
+ _p.Xrc = store2(&_rc, int32(5))
goto _vdbe_return
}
- *(*uint8)(unsafe.Pointer(&(_db.X23))) = uint8(i32(0))
- _rc = _p.X10
+ _db.XisTransactionSavepoint = 0
+ _rc = _p.Xrc
goto _888
_885:
- _229_iSavepoint = ((_db.X75) - _229_iSavepoint) - i32(1)
- if _229_p1 != i32(2) {
+ _229_iSavepoint = (_db.XnSavepoint - _229_iSavepoint) - int32(1)
+ if _229_p1 != int32(2) {
goto _889
}
- _244_isSchemaChange = bool2int(((_db.X6) & i32(2)) != i32(0))
- _229_ii = i32(0)
+ _244_isSchemaChange = bool2int((_db.Xflags & int32(2)) != int32(0))
+ _229_ii = int32(0)
_890:
- if _229_ii >= (_db.X5) {
+ if _229_ii >= _db.XnDb {
goto _893
}
- _rc = _sqlite3BtreeTripAllCursors(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_229_ii))).X1), i32(516), bool2int(_244_isSchemaChange == i32(0)))
- if _rc != i32(0) {
+ _rc = _sqlite3BtreeTripAllCursors(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_229_ii)).XpBt), int32(516), bool2int(_244_isSchemaChange == int32(0)))
+ if _rc != int32(0) {
goto _abort_due_to_error
}
_229_ii += 1
@@ -50164,15 +49959,15 @@ _890:
_893:
goto _895
_889:
- _244_isSchemaChange = i32(0)
+ _244_isSchemaChange = int32(0)
_895:
- _229_ii = i32(0)
+ _229_ii = int32(0)
_896:
- if _229_ii >= (_db.X5) {
+ if _229_ii >= _db.XnDb {
goto _899
}
- _rc = _sqlite3BtreeSavepoint(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_229_ii))).X1), _229_p1, _229_iSavepoint)
- if _rc != i32(0) {
+ _rc = _sqlite3BtreeSavepoint(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_229_ii)).XpBt), _229_p1, _229_iSavepoint)
+ if _rc != int32(0) {
goto _abort_due_to_error
}
_229_ii += 1
@@ -50181,40 +49976,40 @@ _899:
if _244_isSchemaChange != 0 {
_sqlite3ExpirePreparedStatements(tls, _db)
_sqlite3ResetAllSchemasOfConnection(tls, _db)
- *(*int32)(unsafe.Pointer(&(_db.X6))) = (_db.X6) | i32(2)
+ _db.Xflags = _db.Xflags | int32(2)
}
_888:
- if (*XSavepoint)(_db.X73) != _229_pSavepoint {
- _229_pTmp = (*XSavepoint)(_db.X73)
- *(**XSavepoint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X73))))) = (*XSavepoint)(_229_pTmp.X3)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_229_pTmp))
- *(*int32)(unsafe.Pointer(&(_db.X75))) -= 1
+ if (*XSavepoint)(_db.XpSavepoint) != _229_pSavepoint {
+ _229_pTmp = (*XSavepoint)(_db.XpSavepoint)
+ *(**XSavepoint)(unsafe.Pointer(&_db.XpSavepoint)) = (*XSavepoint)(_229_pTmp.XpNext)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_229_pTmp))
+ _db.XnSavepoint -= 1
goto _888
}
- if _229_p1 != i32(1) {
+ if _229_p1 != int32(1) {
goto _904
}
func() {
- if _229_pSavepoint != (*XSavepoint)(_db.X73) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81387), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66616)))
+ if _229_pSavepoint != (*XSavepoint)(_db.XpSavepoint) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81387), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64758)))
crt.X__builtin_abort(tls)
}
}()
- *(**XSavepoint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X73))))) = (*XSavepoint)(_229_pSavepoint.X3)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_229_pSavepoint))
+ *(**XSavepoint)(unsafe.Pointer(&_db.XpSavepoint)) = (*XSavepoint)(_229_pSavepoint.XpNext)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_229_pSavepoint))
if _240_isTransaction == 0 {
- *(*int32)(unsafe.Pointer(&(_db.X75))) -= 1
+ _db.XnSavepoint -= 1
}
goto _908
_904:
- *(*int64)(unsafe.Pointer(&(_db.X77))) = _229_pSavepoint.X1
- *(*int64)(unsafe.Pointer(&(_db.X78))) = _229_pSavepoint.X2
+ _db.XnDeferredCons = _229_pSavepoint.XnDeferredCons
+ _db.XnDeferredImmCons = _229_pSavepoint.XnDeferredImmCons
_908:
- if _240_isTransaction != 0 && _229_p1 != i32(2) {
+ if _240_isTransaction != 0 && _229_p1 != int32(2) {
goto _910
}
_rc = _sqlite3VtabSavepoint(tls, _db, _229_p1, _229_iSavepoint)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _abort_due_to_error
}
_910:
@@ -50225,182 +50020,182 @@ _872:
}
goto _250
_145:
- _256_desiredAutoCommit = _pOp.X3
- _256_iRollback = _pOp.X4
+ _256_desiredAutoCommit = _pOp.Xp1
+ _256_iRollback = _pOp.Xp2
func() {
- if _256_desiredAutoCommit != i32(1) && _256_desiredAutoCommit != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81424), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66643)))
+ if _256_desiredAutoCommit != int32(1) && _256_desiredAutoCommit != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81424), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64785)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _256_desiredAutoCommit != i32(1) && _256_iRollback != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81425), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66688)))
+ if _256_desiredAutoCommit != int32(1) && _256_iRollback != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81425), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64830)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_db.X34) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81426), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66725)))
+ if _db.XnVdbeActive <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81426), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64867)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81427), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66440)))
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81427), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64582)))
crt.X__builtin_abort(tls)
}
}()
- if _256_desiredAutoCommit == int32(_db.X15) {
+ if _256_desiredAutoCommit == int32(_db.XautoCommit) {
goto _923
}
if _256_iRollback != 0 {
func() {
- if _256_desiredAutoCommit != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81431), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66743)))
+ if _256_desiredAutoCommit != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81431), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64885)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3RollbackAll(tls, _db, i32(516))
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(1))
+ _sqlite3RollbackAll(tls, _db, int32(516))
+ _db.XautoCommit = uint8(1)
goto _932
}
- if _256_desiredAutoCommit != 0 && ((_db.X36) > i32(0)) {
- _sqlite3VdbeError(tls, _p, str(66764))
- _rc = i32(5)
+ if _256_desiredAutoCommit != 0 && (_db.XnVdbeWrite > int32(0)) {
+ _sqlite3VdbeError(tls, _p, str(64906))
+ _rc = int32(5)
goto _abort_due_to_error
}
- if store1(&_rc, _sqlite3VdbeCheckFk(tls, _p, i32(1))) != i32(0) {
+ if store2(&_rc, _sqlite3VdbeCheckFk(tls, _p, int32(1))) != int32(0) {
goto _vdbe_return
}
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(_256_desiredAutoCommit)
+ _db.XautoCommit = uint8(_256_desiredAutoCommit)
_932:
- if _sqlite3VdbeHalt(tls, _p) == i32(5) {
- *(*int32)(unsafe.Pointer(&(_p.X9))) = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(1) - _256_desiredAutoCommit)
- *(*int32)(unsafe.Pointer(&(_p.X10))) = store1(&_rc, i32(5))
+ if _sqlite3VdbeHalt(tls, _p) == int32(5) {
+ _p.Xpc = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
+ _db.XautoCommit = uint8(int32(1) - _256_desiredAutoCommit)
+ _p.Xrc = store2(&_rc, int32(5))
goto _vdbe_return
}
func() {
- if (_db.X76) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81453), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66819)))
+ if _db.XnStatement != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81453), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64961)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3CloseSavepoints(tls, _db)
- if (_p.X10) == i32(0) {
- _rc = i32(101)
+ if _p.Xrc == int32(0) {
+ _rc = int32(101)
goto _937
}
- _rc = i32(1)
+ _rc = int32(1)
_937:
goto _vdbe_return
_923:
_sqlite3VdbeError(tls, _p, func() *int8 {
if _256_desiredAutoCommit == 0 {
- return str(66837)
+ return str(64979)
}
return func() *int8 {
if _256_iRollback != 0 {
- return str(66885)
+ return str(65027)
}
- return str(66928)
+ return str(65070)
}()
}())
- _rc = i32(1)
+ _rc = int32(1)
goto _abort_due_to_error
_146:
func() {
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81512), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66440)))
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81512), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64582)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) && (_pOp.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81513), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66969)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) && _pOp.Xp2 != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81513), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65111)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81514), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66998)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81514), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65140)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X33) & (u32(1) << uint(_pOp.X3))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81515), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67028)))
+ if (_p.XbtreeMask & (uint32(1) << uint(_pOp.Xp1))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81515), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65170)))
crt.X__builtin_abort(tls)
}
}()
- if (_pOp.X4) != 0 && (((_db.X6) & i32(67108864)) != i32(0)) {
- _rc = i32(8)
+ if _pOp.Xp2 != 0 && ((_db.Xflags & int32(67108864)) != int32(0)) {
+ _rc = int32(8)
goto _abort_due_to_error
}
- _266_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_pOp.X3))).X1)
+ _266_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp1)).XpBt)
if _266_pBt == nil {
goto _955
}
- _rc = _sqlite3BtreeBeginTrans(tls, _266_pBt, _pOp.X4)
- if _rc == i32(0) {
+ _rc = _sqlite3BtreeBeginTrans(tls, _266_pBt, _pOp.Xp2)
+ if _rc == int32(0) {
goto _956
}
- if (_rc & i32(255)) == i32(5) {
- *(*int32)(unsafe.Pointer(&(_p.X9))) = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _rc
+ if (_rc & int32(255)) == int32(5) {
+ _p.Xpc = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
+ _p.Xrc = _rc
goto _vdbe_return
}
goto _abort_due_to_error
_956:
- if (_pOp.X4) == 0 || ((uint32((_p.X32)>>uint(i32(6)))<<uint(i32(31)))>>uint(i32(31))) == 0 || int32(_db.X15) != i32(0) && (_db.X35) <= i32(1) {
+ if _pOp.Xp2 == 0 || ((uint32(_p.Xexpired>>6)<<31)>>31) == 0 || int32(_db.XautoCommit) != int32(0) && _db.XnVdbeRead <= int32(1) {
goto _961
}
func() {
if _sqlite3BtreeIsInTrans(tls, _266_pBt) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81538), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67062)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81538), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65204)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X12) == i32(0) {
+ if _p.XiStatement == int32(0) {
func() {
- if (_db.X76) < i32(0) || (_db.X75) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81540), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67089)))
+ if _db.XnStatement < int32(0) || _db.XnSavepoint < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81540), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65231)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_db.X76))) += 1
- *(*int32)(unsafe.Pointer(&(_p.X12))) = (_db.X75) + (_db.X76)
+ _db.XnStatement += 1
+ _p.XiStatement = _db.XnSavepoint + _db.XnStatement
}
- _rc = _sqlite3VtabSavepoint(tls, _db, i32(0), (_p.X12)-i32(1))
- if _rc == i32(0) {
- _rc = _sqlite3BtreeBeginStmt(tls, _266_pBt, _p.X12)
+ _rc = _sqlite3VtabSavepoint(tls, _db, int32(0), _p.XiStatement-int32(1))
+ if _rc == int32(0) {
+ _rc = _sqlite3BtreeBeginStmt(tls, _266_pBt, _p.XiStatement)
}
- *(*int64)(unsafe.Pointer(&(_p.X15))) = _db.X77
- *(*int64)(unsafe.Pointer(&(_p.X16))) = _db.X78
+ _p.XnStmtDefCons = _db.XnDeferredCons
+ _p.XnStmtDefImmCons = _db.XnDeferredImmCons
_961:
- _sqlite3BtreeGetMeta(tls, _266_pBt, i32(1), (*uint32)(unsafe.Pointer(&_266_iMeta)))
- _266_iGen = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_pOp.X3))).X4).X1
+ _sqlite3BtreeGetMeta(tls, _266_pBt, int32(1), (*uint32)(unsafe.Pointer(&_266_iMeta)))
+ _266_iGen = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp1)).XpSchema).XiGeneration
goto _969
_955:
- _266_iGen = store1(&_266_iMeta, i32(0))
+ _266_iGen = store2(&_266_iMeta, int32(0))
_969:
func() {
- if int32(_pOp.X2) != i32(0) && int32(_pOp.X1) != i32(-11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81567), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67128)))
+ if int32(_pOp.Xp5) != int32(0) && int32(_pOp.Xp4type) != int32(-11) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81567), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65270)))
crt.X__builtin_abort(tls)
}
}()
- if (_pOp.X2) == 0 || _266_iMeta == (_pOp.X5) && _266_iGen == (*(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) {
+ if _pOp.Xp5 == 0 || _266_iMeta == _pOp.Xp3 && _266_iGen == (*(*int32)(unsafe.Pointer(&_pOp.Xp4))) {
goto _975
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p.X22))
- *(**int8)(unsafe.Pointer(&(_p.X22))) = _sqlite3DbStrDup(tls, _db, str(59642))
- if ((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_pOp.X3))).X4).X0) != _266_iMeta {
- _sqlite3ResetOneSchema(tls, _db, _pOp.X3)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p.XzErrMsg))
+ _p.XzErrMsg = _sqlite3DbStrDup(tls, _db, str(59618))
+ if ((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp1)).XpSchema).Xschema_cookie) != _266_iMeta {
+ _sqlite3ResetOneSchema(tls, _db, _pOp.Xp1)
}
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 1, 0)
- _rc = i32(17)
+ storebits26(&_p.Xexpired, int16(1), 1, 0)
+ _rc = int32(17)
_975:
if _rc != 0 {
goto _abort_due_to_error
@@ -50408,96 +50203,92 @@ _975:
goto _250
_147:
func() {
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81611), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66440)))
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81611), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64582)))
crt.X__builtin_abort(tls)
}
}()
- _277_iDb = _pOp.X3
- _277_iCookie = _pOp.X5
+ _277_iDb = _pOp.Xp1
+ _277_iCookie = _pOp.Xp3
func() {
- if (_pOp.X5) >= i32(16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81614), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67164)))
+ if _pOp.Xp3 >= int32(16) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81614), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65306)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _277_iDb < i32(0) || _277_iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81615), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _277_iDb < int32(0) || _277_iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81615), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_277_iDb))).X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81616), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(60068)))
+ if (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_277_iDb)).XpBt) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81616), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65334)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X33) & (u32(1) << uint(_277_iDb))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81617), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67192)))
+ if (_p.XbtreeMask & (uint32(1) << uint(_277_iDb))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81617), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65354)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3BtreeGetMeta(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_277_iDb))).X1), _277_iCookie, (*uint32)(unsafe.Pointer(&_277_iMeta)))
+ _sqlite3BtreeGetMeta(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_277_iDb)).XpBt), _277_iCookie, (*uint32)(unsafe.Pointer(&_277_iMeta)))
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(_277_iMeta)
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(_277_iMeta)
goto _250
_148:
func() {
- if (_pOp.X4) >= i32(16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81637), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67222)))
+ if _pOp.Xp2 >= int32(16) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81637), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65384)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81638), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66998)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81638), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65140)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X33) & (u32(1) << uint(_pOp.X3))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81639), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67028)))
+ if (_p.XbtreeMask & (uint32(1) << uint(_pOp.Xp1))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81639), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65170)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81640), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81640), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
- _278_pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_pOp.X3)))
+ _278_pDb = elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp1))
func() {
- if (*XBtree)(_278_pDb.X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81642), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67265)))
+ if (*XBtree)(_278_pDb.XpBt) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81642), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65427)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3SchemaMutexHeld(tls, _db, _pOp.X3, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81643), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67277)))
+ if _sqlite3SchemaMutexHeld(tls, _db, _pOp.Xp1, nil) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81643), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65439)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeUpdateMeta(tls, (*XBtree)(_278_pDb.X1), _pOp.X4, uint32(_pOp.X5))
- if (_pOp.X4) == i32(1) {
- *(*int32)(unsafe.Pointer(&((*XSchema)(_278_pDb.X4).X0))) = _pOp.X5
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(2)
- sink1(*p)
- }
+ _rc = _sqlite3BtreeUpdateMeta(tls, (*XBtree)(_278_pDb.XpBt), _pOp.Xp2, uint32(_pOp.Xp3))
+ if _pOp.Xp2 == int32(1) {
+ (*XSchema)(_278_pDb.XpSchema).Xschema_cookie = _pOp.Xp3
+ _db.Xflags |= int32(2)
goto _1004
}
- if (_pOp.X4) == i32(2) {
- *(*uint8)(unsafe.Pointer(&((*XSchema)(_278_pDb.X4).X7))) = uint8(_pOp.X5)
+ if _pOp.Xp2 == int32(2) {
+ (*XSchema)(_278_pDb.XpSchema).Xfile_format = uint8(_pOp.Xp3)
}
_1004:
- if (_pOp.X3) == i32(1) {
+ if _pOp.Xp1 == int32(1) {
_sqlite3ExpirePreparedStatements(tls, _db)
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(0)), 1, 0)
+ storebits26(&_p.Xexpired, 0, 1, 0)
}
if _rc != 0 {
goto _abort_due_to_error
@@ -50505,22 +50296,22 @@ _1004:
goto _250
_149:
func() {
- if int32(_pOp.X2) != i32(0) && int32(_pOp.X2) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81739), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67316)))
+ if int32(_pOp.Xp5) != int32(0) && int32(_pOp.Xp5) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81739), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65478)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X1) != i32(-5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81740), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67353)))
+ if int32(_pOp.Xp4type) != int32(-5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81740), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65515)))
crt.X__builtin_abort(tls)
}
}()
- _282_pCur = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
- if (_282_pCur != nil) && ((_282_pCur.X17) == uint32(_pOp.X4)) {
+ _282_pCur = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
+ if (_282_pCur != nil) && (_282_pCur.XpgnoRoot == uint32(_pOp.Xp2)) {
func() {
- if int32(_282_pCur.X1) != (_pOp.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81743), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67377)))
+ if int32(_282_pCur.XiDb) != _pOp.Xp3 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81743), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65539)))
crt.X__builtin_abort(tls)
}
}()
@@ -50528,594 +50319,587 @@ _149:
}
_1013:
func() {
- if int32(_pOp.X0) != i32(107) && int32(_pOp.X2) != i32(0) && int32(_pOp.X2) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81751), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67396)))
+ if int32(_pOp.Xopcode) != int32(107) && int32(_pOp.Xp5) != int32(0) && int32(_pOp.Xp5) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81751), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65558)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81752), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66440)))
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81752), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64582)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X0) != i32(106) && int32(_pOp.X0) != i32(105) && int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81753), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67462)))
+ if int32(_pOp.Xopcode) != int32(106) && int32(_pOp.Xopcode) != int32(105) && int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81753), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65624)))
crt.X__builtin_abort(tls)
}
}()
- if ((uint32(_p.X32) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _rc = i32(516)
+ if ((uint32(_p.Xexpired) << 31) >> 31) != 0 {
+ _rc = int32(516)
goto _abort_due_to_error
}
- _282_nField = i32(0)
+ _282_nField = int32(0)
_282_pKeyInfo = nil
- _282_p2 = _pOp.X4
- _282_iDb = _pOp.X5
+ _282_p2 = _pOp.Xp2
+ _282_iDb = _pOp.Xp3
func() {
- if _282_iDb < i32(0) || _282_iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81765), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _282_iDb < int32(0) || _282_iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81765), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X33) & (u32(1) << uint(_282_iDb))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81766), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67192)))
+ if (_p.XbtreeMask & (uint32(1) << uint(_282_iDb))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81766), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65354)))
crt.X__builtin_abort(tls)
}
}()
- _282_pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_282_iDb)))
- _282_pX = (*XBtree)(_282_pDb.X1)
+ _282_pDb = elem27((*XDb)(_db.XaDb), uintptr(_282_iDb))
+ _282_pX = (*XBtree)(_282_pDb.XpBt)
func() {
if _282_pX == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81769), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67534)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81769), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65696)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pOp.X0) != i32(107) {
+ if int32(_pOp.Xopcode) != int32(107) {
goto _1034
}
- i32(0)
- _282_wrFlag = i32(4) | (int32(_pOp.X2) & i32(8))
+
+ _282_wrFlag = int32(4) | (int32(_pOp.Xp5) & int32(8))
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _282_iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81773), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81773), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- if int32((*XSchema)(_282_pDb.X4).X7) < int32(_p.X31) {
- *(*uint8)(unsafe.Pointer(&(_p.X31))) = (*XSchema)(_282_pDb.X4).X7
+ if int32((*XSchema)(_282_pDb.XpSchema).Xfile_format) < int32(_p.XminWriteFileFormat) {
+ _p.XminWriteFileFormat = (*XSchema)(_282_pDb.XpSchema).Xfile_format
}
goto _1038
_1034:
- _282_wrFlag = i32(0)
+ _282_wrFlag = int32(0)
_1038:
- if (int32(_pOp.X2) & i32(16)) != 0 {
+ if (int32(_pOp.Xp5) & int32(16)) != 0 {
func() {
- if _282_p2 <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81781), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67540)))
+ if _282_p2 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81781), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65702)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _282_p2 > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81782), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67545)))
+ if _282_p2 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81782), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65707)))
crt.X__builtin_abort(tls)
}
}()
- _pIn2 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_282_p2)))
+ _pIn2 = elem25(_aMem, uintptr(_282_p2))
func() {
- if (int32(_pIn2.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81784), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67574)))
+ if (int32(_pIn2.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81784), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65736)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pIn2.X1) & i32(4)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81785), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67591)))
+ if (int32(_pIn2.Xflags) & int32(4)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81785), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65753)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeMemIntegerify(tls, _pIn2)
- _282_p2 = int32(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn2.X0))))))
+ _282_p2 = int32(*(*int64)(unsafe.Pointer(&_pIn2.Xu)))
func() {
- if _282_p2 < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81792), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67618)))
+ if _282_p2 < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81792), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65780)))
crt.X__builtin_abort(tls)
}
}()
}
- if int32(_pOp.X1) == i32(-5) {
- _282_pKeyInfo = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ if int32(_pOp.Xp4type) == int32(-5) {
+ _282_pKeyInfo = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
func() {
- if int32(_282_pKeyInfo.X1) != int32(_db.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81796), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67624)))
+ if int32(_282_pKeyInfo.Xenc) != int32(_db.Xenc) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81796), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65786)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_282_pKeyInfo.X4) != _db {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81797), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67647)))
+ if (*Xsqlite3)(_282_pKeyInfo.Xdb) != _db {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81797), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65809)))
crt.X__builtin_abort(tls)
}
}()
- _282_nField = int32(_282_pKeyInfo.X2) + int32(_282_pKeyInfo.X3)
+ _282_nField = int32(_282_pKeyInfo.XnField) + int32(_282_pKeyInfo.XnXField)
goto _1056
}
- if int32(_pOp.X1) == i32(-11) {
- _282_nField = *(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
+ if int32(_pOp.Xp4type) == int32(-11) {
+ _282_nField = *(*int32)(unsafe.Pointer(&_pOp.Xp4))
}
_1056:
func() {
- if (_pOp.X3) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81802), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67664)))
+ if _pOp.Xp1 < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81802), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65826)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _282_nField < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81803), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67675)))
+ if _282_nField < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81803), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65837)))
crt.X__builtin_abort(tls)
}
}()
- _282_pCur = _allocateCursor(tls, _p, _pOp.X3, _282_nField, _282_iDb, uint8(i32(0)))
+ _282_pCur = _allocateCursor(tls, _p, _pOp.Xp1, _282_nField, _282_iDb, 0)
if _282_pCur == nil {
goto _no_mem
}
- *(*uint8)(unsafe.Pointer(&(_282_pCur.X2))) = uint8(i32(1))
- storebits3((*int8)(unsafe.Pointer(&(_282_pCur.X7))), int8(i32(1)), 4, 2)
- *(*uint32)(unsafe.Pointer(&(_282_pCur.X17))) = uint32(_282_p2)
- *(*uint8)(unsafe.Pointer(&(_282_pCur.X6))) = uint8(_282_wrFlag)
- _rc = _sqlite3BtreeCursor(tls, _282_pX, _282_p2, _282_wrFlag, _282_pKeyInfo, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_282_pCur.X14)))))))
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_282_pCur.X15))))) = _282_pKeyInfo
- *(*uint8)(unsafe.Pointer(&(_282_pCur.X4))) = uint8(bool2int(int32(_pOp.X1) != i32(-5)))
+ _282_pCur.XnullRow = uint8(1)
+ storebits5(&_282_pCur.XisEphemeral, int8(1), 4, 2)
+ _282_pCur.XpgnoRoot = uint32(_282_p2)
+ _282_pCur.XwrFlag = uint8(_282_wrFlag)
+ _rc = _sqlite3BtreeCursor(tls, _282_pX, _282_p2, _282_wrFlag, _282_pKeyInfo, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_282_pCur.Xuc))))
+ *(**XKeyInfo)(unsafe.Pointer(&_282_pCur.XpKeyInfo)) = _282_pKeyInfo
+ _282_pCur.XisTable = uint8(bool2int(int32(_pOp.Xp4type) != int32(-5)))
_open_cursor_set_hints:
- i32(0)
- i32(0)
- _sqlite3BtreeCursorHintFlags(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_282_pCur.X14)))))), uint32(int32(_pOp.X2)&i32(3)))
+
+ _sqlite3BtreeCursorHintFlags(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_282_pCur.Xuc))), uint32(int32(_pOp.Xp5)&int32(3)))
if _rc != 0 {
goto _abort_due_to_error
}
goto _250
_152:
- _291_pOrig = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X4)))
+ _291_pOrig = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp2))
func() {
- if (*XBtree)(_291_pOrig.X8) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81847), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67685)))
+ if (*XBtree)(_291_pOrig.XpBtx) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81847), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65847)))
crt.X__builtin_abort(tls)
}
}()
- _291_pCx = _allocateCursor(tls, _p, _pOp.X3, int32(_291_pOrig.X18), i32(-1), uint8(i32(0)))
+ _291_pCx = _allocateCursor(tls, _p, _pOp.Xp1, int32(_291_pOrig.XnField), int32(-1), 0)
if _291_pCx == nil {
goto _no_mem
}
- *(*uint8)(unsafe.Pointer(&(_291_pCx.X2))) = uint8(i32(1))
- storebits3((*int8)(unsafe.Pointer(&(_291_pCx.X7))), int8(i32(1)), 1, 0)
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_291_pCx.X15))))) = (*XKeyInfo)(_291_pOrig.X15)
- *(*uint8)(unsafe.Pointer(&(_291_pCx.X4))) = _291_pOrig.X4
- _rc = _sqlite3BtreeCursor(tls, (*XBtree)(_291_pOrig.X8), i32(1), i32(4), (*XKeyInfo)(_291_pCx.X15), (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_291_pCx.X14)))))))
+ _291_pCx.XnullRow = uint8(1)
+ storebits5(&_291_pCx.XisEphemeral, int8(1), 1, 0)
+ *(**XKeyInfo)(unsafe.Pointer(&_291_pCx.XpKeyInfo)) = (*XKeyInfo)(_291_pOrig.XpKeyInfo)
+ _291_pCx.XisTable = _291_pOrig.XisTable
+ _rc = _sqlite3BtreeCursor(tls, (*XBtree)(_291_pOrig.XpBtx), int32(1), int32(4), (*XKeyInfo)(_291_pCx.XpKeyInfo), (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_291_pCx.Xuc))))
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81860), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81860), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
goto _250
_153:
func() {
- if (_pOp.X3) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81902), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67664)))
+ if _pOp.Xp1 < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81902), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65826)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X4) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81903), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67700)))
+ if _pOp.Xp2 < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81903), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65862)))
crt.X__builtin_abort(tls)
}
}()
- _292_pCx = _allocateCursor(tls, _p, _pOp.X3, _pOp.X4, i32(-1), uint8(i32(0)))
+ _292_pCx = _allocateCursor(tls, _p, _pOp.Xp1, _pOp.Xp2, int32(-1), 0)
if _292_pCx == nil {
goto _no_mem
}
- *(*uint8)(unsafe.Pointer(&(_292_pCx.X2))) = uint8(i32(1))
- storebits3((*int8)(unsafe.Pointer(&(_292_pCx.X7))), int8(i32(1)), 1, 0)
- _rc = _sqlite3BtreeOpen(tls, (*Xsqlite3_vfs)(_db.X0), nil, _db, (**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_292_pCx.X8))))), i32(5)|int32(_pOp.X2), _sqlite3VdbeExecØ00vfsFlagsØ006)
- if _rc == i32(0) {
- _rc = _sqlite3BtreeBeginTrans(tls, (*XBtree)(_292_pCx.X8), i32(1))
+ _292_pCx.XnullRow = uint8(1)
+ storebits5(&_292_pCx.XisEphemeral, int8(1), 1, 0)
+ _rc = _sqlite3BtreeOpen(tls, (*Xsqlite3_vfs)(_db.XpVfs), nil, _db, (**XBtree)(unsafe.Pointer(&_292_pCx.XpBtx)), int32(5)|int32(_pOp.Xp5), _sqlite3VdbeExecØ00vfsFlagsØ006)
+ if _rc == int32(0) {
+ _rc = _sqlite3BtreeBeginTrans(tls, (*XBtree)(_292_pCx.XpBtx), int32(1))
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _1074
}
- if store50((**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_292_pCx.X15))))), store50(&_292_pKeyInfo, (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))))) == nil {
+ if store65((**XKeyInfo)(unsafe.Pointer(&_292_pCx.XpKeyInfo)), store65(&_292_pKeyInfo, (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))))) == nil {
goto _1075
}
func() {
- if int32(_pOp.X1) != i32(-5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81921), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67353)))
+ if int32(_pOp.Xp4type) != int32(-5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81921), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65515)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeCreateTable(tls, (*XBtree)(_292_pCx.X8), &_295_pgno, i32(2)|int32(_pOp.X2))
- if _rc == i32(0) {
+ _rc = _sqlite3BtreeCreateTable(tls, (*XBtree)(_292_pCx.XpBtx), &_295_pgno, int32(2)|int32(_pOp.Xp5))
+ if _rc == int32(0) {
func() {
- if _295_pgno != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81924), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67711)))
+ if _295_pgno != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81924), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65873)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_292_pKeyInfo.X4) != _db {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81925), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67647)))
+ if (*Xsqlite3)(_292_pKeyInfo.Xdb) != _db {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81925), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65809)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_292_pKeyInfo.X1) != int32(_db.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81926), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67624)))
+ if int32(_292_pKeyInfo.Xenc) != int32(_db.Xenc) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81926), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65786)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeCursor(tls, (*XBtree)(_292_pCx.X8), _295_pgno, i32(4), _292_pKeyInfo, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_292_pCx.X14)))))))
+ _rc = _sqlite3BtreeCursor(tls, (*XBtree)(_292_pCx.XpBtx), _295_pgno, int32(4), _292_pKeyInfo, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_292_pCx.Xuc))))
}
- *(*uint8)(unsafe.Pointer(&(_292_pCx.X4))) = uint8(i32(0))
+ _292_pCx.XisTable = 0
goto _1085
_1075:
- _rc = _sqlite3BtreeCursor(tls, (*XBtree)(_292_pCx.X8), i32(1), i32(4), nil, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_292_pCx.X14)))))))
- *(*uint8)(unsafe.Pointer(&(_292_pCx.X4))) = uint8(i32(1))
+ _rc = _sqlite3BtreeCursor(tls, (*XBtree)(_292_pCx.XpBtx), int32(1), int32(4), nil, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_292_pCx.Xuc))))
+ _292_pCx.XisTable = uint8(1)
_1085:
_1074:
if _rc != 0 {
goto _abort_due_to_error
}
- storebits3((*int8)(unsafe.Pointer(&(_292_pCx.X7))), int8(bool2int(int32(_pOp.X2) != i32(8))), 4, 2)
+ storebits5(&_292_pCx.XisEphemeral, int8(bool2int(int32(_pOp.Xp5) != int32(8))), 4, 2)
goto _250
_155:
func() {
- if (_pOp.X3) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81955), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67664)))
+ if _pOp.Xp1 < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81955), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65826)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X4) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81956), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67700)))
+ if _pOp.Xp2 < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81956), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65862)))
crt.X__builtin_abort(tls)
}
}()
- _298_pCx = _allocateCursor(tls, _p, _pOp.X3, _pOp.X4, i32(-1), uint8(i32(1)))
+ _298_pCx = _allocateCursor(tls, _p, _pOp.Xp1, _pOp.Xp2, int32(-1), uint8(1))
if _298_pCx == nil {
goto _no_mem
}
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_298_pCx.X15))))) = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ *(**XKeyInfo)(unsafe.Pointer(&_298_pCx.XpKeyInfo)) = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
func() {
- if (*Xsqlite3)((*XKeyInfo)(_298_pCx.X15).X4) != _db {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81960), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67731)))
+ if (*Xsqlite3)((*XKeyInfo)(_298_pCx.XpKeyInfo).Xdb) != _db {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81960), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65893)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XKeyInfo)(_298_pCx.X15).X1) != int32(_db.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81961), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67753)))
+ if int32((*XKeyInfo)(_298_pCx.XpKeyInfo).Xenc) != int32(_db.Xenc) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81961), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65915)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3VdbeSorterInit(tls, _db, _pOp.X5, _298_pCx)
+ _rc = _sqlite3VdbeSorterInit(tls, _db, _pOp.Xp3, _298_pCx)
if _rc != 0 {
goto _abort_due_to_error
}
goto _250
_156:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81976), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81976), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _299_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _299_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
- if int32(_299_pC.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(81978), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67781)))
+ if int32(_299_pC.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(81978), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65943)))
crt.X__builtin_abort(tls)
}
}()
- if postInc6((*int64)(unsafe.Pointer(&(_299_pC.X9))), int64(1)) == int64(i32(0)) {
+ if postInc35(&_299_pC.XseqCount, 1) == (0) {
goto _jump_to_p2
}
goto _250
_157:
func() {
- if (_pOp.X3) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82004), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67664)))
+ if _pOp.Xp1 < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82004), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65826)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X5) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82005), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67794)))
+ if _pOp.Xp3 < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82005), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65956)))
crt.X__builtin_abort(tls)
}
}()
- _301_pCx = _allocateCursor(tls, _p, _pOp.X3, _pOp.X5, i32(-1), uint8(i32(3)))
+ _301_pCx = _allocateCursor(tls, _p, _pOp.Xp1, _pOp.Xp3, int32(-1), uint8(3))
if _301_pCx == nil {
goto _no_mem
}
- *(*uint8)(unsafe.Pointer(&(_301_pCx.X2))) = uint8(i32(1))
- *(*int32)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_301_pCx.X14))))) = _pOp.X4
- *(*uint8)(unsafe.Pointer(&(_301_pCx.X4))) = uint8(i32(1))
+ _301_pCx.XnullRow = uint8(1)
+ *(*int32)(unsafe.Pointer(&_301_pCx.Xuc)) = _pOp.Xp2
+ _301_pCx.XisTable = uint8(1)
func() {
- if int32(_pOp.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82011), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67805)))
+ if int32(_pOp.Xp5) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82011), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65967)))
crt.X__builtin_abort(tls)
}
}()
goto _250
_158:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82021), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82021), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeFreeCursor(tls, _p, *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3))))
- *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3))) = nil
+ _sqlite3VdbeFreeCursor(tls, _p, *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1)))
+ *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1)) = nil
goto _250
_159:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82145), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82145), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X4) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82146), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67816)))
+ if _pOp.Xp2 == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82146), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65978)))
crt.X__builtin_abort(tls)
}
}()
- _303_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _303_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _303_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82148), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82148), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_303_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82149), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_303_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82149), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- i32(0)
- i32(0)
+
func() {
- if ((uint32((_303_pC.X7)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82153), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67827)))
+ if ((uint32(_303_pC.XisEphemeral>>2) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82153), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65989)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_303_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82154), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_303_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82154), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
- _303_oc = int32(_pOp.X0)
- _303_eqOnly = i32(0)
- *(*uint8)(unsafe.Pointer(&(_303_pC.X2))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_303_pC.X5))) = _pOp.X0
- if (_303_pC.X4) == 0 {
+ _303_oc = int32(_pOp.Xopcode)
+ _303_eqOnly = int32(0)
+ _303_pC.XnullRow = 0
+ _303_pC.XseekOp = _pOp.Xopcode
+ if _303_pC.XisTable == 0 {
goto _1126
}
func() {
- if _sqlite3BtreeCursorHasHint(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_303_pC.X14)))))), uint32(i32(2))) != i32(0) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82164), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67859)))
+ if _sqlite3BtreeCursorHasHint(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_303_pC.Xuc))), uint32(2)) != int32(0) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82164), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66021)))
crt.X__builtin_abort(tls)
}
}()
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- if (int32(_pIn3.X1) & i32(14)) == i32(2) {
- _applyNumericAffinity(tls, _pIn3, i32(0))
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
+ if (int32(_pIn3.Xflags) & int32(14)) == int32(2) {
+ _applyNumericAffinity(tls, _pIn3, int32(0))
}
_303_iKey = _sqlite3VdbeIntValue(tls, _pIn3)
- if (int32(_pIn3.X1) & i32(4)) != i32(0) {
+ if (int32(_pIn3.Xflags) & int32(4)) != int32(0) {
goto _1131
}
- if (int32(_pIn3.X1) & i32(8)) == i32(0) {
+ if (int32(_pIn3.Xflags) & int32(8)) == int32(0) {
goto _jump_to_p2
}
- if (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0)))))) >= float64(_303_iKey) {
+ if (*(*float64)(unsafe.Pointer(&_pIn3.Xu))) >= float64(_303_iKey) {
goto _1133
}
- i32(0)
- i32(0)
- i32(0)
- if (_303_oc & i32(1)) == i32(1) {
+
+ if (_303_oc & int32(1)) == int32(1) {
_303_oc -= 1
}
goto _1136
_1133:
- if (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0)))))) <= float64(_303_iKey) {
+ if (*(*float64)(unsafe.Pointer(&_pIn3.Xu))) <= float64(_303_iKey) {
goto _1136
}
- i32(0)
- i32(0)
- i32(0)
- if (_303_oc & i32(1)) == i32(0) {
+
+ if (_303_oc & int32(1)) == int32(0) {
_303_oc += 1
}
_1136:
_1131:
- _rc = _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_303_pC.X14)))))), nil, int64(uint64(_303_iKey)), i32(0), &_303_res)
- *(*int64)(unsafe.Pointer(&(_303_pC.X20))) = _303_iKey
- if _rc != i32(0) {
+ _rc = _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_303_pC.Xuc))), nil, int64(uint64(_303_iKey)), int32(0), &_303_res)
+ _303_pC.XmovetoTarget = _303_iKey
+ if _rc != int32(0) {
goto _abort_due_to_error
}
goto _1139
_1126:
- if _sqlite3BtreeCursorHasHint(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_303_pC.X14)))))), uint32(i32(2))) != 0 {
- _303_eqOnly = i32(1)
+ if _sqlite3BtreeCursorHasHint(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_303_pC.Xuc))), uint32(2)) != 0 {
+ _303_eqOnly = int32(1)
func() {
- if int32(_pOp.X0) != i32(26) && int32(_pOp.X0) != i32(25) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82221), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67933)))
+ if int32(_pOp.Xopcode) != int32(26) && int32(_pOp.Xopcode) != int32(25) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82221), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66095)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(1)))).X0) != i32(40) && int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(1)))).X0) != i32(39) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82222), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67982)))
+ if int32(elem61(_pOp, uintptr(1)).Xopcode) != int32(40) && int32(elem61(_pOp, uintptr(1)).Xopcode) != int32(39) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82222), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66144)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(1)))).X3) != ((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(0)))).X3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82223), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68033)))
+ if (elem61(_pOp, uintptr(1)).Xp1) != (elem61(_pOp, 0).Xp1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82223), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66195)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(1)))).X4) != ((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(0)))).X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82224), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68054)))
+ if (elem61(_pOp, uintptr(1)).Xp2) != (elem61(_pOp, 0).Xp2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82224), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66216)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(1)))).X5) != ((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(0)))).X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82225), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68075)))
+ if (elem61(_pOp, uintptr(1)).Xp3) != (elem61(_pOp, 0).Xp3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82225), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66237)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(1)))).X6)))))) != (*(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(0)))).X6)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82226), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68096)))
+ if (*(*int32)(unsafe.Pointer(&(elem61(_pOp, uintptr(1)).Xp4)))) != (*(*int32)(unsafe.Pointer(&(elem61(_pOp, 0).Xp4)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82226), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66258)))
crt.X__builtin_abort(tls)
}
}()
}
- _303_nField = *(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
+ _303_nField = *(*int32)(unsafe.Pointer(&_pOp.Xp4))
func() {
- if int32(_pOp.X1) != i32(-11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82230), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68121)))
+ if int32(_pOp.Xp4type) != int32(-11) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82230), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66283)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _303_nField <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82231), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68143)))
+ if _303_nField <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82231), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66305)))
crt.X__builtin_abort(tls)
}
}()
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_303_r.X0))))) = (*XKeyInfo)(_303_pC.X15)
- *(*uint16)(unsafe.Pointer(&(_303_r.X2))) = uint16(_303_nField)
- *(*int8)(unsafe.Pointer(&(_303_r.X3))) = int8(func() int32 {
- if (i32(1) & (_303_oc - i32(24))) != 0 {
- return i32(-1)
+ *(**XKeyInfo)(unsafe.Pointer(&_303_r.XpKeyInfo)) = (*XKeyInfo)(_303_pC.XpKeyInfo)
+ _303_r.XnField = uint16(_303_nField)
+ _303_r.Xdefault_rc = int8(func() int32 {
+ if (int32(1) & (_303_oc - int32(24))) != 0 {
+ return int32(-1)
}
- return i32(1)
+ return int32(1)
}())
func() {
- if _303_oc == i32(27) && int32(_303_r.X3) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82243), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68152)))
+ if _303_oc == int32(27) && int32(_303_r.Xdefault_rc) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82243), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66314)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _303_oc == i32(25) && int32(_303_r.X3) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82244), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68186)))
+ if _303_oc == int32(25) && int32(_303_r.Xdefault_rc) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82244), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66348)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _303_oc == i32(26) && int32(_303_r.X3) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82245), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68220)))
+ if _303_oc == int32(26) && int32(_303_r.Xdefault_rc) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82245), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66382)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _303_oc == i32(24) && int32(_303_r.X3) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82246), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68254)))
+ if _303_oc == int32(24) && int32(_303_r.Xdefault_rc) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82246), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66416)))
crt.X__builtin_abort(tls)
}
}()
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_303_r.X1))))) = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- _313_i = i32(0)
+ *(**XMem)(unsafe.Pointer(&_303_r.XaMem)) = elem25(_aMem, uintptr(_pOp.Xp3))
+ _313_i = int32(0)
_1173:
- if _313_i >= int32(_303_r.X2) {
+ if _313_i >= int32(_303_r.XnField) {
goto _1176
}
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr(_303_r.X1)+48*uintptr(_313_i))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82250), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68288)))
+ if (int32(elem25((*XMem)(_303_r.XaMem), uintptr(_313_i)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82250), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66450)))
crt.X__builtin_abort(tls)
}
}()
_313_i += 1
goto _1173
_1176:
- *(*uint8)(unsafe.Pointer(&(_303_r.X7))) = uint8(i32(0))
- _rc = _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_303_pC.X14)))))), &_303_r, int64(i32(0)), i32(0), &_303_res)
- if _rc != i32(0) {
+ _303_r.XeqSeen = 0
+ _rc = _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_303_pC.Xuc))), &_303_r, 0, int32(0), &_303_res)
+ if _rc != int32(0) {
goto _abort_due_to_error
}
- if _303_eqOnly != 0 && (int32(_303_r.X7) == i32(0)) {
+ if _303_eqOnly != 0 && (int32(_303_r.XeqSeen) == int32(0)) {
func() {
- if _303_res == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82258), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68311)))
+ if _303_res == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82258), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66473)))
crt.X__builtin_abort(tls)
}
}()
goto _seek_not_found
}
_1139:
- *(*uint8)(unsafe.Pointer(&(_303_pC.X3))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(&(_303_pC.X11))) = uint32(i32(0))
- if _303_oc < i32(26) {
+ _303_pC.XdeferredMoveto = 0
+ _303_pC.XcacheStatus = 0
+ if _303_oc < int32(26) {
goto _1184
}
func() {
- if _303_oc != i32(26) && _303_oc != i32(27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82267), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68318)))
+ if _303_oc != int32(26) && _303_oc != int32(27) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82267), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66480)))
crt.X__builtin_abort(tls)
}
}()
- if _303_res >= i32(0) && (_303_res != i32(0) || _303_oc != i32(27)) {
+ if _303_res >= int32(0) && (_303_res != int32(0) || _303_oc != int32(27)) {
goto _1190
}
- _303_res = i32(0)
- _rc = _sqlite3BtreeNext(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_303_pC.X14)))))), &_303_res)
- if _rc != i32(0) {
+ _303_res = int32(0)
+ _rc = _sqlite3BtreeNext(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_303_pC.Xuc))), &_303_res)
+ if _rc != int32(0) {
goto _abort_due_to_error
}
goto _1192
_1190:
- _303_res = i32(0)
+ _303_res = int32(0)
_1192:
goto _seek_not_found
_1184:
func() {
- if _303_oc != i32(24) && _303_oc != i32(25) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82276), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68349)))
+ if _303_oc != int32(24) && _303_oc != int32(25) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82276), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66511)))
crt.X__builtin_abort(tls)
}
}()
- if _303_res <= i32(0) && (_303_res != i32(0) || _303_oc != i32(24)) {
+ if _303_res <= int32(0) && (_303_res != int32(0) || _303_oc != int32(24)) {
goto _1199
}
- _303_res = i32(0)
- _rc = _sqlite3BtreePrevious(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_303_pC.X14)))))), &_303_res)
- if _rc != i32(0) {
+ _303_res = int32(0)
+ _rc = _sqlite3BtreePrevious(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_303_pC.Xuc))), &_303_res)
+ if _rc != int32(0) {
goto _abort_due_to_error
}
goto _1201
_1199:
- _303_res = _sqlite3BtreeEof(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_303_pC.X14)))))))
+ _303_res = _sqlite3BtreeEof(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_303_pC.Xuc))))
_1201:
_seek_not_found:
func() {
- if (_pOp.X4) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82289), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62895)))
+ if _pOp.Xp2 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82289), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61037)))
crt.X__builtin_abort(tls)
}
}()
@@ -51124,8 +50908,8 @@ _seek_not_found:
}
if _303_eqOnly != 0 {
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(1)))).X0) != i32(40) && int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(1)))).X0) != i32(39) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82294), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67982)))
+ if int32(elem61(_pOp, uintptr(1)).Xopcode) != int32(40) && int32(elem61(_pOp, uintptr(1)).Xopcode) != int32(39) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82294), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66144)))
crt.X__builtin_abort(tls)
}
}()
@@ -51134,72 +50918,72 @@ _seek_not_found:
goto _250
_163:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82375), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82375), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X1) != i32(-11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82376), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68121)))
+ if int32(_pOp.Xp4type) != int32(-11) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82376), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66283)))
crt.X__builtin_abort(tls)
}
}()
- _324_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _324_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _324_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82378), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82378), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_324_pC.X5))) = _pOp.X0
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _324_pC.XseekOp = _pOp.Xopcode
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
func() {
- if int32(_324_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82383), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_324_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82383), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_324_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82384), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_324_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82384), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_324_pC.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82385), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68380)))
+ if int32(_324_pC.XisTable) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82385), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66542)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) <= i32(0) {
+ if (*(*int32)(unsafe.Pointer(&_pOp.Xp4))) <= int32(0) {
goto _1223
}
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_324_r.X0))))) = (*XKeyInfo)(_324_pC.X15)
- *(*uint16)(unsafe.Pointer(&(_324_r.X2))) = uint16(*(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_324_r.X1))))) = _pIn3
- _324_ii = i32(0)
+ *(**XKeyInfo)(unsafe.Pointer(&_324_r.XpKeyInfo)) = (*XKeyInfo)(_324_pC.XpKeyInfo)
+ _324_r.XnField = uint16(*(*int32)(unsafe.Pointer(&_pOp.Xp4)))
+ *(**XMem)(unsafe.Pointer(&_324_r.XaMem)) = _pIn3
+ _324_ii = int32(0)
_1224:
- if _324_ii >= int32(_324_r.X2) {
+ if _324_ii >= int32(_324_r.XnField) {
goto _1227
}
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr(_324_r.X1)+48*uintptr(_324_ii))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82392), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68395)))
+ if (int32(elem25((*XMem)(_324_r.XaMem), uintptr(_324_ii)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82392), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66557)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr(_324_r.X1)+48*uintptr(_324_ii))).X1)&i32(16384)) != i32(0) && ((*XMem)(unsafe.Pointer(uintptr(_324_r.X1)+48*uintptr(_324_ii))).X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82393), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68419)))
+ if (int32(elem25((*XMem)(_324_r.XaMem), uintptr(_324_ii)).Xflags)&int32(16384)) != int32(0) && (elem25((*XMem)(_324_r.XaMem), uintptr(_324_ii)).Xn) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82393), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66581)))
crt.X__builtin_abort(tls)
}
}()
if _324_ii == 0 {
goto _1234
}
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, (_pOp.X5)+_324_ii, (*XMem)(unsafe.Pointer(uintptr(_324_r.X1)+48*uintptr(_324_ii))))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp3+_324_ii, elem25((*XMem)(_324_r.XaMem), uintptr(_324_ii)))
}
_1234:
_324_ii += 1
@@ -51210,63 +50994,63 @@ _1227:
goto _1235
_1223:
func() {
- if (int32(_pIn3.X1) & i32(16)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82400), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68471)))
+ if (int32(_pIn3.Xflags) & int32(16)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82400), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66633)))
crt.X__builtin_abort(tls)
}
}()
_rc = func() int32 {
- if (int32(_pIn3.X1) & i32(16384)) != 0 {
+ if (int32(_pIn3.Xflags) & int32(16384)) != 0 {
return _sqlite3VdbeMemExpandBlob(tls, _pIn3)
}
- return i32(0)
+ return int32(0)
}()
func() {
- if _rc != i32(0) && _rc != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82402), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(5805)))
+ if _rc != int32(0) && _rc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82402), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(5706)))
crt.X__builtin_abort(tls)
}
}()
if _rc != 0 {
goto _no_mem
}
- _324_pFree = store51(&_324_pIdxKey, _sqlite3VdbeAllocUnpackedRecord(tls, (*XKeyInfo)(_324_pC.X15)))
+ _324_pFree = store83(&_324_pIdxKey, _sqlite3VdbeAllocUnpackedRecord(tls, (*XKeyInfo)(_324_pC.XpKeyInfo)))
if _324_pIdxKey == nil {
goto _no_mem
}
- _sqlite3VdbeRecordUnpack(tls, (*XKeyInfo)(_324_pC.X15), _pIn3.X4, (unsafe.Pointer)(_pIn3.X5), _324_pIdxKey)
+ _sqlite3VdbeRecordUnpack(tls, (*XKeyInfo)(_324_pC.XpKeyInfo), _pIn3.Xn, unsafe.Pointer(_pIn3.Xz), _324_pIdxKey)
_1235:
- *(*int8)(unsafe.Pointer(&(_324_pIdxKey.X3))) = int8(i32(0))
- _324_takeJump = i32(0)
- if int32(_pOp.X0) != i32(28) {
+ _324_pIdxKey.Xdefault_rc = 0
+ _324_takeJump = int32(0)
+ if int32(_pOp.Xopcode) != int32(28) {
goto _1245
}
- _324_ii = i32(0)
+ _324_ii = int32(0)
_1246:
- if _324_ii >= int32(_324_pIdxKey.X2) {
+ if _324_ii >= int32(_324_pIdxKey.XnField) {
goto _1249
}
- if (int32((*XMem)(unsafe.Pointer(uintptr(_324_pIdxKey.X1)+48*uintptr(_324_ii))).X1) & i32(1)) != 0 {
- _324_takeJump = i32(1)
+ if (int32(elem25((*XMem)(_324_pIdxKey.XaMem), uintptr(_324_ii)).Xflags) & int32(1)) != 0 {
+ _324_takeJump = int32(1)
goto _1249
}
_324_ii += 1
goto _1246
_1249:
_1245:
- _rc = _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_324_pC.X14)))))), _324_pIdxKey, int64(i32(0)), i32(0), &_324_res)
+ _rc = _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_324_pC.Xuc))), _324_pIdxKey, 0, int32(0), &_324_res)
if _324_pFree != nil {
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_324_pFree))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_324_pFree))
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _abort_due_to_error
}
- *(*int32)(unsafe.Pointer(&(_324_pC.X12))) = _324_res
- _324_alreadyExists = bool2int(_324_res == i32(0))
- *(*uint8)(unsafe.Pointer(&(_324_pC.X2))) = uint8(i32(1) - _324_alreadyExists)
- *(*uint8)(unsafe.Pointer(&(_324_pC.X3))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(&(_324_pC.X11))) = uint32(i32(0))
- if int32(_pOp.X0) != i32(30) {
+ _324_pC.XseekResult = _324_res
+ _324_alreadyExists = bool2int(_324_res == int32(0))
+ _324_pC.XnullRow = uint8(int32(1) - _324_alreadyExists)
+ _324_pC.XdeferredMoveto = 0
+ _324_pC.XcacheStatus = 0
+ if int32(_pOp.Xopcode) != int32(30) {
goto _1253
}
if _324_alreadyExists != 0 {
@@ -51280,80 +51064,80 @@ _1253:
_1255:
goto _250
_166:
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- if (int32(_pIn3.X1) & i32(4)) != i32(0) {
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
+ if (int32(_pIn3.Xflags) & int32(4)) != int32(0) {
goto _1258
}
- _applyAffinity(tls, _pIn3, int8(i32(67)), _encoding)
- if (int32(_pIn3.X1) & i32(4)) == i32(0) {
+ _applyAffinity(tls, _pIn3, int8(67), _encoding)
+ if (int32(_pIn3.Xflags) & int32(4)) == int32(0) {
goto _jump_to_p2
}
_1258:
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
func() {
- if (int32(_pIn3.X1) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82502), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63806)))
+ if (int32(_pIn3.Xflags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82502), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61948)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82503), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82503), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _334_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _334_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _334_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82505), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82505), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_334_pC.X5))) = uint8(i32(0))
+ _334_pC.XseekOp = 0
func() {
- if (_334_pC.X4) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82509), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68494)))
+ if _334_pC.XisTable == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82509), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66656)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_334_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82510), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_334_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82510), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
- _334_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_334_pC.X14))))))
+ _334_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_334_pC.Xuc)))
func() {
if _334_pCrsr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82512), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68506)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82512), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66668)))
crt.X__builtin_abort(tls)
}
}()
- _334_res = i32(0)
- _334_iKey = uint64(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0))))))
- _rc = _sqlite3BtreeMovetoUnpacked(tls, _334_pCrsr, nil, int64(_334_iKey), i32(0), &_334_res)
+ _334_res = int32(0)
+ _334_iKey = uint64(*(*int64)(unsafe.Pointer(&_pIn3.Xu)))
+ _rc = _sqlite3BtreeMovetoUnpacked(tls, _334_pCrsr, nil, int64(_334_iKey), int32(0), &_334_res)
func() {
- if _rc != i32(0) && _334_res != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82516), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68515)))
+ if _rc != int32(0) && _334_res != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82516), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66677)))
crt.X__builtin_abort(tls)
}
}()
- *(*int64)(unsafe.Pointer(&(_334_pC.X20))) = int64(_334_iKey)
- *(*uint8)(unsafe.Pointer(&(_334_pC.X2))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(&(_334_pC.X11))) = uint32(i32(0))
- *(*uint8)(unsafe.Pointer(&(_334_pC.X3))) = uint8(i32(0))
- *(*int32)(unsafe.Pointer(&(_334_pC.X12))) = _334_res
- if _334_res == i32(0) {
+ _334_pC.XmovetoTarget = int64(_334_iKey)
+ _334_pC.XnullRow = 0
+ _334_pC.XcacheStatus = 0
+ _334_pC.XdeferredMoveto = 0
+ _334_pC.XseekResult = _334_res
+ if _334_res == int32(0) {
goto _1276
}
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82524), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82524), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
- if (_pOp.X4) == i32(0) {
- _rc = _sqlite3CorruptError(tls, i32(82526))
+ if _pOp.Xp2 == int32(0) {
+ _rc = _sqlite3CorruptError(tls, int32(82526))
goto _1280
}
goto _jump_to_p2
@@ -51365,398 +51149,394 @@ _1276:
goto _250
_168:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82544), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82544), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82545), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65574)))
+ if (*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82545), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63716)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))).X0) == i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82546), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68539)))
+ if int32((*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))).XeCurType) == int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82546), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66701)))
crt.X__builtin_abort(tls)
}
}()
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = postInc6((*int64)(unsafe.Pointer(&((*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))).X9))), int64(1))
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = postInc35(&((*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))).XseqCount), 1)
goto _250
_169:
- _340_v = int64(i32(0))
- _340_res = i32(0)
+ _340_v = 0
+ _340_res = int32(0)
_pOut = _out2Prerelease(tls, _p, _pOp)
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82579), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82579), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _340_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _340_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _340_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82581), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82581), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_340_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82582), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_340_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82582), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_340_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82583), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_340_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82583), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_340_pC.X4) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82598), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68494)))
+ if _340_pC.XisTable == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82598), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66656)))
crt.X__builtin_abort(tls)
}
}()
- if ((uint32((_340_pC.X7)>>uint(i32(1))) << uint(i32(31))) >> uint(i32(31))) != 0 {
+ if ((uint32(_340_pC.XisEphemeral>>1) << 31) >> 31) != 0 {
goto _1300
}
- _rc = _sqlite3BtreeLast(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_340_pC.X14)))))), &_340_res)
- if _rc != i32(0) {
+ _rc = _sqlite3BtreeLast(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_340_pC.Xuc))), &_340_res)
+ if _rc != int32(0) {
goto _abort_due_to_error
}
if _340_res != 0 {
- _340_v = int64(i32(1))
+ _340_v = int64(1)
goto _1303
}
func() {
- if _sqlite3BtreeCursorIsValid(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_340_pC.X14))))))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82618), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68581)))
+ if _sqlite3BtreeCursorIsValid(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_340_pC.Xuc)))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82618), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66743)))
crt.X__builtin_abort(tls)
}
}()
- _340_v = _sqlite3BtreeIntegerKey(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_340_pC.X14)))))))
- if _340_v >= i64(9223372036854775807) {
- storebits3((*int8)(unsafe.Pointer(&(_340_pC.X7))), int8(i32(1)), 2, 1)
+ _340_v = _sqlite3BtreeIntegerKey(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_340_pC.Xuc))))
+ if _340_v >= int64(9223372036854775807) {
+ storebits5(&_340_pC.XisEphemeral, int8(1), 2, 1)
goto _1307
}
_340_v += 1
_1307:
_1303:
_1300:
- if (_pOp.X5) == 0 {
+ if _pOp.Xp3 == 0 {
goto _1308
}
func() {
- if (_pOp.X5) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82631), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63012)))
+ if _pOp.Xp3 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82631), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61154)))
crt.X__builtin_abort(tls)
}
}()
- if (*XVdbeFrame)(_p.X38) == nil {
+ if _p.XpFrame == nil {
goto _1311
}
- _340_pFrame = (*XVdbeFrame)(_p.X38)
+ _340_pFrame = (*XVdbeFrame)(_p.XpFrame)
_1312:
- if (*XVdbeFrame)(_340_pFrame.X1) == nil {
+ if _340_pFrame.XpParent == nil {
goto _1315
}
- _340_pFrame = (*XVdbeFrame)(_340_pFrame.X1)
+ _340_pFrame = (*XVdbeFrame)(_340_pFrame.XpParent)
goto _1312
_1315:
func() {
- if (_pOp.X5) > (_340_pFrame.X13) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82635), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68623)))
+ if _pOp.Xp3 > _340_pFrame.XnMem {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82635), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66785)))
crt.X__builtin_abort(tls)
}
}()
- _340_pMem = (*XMem)(unsafe.Pointer(uintptr(_340_pFrame.X4) + 48*uintptr(_pOp.X5)))
+ _340_pMem = elem25((*XMem)(_340_pFrame.XaMem), uintptr(_pOp.Xp3))
goto _1318
_1311:
func() {
- if (_pOp.X5) > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82639), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63022)))
+ if _pOp.Xp3 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82639), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61164)))
crt.X__builtin_abort(tls)
}
}()
- _340_pMem = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _340_pMem = elem25(_aMem, uintptr(_pOp.Xp3))
_sqlite3VdbeMemAboutToChange(tls, _p, _340_pMem)
_1318:
func() {
- if (int32(_340_pMem.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82643), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68645)))
+ if (int32(_340_pMem.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82643), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66807)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X5, _340_pMem)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp3, _340_pMem)
}
_sqlite3VdbeMemIntegerify(tls, _340_pMem)
func() {
- if (int32(_340_pMem.X1) & i32(4)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82647), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68662)))
+ if (int32(_340_pMem.Xflags) & int32(4)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82647), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66824)))
crt.X__builtin_abort(tls)
}
}()
- if ((*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_340_pMem.X0)))))) == i64(9223372036854775807)) || (((uint32((_340_pC.X7)>>uint(i32(1))) << uint(i32(31))) >> uint(i32(31))) != 0) {
- _rc = i32(13)
+ if ((*(*int64)(unsafe.Pointer(&_340_pMem.Xu))) == int64(9223372036854775807)) || (((uint32(_340_pC.XisEphemeral>>1) << 31) >> 31) != 0) {
+ _rc = int32(13)
goto _abort_due_to_error
}
- if _340_v < ((*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_340_pMem.X0)))))) + int64(i32(1))) {
- _340_v = (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_340_pMem.X0)))))) + int64(i32(1))
+ if _340_v < ((*(*int64)(unsafe.Pointer(&_340_pMem.Xu))) + int64(1)) {
+ _340_v = (*(*int64)(unsafe.Pointer(&_340_pMem.Xu))) + int64(1)
}
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_340_pMem.X0))))) = _340_v
+ *(*int64)(unsafe.Pointer(&_340_pMem.Xu)) = _340_v
_1308:
- if ((uint32((_340_pC.X7)>>uint(i32(1))) << uint(i32(31))) >> uint(i32(31))) == 0 {
+ if ((uint32(_340_pC.XisEphemeral>>1) << 31) >> 31) == 0 {
goto _1329
}
func() {
- if (_pOp.X5) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82663), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68689)))
+ if _pOp.Xp3 != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82663), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66851)))
crt.X__builtin_abort(tls)
}
}()
- _340_cnt = i32(0)
+ _340_cnt = int32(0)
_1332:
- Xsqlite3_randomness(tls, int32(u32(8)), (unsafe.Pointer)(&_340_v))
- {
- p := &_340_v
- *p = (*p) & i64(4611686018427387903)
- sink6(*p)
- }
+ Xsqlite3_randomness(tls, int32(8), unsafe.Pointer(&_340_v))
+ _340_v &= int64(4611686018427387903)
_340_v += 1
- if ((store1(&_rc, _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_340_pC.X14)))))), nil, int64(uint64(_340_v)), i32(0), &_340_res)) == i32(0)) && (_340_res == i32(0))) && (preInc1(&_340_cnt, 1) < i32(100)) {
+ if ((store2(&_rc, _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_340_pC.Xuc))), nil, int64(uint64(_340_v)), int32(0), &_340_res)) == int32(0)) && (_340_res == int32(0))) && (preInc2(&_340_cnt, 1) < int32(100)) {
goto _1332
}
if _rc != 0 {
goto _abort_due_to_error
}
- if _340_res == i32(0) {
- _rc = i32(13)
+ if _340_res == int32(0) {
+ _rc = int32(13)
goto _abort_due_to_error
}
func() {
- if _340_v <= int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82678), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68700)))
+ if _340_v <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82678), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66862)))
crt.X__builtin_abort(tls)
}
}()
_1329:
- *(*uint8)(unsafe.Pointer(&(_340_pC.X3))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(&(_340_pC.X11))) = uint32(i32(0))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = _340_v
+ _340_pC.XdeferredMoveto = 0
+ _340_pC.XcacheStatus = 0
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = _340_v
goto _250
_170:
- _356_op = i32(0)
- _356_pData = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _356_op = int32(0)
+ _356_pData = elem25(_aMem, uintptr(_pOp.Xp2))
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82743), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82743), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_356_pData.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82744), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68704)))
+ if (int32(_356_pData.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82744), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66866)))
crt.X__builtin_abort(tls)
}
}()
- _356_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _356_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _356_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82746), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82746), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_356_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82747), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_356_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82747), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_356_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82748), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_356_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82748), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pOp.X2)&i32(64)) == 0 && (_356_pC.X4) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82749), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68722)))
+ if (int32(_pOp.Xp5)&int32(64)) == 0 && _356_pC.XisTable == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82749), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66884)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X1) != i32(-15) && int32(_pOp.X1) < i32(-2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82750), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68763)))
+ if int32(_pOp.Xp4type) != int32(-15) && int32(_pOp.Xp4type) < int32(-2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82750), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66925)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X4, _356_pData)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp2, _356_pData)
}
- if int32(_pOp.X0) != i32(118) {
+ if int32(_pOp.Xopcode) != int32(118) {
goto _1357
}
- _356_pKey = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _356_pKey = elem25(_aMem, uintptr(_pOp.Xp3))
func() {
- if (int32(_356_pKey.X1) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82755), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68811)))
+ if (int32(_356_pKey.Xflags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82755), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66973)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_356_pKey.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82756), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68833)))
+ if (int32(_356_pKey.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82756), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66995)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X5, _356_pKey)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp3, _356_pKey)
}
- *(*int64)(unsafe.Pointer(&(_356_x.X1))) = *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_356_pKey.X0)))))
+ _356_x.XnKey = *(*int64)(unsafe.Pointer(&_356_pKey.Xu))
goto _1363
_1357:
func() {
- if int32(_pOp.X0) != i32(119) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82760), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68850)))
+ if int32(_pOp.Xopcode) != int32(119) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82760), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67012)))
crt.X__builtin_abort(tls)
}
}()
- *(*int64)(unsafe.Pointer(&(_356_x.X1))) = int64(_pOp.X5)
+ _356_x.XnKey = int64(_pOp.Xp3)
_1363:
- if (int32(_pOp.X1) == i32(-15)) && ((_db.X50) != nil) {
+ if (int32(_pOp.Xp4type) == int32(-15)) && (_db.XxUpdateCallback != nil) {
func() {
- if int32(_356_pC.X1) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82765), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68876)))
+ if int32(_356_pC.XiDb) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82765), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67038)))
crt.X__builtin_abort(tls)
}
}()
- _356_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_356_pC.X1))).X0
- _356_pTab = (*XTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ _356_zDb = elem27((*XDb)(_db.XaDb), uintptr(_356_pC.XiDb)).XzDbSName
+ _356_pTab = (*XTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
func() {
- if (int32(_pOp.X2)&i32(64)) == 0 && ((_356_pTab.X9)&uint32(i32(32))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82768), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68887)))
+ if (int32(_pOp.Xp5)&int32(64)) == 0 && (_356_pTab.XtabFlags&uint32(32)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82768), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67049)))
crt.X__builtin_abort(tls)
}
}()
_356_op = func() int32 {
- if (int32(_pOp.X2) & i32(4)) != 0 {
- return i32(23)
+ if (int32(_pOp.Xp5) & int32(4)) != 0 {
+ return int32(23)
}
- return i32(18)
+ return int32(18)
}()
goto _1375
}
_356_pTab = nil
_356_zDb = nil
_1375:
- if (int32(_pOp.X2) & i32(1)) != 0 {
- *(*int32)(unsafe.Pointer(&(_p.X11))) += 1
+ if (int32(_pOp.Xp5) & int32(1)) != 0 {
+ _p.XnChange += 1
}
- if (int32(_pOp.X2) & i32(32)) != 0 {
- *(*int64)(unsafe.Pointer(&(_db.X7))) = _356_x.X1
+ if (int32(_pOp.Xp5) & int32(32)) != 0 {
+ _db.XlastRowid = _356_x.XnKey
}
- if (int32(_356_pData.X1) & i32(1)) != 0 {
- *(*unsafe.Pointer)(unsafe.Pointer(&(_356_x.X2))) = nil
- *(*int32)(unsafe.Pointer(&(_356_x.X5))) = i32(0)
+ if (int32(_356_pData.Xflags) & int32(1)) != 0 {
+ _356_x.XpData = nil
+ _356_x.XnData = int32(0)
goto _1379
}
func() {
- if (int32(_356_pData.X1) & i32(18)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82792), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68931)))
+ if (int32(_356_pData.Xflags) & int32(18)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82792), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67093)))
crt.X__builtin_abort(tls)
}
}()
- *(*unsafe.Pointer)(unsafe.Pointer(&(_356_x.X2))) = (unsafe.Pointer)(_356_pData.X5)
- *(*int32)(unsafe.Pointer(&(_356_x.X5))) = _356_pData.X4
+ _356_x.XpData = unsafe.Pointer(_356_pData.Xz)
+ _356_x.XnData = _356_pData.Xn
_1379:
_356_seekResult = func() int32 {
- if (int32(_pOp.X2) & i32(16)) != 0 {
- return (_356_pC.X12)
+ if (int32(_pOp.Xp5) & int32(16)) != 0 {
+ return _356_pC.XseekResult
}
- return i32(0)
+ return int32(0)
}()
- if (int32(_356_pData.X1) & i32(16384)) != 0 {
- *(*int32)(unsafe.Pointer(&(_356_x.X6))) = *(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_356_pData.X0)))))
+ if (int32(_356_pData.Xflags) & int32(16384)) != 0 {
+ _356_x.XnZero = *(*int32)(unsafe.Pointer(&_356_pData.Xu))
goto _1385
}
- *(*int32)(unsafe.Pointer(&(_356_x.X6))) = i32(0)
+ _356_x.XnZero = int32(0)
_1385:
- *(*unsafe.Pointer)(unsafe.Pointer(&(_356_x.X0))) = nil
- _rc = _sqlite3BtreeInsert(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_356_pC.X14)))))), &_356_x, int32(_pOp.X2)&i32(10), _356_seekResult)
- *(*uint8)(unsafe.Pointer(&(_356_pC.X3))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(&(_356_pC.X11))) = uint32(i32(0))
+ _356_x.XpKey = nil
+ _rc = _sqlite3BtreeInsert(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_356_pC.Xuc))), &_356_x, int32(_pOp.Xp5)&int32(10), _356_seekResult)
+ _356_pC.XdeferredMoveto = 0
+ _356_pC.XcacheStatus = 0
if _rc != 0 {
goto _abort_due_to_error
}
- if ((_db.X50) != nil) && _356_op != 0 {
- (_db.X50)(tls, _db.X49, _356_op, _356_zDb, _356_pTab.X0, _356_x.X1)
+ if (_db.XxUpdateCallback != nil) && _356_op != 0 {
+ _db.XxUpdateCallback(tls, _db.XpUpdateArg, _356_op, _356_zDb, _356_pTab.XzName, _356_x.XnKey)
}
goto _250
_172:
- _366_opflags = _pOp.X4
+ _366_opflags = _pOp.Xp2
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82859), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82859), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _366_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _366_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _366_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82861), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82861), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_366_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82862), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_366_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82862), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_366_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82863), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_366_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82863), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_366_pC.X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82864), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68965)))
+ if int32(_366_pC.XdeferredMoveto) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82864), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67127)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_pOp.X1) == i32(-15)) && ((((*XTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))).X9) & uint32(i32(32))) == uint32(i32(0)))) && (int32(_pOp.X2) == i32(0)) {
- _367_iKey = _sqlite3BtreeIntegerKey(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_366_pC.X14)))))))
+ if ((int32(_pOp.Xp4type) == int32(-15)) && ((((*XTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))).XtabFlags) & uint32(32)) == (0))) && (int32(_pOp.Xp5) == int32(0)) {
+ _367_iKey = _sqlite3BtreeIntegerKey(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_366_pC.Xuc))))
func() {
- if (_366_pC.X20) != _367_iKey {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82872), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68987)))
+ if _366_pC.XmovetoTarget != _367_iKey {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82872), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67149)))
crt.X__builtin_abort(tls)
}
}()
}
- if int32(_pOp.X1) != i32(-15) || (_db.X50) == nil {
+ if int32(_pOp.Xp4type) != int32(-15) || _db.XxUpdateCallback == nil {
goto _1406
}
func() {
- if int32(_366_pC.X1) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82882), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68876)))
+ if int32(_366_pC.XiDb) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82882), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67038)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82883), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69010)))
+ if (*XTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82883), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67172)))
crt.X__builtin_abort(tls)
}
}()
- _366_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_366_pC.X1))).X0
- _366_pTab = (*XTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- if ((int32(_pOp.X2) & i32(2)) != i32(0)) && ((_366_pC.X4) != 0) {
- *(*int64)(unsafe.Pointer(&(_366_pC.X20))) = _sqlite3BtreeIntegerKey(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_366_pC.X14)))))))
+ _366_zDb = elem27((*XDb)(_db.XaDb), uintptr(_366_pC.XiDb)).XzDbSName
+ _366_pTab = (*XTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ if ((int32(_pOp.Xp5) & int32(2)) != int32(0)) && (_366_pC.XisTable != 0) {
+ _366_pC.XmovetoTarget = _sqlite3BtreeIntegerKey(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_366_pC.Xuc))))
}
goto _1413
_1406:
@@ -51764,38 +51544,37 @@ _1406:
_366_pTab = nil
_1413:
func() {
- if (int32(_pOp.X2) & i32(-7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82911), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69026)))
+ if (int32(_pOp.Xp5) & int32(-7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82911), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67188)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- i32(0)
- if (*XVdbeFrame)(_p.X38) != nil {
+
+ if (*XVdbeFrame)(_p.XpFrame) != nil {
goto _1416
}
- if ((int32((uint32(_366_pC.X7)<<uint(i32(31)))>>uint(i32(31))) == i32(0)) && ((int32(_pOp.X2) & i32(4)) == i32(0))) && ((int32(_366_pC.X6) & i32(8)) == i32(0)) {
+ if ((int32((uint32(_366_pC.XisEphemeral)<<31)>>31) == int32(0)) && ((int32(_pOp.Xp5) & int32(4)) == int32(0))) && ((int32(_366_pC.XwrFlag) & int32(8)) == int32(0)) {
_nExtraDelete += 1
}
- if ((_pOp.X4) & i32(1)) != 0 {
+ if (_pOp.Xp2 & int32(1)) != 0 {
_nExtraDelete -= 1
}
_1416:
- _rc = _sqlite3BtreeDelete(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_366_pC.X14)))))), uint8(_pOp.X2))
- *(*uint32)(unsafe.Pointer(&(_366_pC.X11))) = uint32(i32(0))
- *(*int32)(unsafe.Pointer(&(_366_pC.X12))) = i32(0)
+ _rc = _sqlite3BtreeDelete(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_366_pC.Xuc))), uint8(_pOp.Xp5))
+ _366_pC.XcacheStatus = 0
+ _366_pC.XseekResult = int32(0)
if _rc != 0 {
goto _abort_due_to_error
}
- if (_366_opflags & i32(1)) == 0 {
+ if (_366_opflags & int32(1)) == 0 {
goto _1422
}
- *(*int32)(unsafe.Pointer(&(_p.X11))) += 1
- if ((_db.X50) != nil) && (((_366_pTab.X9) & uint32(i32(32))) == uint32(i32(0))) {
- (_db.X50)(tls, _db.X49, i32(9), _366_zDb, _366_pTab.X0, _366_pC.X20)
+ _p.XnChange += 1
+ if (_db.XxUpdateCallback != nil) && ((_366_pTab.XtabFlags & uint32(32)) == (0)) {
+ _db.XxUpdateCallback(tls, _db.XpUpdateArg, int32(9), _366_zDb, _366_pTab.XzName, _366_pC.XmovetoTarget)
func() {
- if int32(_366_pC.X1) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82940), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68876)))
+ if int32(_366_pC.XiDb) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82940), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67038)))
crt.X__builtin_abort(tls)
}
}()
@@ -51803,26 +51582,26 @@ _1416:
_1422:
goto _250
_173:
- _sqlite3VdbeSetChanges(tls, _db, _p.X11)
- *(*int32)(unsafe.Pointer(&(_p.X11))) = i32(0)
+ _sqlite3VdbeSetChanges(tls, _db, _p.XnChange)
+ _p.XnChange = int32(0)
goto _250
_174:
- _377_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _377_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
- if int32(_377_pC.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82980), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67781)))
+ if int32(_377_pC.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82980), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65943)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X1) != i32(-11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(82981), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68121)))
+ if int32(_pOp.Xp4type) != int32(-11) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(82981), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66283)))
crt.X__builtin_abort(tls)
}
}()
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- _377_nKeyCol = *(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
- _377_res = i32(0)
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
+ _377_nKeyCol = *(*int32)(unsafe.Pointer(&_pOp.Xp4))
+ _377_res = int32(0)
_rc = _sqlite3VdbeSorterCompare(tls, _377_pC, _pIn3, _377_nKeyCol, &_377_res)
if _rc != 0 {
goto _abort_due_to_error
@@ -51832,154 +51611,153 @@ _174:
}
goto _250
_175:
- _pOut = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
- _378_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _pOut = elem25(_aMem, uintptr(_pOp.Xp2))
+ _378_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
- if int32(_378_pC.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83009), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67781)))
+ if int32(_378_pC.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83009), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65943)))
crt.X__builtin_abort(tls)
}
}()
_rc = _sqlite3VdbeSorterRowkey(tls, _378_pC, _pOut)
func() {
- if _rc == i32(0) && (int32(_pOut.X1)&i32(16)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83011), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69081)))
+ if _rc == int32(0) && (int32(_pOut.Xflags)&int32(16)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83011), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67243)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83012), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83012), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
if _rc != 0 {
goto _abort_due_to_error
}
- *(*uint32)(unsafe.Pointer(&((*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X5)))).X11))) = uint32(i32(0))
+ (*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp3))).XcacheStatus = 0
goto _250
_176:
_pOut = _out2Prerelease(tls, _p, _pOp)
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83053), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83053), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _379_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _379_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _379_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83055), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83055), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_379_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83056), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_379_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83056), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if bool2int(int32(_379_pC.X0) == i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83057), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69123)))
+ if bool2int(int32(_379_pC.XeCurType) == int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83057), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67285)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_379_pC.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83058), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69139)))
+ if int32(_379_pC.XnullRow) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83058), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67301)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_379_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83059), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_379_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83059), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
- _379_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_379_pC.X14))))))
+ _379_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_379_pC.Xuc)))
func() {
- if int32(_379_pC.X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83070), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68965)))
+ if int32(_379_pC.XdeferredMoveto) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83070), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67127)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3BtreeCursorIsValid(tls, _379_pCrsr) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83071), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65813)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83071), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63955)))
crt.X__builtin_abort(tls)
}
}()
_379_n = _sqlite3BtreePayloadSize(tls, _379_pCrsr)
- if _379_n > uint32(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0))))) {
+ if _379_n > uint32(*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0)) {
goto _too_big
}
- _rc = _sqlite3VdbeMemFromBtree(tls, _379_pCrsr, uint32(i32(0)), _379_n, _pOut)
+ _rc = _sqlite3VdbeMemFromBtree(tls, _379_pCrsr, 0, _379_n, _pOut)
if _rc != 0 {
goto _abort_due_to_error
}
- if (_pOp.X5) != 0 {
+ if _pOp.Xp3 != 0 {
goto _1463
}
- if ((int32(_pOut.X1) & i32(4096)) != i32(0)) && _sqlite3VdbeMemMakeWriteable(tls, _pOut) != 0 {
+ if ((int32(_pOut.Xflags) & int32(4096)) != int32(0)) && _sqlite3VdbeMemMakeWriteable(tls, _pOut) != 0 {
goto _no_mem
}
_1463:
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X4, _pOut)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp2, _pOut)
}
goto _250
_177:
_pOut = _out2Prerelease(tls, _p, _pOp)
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83107), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83107), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _382_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _382_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _382_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83109), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83109), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_382_pC.X0) == i32(3) && (_382_pC.X2) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83110), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65642)))
+ if int32(_382_pC.XeCurType) == int32(3) && _382_pC.XnullRow == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83110), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63784)))
crt.X__builtin_abort(tls)
}
}()
- if (_382_pC.X2) != 0 {
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(1))
+ if _382_pC.XnullRow != 0 {
+ _pOut.Xflags = uint16(1)
goto _250
}
- if (_382_pC.X3) != 0 {
- _382_v = _382_pC.X20
+ if _382_pC.XdeferredMoveto != 0 {
+ _382_v = _382_pC.XmovetoTarget
goto _1483
}
- if int32(_382_pC.X0) != i32(2) {
+ if int32(_382_pC.XeCurType) != int32(2) {
goto _1477
}
func() {
- if (*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_382_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83118), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69154)))
+ if (*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_382_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83118), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67316)))
crt.X__builtin_abort(tls)
}
}()
- _382_pVtab = (*Xsqlite3_vtab)((*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_382_pC.X14)))))).X0)
- _382_pModule = (*Xsqlite3_module)(_382_pVtab.X0)
+ _382_pVtab = (*Xsqlite3_vtab)((*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_382_pC.Xuc))).XpVtab)
+ _382_pModule = (*Xsqlite3_module)(_382_pVtab.XpModule)
func() {
- if (*(*func(*crt.TLS, *Xsqlite3_file, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{(_382_pModule.X12)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83121), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69170)))
+ if _382_pModule.XxRowid == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83121), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67332)))
crt.X__builtin_abort(tls)
}
}()
- _rc = (*(*func(*crt.TLS, *Xsqlite3_file, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{(_382_pModule.X12)})))(tls, (*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_382_pC.X14)))))), &_382_v)
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab_cursor, *int64) int32 {
+ v := _382_pModule.XxRowid
+ return *(*func(*crt.TLS, *Xsqlite3_vtab_cursor, *int64) int32)(unsafe.Pointer(&v))
+ }()(tls, (*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_382_pC.Xuc))), &_382_v)
_sqlite3VtabImportErrmsg(tls, _p, _382_pVtab)
if _rc != 0 {
goto _abort_due_to_error
@@ -51987,14 +51765,14 @@ _177:
goto _1483
_1477:
func() {
- if int32(_382_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83127), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_382_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83127), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_382_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83128), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_382_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83128), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
@@ -52002,81 +51780,81 @@ _1477:
if _rc != 0 {
goto _abort_due_to_error
}
- if (_382_pC.X2) != 0 {
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(1))
+ if _382_pC.XnullRow != 0 {
+ _pOut.Xflags = uint16(1)
goto _250
}
- _382_v = _sqlite3BtreeIntegerKey(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_382_pC.X14)))))))
+ _382_v = _sqlite3BtreeIntegerKey(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_382_pC.Xuc))))
_1483:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = _382_v
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = _382_v
goto _250
_178:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83150), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83150), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _388_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _388_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _388_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83152), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83152), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_388_pC.X2))) = uint8(i32(1))
- *(*uint32)(unsafe.Pointer(&(_388_pC.X11))) = uint32(i32(0))
- if int32(_388_pC.X0) == i32(0) {
+ _388_pC.XnullRow = uint8(1)
+ _388_pC.XcacheStatus = 0
+ if int32(_388_pC.XeCurType) == int32(0) {
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_388_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83156), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_388_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83156), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3BtreeClearCursor(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_388_pC.X14)))))))
+ _sqlite3BtreeClearCursor(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_388_pC.Xuc))))
}
goto _250
_179:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83186), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83186), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _390_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _390_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _390_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83188), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83188), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_390_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83189), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_390_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83189), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
- _390_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_390_pC.X14))))))
- _390_res = i32(0)
+ _390_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_390_pC.Xuc)))
+ _390_res = int32(0)
func() {
if _390_pCrsr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83192), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68506)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83192), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66668)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_390_pC.X12))) = _pOp.X5
- *(*uint8)(unsafe.Pointer(&(_390_pC.X5))) = uint8(i32(33))
- if (_pOp.X5) != i32(0) && _sqlite3BtreeCursorIsValidNN(tls, _390_pCrsr) != 0 {
+ _390_pC.XseekResult = _pOp.Xp3
+ _390_pC.XseekOp = uint8(33)
+ if _pOp.Xp3 != int32(0) && _sqlite3BtreeCursorIsValidNN(tls, _390_pCrsr) != 0 {
goto _1508
}
_rc = _sqlite3BtreeLast(tls, _390_pCrsr, &_390_res)
- *(*uint8)(unsafe.Pointer(&(_390_pC.X2))) = uint8(_390_res)
- *(*uint8)(unsafe.Pointer(&(_390_pC.X3))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(&(_390_pC.X11))) = uint32(i32(0))
+ _390_pC.XnullRow = uint8(_390_res)
+ _390_pC.XdeferredMoveto = 0
+ _390_pC.XcacheStatus = 0
if _rc != 0 {
goto _abort_due_to_error
}
- if (_pOp.X4) <= i32(0) {
+ if _pOp.Xp2 <= int32(0) {
goto _1510
}
if _390_res != 0 {
@@ -52086,8 +51864,8 @@ _1510:
goto _1512
_1508:
func() {
- if (_pOp.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83208), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69186)))
+ if _pOp.Xp2 != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83208), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67348)))
crt.X__builtin_abort(tls)
}
}()
@@ -52095,22 +51873,22 @@ _1512:
goto _250
_180:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83224), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83224), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _394_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _394_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _394_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83226), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83226), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
- _394_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_394_pC.X14))))))
+ _394_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_394_pC.Xuc)))
func() {
if _394_pCrsr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83228), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65807)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83228), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63949)))
crt.X__builtin_abort(tls)
}
}()
@@ -52118,21 +51896,21 @@ _180:
if _rc != 0 {
goto _abort_due_to_error
}
- if _394_res != i32(0) {
+ if _394_res != int32(0) {
goto _1523
}
_394_sz = _sqlite3BtreeRowCountEst(tls, _394_pCrsr)
if func() int32 {
- if _394_sz >= int64(i32(0)) {
- return i32(1)
+ if _394_sz >= (0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83233), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83233), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() != 0 && (int32(_sqlite3LogEst(tls, uint64(_394_sz))) < (_pOp.X5)) {
- _394_res = i32(1)
+ }() != 0 && (int32(_sqlite3LogEst(tls, uint64(_394_sz))) < _pOp.Xp3) {
+ _394_res = int32(1)
}
_1523:
if _394_res != 0 {
@@ -52140,57 +51918,57 @@ _1523:
}
goto _250
_181:
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_p.X35))))) + 4*uintptr(i32(2)))) += 1
+ *elem7((*uint32)(unsafe.Pointer(&_p.XaCounter)), uintptr(2)) += 1
_183:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83288), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83288), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _397_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _397_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _397_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83290), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83290), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_397_pC.X0) == i32(1)) != (int32(_pOp.X0) == i32(35)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83291), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69197)))
+ if (int32(_397_pC.XeCurType) == int32(1)) != (int32(_pOp.Xopcode) == int32(35)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83291), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67359)))
crt.X__builtin_abort(tls)
}
}()
- _397_res = i32(1)
- *(*uint8)(unsafe.Pointer(&(_397_pC.X5))) = uint8(i32(37))
- if int32(_397_pC.X0) == i32(1) {
+ _397_res = int32(1)
+ _397_pC.XseekOp = uint8(37)
+ if int32(_397_pC.XeCurType) == int32(1) {
_rc = _sqlite3VdbeSorterRewind(tls, _397_pC, &_397_res)
goto _1537
}
func() {
- if int32(_397_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83299), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_397_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83299), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
- _397_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_397_pC.X14))))))
+ _397_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_397_pC.Xuc)))
func() {
if _397_pCrsr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83301), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65807)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83301), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63949)))
crt.X__builtin_abort(tls)
}
}()
_rc = _sqlite3BtreeFirst(tls, _397_pCrsr, &_397_res)
- *(*uint8)(unsafe.Pointer(&(_397_pC.X3))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(&(_397_pC.X11))) = uint32(i32(0))
+ _397_pC.XdeferredMoveto = 0
+ _397_pC.XcacheStatus = 0
_1537:
if _rc != 0 {
goto _abort_due_to_error
}
- *(*uint8)(unsafe.Pointer(&(_397_pC.X2))) = uint8(_397_res)
+ _397_pC.XnullRow = uint8(_397_res)
func() {
- if (_pOp.X4) <= i32(0) || (_pOp.X4) >= (_p.X27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83308), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69240)))
+ if _pOp.Xp2 <= int32(0) || _pOp.Xp2 >= _p.XnOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83308), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67402)))
crt.X__builtin_abort(tls)
}
}()
@@ -52199,206 +51977,211 @@ _1537:
}
goto _250
_184:
- _400_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _400_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
- if int32(_400_pC.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83389), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67781)))
+ if int32(_400_pC.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83389), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65943)))
crt.X__builtin_abort(tls)
}
}()
- _400_res = i32(0)
+ _400_res = int32(0)
_rc = _sqlite3VdbeSorterNext(tls, _db, _400_pC, &_400_res)
goto _next_tail
_185:
- if (*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))) == nil {
+ if (*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))) == nil {
goto _250
}
_1549:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83399), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83399), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X2) >= i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83400), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69268)))
+ if int32(_pOp.Xp5) >= int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83400), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67430)))
crt.X__builtin_abort(tls)
}
}()
- _400_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
- _400_res = _pOp.X5
+ _400_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
+ _400_res = _pOp.Xp3
func() {
if _400_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83403), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83403), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_400_pC.X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83404), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68965)))
+ if int32(_400_pC.XdeferredMoveto) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83404), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67127)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_400_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83405), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_400_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83405), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _400_res != i32(0) && (_400_res != i32(1) || int32(_400_pC.X4) != i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83406), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69299)))
+ if _400_res != int32(0) && (_400_res != int32(1) || int32(_400_pC.XisTable) != int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83406), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67461)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X0) == i32(7) && *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if int32(_pOp.Xopcode) == int32(7) && *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XBtCursor, *int32) int32
- }{(*(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32) int32
- }{(*(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{func() func(*crt.TLS, *XBtCursor, *int32) int32 {
+ v := *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&_pOp.Xp4))
+ return *(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&v))
+ }()})) != *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XBtCursor, *int32) int32
}{_sqlite3BtreeNext})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83408), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69336)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83408), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67498)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X0) == i32(6) && *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if int32(_pOp.Xopcode) == int32(6) && *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XBtCursor, *int32) int32
- }{(*(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32) int32
- }{(*(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{func() func(*crt.TLS, *XBtCursor, *int32) int32 {
+ v := *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&_pOp.Xp4))
+ return *(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&v))
+ }()})) != *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XBtCursor, *int32) int32
}{_sqlite3BtreePrevious})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83409), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69395)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83409), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67557)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X0) == i32(5) && *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if int32(_pOp.Xopcode) == int32(5) && *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XBtCursor, *int32) int32
- }{(*(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32) int32
- }{(*(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{func() func(*crt.TLS, *XBtCursor, *int32) int32 {
+ v := *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&_pOp.Xp4))
+ return *(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&v))
+ }()})) != *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XBtCursor, *int32) int32
}{_sqlite3BtreeNext})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83410), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69458)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83410), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67620)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X0) == i32(4) && *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if int32(_pOp.Xopcode) == int32(4) && *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XBtCursor, *int32) int32
- }{(*(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32) int32
- }{(*(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{func() func(*crt.TLS, *XBtCursor, *int32) int32 {
+ v := *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&_pOp.Xp4))
+ return *(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&v))
+ }()})) != *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *XBtCursor, *int32) int32
}{_sqlite3BtreePrevious})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83411), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69523)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83411), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67685)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X0) == i32(7) && int32(_pOp.X0) == i32(5) && int32(_400_pC.X5) != i32(27) && int32(_400_pC.X5) != i32(26) && int32(_400_pC.X5) != i32(37) && int32(_400_pC.X5) != i32(30) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83415), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69592)))
+ if int32(_pOp.Xopcode) == int32(7) && int32(_pOp.Xopcode) == int32(5) && int32(_400_pC.XseekOp) != int32(27) && int32(_400_pC.XseekOp) != int32(26) && int32(_400_pC.XseekOp) != int32(37) && int32(_400_pC.XseekOp) != int32(30) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83415), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67754)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X0) == i32(6) && int32(_pOp.X0) == i32(4) && int32(_400_pC.X5) != i32(24) && int32(_400_pC.X5) != i32(25) && int32(_400_pC.X5) != i32(33) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83418), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69742)))
+ if int32(_pOp.Xopcode) == int32(6) && int32(_pOp.Xopcode) == int32(4) && int32(_400_pC.XseekOp) != int32(24) && int32(_400_pC.XseekOp) != int32(25) && int32(_400_pC.XseekOp) != int32(33) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83418), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67904)))
crt.X__builtin_abort(tls)
}
}()
- _rc = (*(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32) int32
- }{(*(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))})))(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_400_pC.X14)))))), &_400_res)
+ _rc = func() func(*crt.TLS, *XBtCursor, *int32) int32 {
+ v := *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&_pOp.Xp4))
+ return *(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_400_pC.Xuc))), &_400_res)
_next_tail:
- *(*uint32)(unsafe.Pointer(&(_400_pC.X11))) = uint32(i32(0))
+ _400_pC.XcacheStatus = 0
if _rc != 0 {
goto _abort_due_to_error
}
- if _400_res == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_400_pC.X2))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_p.X35))))) + 4*uintptr(_pOp.X2))) += 1
+ if _400_res == int32(0) {
+ _400_pC.XnullRow = 0
+ *elem7((*uint32)(unsafe.Pointer(&_p.XaCounter)), uintptr(_pOp.Xp5)) += 1
goto _jump_to_p2_and_check_for_interrupt
}
- *(*uint8)(unsafe.Pointer(&(_400_pC.X2))) = uint8(i32(1))
+ _400_pC.XnullRow = uint8(1)
goto _check_for_interrupt
_189:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83480), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83480), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _403_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _403_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _403_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83482), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83482), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_403_pC.X0) == i32(1)) != (int32(_pOp.X0) == i32(127)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83483), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69866)))
+ if (int32(_403_pC.XeCurType) == int32(1)) != (int32(_pOp.Xopcode) == int32(127)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83483), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68028)))
crt.X__builtin_abort(tls)
}
}()
- _pIn2 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _pIn2 = elem25(_aMem, uintptr(_pOp.Xp2))
func() {
- if (int32(_pIn2.X1) & i32(16)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83485), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69911)))
+ if (int32(_pIn2.Xflags) & int32(16)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83485), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68073)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pOp.X2) & i32(1)) != 0 {
- *(*int32)(unsafe.Pointer(&(_p.X11))) += 1
+ if (int32(_pOp.Xp5) & int32(1)) != 0 {
+ _p.XnChange += 1
}
func() {
- if int32(_403_pC.X0) != i32(0) && int32(_pOp.X0) != i32(127) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83487), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69934)))
+ if int32(_403_pC.XeCurType) != int32(0) && int32(_pOp.Xopcode) != int32(127) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83487), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68096)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_403_pC.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83488), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68380)))
+ if int32(_403_pC.XisTable) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83488), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66542)))
crt.X__builtin_abort(tls)
}
}()
_rc = func() int32 {
- if (int32(_pIn2.X1) & i32(16384)) != 0 {
+ if (int32(_pIn2.Xflags) & int32(16384)) != 0 {
return _sqlite3VdbeMemExpandBlob(tls, _pIn2)
}
- return i32(0)
+ return int32(0)
}()
if _rc != 0 {
goto _abort_due_to_error
}
- if int32(_pOp.X0) == i32(127) {
+ if int32(_pOp.Xopcode) == int32(127) {
_rc = _sqlite3VdbeSorterWrite(tls, _403_pC, _pIn2)
goto _1612
}
- *(*int64)(unsafe.Pointer(&(_403_x.X1))) = int64(_pIn2.X4)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_403_x.X0))) = (unsafe.Pointer)(_pIn2.X5)
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_403_x.X3))))) = (*XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(_aMem)) + uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(_pOp.X5)))))*uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(48)))))))))))
- *(*uint16)(unsafe.Pointer(&(_403_x.X4))) = uint16(*(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- _rc = _sqlite3BtreeInsert(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_403_pC.X14)))))), &_403_x, int32(_pOp.X2)&i32(10), func() int32 {
- if (int32(_pOp.X2) & i32(16)) != 0 {
- return (_403_pC.X12)
+ _403_x.XnKey = int64(_pIn2.Xn)
+ _403_x.XpKey = unsafe.Pointer(_pIn2.Xz)
+ *(**XMem)(unsafe.Pointer(&_403_x.XaMem)) = (*XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(_aMem)) + uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(_pOp.Xp3)*uintptr(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr(48)))))))))))
+ _403_x.XnMem = uint16(*(*int32)(unsafe.Pointer(&_pOp.Xp4)))
+ _rc = _sqlite3BtreeInsert(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_403_pC.Xuc))), &_403_x, int32(_pOp.Xp5)&int32(10), func() int32 {
+ if (int32(_pOp.Xp5) & int32(16)) != 0 {
+ return _403_pC.XseekResult
}
- return i32(0)
+ return int32(0)
}())
func() {
- if int32(_403_pC.X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83502), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68965)))
+ if int32(_403_pC.XdeferredMoveto) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83502), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67127)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_403_pC.X11))) = uint32(i32(0))
+ _403_pC.XcacheStatus = 0
_1612:
if _rc != 0 {
goto _abort_due_to_error
@@ -52406,290 +52189,290 @@ _1612:
goto _250
_191:
func() {
- if (_pOp.X5) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83522), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63012)))
+ if _pOp.Xp3 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83522), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61154)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X4) <= i32(0) || ((_pOp.X4)+(_pOp.X5)) > ((((_p.X6)+i32(1))-(_p.X7))+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83523), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(69994)))
+ if _pOp.Xp2 <= int32(0) || (_pOp.Xp2+_pOp.Xp3) > (((_p.XnMem+int32(1))-_p.XnCursor)+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83523), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68156)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83524), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83524), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _406_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _406_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _406_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83526), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83526), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_406_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83527), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_406_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83527), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
- _406_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_406_pC.X14))))))
+ _406_pCrsr = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_406_pC.Xuc)))
func() {
if _406_pCrsr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83529), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68506)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83529), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66668)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83530), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67805)))
+ if int32(_pOp.Xp5) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83530), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65967)))
crt.X__builtin_abort(tls)
}
}()
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_406_r.X0))))) = (*XKeyInfo)(_406_pC.X15)
- *(*uint16)(unsafe.Pointer(&(_406_r.X2))) = uint16(_pOp.X5)
- *(*int8)(unsafe.Pointer(&(_406_r.X3))) = int8(i32(0))
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_406_r.X1))))) = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
- _rc = _sqlite3BtreeMovetoUnpacked(tls, _406_pCrsr, &_406_r, int64(i32(0)), i32(0), &_406_res)
+ *(**XKeyInfo)(unsafe.Pointer(&_406_r.XpKeyInfo)) = (*XKeyInfo)(_406_pC.XpKeyInfo)
+ _406_r.XnField = uint16(_pOp.Xp3)
+ _406_r.Xdefault_rc = 0
+ *(**XMem)(unsafe.Pointer(&_406_r.XaMem)) = elem25(_aMem, uintptr(_pOp.Xp2))
+ _rc = _sqlite3BtreeMovetoUnpacked(tls, _406_pCrsr, &_406_r, 0, int32(0), &_406_res)
if _rc != 0 {
goto _abort_due_to_error
}
- if _406_res != i32(0) {
+ if _406_res != int32(0) {
goto _1635
}
- _rc = _sqlite3BtreeDelete(tls, _406_pCrsr, uint8(i32(4)))
+ _rc = _sqlite3BtreeDelete(tls, _406_pCrsr, uint8(4))
if _rc != 0 {
goto _abort_due_to_error
}
_1635:
func() {
- if int32(_406_pC.X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83541), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68965)))
+ if int32(_406_pC.XdeferredMoveto) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83541), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67127)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_406_pC.X11))) = uint32(i32(0))
- *(*int32)(unsafe.Pointer(&(_406_pC.X12))) = i32(0)
+ _406_pC.XcacheStatus = 0
+ _406_pC.XseekResult = int32(0)
goto _250
_192:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83581), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83581), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _408_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _408_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _408_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83583), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83583), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_408_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83584), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_408_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83584), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_408_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83585), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_408_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83585), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_408_pC.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83586), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68380)))
+ if int32(_408_pC.XisTable) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83586), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66542)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_408_pC.X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83587), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68965)))
+ if int32(_408_pC.XdeferredMoveto) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83587), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67127)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_408_pC.X2) != 0 && int32(_pOp.X0) != i32(131) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83588), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70051)))
+ if _408_pC.XnullRow != 0 && int32(_pOp.Xopcode) != int32(131) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83588), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68213)))
crt.X__builtin_abort(tls)
}
}()
_rc = _sqlite3VdbeCursorRestore(tls, _408_pC)
if func() int32 {
- if _rc != i32(0) {
+ if _rc != int32(0) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83597), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83597), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _abort_due_to_error
}
- if (_408_pC.X2) != 0 {
+ if _408_pC.XnullRow != 0 {
goto _1658
}
- _408_rowid = int64(i32(0))
- _rc = _sqlite3VdbeIdxRowid(tls, _db, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_408_pC.X14)))))), &_408_rowid)
- if _rc != i32(0) {
+ _408_rowid = 0
+ _rc = _sqlite3VdbeIdxRowid(tls, _db, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_408_pC.Xuc))), &_408_rowid)
+ if _rc != int32(0) {
goto _abort_due_to_error
}
- if int32(_pOp.X0) == i32(130) {
+ if int32(_pOp.Xopcode) == int32(130) {
func() {
- if (_pOp.X5) < i32(0) || (_pOp.X5) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83606), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70092)))
+ if _pOp.Xp3 < int32(0) || _pOp.Xp3 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83606), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68254)))
crt.X__builtin_abort(tls)
}
}()
- _408_pTabCur = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X5)))
+ _408_pTabCur = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp3))
func() {
if _408_pTabCur == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83608), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70125)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83608), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68287)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_408_pTabCur.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83609), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70136)))
+ if int32(_408_pTabCur.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83609), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68298)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_408_pTabCur.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83610), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70169)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_408_pTabCur.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83610), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68331)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_408_pTabCur.X4) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83611), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70192)))
+ if _408_pTabCur.XisTable == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83611), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68354)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_408_pTabCur.X2))) = uint8(i32(0))
- *(*int64)(unsafe.Pointer(&(_408_pTabCur.X20))) = _408_rowid
- *(*uint8)(unsafe.Pointer(&(_408_pTabCur.X3))) = uint8(i32(1))
+ _408_pTabCur.XnullRow = 0
+ _408_pTabCur.XmovetoTarget = _408_rowid
+ _408_pTabCur.XdeferredMoveto = uint8(1)
func() {
- if int32(_pOp.X1) != i32(-12) && (*(**int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83615), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70209)))
+ if int32(_pOp.Xp4type) != int32(-12) && (*(**int32)(unsafe.Pointer(&_pOp.Xp4))) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83615), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68371)))
crt.X__builtin_abort(tls)
}
}()
- *(**int32)(unsafe.Pointer(&(_408_pTabCur.X10))) = *(**int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
- *(**XVdbeCursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_408_pTabCur.X13))))) = _408_pC
+ _408_pTabCur.XaAltMap = *(**int32)(unsafe.Pointer(&_pOp.Xp4))
+ *(**XVdbeCursor)(unsafe.Pointer(&_408_pTabCur.XpAltCursor)) = _408_pC
goto _1675
}
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = _408_rowid
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = _408_rowid
_1675:
goto _1676
_1658:
func() {
- if int32(_pOp.X0) != i32(131) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83623), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70251)))
+ if int32(_pOp.Xopcode) != int32(131) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83623), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68413)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemSetNull(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X4))))
+ _sqlite3VdbeMemSetNull(tls, elem25(_aMem, uintptr(_pOp.Xp2)))
_1676:
goto _250
_194:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83681), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83681), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _414_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _414_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _414_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83683), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83683), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((uint32((_414_pC.X7)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83684), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67827)))
+ if ((uint32(_414_pC.XisEphemeral>>2) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83684), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65989)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_414_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83685), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_414_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83685), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_414_pC.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83686), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67841)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_414_pC.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83686), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66003)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_414_pC.X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83687), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68965)))
+ if int32(_414_pC.XdeferredMoveto) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83687), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(67127)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X2) != i32(0) && int32(_pOp.X2) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83688), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70276)))
+ if int32(_pOp.Xp5) != int32(0) && int32(_pOp.Xp5) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83688), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68438)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X1) != i32(-11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83689), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68121)))
+ if int32(_pOp.Xp4type) != int32(-11) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83689), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66283)))
crt.X__builtin_abort(tls)
}
}()
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_414_r.X0))))) = (*XKeyInfo)(_414_pC.X15)
- *(*uint16)(unsafe.Pointer(&(_414_r.X2))) = uint16(*(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- if int32(_pOp.X0) < i32(40) {
+ *(**XKeyInfo)(unsafe.Pointer(&_414_r.XpKeyInfo)) = (*XKeyInfo)(_414_pC.XpKeyInfo)
+ _414_r.XnField = uint16(*(*int32)(unsafe.Pointer(&_pOp.Xp4)))
+ if int32(_pOp.Xopcode) < int32(40) {
func() {
- if int32(_pOp.X0) != i32(38) && int32(_pOp.X0) != i32(39) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83693), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70301)))
+ if int32(_pOp.Xopcode) != int32(38) && int32(_pOp.Xopcode) != int32(39) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83693), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68463)))
crt.X__builtin_abort(tls)
}
}()
- *(*int8)(unsafe.Pointer(&(_414_r.X3))) = int8(i32(-1))
+ _414_r.Xdefault_rc = int8(-1)
goto _1701
}
func() {
- if int32(_pOp.X0) != i32(41) && int32(_pOp.X0) != i32(40) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83696), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70348)))
+ if int32(_pOp.Xopcode) != int32(41) && int32(_pOp.Xopcode) != int32(40) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83696), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68510)))
crt.X__builtin_abort(tls)
}
}()
- *(*int8)(unsafe.Pointer(&(_414_r.X3))) = int8(i32(0))
+ _414_r.Xdefault_rc = 0
_1701:
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_414_r.X1))))) = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- _417_i = i32(0)
+ *(**XMem)(unsafe.Pointer(&_414_r.XaMem)) = elem25(_aMem, uintptr(_pOp.Xp3))
+ _417_i = int32(0)
_1705:
- if _417_i >= int32(_414_r.X2) {
+ if _417_i >= int32(_414_r.XnField) {
goto _1708
}
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr(_414_r.X1)+48*uintptr(_417_i))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83701), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68288)))
+ if (int32(elem25((*XMem)(_414_r.XaMem), uintptr(_417_i)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83701), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66450)))
crt.X__builtin_abort(tls)
}
}()
_417_i += 1
goto _1705
_1708:
- _414_res = i32(0)
+ _414_res = int32(0)
_rc = _sqlite3VdbeIdxKeyCompare(tls, _db, _414_pC, &_414_r, &_414_res)
- i32(0)
- if (int32(_pOp.X0) & i32(1)) == i32(0) {
+
+ if (int32(_pOp.Xopcode) & int32(1)) == int32(0) {
func() {
- if int32(_pOp.X0) != i32(38) && int32(_pOp.X0) != i32(40) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83707), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70395)))
+ if int32(_pOp.Xopcode) != int32(38) && int32(_pOp.Xopcode) != int32(40) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83707), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68557)))
crt.X__builtin_abort(tls)
}
}()
@@ -52697,8 +52480,8 @@ _1708:
goto _1715
}
func() {
- if int32(_pOp.X0) != i32(41) && int32(_pOp.X0) != i32(39) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83710), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70442)))
+ if int32(_pOp.Xopcode) != int32(41) && int32(_pOp.Xopcode) != int32(39) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83710), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68604)))
crt.X__builtin_abort(tls)
}
}()
@@ -52707,96 +52490,88 @@ _1715:
if _rc != 0 {
goto _abort_due_to_error
}
- if _414_res > i32(0) {
+ if _414_res > int32(0) {
goto _jump_to_p2
}
goto _250
_198:
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83750), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83750), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X3) <= i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83751), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70489)))
+ if _pOp.Xp1 <= int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83751), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68651)))
crt.X__builtin_abort(tls)
}
}()
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(1))
- if (_db.X35) > ((_db.X38) + i32(1)) {
- _rc = i32(6)
- *(*uint8)(unsafe.Pointer(&(_p.X30))) = uint8(i32(2))
+ _pOut.Xflags = uint16(1)
+ if _db.XnVdbeRead > (_db.XnVDestroy + int32(1)) {
+ _rc = int32(6)
+ _p.XerrorAction = uint8(2)
goto _abort_due_to_error
}
- _420_iDb = _pOp.X5
+ _420_iDb = _pOp.Xp3
func() {
- if ((_p.X33) & (u32(1) << uint(_420_iDb))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83760), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67192)))
+ if (_p.XbtreeMask & (uint32(1) << uint(_420_iDb))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83760), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65354)))
crt.X__builtin_abort(tls)
}
}()
- _420_iMoved = i32(0)
- _rc = _sqlite3BtreeDropTable(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_420_iDb))).X1), _pOp.X3, &_420_iMoved)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(_420_iMoved)
+ _420_iMoved = int32(0)
+ _rc = _sqlite3BtreeDropTable(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_420_iDb)).XpBt), _pOp.Xp1, &_420_iMoved)
+ _pOut.Xflags = uint16(4)
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(_420_iMoved)
if _rc != 0 {
goto _abort_due_to_error
}
- if _420_iMoved != i32(0) {
- _sqlite3RootPageMoved(tls, _db, _420_iDb, _420_iMoved, _pOp.X3)
+ if _420_iMoved != int32(0) {
+ _sqlite3RootPageMoved(tls, _db, _420_iDb, _420_iMoved, _pOp.Xp1)
func() {
- if int32(_resetSchemaOnFault) != i32(0) && int32(_resetSchemaOnFault) != (_420_iDb+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83770), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70499)))
+ if int32(_resetSchemaOnFault) != int32(0) && int32(_resetSchemaOnFault) != (_420_iDb+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83770), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68661)))
crt.X__builtin_abort(tls)
}
}()
- _resetSchemaOnFault = uint8(_420_iDb + i32(1))
+ _resetSchemaOnFault = uint8(_420_iDb + int32(1))
}
goto _250
_199:
- _424_nChange = i32(0)
+ _424_nChange = int32(0)
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83800), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83800), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X33) & (u32(1) << uint(_pOp.X4))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83801), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70550)))
+ if (_p.XbtreeMask & (uint32(1) << uint(_pOp.Xp2))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83801), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68712)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeClearTable(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_pOp.X4))).X1), _pOp.X3, func() *int32 {
- if (_pOp.X5) != 0 {
+ _rc = _sqlite3BtreeClearTable(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp2)).XpBt), _pOp.Xp1, func() *int32 {
+ if _pOp.Xp3 != 0 {
return &_424_nChange
}
return nil
}())
- if (_pOp.X5) == 0 {
+ if _pOp.Xp3 == 0 {
goto _1740
}
- {
- p := (*int32)(unsafe.Pointer(&(_p.X11)))
- *p = (*p) + _424_nChange
- sink1(*p)
- }
- if (_pOp.X5) > i32(0) {
+ _p.XnChange += _424_nChange
+ if _pOp.Xp3 > int32(0) {
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X5))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83808), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63056)))
+ if (int32(elem25(_aMem, uintptr(_pOp.Xp3)).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83808), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61198)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemAboutToChange(tls, _p, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X5))))
- {
- p := (*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5))).X0)))))
- *p = (*p) + int64(_424_nChange)
- sink6(*p)
- }
+ _sqlite3VdbeMemAboutToChange(tls, _p, elem25(_aMem, uintptr(_pOp.Xp3)))
+ *(*int64)(unsafe.Pointer(&(elem25(_aMem, uintptr(_pOp.Xp3)).Xu))) += int64(_424_nChange)
}
_1740:
if _rc != 0 {
@@ -52805,35 +52580,35 @@ _1740:
goto _250
_200:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83828), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65541)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83828), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63683)))
crt.X__builtin_abort(tls)
}
}()
- _427_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _427_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
if _427_pC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83830), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65595)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83830), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63737)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_427_pC.X0) == i32(1) {
- _sqlite3VdbeSorterReset(tls, _db, (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_427_pC.X14)))))))
+ if int32(_427_pC.XeCurType) == int32(1) {
+ _sqlite3VdbeSorterReset(tls, _db, (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer(&_427_pC.Xuc))))
goto _1751
}
func() {
- if int32(_427_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83834), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_427_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83834), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((uint32(_427_pC.X7) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83835), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70584)))
+ if ((uint32(_427_pC.XisEphemeral) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83835), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68746)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeClearTableOfCursor(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_427_pC.X14)))))))
+ _rc = _sqlite3BtreeClearTableOfCursor(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_427_pC.Xuc))))
if _rc != 0 {
goto _abort_due_to_error
}
@@ -52841,115 +52616,115 @@ _1751:
goto _250
_201:
_pOut = _out2Prerelease(tls, _p, _pOp)
- _430_pgno = i32(0)
+ _430_pgno = int32(0)
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83874), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66998)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83874), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65140)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X33) & (u32(1) << uint(_pOp.X3))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83875), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67028)))
+ if (_p.XbtreeMask & (uint32(1) << uint(_pOp.Xp1))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83875), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65170)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83876), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83876), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
- _430_pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_pOp.X3)))
+ _430_pDb = elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp1))
func() {
- if (*XBtree)(_430_pDb.X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83878), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67265)))
+ if (*XBtree)(_430_pDb.XpBt) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83878), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65427)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pOp.X0) == i32(137) {
- _430_flags = i32(1)
+ if int32(_pOp.Xopcode) == int32(137) {
+ _430_flags = int32(1)
goto _1767
}
- _430_flags = i32(2)
+ _430_flags = int32(2)
_1767:
- _rc = _sqlite3BtreeCreateTable(tls, (*XBtree)(_430_pDb.X1), &_430_pgno, _430_flags)
+ _rc = _sqlite3BtreeCreateTable(tls, (*XBtree)(_430_pDb.XpBt), &_430_pgno, _430_flags)
if _rc != 0 {
goto _abort_due_to_error
}
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(_430_pgno)
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(_430_pgno)
goto _250
_203:
- *(*uint8)(unsafe.Pointer(&(_db.X26))) += 1
- _rc = Xsqlite3_exec(tls, _db, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))), nil, nil, nil)
- *(*uint8)(unsafe.Pointer(&(_db.X26))) -= 1
+ _db.XnSqlExec += 1
+ _rc = Xsqlite3_exec(tls, _db, *(**int8)(unsafe.Pointer(&_pOp.Xp4)), nil, nil, nil)
+ _db.XnSqlExec -= 1
if _rc != 0 {
goto _abort_due_to_error
}
goto _250
_204:
- _434_iDb = i32(0)
+ _434_iDb = int32(0)
_1770:
- if _434_iDb >= (_db.X5) {
+ if _434_iDb >= _db.XnDb {
goto _1773
}
func() {
- if _434_iDb != i32(1) && _sqlite3BtreeHoldsMutex(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_434_iDb))).X1)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83923), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(49956)))
+ if _434_iDb != int32(1) && _sqlite3BtreeHoldsMutex(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_434_iDb)).XpBt)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83923), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(49911)))
crt.X__builtin_abort(tls)
}
}()
_434_iDb += 1
goto _1770
_1773:
- _434_iDb = _pOp.X3
+ _434_iDb = _pOp.Xp1
func() {
- if _434_iDb < i32(0) || _434_iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83928), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _434_iDb < int32(0) || _434_iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83928), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_434_iDb))).X4).X9) & i32(1)) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83929), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70600)))
+ if (int32((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_434_iDb)).XpSchema).XschemaFlags) & int32(1)) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83929), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68762)))
crt.X__builtin_abort(tls)
}
}()
- _434_zMaster = str(50026)
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_434_initData.X0))))) = _db
- *(*int32)(unsafe.Pointer(&(_434_initData.X2))) = _pOp.X3
- *(***int8)(unsafe.Pointer(&(_434_initData.X1))) = (**int8)(unsafe.Pointer(&(_p.X22)))
- _434_zSql = _sqlite3MPrintf(tls, _db, str(70640), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_434_iDb))).X0), unsafe.Pointer(_434_zMaster), unsafe.Pointer(*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))))
+ _434_zMaster = str(49981)
+ *(**Xsqlite3)(unsafe.Pointer(&_434_initData.Xdb)) = _db
+ _434_initData.XiDb = _pOp.Xp1
+ _434_initData.XpzErrMsg = &_p.XzErrMsg
+ _434_zSql = _sqlite3MPrintf(tls, _db, str(68802), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_434_iDb)).XzDbSName), unsafe.Pointer(_434_zMaster), unsafe.Pointer(*(**int8)(unsafe.Pointer(&_pOp.Xp4))))
if _434_zSql == nil {
- _rc = _sqlite3NomemError(tls, i32(83939))
+ _rc = _sqlite3NomemError(tls, int32(83939))
goto _1783
}
func() {
- if int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83941), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(49896)))
+ if int32(_db.Xinit.Xbusy) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83941), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(49851)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X2))) = uint8(i32(1))
- *(*int32)(unsafe.Pointer(&(_434_initData.X3))) = i32(0)
+ _db.Xinit.Xbusy = uint8(1)
+ _434_initData.Xrc = int32(0)
func() {
- if (_db.X17) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83944), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(23869)))
+ if _db.XmallocFailed != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83944), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(23824)))
crt.X__builtin_abort(tls)
}
}()
- _rc = Xsqlite3_exec(tls, _db, _434_zSql, _sqlite3InitCallback, (unsafe.Pointer)(&_434_initData), nil)
- if _rc == i32(0) {
- _rc = _434_initData.X3
+ _rc = Xsqlite3_exec(tls, _db, _434_zSql, _sqlite3InitCallback, unsafe.Pointer(&_434_initData), nil)
+ if _rc == int32(0) {
+ _rc = _434_initData.Xrc
}
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_434_zSql))
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X2))) = uint8(i32(0))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_434_zSql))
+ _db.Xinit.Xbusy = 0
_1783:
if _rc == 0 {
goto _1789
}
_sqlite3ResetAllSchemasOfConnection(tls, _db)
- if _rc == i32(7) {
+ if _rc == int32(7) {
goto _no_mem
}
goto _abort_due_to_error
@@ -52957,84 +52732,84 @@ _1789:
goto _250
_205:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(83969), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66998)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(83969), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65140)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3AnalysisLoad(tls, _db, _pOp.X3)
+ _rc = _sqlite3AnalysisLoad(tls, _db, _pOp.Xp1)
if _rc != 0 {
goto _abort_due_to_error
}
goto _250
_206:
- _sqlite3UnlinkAndDeleteTable(tls, _db, _pOp.X3, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ _sqlite3UnlinkAndDeleteTable(tls, _db, _pOp.Xp1, *(**int8)(unsafe.Pointer(&_pOp.Xp4)))
goto _250
_207:
- _sqlite3UnlinkAndDeleteIndex(tls, _db, _pOp.X3, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ _sqlite3UnlinkAndDeleteIndex(tls, _db, _pOp.Xp1, *(**int8)(unsafe.Pointer(&_pOp.Xp4)))
goto _250
_208:
- _sqlite3UnlinkAndDeleteTrigger(tls, _db, _pOp.X3, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ _sqlite3UnlinkAndDeleteTrigger(tls, _db, _pOp.Xp1, *(**int8)(unsafe.Pointer(&_pOp.Xp4)))
goto _250
_209:
func() {
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84043), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66440)))
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84043), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64582)))
crt.X__builtin_abort(tls)
}
}()
- _445_nRoot = _pOp.X4
- _445_aRoot = *(**int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
+ _445_nRoot = _pOp.Xp2
+ _445_aRoot = *(**int32)(unsafe.Pointer(&_pOp.Xp4))
func() {
- if _445_nRoot <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84046), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70704)))
+ if _445_nRoot <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84046), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68866)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_445_aRoot)) + 4*uintptr(_445_nRoot)))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84047), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70712)))
+ if (*elem8(_445_aRoot, uintptr(_445_nRoot))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84047), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68874)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X5) <= i32(0) || (_pOp.X5) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84048), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64441)))
+ if _pOp.Xp3 <= int32(0) || _pOp.Xp3 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84048), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62583)))
crt.X__builtin_abort(tls)
}
}()
- _445_pnErr = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _445_pnErr = elem25(_aMem, uintptr(_pOp.Xp3))
func() {
- if (int32(_445_pnErr.X1) & i32(4)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84050), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70728)))
+ if (int32(_445_pnErr.Xflags) & int32(4)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84050), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68890)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_445_pnErr.X1) & i32(18)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84051), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70756)))
+ if (int32(_445_pnErr.Xflags) & int32(18)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84051), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68918)))
crt.X__builtin_abort(tls)
}
}()
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if int32(_pOp.X2) >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84053), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70795)))
+ if int32(_pOp.Xp5) >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84053), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68957)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X33) & (u32(1) << uint(int32(_pOp.X2)))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84054), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70811)))
+ if (_p.XbtreeMask & (uint32(1) << uint(int32(_pOp.Xp5)))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84054), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(68973)))
crt.X__builtin_abort(tls)
}
}()
- _445_z = _sqlite3BtreeIntegrityCheck(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_pOp.X2))).X1), _445_aRoot, _445_nRoot, int32(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_445_pnErr.X0))))))+i32(1), &_445_nErr)
+ _445_z = _sqlite3BtreeIntegrityCheck(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp5)).XpBt), _445_aRoot, _445_nRoot, int32(*(*int64)(unsafe.Pointer(&_445_pnErr.Xu)))+int32(1), &_445_nErr)
_sqlite3VdbeMemSetNull(tls, _pIn1)
- if _445_nErr == i32(0) {
+ if _445_nErr == int32(0) {
func() {
if _445_z != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84059), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70845)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84059), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69007)))
crt.X__builtin_abort(tls)
}
}()
@@ -53043,448 +52818,429 @@ _209:
if _445_z == nil {
goto _no_mem
}
- {
- p := (*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_445_pnErr.X0)))))
- *p = (*p) - int64(_445_nErr-i32(1))
- sink6(*p)
- }
- _sqlite3VdbeMemSetStr(tls, _pIn1, _445_z, i32(-1), uint8(i32(1)), Xsqlite3_free)
+ *(*int64)(unsafe.Pointer(&_445_pnErr.Xu)) -= int64(_445_nErr - int32(1))
+ _sqlite3VdbeMemSetStr(tls, _pIn1, _445_z, int32(-1), uint8(1), Xsqlite3_free)
_1817:
_sqlite3VdbeChangeEncoding(tls, _pIn1, int32(_encoding))
goto _250
_210:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pIn2 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pIn2 = elem25(_aMem, uintptr(_pOp.Xp2))
func() {
- if (int32(_pIn2.X1) & i32(4)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84083), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67591)))
+ if (int32(_pIn2.Xflags) & int32(4)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84083), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65753)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pIn1.X1) & i32(32)) != i32(0) {
+ if (int32(_pIn1.Xflags) & int32(32)) != int32(0) {
goto _1820
}
_sqlite3VdbeMemSetRowSet(tls, _pIn1)
- if (int32(_pIn1.X1) & i32(32)) == i32(0) {
+ if (int32(_pIn1.Xflags) & int32(32)) == int32(0) {
goto _no_mem
}
_1820:
- _sqlite3RowSetInsert(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))), *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn2.X0))))))
+ _sqlite3RowSetInsert(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer(&_pIn1.Xu))), *(*int64)(unsafe.Pointer(&_pIn2.Xu)))
goto _250
_211:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- if ((int32(_pIn1.X1) & i32(32)) == i32(0)) || (_sqlite3RowSetNext(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))), &_451_val) == i32(0)) {
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ if ((int32(_pIn1.Xflags) & int32(32)) == int32(0)) || (_sqlite3RowSetNext(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer(&_pIn1.Xu))), &_451_val) == int32(0)) {
_sqlite3VdbeMemSetNull(tls, _pIn1)
goto _jump_to_p2_and_check_for_interrupt
}
- _sqlite3VdbeMemSetInt64(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X5))), _451_val)
+ _sqlite3VdbeMemSetInt64(tls, elem25(_aMem, uintptr(_pOp.Xp3)), _451_val)
goto _check_for_interrupt
_212:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- _454_iSet = *(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
+ _454_iSet = *(*int32)(unsafe.Pointer(&_pOp.Xp4))
func() {
- if (int32(_pIn3.X1) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84149), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70850)))
+ if (int32(_pIn3.Xflags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84149), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69012)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pIn1.X1) & i32(32)) != i32(0) {
+ if (int32(_pIn1.Xflags) & int32(32)) != int32(0) {
goto _1827
}
_sqlite3VdbeMemSetRowSet(tls, _pIn1)
- if (int32(_pIn1.X1) & i32(32)) == i32(0) {
+ if (int32(_pIn1.Xflags) & int32(32)) == int32(0) {
goto _no_mem
}
_1827:
func() {
- if int32(_pOp.X1) != i32(-11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84159), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(68121)))
+ if int32(_pOp.Xp4type) != int32(-11) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84159), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(66283)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _454_iSet != i32(-1) && _454_iSet < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84160), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70870)))
+ if _454_iSet != int32(-1) && _454_iSet < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84160), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69032)))
crt.X__builtin_abort(tls)
}
}()
if _454_iSet == 0 {
goto _1834
}
- _454_exists = _sqlite3RowSetTest(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))), _454_iSet, *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0))))))
+ _454_exists = _sqlite3RowSetTest(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer(&_pIn1.Xu))), _454_iSet, *(*int64)(unsafe.Pointer(&_pIn3.Xu)))
if _454_exists != 0 {
goto _jump_to_p2
}
_1834:
- if _454_iSet >= i32(0) {
- _sqlite3RowSetInsert(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))), *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0))))))
+ if _454_iSet >= int32(0) {
+ _sqlite3RowSetInsert(tls, (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer(&_pIn1.Xu))), *(*int64)(unsafe.Pointer(&_pIn3.Xu)))
}
goto _250
_213:
- _458_pProgram = (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- _458_pRt = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _458_pProgram = (*XSubProgram)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ _458_pRt = elem25(_aMem, uintptr(_pOp.Xp3))
func() {
- if (_458_pProgram.X1) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84202), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70890)))
+ if _458_pProgram.XnOp <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84202), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69052)))
crt.X__builtin_abort(tls)
}
}()
- if (_pOp.X2) == 0 {
+ if _pOp.Xp5 == 0 {
goto _1839
}
- _458_t = _458_pProgram.X5
- _458_pFrame = (*XVdbeFrame)(_p.X38)
+ _458_t = _458_pProgram.Xtoken
+ _458_pFrame = (*XVdbeFrame)(_p.XpFrame)
_1840:
- if _458_pFrame == nil || (_458_pFrame.X7) == _458_t {
+ if _458_pFrame == nil || _458_pFrame.Xtoken == _458_t {
goto _1844
}
- _458_pFrame = (*XVdbeFrame)(_458_pFrame.X1)
+ _458_pFrame = (*XVdbeFrame)(_458_pFrame.XpParent)
goto _1840
_1844:
if _458_pFrame != nil {
goto _250
}
_1839:
- if (_p.X40) >= (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(10))))) {
- _rc = i32(1)
- _sqlite3VdbeError(tls, _p, str(70906))
+ if _p.XnFrame >= (*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(10))) {
+ _rc = int32(1)
+ _sqlite3VdbeError(tls, _p, str(69068))
goto _abort_due_to_error
}
- if (int32(_458_pRt.X1) & i32(64)) != i32(0) {
+ if (int32(_458_pRt.Xflags) & int32(64)) != int32(0) {
goto _1847
}
- _458_nMem = (_458_pProgram.X2) + (_458_pProgram.X3)
+ _458_nMem = _458_pProgram.XnMem + _458_pProgram.XnCsr
func() {
- if _458_nMem <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84238), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70943)))
+ if _458_nMem <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84238), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69105)))
crt.X__builtin_abort(tls)
}
}()
- if (_458_pProgram.X3) == i32(0) {
+ if _458_pProgram.XnCsr == int32(0) {
_458_nMem += 1
}
- _458_nByte = int32(((u32(80) + (uint32(_458_nMem) * u32(48))) + (uint32(_458_pProgram.X3) * u32(4))) + uint32(((_458_pProgram.X1)+i32(7))/i32(8)))
+ _458_nByte = int32(((uint32(80) + (uint32(_458_nMem) * uint32(48))) + (uint32(_458_pProgram.XnCsr) * uint32(4))) + uint32((_458_pProgram.XnOp+int32(7))/int32(8)))
_458_pFrame = (*XVdbeFrame)(_sqlite3DbMallocZero(tls, _db, uint64(_458_nByte)))
if _458_pFrame == nil {
goto _no_mem
}
_sqlite3VdbeMemRelease(tls, _458_pRt)
- *(*uint16)(unsafe.Pointer(&(_458_pRt.X1))) = uint16(i32(64))
- *(**XVdbeFrame)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_458_pRt.X0))))))) = _458_pFrame
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_458_pFrame.X0))))) = _p
- *(*int32)(unsafe.Pointer(&(_458_pFrame.X14))) = _458_nMem
- *(*int32)(unsafe.Pointer(&(_458_pFrame.X15))) = _458_pProgram.X3
- *(*int32)(unsafe.Pointer(&(_458_pFrame.X11))) = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_458_pFrame.X4))))) = (*XMem)(_p.X18)
- *(*int32)(unsafe.Pointer(&(_458_pFrame.X13))) = _p.X6
- *(***XVdbeCursor)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_458_pFrame.X5))))) = (**XVdbeCursor)(unsafe.Pointer(_p.X23))
- *(*int32)(unsafe.Pointer(&(_458_pFrame.X10))) = _p.X7
- *(**XVdbeOp)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_458_pFrame.X2))))) = (*XVdbeOp)(_p.X17)
- *(*int32)(unsafe.Pointer(&(_458_pFrame.X12))) = _p.X27
- *(*unsafe.Pointer)(unsafe.Pointer(&(_458_pFrame.X7))) = _458_pProgram.X5
- _458_pEnd = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_458_pFrame))+1*uintptr(u32(80)))))) + 48*uintptr(_458_pFrame.X14)))
- _458_pMem = (*XMem)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_458_pFrame)) + 1*uintptr(u32(80))))))
+ _458_pRt.Xflags = uint16(64)
+ *(**XVdbeFrame)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_458_pRt.Xu)))) = _458_pFrame
+ *(**TVdbe)(unsafe.Pointer(&_458_pFrame.Xv)) = _p
+ _458_pFrame.XnChildMem = _458_nMem
+ _458_pFrame.XnChildCsr = _458_pProgram.XnCsr
+ _458_pFrame.Xpc = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
+ *(**XMem)(unsafe.Pointer(&_458_pFrame.XaMem)) = (*XMem)(_p.XaMem)
+ _458_pFrame.XnMem = _p.XnMem
+ *(***XVdbeCursor)(unsafe.Pointer(&_458_pFrame.XapCsr)) = (**XVdbeCursor)(unsafe.Pointer(_p.XapCsr))
+ _458_pFrame.XnCursor = _p.XnCursor
+ *(**XVdbeOp)(unsafe.Pointer(&_458_pFrame.XaOp)) = (*XVdbeOp)(_p.XaOp)
+ _458_pFrame.XnOp = _p.XnOp
+ _458_pFrame.Xtoken = _458_pProgram.Xtoken
+ _458_pEnd = elem25((*XMem)(unsafe.Pointer(elem15((*uint8)(unsafe.Pointer(_458_pFrame)), uintptr(80)))), uintptr(_458_pFrame.XnChildMem))
+ _458_pMem = (*XMem)(unsafe.Pointer(elem15((*uint8)(unsafe.Pointer(_458_pFrame)), uintptr(80))))
_1852:
if _458_pMem == _458_pEnd {
goto _1855
}
- *(*uint16)(unsafe.Pointer(&(_458_pMem.X1))) = uint16(i32(128))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_458_pMem.X9))))) = _db
+ _458_pMem.Xflags = uint16(128)
+ *(**Xsqlite3)(unsafe.Pointer(&_458_pMem.Xdb)) = _db
*(*uintptr)(unsafe.Pointer(&_458_pMem)) += uintptr(48)
goto _1852
_1855:
goto _1856
_1847:
- _458_pFrame = (*XVdbeFrame)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_458_pRt.X0))))))
+ _458_pFrame = (*XVdbeFrame)(*(*unsafe.Pointer)(unsafe.Pointer(&_458_pRt.Xu)))
func() {
- if ((_458_pProgram.X2)+(_458_pProgram.X3)) != (_458_pFrame.X14) && ((_458_pProgram.X3) != i32(0) || ((_458_pProgram.X2)+i32(1)) != (_458_pFrame.X14)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84274), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(70950)))
+ if (_458_pProgram.XnMem+_458_pProgram.XnCsr) != _458_pFrame.XnChildMem && (_458_pProgram.XnCsr != int32(0) || (_458_pProgram.XnMem+int32(1)) != _458_pFrame.XnChildMem) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84274), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69112)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_458_pProgram.X3) != (_458_pFrame.X15) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84276), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71061)))
+ if _458_pProgram.XnCsr != _458_pFrame.XnChildCsr {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84276), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69223)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uintptr(unsafe.Pointer(_pOp))-uintptr(unsafe.Pointer(_aOp)))/24) != (_458_pFrame.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84277), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71095)))
+ if int32((uintptr(unsafe.Pointer(_pOp))-uintptr(unsafe.Pointer(_aOp)))/24) != _458_pFrame.Xpc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84277), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69257)))
crt.X__builtin_abort(tls)
}
}()
_1856:
- *(*int32)(unsafe.Pointer(&(_p.X40))) += 1
- *(**XVdbeFrame)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_458_pFrame.X1))))) = (*XVdbeFrame)(_p.X38)
- *(*int64)(unsafe.Pointer(&(_458_pFrame.X8))) = _db.X7
- *(*int32)(unsafe.Pointer(&(_458_pFrame.X16))) = _p.X11
- *(*int32)(unsafe.Pointer(&(_458_pFrame.X17))) = (*Xsqlite3)(_p.X0).X29
- func() {
- if (*XAuxData)(_458_pFrame.X9) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84285), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71124)))
- crt.X__builtin_abort(tls)
- }
- }()
- *(**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_458_pFrame.X9))))) = (*XAuxData)(_p.X43)
- *(**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X43))))) = nil
- *(*int32)(unsafe.Pointer(&(_p.X11))) = i32(0)
- *(**XVdbeFrame)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X38))))) = _458_pFrame
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X18))))) = store20(&_aMem, (*XMem)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_458_pFrame))+1*uintptr(u32(80)))))))
- *(*int32)(unsafe.Pointer(&(_p.X6))) = _458_pFrame.X14
- *(*int32)(unsafe.Pointer(&(_p.X7))) = int32(uint16(_458_pFrame.X15))
- *(***XVdbeCursor)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_p.X23))))) = (**XVdbeCursor)(unsafe.Pointer((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_p.X6)))))
- *(**uint8)(unsafe.Pointer(&(_458_pFrame.X6))) = (*uint8)(unsafe.Pointer((**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_458_pProgram.X3)))))
- crt.Xmemset(tls, (unsafe.Pointer)(_458_pFrame.X6), i32(0), uint32(((_458_pProgram.X1)+i32(7))/i32(8)))
- *(**XVdbeOp)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X17))))) = store40(&_aOp, (*XVdbeOp)(_458_pProgram.X0))
- *(*int32)(unsafe.Pointer(&(_p.X27))) = _458_pProgram.X1
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 24*uintptr(i32(-1))))
+ _p.XnFrame += 1
+ *(**XVdbeFrame)(unsafe.Pointer(&_458_pFrame.XpParent)) = (*XVdbeFrame)(_p.XpFrame)
+ _458_pFrame.XlastRowid = _db.XlastRowid
+ _458_pFrame.XnChange = _p.XnChange
+ _458_pFrame.XnDbChange = (*Xsqlite3)(_p.Xdb).XnChange
+ func() {
+ if (*XAuxData)(_458_pFrame.XpAuxData) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84285), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69286)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ *(**XAuxData)(unsafe.Pointer(&_458_pFrame.XpAuxData)) = (*XAuxData)(_p.XpAuxData)
+ *(**XAuxData)(unsafe.Pointer(&_p.XpAuxData)) = nil
+ _p.XnChange = int32(0)
+ *(**XVdbeFrame)(unsafe.Pointer(&_p.XpFrame)) = _458_pFrame
+ *(**XMem)(unsafe.Pointer(&_p.XaMem)) = store25(&_aMem, (*XMem)(unsafe.Pointer(elem15((*uint8)(unsafe.Pointer(_458_pFrame)), uintptr(80)))))
+ _p.XnMem = _458_pFrame.XnChildMem
+ _p.XnCursor = int32(uint16(_458_pFrame.XnChildCsr))
+ *(***XVdbeCursor)(unsafe.Pointer(&_p.XapCsr)) = (**XVdbeCursor)(unsafe.Pointer(elem25(_aMem, uintptr(_p.XnMem))))
+ _458_pFrame.XaOnce = (*uint8)(unsafe.Pointer(elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_458_pProgram.XnCsr))))
+ crt.Xmemset(tls, unsafe.Pointer(_458_pFrame.XaOnce), int32(0), uint32((_458_pProgram.XnOp+int32(7))/int32(8)))
+ *(**XVdbeOp)(unsafe.Pointer(&_p.XaOp)) = store61(&_aOp, (*XVdbeOp)(_458_pProgram.XaOp))
+ _p.XnOp = _458_pProgram.XnOp
+ _pOp = elem61(_aOp, uintptr(4294967295))
goto _250
_214:
_pOut = _out2Prerelease(tls, _p, _pOp)
- _465_pFrame = (*XVdbeFrame)(_p.X38)
- _465_pIn = (*XMem)(unsafe.Pointer(uintptr(_465_pFrame.X4) + 48*uintptr((_pOp.X3)+((*XVdbeOp)(unsafe.Pointer(uintptr(_465_pFrame.X2)+24*uintptr(_465_pFrame.X11))).X3))))
- _sqlite3VdbeMemShallowCopy(tls, _pOut, _465_pIn, i32(4096))
+ _465_pFrame = (*XVdbeFrame)(_p.XpFrame)
+ _465_pIn = elem25((*XMem)(_465_pFrame.XaMem), uintptr(_pOp.Xp1+(elem61((*XVdbeOp)(_465_pFrame.XaOp), uintptr(_465_pFrame.Xpc)).Xp1)))
+ _sqlite3VdbeMemShallowCopy(tls, _pOut, _465_pIn, int32(4096))
goto _250
_215:
- if ((_db.X6) & i32(33554432)) != 0 {
- {
- p := (*int64)(unsafe.Pointer(&(_db.X78)))
- *p = (*p) + int64(_pOp.X4)
- sink6(*p)
- }
+ if (_db.Xflags & int32(33554432)) != 0 {
+ _db.XnDeferredImmCons += int64(_pOp.Xp2)
goto _1870
}
- if (_pOp.X3) != 0 {
- {
- p := (*int64)(unsafe.Pointer(&(_db.X77)))
- *p = (*p) + int64(_pOp.X4)
- sink6(*p)
- }
+ if _pOp.Xp1 != 0 {
+ _db.XnDeferredCons += int64(_pOp.Xp2)
goto _1870
}
- {
- p := (*int64)(unsafe.Pointer(&(_p.X14)))
- *p = (*p) + int64(_pOp.X4)
- sink6(*p)
- }
+ _p.XnFkConstraint += int64(_pOp.Xp2)
_1870:
goto _250
_216:
- if (_pOp.X3) == 0 {
+ if _pOp.Xp1 == 0 {
goto _1871
}
- if ((_db.X77) == int64(i32(0))) && ((_db.X78) == int64(i32(0))) {
+ if (_db.XnDeferredCons == (0)) && (_db.XnDeferredImmCons == (0)) {
goto _jump_to_p2
}
goto _1874
_1871:
- if ((_p.X14) == int64(i32(0))) && ((_db.X78) == int64(i32(0))) {
+ if (_p.XnFkConstraint == (0)) && (_db.XnDeferredImmCons == (0)) {
goto _jump_to_p2
}
_1874:
goto _250
_217:
- if (*XVdbeFrame)(_p.X38) == nil {
+ if _p.XpFrame == nil {
goto _1877
}
- _473_pFrame = (*XVdbeFrame)(_p.X38)
+ _473_pFrame = (*XVdbeFrame)(_p.XpFrame)
_1878:
- if (*XVdbeFrame)(_473_pFrame.X1) == nil {
+ if _473_pFrame.XpParent == nil {
goto _1881
}
- _473_pFrame = (*XVdbeFrame)(_473_pFrame.X1)
+ _473_pFrame = (*XVdbeFrame)(_473_pFrame.XpParent)
goto _1878
_1881:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr(_473_pFrame.X4) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25((*XMem)(_473_pFrame.XaMem), uintptr(_pOp.Xp1))
goto _1882
_1877:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
_1882:
func() {
- if (int32(_pIn1.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84394), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64072)))
+ if (int32(_pIn1.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84394), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62214)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeMemIntegerify(tls, _pIn1)
- _pIn2 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X4)))
+ _pIn2 = elem25(_aMem, uintptr(_pOp.Xp2))
_sqlite3VdbeMemIntegerify(tls, _pIn2)
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) < (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn2.X0)))))) {
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0))))) = *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn2.X0)))))
+ if (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) < (*(*int64)(unsafe.Pointer(&_pIn2.Xu))) {
+ *(*int64)(unsafe.Pointer(&_pIn1.Xu)) = *(*int64)(unsafe.Pointer(&_pIn2.Xu))
}
goto _250
_218:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if (int32(_pIn1.X1) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84417), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71144)))
+ if (int32(_pIn1.Xflags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84417), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69306)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) > int64(i32(0)) {
- {
- p := (*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))
- *p = (*p) - int64(_pOp.X5)
- sink6(*p)
- }
+ if (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) > (0) {
+ *(*int64)(unsafe.Pointer(&_pIn1.Xu)) -= int64(_pOp.Xp3)
goto _jump_to_p2
}
goto _250
_219:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
- _pIn3 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
+ _pIn3 = elem25(_aMem, uintptr(_pOp.Xp3))
_pOut = _out2Prerelease(tls, _p, _pOp)
func() {
- if (int32(_pIn1.X1) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84449), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71164)))
+ if (int32(_pIn1.Xflags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84449), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69326)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pIn3.X1) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84450), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63806)))
+ if (int32(_pIn3.Xflags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84450), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61948)))
crt.X__builtin_abort(tls)
}
}()
- _479_x = *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))
- if (_479_x <= int64(i32(0))) || _sqlite3AddInt64(tls, &_479_x, func() int64 {
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0)))))) > int64(i32(0)) {
- return (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn3.X0))))))
+ _479_x = *(*int64)(unsafe.Pointer(&_pIn1.Xu))
+ if (_479_x <= (0)) || _sqlite3AddInt64(tls, &_479_x, func() int64 {
+ if (*(*int64)(unsafe.Pointer(&_pIn3.Xu))) > (0) {
+ return (*(*int64)(unsafe.Pointer(&_pIn3.Xu)))
}
- return int64(i32(0))
+ return (0)
}()) != 0 {
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(i32(-1))
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(-1)
goto _1897
}
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = _479_x
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = _479_x
_1897:
goto _250
_220:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if (int32(_pIn1.X1) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84477), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71144)))
+ if (int32(_pIn1.Xflags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84477), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69306)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) == 0 {
+ if (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) == 0 {
goto _1900
}
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) > int64(i32(0)) {
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0))))) -= 1
+ if (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) > (0) {
+ *(*int64)(unsafe.Pointer(&_pIn1.Xu)) -= 1
}
goto _jump_to_p2
_1900:
goto _250
_221:
- _pIn1 = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _pIn1 = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if (int32(_pIn1.X1) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84494), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71144)))
+ if (int32(_pIn1.Xflags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84494), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69306)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) > i64(-9223372036854775808) {
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0))))) -= 1
+ if (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) > int64(-9223372036854775808) {
+ *(*int64)(unsafe.Pointer(&_pIn1.Xu)) -= 1
}
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pIn1.X0)))))) == int64(i32(0)) {
+ if (*(*int64)(unsafe.Pointer(&_pIn1.Xu))) == (0) {
goto _jump_to_p2
}
goto _250
_222:
func() {
- if int32(_pOp.X1) != i32(-4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84534), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64417)))
+ if int32(_pOp.Xp4type) != int32(-4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84534), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62559)))
crt.X__builtin_abort(tls)
}
}()
- _485_n = int32(_pOp.X2)
+ _485_n = int32(_pOp.Xp5)
func() {
- if (_pOp.X5) <= i32(0) || (_pOp.X5) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84536), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64441)))
+ if _pOp.Xp3 <= int32(0) || _pOp.Xp3 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84536), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62583)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _485_n != i32(0) && ((_pOp.X4) <= i32(0) || ((_pOp.X4)+_485_n) > ((((_p.X6)+i32(1))-(_p.X7))+i32(1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84537), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64488)))
+ if _485_n != int32(0) && (_pOp.Xp2 <= int32(0) || (_pOp.Xp2+_485_n) > (((_p.XnMem+int32(1))-_p.XnCursor)+int32(1))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84537), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62630)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X5) >= (_pOp.X4) && (_pOp.X5) < ((_pOp.X4)+_485_n) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84538), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64549)))
+ if _pOp.Xp3 >= _pOp.Xp2 && _pOp.Xp3 < (_pOp.Xp2+_485_n) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84538), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62691)))
crt.X__builtin_abort(tls)
}
}()
- _485_pCtx = (*Xsqlite3_context)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(32)+(uint32(_485_n-i32(1))*u32(4)))))
+ _485_pCtx = (*Xsqlite3_context)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(32)+(uint32(_485_n-int32(1))*uint32(4)))))
if _485_pCtx == nil {
goto _no_mem
}
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_485_pCtx.X2))))) = nil
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_485_pCtx.X1))))) = (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- *(*int32)(unsafe.Pointer(&(_485_pCtx.X4))) = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_485_pCtx.X3))))) = _p
- *(*uint8)(unsafe.Pointer(&(_485_pCtx.X8))) = uint8(_485_n)
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(-16))
- *(**Xsqlite3_context)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))) = _485_pCtx
- *(*uint8)(unsafe.Pointer(&(_pOp.X0))) = uint8(i32(151))
+ *(**XMem)(unsafe.Pointer(&_485_pCtx.XpMem)) = nil
+ *(**XFuncDef)(unsafe.Pointer(&_485_pCtx.XpFunc)) = (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ _485_pCtx.XiOp = int32((uintptr(unsafe.Pointer(_pOp)) - uintptr(unsafe.Pointer(_aOp))) / 24)
+ *(**TVdbe)(unsafe.Pointer(&_485_pCtx.XpVdbe)) = _p
+ _485_pCtx.Xargc = uint8(_485_n)
+ _pOp.Xp4type = int8(-16)
+ *(**Xsqlite3_context)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))) = _485_pCtx
+ _pOp.Xopcode = uint8(151)
_223:
func() {
- if int32(_pOp.X1) != i32(-16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84557), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64587)))
+ if int32(_pOp.Xp4type) != int32(-16) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84557), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62729)))
crt.X__builtin_abort(tls)
}
}()
- _486_pCtx = (*Xsqlite3_context)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- _486_pMem = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- if (*XMem)(_486_pCtx.X2) == _486_pMem {
+ _486_pCtx = (*Xsqlite3_context)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ _486_pMem = elem25(_aMem, uintptr(_pOp.Xp3))
+ if (*XMem)(_486_pCtx.XpMem) == _486_pMem {
goto _1921
}
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_486_pCtx.X2))))) = _486_pMem
- _486_i = int32(_486_pCtx.X8) - i32(1)
+ *(**XMem)(unsafe.Pointer(&_486_pCtx.XpMem)) = _486_pMem
+ _486_i = int32(_486_pCtx.Xargc) - int32(1)
_1922:
- if _486_i < i32(0) {
+ if _486_i < int32(0) {
goto _1925
}
- *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_486_pCtx.X9))))) + 4*uintptr(_486_i))) = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr((_pOp.X4)+_486_i)))
+ *elem19((**XMem)(unsafe.Pointer(&_486_pCtx.Xargv)), uintptr(_486_i)) = elem25(_aMem, uintptr(_pOp.Xp2+_486_i))
_486_i -= 1
goto _1922
_1925:
_1921:
- _486_i = i32(0)
+ _486_i = int32(0)
_1926:
- if _486_i >= int32(_486_pCtx.X8) {
+ if _486_i >= int32(_486_pCtx.Xargc) {
goto _1929
}
func() {
- if (int32((*(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_486_pCtx.X9))))) + 4*uintptr(_486_i)))).X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84572), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64611)))
+ if (int32((*elem19((**XMem)(unsafe.Pointer(&_486_pCtx.Xargv)), uintptr(_486_i))).Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84572), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62753)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, (_pOp.X4)+_486_i, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_486_pCtx.X9))))) + 4*uintptr(_486_i))))
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp2+_486_i, *elem19((**XMem)(unsafe.Pointer(&_486_pCtx.Xargv)), uintptr(_486_i)))
}
_486_i += 1
goto _1926
_1929:
- *(*int32)(unsafe.Pointer(&(_486_pMem.X4))) += 1
- _sqlite3VdbeMemInit(tls, &_486_t, _db, uint16(i32(1)))
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_486_pCtx.X0))))) = &_486_t
- *(*uint8)(unsafe.Pointer(&(_486_pCtx.X7))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_486_pCtx.X6))) = uint8(i32(0))
- (*(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{((*XFuncDef)(_486_pCtx.X1).X4)})))(tls, _486_pCtx, int32(_486_pCtx.X8), (**XMem)(unsafe.Pointer((*[1]unsafe.Pointer)(unsafe.Pointer(&(_486_pCtx.X9))))))
- if (_486_pCtx.X7) == 0 {
+ _486_pMem.Xn += 1
+ _sqlite3VdbeMemInit(tls, &_486_t, _db, uint16(1))
+ *(**XMem)(unsafe.Pointer(&_486_pCtx.XpOut)) = &_486_t
+ _486_pCtx.XfErrorOrAux = 0
+ _486_pCtx.XskipFlag = 0
+ func() func(*crt.TLS, *Xsqlite3_context, int32, **XMem) {
+ v := (*XFuncDef)(_486_pCtx.XpFunc).XxSFunc
+ return *(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer(&v))
+ }()(tls, _486_pCtx, int32(_486_pCtx.Xargc), (**XMem)(unsafe.Pointer(&_486_pCtx.Xargv)))
+ if _486_pCtx.XfErrorOrAux == 0 {
goto _1933
}
- if (_486_pCtx.X5) != 0 {
- _sqlite3VdbeError(tls, _p, str(24576), unsafe.Pointer(Xsqlite3_value_text(tls, &_486_t)))
- _rc = _486_pCtx.X5
+ if _486_pCtx.XisError != 0 {
+ _sqlite3VdbeError(tls, _p, str(24531), unsafe.Pointer(Xsqlite3_value_text(tls, &_486_t)))
+ _rc = _486_pCtx.XisError
}
_sqlite3VdbeMemRelease(tls, &_486_t)
if _rc != 0 {
@@ -53493,44 +53249,44 @@ _1929:
goto _1936
_1933:
func() {
- if int32(_486_t.X1) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84591), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71186)))
+ if int32(_486_t.Xflags) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84591), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69348)))
crt.X__builtin_abort(tls)
}
}()
_1936:
- if (_486_pCtx.X6) == 0 {
+ if _486_pCtx.XskipFlag == 0 {
goto _1939
}
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(-1)))).X0) != i32(68) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84594), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71204)))
+ if int32(elem61(_pOp, uintptr(4294967295)).Xopcode) != int32(68) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84594), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69366)))
crt.X__builtin_abort(tls)
}
}()
- _486_i = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(-1)))).X3
+ _486_i = elem61(_pOp, uintptr(4294967295)).Xp1
if _486_i != 0 {
- _sqlite3VdbeMemSetInt64(tls, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_486_i))), int64(i32(1)))
+ _sqlite3VdbeMemSetInt64(tls, elem25(_aMem, uintptr(_486_i)), int64(1))
}
_1939:
goto _250
_224:
func() {
- if (_pOp.X3) <= i32(0) || (_pOp.X3) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84616), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(63149)))
+ if _pOp.Xp1 <= int32(0) || _pOp.Xp1 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84616), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61291)))
crt.X__builtin_abort(tls)
}
}()
- _493_pMem = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _493_pMem = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if (int32(_493_pMem.X1) & i32(-8194)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84618), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71231)))
+ if (int32(_493_pMem.Xflags) & int32(-8194)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84618), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69393)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3VdbeMemFinalize(tls, _493_pMem, (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))))
+ _rc = _sqlite3VdbeMemFinalize(tls, _493_pMem, (*XFuncDef)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))))
if _rc != 0 {
- _sqlite3VdbeError(tls, _p, str(24576), unsafe.Pointer(Xsqlite3_value_text(tls, _493_pMem)))
+ _sqlite3VdbeError(tls, _p, str(24531), unsafe.Pointer(Xsqlite3_value_text(tls, _493_pMem)))
goto _abort_due_to_error
}
_sqlite3VdbeChangeEncoding(tls, _493_pMem, int32(_encoding))
@@ -53540,111 +53296,111 @@ _224:
goto _250
_225:
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84649), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84649), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_496_aRes)) + 4*uintptr(i32(0)))) = i32(0)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_496_aRes)) + 4*uintptr(i32(1)))) = store1((*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_496_aRes))+4*uintptr(i32(2)))), i32(-1))
+ *elem8((*int32)(unsafe.Pointer(&_496_aRes)), 0) = int32(0)
+ *elem8((*int32)(unsafe.Pointer(&_496_aRes)), uintptr(1)) = store2(elem8((*int32)(unsafe.Pointer(&_496_aRes)), uintptr(2)), int32(-1))
func() {
- if (_pOp.X4) != i32(0) && (_pOp.X4) != i32(1) && (_pOp.X4) != i32(2) && (_pOp.X4) != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84652), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71270)))
+ if _pOp.Xp2 != int32(0) && _pOp.Xp2 != int32(1) && _pOp.Xp2 != int32(2) && _pOp.Xp2 != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84652), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69432)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3Checkpoint(tls, _db, _pOp.X3, _pOp.X4, (*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_496_aRes))+4*uintptr(i32(1)))), (*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_496_aRes))+4*uintptr(i32(2)))))
+ _rc = _sqlite3Checkpoint(tls, _db, _pOp.Xp1, _pOp.Xp2, elem8((*int32)(unsafe.Pointer(&_496_aRes)), uintptr(1)), elem8((*int32)(unsafe.Pointer(&_496_aRes)), uintptr(2)))
if _rc == 0 {
goto _1957
}
- if _rc != i32(5) {
+ if _rc != int32(5) {
goto _abort_due_to_error
}
- _rc = i32(0)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_496_aRes)) + 4*uintptr(i32(0)))) = i32(1)
+ _rc = int32(0)
+ *elem8((*int32)(unsafe.Pointer(&_496_aRes)), 0) = int32(1)
_1957:
- *func() **XMem { _496_i = i32(0); return &_496_pMem }() = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ *func() **XMem { _496_i = int32(0); return &_496_pMem }() = elem25(_aMem, uintptr(_pOp.Xp3))
_1959:
- if _496_i >= i32(3) {
+ if _496_i >= int32(3) {
goto _1962
}
- _sqlite3VdbeMemSetInt64(tls, _496_pMem, int64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_496_aRes)) + 4*uintptr(_496_i)))))
+ _sqlite3VdbeMemSetInt64(tls, _496_pMem, int64(*elem8((*int32)(unsafe.Pointer(&_496_aRes)), uintptr(_496_i))))
*(*uintptr)(unsafe.Pointer(func() **XMem { _496_i += 1; return &_496_pMem }())) += uintptr(48)
goto _1959
_1962:
goto _250
_226:
_pOut = _out2Prerelease(tls, _p, _pOp)
- _499_eNew = _pOp.X5
+ _499_eNew = _pOp.Xp3
func() {
- if _499_eNew != i32(0) && _499_eNew != i32(3) && _499_eNew != i32(1) && _499_eNew != i32(2) && _499_eNew != i32(4) && _499_eNew != i32(5) && _499_eNew != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84693), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71417)))
+ if _499_eNew != int32(0) && _499_eNew != int32(3) && _499_eNew != int32(1) && _499_eNew != int32(2) && _499_eNew != int32(4) && _499_eNew != int32(5) && _499_eNew != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84693), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69579)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84701), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66998)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84701), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65140)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84702), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84702), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
- _499_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_pOp.X3))).X1)
+ _499_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp1)).XpBt)
_499_pPager = _sqlite3BtreePager(tls, _499_pBt)
_499_eOld = _sqlite3PagerGetJournalMode(tls, _499_pPager)
- if _499_eNew == i32(-1) {
+ if _499_eNew == int32(-1) {
_499_eNew = _499_eOld
}
if _sqlite3PagerOkToChangeJournalMode(tls, _499_pPager) == 0 {
_499_eNew = _499_eOld
}
- _499_zFilename = _sqlite3PagerFilename(tls, _499_pPager, i32(1))
- if (_499_eNew == i32(5)) && ((_sqlite3Strlen30(tls, _499_zFilename) == i32(0)) || (_sqlite3PagerWalSupported(tls, _499_pPager) == 0)) {
+ _499_zFilename = _sqlite3PagerFilename(tls, _499_pPager, int32(1))
+ if (_499_eNew == int32(5)) && ((_sqlite3Strlen30(tls, _499_zFilename) == int32(0)) || (_sqlite3PagerWalSupported(tls, _499_pPager) == 0)) {
_499_eNew = _499_eOld
}
- if _499_eNew == _499_eOld || _499_eOld != i32(5) && _499_eNew != i32(5) {
+ if _499_eNew == _499_eOld || _499_eOld != int32(5) && _499_eNew != int32(5) {
goto _1983
}
- if ((_db.X15) == 0) || ((_db.X35) > i32(1)) {
- _rc = i32(1)
- _sqlite3VdbeError(tls, _p, str(71648), unsafe.Pointer(func() *int8 {
- if _499_eNew == i32(5) {
- return str(71700)
+ if (_db.XautoCommit == 0) || (_db.XnVdbeRead > int32(1)) {
+ _rc = int32(1)
+ _sqlite3VdbeError(tls, _p, str(69810), unsafe.Pointer(func() *int8 {
+ if _499_eNew == int32(5) {
+ return str(69862)
}
- return str(71705)
+ return str(69867)
}()))
goto _abort_due_to_error
}
- if _499_eOld != i32(5) {
+ if _499_eOld != int32(5) {
goto _1989
}
_rc = _sqlite3PagerCloseWal(tls, _499_pPager, _db)
- if _rc == i32(0) {
+ if _rc == int32(0) {
_sqlite3PagerSetJournalMode(tls, _499_pPager, _499_eNew)
}
goto _1992
_1989:
- if _499_eOld == i32(4) {
- _sqlite3PagerSetJournalMode(tls, _499_pPager, i32(2))
+ if _499_eOld == int32(4) {
+ _sqlite3PagerSetJournalMode(tls, _499_pPager, int32(2))
}
_1992:
func() {
- if _sqlite3BtreeIsInTrans(tls, _499_pBt) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84754), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71712)))
+ if _sqlite3BtreeIsInTrans(tls, _499_pBt) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84754), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69874)))
crt.X__builtin_abort(tls)
}
}()
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _sqlite3BtreeSetVersion(tls, _499_pBt, func() int32 {
- if _499_eNew == i32(5) {
- return i32(2)
+ if _499_eNew == int32(5) {
+ return int32(2)
}
- return i32(1)
+ return int32(1)
}())
}
_1983:
@@ -53652,10 +53408,10 @@ _1983:
_499_eNew = _499_eOld
}
_499_eNew = _sqlite3PagerSetJournalMode(tls, _499_pPager, _499_eNew)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(2562))
- *(**int8)(unsafe.Pointer(&(_pOut.X5))) = _sqlite3JournalModename(tls, _499_eNew)
- *(*int32)(unsafe.Pointer(&(_pOut.X4))) = _sqlite3Strlen30(tls, _pOut.X5)
- *(*uint8)(unsafe.Pointer(&(_pOut.X2))) = uint8(i32(1))
+ _pOut.Xflags = uint16(2562)
+ _pOut.Xz = _sqlite3JournalModename(tls, _499_eNew)
+ _pOut.Xn = _sqlite3Strlen30(tls, _pOut.Xz)
+ _pOut.Xenc = uint8(1)
_sqlite3VdbeChangeEncoding(tls, _pOut, int32(_encoding))
if _rc != 0 {
goto _abort_due_to_error
@@ -53663,132 +53419,132 @@ _1983:
goto _250
_227:
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84782), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84782), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3RunVacuum(tls, (**int8)(unsafe.Pointer(&(_p.X22))), _db, _pOp.X3)
+ _rc = _sqlite3RunVacuum(tls, &_p.XzErrMsg, _db, _pOp.Xp1)
if _rc != 0 {
goto _abort_due_to_error
}
goto _250
_228:
func() {
- if (_pOp.X3) < i32(0) || (_pOp.X3) >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84799), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66998)))
+ if _pOp.Xp1 < int32(0) || _pOp.Xp1 >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84799), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65140)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X33) & (u32(1) << uint(_pOp.X3))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84800), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67028)))
+ if (_p.XbtreeMask & (uint32(1) << uint(_pOp.Xp1))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84800), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65170)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84801), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84801), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
- _509_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_pOp.X3))).X1)
+ _509_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp1)).XpBt)
_rc = _sqlite3BtreeIncrVacuum(tls, _509_pBt)
if _rc == 0 {
goto _2010
}
- if _rc != i32(101) {
+ if _rc != int32(101) {
goto _abort_due_to_error
}
- _rc = i32(0)
+ _rc = int32(0)
goto _jump_to_p2
_2010:
goto _250
_229:
- if (_pOp.X3) == 0 {
+ if _pOp.Xp1 == 0 {
_sqlite3ExpirePreparedStatements(tls, _db)
goto _2013
}
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 1, 0)
+ storebits26(&_p.Xexpired, int16(1), 1, 0)
_2013:
goto _250
_230:
- _514_isWriteLock = uint8(_pOp.X5)
- if _514_isWriteLock == 0 && i32(0) != ((_db.X6)&i32(16384)) {
+ _514_isWriteLock = uint8(_pOp.Xp3)
+ if _514_isWriteLock == 0 && int32(0) != (_db.Xflags&int32(16384)) {
goto _2015
}
- _515_p1 = _pOp.X3
+ _515_p1 = _pOp.Xp1
func() {
- if _515_p1 < i32(0) || _515_p1 >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84853), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71742)))
+ if _515_p1 < int32(0) || _515_p1 >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84853), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69904)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X33) & (u32(1) << uint(_515_p1))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84854), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71762)))
+ if (_p.XbtreeMask & (uint32(1) << uint(_515_p1))) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84854), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69924)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_514_isWriteLock) != i32(0) && int32(_514_isWriteLock) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84855), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71791)))
+ if int32(_514_isWriteLock) != int32(0) && int32(_514_isWriteLock) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84855), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(69953)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeLockTable(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_515_p1))).X1), _pOp.X4, _514_isWriteLock)
+ _rc = _sqlite3BtreeLockTable(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_515_p1)).XpBt), _pOp.Xp2, _514_isWriteLock)
if _rc == 0 {
goto _2024
}
- if (_rc & i32(255)) == i32(6) {
- _517_z = *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))
- _sqlite3VdbeError(tls, _p, str(71824), unsafe.Pointer(_517_z))
+ if (_rc & int32(255)) == int32(6) {
+ _517_z = *(**int8)(unsafe.Pointer(&_pOp.Xp4))
+ _sqlite3VdbeError(tls, _p, str(69986), unsafe.Pointer(_517_z))
}
goto _abort_due_to_error
_2024:
_2015:
goto _250
_231:
- _518_pVTab = (*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ _518_pVTab = (*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
_rc = _sqlite3VtabBegin(tls, _db, _518_pVTab)
if _518_pVTab != nil {
- _sqlite3VtabImportErrmsg(tls, _p, (*Xsqlite3_vtab)(_518_pVTab.X2))
+ _sqlite3VtabImportErrmsg(tls, _p, (*Xsqlite3_vtab)(_518_pVTab.XpVtab))
}
if _rc != 0 {
goto _abort_due_to_error
}
goto _250
_232:
- crt.Xmemset(tls, (unsafe.Pointer)(&_519_sMem), i32(0), u32(48))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_519_sMem.X9))))) = _db
+ crt.Xmemset(tls, unsafe.Pointer(&_519_sMem), int32(0), uint32(48))
+ *(**Xsqlite3)(unsafe.Pointer(&_519_sMem.Xdb)) = _db
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X4))).X1) & i32(2)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84903), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71853)))
+ if (int32(elem25(_aMem, uintptr(_pOp.Xp2)).Xflags) & int32(2)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84903), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70015)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X4))).X1) & i32(2048)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84904), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71888)))
+ if (int32(elem25(_aMem, uintptr(_pOp.Xp2)).Xflags) & int32(2048)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84904), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70050)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3VdbeMemCopy(tls, &_519_sMem, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOp.X4))))
+ _rc = _sqlite3VdbeMemCopy(tls, &_519_sMem, elem25(_aMem, uintptr(_pOp.Xp2)))
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84906), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84906), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
_519_zTab = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, &_519_sMem)))
func() {
- if _519_zTab == nil && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84908), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71926)))
+ if _519_zTab == nil && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84908), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70088)))
crt.X__builtin_abort(tls)
}
}()
if _519_zTab != nil {
- _rc = _sqlite3VtabCallCreate(tls, _db, _pOp.X3, _519_zTab, (**int8)(unsafe.Pointer(&(_p.X22))))
+ _rc = _sqlite3VtabCallCreate(tls, _db, _pOp.Xp1, _519_zTab, &_p.XzErrMsg)
}
_sqlite3VdbeMemRelease(tls, &_519_sMem)
if _rc != 0 {
@@ -53796,162 +53552,165 @@ _232:
}
goto _250
_233:
- *(*int32)(unsafe.Pointer(&(_db.X38))) += 1
- _rc = _sqlite3VtabCallDestroy(tls, _db, _pOp.X3, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- *(*int32)(unsafe.Pointer(&(_db.X38))) -= 1
+ _db.XnVDestroy += 1
+ _rc = _sqlite3VtabCallDestroy(tls, _db, _pOp.Xp1, *(**int8)(unsafe.Pointer(&_pOp.Xp4)))
+ _db.XnVDestroy -= 1
if _rc != 0 {
goto _abort_due_to_error
}
goto _250
_234:
func() {
- if ((uint32((_p.X32)>>uint(i32(8))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84946), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(66440)))
+ if ((uint32(_p.Xexpired>>8) << 31) >> 31) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84946), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(64582)))
crt.X__builtin_abort(tls)
}
}()
_522_pCur = nil
_522_pVCur = nil
- _522_pVtab = (*Xsqlite3_vtab)((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))).X2)
+ _522_pVtab = (*Xsqlite3_vtab)((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))).XpVtab)
if (_522_pVtab == nil) || func() int32 {
- if (*Xsqlite3_module)(_522_pVtab.X0) == nil {
+ if (*Xsqlite3_module)(_522_pVtab.XpModule) == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84950), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84950), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- _rc = i32(6)
+ _rc = int32(6)
goto _abort_due_to_error
}
- _522_pModule = (*Xsqlite3_module)(_522_pVtab.X0)
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vtab, **Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32
- }{(_522_pModule.X6)})))(tls, _522_pVtab, &_522_pVCur)
+ _522_pModule = (*Xsqlite3_module)(_522_pVtab.XpModule)
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab, **Xsqlite3_vtab_cursor) int32 {
+ v := _522_pModule.XxOpen
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, **Xsqlite3_vtab_cursor) int32)(unsafe.Pointer(&v))
+ }()(tls, _522_pVtab, &_522_pVCur)
_sqlite3VtabImportErrmsg(tls, _p, _522_pVtab)
if _rc != 0 {
goto _abort_due_to_error
}
- *(**Xsqlite3_vtab)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_522_pVCur.X0))))) = _522_pVtab
- _522_pCur = _allocateCursor(tls, _p, _pOp.X3, i32(0), i32(-1), uint8(i32(2)))
+ *(**Xsqlite3_vtab)(unsafe.Pointer(&_522_pVCur.XpVtab)) = _522_pVtab
+ _522_pCur = _allocateCursor(tls, _p, _pOp.Xp1, int32(0), int32(-1), uint8(2))
if _522_pCur != nil {
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_522_pCur.X14))))))) = _522_pVCur
- *(*int32)(unsafe.Pointer(&(_522_pVtab.X1))) += 1
+ *(**Xsqlite3_vtab_cursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_522_pCur.Xuc)))) = _522_pVCur
+ _522_pVtab.XnRef += 1
goto _2048
}
func() {
- if (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(84968), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(47848)))
+ if _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(84968), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(47803)))
crt.X__builtin_abort(tls)
}
}()
- (*(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_522_pModule.X7)})))(tls, _522_pVCur)
+ func() func(*crt.TLS, *Xsqlite3_vtab_cursor) int32 {
+ v := _522_pModule.XxClose
+ return *(*func(*crt.TLS, *Xsqlite3_vtab_cursor) int32)(unsafe.Pointer(&v))
+ }()(tls, _522_pVCur)
goto _no_mem
_2048:
goto _250
_235:
- _526_pQuery = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- _526_pArgc = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_526_pQuery)) + 48*uintptr(i32(1))))
- _526_pCur = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _526_pQuery = elem25(_aMem, uintptr(_pOp.Xp3))
+ _526_pArgc = elem25(_526_pQuery, uintptr(1))
+ _526_pCur = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
- if (int32(_526_pQuery.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85012), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71951)))
+ if (int32(_526_pQuery.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85012), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70113)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X5, _526_pQuery)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp3, _526_pQuery)
}
func() {
- if int32(_526_pCur.X0) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85014), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71970)))
+ if int32(_526_pCur.XeCurType) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85014), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70132)))
crt.X__builtin_abort(tls)
}
}()
- _526_pVCur = (*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_526_pCur.X14))))))
- _526_pVtab = (*Xsqlite3_vtab)(_526_pVCur.X0)
- _526_pModule = (*Xsqlite3_module)(_526_pVtab.X0)
+ _526_pVCur = (*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_526_pCur.Xuc)))
+ _526_pVtab = (*Xsqlite3_vtab)(_526_pVCur.XpVtab)
+ _526_pModule = (*Xsqlite3_module)(_526_pVtab.XpModule)
func() {
- if (int32(_526_pQuery.X1)&i32(4)) == i32(0) || int32(_526_pArgc.X1) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85020), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71999)))
+ if (int32(_526_pQuery.Xflags)&int32(4)) == int32(0) || int32(_526_pArgc.Xflags) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85020), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70161)))
crt.X__builtin_abort(tls)
}
}()
- _526_nArg = int32(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_526_pArgc.X0))))))
- _526_iQuery = int32(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_526_pQuery.X0))))))
- _526_res = i32(0)
- _526_apArg = (**XMem)(unsafe.Pointer(_p.X19))
- _526_i = i32(0)
+ _526_nArg = int32(*(*int64)(unsafe.Pointer(&_526_pArgc.Xu)))
+ _526_iQuery = int32(*(*int64)(unsafe.Pointer(&_526_pQuery.Xu)))
+ _526_res = int32(0)
+ _526_apArg = (**XMem)(unsafe.Pointer(_p.XapArg))
+ _526_i = int32(0)
_2059:
if _526_i >= _526_nArg {
goto _2062
}
- *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_526_apArg)) + 4*uintptr(_526_i))) = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_526_pArgc)) + 48*uintptr(_526_i+i32(1))))
+ *elem19(_526_apArg, uintptr(_526_i)) = elem25(_526_pArgc, uintptr(_526_i+int32(1)))
_526_i += 1
goto _2059
_2062:
- _rc = (*(*func(*crt.TLS, *Xsqlite3_file, int32, *int8, int32, **XMem) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8, int32, *unsafe.Pointer) int32
- }{(_526_pModule.X8)})))(tls, _526_pVCur, _526_iQuery, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))), _526_nArg, _526_apArg)
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab_cursor, int32, *int8, int32, **XMem) int32 {
+ v := _526_pModule.XxFilter
+ return *(*func(*crt.TLS, *Xsqlite3_vtab_cursor, int32, *int8, int32, **XMem) int32)(unsafe.Pointer(&v))
+ }()(tls, _526_pVCur, _526_iQuery, *(**int8)(unsafe.Pointer(&_pOp.Xp4)), _526_nArg, _526_apArg)
_sqlite3VtabImportErrmsg(tls, _p, _526_pVtab)
if _rc != 0 {
goto _abort_due_to_error
}
- _526_res = (*(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_526_pModule.X10)})))(tls, _526_pVCur)
- *(*uint8)(unsafe.Pointer(&(_526_pCur.X2))) = uint8(i32(0))
+ _526_res = func() func(*crt.TLS, *Xsqlite3_vtab_cursor) int32 {
+ v := _526_pModule.XxEof
+ return *(*func(*crt.TLS, *Xsqlite3_vtab_cursor) int32)(unsafe.Pointer(&v))
+ }()(tls, _526_pVCur)
+ _526_pCur.XnullRow = 0
if _526_res != 0 {
goto _jump_to_p2
}
goto _250
_236:
- _528_pCur = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _528_pCur = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
- if int32(_528_pCur.X0) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85056), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71970)))
+ if int32(_528_pCur.XeCurType) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85056), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70132)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X5) <= i32(0) || (_pOp.X5) > (((_p.X6)+i32(1))-(_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85057), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(64441)))
+ if _pOp.Xp3 <= int32(0) || _pOp.Xp3 > ((_p.XnMem+int32(1))-_p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85057), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(62583)))
crt.X__builtin_abort(tls)
}
}()
- _528_pDest = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
+ _528_pDest = elem25(_aMem, uintptr(_pOp.Xp3))
_sqlite3VdbeMemAboutToChange(tls, _p, _528_pDest)
- if (_528_pCur.X2) != 0 {
+ if _528_pCur.XnullRow != 0 {
_sqlite3VdbeMemSetNull(tls, _528_pDest)
goto _250
}
- _528_pVtab = (*Xsqlite3_vtab)((*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_528_pCur.X14)))))).X0)
- _528_pModule = (*Xsqlite3_module)(_528_pVtab.X0)
+ _528_pVtab = (*Xsqlite3_vtab)((*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_528_pCur.Xuc))).XpVtab)
+ _528_pModule = (*Xsqlite3_module)(_528_pVtab.XpModule)
func() {
- if (*(*func(*crt.TLS, *Xsqlite3_file, *Xsqlite3_context, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) int32
- }{(_528_pModule.X11)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85066), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72051)))
+ if _528_pModule.XxColumn == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85066), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70213)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, (unsafe.Pointer)(&_528_sContext), i32(0), u32(32))
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_528_sContext.X0))))) = _528_pDest
- *(*uint16)(unsafe.Pointer(&(_528_pDest.X1))) = uint16((int32(_528_pDest.X1) & i32(-49664)) | i32(1))
- _rc = (*(*func(*crt.TLS, *Xsqlite3_file, *Xsqlite3_context, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) int32
- }{(_528_pModule.X11)})))(tls, (*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_528_pCur.X14)))))), &_528_sContext, _pOp.X4)
+ crt.Xmemset(tls, unsafe.Pointer(&_528_sContext), int32(0), uint32(32))
+ *(**XMem)(unsafe.Pointer(&_528_sContext.XpOut)) = _528_pDest
+ _528_pDest.Xflags = uint16((int32(_528_pDest.Xflags) & int32(-49664)) | int32(1))
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab_cursor, *Xsqlite3_context, int32) int32 {
+ v := _528_pModule.XxColumn
+ return *(*func(*crt.TLS, *Xsqlite3_vtab_cursor, *Xsqlite3_context, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, (*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_528_pCur.Xuc))), &_528_sContext, _pOp.Xp2)
_sqlite3VtabImportErrmsg(tls, _p, _528_pVtab)
- if (_528_sContext.X5) != 0 {
- _rc = _528_sContext.X5
+ if _528_sContext.XisError != 0 {
+ _rc = _528_sContext.XisError
}
_sqlite3VdbeChangeEncoding(tls, _528_pDest, int32(_encoding))
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X5, _528_pDest)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp3, _528_pDest)
}
if _sqlite3VdbeMemTooBig(tls, _528_pDest) != 0 {
goto _too_big
@@ -53961,187 +53720,185 @@ _236:
}
goto _250
_237:
- _532_res = i32(0)
- _532_pCur = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_pOp.X3)))
+ _532_res = int32(0)
+ _532_pCur = *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_pOp.Xp1))
func() {
- if int32(_532_pCur.X0) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85102), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(71970)))
+ if int32(_532_pCur.XeCurType) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85102), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70132)))
crt.X__builtin_abort(tls)
}
}()
- if (_532_pCur.X2) != 0 {
+ if _532_pCur.XnullRow != 0 {
goto _250
}
- _532_pVtab = (*Xsqlite3_vtab)((*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_532_pCur.X14)))))).X0)
- _532_pModule = (*Xsqlite3_module)(_532_pVtab.X0)
+ _532_pVtab = (*Xsqlite3_vtab)((*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_532_pCur.Xuc))).XpVtab)
+ _532_pModule = (*Xsqlite3_module)(_532_pVtab.XpModule)
func() {
- if (*(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_532_pModule.X9)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85108), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72068)))
+ if _532_pModule.XxNext == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85108), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70230)))
crt.X__builtin_abort(tls)
}
}()
- _rc = (*(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_532_pModule.X9)})))(tls, (*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_532_pCur.X14)))))))
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab_cursor) int32 {
+ v := _532_pModule.XxNext
+ return *(*func(*crt.TLS, *Xsqlite3_vtab_cursor) int32)(unsafe.Pointer(&v))
+ }()(tls, (*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_532_pCur.Xuc))))
_sqlite3VtabImportErrmsg(tls, _p, _532_pVtab)
if _rc != 0 {
goto _abort_due_to_error
}
- _532_res = (*(*func(*crt.TLS, *Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_532_pModule.X10)})))(tls, (*Xsqlite3_file)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_532_pCur.X14)))))))
+ _532_res = func() func(*crt.TLS, *Xsqlite3_vtab_cursor) int32 {
+ v := _532_pModule.XxEof
+ return *(*func(*crt.TLS, *Xsqlite3_vtab_cursor) int32)(unsafe.Pointer(&v))
+ }()(tls, (*Xsqlite3_vtab_cursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_532_pCur.Xuc))))
if _532_res == 0 {
goto _jump_to_p2_and_check_for_interrupt
}
goto _check_for_interrupt
_238:
- _535_pVtab = (*Xsqlite3_vtab)((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))).X2)
- _535_pName = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X3)))
+ _535_pVtab = (*Xsqlite3_vtab)((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))).XpVtab)
+ _535_pName = elem25(_aMem, uintptr(_pOp.Xp1))
func() {
- if (*(*func(*crt.TLS, *Xsqlite3_vtab, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8) int32
- }{((*Xsqlite3_module)(_535_pVtab.X0).X19)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85142), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72083)))
+ if ((*Xsqlite3_module)(_535_pVtab.XpModule).XxRename) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85142), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70245)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_535_pName.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85143), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72107)))
+ if (int32(_535_pName.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85143), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70269)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85144), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85144), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) != 0 {
- _registerTrace(tls, _pOp.X3, _535_pName)
+ if (_db.Xflags & int32(1)) != 0 {
+ _registerTrace(tls, _pOp.Xp1, _535_pName)
}
func() {
- if (int32(_535_pName.X1) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85146), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72125)))
+ if (int32(_535_pName.Xflags) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85146), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70287)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3VdbeChangeEncoding(tls, _535_pName, i32(1))
+ _rc = _sqlite3VdbeChangeEncoding(tls, _535_pName, int32(1))
if _rc != 0 {
goto _abort_due_to_error
}
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vtab, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8) int32
- }{((*Xsqlite3_module)(_535_pVtab.X0).X19)})))(tls, _535_pVtab, _535_pName.X5)
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab, *int8) int32 {
+ v := (*Xsqlite3_module)(_535_pVtab.XpModule).XxRename
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, _535_pVtab, _535_pName.Xz)
_sqlite3VtabImportErrmsg(tls, _p, _535_pVtab)
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(0)), 1, 0)
+ storebits26(&_p.Xexpired, 0, 1, 0)
if _rc != 0 {
goto _abort_due_to_error
}
goto _250
_239:
func() {
- if (_pOp.X4) != i32(1) && int32(_pOp.X2) != i32(3) && int32(_pOp.X2) != i32(1) && int32(_pOp.X2) != i32(2) && int32(_pOp.X2) != i32(4) && int32(_pOp.X2) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85197), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72148)))
+ if _pOp.Xp2 != int32(1) && int32(_pOp.Xp5) != int32(3) && int32(_pOp.Xp5) != int32(1) && int32(_pOp.Xp5) != int32(2) && int32(_pOp.Xp5) != int32(4) && int32(_pOp.Xp5) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85197), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70310)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32((_p.X32)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85200), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(67250)))
+ if int32((uint32(_p.Xexpired>>7)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85200), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(65412)))
crt.X__builtin_abort(tls)
}
}()
- _536_pVtab = (*Xsqlite3_vtab)((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))).X2)
+ _536_pVtab = (*Xsqlite3_vtab)((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))).XpVtab)
if (_536_pVtab == nil) || func() int32 {
- if (*Xsqlite3_module)(_536_pVtab.X0) == nil {
+ if (*Xsqlite3_module)(_536_pVtab.XpModule) == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85202), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85202), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- _rc = i32(6)
+ _rc = int32(6)
goto _abort_due_to_error
}
- _536_pModule = (*Xsqlite3_module)(_536_pVtab.X0)
- _536_nArg = _pOp.X4
+ _536_pModule = (*Xsqlite3_module)(_536_pVtab.XpModule)
+ _536_nArg = _pOp.Xp2
func() {
- if int32(_pOp.X1) != i32(-8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85208), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72269)))
+ if int32(_pOp.Xp4type) != int32(-8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85208), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70431)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
- if (*(*func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer, *int64) int32
- }{(_536_pModule.X13)}))) != nil {
- return i32(1)
+ if _536_pModule.XxUpdate != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85209), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85209), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _2112
}
- _538_vtabOnConflict = _db.X22
- _536_apArg = (**XMem)(unsafe.Pointer(_p.X19))
- _536_pX = (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem)) + 48*uintptr(_pOp.X5)))
- _536_i = i32(0)
+ _538_vtabOnConflict = _db.XvtabOnConflict
+ _536_apArg = (**XMem)(unsafe.Pointer(_p.XapArg))
+ _536_pX = elem25(_aMem, uintptr(_pOp.Xp3))
+ _536_i = int32(0)
_2113:
if _536_i >= _536_nArg {
goto _2116
}
func() {
- if (int32(_536_pX.X1) & i32(128)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85214), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72290)))
+ if (int32(_536_pX.Xflags) & int32(128)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85214), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70452)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeMemAboutToChange(tls, _p, _536_pX)
- *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_536_apArg)) + 4*uintptr(_536_i))) = _536_pX
+ *elem19(_536_apArg, uintptr(_536_i)) = _536_pX
*(*uintptr)(unsafe.Pointer(&_536_pX)) += uintptr(48)
_536_i += 1
goto _2113
_2116:
- *(*uint8)(unsafe.Pointer(&(_db.X22))) = uint8(_pOp.X2)
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer, *int64) int32
- }{(_536_pModule.X13)})))(tls, _536_pVtab, _536_nArg, _536_apArg, &_536_rowid)
- *(*uint8)(unsafe.Pointer(&(_db.X22))) = _538_vtabOnConflict
+ _db.XvtabOnConflict = uint8(_pOp.Xp5)
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32 {
+ v := _536_pModule.XxUpdate
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _536_pVtab, _536_nArg, _536_apArg, &_536_rowid)
+ _db.XvtabOnConflict = _538_vtabOnConflict
_sqlite3VtabImportErrmsg(tls, _p, _536_pVtab)
- if (_rc == i32(0)) && (_pOp.X3) != 0 {
+ if (_rc == int32(0)) && _pOp.Xp1 != 0 {
func() {
- if _536_nArg <= i32(1) || (*(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_536_apArg)) + 4*uintptr(i32(0))))) == nil || (int32((*(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_536_apArg)) + 4*uintptr(i32(0))))).X1)&i32(1)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85224), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72305)))
+ if _536_nArg <= int32(1) || (*elem19(_536_apArg, 0)) == nil || (int32((*elem19(_536_apArg, 0)).Xflags)&int32(1)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85224), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70467)))
crt.X__builtin_abort(tls)
}
}()
- *(*int64)(unsafe.Pointer(&(_db.X7))) = _536_rowid
+ _db.XlastRowid = _536_rowid
}
- if (_rc&i32(255)) != i32(19) || ((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))).X4) == 0 {
+ if (_rc&int32(255)) != int32(19) || ((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4))).XbConstraint) == 0 {
goto _2126
}
- if int32(_pOp.X2) == i32(4) {
- _rc = i32(0)
+ if int32(_pOp.Xp5) == int32(4) {
+ _rc = int32(0)
goto _2128
}
- *(*uint8)(unsafe.Pointer(&(_p.X30))) = uint8(func() int32 {
- if int32(_pOp.X2) == i32(5) {
- return i32(2)
+ _p.XerrorAction = uint8(func() int32 {
+ if int32(_pOp.Xp5) == int32(5) {
+ return int32(2)
}
- return int32(_pOp.X2)
+ return int32(_pOp.Xp5)
}())
_2128:
goto _2131
_2126:
- *(*int32)(unsafe.Pointer(&(_p.X11))) += 1
+ _p.XnChange += 1
_2131:
if _rc != 0 {
goto _abort_due_to_error
@@ -54150,595 +53907,572 @@ _2112:
goto _250
_240:
_pOut = _out2Prerelease(tls, _p, _pOp)
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(_sqlite3BtreeLastPage(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_pOp.X3))).X1)))
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(_sqlite3BtreeLastPage(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp1)).XpBt)))
goto _250
_241:
_pOut = _out2Prerelease(tls, _p, _pOp)
- _546_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_pOp.X3))).X1)
- _546_newMax = uint32(i32(0))
- if (_pOp.X5) == 0 {
+ _546_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_pOp.Xp1)).XpBt)
+ _546_newMax = 0
+ if _pOp.Xp3 == 0 {
goto _2133
}
_546_newMax = _sqlite3BtreeLastPage(tls, _546_pBt)
- if _546_newMax < uint32(_pOp.X5) {
- _546_newMax = uint32(_pOp.X5)
+ if _546_newMax < uint32(_pOp.Xp3) {
+ _546_newMax = uint32(_pOp.Xp3)
}
_2133:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pOut.X0))))) = int64(_sqlite3BtreeMaxPageCount(tls, _546_pBt, int32(_546_newMax)))
+ *(*int64)(unsafe.Pointer(&_pOut.Xu)) = int64(_sqlite3BtreeMaxPageCount(tls, _546_pBt, int32(_546_newMax)))
goto _250
_242:
func() {
- if (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) != nil && crt.Xstrncmp(tls, *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))), str(72354), uint32(i32(3))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85309), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72358)))
+ if (*(**int8)(unsafe.Pointer(&_pOp.Xp4))) != nil && crt.Xstrncmp(tls, *(**int8)(unsafe.Pointer(&_pOp.Xp4)), str(70516), uint32(3)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85309), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70520)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pOp != (*XVdbeOp)(_p.X17) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85310), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72409)))
+ if _pOp != (*XVdbeOp)(_p.XaOp) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85310), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70571)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_db.X24)&i32(129)) == i32(0) || ((uint32((_p.X32)>>uint(i32(1)))<<uint(i32(31)))>>uint(i32(31))) != 0 || store0(&_548_zTrace, func() *int8 {
- if (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) != nil {
- return (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ if (int32(_db.XmTrace)&int32(129)) == int32(0) || ((uint32(_p.Xexpired>>1)<<31)>>31) != 0 || store1(&_548_zTrace, func() *int8 {
+ if (*(**int8)(unsafe.Pointer(&_pOp.Xp4))) != nil {
+ return (*(**int8)(unsafe.Pointer(&_pOp.Xp4)))
}
- return (_p.X36)
+ return _p.XzSql
}()) == nil {
goto _2144
}
- if (int32(_db.X24) & i32(128)) != 0 {
- _550_x = *(*func(*crt.TLS, unsafe.Pointer, *int8))(unsafe.Pointer(&struct {
- f func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32
- }{(_db.X41)}))
+ if (int32(_db.XmTrace) & int32(128)) != 0 {
+ _550_x = func() func(*crt.TLS, unsafe.Pointer, *int8) {
+ v := _db.XxTrace
+ return *(*func(*crt.TLS, unsafe.Pointer, *int8))(unsafe.Pointer(&v))
+ }()
_550_z = _sqlite3VdbeExpandSql(tls, _p, _548_zTrace)
- _550_x(tls, _db.X42, _550_z)
- Xsqlite3_free(tls, (unsafe.Pointer)(_550_z))
+ _550_x(tls, _db.XpTraceArg, _550_z)
+ Xsqlite3_free(tls, unsafe.Pointer(_550_z))
goto _2148
}
- if (_db.X37) > i32(1) {
- _551_z = _sqlite3MPrintf(tls, _db, str(72421), unsafe.Pointer(_548_zTrace))
- (_db.X41)(tls, uint32(i32(1)), _db.X42, (unsafe.Pointer)(_p), (unsafe.Pointer)(_551_z))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_551_z))
+ if _db.XnVdbeExec > int32(1) {
+ _551_z = _sqlite3MPrintf(tls, _db, str(70583), unsafe.Pointer(_548_zTrace))
+ _db.XxTrace(tls, uint32(1), _db.XpTraceArg, unsafe.Pointer(_p), unsafe.Pointer(_551_z))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_551_z))
goto _2148
}
- (_db.X41)(tls, uint32(i32(1)), _db.X42, (unsafe.Pointer)(_p), (unsafe.Pointer)(_548_zTrace))
+ _db.XxTrace(tls, uint32(1), _db.XpTraceArg, unsafe.Pointer(_p), unsafe.Pointer(_548_zTrace))
_2148:
_2144:
- if (((_db.X6) & i32(512)) != i32(0)) && (store0(&_548_zTrace, func() *int8 {
- if (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6)))))) != nil {
- return (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ if ((_db.Xflags & int32(512)) != int32(0)) && (store1(&_548_zTrace, func() *int8 {
+ if (*(**int8)(unsafe.Pointer(&_pOp.Xp4))) != nil {
+ return (*(**int8)(unsafe.Pointer(&_pOp.Xp4)))
}
- return (_p.X36)
+ return _p.XzSql
}()) != nil) {
- _sqlite3DebugPrintf(tls, str(72427), unsafe.Pointer(_548_zTrace))
+ _sqlite3DebugPrintf(tls, str(70589), unsafe.Pointer(_548_zTrace))
}
func() {
- if (_pOp.X4) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85351), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(62895)))
+ if _pOp.Xp2 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85351), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(61037)))
crt.X__builtin_abort(tls)
}
}()
- if (_pOp.X3) < (_sqlite3Config.X39) {
+ if _pOp.Xp1 < _sqlite3Config.XiOnceResetThreshold {
goto _2155
}
- _548_i = i32(1)
+ _548_i = int32(1)
_2156:
- if _548_i >= (_p.X27) {
+ if _548_i >= _p.XnOp {
goto _2159
}
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr(_548_i))).X0) == i32(20) {
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(_548_i))).X3))) = i32(0)
+ if int32(elem61((*XVdbeOp)(_p.XaOp), uintptr(_548_i)).Xopcode) == int32(20) {
+ elem61((*XVdbeOp)(_p.XaOp), uintptr(_548_i)).Xp1 = int32(0)
}
_548_i += 1
goto _2156
_2159:
- *(*int32)(unsafe.Pointer(&(_pOp.X3))) = i32(0)
+ _pOp.Xp1 = int32(0)
_2155:
- *(*int32)(unsafe.Pointer(&(_pOp.X3))) += 1
+ _pOp.Xp1 += 1
goto _jump_to_p2
_243:
func() {
- if int32(_pOp.X0) != i32(164) && int32(_pOp.X0) != i32(165) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85397), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72442)))
+ if int32(_pOp.Xopcode) != int32(164) && int32(_pOp.Xopcode) != int32(165) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85397), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70604)))
crt.X__builtin_abort(tls)
}
}()
goto _250
_250:
func() {
- if uintptr(unsafe.Pointer(_pOp)) < uintptr(unsafe.Pointer((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp))+24*uintptr(i32(-1)))))) || uintptr(unsafe.Pointer(_pOp)) >= uintptr(unsafe.Pointer((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp))+24*uintptr((_p.X27)-i32(1)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85423), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72490)))
+ if crt.P2U(unsafe.Pointer(_pOp)) < crt.P2U(unsafe.Pointer(elem61(_aOp, uintptr(4294967295)))) || crt.P2U(unsafe.Pointer(_pOp)) >= crt.P2U(unsafe.Pointer(elem61(_aOp, uintptr(_p.XnOp-int32(1))))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85423), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70652)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(1)) == 0 {
+ if (_db.Xflags & int32(1)) == 0 {
goto _2167
}
- _557_opProperty = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3OpcodeProperty)) + 1*uintptr(_pOrigOp.X0)))
- if _rc != i32(0) {
- crt.Xprintf(tls, str(72526), _rc)
+ _557_opProperty = *elem15((*uint8)(unsafe.Pointer(&_sqlite3OpcodeProperty)), uintptr(_pOrigOp.Xopcode))
+ if _rc != int32(0) {
+ crt.Xprintf(tls, str(70688), _rc)
}
- if (int32(_557_opProperty) & i32(16)) != 0 {
- _registerTrace(tls, _pOrigOp.X4, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOrigOp.X4))))
+ if (int32(_557_opProperty) & int32(16)) != 0 {
+ _registerTrace(tls, _pOrigOp.Xp2, elem25(_aMem, uintptr(_pOrigOp.Xp2)))
}
- if (int32(_557_opProperty) & i32(32)) != 0 {
- _registerTrace(tls, _pOrigOp.X5, (*XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aMem))+48*uintptr(_pOrigOp.X5))))
+ if (int32(_557_opProperty) & int32(32)) != 0 {
+ _registerTrace(tls, _pOrigOp.Xp3, elem25(_aMem, uintptr(_pOrigOp.Xp3)))
}
_2167:
*(*uintptr)(unsafe.Pointer(&_pOp)) += uintptr(24)
goto _30
_abort_due_to_error:
- if (_db.X17) != 0 {
- _rc = _sqlite3NomemError(tls, i32(85444))
+ if _db.XmallocFailed != 0 {
+ _rc = _sqlite3NomemError(tls, int32(85444))
}
func() {
if _rc == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85445), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72533)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85445), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70695)))
crt.X__builtin_abort(tls)
}
}()
- if ((_p.X22) == nil) && (_rc != i32(3082)) {
- _sqlite3VdbeError(tls, _p, str(24576), unsafe.Pointer(_sqlite3ErrStr(tls, _rc)))
+ if (_p.XzErrMsg == nil) && (_rc != int32(3082)) {
+ _sqlite3VdbeError(tls, _p, str(24531), unsafe.Pointer(_sqlite3ErrStr(tls, _rc)))
}
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _rc
+ _p.Xrc = _rc
_sqlite3SystemError(tls, _db, _rc)
- Xsqlite3_log(tls, _rc, str(72536), int32((uintptr(unsafe.Pointer(_pOp))-uintptr(unsafe.Pointer(_aOp)))/24), unsafe.Pointer(_p.X36), unsafe.Pointer(_p.X22))
+ Xsqlite3_log(tls, _rc, str(70698), int32((uintptr(unsafe.Pointer(_pOp))-uintptr(unsafe.Pointer(_aOp)))/24), unsafe.Pointer(_p.XzSql), unsafe.Pointer(_p.XzErrMsg))
_sqlite3VdbeHalt(tls, _p)
- if _rc == i32(3082) {
+ if _rc == int32(3082) {
_sqlite3OomFault(tls, _db)
}
- _rc = i32(1)
- if int32(_resetSchemaOnFault) > i32(0) {
- _sqlite3ResetOneSchema(tls, _db, int32(_resetSchemaOnFault)-i32(1))
+ _rc = int32(1)
+ if int32(_resetSchemaOnFault) > int32(0) {
+ _sqlite3ResetOneSchema(tls, _db, int32(_resetSchemaOnFault)-int32(1))
}
_vdbe_return:
- {
- p := (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_p.X35))))) + 4*uintptr(i32(4))))
- *p = (*p) + uint32(int32(_nVmStep))
- sink5(*p)
- }
+ *elem7((*uint32)(unsafe.Pointer(&_p.XaCounter)), uintptr(4)) += uint32(int32(_nVmStep))
_sqlite3VdbeLeave(tls, _p)
func() {
- if _rc == i32(0) && _nExtraDelete != i32(0) && Xsqlite3_strlike(tls, str(72568), _p.X36, uint32(i32(0))) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85468), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72576)))
+ if _rc == int32(0) && _nExtraDelete != int32(0) && Xsqlite3_strlike(tls, str(70730), _p.XzSql, 0) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85468), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70738)))
crt.X__builtin_abort(tls)
}
}()
return _rc
_too_big:
- _sqlite3VdbeError(tls, _p, str(6810))
- _rc = i32(18)
+ _sqlite3VdbeError(tls, _p, str(6711))
+ _rc = int32(18)
goto _abort_due_to_error
_no_mem:
_sqlite3OomFault(tls, _db)
- _sqlite3VdbeError(tls, _p, str(59419))
- _rc = _sqlite3NomemError(tls, i32(85486))
+ _sqlite3VdbeError(tls, _p, str(59395))
+ _rc = _sqlite3NomemError(tls, int32(85486))
goto _abort_due_to_error
_abort_due_to_interrupt:
func() {
- if (*(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57)))))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85493), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000))), unsafe.Pointer(str(72652)))
+ if (*(*int32)(unsafe.Pointer(&_db.Xu1))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85493), unsafe.Pointer(&_sqlite3VdbeExecØ00__func__Ø000), unsafe.Pointer(str(70814)))
crt.X__builtin_abort(tls)
}
}()
_rc = func() int32 {
- if (_db.X17) != 0 {
- return _sqlite3NomemError(tls, i32(85494))
+ if _db.XmallocFailed != 0 {
+ return _sqlite3NomemError(tls, int32(85494))
}
- return i32(9)
+ return int32(9)
}()
- *(*int32)(unsafe.Pointer(&(_p.X10))) = _rc
- _sqlite3VdbeError(tls, _p, str(24576), unsafe.Pointer(_sqlite3ErrStr(tls, _rc)))
+ _p.Xrc = _rc
+ _sqlite3VdbeError(tls, _p, str(24531), unsafe.Pointer(_sqlite3ErrStr(tls, _rc)))
goto _abort_due_to_error
_ = _94_uA
- _ = _179_sMem
- _ = _303_r
- _ = _324_r
_ = _340_cnt
- _ = _356_x
- _ = _403_x
- _ = _406_r
- _ = _414_r
- _ = _434_initData
- _ = _486_t
_ = _496_aRes
- _ = _519_sMem
- _ = _528_sContext
panic(0)
}
var _sqlite3VdbeExecØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeExecØ00__func__Ø000[0], str(72673), 16)
+ crt.Xstrncpy(nil, &_sqlite3VdbeExecØ00__func__Ø000[0], str(70835), 16)
}
-// Print the SQL that was used to generate a VDBE program.
+// C comment
+// /*
+// ** Print the SQL that was used to generate a VDBE program.
+// */
func _sqlite3VdbePrintSql(tls *crt.TLS, _p *TVdbe) {
var _z *int8
var _2_pOp *XVdbeOp
_z = nil
- if (_p.X36) != nil {
- _z = _p.X36
+ if _p.XzSql != nil {
+ _z = _p.XzSql
goto _2
}
- if (_p.X27) < i32(1) {
+ if _p.XnOp < int32(1) {
goto _2
}
- _2_pOp = (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(i32(0))))
- if int32(_2_pOp.X0) != i32(51) || (*(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_2_pOp.X6)))))) == nil {
+ _2_pOp = elem61((*XVdbeOp)(_p.XaOp), 0)
+ if int32(_2_pOp.Xopcode) != int32(51) || (*(**int8)(unsafe.Pointer(&_2_pOp.Xp4))) == nil {
goto _4
}
- _z = *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_2_pOp.X6)))))
+ _z = *(**int8)(unsafe.Pointer(&_2_pOp.Xp4))
_5:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_z))))) & i32(1)) != 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_z)))) & int32(1)) != 0 {
*(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
goto _5
}
_4:
_2:
if _z != nil {
- crt.Xprintf(tls, str(72689), unsafe.Pointer(_z))
+ crt.Xprintf(tls, str(70851), unsafe.Pointer(_z))
}
}
func _registerTrace(tls *crt.TLS, _iReg int32, _p *XMem) {
- crt.Xprintf(tls, str(72700), _iReg)
+ crt.Xprintf(tls, str(70862), _iReg)
_memTracePrint(tls, _p)
- crt.Xprintf(tls, str(37700))
+ crt.Xprintf(tls, str(37655))
_sqlite3VdbeCheckMemInvariants(tls, _p)
}
-// Print the value of a register for tracing purposes:
+// C comment
+// /*
+// ** Print the value of a register for tracing purposes:
+// */
func _memTracePrint(tls *crt.TLS, _p *XMem) {
var _7_zBuf [200]int8
- if (int32(_p.X1) & i32(128)) != 0 {
- crt.Xprintf(tls, str(72711))
+ if (int32(_p.Xflags) & int32(128)) != 0 {
+ crt.Xprintf(tls, str(70873))
goto _11
}
- if (int32(_p.X1) & i32(1)) != 0 {
- crt.Xprintf(tls, str(72722))
+ if (int32(_p.Xflags) & int32(1)) != 0 {
+ crt.Xprintf(tls, str(70884))
goto _11
}
- if (int32(_p.X1) & i32(6)) == i32(6) {
- crt.Xprintf(tls, str(72728), *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_p.X0))))))
+ if (int32(_p.Xflags) & int32(6)) == int32(6) {
+ crt.Xprintf(tls, str(70890), *(*int64)(unsafe.Pointer(&_p.Xu)))
goto _11
}
- if (int32(_p.X1) & i32(4)) != 0 {
- crt.Xprintf(tls, str(72737), *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_p.X0))))))
+ if (int32(_p.Xflags) & int32(4)) != 0 {
+ crt.Xprintf(tls, str(70899), *(*int64)(unsafe.Pointer(&_p.Xu)))
goto _11
}
- if (int32(_p.X1) & i32(8)) != 0 {
- crt.Xprintf(tls, str(72745), *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_p.X0))))))
+ if (int32(_p.Xflags) & int32(8)) != 0 {
+ crt.Xprintf(tls, str(70907), *(*float64)(unsafe.Pointer(&_p.Xu)))
goto _11
}
- if (int32(_p.X1) & i32(32)) != 0 {
- crt.Xprintf(tls, str(72751))
+ if (int32(_p.Xflags) & int32(32)) != 0 {
+ crt.Xprintf(tls, str(70913))
goto _11
}
_sqlite3VdbeMemPrettyPrint(tls, _p, (*int8)(unsafe.Pointer(&_7_zBuf)))
- crt.Xprintf(tls, str(47037), unsafe.Pointer((*int8)(unsafe.Pointer(&_7_zBuf))))
+ crt.Xprintf(tls, str(46992), unsafe.Pointer(&_7_zBuf))
_11:
- if (int32(_p.X1) & i32(32768)) != 0 {
- crt.Xprintf(tls, str(72761), int32(_p.X3))
+ if (int32(_p.Xflags) & int32(32768)) != 0 {
+ crt.Xprintf(tls, str(70923), int32(_p.XeSubtype))
}
_ = _7_zBuf
}
-// Write a nice string representation of the contents of cell pMem
-// into buffer zBuf, length nBuf.
+// C comment
+// /*
+// ** Write a nice string representation of the contents of cell pMem
+// ** into buffer zBuf, length nBuf.
+// */
func _sqlite3VdbeMemPrettyPrint(tls *crt.TLS, _pMem *XMem, _zBuf *int8) {
var _f, _1_i, _9_j, _9_k int32
var _1_c, _7_z int8
var _zCsr *int8
var _14_c uint8
_zCsr = _zBuf
- _f = int32(_pMem.X1)
- if (_f & i32(16)) == 0 {
+ _f = int32(_pMem.Xflags)
+ if (_f & int32(16)) == 0 {
goto _0
}
- if (_f & i32(1024)) != 0 {
- _1_c = int8(i32(122))
+ if (_f & int32(1024)) != 0 {
+ _1_c = int8(122)
func() {
- if (_f & i32(6144)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78597), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000))), unsafe.Pointer(str(72777)))
+ if (_f & int32(6144)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78597), unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000), unsafe.Pointer(str(70939)))
crt.X__builtin_abort(tls)
}
}()
goto _12
}
- if (_f & i32(2048)) != 0 {
- _1_c = int8(i32(116))
+ if (_f & int32(2048)) != 0 {
+ _1_c = int8(116)
func() {
- if (_f & i32(5120)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78600), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000))), unsafe.Pointer(str(72809)))
+ if (_f & int32(5120)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78600), unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000), unsafe.Pointer(str(70971)))
crt.X__builtin_abort(tls)
}
}()
goto _12
}
- if (_f & i32(4096)) != 0 {
- _1_c = int8(i32(101))
+ if (_f & int32(4096)) != 0 {
+ _1_c = int8(101)
func() {
- if (_f & i32(3072)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78603), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000))), unsafe.Pointer(str(72838)))
+ if (_f & int32(3072)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78603), unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000), unsafe.Pointer(str(71000)))
crt.X__builtin_abort(tls)
}
}()
goto _12
}
- _1_c = int8(i32(115))
+ _1_c = int8(115)
_12:
- *postInc0(&_zCsr, 1) = _1_c
- Xsqlite3_snprintf(tls, i32(100), _zCsr, str(72868), _pMem.X4)
- {
- p := &_zCsr
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _zCsr))))
- sink0(*p)
- }
- _1_i = i32(0)
+ *postInc1(&_zCsr, 1) = _1_c
+ Xsqlite3_snprintf(tls, int32(100), _zCsr, str(71030), _pMem.Xn)
+ *(*uintptr)(unsafe.Pointer(&_zCsr)) += uintptr(_sqlite3Strlen30(tls, _zCsr))
+ _1_i = int32(0)
_13:
- if _1_i >= i32(16) || _1_i >= (_pMem.X4) {
+ if _1_i >= int32(16) || _1_i >= _pMem.Xn {
goto _17
}
- Xsqlite3_snprintf(tls, i32(100), _zCsr, str(72872), int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr(_1_i))))&i32(255))
- {
- p := &_zCsr
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _zCsr))))
- sink0(*p)
- }
+ Xsqlite3_snprintf(tls, int32(100), _zCsr, str(71034), int32(*elem1(_pMem.Xz, uintptr(_1_i)))&int32(255))
+ *(*uintptr)(unsafe.Pointer(&_zCsr)) += uintptr(_sqlite3Strlen30(tls, _zCsr))
_1_i += 1
goto _13
_17:
- _1_i = i32(0)
+ _1_i = int32(0)
_18:
- if _1_i >= i32(16) || _1_i >= (_pMem.X4) {
+ if _1_i >= int32(16) || _1_i >= _pMem.Xn {
goto _22
}
- _7_z = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr(_1_i)))
- if (int32(_7_z) < i32(32)) || (int32(_7_z) > i32(126)) {
- *postInc0(&_zCsr, 1) = int8(i32(46))
+ _7_z = *elem1(_pMem.Xz, uintptr(_1_i))
+ if (int32(_7_z) < int32(32)) || (int32(_7_z) > int32(126)) {
+ *postInc1(&_zCsr, 1) = int8(46)
goto _25
}
- *postInc0(&_zCsr, 1) = _7_z
+ *postInc1(&_zCsr, 1) = _7_z
_25:
_1_i += 1
goto _18
_22:
- *postInc0(&_zCsr, 1) = int8(i32(93))
- if (_f & i32(16384)) != 0 {
- Xsqlite3_snprintf(tls, i32(100), _zCsr, str(72877), *(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
- {
- p := &_zCsr
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _zCsr))))
- sink0(*p)
- }
+ *postInc1(&_zCsr, 1) = int8(93)
+ if (_f & int32(16384)) != 0 {
+ Xsqlite3_snprintf(tls, int32(100), _zCsr, str(71039), *(*int32)(unsafe.Pointer(&_pMem.Xu)))
+ *(*uintptr)(unsafe.Pointer(&_zCsr)) += uintptr(_sqlite3Strlen30(tls, _zCsr))
}
- *_zCsr = int8(i32(0))
+ *_zCsr = 0
goto _28
_0:
- if (_f & i32(2)) == 0 {
+ if (_f & int32(2)) == 0 {
goto _28
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(i32(0)))) = int8(i32(32))
- if (_f & i32(1024)) != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(i32(1)))) = int8(i32(122))
+ *elem1(_zBuf, 0) = int8(32)
+ if (_f & int32(1024)) != 0 {
+ *elem1(_zBuf, uintptr(1)) = int8(122)
func() {
- if (_f & i32(6144)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78630), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000))), unsafe.Pointer(str(72777)))
+ if (_f & int32(6144)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78630), unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000), unsafe.Pointer(str(70939)))
crt.X__builtin_abort(tls)
}
}()
goto _40
}
- if (_f & i32(2048)) != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(i32(1)))) = int8(i32(116))
+ if (_f & int32(2048)) != 0 {
+ *elem1(_zBuf, uintptr(1)) = int8(116)
func() {
- if (_f & i32(5120)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78633), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000))), unsafe.Pointer(str(72809)))
+ if (_f & int32(5120)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78633), unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000), unsafe.Pointer(str(70971)))
crt.X__builtin_abort(tls)
}
}()
goto _40
}
- if (_f & i32(4096)) != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(i32(1)))) = int8(i32(101))
+ if (_f & int32(4096)) != 0 {
+ *elem1(_zBuf, uintptr(1)) = int8(101)
func() {
- if (_f & i32(3072)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78636), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000))), unsafe.Pointer(str(72838)))
+ if (_f & int32(3072)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78636), unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00__func__Ø000), unsafe.Pointer(str(71000)))
crt.X__builtin_abort(tls)
}
}()
goto _40
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(i32(1)))) = int8(i32(115))
+ *elem1(_zBuf, uintptr(1)) = int8(115)
_40:
- _9_k = i32(2)
- Xsqlite3_snprintf(tls, i32(100), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf))+1*uintptr(_9_k))), str(37915), _pMem.X4)
- {
- p := &_9_k
- *p = (*p) + _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf))+1*uintptr(_9_k))))
- sink1(*p)
- }
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(postInc1(&_9_k, int32(1))))) = int8(i32(91))
- _9_j = i32(0)
+ _9_k = int32(2)
+ Xsqlite3_snprintf(tls, int32(100), elem1(_zBuf, uintptr(_9_k)), str(37870), _pMem.Xn)
+ _9_k += _sqlite3Strlen30(tls, elem1(_zBuf, uintptr(_9_k)))
+ *elem1(_zBuf, uintptr(postInc2(&_9_k, 1))) = int8(91)
+ _9_j = int32(0)
_41:
- if _9_j >= i32(15) || _9_j >= (_pMem.X4) {
+ if _9_j >= int32(15) || _9_j >= _pMem.Xn {
goto _45
}
- _14_c = uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr(_9_j))))
- if (int32(_14_c) >= i32(32)) && (int32(_14_c) < i32(127)) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(postInc1(&_9_k, int32(1))))) = int8(_14_c)
+ _14_c = uint8(*elem1(_pMem.Xz, uintptr(_9_j)))
+ if (int32(_14_c) >= int32(32)) && (int32(_14_c) < int32(127)) {
+ *elem1(_zBuf, uintptr(postInc2(&_9_k, 1))) = int8(_14_c)
goto _48
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(postInc1(&_9_k, int32(1))))) = int8(i32(46))
+ *elem1(_zBuf, uintptr(postInc2(&_9_k, 1))) = int8(46)
_48:
_9_j += 1
goto _41
_45:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(postInc1(&_9_k, int32(1))))) = int8(i32(93))
- Xsqlite3_snprintf(tls, i32(100), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf))+1*uintptr(_9_k))), *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3VdbeMemPrettyPrintØ00encnamesØ001)) + 4*uintptr(_pMem.X2))))
- {
- p := &_9_k
- *p = (*p) + _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf))+1*uintptr(_9_k))))
- sink1(*p)
- }
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(postInc1(&_9_k, int32(1))))) = int8(i32(0))
+ *elem1(_zBuf, uintptr(postInc2(&_9_k, 1))) = int8(93)
+ Xsqlite3_snprintf(tls, int32(100), elem1(_zBuf, uintptr(_9_k)), *elem0((**int8)(unsafe.Pointer(&_sqlite3VdbeMemPrettyPrintØ00encnamesØ001)), uintptr(_pMem.Xenc)))
+ _9_k += _sqlite3Strlen30(tls, elem1(_zBuf, uintptr(_9_k)))
+ *elem1(_zBuf, uintptr(postInc2(&_9_k, 1))) = 0
_28:
}
var _sqlite3VdbeMemPrettyPrintØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemPrettyPrintØ00__func__Ø000[0], str(72882), 26)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemPrettyPrintØ00__func__Ø000[0], str(71044), 26)
}
var _sqlite3VdbeMemPrettyPrintØ00encnamesØ001 [4]*int8
func init() {
- _sqlite3VdbeMemPrettyPrintØ00encnamesØ001 = [4]*int8{str(72908), str(72912), str(72916), str(72923)}
+ _sqlite3VdbeMemPrettyPrintØ00encnamesØ001 = [4]*int8{str(71070), str(71074), str(71078), str(71085)}
}
-// This routine prepares a memory cell for modification by breaking
-// its link to a shallow copy and by marking any current shallow
-// copies of this cell as invalid.
-//
-// This is used for testing and debugging only - to make sure shallow
-// copies are not misused.
+// C comment
+// /*
+// ** This routine prepares a memory cell for modification by breaking
+// ** its link to a shallow copy and by marking any current shallow
+// ** copies of this cell as invalid.
+// **
+// ** This is used for testing and debugging only - to make sure shallow
+// ** copies are not misused.
+// */
func _sqlite3VdbeMemAboutToChange(tls *crt.TLS, _pVdbe *TVdbe, _pMem *XMem) {
var _i int32
var _pX *XMem
- *func() **XMem { _i = i32(0); return &_pX }() = (*XMem)(_pVdbe.X18)
+ *func() **XMem { _i = int32(0); return &_pX }() = (*XMem)(_pVdbe.XaMem)
_0:
- if _i >= (_pVdbe.X6) {
+ if _i >= _pVdbe.XnMem {
goto _3
}
- if (*XMem)(_pX.X11) == _pMem {
+ if (*XMem)(_pX.XpScopyFrom) == _pMem {
{
- p := (*uint16)(unsafe.Pointer(&(_pX.X1)))
- *p = uint16(int32(*p) | i32(128))
- sink14(*p)
+ p := &_pX.Xflags
+ *p = uint16(int32(*p) | int32(128))
}
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pX.X11))))) = nil
+ *(**XMem)(unsafe.Pointer(&_pX.XpScopyFrom)) = nil
}
*(*uintptr)(unsafe.Pointer(func() **XMem { _i += 1; return &_pX }())) += uintptr(48)
goto _0
_3:
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMem.X11))))) = nil
+ *(**XMem)(unsafe.Pointer(&_pMem.XpScopyFrom)) = nil
}
var _sqlite3VdbeExecØ00azTypeØ001 [4]*int8
func init() {
- _sqlite3VdbeExecØ00azTypeØ001 = [4]*int8{str(72930), str(25590), str(25597), str(72939)}
+ _sqlite3VdbeExecØ00azTypeØ001 = [4]*int8{str(71092), str(25545), str(25552), str(71101)}
}
func _out2Prerelease(tls *crt.TLS, _p *TVdbe, _pOp *XVdbeOp) (r0 *XMem) {
var _pOut *XMem
func() {
- if (_pOp.X4) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78831), unsafe.Pointer((*int8)(unsafe.Pointer(&_out2PrereleaseØ00__func__Ø000))), unsafe.Pointer(str(62895)))
+ if _pOp.Xp2 <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78831), unsafe.Pointer(&_out2PrereleaseØ00__func__Ø000), unsafe.Pointer(str(61037)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOp.X4) > (((_p.X6) + i32(1)) - (_p.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78832), unsafe.Pointer((*int8)(unsafe.Pointer(&_out2PrereleaseØ00__func__Ø000))), unsafe.Pointer(str(62905)))
+ if _pOp.Xp2 > ((_p.XnMem + int32(1)) - _p.XnCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78832), unsafe.Pointer(&_out2PrereleaseØ00__func__Ø000), unsafe.Pointer(str(61047)))
crt.X__builtin_abort(tls)
}
}()
- _pOut = (*XMem)(unsafe.Pointer(uintptr(_p.X18) + 48*uintptr(_pOp.X4)))
+ _pOut = elem25((*XMem)(_p.XaMem), uintptr(_pOp.Xp2))
_sqlite3VdbeMemAboutToChange(tls, _p, _pOut)
- if (int32(_pOut.X1) & i32(9312)) != i32(0) {
+ if (int32(_pOut.Xflags) & int32(9312)) != int32(0) {
return _out2PrereleaseWithClear(tls, _pOut)
}
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(4))
+ _pOut.Xflags = uint16(4)
return _pOut
}
var _out2PrereleaseØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_out2PrereleaseØ00__func__Ø000[0], str(72951), 15)
+ crt.Xstrncpy(nil, &_out2PrereleaseØ00__func__Ø000[0], str(71113), 15)
}
-// Return the register of pOp->p2 after first preparing it to be
-// overwritten with an integer value.
+// C comment
+// /*
+// ** Return the register of pOp->p2 after first preparing it to be
+// ** overwritten with an integer value.
+// */
func _out2PrereleaseWithClear(tls *crt.TLS, _pOut *XMem) (r0 *XMem) {
_sqlite3VdbeMemSetNull(tls, _pOut)
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16(i32(4))
+ _pOut.Xflags = uint16(4)
return _pOut
}
-// Return true if the Mem object contains a TEXT or BLOB that is
-// too large - whose size exceeds SQLITE_MAX_LENGTH.
+// C comment
+// /*
+// ** Return true if the Mem object contains a TEXT or BLOB that is
+// ** too large - whose size exceeds SQLITE_MAX_LENGTH.
+// */
func _sqlite3VdbeMemTooBig(tls *crt.TLS, _p *XMem) (r0 int32) {
var _1_n int32
func() {
- if (*Xsqlite3)(_p.X9) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70450), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemTooBigØ00__func__Ø000))), unsafe.Pointer(str(23676)))
+ if (*Xsqlite3)(_p.Xdb) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70450), unsafe.Pointer(&_sqlite3VdbeMemTooBigØ00__func__Ø000), unsafe.Pointer(str(23631)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_p.X1) & i32(18)) == 0 {
+ if (int32(_p.Xflags) & int32(18)) == 0 {
goto _2
}
- _1_n = _p.X4
- if (int32(_p.X1) & i32(16384)) != 0 {
- {
- p := &_1_n
- *p = (*p) + (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_p.X0))))))
- sink1(*p)
- }
+ _1_n = _p.Xn
+ if (int32(_p.Xflags) & int32(16384)) != 0 {
+ _1_n += *(*int32)(unsafe.Pointer(&_p.Xu))
}
- return bool2int(_1_n > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_p.X9).X31))))) + 4*uintptr(i32(0))))))
+ return bool2int(_1_n > (*elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_p.Xdb).XaLimit))), 0)))
_2:
- return i32(0)
+ return int32(0)
}
var _sqlite3VdbeMemTooBigØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemTooBigØ00__func__Ø000[0], str(72966), 21)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemTooBigØ00__func__Ø000[0], str(71128), 21)
}
func _sqlite3VdbeMemShallowCopy(tls *crt.TLS, _pTo *XMem, _pFrom *XMem, _srcType int32) {
func() {
- if (int32(_pFrom.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70496), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemShallowCopyØ00__func__Ø000))), unsafe.Pointer(str(72987)))
+ if (int32(_pFrom.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70496), unsafe.Pointer(&_sqlite3VdbeMemShallowCopyØ00__func__Ø000), unsafe.Pointer(str(71149)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pTo.X9) != (*Xsqlite3)(_pFrom.X9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70497), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemShallowCopyØ00__func__Ø000))), unsafe.Pointer(str(73018)))
+ if (*Xsqlite3)(_pTo.Xdb) != (*Xsqlite3)(_pFrom.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70497), unsafe.Pointer(&_sqlite3VdbeMemShallowCopyØ00__func__Ø000), unsafe.Pointer(str(71180)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pTo.X1) & i32(9312)) != i32(0) {
+ if (int32(_pTo.Xflags) & int32(9312)) != int32(0) {
_vdbeClrCopy(tls, _pTo, _pFrom, _srcType)
return
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pTo), (unsafe.Pointer)(_pFrom), u32(20))
- if (int32(_pFrom.X1) & i32(2048)) == i32(0) {
+ crt.Xmemcpy(tls, unsafe.Pointer(_pTo), unsafe.Pointer(_pFrom), uint32(20))
+ if (int32(_pFrom.Xflags) & int32(2048)) == int32(0) {
{
- p := (*uint16)(unsafe.Pointer(&(_pTo.X1)))
- *p = uint16(int32(*p) & i32(-7169))
- sink14(*p)
+ p := &_pTo.Xflags
+ *p = uint16(int32(*p) & int32(-7169))
}
func() {
- if _srcType != i32(4096) && _srcType != i32(2048) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70502), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemShallowCopyØ00__func__Ø000))), unsafe.Pointer(str(73037)))
+ if _srcType != int32(4096) && _srcType != int32(2048) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70502), unsafe.Pointer(&_sqlite3VdbeMemShallowCopyØ00__func__Ø000), unsafe.Pointer(str(71199)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&(_pTo.X1)))
+ p := &_pTo.Xflags
*p = uint16(int32(*p) | _srcType)
- sink14(*p)
}
}
}
@@ -54746,18 +54480,21 @@ func _sqlite3VdbeMemShallowCopy(tls *crt.TLS, _pTo *XMem, _pFrom *XMem, _srcType
var _sqlite3VdbeMemShallowCopyØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemShallowCopyØ00__func__Ø000[0], str(73079), 26)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemShallowCopyØ00__func__Ø000[0], str(71241), 26)
}
-// Make an shallow copy of pFrom into pTo. Prior contents of
-// pTo are freed. The pFrom->z field is not duplicated. If
-// pFrom->z is used, then pTo->z points to the same thing as pFrom->z
-// and flags gets srcType (either MEM_Ephem or MEM_Static).
+// C comment
+// /*
+// ** Make an shallow copy of pFrom into pTo. Prior contents of
+// ** pTo are freed. The pFrom->z field is not duplicated. If
+// ** pFrom->z is used, then pTo->z points to the same thing as pFrom->z
+// ** and flags gets srcType (either MEM_Ephem or MEM_Static).
+// */
func _vdbeClrCopy(tls *crt.TLS, _pTo *XMem, _pFrom *XMem, _eType int32) {
_vdbeMemClearExternAndSetNull(tls, _pTo)
func() {
- if (int32(_pTo.X1) & i32(9312)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70492), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeClrCopyØ00__func__Ø000))), unsafe.Pointer(str(73105)))
+ if (int32(_pTo.Xflags) & int32(9312)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70492), unsafe.Pointer(&_vdbeClrCopyØ00__func__Ø000), unsafe.Pointer(str(71267)))
crt.X__builtin_abort(tls)
}
}()
@@ -54767,131 +54504,135 @@ func _vdbeClrCopy(tls *crt.TLS, _pTo *XMem, _pFrom *XMem, _eType int32) {
var _vdbeClrCopyØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeClrCopyØ00__func__Ø000[0], str(73126), 12)
+ crt.Xstrncpy(nil, &_vdbeClrCopyØ00__func__Ø000[0], str(71288), 12)
}
-// Transfer the contents of pFrom to pTo. Any existing value in pTo is
-// freed. If pFrom contains ephemeral data, a copy is made.
-//
-// pFrom contains an SQL NULL when this routine returns.
+// C comment
+// /*
+// ** Transfer the contents of pFrom to pTo. Any existing value in pTo is
+// ** freed. If pFrom contains ephemeral data, a copy is made.
+// **
+// ** pFrom contains an SQL NULL when this routine returns.
+// */
func _sqlite3VdbeMemMove(tls *crt.TLS, _pTo *XMem, _pFrom *XMem) {
func() {
- if (*Xsqlite3)(_pFrom.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pFrom.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70535), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemMoveØ00__func__Ø000))), unsafe.Pointer(str(73138)))
+ if (*Xsqlite3)(_pFrom.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pFrom.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70535), unsafe.Pointer(&_sqlite3VdbeMemMoveØ00__func__Ø000), unsafe.Pointer(str(71300)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pTo.X9) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pTo.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70536), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemMoveØ00__func__Ø000))), unsafe.Pointer(str(73191)))
+ if (*Xsqlite3)(_pTo.Xdb) != nil && Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pTo.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70536), unsafe.Pointer(&_sqlite3VdbeMemMoveØ00__func__Ø000), unsafe.Pointer(str(71353)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pFrom.X9) != nil && (*Xsqlite3)(_pTo.X9) != nil && (*Xsqlite3)(_pFrom.X9) != (*Xsqlite3)(_pTo.X9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70537), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemMoveØ00__func__Ø000))), unsafe.Pointer(str(73240)))
+ if (*Xsqlite3)(_pFrom.Xdb) != nil && (*Xsqlite3)(_pTo.Xdb) != nil && (*Xsqlite3)(_pFrom.Xdb) != (*Xsqlite3)(_pTo.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70537), unsafe.Pointer(&_sqlite3VdbeMemMoveØ00__func__Ø000), unsafe.Pointer(str(71402)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeMemRelease(tls, _pTo)
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pTo), (unsafe.Pointer)(_pFrom), u32(48))
- *(*uint16)(unsafe.Pointer(&(_pFrom.X1))) = uint16(i32(1))
- *(*int32)(unsafe.Pointer(&(_pFrom.X7))) = i32(0)
+ crt.Xmemcpy(tls, unsafe.Pointer(_pTo), unsafe.Pointer(_pFrom), uint32(48))
+ _pFrom.Xflags = uint16(1)
+ _pFrom.XszMalloc = int32(0)
}
var _sqlite3VdbeMemMoveØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemMoveØ00__func__Ø000[0], str(73289), 19)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemMoveØ00__func__Ø000[0], str(71451), 19)
}
-// Return the numeric type for pMem, either MEM_Int or MEM_Real or both or
-// none.
-//
-// Unlike applyNumericAffinity(), this routine does not modify pMem->flags.
-// But it does set pMem->u.r and pMem->u.i appropriately.
+// C comment
+// /*
+// ** Return the numeric type for pMem, either MEM_Int or MEM_Real or both or
+// ** none.
+// **
+// ** Unlike applyNumericAffinity(), this routine does not modify pMem->flags.
+// ** But it does set pMem->u.r and pMem->u.i appropriately.
+// */
func _numericType(tls *crt.TLS, _pMem *XMem) (r0 uint16) {
- if (int32(_pMem.X1) & i32(12)) != 0 {
- return uint16(int32(_pMem.X1) & i32(12))
+ if (int32(_pMem.Xflags) & int32(12)) != 0 {
+ return uint16(int32(_pMem.Xflags) & int32(12))
}
- if (int32(_pMem.X1) & i32(18)) != 0 {
+ if (int32(_pMem.Xflags) & int32(18)) != 0 {
return _computeNumericType(tls, _pMem)
}
- return uint16(i32(0))
+ return 0
}
-// pMem currently only holds a string type (or maybe a BLOB that we can
-// interpret as a string if we want to). Compute its corresponding
-// numeric type, if has one. Set the pMem->u.r and pMem->u.i fields
-// accordingly.
+// C comment
+// /*
+// ** pMem currently only holds a string type (or maybe a BLOB that we can
+// ** interpret as a string if we want to). Compute its corresponding
+// ** numeric type, if has one. Set the pMem->u.r and pMem->u.i fields
+// ** accordingly.
+// */
func _computeNumericType(tls *crt.TLS, _pMem *XMem) (r0 uint16) {
func() {
- if (int32(_pMem.X1) & i32(12)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78553), unsafe.Pointer((*int8)(unsafe.Pointer(&_computeNumericTypeØ00__func__Ø000))), unsafe.Pointer(str(73308)))
+ if (int32(_pMem.Xflags) & int32(12)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78553), unsafe.Pointer(&_computeNumericTypeØ00__func__Ø000), unsafe.Pointer(str(71470)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(18)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78554), unsafe.Pointer((*int8)(unsafe.Pointer(&_computeNumericTypeØ00__func__Ø000))), unsafe.Pointer(str(73346)))
+ if (int32(_pMem.Xflags) & int32(18)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78554), unsafe.Pointer(&_computeNumericTypeØ00__func__Ø000), unsafe.Pointer(str(71508)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3AtoF(tls, _pMem.X5, (*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))), _pMem.X4, _pMem.X2) == i32(0) {
- return uint16(i32(0))
+ if _sqlite3AtoF(tls, _pMem.Xz, (*float64)(unsafe.Pointer(&_pMem.Xu)), _pMem.Xn, _pMem.Xenc) == int32(0) {
+ return 0
}
- if _sqlite3Atoi64(tls, _pMem.X5, (*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))), _pMem.X4, _pMem.X2) == i32(0) {
- return uint16(i32(4))
+ if _sqlite3Atoi64(tls, _pMem.Xz, (*int64)(unsafe.Pointer(&_pMem.Xu)), _pMem.Xn, _pMem.Xenc) == int32(0) {
+ return uint16(4)
}
- return uint16(i32(8))
+ return uint16(8)
}
var _computeNumericTypeØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_computeNumericTypeØ00__func__Ø000[0], str(73384), 19)
+ crt.Xstrncpy(nil, &_computeNumericTypeØ00__func__Ø000[0], str(71546), 19)
}
-// Attempt to add, substract, or multiply the 64-bit signed value iB against
-// the other 64-bit signed integer at *pA and store the result in *pA.
-// Return 0 on success. Or if the operation would have resulted in an
-// overflow, leave *pA unchanged and return 1.
+// C comment
+// /*
+// ** Attempt to add, substract, or multiply the 64-bit signed value iB against
+// ** the other 64-bit signed integer at *pA and store the result in *pA.
+// ** Return 0 on success. Or if the operation would have resulted in an
+// ** overflow, leave *pA unchanged and return 1.
+// */
func _sqlite3AddInt64(tls *crt.TLS, _pA *int64, _iB int64) (r0 int32) {
var _iA int64
_iA = *_pA
- if _iB < int64(i32(0)) {
+ if _iB < (0) {
goto _0
}
- if (_iA > int64(i32(0))) && ((i64(9223372036854775807) - _iA) < _iB) {
- return i32(1)
+ if (_iA > (0)) && ((int64(9223372036854775807) - _iA) < _iB) {
+ return int32(1)
}
goto _3
_0:
- if (_iA < int64(i32(0))) && ((-(_iA + i64(9223372036854775807))) > (_iB + int64(i32(1)))) {
- return i32(1)
+ if (_iA < (0)) && ((-(_iA + int64(9223372036854775807))) > (_iB + int64(1))) {
+ return int32(1)
}
_3:
- {
- p := _pA
- *p = (*p) + _iB
- sink6(*p)
- }
- return i32(0)
+ *_pA += _iB
+ return int32(0)
}
func _sqlite3SubInt64(tls *crt.TLS, _pA *int64, _iB int64) (r0 int32) {
- if _iB != i64(-9223372036854775808) {
+ if _iB != int64(-9223372036854775808) {
goto _0
}
- if (*_pA) >= int64(i32(0)) {
- return i32(1)
- }
- {
- p := _pA
- *p = (*p) - _iB
- sink6(*p)
+ if (*_pA) >= (0) {
+ return int32(1)
}
- return i32(0)
+ *_pA -= _iB
+ return int32(0)
_0:
return _sqlite3AddInt64(tls, _pA, -_iB)
@@ -54900,139 +54641,142 @@ _0:
func _sqlite3MulInt64(tls *crt.TLS, _pA *int64, _iB int64) (r0 int32) {
var _iA int64
_iA = *_pA
- if _iB <= int64(i32(0)) {
+ if _iB <= (0) {
goto _0
}
- if _iA > (i64(9223372036854775807) / _iB) {
- return i32(1)
+ if _iA > (int64(9223372036854775807) / _iB) {
+ return int32(1)
}
- if _iA < (i64(-9223372036854775808) / _iB) {
- return i32(1)
+ if _iA < (int64(-9223372036854775808) / _iB) {
+ return int32(1)
}
goto _4
_0:
- if _iB >= int64(i32(0)) {
+ if _iB >= (0) {
goto _4
}
- if _iA <= int64(i32(0)) {
+ if _iA <= (0) {
goto _5
}
- if _iB < (i64(-9223372036854775808) / _iA) {
- return i32(1)
+ if _iB < (int64(-9223372036854775808) / _iA) {
+ return int32(1)
}
goto _8
_5:
- if _iA >= int64(i32(0)) {
+ if _iA >= (0) {
goto _8
}
- if _iB == i64(-9223372036854775808) {
- return i32(1)
+ if _iB == int64(-9223372036854775808) {
+ return int32(1)
}
- if _iA == i64(-9223372036854775808) {
- return i32(1)
+ if _iA == int64(-9223372036854775808) {
+ return int32(1)
}
- if (-_iA) > (i64(9223372036854775807) / (-_iB)) {
- return i32(1)
+ if (-_iA) > (int64(9223372036854775807) / (-_iB)) {
+ return int32(1)
}
_8:
_4:
*_pA = _iA * _iB
- return i32(0)
-}
-
-// Compare the values contained by the two memory cells, returning
-// negative, zero or positive if pMem1 is less than, equal to, or greater
-// than pMem2. Sorting order is NULL's first, followed by numbers (integers
-// and reals) sorted numerically, followed by text ordered by the collating
-// sequence pColl and finally blob's ordered by memcmp().
-//
-// Two NULL values are considered equal by this function.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Compare the values contained by the two memory cells, returning
+// ** negative, zero or positive if pMem1 is less than, equal to, or greater
+// ** than pMem2. Sorting order is NULL's first, followed by numbers (integers
+// ** and reals) sorted numerically, followed by text ordered by the collating
+// ** sequence pColl and finally blob's ordered by memcmp().
+// **
+// ** Two NULL values are considered equal by this function.
+// */
func _sqlite3MemCompare(tls *crt.TLS, _pMem1 *XMem, _pMem2 *XMem, _pColl *XCollSeq) (r0 int32) {
var _f1, _f2, _combined_flags int32
- _f1 = int32(_pMem1.X1)
- _f2 = int32(_pMem2.X1)
+ _f1 = int32(_pMem1.Xflags)
+ _f2 = int32(_pMem2.Xflags)
_combined_flags = _f1 | _f2
func() {
- if (_combined_flags & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75263), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MemCompareØ00__func__Ø000))), unsafe.Pointer(str(73403)))
+ if (_combined_flags & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75263), unsafe.Pointer(&_sqlite3MemCompareØ00__func__Ø000), unsafe.Pointer(str(71565)))
crt.X__builtin_abort(tls)
}
}()
- if (_combined_flags & i32(1)) != 0 {
- return (_f2 & i32(1)) - (_f1 & i32(1))
+ if (_combined_flags & int32(1)) != 0 {
+ return (_f2 & int32(1)) - (_f1 & int32(1))
}
- if (_combined_flags & i32(12)) == 0 {
+ if (_combined_flags & int32(12)) == 0 {
goto _3
}
- if ((_f1 & _f2) & i32(4)) == i32(0) {
+ if ((_f1 & _f2) & int32(4)) == int32(0) {
goto _4
}
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem1.X0)))))) < (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem2.X0)))))) {
- return i32(-1)
+ if (*(*int64)(unsafe.Pointer(&_pMem1.Xu))) < (*(*int64)(unsafe.Pointer(&_pMem2.Xu))) {
+ return int32(-1)
}
- if (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem1.X0)))))) > (*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem2.X0)))))) {
- return i32(1)
+ if (*(*int64)(unsafe.Pointer(&_pMem1.Xu))) > (*(*int64)(unsafe.Pointer(&_pMem2.Xu))) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
_4:
- if ((_f1 & _f2) & i32(8)) == i32(0) {
+ if ((_f1 & _f2) & int32(8)) == int32(0) {
goto _7
}
- if (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem1.X0)))))) < (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem2.X0)))))) {
- return i32(-1)
+ if (*(*float64)(unsafe.Pointer(&_pMem1.Xu))) < (*(*float64)(unsafe.Pointer(&_pMem2.Xu))) {
+ return int32(-1)
}
- if (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem1.X0)))))) > (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem2.X0)))))) {
- return i32(1)
+ if (*(*float64)(unsafe.Pointer(&_pMem1.Xu))) > (*(*float64)(unsafe.Pointer(&_pMem2.Xu))) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
_7:
- if (_f1 & i32(4)) == i32(0) {
+ if (_f1 & int32(4)) == int32(0) {
goto _10
}
- if (_f2 & i32(8)) != i32(0) {
- return _sqlite3IntFloatCompare(tls, *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem1.X0))))), *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem2.X0))))))
+ if (_f2 & int32(8)) != int32(0) {
+ return _sqlite3IntFloatCompare(tls, *(*int64)(unsafe.Pointer(&_pMem1.Xu)), *(*float64)(unsafe.Pointer(&_pMem2.Xu)))
}
- return i32(-1)
+ return int32(-1)
_10:
- if (_f1 & i32(8)) == i32(0) {
+ if (_f1 & int32(8)) == int32(0) {
goto _13
}
- if (_f2 & i32(4)) != i32(0) {
- return -_sqlite3IntFloatCompare(tls, *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem2.X0))))), *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem1.X0))))))
+ if (_f2 & int32(4)) != int32(0) {
+ return -_sqlite3IntFloatCompare(tls, *(*int64)(unsafe.Pointer(&_pMem2.Xu)), *(*float64)(unsafe.Pointer(&_pMem1.Xu)))
}
- return i32(-1)
+ return int32(-1)
_13:
- return i32(1)
+ return int32(1)
_3:
- if (_combined_flags & i32(2)) == 0 {
+ if (_combined_flags & int32(2)) == 0 {
goto _16
}
- if (_f1 & i32(2)) == i32(0) {
- return i32(1)
+ if (_f1 & int32(2)) == int32(0) {
+ return int32(1)
}
- if (_f2 & i32(2)) == i32(0) {
- return i32(-1)
+ if (_f2 & int32(2)) == int32(0) {
+ return int32(-1)
}
func() {
- if int32(_pMem1.X2) != int32(_pMem2.X2) && ((*Xsqlite3)(_pMem1.X9).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75313), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MemCompareØ00__func__Ø000))), unsafe.Pointer(str(73436)))
+ if int32(_pMem1.Xenc) != int32(_pMem2.Xenc) && ((*Xsqlite3)(_pMem1.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75313), unsafe.Pointer(&_sqlite3MemCompareØ00__func__Ø000), unsafe.Pointer(str(71598)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pMem1.X2) != i32(1) && int32(_pMem1.X2) != i32(2) && int32(_pMem1.X2) != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75314), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MemCompareØ00__func__Ø000))), unsafe.Pointer(str(73486)))
+ if int32(_pMem1.Xenc) != int32(1) && int32(_pMem1.Xenc) != int32(2) && int32(_pMem1.Xenc) != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75314), unsafe.Pointer(&_sqlite3MemCompareØ00__func__Ø000), unsafe.Pointer(str(71648)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pColl != nil && (_pColl.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75321), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MemCompareØ00__func__Ø000))), unsafe.Pointer(str(73570)))
+ if _pColl != nil && _pColl.XxCmp == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75321), unsafe.Pointer(&_sqlite3MemCompareØ00__func__Ø000), unsafe.Pointer(str(71732)))
crt.X__builtin_abort(tls)
}
}()
@@ -55046,153 +54790,161 @@ _16:
var _sqlite3MemCompareØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3MemCompareØ00__func__Ø000[0], str(73592), 18)
+ crt.Xstrncpy(nil, &_sqlite3MemCompareØ00__func__Ø000[0], str(71754), 18)
}
-// Do a comparison between a 64-bit signed integer and a 64-bit floating-point
-// number. Return negative, zero, or positive if the first (i64) is less than,
-// equal to, or greater than the second (double).
+// C comment
+// /*
+// ** Do a comparison between a 64-bit signed integer and a 64-bit floating-point
+// ** number. Return negative, zero, or positive if the first (i64) is less than,
+// ** equal to, or greater than the second (double).
+// */
func _sqlite3IntFloatCompare(tls *crt.TLS, _i int64, _r float64) (r0 int32) {
var _2_y int64
var _1_x, _2_s float64
goto _0
_0:
if _r < (-9.223372036854776e+18) {
- return i32(1)
+ return int32(1)
}
if _r > (9.223372036854776e+18) {
- return i32(-1)
+ return int32(-1)
}
_2_y = int64(_r)
if _i < _2_y {
- return i32(-1)
+ return int32(-1)
}
if _i <= _2_y {
goto _7
}
- if (_2_y == i64(-9223372036854775808)) && (_r > float64(0)) {
- return i32(-1)
+ if (_2_y == int64(-9223372036854775808)) && (_r > float64(0)) {
+ return int32(-1)
}
- return i32(1)
+ return int32(1)
_7:
_2_s = float64(_i)
if _2_s < _r {
- return i32(-1)
+ return int32(-1)
}
if _2_s > _r {
- return i32(1)
+ return int32(1)
}
- return i32(0)
+ return int32(0)
_ = _1_x
panic(0)
}
-// Both *pMem1 and *pMem2 contain string values. Compare the two values
-// using the collation sequence pColl. As usual, return a negative , zero
-// or positive value if *pMem1 is less than, equal to or greater than
-// *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);".
+// C comment
+// /*
+// ** Both *pMem1 and *pMem2 contain string values. Compare the two values
+// ** using the collation sequence pColl. As usual, return a negative , zero
+// ** or positive value if *pMem1 is less than, equal to or greater than
+// ** *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);".
+// */
func _vdbeCompareMemString(tls *crt.TLS, _pMem1 *XMem, _pMem2 *XMem, _pColl *XCollSeq, _prcErr *uint8) (r0 int32) {
var _2_rc, _2_n1, _2_n2 int32
var _2_v1, _2_v2 unsafe.Pointer
var _2_c1, _2_c2 XMem
- if int32(_pMem1.X2) == int32(_pColl.X1) {
- return (_pColl.X3)(tls, _pColl.X2, _pMem1.X4, (unsafe.Pointer)(_pMem1.X5), _pMem2.X4, (unsafe.Pointer)(_pMem2.X5))
- }
- _sqlite3VdbeMemInit(tls, &_2_c1, (*Xsqlite3)(_pMem1.X9), uint16(i32(1)))
- _sqlite3VdbeMemInit(tls, &_2_c2, (*Xsqlite3)(_pMem1.X9), uint16(i32(1)))
- _sqlite3VdbeMemShallowCopy(tls, &_2_c1, _pMem1, i32(4096))
- _sqlite3VdbeMemShallowCopy(tls, &_2_c2, _pMem2, i32(4096))
- _2_v1 = _sqlite3ValueText(tls, &_2_c1, _pColl.X1)
+ if int32(_pMem1.Xenc) == int32(_pColl.Xenc) {
+ return _pColl.XxCmp(tls, _pColl.XpUser, _pMem1.Xn, unsafe.Pointer(_pMem1.Xz), _pMem2.Xn, unsafe.Pointer(_pMem2.Xz))
+ }
+ _sqlite3VdbeMemInit(tls, &_2_c1, (*Xsqlite3)(_pMem1.Xdb), uint16(1))
+ _sqlite3VdbeMemInit(tls, &_2_c2, (*Xsqlite3)(_pMem1.Xdb), uint16(1))
+ _sqlite3VdbeMemShallowCopy(tls, &_2_c1, _pMem1, int32(4096))
+ _sqlite3VdbeMemShallowCopy(tls, &_2_c2, _pMem2, int32(4096))
+ _2_v1 = _sqlite3ValueText(tls, &_2_c1, _pColl.Xenc)
_2_n1 = func() int32 {
if _2_v1 == nil {
- return i32(0)
+ return int32(0)
}
- return (_2_c1.X4)
+ return _2_c1.Xn
}()
- _2_v2 = _sqlite3ValueText(tls, &_2_c2, _pColl.X1)
+ _2_v2 = _sqlite3ValueText(tls, &_2_c2, _pColl.Xenc)
_2_n2 = func() int32 {
if _2_v2 == nil {
- return i32(0)
+ return int32(0)
}
- return (_2_c2.X4)
+ return _2_c2.Xn
}()
- _2_rc = (_pColl.X3)(tls, _pColl.X2, _2_n1, _2_v1, _2_n2, _2_v2)
+ _2_rc = _pColl.XxCmp(tls, _pColl.XpUser, _2_n1, _2_v1, _2_n2, _2_v2)
if ((_2_v1 == nil) || (_2_v2 == nil)) && (_prcErr != nil) {
- *_prcErr = uint8(_sqlite3NomemError(tls, i32(75166)))
+ *_prcErr = uint8(_sqlite3NomemError(tls, int32(75166)))
}
_sqlite3VdbeMemRelease(tls, &_2_c1)
_sqlite3VdbeMemRelease(tls, &_2_c2)
return _2_rc
-
- _ = _2_c1
- _ = _2_c2
- panic(0)
}
-// Initialize bulk memory to be a consistent Mem object.
-//
-// The minimum amount of initialization feasible is performed.
+// C comment
+// /*
+// ** Initialize bulk memory to be a consistent Mem object.
+// **
+// ** The minimum amount of initialization feasible is performed.
+// */
func _sqlite3VdbeMemInit(tls *crt.TLS, _pMem *XMem, _db *Xsqlite3, _flags uint16) {
func() {
- if (int32(_flags) & i32(-33280)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70341), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemInitØ00__func__Ø000))), unsafe.Pointer(str(73610)))
+ if (int32(_flags) & int32(-33280)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70341), unsafe.Pointer(&_sqlite3VdbeMemInitØ00__func__Ø000), unsafe.Pointer(str(71772)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = _flags
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMem.X9))))) = _db
- *(*int32)(unsafe.Pointer(&(_pMem.X7))) = i32(0)
+ _pMem.Xflags = _flags
+ *(**Xsqlite3)(unsafe.Pointer(&_pMem.Xdb)) = _db
+ _pMem.XszMalloc = int32(0)
}
var _sqlite3VdbeMemInitØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemInitØ00__func__Ø000[0], str(73637), 19)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemInitØ00__func__Ø000[0], str(71799), 19)
}
-// Compare two blobs. Return negative, zero, or positive if the first
-// is less than, equal to, or greater than the second, respectively.
-// If one blob is a prefix of the other, then the shorter is the lessor.
+// C comment
+// /*
+// ** Compare two blobs. Return negative, zero, or positive if the first
+// ** is less than, equal to, or greater than the second, respectively.
+// ** If one blob is a prefix of the other, then the shorter is the lessor.
+// */
func _sqlite3BlobCompare(tls *crt.TLS, _pB1 *XMem, _pB2 *XMem) (r0 int32) {
var _c, _n1, _n2 int32
- _n1 = _pB1.X4
- _n2 = _pB2.X4
+ _n1 = _pB1.Xn
+ _n2 = _pB2.Xn
func() {
- if (int32(_pB1.X1)&i32(16384)) != i32(0) && _n1 != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75199), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BlobCompareØ00__func__Ø000))), unsafe.Pointer(str(73656)))
+ if (int32(_pB1.Xflags)&int32(16384)) != int32(0) && _n1 != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75199), unsafe.Pointer(&_sqlite3BlobCompareØ00__func__Ø000), unsafe.Pointer(str(71818)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pB2.X1)&i32(16384)) != i32(0) && _n2 != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75200), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BlobCompareØ00__func__Ø000))), unsafe.Pointer(str(73692)))
+ if (int32(_pB2.Xflags)&int32(16384)) != int32(0) && _n2 != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75200), unsafe.Pointer(&_sqlite3BlobCompareØ00__func__Ø000), unsafe.Pointer(str(71854)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_pB1.X1) | int32(_pB2.X1)) & i32(16384)) == 0 {
+ if ((int32(_pB1.Xflags) | int32(_pB2.Xflags)) & int32(16384)) == 0 {
goto _6
}
- if ((int32(_pB1.X1) & int32(_pB2.X1)) & i32(16384)) != 0 {
- return (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pB1.X0)))))) - (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pB2.X0))))))
+ if ((int32(_pB1.Xflags) & int32(_pB2.Xflags)) & int32(16384)) != 0 {
+ return (*(*int32)(unsafe.Pointer(&_pB1.Xu))) - (*(*int32)(unsafe.Pointer(&_pB2.Xu)))
}
- if (int32(_pB1.X1) & i32(16384)) == 0 {
+ if (int32(_pB1.Xflags) & int32(16384)) == 0 {
goto _9
}
- if _isAllZero(tls, _pB2.X5, _pB2.X4) == 0 {
- return i32(-1)
+ if _isAllZero(tls, _pB2.Xz, _pB2.Xn) == 0 {
+ return int32(-1)
}
- return (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pB1.X0)))))) - _n2
+ return (*(*int32)(unsafe.Pointer(&_pB1.Xu))) - _n2
_9:
- if _isAllZero(tls, _pB1.X5, _pB1.X4) == 0 {
- return i32(1)
+ if _isAllZero(tls, _pB1.Xz, _pB1.Xn) == 0 {
+ return int32(1)
}
- return _n1 - (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pB2.X0))))))
+ return _n1 - (*(*int32)(unsafe.Pointer(&_pB2.Xu)))
_6:
- _c = crt.Xmemcmp(tls, (unsafe.Pointer)(_pB1.X5), (unsafe.Pointer)(_pB2.X5), uint32(func() int32 {
+ _c = crt.Xmemcmp(tls, unsafe.Pointer(_pB1.Xz), unsafe.Pointer(_pB2.Xz), uint32(func() int32 {
if _n1 > _n2 {
return _n2
}
@@ -55207,25 +54959,28 @@ _6:
var _sqlite3BlobCompareØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BlobCompareØ00__func__Ø000[0], str(73728), 19)
+ crt.Xstrncpy(nil, &_sqlite3BlobCompareØ00__func__Ø000[0], str(71890), 19)
}
-// The input pBlob is guaranteed to be a Blob that is not marked
-// with MEM_Zero. Return true if it could be a zero-blob.
+// C comment
+// /*
+// ** The input pBlob is guaranteed to be a Blob that is not marked
+// ** with MEM_Zero. Return true if it could be a zero-blob.
+// */
func _isAllZero(tls *crt.TLS, _z *int8, _n int32) (r0 int32) {
var _i int32
- _i = i32(0)
+ _i = int32(0)
_0:
if _i >= _n {
goto _3
}
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) != 0 {
- return i32(0)
+ if (*elem1(_z, uintptr(_i))) != 0 {
+ return int32(0)
}
_i += 1
goto _0
_3:
- return i32(1)
+ return int32(1)
}
var _sqlite3VdbeExecØ00and_logicØ002 [9]uint8
@@ -55240,112 +54995,120 @@ func init() {
_sqlite3VdbeExecØ00or_logicØ003 = [9]uint8{0, 1, 2, 1, 1, 1, 2, 1, 2}
}
-// Make sure the cursor p is ready to read or write the row to which it
-// was last positioned. Return an error code if an OOM fault or I/O error
-// prevents us from positioning the cursor to its correct position.
-//
-// If a MoveTo operation is pending on the given cursor, then do that
-// MoveTo now. If no move is pending, check to see if the row has been
-// deleted out from under the cursor and if it has, mark the row as
-// a NULL row.
-//
-// If the cursor is already pointing to the correct row and that row has
-// not been deleted out from under the cursor, then this routine is a no-op.
+// C comment
+// /*
+// ** Make sure the cursor p is ready to read or write the row to which it
+// ** was last positioned. Return an error code if an OOM fault or I/O error
+// ** prevents us from positioning the cursor to its correct position.
+// **
+// ** If a MoveTo operation is pending on the given cursor, then do that
+// ** MoveTo now. If no move is pending, check to see if the row has been
+// ** deleted out from under the cursor and if it has, mark the row as
+// ** a NULL row.
+// **
+// ** If the cursor is already pointing to the correct row and that row has
+// ** not been deleted out from under the cursor, then this routine is a no-op.
+// */
func _sqlite3VdbeCursorMoveto(tls *crt.TLS, _pp **XVdbeCursor, _piCol *int32) (r0 int32) {
var _2_iMap int32
var _p *XVdbeCursor
_p = *_pp
- if int32(_p.X0) != i32(0) {
+ if int32(_p.XeCurType) != int32(0) {
goto _0
}
- if (_p.X3) == 0 {
+ if _p.XdeferredMoveto == 0 {
goto _1
}
- if ((_p.X10) != nil) && (store1(&_2_iMap, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X10)) + 4*uintptr(i32(1)+(*_piCol))))) > i32(0)) {
- *_pp = (*XVdbeCursor)(_p.X13)
- *_piCol = _2_iMap - i32(1)
- return i32(0)
+ if (_p.XaAltMap != nil) && (store2(&_2_iMap, *elem8(_p.XaAltMap, uintptr(int32(1)+(*_piCol)))) > int32(0)) {
+ *_pp = (*XVdbeCursor)(_p.XpAltCursor)
+ *_piCol = _2_iMap - int32(1)
+ return int32(0)
}
return _handleDeferredMoveto(tls, _p)
_1:
- if _sqlite3BtreeCursorHasMoved(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_p.X14))))))) != 0 {
+ if _sqlite3BtreeCursorHasMoved(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xuc)))) != 0 {
return _handleMovedCursor(tls, _p)
}
_0:
- return i32(0)
+ return int32(0)
}
-// The cursor "p" has a pending seek operation that has not yet been
-// carried out. Seek the cursor now. If an error occurs, return
-// the appropriate error code.
+// C comment
+// /*
+// ** The cursor "p" has a pending seek operation that has not yet been
+// ** carried out. Seek the cursor now. If an error occurs, return
+// ** the appropriate error code.
+// */
func _handleDeferredMoveto(tls *crt.TLS, _p *XVdbeCursor) (r0 int32) {
var _res, _rc int32
func() {
- if (_p.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74477), unsafe.Pointer((*int8)(unsafe.Pointer(&_handleDeferredMovetoØ00__func__Ø000))), unsafe.Pointer(str(73747)))
+ if _p.XdeferredMoveto == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74477), unsafe.Pointer(&_handleDeferredMovetoØ00__func__Ø000), unsafe.Pointer(str(71909)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X4) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74478), unsafe.Pointer((*int8)(unsafe.Pointer(&_handleDeferredMovetoØ00__func__Ø000))), unsafe.Pointer(str(73765)))
+ if _p.XisTable == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74478), unsafe.Pointer(&_handleDeferredMovetoØ00__func__Ø000), unsafe.Pointer(str(71927)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74479), unsafe.Pointer((*int8)(unsafe.Pointer(&_handleDeferredMovetoØ00__func__Ø000))), unsafe.Pointer(str(73776)))
+ if int32(_p.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74479), unsafe.Pointer(&_handleDeferredMovetoØ00__func__Ø000), unsafe.Pointer(str(71938)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_p.X14)))))), nil, _p.X20, i32(0), &_res)
+ _rc = _sqlite3BtreeMovetoUnpacked(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xuc))), nil, _p.XmovetoTarget, int32(0), &_res)
if _rc != 0 {
return _rc
}
- if _res != i32(0) {
- return _sqlite3CorruptError(tls, i32(74482))
+ if _res != int32(0) {
+ return _sqlite3CorruptError(tls, int32(74482))
}
- *(*uint8)(unsafe.Pointer(&(_p.X3))) = uint8(i32(0))
- *(*uint32)(unsafe.Pointer(&(_p.X11))) = uint32(i32(0))
- return i32(0)
+ _p.XdeferredMoveto = 0
+ _p.XcacheStatus = 0
+ return int32(0)
}
var _handleDeferredMovetoØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_handleDeferredMovetoØ00__func__Ø000[0], str(73803), 21)
-}
-
-// Move the cursor so that it points to an entry near the key
-// specified by pIdxKey or intKey. Return a success code.
-//
-// For INTKEY tables, the intKey parameter is used. pIdxKey
-// must be NULL. For index tables, pIdxKey is used and intKey
-// is ignored.
-//
-// If an exact match is not found, then the cursor is always
-// left pointing at a leaf page which would hold the entry if it
-// were present. The cursor might point to an entry that comes
-// before or after the key.
-//
-// An integer is written into *pRes which is the result of
-// comparing the key with the entry to which the cursor is
-// pointing. The meaning of the integer written into
-// *pRes is as follows:
-//
-// *pRes<0 The cursor is left pointing at an entry that
-// is smaller than intKey/pIdxKey or if the table is empty
-// and the cursor is therefore left point to nothing.
-//
-// *pRes==0 The cursor is left pointing at an entry that
-// exactly matches intKey/pIdxKey.
-//
-// *pRes>0 The cursor is left pointing at an entry that
-// is larger than intKey/pIdxKey.
-//
-// For index tables, the pIdxKey->eqSeen field is set to 1 if there
-// exists an entry in the table that exactly matches pIdxKey.
+ crt.Xstrncpy(nil, &_handleDeferredMovetoØ00__func__Ø000[0], str(71965), 21)
+}
+
+// C comment
+// /* Move the cursor so that it points to an entry near the key
+// ** specified by pIdxKey or intKey. Return a success code.
+// **
+// ** For INTKEY tables, the intKey parameter is used. pIdxKey
+// ** must be NULL. For index tables, pIdxKey is used and intKey
+// ** is ignored.
+// **
+// ** If an exact match is not found, then the cursor is always
+// ** left pointing at a leaf page which would hold the entry if it
+// ** were present. The cursor might point to an entry that comes
+// ** before or after the key.
+// **
+// ** An integer is written into *pRes which is the result of
+// ** comparing the key with the entry to which the cursor is
+// ** pointing. The meaning of the integer written into
+// ** *pRes is as follows:
+// **
+// ** *pRes<0 The cursor is left pointing at an entry that
+// ** is smaller than intKey/pIdxKey or if the table is empty
+// ** and the cursor is therefore left point to nothing.
+// **
+// ** *pRes==0 The cursor is left pointing at an entry that
+// ** exactly matches intKey/pIdxKey.
+// **
+// ** *pRes>0 The cursor is left pointing at an entry that
+// ** is larger than intKey/pIdxKey.
+// **
+// ** For index tables, the pIdxKey->eqSeen field is set to 1 if there
+// ** exists an entry in the table that exactly matches pIdxKey.
+// */
func _sqlite3BtreeMovetoUnpacked(tls *crt.TLS, _pCur *XBtCursor, _pIdxKey *XUnpackedRecord, _intKey int64, _biasRight int32, _pRes *int32) (r0 int32) {
var _rc, _12_lwr, _12_upr, _12_idx, _12_c, _25_nCell int32
var _14_nCellKey int64
@@ -55356,62 +55119,62 @@ func _sqlite3BtreeMovetoUnpacked(tls *crt.TLS, _pCur *XBtCursor, _pIdxKey *XUnpa
var _xRecordCompare func(*crt.TLS, int32, unsafe.Pointer, *XUnpackedRecord) int32
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64180), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64180), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.X0).X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64181), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(73849)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.XpBtree).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64181), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72011)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pRes == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64182), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(73893)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64182), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72055)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pIdxKey == nil) != ((*XKeyInfo)(_pCur.X18) == nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64183), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(73898)))
+ if (_pIdxKey == nil) != ((*XKeyInfo)(_pCur.XpKeyInfo) == nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64183), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72060)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) == i32(1) && (_pIdxKey == nil) != (int32(_pCur.X15) != i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64184), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(73932)))
+ if int32(_pCur.XeState) == int32(1) && (_pIdxKey == nil) != (int32(_pCur.XcurIntKey) != int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64184), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72094)))
crt.X__builtin_abort(tls)
}
}()
- if _pIdxKey != nil || int32(_pCur.X12) != i32(1) || (int32(_pCur.X10)&i32(2)) == i32(0) {
+ if _pIdxKey != nil || int32(_pCur.XeState) != int32(1) || (int32(_pCur.XcurFlags)&int32(2)) == int32(0) {
goto _13
}
- if ((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0) == _intKey {
- *_pRes = i32(0)
- return i32(0)
+ if (_pCur.Xinfo.XnKey) == _intKey {
+ *_pRes = int32(0)
+ return int32(0)
}
- if ((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0) >= _intKey {
+ if (_pCur.Xinfo.XnKey) >= _intKey {
goto _15
}
- if (int32(_pCur.X10) & i32(8)) != i32(0) {
- *_pRes = i32(-1)
- return i32(0)
+ if (int32(_pCur.XcurFlags) & int32(8)) != int32(0) {
+ *_pRes = int32(-1)
+ return int32(0)
}
- if (((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0)+int64(i32(1))) != _intKey || (_pCur.X9) != 0 {
+ if ((_pCur.Xinfo.XnKey)+int64(1)) != _intKey || _pCur.XskipNext != 0 {
goto _18
}
- *_pRes = i32(0)
+ *_pRes = int32(0)
_rc = _sqlite3BtreeNext(tls, _pCur, _pRes)
if _rc != 0 {
return _rc
}
- if (*_pRes) != i32(0) {
+ if (*_pRes) != int32(0) {
goto _20
}
_getCellInfo(tls, _pCur)
- if ((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0) == _intKey {
- return i32(0)
+ if (_pCur.Xinfo.XnKey) == _intKey {
+ return int32(0)
}
_20:
_18:
@@ -55419,10 +55182,10 @@ _15:
_13:
if _pIdxKey != nil {
_xRecordCompare = _sqlite3VdbeFindCompare(tls, _pIdxKey)
- *(*uint8)(unsafe.Pointer(&(_pIdxKey.X4))) = uint8(i32(0))
+ _pIdxKey.XerrCode = 0
func() {
- if int32(_pIdxKey.X3) != i32(1) && int32(_pIdxKey.X3) != i32(0) && int32(_pIdxKey.X3) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64221), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(73997)))
+ if int32(_pIdxKey.Xdefault_rc) != int32(1) && int32(_pIdxKey.Xdefault_rc) != int32(0) && int32(_pIdxKey.Xdefault_rc) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64221), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72159)))
crt.X__builtin_abort(tls)
}
}()
@@ -55435,87 +55198,83 @@ _27:
return _rc
}
func() {
- if (_pCur.X7) != uint32(i32(0)) && (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64233), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74073)))
+ if _pCur.XpgnoRoot != (0) && (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64233), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCur.X7) != uint32(i32(0)) && ((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X0) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64234), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74120)))
+ if _pCur.XpgnoRoot != (0) && ((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XisInit) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64234), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72282)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(0) && int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64235), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74175)))
+ if int32(_pCur.XeState) != int32(0) && int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64235), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72337)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pCur.X12) == i32(0) {
- *_pRes = i32(-1)
+ if int32(_pCur.XeState) == int32(0) {
+ *_pRes = int32(-1)
func() {
- if (_pCur.X7) != uint32(i32(0)) && int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64238), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74242)))
+ if _pCur.XpgnoRoot != (0) && int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64238), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72404)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
}
func() {
- if int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(i32(0))))).X2) != int32(_pCur.X15) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64241), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74299)))
+ if int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), 0)).XintKey) != int32(_pCur.XcurIntKey) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64241), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72461)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCur.X15) == 0 && _pIdxKey == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64242), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74340)))
+ if _pCur.XcurIntKey == 0 && _pIdxKey == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64242), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72502)))
crt.X__builtin_abort(tls)
}
}()
_47:
- _12_pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
+ _12_pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
func() {
- if int32(_12_pPage.X14) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64255), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74367)))
+ if int32(_12_pPage.XnCell) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64255), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72529)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_12_pPage.X2) != bool2int(_pIdxKey == nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64256), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74382)))
+ if int32(_12_pPage.XintKey) != bool2int(_pIdxKey == nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64256), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72544)))
crt.X__builtin_abort(tls)
}
}()
- _12_lwr = i32(0)
- _12_upr = int32(_12_pPage.X14) - i32(1)
+ _12_lwr = int32(0)
+ _12_upr = int32(_12_pPage.XnCell) - int32(1)
func() {
- if _biasRight != i32(0) && _biasRight != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64259), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74410)))
+ if _biasRight != int32(0) && _biasRight != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64259), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72572)))
crt.X__builtin_abort(tls)
}
}()
- _12_idx = _12_upr >> uint(i32(1)-_biasRight)
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(_12_idx)
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32, unsafe.Pointer, *XUnpackedRecord) int32
- }{_xRecordCompare})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32, unsafe.Pointer, *XUnpackedRecord) int32
- }{nil})) {
+ _12_idx = _12_upr >> uint(int32(1)-_biasRight)
+ _pCur.Xix = uint16(_12_idx)
+ if _xRecordCompare != nil {
goto _57
}
_58:
- _12_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_12_pPage.X22)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_12_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pPage.X21))+1*uintptr(i32(2)*_12_idx))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pPage.X21))+1*uintptr(i32(2)*_12_idx))))) + 1*uintptr(i32(1)))))))))))))
- if (_12_pPage.X3) == 0 {
+ _12_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_12_pPage.XaDataOfst)) + uintptr(int32(_12_pPage.XmaskPage)&((int32(*elem15(elem15(_12_pPage.XaCellIdx, uintptr(int32(2)*_12_idx)), 0))<<8)|int32(*elem15(elem15(_12_pPage.XaCellIdx, uintptr(int32(2)*_12_idx)), uintptr(1)))))))
+ if _12_pPage.XintKeyLeaf == 0 {
goto _61
}
_62:
- if i32(128) > int32(*postInc13(&_12_pCell, 1)) {
+ if int32(128) > int32(*postInc15(&_12_pCell, 1)) {
goto _63
}
- if uintptr(unsafe.Pointer(_12_pCell)) >= uintptr(unsafe.Pointer(_12_pPage.X20)) {
- return _sqlite3CorruptError(tls, i32(64268))
+ if crt.P2U(unsafe.Pointer(_12_pCell)) >= crt.P2U(unsafe.Pointer(_12_pPage.XaDataEnd)) {
+ return _sqlite3CorruptError(tls, int32(64268))
}
goto _62
_63:
@@ -55524,9 +55283,9 @@ _61:
if _14_nCellKey >= _intKey {
goto _65
}
- _12_lwr = _12_idx + i32(1)
+ _12_lwr = _12_idx + int32(1)
if _12_lwr > _12_upr {
- _12_c = i32(-1)
+ _12_c = int32(-1)
goto _60
}
goto _70
@@ -55534,77 +55293,76 @@ _65:
if _14_nCellKey <= _intKey {
goto _68
}
- _12_upr = _12_idx - i32(1)
+ _12_upr = _12_idx - int32(1)
if _12_lwr > _12_upr {
- _12_c = i32(1)
+ _12_c = int32(1)
goto _60
}
goto _70
_68:
func() {
if _14_nCellKey != _intKey {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64279), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74439)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64279), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72601)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(_12_idx)
- if (_12_pPage.X5) == 0 {
+ _pCur.Xix = uint16(_12_idx)
+ if _12_pPage.Xleaf == 0 {
_12_lwr = _12_idx
goto _moveto_next_layer
}
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) | i32(2))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) | int32(2))
}
- *(*int64)(unsafe.Pointer(&((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0))) = _14_nCellKey
- *(*uint16)(unsafe.Pointer(&((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4))) = uint16(i32(0))
- *_pRes = i32(0)
- return i32(0)
+ _pCur.Xinfo.XnKey = _14_nCellKey
+ _pCur.Xinfo.XnSize = 0
+ *_pRes = int32(0)
+ return int32(0)
_70:
func() {
- if (_12_lwr + _12_upr) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64292), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74456)))
+ if (_12_lwr + _12_upr) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64292), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72618)))
crt.X__builtin_abort(tls)
}
}()
- _12_idx = (_12_lwr + _12_upr) >> uint(i32(1))
+ _12_idx = (_12_lwr + _12_upr) >> 1
goto _58
_60:
goto _77
_57:
_78:
- _12_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_12_pPage.X22)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_12_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pPage.X21))+1*uintptr(i32(2)*_12_idx))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pPage.X21))+1*uintptr(i32(2)*_12_idx))))) + 1*uintptr(i32(1)))))))))))))
- _25_nCell = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pCell)) + 1*uintptr(i32(0)))))
- if _25_nCell <= int32(_12_pPage.X8) {
- _12_c = _xRecordCompare(tls, _25_nCell, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pCell))+1*uintptr(i32(1))))), _pIdxKey)
+ _12_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_12_pPage.XaDataOfst)) + uintptr(int32(_12_pPage.XmaskPage)&((int32(*elem15(elem15(_12_pPage.XaCellIdx, uintptr(int32(2)*_12_idx)), 0))<<8)|int32(*elem15(elem15(_12_pPage.XaCellIdx, uintptr(int32(2)*_12_idx)), uintptr(1)))))))
+ _25_nCell = int32(*elem15(_12_pCell, 0))
+ if _25_nCell <= int32(_12_pPage.Xmax1bytePayload) {
+ _12_c = _xRecordCompare(tls, _25_nCell, unsafe.Pointer(elem15(_12_pCell, uintptr(1))), _pIdxKey)
goto _85
}
- if ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pCell)) + 1*uintptr(i32(1))))) & i32(128)) == 0) && (store1(&_25_nCell, ((_25_nCell&i32(127))<<uint(i32(7)))+int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pCell)) + 1*uintptr(i32(1)))))) <= int32(_12_pPage.X10)) {
- _12_c = _xRecordCompare(tls, _25_nCell, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pCell))+1*uintptr(i32(2))))), _pIdxKey)
+ if ((int32(*elem15(_12_pCell, uintptr(1))) & int32(128)) == 0) && (store2(&_25_nCell, ((_25_nCell&int32(127))<<7)+int32(*elem15(_12_pCell, uintptr(1)))) <= int32(_12_pPage.XmaxLocal)) {
+ _12_c = _xRecordCompare(tls, _25_nCell, unsafe.Pointer(elem15(_12_pCell, uintptr(2))), _pIdxKey)
goto _85
}
- _28_pCellBody = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_12_pCell)) - uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_12_pPage.X7)))))))
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_12_pPage.X25)})))(tls, _12_pPage, _28_pCellBody, (*XCellInfo)(unsafe.Pointer(&(_pCur.X4))))
- _25_nCell = int32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0)
- if _25_nCell < i32(2) {
- _rc = _sqlite3CorruptError(tls, i32(64341))
+ _28_pCellBody = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_12_pCell)) - uintptr(_12_pPage.XchildPtrSize)))
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _12_pPage.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _12_pPage, _28_pCellBody, &_pCur.Xinfo)
+ _25_nCell = int32(_pCur.Xinfo.XnKey)
+ if _25_nCell < int32(2) {
+ _rc = _sqlite3CorruptError(tls, int32(64341))
goto _moveto_finish
}
- _28_pCellKey = _sqlite3Malloc(tls, uint64(_25_nCell+i32(18)))
+ _28_pCellKey = _sqlite3Malloc(tls, uint64(_25_nCell+int32(18)))
if _28_pCellKey == nil {
- _rc = _sqlite3NomemError(tls, i32(64346))
+ _rc = _sqlite3NomemError(tls, int32(64346))
goto _moveto_finish
}
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(_12_idx)
- _rc = _accessPayload(tls, _pCur, uint32(i32(0)), uint32(_25_nCell), (*uint8)(_28_pCellKey), i32(0))
+ _pCur.Xix = uint16(_12_idx)
+ _rc = _accessPayload(tls, _pCur, 0, uint32(_25_nCell), (*uint8)(_28_pCellKey), int32(0))
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-5))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-5))
}
if _rc != 0 {
Xsqlite3_free(tls, _28_pCellKey)
@@ -55614,30 +55372,30 @@ _78:
Xsqlite3_free(tls, _28_pCellKey)
_85:
func() {
- if int32(_pIdxKey.X4) == i32(11) && _12_c != i32(0) || int32(_pIdxKey.X4) == i32(7) && ((*Xsqlite3)((*XBtree)(_pCur.X0).X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64359), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74467)))
+ if int32(_pIdxKey.XerrCode) == int32(11) && _12_c != int32(0) || int32(_pIdxKey.XerrCode) == int32(7) && ((*Xsqlite3)((*XBtree)(_pCur.XpBtree).Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64359), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72629)))
crt.X__builtin_abort(tls)
}
}()
- if _12_c < i32(0) {
- _12_lwr = _12_idx + i32(1)
+ if _12_c < int32(0) {
+ _12_lwr = _12_idx + int32(1)
goto _97
}
- if _12_c > i32(0) {
- _12_upr = _12_idx - i32(1)
+ if _12_c > int32(0) {
+ _12_upr = _12_idx - int32(1)
goto _97
}
func() {
- if _12_c != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64368), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74580)))
+ if _12_c != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64368), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72742)))
crt.X__builtin_abort(tls)
}
}()
- *_pRes = i32(0)
- _rc = i32(0)
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(_12_idx)
- if (_pIdxKey.X4) != 0 {
- _rc = i32(11)
+ *_pRes = int32(0)
+ _rc = int32(0)
+ _pCur.Xix = uint16(_12_idx)
+ if _pIdxKey.XerrCode != 0 {
+ _rc = int32(11)
}
goto _moveto_finish
_97:
@@ -55645,135 +55403,136 @@ _97:
goto _80
}
func() {
- if (_12_lwr + _12_upr) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64376), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74456)))
+ if (_12_lwr + _12_upr) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64376), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72618)))
crt.X__builtin_abort(tls)
}
}()
- _12_idx = (_12_lwr + _12_upr) >> uint(i32(1))
+ _12_idx = (_12_lwr + _12_upr) >> 1
goto _78
_80:
_77:
func() {
- if _12_lwr != (_12_upr+i32(1)) && ((_12_pPage.X2) == 0 || (_12_pPage.X5) != 0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64380), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74585)))
+ if _12_lwr != (_12_upr+int32(1)) && (_12_pPage.XintKey == 0 || _12_pPage.Xleaf != 0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64380), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72747)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_12_pPage.X0) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64381), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74631)))
+ if _12_pPage.XisInit == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64381), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72793)))
crt.X__builtin_abort(tls)
}
}()
- if (_12_pPage.X5) != 0 {
+ if _12_pPage.Xleaf != 0 {
func() {
- if int32(_pCur.X16) >= int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64383), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(10597)))
+ if int32(_pCur.Xix) >= int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64383), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(10552)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(_12_idx)
+ _pCur.Xix = uint16(_12_idx)
*_pRes = _12_c
- _rc = i32(0)
+ _rc = int32(0)
goto _moveto_finish
}
_moveto_next_layer:
- if _12_lwr >= int32(_12_pPage.X14) {
- _12_chldPg = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pPage.X19))+1*uintptr(int32(_12_pPage.X6)+i32(8)))))
+ if _12_lwr >= int32(_12_pPage.XnCell) {
+ _12_chldPg = _sqlite3Get4byte(tls, elem15(_12_pPage.XaData, uintptr(int32(_12_pPage.XhdrOffset)+int32(8))))
goto _114
}
- _12_chldPg = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_12_pPage.X19))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_12_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pPage.X21))+1*uintptr(i32(2)*_12_lwr))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pPage.X21))+1*uintptr(i32(2)*_12_lwr))))) + 1*uintptr(i32(1))))))))))))))
+ _12_chldPg = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_12_pPage.XaData))+uintptr(int32(_12_pPage.XmaskPage)&((int32(*elem15(elem15(_12_pPage.XaCellIdx, uintptr(int32(2)*_12_lwr)), 0))<<8)|int32(*elem15(elem15(_12_pPage.XaCellIdx, uintptr(int32(2)*_12_lwr)), uintptr(1))))))))
_114:
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(_12_lwr)
+ _pCur.Xix = uint16(_12_lwr)
_rc = _moveToChild(tls, _pCur, _12_chldPg)
if _rc != 0 {
goto _moveto_finish
}
goto _47
_moveto_finish:
- *(*uint16)(unsafe.Pointer(&((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4))) = uint16(i32(0))
+ _pCur.Xinfo.XnSize = 0
func() {
- if (int32(_pCur.X10) & i32(4)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64401), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000))), unsafe.Pointer(str(74645)))
+ if (int32(_pCur.XcurFlags) & int32(4)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64401), unsafe.Pointer(&_sqlite3BtreeMovetoUnpackedØ00__func__Ø000), unsafe.Pointer(str(72807)))
crt.X__builtin_abort(tls)
}
}()
return _rc
}
-// Verify that the cursor and the BtShared agree about what is the current
-// database connetion. This is important in shared-cache mode. If the database
-// connection pointers get out-of-sync, it is possible for routines like
-// btreeInitPage() to reference an stale connection pointer that references a
-// a connection that has already closed. This routine is used inside assert()
-// statements only and for the purpose of double-checking that the btree code
-// does keep the database connection pointers up-to-date.
+// C comment
+// /* Verify that the cursor and the BtShared agree about what is the current
+// ** database connetion. This is important in shared-cache mode. If the database
+// ** connection pointers get out-of-sync, it is possible for routines like
+// ** btreeInitPage() to reference an stale connection pointer that references a
+// ** a connection that has already closed. This routine is used inside assert()
+// ** statements only and for the purpose of double-checking that the btree code
+// ** does keep the database connection pointers up-to-date.
+// */
func _cursorOwnsBtShared(tls *crt.TLS, _p *XBtCursor) (r0 int32) {
func() {
if _cursorHoldsMutex(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59497), unsafe.Pointer((*int8)(unsafe.Pointer(&_cursorOwnsBtSharedØ00__func__Ø000))), unsafe.Pointer(str(74682)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59497), unsafe.Pointer(&_cursorOwnsBtSharedØ00__func__Ø000), unsafe.Pointer(str(72844)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int((*Xsqlite3)((*XBtree)(_p.X0).X0) == (*Xsqlite3)((*XBtShared)(_p.X1).X1))
+ return bool2int((*Xsqlite3)((*XBtree)(_p.XpBtree).Xdb) == (*Xsqlite3)((*XBtShared)(_p.XpBt).Xdb))
}
var _cursorOwnsBtSharedØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_cursorOwnsBtSharedØ00__func__Ø000[0], str(74702), 19)
+ crt.Xstrncpy(nil, &_cursorOwnsBtSharedØ00__func__Ø000[0], str(72864), 19)
}
var _sqlite3BtreeMovetoUnpackedØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeMovetoUnpackedØ00__func__Ø000[0], str(74721), 27)
+ crt.Xstrncpy(nil, &_sqlite3BtreeMovetoUnpackedØ00__func__Ø000[0], str(72883), 27)
}
func _sqlite3BtreeNext(tls *crt.TLS, _pCur *XBtCursor, _pRes *int32) (r0 int32) {
var _pPage *XMemPage
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64535), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeNextØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64535), unsafe.Pointer(&_sqlite3BtreeNextØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pRes == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64536), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeNextØ00__func__Ø000))), unsafe.Pointer(str(74748)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64536), unsafe.Pointer(&_sqlite3BtreeNextØ00__func__Ø000), unsafe.Pointer(str(72910)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*_pRes) != i32(0) && (*_pRes) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64537), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeNextØ00__func__Ø000))), unsafe.Pointer(str(74756)))
+ if (*_pRes) != int32(0) && (*_pRes) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64537), unsafe.Pointer(&_sqlite3BtreeNextØ00__func__Ø000), unsafe.Pointer(str(72918)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCur.X9) != i32(0) && int32(_pCur.X12) == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64538), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeNextØ00__func__Ø000))), unsafe.Pointer(str(74777)))
+ if _pCur.XskipNext != int32(0) && int32(_pCur.XeState) == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64538), unsafe.Pointer(&_sqlite3BtreeNextØ00__func__Ø000), unsafe.Pointer(str(72939)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4))) = uint16(i32(0))
+ _pCur.Xinfo.XnSize = 0
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-7))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-7))
}
- *_pRes = i32(0)
- if int32(_pCur.X12) != i32(1) {
+ *_pRes = int32(0)
+ if int32(_pCur.XeState) != int32(1) {
return _btreeNext(tls, _pCur, _pRes)
}
- _pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
- if int32(preInc14((*uint16)(unsafe.Pointer(&(_pCur.X16))), uint16(1))) >= int32(_pPage.X14) {
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) -= 1
+ _pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
+ if int32(preInc76(&_pCur.Xix, uint16(1))) >= int32(_pPage.XnCell) {
+ _pCur.Xix -= 1
return _btreeNext(tls, _pCur, _pRes)
}
- if (_pPage.X5) != 0 {
- return i32(0)
+ if _pPage.Xleaf != 0 {
+ return int32(0)
}
return _moveToLeftmost(tls, _pCur)
}
@@ -55781,127 +55540,130 @@ func _sqlite3BtreeNext(tls *crt.TLS, _pCur *XBtCursor, _pRes *int32) (r0 int32)
var _sqlite3BtreeNextØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeNextØ00__func__Ø000[0], str(74825), 17)
-}
-
-// Advance the cursor to the next entry in the database. If
-// successful then set *pRes=0. If the cursor
-// was already pointing to the last entry in the database before
-// this routine was called, then set *pRes=1.
-//
-// The main entry point is sqlite3BtreeNext(). That routine is optimized
-// for the common case of merely incrementing the cell counter BtCursor.aiIdx
-// to the next cell on the current page. The (slower) btreeNext() helper
-// routine is called when it is necessary to move to a different page or
-// to restore the cursor.
-//
-// The calling function will set *pRes to 0 or 1. The initial *pRes value
-// will be 1 if the cursor being stepped corresponds to an SQL index and
-// if this routine could have been skipped if that SQL index had been
-// a unique index. Otherwise the caller will have set *pRes to zero.
-// Zero is the common case. The btree implementation is free to use the
-// initial *pRes value as a hint to improve performance, but the current
-// SQLite btree implementation does not. (Note that the comdb2 btree
-// implementation does use this hint, however.)
+ crt.Xstrncpy(nil, &_sqlite3BtreeNextØ00__func__Ø000[0], str(72987), 17)
+}
+
+// C comment
+// /*
+// ** Advance the cursor to the next entry in the database. If
+// ** successful then set *pRes=0. If the cursor
+// ** was already pointing to the last entry in the database before
+// ** this routine was called, then set *pRes=1.
+// **
+// ** The main entry point is sqlite3BtreeNext(). That routine is optimized
+// ** for the common case of merely incrementing the cell counter BtCursor.aiIdx
+// ** to the next cell on the current page. The (slower) btreeNext() helper
+// ** routine is called when it is necessary to move to a different page or
+// ** to restore the cursor.
+// **
+// ** The calling function will set *pRes to 0 or 1. The initial *pRes value
+// ** will be 1 if the cursor being stepped corresponds to an SQL index and
+// ** if this routine could have been skipped if that SQL index had been
+// ** a unique index. Otherwise the caller will have set *pRes to zero.
+// ** Zero is the common case. The btree implementation is free to use the
+// ** initial *pRes value as a hint to improve performance, but the current
+// ** SQLite btree implementation does not. (Note that the comdb2 btree
+// ** implementation does use this hint, however.)
+// */
func _btreeNext(tls *crt.TLS, _pCur *XBtCursor, _pRes *int32) (r0 int32) {
var _rc, _idx int32
var _pPage *XMemPage
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64471), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeNextØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64471), unsafe.Pointer(&_btreeNextØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCur.X9) != i32(0) && int32(_pCur.X12) == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64472), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeNextØ00__func__Ø000))), unsafe.Pointer(str(74777)))
+ if _pCur.XskipNext != int32(0) && int32(_pCur.XeState) == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64472), unsafe.Pointer(&_btreeNextØ00__func__Ø000), unsafe.Pointer(str(72939)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*_pRes) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64473), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeNextØ00__func__Ø000))), unsafe.Pointer(str(74842)))
+ if (*_pRes) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64473), unsafe.Pointer(&_btreeNextØ00__func__Ø000), unsafe.Pointer(str(73004)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pCur.X12) == i32(1) {
+ if int32(_pCur.XeState) == int32(1) {
goto _7
}
func() {
- if (int32(_pCur.X10) & i32(4)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64475), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeNextØ00__func__Ø000))), unsafe.Pointer(str(74645)))
+ if (int32(_pCur.XcurFlags) & int32(4)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64475), unsafe.Pointer(&_btreeNextØ00__func__Ø000), unsafe.Pointer(str(72807)))
crt.X__builtin_abort(tls)
}
}()
_rc = func() int32 {
- if int32(_pCur.X12) >= i32(3) {
+ if int32(_pCur.XeState) >= int32(3) {
return _btreeRestoreCursorPosition(tls, _pCur)
}
- return i32(0)
+ return int32(0)
}()
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- if i32(0) == int32(_pCur.X12) {
- *_pRes = i32(1)
- return i32(0)
+ if int32(0) == int32(_pCur.XeState) {
+ *_pRes = int32(1)
+ return int32(0)
}
- if (_pCur.X9) == 0 {
+ if _pCur.XskipNext == 0 {
goto _14
}
func() {
- if int32(_pCur.X12) != i32(1) && int32(_pCur.X12) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64485), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeNextØ00__func__Ø000))), unsafe.Pointer(str(74851)))
+ if int32(_pCur.XeState) != int32(1) && int32(_pCur.XeState) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64485), unsafe.Pointer(&_btreeNextØ00__func__Ø000), unsafe.Pointer(str(73013)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(1))
- if (_pCur.X9) > i32(0) {
- *(*int32)(unsafe.Pointer(&(_pCur.X9))) = i32(0)
- return i32(0)
+ _pCur.XeState = uint8(1)
+ if _pCur.XskipNext > int32(0) {
+ _pCur.XskipNext = int32(0)
+ return int32(0)
}
- *(*int32)(unsafe.Pointer(&(_pCur.X9))) = i32(0)
+ _pCur.XskipNext = int32(0)
_14:
_7:
- _pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
- _idx = int32(preInc14((*uint16)(unsafe.Pointer(&(_pCur.X16))), uint16(1)))
+ _pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
+ _idx = int32(preInc76(&_pCur.Xix, uint16(1)))
func() {
- if (_pPage.X0) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64497), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeNextØ00__func__Ø000))), unsafe.Pointer(str(74631)))
+ if _pPage.XisInit == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64497), unsafe.Pointer(&_btreeNextØ00__func__Ø000), unsafe.Pointer(str(72793)))
crt.X__builtin_abort(tls)
}
}()
- if _idx < int32(_pPage.X14) {
+ if _idx < int32(_pPage.XnCell) {
goto _21
}
- if (_pPage.X5) != 0 {
+ if _pPage.Xleaf != 0 {
goto _22
}
- _rc = _moveToChild(tls, _pCur, _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(int32(_pPage.X6)+i32(8))))))
+ _rc = _moveToChild(tls, _pCur, _sqlite3Get4byte(tls, elem15(_pPage.XaData, uintptr(int32(_pPage.XhdrOffset)+int32(8)))))
if _rc != 0 {
return _rc
}
return _moveToLeftmost(tls, _pCur)
_22:
- if int32(_pCur.X14) == i32(0) {
- *_pRes = i32(1)
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(0))
- return i32(0)
+ if int32(_pCur.XiPage) == int32(0) {
+ *_pRes = int32(1)
+ _pCur.XeState = 0
+ return int32(0)
}
_moveToParent(tls, _pCur)
- _pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
- if int32(_pCur.X16) >= int32(_pPage.X14) {
+ _pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
+ if int32(_pCur.Xix) >= int32(_pPage.XnCell) {
goto _22
}
- if (_pPage.X2) != 0 {
+ if _pPage.XintKey != 0 {
return _sqlite3BtreeNext(tls, _pCur, _pRes)
}
- return i32(0)
+ return int32(0)
_21:
- if (_pPage.X5) != 0 {
- return i32(0)
+ if _pPage.Xleaf != 0 {
+ return int32(0)
}
return _moveToLeftmost(tls, _pCur)
}
@@ -55909,51 +55671,50 @@ _21:
var _btreeNextØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_btreeNextØ00__func__Ø000[0], str(74911), 10)
+ crt.Xstrncpy(nil, &_btreeNextØ00__func__Ø000[0], str(73073), 10)
}
-// Restore the cursor to the position it was in (or as close to as possible)
-// when saveCursorPosition() was called. Note that this call deletes the
-// saved position info stored by saveCursorPosition(), so there can be
-// at most one effective restoreCursorPosition() call after each
-// saveCursorPosition().
+// C comment
+// /*
+// ** Restore the cursor to the position it was in (or as close to as possible)
+// ** when saveCursorPosition() was called. Note that this call deletes the
+// ** saved position info stored by saveCursorPosition(), so there can be
+// ** at most one effective restoreCursorPosition() call after each
+// ** saveCursorPosition().
+// */
func _btreeRestoreCursorPosition(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
var _rc, _skipNext int32
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59832), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeRestoreCursorPositionØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59832), unsafe.Pointer(&_btreeRestoreCursorPositionØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) < i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59833), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeRestoreCursorPositionØ00__func__Ø000))), unsafe.Pointer(str(74921)))
+ if int32(_pCur.XeState) < int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59833), unsafe.Pointer(&_btreeRestoreCursorPositionØ00__func__Ø000), unsafe.Pointer(str(73083)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pCur.X12) == i32(4) {
- return _pCur.X9
+ if int32(_pCur.XeState) == int32(4) {
+ return _pCur.XskipNext
}
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(0))
- _rc = _btreeMoveto(tls, _pCur, _pCur.X6, _pCur.X5, i32(0), &_skipNext)
- if _rc != i32(0) {
+ _pCur.XeState = 0
+ _rc = _btreeMoveto(tls, _pCur, _pCur.XpKey, _pCur.XnKey, int32(0), &_skipNext)
+ if _rc != int32(0) {
goto _5
}
- Xsqlite3_free(tls, _pCur.X6)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pCur.X6))) = nil
+ Xsqlite3_free(tls, _pCur.XpKey)
+ _pCur.XpKey = nil
func() {
- if int32(_pCur.X12) != i32(1) && int32(_pCur.X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59842), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeRestoreCursorPositionØ00__func__Ø000))), unsafe.Pointer(str(74954)))
+ if int32(_pCur.XeState) != int32(1) && int32(_pCur.XeState) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59842), unsafe.Pointer(&_btreeRestoreCursorPositionØ00__func__Ø000), unsafe.Pointer(str(73116)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*int32)(unsafe.Pointer(&(_pCur.X9)))
- *p = (*p) | _skipNext
- sink1(*p)
- }
- if (_pCur.X9) != 0 && (int32(_pCur.X12) == i32(1)) {
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(2))
+ _pCur.XskipNext |= _skipNext
+ if _pCur.XskipNext != 0 && (int32(_pCur.XeState) == int32(1)) {
+ _pCur.XeState = uint8(2)
}
_5:
return _rc
@@ -55962,12 +55723,15 @@ _5:
var _btreeRestoreCursorPositionØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_btreeRestoreCursorPositionØ00__func__Ø000[0], str(75013), 27)
+ crt.Xstrncpy(nil, &_btreeRestoreCursorPositionØ00__func__Ø000[0], str(73175), 27)
}
-// In this version of BtreeMoveto, pKey is a packed index record
-// such as is generated by the OP_MakeRecord opcode. Unpack the
-// record and then call BtreeMovetoUnpacked() to do the work.
+// C comment
+// /*
+// ** In this version of BtreeMoveto, pKey is a packed index record
+// ** such as is generated by the OP_MakeRecord opcode. Unpack the
+// ** record and then call BtreeMovetoUnpacked() to do the work.
+// */
func _btreeMoveto(tls *crt.TLS, _pCur *XBtCursor, _pKey unsafe.Pointer, _nKey int64, _bias int32, _pRes *int32) (r0 int32) {
var _rc int32
var _pIdxKey *XUnpackedRecord
@@ -55976,17 +55740,17 @@ func _btreeMoveto(tls *crt.TLS, _pCur *XBtCursor, _pKey unsafe.Pointer, _nKey in
}
func() {
if _nKey != int64(int32(_nKey)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59803), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeMovetoØ00__func__Ø000))), unsafe.Pointer(str(75040)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59803), unsafe.Pointer(&_btreeMovetoØ00__func__Ø000), unsafe.Pointer(str(73202)))
crt.X__builtin_abort(tls)
}
}()
- _pIdxKey = _sqlite3VdbeAllocUnpackedRecord(tls, (*XKeyInfo)(_pCur.X18))
+ _pIdxKey = _sqlite3VdbeAllocUnpackedRecord(tls, (*XKeyInfo)(_pCur.XpKeyInfo))
if _pIdxKey == nil {
- return _sqlite3NomemError(tls, i32(59805))
+ return _sqlite3NomemError(tls, int32(59805))
}
- _sqlite3VdbeRecordUnpack(tls, (*XKeyInfo)(_pCur.X18), int32(_nKey), _pKey, _pIdxKey)
- if int32(_pIdxKey.X2) == i32(0) {
- _rc = _sqlite3CorruptError(tls, i32(59808))
+ _sqlite3VdbeRecordUnpack(tls, (*XKeyInfo)(_pCur.XpKeyInfo), int32(_nKey), _pKey, _pIdxKey)
+ if int32(_pIdxKey.XnField) == int32(0) {
+ _rc = _sqlite3CorruptError(tls, int32(59808))
goto _moveto_done
}
goto _5
@@ -55996,7 +55760,7 @@ _5:
_rc = _sqlite3BtreeMovetoUnpacked(tls, _pCur, _pIdxKey, _nKey, _bias, _pRes)
_moveto_done:
if _pIdxKey != nil {
- _sqlite3DbFree(tls, (*Xsqlite3)((*XKeyInfo)(_pCur.X18).X4), (unsafe.Pointer)(_pIdxKey))
+ _sqlite3DbFree(tls, (*Xsqlite3)((*XKeyInfo)(_pCur.XpKeyInfo).Xdb), unsafe.Pointer(_pIdxKey))
}
return _rc
}
@@ -56004,45 +55768,48 @@ _moveto_done:
var _btreeMovetoØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_btreeMovetoØ00__func__Ø000[0], str(75061), 12)
-}
-
-// This routine is used to allocate sufficient space for an UnpackedRecord
-// structure large enough to be used with sqlite3VdbeRecordUnpack() if
-// the first argument is a pointer to KeyInfo structure pKeyInfo.
-//
-// The space is either allocated using sqlite3DbMallocRaw() or from within
-// the unaligned buffer passed via the second and third arguments (presumably
-// stack space). If the former, then *ppFree is set to a pointer that should
-// be eventually freed by the caller using sqlite3DbFree(). Or, if the
-// allocation comes from the pSpace/szSpace buffer, *ppFree is set to NULL
-// before returning.
-//
-// If an OOM error occurs, NULL is returned.
+ crt.Xstrncpy(nil, &_btreeMovetoØ00__func__Ø000[0], str(73223), 12)
+}
+
+// C comment
+// /*
+// ** This routine is used to allocate sufficient space for an UnpackedRecord
+// ** structure large enough to be used with sqlite3VdbeRecordUnpack() if
+// ** the first argument is a pointer to KeyInfo structure pKeyInfo.
+// **
+// ** The space is either allocated using sqlite3DbMallocRaw() or from within
+// ** the unaligned buffer passed via the second and third arguments (presumably
+// ** stack space). If the former, then *ppFree is set to a pointer that should
+// ** be eventually freed by the caller using sqlite3DbFree(). Or, if the
+// ** allocation comes from the pSpace/szSpace buffer, *ppFree is set to NULL
+// ** before returning.
+// **
+// ** If an OOM error occurs, NULL is returned.
+// */
func _sqlite3VdbeAllocUnpackedRecord(tls *crt.TLS, _pKeyInfo *XKeyInfo) (r0 *XUnpackedRecord) {
var _nByte int32
var _p *XUnpackedRecord
- _nByte = int32(u32(16) + (u32(48) * uint32(int32(_pKeyInfo.X2)+i32(1))))
- _p = (*XUnpackedRecord)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_pKeyInfo.X4), uint64(_nByte)))
+ _nByte = int32(uint32(16) + (uint32(48) * uint32(int32(_pKeyInfo.XnField)+int32(1))))
+ _p = (*XUnpackedRecord)(_sqlite3DbMallocRaw(tls, (*Xsqlite3)(_pKeyInfo.Xdb), uint64(_nByte)))
if _p == nil {
return nil
}
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = (*XMem)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(u32(16))))))
+ *(**XMem)(unsafe.Pointer(&_p.XaMem)) = (*XMem)(unsafe.Pointer(elem1((*int8)(unsafe.Pointer(_p)), uintptr(16))))
func() {
- if (_pKeyInfo.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74948), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeAllocUnpackedRecordØ00__func__Ø000))), unsafe.Pointer(str(37852)))
+ if _pKeyInfo.XaSortOrder == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74948), unsafe.Pointer(&_sqlite3VdbeAllocUnpackedRecordØ00__func__Ø000), unsafe.Pointer(str(37807)))
crt.X__builtin_abort(tls)
}
}()
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _pKeyInfo
- *(*uint16)(unsafe.Pointer(&(_p.X2))) = uint16(int32(_pKeyInfo.X2) + i32(1))
+ *(**XKeyInfo)(unsafe.Pointer(&_p.XpKeyInfo)) = _pKeyInfo
+ _p.XnField = uint16(int32(_pKeyInfo.XnField) + int32(1))
return _p
}
var _sqlite3VdbeAllocUnpackedRecordØ00__func__Ø000 [31]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeAllocUnpackedRecordØ00__func__Ø000[0], str(75073), 31)
+ crt.Xstrncpy(nil, &_sqlite3VdbeAllocUnpackedRecordØ00__func__Ø000[0], str(73235), 31)
}
func _sqlite3VdbeRecordUnpack(tls *crt.TLS, _pKeyInfo *XKeyInfo, _nKey int32, _pKey unsafe.Pointer, _p *XUnpackedRecord) {
@@ -56052,78 +55819,73 @@ func _sqlite3VdbeRecordUnpack(tls *crt.TLS, _pKeyInfo *XKeyInfo, _nKey int32, _p
var _aKey *uint8
var _pMem *XMem
_aKey = (*uint8)(_pKey)
- _pMem = (*XMem)(_p.X1)
- *(*int8)(unsafe.Pointer(&(_p.X3))) = int8(i32(0))
+ _pMem = (*XMem)(_p.XaMem)
+ _p.Xdefault_rc = 0
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pMem))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74973), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordUnpackØ00__func__Ø000))), unsafe.Pointer(str(6321)))
+ if (int32(uintptr(unsafe.Pointer(_pMem))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74973), unsafe.Pointer(&_sqlite3VdbeRecordUnpackØ00__func__Ø000), unsafe.Pointer(str(6222)))
crt.X__builtin_abort(tls)
}
}()
_idx = uint32(uint8(func() int32 {
- if int32(*_aKey) < int32(u8(128)) {
- return func() int32 { _szHdr = uint32(*_aKey); return i32(1) }()
+ if int32(*_aKey) < int32(128) {
+ return func() int32 { _szHdr = uint32(*_aKey); return int32(1) }()
}
return int32(_sqlite3GetVarint32(tls, _aKey, &_szHdr))
}()))
_d = int32(_szHdr)
- _u = uint16(i32(0))
+ _u = 0
_4:
if _idx >= _szHdr || _d > _nKey {
goto _5
}
- {
- p := &_idx
- *p = (*p) + uint32(uint8(func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(_idx)))) < int32(u8(128)) {
- return func() int32 {
- _1_serial_type = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(_idx))))
- return i32(1)
- }()
- }
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey))+1*uintptr(_idx))), &_1_serial_type))
- }()))
- sink5(*p)
- }
- *(*uint8)(unsafe.Pointer(&(_pMem.X2))) = _pKeyInfo.X1
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMem.X9))))) = (*Xsqlite3)(_pKeyInfo.X4)
- *(*int32)(unsafe.Pointer(&(_pMem.X7))) = i32(0)
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = nil
+ _idx += uint32(uint8(func() int32 {
+ if int32(*elem15(_aKey, uintptr(_idx))) < int32(128) {
+ return func() int32 { _1_serial_type = uint32(*elem15(_aKey, uintptr(_idx))); return int32(1) }()
+ }
+ return int32(_sqlite3GetVarint32(tls, elem15(_aKey, uintptr(_idx)), &_1_serial_type))
+ }()))
+ _pMem.Xenc = _pKeyInfo.Xenc
+ *(**Xsqlite3)(unsafe.Pointer(&_pMem.Xdb)) = (*Xsqlite3)(_pKeyInfo.Xdb)
+ _pMem.XszMalloc = int32(0)
+ _pMem.Xz = nil
{
p := &_d
- *p = int32(uint32(*p) + _sqlite3VdbeSerialGet(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey))+1*uintptr(_d))), _1_serial_type, _pMem))
- sink1(*p)
+ *p = int32(uint32(*p) + _sqlite3VdbeSerialGet(tls, elem15(_aKey, uintptr(_d)), _1_serial_type, _pMem))
}
*(*uintptr)(unsafe.Pointer(&_pMem)) += uintptr(48)
- if int32(preInc14(&_u, uint16(1))) >= int32(_p.X2) {
+ if int32(preInc76(&_u, uint16(1))) >= int32(_p.XnField) {
goto _5
}
goto _4
_5:
func() {
- if int32(_u) > (int32(_pKeyInfo.X2) + i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74990), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordUnpackØ00__func__Ø000))), unsafe.Pointer(str(75104)))
+ if int32(_u) > (int32(_pKeyInfo.XnField) + int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74990), unsafe.Pointer(&_sqlite3VdbeRecordUnpackØ00__func__Ø000), unsafe.Pointer(str(73266)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_p.X2))) = _u
+ _p.XnField = _u
}
var _sqlite3VdbeRecordUnpackØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeRecordUnpackØ00__func__Ø000[0], str(75128), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeRecordUnpackØ00__func__Ø000[0], str(73290), 24)
}
-// Read a 32-bit variable-length integer from memory starting at p[0].
-// Return the number of bytes read. The value is stored in *v.
-//
-// If the varint stored in p[0] is larger than can fit in a 32-bit unsigned
-// integer, then set *v to 0xffffffff.
-//
-// A MACRO version, getVarint32, is provided which inlines the
-// single-byte case. All code should use the MACRO version as
-// this function assumes the single-byte case has already been handled.
+// C comment
+// /*
+// ** Read a 32-bit variable-length integer from memory starting at p[0].
+// ** Return the number of bytes read. The value is stored in *v.
+// **
+// ** If the varint stored in p[0] is larger than can fit in a 32-bit unsigned
+// ** integer, then set *v to 0xffffffff.
+// **
+// ** A MACRO version, getVarint32, is provided which inlines the
+// ** single-byte case. All code should use the MACRO version as
+// ** this function assumes the single-byte case has already been handled.
+// */
func _sqlite3GetVarint32(tls *crt.TLS, _p *uint8, _v *uint32) (r0 uint8) {
var _a, _b uint32
var _3_v64 uint64
@@ -56131,52 +55893,32 @@ func _sqlite3GetVarint32(tls *crt.TLS, _p *uint8, _v *uint32) (r0 uint8) {
_a = uint32(*_p)
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
_b = uint32(*_p)
- if (_b & uint32(i32(128))) == 0 {
- {
- p := &_a
- *p = (*p) & uint32(i32(127))
- sink5(*p)
- }
- _a = _a << uint(i32(7))
+ if (_b & uint32(128)) == 0 {
+ _a &= uint32(127)
+ _a = _a << 7
*_v = _a | _b
- return uint8(i32(2))
+ return uint8(2)
}
*(*uintptr)(unsafe.Pointer(&_p)) += uintptr(1)
- _a = _a << uint(i32(14))
- {
- p := &_a
- *p = (*p) | uint32(*_p)
- sink5(*p)
- }
- if (_a & uint32(i32(128))) == 0 {
- {
- p := &_a
- *p = (*p) & uint32(i32(2080895))
- sink5(*p)
- }
- {
- p := &_b
- *p = (*p) & uint32(i32(127))
- sink5(*p)
- }
- _b = _b << uint(i32(7))
+ _a = _a << 14
+ _a |= uint32(*_p)
+ if (_a & uint32(128)) == 0 {
+ _a &= uint32(2080895)
+ _b &= uint32(127)
+ _b = _b << 7
*_v = _a | _b
- return uint8(i32(3))
- }
- {
- p := &_p
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 1*uintptr(i32(2))))
- sink13(*p)
+ return uint8(3)
}
+ *(*uintptr)(unsafe.Pointer(&_p)) -= uintptr(int32(2))
_3_n = _sqlite3GetVarint(tls, _p, &_3_v64)
func() {
- if int32(_3_n) <= i32(3) || int32(_3_n) > i32(9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28722), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GetVarint32Ø00__func__Ø000))), unsafe.Pointer(str(75152)))
+ if int32(_3_n) <= int32(3) || int32(_3_n) > int32(9) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28722), unsafe.Pointer(&_sqlite3GetVarint32Ø00__func__Ø000), unsafe.Pointer(str(73314)))
crt.X__builtin_abort(tls)
}
}()
- if (_3_v64 & u64(4294967295)) != _3_v64 {
- *_v = u32(4294967295)
+ if (_3_v64 & uint64(4294967295)) != _3_v64 {
+ *_v = uint32(4294967295)
goto _6
}
*_v = uint32(_3_v64)
@@ -56187,113 +55929,113 @@ _6:
var _sqlite3GetVarint32Ø00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3GetVarint32Ø00__func__Ø000[0], str(75164), 19)
+ crt.Xstrncpy(nil, &_sqlite3GetVarint32Ø00__func__Ø000[0], str(73326), 19)
}
func _sqlite3VdbeSerialGet(tls *crt.TLS, _buf *uint8, _serial_type uint32, _pMem *XMem) (r0 uint32) {
switch _serial_type {
- case u32(0):
+ case uint32(0):
goto _1
- case u32(1):
+ case uint32(1):
goto _4
- case u32(2):
+ case uint32(2):
goto _5
- case u32(3):
+ case uint32(3):
goto _6
- case u32(4):
+ case uint32(4):
goto _7
- case u32(5):
+ case uint32(5):
goto _8
- case u32(6):
+ case uint32(6):
goto _9
- case u32(7):
+ case uint32(7):
goto _9
- case u32(8):
+ case uint32(8):
goto _11
- case u32(9):
+ case uint32(9):
goto _11
- case u32(10):
+ case uint32(10):
goto _1
- case u32(11):
+ case uint32(11):
goto _1
default:
goto _13
}
_1:
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(1))
+ _pMem.Xflags = uint16(1)
goto _14
_4:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(0))))))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- return uint32(i32(1))
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64(int8(*elem15(_buf, 0)))
+ _pMem.Xflags = uint16(4)
+ return uint32(1)
_5:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64((i32(256) * int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(0))))))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(1))))))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- return uint32(i32(2))
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64((int32(256) * int32(int8(*elem15(_buf, 0)))) | int32(*elem15(_buf, uintptr(1))))
+ _pMem.Xflags = uint16(4)
+ return uint32(2)
_6:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64(((i32(65536) * int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(0))))))) | (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(1))))) << uint(i32(8)))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(2))))))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- return uint32(i32(3))
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64(((int32(65536) * int32(int8(*elem15(_buf, 0)))) | (int32(*elem15(_buf, uintptr(1))) << 8)) | int32(*elem15(_buf, uintptr(2))))
+ _pMem.Xflags = uint16(4)
+ return uint32(3)
_7:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64((((i32(16777216) * int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(0))))))) | (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(1))))) << uint(i32(16)))) | (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(2))))) << uint(i32(8)))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(3))))))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- return uint32(i32(4))
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64((((int32(16777216) * int32(int8(*elem15(_buf, 0)))) | (int32(*elem15(_buf, uintptr(1))) << 16)) | (int32(*elem15(_buf, uintptr(2))) << 8)) | int32(*elem15(_buf, uintptr(3))))
+ _pMem.Xflags = uint16(4)
+ return uint32(4)
_8:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64((((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(0)))))<<uint(i32(24)))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(1)))))<<uint(i32(16))))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(2)))))<<uint(i32(8))))|uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(3)))))) + (i64(4294967296) * int64((i32(256)*int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(0)))))))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(1)))))))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- return uint32(i32(6))
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64((((uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(int32(2)))), 0))<<24)|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(int32(2)))), uintptr(1)))<<16))|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(int32(2)))), uintptr(2)))<<8))|uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(int32(2)))), uintptr(3)))) + (int64(4294967296) * int64((int32(256)*int32(int8(*elem15(_buf, 0))))|int32(*elem15(_buf, uintptr(1)))))
+ _pMem.Xflags = uint16(4)
+ return uint32(6)
_9:
return _serialGet(tls, _buf, _serial_type, _pMem)
_11:
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = int64(_serial_type - uint32(i32(8)))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
- return uint32(i32(0))
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = int64(_serial_type - uint32(8))
+ _pMem.Xflags = uint16(4)
+ return 0
_13:
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = (*int8)(unsafe.Pointer(_buf))
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = int32((_serial_type - uint32(i32(12))) / uint32(i32(2)))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3VdbeSerialGetØ00aFlagØ001)) + 2*uintptr(_serial_type&uint32(i32(1)))))
- return uint32(_pMem.X4)
+ _pMem.Xz = (*int8)(unsafe.Pointer(_buf))
+ _pMem.Xn = int32((_serial_type - uint32(12)) / uint32(2))
+ _pMem.Xflags = *elem20((*uint16)(unsafe.Pointer(&_sqlite3VdbeSerialGetØ00aFlagØ001)), uintptr(_serial_type&uint32(1)))
+ return uint32(_pMem.Xn)
_14:
- return uint32(i32(0))
+ return 0
}
func _serialGet(tls *crt.TLS, _buf *uint8, _serial_type uint32, _pMem *XMem) (r0 uint32) {
var _y uint32
var _x, _2_t2 uint64
- _x = uint64((((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(0))))) << uint(i32(24))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(1)))))<<uint(i32(16)))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(2)))))<<uint(i32(8)))) | uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(3))))))
- _y = (((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(0))))) << uint(i32(24))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(1)))))<<uint(i32(16)))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(2)))))<<uint(i32(8)))) | uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(3)))))
- _x = (_x << uint(i32(32))) + uint64(_y)
- if _serial_type == uint32(i32(6)) {
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))) = *(*int64)(unsafe.Pointer(&_x))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4))
+ _x = uint64((((uint32(*elem15(_buf, 0)) << 24) | uint32(int32(*elem15(_buf, uintptr(1)))<<16)) | uint32(int32(*elem15(_buf, uintptr(2)))<<8)) | uint32(*elem15(_buf, uintptr(3))))
+ _y = (((uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(int32(4)))), 0)) << 24) | uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(int32(4)))), uintptr(1)))<<16)) | uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(int32(4)))), uintptr(2)))<<8)) | uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_buf))+uintptr(int32(4)))), uintptr(3)))
+ _x = (_x << 32) + uint64(_y)
+ if _serial_type == uint32(6) {
+ *(*int64)(unsafe.Pointer(&_pMem.Xu)) = *(*int64)(unsafe.Pointer(&_x))
+ _pMem.Xflags = uint16(4)
goto _1
}
_2_t2 = _serialGetØ00t1Ø001
func() {
- if i32(1) == 0 || crt.Xmemcmp(tls, (unsafe.Pointer)(&_serialGetØ00r1Ø002), (unsafe.Pointer)(&_2_t2), u32(8)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74831), unsafe.Pointer((*int8)(unsafe.Pointer(&_serialGetØ00__func__Ø000))), unsafe.Pointer(str(75183)))
+ if int32(1) == 0 || crt.Xmemcmp(tls, unsafe.Pointer(&_serialGetØ00r1Ø002), unsafe.Pointer(&_2_t2), uint32(8)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74831), unsafe.Pointer(&_serialGetØ00__func__Ø000), unsafe.Pointer(str(73345)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- crt.Xmemcpy(tls, (unsafe.Pointer)((*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))), (unsafe.Pointer)(&_x), u32(8))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(func() int32 {
- if _sqlite3IsNaN(tls, *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))) != 0 {
- return i32(1)
+
+ crt.Xmemcpy(tls, unsafe.Pointer((*float64)(unsafe.Pointer(&_pMem.Xu))), unsafe.Pointer(&_x), uint32(8))
+ _pMem.Xflags = uint16(func() int32 {
+ if _sqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(&_pMem.Xu))) != 0 {
+ return int32(1)
}
- return i32(8)
+ return int32(8)
}())
_1:
- return uint32(i32(8))
+ return uint32(8)
_ = _2_t2
panic(0)
@@ -56302,7 +56044,7 @@ _1:
var _serialGetØ00t1Ø001 uint64
func init() {
- _serialGetØ00t1Ø001 = u64(4607182418800017408)
+ _serialGetØ00t1Ø001 = uint64(4607182418800017408)
}
var _serialGetØ00r1Ø002 float64
@@ -56314,152 +56056,157 @@ func init() {
var _serialGetØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_serialGetØ00__func__Ø000[0], str(75241), 10)
+ crt.Xstrncpy(nil, &_serialGetØ00__func__Ø000[0], str(73403), 10)
}
var _sqlite3VdbeSerialGetØ00aFlagØ001 [2]uint16
func init() {
- _sqlite3VdbeSerialGetØ00aFlagØ001 = [2]uint16{u16(4112), u16(4098)}
+ _sqlite3VdbeSerialGetØ00aFlagØ001 = [2]uint16{uint16(4112), uint16(4098)}
}
-// Move the cursor down to a new child page. The newPgno argument is the
-// page number of the child page to move to.
-//
-// This function returns SQLITE_CORRUPT if the page-header flags field of
-// the new child page does not match the flags field of the parent (i.e.
-// if an intkey page appears to be the parent of a non-intkey page, or
-// vice-versa).
+// C comment
+// /*
+// ** Move the cursor down to a new child page. The newPgno argument is the
+// ** page number of the child page to move to.
+// **
+// ** This function returns SQLITE_CORRUPT if the page-header flags field of
+// ** the new child page does not match the flags field of the parent (i.e.
+// ** if an intkey page appears to be the parent of a non-intkey page, or
+// ** vice-versa).
+// */
func _moveToChild(tls *crt.TLS, _pCur *XBtCursor, _newPgno uint32) (r0 int32) {
var _pBt *XBtShared
- _pBt = (*XBtShared)(_pCur.X1)
+ _pBt = (*XBtShared)(_pCur.XpBt)
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63862), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToChildØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63862), unsafe.Pointer(&_moveToChildØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63863), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToChildØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63863), unsafe.Pointer(&_moveToChildØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X14) >= i32(20) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63864), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToChildØ00__func__Ø000))), unsafe.Pointer(str(75251)))
+ if int32(_pCur.XiPage) >= int32(20) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63864), unsafe.Pointer(&_moveToChildØ00__func__Ø000), unsafe.Pointer(str(73413)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X14) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63865), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToChildØ00__func__Ø000))), unsafe.Pointer(str(75282)))
+ if int32(_pCur.XiPage) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63865), unsafe.Pointer(&_moveToChildØ00__func__Ø000), unsafe.Pointer(str(73444)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pCur.X14) >= i32(19) {
- return _sqlite3CorruptError(tls, i32(63867))
+ if int32(_pCur.XiPage) >= int32(19) {
+ return _sqlite3CorruptError(tls, int32(63867))
}
- *(*uint16)(unsafe.Pointer(&((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4))) = uint16(i32(0))
+ _pCur.Xinfo.XnSize = 0
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-7))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-7))
}
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[19]uint16)(unsafe.Pointer(&(_pCur.X17))))) + 2*uintptr(postInc3((*int8)(unsafe.Pointer(&(_pCur.X14))), int8(1))))) = _pCur.X16
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(i32(0))
- return _getAndInitPage(tls, _pBt, _newPgno, (**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19)))))+4*uintptr(_pCur.X14))), _pCur, int32(_pCur.X11))
+ *elem20((*uint16)(unsafe.Pointer(&_pCur.XaiIdx)), uintptr(postInc5(&_pCur.XiPage, 1))) = _pCur.Xix
+ _pCur.Xix = 0
+ return _getAndInitPage(tls, _pBt, _newPgno, elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage)), _pCur, int32(_pCur.XcurPagerFlags))
}
var _moveToChildØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_moveToChildØ00__func__Ø000[0], str(75297), 12)
+ crt.Xstrncpy(nil, &_moveToChildØ00__func__Ø000[0], str(73459), 12)
}
-// Get a page from the pager and initialize it.
-//
-// If pCur!=0 then the page is being fetched as part of a moveToChild()
-// call. Do additional sanity checking on the page in this case.
-// And if the fetch fails, this routine must decrement pCur->iPage.
-//
-// The page is fetched as read-write unless pCur is not NULL and is
-// a read-only cursor.
-//
-// If an error occurs, then *ppPage is undefined. It
-// may remain unchanged, or it may be set to an invalid value.
+// C comment
+// /*
+// ** Get a page from the pager and initialize it.
+// **
+// ** If pCur!=0 then the page is being fetched as part of a moveToChild()
+// ** call. Do additional sanity checking on the page in this case.
+// ** And if the fetch fails, this routine must decrement pCur->iPage.
+// **
+// ** The page is fetched as read-write unless pCur is not NULL and is
+// ** a read-only cursor.
+// **
+// ** If an error occurs, then *ppPage is undefined. It
+// ** may remain unchanged, or it may be set to an invalid value.
+// */
func _getAndInitPage(tls *crt.TLS, _pBt *XBtShared, _pgno uint32, _ppPage **XMemPage, _pCur *XBtCursor, _bReadOnly int32) (r0 int32) {
var _rc int32
var _pDbPage *XPgHdr
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61081), unsafe.Pointer((*int8)(unsafe.Pointer(&_getAndInitPageØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61081), unsafe.Pointer(&_getAndInitPageØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pCur != nil && _ppPage != (**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19)))))+4*uintptr(_pCur.X14))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61082), unsafe.Pointer((*int8)(unsafe.Pointer(&_getAndInitPageØ00__func__Ø000))), unsafe.Pointer(str(75309)))
+ if _pCur != nil && _ppPage != elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61082), unsafe.Pointer(&_getAndInitPageØ00__func__Ø000), unsafe.Pointer(str(73471)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pCur != nil && _bReadOnly != int32(_pCur.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61083), unsafe.Pointer((*int8)(unsafe.Pointer(&_getAndInitPageØ00__func__Ø000))), unsafe.Pointer(str(75355)))
+ if _pCur != nil && _bReadOnly != int32(_pCur.XcurPagerFlags) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61083), unsafe.Pointer(&_getAndInitPageØ00__func__Ø000), unsafe.Pointer(str(73517)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pCur != nil && int32(_pCur.X14) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61084), unsafe.Pointer((*int8)(unsafe.Pointer(&_getAndInitPageØ00__func__Ø000))), unsafe.Pointer(str(75397)))
+ if _pCur != nil && int32(_pCur.XiPage) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61084), unsafe.Pointer(&_getAndInitPageØ00__func__Ø000), unsafe.Pointer(str(73559)))
crt.X__builtin_abort(tls)
}
}()
if _pgno > _btreePagecount(tls, _pBt) {
- _rc = _sqlite3CorruptError(tls, i32(61087))
+ _rc = _sqlite3CorruptError(tls, int32(61087))
goto _getAndInitPage_error
}
- _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.X0), _pgno, &_pDbPage, _bReadOnly)
+ _rc = _sqlite3PagerGet(tls, (*XPager)(_pBt.XpPager), _pgno, &_pDbPage, _bReadOnly)
if _rc != 0 {
goto _getAndInitPage_error
}
*_ppPage = (*XMemPage)(_sqlite3PagerGetExtra(tls, _pDbPage))
- if int32((*_ppPage).X0) != i32(0) {
+ if int32((*_ppPage).XisInit) != int32(0) {
goto _13
}
_btreePageFromDbPage(tls, _pDbPage, _pgno, _pBt)
_rc = _btreeInitPage(tls, *_ppPage)
- if _rc != i32(0) {
+ if _rc != int32(0) {
_releasePage(tls, *_ppPage)
goto _getAndInitPage_error
}
_13:
func() {
- if ((*_ppPage).X4) != _pgno {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61103), unsafe.Pointer((*int8)(unsafe.Pointer(&_getAndInitPageØ00__func__Ø000))), unsafe.Pointer(str(75422)))
+ if ((*_ppPage).Xpgno) != _pgno {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61103), unsafe.Pointer(&_getAndInitPageØ00__func__Ø000), unsafe.Pointer(str(73584)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*_ppPage).X19) != (*uint8)(_sqlite3PagerGetData(tls, _pDbPage)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61104), unsafe.Pointer((*int8)(unsafe.Pointer(&_getAndInitPageØ00__func__Ø000))), unsafe.Pointer(str(75444)))
+ if ((*_ppPage).XaData) != (*uint8)(_sqlite3PagerGetData(tls, _pDbPage)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61104), unsafe.Pointer(&_getAndInitPageØ00__func__Ø000), unsafe.Pointer(str(73606)))
crt.X__builtin_abort(tls)
}
}()
- if (_pCur != nil) && ((int32((*_ppPage).X14) < i32(1)) || (int32((*_ppPage).X2) != int32(_pCur.X15))) {
- _rc = _sqlite3CorruptError(tls, i32(61109))
+ if (_pCur != nil) && ((int32((*_ppPage).XnCell) < int32(1)) || (int32((*_ppPage).XintKey) != int32(_pCur.XcurIntKey))) {
+ _rc = _sqlite3CorruptError(tls, int32(61109))
_releasePage(tls, *_ppPage)
goto _getAndInitPage_error
}
- return i32(0)
+ return int32(0)
_getAndInitPage_error:
if _pCur != nil {
- *(*int8)(unsafe.Pointer(&(_pCur.X14))) -= 1
+ _pCur.XiPage -= 1
}
func() {
- if _pgno == uint32(i32(0)) && _rc != i32(11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61118), unsafe.Pointer((*int8)(unsafe.Pointer(&_getAndInitPageØ00__func__Ø000))), unsafe.Pointer(str(75491)))
+ if _pgno == (0) && _rc != int32(11) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61118), unsafe.Pointer(&_getAndInitPageØ00__func__Ø000), unsafe.Pointer(str(73653)))
crt.X__builtin_abort(tls)
}
}()
@@ -56469,40 +56216,43 @@ _getAndInitPage_error:
var _getAndInitPageØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_getAndInitPageØ00__func__Ø000[0], str(75521), 15)
+ crt.Xstrncpy(nil, &_getAndInitPageØ00__func__Ø000[0], str(73683), 15)
}
-// Move the cursor down to the left-most leaf entry beneath the
-// entry to which it is currently pointing.
-//
-// The left-most leaf is the one with the smallest key - the first
-// in ascending order.
+// C comment
+// /*
+// ** Move the cursor down to the left-most leaf entry beneath the
+// ** entry to which it is currently pointing.
+// **
+// ** The left-most leaf is the one with the smallest key - the first
+// ** in ascending order.
+// */
func _moveToLeftmost(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
var _rc int32
var _pgno uint32
var _pPage *XMemPage
- _rc = i32(0)
+ _rc = int32(0)
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64033), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToLeftmostØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64033), unsafe.Pointer(&_moveToLeftmostØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64034), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToLeftmostØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64034), unsafe.Pointer(&_moveToLeftmostØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
_4:
- if (_rc == i32(0)) && ((store52(&_pPage, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X5) == 0) {
+ if (_rc == int32(0)) && ((store84(&_pPage, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).Xleaf) == 0) {
func() {
- if int32(_pCur.X16) >= int32(_pPage.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64036), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToLeftmostØ00__func__Ø000))), unsafe.Pointer(str(10682)))
+ if int32(_pCur.Xix) >= int32(_pPage.XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64036), unsafe.Pointer(&_moveToLeftmostØ00__func__Ø000), unsafe.Pointer(str(10637)))
crt.X__builtin_abort(tls)
}
}()
- _pgno = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*int32(_pCur.X16)))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*int32(_pCur.X16)))))) + 1*uintptr(i32(1))))))))))))))
+ _pgno = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData))+uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*int32(_pCur.Xix))), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*int32(_pCur.Xix))), uintptr(1))))))))
_rc = _moveToChild(tls, _pCur, _pgno)
goto _4
}
@@ -56512,84 +56262,89 @@ _4:
var _moveToLeftmostØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_moveToLeftmostØ00__func__Ø000[0], str(75536), 15)
+ crt.Xstrncpy(nil, &_moveToLeftmostØ00__func__Ø000[0], str(73698), 15)
}
-// Move the cursor up to the parent page.
-//
-// pCur->idx is set to the cell index that contains the pointer
-// to the page we are coming from. If we are coming from the
-// right-most child page then pCur->idx is set to one more than
-// the largest cell index.
+// C comment
+// /*
+// ** Move the cursor up to the parent page.
+// **
+// ** pCur->idx is set to the cell index that contains the pointer
+// ** to the page we are coming from. If we are coming from the
+// ** right-most child page then pCur->idx is set to one more than
+// ** the largest cell index.
+// */
func _moveToParent(tls *crt.TLS, _pCur *XBtCursor) {
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63908), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToParentØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63908), unsafe.Pointer(&_moveToParentØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63909), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToParentØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63909), unsafe.Pointer(&_moveToParentØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X14) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63910), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToParentØ00__func__Ø000))), unsafe.Pointer(str(75551)))
+ if int32(_pCur.XiPage) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63910), unsafe.Pointer(&_moveToParentØ00__func__Ø000), unsafe.Pointer(str(73713)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63911), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToParentØ00__func__Ø000))), unsafe.Pointer(str(75565)))
+ if (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63911), unsafe.Pointer(&_moveToParentØ00__func__Ø000), unsafe.Pointer(str(73727)))
crt.X__builtin_abort(tls)
}
}()
- _assertParentIndex(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(int32(_pCur.X14)-i32(1)))), int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[19]uint16)(unsafe.Pointer(&(_pCur.X17))))) + 2*uintptr(int32(_pCur.X14)-i32(1))))), (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X4)
- *(*uint16)(unsafe.Pointer(&((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4))) = uint16(i32(0))
+ _assertParentIndex(tls, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(int32(_pCur.XiPage)-int32(1))), int32(*elem20((*uint16)(unsafe.Pointer(&_pCur.XaiIdx)), uintptr(int32(_pCur.XiPage)-int32(1)))), (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).Xpgno)
+ _pCur.Xinfo.XnSize = 0
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-7))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-7))
}
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[19]uint16)(unsafe.Pointer(&(_pCur.X17))))) + 2*uintptr(int32(_pCur.X14)-i32(1))))
- _releasePageNotNull(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(postInc3((*int8)(unsafe.Pointer(&(_pCur.X14))), int8(-1))))))
+ _pCur.Xix = *elem20((*uint16)(unsafe.Pointer(&_pCur.XaiIdx)), uintptr(int32(_pCur.XiPage)-int32(1)))
+ _releasePageNotNull(tls, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(postInc5(&_pCur.XiPage, -1))))
}
var _moveToParentØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_moveToParentØ00__func__Ø000[0], str(75591), 13)
+ crt.Xstrncpy(nil, &_moveToParentØ00__func__Ø000[0], str(73753), 13)
}
-// Page pParent is an internal (non-leaf) tree page. This function
-// asserts that page number iChild is the left-child if the iIdx'th
-// cell in page pParent. Or, if iIdx is equal to the total number of
-// cells in pParent, that page number iChild is the right-child of
-// the page.
+// C comment
+// /*
+// ** Page pParent is an internal (non-leaf) tree page. This function
+// ** asserts that page number iChild is the left-child if the iIdx'th
+// ** cell in page pParent. Or, if iIdx is equal to the total number of
+// ** cells in pParent, that page number iChild is the right-child of
+// ** the page.
+// */
func _assertParentIndex(tls *crt.TLS, _pParent *XMemPage, _iIdx int32, _iChild uint32) {
- if (_sqlite3Config.X6) == i32(0) {
+ if _sqlite3Config.XneverCorrupt == int32(0) {
return
}
func() {
- if _iIdx > int32(_pParent.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63888), unsafe.Pointer((*int8)(unsafe.Pointer(&_assertParentIndexØ00__func__Ø000))), unsafe.Pointer(str(75604)))
+ if _iIdx > int32(_pParent.XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63888), unsafe.Pointer(&_assertParentIndexØ00__func__Ø000), unsafe.Pointer(str(73766)))
crt.X__builtin_abort(tls)
}
}()
- if _iIdx == int32(_pParent.X14) {
+ if _iIdx == int32(_pParent.XnCell) {
func() {
- if _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParent.X19))+1*uintptr(int32(_pParent.X6)+i32(8))))) != _iChild {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63890), unsafe.Pointer((*int8)(unsafe.Pointer(&_assertParentIndexØ00__func__Ø000))), unsafe.Pointer(str(75625)))
+ if _sqlite3Get4byte(tls, elem15(_pParent.XaData, uintptr(int32(_pParent.XhdrOffset)+int32(8)))) != _iChild {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63890), unsafe.Pointer(&_assertParentIndexØ00__func__Ø000), unsafe.Pointer(str(73787)))
crt.X__builtin_abort(tls)
}
}()
goto _6
}
func() {
- if _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pParent.X19))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pParent.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParent.X21))+1*uintptr(i32(2)*_iIdx))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParent.X21))+1*uintptr(i32(2)*_iIdx))))) + 1*uintptr(i32(1)))))))))))))) != _iChild {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63892), unsafe.Pointer((*int8)(unsafe.Pointer(&_assertParentIndexØ00__func__Ø000))), unsafe.Pointer(str(75681)))
+ if _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pParent.XaData))+uintptr(int32(_pParent.XmaskPage)&((int32(*elem15(elem15(_pParent.XaCellIdx, uintptr(int32(2)*_iIdx)), 0))<<8)|int32(*elem15(elem15(_pParent.XaCellIdx, uintptr(int32(2)*_iIdx)), uintptr(1)))))))) != _iChild {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63892), unsafe.Pointer(&_assertParentIndexØ00__func__Ø000), unsafe.Pointer(str(73843)))
crt.X__builtin_abort(tls)
}
}()
@@ -56599,33 +56354,36 @@ _6:
var _assertParentIndexØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_assertParentIndexØ00__func__Ø000[0], str(75723), 18)
+ crt.Xstrncpy(nil, &_assertParentIndexØ00__func__Ø000[0], str(73885), 18)
}
-// Return a pointer to an sqlite3VdbeRecordCompare() compatible function
-// suitable for comparing serialized records to the unpacked record passed
-// as the only argument.
+// C comment
+// /*
+// ** Return a pointer to an sqlite3VdbeRecordCompare() compatible function
+// ** suitable for comparing serialized records to the unpacked record passed
+// ** as the only argument.
+// */
func _sqlite3VdbeFindCompare(tls *crt.TLS, _p *XUnpackedRecord) (r0 func(*crt.TLS, int32, unsafe.Pointer, *XUnpackedRecord) int32) {
var _1_flags int32
- if (int32((*XKeyInfo)(_p.X0).X2) + int32((*XKeyInfo)(_p.X0).X3)) > i32(13) {
+ if (int32((*XKeyInfo)(_p.XpKeyInfo).XnField) + int32((*XKeyInfo)(_p.XpKeyInfo).XnXField)) > int32(13) {
goto _0
}
- _1_flags = int32((*XMem)(unsafe.Pointer(uintptr(_p.X1) + 48*uintptr(i32(0)))).X1)
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XKeyInfo)(_p.X0).X5)) + 1*uintptr(i32(0))))) != 0 {
- *(*int8)(unsafe.Pointer(&(_p.X5))) = int8(i32(1))
- *(*int8)(unsafe.Pointer(&(_p.X6))) = int8(i32(-1))
+ _1_flags = int32(elem25((*XMem)(_p.XaMem), 0).Xflags)
+ if (*elem15((*XKeyInfo)(_p.XpKeyInfo).XaSortOrder, 0)) != 0 {
+ _p.Xr1 = int8(1)
+ _p.Xr2 = int8(-1)
goto _2
}
- *(*int8)(unsafe.Pointer(&(_p.X5))) = int8(i32(-1))
- *(*int8)(unsafe.Pointer(&(_p.X6))) = int8(i32(1))
+ _p.Xr1 = int8(-1)
+ _p.Xr2 = int8(1)
_2:
- if (_1_flags & i32(4)) != 0 {
+ if (_1_flags & int32(4)) != 0 {
return _vdbeRecordCompareInt
}
- if ((_1_flags & i32(25)) == i32(0)) && ((*(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&((*XKeyInfo)(_p.X0).X6))))) + 4*uintptr(i32(0))))) == nil) {
+ if ((_1_flags & int32(25)) == int32(0)) && ((*elem62((**XCollSeq)(unsafe.Pointer(&((*XKeyInfo)(_p.XpKeyInfo).XaColl))), 0)) == nil) {
func() {
- if (_1_flags & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75785), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeFindCompareØ00__func__Ø000))), unsafe.Pointer(str(75741)))
+ if (_1_flags & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75785), unsafe.Pointer(&_sqlite3VdbeFindCompareØ00__func__Ø000), unsafe.Pointer(str(73903)))
crt.X__builtin_abort(tls)
}
}()
@@ -56635,79 +56393,82 @@ _0:
return _sqlite3VdbeRecordCompare
}
-// This function is an optimized version of sqlite3VdbeRecordCompare()
-// that (a) the first field of pPKey2 is an integer, and (b) the
-// size-of-header varint at the start of (pKey1/nKey1) fits in a single
-// byte (i.e. is less than 128).
-//
-// To avoid concerns about buffer overreads, this routine is only used
-// on schemas where the maximum valid header size is 63 bytes or less.
+// C comment
+// /*
+// ** This function is an optimized version of sqlite3VdbeRecordCompare()
+// ** that (a) the first field of pPKey2 is an integer, and (b) the
+// ** size-of-header varint at the start of (pKey1/nKey1) fits in a single
+// ** byte (i.e. is less than 128).
+// **
+// ** To avoid concerns about buffer overreads, this routine is only used
+// ** on schemas where the maximum valid header size is 63 bytes or less.
+// */
func _vdbeRecordCompareInt(tls *crt.TLS, _nKey1 int32, _pKey1 unsafe.Pointer, _pPKey2 *XUnpackedRecord) (r0 int32) {
var _serial_type, _res int32
var _v, _lhs int64
var _y uint32
var _x uint64
var _aKey *uint8
- _aKey = (*uint8)(unsafe.Pointer(uintptr(_pKey1) + 1*uintptr(int32(*(*uint8)(_pKey1))&i32(63))))
- _serial_type = int32(*(*uint8)(unsafe.Pointer(uintptr(_pKey1) + 1*uintptr(i32(1)))))
- _vdbeAssertFieldCountWithinLimits(tls, _nKey1, _pKey1, (*XKeyInfo)(_pPKey2.X0))
+ _aKey = elem15((*uint8)(_pKey1), uintptr(int32(*(*uint8)(_pKey1))&int32(63)))
+ _serial_type = int32(*elem15((*uint8)(_pKey1), uintptr(1)))
+ _vdbeAssertFieldCountWithinLimits(tls, _nKey1, _pKey1, (*XKeyInfo)(_pPKey2.XpKeyInfo))
func() {
- if int32(*(*uint8)(_pKey1)) > i32(63) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75613), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareIntØ00__func__Ø000))), unsafe.Pointer(str(75757)))
+ if int32(*(*uint8)(_pKey1)) > int32(63) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75613), unsafe.Pointer(&_vdbeRecordCompareIntØ00__func__Ø000), unsafe.Pointer(str(73919)))
crt.X__builtin_abort(tls)
}
}()
switch _serial_type {
- case i32(0):
+ case int32(0):
goto _12
- case i32(1):
+ case int32(1):
goto _4
- case i32(2):
+ case int32(2):
goto _5
- case i32(3):
+ case int32(3):
goto _6
- case i32(4):
+ case int32(4):
goto _7
- case i32(5):
+ case int32(5):
goto _8
- case i32(6):
+ case int32(6):
goto _9
- case i32(7):
+ case int32(7):
goto _12
- case i32(8):
+ case int32(8):
goto _10
- case i32(9):
+ case int32(9):
goto _11
default:
goto _14
}
_4:
- _lhs = int64(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))))
+ _lhs = int64(int8(*elem15(_aKey, 0)))
goto _15
_5:
- _lhs = int64((i32(256) * int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1))))))
+ _lhs = int64((int32(256) * int32(int8(*elem15(_aKey, 0)))) | int32(*elem15(_aKey, uintptr(1))))
goto _15
_6:
- _lhs = int64(((i32(65536) * int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))))) | (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1))))) << uint(i32(8)))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(2))))))
+ _lhs = int64(((int32(65536) * int32(int8(*elem15(_aKey, 0)))) | (int32(*elem15(_aKey, uintptr(1))) << 8)) | int32(*elem15(_aKey, uintptr(2))))
goto _15
_7:
- _y = (((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))) << uint(i32(24))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1)))))<<uint(i32(16)))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(2)))))<<uint(i32(8)))) | uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(3)))))
+ _y = (((uint32(*elem15(_aKey, 0)) << 24) | uint32(int32(*elem15(_aKey, uintptr(1)))<<16)) | uint32(int32(*elem15(_aKey, uintptr(2)))<<8)) | uint32(*elem15(_aKey, uintptr(3)))
_lhs = int64(*(*int32)(unsafe.Pointer(&_y)))
goto _15
_8:
- _lhs = int64((((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(0)))))<<uint(i32(24)))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(1)))))<<uint(i32(16))))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(2)))))<<uint(i32(8))))|uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(3)))))) + (i64(4294967296) * int64((i32(256)*int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0)))))))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1)))))))
+ _lhs = int64((((uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(2)))), 0))<<24)|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(2)))), uintptr(1)))<<16))|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(2)))), uintptr(2)))<<8))|uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(2)))), uintptr(3)))) + (int64(4294967296) * int64((int32(256)*int32(int8(*elem15(_aKey, 0))))|int32(*elem15(_aKey, uintptr(1)))))
goto _15
_9:
- _x = uint64((((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))) << uint(i32(24))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1)))))<<uint(i32(16)))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(2)))))<<uint(i32(8)))) | uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(3))))))
- _x = (_x << uint(i32(32))) | uint64((((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(0)))))<<uint(i32(24)))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(1)))))<<uint(i32(16))))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(2)))))<<uint(i32(8))))|uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(3))))))
+ _x = uint64((((uint32(*elem15(_aKey, 0)) << 24) | uint32(int32(*elem15(_aKey, uintptr(1)))<<16)) | uint32(int32(*elem15(_aKey, uintptr(2)))<<8)) | uint32(*elem15(_aKey, uintptr(3))))
+ _x = (_x << 32) | uint64((((uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(4)))), 0))<<24)|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(4)))), uintptr(1)))<<16))|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(4)))), uintptr(2)))<<8))|uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(4)))), uintptr(3))))
_lhs = *(*int64)(unsafe.Pointer(&_x))
goto _15
_10:
- _lhs = int64(i32(0))
+ _lhs = 0
goto _15
_11:
- _lhs = int64(i32(1))
+ _lhs = int64(1)
goto _15
_12:
return _sqlite3VdbeRecordCompare(tls, _nKey1, _pKey1, _pPKey2)
@@ -56716,25 +56477,25 @@ _14:
return _sqlite3VdbeRecordCompare(tls, _nKey1, _pKey1, _pPKey2)
_15:
- _v = *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&((*XMem)(unsafe.Pointer(uintptr(_pPKey2.X1) + 48*uintptr(i32(0)))).X0)))))
+ _v = *(*int64)(unsafe.Pointer(&(elem25((*XMem)(_pPKey2.XaMem), 0).Xu)))
if _v > _lhs {
- _res = int32(_pPKey2.X5)
+ _res = int32(_pPKey2.Xr1)
goto _21
}
if _v < _lhs {
- _res = int32(_pPKey2.X6)
+ _res = int32(_pPKey2.Xr2)
goto _21
}
- if int32(_pPKey2.X2) > i32(1) {
- _res = _sqlite3VdbeRecordCompareWithSkip(tls, _nKey1, _pKey1, _pPKey2, i32(1))
+ if int32(_pPKey2.XnField) > int32(1) {
+ _res = _sqlite3VdbeRecordCompareWithSkip(tls, _nKey1, _pKey1, _pPKey2, int32(1))
goto _21
}
- _res = int32(_pPKey2.X3)
- *(*uint8)(unsafe.Pointer(&(_pPKey2.X7))) = uint8(i32(1))
+ _res = int32(_pPKey2.Xdefault_rc)
+ _pPKey2.XeqSeen = uint8(1)
_21:
func() {
if _vdbeRecordCompareDebug(tls, _nKey1, _pKey1, _pPKey2, _res) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75684), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareIntØ00__func__Ø000))), unsafe.Pointer(str(75791)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75684), unsafe.Pointer(&_vdbeRecordCompareIntØ00__func__Ø000), unsafe.Pointer(str(73953)))
crt.X__builtin_abort(tls)
}
}()
@@ -56744,104 +56505,105 @@ _21:
panic(0)
}
-// Count the number of fields (a.k.a. columns) in the record given by
-// pKey,nKey. The verify that this count is less than or equal to the
-// limit given by pKeyInfo->nField + pKeyInfo->nXField.
-//
-// If this constraint is not satisfied, it means that the high-speed
-// vdbeRecordCompareInt() and vdbeRecordCompareString() routines will
-// not work correctly. If this assert() ever fires, it probably means
-// that the KeyInfo.nField or KeyInfo.nXField values were computed
-// incorrectly.
+// C comment
+// /*
+// ** Count the number of fields (a.k.a. columns) in the record given by
+// ** pKey,nKey. The verify that this count is less than or equal to the
+// ** limit given by pKeyInfo->nField + pKeyInfo->nXField.
+// **
+// ** If this constraint is not satisfied, it means that the high-speed
+// ** vdbeRecordCompareInt() and vdbeRecordCompareString() routines will
+// ** not work correctly. If this assert() ever fires, it probably means
+// ** that the KeyInfo.nField or KeyInfo.nXField values were computed
+// ** incorrectly.
+// */
func _vdbeAssertFieldCountWithinLimits(tls *crt.TLS, _nKey int32, _pKey unsafe.Pointer, _pKeyInfo *XKeyInfo) {
var _nField int32
var _szHdr, _idx, _notUsed uint32
var _aKey *uint8
- _nField = i32(0)
+ _nField = int32(0)
_aKey = (*uint8)(_pKey)
- if (_sqlite3Config.X6) == i32(0) {
+ if _sqlite3Config.XneverCorrupt == int32(0) {
return
}
_idx = uint32(uint8(func() int32 {
- if int32(*_aKey) < int32(u8(128)) {
- return func() int32 { _szHdr = uint32(*_aKey); return i32(1) }()
+ if int32(*_aKey) < int32(128) {
+ return func() int32 { _szHdr = uint32(*_aKey); return int32(1) }()
}
return int32(_sqlite3GetVarint32(tls, _aKey, &_szHdr))
}()))
func() {
- if _nKey < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75123), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeAssertFieldCountWithinLimitsØ00__func__Ø000))), unsafe.Pointer(str(75841)))
+ if _nKey < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75123), unsafe.Pointer(&_vdbeAssertFieldCountWithinLimitsØ00__func__Ø000), unsafe.Pointer(str(74003)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _szHdr > uint32(_nKey) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75124), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeAssertFieldCountWithinLimitsØ00__func__Ø000))), unsafe.Pointer(str(75849)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75124), unsafe.Pointer(&_vdbeAssertFieldCountWithinLimitsØ00__func__Ø000), unsafe.Pointer(str(74011)))
crt.X__builtin_abort(tls)
}
}()
_7:
if _idx < _szHdr {
- {
- p := &_idx
- *p = (*p) + uint32(uint8(func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_idx)))))))) < int32(u8(128)) {
- return func() int32 {
- _notUsed = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_idx))))))))
- return i32(1)
- }()
- }
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_idx))))))), &_notUsed))
- }()))
- sink5(*p)
- }
+ _idx += uint32(uint8(func() int32 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey)) + uintptr(_idx)))) < int32(128) {
+ return func() int32 {
+ _notUsed = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey)) + uintptr(_idx))))
+ return int32(1)
+ }()
+ }
+ return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(_idx))), &_notUsed))
+ }()))
_nField += 1
goto _7
}
func() {
- if _nField > (int32(_pKeyInfo.X2) + int32(_pKeyInfo.X3)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75129), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeAssertFieldCountWithinLimitsØ00__func__Ø000))), unsafe.Pointer(str(75866)))
+ if _nField > (int32(_pKeyInfo.XnField) + int32(_pKeyInfo.XnXField)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75129), unsafe.Pointer(&_vdbeAssertFieldCountWithinLimitsØ00__func__Ø000), unsafe.Pointer(str(74028)))
crt.X__builtin_abort(tls)
}
}()
- _ = _notUsed
}
var _vdbeAssertFieldCountWithinLimitsØ00__func__Ø000 [33]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeAssertFieldCountWithinLimitsØ00__func__Ø000[0], str(75911), 33)
+ crt.Xstrncpy(nil, &_vdbeAssertFieldCountWithinLimitsØ00__func__Ø000[0], str(74073), 33)
}
var _vdbeRecordCompareIntØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeRecordCompareIntØ00__func__Ø000[0], str(75944), 21)
+ crt.Xstrncpy(nil, &_vdbeRecordCompareIntØ00__func__Ø000[0], str(74106), 21)
}
func _sqlite3VdbeRecordCompare(tls *crt.TLS, _nKey1 int32, _pKey1 unsafe.Pointer, _pPKey2 *XUnpackedRecord) (r0 int32) {
- return _sqlite3VdbeRecordCompareWithSkip(tls, _nKey1, _pKey1, _pPKey2, i32(0))
-}
-
-// This function compares the two table rows or index records
-// specified by {nKey1, pKey1} and pPKey2. It returns a negative, zero
-// or positive integer if key1 is less than, equal to or
-// greater than key2. The {nKey1, pKey1} key must be a blob
-// created by the OP_MakeRecord opcode of the VDBE. The pPKey2
-// key must be a parsed key such as obtained from
-// sqlite3VdbeParseRecord.
-//
-// If argument bSkip is non-zero, it is assumed that the caller has already
-// determined that the first fields of the keys are equal.
-//
-// Key1 and Key2 do not have to contain the same number of fields. If all
-// fields that appear in both keys are equal, then pPKey2->default_rc is
-// returned.
-//
-// If database corruption is discovered, set pPKey2->errCode to
-// SQLITE_CORRUPT and return 0. If an OOM error is encountered,
-// pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the
-// malloc-failed flag set on database handle (pPKey2->pKeyInfo->db).
+ return _sqlite3VdbeRecordCompareWithSkip(tls, _nKey1, _pKey1, _pPKey2, int32(0))
+}
+
+// C comment
+// /*
+// ** This function compares the two table rows or index records
+// ** specified by {nKey1, pKey1} and pPKey2. It returns a negative, zero
+// ** or positive integer if key1 is less than, equal to or
+// ** greater than key2. The {nKey1, pKey1} key must be a blob
+// ** created by the OP_MakeRecord opcode of the VDBE. The pPKey2
+// ** key must be a parsed key such as obtained from
+// ** sqlite3VdbeParseRecord.
+// **
+// ** If argument bSkip is non-zero, it is assumed that the caller has already
+// ** determined that the first fields of the keys are equal.
+// **
+// ** Key1 and Key2 do not have to contain the same number of fields. If all
+// ** fields that appear in both keys are equal, then pPKey2->default_rc is
+// ** returned.
+// **
+// ** If database corruption is discovered, set pPKey2->errCode to
+// ** SQLITE_CORRUPT and return 0. If an OOM error is encountered,
+// ** pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the
+// ** malloc-failed flag set on database handle (pPKey2->pKeyInfo->db).
+// */
func _sqlite3VdbeRecordCompareWithSkip(tls *crt.TLS, _nKey1 int32, _pKey1 unsafe.Pointer, _pPKey2 *XUnpackedRecord, _bSkip int32) (r0 int32) {
var _i, _rc, _26_nCmp, _29_nStr, _34_nCmp int32
var _9_lhs, _9_rhs int64
@@ -56850,243 +56612,234 @@ func _sqlite3VdbeRecordCompareWithSkip(tls *crt.TLS, _nKey1 int32, _pKey1 unsafe
var _mem1 XMem
var _pRhs *XMem
var _pKeyInfo *XKeyInfo
- _rc = i32(0)
- _pRhs = (*XMem)(_pPKey2.X1)
- _pKeyInfo = (*XKeyInfo)(_pPKey2.X0)
+ _rc = int32(0)
+ _pRhs = (*XMem)(_pPKey2.XaMem)
+ _pKeyInfo = (*XKeyInfo)(_pPKey2.XpKeyInfo)
_aKey1 = (*uint8)(_pKey1)
if _bSkip != 0 {
- _idx1 = uint32(i32(1) + int32(uint8(func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(i32(1))))) < int32(u8(128)) {
- return func() int32 {
- _1_s1 = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(i32(1)))))
- return i32(1)
- }()
+ _idx1 = uint32(int32(1) + int32(uint8(func() int32 {
+ if int32(*elem15(_aKey1, uintptr(1))) < int32(128) {
+ return func() int32 { _1_s1 = uint32(*elem15(_aKey1, uintptr(1))); return int32(1) }()
}
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(i32(1)))), &_1_s1))
+ return int32(_sqlite3GetVarint32(tls, elem15(_aKey1, uintptr(1)), &_1_s1))
}())))
- _szHdr1 = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(i32(0)))))
+ _szHdr1 = uint32(*elem15(_aKey1, 0))
_d1 = _szHdr1 + _sqlite3VdbeSerialTypeLen(tls, _1_s1)
- _i = i32(1)
+ _i = int32(1)
*(*uintptr)(unsafe.Pointer(&_pRhs)) += uintptr(48)
goto _3
}
_idx1 = uint32(uint8(func() int32 {
- if int32(*_aKey1) < int32(u8(128)) {
- return func() int32 { _szHdr1 = uint32(*_aKey1); return i32(1) }()
+ if int32(*_aKey1) < int32(128) {
+ return func() int32 { _szHdr1 = uint32(*_aKey1); return int32(1) }()
}
return int32(_sqlite3GetVarint32(tls, _aKey1, &_szHdr1))
}()))
_d1 = _szHdr1
if _d1 > uint32(_nKey1) {
- *(*uint8)(unsafe.Pointer(&(_pPKey2.X4))) = uint8(_sqlite3CorruptError(tls, i32(75426)))
- return i32(0)
+ _pPKey2.XerrCode = uint8(_sqlite3CorruptError(tls, int32(75426)))
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_3:
- *(*int32)(unsafe.Pointer(&(_mem1.X7))) = i32(0)
+ _mem1.XszMalloc = int32(0)
func() {
- if (int32((*XKeyInfo)(_pPKey2.X0).X2)+int32((*XKeyInfo)(_pPKey2.X0).X3)) < int32(_pPKey2.X2) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75433), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000))), unsafe.Pointer(str(75965)))
+ if (int32((*XKeyInfo)(_pPKey2.XpKeyInfo).XnField)+int32((*XKeyInfo)(_pPKey2.XpKeyInfo).XnXField)) < int32(_pPKey2.XnField) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75433), unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000), unsafe.Pointer(str(74127)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XKeyInfo)(_pPKey2.X0).X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75435), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000))), unsafe.Pointer(str(76046)))
+ if ((*XKeyInfo)(_pPKey2.XpKeyInfo).XaSortOrder) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75435), unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000), unsafe.Pointer(str(74208)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XKeyInfo)(_pPKey2.X0).X2) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75436), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000))), unsafe.Pointer(str(76078)))
+ if int32((*XKeyInfo)(_pPKey2.XpKeyInfo).XnField) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75436), unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000), unsafe.Pointer(str(74240)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _idx1 > _szHdr1 && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75437), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000))), unsafe.Pointer(str(76105)))
+ if _idx1 > _szHdr1 && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75437), unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000), unsafe.Pointer(str(74267)))
crt.X__builtin_abort(tls)
}
}()
_17:
- if (int32(_pRhs.X1) & i32(4)) == 0 {
+ if (int32(_pRhs.Xflags) & int32(4)) == 0 {
goto _18
}
- _4_serial_type = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(_idx1))))
- if _4_serial_type >= uint32(i32(10)) {
- _rc = i32(1)
+ _4_serial_type = uint32(*elem15(_aKey1, uintptr(_idx1)))
+ if _4_serial_type >= uint32(10) {
+ _rc = int32(1)
goto _24
}
- if _4_serial_type == uint32(i32(0)) {
- _rc = i32(-1)
+ if _4_serial_type == (0) {
+ _rc = int32(-1)
goto _24
}
- if _4_serial_type == uint32(i32(7)) {
- _sqlite3VdbeSerialGet(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_d1))), _4_serial_type, &_mem1)
- _rc = -_sqlite3IntFloatCompare(tls, *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pRhs.X0))))), *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_mem1.X0))))))
+ if _4_serial_type == uint32(7) {
+ _sqlite3VdbeSerialGet(tls, elem15(_aKey1, uintptr(_d1)), _4_serial_type, &_mem1)
+ _rc = -_sqlite3IntFloatCompare(tls, *(*int64)(unsafe.Pointer(&_pRhs.Xu)), *(*float64)(unsafe.Pointer(&_mem1.Xu)))
goto _24
}
- _9_lhs = _vdbeRecordDecodeInt(tls, _4_serial_type, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_d1))))
- _9_rhs = *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pRhs.X0)))))
+ _9_lhs = _vdbeRecordDecodeInt(tls, _4_serial_type, elem15(_aKey1, uintptr(_d1)))
+ _9_rhs = *(*int64)(unsafe.Pointer(&_pRhs.Xu))
if _9_lhs < _9_rhs {
- _rc = i32(-1)
+ _rc = int32(-1)
goto _27
}
if _9_lhs > _9_rhs {
- _rc = i32(1)
+ _rc = int32(1)
}
_27:
_24:
goto _73
_18:
- if (int32(_pRhs.X1) & i32(8)) == 0 {
+ if (int32(_pRhs.Xflags) & int32(8)) == 0 {
goto _29
}
- _4_serial_type = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(_idx1))))
- if _4_serial_type >= uint32(i32(10)) {
- _rc = i32(1)
+ _4_serial_type = uint32(*elem15(_aKey1, uintptr(_idx1)))
+ if _4_serial_type >= uint32(10) {
+ _rc = int32(1)
goto _33
}
- if _4_serial_type == uint32(i32(0)) {
- _rc = i32(-1)
+ if _4_serial_type == (0) {
+ _rc = int32(-1)
goto _33
}
- _sqlite3VdbeSerialGet(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_d1))), _4_serial_type, &_mem1)
- if _4_serial_type != uint32(i32(7)) {
+ _sqlite3VdbeSerialGet(tls, elem15(_aKey1, uintptr(_d1)), _4_serial_type, &_mem1)
+ if _4_serial_type != uint32(7) {
goto _34
}
- if (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_mem1.X0)))))) < (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pRhs.X0)))))) {
- _rc = i32(-1)
+ if (*(*float64)(unsafe.Pointer(&_mem1.Xu))) < (*(*float64)(unsafe.Pointer(&_pRhs.Xu))) {
+ _rc = int32(-1)
goto _37
}
- if (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_mem1.X0)))))) > (*(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pRhs.X0)))))) {
- _rc = i32(1)
+ if (*(*float64)(unsafe.Pointer(&_mem1.Xu))) > (*(*float64)(unsafe.Pointer(&_pRhs.Xu))) {
+ _rc = int32(1)
}
_37:
goto _38
_34:
- _rc = _sqlite3IntFloatCompare(tls, *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_mem1.X0))))), *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pRhs.X0))))))
+ _rc = _sqlite3IntFloatCompare(tls, *(*int64)(unsafe.Pointer(&_mem1.Xu)), *(*float64)(unsafe.Pointer(&_pRhs.Xu)))
_38:
_33:
goto _73
_29:
- if (int32(_pRhs.X1) & i32(2)) == 0 {
+ if (int32(_pRhs.Xflags) & int32(2)) == 0 {
goto _40
}
func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(_idx1)))) < int32(u8(128)) {
- return func() int32 {
- _4_serial_type = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(_idx1))))
- return i32(1)
- }()
+ if int32(*elem15(_aKey1, uintptr(_idx1))) < int32(128) {
+ return func() int32 { _4_serial_type = uint32(*elem15(_aKey1, uintptr(_idx1))); return int32(1) }()
}
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_idx1))), &_4_serial_type))
+ return int32(_sqlite3GetVarint32(tls, elem15(_aKey1, uintptr(_idx1)), &_4_serial_type))
}()
- if _4_serial_type < uint32(i32(12)) {
- _rc = i32(-1)
+ if _4_serial_type < uint32(12) {
+ _rc = int32(-1)
goto _46
}
- if (_4_serial_type & uint32(i32(1))) == 0 {
- _rc = i32(1)
+ if (_4_serial_type & uint32(1)) == 0 {
+ _rc = int32(1)
goto _46
}
- *(*int32)(unsafe.Pointer(&(_mem1.X4))) = int32((_4_serial_type - uint32(i32(12))) / uint32(i32(2)))
- if (_d1 + uint32(_mem1.X4)) > uint32(_nKey1) {
- *(*uint8)(unsafe.Pointer(&(_pPKey2.X4))) = uint8(_sqlite3CorruptError(tls, i32(75501)))
- return i32(0)
- }
- if (*(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_pKeyInfo.X6))))) + 4*uintptr(_i)))) != nil {
- *(*uint8)(unsafe.Pointer(&(_mem1.X2))) = _pKeyInfo.X1
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_mem1.X9))))) = (*Xsqlite3)(_pKeyInfo.X4)
- *(*uint16)(unsafe.Pointer(&(_mem1.X1))) = uint16(i32(2))
- *(**int8)(unsafe.Pointer(&(_mem1.X5))) = (*int8)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(_d1)))))
- _rc = _vdbeCompareMemString(tls, &_mem1, _pRhs, *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_pKeyInfo.X6))))) + 4*uintptr(_i))), (*uint8)(unsafe.Pointer(&(_pPKey2.X4))))
+ _mem1.Xn = int32((_4_serial_type - uint32(12)) / uint32(2))
+ if (_d1 + uint32(_mem1.Xn)) > uint32(_nKey1) {
+ _pPKey2.XerrCode = uint8(_sqlite3CorruptError(tls, int32(75501)))
+ return int32(0)
+ }
+ if (*elem62((**XCollSeq)(unsafe.Pointer(&_pKeyInfo.XaColl)), uintptr(_i))) != nil {
+ _mem1.Xenc = _pKeyInfo.Xenc
+ *(**Xsqlite3)(unsafe.Pointer(&_mem1.Xdb)) = (*Xsqlite3)(_pKeyInfo.Xdb)
+ _mem1.Xflags = uint16(2)
+ _mem1.Xz = (*int8)(unsafe.Pointer(elem15(_aKey1, uintptr(_d1))))
+ _rc = _vdbeCompareMemString(tls, &_mem1, _pRhs, *elem62((**XCollSeq)(unsafe.Pointer(&_pKeyInfo.XaColl)), uintptr(_i)), &_pPKey2.XerrCode)
goto _50
}
_26_nCmp = func() int32 {
- if (_mem1.X4) < (_pRhs.X4) {
- return (_mem1.X4)
+ if _mem1.Xn < _pRhs.Xn {
+ return _mem1.Xn
}
- return (_pRhs.X4)
+ return _pRhs.Xn
}()
- _rc = crt.Xmemcmp(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_d1)))), (unsafe.Pointer)(_pRhs.X5), uint32(_26_nCmp))
- if _rc == i32(0) {
- _rc = (_mem1.X4) - (_pRhs.X4)
+ _rc = crt.Xmemcmp(tls, unsafe.Pointer(elem15(_aKey1, uintptr(_d1))), unsafe.Pointer(_pRhs.Xz), uint32(_26_nCmp))
+ if _rc == int32(0) {
+ _rc = _mem1.Xn - _pRhs.Xn
}
_50:
_46:
goto _73
_40:
- if (int32(_pRhs.X1) & i32(16)) == 0 {
+ if (int32(_pRhs.Xflags) & int32(16)) == 0 {
goto _55
}
func() {
- if (int32(_pRhs.X1)&i32(16384)) != i32(0) && (_pRhs.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75521), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000))), unsafe.Pointer(str(76132)))
+ if (int32(_pRhs.Xflags)&int32(16384)) != int32(0) && _pRhs.Xn != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75521), unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000), unsafe.Pointer(str(74294)))
crt.X__builtin_abort(tls)
}
}()
func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(_idx1)))) < int32(u8(128)) {
- return func() int32 {
- _4_serial_type = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(_idx1))))
- return i32(1)
- }()
+ if int32(*elem15(_aKey1, uintptr(_idx1))) < int32(128) {
+ return func() int32 { _4_serial_type = uint32(*elem15(_aKey1, uintptr(_idx1))); return int32(1) }()
}
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_idx1))), &_4_serial_type))
+ return int32(_sqlite3GetVarint32(tls, elem15(_aKey1, uintptr(_idx1)), &_4_serial_type))
}()
- if (_4_serial_type < uint32(i32(12))) || ((_4_serial_type & uint32(i32(1))) != 0) {
- _rc = i32(-1)
+ if (_4_serial_type < uint32(12)) || ((_4_serial_type & uint32(1)) != 0) {
+ _rc = int32(-1)
goto _63
}
- _29_nStr = int32((_4_serial_type - uint32(i32(12))) / uint32(i32(2)))
+ _29_nStr = int32((_4_serial_type - uint32(12)) / uint32(2))
if (_d1 + uint32(_29_nStr)) > uint32(_nKey1) {
- *(*uint8)(unsafe.Pointer(&(_pPKey2.X4))) = uint8(_sqlite3CorruptError(tls, i32(75531)))
- return i32(0)
+ _pPKey2.XerrCode = uint8(_sqlite3CorruptError(tls, int32(75531)))
+ return int32(0)
}
- if (int32(_pRhs.X1) & i32(16384)) == 0 {
+ if (int32(_pRhs.Xflags) & int32(16384)) == 0 {
goto _66
}
- if _isAllZero(tls, (*int8)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_d1))))), _29_nStr) == 0 {
- _rc = i32(1)
+ if _isAllZero(tls, (*int8)(unsafe.Pointer(elem15(_aKey1, uintptr(_d1)))), _29_nStr) == 0 {
+ _rc = int32(1)
goto _68
}
- _rc = _29_nStr - (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pRhs.X0))))))
+ _rc = _29_nStr - (*(*int32)(unsafe.Pointer(&_pRhs.Xu)))
_68:
goto _69
_66:
_34_nCmp = func() int32 {
- if _29_nStr < (_pRhs.X4) {
+ if _29_nStr < _pRhs.Xn {
return _29_nStr
}
- return (_pRhs.X4)
+ return _pRhs.Xn
}()
- _rc = crt.Xmemcmp(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_d1)))), (unsafe.Pointer)(_pRhs.X5), uint32(_34_nCmp))
- if _rc == i32(0) {
- _rc = _29_nStr - (_pRhs.X4)
+ _rc = crt.Xmemcmp(tls, unsafe.Pointer(elem15(_aKey1, uintptr(_d1))), unsafe.Pointer(_pRhs.Xz), uint32(_34_nCmp))
+ if _rc == int32(0) {
+ _rc = _29_nStr - _pRhs.Xn
}
_69:
_63:
goto _73
_55:
- _4_serial_type = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(_idx1))))
- _rc = bool2int(_4_serial_type != uint32(i32(0)))
+ _4_serial_type = uint32(*elem15(_aKey1, uintptr(_idx1)))
+ _rc = bool2int(_4_serial_type != (0))
_73:
- if _rc == i32(0) {
+ if _rc == int32(0) {
goto _74
}
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pKeyInfo.X5)) + 1*uintptr(_i)))) != 0 {
+ if (*elem15(_pKeyInfo.XaSortOrder, uintptr(_i))) != 0 {
_rc = -_rc
}
func() {
if _vdbeRecordCompareDebug(tls, _nKey1, _pKey1, _pPKey2, _rc) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75557), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000))), unsafe.Pointer(str(76174)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75557), unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000), unsafe.Pointer(str(74336)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_mem1.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75558), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000))), unsafe.Pointer(str(76223)))
+ if _mem1.XszMalloc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75558), unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000), unsafe.Pointer(str(74385)))
crt.X__builtin_abort(tls)
}
}()
@@ -57095,52 +56848,48 @@ _73:
_74:
_i += 1
*(*uintptr)(unsafe.Pointer(&_pRhs)) += uintptr(48)
- {
- p := &_d1
- *p = (*p) + _sqlite3VdbeSerialTypeLen(tls, _4_serial_type)
- sink5(*p)
- }
- {
- p := &_idx1
- *p = (*p) + uint32(_sqlite3VarintLen(tls, uint64(_4_serial_type)))
- sink5(*p)
- }
- if ((_idx1 < _szHdr1) && (_i < int32(_pPKey2.X2))) && (_d1 <= uint32(_nKey1)) {
+ _d1 += _sqlite3VdbeSerialTypeLen(tls, _4_serial_type)
+ _idx1 += uint32(_sqlite3VarintLen(tls, uint64(_4_serial_type)))
+ if ((_idx1 < _szHdr1) && (_i < int32(_pPKey2.XnField))) && (_d1 <= uint32(_nKey1)) {
goto _17
}
func() {
- if (_mem1.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75571), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000))), unsafe.Pointer(str(76223)))
+ if _mem1.XszMalloc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75571), unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000), unsafe.Pointer(str(74385)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_sqlite3Config.X6) != i32(0) && _vdbeRecordCompareDebug(tls, _nKey1, _pKey1, _pPKey2, int32(_pPKey2.X3)) == 0 && ((*Xsqlite3)(_pKeyInfo.X4).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75576), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000))), unsafe.Pointer(str(76240)))
+ if _sqlite3Config.XneverCorrupt != int32(0) && _vdbeRecordCompareDebug(tls, _nKey1, _pKey1, _pPKey2, int32(_pPKey2.Xdefault_rc)) == 0 && ((*Xsqlite3)(_pKeyInfo.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75576), unsafe.Pointer(&_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000), unsafe.Pointer(str(74402)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pPKey2.X7))) = uint8(i32(1))
- return int32(_pPKey2.X3)
-
- _ = _mem1
- panic(0)
+ _pPKey2.XeqSeen = uint8(1)
+ return int32(_pPKey2.Xdefault_rc)
}
-// Return the length of the data corresponding to the supplied serial-type.
+// C comment
+// /*
+// ** Return the length of the data corresponding to the supplied serial-type.
+// */
func _sqlite3VdbeSerialTypeLen(tls *crt.TLS, _serial_type uint32) (r0 uint32) {
- if _serial_type >= uint32(i32(128)) {
- return (_serial_type - uint32(i32(12))) / uint32(i32(2))
+ if _serial_type >= uint32(128) {
+ return (_serial_type - uint32(12)) / uint32(2)
}
func() {
- if _serial_type >= uint32(i32(12)) && uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3SmallTypeSizes)) + 1*uintptr(_serial_type)))) != ((_serial_type-uint32(i32(12)))/uint32(i32(2))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74674), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSerialTypeLenØ00__func__Ø000))), unsafe.Pointer(str(76349)))
+ if _serial_type >= uint32(12) && uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3SmallTypeSizes)), uintptr(_serial_type))) != ((_serial_type-uint32(12))/uint32(2)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74674), unsafe.Pointer(&_sqlite3VdbeSerialTypeLenØ00__func__Ø000), unsafe.Pointer(str(74511)))
crt.X__builtin_abort(tls)
}
}()
- return uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3SmallTypeSizes)) + 1*uintptr(_serial_type))))
+ return uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3SmallTypeSizes)), uintptr(_serial_type)))
}
+// C comment
+// /*
+// ** The sizes for serial types less than 128
+// */
var _sqlite3SmallTypeSizes [128]uint8
func init() {
@@ -57150,71 +56899,74 @@ func init() {
var _sqlite3VdbeSerialTypeLenØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSerialTypeLenØ00__func__Ø000[0], str(76424), 25)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSerialTypeLenØ00__func__Ø000[0], str(74586), 25)
}
var _sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000 [33]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000[0], str(76449), 33)
+ crt.Xstrncpy(nil, &_sqlite3VdbeRecordCompareWithSkipØ00__func__Ø000[0], str(74611), 33)
}
-// The first argument passed to this function is a serial-type that
-// corresponds to an integer - all values between 1 and 9 inclusive
-// except 7. The second points to a buffer containing an integer value
-// serialized according to serial_type. This function deserializes
-// and returns the value.
+// C comment
+// /*
+// ** The first argument passed to this function is a serial-type that
+// ** corresponds to an integer - all values between 1 and 9 inclusive
+// ** except 7. The second points to a buffer containing an integer value
+// ** serialized according to serial_type. This function deserializes
+// ** and returns the value.
+// */
func _vdbeRecordDecodeInt(tls *crt.TLS, _serial_type uint32, _aKey *uint8) (r0 int64) {
var _y uint32
var _4_x uint64
func() {
- if (_sqlite3Config.X6) != i32(0) && (_serial_type < uint32(i32(1)) || _serial_type > uint32(i32(9)) || _serial_type == uint32(i32(7))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75344), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordDecodeIntØ00__func__Ø000))), unsafe.Pointer(str(76482)))
+ if _sqlite3Config.XneverCorrupt != int32(0) && (_serial_type < uint32(1) || _serial_type > uint32(9) || _serial_type == uint32(7)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75344), unsafe.Pointer(&_vdbeRecordDecodeIntØ00__func__Ø000), unsafe.Pointer(str(74644)))
crt.X__builtin_abort(tls)
}
}()
switch _serial_type {
- case u32(0):
+ case uint32(0):
goto _6
- case u32(1):
+ case uint32(1):
goto _6
- case u32(2):
+ case uint32(2):
goto _8
- case u32(3):
+ case uint32(3):
goto _9
- case u32(4):
+ case uint32(4):
goto _10
- case u32(5):
+ case uint32(5):
goto _11
- case u32(6):
+ case uint32(6):
goto _12
default:
goto _13
}
_6:
- return int64(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))))
+ return int64(int8(*elem15(_aKey, 0)))
_8:
- return int64((i32(256) * int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1))))))
+ return int64((int32(256) * int32(int8(*elem15(_aKey, 0)))) | int32(*elem15(_aKey, uintptr(1))))
_9:
- return int64(((i32(65536) * int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))))) | (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1))))) << uint(i32(8)))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(2))))))
+ return int64(((int32(65536) * int32(int8(*elem15(_aKey, 0)))) | (int32(*elem15(_aKey, uintptr(1))) << 8)) | int32(*elem15(_aKey, uintptr(2))))
_10:
- _y = (((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))) << uint(i32(24))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1)))))<<uint(i32(16)))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(2)))))<<uint(i32(8)))) | uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(3)))))
+ _y = (((uint32(*elem15(_aKey, 0)) << 24) | uint32(int32(*elem15(_aKey, uintptr(1)))<<16)) | uint32(int32(*elem15(_aKey, uintptr(2)))<<8)) | uint32(*elem15(_aKey, uintptr(3)))
return int64(*(*int32)(unsafe.Pointer(&_y)))
_11:
- return int64((((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(0)))))<<uint(i32(24)))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(1)))))<<uint(i32(16))))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(2)))))<<uint(i32(8))))|uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)))))))))) + 1*uintptr(i32(3)))))) + (i64(4294967296) * int64((i32(256)*int32(int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0)))))))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1)))))))
+ return int64((((uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(2)))), 0))<<24)|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(2)))), uintptr(1)))<<16))|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(2)))), uintptr(2)))<<8))|uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(2)))), uintptr(3)))) + (int64(4294967296) * int64((int32(256)*int32(int8(*elem15(_aKey, 0))))|int32(*elem15(_aKey, uintptr(1)))))
_12:
- _4_x = uint64((((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(0))))) << uint(i32(24))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(1)))))<<uint(i32(16)))) | uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(2)))))<<uint(i32(8)))) | uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey)) + 1*uintptr(i32(3))))))
- _4_x = (_4_x << uint(i32(32))) | uint64((((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(0)))))<<uint(i32(24)))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(1)))))<<uint(i32(16))))|uint32(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(2)))))<<uint(i32(8))))|uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))) + 1*uintptr(i32(3))))))
+ _4_x = uint64((((uint32(*elem15(_aKey, 0)) << 24) | uint32(int32(*elem15(_aKey, uintptr(1)))<<16)) | uint32(int32(*elem15(_aKey, uintptr(2)))<<8)) | uint32(*elem15(_aKey, uintptr(3))))
+ _4_x = (_4_x << 32) | uint64((((uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(4)))), 0))<<24)|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(4)))), uintptr(1)))<<16))|uint32(int32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(4)))), uintptr(2)))<<8))|uint32(*elem15((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey))+uintptr(int32(4)))), uintptr(3))))
return *(*int64)(unsafe.Pointer(&_4_x))
_13:
- return int64(_serial_type - uint32(i32(8)))
+ return int64(_serial_type - uint32(8))
_ = _y
panic(0)
@@ -57223,157 +56975,152 @@ _13:
var _vdbeRecordDecodeIntØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeRecordDecodeIntØ00__func__Ø000[0], str(76549), 20)
+ crt.Xstrncpy(nil, &_vdbeRecordDecodeIntØ00__func__Ø000[0], str(74711), 20)
}
-// This function compares two index or table record keys in the same way
-// as the sqlite3VdbeRecordCompare() routine. Unlike VdbeRecordCompare(),
-// this function deserializes and compares values using the
-// sqlite3VdbeSerialGet() and sqlite3MemCompare() functions. It is used
-// in assert() statements to ensure that the optimized code in
-// sqlite3VdbeRecordCompare() returns results with these two primitives.
-//
-// Return true if the result of comparison is equivalent to desiredResult.
-// Return false if there is a disagreement.
+// C comment
+// /*
+// ** This function compares two index or table record keys in the same way
+// ** as the sqlite3VdbeRecordCompare() routine. Unlike VdbeRecordCompare(),
+// ** this function deserializes and compares values using the
+// ** sqlite3VdbeSerialGet() and sqlite3MemCompare() functions. It is used
+// ** in assert() statements to ensure that the optimized code in
+// ** sqlite3VdbeRecordCompare() returns results with these two primitives.
+// **
+// ** Return true if the result of comparison is equivalent to desiredResult.
+// ** Return false if there is a disagreement.
+// */
func _vdbeRecordCompareDebug(tls *crt.TLS, _nKey1 int32, _pKey1 unsafe.Pointer, _pPKey2 *XUnpackedRecord, _desiredResult int32) (r0 int32) {
var _i, _rc int32
var _d1, _idx1, _szHdr1, _1_serial_type1 uint32
var _aKey1 *uint8
var _mem1 XMem
var _pKeyInfo *XKeyInfo
- _i = i32(0)
- _rc = i32(0)
+ _i = int32(0)
+ _rc = int32(0)
_aKey1 = (*uint8)(_pKey1)
- _pKeyInfo = (*XKeyInfo)(_pPKey2.X0)
- if (*Xsqlite3)(_pKeyInfo.X4) == nil {
- return i32(1)
+ _pKeyInfo = (*XKeyInfo)(_pPKey2.XpKeyInfo)
+ if (*Xsqlite3)(_pKeyInfo.Xdb) == nil {
+ return int32(1)
}
- *(*uint8)(unsafe.Pointer(&(_mem1.X2))) = _pKeyInfo.X1
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_mem1.X9))))) = (*Xsqlite3)(_pKeyInfo.X4)
- *(*int32)(unsafe.Pointer(&(_mem1.X7))) = i32(0)
+ _mem1.Xenc = _pKeyInfo.Xenc
+ *(**Xsqlite3)(unsafe.Pointer(&_mem1.Xdb)) = (*Xsqlite3)(_pKeyInfo.Xdb)
+ _mem1.XszMalloc = int32(0)
_idx1 = uint32(uint8(func() int32 {
- if int32(*_aKey1) < int32(u8(128)) {
- return func() int32 { _szHdr1 = uint32(*_aKey1); return i32(1) }()
+ if int32(*_aKey1) < int32(128) {
+ return func() int32 { _szHdr1 = uint32(*_aKey1); return int32(1) }()
}
return int32(_sqlite3GetVarint32(tls, _aKey1, &_szHdr1))
}()))
- if _szHdr1 > uint32(i32(98307)) {
- return i32(11)
+ if _szHdr1 > uint32(98307) {
+ return int32(11)
}
_d1 = _szHdr1
func() {
- if (int32(_pKeyInfo.X2)+int32(_pKeyInfo.X3)) < int32(_pPKey2.X2) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75039), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000))), unsafe.Pointer(str(76569)))
+ if (int32(_pKeyInfo.XnField)+int32(_pKeyInfo.XnXField)) < int32(_pPKey2.XnField) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75039), unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000), unsafe.Pointer(str(74731)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pKeyInfo.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75040), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000))), unsafe.Pointer(str(37852)))
+ if _pKeyInfo.XaSortOrder == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75040), unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000), unsafe.Pointer(str(37807)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pKeyInfo.X2) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75041), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000))), unsafe.Pointer(str(76634)))
+ if int32(_pKeyInfo.XnField) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75041), unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000), unsafe.Pointer(str(74796)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _idx1 > _szHdr1 && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75042), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000))), unsafe.Pointer(str(76105)))
+ if _idx1 > _szHdr1 && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75042), unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000), unsafe.Pointer(str(74267)))
crt.X__builtin_abort(tls)
}
}()
_14:
- {
- p := &_idx1
- *p = (*p) + uint32(uint8(func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey1)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_idx1)))))))) < int32(u8(128)) {
- return func() int32 {
- _1_serial_type1 = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey1)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_idx1))))))))
- return i32(1)
- }()
- }
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey1))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_idx1))))))), &_1_serial_type1))
- }()))
- sink5(*p)
- }
- if (((_d1 + _1_serial_type1) + uint32(i32(2))) > uint32(_nKey1)) && ((_d1 + _sqlite3VdbeSerialTypeLen(tls, _1_serial_type1)) > uint32(_nKey1)) {
+ _idx1 += uint32(uint8(func() int32 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey1)) + uintptr(_idx1)))) < int32(128) {
+ return func() int32 {
+ _1_serial_type1 = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey1)) + uintptr(_idx1))))
+ return int32(1)
+ }()
+ }
+ return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_aKey1))+uintptr(_idx1))), &_1_serial_type1))
+ }()))
+ if (((_d1 + _1_serial_type1) + uint32(2)) > uint32(_nKey1)) && ((_d1 + _sqlite3VdbeSerialTypeLen(tls, _1_serial_type1)) > uint32(_nKey1)) {
goto _19
}
- {
- p := &_d1
- *p = (*p) + _sqlite3VdbeSerialGet(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_d1))), _1_serial_type1, &_mem1)
- sink5(*p)
- }
- _rc = _sqlite3MemCompare(tls, &_mem1, (*XMem)(unsafe.Pointer(uintptr(_pPKey2.X1)+48*uintptr(_i))), *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_pKeyInfo.X6))))) + 4*uintptr(_i))))
- if _rc == i32(0) {
+ _d1 += _sqlite3VdbeSerialGet(tls, elem15(_aKey1, uintptr(_d1)), _1_serial_type1, &_mem1)
+ _rc = _sqlite3MemCompare(tls, &_mem1, elem25((*XMem)(_pPKey2.XaMem), uintptr(_i)), *elem62((**XCollSeq)(unsafe.Pointer(&_pKeyInfo.XaColl)), uintptr(_i)))
+ if _rc == int32(0) {
goto _20
}
func() {
- if (_mem1.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75069), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000))), unsafe.Pointer(str(76223)))
+ if _mem1.XszMalloc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75069), unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000), unsafe.Pointer(str(74385)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pKeyInfo.X5)) + 1*uintptr(_i)))) != 0 {
+ if (*elem15(_pKeyInfo.XaSortOrder, uintptr(_i))) != 0 {
_rc = -_rc
}
goto _debugCompareEnd
_20:
_i += 1
- if (_idx1 < _szHdr1) && (_i < int32(_pPKey2.X2)) {
+ if (_idx1 < _szHdr1) && (_i < int32(_pPKey2.XnField)) {
goto _14
}
_19:
func() {
- if (_mem1.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75082), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000))), unsafe.Pointer(str(76223)))
+ if _mem1.XszMalloc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75082), unsafe.Pointer(&_vdbeRecordCompareDebugØ00__func__Ø000), unsafe.Pointer(str(74385)))
crt.X__builtin_abort(tls)
}
}()
- _rc = int32(_pPKey2.X3)
+ _rc = int32(_pPKey2.Xdefault_rc)
_debugCompareEnd:
- if (_desiredResult == i32(0)) && (_rc == i32(0)) {
- return i32(1)
+ if (_desiredResult == int32(0)) && (_rc == int32(0)) {
+ return int32(1)
}
- if (_desiredResult < i32(0)) && (_rc < i32(0)) {
- return i32(1)
+ if (_desiredResult < int32(0)) && (_rc < int32(0)) {
+ return int32(1)
}
- if (_desiredResult > i32(0)) && (_rc > i32(0)) {
- return i32(1)
+ if (_desiredResult > int32(0)) && (_rc > int32(0)) {
+ return int32(1)
}
- if (_sqlite3Config.X6) == i32(0) {
- return i32(1)
+ if _sqlite3Config.XneverCorrupt == int32(0) {
+ return int32(1)
}
- if ((*Xsqlite3)(_pKeyInfo.X4).X17) != 0 {
- return i32(1)
+ if ((*Xsqlite3)(_pKeyInfo.Xdb).XmallocFailed) != 0 {
+ return int32(1)
}
- return i32(0)
-
- _ = _mem1
- panic(0)
+ return int32(0)
}
var _vdbeRecordCompareDebugØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeRecordCompareDebugØ00__func__Ø000[0], str(76653), 23)
+ crt.Xstrncpy(nil, &_vdbeRecordCompareDebugØ00__func__Ø000[0], str(74815), 23)
}
-// Return the number of bytes that will be needed to store the given
-// 64-bit integer.
+// C comment
+// /*
+// ** Return the number of bytes that will be needed to store the given
+// ** 64-bit integer.
+// */
func _sqlite3VarintLen(tls *crt.TLS, _v uint64) (r0 int32) {
var _i int32
- _i = i32(1)
+ _i = int32(1)
_0:
- if store17(func() (*uint64, uint64) { p := &_v; return p, ((*p) >> uint(i32(7))) }()) == uint64(i32(0)) {
+ if store85(func() (*uint64, uint64) { p := &_v; return p, ((*p) >> 7) }()) == (0) {
goto _3
}
func() {
- if _i >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28787), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VarintLenØ00__func__Ø000))), unsafe.Pointer(str(76676)))
+ if _i >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28787), unsafe.Pointer(&_sqlite3VarintLenØ00__func__Ø000), unsafe.Pointer(str(74838)))
crt.X__builtin_abort(tls)
}
}()
@@ -57386,94 +57133,94 @@ _3:
var _sqlite3VarintLenØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VarintLenØ00__func__Ø000[0], str(76681), 17)
+ crt.Xstrncpy(nil, &_sqlite3VarintLenØ00__func__Ø000[0], str(74843), 17)
}
var _sqlite3VdbeFindCompareØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeFindCompareØ00__func__Ø000[0], str(76698), 23)
+ crt.Xstrncpy(nil, &_sqlite3VdbeFindCompareØ00__func__Ø000[0], str(74860), 23)
}
-// This function is an optimized version of sqlite3VdbeRecordCompare()
-// that (a) the first field of pPKey2 is a string, that (b) the first field
-// uses the collation sequence BINARY and (c) that the size-of-header varint
-// at the start of (pKey1/nKey1) fits in a single byte.
+// C comment
+// /*
+// ** This function is an optimized version of sqlite3VdbeRecordCompare()
+// ** that (a) the first field of pPKey2 is a string, that (b) the first field
+// ** uses the collation sequence BINARY and (c) that the size-of-header varint
+// ** at the start of (pKey1/nKey1) fits in a single byte.
+// */
func _vdbeRecordCompareString(tls *crt.TLS, _nKey1 int32, _pKey1 unsafe.Pointer, _pPKey2 *XUnpackedRecord) (r0 int32) {
var _serial_type, _res, _3_nCmp, _3_nStr, _3_szHdr int32
var _aKey1 *uint8
_aKey1 = (*uint8)(_pKey1)
func() {
- if (int32((*XMem)(unsafe.Pointer(uintptr(_pPKey2.X1)+48*uintptr(i32(0)))).X1) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75702), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareStringØ00__func__Ø000))), unsafe.Pointer(str(76721)))
+ if (int32(elem25((*XMem)(_pPKey2.XaMem), 0).Xflags) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75702), unsafe.Pointer(&_vdbeRecordCompareStringØ00__func__Ø000), unsafe.Pointer(str(74883)))
crt.X__builtin_abort(tls)
}
}()
- _vdbeAssertFieldCountWithinLimits(tls, _nKey1, _pKey1, (*XKeyInfo)(_pPKey2.X0))
+ _vdbeAssertFieldCountWithinLimits(tls, _nKey1, _pKey1, (*XKeyInfo)(_pPKey2.XpKeyInfo))
func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(i32(1))))) < int32(u8(128)) {
- return func() int32 {
- _serial_type = int32(uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(i32(1))))))
- return i32(1)
- }()
+ if int32(*elem15(_aKey1, uintptr(1))) < int32(128) {
+ return func() int32 { _serial_type = int32(uint32(*elem15(_aKey1, uintptr(1)))); return int32(1) }()
}
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(i32(1)))), (*uint32)(unsafe.Pointer(&_serial_type))))
+ return int32(_sqlite3GetVarint32(tls, elem15(_aKey1, uintptr(1)), (*uint32)(unsafe.Pointer(&_serial_type))))
}()
- if _serial_type < i32(12) {
- _res = int32(_pPKey2.X5)
+ if _serial_type < int32(12) {
+ _res = int32(_pPKey2.Xr1)
goto _7
}
- if (_serial_type & i32(1)) == 0 {
- _res = int32(_pPKey2.X6)
+ if (_serial_type & int32(1)) == 0 {
+ _res = int32(_pPKey2.Xr2)
goto _7
}
- _3_szHdr = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1)) + 1*uintptr(i32(0)))))
- _3_nStr = (_serial_type - i32(12)) / i32(2)
+ _3_szHdr = int32(*elem15(_aKey1, 0))
+ _3_nStr = (_serial_type - int32(12)) / int32(2)
if (_3_szHdr + _3_nStr) > _nKey1 {
- *(*uint8)(unsafe.Pointer(&(_pPKey2.X4))) = uint8(_sqlite3CorruptError(tls, i32(75716)))
- return i32(0)
+ _pPKey2.XerrCode = uint8(_sqlite3CorruptError(tls, int32(75716)))
+ return int32(0)
}
_3_nCmp = func() int32 {
- if ((*XMem)(unsafe.Pointer(uintptr(_pPKey2.X1) + 48*uintptr(i32(0)))).X4) < _3_nStr {
- return ((*XMem)(unsafe.Pointer(uintptr(_pPKey2.X1) + 48*uintptr(i32(0)))).X4)
+ if (elem25((*XMem)(_pPKey2.XaMem), 0).Xn) < _3_nStr {
+ return (elem25((*XMem)(_pPKey2.XaMem), 0).Xn)
}
return _3_nStr
}()
- _res = crt.Xmemcmp(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aKey1))+1*uintptr(_3_szHdr)))), (unsafe.Pointer)((*XMem)(unsafe.Pointer(uintptr(_pPKey2.X1)+48*uintptr(i32(0)))).X5), uint32(_3_nCmp))
- if _res != i32(0) {
+ _res = crt.Xmemcmp(tls, unsafe.Pointer(elem15(_aKey1, uintptr(_3_szHdr))), unsafe.Pointer(elem25((*XMem)(_pPKey2.XaMem), 0).Xz), uint32(_3_nCmp))
+ if _res != int32(0) {
goto _11
}
- _res = _3_nStr - ((*XMem)(unsafe.Pointer(uintptr(_pPKey2.X1) + 48*uintptr(i32(0)))).X4)
- if _res != i32(0) {
+ _res = _3_nStr - (elem25((*XMem)(_pPKey2.XaMem), 0).Xn)
+ if _res != int32(0) {
goto _12
}
- if int32(_pPKey2.X2) > i32(1) {
- _res = _sqlite3VdbeRecordCompareWithSkip(tls, _nKey1, _pKey1, _pPKey2, i32(1))
+ if int32(_pPKey2.XnField) > int32(1) {
+ _res = _sqlite3VdbeRecordCompareWithSkip(tls, _nKey1, _pKey1, _pPKey2, int32(1))
goto _14
}
- _res = int32(_pPKey2.X3)
- *(*uint8)(unsafe.Pointer(&(_pPKey2.X7))) = uint8(i32(1))
+ _res = int32(_pPKey2.Xdefault_rc)
+ _pPKey2.XeqSeen = uint8(1)
_14:
goto _17
_12:
- if _res > i32(0) {
- _res = int32(_pPKey2.X6)
+ if _res > int32(0) {
+ _res = int32(_pPKey2.Xr2)
goto _17
}
- _res = int32(_pPKey2.X5)
+ _res = int32(_pPKey2.Xr1)
_17:
goto _20
_11:
- if _res > i32(0) {
- _res = int32(_pPKey2.X6)
+ if _res > int32(0) {
+ _res = int32(_pPKey2.Xr2)
goto _20
}
- _res = int32(_pPKey2.X5)
+ _res = int32(_pPKey2.Xr1)
_20:
_7:
func() {
- if _vdbeRecordCompareDebug(tls, _nKey1, _pKey1, _pPKey2, _res) == 0 && (_sqlite3Config.X6) != i32(0) && ((*Xsqlite3)((*XKeyInfo)(_pPKey2.X0).X4).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75743), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeRecordCompareStringØ00__func__Ø000))), unsafe.Pointer(str(76753)))
+ if _vdbeRecordCompareDebug(tls, _nKey1, _pKey1, _pPKey2, _res) == 0 && _sqlite3Config.XneverCorrupt != int32(0) && ((*Xsqlite3)((*XKeyInfo)(_pPKey2.XpKeyInfo).Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75743), unsafe.Pointer(&_vdbeRecordCompareStringØ00__func__Ø000), unsafe.Pointer(str(74915)))
crt.X__builtin_abort(tls)
}
}()
@@ -57483,136 +57230,136 @@ _7:
var _vdbeRecordCompareStringØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeRecordCompareStringØ00__func__Ø000[0], str(76855), 24)
-}
-
-// Move the cursor to point to the root page of its b-tree structure.
-//
-// If the table has a virtual root page, then the cursor is moved to point
-// to the virtual root page instead of the actual root page. A table has a
-// virtual root page when the actual root page contains no cells and a
-// single child page. This can only happen with the table rooted at page 1.
-//
-// If the b-tree structure is empty, the cursor state is set to
-// CURSOR_INVALID. Otherwise, the cursor is set to point to the first
-// cell located on the root (or virtual root) page and the cursor state
-// is set to CURSOR_VALID.
-//
-// If this function returns successfully, it may be assumed that the
-// page-header flags indicate that the [virtual] root-page is the expected
-// kind of b-tree page (i.e. if when opening the cursor the caller did not
-// specify a KeyInfo structure the flags byte is set to 0x05 or 0x0D,
-// indicating a table b-tree, or if the caller did specify a KeyInfo
-// structure the flags byte is set to 0x02 or 0x0A, indicating an index
-// b-tree).
+ crt.Xstrncpy(nil, &_vdbeRecordCompareStringØ00__func__Ø000[0], str(75017), 24)
+}
+
+// C comment
+// /*
+// ** Move the cursor to point to the root page of its b-tree structure.
+// **
+// ** If the table has a virtual root page, then the cursor is moved to point
+// ** to the virtual root page instead of the actual root page. A table has a
+// ** virtual root page when the actual root page contains no cells and a
+// ** single child page. This can only happen with the table rooted at page 1.
+// **
+// ** If the b-tree structure is empty, the cursor state is set to
+// ** CURSOR_INVALID. Otherwise, the cursor is set to point to the first
+// ** cell located on the root (or virtual root) page and the cursor state
+// ** is set to CURSOR_VALID.
+// **
+// ** If this function returns successfully, it may be assumed that the
+// ** page-header flags indicate that the [virtual] root-page is the expected
+// ** kind of b-tree page (i.e. if when opening the cursor the caller did not
+// ** specify a KeyInfo structure the flags byte is set to 0x05 or 0x0D,
+// ** indicating a table b-tree, or if the caller did specify a KeyInfo
+// ** structure the flags byte is set to 0x02 or 0x0A, indicating an index
+// ** b-tree).
+// */
func _moveToRoot(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
var _rc int32
var _11_subpage uint32
var _pRoot *XMemPage
- _rc = i32(0)
+ _rc = int32(0)
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63949), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRootØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63949), unsafe.Pointer(&_moveToRootØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- i32(0)
- i32(0)
- if int32(_pCur.X12) < i32(3) {
+
+ if int32(_pCur.XeState) < int32(3) {
goto _2
}
- if int32(_pCur.X12) == i32(4) {
+ if int32(_pCur.XeState) == int32(4) {
func() {
- if (_pCur.X9) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63955), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRootØ00__func__Ø000))), unsafe.Pointer(str(76879)))
+ if _pCur.XskipNext == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63955), unsafe.Pointer(&_moveToRootØ00__func__Ø000), unsafe.Pointer(str(75041)))
crt.X__builtin_abort(tls)
}
}()
- return _pCur.X9
+ return _pCur.XskipNext
}
_sqlite3BtreeClearCursor(tls, _pCur)
_2:
- if int32(_pCur.X14) < i32(0) {
+ if int32(_pCur.XiPage) < int32(0) {
goto _6
}
- if (_pCur.X14) == 0 {
+ if _pCur.XiPage == 0 {
goto _7
}
_8:
func() {
- if (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63964), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRootØ00__func__Ø000))), unsafe.Pointer(str(76905)))
+ if (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63964), unsafe.Pointer(&_moveToRootØ00__func__Ø000), unsafe.Pointer(str(75067)))
crt.X__builtin_abort(tls)
}
}()
- _releasePageNotNull(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(postInc3((*int8)(unsafe.Pointer(&(_pCur.X14))), int8(-1))))))
- if (_pCur.X14) != 0 {
+ _releasePageNotNull(tls, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(postInc5(&_pCur.XiPage, -1))))
+ if _pCur.XiPage != 0 {
goto _8
}
goto _skip_init
_7:
goto _13
_6:
- if (_pCur.X7) == uint32(i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(0))
- return i32(0)
+ if _pCur.XpgnoRoot == (0) {
+ _pCur.XeState = 0
+ return int32(0)
}
func() {
- if int32(_pCur.X14) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63973), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRootØ00__func__Ø000))), unsafe.Pointer(str(76934)))
+ if int32(_pCur.XiPage) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63973), unsafe.Pointer(&_moveToRootØ00__func__Ø000), unsafe.Pointer(str(75096)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _getAndInitPage(tls, (*XBtShared)((*XBtree)(_pCur.X0).X1), _pCur.X7, (**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19)))))+4*uintptr(i32(0)))), nil, int32(_pCur.X11))
- if _rc != i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(0))
+ _rc = _getAndInitPage(tls, (*XBtShared)((*XBtree)(_pCur.XpBtree).XpBt), _pCur.XpgnoRoot, elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), 0), nil, int32(_pCur.XcurPagerFlags))
+ if _rc != int32(0) {
+ _pCur.XeState = 0
return _rc
}
- *(*int8)(unsafe.Pointer(&(_pCur.X14))) = int8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pCur.X15))) = (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(i32(0))))).X2
+ _pCur.XiPage = 0
+ _pCur.XcurIntKey = (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), 0)).XintKey
_13:
- _pRoot = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(i32(0))))
+ _pRoot = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), 0)
func() {
- if (_pRoot.X4) != (_pCur.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63984), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRootØ00__func__Ø000))), unsafe.Pointer(str(76952)))
+ if _pRoot.Xpgno != _pCur.XpgnoRoot {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63984), unsafe.Pointer(&_moveToRootØ00__func__Ø000), unsafe.Pointer(str(75114)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pRoot.X2) != i32(1) && int32(_pRoot.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63996), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRootØ00__func__Ø000))), unsafe.Pointer(str(76980)))
+ if int32(_pRoot.XintKey) != int32(1) && int32(_pRoot.XintKey) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63996), unsafe.Pointer(&_moveToRootØ00__func__Ø000), unsafe.Pointer(str(75142)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pRoot.X0) == i32(0)) || (bool2int((*XKeyInfo)(_pCur.X18) == nil) != int32(_pRoot.X2)) {
- return _sqlite3CorruptError(tls, i32(63998))
+ if (int32(_pRoot.XisInit) == int32(0)) || (bool2int((*XKeyInfo)(_pCur.XpKeyInfo) == nil) != int32(_pRoot.XintKey)) {
+ return _sqlite3CorruptError(tls, int32(63998))
}
_skip_init:
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(i32(0))
- *(*uint16)(unsafe.Pointer(&((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4))) = uint16(i32(0))
+ _pCur.Xix = 0
+ _pCur.Xinfo.XnSize = 0
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-15))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-15))
}
- _pRoot = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(i32(0))))
- if int32(_pRoot.X14) > i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(1))
+ _pRoot = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), 0)
+ if int32(_pRoot.XnCell) > int32(0) {
+ _pCur.XeState = uint8(1)
goto _28
}
- if (_pRoot.X5) != 0 {
+ if _pRoot.Xleaf != 0 {
goto _26
}
- if (_pRoot.X4) != uint32(i32(1)) {
- return _sqlite3CorruptError(tls, i32(64011))
+ if _pRoot.Xpgno != uint32(1) {
+ return _sqlite3CorruptError(tls, int32(64011))
}
- _11_subpage = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pRoot.X19))+1*uintptr(int32(_pRoot.X6)+i32(8)))))
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(1))
+ _11_subpage = _sqlite3Get4byte(tls, elem15(_pRoot.XaData, uintptr(int32(_pRoot.XhdrOffset)+int32(8))))
+ _pCur.XeState = uint8(1)
_rc = _moveToChild(tls, _pCur, _11_subpage)
goto _28
_26:
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(0))
+ _pCur.XeState = 0
_28:
return _rc
}
@@ -57620,52 +57367,58 @@ _28:
var _moveToRootØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_moveToRootØ00__func__Ø000[0], str(77017), 11)
+ crt.Xstrncpy(nil, &_moveToRootØ00__func__Ø000[0], str(75179), 11)
}
-// Determine whether or not a cursor has moved from the position where
-// it was last placed, or has been invalidated for any other reason.
-// Cursors can move when the row they are pointing at is deleted out
-// from under them, for example. Cursor might also move if a btree
-// is rebalanced.
-//
-// Calling this routine with a NULL cursor pointer returns false.
-//
-// Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor
-// back to where it ought to be if this routine returns true.
+// C comment
+// /*
+// ** Determine whether or not a cursor has moved from the position where
+// ** it was last placed, or has been invalidated for any other reason.
+// ** Cursors can move when the row they are pointing at is deleted out
+// ** from under them, for example. Cursor might also move if a btree
+// ** is rebalanced.
+// **
+// ** Calling this routine with a NULL cursor pointer returns false.
+// **
+// ** Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor
+// ** back to where it ought to be if this routine returns true.
+// */
func _sqlite3BtreeCursorHasMoved(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
- return bool2int(int32(_pCur.X12) != i32(1))
+ return bool2int(int32(_pCur.XeState) != int32(1))
}
-// Something has moved cursor "p" out of place. Maybe the row it was
-// pointed to was deleted out from under it. Or maybe the btree was
-// rebalanced. Whatever the cause, try to restore "p" to the place it
-// is supposed to be pointing. If the row was deleted out from under the
-// cursor, set the cursor to point to a NULL row.
+// C comment
+// /*
+// ** Something has moved cursor "p" out of place. Maybe the row it was
+// ** pointed to was deleted out from under it. Or maybe the btree was
+// ** rebalanced. Whatever the cause, try to restore "p" to the place it
+// ** is supposed to be pointing. If the row was deleted out from under the
+// ** cursor, set the cursor to point to a NULL row.
+// */
func _handleMovedCursor(tls *crt.TLS, _p *XVdbeCursor) (r0 int32) {
var _isDifferentRow, _rc int32
func() {
- if int32(_p.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74500), unsafe.Pointer((*int8)(unsafe.Pointer(&_handleMovedCursorØ00__func__Ø000))), unsafe.Pointer(str(73776)))
+ if int32(_p.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74500), unsafe.Pointer(&_handleMovedCursorØ00__func__Ø000), unsafe.Pointer(str(71938)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_p.X14)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74501), unsafe.Pointer((*int8)(unsafe.Pointer(&_handleMovedCursorØ00__func__Ø000))), unsafe.Pointer(str(77028)))
+ if (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xuc))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74501), unsafe.Pointer(&_handleMovedCursorØ00__func__Ø000), unsafe.Pointer(str(75190)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3BtreeCursorHasMoved(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_p.X14))))))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74502), unsafe.Pointer((*int8)(unsafe.Pointer(&_handleMovedCursorØ00__func__Ø000))), unsafe.Pointer(str(77045)))
+ if _sqlite3BtreeCursorHasMoved(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xuc)))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74502), unsafe.Pointer(&_handleMovedCursorØ00__func__Ø000), unsafe.Pointer(str(75207)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeCursorRestore(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_p.X14)))))), &_isDifferentRow)
- *(*uint32)(unsafe.Pointer(&(_p.X11))) = uint32(i32(0))
+ _rc = _sqlite3BtreeCursorRestore(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xuc))), &_isDifferentRow)
+ _p.XcacheStatus = 0
if _isDifferentRow != 0 {
- *(*uint8)(unsafe.Pointer(&(_p.X2))) = uint8(i32(1))
+ _p.XnullRow = uint8(1)
}
return _rc
}
@@ -57673,206 +57426,217 @@ func _handleMovedCursor(tls *crt.TLS, _p *XVdbeCursor) (r0 int32) {
var _handleMovedCursorØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_handleMovedCursorØ00__func__Ø000[0], str(77087), 18)
+ crt.Xstrncpy(nil, &_handleMovedCursorØ00__func__Ø000[0], str(75249), 18)
}
-// This routine restores a cursor back to its original position after it
-// has been moved by some outside activity (such as a btree rebalance or
-// a row having been deleted out from under the cursor).
-//
-// On success, the *pDifferentRow parameter is false if the cursor is left
-// pointing at exactly the same row. *pDifferntRow is the row the cursor
-// was pointing to has been deleted, forcing the cursor to point to some
-// nearby row.
-//
-// This routine should only be called for a cursor that just returned
-// TRUE from sqlite3BtreeCursorHasMoved().
+// C comment
+// /*
+// ** This routine restores a cursor back to its original position after it
+// ** has been moved by some outside activity (such as a btree rebalance or
+// ** a row having been deleted out from under the cursor).
+// **
+// ** On success, the *pDifferentRow parameter is false if the cursor is left
+// ** pointing at exactly the same row. *pDifferntRow is the row the cursor
+// ** was pointing to has been deleted, forcing the cursor to point to some
+// ** nearby row.
+// **
+// ** This routine should only be called for a cursor that just returned
+// ** TRUE from sqlite3BtreeCursorHasMoved().
+// */
func _sqlite3BtreeCursorRestore(tls *crt.TLS, _pCur *XBtCursor, _pDifferentRow *int32) (r0 int32) {
var _rc int32
func() {
if _pCur == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59888), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCursorRestoreØ00__func__Ø000))), unsafe.Pointer(str(77105)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59888), unsafe.Pointer(&_sqlite3BtreeCursorRestoreØ00__func__Ø000), unsafe.Pointer(str(75267)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59889), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCursorRestoreØ00__func__Ø000))), unsafe.Pointer(str(77113)))
+ if int32(_pCur.XeState) == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59889), unsafe.Pointer(&_sqlite3BtreeCursorRestoreØ00__func__Ø000), unsafe.Pointer(str(75275)))
crt.X__builtin_abort(tls)
}
}()
_rc = func() int32 {
- if int32(_pCur.X12) >= i32(3) {
+ if int32(_pCur.XeState) >= int32(3) {
return _btreeRestoreCursorPosition(tls, _pCur)
}
- return i32(0)
+ return int32(0)
}()
if _rc != 0 {
- *_pDifferentRow = i32(1)
+ *_pDifferentRow = int32(1)
return _rc
}
- if int32(_pCur.X12) != i32(1) {
- *_pDifferentRow = i32(1)
+ if int32(_pCur.XeState) != int32(1) {
+ *_pDifferentRow = int32(1)
goto _8
}
func() {
- if (_pCur.X9) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59898), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCursorRestoreØ00__func__Ø000))), unsafe.Pointer(str(77140)))
+ if _pCur.XskipNext != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59898), unsafe.Pointer(&_sqlite3BtreeCursorRestoreØ00__func__Ø000), unsafe.Pointer(str(75302)))
crt.X__builtin_abort(tls)
}
}()
- *_pDifferentRow = i32(0)
+ *_pDifferentRow = int32(0)
_8:
- return i32(0)
+ return int32(0)
}
var _sqlite3BtreeCursorRestoreØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeCursorRestoreØ00__func__Ø000[0], str(77158), 26)
+ crt.Xstrncpy(nil, &_sqlite3BtreeCursorRestoreØ00__func__Ø000[0], str(75320), 26)
}
-// The next routine used only within assert() statements
-
-// Return true if the given BtCursor is valid. A valid cursor is one
-// that is currently pointing to a row in a (non-empty) table.
-// This is a verification routine is used only within assert() statements.
+// C comment
+// /* The next routine used only within assert() statements */
+// /*
+// ** Return true if the given BtCursor is valid. A valid cursor is one
+// ** that is currently pointing to a row in a (non-empty) table.
+// ** This is a verification routine is used only within assert() statements.
+// */
func _sqlite3BtreeCursorIsValid(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
- return bool2int((_pCur != nil) && (int32(_pCur.X12) == i32(1)))
-}
-
-// For the entry that cursor pCur is point to, return as
-// many bytes of the key or data as are available on the local
-// b-tree page. Write the number of available bytes into *pAmt.
-//
-// The pointer returned is ephemeral. The key/data may move
-// or be destroyed on the next call to any Btree routine,
-// including calls from other threads against the same cache.
-// Hence, a mutex on the BtShared should be held prior to calling
-// this routine.
-//
-// These routines is used to get quick access to key and data
-// in the common case where no overflow pages are used.
+ return bool2int((_pCur != nil) && (int32(_pCur.XeState) == int32(1)))
+}
+
+// C comment
+// /*
+// ** For the entry that cursor pCur is point to, return as
+// ** many bytes of the key or data as are available on the local
+// ** b-tree page. Write the number of available bytes into *pAmt.
+// **
+// ** The pointer returned is ephemeral. The key/data may move
+// ** or be destroyed on the next call to any Btree routine,
+// ** including calls from other threads against the same cache.
+// ** Hence, a mutex on the BtShared should be held prior to calling
+// ** this routine.
+// **
+// ** These routines is used to get quick access to key and data
+// ** in the common case where no overflow pages are used.
+// */
func _sqlite3BtreePayloadFetch(tls *crt.TLS, _pCur *XBtCursor, _pAmt *uint32) (r0 unsafe.Pointer) {
return _fetchPayload(tls, _pCur, _pAmt)
}
-// Return a pointer to payload information from the entry that the
-// pCur cursor is pointing to. The pointer is to the beginning of
-// the key if index btrees (pPage->intKey==0) and is the data for
-// table btrees (pPage->intKey==1). The number of bytes of available
-// key/data is written into *pAmt. If *pAmt==0, then the value
-// returned will not be a valid pointer.
-//
-// This routine is an optimization. It is common for the entire key
-// and data to fit on the local page and for there to be no overflow
-// pages. When that is so, this routine can be used to access the
-// key and data without making a copy. If the key and/or data spills
-// onto overflow pages, then accessPayload() must be used to reassemble
-// the key/data and copy it into a preallocated buffer.
-//
-// The pointer returned by this routine looks directly into the cached
-// page of the database. The data might change or move the next time
-// any btree routine is called.
+// C comment
+// /*
+// ** Return a pointer to payload information from the entry that the
+// ** pCur cursor is pointing to. The pointer is to the beginning of
+// ** the key if index btrees (pPage->intKey==0) and is the data for
+// ** table btrees (pPage->intKey==1). The number of bytes of available
+// ** key/data is written into *pAmt. If *pAmt==0, then the value
+// ** returned will not be a valid pointer.
+// **
+// ** This routine is an optimization. It is common for the entire key
+// ** and data to fit on the local page and for there to be no overflow
+// ** pages. When that is so, this routine can be used to access the
+// ** key and data without making a copy. If the key and/or data spills
+// ** onto overflow pages, then accessPayload() must be used to reassemble
+// ** the key/data and copy it into a preallocated buffer.
+// **
+// ** The pointer returned by this routine looks directly into the cached
+// ** page of the database. The data might change or move the next time
+// ** any btree routine is called.
+// */
func _fetchPayload(tls *crt.TLS, _pCur *XBtCursor, _pAmt *uint32) (r0 unsafe.Pointer) {
var _amt uint32
func() {
- if _pCur == nil || int32(_pCur.X14) < i32(0) || (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63816), unsafe.Pointer((*int8)(unsafe.Pointer(&_fetchPayloadØ00__func__Ø000))), unsafe.Pointer(str(77184)))
+ if _pCur == nil || int32(_pCur.XiPage) < int32(0) || (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63816), unsafe.Pointer(&_fetchPayloadØ00__func__Ø000), unsafe.Pointer(str(75346)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63817), unsafe.Pointer((*int8)(unsafe.Pointer(&_fetchPayloadØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63817), unsafe.Pointer(&_fetchPayloadØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.X0).X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63818), unsafe.Pointer((*int8)(unsafe.Pointer(&_fetchPayloadØ00__func__Ø000))), unsafe.Pointer(str(73849)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.XpBtree).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63818), unsafe.Pointer(&_fetchPayloadØ00__func__Ø000), unsafe.Pointer(str(72011)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63819), unsafe.Pointer((*int8)(unsafe.Pointer(&_fetchPayloadØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63819), unsafe.Pointer(&_fetchPayloadØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X16) >= int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63820), unsafe.Pointer((*int8)(unsafe.Pointer(&_fetchPayloadØ00__func__Ø000))), unsafe.Pointer(str(10597)))
+ if int32(_pCur.Xix) >= int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63820), unsafe.Pointer(&_fetchPayloadØ00__func__Ø000), unsafe.Pointer(str(10552)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63821), unsafe.Pointer((*int8)(unsafe.Pointer(&_fetchPayloadØ00__func__Ø000))), unsafe.Pointer(str(77239)))
+ if int32(_pCur.Xinfo.XnSize) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63821), unsafe.Pointer(&_fetchPayloadØ00__func__Ø000), unsafe.Pointer(str(75401)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uintptr(unsafe.Pointer((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X1)) <= uintptr(unsafe.Pointer((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X19)) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63822), unsafe.Pointer((*int8)(unsafe.Pointer(&_fetchPayloadØ00__func__Ø000))), unsafe.Pointer(str(77258)))
+ if crt.P2U(unsafe.Pointer(_pCur.Xinfo.XpPayload)) <= crt.P2U(unsafe.Pointer((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XaData)) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63822), unsafe.Pointer(&_fetchPayloadØ00__func__Ø000), unsafe.Pointer(str(75420)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uintptr(unsafe.Pointer((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X1)) >= uintptr(unsafe.Pointer((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X20)) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63823), unsafe.Pointer((*int8)(unsafe.Pointer(&_fetchPayloadØ00__func__Ø000))), unsafe.Pointer(str(77325)))
+ if crt.P2U(unsafe.Pointer(_pCur.Xinfo.XpPayload)) >= crt.P2U(unsafe.Pointer((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XaDataEnd)) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63823), unsafe.Pointer(&_fetchPayloadØ00__func__Ø000), unsafe.Pointer(str(75487)))
crt.X__builtin_abort(tls)
}
}()
- _amt = uint32(int32((uintptr(unsafe.Pointer((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X20)) - uintptr(unsafe.Pointer((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X1))) / 1))
- if uint32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X3) < _amt {
- _amt = uint32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X3)
+ _amt = uint32(int32(uintptr(unsafe.Pointer((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XaDataEnd)) - uintptr(unsafe.Pointer(_pCur.Xinfo.XpPayload))))
+ if uint32(_pCur.Xinfo.XnLocal) < _amt {
+ _amt = uint32(_pCur.Xinfo.XnLocal)
}
*_pAmt = _amt
- return (unsafe.Pointer)((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X1)
+ return unsafe.Pointer(_pCur.Xinfo.XpPayload)
}
var _fetchPayloadØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_fetchPayloadØ00__func__Ø000[0], str(77394), 13)
+ crt.Xstrncpy(nil, &_fetchPayloadØ00__func__Ø000[0], str(75556), 13)
}
func _sqlite3VdbeMemFromBtree(tls *crt.TLS, _pCur *XBtCursor, _offset uint32, _amt uint32, _pMem *XMem) (r0 int32) {
var _rc int32
var _available uint32
var _zData *int8
- _available = u32(0)
- _rc = i32(0)
+ _available = uint32(0)
+ _rc = int32(0)
func() {
if _sqlite3BtreeCursorIsValid(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70690), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemFromBtreeØ00__func__Ø000))), unsafe.Pointer(str(77407)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70690), unsafe.Pointer(&_sqlite3VdbeMemFromBtreeØ00__func__Ø000), unsafe.Pointer(str(75569)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(9312)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70691), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemFromBtreeØ00__func__Ø000))), unsafe.Pointer(str(77439)))
+ if (int32(_pMem.Xflags) & int32(9312)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70691), unsafe.Pointer(&_sqlite3VdbeMemFromBtreeØ00__func__Ø000), unsafe.Pointer(str(75601)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70695), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemFromBtreeØ00__func__Ø000))), unsafe.Pointer(str(6728)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70695), unsafe.Pointer(&_sqlite3VdbeMemFromBtreeØ00__func__Ø000), unsafe.Pointer(str(6629)))
crt.X__builtin_abort(tls)
}
}()
_zData = (*int8)(_sqlite3BtreePayloadFetch(tls, _pCur, &_available))
func() {
if _zData == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70697), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemFromBtreeØ00__func__Ø000))), unsafe.Pointer(str(77461)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70697), unsafe.Pointer(&_sqlite3VdbeMemFromBtreeØ00__func__Ø000), unsafe.Pointer(str(75623)))
crt.X__builtin_abort(tls)
}
}()
if (_offset + _amt) <= _available {
- *(**int8)(unsafe.Pointer(&(_pMem.X5))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zData)) + 1*uintptr(_offset)))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(4112))
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = int32(_amt)
+ _pMem.Xz = elem1(_zData, uintptr(_offset))
+ _pMem.Xflags = uint16(4112)
+ _pMem.Xn = int32(_amt)
goto _9
}
_rc = _vdbeMemFromBtreeResize(tls, _pCur, _offset, _amt, _pMem)
@@ -57883,34 +57647,37 @@ _9:
var _sqlite3VdbeMemFromBtreeØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemFromBtreeØ00__func__Ø000[0], str(77470), 24)
-}
-
-// Move data out of a btree key or data field and into a Mem structure.
-// The data is payload from the entry that pCur is currently pointing
-// to. offset and amt determine what portion of the data or key to retrieve.
-// The result is written into the pMem element.
-//
-// The pMem object must have been initialized. This routine will use
-// pMem->zMalloc to hold the content from the btree, if possible. New
-// pMem->zMalloc space will be allocated if necessary. The calling routine
-// is responsible for making sure that the pMem object is eventually
-// destroyed.
-//
-// If this routine fails for any reason (malloc returns NULL or unable
-// to read from the disk) then the pMem is left in an inconsistent state.
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemFromBtreeØ00__func__Ø000[0], str(75632), 24)
+}
+
+// C comment
+// /*
+// ** Move data out of a btree key or data field and into a Mem structure.
+// ** The data is payload from the entry that pCur is currently pointing
+// ** to. offset and amt determine what portion of the data or key to retrieve.
+// ** The result is written into the pMem element.
+// **
+// ** The pMem object must have been initialized. This routine will use
+// ** pMem->zMalloc to hold the content from the btree, if possible. New
+// ** pMem->zMalloc space will be allocated if necessary. The calling routine
+// ** is responsible for making sure that the pMem object is eventually
+// ** destroyed.
+// **
+// ** If this routine fails for any reason (malloc returns NULL or unable
+// ** to read from the disk) then the pMem is left in an inconsistent state.
+// */
func _vdbeMemFromBtreeResize(tls *crt.TLS, _pCur *XBtCursor, _offset uint32, _amt uint32, _pMem *XMem) (r0 int32) {
var _rc int32
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(1))
- if i32(0) != store1(&_rc, _sqlite3VdbeMemClearAndResize(tls, _pMem, int32(_amt+uint32(i32(2))))) {
+ _pMem.Xflags = uint16(1)
+ if int32(0) != store2(&_rc, _sqlite3VdbeMemClearAndResize(tls, _pMem, int32(_amt+uint32(2)))) {
goto _0
}
- _rc = _sqlite3BtreePayload(tls, _pCur, _offset, _amt, (unsafe.Pointer)(_pMem.X5))
- if _rc == i32(0) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr(_amt))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr(_amt+uint32(i32(1))))) = int8(i32(0))
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(528))
- *(*int32)(unsafe.Pointer(&(_pMem.X4))) = int32(_amt)
+ _rc = _sqlite3BtreePayload(tls, _pCur, _offset, _amt, unsafe.Pointer(_pMem.Xz))
+ if _rc == int32(0) {
+ *elem1(_pMem.Xz, uintptr(_amt)) = 0
+ *elem1(_pMem.Xz, uintptr(_amt+uint32(1))) = 0
+ _pMem.Xflags = uint16(528)
+ _pMem.Xn = int32(_amt)
goto _2
}
_sqlite3VdbeMemRelease(tls, _pMem)
@@ -57921,198 +57688,193 @@ _0:
func _sqlite3VdbeOneByteSerialTypeLen(tls *crt.TLS, _serial_type uint8) (r0 uint8) {
func() {
- if int32(_serial_type) >= i32(128) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74680), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeOneByteSerialTypeLenØ00__func__Ø000))), unsafe.Pointer(str(77494)))
+ if int32(_serial_type) >= int32(128) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74680), unsafe.Pointer(&_sqlite3VdbeOneByteSerialTypeLenØ00__func__Ø000), unsafe.Pointer(str(75656)))
crt.X__builtin_abort(tls)
}
}()
- return *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3SmallTypeSizes)) + 1*uintptr(_serial_type)))
+ return *elem15((*uint8)(unsafe.Pointer(&_sqlite3SmallTypeSizes)), uintptr(_serial_type))
}
var _sqlite3VdbeOneByteSerialTypeLenØ00__func__Ø000 [32]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeOneByteSerialTypeLenØ00__func__Ø000[0], str(77510), 32)
+ crt.Xstrncpy(nil, &_sqlite3VdbeOneByteSerialTypeLenØ00__func__Ø000[0], str(75672), 32)
}
var _sqlite3VdbeExecØ00aFlagØ004 [2]uint16
func init() {
- _sqlite3VdbeExecØ00aFlagØ004 = [2]uint16{u16(16), u16(514)}
+ _sqlite3VdbeExecØ00aFlagØ004 = [2]uint16{uint16(16), uint16(514)}
}
var _sqlite3VdbeExecØ00aZeroØ005 [16]uint8
-// Return the serial-type for the value stored in pMem.
+// C comment
+// /*
+// ** Return the serial-type for the value stored in pMem.
+// */
func _sqlite3VdbeSerialType(tls *crt.TLS, _pMem *XMem, _file_format int32, _pLen *uint32) (r0 uint32) {
var _flags int32
var _2_i int64
var _n uint32
var _2_u uint64
- _flags = int32(_pMem.X1)
+ _flags = int32(_pMem.Xflags)
func() {
if _pLen == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74602), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSerialTypeØ00__func__Ø000))), unsafe.Pointer(str(77542)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74602), unsafe.Pointer(&_sqlite3VdbeSerialTypeØ00__func__Ø000), unsafe.Pointer(str(75704)))
crt.X__builtin_abort(tls)
}
}()
- if (_flags & i32(1)) != 0 {
- *_pLen = uint32(i32(0))
- return uint32(i32(0))
+ if (_flags & int32(1)) != 0 {
+ *_pLen = 0
+ return 0
}
- if (_flags & i32(4)) == 0 {
+ if (_flags & int32(4)) == 0 {
goto _3
}
- _2_i = *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))
- if _2_i < int64(i32(0)) {
+ _2_i = *(*int64)(unsafe.Pointer(&_pMem.Xu))
+ if _2_i < (0) {
_2_u = uint64(^_2_i)
goto _5
}
_2_u = uint64(_2_i)
_5:
- if _2_u > uint64(i32(127)) {
+ if _2_u > uint64(127) {
goto _6
}
- if ((_2_i & int64(i32(1))) == _2_i) && (_file_format >= i32(4)) {
- *_pLen = uint32(i32(0))
- return uint32(i32(8)) + uint32(_2_u)
+ if ((_2_i & int64(1)) == _2_i) && (_file_format >= int32(4)) {
+ *_pLen = 0
+ return uint32(8) + uint32(_2_u)
}
- *_pLen = uint32(i32(1))
- return uint32(i32(1))
+ *_pLen = uint32(1)
+ return uint32(1)
_6:
- if _2_u <= uint64(i32(32767)) {
- *_pLen = uint32(i32(2))
- return uint32(i32(2))
+ if _2_u <= uint64(32767) {
+ *_pLen = uint32(2)
+ return uint32(2)
}
- if _2_u <= uint64(i32(8388607)) {
- *_pLen = uint32(i32(3))
- return uint32(i32(3))
+ if _2_u <= uint64(8388607) {
+ *_pLen = uint32(3)
+ return uint32(3)
}
- if _2_u <= uint64(i32(2147483647)) {
- *_pLen = uint32(i32(4))
- return uint32(i32(4))
+ if _2_u <= uint64(2147483647) {
+ *_pLen = uint32(4)
+ return uint32(4)
}
- if _2_u <= uint64(i64(140737488355327)) {
- *_pLen = uint32(i32(6))
- return uint32(i32(5))
+ if _2_u <= uint64(140737488355327) {
+ *_pLen = uint32(6)
+ return uint32(5)
}
- *_pLen = uint32(i32(8))
- return uint32(i32(6))
+ *_pLen = uint32(8)
+ return uint32(6)
_3:
- if (_flags & i32(8)) != 0 {
- *_pLen = uint32(i32(8))
- return uint32(i32(7))
+ if (_flags & int32(8)) != 0 {
+ *_pLen = uint32(8)
+ return uint32(7)
}
func() {
- if ((*Xsqlite3)(_pMem.X9).X17) == 0 && (_flags&i32(18)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74637), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSerialTypeØ00__func__Ø000))), unsafe.Pointer(str(77550)))
+ if ((*Xsqlite3)(_pMem.Xdb).XmallocFailed) == 0 && (_flags&int32(18)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74637), unsafe.Pointer(&_sqlite3VdbeSerialTypeØ00__func__Ø000), unsafe.Pointer(str(75712)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pMem.X4) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74638), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSerialTypeØ00__func__Ø000))), unsafe.Pointer(str(6001)))
+ if _pMem.Xn < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74638), unsafe.Pointer(&_sqlite3VdbeSerialTypeØ00__func__Ø000), unsafe.Pointer(str(5902)))
crt.X__builtin_abort(tls)
}
}()
- _n = uint32(_pMem.X4)
- if (_flags & i32(16384)) != 0 {
- {
- p := &_n
- *p = (*p) + uint32(*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
- sink5(*p)
- }
+ _n = uint32(_pMem.Xn)
+ if (_flags & int32(16384)) != 0 {
+ _n += uint32(*(*int32)(unsafe.Pointer(&_pMem.Xu)))
}
*_pLen = _n
- return ((_n * uint32(i32(2))) + uint32(i32(12))) + uint32(bool2int((_flags&i32(2)) != i32(0)))
+ return ((_n * uint32(2)) + uint32(12)) + uint32(bool2int((_flags&int32(2)) != int32(0)))
}
var _sqlite3VdbeSerialTypeØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSerialTypeØ00__func__Ø000[0], str(77601), 22)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSerialTypeØ00__func__Ø000[0], str(75763), 22)
}
+// C comment
+// /*
+// ** Routines to read and write variable-length integers. These used to
+// ** be defined locally, but now we use the varint routines in the util.c
+// ** file.
+// */
func _sqlite3PutVarint(tls *crt.TLS, _p *uint8, _v uint64) (r0 int32) {
- if _v <= uint64(i32(127)) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(0)))) = uint8(_v & uint64(i32(127)))
- return i32(1)
+ if _v <= uint64(127) {
+ *elem15(_p, 0) = uint8(_v & uint64(127))
+ return int32(1)
}
- if _v <= uint64(i32(16383)) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(0)))) = uint8(((_v >> uint(i32(7))) & uint64(i32(127))) | uint64(i32(128)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(1)))) = uint8(_v & uint64(i32(127)))
- return i32(2)
+ if _v <= uint64(16383) {
+ *elem15(_p, 0) = uint8(((_v >> 7) & uint64(127)) | uint64(128))
+ *elem15(_p, uintptr(1)) = uint8(_v & uint64(127))
+ return int32(2)
}
return _putVarint64(tls, _p, _v)
}
-// Write a 64-bit variable-length integer to memory starting at p[0].
-// The length of data write will be between 1 and 9 bytes. The number
-// of bytes written is returned.
-//
-// A variable-length integer consists of the lower 7 bits of each byte
-// for all bytes that have the 8th bit set and one byte with the 8th
-// bit clear. Except, if we get to the 9th byte, it stores the full
-// 8 bits and is the last byte.
+// C comment
+// /*
+// ** Write a 64-bit variable-length integer to memory starting at p[0].
+// ** The length of data write will be between 1 and 9 bytes. The number
+// ** of bytes written is returned.
+// **
+// ** A variable-length integer consists of the lower 7 bits of each byte
+// ** for all bytes that have the 8th bit set and one byte with the 8th
+// ** bit clear. Except, if we get to the 9th byte, it stores the full
+// ** 8 bits and is the last byte.
+// */
func _putVarint64(tls *crt.TLS, _p *uint8, _v uint64) (r0 int32) {
var _i, _j, _n int32
var _buf [10]uint8
- if (_v & u64(18374686479671623680)) == 0 {
+ if (_v & uint64(18374686479671623680)) == 0 {
goto _0
}
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(i32(8)))) = uint8(_v)
- {
- p := &_v
- *p = (*p) >> uint(i32(8))
- sink17(*p)
- }
- _i = i32(7)
+ *elem15(_p, uintptr(8)) = uint8(_v)
+ _v >>= 8
+ _i = int32(7)
_1:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _4
}
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(_i))) = uint8((_v & uint64(i32(127))) | uint64(i32(128)))
- {
- p := &_v
- *p = (*p) >> uint(i32(7))
- sink17(*p)
- }
+ *elem15(_p, uintptr(_i)) = uint8((_v & uint64(127)) | uint64(128))
+ _v >>= 7
_i -= 1
goto _1
_4:
- return i32(9)
+ return int32(9)
_0:
- _n = i32(0)
+ _n = int32(0)
_5:
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_buf)) + 1*uintptr(postInc1(&_n, int32(1))))) = uint8((_v & uint64(i32(127))) | uint64(i32(128)))
- {
- p := &_v
- *p = (*p) >> uint(i32(7))
- sink17(*p)
- }
- if _v != uint64(i32(0)) {
+ *elem15((*uint8)(unsafe.Pointer(&_buf)), uintptr(postInc2(&_n, 1))) = uint8((_v & uint64(127)) | uint64(128))
+ _v >>= 7
+ if _v != (0) {
goto _5
}
{
- p := (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_buf)) + 1*uintptr(i32(0))))
- *p = uint8(int32(*p) & i32(127))
- sink2(*p)
+ p := elem15((*uint8)(unsafe.Pointer(&_buf)), 0)
+ *p = uint8(int32(*p) & int32(127))
}
func() {
- if _n > i32(9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(28455), unsafe.Pointer((*int8)(unsafe.Pointer(&_putVarint64Ø00__func__Ø000))), unsafe.Pointer(str(77623)))
+ if _n > int32(9) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(28455), unsafe.Pointer(&_putVarint64Ø00__func__Ø000), unsafe.Pointer(str(75785)))
crt.X__builtin_abort(tls)
}
}()
- *func() *int32 { _i = i32(0); return &_j }() = _n - i32(1)
+ *func() *int32 { _i = int32(0); return &_j }() = _n - int32(1)
_8:
- if _j < i32(0) {
+ if _j < int32(0) {
goto _11
}
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 1*uintptr(_i))) = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_buf)) + 1*uintptr(_j)))
+ *elem15(_p, uintptr(_i)) = *elem15((*uint8)(unsafe.Pointer(&_buf)), uintptr(_j))
*func() *int32 { _j -= 1; return &_i }() += 1
goto _8
_11:
@@ -58125,215 +57887,215 @@ _11:
var _putVarint64Ø00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_putVarint64Ø00__func__Ø000[0], str(77628), 12)
+ crt.Xstrncpy(nil, &_putVarint64Ø00__func__Ø000[0], str(75790), 12)
}
func _sqlite3VdbeSerialPut(tls *crt.TLS, _buf *uint8, _pMem *XMem, _serial_type uint32) (r0 uint32) {
var _len, _1_i uint32
var _1_v uint64
- if _serial_type > uint32(i32(7)) || _serial_type <= uint32(i32(0)) {
+ if _serial_type > uint32(7) || _serial_type <= (0) {
goto _1
}
- if _serial_type == uint32(i32(7)) {
- i32(0)
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_1_v), (unsafe.Pointer)((*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))), u32(8))
+ if _serial_type == uint32(7) {
+ crt.Xmemcpy(tls, unsafe.Pointer(&_1_v), unsafe.Pointer((*float64)(unsafe.Pointer(&_pMem.Xu))), uint32(8))
goto _3
}
- _1_v = uint64(*(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
+ _1_v = uint64(*(*int64)(unsafe.Pointer(&_pMem.Xu)))
_3:
- _len = store5(&_1_i, uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3SmallTypeSizes)) + 1*uintptr(_serial_type)))))
+ _len = store23(&_1_i, uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3SmallTypeSizes)), uintptr(_serial_type))))
func() {
- if _1_i <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74765), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSerialPutØ00__func__Ø000))), unsafe.Pointer(str(12970)))
+ if _1_i <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74765), unsafe.Pointer(&_sqlite3VdbeSerialPutØ00__func__Ø000), unsafe.Pointer(str(12925)))
crt.X__builtin_abort(tls)
}
}()
_6:
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(preInc5(&_1_i, uint32(4294967295))))) = uint8(_1_v & uint64(i32(255)))
- {
- p := &_1_v
- *p = (*p) >> uint(i32(8))
- sink17(*p)
- }
+ *elem15(_buf, uintptr(preInc23(&_1_i, uint32(4294967295)))) = uint8(_1_v & uint64(255))
+ _1_v >>= 8
if _1_i != 0 {
goto _6
}
return _len
_1:
- if _serial_type < uint32(i32(12)) {
+ if _serial_type < uint32(12) {
goto _7
}
func() {
- if ((_pMem.X4) + func() int32 {
- if (int32(_pMem.X1) & i32(16384)) != 0 {
- return (*(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))
+ if (_pMem.Xn + func() int32 {
+ if (int32(_pMem.Xflags) & int32(16384)) != 0 {
+ return (*(*int32)(unsafe.Pointer(&_pMem.Xu)))
}
- return i32(0)
+ return int32(0)
}()) != int32(_sqlite3VdbeSerialTypeLen(tls, _serial_type)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74775), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSerialPutØ00__func__Ø000))), unsafe.Pointer(str(77640)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74775), unsafe.Pointer(&_sqlite3VdbeSerialPutØ00__func__Ø000), unsafe.Pointer(str(75802)))
crt.X__builtin_abort(tls)
}
}()
- _len = uint32(_pMem.X4)
- if _len > uint32(i32(0)) {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_buf), (unsafe.Pointer)(_pMem.X5), _len)
+ _len = uint32(_pMem.Xn)
+ if _len > (0) {
+ crt.Xmemcpy(tls, unsafe.Pointer(_buf), unsafe.Pointer(_pMem.Xz), _len)
}
return _len
_7:
- return uint32(i32(0))
+ return 0
}
var _sqlite3VdbeSerialPutØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSerialPutØ00__func__Ø000[0], str(77739), 21)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSerialPutØ00__func__Ø000[0], str(75901), 21)
}
-// The first argument, pCur, is a cursor opened on some b-tree. Count the
-// number of entries in the b-tree and write the result to *pnEntry.
-//
-// SQLITE_OK is returned if the operation is successfully executed.
-// Otherwise, if an error is encountered (i.e. an IO error or database
-// corruption) an SQLite error code is returned.
+// C comment
+// /*
+// ** The first argument, pCur, is a cursor opened on some b-tree. Count the
+// ** number of entries in the b-tree and write the result to *pnEntry.
+// **
+// ** SQLITE_OK is returned if the operation is successfully executed.
+// ** Otherwise, if an error is encountered (i.e. an IO error or database
+// ** corruption) an SQLite error code is returned.
+// */
func _sqlite3BtreeCount(tls *crt.TLS, _pCur *XBtCursor, _pnEntry *int64) (r0 int32) {
var _rc, _2_iIdx int32
var _nEntry int64
var _2_pPage *XMemPage
- _nEntry = i64(0)
- if (_pCur.X7) == uint32(i32(0)) {
- *_pnEntry = int64(i32(0))
- return i32(0)
+ _nEntry = int64(0)
+ if _pCur.XpgnoRoot == (0) {
+ *_pnEntry = 0
+ return int32(0)
}
_rc = _moveToRoot(tls, _pCur)
_1:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _2
}
- _2_pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
- if ((_2_pPage.X5) != 0) || ((_2_pPage.X2) == 0) {
- {
- p := &_nEntry
- *p = (*p) + int64(_2_pPage.X14)
- sink6(*p)
- }
+ _2_pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
+ if (_2_pPage.Xleaf != 0) || (_2_pPage.XintKey == 0) {
+ _nEntry += int64(_2_pPage.XnCell)
}
- if (_2_pPage.X5) == 0 {
+ if _2_pPage.Xleaf == 0 {
goto _5
}
_6:
- if int32(_pCur.X14) == i32(0) {
+ if int32(_pCur.XiPage) == int32(0) {
*_pnEntry = _nEntry
return _moveToRoot(tls, _pCur)
}
_moveToParent(tls, _pCur)
- if int32(_pCur.X16) >= int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) {
+ if int32(_pCur.Xix) >= int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) {
goto _6
}
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) += 1
- _2_pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
+ _pCur.Xix += 1
+ _2_pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
_5:
- _2_iIdx = int32(_pCur.X16)
- if _2_iIdx == int32(_2_pPage.X14) {
- _rc = _moveToChild(tls, _pCur, _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_pPage.X19))+1*uintptr(int32(_2_pPage.X6)+i32(8))))))
+ _2_iIdx = int32(_pCur.Xix)
+ if _2_iIdx == int32(_2_pPage.XnCell) {
+ _rc = _moveToChild(tls, _pCur, _sqlite3Get4byte(tls, elem15(_2_pPage.XaData, uintptr(int32(_2_pPage.XhdrOffset)+int32(8)))))
goto _9
}
- _rc = _moveToChild(tls, _pCur, _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_2_pPage.X19))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_2_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_pPage.X21))+1*uintptr(i32(2)*_2_iIdx))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_pPage.X21))+1*uintptr(i32(2)*_2_iIdx))))) + 1*uintptr(i32(1)))))))))))))))
+ _rc = _moveToChild(tls, _pCur, _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_2_pPage.XaData))+uintptr(int32(_2_pPage.XmaskPage)&((int32(*elem15(elem15(_2_pPage.XaCellIdx, uintptr(int32(2)*_2_iIdx)), 0))<<8)|int32(*elem15(elem15(_2_pPage.XaCellIdx, uintptr(int32(2)*_2_iIdx)), uintptr(1)))))))))
_9:
goto _1
_2:
return _rc
}
-// This function is only called from within an assert() expression. It
-// checks that the sqlite3.nTransaction variable is correctly set to
-// the number of non-transaction savepoints currently in the
-// linked list starting at sqlite3.pSavepoint.
-//
-// Usage:
-//
-// assert( checkSavepointCount(db) );
+// C comment
+// /*
+// ** This function is only called from within an assert() expression. It
+// ** checks that the sqlite3.nTransaction variable is correctly set to
+// ** the number of non-transaction savepoints currently in the
+// ** linked list starting at sqlite3.pSavepoint.
+// **
+// ** Usage:
+// **
+// ** assert( checkSavepointCount(db) );
+// */
func _checkSavepointCount(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
var _n int32
var _p *XSavepoint
- _n = i32(0)
- _p = (*XSavepoint)(_db.X73)
+ _n = int32(0)
+ _p = (*XSavepoint)(_db.XpSavepoint)
_0:
if _p == nil {
goto _3
}
_n += 1
- _p = (*XSavepoint)(_p.X3)
+ _p = (*XSavepoint)(_p.XpNext)
goto _0
_3:
func() {
- if _n != ((_db.X75) + int32(_db.X23)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78815), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkSavepointCountØ00__func__Ø000))), unsafe.Pointer(str(77760)))
+ if _n != (_db.XnSavepoint + int32(_db.XisTransactionSavepoint)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78815), unsafe.Pointer(&_checkSavepointCountØ00__func__Ø000), unsafe.Pointer(str(75922)))
crt.X__builtin_abort(tls)
}
}()
- return i32(1)
+ return int32(1)
}
var _checkSavepointCountØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_checkSavepointCountØ00__func__Ø000[0], str(77809), 20)
-}
-
-// Start a statement subtransaction. The subtransaction can be rolled
-// back independently of the main transaction. You must start a transaction
-// before starting a subtransaction. The subtransaction is ended automatically
-// if the main transaction commits or rolls back.
-//
-// Statement subtransactions are used around individual SQL statements
-// that are contained within a BEGIN...COMMIT block. If a constraint
-// error occurs within the statement, the effect of that one statement
-// can be rolled back without having to rollback the entire transaction.
-//
-// A statement sub-transaction is implemented as an anonymous savepoint. The
-// value passed as the second parameter is the total number of savepoints,
-// including the new anonymous savepoint, open on the B-Tree. i.e. if there
-// are no active savepoints and no other statement-transactions open,
-// iStatement is 1. This anonymous savepoint can be released or rolled back
-// using the sqlite3BtreeSavepoint() function.
+ crt.Xstrncpy(nil, &_checkSavepointCountØ00__func__Ø000[0], str(75971), 20)
+}
+
+// C comment
+// /*
+// ** Start a statement subtransaction. The subtransaction can be rolled
+// ** back independently of the main transaction. You must start a transaction
+// ** before starting a subtransaction. The subtransaction is ended automatically
+// ** if the main transaction commits or rolls back.
+// **
+// ** Statement subtransactions are used around individual SQL statements
+// ** that are contained within a BEGIN...COMMIT block. If a constraint
+// ** error occurs within the statement, the effect of that one statement
+// ** can be rolled back without having to rollback the entire transaction.
+// **
+// ** A statement sub-transaction is implemented as an anonymous savepoint. The
+// ** value passed as the second parameter is the total number of savepoints,
+// ** including the new anonymous savepoint, open on the B-Tree. i.e. if there
+// ** are no active savepoints and no other statement-transactions open,
+// ** iStatement is 1. This anonymous savepoint can be released or rolled back
+// ** using the sqlite3BtreeSavepoint() function.
+// */
func _sqlite3BtreeBeginStmt(tls *crt.TLS, _p *XBtree, _iStatement int32) (r0 int32) {
var _rc int32
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
_sqlite3BtreeEnter(tls, _p)
func() {
- if int32(_p.X2) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63105), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000))), unsafe.Pointer(str(77829)))
+ if int32(_p.XinTrans) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63105), unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000), unsafe.Pointer(str(75991)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pBt.X10) & i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63106), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000))), unsafe.Pointer(str(77853)))
+ if (int32(_pBt.XbtsFlags) & int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63106), unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000), unsafe.Pointer(str(76015)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iStatement <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63107), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000))), unsafe.Pointer(str(77888)))
+ if _iStatement <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63107), unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000), unsafe.Pointer(str(76050)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iStatement <= ((*Xsqlite3)(_p.X0).X75) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63108), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000))), unsafe.Pointer(str(77901)))
+ if _iStatement <= ((*Xsqlite3)(_p.Xdb).XnSavepoint) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63108), unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000), unsafe.Pointer(str(76063)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pBt.X8) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63109), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000))), unsafe.Pointer(str(56928)))
+ if int32(_pBt.XinTransaction) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63109), unsafe.Pointer(&_sqlite3BtreeBeginStmtØ00__func__Ø000), unsafe.Pointer(str(56904)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerOpenSavepoint(tls, (*XPager)(_pBt.X0), _iStatement)
+ _rc = _sqlite3PagerOpenSavepoint(tls, (*XPager)(_pBt.XpPager), _iStatement)
_sqlite3BtreeLeave(tls, _p)
return _rc
}
@@ -58341,55 +58103,58 @@ func _sqlite3BtreeBeginStmt(tls *crt.TLS, _p *XBtree, _iStatement int32) (r0 int
var _sqlite3BtreeBeginStmtØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeBeginStmtØ00__func__Ø000[0], str(77930), 22)
+ crt.Xstrncpy(nil, &_sqlite3BtreeBeginStmtØ00__func__Ø000[0], str(76092), 22)
}
-// Write meta-information back into the database. Meta[0] is
-// read-only and may not be written.
+// C comment
+// /*
+// ** Write meta-information back into the database. Meta[0] is
+// ** read-only and may not be written.
+// */
func _sqlite3BtreeUpdateMeta(tls *crt.TLS, _p *XBtree, _idx int32, _iMeta uint32) (r0 int32) {
var _rc int32
var _pP1 *uint8
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
- if _idx < i32(1) || _idx > i32(15) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67891), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000))), unsafe.Pointer(str(77952)))
+ if _idx < int32(1) || _idx > int32(15) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67891), unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000), unsafe.Pointer(str(76114)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
func() {
- if int32(_p.X2) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67893), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000))), unsafe.Pointer(str(77829)))
+ if int32(_p.XinTrans) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67893), unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000), unsafe.Pointer(str(75991)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XMemPage)(_pBt.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67894), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000))), unsafe.Pointer(str(77970)))
+ if (*XMemPage)(_pBt.XpPage1) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67894), unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000), unsafe.Pointer(str(76132)))
crt.X__builtin_abort(tls)
}
}()
- _pP1 = (*XMemPage)(_pBt.X3).X19
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.X3).X23))
- if _rc != i32(0) {
+ _pP1 = (*XMemPage)(_pBt.XpPage1).XaData
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.XpPage1).XpDbPage))
+ if _rc != int32(0) {
goto _7
}
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pP1))+1*uintptr(i32(36)+(_idx*i32(4))))), _iMeta)
- if _idx == i32(7) {
+ _sqlite3Put4byte(tls, elem15(_pP1, uintptr(int32(36)+(_idx*int32(4)))), _iMeta)
+ if _idx == int32(7) {
func() {
- if (_pBt.X5) == 0 && _iMeta != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67901), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000))), unsafe.Pointer(str(77985)))
+ if _pBt.XautoVacuum == 0 && _iMeta != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67901), unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000), unsafe.Pointer(str(76147)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iMeta != uint32(i32(0)) && _iMeta != uint32(i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67902), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000))), unsafe.Pointer(str(78013)))
+ if _iMeta != (0) && _iMeta != uint32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67902), unsafe.Pointer(&_sqlite3BtreeUpdateMetaØ00__func__Ø000), unsafe.Pointer(str(76175)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pBt.X6))) = uint8(_iMeta)
+ _pBt.XincrVacuum = uint8(_iMeta)
}
_7:
_sqlite3BtreeLeave(tls, _p)
@@ -58399,85 +58164,94 @@ _7:
var _sqlite3BtreeUpdateMetaØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeUpdateMetaØ00__func__Ø000[0], str(78034), 23)
+ crt.Xstrncpy(nil, &_sqlite3BtreeUpdateMetaØ00__func__Ø000[0], str(76196), 23)
}
-// Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL
-// if we run out of memory.
+// C comment
+// /*
+// ** Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL
+// ** if we run out of memory.
+// */
func _allocateCursor(tls *crt.TLS, _p *TVdbe, _iCur int32, _nField int32, _iDb int32, _eCurType uint8) (r0 *XVdbeCursor) {
var _nByte int32
var _pMem *XMem
var _pCx *XVdbeCursor
_pMem = func() *XMem {
- if _iCur > i32(0) {
- return (*XMem)(unsafe.Pointer(uintptr(_p.X18) + 48*uintptr((_p.X6)-_iCur)))
+ if _iCur > int32(0) {
+ return elem25((*XMem)(_p.XaMem), uintptr(_p.XnMem-_iCur))
}
- return (*XMem)(_p.X18)
+ return (*XMem)(_p.XaMem)
}()
_pCx = nil
- _nByte = int32((u32(88) + (u32(8) * uint32(_nField))) + uint32(func() int32 {
- if int32(_eCurType) == i32(0) {
+ _nByte = int32((uint32(88) + (uint32(8) * uint32(_nField))) + uint32(func() int32 {
+ if int32(_eCurType) == int32(0) {
return _sqlite3BtreeCursorSize(tls)
}
- return i32(0)
+ return int32(0)
}()))
func() {
- if _iCur < i32(0) || _iCur >= (_p.X7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78418), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateCursorØ00__func__Ø000))), unsafe.Pointer(str(78057)))
+ if _iCur < int32(0) || _iCur >= _p.XnCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78418), unsafe.Pointer(&_allocateCursorØ00__func__Ø000), unsafe.Pointer(str(76219)))
crt.X__builtin_abort(tls)
}
}()
- if (*(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_iCur)))) != nil {
- _sqlite3VdbeFreeCursor(tls, _p, *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_iCur))))
- *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_iCur))) = nil
+ if (*elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_iCur))) != nil {
+ _sqlite3VdbeFreeCursor(tls, _p, *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_iCur)))
+ *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_iCur)) = nil
}
- if i32(0) != _sqlite3VdbeMemClearAndResize(tls, _pMem, _nByte) {
+ if int32(0) != _sqlite3VdbeMemClearAndResize(tls, _pMem, _nByte) {
goto _8
}
- *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X23)) + 4*uintptr(_iCur))) = store53(&_pCx, (*XVdbeCursor)(unsafe.Pointer(_pMem.X5)))
- crt.Xmemset(tls, (unsafe.Pointer)(_pCx), i32(0), u32(32))
- *(*uint8)(unsafe.Pointer(&(_pCx.X0))) = _eCurType
- *(*int8)(unsafe.Pointer(&(_pCx.X1))) = int8(_iDb)
- *(*int16)(unsafe.Pointer(&(_pCx.X18))) = int16(_nField)
- *(**uint32)(unsafe.Pointer(&(_pCx.X21))) = (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]uint32)(unsafe.Pointer(&(_pCx.X25))))) + 4*uintptr(_nField)))
- if int32(_eCurType) == i32(0) {
- *(**XBtCursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCx.X14))))))) = (*XBtCursor)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMem.X5)) + 1*uintptr(u32(88)+(u32(8)*uint32(_nField)))))))
- _sqlite3BtreeCursorZero(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCx.X14)))))))
+ *elem77((**XVdbeCursor)(unsafe.Pointer(_p.XapCsr)), uintptr(_iCur)) = store86(&_pCx, (*XVdbeCursor)(unsafe.Pointer(_pMem.Xz)))
+ crt.Xmemset(tls, unsafe.Pointer(_pCx), int32(0), uint32(32))
+ _pCx.XeCurType = _eCurType
+ _pCx.XiDb = int8(_iDb)
+ _pCx.XnField = int16(_nField)
+ _pCx.XaOffset = elem7((*uint32)(unsafe.Pointer(&_pCx.XaType)), uintptr(_nField))
+ if int32(_eCurType) == int32(0) {
+ *(**XBtCursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pCx.Xuc)))) = (*XBtCursor)(unsafe.Pointer(elem1(_pMem.Xz, uintptr(uint32(88)+(uint32(8)*uint32(_nField))))))
+ _sqlite3BtreeCursorZero(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCx.Xuc))))
}
_8:
return _pCx
}
-// Return the size of a BtCursor object in bytes.
-//
-// This interfaces is needed so that users of cursors can preallocate
-// sufficient storage to hold a cursor. The BtCursor object is opaque
-// to users so they cannot do the sizeof() themselves - they must call
-// this routine.
+// C comment
+// /*
+// ** Return the size of a BtCursor object in bytes.
+// **
+// ** This interfaces is needed so that users of cursors can preallocate
+// ** sufficient storage to hold a cursor. The BtCursor object is opaque
+// ** to users so they cannot do the sizeof() themselves - they must call
+// ** this routine.
+// */
func _sqlite3BtreeCursorSize(tls *crt.TLS) (r0 int32) {
- return int32(u32(192))
+ return int32(192)
}
var _allocateCursorØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_allocateCursorØ00__func__Ø000[0], str(78084), 15)
+ crt.Xstrncpy(nil, &_allocateCursorØ00__func__Ø000[0], str(76246), 15)
}
-// Initialize memory that will be converted into a BtCursor object.
-//
-// The simple approach here would be to memset() the entire object
-// to zero. But it turns out that the apPage[] and aiIdx[] arrays
-// do not need to be zeroed and they are large, so we can save a lot
-// of run-time by skipping the initialization of those elements.
+// C comment
+// /*
+// ** Initialize memory that will be converted into a BtCursor object.
+// **
+// ** The simple approach here would be to memset() the entire object
+// ** to zero. But it turns out that the apPage[] and aiIdx[] arrays
+// ** do not need to be zeroed and they are large, so we can save a lot
+// ** of run-time by skipping the initialization of those elements.
+// */
func _sqlite3BtreeCursorZero(tls *crt.TLS, _p *XBtCursor) {
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(64))
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(64))
}
func _sqlite3BtreeCursor(tls *crt.TLS, _p *XBtree, _iTable int32, _wrFlag int32, _pKeyInfo *XKeyInfo, _pCur *XBtCursor) (r0 int32) {
var _rc int32
- if _iTable < i32(1) {
- _rc = _sqlite3CorruptError(tls, i32(63273))
+ if _iTable < int32(1) {
+ _rc = _sqlite3CorruptError(tls, int32(63273))
goto _1
}
_sqlite3BtreeEnter(tls, _p)
@@ -58487,100 +58261,103 @@ _1:
return _rc
}
-// Create a new cursor for the BTree whose root is on the page
-// iTable. If a read-only cursor is requested, it is assumed that
-// the caller already has at least a read-only transaction open
-// on the database already. If a write-cursor is requested, then
-// the caller is assumed to have an open write transaction.
-//
-// If the BTREE_WRCSR bit of wrFlag is clear, then the cursor can only
-// be used for reading. If the BTREE_WRCSR bit is set, then the cursor
-// can be used for reading or for writing if other conditions for writing
-// are also met. These are the conditions that must be met in order
-// for writing to be allowed:
-//
-// 1: The cursor must have been opened with wrFlag containing BTREE_WRCSR
-//
-// 2: Other database connections that share the same pager cache
-// but which are not in the READ_UNCOMMITTED state may not have
-// cursors open with wrFlag==0 on the same table. Otherwise
-// the changes made by this write cursor would be visible to
-// the read cursors in the other database connection.
-//
-// 3: The database must be writable (not on read-only media)
-//
-// 4: There must be an active transaction.
-//
-// The BTREE_FORDELETE bit of wrFlag may optionally be set if BTREE_WRCSR
-// is set. If FORDELETE is set, that is a hint to the implementation that
-// this cursor will only be used to seek to and delete entries of an index
-// as part of a larger DELETE statement. The FORDELETE hint is not used by
-// this implementation. But in a hypothetical alternative storage engine
-// in which index entries are automatically deleted when corresponding table
-// rows are deleted, the FORDELETE flag is a hint that all SEEK and DELETE
-// operations on this cursor can be no-ops and all READ operations can
-// return a null row (2-bytes: 0x01 0x00).
-//
-// No checking is done to make sure that page iTable really is the
-// root page of a b-tree. If it is not, then the cursor acquired
-// will not work correctly.
-//
-// It is assumed that the sqlite3BtreeCursorZero() has been called
-// on pCur to initialize the memory space prior to invoking this routine.
+// C comment
+// /*
+// ** Create a new cursor for the BTree whose root is on the page
+// ** iTable. If a read-only cursor is requested, it is assumed that
+// ** the caller already has at least a read-only transaction open
+// ** on the database already. If a write-cursor is requested, then
+// ** the caller is assumed to have an open write transaction.
+// **
+// ** If the BTREE_WRCSR bit of wrFlag is clear, then the cursor can only
+// ** be used for reading. If the BTREE_WRCSR bit is set, then the cursor
+// ** can be used for reading or for writing if other conditions for writing
+// ** are also met. These are the conditions that must be met in order
+// ** for writing to be allowed:
+// **
+// ** 1: The cursor must have been opened with wrFlag containing BTREE_WRCSR
+// **
+// ** 2: Other database connections that share the same pager cache
+// ** but which are not in the READ_UNCOMMITTED state may not have
+// ** cursors open with wrFlag==0 on the same table. Otherwise
+// ** the changes made by this write cursor would be visible to
+// ** the read cursors in the other database connection.
+// **
+// ** 3: The database must be writable (not on read-only media)
+// **
+// ** 4: There must be an active transaction.
+// **
+// ** The BTREE_FORDELETE bit of wrFlag may optionally be set if BTREE_WRCSR
+// ** is set. If FORDELETE is set, that is a hint to the implementation that
+// ** this cursor will only be used to seek to and delete entries of an index
+// ** as part of a larger DELETE statement. The FORDELETE hint is not used by
+// ** this implementation. But in a hypothetical alternative storage engine
+// ** in which index entries are automatically deleted when corresponding table
+// ** rows are deleted, the FORDELETE flag is a hint that all SEEK and DELETE
+// ** operations on this cursor can be no-ops and all READ operations can
+// ** return a null row (2-bytes: 0x01 0x00).
+// **
+// ** No checking is done to make sure that page iTable really is the
+// ** root page of a b-tree. If it is not, then the cursor acquired
+// ** will not work correctly.
+// **
+// ** It is assumed that the sqlite3BtreeCursorZero() has been called
+// ** on pCur to initialize the memory space prior to invoking this routine.
+// */
func _btreeCursor(tls *crt.TLS, _p *XBtree, _iTable int32, _wrFlag int32, _pKeyInfo *XKeyInfo, _pCur *XBtCursor) (r0 int32) {
var _pBt *XBtShared
var _pX *XBtCursor
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
if _sqlite3BtreeHoldsMutex(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63214), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCursorØ00__func__Ø000))), unsafe.Pointer(str(17487)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63214), unsafe.Pointer(&_btreeCursorØ00__func__Ø000), unsafe.Pointer(str(17442)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _wrFlag != i32(0) && _wrFlag != i32(4) && _wrFlag != i32(12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63215), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCursorØ00__func__Ø000))), unsafe.Pointer(str(78099)))
+ if _wrFlag != int32(0) && _wrFlag != int32(4) && _wrFlag != int32(12) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63215), unsafe.Pointer(&_btreeCursorØ00__func__Ø000), unsafe.Pointer(str(76261)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _hasSharedCacheTableLock(tls, _p, uint32(_iTable), bool2int(_pKeyInfo != nil), func() int32 {
if _wrFlag != 0 {
- return i32(2)
+ return int32(2)
}
- return i32(1)
+ return int32(1)
}()) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63224), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCursorØ00__func__Ø000))), unsafe.Pointer(str(78173)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63224), unsafe.Pointer(&_btreeCursorØ00__func__Ø000), unsafe.Pointer(str(76335)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _wrFlag != i32(0) && _hasReadConflicts(tls, _p, uint32(_iTable)) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63225), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCursorØ00__func__Ø000))), unsafe.Pointer(str(78235)))
+ if _wrFlag != int32(0) && _hasReadConflicts(tls, _p, uint32(_iTable)) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63225), unsafe.Pointer(&_btreeCursorØ00__func__Ø000), unsafe.Pointer(str(76397)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X2) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63228), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCursorØ00__func__Ø000))), unsafe.Pointer(str(54142)))
+ if int32(_p.XinTrans) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63228), unsafe.Pointer(&_btreeCursorØ00__func__Ø000), unsafe.Pointer(str(54118)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _wrFlag != i32(0) && int32(_p.X2) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63229), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCursorØ00__func__Ø000))), unsafe.Pointer(str(78277)))
+ if _wrFlag != int32(0) && int32(_p.XinTrans) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63229), unsafe.Pointer(&_btreeCursorØ00__func__Ø000), unsafe.Pointer(str(76439)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XMemPage)(_pBt.X3) == nil || ((*XMemPage)(_pBt.X3).X19) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63230), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCursorØ00__func__Ø000))), unsafe.Pointer(str(78314)))
+ if _pBt.XpPage1 == nil || ((*XMemPage)(_pBt.XpPage1).XaData) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63230), unsafe.Pointer(&_btreeCursorØ00__func__Ø000), unsafe.Pointer(str(76476)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _wrFlag != i32(0) && (int32(_pBt.X10)&i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63231), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCursorØ00__func__Ø000))), unsafe.Pointer(str(78348)))
+ if _wrFlag != int32(0) && (int32(_pBt.XbtsFlags)&int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63231), unsafe.Pointer(&_btreeCursorØ00__func__Ø000), unsafe.Pointer(str(76510)))
crt.X__builtin_abort(tls)
}
}()
@@ -58588,227 +58365,236 @@ func _btreeCursor(tls *crt.TLS, _p *XBtree, _iTable int32, _wrFlag int32, _pKeyI
goto _24
}
_allocateTempSpace(tls, _pBt)
- if (_pBt.X27) == nil {
- return _sqlite3NomemError(tls, i32(63235))
+ if _pBt.XpTmpSpace == nil {
+ return _sqlite3NomemError(tls, int32(63235))
}
_24:
- if (_iTable == i32(1)) && (_btreePagecount(tls, _pBt) == uint32(i32(0))) {
+ if (_iTable == int32(1)) && (_btreePagecount(tls, _pBt) == (0)) {
func() {
- if _wrFlag != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63238), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCursorØ00__func__Ø000))), unsafe.Pointer(str(78396)))
+ if _wrFlag != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63238), unsafe.Pointer(&_btreeCursorØ00__func__Ø000), unsafe.Pointer(str(76558)))
crt.X__builtin_abort(tls)
}
}()
- _iTable = i32(0)
- }
- *(*uint32)(unsafe.Pointer(&(_pCur.X7))) = uint32(_iTable)
- *(*int8)(unsafe.Pointer(&(_pCur.X14))) = int8(i32(-1))
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCur.X18))))) = _pKeyInfo
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCur.X0))))) = _p
- *(**XBtShared)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCur.X1))))) = _pBt
- *(*uint8)(unsafe.Pointer(&(_pCur.X10))) = uint8(func() int32 {
+ _iTable = int32(0)
+ }
+ _pCur.XpgnoRoot = uint32(_iTable)
+ _pCur.XiPage = int8(-1)
+ *(**XKeyInfo)(unsafe.Pointer(&_pCur.XpKeyInfo)) = _pKeyInfo
+ *(**XBtree)(unsafe.Pointer(&_pCur.XpBtree)) = _p
+ *(**XBtShared)(unsafe.Pointer(&_pCur.XpBt)) = _pBt
+ _pCur.XcurFlags = uint8(func() int32 {
if _wrFlag != 0 {
- return i32(1)
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- *(*uint8)(unsafe.Pointer(&(_pCur.X11))) = uint8(func() int32 {
+ _pCur.XcurPagerFlags = uint8(func() int32 {
if _wrFlag != 0 {
- return i32(0)
+ return int32(0)
}
- return i32(2)
+ return int32(2)
}())
- _pX = (*XBtCursor)(_pBt.X2)
+ _pX = (*XBtCursor)(_pBt.XpCursor)
_34:
if _pX == nil {
goto _37
}
- if (_pX.X7) == uint32(_iTable) {
+ if _pX.XpgnoRoot == uint32(_iTable) {
{
- p := (*uint8)(unsafe.Pointer(&(_pX.X10)))
- *p = uint8(int32(*p) | i32(32))
- sink2(*p)
+ p := &_pX.XcurFlags
+ *p = uint8(int32(*p) | int32(32))
}
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) | i32(32))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) | int32(32))
}
}
- _pX = (*XBtCursor)(_pX.X2)
+ _pX = (*XBtCursor)(_pX.XpNext)
goto _34
_37:
- *(**XBtCursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCur.X2))))) = (*XBtCursor)(_pBt.X2)
- *(**XBtCursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X2))))) = _pCur
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(0))
- return i32(0)
+ *(**XBtCursor)(unsafe.Pointer(&_pCur.XpNext)) = (*XBtCursor)(_pBt.XpCursor)
+ *(**XBtCursor)(unsafe.Pointer(&_pBt.XpCursor)) = _pCur
+ _pCur.XeState = 0
+ return int32(0)
}
var _btreeCursorØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_btreeCursorØ00__func__Ø000[0], str(78406), 12)
-}
-
-// **** This function is only used as part of an assert() statement. ***
-//
-// Check to see if pBtree holds the required locks to read or write to the
-// table with root page iRoot. Return 1 if it does and 0 if not.
-//
-// For example, when writing to a table with root-page iRoot via
-// Btree connection pBtree:
-//
-// assert( hasSharedCacheTableLock(pBtree, iRoot, 0, WRITE_LOCK) );
-//
-// When writing to an index that resides in a sharable database, the
-// caller should have first obtained a lock specifying the root page of
-// the corresponding table. This makes things a bit more complicated,
-// as this module treats each table as a separate structure. To determine
-// the table corresponding to the index being written, this
-// function has to search through the database schema.
-//
-// Instead of a lock on the table/index rooted at page iRoot, the caller may
-// hold a write-lock on the schema table (root page 1). This is also
-// acceptable.
+ crt.Xstrncpy(nil, &_btreeCursorØ00__func__Ø000[0], str(76568), 12)
+}
+
+// C comment
+// /*
+// **** This function is only used as part of an assert() statement. ***
+// **
+// ** Check to see if pBtree holds the required locks to read or write to the
+// ** table with root page iRoot. Return 1 if it does and 0 if not.
+// **
+// ** For example, when writing to a table with root-page iRoot via
+// ** Btree connection pBtree:
+// **
+// ** assert( hasSharedCacheTableLock(pBtree, iRoot, 0, WRITE_LOCK) );
+// **
+// ** When writing to an index that resides in a sharable database, the
+// ** caller should have first obtained a lock specifying the root page of
+// ** the corresponding table. This makes things a bit more complicated,
+// ** as this module treats each table as a separate structure. To determine
+// ** the table corresponding to the index being written, this
+// ** function has to search through the database schema.
+// **
+// ** Instead of a lock on the table/index rooted at page iRoot, the caller may
+// ** hold a write-lock on the schema table (root page 1). This is also
+// ** acceptable.
+// */
func _hasSharedCacheTableLock(tls *crt.TLS, _pBtree *XBtree, _iRoot uint32, _isIndex int32, _eLockType int32) (r0 int32) {
var _iTab uint32
var _pSchema *XSchema
var _3_p *XHashElem
var _pLock *XBtLock
var _4_pIdx *XIndex
- _pSchema = (*XSchema)((*XBtShared)(_pBtree.X1).X19)
- _iTab = u32(0)
- if (int32(_pBtree.X3) == i32(0)) || ((_eLockType == i32(1)) && (((*Xsqlite3)(_pBtree.X0).X6)&i32(16384)) != 0) {
- return i32(1)
+ _pSchema = (*XSchema)((*XBtShared)(_pBtree.XpBt).XpSchema)
+ _iTab = uint32(0)
+ if (int32(_pBtree.Xsharable) == int32(0)) || ((_eLockType == int32(1)) && (((*Xsqlite3)(_pBtree.Xdb).Xflags)&int32(16384)) != 0) {
+ return int32(1)
}
- if _isIndex != 0 && ((_pSchema == nil) || ((int32(_pSchema.X9) & i32(1)) == i32(0))) {
- return i32(1)
+ if _isIndex != 0 && ((_pSchema == nil) || ((int32(_pSchema.XschemaFlags) & int32(1)) == int32(0))) {
+ return int32(1)
}
if _isIndex == 0 {
goto _6
}
- _3_p = (*XHashElem)((*XHash)(unsafe.Pointer(&(_pSchema.X3))).X2)
+ _3_p = (*XHashElem)(_pSchema.XidxHash.Xfirst)
_7:
if _3_p == nil {
goto _10
}
- _4_pIdx = (*XIndex)(_3_p.X2)
- if (_4_pIdx.X11) != int32(_iRoot) {
+ _4_pIdx = (*XIndex)(_3_p.Xdata)
+ if _4_pIdx.Xtnum != int32(_iRoot) {
goto _11
}
if _iTab != 0 {
- return i32(1)
+ return int32(1)
}
- _iTab = uint32((*XTable)(_4_pIdx.X3).X7)
+ _iTab = uint32((*XTable)(_4_pIdx.XpTable).Xtnum)
_11:
- _3_p = (*XHashElem)(_3_p.X0)
+ _3_p = (*XHashElem)(_3_p.Xnext)
goto _7
_10:
goto _13
_6:
_iTab = _iRoot
_13:
- _pLock = (*XBtLock)((*XBtShared)(_pBtree.X1).X25)
+ _pLock = (*XBtLock)((*XBtShared)(_pBtree.XpBt).XpLock)
_14:
if _pLock == nil {
goto _17
}
- if (((*XBtree)(_pLock.X0) == _pBtree) && (((_pLock.X1) == _iTab) || ((int32(_pLock.X2) == i32(2)) && ((_pLock.X1) == uint32(i32(1)))))) && (int32(_pLock.X2) >= _eLockType) {
- return i32(1)
+ if (((*XBtree)(_pLock.XpBtree) == _pBtree) && ((_pLock.XiTable == _iTab) || ((int32(_pLock.XeLock) == int32(2)) && (_pLock.XiTable == uint32(1))))) && (int32(_pLock.XeLock) >= _eLockType) {
+ return int32(1)
}
- _pLock = (*XBtLock)(_pLock.X3)
+ _pLock = (*XBtLock)(_pLock.XpNext)
goto _14
_17:
- return i32(0)
-}
-
-// **** This function may be used as part of assert() statements only. ****
-//
-// Return true if it would be illegal for pBtree to write into the
-// table or index rooted at iRoot because other shared connections are
-// simultaneously reading that same table or index.
-//
-// It is illegal for pBtree to write if some other Btree object that
-// shares the same BtShared object is currently reading or writing
-// the iRoot table. Except, if the other Btree object has the
-// read-uncommitted flag set, then it is OK for the other object to
-// have a read cursor.
-//
-// For example, before writing to any part of the table or index
-// rooted at page iRoot, one should call:
-//
-// assert( !hasReadConflicts(pBtree, iRoot) );
+ return int32(0)
+}
+
+// C comment
+// /*
+// **** This function may be used as part of assert() statements only. ****
+// **
+// ** Return true if it would be illegal for pBtree to write into the
+// ** table or index rooted at iRoot because other shared connections are
+// ** simultaneously reading that same table or index.
+// **
+// ** It is illegal for pBtree to write if some other Btree object that
+// ** shares the same BtShared object is currently reading or writing
+// ** the iRoot table. Except, if the other Btree object has the
+// ** read-uncommitted flag set, then it is OK for the other object to
+// ** have a read cursor.
+// **
+// ** For example, before writing to any part of the table or index
+// ** rooted at page iRoot, one should call:
+// **
+// ** assert( !hasReadConflicts(pBtree, iRoot) );
+// */
func _hasReadConflicts(tls *crt.TLS, _pBtree *XBtree, _iRoot uint32) (r0 int32) {
var _p *XBtCursor
- _p = (*XBtCursor)((*XBtShared)(_pBtree.X1).X2)
+ _p = (*XBtCursor)((*XBtShared)(_pBtree.XpBt).XpCursor)
_0:
if _p == nil {
goto _3
}
- if (((_p.X7) == _iRoot) && ((*XBtree)(_p.X0) != _pBtree)) && (i32(0) == (((*Xsqlite3)((*XBtree)(_p.X0).X0).X6) & i32(16384))) {
- return i32(1)
+ if ((_p.XpgnoRoot == _iRoot) && ((*XBtree)(_p.XpBtree) != _pBtree)) && (int32(0) == (((*Xsqlite3)((*XBtree)(_p.XpBtree).Xdb).Xflags) & int32(16384))) {
+ return int32(1)
}
- _p = (*XBtCursor)(_p.X2)
+ _p = (*XBtCursor)(_p.XpNext)
goto _0
_3:
- return i32(0)
+ return int32(0)
}
-// Make sure pBt->pTmpSpace points to an allocation of
-// MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child
-// pointer.
+// C comment
+// /*
+// ** Make sure pBt->pTmpSpace points to an allocation of
+// ** MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child
+// ** pointer.
+// */
func _allocateTempSpace(tls *crt.TLS, _pBt *XBtShared) {
- if (_pBt.X27) != nil {
+ if _pBt.XpTmpSpace != nil {
goto _0
}
- *(**uint8)(unsafe.Pointer(&(_pBt.X27))) = (*uint8)(_sqlite3PageMalloc(tls, int32(_pBt.X15)))
- if (_pBt.X27) != nil {
- crt.Xmemset(tls, (unsafe.Pointer)(_pBt.X27), i32(0), uint32(i32(8)))
- {
- p := (**uint8)(unsafe.Pointer(&(_pBt.X27)))
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(4))))
- sink13(*p)
- }
+ _pBt.XpTmpSpace = (*uint8)(_sqlite3PageMalloc(tls, int32(_pBt.XpageSize)))
+ if _pBt.XpTmpSpace != nil {
+ crt.Xmemset(tls, unsafe.Pointer(_pBt.XpTmpSpace), int32(0), uint32(8))
+ *(*uintptr)(unsafe.Pointer(&_pBt.XpTmpSpace)) += uintptr(int32(4))
}
_0:
}
-// Provide flag hints to the cursor.
+// C comment
+// /*
+// ** Provide flag hints to the cursor.
+// */
func _sqlite3BtreeCursorHintFlags(tls *crt.TLS, _pCur *XBtCursor, _x uint32) {
func() {
- if _x != uint32(i32(2)) && _x != uint32(i32(1)) && _x != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59919), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCursorHintFlagsØ00__func__Ø000))), unsafe.Pointer(str(78418)))
+ if _x != uint32(2) && _x != uint32(1) && _x != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59919), unsafe.Pointer(&_sqlite3BtreeCursorHintFlagsØ00__func__Ø000), unsafe.Pointer(str(76580)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pCur.X13))) = uint8(_x)
+ _pCur.Xhints = uint8(_x)
}
var _sqlite3BtreeCursorHintFlagsØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeCursorHintFlagsØ00__func__Ø000[0], str(78464), 28)
-}
-
-// Open a database file.
-//
-// zFilename is the name of the database file. If zFilename is NULL
-// then an ephemeral database is created. The ephemeral database might
-// be exclusively in memory, or it might use a disk-based memory cache.
-// Either way, the ephemeral database will be automatically deleted
-// when sqlite3BtreeClose() is called.
-//
-// If zFilename is ":memory:" then an in-memory database is created
-// that is automatically destroyed when it is closed.
-//
-// The "flags" parameter is a bitmask that might contain bits like
-// BTREE_OMIT_JOURNAL and/or BTREE_MEMORY.
-//
-// If the database is already opened in the same database connection
-// and we are in shared cache mode, then the open will fail with an
-// SQLITE_CONSTRAINT error. We cannot allow two or more BtShared
-// objects in the same database connection since doing so will lead
-// to problems with locking.
+ crt.Xstrncpy(nil, &_sqlite3BtreeCursorHintFlagsØ00__func__Ø000[0], str(76626), 28)
+}
+
+// C comment
+// /*
+// ** Open a database file.
+// **
+// ** zFilename is the name of the database file. If zFilename is NULL
+// ** then an ephemeral database is created. The ephemeral database might
+// ** be exclusively in memory, or it might use a disk-based memory cache.
+// ** Either way, the ephemeral database will be automatically deleted
+// ** when sqlite3BtreeClose() is called.
+// **
+// ** If zFilename is ":memory:" then an in-memory database is created
+// ** that is automatically destroyed when it is closed.
+// **
+// ** The "flags" parameter is a bitmask that might contain bits like
+// ** BTREE_OMIT_JOURNAL and/or BTREE_MEMORY.
+// **
+// ** If the database is already opened in the same database connection
+// ** and we are in shared cache mode, then the open will fail with an
+// ** SQLITE_CONSTRAINT error. We cannot allow two or more BtShared
+// ** objects in the same database connection since doing so will lead
+// ** to problems with locking.
+// */
func _sqlite3BtreeOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zFilename *int8, _db *Xsqlite3, _ppBtree **XBtree, _flags int32, _vfsFlags int32) (r0 int32) {
var _rc, _isTempDb, _isMemdb, _5_nFilename, _5_nFullPathname, _11_iDb, _25_i int32
var _5_zFullPathname *int8
@@ -58820,96 +58606,92 @@ func _sqlite3BtreeOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zFilename *int8, _db
var _pBt *XBtShared
_pBt = nil
_mutexOpen = nil
- _rc = i32(0)
- _isTempDb = bool2int((_zFilename == nil) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFilename)) + 1*uintptr(i32(0))))) == i32(0)))
- _isMemdb = bool2int((((_zFilename != nil) && (crt.Xstrcmp(tls, _zFilename, str(78492)) == i32(0))) || (_isTempDb != 0 && _sqlite3TempInMemory(tls, _db) != 0)) || ((_vfsFlags & i32(128)) != i32(0)))
+ _rc = int32(0)
+ _isTempDb = bool2int((_zFilename == nil) || (int32(*elem1(_zFilename, 0)) == int32(0)))
+ _isMemdb = bool2int((((_zFilename != nil) && (crt.Xstrcmp(tls, _zFilename, str(76654)) == int32(0))) || (_isTempDb != 0 && _sqlite3TempInMemory(tls, _db) != 0)) || ((_vfsFlags & int32(128)) != int32(0)))
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61256), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61256), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pVfs == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61257), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(78501)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61257), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(76663)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61258), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61258), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_flags & i32(255)) != _flags {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61259), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(78509)))
+ if (_flags & int32(255)) != _flags {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61259), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(76671)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_flags&i32(8)) != i32(0) && (_flags&i32(4)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61262), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(78529)))
+ if (_flags&int32(8)) != int32(0) && (_flags&int32(4)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61262), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(76691)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_flags&i32(4)) != i32(0) && _isTempDb == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61265), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(78587)))
+ if (_flags&int32(4)) != int32(0) && _isTempDb == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61265), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(76749)))
crt.X__builtin_abort(tls)
}
}()
if _isMemdb != 0 {
- {
- p := &_flags
- *p = (*p) | i32(2)
- sink1(*p)
- }
+ _flags |= int32(2)
}
- if ((_vfsFlags & i32(256)) != i32(0)) && (_isMemdb != 0 || _isTempDb != 0) {
- _vfsFlags = (_vfsFlags & i32(-257)) | i32(512)
+ if ((_vfsFlags & int32(256)) != int32(0)) && (_isMemdb != 0 || _isTempDb != 0) {
+ _vfsFlags = (_vfsFlags & int32(-257)) | int32(512)
}
- _p = (*XBtree)(_sqlite3MallocZero(tls, uint64(u32(48))))
+ _p = (*XBtree)(_sqlite3MallocZero(tls, uint64(48)))
if _p == nil {
- return _sqlite3NomemError(tls, i32(61275))
+ return _sqlite3NomemError(tls, int32(61275))
}
- *(*uint8)(unsafe.Pointer(&(_p.X2))) = uint8(i32(0))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _db
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XBtLock)(unsafe.Pointer(&(_p.X11))).X0))))) = _p
- *(*uint32)(unsafe.Pointer(&((*XBtLock)(unsafe.Pointer(&(_p.X11))).X1))) = uint32(i32(1))
- if _isTempDb != i32(0) || _isMemdb != i32(0) && (_vfsFlags&i32(64)) == i32(0) {
+ _p.XinTrans = 0
+ *(**Xsqlite3)(unsafe.Pointer(&_p.Xdb)) = _db
+ *(**XBtree)(unsafe.Pointer(&(_p.Xlock.XpBtree))) = _p
+ _p.Xlock.XiTable = uint32(1)
+ if _isTempDb != int32(0) || _isMemdb != int32(0) && (_vfsFlags&int32(64)) == int32(0) {
goto _26
}
- if (_vfsFlags & i32(131072)) == 0 {
+ if (_vfsFlags & int32(131072)) == 0 {
goto _27
}
- _5_nFilename = _sqlite3Strlen30(tls, _zFilename) + i32(1)
- _5_nFullPathname = (_pVfs.X2) + i32(1)
+ _5_nFilename = _sqlite3Strlen30(tls, _zFilename) + int32(1)
+ _5_nFullPathname = _pVfs.XmxPathname + int32(1)
_5_zFullPathname = (*int8)(_sqlite3Malloc(tls, uint64(func() int32 {
if _5_nFullPathname > _5_nFilename {
return _5_nFullPathname
}
return _5_nFilename
}())))
- *(*uint8)(unsafe.Pointer(&(_p.X3))) = uint8(i32(1))
+ _p.Xsharable = uint8(1)
if _5_zFullPathname == nil {
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
- return _sqlite3NomemError(tls, i32(61299))
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
+ return _sqlite3NomemError(tls, int32(61299))
}
if _isMemdb != 0 {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_5_zFullPathname), (unsafe.Pointer)(_zFilename), uint32(_5_nFilename))
+ crt.Xmemcpy(tls, unsafe.Pointer(_5_zFullPathname), unsafe.Pointer(_zFilename), uint32(_5_nFilename))
goto _32
}
_rc = _sqlite3OsFullPathname(tls, _pVfs, _zFilename, _5_nFullPathname, _5_zFullPathname)
if _rc != 0 {
- Xsqlite3_free(tls, (unsafe.Pointer)(_5_zFullPathname))
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ Xsqlite3_free(tls, unsafe.Pointer(_5_zFullPathname))
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
return _rc
}
_32:
- _mutexOpen = _sqlite3MutexAlloc(tls, i32(4))
+ _mutexOpen = _sqlite3MutexAlloc(tls, int32(4))
Xsqlite3_mutex_enter(tls, _mutexOpen)
- _5_mutexShared = _sqlite3MutexAlloc(tls, i32(2))
+ _5_mutexShared = _sqlite3MutexAlloc(tls, int32(2))
Xsqlite3_mutex_enter(tls, _5_mutexShared)
_pBt = _sqlite3SharedCacheList
_34:
@@ -58917,174 +58699,168 @@ _34:
goto _37
}
func() {
- if (_pBt.X23) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61319), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(78625)))
+ if _pBt.XnRef <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61319), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(76787)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) != crt.Xstrcmp(tls, _5_zFullPathname, _sqlite3PagerFilename(tls, (*XPager)(_pBt.X0), i32(0))) || _sqlite3PagerVfs(tls, (*XPager)(_pBt.X0)) != _pVfs {
+ if int32(0) != crt.Xstrcmp(tls, _5_zFullPathname, _sqlite3PagerFilename(tls, (*XPager)(_pBt.XpPager), int32(0))) || _sqlite3PagerVfs(tls, (*XPager)(_pBt.XpPager)) != _pVfs {
goto _41
}
- _11_iDb = (_db.X5) - i32(1)
+ _11_iDb = _db.XnDb - int32(1)
_42:
- if _11_iDb < i32(0) {
+ if _11_iDb < int32(0) {
goto _45
}
- _12_pExisting = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_11_iDb))).X1)
- if (_12_pExisting != nil) && ((*XBtShared)(_12_pExisting.X1) == _pBt) {
+ _12_pExisting = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_11_iDb)).XpBt)
+ if (_12_pExisting != nil) && ((*XBtShared)(_12_pExisting.XpBt) == _pBt) {
Xsqlite3_mutex_leave(tls, _5_mutexShared)
Xsqlite3_mutex_leave(tls, _mutexOpen)
- Xsqlite3_free(tls, (unsafe.Pointer)(_5_zFullPathname))
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
- return i32(19)
+ Xsqlite3_free(tls, unsafe.Pointer(_5_zFullPathname))
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
+ return int32(19)
}
_11_iDb -= 1
goto _42
_45:
- *(**XBtShared)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = _pBt
- *(*int32)(unsafe.Pointer(&(_pBt.X23))) += 1
+ *(**XBtShared)(unsafe.Pointer(&_p.XpBt)) = _pBt
+ _pBt.XnRef += 1
goto _37
_41:
- _pBt = (*XBtShared)(_pBt.X24)
+ _pBt = (*XBtShared)(_pBt.XpNext)
goto _34
_37:
Xsqlite3_mutex_leave(tls, _5_mutexShared)
- Xsqlite3_free(tls, (unsafe.Pointer)(_5_zFullPathname))
+ Xsqlite3_free(tls, unsafe.Pointer(_5_zFullPathname))
goto _48
_27:
- *(*uint8)(unsafe.Pointer(&(_p.X3))) = uint8(i32(1))
+ _p.Xsharable = uint8(1)
_48:
_26:
if _pBt != nil {
goto _49
}
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- _pBt = (*XBtShared)(_sqlite3MallocZero(tls, uint64(u32(84))))
+
+ _pBt = (*XBtShared)(_sqlite3MallocZero(tls, uint64(84)))
if _pBt == nil {
- _rc = _sqlite3NomemError(tls, i32(61367))
+ _rc = _sqlite3NomemError(tls, int32(61367))
goto _btree_open_out
}
- _rc = _sqlite3PagerOpen(tls, _pVfs, (**XPager)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X0))))), _zFilename, int32(u32(84)), _flags, _vfsFlags, _pageReinit)
- if _rc == i32(0) {
- _sqlite3PagerSetMmapLimit(tls, (*XPager)(_pBt.X0), _db.X8)
- _rc = _sqlite3PagerReadFileheader(tls, (*XPager)(_pBt.X0), int32(u32(100)), (*uint8)(unsafe.Pointer(&_zDbHeader)))
+ _rc = _sqlite3PagerOpen(tls, _pVfs, (**XPager)(unsafe.Pointer(&_pBt.XpPager)), _zFilename, int32(84), _flags, _vfsFlags, _pageReinit)
+ if _rc == int32(0) {
+ _sqlite3PagerSetMmapLimit(tls, (*XPager)(_pBt.XpPager), _db.XszMmap)
+ _rc = _sqlite3PagerReadFileheader(tls, (*XPager)(_pBt.XpPager), int32(100), (*uint8)(unsafe.Pointer(&_zDbHeader)))
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _btree_open_out
}
- *(*uint8)(unsafe.Pointer(&(_pBt.X4))) = uint8(_flags)
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X1))))) = _db
- _sqlite3PagerSetBusyhandler(tls, (*XPager)(_pBt.X0), _btreeInvokeBusyHandler, (unsafe.Pointer)(_pBt))
- *(**XBtShared)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = _pBt
- *(**XBtCursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X2))))) = nil
- *(**XMemPage)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X3))))) = nil
- if _sqlite3PagerIsreadonly(tls, (*XPager)(_pBt.X0)) != 0 {
+ _pBt.XopenFlags = uint8(_flags)
+ *(**Xsqlite3)(unsafe.Pointer(&_pBt.Xdb)) = _db
+ _sqlite3PagerSetBusyhandler(tls, (*XPager)(_pBt.XpPager), _btreeInvokeBusyHandler, unsafe.Pointer(_pBt))
+ *(**XBtShared)(unsafe.Pointer(&_p.XpBt)) = _pBt
+ *(**XBtCursor)(unsafe.Pointer(&_pBt.XpCursor)) = nil
+ *(**XMemPage)(unsafe.Pointer(&_pBt.XpPage1)) = nil
+ if _sqlite3PagerIsreadonly(tls, (*XPager)(_pBt.XpPager)) != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) | int32(1))
}
}
- *(*uint32)(unsafe.Pointer(&(_pBt.X15))) = uint32((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDbHeader)) + 1*uintptr(i32(16))))) << uint(i32(8))) | (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDbHeader)) + 1*uintptr(i32(17))))) << uint(i32(16))))
- if (_pBt.X15) >= uint32(i32(512)) && (_pBt.X15) <= uint32(i32(65536)) && (((_pBt.X15)-uint32(i32(1)))&(_pBt.X15)) == uint32(i32(0)) {
+ _pBt.XpageSize = uint32((int32(*elem15((*uint8)(unsafe.Pointer(&_zDbHeader)), uintptr(16))) << 8) | (int32(*elem15((*uint8)(unsafe.Pointer(&_zDbHeader)), uintptr(17))) << 16))
+ if _pBt.XpageSize >= uint32(512) && _pBt.XpageSize <= uint32(65536) && ((_pBt.XpageSize-uint32(1))&_pBt.XpageSize) == (0) {
goto _56
}
- *(*uint32)(unsafe.Pointer(&(_pBt.X15))) = uint32(i32(0))
+ _pBt.XpageSize = 0
if (_zFilename != nil) && (_isMemdb == 0) {
- *(*uint8)(unsafe.Pointer(&(_pBt.X5))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pBt.X6))) = uint8(i32(0))
+ _pBt.XautoVacuum = 0
+ _pBt.XincrVacuum = 0
}
- _nReserve = uint8(i32(0))
+ _nReserve = 0
goto _59
_56:
- _nReserve = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDbHeader)) + 1*uintptr(i32(20))))
+ _nReserve = *elem15((*uint8)(unsafe.Pointer(&_zDbHeader)), uintptr(20))
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) | i32(2))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) | int32(2))
}
- *(*uint8)(unsafe.Pointer(&(_pBt.X5))) = uint8(func() int32 {
- if _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDbHeader))+1*uintptr(i32(52))))) != 0 {
- return i32(1)
+ _pBt.XautoVacuum = uint8(func() int32 {
+ if _sqlite3Get4byte(tls, elem15((*uint8)(unsafe.Pointer(&_zDbHeader)), uintptr(52))) != 0 {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- *(*uint8)(unsafe.Pointer(&(_pBt.X6))) = uint8(func() int32 {
- if _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDbHeader))+1*uintptr(i32(64))))) != 0 {
- return i32(1)
+ _pBt.XincrVacuum = uint8(func() int32 {
+ if _sqlite3Get4byte(tls, elem15((*uint8)(unsafe.Pointer(&_zDbHeader)), uintptr(64))) != 0 {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
_59:
- _rc = _sqlite3PagerSetPagesize(tls, (*XPager)(_pBt.X0), (*uint32)(unsafe.Pointer(&(_pBt.X15))), int32(_nReserve))
+ _rc = _sqlite3PagerSetPagesize(tls, (*XPager)(_pBt.XpPager), &_pBt.XpageSize, int32(_nReserve))
if _rc != 0 {
goto _btree_open_out
}
- *(*uint32)(unsafe.Pointer(&(_pBt.X16))) = (_pBt.X15) - uint32(_nReserve)
+ _pBt.XusableSize = _pBt.XpageSize - uint32(_nReserve)
func() {
- if ((_pBt.X15) & uint32(i32(7))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61424), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(78637)))
+ if (_pBt.XpageSize & uint32(7)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61424), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(76799)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pBt.X23))) = i32(1)
- if (_p.X3) == 0 {
+ _pBt.XnRef = int32(1)
+ if _p.Xsharable == 0 {
goto _67
}
- _22_mutexShared = _sqlite3MutexAlloc(tls, i32(2))
- if i32(1) == 0 || (_sqlite3Config.X1) == 0 {
+ _22_mutexShared = _sqlite3MutexAlloc(tls, int32(2))
+ if int32(1) == 0 || _sqlite3Config.XbCoreMutex == 0 {
goto _69
}
- *(**Xsqlite3_mutex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X21))))) = _sqlite3MutexAlloc(tls, i32(0))
- if (*Xsqlite3_mutex)(_pBt.X21) == nil {
- _rc = _sqlite3NomemError(tls, i32(61436))
+ *(**Xsqlite3_mutex)(unsafe.Pointer(&_pBt.Xmutex)) = _sqlite3MutexAlloc(tls, int32(0))
+ if (*Xsqlite3_mutex)(_pBt.Xmutex) == nil {
+ _rc = _sqlite3NomemError(tls, int32(61436))
goto _btree_open_out
}
_69:
Xsqlite3_mutex_enter(tls, _22_mutexShared)
- *(**XBtShared)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X24))))) = _sqlite3SharedCacheList
+ *(**XBtShared)(unsafe.Pointer(&_pBt.XpNext)) = _sqlite3SharedCacheList
_sqlite3SharedCacheList = _pBt
bug20530(_sqlite3SharedCacheList)
Xsqlite3_mutex_leave(tls, _22_mutexShared)
_67:
_49:
- if (_p.X3) == 0 {
+ if _p.Xsharable == 0 {
goto _71
}
- _25_i = i32(0)
+ _25_i = int32(0)
_72:
- if _25_i >= (_db.X5) {
+ if _25_i >= _db.XnDb {
goto _75
}
- if store54(&_25_pSib, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_25_i))).X1)) == nil || (_25_pSib.X3) == 0 {
+ if store87(&_25_pSib, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_25_i)).XpBt)) == nil || _25_pSib.Xsharable == 0 {
goto _77
}
_78:
- if (*XBtree)(_25_pSib.X10) != nil {
- _25_pSib = (*XBtree)(_25_pSib.X10)
+ if _25_pSib.XpPrev != nil {
+ _25_pSib = (*XBtree)(_25_pSib.XpPrev)
goto _78
}
- if uint32(uintptr(unsafe.Pointer((*XBtShared)(_p.X1)))) < uint32(uintptr(unsafe.Pointer((*XBtShared)(_25_pSib.X1)))) {
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))) = _25_pSib
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X10))))) = nil
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_25_pSib.X10))))) = _p
+ if uint32(crt.P2U(_p.XpBt)) < uint32(crt.P2U(_25_pSib.XpBt)) {
+ *(**XBtree)(unsafe.Pointer(&_p.XpNext)) = _25_pSib
+ *(**XBtree)(unsafe.Pointer(&_p.XpPrev)) = nil
+ *(**XBtree)(unsafe.Pointer(&_25_pSib.XpPrev)) = _p
goto _81
}
_82:
- if ((*XBtree)(_25_pSib.X9) != nil) && (uint32(uintptr(unsafe.Pointer((*XBtShared)((*XBtree)(_25_pSib.X9).X1)))) < uint32(uintptr(unsafe.Pointer((*XBtShared)(_p.X1))))) {
- _25_pSib = (*XBtree)(_25_pSib.X9)
+ if (_25_pSib.XpNext != nil) && (uint32(crt.P2U((*XBtree)(_25_pSib.XpNext).XpBt)) < uint32(crt.P2U(_p.XpBt))) {
+ _25_pSib = (*XBtree)(_25_pSib.XpNext)
goto _82
}
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))) = (*XBtree)(_25_pSib.X9)
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X10))))) = _25_pSib
- if (*XBtree)(_p.X9) != nil {
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XBtree)(_p.X9).X10))))) = _p
+ *(**XBtree)(unsafe.Pointer(&_p.XpNext)) = (*XBtree)(_25_pSib.XpNext)
+ *(**XBtree)(unsafe.Pointer(&_p.XpPrev)) = _25_pSib
+ if _p.XpNext != nil {
+ *(**XBtree)(unsafe.Pointer(&((*XBtree)(_p.XpNext).XpPrev))) = _p
}
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_25_pSib.X9))))) = _p
+ *(**XBtree)(unsafe.Pointer(&_25_pSib.XpNext)) = _p
_81:
goto _75
_77:
@@ -59094,37 +58870,37 @@ _75:
_71:
*_ppBtree = _p
_btree_open_out:
- if _rc == i32(0) {
+ if _rc == int32(0) {
goto _86
}
- if (_pBt != nil) && ((*XPager)(_pBt.X0) != nil) {
- _sqlite3PagerClose(tls, (*XPager)(_pBt.X0), nil)
+ if (_pBt != nil) && (_pBt.XpPager != nil) {
+ _sqlite3PagerClose(tls, (*XPager)(_pBt.XpPager), nil)
}
- Xsqlite3_free(tls, (unsafe.Pointer)(_pBt))
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ Xsqlite3_free(tls, unsafe.Pointer(_pBt))
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
*_ppBtree = nil
goto _89
_86:
- if _sqlite3BtreeSchema(tls, _p, i32(0), nil) == nil {
- _sqlite3PagerSetCachesize(tls, (*XPager)((*XBtShared)(_p.X1).X0), i32(-2000))
+ if _sqlite3BtreeSchema(tls, _p, int32(0), nil) == nil {
+ _sqlite3PagerSetCachesize(tls, (*XPager)((*XBtShared)(_p.XpBt).XpPager), int32(-2000))
}
- _35_pFile = _sqlite3PagerFile(tls, (*XPager)(_pBt.X0))
- if (*Xsqlite3_io_methods)(_35_pFile.X0) != nil {
- _sqlite3OsFileControlHint(tls, _35_pFile, i32(30), (unsafe.Pointer)((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X1)))))
+ _35_pFile = _sqlite3PagerFile(tls, (*XPager)(_pBt.XpPager))
+ if _35_pFile.XpMethods != nil {
+ _sqlite3OsFileControlHint(tls, _35_pFile, int32(30), unsafe.Pointer(&_pBt.Xdb))
}
_89:
if _mutexOpen != nil {
func() {
if Xsqlite3_mutex_held(tls, _mutexOpen) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61506), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(78660)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61506), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(76822)))
crt.X__builtin_abort(tls)
}
}()
Xsqlite3_mutex_leave(tls, _mutexOpen)
}
func() {
- if _rc == i32(0) && _sqlite3BtreeConnectionCount(tls, *_ppBtree) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61509), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000))), unsafe.Pointer(str(78690)))
+ if _rc == int32(0) && _sqlite3BtreeConnectionCount(tls, *_ppBtree) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61509), unsafe.Pointer(&_sqlite3BtreeOpenØ00__func__Ø000), unsafe.Pointer(str(76852)))
crt.X__builtin_abort(tls)
}
}()
@@ -59137,51 +58913,58 @@ _89:
var _sqlite3BtreeOpenØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeOpenØ00__func__Ø000[0], str(78747), 17)
+ crt.Xstrncpy(nil, &_sqlite3BtreeOpenØ00__func__Ø000[0], str(76909), 17)
}
func _sqlite3OsFullPathname(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zPath *int8, _nPathOut int32, _zPathOut *int8) (r0 int32) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPathOut)) + 1*uintptr(i32(0)))) = int8(i32(0))
- return (*(*func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32
- }{(_pVfs.X9)})))(tls, _pVfs, _zPath, _nPathOut, _zPathOut)
+ *elem1(_zPathOut, 0) = 0
+ return func() func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int8) int32 {
+ v := _pVfs.XxFullPathname
+ return *(*func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVfs, _zPath, _nPathOut, _zPathOut)
}
-// Return the VFS structure for the pager.
+// C comment
+// /*
+// ** Return the VFS structure for the pager.
+// */
func _sqlite3PagerVfs(tls *crt.TLS, _pPager *XPager) (r0 *Xsqlite3_vfs) {
- return (*Xsqlite3_vfs)(_pPager.X0)
-}
-
-// Allocate and initialize a new Pager object and put a pointer to it
-// in *ppPager. The pager should eventually be freed by passing it
-// to sqlite3PagerClose().
-//
-// The zFilename argument is the path to the database file to open.
-// If zFilename is NULL then a randomly-named temporary file is created
-// and used as the file to be cached. Temporary files are be deleted
-// automatically when they are closed. If zFilename is ":memory:" then
-// all information is held in cache. It is never written to disk.
-// This can be used to implement an in-memory database.
-//
-// The nExtra parameter specifies the number of bytes of space allocated
-// along with each page reference. This space is available to the user
-// via the sqlite3PagerGetExtra() API. When a new page is allocated, the
-// first 8 bytes of this space are zeroed but the remainder is uninitialized.
-// (The extra space is used by btree as the MemPage object.)
-//
-// The flags argument is used to specify properties that affect the
-// operation of the pager. It should be passed some bitwise combination
-// of the PAGER_* flags.
-//
-// The vfsFlags parameter is a bitmask to pass to the flags parameter
-// of the xOpen() method of the supplied VFS when opening files.
-//
-// If the pager object is allocated and the specified file opened
-// successfully, SQLITE_OK is returned and *ppPager set to point to
-// the new pager object. If an error occurs, *ppPager is set to NULL
-// and error code returned. This function may return SQLITE_NOMEM
-// (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or
-// various SQLITE_IO_XXX errors.
+ return (*Xsqlite3_vfs)(_pPager.XpVfs)
+}
+
+// C comment
+// /*
+// ** Allocate and initialize a new Pager object and put a pointer to it
+// ** in *ppPager. The pager should eventually be freed by passing it
+// ** to sqlite3PagerClose().
+// **
+// ** The zFilename argument is the path to the database file to open.
+// ** If zFilename is NULL then a randomly-named temporary file is created
+// ** and used as the file to be cached. Temporary files are be deleted
+// ** automatically when they are closed. If zFilename is ":memory:" then
+// ** all information is held in cache. It is never written to disk.
+// ** This can be used to implement an in-memory database.
+// **
+// ** The nExtra parameter specifies the number of bytes of space allocated
+// ** along with each page reference. This space is available to the user
+// ** via the sqlite3PagerGetExtra() API. When a new page is allocated, the
+// ** first 8 bytes of this space are zeroed but the remainder is uninitialized.
+// ** (The extra space is used by btree as the MemPage object.)
+// **
+// ** The flags argument is used to specify properties that affect the
+// ** operation of the pager. It should be passed some bitwise combination
+// ** of the PAGER_* flags.
+// **
+// ** The vfsFlags parameter is a bitmask to pass to the flags parameter
+// ** of the xOpen() method of the supplied VFS when opening files.
+// **
+// ** If the pager object is allocated and the specified file opened
+// ** successfully, SQLITE_OK is returned and *ppPager set to point to
+// ** the new pager object. If an error occurs, *ppPager is set to NULL
+// ** and error code returned. This function may return SQLITE_NOMEM
+// ** (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or
+// ** various SQLITE_IO_XXX errors.
+// */
func _sqlite3PagerOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _ppPager **XPager, _zFilename *int8, _nExtra int32, _flags int32, _vfsFlags int32, _xReinit func(*crt.TLS, *XPgHdr)) (r0 int32) {
var _rc, _tempFile, _memDb, _readOnly, _journalFileSize, _nPathname, _useJournal, _pcacheSize, _nUri, _10_fout, _11_iDc int32
var _szPageDflt uint32
@@ -59189,110 +58972,93 @@ func _sqlite3PagerOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _ppPager **XPager, _zF
var _pPtr *uint8
var _pPager *XPager
_pPager = nil
- _rc = i32(0)
- _tempFile = i32(0)
- _memDb = i32(0)
- _readOnly = i32(0)
+ _rc = int32(0)
+ _tempFile = int32(0)
+ _memDb = int32(0)
+ _readOnly = int32(0)
_zPathname = nil
- _nPathname = i32(0)
- _useJournal = bool2int((_flags & i32(1)) == i32(0))
+ _nPathname = int32(0)
+ _useJournal = bool2int((_flags & int32(1)) == int32(0))
_pcacheSize = _sqlite3PcacheSize(tls)
- _szPageDflt = u32(4096)
+ _szPageDflt = uint32(4096)
_zUri = nil
- _nUri = i32(0)
- _journalFileSize = (_sqlite3JournalSize(tls, _pVfs) + i32(7)) & i32(-8)
+ _nUri = int32(0)
+ _journalFileSize = (_sqlite3JournalSize(tls, _pVfs) + int32(7)) & int32(-8)
*_ppPager = nil
- if (_flags & i32(2)) == 0 {
+ if (_flags & int32(2)) == 0 {
goto _0
}
- _memDb = i32(1)
- if _zFilename == nil || (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFilename)) + 1*uintptr(i32(0))))) == 0 {
+ _memDb = int32(1)
+ if _zFilename == nil || (*elem1(_zFilename, 0)) == 0 {
goto _2
}
_zPathname = _sqlite3DbStrDup(tls, nil, _zFilename)
if _zPathname == nil {
- return _sqlite3NomemError(tls, i32(51601))
+ return _sqlite3NomemError(tls, int32(51601))
}
_nPathname = _sqlite3Strlen30(tls, _zPathname)
_zFilename = nil
_2:
_0:
- if _zFilename == nil || (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFilename)) + 1*uintptr(i32(0))))) == 0 {
+ if _zFilename == nil || (*elem1(_zFilename, 0)) == 0 {
goto _5
}
- _nPathname = (_pVfs.X2) + i32(1)
- _zPathname = (*int8)(_sqlite3DbMallocRaw(tls, nil, uint64(_nPathname*i32(2))))
+ _nPathname = _pVfs.XmxPathname + int32(1)
+ _zPathname = (*int8)(_sqlite3DbMallocRaw(tls, nil, uint64(_nPathname*int32(2))))
if _zPathname == nil {
- return _sqlite3NomemError(tls, i32(51617))
+ return _sqlite3NomemError(tls, int32(51617))
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPathname)) + 1*uintptr(i32(0)))) = int8(i32(0))
+ *elem1(_zPathname, 0) = 0
_rc = _sqlite3OsFullPathname(tls, _pVfs, _zFilename, _nPathname, _zPathname)
_nPathname = _sqlite3Strlen30(tls, _zPathname)
- _3_z = store0(&_zUri, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFilename))+1*uintptr(_sqlite3Strlen30(tls, _zFilename)+i32(1)))))
+ _3_z = store1(&_zUri, elem1(_zFilename, uintptr(_sqlite3Strlen30(tls, _zFilename)+int32(1))))
_7:
if (*_3_z) != 0 {
- {
- p := &_3_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _3_z)+i32(1))))
- sink0(*p)
- }
- {
- p := &_3_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _3_z)+i32(1))))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_3_z)) += uintptr(_sqlite3Strlen30(tls, _3_z) + int32(1))
+ *(*uintptr)(unsafe.Pointer(&_3_z)) += uintptr(_sqlite3Strlen30(tls, _3_z) + int32(1))
goto _7
}
- _nUri = int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_z))+1*uintptr(i32(1)))))) - uintptr(unsafe.Pointer(_zUri))) / 1)
+ _nUri = int32(uintptr(unsafe.Pointer(elem1(_3_z, uintptr(1)))) - uintptr(unsafe.Pointer(_zUri)))
func() {
- if _nUri < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51628), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(78764)))
+ if _nUri < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51628), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(76926)))
crt.X__builtin_abort(tls)
}
}()
- if (_rc == i32(0)) && ((_nPathname + i32(8)) > (_pVfs.X2)) {
- _rc = _sqlite3CantopenError(tls, i32(51636))
+ if (_rc == int32(0)) && ((_nPathname + int32(8)) > _pVfs.XmxPathname) {
+ _rc = _sqlite3CantopenError(tls, int32(51636))
}
- if _rc != i32(0) {
- _sqlite3DbFree(tls, nil, (unsafe.Pointer)(_zPathname))
+ if _rc != int32(0) {
+ _sqlite3DbFree(tls, nil, unsafe.Pointer(_zPathname))
return _rc
}
_5:
- _pPtr = (*uint8)(_sqlite3MallocZero(tls, uint64((((((((((((u32(224)+uint32((_pcacheSize+i32(7))&i32(-8)))+uint32(((_pVfs.X1)+i32(7))&i32(-8)))+uint32(_journalFileSize*i32(2)))+uint32(_nPathname))+uint32(i32(1)))+uint32(_nUri))+uint32(_nPathname))+uint32(i32(8)))+uint32(i32(2)))+uint32(_nPathname))+uint32(i32(4)))+uint32(i32(2)))))
+ _pPtr = (*uint8)(_sqlite3MallocZero(tls, uint64((((((((((((uint32(224)+uint32((_pcacheSize+int32(7))&int32(-8)))+uint32((_pVfs.XszOsFile+int32(7))&int32(-8)))+uint32(_journalFileSize*int32(2)))+uint32(_nPathname))+uint32(1))+uint32(_nUri))+uint32(_nPathname))+uint32(8))+uint32(2))+uint32(_nPathname))+uint32(4))+uint32(2))))
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)((unsafe.Pointer)(uintptr(_journalFileSize)))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51667), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(78772)))
+ if (int32(uintptr(crt.U2P(uintptr(_journalFileSize)))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51667), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(76934)))
crt.X__builtin_abort(tls)
}
}()
if _pPtr == nil {
- _sqlite3DbFree(tls, nil, (unsafe.Pointer)(_zPathname))
- return _sqlite3NomemError(tls, i32(51670))
+ _sqlite3DbFree(tls, nil, unsafe.Pointer(_zPathname))
+ return _sqlite3NomemError(tls, int32(51670))
}
_pPager = (*XPager)(unsafe.Pointer(_pPtr))
- *(**XPCache)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X59))))) = (*XPCache)(unsafe.Pointer(store13(func() (**uint8, *uint8) {
- p := &_pPtr
- return p, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(u32(224))))
- }())))
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X31))))) = (*Xsqlite3_file)(unsafe.Pointer(store13(func() (**uint8, *uint8) {
- p := &_pPtr
- return p, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr((_pcacheSize+i32(7))&i32(-8))))
- }())))
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X33))))) = (*Xsqlite3_file)(unsafe.Pointer(store13(func() (**uint8, *uint8) {
- p := &_pPtr
- return p, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(((_pVfs.X1)+i32(7))&i32(-8))))
- }())))
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X32))))) = (*Xsqlite3_file)(unsafe.Pointer(store13(func() (**uint8, *uint8) {
+ *(**XPCache)(unsafe.Pointer(&_pPager.XpPCache)) = (*XPCache)(unsafe.Pointer(store15(func() (**uint8, *uint8) { p := &_pPtr; return p, elem15(*p, uintptr(224)) }())))
+ *(**Xsqlite3_file)(unsafe.Pointer(&_pPager.Xfd)) = (*Xsqlite3_file)(unsafe.Pointer(store15(func() (**uint8, *uint8) {
p := &_pPtr
- return p, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_journalFileSize)))
+ return p, elem15(*p, uintptr((_pcacheSize+int32(7))&int32(-8)))
}())))
- *(**int8)(unsafe.Pointer(&(_pPager.X51))) = (*int8)(unsafe.Pointer(store13(func() (**uint8, *uint8) {
+ *(**Xsqlite3_file)(unsafe.Pointer(&_pPager.Xsjfd)) = (*Xsqlite3_file)(unsafe.Pointer(store15(func() (**uint8, *uint8) {
p := &_pPtr
- return p, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_journalFileSize)))
+ return p, elem15(*p, uintptr((_pVfs.XszOsFile+int32(7))&int32(-8)))
}())))
+ *(**Xsqlite3_file)(unsafe.Pointer(&_pPager.Xjfd)) = (*Xsqlite3_file)(unsafe.Pointer(store15(func() (**uint8, *uint8) { p := &_pPtr; return p, elem15(*p, uintptr(_journalFileSize)) }())))
+ _pPager.XzFilename = (*int8)(unsafe.Pointer(store15(func() (**uint8, *uint8) { p := &_pPtr; return p, elem15(*p, uintptr(_journalFileSize)) }())))
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer((*Xsqlite3_file)(_pPager.X32)))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51678), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(78829)))
+ if (int32(uintptr(_pPager.Xjfd)) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51678), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(76991)))
crt.X__builtin_abort(tls)
}
}()
@@ -59300,93 +59066,86 @@ _5:
goto _19
}
func() {
- if _nPathname <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51682), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(78863)))
+ if _nPathname <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51682), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77025)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&(_pPager.X52))) = (*int8)(unsafe.Pointer(store13(func() (**uint8, *uint8) {
- p := &_pPtr
- return p, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr((_nPathname+i32(1))+_nUri)))
- }())))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pPager.X51), (unsafe.Pointer)(_zPathname), uint32(_nPathname))
+ _pPager.XzJournal = (*int8)(unsafe.Pointer(store15(func() (**uint8, *uint8) { p := &_pPtr; return p, elem15(*p, uintptr((_nPathname+int32(1))+_nUri)) }())))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pPager.XzFilename), unsafe.Pointer(_zPathname), uint32(_nPathname))
if _nUri != 0 {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPager.X51))+1*uintptr(_nPathname+i32(1))))), (unsafe.Pointer)(_zUri), uint32(_nUri))
- }
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pPager.X52), (unsafe.Pointer)(_zPathname), uint32(_nPathname))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPager.X52))+1*uintptr(_nPathname)))), (unsafe.Pointer)(str(78875)), uint32(i32(10)))
- *(**int8)(unsafe.Pointer(&(_pPager.X61))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPager.X52)) + 1*uintptr((_nPathname+i32(8))+i32(1))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pPager.X61), (unsafe.Pointer)(_zPathname), uint32(_nPathname))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPager.X61))+1*uintptr(_nPathname)))), (unsafe.Pointer)(str(78885)), uint32(i32(5)))
- _sqlite3DbFree(tls, nil, (unsafe.Pointer)(_zPathname))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem1(_pPager.XzFilename, uintptr(_nPathname+int32(1)))), unsafe.Pointer(_zUri), uint32(_nUri))
+ }
+ crt.Xmemcpy(tls, unsafe.Pointer(_pPager.XzJournal), unsafe.Pointer(_zPathname), uint32(_nPathname))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem1(_pPager.XzJournal, uintptr(_nPathname))), unsafe.Pointer(str(77037)), uint32(10))
+ _pPager.XzWal = elem1(_pPager.XzJournal, uintptr((_nPathname+int32(8))+int32(1)))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pPager.XzWal), unsafe.Pointer(_zPathname), uint32(_nPathname))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem1(_pPager.XzWal, uintptr(_nPathname))), unsafe.Pointer(str(77047)), uint32(5))
+ _sqlite3DbFree(tls, nil, unsafe.Pointer(_zPathname))
_19:
- *(**Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X0))))) = _pVfs
- *(*uint32)(unsafe.Pointer(&(_pPager.X46))) = uint32(_vfsFlags)
- if _zFilename == nil || (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFilename)) + 1*uintptr(i32(0))))) == 0 {
+ *(**Xsqlite3_vfs)(unsafe.Pointer(&_pPager.XpVfs)) = _pVfs
+ _pPager.XvfsFlags = uint32(_vfsFlags)
+ if _zFilename == nil || (*elem1(_zFilename, 0)) == 0 {
goto _24
}
- _10_fout = i32(0)
- _rc = _sqlite3OsOpen(tls, _pVfs, _pPager.X51, (*Xsqlite3_file)(_pPager.X31), _vfsFlags, &_10_fout)
+ _10_fout = int32(0)
+ _rc = _sqlite3OsOpen(tls, _pVfs, _pPager.XzFilename, (*Xsqlite3_file)(_pPager.Xfd), _vfsFlags, &_10_fout)
func() {
if _memDb != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51705), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(78891)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51705), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77053)))
crt.X__builtin_abort(tls)
}
}()
- _readOnly = _10_fout & i32(1)
- if _rc != i32(0) {
+ _readOnly = _10_fout & int32(1)
+ if _rc != int32(0) {
goto _27
}
- _11_iDc = _sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.X31))
+ _11_iDc = _sqlite3OsDeviceCharacteristics(tls, (*Xsqlite3_file)(_pPager.Xfd))
if _readOnly != 0 {
goto _28
}
_setSectorSize(tls, _pPager)
- i32(0)
- if _szPageDflt >= (_pPager.X47) {
+
+ if _szPageDflt >= _pPager.XsectorSize {
goto _29
}
- if (_pPager.X47) > uint32(i32(8192)) {
- _szPageDflt = uint32(i32(8192))
+ if _pPager.XsectorSize > uint32(8192) {
+ _szPageDflt = uint32(8192)
goto _31
}
- _szPageDflt = _pPager.X47
+ _szPageDflt = _pPager.XsectorSize
_31:
_29:
_28:
- *(*uint8)(unsafe.Pointer(&(_pPager.X11))) = uint8(Xsqlite3_uri_boolean(tls, _zFilename, str(78898), i32(0)))
- if ((_11_iDc & i32(8192)) != i32(0)) || Xsqlite3_uri_boolean(tls, _zFilename, str(78905), i32(0)) != 0 {
- {
- p := &_vfsFlags
- *p = (*p) | i32(1)
- sink1(*p)
- }
+ _pPager.XnoLock = uint8(Xsqlite3_uri_boolean(tls, _zFilename, str(77060), int32(0)))
+ if ((_11_iDc & int32(8192)) != int32(0)) || Xsqlite3_uri_boolean(tls, _zFilename, str(77067), int32(0)) != 0 {
+ _vfsFlags |= int32(1)
goto _act_like_temp_file
}
_27:
goto _34
_24:
_act_like_temp_file:
- _tempFile = i32(1)
- *(*uint8)(unsafe.Pointer(&(_pPager.X14))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_pPager.X15))) = uint8(i32(4))
- *(*uint8)(unsafe.Pointer(&(_pPager.X11))) = uint8(i32(1))
- _readOnly = _vfsFlags & i32(1)
+ _tempFile = int32(1)
+ _pPager.XeState = uint8(1)
+ _pPager.XeLock = uint8(4)
+ _pPager.XnoLock = uint8(1)
+ _readOnly = _vfsFlags & int32(1)
_34:
- if _rc == i32(0) {
+ if _rc == int32(0) {
func() {
- if int32(_pPager.X13) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51772), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(78915)))
+ if int32(_pPager.XmemDb) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51772), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77077)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerSetPagesize(tls, _pPager, &_szPageDflt, i32(-1))
+ _rc = _sqlite3PagerSetPagesize(tls, _pPager, &_szPageDflt, int32(-1))
}
- if _rc == i32(0) {
- _nExtra = (_nExtra + i32(7)) & i32(-8)
+ if _rc == int32(0) {
+ _nExtra = (_nExtra + int32(7)) & int32(-8)
func() {
- if _nExtra < i32(8) || _nExtra >= i32(1000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51780), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(78932)))
+ if _nExtra < int32(8) || _nExtra >= int32(1000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51780), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77094)))
crt.X__builtin_abort(tls)
}
}()
@@ -59395,124 +59154,133 @@ _34:
return _pagerStress
}
return nil
- }(), (unsafe.Pointer)(_pPager), (*XPCache)(_pPager.X59))
+ }(), unsafe.Pointer(_pPager), (*XPCache)(_pPager.XpPCache))
}
- if _rc != i32(0) {
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X31))
- _sqlite3PageFree(tls, (unsafe.Pointer)(_pPager.X58))
- Xsqlite3_free(tls, (unsafe.Pointer)(_pPager))
+ if _rc != int32(0) {
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xfd))
+ _sqlite3PageFree(tls, unsafe.Pointer(_pPager.XpTmpSpace))
+ Xsqlite3_free(tls, unsafe.Pointer(_pPager))
return _rc
}
- *(*uint8)(unsafe.Pointer(&(_pPager.X3))) = uint8(_useJournal)
- *(*uint32)(unsafe.Pointer(&(_pPager.X49))) = uint32(i32(1073741823))
- *(*uint8)(unsafe.Pointer(&(_pPager.X10))) = uint8(_tempFile)
+ _pPager.XuseJournal = uint8(_useJournal)
+ _pPager.XmxPgno = uint32(1073741823)
+ _pPager.XtempFile = uint8(_tempFile)
func() {
- if _tempFile != i32(0) && _tempFile != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51808), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(78957)))
+ if _tempFile != int32(0) && _tempFile != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51808), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77119)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- *(*uint8)(unsafe.Pointer(&(_pPager.X1))) = uint8(_tempFile)
- *(*uint8)(unsafe.Pointer(&(_pPager.X16))) = _pPager.X10
- *(*uint8)(unsafe.Pointer(&(_pPager.X13))) = uint8(_memDb)
- *(*uint8)(unsafe.Pointer(&(_pPager.X12))) = uint8(_readOnly)
+
+ _pPager.XexclusiveMode = uint8(_tempFile)
+ _pPager.XchangeCountDone = _pPager.XtempFile
+ _pPager.XmemDb = uint8(_memDb)
+ _pPager.XreadOnly = uint8(_readOnly)
func() {
- if _useJournal == 0 && (_pPager.X10) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51815), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(79033)))
+ if _useJournal == 0 && _pPager.XtempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51815), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77195)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pPager.X4))) = _pPager.X10
- if (_pPager.X4) != 0 {
+ _pPager.XnoSync = _pPager.XtempFile
+ if _pPager.XnoSync != 0 {
func() {
- if int32(_pPager.X5) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51818), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(79064)))
+ if int32(_pPager.XfullSync) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51818), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77226)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51819), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(79084)))
+ if int32(_pPager.XextraSync) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51819), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77246)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X9) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51820), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(79105)))
+ if int32(_pPager.XsyncFlags) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51820), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77267)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X8) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51821), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(79126)))
+ if int32(_pPager.XwalSyncFlags) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51821), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77288)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51822), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(79150)))
+ if int32(_pPager.XckptSyncFlags) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51822), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77312)))
crt.X__builtin_abort(tls)
}
}()
goto _62
}
- *(*uint8)(unsafe.Pointer(&(_pPager.X5))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_pPager.X6))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pPager.X9))) = uint8(i32(2))
- *(*uint8)(unsafe.Pointer(&(_pPager.X8))) = uint8(i32(34))
- *(*uint8)(unsafe.Pointer(&(_pPager.X7))) = uint8(i32(2))
+ _pPager.XfullSync = uint8(1)
+ _pPager.XextraSync = 0
+ _pPager.XsyncFlags = uint8(2)
+ _pPager.XwalSyncFlags = uint8(34)
+ _pPager.XckptSyncFlags = uint8(2)
_62:
- *(*uint16)(unsafe.Pointer(&(_pPager.X44))) = uint16(_nExtra)
- *(*int64)(unsafe.Pointer(&(_pPager.X50))) = int64(i32(-1))
+ _pPager.XnExtra = uint16(_nExtra)
+ _pPager.XjournalSizeLimit = int64(-1)
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil && _tempFile == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51835), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000))), unsafe.Pointer(str(79175)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil && _tempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51835), unsafe.Pointer(&_sqlite3PagerOpenØ00__func__Ø000), unsafe.Pointer(str(77337)))
crt.X__builtin_abort(tls)
}
}()
_setSectorSize(tls, _pPager)
if _useJournal == 0 {
- *(*uint8)(unsafe.Pointer(&(_pPager.X2))) = uint8(i32(2))
+ _pPager.XjournalMode = uint8(2)
goto _68
}
if _memDb != 0 {
- *(*uint8)(unsafe.Pointer(&(_pPager.X2))) = uint8(i32(4))
+ _pPager.XjournalMode = uint8(4)
}
_68:
- *(*func(*crt.TLS, *XPgHdr))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_pPager.X56))))) = _xReinit
+ *(*func(*crt.TLS, *XPgHdr))(unsafe.Pointer(&_pPager.XxReiniter)) = _xReinit
_setGetterMethod(tls, _pPager)
*_ppPager = _pPager
- return i32(0)
+ return int32(0)
}
-// Return the size in bytes of a PCache object.
+// C comment
+// /*
+// ** Return the size in bytes of a PCache object.
+// */
func _sqlite3PcacheSize(tls *crt.TLS) (r0 int32) {
- return int32(u32(48))
+ return int32(48)
}
-// Return the number of bytes required to store a JournalFile that uses vfs
-// pVfs to create the underlying on-disk files.
+// C comment
+// /*
+// ** Return the number of bytes required to store a JournalFile that uses vfs
+// ** pVfs to create the underlying on-disk files.
+// */
func _sqlite3JournalSize(tls *crt.TLS, _pVfs *Xsqlite3_vfs) (r0 int32) {
return func() int32 {
- if (_pVfs.X1) > i32(56) {
- return (_pVfs.X1)
+ if _pVfs.XszOsFile > int32(56) {
+ return _pVfs.XszOsFile
}
- return i32(56)
+ return int32(56)
}()
}
var _sqlite3PagerOpenØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerOpenØ00__func__Ø000[0], str(79206), 17)
+ crt.Xstrncpy(nil, &_sqlite3PagerOpenØ00__func__Ø000[0], str(77368), 17)
}
-// Return a boolean value for a query parameter.
+// C comment
+// /*
+// ** Return a boolean value for a query parameter.
+// */
func Xsqlite3_uri_boolean(tls *crt.TLS, _zFilename *int8, _zParam *int8, _bDflt int32) (r0 int32) {
var _z *int8
_z = Xsqlite3_uri_parameter(tls, _zFilename, _zParam)
- _bDflt = bool2int(_bDflt != i32(0))
+ _bDflt = bool2int(_bDflt != int32(0))
return func() int32 {
if _z != nil {
return int32(_sqlite3GetBoolean(tls, _z, uint8(_bDflt)))
@@ -59521,75 +59289,72 @@ func Xsqlite3_uri_boolean(tls *crt.TLS, _zFilename *int8, _zParam *int8, _bDflt
}()
}
-// This is a utility routine, useful to VFS implementations, that checks
-// to see if a database file was a URI that contained a specific query
-// parameter, and if so obtains the value of the query parameter.
-//
-// The zFilename argument is the filename pointer passed into the xOpen()
-// method of a VFS implementation. The zParam argument is the name of the
-// query parameter we seek. This routine returns the value of the zParam
-// parameter if it exists. If the parameter does not exist, this routine
-// returns a NULL pointer.
+// C comment
+// /*
+// ** This is a utility routine, useful to VFS implementations, that checks
+// ** to see if a database file was a URI that contained a specific query
+// ** parameter, and if so obtains the value of the query parameter.
+// **
+// ** The zFilename argument is the filename pointer passed into the xOpen()
+// ** method of a VFS implementation. The zParam argument is the name of the
+// ** query parameter we seek. This routine returns the value of the zParam
+// ** parameter if it exists. If the parameter does not exist, this routine
+// ** returns a NULL pointer.
+// */
func Xsqlite3_uri_parameter(tls *crt.TLS, _zFilename *int8, _zParam *int8) (r0 *int8) {
var _1_x int32
if (_zFilename == nil) || (_zParam == nil) {
return nil
}
- {
- p := &_zFilename
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _zFilename)+i32(1))))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zFilename)) += uintptr(_sqlite3Strlen30(tls, _zFilename) + int32(1))
_2:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFilename)) + 1*uintptr(i32(0))))) == 0 {
+ if (*elem1(_zFilename, 0)) == 0 {
goto _3
}
_1_x = crt.Xstrcmp(tls, _zFilename, _zParam)
- {
- p := &_zFilename
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _zFilename)+i32(1))))
- sink0(*p)
- }
- if _1_x == i32(0) {
+ *(*uintptr)(unsafe.Pointer(&_zFilename)) += uintptr(_sqlite3Strlen30(tls, _zFilename) + int32(1))
+ if _1_x == int32(0) {
return _zFilename
}
- {
- p := &_zFilename
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _zFilename)+i32(1))))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zFilename)) += uintptr(_sqlite3Strlen30(tls, _zFilename) + int32(1))
goto _2
_3:
return nil
}
-// Interpret the given string as a boolean value.
+// C comment
+// /*
+// ** Interpret the given string as a boolean value.
+// */
func _sqlite3GetBoolean(tls *crt.TLS, _z *int8, _dflt uint8) (r0 uint8) {
- return uint8(bool2int(int32(_getSafetyLevel(tls, _z, i32(1), _dflt)) != i32(0)))
-}
-
-// Interpret the given string as a safety level. Return 0 for OFF,
-// 1 for ON or NORMAL, 2 for FULL, and 3 for EXTRA. Return 1 for an empty or
-// unrecognized string argument. The FULL and EXTRA option is disallowed
-// if the omitFull parameter it 1.
-//
-// Note that the values returned are one less that the values that
-// should be passed into sqlite3BtreeSetSafetyLevel(). The is done
-// to support legacy SQL code. The safety level used to be boolean
-// and older scripts may have used numbers 0 for OFF and 1 for ON.
+ return uint8(bool2int(int32(_getSafetyLevel(tls, _z, int32(1), _dflt)) != int32(0)))
+}
+
+// C comment
+// /*
+// ** Interpret the given string as a safety level. Return 0 for OFF,
+// ** 1 for ON or NORMAL, 2 for FULL, and 3 for EXTRA. Return 1 for an empty or
+// ** unrecognized string argument. The FULL and EXTRA option is disallowed
+// ** if the omitFull parameter it 1.
+// **
+// ** Note that the values returned are one less that the values that
+// ** should be passed into sqlite3BtreeSetSafetyLevel(). The is done
+// ** to support legacy SQL code. The safety level used to be boolean
+// ** and older scripts may have used numbers 0 for OFF and 1 for ON.
+// */
func _getSafetyLevel(tls *crt.TLS, _z *int8, _omitFull int32, _dflt uint8) (r0 uint8) {
var _i, _n int32
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_z))))) & i32(4)) != 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_z)))) & int32(4)) != 0 {
return uint8(_sqlite3Atoi(tls, _z))
}
_n = _sqlite3Strlen30(tls, _z)
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= i32(8) {
+ if _i >= int32(8) {
goto _4
}
- if ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_getSafetyLevelØ00iLengthØ003)) + 1*uintptr(_i)))) == _n) && (Xsqlite3_strnicmp(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_getSafetyLevelØ00zTextØ001))+1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_getSafetyLevelØ00iOffsetØ002)) + 1*uintptr(_i)))))), _z, _n) == i32(0))) && ((_omitFull == 0) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_getSafetyLevelØ00iValueØ004)) + 1*uintptr(_i)))) <= i32(1))) {
- return *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_getSafetyLevelØ00iValueØ004)) + 1*uintptr(_i)))
+ if ((int32(*elem15((*uint8)(unsafe.Pointer(&_getSafetyLevelØ00iLengthØ003)), uintptr(_i))) == _n) && (Xsqlite3_strnicmp(tls, elem1((*int8)(unsafe.Pointer(&_getSafetyLevelØ00zTextØ001)), uintptr(*elem15((*uint8)(unsafe.Pointer(&_getSafetyLevelØ00iOffsetØ002)), uintptr(_i)))), _z, _n) == int32(0))) && ((_omitFull == 0) || (int32(*elem15((*uint8)(unsafe.Pointer(&_getSafetyLevelØ00iValueØ004)), uintptr(_i))) <= int32(1))) {
+ return *elem15((*uint8)(unsafe.Pointer(&_getSafetyLevelØ00iValueØ004)), uintptr(_i))
}
_i += 1
goto _1
@@ -59606,7 +59371,7 @@ func init() {
var _getSafetyLevelØ00zTextØ001 [25]int8
func init() {
- crt.Xstrncpy(nil, &_getSafetyLevelØ00zTextØ001[0], str(79223), 25)
+ crt.Xstrncpy(nil, &_getSafetyLevelØ00zTextØ001[0], str(77385), 25)
}
var _getSafetyLevelØ00iOffsetØ002 [8]uint8
@@ -59621,114 +59386,120 @@ func init() {
_getSafetyLevelØ00iValueØ004 = [8]uint8{1, 0, 0, 0, 1, 1, 3, 2}
}
-// Create a new PCache object. Storage space to hold the object
-// has already been allocated and is passed in as the p pointer.
-// The caller discovers how much space needs to be allocated by
-// calling sqlite3PcacheSize().
-//
-// szExtra is some extra space allocated for each page. The first
-// 8 bytes of the extra space will be zeroed as the page is allocated,
-// but remaining content will be uninitialized. Though it is opaque
-// to this module, the extra space really ends up being the MemPage
-// structure in the pager.
+// C comment
+// /*
+// ** Create a new PCache object. Storage space to hold the object
+// ** has already been allocated and is passed in as the p pointer.
+// ** The caller discovers how much space needs to be allocated by
+// ** calling sqlite3PcacheSize().
+// **
+// ** szExtra is some extra space allocated for each page. The first
+// ** 8 bytes of the extra space will be zeroed as the page is allocated,
+// ** but remaining content will be uninitialized. Though it is opaque
+// ** to this module, the extra space really ends up being the MemPage
+// ** structure in the pager.
+// */
func _sqlite3PcacheOpen(tls *crt.TLS, _szPage int32, _szExtra int32, _bPurgeable int32, _xStress func(*crt.TLS, unsafe.Pointer, *XPgHdr) int32, _pStress unsafe.Pointer, _p *XPCache) (r0 int32) {
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(48))
- *(*int32)(unsafe.Pointer(&(_p.X6))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_p.X7))) = _szExtra
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(48))
+ _p.XszPage = int32(1)
+ _p.XszExtra = _szExtra
func() {
- if _szExtra < i32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44428), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheOpenØ00__func__Ø000))), unsafe.Pointer(str(79248)))
+ if _szExtra < int32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44428), unsafe.Pointer(&_sqlite3PcacheOpenØ00__func__Ø000), unsafe.Pointer(str(77410)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_p.X8))) = uint8(_bPurgeable)
- *(*uint8)(unsafe.Pointer(&(_p.X9))) = uint8(i32(2))
- *(*func(*crt.TLS, unsafe.Pointer, *XPgHdr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_p.X10))))) = _xStress
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X11))) = _pStress
- *(*int32)(unsafe.Pointer(&(_p.X4))) = i32(100)
- *(*int32)(unsafe.Pointer(&(_p.X5))) = i32(1)
+ _p.XbPurgeable = uint8(_bPurgeable)
+ _p.XeCreate = uint8(2)
+ *(*func(*crt.TLS, unsafe.Pointer, *XPgHdr) int32)(unsafe.Pointer(&_p.XxStress)) = _xStress
+ _p.XpStress = _pStress
+ _p.XszCache = int32(100)
+ _p.XszSpill = int32(1)
return _sqlite3PcacheSetPageSize(tls, _p, _szPage)
}
var _sqlite3PcacheOpenØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheOpenØ00__func__Ø000[0], str(79259), 18)
-}
-
-// This function is called by the pcache layer when it has reached some
-// soft memory limit. The first argument is a pointer to a Pager object
-// (cast as a void*). The pager is always 'purgeable' (not an in-memory
-// database). The second argument is a reference to a page that is
-// currently dirty but has no outstanding references. The page
-// is always associated with the Pager object passed as the first
-// argument.
-//
-// The job of this function is to make pPg clean by writing its contents
-// out to the database file, if possible. This may involve syncing the
-// journal file.
-//
-// If successful, sqlite3PcacheMakeClean() is called on the page and
-// SQLITE_OK returned. If an IO error occurs while trying to make the
-// page clean, the IO error code is returned. If the page cannot be
-// made clean for some other reason, but no error occurs, then SQLITE_OK
-// is returned by sqlite3PcacheMakeClean() is not called.
+ crt.Xstrncpy(nil, &_sqlite3PcacheOpenØ00__func__Ø000[0], str(77421), 18)
+}
+
+// C comment
+// /*
+// ** This function is called by the pcache layer when it has reached some
+// ** soft memory limit. The first argument is a pointer to a Pager object
+// ** (cast as a void*). The pager is always 'purgeable' (not an in-memory
+// ** database). The second argument is a reference to a page that is
+// ** currently dirty but has no outstanding references. The page
+// ** is always associated with the Pager object passed as the first
+// ** argument.
+// **
+// ** The job of this function is to make pPg clean by writing its contents
+// ** out to the database file, if possible. This may involve syncing the
+// ** journal file.
+// **
+// ** If successful, sqlite3PcacheMakeClean() is called on the page and
+// ** SQLITE_OK returned. If an IO error occurs while trying to make the
+// ** page clean, the IO error code is returned. If the page cannot be
+// ** made clean for some other reason, but no error occurs, then SQLITE_OK
+// ** is returned by sqlite3PcacheMakeClean() is not called.
+// */
func _pagerStress(tls *crt.TLS, _p unsafe.Pointer, _pPg *XPgHdr) (r0 int32) {
var _rc int32
var _pPager *XPager
_pPager = (*XPager)(_p)
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (*XPager)(_pPg.X4) != _pPager {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51451), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerStressØ00__func__Ø000))), unsafe.Pointer(str(18492)))
+ if (*XPager)(_pPg.XpPager) != _pPager {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51451), unsafe.Pointer(&_pagerStressØ00__func__Ø000), unsafe.Pointer(str(18447)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pPg.X6) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51452), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerStressØ00__func__Ø000))), unsafe.Pointer(str(54035)))
+ if (int32(_pPg.Xflags) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51452), unsafe.Pointer(&_pagerStressØ00__func__Ø000), unsafe.Pointer(str(54011)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
- if (_pPager.X26) != 0 {
+ if _pPager.XerrCode != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51470), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerStressØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51470), unsafe.Pointer(&_pagerStressØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return i32(0)
+ return int32(0)
}
- if ((_pPager.X18) != 0) && (((int32(_pPager.X18) & i32(3)) != i32(0)) || ((int32(_pPg.X6) & i32(8)) != i32(0))) {
- return i32(0)
+ if (_pPager.XdoNotSpill != 0) && (((int32(_pPager.XdoNotSpill) & int32(3)) != int32(0)) || ((int32(_pPg.Xflags) & int32(8)) != int32(0))) {
+ return int32(0)
}
- *(**XPgHdr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPg.X3))))) = nil
- if (*XWal)(_pPager.X60) == nil {
+ *(**XPgHdr)(unsafe.Pointer(&_pPg.XpDirty)) = nil
+ if (*XWal)(_pPager.XpWal) == nil {
goto _10
}
_rc = _subjournalPageIfRequired(tls, _pPg)
- if _rc == i32(0) {
- _rc = _pagerWalFrames(tls, _pPager, _pPg, uint32(i32(0)), i32(0))
+ if _rc == int32(0) {
+ _rc = _pagerWalFrames(tls, _pPager, _pPg, 0, int32(0))
}
goto _12
_10:
- if (int32(_pPg.X6)&i32(8)) != 0 || (int32(_pPager.X14) == i32(3)) {
- _rc = _syncJournal(tls, _pPager, i32(1))
+ if (int32(_pPg.Xflags)&int32(8)) != 0 || (int32(_pPager.XeState) == int32(3)) {
+ _rc = _syncJournal(tls, _pPager, int32(1))
}
- if _rc == i32(0) {
+ if _rc == int32(0) {
func() {
- if (int32(_pPg.X6) & i32(8)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51499), unsafe.Pointer((*int8)(unsafe.Pointer(&_pagerStressØ00__func__Ø000))), unsafe.Pointer(str(79277)))
+ if (int32(_pPg.Xflags) & int32(8)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51499), unsafe.Pointer(&_pagerStressØ00__func__Ø000), unsafe.Pointer(str(77439)))
crt.X__builtin_abort(tls)
}
}()
_rc = _pager_write_pagelist(tls, _pPager, _pPg)
}
_12:
- if _rc == i32(0) {
+ if _rc == int32(0) {
_sqlite3PcacheMakeClean(tls, _pPg)
}
return _pager_error(tls, _pPager, _rc)
@@ -59737,35 +59508,38 @@ _12:
var _pagerStressØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_pagerStressØ00__func__Ø000[0], str(79309), 12)
+ crt.Xstrncpy(nil, &_pagerStressØ00__func__Ø000[0], str(77471), 12)
}
-// During a rollback, when the pager reloads information into the cache
-// so that the cache is restored to its original state at the start of
-// the transaction, for each page restored this routine is called.
-//
-// This routine needs to reset the extra data section at the end of the
-// page to agree with the restored data.
+// C comment
+// /*
+// ** During a rollback, when the pager reloads information into the cache
+// ** so that the cache is restored to its original state at the start of
+// ** the transaction, for each page restored this routine is called.
+// **
+// ** This routine needs to reset the extra data section at the end of the
+// ** page to agree with the restored data.
+// */
func _pageReinit(tls *crt.TLS, _pData *XPgHdr) {
var _pPage *XMemPage
_pPage = (*XMemPage)(_sqlite3PagerGetExtra(tls, _pData))
func() {
- if _sqlite3PagerPageRefcount(tls, _pData) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61180), unsafe.Pointer((*int8)(unsafe.Pointer(&_pageReinitØ00__func__Ø000))), unsafe.Pointer(str(79321)))
+ if _sqlite3PagerPageRefcount(tls, _pData) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61180), unsafe.Pointer(&_pageReinitØ00__func__Ø000), unsafe.Pointer(str(77483)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPage.X0) == 0 {
+ if _pPage.XisInit == 0 {
goto _2
}
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61182), unsafe.Pointer((*int8)(unsafe.Pointer(&_pageReinitØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61182), unsafe.Pointer(&_pageReinitØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pPage.X0))) = uint8(i32(0))
- if _sqlite3PagerPageRefcount(tls, _pData) > i32(1) {
+ _pPage.XisInit = 0
+ if _sqlite3PagerPageRefcount(tls, _pData) > int32(1) {
_btreeInitPage(tls, _pPage)
}
_2:
@@ -59774,49 +59548,55 @@ _2:
var _pageReinitØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_pageReinitØ00__func__Ø000[0], str(79355), 11)
+ crt.Xstrncpy(nil, &_pageReinitØ00__func__Ø000[0], str(77517), 11)
}
-// Change the maximum size of any memory mapping made of the database file.
+// C comment
+// /*
+// ** Change the maximum size of any memory mapping made of the database file.
+// */
func _sqlite3PagerSetMmapLimit(tls *crt.TLS, _pPager *XPager, _szMmap int64) {
- *(*int64)(unsafe.Pointer(&(_pPager.X42))) = _szMmap
+ _pPager.XszMmap = _szMmap
_pagerFixMaplimit(tls, _pPager)
}
-// Read the first N bytes from the beginning of the file into memory
-// that pDest points to.
-//
-// If the pager was opened on a transient file (zFilename==""), or
-// opened on a file less than N bytes in size, the output buffer is
-// zeroed and SQLITE_OK returned. The rationale for this is that this
-// function is used to read database headers, and a new transient or
-// zero sized database has a header than consists entirely of zeroes.
-//
-// If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered,
-// the error code is returned to the caller and the contents of the
-// output buffer undefined.
+// C comment
+// /*
+// ** Read the first N bytes from the beginning of the file into memory
+// ** that pDest points to.
+// **
+// ** If the pager was opened on a transient file (zFilename==""), or
+// ** opened on a file less than N bytes in size, the output buffer is
+// ** zeroed and SQLITE_OK returned. The rationale for this is that this
+// ** function is used to read database headers, and a new transient or
+// ** zero sized database has a header than consists entirely of zeroes.
+// **
+// ** If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered,
+// ** the error code is returned to the caller and the contents of the
+// ** output buffer undefined.
+// */
func _sqlite3PagerReadFileheader(tls *crt.TLS, _pPager *XPager, _N int32, _pDest *uint8) (r0 int32) {
var _rc int32
- _rc = i32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(_pDest), i32(0), uint32(_N))
+ _rc = int32(0)
+ crt.Xmemset(tls, unsafe.Pointer(_pDest), int32(0), uint32(_N))
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil && (_pPager.X10) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50765), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerReadFileheaderØ00__func__Ø000))), unsafe.Pointer(str(19565)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil && _pPager.XtempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50765), unsafe.Pointer(&_sqlite3PagerReadFileheaderØ00__func__Ø000), unsafe.Pointer(str(19520)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XWal)(_pPager.X60) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50771), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerReadFileheaderØ00__func__Ø000))), unsafe.Pointer(str(12168)))
+ if (*XWal)(_pPager.XpWal) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50771), unsafe.Pointer(&_sqlite3PagerReadFileheaderØ00__func__Ø000), unsafe.Pointer(str(12123)))
crt.X__builtin_abort(tls)
}
}()
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil {
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil {
goto _5
}
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.X31), (unsafe.Pointer)(_pDest), _N, int64(i32(0)))
- if _rc == i32(522) {
- _rc = i32(0)
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pPager.Xfd), unsafe.Pointer(_pDest), _N, 0)
+ if _rc == int32(522) {
+ _rc = int32(0)
}
_5:
return _rc
@@ -59825,114 +59605,132 @@ _5:
var _sqlite3PagerReadFileheaderØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerReadFileheaderØ00__func__Ø000[0], str(79366), 27)
-}
-
-// Set the busy handler function.
-//
-// The pager invokes the busy-handler if sqlite3OsLock() returns
-// SQLITE_BUSY when trying to upgrade from no-lock to a SHARED lock,
-// or when trying to upgrade from a RESERVED lock to an EXCLUSIVE
-// lock. It does *not* invoke the busy handler when upgrading from
-// SHARED to RESERVED, or when upgrading from SHARED to EXCLUSIVE
-// (which occurs during hot-journal rollback). Summary:
-//
-// Transition | Invokes xBusyHandler
-// --------------------------------------------------------
-// NO_LOCK -> SHARED_LOCK | Yes
-// SHARED_LOCK -> RESERVED_LOCK | No
-// SHARED_LOCK -> EXCLUSIVE_LOCK | No
-// RESERVED_LOCK -> EXCLUSIVE_LOCK | Yes
-//
-// If the busy-handler callback returns non-zero, the lock is
-// retried. If it returns zero, then the SQLITE_BUSY error is
-// returned to the caller of the pager API function.
+ crt.Xstrncpy(nil, &_sqlite3PagerReadFileheaderØ00__func__Ø000[0], str(77528), 27)
+}
+
+// C comment
+// /*
+// ** Set the busy handler function.
+// **
+// ** The pager invokes the busy-handler if sqlite3OsLock() returns
+// ** SQLITE_BUSY when trying to upgrade from no-lock to a SHARED lock,
+// ** or when trying to upgrade from a RESERVED lock to an EXCLUSIVE
+// ** lock. It does *not* invoke the busy handler when upgrading from
+// ** SHARED to RESERVED, or when upgrading from SHARED to EXCLUSIVE
+// ** (which occurs during hot-journal rollback). Summary:
+// **
+// ** Transition | Invokes xBusyHandler
+// ** --------------------------------------------------------
+// ** NO_LOCK -> SHARED_LOCK | Yes
+// ** SHARED_LOCK -> RESERVED_LOCK | No
+// ** SHARED_LOCK -> EXCLUSIVE_LOCK | No
+// ** RESERVED_LOCK -> EXCLUSIVE_LOCK | Yes
+// **
+// ** If the busy-handler callback returns non-zero, the lock is
+// ** retried. If it returns zero, then the SQLITE_BUSY error is
+// ** returned to the caller of the pager API function.
+// */
func _sqlite3PagerSetBusyhandler(tls *crt.TLS, _pPager *XPager, _xBusyHandler func(*crt.TLS, unsafe.Pointer) int32, _pBusyHandlerArg unsafe.Pointer) {
var _1_ap *unsafe.Pointer
- *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&(_pPager.X53))) = _xBusyHandler
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X54))) = _pBusyHandlerArg
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) != nil {
- _1_ap = (*unsafe.Pointer)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&(_pPager.X53)))))
+ _pPager.XxBusyHandler = _xBusyHandler
+ _pPager.XpBusyHandlerArg = _pBusyHandlerArg
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) != nil {
+ _1_ap = (*unsafe.Pointer)(unsafe.Pointer(&_pPager.XxBusyHandler))
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer) int32
- }{(*(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct{ f unsafe.Pointer }{(*(*unsafe.Pointer)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_ap)) + 4*uintptr(i32(0)))))})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{func() func(*crt.TLS, unsafe.Pointer) int32 {
+ v := *elem24(_1_ap, 0)
+ return *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()})) != *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer) int32
}{_xBusyHandler})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50605), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetBusyhandlerØ00__func__Ø000))), unsafe.Pointer(str(79393)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50605), unsafe.Pointer(&_sqlite3PagerSetBusyhandlerØ00__func__Ø000), unsafe.Pointer(str(77555)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_ap)) + 4*uintptr(i32(1)))) != _pBusyHandlerArg {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50606), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetBusyhandlerØ00__func__Ø000))), unsafe.Pointer(str(79433)))
+ if (*elem24(_1_ap, uintptr(1))) != _pBusyHandlerArg {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50606), unsafe.Pointer(&_sqlite3PagerSetBusyhandlerØ00__func__Ø000), unsafe.Pointer(str(77595)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pPager.X31), i32(15), (unsafe.Pointer)(_1_ap))
+ _sqlite3OsFileControlHint(tls, (*Xsqlite3_file)(_pPager.Xfd), int32(15), unsafe.Pointer(_1_ap))
}
}
var _sqlite3PagerSetBusyhandlerØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerSetBusyhandlerØ00__func__Ø000[0], str(79456), 27)
+ crt.Xstrncpy(nil, &_sqlite3PagerSetBusyhandlerØ00__func__Ø000[0], str(77618), 27)
}
-// Return TRUE if the database file is opened read-only. Return FALSE
-// if the database is (in theory) writable.
+// C comment
+// /*
+// ** Return TRUE if the database file is opened read-only. Return FALSE
+// ** if the database is (in theory) writable.
+// */
func _sqlite3PagerIsreadonly(tls *crt.TLS, _pPager *XPager) (r0 uint8) {
- return _pPager.X12
-}
-
-// This function returns a pointer to a blob of memory associated with
-// a single shared-btree. The memory is used by client code for its own
-// purposes (for example, to store a high-level schema associated with
-// the shared-btree). The btree layer manages reference counting issues.
-//
-// The first time this is called on a shared-btree, nBytes bytes of memory
-// are allocated, zeroed, and returned to the caller. For each subsequent
-// call the nBytes parameter is ignored and a pointer to the same blob
-// of memory returned.
-//
-// If the nBytes parameter is 0 and the blob of memory has not yet been
-// allocated, a null pointer is returned. If the blob has already been
-// allocated, it is returned as normal.
-//
-// Just before the shared-btree is closed, the function passed as the
-// xFree argument when the memory allocation was made is invoked on the
-// blob of allocated memory. The xFree function should not call sqlite3_free()
-// on the memory, the btree layer does that.
+ return _pPager.XreadOnly
+}
+
+// C comment
+// /*
+// ** This function returns a pointer to a blob of memory associated with
+// ** a single shared-btree. The memory is used by client code for its own
+// ** purposes (for example, to store a high-level schema associated with
+// ** the shared-btree). The btree layer manages reference counting issues.
+// **
+// ** The first time this is called on a shared-btree, nBytes bytes of memory
+// ** are allocated, zeroed, and returned to the caller. For each subsequent
+// ** call the nBytes parameter is ignored and a pointer to the same blob
+// ** of memory returned.
+// **
+// ** If the nBytes parameter is 0 and the blob of memory has not yet been
+// ** allocated, a null pointer is returned. If the blob has already been
+// ** allocated, it is returned as normal.
+// **
+// ** Just before the shared-btree is closed, the function passed as the
+// ** xFree argument when the memory allocation was made is invoked on the
+// ** blob of allocated memory. The xFree function should not call sqlite3_free()
+// ** on the memory, the btree layer does that.
+// */
func _sqlite3BtreeSchema(tls *crt.TLS, _p *XBtree, _nBytes int32, _xFree func(*crt.TLS, unsafe.Pointer)) (r0 unsafe.Pointer) {
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
_sqlite3BtreeEnter(tls, _p)
- if ((_pBt.X19) == nil) && _nBytes != 0 {
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X19))) = _sqlite3DbMallocZero(tls, nil, uint64(_nBytes))
- *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_pBt.X20))) = _xFree
+ if (_pBt.XpSchema == nil) && _nBytes != 0 {
+ _pBt.XpSchema = _sqlite3DbMallocZero(tls, nil, uint64(_nBytes))
+ _pBt.XxFreeSchema = _xFree
}
_sqlite3BtreeLeave(tls, _p)
- return _pBt.X19
+ return _pBt.XpSchema
}
-// Return the file handle for the database file associated
-// with the pager. This might return NULL if the file has
-// not yet been opened.
+// C comment
+// /*
+// ** Return the file handle for the database file associated
+// ** with the pager. This might return NULL if the file has
+// ** not yet been opened.
+// */
func _sqlite3PagerFile(tls *crt.TLS, _pPager *XPager) (r0 *Xsqlite3_file) {
- return (*Xsqlite3_file)(_pPager.X31)
+ return (*Xsqlite3_file)(_pPager.Xfd)
}
-// Return the number of connections to the BtShared object accessed by
-// the Btree handle passed as the only argument. For private caches
-// this is always 1. For shared caches it may be 1 or greater.
+// C comment
+// /*
+// ** Return the number of connections to the BtShared object accessed by
+// ** the Btree handle passed as the only argument. For private caches
+// ** this is always 1. For shared caches it may be 1 or greater.
+// */
func _sqlite3BtreeConnectionCount(tls *crt.TLS, _p *XBtree) (r0 int32) {
- return (*XBtShared)(_p.X1).X23
+ return (*XBtShared)(_p.XpBt).XnRef
}
var _sqlite3VdbeExecØ00vfsFlagsØ006 int32
func init() {
- _sqlite3VdbeExecØ00vfsFlagsØ006 = i32(1054)
+ _sqlite3VdbeExecØ00vfsFlagsØ006 = int32(1054)
}
func _sqlite3BtreeCreateTable(tls *crt.TLS, _p *XBtree, _piTable *int32, _flags int32) (r0 int32) {
@@ -59943,106 +59741,109 @@ func _sqlite3BtreeCreateTable(tls *crt.TLS, _p *XBtree, _piTable *int32, _flags
return _rc
}
-// Create a new BTree table. Write into *piTable the page
-// number for the root page of the new table.
-//
-// The type of type is determined by the flags parameter. Only the
-// following values of flags are currently in use. Other values for
-// flags might not work:
-//
-// BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys
-// BTREE_ZERODATA Used for SQL indices
+// C comment
+// /*
+// ** Create a new BTree table. Write into *piTable the page
+// ** number for the root page of the new table.
+// **
+// ** The type of type is determined by the flags parameter. Only the
+// ** following values of flags are currently in use. Other values for
+// ** flags might not work:
+// **
+// ** BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys
+// ** BTREE_ZERODATA Used for SQL indices
+// */
func _btreeCreateTable(tls *crt.TLS, _p *XBtree, _piTable *int32, _createTabFlags int32) (r0 int32) {
var _rc, _ptfFlags int32
var _pgnoRoot, _1_pgnoMove, _4_iPtrPage uint32
var _4_eType uint8
var _pBt *XBtShared
var _pRoot, _1_pPageMove *XMemPage
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
if _sqlite3BtreeHoldsMutex(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67483), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(17487)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67483), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(17442)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pBt.X8) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67484), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(56928)))
+ if int32(_pBt.XinTransaction) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67484), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(56904)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pBt.X10) & i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67485), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(77853)))
+ if (int32(_pBt.XbtsFlags) & int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67485), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(76015)))
crt.X__builtin_abort(tls)
}
}()
- if (_pBt.X5) == 0 {
+ if _pBt.XautoVacuum == 0 {
goto _6
}
_invalidateAllOverflowCache(tls, _pBt)
- _sqlite3BtreeGetMeta(tls, _p, i32(4), &_pgnoRoot)
+ _sqlite3BtreeGetMeta(tls, _p, int32(4), &_pgnoRoot)
_pgnoRoot += 1
_7:
- if (_pgnoRoot == _ptrmapPageno(tls, _pBt, _pgnoRoot)) || (_pgnoRoot == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1)))) {
+ if (_pgnoRoot == _ptrmapPageno(tls, _pBt, _pgnoRoot)) || (_pgnoRoot == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1))) {
_pgnoRoot += 1
goto _7
}
func() {
- if _pgnoRoot < uint32(i32(3)) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67518), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(79483)))
+ if _pgnoRoot < uint32(3) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67518), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(77645)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _allocateBtreePage(tls, _pBt, &_1_pPageMove, &_1_pgnoMove, _pgnoRoot, uint8(i32(1)))
- if _rc != i32(0) {
+ _rc = _allocateBtreePage(tls, _pBt, &_1_pPageMove, &_1_pgnoMove, _pgnoRoot, uint8(1))
+ if _rc != int32(0) {
return _rc
}
if _1_pgnoMove == _pgnoRoot {
goto _14
}
- _4_eType = u8(0)
- _4_iPtrPage = u32(0)
- _rc = _saveAllCursors(tls, _pBt, uint32(i32(0)), nil)
+ _4_eType = uint8(0)
+ _4_iPtrPage = uint32(0)
+ _rc = _saveAllCursors(tls, _pBt, 0, nil)
_releasePage(tls, _1_pPageMove)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- _rc = _btreeGetPage(tls, _pBt, _pgnoRoot, &_pRoot, i32(0))
- if _rc != i32(0) {
+ _rc = _btreeGetPage(tls, _pBt, _pgnoRoot, &_pRoot, int32(0))
+ if _rc != int32(0) {
return _rc
}
_rc = _ptrmapGet(tls, _pBt, _pgnoRoot, &_4_eType, &_4_iPtrPage)
- if (int32(_4_eType) == i32(1)) || (int32(_4_eType) == i32(2)) {
- _rc = _sqlite3CorruptError(tls, i32(67556))
+ if (int32(_4_eType) == int32(1)) || (int32(_4_eType) == int32(2)) {
+ _rc = _sqlite3CorruptError(tls, int32(67556))
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
_releasePage(tls, _pRoot)
return _rc
}
func() {
- if int32(_4_eType) == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67562), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(79509)))
+ if int32(_4_eType) == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67562), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(77671)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_4_eType) == i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67563), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(79532)))
+ if int32(_4_eType) == int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67563), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(77694)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _relocatePage(tls, _pBt, _pRoot, _4_eType, _4_iPtrPage, _1_pgnoMove, i32(0))
+ _rc = _relocatePage(tls, _pBt, _pRoot, _4_eType, _4_iPtrPage, _1_pgnoMove, int32(0))
_releasePage(tls, _pRoot)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- _rc = _btreeGetPage(tls, _pBt, _pgnoRoot, &_pRoot, i32(0))
- if _rc != i32(0) {
+ _rc = _btreeGetPage(tls, _pBt, _pgnoRoot, &_pRoot, int32(0))
+ if _rc != int32(0) {
return _rc
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pRoot.X23))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pRoot.XpDbPage))
+ if _rc != int32(0) {
_releasePage(tls, _pRoot)
return _rc
}
@@ -60050,85 +59851,88 @@ _7:
_14:
_pRoot = _1_pPageMove
_27:
- _ptrmapPut(tls, _pBt, _pgnoRoot, uint8(i32(1)), uint32(i32(0)), &_rc)
+ _ptrmapPut(tls, _pBt, _pgnoRoot, uint8(1), 0, &_rc)
if _rc != 0 {
_releasePage(tls, _pRoot)
return _rc
}
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)((*XMemPage)(_pBt.X3).X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67595), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(79555)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)((*XMemPage)(_pBt.XpPage1).XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67595), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(77717)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeUpdateMeta(tls, _p, i32(4), _pgnoRoot)
+ _rc = _sqlite3BtreeUpdateMeta(tls, _p, int32(4), _pgnoRoot)
if func() int32 {
if _rc != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67597), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67597), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
_releasePage(tls, _pRoot)
return _rc
}
goto _34
_6:
- _rc = _allocateBtreePage(tls, _pBt, &_pRoot, &_pgnoRoot, uint32(i32(1)), uint8(i32(0)))
+ _rc = _allocateBtreePage(tls, _pBt, &_pRoot, &_pgnoRoot, uint32(1), 0)
if _rc != 0 {
return _rc
}
_34:
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pRoot.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67607), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(79601)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pRoot.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67607), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(77763)))
crt.X__builtin_abort(tls)
}
}()
- if (_createTabFlags & i32(1)) != 0 {
- _ptfFlags = i32(13)
+ if (_createTabFlags & int32(1)) != 0 {
+ _ptfFlags = int32(13)
goto _39
}
- _ptfFlags = i32(10)
+ _ptfFlags = int32(10)
_39:
_zeroPage(tls, _pRoot, _ptfFlags)
- _sqlite3PagerUnref(tls, (*XPgHdr)(_pRoot.X23))
+ _sqlite3PagerUnref(tls, (*XPgHdr)(_pRoot.XpDbPage))
func() {
- if (int32(_pBt.X4)&i32(4)) != i32(0) && _pgnoRoot != uint32(i32(2)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67615), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000))), unsafe.Pointer(str(79641)))
+ if (int32(_pBt.XopenFlags)&int32(4)) != int32(0) && _pgnoRoot != uint32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67615), unsafe.Pointer(&_btreeCreateTableØ00__func__Ø000), unsafe.Pointer(str(77803)))
crt.X__builtin_abort(tls)
}
}()
*_piTable = int32(_pgnoRoot)
- return i32(0)
+ return int32(0)
}
var _btreeCreateTableØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_btreeCreateTableØ00__func__Ø000[0], str(79691), 17)
-}
-
-// Initialize the temporary index cursor just opened as a sorter cursor.
-//
-// Usually, the sorter module uses the value of (pCsr->pKeyInfo->nField)
-// to determine the number of fields that should be compared from the
-// records being sorted. However, if the value passed as argument nField
-// is non-zero and the sorter is able to guarantee a stable sort, nField
-// is used instead. This is used when sorting records for a CREATE INDEX
-// statement. In this case, keys are always delivered to the sorter in
-// order of the primary key, which happens to be make up the final part
-// of the records being sorted. So if the sort is stable, there is never
-// any reason to compare PK fields and they can be ignored for a small
-// performance boost.
-//
-// The sorter can guarantee a stable sort when running in single-threaded
-// mode, but not in multi-threaded mode.
-//
-// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+ crt.Xstrncpy(nil, &_btreeCreateTableØ00__func__Ø000[0], str(77853), 17)
+}
+
+// C comment
+// /*
+// ** Initialize the temporary index cursor just opened as a sorter cursor.
+// **
+// ** Usually, the sorter module uses the value of (pCsr->pKeyInfo->nField)
+// ** to determine the number of fields that should be compared from the
+// ** records being sorted. However, if the value passed as argument nField
+// ** is non-zero and the sorter is able to guarantee a stable sort, nField
+// ** is used instead. This is used when sorting records for a CREATE INDEX
+// ** statement. In this case, keys are always delivered to the sorter in
+// ** order of the primary key, which happens to be make up the final part
+// ** of the records being sorted. So if the sort is stable, there is never
+// ** any reason to compare PK fields and they can be ignored for a small
+// ** performance boost.
+// **
+// ** The sorter can guarantee a stable sort when running in single-threaded
+// ** mode, but not in multi-threaded mode.
+// **
+// ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+// */
func _sqlite3VdbeSorterInit(tls *crt.TLS, _db *Xsqlite3, _nField int32, _pCsr *XVdbeCursor) (r0 int32) {
var _pgsz, _i, _szKeyInfo, _sz, _rc, _nWorker int32
var _7_mxCache int64
@@ -60136,101 +59940,100 @@ func _sqlite3VdbeSorterInit(tls *crt.TLS, _db *Xsqlite3, _nField int32, _pCsr *X
var _pKeyInfo *XKeyInfo
var _pSorter *XVdbeSorter
var _6_pTask *XSortSubtask
- _rc = i32(0)
- if _sqlite3TempInMemory(tls, _db) != 0 || ((_sqlite3Config.X1) == i32(0)) {
- _nWorker = i32(0)
+ _rc = int32(0)
+ if _sqlite3TempInMemory(tls, _db) != 0 || (_sqlite3Config.XbCoreMutex == int32(0)) {
+ _nWorker = int32(0)
goto _2
}
- _nWorker = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(11))))
+ _nWorker = *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(11))
_2:
func() {
- if (*XKeyInfo)(_pCsr.X15) == nil || (*XBtree)(_pCsr.X8) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86975), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterInitØ00__func__Ø000))), unsafe.Pointer(str(79708)))
+ if _pCsr.XpKeyInfo == nil || (*XBtree)(_pCsr.XpBtx) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86975), unsafe.Pointer(&_sqlite3VdbeSorterInitØ00__func__Ø000), unsafe.Pointer(str(77870)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCsr.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86976), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterInitØ00__func__Ø000))), unsafe.Pointer(str(57861)))
+ if int32(_pCsr.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86976), unsafe.Pointer(&_sqlite3VdbeSorterInitØ00__func__Ø000), unsafe.Pointer(str(57837)))
crt.X__builtin_abort(tls)
}
}()
- _szKeyInfo = int32(u32(24) + (uint32(int32((*XKeyInfo)(_pCsr.X15).X2)-i32(1)) * u32(4)))
- _sz = int32(u32(124) + (uint32(_nWorker) * u32(60)))
+ _szKeyInfo = int32(uint32(24) + (uint32(int32((*XKeyInfo)(_pCsr.XpKeyInfo).XnField)-int32(1)) * uint32(4)))
+ _sz = int32(uint32(124) + (uint32(_nWorker) * uint32(60)))
_pSorter = (*XVdbeSorter)(_sqlite3DbMallocZero(tls, _db, uint64(_sz+_szKeyInfo)))
- *(**XVdbeSorter)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCsr.X14))))))) = _pSorter
+ *(**XVdbeSorter)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pCsr.Xuc)))) = _pSorter
if _pSorter == nil {
- _rc = _sqlite3NomemError(tls, i32(86983))
+ _rc = _sqlite3NomemError(tls, int32(86983))
goto _9
}
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSorter.X7))))) = store50(&_pKeyInfo, (*XKeyInfo)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(_pSorter))))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_sz))))))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pKeyInfo), _pCsr.X15, uint32(_szKeyInfo))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pKeyInfo.X4))))) = nil
- if _nField != 0 && (_nWorker == i32(0)) {
+ *(**XKeyInfo)(unsafe.Pointer(&_pSorter.XpKeyInfo)) = store65(&_pKeyInfo, (*XKeyInfo)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pSorter))+uintptr(_sz))))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pKeyInfo), _pCsr.XpKeyInfo, uint32(_szKeyInfo))
+ *(**Xsqlite3)(unsafe.Pointer(&_pKeyInfo.Xdb)) = nil
+ if _nField != 0 && (_nWorker == int32(0)) {
{
- p := (*uint16)(unsafe.Pointer(&(_pKeyInfo.X3)))
- *p = uint16(int32(*p) + (int32(_pKeyInfo.X2) - _nField))
- sink14(*p)
- }
- *(*uint16)(unsafe.Pointer(&(_pKeyInfo.X2))) = uint16(_nField)
- }
- *(*int32)(unsafe.Pointer(&(_pSorter.X3))) = store1(&_pgsz, _sqlite3BtreeGetPageSize(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X1)))
- *(*uint8)(unsafe.Pointer(&(_pSorter.X15))) = uint8(_nWorker + i32(1))
- *(*uint8)(unsafe.Pointer(&(_pSorter.X14))) = uint8(_nWorker - i32(1))
- *(*uint8)(unsafe.Pointer(&(_pSorter.X13))) = uint8(bool2int(int32(_pSorter.X15) > i32(1)))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSorter.X6))))) = _db
- _i = i32(0)
+ p := &_pKeyInfo.XnXField
+ *p = uint16(int32(*p) + (int32(_pKeyInfo.XnField) - _nField))
+ }
+ _pKeyInfo.XnField = uint16(_nField)
+ }
+ _pSorter.Xpgsz = store2(&_pgsz, _sqlite3BtreeGetPageSize(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), 0).XpBt)))
+ _pSorter.XnTask = uint8(_nWorker + int32(1))
+ _pSorter.XiPrev = uint8(_nWorker - int32(1))
+ _pSorter.XbUseThreads = uint8(bool2int(int32(_pSorter.XnTask) > int32(1)))
+ *(**Xsqlite3)(unsafe.Pointer(&_pSorter.Xdb)) = _db
+ _i = int32(0)
_12:
- if _i >= int32(_pSorter.X15) {
+ if _i >= int32(_pSorter.XnTask) {
goto _15
}
- _6_pTask = (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17))))) + 60*uintptr(_i)))
- *(**XVdbeSorter)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_6_pTask.X2))))) = _pSorter
+ _6_pTask = elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), uintptr(_i))
+ *(**XVdbeSorter)(unsafe.Pointer(&_6_pTask.XpSorter)) = _pSorter
_i += 1
goto _12
_15:
if _sqlite3TempInMemory(tls, _db) != 0 {
goto _16
}
- _7_szPma = _sqlite3Config.X27
- *(*int32)(unsafe.Pointer(&(_pSorter.X0))) = int32(_7_szPma * uint32(_pgsz))
- _7_mxCache = int64((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X4).X10)
- if _7_mxCache < int64(i32(0)) {
- _7_mxCache = _7_mxCache * int64(i32(-1024))
+ _7_szPma = _sqlite3Config.XszPma
+ _pSorter.XmnPmaSize = int32(_7_szPma * uint32(_pgsz))
+ _7_mxCache = int64((*XSchema)(elem27((*XDb)(_db.XaDb), 0).XpSchema).Xcache_size)
+ if _7_mxCache < (0) {
+ _7_mxCache = _7_mxCache * int64(-1024)
goto _18
}
_7_mxCache = _7_mxCache * int64(_pgsz)
_18:
_7_mxCache = func() int64 {
- if _7_mxCache < int64(i32(536870912)) {
+ if _7_mxCache < int64(536870912) {
return _7_mxCache
}
- return int64(i32(536870912))
+ return int64(536870912)
}()
- *(*int32)(unsafe.Pointer(&(_pSorter.X1))) = func() int32 {
- if (_pSorter.X0) > int32(_7_mxCache) {
- return (_pSorter.X0)
+ _pSorter.XmxPmaSize = func() int32 {
+ if _pSorter.XmnPmaSize > int32(_7_mxCache) {
+ return _pSorter.XmnPmaSize
}
return int32(_7_mxCache)
}()
- if _sqlite3Config.X19 != nil {
+ if _sqlite3Config.XpScratch != nil {
goto _23
}
func() {
- if (_pSorter.X10) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87023), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterInitØ00__func__Ø000))), unsafe.Pointer(str(79740)))
+ if _pSorter.XiMemory != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87023), unsafe.Pointer(&_sqlite3VdbeSorterInitØ00__func__Ø000), unsafe.Pointer(str(77902)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pSorter.X11))) = _pgsz
- *(**uint8)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1))) = (*uint8)(_sqlite3Malloc(tls, uint64(_pgsz)))
- if ((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1) == nil {
- _rc = _sqlite3NomemError(tls, i32(87026))
+ _pSorter.XnMemory = _pgsz
+ _pSorter.Xlist.XaMemory = (*uint8)(_sqlite3Malloc(tls, uint64(_pgsz)))
+ if (_pSorter.Xlist.XaMemory) == nil {
+ _rc = _sqlite3NomemError(tls, int32(87026))
}
_23:
_16:
- if ((int32(_pKeyInfo.X2) + int32(_pKeyInfo.X3)) < i32(13)) && (((*(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_pKeyInfo.X6))))) + 4*uintptr(i32(0))))) == nil) || ((*(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_pKeyInfo.X6))))) + 4*uintptr(i32(0))))) == (*XCollSeq)(_db.X2))) {
- *(*uint8)(unsafe.Pointer(&(_pSorter.X16))) = uint8(i32(3))
+ if ((int32(_pKeyInfo.XnField) + int32(_pKeyInfo.XnXField)) < int32(13)) && (((*elem62((**XCollSeq)(unsafe.Pointer(&_pKeyInfo.XaColl)), 0)) == nil) || ((*elem62((**XCollSeq)(unsafe.Pointer(&_pKeyInfo.XaColl)), 0)) == (*XCollSeq)(_db.XpDfltColl))) {
+ _pSorter.XtypeMask = uint8(3)
}
_9:
return _rc
@@ -60239,163 +60042,168 @@ _9:
var _sqlite3VdbeSorterInitØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSorterInitØ00__func__Ø000[0], str(79760), 22)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSorterInitØ00__func__Ø000[0], str(77922), 22)
}
-// Return true if the cursor has a hint specified. This routine is
-// only used from within assert() statements
+// C comment
+// /*
+// ** Return true if the cursor has a hint specified. This routine is
+// ** only used from within assert() statements
+// */
func _sqlite3BtreeCursorHasHint(tls *crt.TLS, _pCsr *XBtCursor, _mask uint32) (r0 int32) {
- return bool2int((uint32(_pCsr.X13) & _mask) != uint32(i32(0)))
+ return bool2int((uint32(_pCsr.Xhints) & _mask) != (0))
}
func _sqlite3BtreePrevious(tls *crt.TLS, _pCur *XBtCursor, _pRes *int32) (r0 int32) {
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64636), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePreviousØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64636), unsafe.Pointer(&_sqlite3BtreePreviousØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pRes == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64637), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePreviousØ00__func__Ø000))), unsafe.Pointer(str(74748)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64637), unsafe.Pointer(&_sqlite3BtreePreviousØ00__func__Ø000), unsafe.Pointer(str(72910)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*_pRes) != i32(0) && (*_pRes) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64638), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePreviousØ00__func__Ø000))), unsafe.Pointer(str(74756)))
+ if (*_pRes) != int32(0) && (*_pRes) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64638), unsafe.Pointer(&_sqlite3BtreePreviousØ00__func__Ø000), unsafe.Pointer(str(72918)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCur.X9) != i32(0) && int32(_pCur.X12) == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64639), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePreviousØ00__func__Ø000))), unsafe.Pointer(str(74777)))
+ if _pCur.XskipNext != int32(0) && int32(_pCur.XeState) == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64639), unsafe.Pointer(&_sqlite3BtreePreviousØ00__func__Ø000), unsafe.Pointer(str(72939)))
crt.X__builtin_abort(tls)
}
}()
- *_pRes = i32(0)
+ *_pRes = int32(0)
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-15))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-15))
}
- *(*uint16)(unsafe.Pointer(&((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4))) = uint16(i32(0))
- if ((int32(_pCur.X12) != i32(1)) || (int32(_pCur.X16) == i32(0))) || (int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X5) == i32(0)) {
+ _pCur.Xinfo.XnSize = 0
+ if ((int32(_pCur.XeState) != int32(1)) || (int32(_pCur.Xix) == int32(0))) || (int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).Xleaf) == int32(0)) {
return _btreePrevious(tls, _pCur, _pRes)
}
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) -= 1
- return i32(0)
+ _pCur.Xix -= 1
+ return int32(0)
}
var _sqlite3BtreePreviousØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreePreviousØ00__func__Ø000[0], str(79782), 21)
-}
-
-// Step the cursor to the back to the previous entry in the database. If
-// successful then set *pRes=0. If the cursor
-// was already pointing to the first entry in the database before
-// this routine was called, then set *pRes=1.
-//
-// The main entry point is sqlite3BtreePrevious(). That routine is optimized
-// for the common case of merely decrementing the cell counter BtCursor.aiIdx
-// to the previous cell on the current page. The (slower) btreePrevious()
-// helper routine is called when it is necessary to move to a different page
-// or to restore the cursor.
-//
-// The calling function will set *pRes to 0 or 1. The initial *pRes value
-// will be 1 if the cursor being stepped corresponds to an SQL index and
-// if this routine could have been skipped if that SQL index had been
-// a unique index. Otherwise the caller will have set *pRes to zero.
-// Zero is the common case. The btree implementation is free to use the
-// initial *pRes value as a hint to improve performance, but the current
-// SQLite btree implementation does not. (Note that the comdb2 btree
-// implementation does use this hint, however.)
+ crt.Xstrncpy(nil, &_sqlite3BtreePreviousØ00__func__Ø000[0], str(77944), 21)
+}
+
+// C comment
+// /*
+// ** Step the cursor to the back to the previous entry in the database. If
+// ** successful then set *pRes=0. If the cursor
+// ** was already pointing to the first entry in the database before
+// ** this routine was called, then set *pRes=1.
+// **
+// ** The main entry point is sqlite3BtreePrevious(). That routine is optimized
+// ** for the common case of merely decrementing the cell counter BtCursor.aiIdx
+// ** to the previous cell on the current page. The (slower) btreePrevious()
+// ** helper routine is called when it is necessary to move to a different page
+// ** or to restore the cursor.
+// **
+// ** The calling function will set *pRes to 0 or 1. The initial *pRes value
+// ** will be 1 if the cursor being stepped corresponds to an SQL index and
+// ** if this routine could have been skipped if that SQL index had been
+// ** a unique index. Otherwise the caller will have set *pRes to zero.
+// ** Zero is the common case. The btree implementation is free to use the
+// ** initial *pRes value as a hint to improve performance, but the current
+// ** SQLite btree implementation does not. (Note that the comdb2 btree
+// ** implementation does use this hint, however.)
+// */
func _btreePrevious(tls *crt.TLS, _pCur *XBtCursor, _pRes *int32) (r0 int32) {
var _rc, _6_idx int32
var _pPage *XMemPage
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64580), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64580), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pRes == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64581), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(74748)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64581), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(72910)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*_pRes) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64582), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(74842)))
+ if (*_pRes) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64582), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(73004)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pCur.X9) != i32(0) && int32(_pCur.X12) == i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64583), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(74777)))
+ if _pCur.XskipNext != int32(0) && int32(_pCur.XeState) == int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64583), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(72939)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pCur.X10) & i32(14)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64584), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(79803)))
+ if (int32(_pCur.XcurFlags) & int32(14)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64584), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(77965)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64585), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(79869)))
+ if int32(_pCur.Xinfo.XnSize) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64585), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(78031)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pCur.X12) == i32(1) {
+ if int32(_pCur.XeState) == int32(1) {
goto _13
}
_rc = func() int32 {
- if int32(_pCur.X12) >= i32(3) {
+ if int32(_pCur.XeState) >= int32(3) {
return _btreeRestoreCursorPosition(tls, _pCur)
}
- return i32(0)
+ return int32(0)
}()
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- if i32(0) == int32(_pCur.X12) {
- *_pRes = i32(1)
- return i32(0)
+ if int32(0) == int32(_pCur.XeState) {
+ *_pRes = int32(1)
+ return int32(0)
}
- if (_pCur.X9) == 0 {
+ if _pCur.XskipNext == 0 {
goto _18
}
func() {
- if int32(_pCur.X12) != i32(1) && int32(_pCur.X12) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64596), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(74851)))
+ if int32(_pCur.XeState) != int32(1) && int32(_pCur.XeState) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64596), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(73013)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(1))
- if (_pCur.X9) < i32(0) {
- *(*int32)(unsafe.Pointer(&(_pCur.X9))) = i32(0)
- return i32(0)
+ _pCur.XeState = uint8(1)
+ if _pCur.XskipNext < int32(0) {
+ _pCur.XskipNext = int32(0)
+ return int32(0)
}
- *(*int32)(unsafe.Pointer(&(_pCur.X9))) = i32(0)
+ _pCur.XskipNext = int32(0)
_18:
_13:
- _pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
+ _pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
func() {
- if (_pPage.X0) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64607), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(74631)))
+ if _pPage.XisInit == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64607), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(72793)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPage.X5) != 0 {
+ if _pPage.Xleaf != 0 {
goto _25
}
- _6_idx = int32(_pCur.X16)
- _rc = _moveToChild(tls, _pCur, _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_6_idx))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_6_idx))))) + 1*uintptr(i32(1)))))))))))))))
+ _6_idx = int32(_pCur.Xix)
+ _rc = _moveToChild(tls, _pCur, _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData))+uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_6_idx)), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_6_idx)), uintptr(1)))))))))
if _rc != 0 {
return _rc
}
@@ -60403,36 +60211,36 @@ _13:
goto _27
_25:
_28:
- if int32(_pCur.X16) != i32(0) {
+ if int32(_pCur.Xix) != int32(0) {
goto _29
}
- if int32(_pCur.X14) == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(0))
- *_pRes = i32(1)
- return i32(0)
+ if int32(_pCur.XiPage) == int32(0) {
+ _pCur.XeState = 0
+ *_pRes = int32(1)
+ return int32(0)
}
_moveToParent(tls, _pCur)
goto _28
_29:
func() {
- if int32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64622), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(79869)))
+ if int32(_pCur.Xinfo.XnSize) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64622), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(78031)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pCur.X10) & i32(4)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64623), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePreviousØ00__func__Ø000))), unsafe.Pointer(str(79889)))
+ if (int32(_pCur.XcurFlags) & int32(4)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64623), unsafe.Pointer(&_btreePreviousØ00__func__Ø000), unsafe.Pointer(str(78051)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) -= 1
- _pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
- if ((_pPage.X2) != 0) && ((_pPage.X5) == 0) {
+ _pCur.Xix -= 1
+ _pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
+ if (_pPage.XintKey != 0) && (_pPage.Xleaf == 0) {
_rc = _sqlite3BtreePrevious(tls, _pCur, _pRes)
goto _37
}
- _rc = i32(0)
+ _rc = int32(0)
_37:
_27:
return _rc
@@ -60441,106 +60249,114 @@ _27:
var _btreePreviousØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_btreePreviousØ00__func__Ø000[0], str(79928), 14)
+ crt.Xstrncpy(nil, &_btreePreviousØ00__func__Ø000[0], str(78090), 14)
}
-// Move the cursor down to the right-most leaf entry beneath the
-// page to which it is currently pointing. Notice the difference
-// between moveToLeftmost() and moveToRightmost(). moveToLeftmost()
-// finds the left-most entry beneath the *entry* whereas moveToRightmost()
-// finds the right-most entry beneath the *page*.
-//
-// The right-most entry is the one with the largest key - the last
-// key in ascending order.
+// C comment
+// /*
+// ** Move the cursor down to the right-most leaf entry beneath the
+// ** page to which it is currently pointing. Notice the difference
+// ** between moveToLeftmost() and moveToRightmost(). moveToLeftmost()
+// ** finds the left-most entry beneath the *entry* whereas moveToRightmost()
+// ** finds the right-most entry beneath the *page*.
+// **
+// ** The right-most entry is the one with the largest key - the last
+// ** key in ascending order.
+// */
func _moveToRightmost(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
var _rc int32
var _pgno uint32
var _pPage *XMemPage
- _rc = i32(0)
+ _rc = int32(0)
_pPage = nil
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64058), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRightmostØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64058), unsafe.Pointer(&_moveToRightmostØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64059), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRightmostØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64059), unsafe.Pointer(&_moveToRightmostØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
_4:
- if (store52(&_pPage, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X5) != 0 {
+ if (store84(&_pPage, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).Xleaf) != 0 {
goto _5
}
- _pgno = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(int32(_pPage.X6)+i32(8)))))
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = _pPage.X14
+ _pgno = _sqlite3Get4byte(tls, elem15(_pPage.XaData, uintptr(int32(_pPage.XhdrOffset)+int32(8))))
+ _pCur.Xix = _pPage.XnCell
_rc = _moveToChild(tls, _pCur, _pgno)
if _rc != 0 {
return _rc
}
goto _4
_5:
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(int32(_pPage.X14) - i32(1))
+ _pCur.Xix = uint16(int32(_pPage.XnCell) - int32(1))
func() {
- if int32((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64067), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRightmostØ00__func__Ø000))), unsafe.Pointer(str(79869)))
+ if int32(_pCur.Xinfo.XnSize) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64067), unsafe.Pointer(&_moveToRightmostØ00__func__Ø000), unsafe.Pointer(str(78031)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pCur.X10) & i32(2)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64068), unsafe.Pointer((*int8)(unsafe.Pointer(&_moveToRightmostØ00__func__Ø000))), unsafe.Pointer(str(79942)))
+ if (int32(_pCur.XcurFlags) & int32(2)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64068), unsafe.Pointer(&_moveToRightmostØ00__func__Ø000), unsafe.Pointer(str(78104)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
}
var _moveToRightmostØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_moveToRightmostØ00__func__Ø000[0], str(79979), 16)
+ crt.Xstrncpy(nil, &_moveToRightmostØ00__func__Ø000[0], str(78141), 16)
}
-// Return TRUE if the cursor is not pointing at an entry of the table.
-//
-// TRUE will be returned after a call to sqlite3BtreeNext() moves
-// past the last entry in the table or sqlite3BtreePrev() moves past
-// the first entry. TRUE is also returned if the table is empty.
+// C comment
+// /*
+// ** Return TRUE if the cursor is not pointing at an entry of the table.
+// **
+// ** TRUE will be returned after a call to sqlite3BtreeNext() moves
+// ** past the last entry in the table or sqlite3BtreePrev() moves past
+// ** the first entry. TRUE is also returned if the table is empty.
+// */
func _sqlite3BtreeEof(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
- return bool2int(i32(1) != int32(_pCur.X12))
+ return bool2int(int32(1) != int32(_pCur.XeState))
}
-// Move the cursor to the last entry in the table. Return SQLITE_OK
-// on success. Set *pRes to 0 if the cursor actually points to something
-// or set *pRes to 1 if the table is empty.
+// C comment
+// /* Move the cursor to the last entry in the table. Return SQLITE_OK
+// ** on success. Set *pRes to 0 if the cursor actually points to something
+// ** or set *pRes to 1 if the table is empty.
+// */
func _sqlite3BtreeLast(tls *crt.TLS, _pCur *XBtCursor, _pRes *int32) (r0 int32) {
var _rc, _1_ii int32
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64102), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64102), unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.X0).X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64103), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000))), unsafe.Pointer(str(73849)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.XpBtree).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64103), unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000), unsafe.Pointer(str(72011)))
crt.X__builtin_abort(tls)
}
}()
- if i32(1) != int32(_pCur.X12) || (int32(_pCur.X10)&i32(8)) == i32(0) {
+ if int32(1) != int32(_pCur.XeState) || (int32(_pCur.XcurFlags)&int32(8)) == int32(0) {
goto _5
}
- _1_ii = i32(0)
+ _1_ii = int32(0)
_6:
- if _1_ii >= int32(_pCur.X14) {
+ if _1_ii >= int32(_pCur.XiPage) {
goto _9
}
func() {
- if int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[19]uint16)(unsafe.Pointer(&(_pCur.X17))))) + 2*uintptr(_1_ii)))) != int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_1_ii)))).X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64112), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000))), unsafe.Pointer(str(79995)))
+ if int32(*elem20((*uint16)(unsafe.Pointer(&_pCur.XaiIdx)), uintptr(_1_ii))) != int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_1_ii))).XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64112), unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000), unsafe.Pointer(str(78157)))
crt.X__builtin_abort(tls)
}
}()
@@ -60548,54 +60364,52 @@ _6:
goto _6
_9:
func() {
- if int32(_pCur.X16) != (int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) - i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64114), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000))), unsafe.Pointer(str(80036)))
+ if int32(_pCur.Xix) != (int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) - int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64114), unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000), unsafe.Pointer(str(78198)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X5) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64115), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000))), unsafe.Pointer(str(80081)))
+ if ((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).Xleaf) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64115), unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000), unsafe.Pointer(str(78243)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
_5:
_rc = _moveToRoot(tls, _pCur)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _16
}
- if i32(0) == int32(_pCur.X12) {
+ if int32(0) == int32(_pCur.XeState) {
func() {
- if (_pCur.X7) != uint32(i32(0)) && int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64123), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000))), unsafe.Pointer(str(74242)))
+ if _pCur.XpgnoRoot != (0) && int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64123), unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000), unsafe.Pointer(str(72404)))
crt.X__builtin_abort(tls)
}
}()
- *_pRes = i32(1)
+ *_pRes = int32(1)
goto _21
}
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64126), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64126), unsafe.Pointer(&_sqlite3BtreeLastØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
- *_pRes = i32(0)
+ *_pRes = int32(0)
_rc = _moveToRightmost(tls, _pCur)
- if _rc == i32(0) {
+ if _rc == int32(0) {
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) | i32(8))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) | int32(8))
}
goto _25
}
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-9))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-9))
}
_25:
_21:
@@ -60606,37 +60420,40 @@ _16:
var _sqlite3BtreeLastØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeLastØ00__func__Ø000[0], str(80113), 17)
-}
-
-// Insert a new record into the BTree. The content of the new record
-// is described by the pX object. The pCur cursor is used only to
-// define what table the record should be inserted into, and is left
-// pointing at a random location.
-//
-// For a table btree (used for rowid tables), only the pX.nKey value of
-// the key is used. The pX.pKey value must be NULL. The pX.nKey is the
-// rowid or INTEGER PRIMARY KEY of the row. The pX.nData,pData,nZero fields
-// hold the content of the row.
-//
-// For an index btree (used for indexes and WITHOUT ROWID tables), the
-// key is an arbitrary byte sequence stored in pX.pKey,nKey. The
-// pX.pData,nData,nZero fields must be zero.
-//
-// If the seekResult parameter is non-zero, then a successful call to
-// MovetoUnpacked() to seek cursor pCur to (pKey,nKey) has already
-// been performed. In other words, if seekResult!=0 then the cursor
-// is currently pointing to a cell that will be adjacent to the cell
-// to be inserted. If seekResult<0 then pCur points to a cell that is
-// smaller then (pKey,nKey). If seekResult>0 then pCur points to a cell
-// that is larger than (pKey,nKey).
-//
-// If seekResult==0, that means pCur is pointing at some unknown location.
-// In that case, this routine must seek the cursor to the correct insertion
-// point for (pKey,nKey) before doing the insertion. For index btrees,
-// if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked
-// key values and pX->aMem can be used instead of pX->pKey to avoid having
-// to decode the key.
+ crt.Xstrncpy(nil, &_sqlite3BtreeLastØ00__func__Ø000[0], str(78275), 17)
+}
+
+// C comment
+// /*
+// ** Insert a new record into the BTree. The content of the new record
+// ** is described by the pX object. The pCur cursor is used only to
+// ** define what table the record should be inserted into, and is left
+// ** pointing at a random location.
+// **
+// ** For a table btree (used for rowid tables), only the pX.nKey value of
+// ** the key is used. The pX.pKey value must be NULL. The pX.nKey is the
+// ** rowid or INTEGER PRIMARY KEY of the row. The pX.nData,pData,nZero fields
+// ** hold the content of the row.
+// **
+// ** For an index btree (used for indexes and WITHOUT ROWID tables), the
+// ** key is an arbitrary byte sequence stored in pX.pKey,nKey. The
+// ** pX.pData,nData,nZero fields must be zero.
+// **
+// ** If the seekResult parameter is non-zero, then a successful call to
+// ** MovetoUnpacked() to seek cursor pCur to (pKey,nKey) has already
+// ** been performed. In other words, if seekResult!=0 then the cursor
+// ** is currently pointing to a cell that will be adjacent to the cell
+// ** to be inserted. If seekResult<0 then pCur points to a cell that is
+// ** smaller then (pKey,nKey). If seekResult>0 then pCur points to a cell
+// ** that is larger than (pKey,nKey).
+// **
+// ** If seekResult==0, that means pCur is pointing at some unknown location.
+// ** In that case, this routine must seek the cursor to the correct insertion
+// ** point for (pKey,nKey) before doing the insertion. For index btrees,
+// ** if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked
+// ** key values and pX->aMem can be used instead of pX->pKey to avoid having
+// ** to decode the key.
+// */
func _sqlite3BtreeInsert(tls *crt.TLS, _pCur *XBtCursor, _pX *XBtreePayload, _flags int32, _seekResult int32) (r0 int32) {
var _rc, _loc, _szNew, _idx int32
var _oldCell, _newCell *uint8
@@ -60646,137 +60463,137 @@ func _sqlite3BtreeInsert(tls *crt.TLS, _pCur *XBtCursor, _pX *XBtreePayload, _fl
var _pPage *XMemPage
var _7_r XUnpackedRecord
_loc = _seekResult
- _szNew = i32(0)
- _p = (*XBtree)(_pCur.X0)
- _pBt = (*XBtShared)(_p.X1)
+ _szNew = int32(0)
+ _p = (*XBtree)(_pCur.XpBtree)
+ _pBt = (*XBtShared)(_p.XpBt)
_newCell = nil
func() {
- if (_flags & i32(10)) != _flags {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67109), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80130)))
+ if (_flags & int32(10)) != _flags {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67109), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78292)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pCur.X12) == i32(4) {
+ if int32(_pCur.XeState) == int32(4) {
func() {
- if (_pCur.X9) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67112), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(76879)))
+ if _pCur.XskipNext == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67112), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(75041)))
crt.X__builtin_abort(tls)
}
}()
- return _pCur.X9
+ return _pCur.XskipNext
}
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67116), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67116), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pCur.X10)&i32(1)) == i32(0) || int32(_pBt.X8) != i32(2) || (int32(_pBt.X10)&i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67117), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80181)))
+ if (int32(_pCur.XcurFlags)&int32(1)) == int32(0) || int32(_pBt.XinTransaction) != int32(2) || (int32(_pBt.XbtsFlags)&int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67117), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78343)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _hasSharedCacheTableLock(tls, _p, _pCur.X7, bool2int((*XKeyInfo)(_pCur.X18) != nil), i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67120), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80291)))
+ if _hasSharedCacheTableLock(tls, _p, _pCur.XpgnoRoot, bool2int((*XKeyInfo)(_pCur.XpKeyInfo) != nil), int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67120), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78453)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pX.X0 == nil) != ((*XKeyInfo)(_pCur.X18) == nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67127), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80356)))
+ if (_pX.XpKey == nil) != ((*XKeyInfo)(_pCur.XpKeyInfo) == nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67127), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78518)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pCur.X10) & i32(32)) == 0 {
+ if (int32(_pCur.XcurFlags) & int32(32)) == 0 {
goto _15
}
- _rc = _saveAllCursors(tls, _pBt, _pCur.X7, _pCur)
+ _rc = _saveAllCursors(tls, _pBt, _pCur.XpgnoRoot, _pCur)
if _rc != 0 {
return _rc
}
_15:
- if (*XKeyInfo)(_pCur.X18) != nil {
+ if (*XKeyInfo)(_pCur.XpKeyInfo) != nil {
goto _17
}
func() {
- if _pX.X0 != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67146), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80391)))
+ if _pX.XpKey != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67146), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78553)))
crt.X__builtin_abort(tls)
}
}()
- _invalidateIncrblobCursors(tls, _p, _pCur.X7, _pX.X1, i32(0))
+ _invalidateIncrblobCursors(tls, _p, _pCur.XpgnoRoot, _pX.XnKey, int32(0))
func() {
- if (_flags&i32(2)) != i32(0) && ((int32(_pCur.X10)&i32(2)) == i32(0) || (_pX.X1) != ((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67153), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80403)))
+ if (_flags&int32(2)) != int32(0) && ((int32(_pCur.XcurFlags)&int32(2)) == int32(0) || _pX.XnKey != (_pCur.Xinfo.XnKey)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67153), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78565)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_pCur.X10) & i32(2)) != i32(0)) && ((_pX.X1) == ((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0)) {
- _loc = i32(0)
+ if ((int32(_pCur.XcurFlags) & int32(2)) != int32(0)) && (_pX.XnKey == (_pCur.Xinfo.XnKey)) {
+ _loc = int32(0)
goto _27
}
- if _loc != i32(0) {
+ if _loc != int32(0) {
goto _27
}
- _rc = _sqlite3BtreeMovetoUnpacked(tls, _pCur, nil, _pX.X1, bool2int(_flags != i32(0)), &_loc)
+ _rc = _sqlite3BtreeMovetoUnpacked(tls, _pCur, nil, _pX.XnKey, bool2int(_flags != int32(0)), &_loc)
if _rc != 0 {
return _rc
}
_27:
goto _31
_17:
- if _loc != i32(0) || (_flags&i32(2)) != i32(0) {
+ if _loc != int32(0) || (_flags&int32(2)) != int32(0) {
goto _31
}
- if (_pX.X4) != 0 {
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_7_r.X0))))) = (*XKeyInfo)(_pCur.X18)
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_7_r.X1))))) = (*XMem)(_pX.X3)
- *(*uint16)(unsafe.Pointer(&(_7_r.X2))) = _pX.X4
- *(*int8)(unsafe.Pointer(&(_7_r.X3))) = int8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_7_r.X4))) = uint8(i32(0))
- *(*int8)(unsafe.Pointer(&(_7_r.X5))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(&(_7_r.X6))) = int8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_7_r.X7))) = uint8(i32(0))
- _rc = _sqlite3BtreeMovetoUnpacked(tls, _pCur, &_7_r, int64(i32(0)), bool2int(_flags != i32(0)), &_loc)
+ if _pX.XnMem != 0 {
+ *(**XKeyInfo)(unsafe.Pointer(&_7_r.XpKeyInfo)) = (*XKeyInfo)(_pCur.XpKeyInfo)
+ *(**XMem)(unsafe.Pointer(&_7_r.XaMem)) = (*XMem)(_pX.XaMem)
+ _7_r.XnField = _pX.XnMem
+ _7_r.Xdefault_rc = 0
+ _7_r.XerrCode = 0
+ _7_r.Xr1 = 0
+ _7_r.Xr2 = 0
+ _7_r.XeqSeen = 0
+ _rc = _sqlite3BtreeMovetoUnpacked(tls, _pCur, &_7_r, 0, bool2int(_flags != int32(0)), &_loc)
goto _33
}
- _rc = _btreeMoveto(tls, _pCur, _pX.X0, _pX.X1, bool2int(_flags != i32(0)), &_loc)
+ _rc = _btreeMoveto(tls, _pCur, _pX.XpKey, _pX.XnKey, bool2int(_flags != int32(0)), &_loc)
_33:
if _rc != 0 {
return _rc
}
_31:
func() {
- if int32(_pCur.X12) != i32(1) && (int32(_pCur.X12) != i32(0) || _loc == 0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67182), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80504)))
+ if int32(_pCur.XeState) != int32(1) && (int32(_pCur.XeState) != int32(0) || _loc == 0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67182), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78666)))
crt.X__builtin_abort(tls)
}
}()
- _pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
+ _pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
func() {
- if (_pPage.X2) == 0 && (_pX.X1) < int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67185), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80572)))
+ if _pPage.XintKey == 0 && _pX.XnKey < (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67185), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78734)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPage.X5) == 0 && (_pPage.X2) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67186), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80601)))
+ if _pPage.Xleaf == 0 && _pPage.XintKey != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67186), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78763)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPage.X0) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67191), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(74631)))
+ if _pPage.XisInit == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67191), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(72793)))
crt.X__builtin_abort(tls)
}
}()
- _newCell = _pBt.X27
+ _newCell = _pBt.XpTmpSpace
func() {
if _newCell == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67193), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80631)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67193), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78793)))
crt.X__builtin_abort(tls)
}
}()
@@ -60785,195 +60602,193 @@ _31:
goto _end_insert
}
func() {
- if _szNew != int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pPage.X24)})))(tls, _pPage, _newCell)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67196), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80642)))
+ if _szNew != int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pPage.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pPage, _newCell)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67196), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78804)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _szNew > int32((_pBt.X15)-uint32(i32(8))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67197), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80682)))
+ if _szNew > int32(_pBt.XpageSize-uint32(8)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67197), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78844)))
crt.X__builtin_abort(tls)
}
}()
- _idx = int32(_pCur.X16)
- if _loc != i32(0) {
+ _idx = int32(_pCur.Xix)
+ if _loc != int32(0) {
goto _54
}
func() {
- if _idx >= int32(_pPage.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67201), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80709)))
+ if _idx >= int32(_pPage.XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67201), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78871)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.X23))
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.XpDbPage))
if _rc != 0 {
goto _end_insert
}
- _oldCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_idx))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_idx))))) + 1*uintptr(i32(1)))))))))))))
- if (_pPage.X5) == 0 {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_newCell), (unsafe.Pointer)(_oldCell), uint32(i32(4)))
+ _oldCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData)) + uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_idx)), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_idx)), uintptr(1)))))))
+ if _pPage.Xleaf == 0 {
+ crt.Xmemcpy(tls, unsafe.Pointer(_newCell), unsafe.Pointer(_oldCell), uint32(4))
}
_rc = _clearCell(tls, _pPage, _oldCell, &_9_info)
- if int32(_9_info.X4) != _szNew || uint32(_9_info.X3) != (_9_info.X2) || (_pBt.X5) != 0 && _szNew >= int32(_pPage.X11) {
+ if int32(_9_info.XnSize) != _szNew || uint32(_9_info.XnLocal) != _9_info.XnPayload || _pBt.XautoVacuum != 0 && _szNew >= int32(_pPage.XminLocal) {
goto _62
}
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67223), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67223), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
- if uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_oldCell))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_szNew))))))))) > uintptr(unsafe.Pointer(_pPage.X20)) {
- return _sqlite3CorruptError(tls, i32(67224))
+ if crt.P2U(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_oldCell))+uintptr(_szNew))))) > crt.P2U(unsafe.Pointer(_pPage.XaDataEnd)) {
+ return _sqlite3CorruptError(tls, int32(67224))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_oldCell), (unsafe.Pointer)(_newCell), uint32(_szNew))
- return i32(0)
+ crt.Xmemcpy(tls, unsafe.Pointer(_oldCell), unsafe.Pointer(_newCell), uint32(_szNew))
+ return int32(0)
_62:
- _dropCell(tls, _pPage, _idx, int32(_9_info.X4), &_rc)
+ _dropCell(tls, _pPage, _idx, int32(_9_info.XnSize), &_rc)
if _rc != 0 {
goto _end_insert
}
goto _72
_54:
- if (_loc < i32(0)) && (int32(_pPage.X14) > i32(0)) {
+ if (_loc < int32(0)) && (int32(_pPage.XnCell) > int32(0)) {
func() {
- if (_pPage.X5) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67231), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80726)))
+ if _pPage.Xleaf == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67231), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78888)))
crt.X__builtin_abort(tls)
}
}()
- _idx = int32(preInc14((*uint16)(unsafe.Pointer(&(_pCur.X16))), uint16(1)))
+ _idx = int32(preInc76(&_pCur.Xix, uint16(1)))
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-3))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-3))
}
goto _72
}
func() {
- if (_pPage.X5) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67235), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80726)))
+ if _pPage.Xleaf == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67235), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78888)))
crt.X__builtin_abort(tls)
}
}()
_72:
- _insertCell(tls, _pPage, _idx, _newCell, _szNew, nil, uint32(i32(0)), &_rc)
+ _insertCell(tls, _pPage, _idx, _newCell, _szNew, nil, 0, &_rc)
func() {
- if int32(_pPage.X9) != i32(0) && _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67238), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80738)))
+ if int32(_pPage.XnOverflow) != int32(0) && _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67238), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78900)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc == i32(0) && int32(_pPage.X14) <= i32(0) && int32(_pPage.X9) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67239), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80775)))
+ if _rc == int32(0) && int32(_pPage.XnCell) <= int32(0) && int32(_pPage.XnOverflow) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67239), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78937)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&((*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X4))) = uint16(i32(0))
- if (_pPage.X9) == 0 {
+ _pCur.Xinfo.XnSize = 0
+ if _pPage.XnOverflow == 0 {
goto _82
}
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67263), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67263), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) & i32(-3))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) & int32(-3))
}
_rc = _balance(tls, _pCur)
- *(*uint8)(unsafe.Pointer(&((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X9))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(0))
- if (_flags&i32(2)) == 0 || _rc != i32(0) {
+ (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnOverflow = 0
+ _pCur.XeState = 0
+ if (_flags&int32(2)) == 0 || _rc != int32(0) {
goto _86
}
_rc = _moveToRoot(tls, _pCur)
- if (*XKeyInfo)(_pCur.X18) == nil {
+ if _pCur.XpKeyInfo == nil {
goto _87
}
func() {
- if _pCur.X6 != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67276), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80829)))
+ if _pCur.XpKey != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67276), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(78991)))
crt.X__builtin_abort(tls)
}
}()
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pCur.X6))) = _sqlite3Malloc(tls, uint64(_pX.X1))
- if _pCur.X6 == nil {
- _rc = i32(7)
+ _pCur.XpKey = _sqlite3Malloc(tls, uint64(_pX.XnKey))
+ if _pCur.XpKey == nil {
+ _rc = int32(7)
goto _91
}
- crt.Xmemcpy(tls, _pCur.X6, _pX.X0, uint32(_pX.X1))
+ crt.Xmemcpy(tls, _pCur.XpKey, _pX.XpKey, uint32(_pX.XnKey))
_91:
_87:
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(3))
- *(*int64)(unsafe.Pointer(&(_pCur.X5))) = _pX.X1
+ _pCur.XeState = uint8(3)
+ _pCur.XnKey = _pX.XnKey
_86:
_82:
func() {
- if int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X9) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67288), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000))), unsafe.Pointer(str(80843)))
+ if int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnOverflow) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67288), unsafe.Pointer(&_sqlite3BtreeInsertØ00__func__Ø000), unsafe.Pointer(str(79005)))
crt.X__builtin_abort(tls)
}
}()
_end_insert:
return _rc
-
- _ = _7_r
- _ = _9_info
- panic(0)
}
var _sqlite3BtreeInsertØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeInsertØ00__func__Ø000[0], str(80883), 19)
+ crt.Xstrncpy(nil, &_sqlite3BtreeInsertØ00__func__Ø000[0], str(79045), 19)
}
-// This function is called before modifying the contents of a table
-// to invalidate any incrblob cursors that are open on the
-// row or one of the rows being modified.
-//
-// If argument isClearTable is true, then the entire contents of the
-// table is about to be deleted. In this case invalidate all incrblob
-// cursors open on any row within the table with root-page pgnoRoot.
-//
-// Otherwise, if argument isClearTable is false, then the row with
-// rowid iRow is being replaced or deleted. In this case invalidate
-// only those incrblob cursors open on that specific row.
+// C comment
+// /*
+// ** This function is called before modifying the contents of a table
+// ** to invalidate any incrblob cursors that are open on the
+// ** row or one of the rows being modified.
+// **
+// ** If argument isClearTable is true, then the entire contents of the
+// ** table is about to be deleted. In this case invalidate all incrblob
+// ** cursors open on any row within the table with root-page pgnoRoot.
+// **
+// ** Otherwise, if argument isClearTable is false, then the row with
+// ** rowid iRow is being replaced or deleted. In this case invalidate
+// ** only those incrblob cursors open on that specific row.
+// */
func _invalidateIncrblobCursors(tls *crt.TLS, _pBtree *XBtree, _pgnoRoot uint32, _iRow int64, _isClearTable int32) {
var _p *XBtCursor
- if int32(_pBtree.X5) == i32(0) {
+ if int32(_pBtree.XhasIncrblobCur) == int32(0) {
return
}
func() {
if _sqlite3BtreeHoldsMutex(tls, _pBtree) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59542), unsafe.Pointer((*int8)(unsafe.Pointer(&_invalidateIncrblobCursorsØ00__func__Ø000))), unsafe.Pointer(str(80902)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59542), unsafe.Pointer(&_invalidateIncrblobCursorsØ00__func__Ø000), unsafe.Pointer(str(79064)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pBtree.X5))) = uint8(i32(0))
- _p = (*XBtCursor)((*XBtShared)(_pBtree.X1).X2)
+ _pBtree.XhasIncrblobCur = 0
+ _p = (*XBtCursor)((*XBtShared)(_pBtree.XpBt).XpCursor)
_3:
if _p == nil {
goto _6
}
- if (int32(_p.X10) & i32(16)) == i32(0) {
+ if (int32(_p.XcurFlags) & int32(16)) == int32(0) {
goto _7
}
- *(*uint8)(unsafe.Pointer(&(_pBtree.X5))) = uint8(i32(1))
- if ((_p.X7) == _pgnoRoot) && (_isClearTable != 0 || (((*XCellInfo)(unsafe.Pointer(&(_p.X4))).X0) == _iRow)) {
- *(*uint8)(unsafe.Pointer(&(_p.X12))) = uint8(i32(0))
+ _pBtree.XhasIncrblobCur = uint8(1)
+ if (_p.XpgnoRoot == _pgnoRoot) && (_isClearTable != 0 || ((_p.Xinfo.XnKey) == _iRow)) {
+ _p.XeState = 0
}
_7:
- _p = (*XBtCursor)(_p.X2)
+ _p = (*XBtCursor)(_p.XpNext)
goto _3
_6:
}
@@ -60981,19 +60796,22 @@ _6:
var _invalidateIncrblobCursorsØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_invalidateIncrblobCursorsØ00__func__Ø000[0], str(80933), 26)
+ crt.Xstrncpy(nil, &_invalidateIncrblobCursorsØ00__func__Ø000[0], str(79095), 26)
}
-// Create the byte sequence used to represent a cell on page pPage
-// and write that byte sequence into pCell[]. Overflow pages are
-// allocated and filled in as necessary. The calling procedure
-// is responsible for making sure sufficient space has been allocated
-// for pCell[].
-//
-// Note that pCell does not necessary need to point to the pPage->aData
-// area. pCell might point to some temporary storage. The cell will
-// be constructed in this temporary area then copied into pPage->aData
-// later.
+// C comment
+// /*
+// ** Create the byte sequence used to represent a cell on page pPage
+// ** and write that byte sequence into pCell[]. Overflow pages are
+// ** allocated and filled in as necessary. The calling procedure
+// ** is responsible for making sure sufficient space has been allocated
+// ** for pCell[].
+// **
+// ** Note that pCell does not necessary need to point to the pPage->aData
+// ** area. pCell might point to some temporary storage. The cell will
+// ** be constructed in this temporary area then copied into pPage->aData
+// ** later.
+// */
func _fillInCell(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pX *XBtreePayload, _pnSize *int32) (r0 int32) {
var _nPayload, _nSrc, _n, _rc, _spaceLeft, _nHeader, _4_mn int32
var _pgnoOvfl, _7_pgnoPtrmap uint32
@@ -61004,148 +60822,131 @@ func _fillInCell(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pX *XBtreePaylo
var _pOvfl, _pToRelease *XMemPage
_pOvfl = nil
_pToRelease = nil
- _pBt = (*XBtShared)(_pPage.X18)
- _pgnoOvfl = u32(0)
+ _pBt = (*XBtShared)(_pPage.XpBt)
+ _pgnoOvfl = uint32(0)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65233), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65233), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uintptr(unsafe.Pointer(_pCell)) >= uintptr(unsafe.Pointer(_pPage.X19)) && uintptr(unsafe.Pointer(_pCell)) < uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(_pBt.X15))))) && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65237), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(80959)))
+ if crt.P2U(unsafe.Pointer(_pCell)) >= crt.P2U(unsafe.Pointer(_pPage.XaData)) && crt.P2U(unsafe.Pointer(_pCell)) < crt.P2U(unsafe.Pointer(elem15(_pPage.XaData, uintptr(_pBt.XpageSize)))) && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65237), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79121)))
crt.X__builtin_abort(tls)
}
}()
- _nHeader = int32(_pPage.X7)
- if (_pPage.X2) != 0 {
- _nPayload = (_pX.X5) + (_pX.X6)
- _pSrc = (*uint8)(_pX.X2)
- _nSrc = _pX.X5
+ _nHeader = int32(_pPage.XchildPtrSize)
+ if _pPage.XintKey != 0 {
+ _nPayload = _pX.XnData + _pX.XnZero
+ _pSrc = (*uint8)(_pX.XpData)
+ _nSrc = _pX.XnData
func() {
- if (_pPage.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65246), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(53565)))
+ if _pPage.XintKeyLeaf == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65246), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(53541)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_nHeader
- *p = (*p) + int32(uint8(func() int32 {
- if uint32(_nPayload) < u32(128) {
- return func() int32 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell)) + 1*uintptr(_nHeader))) = uint8(_nPayload)
- return i32(1)
- }()
- }
- return _sqlite3PutVarint(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell))+1*uintptr(_nHeader))), uint64(_nPayload))
- }()))
- sink1(*p)
- }
- {
- p := &_nHeader
- *p = (*p) + _sqlite3PutVarint(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell))+1*uintptr(_nHeader))), *(*uint64)(unsafe.Pointer((*int64)(unsafe.Pointer(&(_pX.X1))))))
- sink1(*p)
- }
+ _nHeader += int32(uint8(func() int32 {
+ if uint32(_nPayload) < uint32(128) {
+ return func() int32 { *elem15(_pCell, uintptr(_nHeader)) = uint8(_nPayload); return int32(1) }()
+ }
+ return _sqlite3PutVarint(tls, elem15(_pCell, uintptr(_nHeader)), uint64(_nPayload))
+ }()))
+ _nHeader += _sqlite3PutVarint(tls, elem15(_pCell, uintptr(_nHeader)), *(*uint64)(unsafe.Pointer(&_pX.XnKey)))
goto _11
}
func() {
- if (_pX.X1) > int64(i32(2147483647)) || (_pX.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65250), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81060)))
+ if _pX.XnKey > int64(2147483647) || _pX.XpKey == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65250), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79222)))
crt.X__builtin_abort(tls)
}
}()
- _nSrc = store1(&_nPayload, int32(_pX.X1))
- _pSrc = (*uint8)(_pX.X0)
- {
- p := &_nHeader
- *p = (*p) + int32(uint8(func() int32 {
- if uint32(_nPayload) < u32(128) {
- return func() int32 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell)) + 1*uintptr(_nHeader))) = uint8(_nPayload)
- return i32(1)
- }()
- }
- return _sqlite3PutVarint(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell))+1*uintptr(_nHeader))), uint64(_nPayload))
- }()))
- sink1(*p)
- }
+ _nSrc = store2(&_nPayload, int32(_pX.XnKey))
+ _pSrc = (*uint8)(_pX.XpKey)
+ _nHeader += int32(uint8(func() int32 {
+ if uint32(_nPayload) < uint32(128) {
+ return func() int32 { *elem15(_pCell, uintptr(_nHeader)) = uint8(_nPayload); return int32(1) }()
+ }
+ return _sqlite3PutVarint(tls, elem15(_pCell, uintptr(_nHeader)), uint64(_nPayload))
+ }()))
_11:
- if _nPayload > int32(_pPage.X10) {
+ if _nPayload > int32(_pPage.XmaxLocal) {
goto _17
}
_n = _nHeader + _nPayload
- if _n < i32(4) {
- _n = i32(4)
+ if _n < int32(4) {
+ _n = int32(4)
}
*_pnSize = _n
_spaceLeft = _nPayload
_pPrior = _pCell
goto _19
_17:
- _4_mn = int32(_pPage.X11)
- _n = int32(uint32(_4_mn) + (uint32(_nPayload-_4_mn) % (((*XBtShared)(_pPage.X18).X16) - uint32(i32(4)))))
- if _n > int32(_pPage.X10) {
+ _4_mn = int32(_pPage.XminLocal)
+ _n = int32(uint32(_4_mn) + (uint32(_nPayload-_4_mn) % (((*XBtShared)(_pPage.XpBt).XusableSize) - uint32(4))))
+ if _n > int32(_pPage.XmaxLocal) {
_n = _4_mn
}
_spaceLeft = _n
- *_pnSize = (_n + _nHeader) + i32(4)
- _pPrior = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell)) + 1*uintptr(_nHeader+_n)))
+ *_pnSize = (_n + _nHeader) + int32(4)
+ _pPrior = elem15(_pCell, uintptr(_nHeader+_n))
_19:
- _pPayload = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell)) + 1*uintptr(_nHeader)))
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_pPage.X25)})))(tls, _pPage, _pCell, &_5_info)
+ _pPayload = elem15(_pCell, uintptr(_nHeader))
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _pPage.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _pPage, _pCell, &_5_info)
func() {
- if _nHeader != int32((uintptr(unsafe.Pointer(_5_info.X1))-uintptr(unsafe.Pointer(_pCell)))/1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65293), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81096)))
+ if _nHeader != int32(uintptr(unsafe.Pointer(_5_info.XpPayload))-uintptr(unsafe.Pointer(_pCell))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65293), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79258)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_5_info.X0) != (_pX.X1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65294), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81134)))
+ if _5_info.XnKey != _pX.XnKey {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65294), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79296)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*_pnSize) != int32(_5_info.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65295), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81154)))
+ if (*_pnSize) != int32(_5_info.XnSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65295), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79316)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _spaceLeft != int32(_5_info.X3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65296), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81176)))
+ if _spaceLeft != int32(_5_info.XnLocal) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65296), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79338)))
crt.X__builtin_abort(tls)
}
}()
_29:
- if _nPayload <= i32(0) {
+ if _nPayload <= int32(0) {
goto _30
}
- if _spaceLeft != i32(0) {
+ if _spaceLeft != int32(0) {
goto _31
}
_7_pgnoPtrmap = _pgnoOvfl
- if (_pBt.X5) == 0 {
+ if _pBt.XautoVacuum == 0 {
goto _32
}
_33:
_pgnoOvfl += 1
- if (_ptrmapPageno(tls, _pBt, _pgnoOvfl) == _pgnoOvfl) || (_pgnoOvfl == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1)))) {
+ if (_ptrmapPageno(tls, _pBt, _pgnoOvfl) == _pgnoOvfl) || (_pgnoOvfl == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1))) {
goto _33
}
_32:
- _rc = _allocateBtreePage(tls, _pBt, &_pOvfl, &_pgnoOvfl, _pgnoOvfl, uint8(i32(0)))
- if (_pBt.X5) == 0 || _rc != i32(0) {
+ _rc = _allocateBtreePage(tls, _pBt, &_pOvfl, &_pgnoOvfl, _pgnoOvfl, 0)
+ if _pBt.XautoVacuum == 0 || _rc != int32(0) {
goto _36
}
_10_eType = uint8(func() int32 {
if _7_pgnoPtrmap != 0 {
- return i32(4)
+ return int32(4)
}
- return i32(3)
+ return int32(3)
}())
_ptrmapPut(tls, _pBt, _pgnoOvfl, _10_eType, _7_pgnoPtrmap, &_rc)
if _rc != 0 {
@@ -61157,42 +60958,42 @@ _36:
return _rc
}
func() {
- if _pToRelease != nil && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pToRelease.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65340), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81201)))
+ if _pToRelease != nil && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pToRelease.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65340), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79363)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uintptr(unsafe.Pointer(_pPrior)) >= uintptr(unsafe.Pointer(_pPage.X19)) && uintptr(unsafe.Pointer(_pPrior)) < uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(_pBt.X15))))) && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65344), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81263)))
+ if crt.P2U(unsafe.Pointer(_pPrior)) >= crt.P2U(unsafe.Pointer(_pPage.XaData)) && crt.P2U(unsafe.Pointer(_pPrior)) < crt.P2U(unsafe.Pointer(elem15(_pPage.XaData, uintptr(_pBt.XpageSize)))) && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65344), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79425)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3Put4byte(tls, _pPrior, _pgnoOvfl)
_releasePage(tls, _pToRelease)
_pToRelease = _pOvfl
- _pPrior = _pOvfl.X19
- _sqlite3Put4byte(tls, _pPrior, uint32(i32(0)))
- _pPayload = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOvfl.X19)) + 1*uintptr(i32(4))))
- _spaceLeft = int32((_pBt.X16) - uint32(i32(4)))
+ _pPrior = _pOvfl.XaData
+ _sqlite3Put4byte(tls, _pPrior, 0)
+ _pPayload = elem15(_pOvfl.XaData, uintptr(4))
+ _spaceLeft = int32(_pBt.XusableSize - uint32(4))
_31:
_n = _nPayload
if _n > _spaceLeft {
_n = _spaceLeft
}
func() {
- if _pToRelease != nil && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pToRelease.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65360), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81201)))
+ if _pToRelease != nil && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pToRelease.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65360), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79363)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uintptr(unsafe.Pointer(_pPayload)) >= uintptr(unsafe.Pointer(_pPage.X19)) && uintptr(unsafe.Pointer(_pPayload)) < uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(_pBt.X15))))) && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65364), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81366)))
+ if crt.P2U(unsafe.Pointer(_pPayload)) >= crt.P2U(unsafe.Pointer(_pPage.XaData)) && crt.P2U(unsafe.Pointer(_pPayload)) < crt.P2U(unsafe.Pointer(elem15(_pPage.XaData, uintptr(_pBt.XpageSize)))) && _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65364), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79528)))
crt.X__builtin_abort(tls)
}
}()
- if _nSrc <= i32(0) {
+ if _nSrc <= int32(0) {
goto _56
}
if _n > _nSrc {
@@ -61200,102 +61001,83 @@ _31:
}
func() {
if _pSrc == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65369), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInCellØ00__func__Ø000))), unsafe.Pointer(str(81473)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65369), unsafe.Pointer(&_fillInCellØ00__func__Ø000), unsafe.Pointer(str(79635)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pPayload), (unsafe.Pointer)(_pSrc), uint32(_n))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pPayload), unsafe.Pointer(_pSrc), uint32(_n))
goto _60
_56:
- crt.Xmemset(tls, (unsafe.Pointer)(_pPayload), i32(0), uint32(_n))
+ crt.Xmemset(tls, unsafe.Pointer(_pPayload), int32(0), uint32(_n))
_60:
- {
- p := &_nPayload
- *p = (*p) - _n
- sink1(*p)
- }
- {
- p := &_pPayload
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n)))
- sink13(*p)
- }
- {
- p := &_pSrc
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n)))
- sink13(*p)
- }
- {
- p := &_nSrc
- *p = (*p) - _n
- sink1(*p)
- }
- {
- p := &_spaceLeft
- *p = (*p) - _n
- sink1(*p)
- }
+ _nPayload -= _n
+ *(*uintptr)(unsafe.Pointer(&_pPayload)) += uintptr(_n)
+ *(*uintptr)(unsafe.Pointer(&_pSrc)) += uintptr(_n)
+ _nSrc -= _n
+ _spaceLeft -= _n
goto _29
_30:
_releasePage(tls, _pToRelease)
- return i32(0)
-
- _ = _5_info
- panic(0)
+ return int32(0)
}
var _fillInCellØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_fillInCellØ00__func__Ø000[0], str(81478), 11)
+ crt.Xstrncpy(nil, &_fillInCellØ00__func__Ø000[0], str(79640), 11)
}
-// Free any overflow pages associated with the given Cell. Write the
-// local Cell size (the number of bytes on the original page, omitting
-// overflow) into *pnSize.
+// C comment
+// /*
+// ** Free any overflow pages associated with the given Cell. Write the
+// ** local Cell size (the number of bytes on the original page, omitting
+// ** overflow) into *pnSize.
+// */
func _clearCell(tls *crt.TLS, _pPage *XMemPage, _pCell *uint8, _pInfo *XCellInfo) (r0 int32) {
var _rc, _nOvfl int32
var _ovflPgno, _ovflPageSize, _3_iNext uint32
var _pBt *XBtShared
var _3_pOvfl *XMemPage
- _pBt = (*XBtShared)(_pPage.X18)
+ _pBt = (*XBtShared)(_pPage.XpBt)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65147), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearCellØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65147), unsafe.Pointer(&_clearCellØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_pPage.X25)})))(tls, _pPage, _pCell, _pInfo)
- if uint32(_pInfo.X3) == (_pInfo.X2) {
- return i32(0)
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _pPage.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _pPage, _pCell, _pInfo)
+ if uint32(_pInfo.XnLocal) == _pInfo.XnPayload {
+ return int32(0)
}
- if uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_pInfo.X4)))))))))-uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(1)))))))))) > uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_pPage.X15))))))))) {
- return _sqlite3CorruptError(tls, i32(65153))
+ if crt.P2U(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell))+uintptr(_pInfo.XnSize)))))-uintptr(int32(1)))))) > crt.P2U(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData))+uintptr(_pPage.XmaskPage))))) {
+ return _sqlite3CorruptError(tls, int32(65153))
}
- _ovflPgno = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_pInfo.X4)))))))))-uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))))
+ _ovflPgno = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell))+uintptr(_pInfo.XnSize)))))-uintptr(int32(4)))))
func() {
- if (_pBt.X16) <= uint32(i32(4)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65156), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearCellØ00__func__Ø000))), unsafe.Pointer(str(81489)))
+ if _pBt.XusableSize <= uint32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65156), unsafe.Pointer(&_clearCellØ00__func__Ø000), unsafe.Pointer(str(79651)))
crt.X__builtin_abort(tls)
}
}()
- _ovflPageSize = (_pBt.X16) - uint32(i32(4))
- _nOvfl = int32(((((_pInfo.X2) - uint32(_pInfo.X3)) + _ovflPageSize) - uint32(i32(1))) / _ovflPageSize)
+ _ovflPageSize = _pBt.XusableSize - uint32(4)
+ _nOvfl = int32((((_pInfo.XnPayload - uint32(_pInfo.XnLocal)) + _ovflPageSize) - uint32(1)) / _ovflPageSize)
func() {
- if _nOvfl <= i32(0) && ((_sqlite3Config.X6) != i32(0) || ((_pInfo.X2)+_ovflPageSize) >= _ovflPageSize) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65159), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearCellØ00__func__Ø000))), unsafe.Pointer(str(81509)))
+ if _nOvfl <= int32(0) && (_sqlite3Config.XneverCorrupt != int32(0) || (_pInfo.XnPayload+_ovflPageSize) >= _ovflPageSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65159), unsafe.Pointer(&_clearCellØ00__func__Ø000), unsafe.Pointer(str(79671)))
crt.X__builtin_abort(tls)
}
}()
_10:
- if postInc1(&_nOvfl, int32(-1)) == 0 {
+ if postInc2(&_nOvfl, -1) == 0 {
goto _11
}
- _3_iNext = uint32(i32(0))
+ _3_iNext = 0
_3_pOvfl = nil
- if (_ovflPgno < uint32(i32(2))) || (_ovflPgno > _btreePagecount(tls, _pBt)) {
- return _sqlite3CorruptError(tls, i32(65169))
+ if (_ovflPgno < uint32(2)) || (_ovflPgno > _btreePagecount(tls, _pBt)) {
+ return _sqlite3CorruptError(tls, int32(65169))
}
if _nOvfl == 0 {
goto _14
@@ -61305,14 +61087,14 @@ _10:
return _rc
}
_14:
- if ((_3_pOvfl != nil) || (store52(&_3_pOvfl, _btreePageLookup(tls, _pBt, _ovflPgno)) != nil)) && (_sqlite3PagerPageRefcount(tls, (*XPgHdr)(_3_pOvfl.X23)) != i32(1)) {
- _rc = _sqlite3CorruptError(tls, i32(65189))
+ if ((_3_pOvfl != nil) || (store84(&_3_pOvfl, _btreePageLookup(tls, _pBt, _ovflPgno)) != nil)) && (_sqlite3PagerPageRefcount(tls, (*XPgHdr)(_3_pOvfl.XpDbPage)) != int32(1)) {
+ _rc = _sqlite3CorruptError(tls, int32(65189))
goto _19
}
_rc = _freePage2(tls, _pBt, _3_pOvfl, _ovflPgno)
_19:
if _3_pOvfl != nil {
- _sqlite3PagerUnref(tls, (*XPgHdr)(_3_pOvfl.X23))
+ _sqlite3PagerUnref(tls, (*XPgHdr)(_3_pOvfl.XpDbPage))
}
if _rc != 0 {
return _rc
@@ -61320,27 +61102,30 @@ _19:
_ovflPgno = _3_iNext
goto _10
_11:
- return i32(0)
+ return int32(0)
}
var _clearCellØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_clearCellØ00__func__Ø000[0], str(81582), 10)
+ crt.Xstrncpy(nil, &_clearCellØ00__func__Ø000[0], str(79744), 10)
}
-// Retrieve a page from the pager cache. If the requested page is not
-// already in the pager cache return NULL. Initialize the MemPage.pBt and
-// MemPage.aData elements if needed.
+// C comment
+// /*
+// ** Retrieve a page from the pager cache. If the requested page is not
+// ** already in the pager cache return NULL. Initialize the MemPage.pBt and
+// ** MemPage.aData elements if needed.
+// */
func _btreePageLookup(tls *crt.TLS, _pBt *XBtShared, _pgno uint32) (r0 *XMemPage) {
var _pDbPage *XPgHdr
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61038), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreePageLookupØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61038), unsafe.Pointer(&_btreePageLookupØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
- _pDbPage = _sqlite3PagerLookup(tls, (*XPager)(_pBt.X0), _pgno)
+ _pDbPage = _sqlite3PagerLookup(tls, (*XPager)(_pBt.XpPager), _pgno)
if _pDbPage != nil {
return _btreePageFromDbPage(tls, _pDbPage, _pgno, _pBt)
}
@@ -61350,125 +61135,128 @@ func _btreePageLookup(tls *crt.TLS, _pBt *XBtShared, _pgno uint32) (r0 *XMemPage
var _btreePageLookupØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_btreePageLookupØ00__func__Ø000[0], str(81592), 16)
+ crt.Xstrncpy(nil, &_btreePageLookupØ00__func__Ø000[0], str(79754), 16)
}
-// This function is used to add page iPage to the database file free-list.
-// It is assumed that the page is not already a part of the free-list.
-//
-// The value passed as the second argument to this function is optional.
-// If the caller happens to have a pointer to the MemPage object
-// corresponding to page iPage handy, it may pass it as the second value.
-// Otherwise, it may pass NULL.
-//
-// If a pointer to a MemPage object is passed as the second argument,
-// its reference count is not altered by this function.
+// C comment
+// /*
+// ** This function is used to add page iPage to the database file free-list.
+// ** It is assumed that the page is not already a part of the free-list.
+// **
+// ** The value passed as the second argument to this function is optional.
+// ** If the caller happens to have a pointer to the MemPage object
+// ** corresponding to page iPage handy, it may pass it as the second value.
+// ** Otherwise, it may pass NULL.
+// **
+// ** If a pointer to a MemPage object is passed as the second argument,
+// ** its reference count is not altered by this function.
+// */
func _freePage2(tls *crt.TLS, _pBt *XBtShared, _pMemPage *XMemPage, _iPage uint32) (r0 int32) {
var _rc, _nFree int32
var _iTrunk, _6_nLeaf uint32
var _pTrunk, _pPage1, _pPage *XMemPage
_pTrunk = nil
- _iTrunk = u32(0)
- _pPage1 = (*XMemPage)(_pBt.X3)
+ _iTrunk = uint32(0)
+ _pPage1 = (*XMemPage)(_pBt.XpPage1)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65005), unsafe.Pointer((*int8)(unsafe.Pointer(&_freePage2Ø00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65005), unsafe.Pointer(&_freePage2Ø00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_sqlite3Config.X6) != i32(0) && _iPage <= uint32(i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65006), unsafe.Pointer((*int8)(unsafe.Pointer(&_freePage2Ø00__func__Ø000))), unsafe.Pointer(str(81608)))
+ if _sqlite3Config.XneverCorrupt != int32(0) && _iPage <= uint32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65006), unsafe.Pointer(&_freePage2Ø00__func__Ø000), unsafe.Pointer(str(79770)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pMemPage != nil && (_pMemPage.X4) != _iPage {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65007), unsafe.Pointer((*int8)(unsafe.Pointer(&_freePage2Ø00__func__Ø000))), unsafe.Pointer(str(81630)))
+ if _pMemPage != nil && _pMemPage.Xpgno != _iPage {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65007), unsafe.Pointer(&_freePage2Ø00__func__Ø000), unsafe.Pointer(str(79792)))
crt.X__builtin_abort(tls)
}
}()
- if _iPage < uint32(i32(2)) {
- return _sqlite3CorruptError(tls, i32(65009))
+ if _iPage < uint32(2) {
+ return _sqlite3CorruptError(tls, int32(65009))
}
if _pMemPage != nil {
_pPage = _pMemPage
- _sqlite3PagerRef(tls, (*XPgHdr)(_pPage.X23))
+ _sqlite3PagerRef(tls, (*XPgHdr)(_pPage.XpDbPage))
goto _10
}
_pPage = _btreePageLookup(tls, _pBt, _iPage)
_10:
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage1.X23))
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage1.XpDbPage))
if _rc != 0 {
goto _freepage_out
}
- _nFree = int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(36))))))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(36)))), uint32(_nFree+i32(1)))
- if (int32(_pBt.X10) & i32(4)) == 0 {
+ _nFree = int32(_sqlite3Get4byte(tls, elem15(_pPage1.XaData, uintptr(36))))
+ _sqlite3Put4byte(tls, elem15(_pPage1.XaData, uintptr(36)), uint32(_nFree+int32(1)))
+ if (int32(_pBt.XbtsFlags) & int32(4)) == 0 {
goto _12
}
- if ((_pPage == nil) && (store1(&_rc, _btreeGetPage(tls, _pBt, _iPage, &_pPage, i32(0))) != i32(0))) || (store1(&_rc, _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.X23))) != i32(0)) {
+ if ((_pPage == nil) && (store2(&_rc, _btreeGetPage(tls, _pBt, _iPage, &_pPage, int32(0))) != int32(0))) || (store2(&_rc, _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.XpDbPage))) != int32(0)) {
goto _freepage_out
}
- crt.Xmemset(tls, (unsafe.Pointer)(_pPage.X19), i32(0), (*XBtShared)(_pPage.X18).X15)
+ crt.Xmemset(tls, unsafe.Pointer(_pPage.XaData), int32(0), (*XBtShared)(_pPage.XpBt).XpageSize)
_12:
- if (_pBt.X5) == 0 {
+ if _pBt.XautoVacuum == 0 {
goto _16
}
- _ptrmapPut(tls, _pBt, _iPage, uint8(i32(2)), uint32(i32(0)), &_rc)
+ _ptrmapPut(tls, _pBt, _iPage, uint8(2), 0, &_rc)
if _rc != 0 {
goto _freepage_out
}
_16:
- if _nFree == i32(0) {
+ if _nFree == int32(0) {
goto _18
}
- _iTrunk = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(32)))))
- _rc = _btreeGetPage(tls, _pBt, _iTrunk, &_pTrunk, i32(0))
- if _rc != i32(0) {
+ _iTrunk = _sqlite3Get4byte(tls, elem15(_pPage1.XaData, uintptr(32)))
+ _rc = _btreeGetPage(tls, _pBt, _iTrunk, &_pTrunk, int32(0))
+ if _rc != int32(0) {
goto _freepage_out
}
- _6_nLeaf = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(i32(4)))))
+ _6_nLeaf = _sqlite3Get4byte(tls, elem15(_pTrunk.XaData, uintptr(4)))
func() {
- if (_pBt.X16) <= uint32(i32(32)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65060), unsafe.Pointer((*int8)(unsafe.Pointer(&_freePage2Ø00__func__Ø000))), unsafe.Pointer(str(81665)))
+ if _pBt.XusableSize <= uint32(32) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65060), unsafe.Pointer(&_freePage2Ø00__func__Ø000), unsafe.Pointer(str(79827)))
crt.X__builtin_abort(tls)
}
}()
- if _6_nLeaf > (((_pBt.X16) / uint32(i32(4))) - uint32(i32(2))) {
- _rc = _sqlite3CorruptError(tls, i32(65062))
+ if _6_nLeaf > ((_pBt.XusableSize / uint32(4)) - uint32(2)) {
+ _rc = _sqlite3CorruptError(tls, int32(65062))
goto _freepage_out
}
- if _6_nLeaf >= (((_pBt.X16) / uint32(i32(4))) - uint32(i32(8))) {
+ if _6_nLeaf >= ((_pBt.XusableSize / uint32(4)) - uint32(8)) {
goto _23
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pTrunk.X23))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pTrunk.XpDbPage))
+ if _rc != int32(0) {
goto _24
}
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(i32(4)))), _6_nLeaf+uint32(i32(1)))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrunk.X19))+1*uintptr(uint32(i32(8))+(_6_nLeaf*uint32(i32(4)))))), _iPage)
- if (_pPage != nil) && ((int32(_pBt.X10) & i32(4)) == i32(0)) {
- _sqlite3PagerDontWrite(tls, (*XPgHdr)(_pPage.X23))
+ _sqlite3Put4byte(tls, elem15(_pTrunk.XaData, uintptr(4)), _6_nLeaf+uint32(1))
+ _sqlite3Put4byte(tls, elem15(_pTrunk.XaData, uintptr(uint32(8)+(_6_nLeaf*uint32(4)))), _iPage)
+ if (_pPage != nil) && ((int32(_pBt.XbtsFlags) & int32(4)) == int32(0)) {
+ _sqlite3PagerDontWrite(tls, (*XPgHdr)(_pPage.XpDbPage))
}
_rc = _btreeSetHasContent(tls, _pBt, _iPage)
_24:
goto _freepage_out
_23:
_18:
- if (_pPage == nil) && (i32(0) != store1(&_rc, _btreeGetPage(tls, _pBt, _iPage, &_pPage, i32(0)))) {
+ if (_pPage == nil) && (int32(0) != store2(&_rc, _btreeGetPage(tls, _pBt, _iPage, &_pPage, int32(0)))) {
goto _freepage_out
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.X23))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.XpDbPage))
+ if _rc != int32(0) {
goto _freepage_out
}
- _sqlite3Put4byte(tls, _pPage.X19, _iTrunk)
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(i32(4)))), uint32(i32(0)))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage1.X19))+1*uintptr(i32(32)))), _iPage)
+ _sqlite3Put4byte(tls, _pPage.XaData, _iTrunk)
+ _sqlite3Put4byte(tls, elem15(_pPage.XaData, uintptr(4)), 0)
+ _sqlite3Put4byte(tls, elem15(_pPage1.XaData, uintptr(32)), _iPage)
_freepage_out:
if _pPage != nil {
- *(*uint8)(unsafe.Pointer(&(_pPage.X0))) = uint8(i32(0))
+ _pPage.XisInit = 0
}
_releasePage(tls, _pPage)
_releasePage(tls, _pTrunk)
@@ -61478,125 +61266,135 @@ _freepage_out:
var _freePage2Ø00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_freePage2Ø00__func__Ø000[0], str(81684), 10)
+ crt.Xstrncpy(nil, &_freePage2Ø00__func__Ø000[0], str(79846), 10)
}
-// Increment the reference count for page pPg.
+// C comment
+// /*
+// ** Increment the reference count for page pPg.
+// */
func _sqlite3PagerRef(tls *crt.TLS, _pPg *XPgHdr) {
_sqlite3PcacheRef(tls, _pPg)
}
-// Increase the reference count of a supplied page by 1.
+// C comment
+// /*
+// ** Increase the reference count of a supplied page by 1.
+// */
func _sqlite3PcacheRef(tls *crt.TLS, _p *XPgHdr) {
func() {
- if int32(_p.X7) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44653), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheRefØ00__func__Ø000))), unsafe.Pointer(str(13857)))
+ if int32(_p.XnRef) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44653), unsafe.Pointer(&_sqlite3PcacheRefØ00__func__Ø000), unsafe.Pointer(str(13812)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3PcachePageSanity(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44654), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheRefØ00__func__Ø000))), unsafe.Pointer(str(13867)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44654), unsafe.Pointer(&_sqlite3PcacheRefØ00__func__Ø000), unsafe.Pointer(str(13822)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_p.X7))) += 1
- *(*int32)(unsafe.Pointer(&((*XPCache)(_p.X8).X3))) += 1
+ _p.XnRef += 1
+ (*XPCache)(_p.XpCache).XnRefSum += 1
}
var _sqlite3PcacheRefØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheRefØ00__func__Ø000[0], str(81694), 17)
-}
-
-// A call to this routine tells the pager that it is not necessary to
-// write the information on page pPg back to the disk, even though
-// that page might be marked as dirty. This happens, for example, when
-// the page has been added as a leaf of the freelist and so its
-// content no longer matters.
-//
-// The overlying software layer calls this routine when all of the data
-// on the given page is unused. The pager marks the page as clean so
-// that it does not get written to disk.
-//
-// Tests show that this optimization can quadruple the speed of large
-// DELETE operations.
-//
-// This optimization cannot be used with a temp-file, as the page may
-// have been dirty at the start of the transaction. In that case, if
-// memory pressure forces page pPg out of the cache, the data does need
-// to be written out to disk so that it may be read back in if the
-// current transaction is rolled back.
+ crt.Xstrncpy(nil, &_sqlite3PcacheRefØ00__func__Ø000[0], str(79856), 17)
+}
+
+// C comment
+// /*
+// ** A call to this routine tells the pager that it is not necessary to
+// ** write the information on page pPg back to the disk, even though
+// ** that page might be marked as dirty. This happens, for example, when
+// ** the page has been added as a leaf of the freelist and so its
+// ** content no longer matters.
+// **
+// ** The overlying software layer calls this routine when all of the data
+// ** on the given page is unused. The pager marks the page as clean so
+// ** that it does not get written to disk.
+// **
+// ** Tests show that this optimization can quadruple the speed of large
+// ** DELETE operations.
+// **
+// ** This optimization cannot be used with a temp-file, as the page may
+// ** have been dirty at the start of the transaction. In that case, if
+// ** memory pressure forces page pPg out of the cache, the data does need
+// ** to be written out to disk so that it may be read back in if the
+// ** current transaction is rolled back.
+// */
func _sqlite3PagerDontWrite(tls *crt.TLS, _pPg *XPgHdr) {
var _pPager *XPager
- _pPager = (*XPager)(_pPg.X4)
- if (((_pPager.X10) == 0) && (int32(_pPg.X6)&i32(2)) != 0) && ((_pPager.X38) == i32(0)) {
+ _pPager = (*XPager)(_pPg.XpPager)
+ if ((_pPager.XtempFile == 0) && (int32(_pPg.Xflags)&int32(2)) != 0) && (_pPager.XnSavepoint == int32(0)) {
{
- p := (*uint16)(unsafe.Pointer(&(_pPg.X6)))
- *p = uint16(int32(*p) | i32(16))
- sink14(*p)
+ p := &_pPg.Xflags
+ *p = uint16(int32(*p) | int32(16))
}
{
- p := (*uint16)(unsafe.Pointer(&(_pPg.X6)))
- *p = uint16(int32(*p) & i32(-5))
- sink14(*p)
- }
- }
-}
-
-// Set bit pgno of the BtShared.pHasContent bitvec. This is called
-// when a page that previously contained data becomes a free-list leaf
-// page.
-//
-// The BtShared.pHasContent bitvec exists to work around an obscure
-// bug caused by the interaction of two useful IO optimizations surrounding
-// free-list leaf pages:
-//
-// 1) When all data is deleted from a page and the page becomes
-// a free-list leaf page, the page is not written to the database
-// (as free-list leaf pages contain no meaningful data). Sometimes
-// such a page is not even journalled (as it will not be modified,
-// why bother journalling it?).
-//
-// 2) When a free-list leaf page is reused, its content is not read
-// from the database or written to the journal file (why should it
-// be, if it is not at all meaningful?).
-//
-// By themselves, these optimizations work fine and provide a handy
-// performance boost to bulk delete or insert operations. However, if
-// a page is moved to the free-list and then reused within the same
-// transaction, a problem comes up. If the page is not journalled when
-// it is moved to the free-list and it is also not journalled when it
-// is extracted from the free-list and reused, then the original data
-// may be lost. In the event of a rollback, it may not be possible
-// to restore the database to its original configuration.
-//
-// The solution is the BtShared.pHasContent bitvec. Whenever a page is
-// moved to become a free-list leaf page, the corresponding bit is
-// set in the bitvec. Whenever a leaf page is extracted from the free-list,
-// optimization 2 above is omitted if the corresponding bit is already
-// set in BtShared.pHasContent. The contents of the bitvec are cleared
-// at the end of every transaction.
+ p := &_pPg.Xflags
+ *p = uint16(int32(*p) & int32(-5))
+ }
+ }
+}
+
+// C comment
+// /*
+// ** Set bit pgno of the BtShared.pHasContent bitvec. This is called
+// ** when a page that previously contained data becomes a free-list leaf
+// ** page.
+// **
+// ** The BtShared.pHasContent bitvec exists to work around an obscure
+// ** bug caused by the interaction of two useful IO optimizations surrounding
+// ** free-list leaf pages:
+// **
+// ** 1) When all data is deleted from a page and the page becomes
+// ** a free-list leaf page, the page is not written to the database
+// ** (as free-list leaf pages contain no meaningful data). Sometimes
+// ** such a page is not even journalled (as it will not be modified,
+// ** why bother journalling it?).
+// **
+// ** 2) When a free-list leaf page is reused, its content is not read
+// ** from the database or written to the journal file (why should it
+// ** be, if it is not at all meaningful?).
+// **
+// ** By themselves, these optimizations work fine and provide a handy
+// ** performance boost to bulk delete or insert operations. However, if
+// ** a page is moved to the free-list and then reused within the same
+// ** transaction, a problem comes up. If the page is not journalled when
+// ** it is moved to the free-list and it is also not journalled when it
+// ** is extracted from the free-list and reused, then the original data
+// ** may be lost. In the event of a rollback, it may not be possible
+// ** to restore the database to its original configuration.
+// **
+// ** The solution is the BtShared.pHasContent bitvec. Whenever a page is
+// ** moved to become a free-list leaf page, the corresponding bit is
+// ** set in the bitvec. Whenever a leaf page is extracted from the free-list,
+// ** optimization 2 above is omitted if the corresponding bit is already
+// ** set in BtShared.pHasContent. The contents of the bitvec are cleared
+// ** at the end of every transaction.
+// */
func _btreeSetHasContent(tls *crt.TLS, _pBt *XBtShared, _pgno uint32) (r0 int32) {
var _rc int32
- _rc = i32(0)
- if (*XBitvec)(_pBt.X22) != nil {
+ _rc = int32(0)
+ if _pBt.XpHasContent != nil {
goto _0
}
func() {
- if _pgno > (_pBt.X18) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59597), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeSetHasContentØ00__func__Ø000))), unsafe.Pointer(str(81711)))
+ if _pgno > _pBt.XnPage {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59597), unsafe.Pointer(&_btreeSetHasContentØ00__func__Ø000), unsafe.Pointer(str(79873)))
crt.X__builtin_abort(tls)
}
}()
- *(**XBitvec)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X22))))) = _sqlite3BitvecCreate(tls, _pBt.X18)
- if (*XBitvec)(_pBt.X22) == nil {
- _rc = _sqlite3NomemError(tls, i32(59600))
+ *(**XBitvec)(unsafe.Pointer(&_pBt.XpHasContent)) = _sqlite3BitvecCreate(tls, _pBt.XnPage)
+ if _pBt.XpHasContent == nil {
+ _rc = _sqlite3NomemError(tls, int32(59600))
}
_0:
- if (_rc == i32(0)) && (_pgno <= _sqlite3BitvecSize(tls, (*XBitvec)(_pBt.X22))) {
- _rc = _sqlite3BitvecSet(tls, (*XBitvec)(_pBt.X22), _pgno)
+ if (_rc == int32(0)) && (_pgno <= _sqlite3BitvecSize(tls, (*XBitvec)(_pBt.XpHasContent))) {
+ _rc = _sqlite3BitvecSet(tls, (*XBitvec)(_pBt.XpHasContent), _pgno)
}
return _rc
}
@@ -61604,15 +61402,18 @@ _0:
var _btreeSetHasContentØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_btreeSetHasContentØ00__func__Ø000[0], str(81728), 19)
+ crt.Xstrncpy(nil, &_btreeSetHasContentØ00__func__Ø000[0], str(79890), 19)
}
-// Remove the i-th cell from pPage. This routine effects pPage only.
-// The cell content is not freed or deallocated. It is assumed that
-// the cell content has been copied someplace else. This routine just
-// removes the reference to the cell from pPage.
-//
-// "sz" must be the number of bytes in the cell.
+// C comment
+// /*
+// ** Remove the i-th cell from pPage. This routine effects pPage only.
+// ** The cell content is not freed or deallocated. It is assumed that
+// ** the cell content has been copied someplace else. This routine just
+// ** removes the reference to the cell from pPage.
+// **
+// ** "sz" must be the number of bytes in the cell.
+// */
func _dropCell(tls *crt.TLS, _pPage *XMemPage, _idx int32, _sz int32, _pRC *int32) {
var _rc, _hdr int32
var _pc uint32
@@ -61621,35 +61422,35 @@ func _dropCell(tls *crt.TLS, _pPage *XMemPage, _idx int32, _sz int32, _pRC *int3
return
}
func() {
- if _idx < i32(0) || _idx >= int32(_pPage.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65400), unsafe.Pointer((*int8)(unsafe.Pointer(&_dropCellØ00__func__Ø000))), unsafe.Pointer(str(81747)))
+ if _idx < int32(0) || _idx >= int32(_pPage.XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65400), unsafe.Pointer(&_dropCellØ00__func__Ø000), unsafe.Pointer(str(79909)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_sqlite3Config.X6) != i32(0) && _sz != int32(_cellSize(tls, _pPage, _idx)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65401), unsafe.Pointer((*int8)(unsafe.Pointer(&_dropCellØ00__func__Ø000))), unsafe.Pointer(str(81774)))
+ if _sqlite3Config.XneverCorrupt != int32(0) && _sz != int32(_cellSize(tls, _pPage, _idx)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65401), unsafe.Pointer(&_dropCellØ00__func__Ø000), unsafe.Pointer(str(79936)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65402), unsafe.Pointer((*int8)(unsafe.Pointer(&_dropCellØ00__func__Ø000))), unsafe.Pointer(str(53334)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65402), unsafe.Pointer(&_dropCellØ00__func__Ø000), unsafe.Pointer(str(53310)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65403), unsafe.Pointer((*int8)(unsafe.Pointer(&_dropCellØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65403), unsafe.Pointer(&_dropCellØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
- _data = _pPage.X19
- _ptr = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21)) + 1*uintptr(i32(2)*_idx)))
- _pc = uint32((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_ptr)) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_ptr)) + 1*uintptr(i32(1))))))
- _hdr = int32(_pPage.X6)
- if (_pc < uint32((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1))))))) || ((_pc + uint32(_sz)) > ((*XBtShared)(_pPage.X18).X16)) {
- *_pRC = _sqlite3CorruptError(tls, i32(65411))
+ _data = _pPage.XaData
+ _ptr = elem15(_pPage.XaCellIdx, uintptr(int32(2)*_idx))
+ _pc = uint32((int32(*elem15(_ptr, 0)) << 8) | int32(*elem15(_ptr, uintptr(1))))
+ _hdr = int32(_pPage.XhdrOffset)
+ if (_pc < uint32((int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), 0))<<8)|int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), uintptr(1))))) || ((_pc + uint32(_sz)) > ((*XBtShared)(_pPage.XpBt).XusableSize)) {
+ *_pRC = _sqlite3CorruptError(tls, int32(65411))
return
}
_rc = _freeSpace(tls, _pPage, uint16(_pc), uint16(_sz))
@@ -61657,26 +61458,25 @@ func _dropCell(tls *crt.TLS, _pPage *XMemPage, _idx int32, _sz int32, _pRC *int3
*_pRC = _rc
return
}
- *(*uint16)(unsafe.Pointer(&(_pPage.X14))) -= 1
- if int32(_pPage.X14) == i32(0) {
- crt.Xmemset(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(1))))), i32(0), uint32(i32(4)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(7)))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0)))) = uint8(((*XBtShared)(_pPage.X18).X16) >> uint(i32(8)))
+ _pPage.XnCell -= 1
+ if int32(_pPage.XnCell) == int32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(elem15(_data, uintptr(_hdr+int32(1)))), int32(0), uint32(4))
+ *elem15(_data, uintptr(_hdr+int32(7))) = 0
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_data, uintptr(_hdr+int32(5))), 0) = uint8(((*XBtShared)(_pPage.XpBt).XusableSize) >> 8)
return _data
- }()))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))) = uint8((*XBtShared)(_pPage.X18).X16)
- *(*uint16)(unsafe.Pointer(&(_pPage.X13))) = uint16(((((*XBtShared)(_pPage.X18).X16) - uint32(_pPage.X6)) - uint32(_pPage.X7)) - uint32(i32(8)))
+ }(), uintptr(_hdr+int32(5))), uintptr(1)) = uint8((*XBtShared)(_pPage.XpBt).XusableSize)
+ _pPage.XnFree = uint16(((((*XBtShared)(_pPage.XpBt).XusableSize) - uint32(_pPage.XhdrOffset)) - uint32(_pPage.XchildPtrSize)) - uint32(8))
goto _15
}
- crt.Xmemmove(tls, (unsafe.Pointer)(_ptr), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_ptr))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2))))))))), uint32(i32(2)*(int32(_pPage.X14)-_idx)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(0)))) = uint8(int32(_pPage.X14) >> uint(i32(8)))
+ crt.Xmemmove(tls, unsafe.Pointer(_ptr), unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_ptr))+uintptr(int32(2))))), uint32(int32(2)*(int32(_pPage.XnCell)-_idx)))
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_data, uintptr(_hdr+int32(3))), 0) = uint8(int32(_pPage.XnCell) >> 8)
return _data
- }()))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(1)))) = uint8(_pPage.X14)
+ }(), uintptr(_hdr+int32(3))), uintptr(1)) = uint8(_pPage.XnCell)
{
- p := (*uint16)(unsafe.Pointer(&(_pPage.X13)))
- *p = uint16(int32(*p) + i32(2))
- sink14(*p)
+ p := &_pPage.XnFree
+ *p = uint16(int32(*p) + int32(2))
}
_15:
}
@@ -61684,309 +61484,312 @@ _15:
var _dropCellØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_dropCellØ00__func__Ø000[0], str(81813), 9)
+ crt.Xstrncpy(nil, &_dropCellØ00__func__Ø000[0], str(79975), 9)
}
-// This variation on cellSizePtr() is used inside of assert() statements
-// only.
+// C comment
+// /* This variation on cellSizePtr() is used inside of assert() statements
+// ** only. */
func _cellSize(tls *crt.TLS, _pPage *XMemPage, _iCell int32) (r0 uint16) {
- return (*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pPage.X24)})))(tls, _pPage, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_iCell))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_iCell))))) + 1*uintptr(i32(1))))))))))))))
-}
-
-// Return a section of the pPage->aData to the freelist.
-// The first byte of the new free block is pPage->aData[iStart]
-// and the size of the block is iSize bytes.
-//
-// Adjacent freeblocks are coalesced.
-//
-// Note that even though the freeblock list was checked by btreeInitPage(),
-// that routine will not detect overlap between cells or freeblocks. Nor
-// does it detect cells or freeblocks that encrouch into the reserved bytes
-// at the end of the page. So do additional corruption checks inside this
-// routine and return SQLITE_CORRUPT if any problems are found.
+ return func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pPage.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pPage, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData))+uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_iCell)), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_iCell)), uintptr(1))))))))
+}
+
+// C comment
+// /*
+// ** Return a section of the pPage->aData to the freelist.
+// ** The first byte of the new free block is pPage->aData[iStart]
+// ** and the size of the block is iSize bytes.
+// **
+// ** Adjacent freeblocks are coalesced.
+// **
+// ** Note that even though the freeblock list was checked by btreeInitPage(),
+// ** that routine will not detect overlap between cells or freeblocks. Nor
+// ** does it detect cells or freeblocks that encrouch into the reserved bytes
+// ** at the end of the page. So do additional corruption checks inside this
+// ** routine and return SQLITE_CORRUPT if any problems are found.
+// */
func _freeSpace(tls *crt.TLS, _pPage *XMemPage, _iStart uint16, _iSize uint16) (r0 int32) {
var _7_iPtrEnd int32
var _iLast, _iEnd uint32
var _iPtr, _iFreeBlk, _iOrigSize uint16
var _hdr, _nFrag uint8
var _data *uint8
- _nFrag = u8(0)
+ _nFrag = uint8(0)
_iOrigSize = _iSize
- _iLast = ((*XBtShared)(_pPage.X18).X16) - uint32(i32(4))
+ _iLast = ((*XBtShared)(_pPage.XpBt).XusableSize) - uint32(4)
_iEnd = uint32(int32(_iStart) + int32(_iSize))
- _data = _pPage.X19
+ _data = _pPage.XaData
func() {
- if (*XBtShared)(_pPage.X18) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60667), unsafe.Pointer((*int8)(unsafe.Pointer(&_freeSpaceØ00__func__Ø000))), unsafe.Pointer(str(55360)))
+ if (*XBtShared)(_pPage.XpBt) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60667), unsafe.Pointer(&_freeSpaceØ00__func__Ø000), unsafe.Pointer(str(55336)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60668), unsafe.Pointer((*int8)(unsafe.Pointer(&_freeSpaceØ00__func__Ø000))), unsafe.Pointer(str(53334)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60668), unsafe.Pointer(&_freeSpaceØ00__func__Ø000), unsafe.Pointer(str(53310)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_sqlite3Config.X6) != i32(0) && int32(_iStart) < ((int32(_pPage.X6)+i32(6))+int32(_pPage.X7)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60669), unsafe.Pointer((*int8)(unsafe.Pointer(&_freeSpaceØ00__func__Ø000))), unsafe.Pointer(str(81822)))
+ if _sqlite3Config.XneverCorrupt != int32(0) && int32(_iStart) < ((int32(_pPage.XhdrOffset)+int32(6))+int32(_pPage.XchildPtrSize)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60669), unsafe.Pointer(&_freeSpaceØ00__func__Ø000), unsafe.Pointer(str(79984)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_sqlite3Config.X6) != i32(0) && _iEnd > ((*XBtShared)(_pPage.X18).X16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60670), unsafe.Pointer((*int8)(unsafe.Pointer(&_freeSpaceØ00__func__Ø000))), unsafe.Pointer(str(81883)))
+ if _sqlite3Config.XneverCorrupt != int32(0) && _iEnd > ((*XBtShared)(_pPage.XpBt).XusableSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60670), unsafe.Pointer(&_freeSpaceØ00__func__Ø000), unsafe.Pointer(str(80045)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60671), unsafe.Pointer((*int8)(unsafe.Pointer(&_freeSpaceØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60671), unsafe.Pointer(&_freeSpaceØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_iSize) < i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60672), unsafe.Pointer((*int8)(unsafe.Pointer(&_freeSpaceØ00__func__Ø000))), unsafe.Pointer(str(81928)))
+ if int32(_iSize) < int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60672), unsafe.Pointer(&_freeSpaceØ00__func__Ø000), unsafe.Pointer(str(80090)))
crt.X__builtin_abort(tls)
}
}()
func() {
if uint32(_iStart) > _iLast {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60673), unsafe.Pointer((*int8)(unsafe.Pointer(&_freeSpaceØ00__func__Ø000))), unsafe.Pointer(str(81937)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60673), unsafe.Pointer(&_freeSpaceØ00__func__Ø000), unsafe.Pointer(str(80099)))
crt.X__builtin_abort(tls)
}
}()
- if (int32((*XBtShared)(_pPage.X18).X10) & i32(4)) != 0 {
- crt.Xmemset(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_iStart)))), i32(0), uint32(_iSize))
+ if (int32((*XBtShared)(_pPage.XpBt).XbtsFlags) & int32(4)) != 0 {
+ crt.Xmemset(tls, unsafe.Pointer(elem15(_data, uintptr(_iStart))), int32(0), uint32(_iSize))
}
- _hdr = _pPage.X6
- _iPtr = uint16(int32(_hdr) + i32(1))
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(int32(_iPtr)+i32(1))))) == i32(0)) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_iPtr)))) == i32(0)) {
- _iFreeBlk = uint16(i32(0))
+ _hdr = _pPage.XhdrOffset
+ _iPtr = uint16(int32(_hdr) + int32(1))
+ if (int32(*elem15(_data, uintptr(int32(_iPtr)+int32(1)))) == int32(0)) && (int32(*elem15(_data, uintptr(_iPtr))) == int32(0)) {
+ _iFreeBlk = 0
goto _19
}
_20:
- if int32(store14(&_iFreeBlk, uint16((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_iPtr))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_iPtr))))) + 1*uintptr(i32(1)))))))) >= int32(_iStart) {
+ if int32(store76(&_iFreeBlk, uint16((int32(*elem15(elem15(_data, uintptr(_iPtr)), 0))<<8)|int32(*elem15(elem15(_data, uintptr(_iPtr)), uintptr(1)))))) >= int32(_iStart) {
goto _21
}
- if int32(_iFreeBlk) >= (int32(_iPtr) + i32(4)) {
+ if int32(_iFreeBlk) >= (int32(_iPtr) + int32(4)) {
goto _22
}
- if int32(_iFreeBlk) == i32(0) {
+ if int32(_iFreeBlk) == int32(0) {
goto _21
}
- return _sqlite3CorruptError(tls, i32(60692))
+ return _sqlite3CorruptError(tls, int32(60692))
_22:
_iPtr = _iFreeBlk
goto _20
_21:
if uint32(_iFreeBlk) > _iLast {
- return _sqlite3CorruptError(tls, i32(60696))
+ return _sqlite3CorruptError(tls, int32(60696))
}
func() {
- if int32(_iFreeBlk) <= int32(_iPtr) && int32(_iFreeBlk) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60697), unsafe.Pointer((*int8)(unsafe.Pointer(&_freeSpaceØ00__func__Ø000))), unsafe.Pointer(str(81951)))
+ if int32(_iFreeBlk) <= int32(_iPtr) && int32(_iFreeBlk) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60697), unsafe.Pointer(&_freeSpaceØ00__func__Ø000), unsafe.Pointer(str(80113)))
crt.X__builtin_abort(tls)
}
}()
- if _iFreeBlk == 0 || (_iEnd+uint32(i32(3))) < uint32(_iFreeBlk) {
+ if _iFreeBlk == 0 || (_iEnd+uint32(3)) < uint32(_iFreeBlk) {
goto _29
}
_nFrag = uint8(uint32(_iFreeBlk) - _iEnd)
if _iEnd > uint32(_iFreeBlk) {
- return _sqlite3CorruptError(tls, i32(60707))
+ return _sqlite3CorruptError(tls, int32(60707))
}
- _iEnd = uint32(int32(_iFreeBlk) + ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_iFreeBlk)+i32(2)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_iFreeBlk)+i32(2)))))) + 1*uintptr(i32(1)))))))
- if _iEnd > ((*XBtShared)(_pPage.X18).X16) {
- return _sqlite3CorruptError(tls, i32(60709))
+ _iEnd = uint32(int32(_iFreeBlk) + ((int32(*elem15(elem15(_data, uintptr(int32(_iFreeBlk)+int32(2))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(int32(_iFreeBlk)+int32(2))), uintptr(1)))))
+ if _iEnd > ((*XBtShared)(_pPage.XpBt).XusableSize) {
+ return _sqlite3CorruptError(tls, int32(60709))
}
_iSize = uint16(_iEnd - uint32(_iStart))
- _iFreeBlk = uint16((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_iFreeBlk))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_iFreeBlk))))) + 1*uintptr(i32(1))))))
+ _iFreeBlk = uint16((int32(*elem15(elem15(_data, uintptr(_iFreeBlk)), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_iFreeBlk)), uintptr(1))))
_29:
- if int32(_iPtr) <= (int32(_hdr) + i32(1)) {
+ if int32(_iPtr) <= (int32(_hdr) + int32(1)) {
goto _32
}
- _7_iPtrEnd = int32(_iPtr) + ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_iPtr)+i32(2)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_iPtr)+i32(2)))))) + 1*uintptr(i32(1))))))
- if (_7_iPtrEnd + i32(3)) < int32(_iStart) {
+ _7_iPtrEnd = int32(_iPtr) + ((int32(*elem15(elem15(_data, uintptr(int32(_iPtr)+int32(2))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(int32(_iPtr)+int32(2))), uintptr(1))))
+ if (_7_iPtrEnd + int32(3)) < int32(_iStart) {
goto _33
}
if _7_iPtrEnd > int32(_iStart) {
- return _sqlite3CorruptError(tls, i32(60721))
+ return _sqlite3CorruptError(tls, int32(60721))
}
{
p := &_nFrag
*p = uint8(int32(*p) + (int32(_iStart) - _7_iPtrEnd))
- sink2(*p)
}
_iSize = uint16(_iEnd - uint32(_iPtr))
_iStart = _iPtr
_33:
_32:
- if int32(_nFrag) > int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(int32(_hdr)+i32(7))))) {
- return _sqlite3CorruptError(tls, i32(60727))
+ if int32(_nFrag) > int32(*elem15(_data, uintptr(int32(_hdr)+int32(7)))) {
+ return _sqlite3CorruptError(tls, int32(60727))
}
{
- p := (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(int32(_hdr)+i32(7))))
+ p := elem15(_data, uintptr(int32(_hdr)+int32(7)))
*p = uint8(int32(*p) - int32(_nFrag))
- sink2(*p)
}
_19:
- if int32(_iStart) != ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_hdr)+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_hdr)+i32(5)))))) + 1*uintptr(i32(1)))))) {
+ if int32(_iStart) != ((int32(*elem15(elem15(_data, uintptr(int32(_hdr)+int32(5))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(int32(_hdr)+int32(5))), uintptr(1)))) {
goto _36
}
- if int32(_iPtr) != (int32(_hdr) + i32(1)) {
- return _sqlite3CorruptError(tls, i32(60734))
+ if int32(_iPtr) != (int32(_hdr) + int32(1)) {
+ return _sqlite3CorruptError(tls, int32(60734))
}
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_hdr)+i32(1)))))) + 1*uintptr(i32(0)))) = uint8(int32(_iFreeBlk) >> uint(i32(8)))
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_data, uintptr(int32(_hdr)+int32(1))), 0) = uint8(int32(_iFreeBlk) >> 8)
return _data
- }()))+1*uintptr(int32(_hdr)+i32(1)))))) + 1*uintptr(i32(1)))) = uint8(_iFreeBlk)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_hdr)+i32(5)))))) + 1*uintptr(i32(0)))) = uint8(_iEnd >> uint(i32(8)))
+ }(), uintptr(int32(_hdr)+int32(1))), uintptr(1)) = uint8(_iFreeBlk)
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_data, uintptr(int32(_hdr)+int32(5))), 0) = uint8(_iEnd >> 8)
return _data
- }()))+1*uintptr(int32(_hdr)+i32(5)))))) + 1*uintptr(i32(1)))) = uint8(_iEnd)
+ }(), uintptr(int32(_hdr)+int32(5))), uintptr(1)) = uint8(_iEnd)
goto _38
_36:
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_iPtr))))) + 1*uintptr(i32(0)))) = uint8(int32(_iStart) >> uint(i32(8)))
+ *elem15(elem15(func() *uint8 { *elem15(elem15(_data, uintptr(_iPtr)), 0) = uint8(int32(_iStart) >> 8); return _data }(), uintptr(_iPtr)), uintptr(1)) = uint8(_iStart)
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_data, uintptr(_iStart)), 0) = uint8(int32(_iFreeBlk) >> 8)
return _data
- }()))+1*uintptr(_iPtr))))) + 1*uintptr(i32(1)))) = uint8(_iStart)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_iStart))))) + 1*uintptr(i32(0)))) = uint8(int32(_iFreeBlk) >> uint(i32(8)))
+ }(), uintptr(_iStart)), uintptr(1)) = uint8(_iFreeBlk)
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_data, uintptr(int32(_iStart)+int32(2))), 0) = uint8(int32(_iSize) >> 8)
return _data
- }()))+1*uintptr(_iStart))))) + 1*uintptr(i32(1)))) = uint8(_iFreeBlk)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_iStart)+i32(2)))))) + 1*uintptr(i32(0)))) = uint8(int32(_iSize) >> uint(i32(8)))
- return _data
- }()))+1*uintptr(int32(_iStart)+i32(2)))))) + 1*uintptr(i32(1)))) = uint8(_iSize)
+ }(), uintptr(int32(_iStart)+int32(2))), uintptr(1)) = uint8(_iSize)
_38:
{
- p := (*uint16)(unsafe.Pointer(&(_pPage.X13)))
+ p := &_pPage.XnFree
*p = uint16(int32(*p) + int32(_iOrigSize))
- sink14(*p)
}
- return i32(0)
+ return int32(0)
}
var _freeSpaceØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_freeSpaceØ00__func__Ø000[0], str(81980), 10)
-}
-
-// Insert a new cell on pPage at cell index "i". pCell points to the
-// content of the cell.
-//
-// If the cell content will fit on the page, then put it there. If it
-// will not fit, then make a copy of the cell content into pTemp if
-// pTemp is not null. Regardless of pTemp, allocate a new entry
-// in pPage->apOvfl[] and make it point to the cell content (either
-// in pTemp or the original pCell) and also record its index.
-// Allocating a new entry in pPage->aCell[] implies that
-// pPage->nOverflow is incremented.
-//
-// *pRC must be SQLITE_OK when this routine is called.
+ crt.Xstrncpy(nil, &_freeSpaceØ00__func__Ø000[0], str(80142), 10)
+}
+
+// C comment
+// /*
+// ** Insert a new cell on pPage at cell index "i". pCell points to the
+// ** content of the cell.
+// **
+// ** If the cell content will fit on the page, then put it there. If it
+// ** will not fit, then make a copy of the cell content into pTemp if
+// ** pTemp is not null. Regardless of pTemp, allocate a new entry
+// ** in pPage->apOvfl[] and make it point to the cell content (either
+// ** in pTemp or the original pCell) and also record its index.
+// ** Allocating a new entry in pPage->aCell[] implies that
+// ** pPage->nOverflow is incremented.
+// **
+// ** *pRC must be SQLITE_OK when this routine is called.
+// */
func _insertCell(tls *crt.TLS, _pPage *XMemPage, _i int32, _pCell *uint8, _sz int32, _pTemp *uint8, _iChild uint32, _pRC *int32) {
var _idx, _j, _4_rc int32
var _data, _pIns *uint8
- _idx = i32(0)
+ _idx = int32(0)
func() {
- if (*_pRC) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65461), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(81990)))
+ if (*_pRC) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65461), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80152)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _i < i32(0) || _i > (int32(_pPage.X14)+int32(_pPage.X9)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65462), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82006)))
+ if _i < int32(0) || _i > (int32(_pPage.XnCell)+int32(_pPage.XnOverflow)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65462), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80168)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((((*XBtShared)(_pPage.X18).X15) - uint32(i32(8))) / uint32(i32(6))) > uint32(i32(10921)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65463), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82047)))
+ if ((((*XBtShared)(_pPage.XpBt).XpageSize) - uint32(8)) / uint32(6)) > uint32(10921) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65463), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80209)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uint32(_pPage.X14) > ((((*XBtShared)(_pPage.X18).X15)-uint32(i32(8)))/uint32(i32(6))) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65464), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82074)))
+ if uint32(_pPage.XnCell) > ((((*XBtShared)(_pPage.XpBt).XpageSize)-uint32(8))/uint32(6)) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65464), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80236)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X9) > i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65465), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82122)))
+ if int32(_pPage.XnOverflow) > int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65465), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80284)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
+
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65467), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65467), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sz != int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pPage.X24)})))(tls, _pPage, _pCell)) && (_sz != i32(8) || _iChild <= uint32(i32(0))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65473), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82165)))
+ if _sz != int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pPage.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pPage, _pCell)) && (_sz != int32(8) || _iChild <= (0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65473), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80327)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPage.X9) == 0 && (_sz+i32(2)) <= int32(_pPage.X13) {
+ if _pPage.XnOverflow == 0 && (_sz+int32(2)) <= int32(_pPage.XnFree) {
goto _19
}
if _pTemp != nil {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pTemp), (unsafe.Pointer)(_pCell), uint32(_sz))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pTemp), unsafe.Pointer(_pCell), uint32(_sz))
_pCell = _pTemp
}
if _iChild != 0 {
_sqlite3Put4byte(tls, _pCell, _iChild)
}
- _j = int32(postInc2((*uint8)(unsafe.Pointer(&(_pPage.X9))), uint8(1)))
+ _j = int32(postInc3(&_pPage.XnOverflow, byte(1)))
func() {
- if _j >= i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65486), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82223)))
+ if _j >= int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65486), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80385)))
crt.X__builtin_abort(tls)
}
}()
- *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]*uint8)(unsafe.Pointer(&(_pPage.X17))))) + 4*uintptr(_j))) = _pCell
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_pPage.X16))))) + 2*uintptr(_j))) = uint16(_i)
+ *elem88((**uint8)(unsafe.Pointer(&_pPage.XapOvfl)), uintptr(_j)) = _pCell
+ *elem20((*uint16)(unsafe.Pointer(&_pPage.XaiOvfl)), uintptr(_j)) = uint16(_i)
func() {
- if _j != i32(0) && int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_pPage.X16))))) + 2*uintptr(_j-i32(1))))) >= int32(uint16(_i)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65495), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82254)))
+ if _j != int32(0) && int32(*elem20((*uint16)(unsafe.Pointer(&_pPage.XaiOvfl)), uintptr(_j-int32(1)))) >= int32(uint16(_i)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65495), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80416)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _j != i32(0) && _i != (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_pPage.X16))))) + 2*uintptr(_j-i32(1)))))+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65496), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82288)))
+ if _j != int32(0) && _i != (int32(*elem20((*uint16)(unsafe.Pointer(&_pPage.XaiOvfl)), uintptr(_j-int32(1))))+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65496), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80450)))
crt.X__builtin_abort(tls)
}
}()
goto _30
_19:
- _4_rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.X23))
- if _4_rc != i32(0) {
+ _4_rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.XpDbPage))
+ if _4_rc != int32(0) {
*_pRC = _4_rc
return
}
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65503), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(53334)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65503), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(53310)))
crt.X__builtin_abort(tls)
}
}()
- _data = _pPage.X19
+ _data = _pPage.XaData
func() {
- if (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_pPage.X12))) != (_pPage.X21) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65505), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82320)))
+ if elem15(_data, uintptr(_pPage.XcellOffset)) != _pPage.XaCellIdx {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65505), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80482)))
crt.X__builtin_abort(tls)
}
}()
@@ -61996,49 +61799,45 @@ _19:
return
}
func() {
- if _idx < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65510), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82362)))
+ if _idx < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65510), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80524)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _idx < ((int32(_pPage.X12)+(i32(2)*int32(_pPage.X14)))+i32(2)) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65511), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82371)))
+ if _idx < ((int32(_pPage.XcellOffset)+(int32(2)*int32(_pPage.XnCell)))+int32(2)) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65511), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80533)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_idx + _sz) > int32((*XBtShared)(_pPage.X18).X16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65512), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82427)))
+ if (_idx + _sz) > int32((*XBtShared)(_pPage.XpBt).XusableSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65512), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80589)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&(_pPage.X13)))
- *p = uint16(int32(*p) - int32(uint16(i32(2)+_sz)))
- sink14(*p)
+ p := &_pPage.XnFree
+ *p = uint16(int32(*p) - int32(uint16(int32(2)+_sz)))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_idx)))), (unsafe.Pointer)(_pCell), uint32(_sz))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_data, uintptr(_idx))), unsafe.Pointer(_pCell), uint32(_sz))
if _iChild != 0 {
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_idx))), _iChild)
+ _sqlite3Put4byte(tls, elem15(_data, uintptr(_idx)), _iChild)
}
- _pIns = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X21)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_i*i32(2))))))))
- crt.Xmemmove(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pIns))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2))))))))), (unsafe.Pointer)(_pIns), uint32(i32(2)*(int32(_pPage.X14)-_i)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIns)) + 1*uintptr(i32(0)))) = uint8(_idx >> uint(i32(8)))
- return _pIns
- }())) + 1*uintptr(i32(1)))) = uint8(_idx)
- *(*uint16)(unsafe.Pointer(&(_pPage.X14))) += 1
- if int32(preInc2((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_pPage.X6)+i32(4)))), byte(1))) == i32(0) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(int32(_pPage.X6)+i32(3)))) += 1
+ _pIns = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaCellIdx)) + uintptr(_i*int32(2))))
+ crt.Xmemmove(tls, unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pIns))+uintptr(int32(2))))), unsafe.Pointer(_pIns), uint32(int32(2)*(int32(_pPage.XnCell)-_i)))
+ *elem15(func() *uint8 { *elem15(_pIns, 0) = uint8(_idx >> 8); return _pIns }(), uintptr(1)) = uint8(_idx)
+ _pPage.XnCell += 1
+ if int32(preInc3(elem15(_data, uintptr(int32(_pPage.XhdrOffset)+int32(4))), byte(1))) == int32(0) {
+ *elem15(_data, uintptr(int32(_pPage.XhdrOffset)+int32(3))) += 1
}
func() {
- if ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_pPage.X6)+i32(3)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(int32(_pPage.X6)+i32(3)))))) + 1*uintptr(i32(1)))))) != int32(_pPage.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65524), unsafe.Pointer((*int8)(unsafe.Pointer(&_insertCellØ00__func__Ø000))), unsafe.Pointer(str(82465)))
+ if ((int32(*elem15(elem15(_data, uintptr(int32(_pPage.XhdrOffset)+int32(3))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(int32(_pPage.XhdrOffset)+int32(3))), uintptr(1)))) != int32(_pPage.XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65524), unsafe.Pointer(&_insertCellØ00__func__Ø000), unsafe.Pointer(str(80627)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XBtShared)(_pPage.X18).X5) != 0 {
+ if ((*XBtShared)(_pPage.XpBt).XautoVacuum) != 0 {
_ptrmapPutOvflPtr(tls, _pPage, _pCell, _pRC)
}
_30:
@@ -62047,231 +61846,226 @@ _30:
var _insertCellØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_insertCellØ00__func__Ø000[0], str(82515), 11)
+ crt.Xstrncpy(nil, &_insertCellØ00__func__Ø000[0], str(80677), 11)
}
-// Allocate nByte bytes of space from within the B-Tree page passed
-// as the first argument. Write into *pIdx the index into pPage->aData[]
-// of the first byte of allocated space. Return either SQLITE_OK or
-// an error code (usually SQLITE_CORRUPT).
-//
-// The caller guarantees that there is sufficient space to make the
-// allocation. This routine might need to defragment in order to bring
-// all the space together, however. This routine will avoid using
-// the first two bytes past the cell pointer area since presumably this
-// allocation is being made in order to insert a new cell, so we will
-// also end up needing a new cell pointer.
+// C comment
+// /*
+// ** Allocate nByte bytes of space from within the B-Tree page passed
+// ** as the first argument. Write into *pIdx the index into pPage->aData[]
+// ** of the first byte of allocated space. Return either SQLITE_OK or
+// ** an error code (usually SQLITE_CORRUPT).
+// **
+// ** The caller guarantees that there is sufficient space to make the
+// ** allocation. This routine might need to defragment in order to bring
+// ** all the space together, however. This routine will avoid using
+// ** the first two bytes past the cell pointer area since presumably this
+// ** allocation is being made in order to insert a new cell, so we will
+// ** also end up needing a new cell pointer.
+// */
func _allocateSpace(tls *crt.TLS, _pPage *XMemPage, _nByte int32, _pIdx *int32) (r0 int32) {
var _hdr, _top, _rc, _gap int32
var _data, _4_pSpace *uint8
- _hdr = int32(_pPage.X6)
- _data = _pPage.X19
- _rc = i32(0)
+ _hdr = int32(_pPage.XhdrOffset)
+ _data = _pPage.XaData
+ _rc = int32(0)
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60574), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(53334)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60574), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(53310)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtShared)(_pPage.X18) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60575), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(20307)))
+ if _pPage.XpBt == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60575), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(20262)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60576), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60576), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nByte < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60577), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82526)))
+ if _nByte < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60577), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80688)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X13) < _nByte {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60578), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82535)))
+ if int32(_pPage.XnFree) < _nByte {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60578), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80697)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X9) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60579), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82555)))
+ if int32(_pPage.XnOverflow) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60579), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80717)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nByte >= int32(((*XBtShared)(_pPage.X18).X16)-uint32(i32(8))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60580), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82575)))
+ if _nByte >= int32(((*XBtShared)(_pPage.XpBt).XusableSize)-uint32(8)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60580), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80737)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X12) != ((_hdr + i32(12)) - (i32(4) * int32(_pPage.X5))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60582), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82615)))
+ if int32(_pPage.XcellOffset) != ((_hdr + int32(12)) - (int32(4) * int32(_pPage.Xleaf))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60582), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80777)))
crt.X__builtin_abort(tls)
}
}()
- _gap = int32(_pPage.X12) + (i32(2) * int32(_pPage.X14))
+ _gap = int32(_pPage.XcellOffset) + (int32(2) * int32(_pPage.XnCell))
func() {
- if _gap > i32(65536) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60584), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82661)))
+ if _gap > int32(65536) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60584), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80823)))
crt.X__builtin_abort(tls)
}
}()
- _top = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))))
+ _top = (int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), uintptr(1)))
func() {
- if _top > int32((*XBtShared)(_pPage.X18).X16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60591), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82672)))
+ if _top > int32((*XBtShared)(_pPage.XpBt).XusableSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60591), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80834)))
crt.X__builtin_abort(tls)
}
}()
if _gap <= _top {
goto _20
}
- if (_top == i32(0)) && (((*XBtShared)(_pPage.X18).X16) == uint32(i32(65536))) {
- _top = i32(65536)
+ if (_top == int32(0)) && (((*XBtShared)(_pPage.XpBt).XusableSize) == uint32(65536)) {
+ _top = int32(65536)
goto _23
}
- return _sqlite3CorruptError(tls, i32(60596))
+ return _sqlite3CorruptError(tls, int32(60596))
_23:
_20:
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(2))))) == 0 && (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(1))))) == 0 || (_gap+i32(2)) > _top {
+ if (*elem15(_data, uintptr(_hdr+int32(2)))) == 0 && (*elem15(_data, uintptr(_hdr+int32(1)))) == 0 || (_gap+int32(2)) > _top {
goto _26
}
_4_pSpace = _pageFindSlot(tls, _pPage, _nByte, &_rc)
if _4_pSpace != nil {
func() {
- if uintptr(unsafe.Pointer(_4_pSpace)) < uintptr(unsafe.Pointer(_data)) || int32((uintptr(unsafe.Pointer(_4_pSpace))-uintptr(unsafe.Pointer(_data)))/1) >= i32(65536) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60610), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82705)))
+ if crt.P2U(unsafe.Pointer(_4_pSpace)) < crt.P2U(unsafe.Pointer(_data)) || int32(uintptr(unsafe.Pointer(_4_pSpace))-uintptr(unsafe.Pointer(_data))) >= int32(65536) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60610), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80867)))
crt.X__builtin_abort(tls)
}
}()
- *_pIdx = int32((uintptr(unsafe.Pointer(_4_pSpace)) - uintptr(unsafe.Pointer(_data))) / 1)
- return i32(0)
+ *_pIdx = int32(uintptr(unsafe.Pointer(_4_pSpace)) - uintptr(unsafe.Pointer(_data)))
+ return int32(0)
}
if _rc != 0 {
return _rc
}
_26:
- if ((_gap + i32(2)) + _nByte) <= _top {
+ if ((_gap + int32(2)) + _nByte) <= _top {
goto _33
}
func() {
- if int32(_pPage.X14) <= i32(0) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60623), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82743)))
+ if int32(_pPage.XnCell) <= int32(0) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60623), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80905)))
crt.X__builtin_abort(tls)
}
}()
_rc = _defragmentPage(tls, _pPage, func() int32 {
- if i32(4) < (int32(_pPage.X13) - (i32(2) + _nByte)) {
- return i32(4)
+ if int32(4) < (int32(_pPage.XnFree) - (int32(2) + _nByte)) {
+ return int32(4)
}
- return (int32(_pPage.X13) - (i32(2) + _nByte))
+ return (int32(_pPage.XnFree) - (int32(2) + _nByte))
}())
if _rc != 0 {
return _rc
}
- _top = ((((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))))) - i32(1)) & i32(65535)) + i32(1)
+ _top = ((((int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), uintptr(1)))) - int32(1)) & int32(65535)) + int32(1)
func() {
- if ((_gap + i32(2)) + _nByte) > _top {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60627), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82772)))
+ if ((_gap + int32(2)) + _nByte) > _top {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60627), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80934)))
crt.X__builtin_abort(tls)
}
}()
_33:
- {
- p := &_top
- *p = (*p) - _nByte
- sink1(*p)
- }
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0)))) = uint8(_top >> uint(i32(8)))
- return _data
- }()))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))) = uint8(_top)
+ _top -= _nByte
+ *elem15(elem15(func() *uint8 { *elem15(elem15(_data, uintptr(_hdr+int32(5))), 0) = uint8(_top >> 8); return _data }(), uintptr(_hdr+int32(5))), uintptr(1)) = uint8(_top)
func() {
- if (_top + _nByte) > int32((*XBtShared)(_pPage.X18).X16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60639), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateSpaceØ00__func__Ø000))), unsafe.Pointer(str(82789)))
+ if (_top + _nByte) > int32((*XBtShared)(_pPage.XpBt).XusableSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60639), unsafe.Pointer(&_allocateSpaceØ00__func__Ø000), unsafe.Pointer(str(80951)))
crt.X__builtin_abort(tls)
}
}()
*_pIdx = _top
- return i32(0)
+ return int32(0)
}
var _allocateSpaceØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_allocateSpaceØ00__func__Ø000[0], str(82830), 14)
-}
-
-// Search the free-list on page pPg for space to store a cell nByte bytes in
-// size. If one can be found, return a pointer to the space and remove it
-// from the free-list.
-//
-// If no suitable space can be found on the free-list, return NULL.
-//
-// This function may detect corruption within pPg. If corruption is
-// detected then *pRc is set to SQLITE_CORRUPT and NULL is returned.
-//
-// Slots on the free list that are between 1 and 3 bytes larger than nByte
-// will be ignored if adding the extra space to the fragmentation count
-// causes the fragmentation count to exceed 60.
+ crt.Xstrncpy(nil, &_allocateSpaceØ00__func__Ø000[0], str(80992), 14)
+}
+
+// C comment
+// /*
+// ** Search the free-list on page pPg for space to store a cell nByte bytes in
+// ** size. If one can be found, return a pointer to the space and remove it
+// ** from the free-list.
+// **
+// ** If no suitable space can be found on the free-list, return NULL.
+// **
+// ** This function may detect corruption within pPg. If corruption is
+// ** detected then *pRc is set to SQLITE_CORRUPT and NULL is returned.
+// **
+// ** Slots on the free list that are between 1 and 3 bytes larger than nByte
+// ** will be ignored if adding the extra space to the fragmentation count
+// ** causes the fragmentation count to exceed 60.
+// */
func _pageFindSlot(tls *crt.TLS, _pPg *XMemPage, _nByte int32, _pRc *int32) (r0 *uint8) {
var _hdr, _iAddr, _pc, _x, _usableSize, _1_size int32
var _aData *uint8
- _hdr = int32(_pPg.X6)
- _aData = _pPg.X19
- _iAddr = _hdr + i32(1)
- _pc = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_iAddr))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_iAddr))))) + 1*uintptr(i32(1)))))
- _usableSize = int32((*XBtShared)(_pPg.X18).X16)
+ _hdr = int32(_pPg.XhdrOffset)
+ _aData = _pPg.XaData
+ _iAddr = _hdr + int32(1)
+ _pc = (int32(*elem15(elem15(_aData, uintptr(_iAddr)), 0)) << 8) | int32(*elem15(elem15(_aData, uintptr(_iAddr)), uintptr(1)))
+ _usableSize = int32((*XBtShared)(_pPg.XpBt).XusableSize)
func() {
- if _pc <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60512), unsafe.Pointer((*int8)(unsafe.Pointer(&_pageFindSlotØ00__func__Ø000))), unsafe.Pointer(str(82844)))
+ if _pc <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60512), unsafe.Pointer(&_pageFindSlotØ00__func__Ø000), unsafe.Pointer(str(81006)))
crt.X__builtin_abort(tls)
}
}()
_2:
- if (_pc > (_usableSize - i32(4))) || (_pc < (_iAddr + i32(4))) {
- *_pRc = _sqlite3CorruptError(tls, i32(60518))
+ if (_pc > (_usableSize - int32(4))) || (_pc < (_iAddr + int32(4))) {
+ *_pRc = _sqlite3CorruptError(tls, int32(60518))
return nil
}
- _1_size = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_pc+i32(2)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_pc+i32(2)))))) + 1*uintptr(i32(1)))))
- if store1(&_x, _1_size-_nByte) < i32(0) {
+ _1_size = (int32(*elem15(elem15(_aData, uintptr(_pc+int32(2))), 0)) << 8) | int32(*elem15(elem15(_aData, uintptr(_pc+int32(2))), uintptr(1)))
+ if store2(&_x, _1_size-_nByte) < int32(0) {
goto _5
}
- if (_pc < (int32(_pPg.X12) + (i32(2) * int32(_pPg.X14)))) || ((_1_size + _pc) > _usableSize) {
- *_pRc = _sqlite3CorruptError(tls, i32(60529))
+ if (_pc < (int32(_pPg.XcellOffset) + (int32(2) * int32(_pPg.XnCell)))) || ((_1_size + _pc) > _usableSize) {
+ *_pRc = _sqlite3CorruptError(tls, int32(60529))
return nil
}
- if _x >= i32(4) {
+ if _x >= int32(4) {
goto _9
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(_hdr+i32(7))))) > i32(57) {
+ if int32(*elem15(_aData, uintptr(_hdr+int32(7)))) > int32(57) {
return nil
}
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_iAddr)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_pc)))), uint32(i32(2)))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_aData, uintptr(_iAddr))), unsafe.Pointer(elem15(_aData, uintptr(_pc))), uint32(2))
{
- p := (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(_hdr+i32(7))))
+ p := elem15(_aData, uintptr(_hdr+int32(7)))
*p = uint8(int32(*p) + int32(uint8(_x)))
- sink2(*p)
}
goto _11
_9:
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_pc+i32(2)))))) + 1*uintptr(i32(0)))) = uint8(_x >> uint(i32(8)))
- return _aData
- }()))+1*uintptr(_pc+i32(2)))))) + 1*uintptr(i32(1)))) = uint8(_x)
+ *elem15(elem15(func() *uint8 { *elem15(elem15(_aData, uintptr(_pc+int32(2))), 0) = uint8(_x >> 8); return _aData }(), uintptr(_pc+int32(2))), uintptr(1)) = uint8(_x)
_11:
- return (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(_pc+_x)))
+ return elem15(_aData, uintptr(_pc+_x))
_5:
_iAddr = _pc
- _pc = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_pc))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_pc))))) + 1*uintptr(i32(1)))))
+ _pc = (int32(*elem15(elem15(_aData, uintptr(_pc)), 0)) << 8) | int32(*elem15(elem15(_aData, uintptr(_pc)), uintptr(1)))
if _pc != 0 {
goto _2
}
@@ -62281,151 +62075,140 @@ _5:
var _pageFindSlotØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_pageFindSlotØ00__func__Ø000[0], str(82849), 13)
+ crt.Xstrncpy(nil, &_pageFindSlotØ00__func__Ø000[0], str(81011), 13)
}
-// Defragment the page given. This routine reorganizes cells within the
-// page so that there are no free-blocks on the free-block list.
-//
-// Parameter nMaxFrag is the maximum amount of fragmented space that may be
-// present in the page after this routine returns.
-//
-// EVIDENCE-OF: R-44582-60138 SQLite may from time to time reorganize a
-// b-tree page so that there are no freeblocks or fragment bytes, all
-// unused bytes are contained in the unallocated space region, and all
-// cells are packed tightly at the end of the page.
+// C comment
+// /*
+// ** Defragment the page given. This routine reorganizes cells within the
+// ** page so that there are no free-blocks on the free-block list.
+// **
+// ** Parameter nMaxFrag is the maximum amount of fragmented space that may be
+// ** present in the page after this routine returns.
+// **
+// ** EVIDENCE-OF: R-44582-60138 SQLite may from time to time reorganize a
+// ** b-tree page so that there are no freeblocks or fragment bytes, all
+// ** unused bytes are contained in the unallocated space region, and all
+// ** cells are packed tightly at the end of the page.
+// */
func _defragmentPage(tls *crt.TLS, _pPage *XMemPage, _nMaxFrag int32) (r0 int32) {
var _i, _pc, _hdr, _size, _usableSize, _cellOffset, _cbrk, _nCell, _iCellFirst, _iCellLast, _1_iFree, _2_iFree2, _3_sz2, _3_sz, _3_top, _11_x int32
var _data, _temp, _src, _3_pEnd, _3_pAddr, _8_pAddr *uint8
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60381), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(53334)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60381), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(53310)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtShared)(_pPage.X18) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60382), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(55360)))
+ if (*XBtShared)(_pPage.XpBt) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60382), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(55336)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XBtShared)(_pPage.X18).X16) > uint32(i32(65536)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60383), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(82862)))
+ if ((*XBtShared)(_pPage.XpBt).XusableSize) > uint32(65536) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60383), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81024)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X9) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60384), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(82555)))
+ if int32(_pPage.XnOverflow) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60384), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(80717)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60385), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60385), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
_temp = nil
- _src = store13(&_data, _pPage.X19)
- _hdr = int32(_pPage.X6)
- _cellOffset = int32(_pPage.X12)
- _nCell = int32(_pPage.X14)
+ _src = store15(&_data, _pPage.XaData)
+ _hdr = int32(_pPage.XhdrOffset)
+ _cellOffset = int32(_pPage.XcellOffset)
+ _nCell = int32(_pPage.XnCell)
func() {
- if _nCell != ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(1)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60391), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(82909)))
+ if _nCell != ((int32(*elem15(elem15(_data, uintptr(_hdr+int32(3))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_hdr+int32(3))), uintptr(1)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60391), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81071)))
crt.X__builtin_abort(tls)
}
}()
- _iCellFirst = _cellOffset + (i32(2) * _nCell)
- _usableSize = int32((*XBtShared)(_pPage.X18).X16)
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(7))))) > _nMaxFrag {
+ _iCellFirst = _cellOffset + (int32(2) * _nCell)
+ _usableSize = int32((*XBtShared)(_pPage.XpBt).XusableSize)
+ if int32(*elem15(_data, uintptr(_hdr+int32(7)))) > _nMaxFrag {
goto _12
}
- _1_iFree = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(1)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(1)))))) + 1*uintptr(i32(1)))))
+ _1_iFree = (int32(*elem15(elem15(_data, uintptr(_hdr+int32(1))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_hdr+int32(1))), uintptr(1)))
if _1_iFree == 0 {
goto _13
}
- _2_iFree2 = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_1_iFree))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_1_iFree))))) + 1*uintptr(i32(1)))))
+ _2_iFree2 = (int32(*elem15(elem15(_data, uintptr(_1_iFree)), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_1_iFree)), uintptr(1)))
func() {
- if _2_iFree2 != i32(0) && _2_iFree2 <= _1_iFree {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60411), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(82939)))
+ if _2_iFree2 != int32(0) && _2_iFree2 <= _1_iFree {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60411), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81101)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_1_iFree + ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_1_iFree+i32(2)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_1_iFree+i32(2)))))) + 1*uintptr(i32(1))))))) > _usableSize {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60412), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(82965)))
+ if (_1_iFree + ((int32(*elem15(elem15(_data, uintptr(_1_iFree+int32(2))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_1_iFree+int32(2))), uintptr(1))))) > _usableSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60412), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81127)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _2_iFree2 != i32(0) && (_2_iFree2+((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_2_iFree2+i32(2)))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_2_iFree2+i32(2)))))) + 1*uintptr(i32(1))))))) > _usableSize {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60413), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(83010)))
+ if _2_iFree2 != int32(0) && (_2_iFree2+((int32(*elem15(elem15(_data, uintptr(_2_iFree2+int32(2))), 0))<<8)|int32(*elem15(elem15(_data, uintptr(_2_iFree2+int32(2))), uintptr(1))))) > _usableSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60413), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81172)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) != _2_iFree2 && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_2_iFree2)))) != i32(0) || int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_2_iFree2+i32(1))))) != i32(0)) {
+ if int32(0) != _2_iFree2 && (int32(*elem15(_data, uintptr(_2_iFree2))) != int32(0) || int32(*elem15(_data, uintptr(_2_iFree2+int32(1)))) != int32(0)) {
goto _24
}
- _3_pEnd = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_cellOffset+(_nCell*i32(2)))))
- _3_sz2 = i32(0)
- _3_sz = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_1_iFree+i32(2)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_1_iFree+i32(2)))))) + 1*uintptr(i32(1)))))
- _3_top = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))))
+ _3_pEnd = elem15(_data, uintptr(_cellOffset+(_nCell*int32(2))))
+ _3_sz2 = int32(0)
+ _3_sz = (int32(*elem15(elem15(_data, uintptr(_1_iFree+int32(2))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_1_iFree+int32(2))), uintptr(1)))
+ _3_top = (int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), uintptr(1)))
if _2_iFree2 == 0 {
goto _25
}
if (_1_iFree + _3_sz) > _2_iFree2 {
- return _sqlite3CorruptError(tls, i32(60422))
+ return _sqlite3CorruptError(tls, int32(60422))
}
- _3_sz2 = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_2_iFree2+i32(2)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_2_iFree2+i32(2)))))) + 1*uintptr(i32(1)))))
+ _3_sz2 = (int32(*elem15(elem15(_data, uintptr(_2_iFree2+int32(2))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_2_iFree2+int32(2))), uintptr(1)))
func() {
if ((((_1_iFree + _3_sz) + _3_sz2) + _2_iFree2) - (_1_iFree + _3_sz)) > _usableSize {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60424), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(83070)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60424), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81232)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemmove(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr((_1_iFree+_3_sz)+_3_sz2)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_1_iFree+_3_sz)))), uint32(_2_iFree2-(_1_iFree+_3_sz)))
- {
- p := &_3_sz
- *p = (*p) + _3_sz2
- sink1(*p)
- }
+ crt.Xmemmove(tls, unsafe.Pointer(elem15(_data, uintptr((_1_iFree+_3_sz)+_3_sz2))), unsafe.Pointer(elem15(_data, uintptr(_1_iFree+_3_sz))), uint32(_2_iFree2-(_1_iFree+_3_sz)))
+ _3_sz += _3_sz2
_25:
_cbrk = _3_top + _3_sz
func() {
if (_cbrk + (_1_iFree - _3_top)) > _usableSize {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60429), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(83115)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60429), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81277)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemmove(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_cbrk)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_3_top)))), uint32(_1_iFree-_3_top))
- _3_pAddr = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_cellOffset)))
+ crt.Xmemmove(tls, unsafe.Pointer(elem15(_data, uintptr(_cbrk))), unsafe.Pointer(elem15(_data, uintptr(_3_top))), uint32(_1_iFree-_3_top))
+ _3_pAddr = elem15(_data, uintptr(_cellOffset))
_31:
- if uintptr(unsafe.Pointer(_3_pAddr)) >= uintptr(unsafe.Pointer(_3_pEnd)) {
+ if crt.P2U(unsafe.Pointer(_3_pAddr)) >= crt.P2U(unsafe.Pointer(_3_pEnd)) {
goto _34
}
- _pc = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pAddr)) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pAddr)) + 1*uintptr(i32(1)))))
+ _pc = (int32(*elem15(_3_pAddr, 0)) << 8) | int32(*elem15(_3_pAddr, uintptr(1)))
if _pc < _1_iFree {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pAddr)) + 1*uintptr(i32(0)))) = uint8((_pc + _3_sz) >> uint(i32(8)))
- return _3_pAddr
- }())) + 1*uintptr(i32(1)))) = uint8(_pc + _3_sz)
+ *elem15(func() *uint8 { *elem15(_3_pAddr, 0) = uint8((_pc + _3_sz) >> 8); return _3_pAddr }(), uintptr(1)) = uint8(_pc + _3_sz)
goto _37
}
if _pc < _2_iFree2 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pAddr)) + 1*uintptr(i32(0)))) = uint8((_pc + _3_sz2) >> uint(i32(8)))
- return _3_pAddr
- }())) + 1*uintptr(i32(1)))) = uint8(_pc + _3_sz2)
+ *elem15(func() *uint8 { *elem15(_3_pAddr, 0) = uint8((_pc + _3_sz2) >> 8); return _3_pAddr }(), uintptr(1)) = uint8(_pc + _3_sz2)
}
_37:
- {
- p := &_3_pAddr
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(2))))
- sink13(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_3_pAddr)) += uintptr(int32(2))
goto _31
_34:
goto _defragment_out
@@ -62433,145 +62216,142 @@ _24:
_13:
_12:
_cbrk = _usableSize
- _iCellLast = _usableSize - i32(4)
- _i = i32(0)
+ _iCellLast = _usableSize - int32(4)
+ _i = int32(0)
_38:
if _i >= _nCell {
goto _41
}
- _8_pAddr = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_cellOffset+(_i*i32(2)))))
- _pc = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_pAddr)) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_pAddr)) + 1*uintptr(i32(1)))))
+ _8_pAddr = elem15(_data, uintptr(_cellOffset+(_i*int32(2))))
+ _pc = (int32(*elem15(_8_pAddr, 0)) << 8) | int32(*elem15(_8_pAddr, uintptr(1)))
if (_pc < _iCellFirst) || (_pc > _iCellLast) {
- return _sqlite3CorruptError(tls, i32(60453))
+ return _sqlite3CorruptError(tls, int32(60453))
}
func() {
if _pc < _iCellFirst || _pc > _iCellLast {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60455), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(83146)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60455), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81308)))
crt.X__builtin_abort(tls)
}
}()
- _size = int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pPage.X24)})))(tls, _pPage, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_src))+1*uintptr(_pc)))))
- {
- p := &_cbrk
- *p = (*p) - _size
- sink1(*p)
- }
+ _size = int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pPage.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pPage, elem15(_src, uintptr(_pc))))
+ _cbrk -= _size
if (_cbrk < _iCellFirst) || ((_pc + _size) > _usableSize) {
- return _sqlite3CorruptError(tls, i32(60459))
+ return _sqlite3CorruptError(tls, int32(60459))
}
func() {
if (_cbrk+_size) > _usableSize || _cbrk < _iCellFirst {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60461), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(83178)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60461), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81340)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_pAddr)) + 1*uintptr(i32(0)))) = uint8(_cbrk >> uint(i32(8)))
- return _8_pAddr
- }())) + 1*uintptr(i32(1)))) = uint8(_cbrk)
+ *elem15(func() *uint8 { *elem15(_8_pAddr, 0) = uint8(_cbrk >> 8); return _8_pAddr }(), uintptr(1)) = uint8(_cbrk)
if _temp != nil {
goto _52
}
if _cbrk == _pc {
goto _39
}
- _temp = (*uint8)(_sqlite3PagerTempSpace(tls, (*XPager)((*XBtShared)(_pPage.X18).X0)))
- _11_x = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_temp))+1*uintptr(_11_x)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_11_x)))), uint32((_cbrk+_size)-_11_x))
+ _temp = (*uint8)(_sqlite3PagerTempSpace(tls, (*XPager)((*XBtShared)(_pPage.XpBt).XpPager)))
+ _11_x = (int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), uintptr(1)))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_temp, uintptr(_11_x))), unsafe.Pointer(elem15(_data, uintptr(_11_x))), uint32((_cbrk+_size)-_11_x))
_src = _temp
_52:
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_cbrk)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_src))+1*uintptr(_pc)))), uint32(_size))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_data, uintptr(_cbrk))), unsafe.Pointer(elem15(_src, uintptr(_pc))), uint32(_size))
_39:
_i += 1
goto _38
_41:
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(7)))) = uint8(i32(0))
+ *elem15(_data, uintptr(_hdr+int32(7))) = 0
_defragment_out:
- if ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(7))))) + _cbrk) - _iCellFirst) != int32(_pPage.X13) {
- return _sqlite3CorruptError(tls, i32(60479))
+ if ((int32(*elem15(_data, uintptr(_hdr+int32(7)))) + _cbrk) - _iCellFirst) != int32(_pPage.XnFree) {
+ return _sqlite3CorruptError(tls, int32(60479))
}
func() {
if _cbrk < _iCellFirst {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60481), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(83220)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60481), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(81382)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0)))) = uint8(_cbrk >> uint(i32(8)))
- return _data
- }()))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))) = uint8(_cbrk)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(1)))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(2)))) = uint8(i32(0))
- crt.Xmemset(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_iCellFirst)))), i32(0), uint32(_cbrk-_iCellFirst))
+ *elem15(elem15(func() *uint8 { *elem15(elem15(_data, uintptr(_hdr+int32(5))), 0) = uint8(_cbrk >> 8); return _data }(), uintptr(_hdr+int32(5))), uintptr(1)) = uint8(_cbrk)
+ *elem15(_data, uintptr(_hdr+int32(1))) = 0
+ *elem15(_data, uintptr(_hdr+int32(2))) = 0
+ crt.Xmemset(tls, unsafe.Pointer(elem15(_data, uintptr(_iCellFirst))), int32(0), uint32(_cbrk-_iCellFirst))
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(60486), unsafe.Pointer((*int8)(unsafe.Pointer(&_defragmentPageØ00__func__Ø000))), unsafe.Pointer(str(53334)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pPage.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(60486), unsafe.Pointer(&_defragmentPageØ00__func__Ø000), unsafe.Pointer(str(53310)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
}
var _defragmentPageØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_defragmentPageØ00__func__Ø000[0], str(83237), 15)
+ crt.Xstrncpy(nil, &_defragmentPageØ00__func__Ø000[0], str(81399), 15)
}
-// Return a pointer to the "temporary page" buffer held internally
-// by the pager. This is a buffer that is big enough to hold the
-// entire content of a database page. This buffer is used internally
-// during rollback and will be overwritten whenever a rollback
-// occurs. But other modules are free to use it too, as long as
-// no rollbacks are happening.
+// C comment
+// /*
+// ** Return a pointer to the "temporary page" buffer held internally
+// ** by the pager. This is a buffer that is big enough to hold the
+// ** entire content of a database page. This buffer is used internally
+// ** during rollback and will be overwritten whenever a rollback
+// ** occurs. But other modules are free to use it too, as long as
+// ** no rollbacks are happening.
+// */
func _sqlite3PagerTempSpace(tls *crt.TLS, _pPager *XPager) (r0 unsafe.Pointer) {
- return (unsafe.Pointer)(_pPager.X58)
-}
-
-// The page that pCur currently points to has just been modified in
-// some way. This function figures out if this modification means the
-// tree needs to be balanced, and if so calls the appropriate balancing
-// routine. Balancing routines are:
-//
-// balance_quick()
-// balance_deeper()
-// balance_nonroot()
+ return unsafe.Pointer(_pPager.XpTmpSpace)
+}
+
+// C comment
+// /*
+// ** The page that pCur currently points to has just been modified in
+// ** some way. This function figures out if this modification means the
+// ** tree needs to be balanced, and if so calls the appropriate balancing
+// ** routine. Balancing routines are:
+// **
+// ** balance_quick()
+// ** balance_deeper()
+// ** balance_nonroot()
+// */
func _balance(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
var _rc, _nMin, _balance_quick_called, _balance_deeper_called, _1_iPage, _7_iIdx int32
var _pFree, _10_pSpace *uint8
var _1_pPage, _7_pParent *XMemPage
var _aBalanceQuickSpace [13]uint8
- _rc = i32(0)
- _nMin = int32((((*XBtShared)(_pCur.X1).X16) * uint32(i32(2))) / uint32(i32(3)))
+ _rc = int32(0)
+ _nMin = int32((((*XBtShared)(_pCur.XpBt).XusableSize) * uint32(2)) / uint32(3))
_pFree = nil
- _balance_quick_called = i32(0)
- _balance_deeper_called = i32(0)
+ _balance_quick_called = int32(0)
+ _balance_deeper_called = int32(0)
_0:
- _1_iPage = int32(_pCur.X14)
- _1_pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_1_iPage)))
- if _1_iPage != i32(0) {
+ _1_iPage = int32(_pCur.XiPage)
+ _1_pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_1_iPage))
+ if _1_iPage != int32(0) {
goto _1
}
- if (_1_pPage.X9) == 0 {
+ if _1_pPage.XnOverflow == 0 {
goto _2
}
func() {
- if _balance_deeper_called != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66966), unsafe.Pointer((*int8)(unsafe.Pointer(&_balanceØ00__func__Ø000))), unsafe.Pointer(str(83252)))
+ if _balance_deeper_called != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66966), unsafe.Pointer(&_balanceØ00__func__Ø000), unsafe.Pointer(str(81414)))
crt.X__builtin_abort(tls)
}
}()
_balance_deeper_called += 1
- _rc = _balance_deeper(tls, _1_pPage, (**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19)))))+4*uintptr(i32(1)))))
- if _rc == i32(0) {
- *(*int8)(unsafe.Pointer(&(_pCur.X14))) = int8(i32(1))
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(i32(0))
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[19]uint16)(unsafe.Pointer(&(_pCur.X17))))) + 2*uintptr(i32(0)))) = uint16(i32(0))
+ _rc = _balance_deeper(tls, _1_pPage, elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(1)))
+ if _rc == int32(0) {
+ _pCur.XiPage = int8(1)
+ _pCur.Xix = 0
+ *elem20((*uint16)(unsafe.Pointer(&_pCur.XaiIdx)), 0) = 0
func() {
- if ((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(i32(1))))).X9) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66973), unsafe.Pointer((*int8)(unsafe.Pointer(&_balanceØ00__func__Ø000))), unsafe.Pointer(str(83277)))
+ if ((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(1))).XnOverflow) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66973), unsafe.Pointer(&_balanceØ00__func__Ø000), unsafe.Pointer(str(81439)))
crt.X__builtin_abort(tls)
}
}()
@@ -62582,19 +62362,19 @@ _2:
_8:
goto _13
_1:
- if (int32(_1_pPage.X9) == i32(0)) && (int32(_1_pPage.X13) <= _nMin) {
+ if (int32(_1_pPage.XnOverflow) == int32(0)) && (int32(_1_pPage.XnFree) <= _nMin) {
goto _9
}
- _7_pParent = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_1_iPage-i32(1))))
- _7_iIdx = int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[19]uint16)(unsafe.Pointer(&(_pCur.X17))))) + 2*uintptr(_1_iPage-i32(1)))))
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_7_pParent.X23))
- if _rc != i32(0) {
+ _7_pParent = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_1_iPage-int32(1)))
+ _7_iIdx = int32(*elem20((*uint16)(unsafe.Pointer(&_pCur.XaiIdx)), uintptr(_1_iPage-int32(1))))
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_7_pParent.XpDbPage))
+ if _rc != int32(0) {
goto _14
}
- if (((((_1_pPage.X3) != 0) && (int32(_1_pPage.X9) == i32(1))) && (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_1_pPage.X16))))) + 2*uintptr(i32(0))))) == int32(_1_pPage.X14))) && ((_7_pParent.X4) != uint32(i32(1)))) && (int32(_7_pParent.X14) == _7_iIdx) {
+ if ((((_1_pPage.XintKeyLeaf != 0) && (int32(_1_pPage.XnOverflow) == int32(1))) && (int32(*elem20((*uint16)(unsafe.Pointer(&_1_pPage.XaiOvfl)), 0)) == int32(_1_pPage.XnCell))) && (_7_pParent.Xpgno != uint32(1))) && (int32(_7_pParent.XnCell) == _7_iIdx) {
func() {
- if _balance_quick_called != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67006), unsafe.Pointer((*int8)(unsafe.Pointer(&_balanceØ00__func__Ø000))), unsafe.Pointer(str(83304)))
+ if _balance_quick_called != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67006), unsafe.Pointer(&_balanceØ00__func__Ø000), unsafe.Pointer(str(81466)))
crt.X__builtin_abort(tls)
}
}()
@@ -62602,30 +62382,30 @@ _1:
_rc = _balance_quick(tls, _7_pParent, _1_pPage, (*uint8)(unsafe.Pointer(&_aBalanceQuickSpace)))
goto _22
}
- _10_pSpace = (*uint8)(_sqlite3PageMalloc(tls, int32((*XBtShared)(_pCur.X1).X15)))
- _rc = _balance_nonroot(tls, _7_pParent, _7_iIdx, _10_pSpace, bool2int(_1_iPage == i32(1)), int32(_pCur.X13)&i32(1))
+ _10_pSpace = (*uint8)(_sqlite3PageMalloc(tls, int32((*XBtShared)(_pCur.XpBt).XpageSize)))
+ _rc = _balance_nonroot(tls, _7_pParent, _7_iIdx, _10_pSpace, bool2int(_1_iPage == int32(1)), int32(_pCur.Xhints)&int32(1))
if _pFree != nil {
- _sqlite3PageFree(tls, (unsafe.Pointer)(_pFree))
+ _sqlite3PageFree(tls, unsafe.Pointer(_pFree))
}
_pFree = _10_pSpace
_22:
_14:
- *(*uint8)(unsafe.Pointer(&(_1_pPage.X9))) = uint8(i32(0))
+ _1_pPage.XnOverflow = 0
_releasePage(tls, _1_pPage)
- *(*int8)(unsafe.Pointer(&(_pCur.X14))) -= 1
+ _pCur.XiPage -= 1
func() {
- if int32(_pCur.X14) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67052), unsafe.Pointer((*int8)(unsafe.Pointer(&_balanceØ00__func__Ø000))), unsafe.Pointer(str(75282)))
+ if int32(_pCur.XiPage) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67052), unsafe.Pointer(&_balanceØ00__func__Ø000), unsafe.Pointer(str(73444)))
crt.X__builtin_abort(tls)
}
}()
_13:
- if _rc == i32(0) {
+ if _rc == int32(0) {
goto _0
}
_9:
if _pFree != nil {
- _sqlite3PageFree(tls, (unsafe.Pointer)(_pFree))
+ _sqlite3PageFree(tls, unsafe.Pointer(_pFree))
}
return _rc
@@ -62636,54 +62416,57 @@ _9:
var _balanceØ00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_balanceØ00__func__Ø000[0], str(83328), 8)
-}
-
-// This function is called when the root page of a b-tree structure is
-// overfull (has one or more overflow pages).
-//
-// A new child page is allocated and the contents of the current root
-// page, including overflow cells, are copied into the child. The root
-// page is then overwritten to make it an empty page with the right-child
-// pointer pointing to the new page.
-//
-// Before returning, all pointer-map entries corresponding to pages
-// that the new child-page now contains pointers to are updated. The
-// entry corresponding to the new right-child pointer of the root
-// page is also updated.
-//
-// If successful, *ppChild is set to contain a reference to the child
-// page and SQLITE_OK is returned. In this case the caller is required
-// to call releasePage() on *ppChild exactly once. If an error occurs,
-// an error code is returned and *ppChild is set to 0.
+ crt.Xstrncpy(nil, &_balanceØ00__func__Ø000[0], str(81490), 8)
+}
+
+// C comment
+// /*
+// ** This function is called when the root page of a b-tree structure is
+// ** overfull (has one or more overflow pages).
+// **
+// ** A new child page is allocated and the contents of the current root
+// ** page, including overflow cells, are copied into the child. The root
+// ** page is then overwritten to make it an empty page with the right-child
+// ** pointer pointing to the new page.
+// **
+// ** Before returning, all pointer-map entries corresponding to pages
+// ** that the new child-page now contains pointers to are updated. The
+// ** entry corresponding to the new right-child pointer of the root
+// ** page is also updated.
+// **
+// ** If successful, *ppChild is set to contain a reference to the child
+// ** page and SQLITE_OK is returned. In this case the caller is required
+// ** to call releasePage() on *ppChild exactly once. If an error occurs,
+// ** an error code is returned and *ppChild is set to 0.
+// */
func _balance_deeper(tls *crt.TLS, _pRoot *XMemPage, _ppChild **XMemPage) (r0 int32) {
var _rc int32
var _pgnoChild uint32
var _pBt *XBtShared
var _pChild *XMemPage
_pChild = nil
- _pgnoChild = u32(0)
- _pBt = (*XBtShared)(_pRoot.X18)
+ _pgnoChild = uint32(0)
+ _pBt = (*XBtShared)(_pRoot.XpBt)
func() {
- if int32(_pRoot.X9) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66895), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_deeperØ00__func__Ø000))), unsafe.Pointer(str(83336)))
+ if int32(_pRoot.XnOverflow) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66895), unsafe.Pointer(&_balance_deeperØ00__func__Ø000), unsafe.Pointer(str(81498)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66896), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_deeperØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66896), unsafe.Pointer(&_balance_deeperØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pRoot.X23))
- if _rc != i32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pRoot.XpDbPage))
+ if _rc != int32(0) {
goto _4
}
- _rc = _allocateBtreePage(tls, _pBt, &_pChild, &_pgnoChild, _pRoot.X4, uint8(i32(0)))
+ _rc = _allocateBtreePage(tls, _pBt, &_pChild, &_pgnoChild, _pRoot.Xpgno, 0)
_copyNodeContent(tls, _pRoot, _pChild, &_rc)
- if (_pBt.X5) != 0 {
- _ptrmapPut(tls, _pBt, _pgnoChild, uint8(i32(5)), _pRoot.X4, &_rc)
+ if _pBt.XautoVacuum != 0 {
+ _ptrmapPut(tls, _pBt, _pgnoChild, uint8(5), _pRoot.Xpgno, &_rc)
}
_4:
if _rc != 0 {
@@ -62692,98 +62475,101 @@ _4:
return _rc
}
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pChild.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66915), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_deeperØ00__func__Ø000))), unsafe.Pointer(str(83355)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pChild.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66915), unsafe.Pointer(&_balance_deeperØ00__func__Ø000), unsafe.Pointer(str(81517)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pRoot.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66916), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_deeperØ00__func__Ø000))), unsafe.Pointer(str(79601)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pRoot.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66916), unsafe.Pointer(&_balance_deeperØ00__func__Ø000), unsafe.Pointer(str(77763)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pChild.X14) != int32(_pRoot.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66917), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_deeperØ00__func__Ø000))), unsafe.Pointer(str(83396)))
+ if int32(_pChild.XnCell) != int32(_pRoot.XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66917), unsafe.Pointer(&_balance_deeperØ00__func__Ø000), unsafe.Pointer(str(81558)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_pChild.X16)))), (unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_pRoot.X16)))), uint32(_pRoot.X9)*u32(2))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[4]*uint8)(unsafe.Pointer(&(_pChild.X17)))), (unsafe.Pointer)((*[4]*uint8)(unsafe.Pointer(&(_pRoot.X17)))), uint32(_pRoot.X9)*u32(4))
- *(*uint8)(unsafe.Pointer(&(_pChild.X9))) = _pRoot.X9
- _zeroPage(tls, _pRoot, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pChild.X19)) + 1*uintptr(i32(0)))))&i32(-9))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pRoot.X19))+1*uintptr(int32(_pRoot.X6)+i32(8)))), _pgnoChild)
+ crt.Xmemcpy(tls, unsafe.Pointer(&_pChild.XaiOvfl), unsafe.Pointer(&_pRoot.XaiOvfl), uint32(_pRoot.XnOverflow)*uint32(2))
+ crt.Xmemcpy(tls, unsafe.Pointer(&_pChild.XapOvfl), unsafe.Pointer(&_pRoot.XapOvfl), uint32(_pRoot.XnOverflow)*uint32(4))
+ _pChild.XnOverflow = _pRoot.XnOverflow
+ _zeroPage(tls, _pRoot, int32(*elem15(_pChild.XaData, 0))&int32(-9))
+ _sqlite3Put4byte(tls, elem15(_pRoot.XaData, uintptr(int32(_pRoot.XhdrOffset)+int32(8))), _pgnoChild)
*_ppChild = _pChild
- return i32(0)
+ return int32(0)
}
var _balance_deeperØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_balance_deeperØ00__func__Ø000[0], str(83424), 15)
-}
-
-// This function is used to copy the contents of the b-tree node stored
-// on page pFrom to page pTo. If page pFrom was not a leaf page, then
-// the pointer-map entries for each child page are updated so that the
-// parent page stored in the pointer map is page pTo. If pFrom contained
-// any cells with overflow page pointers, then the corresponding pointer
-// map entries are also updated so that the parent page is page pTo.
-//
-// If pFrom is currently carrying any overflow cells (entries in the
-// MemPage.apOvfl[] array), they are not copied to pTo.
-//
-// Before returning, page pTo is reinitialized using btreeInitPage().
-//
-// The performance of this function is not critical. It is only used by
-// the balance_shallower() and balance_deeper() procedures, neither of
-// which are called often under normal circumstances.
+ crt.Xstrncpy(nil, &_balance_deeperØ00__func__Ø000[0], str(81586), 15)
+}
+
+// C comment
+// /*
+// ** This function is used to copy the contents of the b-tree node stored
+// ** on page pFrom to page pTo. If page pFrom was not a leaf page, then
+// ** the pointer-map entries for each child page are updated so that the
+// ** parent page stored in the pointer map is page pTo. If pFrom contained
+// ** any cells with overflow page pointers, then the corresponding pointer
+// ** map entries are also updated so that the parent page is page pTo.
+// **
+// ** If pFrom is currently carrying any overflow cells (entries in the
+// ** MemPage.apOvfl[] array), they are not copied to pTo.
+// **
+// ** Before returning, page pTo is reinitialized using btreeInitPage().
+// **
+// ** The performance of this function is not critical. It is only used by
+// ** the balance_shallower() and balance_deeper() procedures, neither of
+// ** which are called often under normal circumstances.
+// */
func _copyNodeContent(tls *crt.TLS, _pFrom *XMemPage, _pTo *XMemPage, _pRC *int32) {
var _1_iFromHdr, _1_iToHdr, _1_rc, _1_iData int32
var _1_aFrom, _1_aTo *uint8
var _1_pBt *XBtShared
- if (*_pRC) != i32(0) {
+ if (*_pRC) != int32(0) {
goto _0
}
- _1_pBt = (*XBtShared)(_pFrom.X18)
- _1_aFrom = _pFrom.X19
- _1_aTo = _pTo.X19
- _1_iFromHdr = int32(_pFrom.X6)
+ _1_pBt = (*XBtShared)(_pFrom.XpBt)
+ _1_aFrom = _pFrom.XaData
+ _1_aTo = _pTo.XaData
+ _1_iFromHdr = int32(_pFrom.XhdrOffset)
_1_iToHdr = func() int32 {
- if (_pTo.X4) == uint32(i32(1)) {
- return i32(100)
+ if _pTo.Xpgno == uint32(1) {
+ return int32(100)
}
- return i32(0)
+ return int32(0)
}()
func() {
- if (_pFrom.X0) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66056), unsafe.Pointer((*int8)(unsafe.Pointer(&_copyNodeContentØ00__func__Ø000))), unsafe.Pointer(str(83439)))
+ if _pFrom.XisInit == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66056), unsafe.Pointer(&_copyNodeContentØ00__func__Ø000), unsafe.Pointer(str(81601)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pFrom.X13) < _1_iToHdr {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66057), unsafe.Pointer((*int8)(unsafe.Pointer(&_copyNodeContentØ00__func__Ø000))), unsafe.Pointer(str(83453)))
+ if int32(_pFrom.XnFree) < _1_iToHdr {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66057), unsafe.Pointer(&_copyNodeContentØ00__func__Ø000), unsafe.Pointer(str(81615)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aFrom))+1*uintptr(_1_iFromHdr+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aFrom))+1*uintptr(_1_iFromHdr+i32(5)))))) + 1*uintptr(i32(1)))))) > int32(_1_pBt.X16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66058), unsafe.Pointer((*int8)(unsafe.Pointer(&_copyNodeContentØ00__func__Ø000))), unsafe.Pointer(str(83474)))
+ if ((int32(*elem15(elem15(_1_aFrom, uintptr(_1_iFromHdr+int32(5))), 0)) << 8) | int32(*elem15(elem15(_1_aFrom, uintptr(_1_iFromHdr+int32(5))), uintptr(1)))) > int32(_1_pBt.XusableSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66058), unsafe.Pointer(&_copyNodeContentØ00__func__Ø000), unsafe.Pointer(str(81636)))
crt.X__builtin_abort(tls)
}
}()
- _1_iData = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aFrom))+1*uintptr(_1_iFromHdr+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aFrom))+1*uintptr(_1_iFromHdr+i32(5)))))) + 1*uintptr(i32(1)))))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aTo))+1*uintptr(_1_iData)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aFrom))+1*uintptr(_1_iData)))), (_1_pBt.X16)-uint32(_1_iData))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aTo))+1*uintptr(_1_iToHdr)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aFrom))+1*uintptr(_1_iFromHdr)))), uint32(int32(_pFrom.X12)+(i32(2)*int32(_pFrom.X14))))
- *(*uint8)(unsafe.Pointer(&(_pTo.X0))) = uint8(i32(0))
+ _1_iData = (int32(*elem15(elem15(_1_aFrom, uintptr(_1_iFromHdr+int32(5))), 0)) << 8) | int32(*elem15(elem15(_1_aFrom, uintptr(_1_iFromHdr+int32(5))), uintptr(1)))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_1_aTo, uintptr(_1_iData))), unsafe.Pointer(elem15(_1_aFrom, uintptr(_1_iData))), _1_pBt.XusableSize-uint32(_1_iData))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_1_aTo, uintptr(_1_iToHdr))), unsafe.Pointer(elem15(_1_aFrom, uintptr(_1_iFromHdr))), uint32(int32(_pFrom.XcellOffset)+(int32(2)*int32(_pFrom.XnCell))))
+ _pTo.XisInit = 0
_1_rc = _btreeInitPage(tls, _pTo)
- if _1_rc != i32(0) {
+ if _1_rc != int32(0) {
*_pRC = _1_rc
return
}
- if (_1_pBt.X5) != 0 {
+ if _1_pBt.XautoVacuum != 0 {
*_pRC = _setChildPtrmaps(tls, _pTo)
}
_0:
@@ -62792,30 +62578,33 @@ _0:
var _copyNodeContentØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_copyNodeContentØ00__func__Ø000[0], str(83527), 16)
-}
-
-// This version of balance() handles the common special case where
-// a new entry is being inserted on the extreme right-end of the
-// tree, in other words, when the new entry will become the largest
-// entry in the tree.
-//
-// Instead of trying to balance the 3 right-most leaf pages, just add
-// a new page to the right-hand side and put the one new entry in
-// that page. This leaves the right side of the tree somewhat
-// unbalanced. But odds are that we will be inserting new entries
-// at the end soon afterwards so the nearly empty page will quickly
-// fill up. On average.
-//
-// pPage is the leaf page which is the right-most page in the tree.
-// pParent is its parent. pPage must have a single overflow entry
-// which is also the right-most entry on the page.
-//
-// The pSpace buffer is used to store a temporary copy of the divider
-// cell that will be inserted into pParent. Such a cell consists of a 4
-// byte page number followed by a variable length integer. In other
-// words, at most 13 bytes. Hence the pSpace buffer must be at
-// least 13 bytes in size.
+ crt.Xstrncpy(nil, &_copyNodeContentØ00__func__Ø000[0], str(81689), 16)
+}
+
+// C comment
+// /*
+// ** This version of balance() handles the common special case where
+// ** a new entry is being inserted on the extreme right-end of the
+// ** tree, in other words, when the new entry will become the largest
+// ** entry in the tree.
+// **
+// ** Instead of trying to balance the 3 right-most leaf pages, just add
+// ** a new page to the right-hand side and put the one new entry in
+// ** that page. This leaves the right side of the tree somewhat
+// ** unbalanced. But odds are that we will be inserting new entries
+// ** at the end soon afterwards so the nearly empty page will quickly
+// ** fill up. On average.
+// **
+// ** pPage is the leaf page which is the right-most page in the tree.
+// ** pParent is its parent. pPage must have a single overflow entry
+// ** which is also the right-most entry on the page.
+// **
+// ** The pSpace buffer is used to store a temporary copy of the divider
+// ** cell that will be inserted into pParent. Such a cell consists of a 4
+// ** byte page number followed by a variable length integer. In other
+// ** words, at most 13 bytes. Hence the pSpace buffer must be at
+// ** least 13 bytes in size.
+// */
func _balance_quick(tls *crt.TLS, _pParent *XMemPage, _pPage *XMemPage, _pSpace *uint8) (r0 int32) {
var _rc int32
var _pgnoNew uint32
@@ -62823,96 +62612,97 @@ func _balance_quick(tls *crt.TLS, _pParent *XMemPage, _pPage *XMemPage, _pSpace
var _1_pOut, _1_pCell, _1_pStop *uint8
var _pBt *XBtShared
var _pNew *XMemPage
- _pBt = (*XBtShared)(_pPage.X18)
+ _pBt = (*XBtShared)(_pPage.XpBt)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.X18).X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65907), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_quickØ00__func__Ø000))), unsafe.Pointer(str(20439)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*XBtShared)(_pPage.XpBt).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65907), unsafe.Pointer(&_balance_quickØ00__func__Ø000), unsafe.Pointer(str(20394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pParent.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65908), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_quickØ00__func__Ø000))), unsafe.Pointer(str(83543)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pParent.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65908), unsafe.Pointer(&_balance_quickØ00__func__Ø000), unsafe.Pointer(str(81705)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X9) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65909), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_quickØ00__func__Ø000))), unsafe.Pointer(str(83585)))
+ if int32(_pPage.XnOverflow) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65909), unsafe.Pointer(&_balance_quickØ00__func__Ø000), unsafe.Pointer(str(81747)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
- if int32(_pPage.X14) == i32(0) {
+ if int32(_pPage.XnCell) == int32(0) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65912), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_quickØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65912), unsafe.Pointer(&_balance_quickØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return _sqlite3CorruptError(tls, i32(65912))
+ return _sqlite3CorruptError(tls, int32(65912))
}
- _rc = _allocateBtreePage(tls, _pBt, &_pNew, &_pgnoNew, uint32(i32(0)), uint8(i32(0)))
- if _rc != i32(0) {
+ _rc = _allocateBtreePage(tls, _pBt, &_pNew, &_pgnoNew, 0, 0)
+ if _rc != int32(0) {
goto _9
}
- _1_pOut = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pSpace)) + 1*uintptr(i32(4))))
- _1_pCell = *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]*uint8)(unsafe.Pointer(&(_pPage.X17))))) + 4*uintptr(i32(0))))
- _1_szCell = (*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pPage.X24)})))(tls, _pPage, _1_pCell)
+ _1_pOut = elem15(_pSpace, uintptr(4))
+ _1_pCell = *elem88((**uint8)(unsafe.Pointer(&_pPage.XapOvfl)), 0)
+ _1_szCell = func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pPage.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pPage, _1_pCell)
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pNew.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65927), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_quickØ00__func__Ø000))), unsafe.Pointer(str(83605)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pNew.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65927), unsafe.Pointer(&_balance_quickØ00__func__Ø000), unsafe.Pointer(str(81767)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19)) + 1*uintptr(i32(0))))) != i32(13) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65928), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_quickØ00__func__Ø000))), unsafe.Pointer(str(83644)))
+ if int32(*elem15(_pPage.XaData, 0)) != int32(13) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65928), unsafe.Pointer(&_balance_quickØ00__func__Ø000), unsafe.Pointer(str(81806)))
crt.X__builtin_abort(tls)
}
}()
- _zeroPage(tls, _pNew, i32(13))
- _rc = _rebuildPage(tls, _pNew, i32(1), &_1_pCell, &_1_szCell)
+ _zeroPage(tls, _pNew, int32(13))
+ _rc = _rebuildPage(tls, _pNew, int32(1), &_1_pCell, &_1_szCell)
if func() int32 {
if _rc != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65931), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_quickØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65931), unsafe.Pointer(&_balance_quickØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return _rc
}
- *(*uint16)(unsafe.Pointer(&(_pNew.X13))) = uint16((((_pBt.X16) - uint32(_pNew.X12)) - uint32(i32(2))) - uint32(_1_szCell))
- if (_pBt.X5) == 0 {
+ _pNew.XnFree = uint16(((_pBt.XusableSize - uint32(_pNew.XcellOffset)) - uint32(2)) - uint32(_1_szCell))
+ if _pBt.XautoVacuum == 0 {
goto _17
}
- _ptrmapPut(tls, _pBt, _pgnoNew, uint8(i32(5)), _pParent.X4, &_rc)
- if int32(_1_szCell) > int32(_pNew.X11) {
+ _ptrmapPut(tls, _pBt, _pgnoNew, uint8(5), _pParent.Xpgno, &_rc)
+ if int32(_1_szCell) > int32(_pNew.XminLocal) {
_ptrmapPutOvflPtr(tls, _pNew, _1_pCell, &_rc)
}
_17:
- _1_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*(int32(_pPage.X14)-i32(1))))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*(int32(_pPage.X14)-i32(1))))))) + 1*uintptr(i32(1)))))))))))))
- _1_pStop = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pCell)) + 1*uintptr(i32(9))))
+ _1_pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData)) + uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*(int32(_pPage.XnCell)-int32(1)))), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*(int32(_pPage.XnCell)-int32(1)))), uintptr(1)))))))
+ _1_pStop = elem15(_1_pCell, uintptr(9))
_19:
- if (int32(*postInc13(&_1_pCell, 1))&i32(128)) != 0 && (uintptr(unsafe.Pointer(_1_pCell)) < uintptr(unsafe.Pointer(_1_pStop))) {
+ if (int32(*postInc15(&_1_pCell, 1))&int32(128)) != 0 && (crt.P2U(unsafe.Pointer(_1_pCell)) < crt.P2U(unsafe.Pointer(_1_pStop))) {
goto _19
}
- _1_pStop = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pCell)) + 1*uintptr(i32(9))))
+ _1_pStop = elem15(_1_pCell, uintptr(9))
_22:
- if (int32(store2(postInc13(&_1_pOut, 1), *postInc13(&_1_pCell, 1)))&i32(128)) != 0 && (uintptr(unsafe.Pointer(_1_pCell)) < uintptr(unsafe.Pointer(_1_pStop))) {
+ if (int32(store3(postInc15(&_1_pOut, 1), *postInc15(&_1_pCell, 1)))&int32(128)) != 0 && (crt.P2U(unsafe.Pointer(_1_pCell)) < crt.P2U(unsafe.Pointer(_1_pStop))) {
goto _22
}
- if _rc == i32(0) {
- _insertCell(tls, _pParent, int32(_pParent.X14), _pSpace, int32((uintptr(unsafe.Pointer(_1_pOut))-uintptr(unsafe.Pointer(_pSpace)))/1), nil, _pPage.X4, &_rc)
+ if _rc == int32(0) {
+ _insertCell(tls, _pParent, int32(_pParent.XnCell), _pSpace, int32(uintptr(unsafe.Pointer(_1_pOut))-uintptr(unsafe.Pointer(_pSpace))), nil, _pPage.Xpgno, &_rc)
}
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParent.X19))+1*uintptr(int32(_pParent.X6)+i32(8)))), _pgnoNew)
+ _sqlite3Put4byte(tls, elem15(_pParent.XaData, uintptr(int32(_pParent.XhdrOffset)+int32(8))), _pgnoNew)
_releasePage(tls, _pNew)
_9:
return _rc
@@ -62921,132 +62711,128 @@ _9:
var _balance_quickØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_balance_quickØ00__func__Ø000[0], str(83696), 14)
+ crt.Xstrncpy(nil, &_balance_quickØ00__func__Ø000[0], str(81858), 14)
}
-// Array apCell[] contains pointers to nCell b-tree page cells. The
-// szCell[] array contains the size in bytes of each cell. This function
-// replaces the current contents of page pPg with the contents of the cell
-// array.
-//
-// Some of the cells in apCell[] may currently be stored in pPg. This
-// function works around problems caused by this by making a copy of any
-// such cells before overwriting the page data.
-//
-// The MemPage.nFree field is invalidated by this function. It is the
-// responsibility of the caller to set it correctly.
+// C comment
+// /*
+// ** Array apCell[] contains pointers to nCell b-tree page cells. The
+// ** szCell[] array contains the size in bytes of each cell. This function
+// ** replaces the current contents of page pPg with the contents of the cell
+// ** array.
+// **
+// ** Some of the cells in apCell[] may currently be stored in pPg. This
+// ** function works around problems caused by this by making a copy of any
+// ** such cells before overwriting the page data.
+// **
+// ** The MemPage.nFree field is invalidated by this function. It is the
+// ** responsibility of the caller to set it correctly.
+// */
func _rebuildPage(tls *crt.TLS, _pPg *XMemPage, _nCell int32, _apCell **uint8, _szCell *uint16) (r0 int32) {
var _hdr, _usableSize, _i int32
var _aData, _pEnd, _pCellptr, _pTmp, _pData, _1_pCell *uint8
- _hdr = int32(_pPg.X6)
- _aData = _pPg.X19
- _usableSize = int32((*XBtShared)(_pPg.X18).X16)
- _pEnd = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(_usableSize)))
- _pCellptr = _pPg.X21
- _pTmp = (*uint8)(_sqlite3PagerTempSpace(tls, (*XPager)((*XBtShared)(_pPg.X18).X0)))
- _i = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTmp))+1*uintptr(_i)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_i)))), uint32(_usableSize-_i))
+ _hdr = int32(_pPg.XhdrOffset)
+ _aData = _pPg.XaData
+ _usableSize = int32((*XBtShared)(_pPg.XpBt).XusableSize)
+ _pEnd = elem15(_aData, uintptr(_usableSize))
+ _pCellptr = _pPg.XaCellIdx
+ _pTmp = (*uint8)(_sqlite3PagerTempSpace(tls, (*XPager)((*XBtShared)(_pPg.XpBt).XpPager)))
+ _i = (int32(*elem15(elem15(_aData, uintptr(_hdr+int32(5))), 0)) << 8) | int32(*elem15(elem15(_aData, uintptr(_hdr+int32(5))), uintptr(1)))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_pTmp, uintptr(_i))), unsafe.Pointer(elem15(_aData, uintptr(_i))), uint32(_usableSize-_i))
_pData = _pEnd
- _i = i32(0)
+ _i = int32(0)
_0:
if _i >= _nCell {
goto _3
}
- _1_pCell = *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_apCell)) + 4*uintptr(_i)))
- if (uint32(uintptr(unsafe.Pointer(_1_pCell))) >= uint32(uintptr(unsafe.Pointer(_aData)))) && (uint32(uintptr(unsafe.Pointer(_1_pCell))) < uint32(uintptr(unsafe.Pointer(_pEnd)))) {
- _1_pCell = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTmp)) + 1*uintptr(int32((uintptr(unsafe.Pointer(_1_pCell))-uintptr(unsafe.Pointer(_aData)))/1))))
+ _1_pCell = *elem88(_apCell, uintptr(_i))
+ if (uint32(crt.P2U(unsafe.Pointer(_1_pCell))) >= uint32(crt.P2U(unsafe.Pointer(_aData)))) && (uint32(crt.P2U(unsafe.Pointer(_1_pCell))) < uint32(crt.P2U(unsafe.Pointer(_pEnd)))) {
+ _1_pCell = elem15(_pTmp, uintptr(int32(uintptr(unsafe.Pointer(_1_pCell))-uintptr(unsafe.Pointer(_aData)))))
}
- {
- p := &_pData
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 1*uintptr(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_szCell)) + 2*uintptr(_i))))))
- sink13(*p)
- }
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCellptr)) + 1*uintptr(i32(0)))) = uint8(int32((uintptr(unsafe.Pointer(_pData))-uintptr(unsafe.Pointer(_aData)))/1) >> uint(i32(8)))
+ *(*uintptr)(unsafe.Pointer(&_pData)) -= uintptr(*elem20(_szCell, uintptr(_i)))
+ *elem15(func() *uint8 {
+ *elem15(_pCellptr, 0) = uint8(int32(uintptr(unsafe.Pointer(_pData))-uintptr(unsafe.Pointer(_aData))) >> 8)
return _pCellptr
- }())) + 1*uintptr(i32(1)))) = uint8(int32((uintptr(unsafe.Pointer(_pData)) - uintptr(unsafe.Pointer(_aData))) / 1))
- {
- p := &_pCellptr
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(2))))
- sink13(*p)
- }
- if uintptr(unsafe.Pointer(_pData)) < uintptr(unsafe.Pointer(_pCellptr)) {
- return _sqlite3CorruptError(tls, i32(65622))
+ }(), uintptr(1)) = uint8(int32(uintptr(unsafe.Pointer(_pData)) - uintptr(unsafe.Pointer(_aData))))
+ *(*uintptr)(unsafe.Pointer(&_pCellptr)) += uintptr(int32(2))
+ if crt.P2U(unsafe.Pointer(_pData)) < crt.P2U(unsafe.Pointer(_pCellptr)) {
+ return _sqlite3CorruptError(tls, int32(65622))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pData), (unsafe.Pointer)(_1_pCell), uint32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_szCell)) + 2*uintptr(_i)))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pData), unsafe.Pointer(_1_pCell), uint32(*elem20(_szCell, uintptr(_i))))
func() {
- if int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_szCell)) + 2*uintptr(_i)))) != int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pPg.X24)})))(tls, _pPg, _1_pCell)) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65624), unsafe.Pointer((*int8)(unsafe.Pointer(&_rebuildPageØ00__func__Ø000))), unsafe.Pointer(str(83710)))
+ if int32(*elem20(_szCell, uintptr(_i))) != int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pPg.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pPg, _1_pCell)) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65624), unsafe.Pointer(&_rebuildPageØ00__func__Ø000), unsafe.Pointer(str(81872)))
crt.X__builtin_abort(tls)
}
}()
_i += 1
goto _0
_3:
- *(*uint16)(unsafe.Pointer(&(_pPg.X14))) = uint16(_nCell)
- *(*uint8)(unsafe.Pointer(&(_pPg.X9))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_hdr+i32(1)))))) + 1*uintptr(i32(0)))) = u8(0)
+ _pPg.XnCell = uint16(_nCell)
+ _pPg.XnOverflow = 0
+ *elem15(elem15(func() *uint8 { *elem15(elem15(_aData, uintptr(_hdr+int32(1))), 0) = uint8(0); return _aData }(), uintptr(_hdr+int32(1))), uintptr(1)) = uint8(0)
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_aData, uintptr(_hdr+int32(3))), 0) = uint8(int32(_pPg.XnCell) >> 8)
return _aData
- }()))+1*uintptr(_hdr+i32(1)))))) + 1*uintptr(i32(1)))) = u8(0)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(0)))) = uint8(int32(_pPg.X14) >> uint(i32(8)))
+ }(), uintptr(_hdr+int32(3))), uintptr(1)) = uint8(_pPg.XnCell)
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_aData, uintptr(_hdr+int32(5))), 0) = uint8(int32(uintptr(unsafe.Pointer(_pData))-uintptr(unsafe.Pointer(_aData))) >> 8)
return _aData
- }()))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(1)))) = uint8(_pPg.X14)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0)))) = uint8(int32((uintptr(unsafe.Pointer(_pData))-uintptr(unsafe.Pointer(_aData)))/1) >> uint(i32(8)))
- return _aData
- }()))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))) = uint8(int32((uintptr(unsafe.Pointer(_pData)) - uintptr(unsafe.Pointer(_aData))) / 1))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(_hdr+i32(7)))) = uint8(i32(0))
- return i32(0)
+ }(), uintptr(_hdr+int32(5))), uintptr(1)) = uint8(int32(uintptr(unsafe.Pointer(_pData)) - uintptr(unsafe.Pointer(_aData))))
+ *elem15(_aData, uintptr(_hdr+int32(7))) = 0
+ return int32(0)
}
var _rebuildPageØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_rebuildPageØ00__func__Ø000[0], str(83762), 12)
-}
-
-// This routine redistributes cells on the iParentIdx'th child of pParent
-// (hereafter "the page") and up to 2 siblings so that all pages have about the
-// same amount of free space. Usually a single sibling on either side of the
-// page are used in the balancing, though both siblings might come from one
-// side if the page is the first or last child of its parent. If the page
-// has fewer than 2 siblings (something which can only happen if the page
-// is a root page or a child of a root page) then all available siblings
-// participate in the balancing.
-//
-// The number of siblings of the page might be increased or decreased by
-// one or two in an effort to keep pages nearly full but not over full.
-//
-// Note that when this routine is called, some of the cells on the page
-// might not actually be stored in MemPage.aData[]. This can happen
-// if the page is overfull. This routine ensures that all cells allocated
-// to the page and its siblings fit into MemPage.aData[] before returning.
-//
-// In the course of balancing the page and its siblings, cells may be
-// inserted into or removed from the parent page (pParent). Doing so
-// may cause the parent page to become overfull or underfull. If this
-// happens, it is the responsibility of the caller to invoke the correct
-// balancing routine to fix this problem (see the balance() routine).
-//
-// If this routine fails for any reason, it might leave the database
-// in a corrupted state. So if this routine fails, the database should
-// be rolled back.
-//
-// The third argument to this function, aOvflSpace, is a pointer to a
-// buffer big enough to hold one page. If while inserting cells into the parent
-// page (pParent) the parent page becomes overfull, this buffer is
-// used to store the parent's overflow cells. Because this function inserts
-// a maximum of four divider cells into the parent page, and the maximum
-// size of a cell stored within an internal node is always less than 1/4
-// of the page-size, the aOvflSpace[] buffer is guaranteed to be large
-// enough for all overflow cells.
-//
-// If aOvflSpace is set to a null pointer, this function returns
-// SQLITE_NOMEM.
+ crt.Xstrncpy(nil, &_rebuildPageØ00__func__Ø000[0], str(81924), 12)
+}
+
+// C comment
+// /*
+// ** This routine redistributes cells on the iParentIdx'th child of pParent
+// ** (hereafter "the page") and up to 2 siblings so that all pages have about the
+// ** same amount of free space. Usually a single sibling on either side of the
+// ** page are used in the balancing, though both siblings might come from one
+// ** side if the page is the first or last child of its parent. If the page
+// ** has fewer than 2 siblings (something which can only happen if the page
+// ** is a root page or a child of a root page) then all available siblings
+// ** participate in the balancing.
+// **
+// ** The number of siblings of the page might be increased or decreased by
+// ** one or two in an effort to keep pages nearly full but not over full.
+// **
+// ** Note that when this routine is called, some of the cells on the page
+// ** might not actually be stored in MemPage.aData[]. This can happen
+// ** if the page is overfull. This routine ensures that all cells allocated
+// ** to the page and its siblings fit into MemPage.aData[] before returning.
+// **
+// ** In the course of balancing the page and its siblings, cells may be
+// ** inserted into or removed from the parent page (pParent). Doing so
+// ** may cause the parent page to become overfull or underfull. If this
+// ** happens, it is the responsibility of the caller to invoke the correct
+// ** balancing routine to fix this problem (see the balance() routine).
+// **
+// ** If this routine fails for any reason, it might leave the database
+// ** in a corrupted state. So if this routine fails, the database should
+// ** be rolled back.
+// **
+// ** The third argument to this function, aOvflSpace, is a pointer to a
+// ** buffer big enough to hold one page. If while inserting cells into the parent
+// ** page (pParent) the parent page becomes overfull, this buffer is
+// ** used to store the parent's overflow cells. Because this function inserts
+// ** a maximum of four divider cells into the parent page, and the maximum
+// ** size of a cell stored within an internal node is always less than 1/4
+// ** of the page-size, the aOvflSpace[] buffer is guaranteed to be large
+// ** enough for all overflow cells.
+// **
+// ** If aOvflSpace is set to a null pointer, this function returns
+// ** SQLITE_NOMEM.
+// */
func _balance_nonroot(tls *crt.TLS, _pParent *XMemPage, _iParentIdx int32, _aOvflSpace *uint8, _isRoot int32, _bBulk int32) (r0 int32) {
var _nMaxCells, _nNew, _nOld, _i, _j, _k, _nxDiv, _rc, _leafData, _usableSpace, _pageFlags, _iSpace1, _iOvflSpace, _szScratch, _13_iOff, _17_limit, _29_sz, _42_szRight, _42_szLeft, _42_r, _42_d, _54_iBest, _59_cntOldNext, _59_usableSize, _59_iNew, _59_iOld, _66_sz, _71_iPg, _72_iNew, _72_iOld, _72_nNewCell int32
var _pgno, _77_key uint32
@@ -63063,485 +62849,444 @@ func _balance_nonroot(tls *crt.TLS, _pParent *XMemPage, _iParentIdx int32, _aOvf
var _cntNew, _cntOld, _szNew [5]int32
var _abDone [5]uint8
var _aPgFlags [5]uint16
- _nMaxCells = i32(0)
- _nNew = i32(0)
- _rc = i32(0)
- _iSpace1 = i32(0)
- _iOvflSpace = i32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_abDone), i32(0), u32(5))
- *(*int32)(unsafe.Pointer(&(_b.X0))) = i32(0)
- *(***uint8)(unsafe.Pointer(&(_b.X2))) = nil
- _pBt = (*XBtShared)(_pParent.X18)
+ _nMaxCells = int32(0)
+ _nNew = int32(0)
+ _rc = int32(0)
+ _iSpace1 = int32(0)
+ _iOvflSpace = int32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_abDone), int32(0), uint32(5))
+ _b.XnCell = int32(0)
+ _b.XapCell = nil
+ _pBt = (*XBtShared)(_pParent.XpBt)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66166), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66166), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pParent.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66167), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(83543)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pParent.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66167), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(81705)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pParent.X9) != i32(0) && int32(_pParent.X9) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66178), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(83774)))
+ if int32(_pParent.XnOverflow) != int32(0) && int32(_pParent.XnOverflow) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66178), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(81936)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pParent.X9) != i32(0) && int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_pParent.X16))))) + 2*uintptr(i32(0))))) != _iParentIdx {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66179), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(83821)))
+ if int32(_pParent.XnOverflow) != int32(0) && int32(*elem20((*uint16)(unsafe.Pointer(&_pParent.XaiOvfl)), 0)) != _iParentIdx {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66179), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(81983)))
crt.X__builtin_abort(tls)
}
}()
if _aOvflSpace == nil {
- return _sqlite3NomemError(tls, i32(66182))
+ return _sqlite3NomemError(tls, int32(66182))
}
- _i = int32(_pParent.X9) + int32(_pParent.X14)
- if _i < i32(2) {
- _nxDiv = i32(0)
+ _i = int32(_pParent.XnOverflow) + int32(_pParent.XnCell)
+ if _i < int32(2) {
+ _nxDiv = int32(0)
goto _12
}
func() {
- if _bBulk != i32(0) && _bBulk != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66200), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(83877)))
+ if _bBulk != int32(0) && _bBulk != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66200), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82039)))
crt.X__builtin_abort(tls)
}
}()
- if _iParentIdx == i32(0) {
- _nxDiv = i32(0)
+ if _iParentIdx == int32(0) {
+ _nxDiv = int32(0)
goto _19
}
if _iParentIdx == _i {
- _nxDiv = (_i - i32(2)) + _bBulk
+ _nxDiv = (_i - int32(2)) + _bBulk
goto _19
}
- _nxDiv = _iParentIdx - i32(1)
+ _nxDiv = _iParentIdx - int32(1)
_19:
- _i = i32(2) - _bBulk
+ _i = int32(2) - _bBulk
_12:
- _nOld = _i + i32(1)
- if ((_i + _nxDiv) - int32(_pParent.X9)) == int32(_pParent.X14) {
- _pRight = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParent.X19)) + 1*uintptr(int32(_pParent.X6)+i32(8))))
+ _nOld = _i + int32(1)
+ if ((_i + _nxDiv) - int32(_pParent.XnOverflow)) == int32(_pParent.XnCell) {
+ _pRight = elem15(_pParent.XaData, uintptr(int32(_pParent.XhdrOffset)+int32(8)))
goto _21
}
- _pRight = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pParent.X19)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pParent.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParent.X21))+1*uintptr(i32(2)*((_i+_nxDiv)-int32(_pParent.X9))))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParent.X21))+1*uintptr(i32(2)*((_i+_nxDiv)-int32(_pParent.X9))))))) + 1*uintptr(i32(1)))))))))))))
+ _pRight = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pParent.XaData)) + uintptr(int32(_pParent.XmaskPage)&((int32(*elem15(elem15(_pParent.XaCellIdx, uintptr(int32(2)*((_i+_nxDiv)-int32(_pParent.XnOverflow)))), 0))<<8)|int32(*elem15(elem15(_pParent.XaCellIdx, uintptr(int32(2)*((_i+_nxDiv)-int32(_pParent.XnOverflow)))), uintptr(1)))))))
_21:
_pgno = _sqlite3Get4byte(tls, _pRight)
_22:
- _rc = _getAndInitPage(tls, _pBt, _pgno, (**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld))+4*uintptr(_i))), nil, i32(0))
+ _rc = _getAndInitPage(tls, _pBt, _pgno, elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_i)), nil, int32(0))
if _rc != 0 {
- crt.Xmemset(tls, (unsafe.Pointer)(&_apOld), i32(0), uint32(_i+i32(1))*u32(4))
+ crt.Xmemset(tls, unsafe.Pointer(&_apOld), int32(0), uint32(_i+int32(1))*uint32(4))
goto _balance_cleanup
}
- {
- p := &_nMaxCells
- *p = (*p) + ((i32(1) + int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(_i)))).X14)) + int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(_i)))).X9))
- sink1(*p)
- }
- if postInc1(&_i, int32(-1)) == i32(0) {
+ _nMaxCells += (int32(1) + int32((*elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_i))).XnCell)) + int32((*elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_i))).XnOverflow)
+ if postInc2(&_i, -1) == int32(0) {
goto _23
}
- if ((_pParent.X9) != 0) && ((_i + _nxDiv) == int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_pParent.X16))))) + 2*uintptr(i32(0)))))) {
- *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i))) = *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]*uint8)(unsafe.Pointer(&(_pParent.X17))))) + 4*uintptr(i32(0))))
- _pgno = _sqlite3Get4byte(tls, *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i))))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i))) = int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pParent.X24)})))(tls, _pParent, *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i)))))
- *(*uint8)(unsafe.Pointer(&(_pParent.X9))) = uint8(i32(0))
+ if (_pParent.XnOverflow != 0) && ((_i + _nxDiv) == int32(*elem20((*uint16)(unsafe.Pointer(&_pParent.XaiOvfl)), 0))) {
+ *elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i)) = *elem88((**uint8)(unsafe.Pointer(&_pParent.XapOvfl)), 0)
+ _pgno = _sqlite3Get4byte(tls, *elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i)))
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)) = int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pParent.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pParent, *elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i))))
+ _pParent.XnOverflow = 0
goto _28
}
- *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i))) = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pParent.X19)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pParent.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParent.X21))+1*uintptr(i32(2)*((_i+_nxDiv)-int32(_pParent.X9))))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pParent.X21))+1*uintptr(i32(2)*((_i+_nxDiv)-int32(_pParent.X9))))))) + 1*uintptr(i32(1)))))))))))))
- _pgno = _sqlite3Get4byte(tls, *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i))))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i))) = int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pParent.X24)})))(tls, _pParent, *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i)))))
- if (int32(_pBt.X10) & i32(4)) == 0 {
+ *elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i)) = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pParent.XaData)) + uintptr(int32(_pParent.XmaskPage)&((int32(*elem15(elem15(_pParent.XaCellIdx, uintptr(int32(2)*((_i+_nxDiv)-int32(_pParent.XnOverflow)))), 0))<<8)|int32(*elem15(elem15(_pParent.XaCellIdx, uintptr(int32(2)*((_i+_nxDiv)-int32(_pParent.XnOverflow)))), uintptr(1)))))))
+ _pgno = _sqlite3Get4byte(tls, *elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i)))
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)) = int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pParent.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pParent, *elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i))))
+ if (int32(_pBt.XbtsFlags) & int32(4)) == 0 {
goto _29
}
- _13_iOff = int32(uintptr(unsafe.Pointer(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i)))))) - int32(uintptr(unsafe.Pointer(_pParent.X19)))
- if (_13_iOff + (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i))))) > int32(_pBt.X16) {
- _rc = _sqlite3CorruptError(tls, i32(66253))
- crt.Xmemset(tls, (unsafe.Pointer)(&_apOld), i32(0), uint32(_i+i32(1))*u32(4))
+ _13_iOff = int32(crt.P2U(unsafe.Pointer(*elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i))))) - int32(crt.P2U(unsafe.Pointer(_pParent.XaData)))
+ if (_13_iOff + (*elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)))) > int32(_pBt.XusableSize) {
+ _rc = _sqlite3CorruptError(tls, int32(66253))
+ crt.Xmemset(tls, unsafe.Pointer(&_apOld), int32(0), uint32(_i+int32(1))*uint32(4))
goto _balance_cleanup
}
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOvflSpace))+1*uintptr(_13_iOff)))), (unsafe.Pointer)(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i)))), uint32(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i)))))
- *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i))) = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOvflSpace)) + 1*uintptr(int32((uintptr(unsafe.Pointer(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i)))))-uintptr(unsafe.Pointer(_pParent.X19)))/1))))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_aOvflSpace, uintptr(_13_iOff))), unsafe.Pointer(*elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i))), uint32(*elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i))))
+ *elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i)) = elem15(_aOvflSpace, uintptr(int32(uintptr(unsafe.Pointer(*elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i))))-uintptr(unsafe.Pointer(_pParent.XaData)))))
_29:
- _dropCell(tls, _pParent, (_i+_nxDiv)-int32(_pParent.X9), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i))), &_rc)
+ _dropCell(tls, _pParent, (_i+_nxDiv)-int32(_pParent.XnOverflow), *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)), &_rc)
_28:
goto _22
_23:
- _nMaxCells = (_nMaxCells + i32(3)) & i32(-4)
- _szScratch = int32(((uint32(_nMaxCells) * u32(4)) + (uint32(_nMaxCells) * u32(2))) + (_pBt.X15))
+ _nMaxCells = (_nMaxCells + int32(3)) & int32(-4)
+ _szScratch = int32(((uint32(_nMaxCells) * uint32(4)) + (uint32(_nMaxCells) * uint32(2))) + _pBt.XpageSize)
func() {
- if _szScratch > (i32(6) * int32(_pBt.X15)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66279), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(83898)))
+ if _szScratch > (int32(6) * int32(_pBt.XpageSize)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66279), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82060)))
crt.X__builtin_abort(tls)
}
}()
- *(***uint8)(unsafe.Pointer(&(_b.X2))) = (**uint8)(_sqlite3ScratchMalloc(tls, _szScratch))
- if (_b.X2) == nil {
- _rc = _sqlite3NomemError(tls, i32(66282))
+ _b.XapCell = (**uint8)(_sqlite3ScratchMalloc(tls, _szScratch))
+ if _b.XapCell == nil {
+ _rc = _sqlite3NomemError(tls, int32(66282))
goto _balance_cleanup
}
- *(**uint16)(unsafe.Pointer(&(_b.X3))) = (*uint16)(unsafe.Pointer((**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_nMaxCells)))))
- _aSpace1 = (*uint8)(unsafe.Pointer((*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_nMaxCells)))))
+ _b.XszCell = (*uint16)(unsafe.Pointer(elem88(_b.XapCell, uintptr(_nMaxCells))))
+ _aSpace1 = (*uint8)(unsafe.Pointer(elem20(_b.XszCell, uintptr(_nMaxCells))))
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_aSpace1))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66287), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(83930)))
+ if (int32(uintptr(unsafe.Pointer(_aSpace1))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66287), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82092)))
crt.X__builtin_abort(tls)
}
}()
- *(**XMemPage)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_b.X1))))) = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(i32(0))))
- _leafCorrection = uint16(int32((*XMemPage)(_b.X1).X5) * i32(4))
- _leafData = int32((*XMemPage)(_b.X1).X3)
- _i = i32(0)
+ *(**XMemPage)(unsafe.Pointer(&_b.XpRef)) = *elem30((**XMemPage)(unsafe.Pointer(&_apOld)), 0)
+ _leafCorrection = uint16(int32((*XMemPage)(_b.XpRef).Xleaf) * int32(4))
+ _leafData = int32((*XMemPage)(_b.XpRef).XintKeyLeaf)
+ _i = int32(0)
_37:
if _i >= _nOld {
goto _40
}
- _17_pOld = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(_i)))
- _17_limit = int32(_17_pOld.X14)
- _17_aData = _17_pOld.X19
- _17_maskPage = _17_pOld.X15
- _17_piCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_17_aData)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_17_pOld.X12)))))))
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_17_pOld.X19)) + 1*uintptr(i32(0))))) != int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(i32(0))))).X19)) + 1*uintptr(i32(0))))) {
- _rc = _sqlite3CorruptError(tls, i32(66320))
+ _17_pOld = *elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_i))
+ _17_limit = int32(_17_pOld.XnCell)
+ _17_aData = _17_pOld.XaData
+ _17_maskPage = _17_pOld.XmaskPage
+ _17_piCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_17_aData)) + uintptr(_17_pOld.XcellOffset)))
+ if int32(*elem15(_17_pOld.XaData, 0)) != int32(*elem15((*elem30((**XMemPage)(unsafe.Pointer(&_apOld)), 0)).XaData, 0)) {
+ _rc = _sqlite3CorruptError(tls, int32(66320))
goto _balance_cleanup
}
- crt.Xmemset(tls, (unsafe.Pointer)((*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3))+2*uintptr(_b.X0)))), i32(0), u32(2)*uint32(_17_limit+int32(_17_pOld.X9)))
- if int32(_17_pOld.X9) <= i32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(elem20(_b.XszCell, uintptr(_b.XnCell))), int32(0), uint32(2)*uint32(_17_limit+int32(_17_pOld.XnOverflow)))
+ if int32(_17_pOld.XnOverflow) <= int32(0) {
goto _42
}
- _17_limit = int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_17_pOld.X16))))) + 2*uintptr(i32(0)))))
- _j = i32(0)
+ _17_limit = int32(*elem20((*uint16)(unsafe.Pointer(&_17_pOld.XaiOvfl)), 0))
+ _j = int32(0)
_43:
if _j >= _17_limit {
goto _46
}
- *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_b.X0))) = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_17_aData)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_17_maskPage)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_17_piCell)) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_17_piCell)) + 1*uintptr(i32(1)))))))))))))
- {
- p := &_17_piCell
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(2))))
- sink13(*p)
- }
- *(*int32)(unsafe.Pointer(&(_b.X0))) += 1
+ *elem88(_b.XapCell, uintptr(_b.XnCell)) = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_17_aData)) + uintptr(int32(_17_maskPage)&((int32(*elem15(_17_piCell, 0))<<8)|int32(*elem15(_17_piCell, uintptr(1)))))))
+ *(*uintptr)(unsafe.Pointer(&_17_piCell)) += uintptr(int32(2))
+ _b.XnCell += 1
_j += 1
goto _43
_46:
- _k = i32(0)
+ _k = int32(0)
_47:
- if _k >= int32(_17_pOld.X9) {
+ if _k >= int32(_17_pOld.XnOverflow) {
goto _50
}
func() {
- if _k != i32(0) && (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_17_pOld.X16))))) + 2*uintptr(_k-i32(1)))))+i32(1)) != int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_17_pOld.X16))))) + 2*uintptr(_k)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66350), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(83960)))
+ if _k != int32(0) && (int32(*elem20((*uint16)(unsafe.Pointer(&_17_pOld.XaiOvfl)), uintptr(_k-int32(1))))+int32(1)) != int32(*elem20((*uint16)(unsafe.Pointer(&_17_pOld.XaiOvfl)), uintptr(_k))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66350), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82122)))
crt.X__builtin_abort(tls)
}
}()
- *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_b.X0))) = *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]*uint8)(unsafe.Pointer(&(_17_pOld.X17))))) + 4*uintptr(_k)))
- *(*int32)(unsafe.Pointer(&(_b.X0))) += 1
+ *elem88(_b.XapCell, uintptr(_b.XnCell)) = *elem88((**uint8)(unsafe.Pointer(&_17_pOld.XapOvfl)), uintptr(_k))
+ _b.XnCell += 1
_k += 1
goto _47
_50:
_42:
- _17_piEnd = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_17_aData))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_17_pOld.X12))))))))) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(2)*int32(_17_pOld.X14))))))))
+ _17_piEnd = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_17_aData))+uintptr(_17_pOld.XcellOffset))))) + uintptr(int32(2)*int32(_17_pOld.XnCell))))
_54:
- if uintptr(unsafe.Pointer(_17_piCell)) < uintptr(unsafe.Pointer(_17_piEnd)) {
+ if crt.P2U(unsafe.Pointer(_17_piCell)) < crt.P2U(unsafe.Pointer(_17_piEnd)) {
func() {
- if (_b.X0) >= _nMaxCells {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66357), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84005)))
+ if _b.XnCell >= _nMaxCells {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66357), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82167)))
crt.X__builtin_abort(tls)
}
}()
- *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_b.X0))) = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_17_aData)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_17_maskPage)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_17_piCell)) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_17_piCell)) + 1*uintptr(i32(1)))))))))))))
- {
- p := &_17_piCell
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(2))))
- sink13(*p)
- }
- *(*int32)(unsafe.Pointer(&(_b.X0))) += 1
+ *elem88(_b.XapCell, uintptr(_b.XnCell)) = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_17_aData)) + uintptr(int32(_17_maskPage)&((int32(*elem15(_17_piCell, 0))<<8)|int32(*elem15(_17_piCell, uintptr(1)))))))
+ *(*uintptr)(unsafe.Pointer(&_17_piCell)) += uintptr(int32(2))
+ _b.XnCell += 1
goto _54
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntOld)) + 4*uintptr(_i))) = _b.X0
- if _i >= (_nOld-i32(1)) || _leafData != 0 {
+ *elem8((*int32)(unsafe.Pointer(&_cntOld)), uintptr(_i)) = _b.XnCell
+ if _i >= (_nOld-int32(1)) || _leafData != 0 {
goto _59
}
- _23_sz = uint16(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i))))
+ _23_sz = uint16(*elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)))
func() {
- if (_b.X0) >= _nMaxCells {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66367), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84005)))
+ if _b.XnCell >= _nMaxCells {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66367), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82167)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_b.X0))) = _23_sz
- _23_pTemp = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSpace1)) + 1*uintptr(_iSpace1)))
- {
- p := &_iSpace1
- *p = (*p) + int32(_23_sz)
- sink1(*p)
- }
+ *elem20(_b.XszCell, uintptr(_b.XnCell)) = _23_sz
+ _23_pTemp = elem15(_aSpace1, uintptr(_iSpace1))
+ _iSpace1 += int32(_23_sz)
func() {
- if int32(_23_sz) > (int32(_pBt.X11) + i32(23)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66371), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84023)))
+ if int32(_23_sz) > (int32(_pBt.XmaxLocal) + int32(23)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66371), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82185)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iSpace1 > int32(_pBt.X15) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66372), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84044)))
+ if _iSpace1 > int32(_pBt.XpageSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66372), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82206)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)(_23_pTemp), (unsafe.Pointer)(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apDiv)) + 4*uintptr(_i)))), uint32(_23_sz))
- *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_b.X0))) = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_23_pTemp)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_leafCorrection)))))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_23_pTemp), unsafe.Pointer(*elem88((**uint8)(unsafe.Pointer(&_apDiv)), uintptr(_i))), uint32(_23_sz))
+ *elem88(_b.XapCell, uintptr(_b.XnCell)) = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_23_pTemp)) + uintptr(_leafCorrection)))
func() {
- if int32(_leafCorrection) != i32(0) && int32(_leafCorrection) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66375), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84074)))
+ if int32(_leafCorrection) != int32(0) && int32(_leafCorrection) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66375), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82236)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_b.X0))) = uint16(int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_b.X0)))) - int32(_leafCorrection))
- if (_17_pOld.X5) == 0 {
+ *elem20(_b.XszCell, uintptr(_b.XnCell)) = uint16(int32(*elem20(_b.XszCell, uintptr(_b.XnCell))) - int32(_leafCorrection))
+ if _17_pOld.Xleaf == 0 {
func() {
- if int32(_leafCorrection) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66378), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84113)))
+ if int32(_leafCorrection) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66378), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82275)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_17_pOld.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66379), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84131)))
+ if int32(_17_pOld.XhdrOffset) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66379), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82293)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_b.X0)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_17_pOld.X19))+1*uintptr(i32(8))))), uint32(i32(4)))
+ crt.Xmemcpy(tls, unsafe.Pointer(*elem88(_b.XapCell, uintptr(_b.XnCell))), unsafe.Pointer(elem15(_17_pOld.XaData, uintptr(8))), uint32(4))
goto _74
}
func() {
- if int32(_leafCorrection) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66384), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84150)))
+ if int32(_leafCorrection) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66384), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82312)))
crt.X__builtin_abort(tls)
}
}()
_77:
- if int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_b.X0)))) < i32(4) {
+ if int32(*elem20(_b.XszCell, uintptr(_b.XnCell))) < int32(4) {
func() {
- if int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_b.X0)))) != i32(3) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66388), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84168)))
+ if int32(*elem20(_b.XszCell, uintptr(_b.XnCell))) != int32(3) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66388), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82330)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_b.X0)))) != (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSpace1))+1*uintptr(_iSpace1-i32(3)))) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66389), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84203)))
+ if (*elem88(_b.XapCell, uintptr(_b.XnCell))) != elem15(_aSpace1, uintptr(_iSpace1-int32(3))) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66389), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82365)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSpace1)) + 1*uintptr(postInc1(&_iSpace1, int32(1))))) = uint8(i32(0))
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_b.X0))) += 1
+ *elem15(_aSpace1, uintptr(postInc2(&_iSpace1, 1))) = 0
+ *elem20(_b.XszCell, uintptr(_b.XnCell)) += 1
goto _77
}
_74:
- *(*int32)(unsafe.Pointer(&(_b.X0))) += 1
+ _b.XnCell += 1
_59:
_i += 1
goto _37
_40:
- _usableSpace = int32(((_pBt.X16) - uint32(i32(12))) + uint32(_leafCorrection))
- _i = i32(0)
+ _usableSpace = int32((_pBt.XusableSize - uint32(12)) + uint32(_leafCorrection))
+ _i = int32(0)
_85:
if _i >= _nOld {
goto _88
}
- _27_p = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(_i)))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i))) = _usableSpace - int32(_27_p.X13)
- _j = i32(0)
+ _27_p = *elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_i))
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)) = _usableSpace - int32(_27_p.XnFree)
+ _j = int32(0)
_89:
- if _j >= int32(_27_p.X9) {
+ if _j >= int32(_27_p.XnOverflow) {
goto _92
}
- {
- p := (*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i)))
- *p = (*p) + (i32(2) + int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_27_p.X24)})))(tls, _27_p, *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]*uint8)(unsafe.Pointer(&(_27_p.X17))))) + 4*uintptr(_j))))))
- sink1(*p)
- }
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)) += int32(2) + int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _27_p.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _27_p, *elem88((**uint8)(unsafe.Pointer(&_27_p.XapOvfl)), uintptr(_j))))
_j += 1
goto _89
_92:
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i))) = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntOld)) + 4*uintptr(_i)))
+ *elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i)) = *elem8((*int32)(unsafe.Pointer(&_cntOld)), uintptr(_i))
_i += 1
goto _85
_88:
_k = _nOld
- _i = i32(0)
+ _i = int32(0)
_93:
if _i >= _k {
goto _96
}
_97:
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i)))) <= _usableSpace {
+ if (*elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i))) <= _usableSpace {
goto _98
}
- if (_i + i32(1)) < _k {
+ if (_i + int32(1)) < _k {
goto _99
}
- _k = _i + i32(2)
- if _k > i32(5) {
- _rc = _sqlite3CorruptError(tls, i32(66429))
+ _k = _i + int32(2)
+ if _k > int32(5) {
+ _rc = _sqlite3CorruptError(tls, int32(66429))
goto _balance_cleanup
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_k-i32(1)))) = i32(0)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_k-i32(1)))) = _b.X0
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_k-int32(1))) = int32(0)
+ *elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_k-int32(1))) = _b.XnCell
_99:
- _29_sz = i32(2) + int32(_cachedCellSize(tls, &_b, (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i))))-i32(1)))
- {
- p := (*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i)))
- *p = (*p) - _29_sz
- sink1(*p)
- }
+ _29_sz = int32(2) + int32(_cachedCellSize(tls, &_b, (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i)))-int32(1)))
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)) -= _29_sz
if _leafData != 0 {
goto _101
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i)))) < (_b.X0) {
- _29_sz = i32(2) + int32(_cachedCellSize(tls, &_b, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i)))))
+ if (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i))) < _b.XnCell {
+ _29_sz = int32(2) + int32(_cachedCellSize(tls, &_b, *elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i))))
goto _103
}
- _29_sz = i32(0)
+ _29_sz = int32(0)
_103:
_101:
- {
- p := (*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i+i32(1))))
- *p = (*p) + _29_sz
- sink1(*p)
- }
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i))) -= 1
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i+int32(1))) += _29_sz
+ *elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i)) -= 1
goto _97
_98:
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i)))) >= (_b.X0) {
+ if (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i))) >= _b.XnCell {
goto _105
}
- _29_sz = i32(2) + int32(_cachedCellSize(tls, &_b, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i)))))
- if ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i)))) + _29_sz) > _usableSpace {
+ _29_sz = int32(2) + int32(_cachedCellSize(tls, &_b, *elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i))))
+ if ((*elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i))) + _29_sz) > _usableSpace {
goto _105
}
- {
- p := (*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i)))
- *p = (*p) + _29_sz
- sink1(*p)
- }
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i))) += 1
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)) += _29_sz
+ *elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i)) += 1
if _leafData != 0 {
goto _107
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i)))) < (_b.X0) {
- _29_sz = i32(2) + int32(_cachedCellSize(tls, &_b, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i)))))
+ if (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i))) < _b.XnCell {
+ _29_sz = int32(2) + int32(_cachedCellSize(tls, &_b, *elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i))))
goto _109
}
- _29_sz = i32(0)
+ _29_sz = int32(0)
_109:
_107:
- {
- p := (*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i+i32(1))))
- *p = (*p) - _29_sz
- sink1(*p)
- }
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i+int32(1))) -= _29_sz
goto _98
_105:
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i)))) >= (_b.X0) {
- _k = _i + i32(1)
+ if (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i))) >= _b.XnCell {
+ _k = _i + int32(1)
goto _114
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i)))) <= func() int32 {
- if _i > i32(0) {
- return (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i-i32(1)))))
+ if (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i))) <= func() int32 {
+ if _i > int32(0) {
+ return (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i-int32(1))))
}
- return i32(0)
+ return int32(0)
}() {
- _rc = _sqlite3CorruptError(tls, i32(66462))
+ _rc = _sqlite3CorruptError(tls, int32(66462))
goto _balance_cleanup
}
_114:
_i += 1
goto _93
_96:
- _i = _k - i32(1)
+ _i = _k - int32(1)
_115:
- if _i <= i32(0) {
+ if _i <= int32(0) {
goto _118
}
- _42_szRight = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i)))
- _42_szLeft = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i-i32(1))))
- _42_r = (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i-i32(1))))) - i32(1)
- _42_d = (_42_r + i32(1)) - _leafData
+ _42_szRight = *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i))
+ _42_szLeft = *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i-int32(1)))
+ _42_r = (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i-int32(1)))) - int32(1)
+ _42_d = (_42_r + int32(1)) - _leafData
_cachedCellSize(tls, &_b, _42_d)
_119:
func() {
if _42_d >= _nMaxCells {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66488), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84256)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66488), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82418)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _42_r >= _nMaxCells {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66489), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84268)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66489), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82430)))
crt.X__builtin_abort(tls)
}
}()
_cachedCellSize(tls, &_b, _42_r)
- if (_42_szRight != i32(0)) && (_bBulk != 0 || (((_42_szRight + int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_42_d))))) + i32(2)) > (_42_szLeft - (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_42_r)))) + func() int32 {
- if _i == (_k - i32(1)) {
- return i32(0)
+ if (_42_szRight != int32(0)) && (_bBulk != 0 || (((_42_szRight + int32(*elem20(_b.XszCell, uintptr(_42_d)))) + int32(2)) > (_42_szLeft - (int32(*elem20(_b.XszCell, uintptr(_42_r))) + func() int32 {
+ if _i == (_k - int32(1)) {
+ return int32(0)
}
- return i32(2)
+ return int32(2)
}())))) {
goto _129
}
- {
- p := &_42_szRight
- *p = (*p) + (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_42_d)))) + i32(2))
- sink1(*p)
- }
- {
- p := &_42_szLeft
- *p = (*p) - (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_42_r)))) + i32(2))
- sink1(*p)
- }
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i-i32(1)))) = _42_r
+ _42_szRight += int32(*elem20(_b.XszCell, uintptr(_42_d))) + int32(2)
+ _42_szLeft -= int32(*elem20(_b.XszCell, uintptr(_42_r))) + int32(2)
+ *elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i-int32(1))) = _42_r
_42_r -= 1
_42_d -= 1
- if _42_r >= i32(0) {
+ if _42_r >= int32(0) {
goto _119
}
_129:
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i))) = _42_szRight
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_i-i32(1)))) = _42_szLeft
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i-i32(1))))) <= func() int32 {
- if _i > i32(1) {
- return (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i-i32(2)))))
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i)) = _42_szRight
+ *elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_i-int32(1))) = _42_szLeft
+ if (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i-int32(1)))) <= func() int32 {
+ if _i > int32(1) {
+ return (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i-int32(2))))
}
- return i32(0)
+ return int32(0)
}() {
- _rc = _sqlite3CorruptError(tls, i32(66504))
+ _rc = _sqlite3CorruptError(tls, int32(66504))
goto _balance_cleanup
}
_i -= 1
goto _115
_118:
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(i32(0))))) <= i32(0) && ((_pParent.X4) != uint32(i32(1)) || int32(_pParent.X14) != i32(0)) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66516), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84280)))
+ if (*elem8((*int32)(unsafe.Pointer(&_cntNew)), 0)) <= int32(0) && (_pParent.Xpgno != uint32(1) || int32(_pParent.XnCell) != int32(0)) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66516), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82442)))
crt.X__builtin_abort(tls)
}
}()
- _pageFlags = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(i32(0))))).X19)) + 1*uintptr(i32(0)))))
- _i = i32(0)
+ _pageFlags = int32(*elem15((*elem30((**XMemPage)(unsafe.Pointer(&_apOld)), 0)).XaData, 0))
+ _i = int32(0)
_138:
if _i >= _k {
goto _141
@@ -63549,9 +63294,9 @@ _138:
if _i >= _nOld {
goto _142
}
- _46_pNew = store52((**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew))+4*uintptr(_i))), *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(_i))))
- *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(_i))) = nil
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_46_pNew.X23))
+ _46_pNew = store84(elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i)), *elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_i)))
+ *elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_i)) = nil
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_46_pNew.XpDbPage))
_nNew += 1
if _rc != 0 {
goto _balance_cleanup
@@ -63559,29 +63304,29 @@ _138:
goto _144
_142:
func() {
- if _i <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66536), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(12970)))
+ if _i <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66536), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(12925)))
crt.X__builtin_abort(tls)
}
}()
_rc = _allocateBtreePage(tls, _pBt, &_46_pNew, &_pgno, func() uint32 {
if _bBulk != 0 {
- return uint32(i32(1))
+ return uint32(1)
}
return _pgno
- }(), uint8(i32(0)))
+ }(), 0)
if _rc != 0 {
goto _balance_cleanup
}
_zeroPage(tls, _46_pNew, _pageFlags)
- *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_i))) = _46_pNew
+ *elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i)) = _46_pNew
_nNew += 1
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntOld)) + 4*uintptr(_i))) = _b.X0
- if (_pBt.X5) == 0 {
+ *elem8((*int32)(unsafe.Pointer(&_cntOld)), uintptr(_i)) = _b.XnCell
+ if _pBt.XautoVacuum == 0 {
goto _150
}
- _ptrmapPut(tls, _pBt, _46_pNew.X4, uint8(i32(5)), _pParent.X4, &_rc)
- if _rc != i32(0) {
+ _ptrmapPut(tls, _pBt, _46_pNew.Xpgno, uint8(5), _pParent.Xpgno, &_rc)
+ if _rc != int32(0) {
goto _balance_cleanup
}
_150:
@@ -63589,26 +63334,26 @@ _144:
_i += 1
goto _138
_141:
- _i = i32(0)
+ _i = int32(0)
_152:
if _i >= _nNew {
goto _155
}
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgOrder)) + 4*uintptr(_i))) = store5((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgno))+4*uintptr(_i))), (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_i)))).X4)
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgFlags)) + 2*uintptr(_i))) = (*XPgHdr)((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_i)))).X23).X6
- _j = i32(0)
+ *elem7((*uint32)(unsafe.Pointer(&_aPgOrder)), uintptr(_i)) = store23(elem7((*uint32)(unsafe.Pointer(&_aPgno)), uintptr(_i)), (*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i))).Xpgno)
+ *elem20((*uint16)(unsafe.Pointer(&_aPgFlags)), uintptr(_i)) = (*XPgHdr)((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i))).XpDbPage).Xflags
+ _j = int32(0)
_156:
if _j >= _i {
goto _159
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgno)) + 4*uintptr(_j)))) == (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgno)) + 4*uintptr(_i)))) {
+ if (*elem7((*uint32)(unsafe.Pointer(&_aPgno)), uintptr(_j))) == (*elem7((*uint32)(unsafe.Pointer(&_aPgno)), uintptr(_i))) {
func() {
- if (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66577), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84349)))
+ if _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66577), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82511)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3CorruptError(tls, i32(66578))
+ _rc = _sqlite3CorruptError(tls, int32(66578))
goto _balance_cleanup
}
_j += 1
@@ -63617,97 +63362,93 @@ _159:
_i += 1
goto _152
_155:
- _i = i32(0)
+ _i = int32(0)
_163:
if _i >= _nNew {
goto _166
}
- _54_iBest = i32(0)
- _j = i32(1)
+ _54_iBest = int32(0)
+ _j = int32(1)
_167:
if _j >= _nNew {
goto _170
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgOrder)) + 4*uintptr(_j)))) < (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgOrder)) + 4*uintptr(_54_iBest)))) {
+ if (*elem7((*uint32)(unsafe.Pointer(&_aPgOrder)), uintptr(_j))) < (*elem7((*uint32)(unsafe.Pointer(&_aPgOrder)), uintptr(_54_iBest))) {
_54_iBest = _j
}
_j += 1
goto _167
_170:
- _pgno = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgOrder)) + 4*uintptr(_54_iBest)))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgOrder)) + 4*uintptr(_54_iBest))) = u32(4294967295)
+ _pgno = *elem7((*uint32)(unsafe.Pointer(&_aPgOrder)), uintptr(_54_iBest))
+ *elem7((*uint32)(unsafe.Pointer(&_aPgOrder)), uintptr(_54_iBest)) = uint32(4294967295)
if _54_iBest == _i {
goto _172
}
if _54_iBest > _i {
- _sqlite3PagerRekey(tls, (*XPgHdr)((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_54_iBest)))).X23), ((_pBt.X18)+uint32(_54_iBest))+uint32(i32(1)), uint16(i32(0)))
+ _sqlite3PagerRekey(tls, (*XPgHdr)((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_54_iBest))).XpDbPage), (_pBt.XnPage+uint32(_54_iBest))+uint32(1), 0)
}
- _sqlite3PagerRekey(tls, (*XPgHdr)((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_i)))).X23), _pgno, *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgFlags)) + 2*uintptr(_54_iBest))))
- *(*uint32)(unsafe.Pointer(&((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_i)))).X4))) = _pgno
+ _sqlite3PagerRekey(tls, (*XPgHdr)((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i))).XpDbPage), _pgno, *elem20((*uint16)(unsafe.Pointer(&_aPgFlags)), uintptr(_54_iBest)))
+ (*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i))).Xpgno = _pgno
_172:
_i += 1
goto _163
_166:
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pParent.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66612), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(83543)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pParent.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66612), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(81705)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3Put4byte(tls, _pRight, (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_nNew-i32(1))))).X4)
- if ((_pageFlags & i32(8)) == i32(0)) && (_nOld != _nNew) {
- _58_pOld = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() **XMemPage {
+ _sqlite3Put4byte(tls, _pRight, (*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_nNew-int32(1)))).Xpgno)
+ if ((_pageFlags & int32(8)) == int32(0)) && (_nOld != _nNew) {
+ _58_pOld = *elem30(func() **XMemPage {
if _nNew > _nOld {
return (**XMemPage)(unsafe.Pointer(&_apNew))
}
return (**XMemPage)(unsafe.Pointer(&_apOld))
- }())) + 4*uintptr(_nOld-i32(1))))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_nNew-i32(1))))).X19))+1*uintptr(i32(8))))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_58_pOld.X19))+1*uintptr(i32(8))))), uint32(i32(4)))
+ }(), uintptr(_nOld-int32(1)))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_nNew-int32(1)))).XaData, uintptr(8))), unsafe.Pointer(elem15(_58_pOld.XaData, uintptr(8))), uint32(4))
}
- if (_pBt.X5) == 0 {
+ if _pBt.XautoVacuum == 0 {
goto _180
}
- _59_pNew = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0))))
- _59_aOld = _59_pNew.X19
- _59_cntOldNext = int32(_59_pNew.X14) + int32(_59_pNew.X9)
- _59_usableSize = int32(_pBt.X16)
- _59_iNew = i32(0)
- _59_iOld = i32(0)
- _i = i32(0)
+ _59_pNew = *elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0)
+ _59_aOld = _59_pNew.XaData
+ _59_cntOldNext = int32(_59_pNew.XnCell) + int32(_59_pNew.XnOverflow)
+ _59_usableSize = int32(_pBt.XusableSize)
+ _59_iNew = int32(0)
+ _59_iOld = int32(0)
+ _i = int32(0)
_181:
- if _i >= (_b.X0) {
+ if _i >= _b.XnCell {
goto _184
}
- _60_pCell = *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_i)))
+ _60_pCell = *elem88(_b.XapCell, uintptr(_i))
if _i == _59_cntOldNext {
_61_pOld = func() *XMemPage {
- if preInc1(&_59_iOld, 1) < _nNew {
- return (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_59_iOld))))
+ if preInc2(&_59_iOld, 1) < _nNew {
+ return (*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_59_iOld)))
}
- return (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(_59_iOld))))
+ return (*elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_59_iOld)))
}()
- {
- p := &_59_cntOldNext
- *p = (*p) + ((int32(_61_pOld.X14) + int32(_61_pOld.X9)) + bool2int(_leafData == 0))
- sink1(*p)
- }
- _59_aOld = _61_pOld.X19
+ _59_cntOldNext += (int32(_61_pOld.XnCell) + int32(_61_pOld.XnOverflow)) + bool2int(_leafData == 0)
+ _59_aOld = _61_pOld.XaData
}
- if _i != (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_59_iNew)))) {
+ if _i != (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_59_iNew))) {
goto _188
}
- _59_pNew = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(preInc1(&_59_iNew, 1))))
+ _59_pNew = *elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(preInc2(&_59_iNew, 1)))
if _leafData == 0 {
goto _182
}
_188:
- if _59_iOld < _nNew && (_59_pNew.X4) == (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aPgno)) + 4*uintptr(_59_iOld)))) && (uint32(uintptr(unsafe.Pointer(_60_pCell))) >= uint32(uintptr(unsafe.Pointer(_59_aOld))) && uint32(uintptr(unsafe.Pointer(_60_pCell))) < uint32(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_59_aOld))+1*uintptr(_59_usableSize))))))) {
+ if _59_iOld < _nNew && _59_pNew.Xpgno == (*elem7((*uint32)(unsafe.Pointer(&_aPgno)), uintptr(_59_iOld))) && (uint32(crt.P2U(unsafe.Pointer(_60_pCell))) >= uint32(crt.P2U(unsafe.Pointer(_59_aOld))) && uint32(crt.P2U(unsafe.Pointer(_60_pCell))) < uint32(crt.P2U(unsafe.Pointer(elem15(_59_aOld, uintptr(_59_usableSize)))))) {
goto _193
}
if _leafCorrection == 0 {
- _ptrmapPut(tls, _pBt, _sqlite3Get4byte(tls, _60_pCell), uint8(i32(5)), _59_pNew.X4, &_rc)
+ _ptrmapPut(tls, _pBt, _sqlite3Get4byte(tls, _60_pCell), uint8(5), _59_pNew.Xpgno, &_rc)
}
- if int32(_cachedCellSize(tls, &_b, _i)) > int32(_59_pNew.X11) {
+ if int32(_cachedCellSize(tls, &_b, _i)) > int32(_59_pNew.XminLocal) {
_ptrmapPutOvflPtr(tls, _59_pNew, _60_pCell, &_rc)
}
if _rc != 0 {
@@ -63719,153 +63460,147 @@ _182:
goto _181
_184:
_180:
- _i = i32(0)
+ _i = int32(0)
_197:
- if _i >= (_nNew - i32(1)) {
+ if _i >= (_nNew - int32(1)) {
goto _200
}
- _66_pNew = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_i)))
- _j = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_i)))
+ _66_pNew = *elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i))
+ _j = *elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_i))
func() {
if _j >= _nMaxCells {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66688), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84360)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66688), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82522)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_j)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66689), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84372)))
+ if (*elem88(_b.XapCell, uintptr(_j))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66689), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82534)))
crt.X__builtin_abort(tls)
}
}()
- _66_pCell = *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_j)))
- _66_sz = int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_j)))) + int32(_leafCorrection)
- _66_pTemp = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOvflSpace)) + 1*uintptr(_iOvflSpace)))
- if (_66_pNew.X5) == 0 {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_66_pNew.X19))+1*uintptr(i32(8))))), (unsafe.Pointer)(_66_pCell), uint32(i32(4)))
+ _66_pCell = *elem88(_b.XapCell, uintptr(_j))
+ _66_sz = int32(*elem20(_b.XszCell, uintptr(_j))) + int32(_leafCorrection)
+ _66_pTemp = elem15(_aOvflSpace, uintptr(_iOvflSpace))
+ if _66_pNew.Xleaf == 0 {
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_66_pNew.XaData, uintptr(8))), unsafe.Pointer(_66_pCell), uint32(4))
goto _208
}
if _leafData != 0 {
_j -= 1
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_66_pNew.X25)})))(tls, _66_pNew, *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X2)) + 4*uintptr(_j))), &_68_info)
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _66_pNew.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _66_pNew, *elem88(_b.XapCell, uintptr(_j)), &_68_info)
_66_pCell = _66_pTemp
- _66_sz = i32(4) + _sqlite3PutVarint(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_66_pCell))+1*uintptr(i32(4)))), uint64(_68_info.X0))
+ _66_sz = int32(4) + _sqlite3PutVarint(tls, elem15(_66_pCell, uintptr(4)), uint64(_68_info.XnKey))
_66_pTemp = nil
goto _208
}
- {
- p := &_66_pCell
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 1*uintptr(i32(4))))
- sink13(*p)
- }
- if int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_b.X3)) + 2*uintptr(_j)))) == i32(4) {
+ *(*uintptr)(unsafe.Pointer(&_66_pCell)) -= uintptr(int32(4))
+ if int32(*elem20(_b.XszCell, uintptr(_j))) == int32(4) {
func() {
- if int32(_leafCorrection) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66721), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84150)))
+ if int32(_leafCorrection) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66721), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82312)))
crt.X__builtin_abort(tls)
}
}()
- _66_sz = int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pParent.X24)})))(tls, _pParent, _66_pCell))
+ _66_sz = int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pParent.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pParent, _66_pCell))
}
_208:
- {
- p := &_iOvflSpace
- *p = (*p) + _66_sz
- sink1(*p)
- }
+ _iOvflSpace += _66_sz
func() {
- if _66_sz > (int32(_pBt.X11) + i32(23)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66726), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84023)))
+ if _66_sz > (int32(_pBt.XmaxLocal) + int32(23)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66726), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82185)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iOvflSpace > int32(_pBt.X15) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66727), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84387)))
+ if _iOvflSpace > int32(_pBt.XpageSize) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66727), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82549)))
crt.X__builtin_abort(tls)
}
}()
- _insertCell(tls, _pParent, _nxDiv+_i, _66_pCell, _66_sz, _66_pTemp, _66_pNew.X4, &_rc)
- if _rc != i32(0) {
+ _insertCell(tls, _pParent, _nxDiv+_i, _66_pCell, _66_sz, _66_pTemp, _66_pNew.Xpgno, &_rc)
+ if _rc != int32(0) {
goto _balance_cleanup
}
func() {
- if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pParent.X23)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66730), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(83543)))
+ if _sqlite3PagerIswriteable(tls, (*XPgHdr)(_pParent.XpDbPage)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66730), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(81705)))
crt.X__builtin_abort(tls)
}
}()
_i += 1
goto _197
_200:
- _i = i32(1) - _nNew
+ _i = int32(1) - _nNew
_219:
if _i >= _nNew {
goto _222
}
_71_iPg = func() int32 {
- if _i < i32(0) {
+ if _i < int32(0) {
return (-_i)
}
return _i
}()
func() {
- if _71_iPg < i32(0) || _71_iPg >= _nNew {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66757), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84420)))
+ if _71_iPg < int32(0) || _71_iPg >= _nNew {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66757), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82582)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_abDone)) + 1*uintptr(_71_iPg)))) != 0 {
+ if (*elem15((*uint8)(unsafe.Pointer(&_abDone)), uintptr(_71_iPg))) != 0 {
goto _220
}
- if _i < i32(0) && (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntOld)) + 4*uintptr(_71_iPg-i32(1))))) < (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_71_iPg-i32(1))))) {
+ if _i < int32(0) && (*elem8((*int32)(unsafe.Pointer(&_cntOld)), uintptr(_71_iPg-int32(1)))) < (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_71_iPg-int32(1)))) {
goto _230
}
func() {
- if _71_iPg != i32(0) && (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntOld)) + 4*uintptr(_71_iPg-i32(1))))) < (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_71_iPg-i32(1))))) && (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_abDone)) + 1*uintptr(_71_iPg-i32(1))))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66768), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84439)))
+ if _71_iPg != int32(0) && (*elem8((*int32)(unsafe.Pointer(&_cntOld)), uintptr(_71_iPg-int32(1)))) < (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_71_iPg-int32(1)))) && (*elem15((*uint8)(unsafe.Pointer(&_abDone)), uintptr(_71_iPg-int32(1)))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66768), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82601)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_71_iPg)))) < (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntOld)) + 4*uintptr(_71_iPg)))) && (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_abDone)) + 1*uintptr(_71_iPg+i32(1))))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66772), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84495)))
+ if (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_71_iPg))) < (*elem8((*int32)(unsafe.Pointer(&_cntOld)), uintptr(_71_iPg))) && (*elem15((*uint8)(unsafe.Pointer(&_abDone)), uintptr(_71_iPg+int32(1)))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66772), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82657)))
crt.X__builtin_abort(tls)
}
}()
- if _71_iPg == i32(0) {
- _72_iNew = store1(&_72_iOld, i32(0))
- _72_nNewCell = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(i32(0))))
+ if _71_iPg == int32(0) {
+ _72_iNew = store2(&_72_iOld, int32(0))
+ _72_nNewCell = *elem8((*int32)(unsafe.Pointer(&_cntNew)), 0)
goto _239
}
_72_iOld = func() int32 {
if _71_iPg < _nOld {
- return ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntOld)) + 4*uintptr(_71_iPg-i32(1))))) + bool2int(_leafData == 0))
+ return ((*elem8((*int32)(unsafe.Pointer(&_cntOld)), uintptr(_71_iPg-int32(1)))) + bool2int(_leafData == 0))
}
- return (_b.X0)
+ return _b.XnCell
}()
- _72_iNew = (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_71_iPg-i32(1))))) + bool2int(_leafData == 0)
- _72_nNewCell = (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_cntNew)) + 4*uintptr(_71_iPg)))) - _72_iNew
+ _72_iNew = (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_71_iPg-int32(1)))) + bool2int(_leafData == 0)
+ _72_nNewCell = (*elem8((*int32)(unsafe.Pointer(&_cntNew)), uintptr(_71_iPg))) - _72_iNew
_239:
- _rc = _editPage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_71_iPg))), _72_iOld, _72_iNew, _72_nNewCell, &_b)
+ _rc = _editPage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_71_iPg)), _72_iOld, _72_iNew, _72_nNewCell, &_b)
if _rc != 0 {
goto _balance_cleanup
}
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_abDone)) + 1*uintptr(_71_iPg))) += 1
- *(*uint16)(unsafe.Pointer(&((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_71_iPg)))).X13))) = uint16(_usableSpace - (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_szNew)) + 4*uintptr(_71_iPg)))))
+ *elem15((*uint8)(unsafe.Pointer(&_abDone)), uintptr(_71_iPg)) += 1
+ (*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_71_iPg))).XnFree = uint16(_usableSpace - (*elem8((*int32)(unsafe.Pointer(&_szNew)), uintptr(_71_iPg))))
func() {
- if int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_71_iPg)))).X9) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66787), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84537)))
+ if int32((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_71_iPg))).XnOverflow) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66787), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82699)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_71_iPg)))).X14) != _72_nNewCell {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66788), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84562)))
+ if int32((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_71_iPg))).XnCell) != _72_nNewCell {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66788), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82724)))
crt.X__builtin_abort(tls)
}
}()
@@ -63875,58 +63610,58 @@ _220:
goto _219
_222:
func() {
- if crt.Xmemcmp(tls, (unsafe.Pointer)(&_abDone), (unsafe.Pointer)(str(84590)), uint32(_nNew)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66793), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84596)))
+ if crt.Xmemcmp(tls, unsafe.Pointer(&_abDone), unsafe.Pointer(str(82752)), uint32(_nNew)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66793), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82758)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nOld <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66795), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84639)))
+ if _nOld <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66795), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82801)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nNew <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66796), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84646)))
+ if _nNew <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66796), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82808)))
crt.X__builtin_abort(tls)
}
}()
- if (_isRoot != 0 && (int32(_pParent.X14) == i32(0))) && (int32(_pParent.X6) <= int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0))))).X13)) {
+ if (_isRoot != 0 && (int32(_pParent.XnCell) == int32(0))) && (int32(_pParent.XhdrOffset) <= int32((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0)).XnFree)) {
func() {
- if _nNew != i32(1) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66814), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84653)))
+ if _nNew != int32(1) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66814), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82815)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _defragmentPage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0)))), i32(-1))
+ _rc = _defragmentPage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0), int32(-1))
func() {
- if int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0))))).X13) != ((((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0))))).X19))+1*uintptr(i32(5)))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0))))).X19))+1*uintptr(i32(5)))))) + 1*uintptr(i32(1))))))-int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0))))).X12))-(int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0))))).X14)*i32(2))) && _rc == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66817), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84675)))
+ if int32((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0)).XnFree) != ((((int32(*elem15(elem15((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0)).XaData, uintptr(5)), 0))<<8)|int32(*elem15(elem15((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0)).XaData, uintptr(5)), uintptr(1))))-int32((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0)).XcellOffset))-(int32((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0)).XnCell)*int32(2))) && _rc == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66817), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82837)))
crt.X__builtin_abort(tls)
}
}()
- _copyNodeContent(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0)))), _pParent, &_rc)
- _freePage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(i32(0)))), &_rc)
+ _copyNodeContent(tls, *elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0), _pParent, &_rc)
+ _freePage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_apNew)), 0), &_rc)
goto _264
}
- if (_pBt.X5) == 0 || _leafCorrection != 0 {
+ if _pBt.XautoVacuum == 0 || _leafCorrection != 0 {
goto _264
}
- _i = i32(0)
+ _i = int32(0)
_265:
if _i >= _nNew {
goto _268
}
- _77_key = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_i)))).X19))+1*uintptr(i32(8)))))
- _ptrmapPut(tls, _pBt, _77_key, uint8(i32(5)), (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_i)))).X4, &_rc)
+ _77_key = _sqlite3Get4byte(tls, elem15((*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i))).XaData, uintptr(8)))
+ _ptrmapPut(tls, _pBt, _77_key, uint8(5), (*elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i))).Xpgno, &_rc)
_i += 1
goto _265
_268:
_264:
func() {
- if (_pParent.X0) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(66833), unsafe.Pointer((*int8)(unsafe.Pointer(&_balance_nonrootØ00__func__Ø000))), unsafe.Pointer(str(84782)))
+ if _pParent.XisInit == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(66833), unsafe.Pointer(&_balance_nonrootØ00__func__Ø000), unsafe.Pointer(str(82944)))
crt.X__builtin_abort(tls)
}
}()
@@ -63935,26 +63670,26 @@ _271:
if _i >= _nOld {
goto _balance_cleanup
}
- _freePage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(_i))), &_rc)
+ _freePage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_i)), &_rc)
_i += 1
goto _271
_balance_cleanup:
- _sqlite3ScratchFree(tls, (unsafe.Pointer)(_b.X2))
- _i = i32(0)
+ _sqlite3ScratchFree(tls, unsafe.Pointer(_b.XapCell))
+ _i = int32(0)
_275:
if _i >= _nOld {
goto _278
}
- _releasePage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apOld)) + 4*uintptr(_i))))
+ _releasePage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_apOld)), uintptr(_i)))
_i += 1
goto _275
_278:
- _i = i32(0)
+ _i = int32(0)
_279:
if _i >= _nNew {
goto _282
}
- _releasePage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apNew)) + 4*uintptr(_i))))
+ _releasePage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_apNew)), uintptr(_i)))
_i += 1
goto _279
_282:
@@ -63970,52 +63705,53 @@ _282:
_ = _aPgno
_ = _aPgOrder
_ = _aPgFlags
- _ = _b
- _ = _68_info
panic(0)
}
var _balance_nonrootØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_balance_nonrootØ00__func__Ø000[0], str(84798), 16)
+ crt.Xstrncpy(nil, &_balance_nonrootØ00__func__Ø000[0], str(82960), 16)
}
-// Allocate memory that is to be used and released right away.
-// This routine is similar to alloca() in that it is not intended
-// for situations where the memory might be held long-term. This
-// routine is intended to get memory to old large transient data
-// structures that would not normally fit on the stack of an
-// embedded processor.
+// C comment
+// /*
+// ** Allocate memory that is to be used and released right away.
+// ** This routine is similar to alloca() in that it is not intended
+// ** for situations where the memory might be held long-term. This
+// ** routine is intended to get memory to old large transient data
+// ** structures that would not normally fit on the stack of an
+// ** embedded processor.
+// */
func _sqlite3ScratchMalloc(tls *crt.TLS, _n int32) (r0 unsafe.Pointer) {
var _p unsafe.Pointer
func() {
- if _n <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24542), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ScratchMallocØ00__func__Ø000))), unsafe.Pointer(str(1358)))
+ if _n <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24542), unsafe.Pointer(&_sqlite3ScratchMallocØ00__func__Ø000), unsafe.Pointer(str(1376)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.X0))
- _sqlite3StatusHighwater(tls, i32(8), _n)
- if ((_mem0.X4) != 0) && ((_sqlite3Config.X20) >= _n) {
- _p = _mem0.X3
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_mem0.X3))))) = (*Xsqlite3_file)((*Xsqlite3_file)(_mem0.X3).X0)
- *(*uint32)(unsafe.Pointer(&(_mem0.X4))) -= 1
- _sqlite3StatusUp(tls, i32(3), i32(1))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
+ _sqlite3StatusHighwater(tls, int32(8), _n)
+ if (_mem0.XnScratchFree != 0) && (_sqlite3Config.XszScratch >= _n) {
+ _p = _mem0.XpScratchFree
+ *(**XScratchFreeslot)(unsafe.Pointer(&_mem0.XpScratchFree)) = (*XScratchFreeslot)((*XScratchFreeslot)(_mem0.XpScratchFree).XpNext)
+ _mem0.XnScratchFree -= 1
+ _sqlite3StatusUp(tls, int32(3), int32(1))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
goto _4
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
_p = _sqlite3Malloc(tls, uint64(_n))
- if (_sqlite3Config.X0) != 0 && (_p != nil) {
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.X0))
- _sqlite3StatusUp(tls, i32(4), _sqlite3MallocSize(tls, _p))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ if _sqlite3Config.XbMemstat != 0 && (_p != nil) {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
+ _sqlite3StatusUp(tls, int32(4), _sqlite3MallocSize(tls, _p))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
}
_4:
func() {
- if Xsqlite3_mutex_notheld(tls, (*Xsqlite3_mutex)(_mem0.X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24562), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ScratchMallocØ00__func__Ø000))), unsafe.Pointer(str(84814)))
+ if Xsqlite3_mutex_notheld(tls, (*Xsqlite3_mutex)(_mem0.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24562), unsafe.Pointer(&_sqlite3ScratchMallocØ00__func__Ø000), unsafe.Pointer(str(82976)))
crt.X__builtin_abort(tls)
}
}()
@@ -64025,18 +63761,18 @@ _4:
var _sqlite3ScratchMallocØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ScratchMallocØ00__func__Ø000[0], str(84848), 21)
+ crt.Xstrncpy(nil, &_sqlite3ScratchMallocØ00__func__Ø000[0], str(83010), 21)
}
func _cachedCellSize(tls *crt.TLS, _p *XCellArray, _N int32) (r0 uint16) {
func() {
- if _N < i32(0) || _N >= (_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65577), unsafe.Pointer((*int8)(unsafe.Pointer(&_cachedCellSizeØ00__func__Ø000))), unsafe.Pointer(str(84869)))
+ if _N < int32(0) || _N >= _p.XnCell {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65577), unsafe.Pointer(&_cachedCellSizeØ00__func__Ø000), unsafe.Pointer(str(83031)))
crt.X__builtin_abort(tls)
}
}()
- if (*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X3)) + 2*uintptr(_N)))) != 0 {
- return *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X3)) + 2*uintptr(_N)))
+ if (*elem20(_p.XszCell, uintptr(_N))) != 0 {
+ return *elem20(_p.XszCell, uintptr(_N))
}
return _computeCellSize(tls, _p, _N)
}
@@ -64044,95 +63780,97 @@ func _cachedCellSize(tls *crt.TLS, _p *XCellArray, _N int32) (r0 uint16) {
var _cachedCellSizeØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_cachedCellSizeØ00__func__Ø000[0], str(84888), 15)
+ crt.Xstrncpy(nil, &_cachedCellSizeØ00__func__Ø000[0], str(83050), 15)
}
-// Return the size of the Nth element of the cell array
+// C comment
+// /*
+// ** Return the size of the Nth element of the cell array
+// */
func _computeCellSize(tls *crt.TLS, _p *XCellArray, _N int32) (r0 uint16) {
func() {
- if _N < i32(0) || _N >= (_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65571), unsafe.Pointer((*int8)(unsafe.Pointer(&_computeCellSizeØ00__func__Ø000))), unsafe.Pointer(str(84869)))
+ if _N < int32(0) || _N >= _p.XnCell {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65571), unsafe.Pointer(&_computeCellSizeØ00__func__Ø000), unsafe.Pointer(str(83031)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X3)) + 2*uintptr(_N)))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65572), unsafe.Pointer((*int8)(unsafe.Pointer(&_computeCellSizeØ00__func__Ø000))), unsafe.Pointer(str(84903)))
+ if int32(*elem20(_p.XszCell, uintptr(_N))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65572), unsafe.Pointer(&_computeCellSizeØ00__func__Ø000), unsafe.Pointer(str(83065)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X3)) + 2*uintptr(_N))) = (*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{((*XMemPage)(_p.X1).X24)})))(tls, (*XMemPage)(_p.X1), *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2)) + 4*uintptr(_N))))
- return *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X3)) + 2*uintptr(_N)))
+ *elem20(_p.XszCell, uintptr(_N)) = func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := (*XMemPage)(_p.XpRef).XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, (*XMemPage)(_p.XpRef), *elem88(_p.XapCell, uintptr(_N)))
+ return *elem20(_p.XszCell, uintptr(_N))
}
var _computeCellSizeØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_computeCellSizeØ00__func__Ø000[0], str(84919), 16)
+ crt.Xstrncpy(nil, &_computeCellSizeØ00__func__Ø000[0], str(83081), 16)
}
-// The page handle passed as the first argument refers to a dirty page
-// with a page number other than iNew. This function changes the page's
-// page number to iNew and sets the value of the PgHdr.flags field to
-// the value passed as the third parameter.
+// C comment
+// /*
+// ** The page handle passed as the first argument refers to a dirty page
+// ** with a page number other than iNew. This function changes the page's
+// ** page number to iNew and sets the value of the PgHdr.flags field to
+// ** the value passed as the third parameter.
+// */
func _sqlite3PagerRekey(tls *crt.TLS, _pPg *XPgHdr, _iNew uint32, _flags uint16) {
func() {
- if (_pPg.X5) == _iNew {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54015), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerRekeyØ00__func__Ø000))), unsafe.Pointer(str(84935)))
+ if _pPg.Xpgno == _iNew {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54015), unsafe.Pointer(&_sqlite3PagerRekeyØ00__func__Ø000), unsafe.Pointer(str(83097)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pPg.X6))) = _flags
+ _pPg.Xflags = _flags
_sqlite3PcacheMove(tls, _pPg, _iNew)
}
var _sqlite3PagerRekeyØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerRekeyØ00__func__Ø000[0], str(84951), 18)
+ crt.Xstrncpy(nil, &_sqlite3PagerRekeyØ00__func__Ø000[0], str(83113), 18)
}
-// apCell[] and szCell[] contains pointers to and sizes of all cells in the
-// pages being balanced. The current page, pPg, has pPg->nCell cells starting
-// with apCell[iOld]. After balancing, this page should hold nNew cells
-// starting at apCell[iNew].
-//
-// This routine makes the necessary adjustments to pPg so that it contains
-// the correct cells after being balanced.
-//
-// The pPg->nFree field is invalid when this function returns. It is the
-// responsibility of the caller to set it correctly.
+// C comment
+// /*
+// ** apCell[] and szCell[] contains pointers to and sizes of all cells in the
+// ** pages being balanced. The current page, pPg, has pPg->nCell cells starting
+// ** with apCell[iOld]. After balancing, this page should hold nNew cells
+// ** starting at apCell[iNew].
+// **
+// ** This routine makes the necessary adjustments to pPg so that it contains
+// ** the correct cells after being balanced.
+// **
+// ** The pPg->nFree field is invalid when this function returns. It is the
+// ** responsibility of the caller to set it correctly.
+// */
func _editPage(tls *crt.TLS, _pPg *XMemPage, _iOld int32, _iNew int32, _nNew int32, _pCArray *XCellArray) (r0 int32) {
var _hdr, _nCell, _i, _iOldEnd, _iNewEnd, _1_nShift, _3_nAdd, _4_iCell, _6_iOff int32
var _aData, _pBegin, _pData, _pCellptr, _pTmp, _6_pCell *uint8
- _aData = _pPg.X19
- _hdr = int32(_pPg.X6)
- _pBegin = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPg.X21)) + 1*uintptr(_nNew*i32(2))))
- _nCell = int32(_pPg.X14)
- _iOldEnd = (_iOld + int32(_pPg.X14)) + int32(_pPg.X9)
+ _aData = _pPg.XaData
+ _hdr = int32(_pPg.XhdrOffset)
+ _pBegin = elem15(_pPg.XaCellIdx, uintptr(_nNew*int32(2)))
+ _nCell = int32(_pPg.XnCell)
+ _iOldEnd = (_iOld + int32(_pPg.XnCell)) + int32(_pPg.XnOverflow)
_iNewEnd = _iNew + _nNew
- _pTmp = (*uint8)(_sqlite3PagerTempSpace(tls, (*XPager)((*XBtShared)(_pPg.X18).X0)))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pTmp), (unsafe.Pointer)(_aData), (*XBtShared)(_pPg.X18).X16)
+ _pTmp = (*uint8)(_sqlite3PagerTempSpace(tls, (*XPager)((*XBtShared)(_pPg.XpBt).XpPager)))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pTmp), unsafe.Pointer(_aData), (*XBtShared)(_pPg.XpBt).XusableSize)
if _iOld < _iNew {
_1_nShift = _pageFreeArray(tls, _pPg, _iOld, _iNew-_iOld, _pCArray)
- crt.Xmemmove(tls, (unsafe.Pointer)(_pPg.X21), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPg.X21))+1*uintptr(_1_nShift*i32(2))))), uint32(_nCell*i32(2)))
- {
- p := &_nCell
- *p = (*p) - _1_nShift
- sink1(*p)
- }
+ crt.Xmemmove(tls, unsafe.Pointer(_pPg.XaCellIdx), unsafe.Pointer(elem15(_pPg.XaCellIdx, uintptr(_1_nShift*int32(2)))), uint32(_nCell*int32(2)))
+ _nCell -= _1_nShift
}
if _iNewEnd < _iOldEnd {
- {
- p := &_nCell
- *p = (*p) - _pageFreeArray(tls, _pPg, _iNewEnd, _iOldEnd-_iNewEnd, _pCArray)
- sink1(*p)
- }
+ _nCell -= _pageFreeArray(tls, _pPg, _iNewEnd, _iOldEnd-_iNewEnd, _pCArray)
}
- _pData = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(((((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1))))))-i32(1))&i32(65535))+i32(1))))
- if uintptr(unsafe.Pointer(_pData)) < uintptr(unsafe.Pointer(_pBegin)) {
+ _pData = elem15(_aData, uintptr(((((int32(*elem15(elem15(_aData, uintptr(_hdr+int32(5))), 0))<<8)|int32(*elem15(elem15(_aData, uintptr(_hdr+int32(5))), uintptr(1))))-int32(1))&int32(65535))+int32(1)))
+ if crt.P2U(unsafe.Pointer(_pData)) < crt.P2U(unsafe.Pointer(_pBegin)) {
goto _editpage_fail
}
if _iNew >= _iOld {
@@ -64145,141 +63883,137 @@ func _editPage(tls *crt.TLS, _pPg *XMemPage, _iOld int32, _iNew int32, _nNew int
return (_iOld - _iNew)
}()
func() {
- if (_iOld-_iNew) >= _nNew && _nCell != i32(0) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65805), unsafe.Pointer((*int8)(unsafe.Pointer(&_editPageØ00__func__Ø000))), unsafe.Pointer(str(84969)))
+ if (_iOld-_iNew) >= _nNew && _nCell != int32(0) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65805), unsafe.Pointer(&_editPageØ00__func__Ø000), unsafe.Pointer(str(83131)))
crt.X__builtin_abort(tls)
}
}()
- _pCellptr = _pPg.X21
- crt.Xmemmove(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCellptr))+1*uintptr(_3_nAdd*i32(2))))), (unsafe.Pointer)(_pCellptr), uint32(_nCell*i32(2)))
+ _pCellptr = _pPg.XaCellIdx
+ crt.Xmemmove(tls, unsafe.Pointer(elem15(_pCellptr, uintptr(_3_nAdd*int32(2)))), unsafe.Pointer(_pCellptr), uint32(_nCell*int32(2)))
if _pageInsertArray(tls, _pPg, _pBegin, &_pData, _pCellptr, _iNew, _3_nAdd, _pCArray) != 0 {
goto _editpage_fail
}
- {
- p := &_nCell
- *p = (*p) + _3_nAdd
- sink1(*p)
- }
+ _nCell += _3_nAdd
_3:
- _i = i32(0)
+ _i = int32(0)
_11:
- if _i >= int32(_pPg.X9) {
+ if _i >= int32(_pPg.XnOverflow) {
goto _14
}
- _4_iCell = (_iOld + int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint16)(unsafe.Pointer(&(_pPg.X16))))) + 2*uintptr(_i))))) - _iNew
- if _4_iCell < i32(0) || _4_iCell >= _nNew {
+ _4_iCell = (_iOld + int32(*elem20((*uint16)(unsafe.Pointer(&_pPg.XaiOvfl)), uintptr(_i)))) - _iNew
+ if _4_iCell < int32(0) || _4_iCell >= _nNew {
goto _16
}
- _pCellptr = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPg.X21)) + 1*uintptr(_4_iCell*i32(2))))
- crt.Xmemmove(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCellptr))+1*uintptr(i32(2))))), (unsafe.Pointer)(_pCellptr), uint32((_nCell-_4_iCell)*i32(2)))
+ _pCellptr = elem15(_pPg.XaCellIdx, uintptr(_4_iCell*int32(2)))
+ crt.Xmemmove(tls, unsafe.Pointer(elem15(_pCellptr, uintptr(2))), unsafe.Pointer(_pCellptr), uint32((_nCell-_4_iCell)*int32(2)))
_nCell += 1
- if _pageInsertArray(tls, _pPg, _pBegin, &_pData, _pCellptr, _4_iCell+_iNew, i32(1), _pCArray) != 0 {
+ if _pageInsertArray(tls, _pPg, _pBegin, &_pData, _pCellptr, _4_iCell+_iNew, int32(1), _pCArray) != 0 {
goto _editpage_fail
}
_16:
_i += 1
goto _11
_14:
- _pCellptr = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPg.X21)) + 1*uintptr(_nCell*i32(2))))
+ _pCellptr = elem15(_pPg.XaCellIdx, uintptr(_nCell*int32(2)))
if _pageInsertArray(tls, _pPg, _pBegin, &_pData, _pCellptr, _iNew+_nCell, _nNew-_nCell, _pCArray) != 0 {
goto _editpage_fail
}
- *(*uint16)(unsafe.Pointer(&(_pPg.X14))) = uint16(_nNew)
- *(*uint8)(unsafe.Pointer(&(_pPg.X9))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(0)))) = uint8(int32(_pPg.X14) >> uint(i32(8)))
+ _pPg.XnCell = uint16(_nNew)
+ _pPg.XnOverflow = 0
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_aData, uintptr(_hdr+int32(3))), 0) = uint8(int32(_pPg.XnCell) >> 8)
return _aData
- }()))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(1)))) = uint8(_pPg.X14)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0)))) = uint8(int32((uintptr(unsafe.Pointer(_pData))-uintptr(unsafe.Pointer(_aData)))/1) >> uint(i32(8)))
+ }(), uintptr(_hdr+int32(3))), uintptr(1)) = uint8(_pPg.XnCell)
+ *elem15(elem15(func() *uint8 {
+ *elem15(elem15(_aData, uintptr(_hdr+int32(5))), 0) = uint8(int32(uintptr(unsafe.Pointer(_pData))-uintptr(unsafe.Pointer(_aData))) >> 8)
return _aData
- }()))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))) = uint8(int32((uintptr(unsafe.Pointer(_pData)) - uintptr(unsafe.Pointer(_aData))) / 1))
- _i = i32(0)
+ }(), uintptr(_hdr+int32(5))), uintptr(1)) = uint8(int32(uintptr(unsafe.Pointer(_pData)) - uintptr(unsafe.Pointer(_aData))))
+ _i = int32(0)
_19:
- if _i >= _nNew || (_sqlite3Config.X6) == i32(0) {
+ if _i >= _nNew || _sqlite3Config.XneverCorrupt == int32(0) {
goto _23
}
- _6_pCell = *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCArray.X2)) + 4*uintptr(_i+_iNew)))
- _6_iOff = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPg.X21))+1*uintptr(_i*i32(2)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPg.X21))+1*uintptr(_i*i32(2)))))) + 1*uintptr(i32(1)))))
- if (uint32(uintptr(unsafe.Pointer(_6_pCell))) >= uint32(uintptr(unsafe.Pointer(_aData)))) && (uint32(uintptr(unsafe.Pointer(_6_pCell))) < uint32(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr((*XBtShared)(_pPg.X18).X16))))))) {
- _6_pCell = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTmp)) + 1*uintptr(int32((uintptr(unsafe.Pointer(_6_pCell))-uintptr(unsafe.Pointer(_aData)))/1))))
+ _6_pCell = *elem88(_pCArray.XapCell, uintptr(_i+_iNew))
+ _6_iOff = (int32(*elem15(elem15(_pPg.XaCellIdx, uintptr(_i*int32(2))), 0)) << 8) | int32(*elem15(elem15(_pPg.XaCellIdx, uintptr(_i*int32(2))), uintptr(1)))
+ if (uint32(crt.P2U(unsafe.Pointer(_6_pCell))) >= uint32(crt.P2U(unsafe.Pointer(_aData)))) && (uint32(crt.P2U(unsafe.Pointer(_6_pCell))) < uint32(crt.P2U(unsafe.Pointer(elem15(_aData, uintptr((*XBtShared)(_pPg.XpBt).XusableSize)))))) {
+ _6_pCell = elem15(_pTmp, uintptr(int32(uintptr(unsafe.Pointer(_6_pCell))-uintptr(unsafe.Pointer(_aData)))))
}
func() {
- if i32(0) != crt.Xmemcmp(tls, (unsafe.Pointer)(_6_pCell), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData))+1*uintptr(_6_iOff)))), uint32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{((*XMemPage)(_pCArray.X1).X24)})))(tls, (*XMemPage)(_pCArray.X1), *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCArray.X2)) + 4*uintptr(_i+_iNew)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65849), unsafe.Pointer((*int8)(unsafe.Pointer(&_editPageØ00__func__Ø000))), unsafe.Pointer(str(85012)))
+ if int32(0) != crt.Xmemcmp(tls, unsafe.Pointer(_6_pCell), unsafe.Pointer(elem15(_aData, uintptr(_6_iOff))), uint32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := (*XMemPage)(_pCArray.XpRef).XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, (*XMemPage)(_pCArray.XpRef), *elem88(_pCArray.XapCell, uintptr(_i+_iNew))))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65849), unsafe.Pointer(&_editPageØ00__func__Ø000), unsafe.Pointer(str(83174)))
crt.X__builtin_abort(tls)
}
}()
_i += 1
goto _19
_23:
- return i32(0)
+ return int32(0)
_editpage_fail:
_populateCellCache(tls, _pCArray, _iNew, _nNew)
- return _rebuildPage(tls, _pPg, _nNew, (**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCArray.X2))+4*uintptr(_iNew))), (*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCArray.X3))+2*uintptr(_iNew))))
-}
-
-// Array apCell[] contains nCell pointers to b-tree cells. Array szCell
-// contains the size in bytes of each such cell. This function adds the
-// space associated with each cell in the array that is currently stored
-// within the body of pPg to the pPg free-list. The cell-pointers and other
-// fields of the page are not updated.
-//
-// This function returns the total number of cells added to the free-list.
+ return _rebuildPage(tls, _pPg, _nNew, elem88(_pCArray.XapCell, uintptr(_iNew)), elem20(_pCArray.XszCell, uintptr(_iNew)))
+}
+
+// C comment
+// /*
+// ** Array apCell[] contains nCell pointers to b-tree cells. Array szCell
+// ** contains the size in bytes of each such cell. This function adds the
+// ** space associated with each cell in the array that is currently stored
+// ** within the body of pPg to the pPg free-list. The cell-pointers and other
+// ** fields of the page are not updated.
+// **
+// ** This function returns the total number of cells added to the free-list.
+// */
func _pageFreeArray(tls *crt.TLS, _pPg *XMemPage, _iFirst int32, _nCell int32, _pCArray *XCellArray) (r0 int32) {
var _nRet, _i, _iEnd, _szFree, _2_sz int32
var _aData, _pEnd, _pStart, _pFree, _1_pCell *uint8
- _aData = _pPg.X19
- _pEnd = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr((*XBtShared)(_pPg.X18).X16)))
- _pStart = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr((int32(_pPg.X6)+i32(8))+int32(_pPg.X7))))
- _nRet = i32(0)
+ _aData = _pPg.XaData
+ _pEnd = elem15(_aData, uintptr((*XBtShared)(_pPg.XpBt).XusableSize))
+ _pStart = elem15(_aData, uintptr((int32(_pPg.XhdrOffset)+int32(8))+int32(_pPg.XchildPtrSize)))
+ _nRet = int32(0)
_iEnd = _iFirst + _nCell
_pFree = nil
- _szFree = i32(0)
+ _szFree = int32(0)
_i = _iFirst
_0:
if _i >= _iEnd {
goto _3
}
- _1_pCell = *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCArray.X2)) + 4*uintptr(_i)))
- if uint32(uintptr(unsafe.Pointer(_1_pCell))) < uint32(uintptr(unsafe.Pointer(_pStart))) || uint32(uintptr(unsafe.Pointer(_1_pCell))) >= uint32(uintptr(unsafe.Pointer(_pEnd))) {
+ _1_pCell = *elem88(_pCArray.XapCell, uintptr(_i))
+ if uint32(crt.P2U(unsafe.Pointer(_1_pCell))) < uint32(crt.P2U(unsafe.Pointer(_pStart))) || uint32(crt.P2U(unsafe.Pointer(_1_pCell))) >= uint32(crt.P2U(unsafe.Pointer(_pEnd))) {
goto _5
}
- _2_sz = int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCArray.X3)) + 2*uintptr(_i))))
+ _2_sz = int32(*elem20(_pCArray.XszCell, uintptr(_i)))
func() {
- if _2_sz <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65732), unsafe.Pointer((*int8)(unsafe.Pointer(&_pageFreeArrayØ00__func__Ø000))), unsafe.Pointer(str(85109)))
+ if _2_sz <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65732), unsafe.Pointer(&_pageFreeArrayØ00__func__Ø000), unsafe.Pointer(str(83271)))
crt.X__builtin_abort(tls)
}
}()
- if _pFree == (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_1_pCell))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_2_sz))))))) {
+ if _pFree == (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_1_pCell))+uintptr(_2_sz))) {
goto _8
}
if _pFree != nil {
func() {
- if uintptr(unsafe.Pointer(_pFree)) <= uintptr(unsafe.Pointer(_aData)) || int32((uintptr(unsafe.Pointer(_pFree))-uintptr(unsafe.Pointer(_aData)))/1) >= i32(65536) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65735), unsafe.Pointer((*int8)(unsafe.Pointer(&_pageFreeArrayØ00__func__Ø000))), unsafe.Pointer(str(85114)))
+ if crt.P2U(unsafe.Pointer(_pFree)) <= crt.P2U(unsafe.Pointer(_aData)) || int32(uintptr(unsafe.Pointer(_pFree))-uintptr(unsafe.Pointer(_aData))) >= int32(65536) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65735), unsafe.Pointer(&_pageFreeArrayØ00__func__Ø000), unsafe.Pointer(str(83276)))
crt.X__builtin_abort(tls)
}
}()
- _freeSpace(tls, _pPg, uint16(int32((uintptr(unsafe.Pointer(_pFree))-uintptr(unsafe.Pointer(_aData)))/1)), uint16(_szFree))
+ _freeSpace(tls, _pPg, uint16(int32(uintptr(unsafe.Pointer(_pFree))-uintptr(unsafe.Pointer(_aData)))), uint16(_szFree))
}
_pFree = _1_pCell
_szFree = _2_sz
- if uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pFree))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_2_sz))))))))) > uintptr(unsafe.Pointer(_pEnd)) {
- return i32(0)
+ if crt.P2U(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pFree))+uintptr(_2_sz))))) > crt.P2U(unsafe.Pointer(_pEnd)) {
+ return int32(0)
}
goto _14
_8:
_pFree = _1_pCell
- {
- p := &_szFree
- *p = (*p) + _2_sz
- sink1(*p)
- }
+ _szFree += _2_sz
_14:
_nRet += 1
_5:
@@ -64288,12 +64022,12 @@ _5:
_3:
if _pFree != nil {
func() {
- if uintptr(unsafe.Pointer(_pFree)) <= uintptr(unsafe.Pointer(_aData)) || int32((uintptr(unsafe.Pointer(_pFree))-uintptr(unsafe.Pointer(_aData)))/1) >= i32(65536) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65749), unsafe.Pointer((*int8)(unsafe.Pointer(&_pageFreeArrayØ00__func__Ø000))), unsafe.Pointer(str(85114)))
+ if crt.P2U(unsafe.Pointer(_pFree)) <= crt.P2U(unsafe.Pointer(_aData)) || int32(uintptr(unsafe.Pointer(_pFree))-uintptr(unsafe.Pointer(_aData))) >= int32(65536) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65749), unsafe.Pointer(&_pageFreeArrayØ00__func__Ø000), unsafe.Pointer(str(83276)))
crt.X__builtin_abort(tls)
}
}()
- _freeSpace(tls, _pPg, uint16(int32((uintptr(unsafe.Pointer(_pFree))-uintptr(unsafe.Pointer(_aData)))/1)), uint16(_szFree))
+ _freeSpace(tls, _pPg, uint16(int32(uintptr(unsafe.Pointer(_pFree))-uintptr(unsafe.Pointer(_aData)))), uint16(_szFree))
}
return _nRet
}
@@ -64301,47 +64035,50 @@ _3:
var _pageFreeArrayØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_pageFreeArrayØ00__func__Ø000[0], str(85151), 14)
+ crt.Xstrncpy(nil, &_pageFreeArrayØ00__func__Ø000[0], str(83313), 14)
}
var _editPageØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_editPageØ00__func__Ø000[0], str(85165), 9)
-}
-
-// Array apCell[] contains nCell pointers to b-tree cells. Array szCell
-// contains the size in bytes of each such cell. This function attempts to
-// add the cells stored in the array to page pPg. If it cannot (because
-// the page needs to be defragmented before the cells will fit), non-zero
-// is returned. Otherwise, if the cells are added successfully, zero is
-// returned.
-//
-// Argument pCellptr points to the first entry in the cell-pointer array
-// (part of page pPg) to populate. After cell apCell[0] is written to the
-// page body, a 16-bit offset is written to pCellptr. And so on, for each
-// cell in the array. It is the responsibility of the caller to ensure
-// that it is safe to overwrite this part of the cell-pointer array.
-//
-// When this function is called, *ppData points to the start of the
-// content area on page pPg. If the size of the content area is extended,
-// *ppData is updated to point to the new start of the content area
-// before returning.
-//
-// Finally, argument pBegin points to the byte immediately following the
-// end of the space required by this page for the cell-pointer area (for
-// all cells - not just those inserted by the current call). If the content
-// area must be extended to before this point in order to accomodate all
-// cells in apCell[], then the cells do not fit and non-zero is returned.
+ crt.Xstrncpy(nil, &_editPageØ00__func__Ø000[0], str(83327), 9)
+}
+
+// C comment
+// /*
+// ** Array apCell[] contains nCell pointers to b-tree cells. Array szCell
+// ** contains the size in bytes of each such cell. This function attempts to
+// ** add the cells stored in the array to page pPg. If it cannot (because
+// ** the page needs to be defragmented before the cells will fit), non-zero
+// ** is returned. Otherwise, if the cells are added successfully, zero is
+// ** returned.
+// **
+// ** Argument pCellptr points to the first entry in the cell-pointer array
+// ** (part of page pPg) to populate. After cell apCell[0] is written to the
+// ** page body, a 16-bit offset is written to pCellptr. And so on, for each
+// ** cell in the array. It is the responsibility of the caller to ensure
+// ** that it is safe to overwrite this part of the cell-pointer array.
+// **
+// ** When this function is called, *ppData points to the start of the
+// ** content area on page pPg. If the size of the content area is extended,
+// ** *ppData is updated to point to the new start of the content area
+// ** before returning.
+// **
+// ** Finally, argument pBegin points to the byte immediately following the
+// ** end of the space required by this page for the cell-pointer area (for
+// ** all cells - not just those inserted by the current call). If the content
+// ** area must be extended to before this point in order to accomodate all
+// ** cells in apCell[], then the cells do not fit and non-zero is returned.
+// */
func _pageInsertArray(tls *crt.TLS, _pPg *XMemPage, _pBegin *uint8, _ppData **uint8, _pCellptr *uint8, _iFirst int32, _nCell int32, _pCArray *XCellArray) (r0 int32) {
var _i, _iEnd, _1_sz, _1_rc int32
var _aData, _pData, _1_pSlot *uint8
- _aData = _pPg.X19
+ _aData = _pPg.XaData
_pData = *_ppData
_iEnd = _iFirst + _nCell
func() {
- if (_sqlite3Config.X6) != i32(0) && int32(_pPg.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65677), unsafe.Pointer((*int8)(unsafe.Pointer(&_pageInsertArrayØ00__func__Ø000))), unsafe.Pointer(str(85174)))
+ if _sqlite3Config.XneverCorrupt != int32(0) && int32(_pPg.XhdrOffset) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65677), unsafe.Pointer(&_pageInsertArrayØ00__func__Ø000), unsafe.Pointer(str(83336)))
crt.X__builtin_abort(tls)
}
}()
@@ -64351,81 +64088,75 @@ _3:
goto _6
}
_1_sz = int32(_cachedCellSize(tls, _pCArray, _i))
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(i32(1))))) != i32(0) || int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aData)) + 1*uintptr(i32(2))))) != i32(0)) && store13(&_1_pSlot, _pageFindSlot(tls, _pPg, _1_sz, &_1_rc)) != nil {
+ if (int32(*elem15(_aData, uintptr(1))) != int32(0) || int32(*elem15(_aData, uintptr(2))) != int32(0)) && store15(&_1_pSlot, _pageFindSlot(tls, _pPg, _1_sz, &_1_rc)) != nil {
goto _9
}
- if int32((uintptr(unsafe.Pointer(_pData))-uintptr(unsafe.Pointer(_pBegin)))/1) < _1_sz {
- return i32(1)
- }
- {
- p := &_pData
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 1*uintptr(_1_sz)))
- sink13(*p)
+ if int32(uintptr(unsafe.Pointer(_pData))-uintptr(unsafe.Pointer(_pBegin))) < _1_sz {
+ return int32(1)
}
+ *(*uintptr)(unsafe.Pointer(&_pData)) -= uintptr(_1_sz)
_1_pSlot = _pData
_9:
func() {
- if uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_1_pSlot))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_1_sz))))))))) > uintptr(unsafe.Pointer(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCArray.X2)) + 4*uintptr(_i))))) && uintptr(unsafe.Pointer(_1_pSlot)) < uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCArray.X2)) + 4*uintptr(_i)))))+uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_1_sz))))))))) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65690), unsafe.Pointer((*int8)(unsafe.Pointer(&_pageInsertArrayØ00__func__Ø000))), unsafe.Pointer(str(85206)))
+ if crt.P2U(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_1_pSlot))+uintptr(_1_sz))))) > crt.P2U(unsafe.Pointer(*elem88(_pCArray.XapCell, uintptr(_i)))) && crt.P2U(unsafe.Pointer(_1_pSlot)) < crt.P2U(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(*elem88(_pCArray.XapCell, uintptr(_i))))+uintptr(_1_sz))))) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65690), unsafe.Pointer(&_pageInsertArrayØ00__func__Ø000), unsafe.Pointer(str(83368)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemmove(tls, (unsafe.Pointer)(_1_pSlot), (unsafe.Pointer)(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCArray.X2)) + 4*uintptr(_i)))), uint32(_1_sz))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(func() *uint8 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCellptr)) + 1*uintptr(i32(0)))) = uint8(int32((uintptr(unsafe.Pointer(_1_pSlot))-uintptr(unsafe.Pointer(_aData)))/1) >> uint(i32(8)))
+ crt.Xmemmove(tls, unsafe.Pointer(_1_pSlot), unsafe.Pointer(*elem88(_pCArray.XapCell, uintptr(_i))), uint32(_1_sz))
+ *elem15(func() *uint8 {
+ *elem15(_pCellptr, 0) = uint8(int32(uintptr(unsafe.Pointer(_1_pSlot))-uintptr(unsafe.Pointer(_aData))) >> 8)
return _pCellptr
- }())) + 1*uintptr(i32(1)))) = uint8(int32((uintptr(unsafe.Pointer(_1_pSlot)) - uintptr(unsafe.Pointer(_aData))) / 1))
- {
- p := &_pCellptr
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(2))))
- sink13(*p)
- }
+ }(), uintptr(1)) = uint8(int32(uintptr(unsafe.Pointer(_1_pSlot)) - uintptr(unsafe.Pointer(_aData))))
+ *(*uintptr)(unsafe.Pointer(&_pCellptr)) += uintptr(int32(2))
_i += 1
goto _3
_6:
*_ppData = _pData
- return i32(0)
-
- _ = _1_rc
- panic(0)
+ return int32(0)
}
var _pageInsertArrayØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_pageInsertArrayØ00__func__Ø000[0], str(85285), 16)
+ crt.Xstrncpy(nil, &_pageInsertArrayØ00__func__Ø000[0], str(83447), 16)
}
-// Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been
-// computed.
+// C comment
+// /*
+// ** Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been
+// ** computed.
+// */
func _populateCellCache(tls *crt.TLS, _p *XCellArray, _idx int32, _N int32) {
func() {
- if _idx < i32(0) || (_idx+_N) > (_p.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65553), unsafe.Pointer((*int8)(unsafe.Pointer(&_populateCellCacheØ00__func__Ø000))), unsafe.Pointer(str(85301)))
+ if _idx < int32(0) || (_idx+_N) > _p.XnCell {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65553), unsafe.Pointer(&_populateCellCacheØ00__func__Ø000), unsafe.Pointer(str(83463)))
crt.X__builtin_abort(tls)
}
}()
_3:
- if _N <= i32(0) {
+ if _N <= int32(0) {
goto _4
}
func() {
- if (*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2)) + 4*uintptr(_idx)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65555), unsafe.Pointer((*int8)(unsafe.Pointer(&_populateCellCacheØ00__func__Ø000))), unsafe.Pointer(str(85327)))
+ if (*elem88(_p.XapCell, uintptr(_idx))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65555), unsafe.Pointer(&_populateCellCacheØ00__func__Ø000), unsafe.Pointer(str(83489)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X3)) + 2*uintptr(_idx)))) == i32(0) {
- *(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X3)) + 2*uintptr(_idx))) = (*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{((*XMemPage)(_p.X1).X24)})))(tls, (*XMemPage)(_p.X1), *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2)) + 4*uintptr(_idx))))
+ if int32(*elem20(_p.XszCell, uintptr(_idx))) == int32(0) {
+ *elem20(_p.XszCell, uintptr(_idx)) = func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := (*XMemPage)(_p.XpRef).XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, (*XMemPage)(_p.XpRef), *elem88(_p.XapCell, uintptr(_idx)))
goto _8
}
func() {
- if (_sqlite3Config.X6) != i32(0) && int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X3)) + 2*uintptr(_idx)))) != int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{((*XMemPage)(_p.X1).X24)})))(tls, (*XMemPage)(_p.X1), *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2)) + 4*uintptr(_idx))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(65559), unsafe.Pointer((*int8)(unsafe.Pointer(&_populateCellCacheØ00__func__Ø000))), unsafe.Pointer(str(85345)))
+ if _sqlite3Config.XneverCorrupt != int32(0) && int32(*elem20(_p.XszCell, uintptr(_idx))) != int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := (*XMemPage)(_p.XpRef).XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, (*XMemPage)(_p.XpRef), *elem88(_p.XapCell, uintptr(_idx)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(65559), unsafe.Pointer(&_populateCellCacheØ00__func__Ø000), unsafe.Pointer(str(83507)))
crt.X__builtin_abort(tls)
}
}()
@@ -64439,50 +64170,49 @@ _4:
var _populateCellCacheØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_populateCellCacheØ00__func__Ø000[0], str(85419), 18)
+ crt.Xstrncpy(nil, &_populateCellCacheØ00__func__Ø000[0], str(83581), 18)
}
func _freePage(tls *crt.TLS, _pPage *XMemPage, _pRC *int32) {
- if (*_pRC) == i32(0) {
- *_pRC = _freePage2(tls, (*XBtShared)(_pPage.X18), _pPage, _pPage.X4)
+ if (*_pRC) == int32(0) {
+ *_pRC = _freePage2(tls, (*XBtShared)(_pPage.XpBt), _pPage, _pPage.Xpgno)
}
}
func _sqlite3ScratchFree(tls *crt.TLS, _p unsafe.Pointer) {
var _4_iSize int32
- var _2_pSlot *Xsqlite3_file
+ var _2_pSlot *XScratchFreeslot
if _p == nil {
goto _0
}
- if (uint32(uintptr(_p)) >= uint32(uintptr(_sqlite3Config.X19))) && (uint32(uintptr(_p)) < uint32(uintptr(_mem0.X2))) {
- _2_pSlot = (*Xsqlite3_file)(_p)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.X0))
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pSlot.X0))))) = (*Xsqlite3_file)(_mem0.X3)
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_mem0.X3))))) = _2_pSlot
- *(*uint32)(unsafe.Pointer(&(_mem0.X4))) += 1
+ if (uint32(crt.P2U(_p)) >= uint32(crt.P2U(_sqlite3Config.XpScratch))) && (uint32(crt.P2U(_p)) < uint32(crt.P2U(_mem0.XpScratchEnd))) {
+ _2_pSlot = (*XScratchFreeslot)(_p)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
+ *(**XScratchFreeslot)(unsafe.Pointer(&_2_pSlot.XpNext)) = (*XScratchFreeslot)(_mem0.XpScratchFree)
+ *(**XScratchFreeslot)(unsafe.Pointer(&_mem0.XpScratchFree)) = _2_pSlot
+ _mem0.XnScratchFree += 1
func() {
- if (_mem0.X4) > uint32(_sqlite3Config.X21) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(24597), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ScratchFreeØ00__func__Ø000))), unsafe.Pointer(str(85437)))
+ if _mem0.XnScratchFree > uint32(_sqlite3Config.XnScratch) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(24597), unsafe.Pointer(&_sqlite3ScratchFreeØ00__func__Ø000), unsafe.Pointer(str(83599)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3StatusDown(tls, i32(3), i32(1))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ _sqlite3StatusDown(tls, int32(3), int32(1))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
goto _5
}
- i32(0)
- i32(0)
- if (_sqlite3Config.X0) != 0 {
+
+ if _sqlite3Config.XbMemstat != 0 {
_4_iSize = _sqlite3MallocSize(tls, _p)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.X0))
- _sqlite3StatusDown(tls, i32(4), _4_iSize)
- _sqlite3StatusDown(tls, i32(0), _4_iSize)
- _sqlite3StatusDown(tls, i32(9), i32(1))
- ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X1)(tls, _p)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
+ _sqlite3StatusDown(tls, int32(4), _4_iSize)
+ _sqlite3StatusDown(tls, int32(0), _4_iSize)
+ _sqlite3StatusDown(tls, int32(9), int32(1))
+ (_sqlite3Config.Xm.XxFree)(tls, _p)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
goto _7
}
- ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X1)(tls, _p)
+ (_sqlite3Config.Xm.XxFree)(tls, _p)
_7:
_5:
_0:
@@ -64491,24 +64221,27 @@ _0:
var _sqlite3ScratchFreeØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ScratchFreeØ00__func__Ø000[0], str(85492), 19)
-}
-
-// Delete the entry that the cursor is pointing to.
-//
-// If the BTREE_SAVEPOSITION bit of the flags parameter is zero, then
-// the cursor is left pointing at an arbitrary location after the delete.
-// But if that bit is set, then the cursor is left in a state such that
-// the next call to BtreeNext() or BtreePrev() moves it to the same row
-// as it would have been on if the call to BtreeDelete() had been omitted.
-//
-// The BTREE_AUXDELETE bit of flags indicates that is one of several deletes
-// associated with a single table entry and its indexes. Only one of those
-// deletes is considered the "primary" delete. The primary delete occurs
-// on a cursor that is not a BTREE_FORDELETE cursor. All but one delete
-// operation on non-FORDELETE cursors is tagged with the AUXDELETE flag.
-// The BTREE_AUXDELETE bit is a hint that is not used by this implementation,
-// but which might be used by alternative storage engines.
+ crt.Xstrncpy(nil, &_sqlite3ScratchFreeØ00__func__Ø000[0], str(83654), 19)
+}
+
+// C comment
+// /*
+// ** Delete the entry that the cursor is pointing to.
+// **
+// ** If the BTREE_SAVEPOSITION bit of the flags parameter is zero, then
+// ** the cursor is left pointing at an arbitrary location after the delete.
+// ** But if that bit is set, then the cursor is left in a state such that
+// ** the next call to BtreeNext() or BtreePrev() moves it to the same row
+// ** as it would have been on if the call to BtreeDelete() had been omitted.
+// **
+// ** The BTREE_AUXDELETE bit of flags indicates that is one of several deletes
+// ** associated with a single table entry and its indexes. Only one of those
+// ** deletes is considered the "primary" delete. The primary delete occurs
+// ** on a cursor that is not a BTREE_FORDELETE cursor. All but one delete
+// ** operation on non-FORDELETE cursors is tagged with the AUXDELETE flag.
+// ** The BTREE_AUXDELETE bit is a hint that is not used by this implementation,
+// ** but which might be used by alternative storage engines.
+// */
func _sqlite3BtreeDelete(tls *crt.TLS, _pCur *XBtCursor, _flags uint8) (r0 int32) {
var _rc, _iCellIdx, _iCellDepth, _bSkipnext, _4_notUsed, _7_nCell int32
var _7_n uint32
@@ -64518,72 +64251,72 @@ func _sqlite3BtreeDelete(tls *crt.TLS, _pCur *XBtCursor, _flags uint8) (r0 int32
var _pBt *XBtShared
var _info XCellInfo
var _pPage, _7_pLeaf *XMemPage
- _p = (*XBtree)(_pCur.X0)
- _pBt = (*XBtShared)(_p.X1)
- _bSkipnext = i32(0)
- _bPreserve = uint8(int32(_flags) & i32(2))
+ _p = (*XBtree)(_pCur.XpBtree)
+ _pBt = (*XBtShared)(_p.XpBt)
+ _bSkipnext = int32(0)
+ _bPreserve = uint8(int32(_flags) & int32(2))
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67323), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67323), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pBt.X8) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67324), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(56928)))
+ if int32(_pBt.XinTransaction) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67324), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(56904)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pBt.X10) & i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67325), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(77853)))
+ if (int32(_pBt.XbtsFlags) & int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67325), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(76015)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pCur.X10) & i32(1)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67326), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(85511)))
+ if (int32(_pCur.XcurFlags) & int32(1)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67326), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(83673)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _hasSharedCacheTableLock(tls, _p, _pCur.X7, bool2int((*XKeyInfo)(_pCur.X18) != nil), i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67327), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(80291)))
+ if _hasSharedCacheTableLock(tls, _p, _pCur.XpgnoRoot, bool2int((*XKeyInfo)(_pCur.XpKeyInfo) != nil), int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67327), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(78453)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _hasReadConflicts(tls, _p, _pCur.X7) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67328), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(85543)))
+ if _hasReadConflicts(tls, _p, _pCur.XpgnoRoot) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67328), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(83705)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X16) >= int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67329), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(10597)))
+ if int32(_pCur.Xix) >= int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67329), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(10552)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pCur.X12) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67330), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(10390)))
+ if int32(_pCur.XeState) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67330), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(10345)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_flags) & i32(-7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67331), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(85580)))
+ if (int32(_flags) & int32(-7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67331), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(83742)))
crt.X__builtin_abort(tls)
}
}()
- _iCellDepth = int32(_pCur.X14)
- _iCellIdx = int32(_pCur.X16)
- _pPage = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_iCellDepth)))
- _pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_iCellIdx))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_iCellIdx))))) + 1*uintptr(i32(1)))))))))))))
+ _iCellDepth = int32(_pCur.XiPage)
+ _iCellIdx = int32(_pCur.Xix)
+ _pPage = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_iCellDepth))
+ _pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData)) + uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_iCellIdx)), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_iCellIdx)), uintptr(1)))))))
if _bPreserve == 0 {
goto _18
}
- if (_pPage.X5) != 0 && ((int32(_pPage.X13)+int32(_cellSizePtr(tls, _pPage, _pCell)))+i32(2)) <= int32(((_pBt.X16)*uint32(i32(2)))/uint32(i32(3))) {
+ if _pPage.Xleaf != 0 && ((int32(_pPage.XnFree)+int32(_cellSizePtr(tls, _pPage, _pCell)))+int32(2)) <= int32((_pBt.XusableSize*uint32(2))/uint32(3)) {
goto _20
}
_rc = _saveCursorKey(tls, _pCur)
@@ -64592,150 +64325,150 @@ func _sqlite3BtreeDelete(tls *crt.TLS, _pCur *XBtCursor, _flags uint8) (r0 int32
}
goto _22
_20:
- _bSkipnext = i32(1)
+ _bSkipnext = int32(1)
_22:
_18:
- if (_pPage.X5) != 0 {
+ if _pPage.Xleaf != 0 {
goto _23
}
- _4_notUsed = i32(0)
+ _4_notUsed = int32(0)
_rc = _sqlite3BtreePrevious(tls, _pCur, &_4_notUsed)
if _rc != 0 {
return _rc
}
_23:
- if (int32(_pCur.X10) & i32(32)) == 0 {
+ if (int32(_pCur.XcurFlags) & int32(32)) == 0 {
goto _25
}
- _rc = _saveAllCursors(tls, _pBt, _pCur.X7, _pCur)
+ _rc = _saveAllCursors(tls, _pBt, _pCur.XpgnoRoot, _pCur)
if _rc != 0 {
return _rc
}
_25:
- if (*XKeyInfo)(_pCur.X18) == nil {
- _invalidateIncrblobCursors(tls, _p, _pCur.X7, (*XCellInfo)(unsafe.Pointer(&(_pCur.X4))).X0, i32(0))
+ if (*XKeyInfo)(_pCur.XpKeyInfo) == nil {
+ _invalidateIncrblobCursors(tls, _p, _pCur.XpgnoRoot, _pCur.Xinfo.XnKey, int32(0))
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.X23))
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.XpDbPage))
if _rc != 0 {
return _rc
}
_rc = _clearCell(tls, _pPage, _pCell, &_info)
- _dropCell(tls, _pPage, _iCellIdx, int32(_info.X4), &_rc)
+ _dropCell(tls, _pPage, _iCellIdx, int32(_info.XnSize), &_rc)
if _rc != 0 {
return _rc
}
- if (_pPage.X5) != 0 {
+ if _pPage.Xleaf != 0 {
goto _30
}
- _7_pLeaf = *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))
- _7_n = (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_iCellDepth+i32(1))))).X4
- _pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_7_pLeaf.X19)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_7_pLeaf.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_7_pLeaf.X21))+1*uintptr(i32(2)*(int32(_7_pLeaf.X14)-i32(1))))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_7_pLeaf.X21))+1*uintptr(i32(2)*(int32(_7_pLeaf.X14)-i32(1))))))) + 1*uintptr(i32(1)))))))))))))
- if uintptr(unsafe.Pointer(_pCell)) < uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_7_pLeaf.X19))+1*uintptr(i32(4)))))) {
- return _sqlite3CorruptError(tls, i32(67407))
+ _7_pLeaf = *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))
+ _7_n = (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_iCellDepth+int32(1)))).Xpgno
+ _pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_7_pLeaf.XaData)) + uintptr(int32(_7_pLeaf.XmaskPage)&((int32(*elem15(elem15(_7_pLeaf.XaCellIdx, uintptr(int32(2)*(int32(_7_pLeaf.XnCell)-int32(1)))), 0))<<8)|int32(*elem15(elem15(_7_pLeaf.XaCellIdx, uintptr(int32(2)*(int32(_7_pLeaf.XnCell)-int32(1)))), uintptr(1)))))))
+ if crt.P2U(unsafe.Pointer(_pCell)) < crt.P2U(unsafe.Pointer(elem15(_7_pLeaf.XaData, uintptr(4)))) {
+ return _sqlite3CorruptError(tls, int32(67407))
}
- _7_nCell = int32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_7_pLeaf.X24)})))(tls, _7_pLeaf, _pCell))
+ _7_nCell = int32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _7_pLeaf.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _7_pLeaf, _pCell))
func() {
- if int32((_pBt.X15)-uint32(i32(8))) < _7_nCell {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67409), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(85633)))
+ if int32(_pBt.XpageSize-uint32(8)) < _7_nCell {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67409), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(83795)))
crt.X__builtin_abort(tls)
}
}()
- _7_pTmp = _pBt.X27
+ _7_pTmp = _pBt.XpTmpSpace
func() {
if _7_pTmp == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67411), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(85660)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67411), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(83822)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_7_pLeaf.X23))
- if _rc == i32(0) {
- _insertCell(tls, _pPage, _iCellIdx, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell))-uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(i32(4)))))))), _7_nCell+i32(4), _7_pTmp, _7_n, &_rc)
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)(_7_pLeaf.XpDbPage))
+ if _rc == int32(0) {
+ _insertCell(tls, _pPage, _iCellIdx, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCell))-uintptr(int32(4)))), _7_nCell+int32(4), _7_pTmp, _7_n, &_rc)
}
- _dropCell(tls, _7_pLeaf, int32(_7_pLeaf.X14)-i32(1), _7_nCell, &_rc)
+ _dropCell(tls, _7_pLeaf, int32(_7_pLeaf.XnCell)-int32(1), _7_nCell, &_rc)
if _rc != 0 {
return _rc
}
_30:
_rc = _balance(tls, _pCur)
- if _rc != i32(0) || int32(_pCur.X14) <= _iCellDepth {
+ if _rc != int32(0) || int32(_pCur.XiPage) <= _iCellDepth {
goto _39
}
_40:
- if int32(_pCur.X14) > _iCellDepth {
- _releasePage(tls, *(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(postInc3((*int8)(unsafe.Pointer(&(_pCur.X14))), int8(-1))))))
+ if int32(_pCur.XiPage) > _iCellDepth {
+ _releasePage(tls, *elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(postInc5(&_pCur.XiPage, -1))))
goto _40
}
_rc = _balance(tls, _pCur)
_39:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _42
}
if _bSkipnext == 0 {
goto _43
}
func() {
- if _bPreserve == 0 || int32(_pCur.X14) != _iCellDepth && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67445), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(85668)))
+ if _bPreserve == 0 || int32(_pCur.XiPage) != _iCellDepth && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67445), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(83830)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pPage != (*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))) && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67446), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(85721)))
+ if _pPage != (*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))) && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67446), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(83883)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPage.X14) <= i32(0) && (_sqlite3Config.X6) != i32(0) || _iCellIdx > int32(_pPage.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67447), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000))), unsafe.Pointer(str(85768)))
+ if int32(_pPage.XnCell) <= int32(0) && _sqlite3Config.XneverCorrupt != int32(0) || _iCellIdx > int32(_pPage.XnCell) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67447), unsafe.Pointer(&_sqlite3BtreeDeleteØ00__func__Ø000), unsafe.Pointer(str(83930)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(2))
- if _iCellIdx >= int32(_pPage.X14) {
- *(*int32)(unsafe.Pointer(&(_pCur.X9))) = i32(-1)
- *(*uint16)(unsafe.Pointer(&(_pCur.X16))) = uint16(int32(_pPage.X14) - i32(1))
+ _pCur.XeState = uint8(2)
+ if _iCellIdx >= int32(_pPage.XnCell) {
+ _pCur.XskipNext = int32(-1)
+ _pCur.Xix = uint16(int32(_pPage.XnCell) - int32(1))
goto _56
}
- *(*int32)(unsafe.Pointer(&(_pCur.X9))) = i32(1)
+ _pCur.XskipNext = int32(1)
_56:
goto _57
_43:
_rc = _moveToRoot(tls, _pCur)
if _bPreserve != 0 {
- *(*uint8)(unsafe.Pointer(&(_pCur.X12))) = uint8(i32(3))
+ _pCur.XeState = uint8(3)
}
_57:
_42:
return _rc
-
- _ = _info
- _ = _4_notUsed
- panic(0)
}
var _sqlite3BtreeDeleteØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeDeleteØ00__func__Ø000[0], str(85825), 19)
-}
-
-// Compare the key in memory cell pVal with the key that the sorter cursor
-// passed as the first argument currently points to. For the purposes of
-// the comparison, ignore the rowid field at the end of each record.
-//
-// If the sorter cursor key contains any NULL values, consider it to be
-// less than pVal. Even if pVal also contains NULL values.
-//
-// If an error occurs, return an SQLite error code (i.e. SQLITE_NOMEM).
-// Otherwise, set *pRes to a negative, zero or positive value if the
-// key in pVal is smaller than, equal to or larger than the current sorter
-// key.
-//
-// This routine forms the core of the OP_SorterCompare opcode, which in
-// turn is used to verify uniqueness when constructing a UNIQUE INDEX.
+ crt.Xstrncpy(nil, &_sqlite3BtreeDeleteØ00__func__Ø000[0], str(83987), 19)
+}
+
+// C comment
+// /*
+// ** Compare the key in memory cell pVal with the key that the sorter cursor
+// ** passed as the first argument currently points to. For the purposes of
+// ** the comparison, ignore the rowid field at the end of each record.
+// **
+// ** If the sorter cursor key contains any NULL values, consider it to be
+// ** less than pVal. Even if pVal also contains NULL values.
+// **
+// ** If an error occurs, return an SQLite error code (i.e. SQLITE_NOMEM).
+// ** Otherwise, set *pRes to a negative, zero or positive value if the
+// ** key in pVal is smaller than, equal to or larger than the current sorter
+// ** key.
+// **
+// ** This routine forms the core of the OP_SorterCompare opcode, which in
+// ** turn is used to verify uniqueness when constructing a UNIQUE INDEX.
+// */
func _sqlite3VdbeSorterCompare(tls *crt.TLS, _pCsr *XVdbeCursor, _pVal *XMem, _nKeyCol int32, _pRes *int32) (r0 int32) {
var _i, _nKey int32
var _pKey unsafe.Pointer
@@ -64743,181 +64476,193 @@ func _sqlite3VdbeSorterCompare(tls *crt.TLS, _pCsr *XVdbeCursor, _pVal *XMem, _n
var _pKeyInfo *XKeyInfo
var _pSorter *XVdbeSorter
func() {
- if int32(_pCsr.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88740), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterCompareØ00__func__Ø000))), unsafe.Pointer(str(57861)))
+ if int32(_pCsr.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88740), unsafe.Pointer(&_sqlite3VdbeSorterCompareØ00__func__Ø000), unsafe.Pointer(str(57837)))
crt.X__builtin_abort(tls)
}
}()
- _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCsr.X14))))))
- _r2 = (*XUnpackedRecord)(_pSorter.X8)
- _pKeyInfo = (*XKeyInfo)(_pCsr.X15)
+ _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCsr.Xuc)))
+ _r2 = (*XUnpackedRecord)(_pSorter.XpUnpacked)
+ _pKeyInfo = (*XKeyInfo)(_pCsr.XpKeyInfo)
if _r2 != nil {
goto _2
}
- _r2 = store51((**XUnpackedRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSorter.X8))))), _sqlite3VdbeAllocUnpackedRecord(tls, _pKeyInfo))
+ _r2 = store83((**XUnpackedRecord)(unsafe.Pointer(&_pSorter.XpUnpacked)), _sqlite3VdbeAllocUnpackedRecord(tls, _pKeyInfo))
if _r2 == nil {
- return _sqlite3NomemError(tls, i32(88746))
+ return _sqlite3NomemError(tls, int32(88746))
}
- *(*uint16)(unsafe.Pointer(&(_r2.X2))) = uint16(_nKeyCol)
+ _r2.XnField = uint16(_nKeyCol)
_2:
func() {
- if int32(_r2.X2) != _nKeyCol {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88749), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterCompareØ00__func__Ø000))), unsafe.Pointer(str(85844)))
+ if int32(_r2.XnField) != _nKeyCol {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88749), unsafe.Pointer(&_sqlite3VdbeSorterCompareØ00__func__Ø000), unsafe.Pointer(str(84006)))
crt.X__builtin_abort(tls)
}
}()
_pKey = _vdbeSorterRowkey(tls, _pSorter, &_nKey)
_sqlite3VdbeRecordUnpack(tls, _pKeyInfo, _nKey, _pKey, _r2)
- _i = i32(0)
+ _i = int32(0)
_6:
if _i >= _nKeyCol {
goto _9
}
- if (int32((*XMem)(unsafe.Pointer(uintptr(_r2.X1)+48*uintptr(_i))).X1) & i32(1)) != 0 {
- *_pRes = i32(-1)
- return i32(0)
+ if (int32(elem25((*XMem)(_r2.XaMem), uintptr(_i)).Xflags) & int32(1)) != 0 {
+ *_pRes = int32(-1)
+ return int32(0)
}
_i += 1
goto _6
_9:
- *_pRes = _sqlite3VdbeRecordCompare(tls, _pVal.X4, (unsafe.Pointer)(_pVal.X5), _r2)
- return i32(0)
+ *_pRes = _sqlite3VdbeRecordCompare(tls, _pVal.Xn, unsafe.Pointer(_pVal.Xz), _r2)
+ return int32(0)
}
var _sqlite3VdbeSorterCompareØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSorterCompareØ00__func__Ø000[0], str(85864), 25)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSorterCompareØ00__func__Ø000[0], str(84026), 25)
}
-// Return a pointer to a buffer owned by the sorter that contains the
-// current key.
+// C comment
+// /*
+// ** Return a pointer to a buffer owned by the sorter that contains the
+// ** current key.
+// */
func _vdbeSorterRowkey(tls *crt.TLS, _pSorter *XVdbeSorter, _pnKey *int32) (r0 unsafe.Pointer) {
var _pKey unsafe.Pointer
var _1_pReader *XPmaReader
- if (_pSorter.X12) == 0 {
+ if _pSorter.XbUsePMA == 0 {
goto _0
}
- if (_pSorter.X13) != 0 {
- _1_pReader = (*XPmaReader)(_pSorter.X4)
+ if _pSorter.XbUseThreads != 0 {
+ _1_pReader = (*XPmaReader)(_pSorter.XpReader)
goto _2
}
- _1_pReader = (*XPmaReader)(unsafe.Pointer(uintptr((*XMergeEngine)(_pSorter.X5).X3) + 52*uintptr(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMergeEngine)(_pSorter.X5).X2)) + 4*uintptr(i32(1)))))))
+ _1_pReader = elem80((*XPmaReader)((*XMergeEngine)(_pSorter.XpMerger).XaReadr), uintptr(*elem8((*XMergeEngine)(_pSorter.XpMerger).XaTree, uintptr(1))))
_2:
- *_pnKey = _1_pReader.X3
- _pKey = (unsafe.Pointer)(_1_pReader.X6)
+ *_pnKey = _1_pReader.XnKey
+ _pKey = unsafe.Pointer(_1_pReader.XaKey)
goto _3
_0:
- *_pnKey = (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0).X0
- _pKey = (unsafe.Pointer)((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer((*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0))) + uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(i32(1))))))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8))))))))))))
+ *_pnKey = (*XSorterRecord)(_pSorter.Xlist.XpList).XnVal
+ _pKey = unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(_pSorter.Xlist.XpList) + uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(int32(1))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8))))))))))))
_3:
return _pKey
}
-// Copy the current sorter key into the memory cell pOut.
+// C comment
+// /*
+// ** Copy the current sorter key into the memory cell pOut.
+// */
func _sqlite3VdbeSorterRowkey(tls *crt.TLS, _pCsr *XVdbeCursor, _pOut *XMem) (r0 int32) {
var _nKey int32
var _pKey unsafe.Pointer
var _pSorter *XVdbeSorter
func() {
- if int32(_pCsr.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88699), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterRowkeyØ00__func__Ø000))), unsafe.Pointer(str(57861)))
+ if int32(_pCsr.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88699), unsafe.Pointer(&_sqlite3VdbeSorterRowkeyØ00__func__Ø000), unsafe.Pointer(str(57837)))
crt.X__builtin_abort(tls)
}
}()
- _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCsr.X14))))))
+ _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCsr.Xuc)))
_pKey = _vdbeSorterRowkey(tls, _pSorter, &_nKey)
if _sqlite3VdbeMemClearAndResize(tls, _pOut, _nKey) != 0 {
- return _sqlite3NomemError(tls, i32(88703))
+ return _sqlite3NomemError(tls, int32(88703))
}
- *(*int32)(unsafe.Pointer(&(_pOut.X4))) = _nKey
- *(*uint16)(unsafe.Pointer(&(_pOut.X1))) = uint16((int32(_pOut.X1) & i32(-49664)) | i32(16))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pOut.X5), _pKey, uint32(_nKey))
- return i32(0)
+ _pOut.Xn = _nKey
+ _pOut.Xflags = uint16((int32(_pOut.Xflags) & int32(-49664)) | int32(16))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pOut.Xz), _pKey, uint32(_nKey))
+ return int32(0)
}
var _sqlite3VdbeSorterRowkeyØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSorterRowkeyØ00__func__Ø000[0], str(85889), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSorterRowkeyØ00__func__Ø000[0], str(84051), 24)
}
-// Check to ensure that the cursor is valid. Restore the cursor
-// if need be. Return any I/O error from the restore operation.
+// C comment
+// /*
+// ** Check to ensure that the cursor is valid. Restore the cursor
+// ** if need be. Return any I/O error from the restore operation.
+// */
func _sqlite3VdbeCursorRestore(tls *crt.TLS, _p *XVdbeCursor) (r0 int32) {
func() {
- if int32(_p.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(74514), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCursorRestoreØ00__func__Ø000))), unsafe.Pointer(str(73776)))
+ if int32(_p.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(74514), unsafe.Pointer(&_sqlite3VdbeCursorRestoreØ00__func__Ø000), unsafe.Pointer(str(71938)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3BtreeCursorHasMoved(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_p.X14))))))) != 0 {
+ if _sqlite3BtreeCursorHasMoved(tls, (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xuc)))) != 0 {
return _handleMovedCursor(tls, _p)
}
- return i32(0)
+ return int32(0)
}
var _sqlite3VdbeCursorRestoreØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeCursorRestoreØ00__func__Ø000[0], str(85913), 25)
+ crt.Xstrncpy(nil, &_sqlite3VdbeCursorRestoreØ00__func__Ø000[0], str(84075), 25)
}
-// NDEBUG
+// C comment
+// /* NDEBUG */
func _sqlite3BtreeCursorIsValidNN(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
func() {
if _pCur == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63381), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCursorIsValidNNØ00__func__Ø000))), unsafe.Pointer(str(77105)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63381), unsafe.Pointer(&_sqlite3BtreeCursorIsValidNNØ00__func__Ø000), unsafe.Pointer(str(75267)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int(int32(_pCur.X12) == i32(1))
+ return bool2int(int32(_pCur.XeState) == int32(1))
}
var _sqlite3BtreeCursorIsValidNNØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeCursorIsValidNNØ00__func__Ø000[0], str(85938), 28)
+ crt.Xstrncpy(nil, &_sqlite3BtreeCursorIsValidNNØ00__func__Ø000[0], str(84100), 28)
}
-// Move the cursor to the first entry in the table. Return SQLITE_OK
-// on success. Set *pRes to 0 if the cursor actually points to something
-// or set *pRes to 1 if the table is empty.
+// C comment
+// /* Move the cursor to the first entry in the table. Return SQLITE_OK
+// ** on success. Set *pRes to 0 if the cursor actually points to something
+// ** or set *pRes to 1 if the table is empty.
+// */
func _sqlite3BtreeFirst(tls *crt.TLS, _pCur *XBtCursor, _pRes *int32) (r0 int32) {
var _rc int32
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64079), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeFirstØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64079), unsafe.Pointer(&_sqlite3BtreeFirstØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.X0).X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64080), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeFirstØ00__func__Ø000))), unsafe.Pointer(str(73849)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.XpBtree).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64080), unsafe.Pointer(&_sqlite3BtreeFirstØ00__func__Ø000), unsafe.Pointer(str(72011)))
crt.X__builtin_abort(tls)
}
}()
_rc = _moveToRoot(tls, _pCur)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _4
}
- if int32(_pCur.X12) == i32(0) {
+ if int32(_pCur.XeState) == int32(0) {
func() {
- if (_pCur.X7) != uint32(i32(0)) && int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64084), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeFirstØ00__func__Ø000))), unsafe.Pointer(str(74242)))
+ if _pCur.XpgnoRoot != (0) && int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64084), unsafe.Pointer(&_sqlite3BtreeFirstØ00__func__Ø000), unsafe.Pointer(str(72404)))
crt.X__builtin_abort(tls)
}
}()
- *_pRes = i32(1)
+ *_pRes = int32(1)
goto _9
}
func() {
- if int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X14) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64087), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeFirstØ00__func__Ø000))), unsafe.Pointer(str(85966)))
+ if int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).XnCell) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64087), unsafe.Pointer(&_sqlite3BtreeFirstØ00__func__Ø000), unsafe.Pointer(str(84128)))
crt.X__builtin_abort(tls)
}
}()
- *_pRes = i32(0)
+ *_pRes = int32(0)
_rc = _moveToLeftmost(tls, _pCur)
_9:
_4:
@@ -64927,61 +64672,60 @@ _4:
var _sqlite3BtreeFirstØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeFirstØ00__func__Ø000[0], str(86001), 18)
+ crt.Xstrncpy(nil, &_sqlite3BtreeFirstØ00__func__Ø000[0], str(84163), 18)
}
-// Return an estimate for the number of rows in the table that pCur is
-// pointing to. Return a negative number if no estimate is currently
-// available.
+// C comment
+// /*
+// ** Return an estimate for the number of rows in the table that pCur is
+// ** pointing to. Return a negative number if no estimate is currently
+// ** available.
+// */
func _sqlite3BtreeRowCountEst(tls *crt.TLS, _pCur *XBtCursor) (r0 int64) {
var _n int64
var _i uint8
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64430), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRowCountEstØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64430), unsafe.Pointer(&_sqlite3BtreeRowCountEstØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.X0).X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64431), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRowCountEstØ00__func__Ø000))), unsafe.Pointer(str(73849)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCur.XpBtree).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64431), unsafe.Pointer(&_sqlite3BtreeRowCountEstØ00__func__Ø000), unsafe.Pointer(str(72011)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
- if int32(_pCur.X12) != i32(1) {
+ if int32(_pCur.XeState) != int32(1) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64436), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRowCountEstØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64436), unsafe.Pointer(&_sqlite3BtreeRowCountEstØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return int64(i32(-1))
+ return int64(-1)
}
if func() int32 {
- if int32((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_pCur.X14)))).X5) == i32(0) {
+ if int32((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_pCur.XiPage))).Xleaf) == int32(0) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(64437), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeRowCountEstØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(64437), unsafe.Pointer(&_sqlite3BtreeRowCountEstØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return int64(i32(-1))
+ return int64(-1)
}
- *func() *uint8 { _n = int64(i32(1)); return &_i }() = uint8(i32(0))
+ *func() *uint8 { _n = int64(1); return &_i }() = 0
_10:
- if int32(_i) > int32(_pCur.X14) {
+ if int32(_i) > int32(_pCur.XiPage) {
goto _13
}
- {
- p := &_n
- *p = (*p) * int64((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCur.X19))))) + 4*uintptr(_i)))).X14)
- sink6(*p)
- }
+ _n *= int64((*elem30((**XMemPage)(unsafe.Pointer(&_pCur.XapPage)), uintptr(_i))).XnCell)
_i += 1
goto _10
_13:
@@ -64991,59 +64735,62 @@ _13:
var _sqlite3BtreeRowCountEstØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeRowCountEstØ00__func__Ø000[0], str(86019), 24)
+ crt.Xstrncpy(nil, &_sqlite3BtreeRowCountEstØ00__func__Ø000[0], str(84181), 24)
}
-// Once the sorter has been populated by calls to sqlite3VdbeSorterWrite,
-// this function is called to prepare for iterating through the records
-// in sorted order.
+// C comment
+// /*
+// ** Once the sorter has been populated by calls to sqlite3VdbeSorterWrite,
+// ** this function is called to prepare for iterating through the records
+// ** in sorted order.
+// */
func _sqlite3VdbeSorterRewind(tls *crt.TLS, _pCsr *XVdbeCursor, _pbEof *int32) (r0 int32) {
var _rc int32
var _pSorter *XVdbeSorter
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if int32(_pCsr.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88587), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterRewindØ00__func__Ø000))), unsafe.Pointer(str(57861)))
+ if int32(_pCsr.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88587), unsafe.Pointer(&_sqlite3VdbeSorterRewindØ00__func__Ø000), unsafe.Pointer(str(57837)))
crt.X__builtin_abort(tls)
}
}()
- _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCsr.X14))))))
+ _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCsr.Xuc)))
func() {
if _pSorter == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88589), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterRewindØ00__func__Ø000))), unsafe.Pointer(str(86043)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88589), unsafe.Pointer(&_sqlite3VdbeSorterRewindØ00__func__Ø000), unsafe.Pointer(str(84205)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pSorter.X12) != i32(0) {
+ if int32(_pSorter.XbUsePMA) != int32(0) {
goto _4
}
- if (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0) != nil {
- *_pbEof = i32(0)
- _rc = _vdbeSorterSort(tls, (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17)))))+60*uintptr(i32(0)))), (*t47)(unsafe.Pointer(&(_pSorter.X9))))
+ if (_pSorter.Xlist.XpList) != nil {
+ *_pbEof = int32(0)
+ _rc = _vdbeSorterSort(tls, elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), 0), &_pSorter.Xlist)
goto _6
}
- *_pbEof = i32(1)
+ *_pbEof = int32(1)
_6:
return _rc
_4:
func() {
- if (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88608), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterRewindØ00__func__Ø000))), unsafe.Pointer(str(86051)))
+ if (_pSorter.Xlist.XpList) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88608), unsafe.Pointer(&_sqlite3VdbeSorterRewindØ00__func__Ø000), unsafe.Pointer(str(84213)))
crt.X__builtin_abort(tls)
}
}()
_rc = _vdbeSorterFlushPMA(tls, _pSorter)
_rc = _vdbeSorterJoinAll(tls, _pSorter, _rc)
func() {
- if (*XPmaReader)(_pSorter.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88618), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterRewindØ00__func__Ø000))), unsafe.Pointer(str(86071)))
+ if (*XPmaReader)(_pSorter.XpReader) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88618), unsafe.Pointer(&_sqlite3VdbeSorterRewindØ00__func__Ø000), unsafe.Pointer(str(84233)))
crt.X__builtin_abort(tls)
}
}()
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _vdbeSorterSetupMerge(tls, _pSorter)
- *_pbEof = i32(0)
+ *_pbEof = int32(0)
}
return _rc
}
@@ -65051,166 +64798,178 @@ _4:
var _sqlite3VdbeSorterRewindØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSorterRewindØ00__func__Ø000[0], str(86091), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSorterRewindØ00__func__Ø000[0], str(84253), 24)
}
-// Sort the linked list of records headed at pTask->pList. Return
-// SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if
-// an error occurs.
-func _vdbeSorterSort(tls *crt.TLS, _pTask *XSortSubtask, _pList *t47) (r0 int32) {
+// C comment
+// /*
+// ** Sort the linked list of records headed at pTask->pList. Return
+// ** SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if
+// ** an error occurs.
+// */
+func _vdbeSorterSort(tls *crt.TLS, _pTask *XSortSubtask, _pList *t89) (r0 int32) {
var _i, _rc int32
var _p, _2_pNext *XSorterRecord
var _aSlot **XSorterRecord
_rc = _vdbeSortAllocUnpacked(tls, _pTask)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
- _p = (*XSorterRecord)(_pList.X0)
- *(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&(_pTask.X6))))) = _vdbeSorterGetCompare(tls, (*XVdbeSorter)(_pTask.X2))
- _aSlot = (**XSorterRecord)(_sqlite3MallocZero(tls, uint64(u32(256))))
+ _p = (*XSorterRecord)(_pList.XpList)
+ *(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&_pTask.XxCompare)) = _vdbeSorterGetCompare(tls, (*XVdbeSorter)(_pTask.XpSorter))
+ _aSlot = (**XSorterRecord)(_sqlite3MallocZero(tls, uint64(256)))
if _aSlot == nil {
- return _sqlite3NomemError(tls, i32(87425))
+ return _sqlite3NomemError(tls, int32(87425))
}
_1:
if _p == nil {
goto _3
}
- if (_pList.X1) == nil {
+ if _pList.XaMemory == nil {
goto _4
}
- if (*uint8)(unsafe.Pointer(_p)) == (_pList.X1) {
+ if (*uint8)(unsafe.Pointer(_p)) == _pList.XaMemory {
_2_pNext = nil
goto _6
}
func() {
- if (*(*int32)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_p.X1)))))) >= _sqlite3MallocSize(tls, (unsafe.Pointer)(_pList.X1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87434), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterSortØ00__func__Ø000))), unsafe.Pointer(str(86115)))
+ if (*(*int32)(unsafe.Pointer(&_p.Xu))) >= _sqlite3MallocSize(tls, unsafe.Pointer(_pList.XaMemory)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87434), unsafe.Pointer(&_vdbeSorterSortØ00__func__Ø000), unsafe.Pointer(str(84277)))
crt.X__builtin_abort(tls)
}
}()
- _2_pNext = (*XSorterRecord)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pList.X1)) + 1*uintptr(*(*int32)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_p.X1))))))))))
+ _2_pNext = (*XSorterRecord)(unsafe.Pointer(elem15(_pList.XaMemory, uintptr(*(*int32)(unsafe.Pointer(&_p.Xu))))))
_6:
goto _9
_4:
- _2_pNext = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_p.X1))))))
+ _2_pNext = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))
_9:
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_p.X1))))))) = nil
- _i = i32(0)
+ *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))) = nil
+ _i = int32(0)
_10:
- if (*(**XSorterRecord)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSlot)) + 4*uintptr(_i)))) == nil {
+ if (*elem90(_aSlot, uintptr(_i))) == nil {
goto _13
}
- _p = _vdbeSorterMerge(tls, _pTask, _p, *(**XSorterRecord)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSlot)) + 4*uintptr(_i))))
- *(**XSorterRecord)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSlot)) + 4*uintptr(_i))) = nil
+ _p = _vdbeSorterMerge(tls, _pTask, _p, *elem90(_aSlot, uintptr(_i)))
+ *elem90(_aSlot, uintptr(_i)) = nil
_i += 1
goto _10
_13:
- *(**XSorterRecord)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSlot)) + 4*uintptr(_i))) = _p
+ *elem90(_aSlot, uintptr(_i)) = _p
_p = _2_pNext
goto _1
_3:
_p = nil
- _i = i32(0)
+ _i = int32(0)
_14:
- if _i >= i32(64) {
+ if _i >= int32(64) {
goto _17
}
- if (*(**XSorterRecord)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSlot)) + 4*uintptr(_i)))) == nil {
+ if (*elem90(_aSlot, uintptr(_i))) == nil {
goto _15
}
_p = func() *XSorterRecord {
if _p != nil {
- return _vdbeSorterMerge(tls, _pTask, _p, *(**XSorterRecord)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSlot)) + 4*uintptr(_i))))
+ return _vdbeSorterMerge(tls, _pTask, _p, *elem90(_aSlot, uintptr(_i)))
}
- return (*(**XSorterRecord)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSlot)) + 4*uintptr(_i))))
+ return (*elem90(_aSlot, uintptr(_i)))
}()
_15:
_i += 1
goto _14
_17:
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pList.X0))))) = _p
- Xsqlite3_free(tls, (unsafe.Pointer)(_aSlot))
+ *(**XSorterRecord)(unsafe.Pointer(&_pList.XpList)) = _p
+ Xsqlite3_free(tls, unsafe.Pointer(_aSlot))
func() {
- if int32((*XUnpackedRecord)(_pTask.X3).X4) != i32(0) && int32((*XUnpackedRecord)(_pTask.X3).X4) != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87458), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterSortØ00__func__Ø000))), unsafe.Pointer(str(86160)))
+ if int32((*XUnpackedRecord)(_pTask.XpUnpacked).XerrCode) != int32(0) && int32((*XUnpackedRecord)(_pTask.XpUnpacked).XerrCode) != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87458), unsafe.Pointer(&_vdbeSorterSortØ00__func__Ø000), unsafe.Pointer(str(84322)))
crt.X__builtin_abort(tls)
}
}()
- return int32((*XUnpackedRecord)(_pTask.X3).X4)
+ return int32((*XUnpackedRecord)(_pTask.XpUnpacked).XerrCode)
}
-// If it has not already been allocated, allocate the UnpackedRecord
-// structure at pTask->pUnpacked. Return SQLITE_OK if successful (or
-// if no allocation was required), or SQLITE_NOMEM otherwise.
+// C comment
+// /*
+// ** If it has not already been allocated, allocate the UnpackedRecord
+// ** structure at pTask->pUnpacked. Return SQLITE_OK if successful (or
+// ** if no allocation was required), or SQLITE_NOMEM otherwise.
+// */
func _vdbeSortAllocUnpacked(tls *crt.TLS, _pTask *XSortSubtask) (r0 int32) {
- if (*XUnpackedRecord)(_pTask.X3) != nil {
+ if (*XUnpackedRecord)(_pTask.XpUnpacked) != nil {
goto _0
}
- *(**XUnpackedRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTask.X3))))) = _sqlite3VdbeAllocUnpackedRecord(tls, (*XKeyInfo)((*XVdbeSorter)(_pTask.X2).X7))
- if (*XUnpackedRecord)(_pTask.X3) == nil {
- return _sqlite3NomemError(tls, i32(87344))
+ *(**XUnpackedRecord)(unsafe.Pointer(&_pTask.XpUnpacked)) = _sqlite3VdbeAllocUnpackedRecord(tls, (*XKeyInfo)((*XVdbeSorter)(_pTask.XpSorter).XpKeyInfo))
+ if (*XUnpackedRecord)(_pTask.XpUnpacked) == nil {
+ return _sqlite3NomemError(tls, int32(87344))
}
- *(*uint16)(unsafe.Pointer(&((*XUnpackedRecord)(_pTask.X3).X2))) = (*XKeyInfo)((*XVdbeSorter)(_pTask.X2).X7).X2
- *(*uint8)(unsafe.Pointer(&((*XUnpackedRecord)(_pTask.X3).X4))) = uint8(i32(0))
+ (*XUnpackedRecord)(_pTask.XpUnpacked).XnField = (*XKeyInfo)((*XVdbeSorter)(_pTask.XpSorter).XpKeyInfo).XnField
+ (*XUnpackedRecord)(_pTask.XpUnpacked).XerrCode = 0
_0:
- return i32(0)
+ return int32(0)
}
-// Return the SorterCompare function to compare values collected by the
-// sorter object passed as the only argument.
+// C comment
+// /*
+// ** Return the SorterCompare function to compare values collected by the
+// ** sorter object passed as the only argument.
+// */
func _vdbeSorterGetCompare(tls *crt.TLS, _p *XVdbeSorter) (r0 func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32) {
- if int32(_p.X16) == i32(1) {
+ if int32(_p.XtypeMask) == int32(1) {
return _vdbeSorterCompareInt
}
- if int32(_p.X16) == i32(2) {
+ if int32(_p.XtypeMask) == int32(2) {
return _vdbeSorterCompareText
}
return _vdbeSorterCompare
}
-// A specially optimized version of vdbeSorterCompare() that assumes that
-// the first field of each key is an INTEGER value.
+// C comment
+// /*
+// ** A specially optimized version of vdbeSorterCompare() that assumes that
+// ** the first field of each key is an INTEGER value.
+// */
func _vdbeSorterCompareInt(tls *crt.TLS, _pTask *XSortSubtask, _pbKey2Cached *int32, _pKey1 unsafe.Pointer, _nKey1 int32, _pKey2 unsafe.Pointer, _nKey2 int32) (r0 int32) {
var _s1, _s2, _res, _1_i int32
var _1_n uint8
var _p1, _p2, _v1, _v2 *uint8
_p1 = (*uint8)(_pKey1)
_p2 = (*uint8)(_pKey2)
- _s1 = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p1)) + 1*uintptr(i32(1)))))
- _s2 = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p2)) + 1*uintptr(i32(1)))))
- _v1 = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p1)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p1)) + 1*uintptr(i32(0)))))))
- _v2 = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p2)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p2)) + 1*uintptr(i32(0)))))))
+ _s1 = int32(*elem15(_p1, uintptr(1)))
+ _s2 = int32(*elem15(_p2, uintptr(1)))
+ _v1 = elem15(_p1, uintptr(*elem15(_p1, 0)))
+ _v2 = elem15(_p2, uintptr(*elem15(_p2, 0)))
func() {
- if (_s1 <= i32(0) || _s1 >= i32(7)) && _s1 != i32(8) && _s1 != i32(9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86872), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterCompareIntØ00__func__Ø000))), unsafe.Pointer(str(86240)))
+ if (_s1 <= int32(0) || _s1 >= int32(7)) && _s1 != int32(8) && _s1 != int32(9) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86872), unsafe.Pointer(&_vdbeSorterCompareIntØ00__func__Ø000), unsafe.Pointer(str(84402)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_s2 <= i32(0) || _s2 >= i32(7)) && _s2 != i32(8) && _s2 != i32(9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86873), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterCompareIntØ00__func__Ø000))), unsafe.Pointer(str(86273)))
+ if (_s2 <= int32(0) || _s2 >= int32(7)) && _s2 != int32(8) && _s2 != int32(9) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86873), unsafe.Pointer(&_vdbeSorterCompareIntØ00__func__Ø000), unsafe.Pointer(str(84435)))
crt.X__builtin_abort(tls)
}
}()
if _s1 != _s2 {
goto _10
}
- _1_n = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_vdbeSorterCompareIntØ00aLenØ001)) + 1*uintptr(_s1)))
- _res = i32(0)
- _1_i = i32(0)
+ _1_n = *elem15((*uint8)(unsafe.Pointer(&_vdbeSorterCompareIntØ00aLenØ001)), uintptr(_s1))
+ _res = int32(0)
+ _1_i = int32(0)
_11:
if _1_i >= int32(_1_n) {
goto _14
}
- if store1(&_res, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_v1)) + 1*uintptr(_1_i))))-int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_v2)) + 1*uintptr(_1_i))))) == i32(0) {
+ if store2(&_res, int32(*elem15(_v1, uintptr(_1_i)))-int32(*elem15(_v2, uintptr(_1_i)))) == int32(0) {
goto _15
}
- if ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_v1)) + 1*uintptr(i32(0))))) ^ int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_v2)) + 1*uintptr(i32(0)))))) & i32(128)) != i32(0) {
+ if ((int32(*elem15(_v1, 0)) ^ int32(*elem15(_v2, 0))) & int32(128)) != int32(0) {
_res = func() int32 {
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_v1)) + 1*uintptr(i32(0))))) & i32(128)) != 0 {
- return i32(-1)
+ if (int32(*elem15(_v1, 0)) & int32(128)) != 0 {
+ return int32(-1)
}
- return i32(1)
+ return int32(1)
}()
}
goto _14
@@ -65220,49 +64979,49 @@ _15:
_14:
goto _22
_10:
- if (_s1 > i32(7)) && (_s2 > i32(7)) {
+ if (_s1 > int32(7)) && (_s2 > int32(7)) {
_res = _s1 - _s2
goto _22
}
- if _s2 > i32(7) {
- _res = i32(1)
+ if _s2 > int32(7) {
+ _res = int32(1)
goto _26
}
- if _s1 > i32(7) {
- _res = i32(-1)
+ if _s1 > int32(7) {
+ _res = int32(-1)
goto _26
}
_res = _s1 - _s2
_26:
func() {
- if _res == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86899), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterCompareIntØ00__func__Ø000))), unsafe.Pointer(str(68311)))
+ if _res == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86899), unsafe.Pointer(&_vdbeSorterCompareIntØ00__func__Ø000), unsafe.Pointer(str(66473)))
crt.X__builtin_abort(tls)
}
}()
- if _res <= i32(0) {
+ if _res <= int32(0) {
goto _29
}
- if (int32(*_v1) & i32(128)) != 0 {
- _res = i32(-1)
+ if (int32(*_v1) & int32(128)) != 0 {
+ _res = int32(-1)
}
goto _31
_29:
- if (int32(*_v2) & i32(128)) != 0 {
- _res = i32(1)
+ if (int32(*_v2) & int32(128)) != 0 {
+ _res = int32(1)
}
_31:
_22:
- if _res != i32(0) {
+ if _res != int32(0) {
goto _33
}
- if int32((*XKeyInfo)((*XVdbeSorter)(_pTask.X2).X7).X2) > i32(1) {
+ if int32((*XKeyInfo)((*XVdbeSorter)(_pTask.XpSorter).XpKeyInfo).XnField) > int32(1) {
_res = _vdbeSorterCompareTail(tls, _pTask, _pbKey2Cached, _pKey1, _nKey1, _pKey2, _nKey2)
}
goto _36
_33:
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XKeyInfo)((*XVdbeSorter)(_pTask.X2).X7).X5)) + 1*uintptr(i32(0))))) != 0 {
- _res = _res * i32(-1)
+ if (*elem15((*XKeyInfo)((*XVdbeSorter)(_pTask.XpSorter).XpKeyInfo).XaSortOrder, 0)) != 0 {
+ _res = _res * int32(-1)
}
_36:
return _res
@@ -65271,7 +65030,7 @@ _36:
var _vdbeSorterCompareIntØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterCompareIntØ00__func__Ø000[0], str(86306), 21)
+ crt.Xstrncpy(nil, &_vdbeSorterCompareIntØ00__func__Ø000[0], str(84468), 21)
}
var _vdbeSorterCompareIntØ00aLenØ001 [10]uint8
@@ -65280,90 +65039,93 @@ func init() {
_vdbeSorterCompareIntØ00aLenØ001 = [10]uint8{0, 1, 2, 3, 4, 6, 8, 0, 0, 0}
}
-// A version of vdbeSorterCompare() that assumes that it has already been
-// determined that the first field of key1 is equal to the first field of
-// key2.
+// C comment
+// /*
+// ** A version of vdbeSorterCompare() that assumes that it has already been
+// ** determined that the first field of key1 is equal to the first field of
+// ** key2.
+// */
func _vdbeSorterCompareTail(tls *crt.TLS, _pTask *XSortSubtask, _pbKey2Cached *int32, _pKey1 unsafe.Pointer, _nKey1 int32, _pKey2 unsafe.Pointer, _nKey2 int32) (r0 int32) {
var _r2 *XUnpackedRecord
- _r2 = (*XUnpackedRecord)(_pTask.X3)
- if (*_pbKey2Cached) == i32(0) {
- _sqlite3VdbeRecordUnpack(tls, (*XKeyInfo)((*XVdbeSorter)(_pTask.X2).X7), _nKey2, _pKey2, _r2)
- *_pbKey2Cached = i32(1)
+ _r2 = (*XUnpackedRecord)(_pTask.XpUnpacked)
+ if (*_pbKey2Cached) == int32(0) {
+ _sqlite3VdbeRecordUnpack(tls, (*XKeyInfo)((*XVdbeSorter)(_pTask.XpSorter).XpKeyInfo), _nKey2, _pKey2, _r2)
+ *_pbKey2Cached = int32(1)
}
- return _sqlite3VdbeRecordCompareWithSkip(tls, _nKey1, _pKey1, _r2, i32(1))
+ return _sqlite3VdbeRecordCompareWithSkip(tls, _nKey1, _pKey1, _r2, int32(1))
}
-// A specially optimized version of vdbeSorterCompare() that assumes that
-// the first field of each key is a TEXT value and that the collation
-// sequence to compare them with is BINARY.
+// C comment
+// /*
+// ** A specially optimized version of vdbeSorterCompare() that assumes that
+// ** the first field of each key is a TEXT value and that the collation
+// ** sequence to compare them with is BINARY.
+// */
func _vdbeSorterCompareText(tls *crt.TLS, _pTask *XSortSubtask, _pbKey2Cached *int32, _pKey1 unsafe.Pointer, _nKey1 int32, _pKey2 unsafe.Pointer, _nKey2 int32) (r0 int32) {
var _n1, _n2, _res int32
var _p1, _p2, _v1, _v2 *uint8
_p1 = (*uint8)(_pKey1)
_p2 = (*uint8)(_pKey2)
- _v1 = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p1)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p1)) + 1*uintptr(i32(0)))))))
- _v2 = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p2)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p2)) + 1*uintptr(i32(0)))))))
+ _v1 = elem15(_p1, uintptr(*elem15(_p1, 0)))
+ _v2 = elem15(_p2, uintptr(*elem15(_p2, 0)))
func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p1)) + 1*uintptr(i32(1))))) < int32(u8(128)) {
- return func() int32 {
- _n1 = int32(uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p1)) + 1*uintptr(i32(1))))))
- return i32(1)
- }()
+ if int32(*elem15(_p1, uintptr(1))) < int32(128) {
+ return func() int32 { _n1 = int32(uint32(*elem15(_p1, uintptr(1)))); return int32(1) }()
}
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p1))+1*uintptr(i32(1)))), (*uint32)(unsafe.Pointer(&_n1))))
+ return int32(_sqlite3GetVarint32(tls, elem15(_p1, uintptr(1)), (*uint32)(unsafe.Pointer(&_n1))))
}()
- _n1 = (_n1 - i32(13)) / i32(2)
+ _n1 = (_n1 - int32(13)) / int32(2)
func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p2)) + 1*uintptr(i32(1))))) < int32(u8(128)) {
- return func() int32 {
- _n2 = int32(uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p2)) + 1*uintptr(i32(1))))))
- return i32(1)
- }()
+ if int32(*elem15(_p2, uintptr(1))) < int32(128) {
+ return func() int32 { _n2 = int32(uint32(*elem15(_p2, uintptr(1)))); return int32(1) }()
}
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p2))+1*uintptr(i32(1)))), (*uint32)(unsafe.Pointer(&_n2))))
+ return int32(_sqlite3GetVarint32(tls, elem15(_p2, uintptr(1)), (*uint32)(unsafe.Pointer(&_n2))))
}()
- _n2 = (_n2 - i32(13)) / i32(2)
- _res = crt.Xmemcmp(tls, (unsafe.Pointer)(_v1), (unsafe.Pointer)(_v2), uint32(func() int32 {
+ _n2 = (_n2 - int32(13)) / int32(2)
+ _res = crt.Xmemcmp(tls, unsafe.Pointer(_v1), unsafe.Pointer(_v2), uint32(func() int32 {
if _n1 < _n2 {
return _n1
}
return _n2
}()))
- if _res == i32(0) {
+ if _res == int32(0) {
_res = _n1 - _n2
}
- if _res != i32(0) {
+ if _res != int32(0) {
goto _7
}
- if int32((*XKeyInfo)((*XVdbeSorter)(_pTask.X2).X7).X2) > i32(1) {
+ if int32((*XKeyInfo)((*XVdbeSorter)(_pTask.XpSorter).XpKeyInfo).XnField) > int32(1) {
_res = _vdbeSorterCompareTail(tls, _pTask, _pbKey2Cached, _pKey1, _nKey1, _pKey2, _nKey2)
}
goto _9
_7:
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XKeyInfo)((*XVdbeSorter)(_pTask.X2).X7).X5)) + 1*uintptr(i32(0))))) != 0 {
- _res = _res * i32(-1)
+ if (*elem15((*XKeyInfo)((*XVdbeSorter)(_pTask.XpSorter).XpKeyInfo).XaSortOrder, 0)) != 0 {
+ _res = _res * int32(-1)
}
_9:
return _res
}
-// Compare key1 (buffer pKey1, size nKey1 bytes) with key2 (buffer pKey2,
-// size nKey2 bytes). Use (pTask->pKeyInfo) for the collation sequences
-// used by the comparison. Return the result of the comparison.
-//
-// If IN/OUT parameter *pbKey2Cached is true when this function is called,
-// it is assumed that (pTask->pUnpacked) contains the unpacked version
-// of key2. If it is false, (pTask->pUnpacked) is populated with the unpacked
-// version of key2 and *pbKey2Cached set to true before returning.
-//
-// If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set
-// to SQLITE_NOMEM.
+// C comment
+// /*
+// ** Compare key1 (buffer pKey1, size nKey1 bytes) with key2 (buffer pKey2,
+// ** size nKey2 bytes). Use (pTask->pKeyInfo) for the collation sequences
+// ** used by the comparison. Return the result of the comparison.
+// **
+// ** If IN/OUT parameter *pbKey2Cached is true when this function is called,
+// ** it is assumed that (pTask->pUnpacked) contains the unpacked version
+// ** of key2. If it is false, (pTask->pUnpacked) is populated with the unpacked
+// ** version of key2 and *pbKey2Cached set to true before returning.
+// **
+// ** If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set
+// ** to SQLITE_NOMEM.
+// */
func _vdbeSorterCompare(tls *crt.TLS, _pTask *XSortSubtask, _pbKey2Cached *int32, _pKey1 unsafe.Pointer, _nKey1 int32, _pKey2 unsafe.Pointer, _nKey2 int32) (r0 int32) {
var _r2 *XUnpackedRecord
- _r2 = (*XUnpackedRecord)(_pTask.X3)
+ _r2 = (*XUnpackedRecord)(_pTask.XpUnpacked)
if (*_pbKey2Cached) == 0 {
- _sqlite3VdbeRecordUnpack(tls, (*XKeyInfo)((*XVdbeSorter)(_pTask.X2).X7), _nKey2, _pKey2, _r2)
- *_pbKey2Cached = i32(1)
+ _sqlite3VdbeRecordUnpack(tls, (*XKeyInfo)((*XVdbeSorter)(_pTask.XpSorter).XpKeyInfo), _nKey2, _pKey2, _r2)
+ *_pbKey2Cached = int32(1)
}
return _sqlite3VdbeRecordCompare(tls, _nKey1, _pKey1, _r2)
}
@@ -65371,33 +65133,37 @@ func _vdbeSorterCompare(tls *crt.TLS, _pTask *XSortSubtask, _pbKey2Cached *int32
var _vdbeSorterSortØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterSortØ00__func__Ø000[0], str(86327), 15)
+ crt.Xstrncpy(nil, &_vdbeSorterSortØ00__func__Ø000[0], str(84489), 15)
}
-// Merge the two sorted lists p1 and p2 into a single list.
+// C comment
+// /*
+// ** Merge the two sorted lists p1 and p2 into a single list.
+// */
func _vdbeSorterMerge(tls *crt.TLS, _pTask *XSortSubtask, _p1 *XSorterRecord, _p2 *XSorterRecord) (r0 *XSorterRecord) {
var _bCached, _1_res int32
var _pFinal *XSorterRecord
var _pp **XSorterRecord
_pFinal = nil
_pp = &_pFinal
- _bCached = i32(0)
+ _bCached = int32(0)
func() {
if _p1 == nil || _p2 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87364), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterMergeØ00__func__Ø000))), unsafe.Pointer(str(86342)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87364), unsafe.Pointer(&_vdbeSorterMergeØ00__func__Ø000), unsafe.Pointer(str(84504)))
crt.X__builtin_abort(tls)
}
}()
_3:
- _1_res = (*(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32
- }{(_pTask.X6)})))(tls, _pTask, &_bCached, (unsafe.Pointer)((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer(_p1))+uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(i32(1))))))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8)))))))))))), _p1.X0, (unsafe.Pointer)((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer(_p2))+uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(i32(1))))))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8)))))))))))), _p2.X0)
- if _1_res > i32(0) {
+ _1_res = func() func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32 {
+ v := _pTask.XxCompare
+ return *(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pTask, &_bCached, unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer(_p1))+uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(int32(1))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8)))))))))))), _p1.XnVal, unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer(_p2))+uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(int32(1))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8)))))))))))), _p2.XnVal)
+ if _1_res > int32(0) {
goto _6
}
*_pp = _p1
- _pp = (**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_p1.X1)))))))
- _p1 = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_p1.X1))))))
+ _pp = (**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_p1.Xu))))
+ _p1 = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer(&_p1.Xu)))
if _p1 == nil {
*_pp = _p2
goto _5
@@ -65405,9 +65171,9 @@ _3:
goto _8
_6:
*_pp = _p2
- _pp = (**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_p2.X1)))))))
- _p2 = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_p2.X1))))))
- _bCached = i32(0)
+ _pp = (**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_p2.Xu))))
+ _p2 = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer(&_p2.Xu)))
+ _bCached = int32(0)
if _p2 == nil {
*_pp = _p1
goto _5
@@ -65416,86 +65182,86 @@ _8:
goto _3
_5:
return _pFinal
-
- _ = _bCached
- panic(0)
}
var _vdbeSorterMergeØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterMergeØ00__func__Ø000[0], str(86357), 16)
+ crt.Xstrncpy(nil, &_vdbeSorterMergeØ00__func__Ø000[0], str(84519), 16)
}
-// Flush the current contents of VdbeSorter.list to a new PMA, possibly
-// using a background thread.
+// C comment
+// /*
+// ** Flush the current contents of VdbeSorter.list to a new PMA, possibly
+// ** using a background thread.
+// */
func _vdbeSorterFlushPMA(tls *crt.TLS, _pSorter *XVdbeSorter) (r0 int32) {
var _rc, _i, _nWorker, _1_iTest int32
var _5_pCtx unsafe.Pointer
var _5_aMem *uint8
var _pTask *XSortSubtask
- _rc = i32(0)
+ _rc = int32(0)
_pTask = nil
- _nWorker = int32(_pSorter.X15) - i32(1)
- *(*uint8)(unsafe.Pointer(&(_pSorter.X12))) = uint8(i32(1))
- _i = i32(0)
+ _nWorker = int32(_pSorter.XnTask) - int32(1)
+ _pSorter.XbUsePMA = uint8(1)
+ _i = int32(0)
_0:
if _i >= _nWorker {
goto _3
}
- _1_iTest = ((int32(_pSorter.X14) + _i) + i32(1)) % _nWorker
- _pTask = (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17))))) + 60*uintptr(_1_iTest)))
- if (_pTask.X1) != 0 {
+ _1_iTest = ((int32(_pSorter.XiPrev) + _i) + int32(1)) % _nWorker
+ _pTask = elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), uintptr(_1_iTest))
+ if _pTask.XbDone != 0 {
_rc = _vdbeSorterJoinThread(tls, _pTask)
}
- if (_rc != i32(0)) || ((*XSQLiteThread)(_pTask.X0) == nil) {
+ if (_rc != int32(0)) || ((*XSQLiteThread)(_pTask.XpThread) == nil) {
goto _3
}
_i += 1
goto _0
_3:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _7
}
if _i == _nWorker {
- _rc = _vdbeSorterListToPMA(tls, (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17)))))+60*uintptr(_nWorker))), (*t47)(unsafe.Pointer(&(_pSorter.X9))))
+ _rc = _vdbeSorterListToPMA(tls, elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), uintptr(_nWorker)), &_pSorter.Xlist)
goto _9
}
- _5_aMem = (*t47)(unsafe.Pointer(&(_pTask.X4))).X1
- _5_pCtx = (unsafe.Pointer)(_pTask)
+ _5_aMem = _pTask.Xlist.XaMemory
+ _5_pCtx = unsafe.Pointer(_pTask)
func() {
- if (*XSQLiteThread)(_pTask.X0) != nil || (_pTask.X1) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87751), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterFlushPMAØ00__func__Ø000))), unsafe.Pointer(str(86373)))
+ if (*XSQLiteThread)(_pTask.XpThread) != nil || _pTask.XbDone != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87751), unsafe.Pointer(&_vdbeSorterFlushPMAØ00__func__Ø000), unsafe.Pointer(str(84535)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pTask.X4))).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87752), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterFlushPMAØ00__func__Ø000))), unsafe.Pointer(str(86410)))
+ if (*XSorterRecord)(_pTask.Xlist.XpList) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87752), unsafe.Pointer(&_vdbeSorterFlushPMAØ00__func__Ø000), unsafe.Pointer(str(84572)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*t47)(unsafe.Pointer(&(_pTask.X4))).X1) != nil && ((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87753), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterFlushPMAØ00__func__Ø000))), unsafe.Pointer(str(86431)))
+ if (_pTask.Xlist.XaMemory) != nil && (_pSorter.Xlist.XaMemory) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87753), unsafe.Pointer(&_vdbeSorterFlushPMAØ00__func__Ø000), unsafe.Pointer(str(84593)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pSorter.X14))) = uint8(int32((uintptr(unsafe.Pointer(_pTask)) - uintptr(unsafe.Pointer((*XSortSubtask)(unsafe.Pointer((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17)))))))) / 60))
- *(*t47)(unsafe.Pointer(&(_pTask.X4))) = _pSorter.X9
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0))))) = nil
- *(*int32)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X2))) = i32(0)
+ _pSorter.XiPrev = uint8(int32((uintptr(unsafe.Pointer(_pTask)) - uintptr(unsafe.Pointer(&_pSorter.XaTask))) / 60))
+ _pTask.Xlist = _pSorter.Xlist
+ *(**XSorterRecord)(unsafe.Pointer(&(_pSorter.Xlist.XpList))) = nil
+ _pSorter.Xlist.XszPMA = int32(0)
if _5_aMem != nil {
- *(**uint8)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1))) = _5_aMem
- *(*int32)(unsafe.Pointer(&(_pSorter.X11))) = _sqlite3MallocSize(tls, (unsafe.Pointer)(_5_aMem))
+ _pSorter.Xlist.XaMemory = _5_aMem
+ _pSorter.XnMemory = _sqlite3MallocSize(tls, unsafe.Pointer(_5_aMem))
goto _20
}
- if ((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1) == nil {
+ if (_pSorter.Xlist.XaMemory) == nil {
goto _20
}
- *(**uint8)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1))) = (*uint8)(_sqlite3Malloc(tls, uint64(_pSorter.X11)))
- if ((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1) == nil {
- return _sqlite3NomemError(tls, i32(87764))
+ _pSorter.Xlist.XaMemory = (*uint8)(_sqlite3Malloc(tls, uint64(_pSorter.XnMemory)))
+ if (_pSorter.Xlist.XaMemory) == nil {
+ return _sqlite3NomemError(tls, int32(87764))
}
_20:
_rc = _vdbeSorterCreateThread(tls, _pTask, _vdbeSorterFlushThread, _5_pCtx)
@@ -65504,125 +65270,128 @@ _7:
return _rc
}
-// Write the current contents of in-memory linked-list pList to a level-0
-// PMA in the temp file belonging to sub-task pTask. Return SQLITE_OK if
-// successful, or an SQLite error code otherwise.
-//
-// The format of a PMA is:
-//
-// * A varint. This varint contains the total number of bytes of content
-// in the PMA (not including the varint itself).
-//
-// * One or more records packed end-to-end in order of ascending keys.
-// Each record consists of a varint followed by a blob of data (the
-// key). The varint is the number of bytes in the blob of data.
-func _vdbeSorterListToPMA(tls *crt.TLS, _pTask *XSortSubtask, _pList *t47) (r0 int32) {
+// C comment
+// /*
+// ** Write the current contents of in-memory linked-list pList to a level-0
+// ** PMA in the temp file belonging to sub-task pTask. Return SQLITE_OK if
+// ** successful, or an SQLite error code otherwise.
+// **
+// ** The format of a PMA is:
+// **
+// ** * A varint. This varint contains the total number of bytes of content
+// ** in the PMA (not including the varint itself).
+// **
+// ** * One or more records packed end-to-end in order of ascending keys.
+// ** Each record consists of a varint followed by a blob of data (the
+// ** key). The varint is the number of bytes in the blob of data.
+// */
+func _vdbeSorterListToPMA(tls *crt.TLS, _pTask *XSortSubtask, _pList *t89) (r0 int32) {
var _rc int32
var _iSz int64
var _db *Xsqlite3
var _4_p, _4_pNext *XSorterRecord
var _writer XPmaWriter
- _db = (*Xsqlite3)((*XVdbeSorter)(_pTask.X2).X6)
- _rc = i32(0)
- _iSz = int64((_pList.X2)+_sqlite3VarintLen(tls, uint64(_pList.X2))) + ((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X1)
- crt.Xmemset(tls, (unsafe.Pointer)(&_writer), i32(0), u32(32))
+ _db = (*Xsqlite3)((*XVdbeSorter)(_pTask.XpSorter).Xdb)
+ _rc = int32(0)
+ _iSz = int64(_pList.XszPMA+_sqlite3VarintLen(tls, uint64(_pList.XszPMA))) + (_pTask.Xfile.XiEof)
+ crt.Xmemset(tls, unsafe.Pointer(&_writer), int32(0), uint32(32))
func() {
- if (_pList.X2) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87575), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000))), unsafe.Pointer(str(86482)))
+ if _pList.XszPMA <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87575), unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000), unsafe.Pointer(str(84644)))
crt.X__builtin_abort(tls)
}
}()
- if (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X0) == nil {
- _rc = _vdbeSorterOpenTempFile(tls, _db, int64(i32(0)), (**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X0))))))
+ if (*Xsqlite3_file)(_pTask.Xfile.XpFd) == nil {
+ _rc = _vdbeSorterOpenTempFile(tls, _db, 0, (**Xsqlite3_file)(unsafe.Pointer(&(_pTask.Xfile.XpFd))))
func() {
- if _rc == i32(0) && (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87580), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000))), unsafe.Pointer(str(86497)))
+ if _rc == int32(0) && (_pTask.Xfile.XpFd) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87580), unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000), unsafe.Pointer(str(84659)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X1) != int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87581), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000))), unsafe.Pointer(str(86530)))
+ if (_pTask.Xfile.XiEof) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87581), unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000), unsafe.Pointer(str(84692)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pTask.X5) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87582), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000))), unsafe.Pointer(str(86550)))
+ if _pTask.XnPMA != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87582), unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000), unsafe.Pointer(str(84712)))
crt.X__builtin_abort(tls)
}
}()
}
- if _rc == i32(0) {
- _vdbeSorterExtendFile(tls, _db, (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X0), (((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X1)+int64(_pList.X2))+int64(i32(9)))
+ if _rc == int32(0) {
+ _vdbeSorterExtendFile(tls, _db, (*Xsqlite3_file)(_pTask.Xfile.XpFd), ((_pTask.Xfile.XiEof)+int64(_pList.XszPMA))+int64(9))
}
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _vdbeSorterSort(tls, _pTask, _pList)
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _12
}
_4_pNext = nil
- _vdbePmaWriterInit(tls, (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X0), &_writer, (*XVdbeSorter)(_pTask.X2).X3, (*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X1)
- *(*int32)(unsafe.Pointer(&(_pTask.X5))) += 1
- _vdbePmaWriteVarint(tls, &_writer, uint64(_pList.X2))
- _4_p = (*XSorterRecord)(_pList.X0)
+ _vdbePmaWriterInit(tls, (*Xsqlite3_file)(_pTask.Xfile.XpFd), &_writer, (*XVdbeSorter)(_pTask.XpSorter).Xpgsz, _pTask.Xfile.XiEof)
+ _pTask.XnPMA += 1
+ _vdbePmaWriteVarint(tls, &_writer, uint64(_pList.XszPMA))
+ _4_p = (*XSorterRecord)(_pList.XpList)
_13:
if _4_p == nil {
goto _16
}
- _4_pNext = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_4_p.X1))))))
- _vdbePmaWriteVarint(tls, &_writer, uint64(_4_p.X0))
- _vdbePmaWriteBlob(tls, &_writer, (*uint8)((unsafe.Pointer)((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer(_4_p))+uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(i32(1))))))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8))))))))))))), _4_p.X0)
- if (_pList.X1) == nil {
- Xsqlite3_free(tls, (unsafe.Pointer)(_4_p))
+ _4_pNext = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer(&_4_p.Xu)))
+ _vdbePmaWriteVarint(tls, &_writer, uint64(_4_p.XnVal))
+ _vdbePmaWriteBlob(tls, &_writer, (*uint8)(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer(_4_p))+uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(int32(1))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8))))))))))))), _4_p.XnVal)
+ if _pList.XaMemory == nil {
+ Xsqlite3_free(tls, unsafe.Pointer(_4_p))
}
_4_p = _4_pNext
goto _13
_16:
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pList.X0))))) = _4_p
- _rc = _vdbePmaWriterFinish(tls, &_writer, (*int64)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X1))))
+ *(**XSorterRecord)(unsafe.Pointer(&_pList.XpList)) = _4_p
+ _rc = _vdbePmaWriterFinish(tls, &_writer, &(_pTask.Xfile.XiEof))
_12:
func() {
- if _rc == i32(0) && (*XSorterRecord)(_pList.X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87614), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000))), unsafe.Pointer(str(86565)))
+ if _rc == int32(0) && (*XSorterRecord)(_pList.XpList) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87614), unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000), unsafe.Pointer(str(84727)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc == i32(0) && ((*XSorterFile)(unsafe.Pointer(&(_pTask.X7))).X1) != _iSz {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87615), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000))), unsafe.Pointer(str(86598)))
+ if _rc == int32(0) && (_pTask.Xfile.XiEof) != _iSz {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87615), unsafe.Pointer(&_vdbeSorterListToPMAØ00__func__Ø000), unsafe.Pointer(str(84760)))
crt.X__builtin_abort(tls)
}
}()
return _rc
-
- _ = _writer
- panic(0)
}
var _vdbeSorterListToPMAØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterListToPMAØ00__func__Ø000[0], str(86637), 20)
+ crt.Xstrncpy(nil, &_vdbeSorterListToPMAØ00__func__Ø000[0], str(84799), 20)
}
-// Allocate space for a file-handle and open a temporary file. If successful,
-// set *ppFd to point to the malloc'd file-handle and return SQLITE_OK.
-// Otherwise, set *ppFd to 0 and return an SQLite error code.
+// C comment
+// /*
+// ** Allocate space for a file-handle and open a temporary file. If successful,
+// ** set *ppFd to point to the malloc'd file-handle and return SQLITE_OK.
+// ** Otherwise, set *ppFd to 0 and return an SQLite error code.
+// */
func _vdbeSorterOpenTempFile(tls *crt.TLS, _db *Xsqlite3, _nExtend int64, _ppFd **Xsqlite3_file) (r0 int32) {
var _rc int32
var _1_max int64
- if _sqlite3FaultSim(tls, i32(202)) != 0 {
- return i32(3338)
+ if _sqlite3FaultSim(tls, int32(202)) != 0 {
+ return int32(3338)
}
- _rc = _sqlite3OsOpenMalloc(tls, (*Xsqlite3_vfs)(_db.X0), nil, _ppFd, i32(4126), &_rc)
- if _rc != i32(0) {
+ _rc = _sqlite3OsOpenMalloc(tls, (*Xsqlite3_vfs)(_db.XpVfs), nil, _ppFd, int32(4126), &_rc)
+ if _rc != int32(0) {
goto _1
}
- _1_max = i64(2147418112)
- _sqlite3OsFileControlHint(tls, *_ppFd, i32(18), (unsafe.Pointer)(&_1_max))
- if _nExtend > int64(i32(0)) {
+ _1_max = int64(2147418112)
+ _sqlite3OsFileControlHint(tls, *_ppFd, int32(18), unsafe.Pointer(&_1_max))
+ if _nExtend > (0) {
_vdbeSorterExtendFile(tls, _db, *_ppFd, _nExtend)
}
_1:
@@ -65632,44 +65401,53 @@ _1:
panic(0)
}
-// The first argument is a file-handle open on a temporary file. The file
-// is guaranteed to be nByte bytes or smaller in size. This function
-// attempts to extend the file to nByte bytes in size and to ensure that
-// the VFS has memory mapped it.
-//
-// Whether or not the file does end up memory mapped of course depends on
-// the specific VFS implementation.
+// C comment
+// /*
+// ** The first argument is a file-handle open on a temporary file. The file
+// ** is guaranteed to be nByte bytes or smaller in size. This function
+// ** attempts to extend the file to nByte bytes in size and to ensure that
+// ** the VFS has memory mapped it.
+// **
+// ** Whether or not the file does end up memory mapped of course depends on
+// ** the specific VFS implementation.
+// */
func _vdbeSorterExtendFile(tls *crt.TLS, _db *Xsqlite3, _pFd *Xsqlite3_file, _nByte int64) {
var _1_chunksize int32
var _1_p unsafe.Pointer
- if (_nByte <= int64(_db.X32)) && (((*Xsqlite3_io_methods)(_pFd.X0).X0) >= i32(3)) {
+ if (_nByte <= int64(_db.XnMaxSorterMmap)) && (((*Xsqlite3_io_methods)(_pFd.XpMethods).XiVersion) >= int32(3)) {
_1_p = nil
- _1_chunksize = i32(4096)
- _sqlite3OsFileControlHint(tls, _pFd, i32(6), (unsafe.Pointer)(&_1_chunksize))
- _sqlite3OsFileControlHint(tls, _pFd, i32(5), (unsafe.Pointer)(&_nByte))
- _sqlite3OsFetch(tls, _pFd, int64(i32(0)), int32(_nByte), &_1_p)
- _sqlite3OsUnfetch(tls, _pFd, int64(i32(0)), _1_p)
+ _1_chunksize = int32(4096)
+ _sqlite3OsFileControlHint(tls, _pFd, int32(6), unsafe.Pointer(&_1_chunksize))
+ _sqlite3OsFileControlHint(tls, _pFd, int32(5), unsafe.Pointer(&_nByte))
+ _sqlite3OsFetch(tls, _pFd, 0, int32(_nByte), &_1_p)
+ _sqlite3OsUnfetch(tls, _pFd, 0, _1_p)
}
_ = _1_chunksize
}
-// Initialize a PMA-writer object.
+// C comment
+// /*
+// ** Initialize a PMA-writer object.
+// */
func _vdbePmaWriterInit(tls *crt.TLS, _pFd *Xsqlite3_file, _p *XPmaWriter, _nBuf int32, _iStart int64) {
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(32))
- *(**uint8)(unsafe.Pointer(&(_p.X1))) = (*uint8)(_sqlite3Malloc(tls, uint64(_nBuf)))
- if (_p.X1) == nil {
- *(*int32)(unsafe.Pointer(&(_p.X0))) = _sqlite3NomemError(tls, i32(87476))
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(32))
+ _p.XaBuffer = (*uint8)(_sqlite3Malloc(tls, uint64(_nBuf)))
+ if _p.XaBuffer == nil {
+ _p.XeFWErr = _sqlite3NomemError(tls, int32(87476))
goto _1
}
- *(*int32)(unsafe.Pointer(&(_p.X4))) = store1((*int32)(unsafe.Pointer(&(_p.X3))), int32(_iStart%int64(_nBuf)))
- *(*int64)(unsafe.Pointer(&(_p.X5))) = _iStart - int64(_p.X3)
- *(*int32)(unsafe.Pointer(&(_p.X2))) = _nBuf
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X6))))) = _pFd
+ _p.XiBufEnd = store2(&_p.XiBufStart, int32(_iStart%int64(_nBuf)))
+ _p.XiWriteOff = _iStart - int64(_p.XiBufStart)
+ _p.XnBuffer = _nBuf
+ *(**Xsqlite3_file)(unsafe.Pointer(&_p.XpFd)) = _pFd
_1:
}
-// Write value iVal encoded as a varint to the PMA. Return
-// SQLITE_OK if successful, or an SQLite error code if an error occurs.
+// C comment
+// /*
+// ** Write value iVal encoded as a varint to the PMA. Return
+// ** SQLITE_OK if successful, or an SQLite error code if an error occurs.
+// */
func _vdbePmaWriteVarint(tls *crt.TLS, _p *XPmaWriter, _iVal uint64) {
var _nByte int32
var _aByte [10]uint8
@@ -65678,45 +65456,36 @@ func _vdbePmaWriteVarint(tls *crt.TLS, _p *XPmaWriter, _iVal uint64) {
_ = _aByte
}
-// Write nData bytes of data to the PMA. Return SQLITE_OK
-// if successful, or an SQLite error code if an error occurs.
+// C comment
+// /*
+// ** Write nData bytes of data to the PMA. Return SQLITE_OK
+// ** if successful, or an SQLite error code if an error occurs.
+// */
func _vdbePmaWriteBlob(tls *crt.TLS, _p *XPmaWriter, _pData *uint8, _nData int32) {
var _nRem, _1_nCopy int32
_nRem = _nData
_0:
- if _nRem <= i32(0) || (_p.X0) != i32(0) {
+ if _nRem <= int32(0) || _p.XeFWErr != int32(0) {
goto _1
}
_1_nCopy = _nRem
- if _1_nCopy > ((_p.X2) - (_p.X4)) {
- _1_nCopy = (_p.X2) - (_p.X4)
- }
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X1))+1*uintptr(_p.X4)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pData))+1*uintptr(_nData-_nRem)))), uint32(_1_nCopy))
- {
- p := (*int32)(unsafe.Pointer(&(_p.X4)))
- *p = (*p) + _1_nCopy
- sink1(*p)
+ if _1_nCopy > (_p.XnBuffer - _p.XiBufEnd) {
+ _1_nCopy = _p.XnBuffer - _p.XiBufEnd
}
- if (_p.X4) == (_p.X2) {
- *(*int32)(unsafe.Pointer(&(_p.X0))) = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_p.X6), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X1))+1*uintptr(_p.X3)))), (_p.X4)-(_p.X3), (_p.X5)+int64(_p.X3))
- *(*int32)(unsafe.Pointer(&(_p.X3))) = store1((*int32)(unsafe.Pointer(&(_p.X4))), i32(0))
- {
- p := (*int64)(unsafe.Pointer(&(_p.X5)))
- *p = (*p) + int64(_p.X2)
- sink6(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_p.XaBuffer, uintptr(_p.XiBufEnd))), unsafe.Pointer(elem15(_pData, uintptr(_nData-_nRem))), uint32(_1_nCopy))
+ _p.XiBufEnd += _1_nCopy
+ if _p.XiBufEnd == _p.XnBuffer {
+ _p.XeFWErr = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_p.XpFd), unsafe.Pointer(elem15(_p.XaBuffer, uintptr(_p.XiBufStart))), _p.XiBufEnd-_p.XiBufStart, _p.XiWriteOff+int64(_p.XiBufStart))
+ _p.XiBufStart = store2(&_p.XiBufEnd, int32(0))
+ _p.XiWriteOff += int64(_p.XnBuffer)
}
func() {
- if (_p.X4) >= (_p.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87507), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaWriteBlobØ00__func__Ø000))), unsafe.Pointer(str(86657)))
+ if _p.XiBufEnd >= _p.XnBuffer {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87507), unsafe.Pointer(&_vdbePmaWriteBlobØ00__func__Ø000), unsafe.Pointer(str(84819)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_nRem
- *p = (*p) - _1_nCopy
- sink1(*p)
- }
+ _nRem -= _1_nCopy
goto _0
_1:
}
@@ -65724,149 +65493,158 @@ _1:
var _vdbePmaWriteBlobØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_vdbePmaWriteBlobØ00__func__Ø000[0], str(86679), 17)
+ crt.Xstrncpy(nil, &_vdbePmaWriteBlobØ00__func__Ø000[0], str(84841), 17)
}
-// Flush any buffered data to disk and clean up the PMA-writer object.
-// The results of using the PMA-writer after this call are undefined.
-// Return SQLITE_OK if flushing the buffered data succeeds or is not
-// required. Otherwise, return an SQLite error code.
-//
-// Before returning, set *piEof to the offset immediately following the
-// last byte written to the file.
+// C comment
+// /*
+// ** Flush any buffered data to disk and clean up the PMA-writer object.
+// ** The results of using the PMA-writer after this call are undefined.
+// ** Return SQLITE_OK if flushing the buffered data succeeds or is not
+// ** required. Otherwise, return an SQLite error code.
+// **
+// ** Before returning, set *piEof to the offset immediately following the
+// ** last byte written to the file.
+// */
func _vdbePmaWriterFinish(tls *crt.TLS, _p *XPmaWriter, _piEof *int64) (r0 int32) {
var _rc int32
- if (((_p.X0) == i32(0)) && func() int32 {
- if (_p.X1) != nil {
- return i32(1)
+ if ((_p.XeFWErr == int32(0)) && func() int32 {
+ if _p.XaBuffer != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87524), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaWriterFinishØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87524), unsafe.Pointer(&_vdbePmaWriterFinishØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() != 0) && ((_p.X4) > (_p.X3)) {
- *(*int32)(unsafe.Pointer(&(_p.X0))) = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_p.X6), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X1))+1*uintptr(_p.X3)))), (_p.X4)-(_p.X3), (_p.X5)+int64(_p.X3))
+ }() != 0) && (_p.XiBufEnd > _p.XiBufStart) {
+ _p.XeFWErr = _sqlite3OsWrite(tls, (*Xsqlite3_file)(_p.XpFd), unsafe.Pointer(elem15(_p.XaBuffer, uintptr(_p.XiBufStart))), _p.XiBufEnd-_p.XiBufStart, _p.XiWriteOff+int64(_p.XiBufStart))
}
- *_piEof = (_p.X5) + int64(_p.X4)
- Xsqlite3_free(tls, (unsafe.Pointer)(_p.X1))
- _rc = _p.X0
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(32))
+ *_piEof = _p.XiWriteOff + int64(_p.XiBufEnd)
+ Xsqlite3_free(tls, unsafe.Pointer(_p.XaBuffer))
+ _rc = _p.XeFWErr
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(32))
return _rc
}
var _vdbePmaWriterFinishØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_vdbePmaWriterFinishØ00__func__Ø000[0], str(86696), 20)
+ crt.Xstrncpy(nil, &_vdbePmaWriterFinishØ00__func__Ø000[0], str(84858), 20)
}
var _vdbeSorterFlushPMAØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterFlushPMAØ00__func__Ø000[0], str(86716), 19)
+ crt.Xstrncpy(nil, &_vdbeSorterFlushPMAØ00__func__Ø000[0], str(84878), 19)
}
-// Launch a background thread to run xTask(pIn).
+// C comment
+// /*
+// ** Launch a background thread to run xTask(pIn).
+// */
func _vdbeSorterCreateThread(tls *crt.TLS, _pTask *XSortSubtask, _xTask func(*crt.TLS, unsafe.Pointer) unsafe.Pointer, _pIn unsafe.Pointer) (r0 int32) {
func() {
- if (*XSQLiteThread)(_pTask.X0) != nil || (_pTask.X1) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87148), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterCreateThreadØ00__func__Ø000))), unsafe.Pointer(str(86373)))
+ if (*XSQLiteThread)(_pTask.XpThread) != nil || _pTask.XbDone != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87148), unsafe.Pointer(&_vdbeSorterCreateThreadØ00__func__Ø000), unsafe.Pointer(str(84535)))
crt.X__builtin_abort(tls)
}
}()
- return _sqlite3ThreadCreate(tls, (**XSQLiteThread)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTask.X0))))), _xTask, _pIn)
+ return _sqlite3ThreadCreate(tls, (**XSQLiteThread)(unsafe.Pointer(&_pTask.XpThread)), _xTask, _pIn)
}
var _vdbeSorterCreateThreadØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterCreateThreadØ00__func__Ø000[0], str(86735), 23)
+ crt.Xstrncpy(nil, &_vdbeSorterCreateThreadØ00__func__Ø000[0], str(84897), 23)
}
-// Create a new thread
+// C comment
+// /* Create a new thread */
func _sqlite3ThreadCreate(tls *crt.TLS, _ppThread **XSQLiteThread, _xTask func(*crt.TLS, unsafe.Pointer) unsafe.Pointer, _pIn unsafe.Pointer) (r0 int32) {
var _rc int32
var _p *XSQLiteThread
func() {
if _ppThread == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(26905), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ThreadCreateØ00__func__Ø000))), unsafe.Pointer(str(86758)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(26905), unsafe.Pointer(&_sqlite3ThreadCreateØ00__func__Ø000), unsafe.Pointer(str(84920)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- }{_xTask})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- }{nil})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(26906), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ThreadCreateØ00__func__Ø000))), unsafe.Pointer(str(86770)))
+ if _xTask == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(26906), unsafe.Pointer(&_sqlite3ThreadCreateØ00__func__Ø000), unsafe.Pointer(str(84932)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_sqlite3Config.X1) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(26908), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ThreadCreateØ00__func__Ø000))), unsafe.Pointer(str(86779)))
+ if _sqlite3Config.XbCoreMutex == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(26908), unsafe.Pointer(&_sqlite3ThreadCreateØ00__func__Ø000), unsafe.Pointer(str(84941)))
crt.X__builtin_abort(tls)
}
}()
*_ppThread = nil
- _p = (*XSQLiteThread)(_sqlite3Malloc(tls, uint64(u32(20))))
+ _p = (*XSQLiteThread)(_sqlite3Malloc(tls, uint64(20)))
if _p == nil {
- return _sqlite3NomemError(tls, i32(26912))
+ return _sqlite3NomemError(tls, int32(26912))
}
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(20))
- *(*func(*crt.TLS, unsafe.Pointer) unsafe.Pointer)(unsafe.Pointer(&(_p.X3))) = _xTask
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))) = _pIn
- if _sqlite3FaultSim(tls, i32(200)) != 0 {
- _rc = i32(1)
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(20))
+ _p.XxTask = _xTask
+ _p.XpIn = _pIn
+ if _sqlite3FaultSim(tls, int32(200)) != 0 {
+ _rc = int32(1)
goto _8
}
- _rc = crt.Xpthread_create(tls, (*uint32)(unsafe.Pointer(&(_p.X0))), nil, _xTask, _pIn)
+ _rc = crt.Xpthread_create(tls, &_p.Xtid, nil, _xTask, _pIn)
_8:
if _rc != 0 {
- *(*int32)(unsafe.Pointer(&(_p.X1))) = i32(1)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))) = _xTask(tls, _pIn)
+ _p.Xdone = int32(1)
+ _p.XpOut = _xTask(tls, _pIn)
}
*_ppThread = _p
- return i32(0)
+ return int32(0)
}
var _sqlite3ThreadCreateØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ThreadCreateØ00__func__Ø000[0], str(86813), 20)
+ crt.Xstrncpy(nil, &_sqlite3ThreadCreateØ00__func__Ø000[0], str(84975), 20)
}
-// The main routine for background threads that write level-0 PMAs.
+// C comment
+// /*
+// ** The main routine for background threads that write level-0 PMAs.
+// */
func _vdbeSorterFlushThread(tls *crt.TLS, _pCtx unsafe.Pointer) (r0 unsafe.Pointer) {
var _rc int32
var _pTask *XSortSubtask
_pTask = (*XSortSubtask)(_pCtx)
func() {
- if (_pTask.X1) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87700), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterFlushThreadØ00__func__Ø000))), unsafe.Pointer(str(86833)))
+ if _pTask.XbDone != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87700), unsafe.Pointer(&_vdbeSorterFlushThreadØ00__func__Ø000), unsafe.Pointer(str(84995)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _vdbeSorterListToPMA(tls, _pTask, (*t47)(unsafe.Pointer(&(_pTask.X4))))
- *(*int32)(unsafe.Pointer(&(_pTask.X1))) = i32(1)
- return (unsafe.Pointer)(uintptr(_rc))
+ _rc = _vdbeSorterListToPMA(tls, _pTask, &_pTask.Xlist)
+ _pTask.XbDone = int32(1)
+ return crt.U2P(uintptr(_rc))
}
var _vdbeSorterFlushThreadØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterFlushThreadØ00__func__Ø000[0], str(86849), 22)
+ crt.Xstrncpy(nil, &_vdbeSorterFlushThreadØ00__func__Ø000[0], str(85011), 22)
}
-// This function is called as part of an sqlite3VdbeSorterRewind() operation
-// on a sorter that has written two or more PMAs to temporary files. It sets
-// up either VdbeSorter.pMerger (for single threaded sorters) or pReader
-// (for multi-threaded sorters) so that it can be used to iterate through
-// all records stored in the sorter.
-//
-// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+// C comment
+// /*
+// ** This function is called as part of an sqlite3VdbeSorterRewind() operation
+// ** on a sorter that has written two or more PMAs to temporary files. It sets
+// ** up either VdbeSorter.pMerger (for single threaded sorters) or pReader
+// ** (for multi-threaded sorters) so that it can be used to iterate through
+// ** all records stored in the sorter.
+// **
+// ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+// */
func _vdbeSorterSetupMerge(tls *crt.TLS, _pSorter *XVdbeSorter) (r0 int32) {
var _rc, _i, _3_iTask int32
var _db *Xsqlite3
@@ -65875,62 +65653,62 @@ func _vdbeSorterSetupMerge(tls *crt.TLS, _pSorter *XVdbeSorter) (r0 int32) {
var _pTask0, _3_pLast *XSortSubtask
var _xCompare func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32
var _pMain *XMergeEngine
- _pTask0 = (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17))))) + 60*uintptr(i32(0))))
+ _pTask0 = elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), 0)
_pMain = nil
- _db = (*Xsqlite3)((*XVdbeSorter)(_pTask0.X2).X6)
+ _db = (*Xsqlite3)((*XVdbeSorter)(_pTask0.XpSorter).Xdb)
_xCompare = _vdbeSorterGetCompare(tls, _pSorter)
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= int32(_pSorter.X15) {
+ if _i >= int32(_pSorter.XnTask) {
goto _3
}
- *(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&((*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17))))) + 60*uintptr(_i))).X6))))) = _xCompare
+ *(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&(elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), uintptr(_i)).XxCompare))) = _xCompare
_i += 1
goto _0
_3:
_rc = _vdbeSorterMergeTreeBuild(tls, _pSorter, &_pMain)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _4
}
func() {
- if int32(_pSorter.X13) != i32(0) && int32(_pSorter.X15) <= i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88517), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterSetupMergeØ00__func__Ø000))), unsafe.Pointer(str(86871)))
+ if int32(_pSorter.XbUseThreads) != int32(0) && int32(_pSorter.XnTask) <= int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88517), unsafe.Pointer(&_vdbeSorterSetupMergeØ00__func__Ø000), unsafe.Pointer(str(85033)))
crt.X__builtin_abort(tls)
}
}()
- if (_pSorter.X13) == 0 {
+ if _pSorter.XbUseThreads == 0 {
goto _8
}
_3_pReadr = nil
- _3_pLast = (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17))))) + 60*uintptr(int32(_pSorter.X15)-i32(1))))
+ _3_pLast = elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), uintptr(int32(_pSorter.XnTask)-int32(1)))
_rc = _vdbeSortAllocUnpacked(tls, _3_pLast)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _9
}
- _3_pReadr = (*XPmaReader)(_sqlite3DbMallocZero(tls, _db, uint64(u32(52))))
- *(**XPmaReader)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSorter.X4))))) = _3_pReadr
+ _3_pReadr = (*XPmaReader)(_sqlite3DbMallocZero(tls, _db, uint64(52)))
+ *(**XPmaReader)(unsafe.Pointer(&_pSorter.XpReader)) = _3_pReadr
if _3_pReadr == nil {
- _rc = _sqlite3NomemError(tls, i32(88526))
+ _rc = _sqlite3NomemError(tls, int32(88526))
}
_9:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _11
}
- _rc = _vdbeIncrMergerNew(tls, _3_pLast, _pMain, (**XIncrMerger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_pReadr.X10))))))
- if _rc != i32(0) {
+ _rc = _vdbeIncrMergerNew(tls, _3_pLast, _pMain, (**XIncrMerger)(unsafe.Pointer(&_3_pReadr.XpIncr)))
+ if _rc != int32(0) {
goto _12
}
- _vdbeIncrMergerSetThreads(tls, (*XIncrMerger)(_3_pReadr.X10))
- _3_iTask = i32(0)
+ _vdbeIncrMergerSetThreads(tls, (*XIncrMerger)(_3_pReadr.XpIncr))
+ _3_iTask = int32(0)
_13:
- if _3_iTask >= (int32(_pSorter.X15) - i32(1)) {
+ if _3_iTask >= (int32(_pSorter.XnTask) - int32(1)) {
goto _16
}
- if store55(&_7_pIncr, (*XIncrMerger)((*XPmaReader)(unsafe.Pointer(uintptr(_pMain.X3)+52*uintptr(_3_iTask))).X10)) != nil {
+ if store91(&_7_pIncr, (*XIncrMerger)(elem80((*XPmaReader)(_pMain.XaReadr), uintptr(_3_iTask)).XpIncr)) != nil {
_vdbeIncrMergerSetThreads(tls, _7_pIncr)
func() {
- if (*XSortSubtask)(_7_pIncr.X0) == _3_pLast {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88536), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterSetupMergeØ00__func__Ø000))), unsafe.Pointer(str(86915)))
+ if (*XSortSubtask)(_7_pIncr.XpTask) == _3_pLast {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88536), unsafe.Pointer(&_vdbeSorterSetupMergeØ00__func__Ø000), unsafe.Pointer(str(85077)))
crt.X__builtin_abort(tls)
}
}()
@@ -65938,132 +65716,131 @@ _13:
_3_iTask += 1
goto _13
_16:
- _3_iTask = i32(0)
+ _3_iTask = int32(0)
_20:
- if _rc != i32(0) || _3_iTask >= int32(_pSorter.X15) {
+ if _rc != int32(0) || _3_iTask >= int32(_pSorter.XnTask) {
goto _24
}
- _9_p = (*XPmaReader)(unsafe.Pointer(uintptr(_pMain.X3) + 52*uintptr(_3_iTask)))
+ _9_p = elem80((*XPmaReader)(_pMain.XaReadr), uintptr(_3_iTask))
func() {
- if (*XIncrMerger)(_9_p.X10) != nil && ((*XSortSubtask)((*XIncrMerger)(_9_p.X10).X0) != (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17)))))+60*uintptr(_3_iTask))) || _3_iTask == (int32(_pSorter.X15)-i32(1)) && ((*XIncrMerger)(_9_p.X10).X5) != i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88550), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterSetupMergeØ00__func__Ø000))), unsafe.Pointer(str(86935)))
+ if (*XIncrMerger)(_9_p.XpIncr) != nil && ((*XSortSubtask)((*XIncrMerger)(_9_p.XpIncr).XpTask) != elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), uintptr(_3_iTask)) || _3_iTask == (int32(_pSorter.XnTask)-int32(1)) && ((*XIncrMerger)(_9_p.XpIncr).XbUseThread) != int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88550), unsafe.Pointer(&_vdbeSorterSetupMergeØ00__func__Ø000), unsafe.Pointer(str(85097)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _vdbePmaReaderIncrInit(tls, _9_p, i32(1))
+ _rc = _vdbePmaReaderIncrInit(tls, _9_p, int32(1))
_3_iTask += 1
goto _20
_24:
_12:
_pMain = nil
_11:
- if _rc == i32(0) {
- _rc = _vdbePmaReaderIncrMergeInit(tls, _3_pReadr, i32(2))
+ if _rc == int32(0) {
+ _rc = _vdbePmaReaderIncrMergeInit(tls, _3_pReadr, int32(2))
}
goto _31
_8:
- _rc = _vdbeMergeEngineInit(tls, _pTask0, _pMain, i32(0))
- *(**XMergeEngine)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSorter.X5))))) = _pMain
+ _rc = _vdbeMergeEngineInit(tls, _pTask0, _pMain, int32(0))
+ *(**XMergeEngine)(unsafe.Pointer(&_pSorter.XpMerger)) = _pMain
_pMain = nil
_31:
_4:
- if _rc != i32(0) {
+ if _rc != int32(0) {
_vdbeMergeEngineFree(tls, _pMain)
}
return _rc
}
-// This function is called as part of a SorterRewind() operation on a sorter
-// that has already written two or more level-0 PMAs to one or more temp
-// files. It builds a tree of MergeEngine/IncrMerger/PmaReader objects that
-// can be used to incrementally merge all PMAs on disk.
-//
-// If successful, SQLITE_OK is returned and *ppOut set to point to the
-// MergeEngine object at the root of the tree before returning. Or, if an
-// error occurs, an SQLite error code is returned and the final value
-// of *ppOut is undefined.
+// C comment
+// /*
+// ** This function is called as part of a SorterRewind() operation on a sorter
+// ** that has already written two or more level-0 PMAs to one or more temp
+// ** files. It builds a tree of MergeEngine/IncrMerger/PmaReader objects that
+// ** can be used to incrementally merge all PMAs on disk.
+// **
+// ** If successful, SQLITE_OK is returned and *ppOut set to point to the
+// ** MergeEngine object at the root of the tree before returning. Or, if an
+// ** error occurs, an SQLite error code is returned and the final value
+// ** of *ppOut is undefined.
+// */
func _vdbeSorterMergeTreeBuild(tls *crt.TLS, _pSorter *XVdbeSorter, _ppOut **XMergeEngine) (r0 int32) {
var _rc, _iTask, _3_nDepth, _5_i, _5_iSeq, _6_nReader int32
var _3_iReadOff int64
var _2_pTask *XSortSubtask
var _pMain, _3_pRoot, _6_pMerger *XMergeEngine
_pMain = nil
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (_pSorter.X13) == 0 && int32(_pSorter.X15) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88434), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterMergeTreeBuildØ00__func__Ø000))), unsafe.Pointer(str(87052)))
+ if _pSorter.XbUseThreads == 0 && int32(_pSorter.XnTask) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88434), unsafe.Pointer(&_vdbeSorterMergeTreeBuildØ00__func__Ø000), unsafe.Pointer(str(85214)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pSorter.X15) <= i32(1) {
+ if int32(_pSorter.XnTask) <= int32(1) {
goto _3
}
- _pMain = _vdbeMergeEngineNew(tls, int32(_pSorter.X15))
+ _pMain = _vdbeMergeEngineNew(tls, int32(_pSorter.XnTask))
if _pMain == nil {
- _rc = _sqlite3NomemError(tls, i32(88437))
+ _rc = _sqlite3NomemError(tls, int32(88437))
}
_3:
- _iTask = i32(0)
+ _iTask = int32(0)
_5:
- if _rc != i32(0) || _iTask >= int32(_pSorter.X15) {
+ if _rc != int32(0) || _iTask >= int32(_pSorter.XnTask) {
goto _9
}
- _2_pTask = (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17))))) + 60*uintptr(_iTask)))
+ _2_pTask = elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), uintptr(_iTask))
func() {
- if (_2_pTask.X5) <= i32(0) && i32(1) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88443), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterMergeTreeBuildØ00__func__Ø000))), unsafe.Pointer(str(87094)))
+ if _2_pTask.XnPMA <= int32(0) && int32(1) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88443), unsafe.Pointer(&_vdbeSorterMergeTreeBuildØ00__func__Ø000), unsafe.Pointer(str(85256)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) == 0 && (_2_pTask.X5) == 0 {
+ if int32(0) == 0 && _2_pTask.XnPMA == 0 {
goto _14
}
_3_pRoot = nil
- _3_nDepth = _vdbeSorterTreeDepth(tls, _2_pTask.X5)
- _3_iReadOff = int64(i32(0))
- if (_2_pTask.X5) <= i32(16) {
- _rc = _vdbeMergeEngineLevel0(tls, _2_pTask, _2_pTask.X5, &_3_iReadOff, &_3_pRoot)
+ _3_nDepth = _vdbeSorterTreeDepth(tls, _2_pTask.XnPMA)
+ _3_iReadOff = 0
+ if _2_pTask.XnPMA <= int32(16) {
+ _rc = _vdbeMergeEngineLevel0(tls, _2_pTask, _2_pTask.XnPMA, &_3_iReadOff, &_3_pRoot)
goto _16
}
- _5_iSeq = i32(0)
- _3_pRoot = _vdbeMergeEngineNew(tls, i32(16))
+ _5_iSeq = int32(0)
+ _3_pRoot = _vdbeMergeEngineNew(tls, int32(16))
if _3_pRoot == nil {
- _rc = _sqlite3NomemError(tls, i32(88455))
+ _rc = _sqlite3NomemError(tls, int32(88455))
}
- _5_i = i32(0)
+ _5_i = int32(0)
_18:
- if _5_i >= (_2_pTask.X5) || _rc != i32(0) {
+ if _5_i >= _2_pTask.XnPMA || _rc != int32(0) {
goto _22
}
_6_pMerger = nil
_6_nReader = func() int32 {
- if ((_2_pTask.X5) - _5_i) < i32(16) {
- return ((_2_pTask.X5) - _5_i)
+ if (_2_pTask.XnPMA - _5_i) < int32(16) {
+ return (_2_pTask.XnPMA - _5_i)
}
- return i32(16)
+ return int32(16)
}()
_rc = _vdbeMergeEngineLevel0(tls, _2_pTask, _6_nReader, &_3_iReadOff, &_6_pMerger)
- if _rc == i32(0) {
- _rc = _vdbeSorterAddToTree(tls, _2_pTask, _3_nDepth, postInc1(&_5_iSeq, int32(1)), _3_pRoot, _6_pMerger)
- }
- {
- p := &_5_i
- *p = (*p) + i32(16)
- sink1(*p)
+ if _rc == int32(0) {
+ _rc = _vdbeSorterAddToTree(tls, _2_pTask, _3_nDepth, postInc2(&_5_iSeq, 1), _3_pRoot, _6_pMerger)
}
+ _5_i += int32(16)
goto _18
_22:
_16:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _26
}
if _pMain != nil {
- _rc = _vdbeIncrMergerNew(tls, _2_pTask, _3_pRoot, (**XIncrMerger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPmaReader)(unsafe.Pointer(uintptr(_pMain.X3) + 52*uintptr(_iTask))).X10))))))
+ _rc = _vdbeIncrMergerNew(tls, _2_pTask, _3_pRoot, (**XIncrMerger)(unsafe.Pointer(&(elem80((*XPmaReader)(_pMain.XaReadr), uintptr(_iTask)).XpIncr))))
goto _28
}
func() {
if _pMain != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88475), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeSorterMergeTreeBuildØ00__func__Ø000))), unsafe.Pointer(str(87139)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88475), unsafe.Pointer(&_vdbeSorterMergeTreeBuildØ00__func__Ø000), unsafe.Pointer(str(85301)))
crt.X__builtin_abort(tls)
}
}()
@@ -66077,14 +65854,13 @@ _14:
_iTask += 1
goto _5
_9:
- if _rc != i32(0) {
+ if _rc != int32(0) {
_vdbeMergeEngineFree(tls, _pMain)
_pMain = nil
}
*_ppOut = _pMain
return _rc
- _ = _3_iReadOff
_ = _5_iSeq
panic(0)
}
@@ -66092,45 +65868,44 @@ _9:
var _vdbeSorterMergeTreeBuildØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterMergeTreeBuildØ00__func__Ø000[0], str(87148), 25)
+ crt.Xstrncpy(nil, &_vdbeSorterMergeTreeBuildØ00__func__Ø000[0], str(85310), 25)
}
-// Allocate a new MergeEngine object capable of handling up to
-// nReader PmaReader inputs.
-//
-// nReader is automatically rounded up to the next power of two.
-// nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up.
+// C comment
+// /*
+// ** Allocate a new MergeEngine object capable of handling up to
+// ** nReader PmaReader inputs.
+// **
+// ** nReader is automatically rounded up to the next power of two.
+// ** nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up.
+// */
func _vdbeMergeEngineNew(tls *crt.TLS, _nReader int32) (r0 *XMergeEngine) {
var _N, _nByte int32
var _pNew *XMergeEngine
- _N = i32(2)
+ _N = int32(2)
func() {
- if _nReader > i32(16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87191), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeMergeEngineNewØ00__func__Ø000))), unsafe.Pointer(str(87173)))
+ if _nReader > int32(16) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87191), unsafe.Pointer(&_vdbeMergeEngineNewØ00__func__Ø000), unsafe.Pointer(str(85335)))
crt.X__builtin_abort(tls)
}
}()
_2:
if _N < _nReader {
- {
- p := &_N
- *p = (*p) + _N
- sink1(*p)
- }
+ _N += _N
goto _2
}
- _nByte = int32(u32(16) + (uint32(_N) * u32(56)))
+ _nByte = int32(uint32(16) + (uint32(_N) * uint32(56)))
_pNew = func() *XMergeEngine {
- if _sqlite3FaultSim(tls, i32(100)) != 0 {
+ if _sqlite3FaultSim(tls, int32(100)) != 0 {
return nil
}
return (*XMergeEngine)(_sqlite3MallocZero(tls, uint64(_nByte)))
}()
if _pNew != nil {
- *(*int32)(unsafe.Pointer(&(_pNew.X0))) = _N
- *(**XSortSubtask)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X1))))) = nil
- *(**XPmaReader)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X3))))) = (*XPmaReader)(unsafe.Pointer((*XMergeEngine)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew)) + 16*uintptr(i32(1))))))
- *(**int32)(unsafe.Pointer(&(_pNew.X2))) = (*int32)(unsafe.Pointer((*XPmaReader)(unsafe.Pointer(uintptr(_pNew.X3) + 52*uintptr(_N)))))
+ _pNew.XnTree = _N
+ *(**XSortSubtask)(unsafe.Pointer(&_pNew.XpTask)) = nil
+ *(**XPmaReader)(unsafe.Pointer(&_pNew.XaReadr)) = (*XPmaReader)(unsafe.Pointer(elem92(_pNew, uintptr(1))))
+ _pNew.XaTree = (*int32)(unsafe.Pointer(elem80((*XPmaReader)(_pNew.XaReadr), uintptr(_N))))
}
return _pNew
}
@@ -66138,121 +65913,126 @@ _2:
var _vdbeMergeEngineNewØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeMergeEngineNewØ00__func__Ø000[0], str(87205), 19)
+ crt.Xstrncpy(nil, &_vdbeMergeEngineNewØ00__func__Ø000[0], str(85367), 19)
}
-// Return the depth of a tree comprising nPMA PMAs, assuming a fanout of
-// SORTER_MAX_MERGE_COUNT. The returned value does not include leaf nodes.
-//
-// i.e.
-//
-// nPMA<=16 -> TreeDepth() == 0
-// nPMA<=256 -> TreeDepth() == 1
-// nPMA<=65536 -> TreeDepth() == 2
+// C comment
+// /*
+// ** Return the depth of a tree comprising nPMA PMAs, assuming a fanout of
+// ** SORTER_MAX_MERGE_COUNT. The returned value does not include leaf nodes.
+// **
+// ** i.e.
+// **
+// ** nPMA<=16 -> TreeDepth() == 0
+// ** nPMA<=256 -> TreeDepth() == 1
+// ** nPMA<=65536 -> TreeDepth() == 2
+// */
func _vdbeSorterTreeDepth(tls *crt.TLS, _nPMA int32) (r0 int32) {
var _nDepth int32
var _nDiv int64
- _nDepth = i32(0)
- _nDiv = i64(16)
+ _nDepth = int32(0)
+ _nDiv = int64(16)
_0:
if _nDiv < int64(_nPMA) {
- _nDiv = _nDiv * int64(i32(16))
+ _nDiv = _nDiv * int64(16)
_nDepth += 1
goto _0
}
return _nDepth
}
-// Allocate a new MergeEngine object to merge the contents of nPMA level-0
-// PMAs from pTask->file. If no error occurs, set *ppOut to point to
-// the new object and return SQLITE_OK. Or, if an error does occur, set *ppOut
-// to NULL and return an SQLite error code.
-//
-// When this function is called, *piOffset is set to the offset of the
-// first PMA to read from pTask->file. Assuming no error occurs, it is
-// set to the offset immediately following the last byte of the last
-// PMA before returning. If an error does occur, then the final value of
-// *piOffset is undefined.
+// C comment
+// /*
+// ** Allocate a new MergeEngine object to merge the contents of nPMA level-0
+// ** PMAs from pTask->file. If no error occurs, set *ppOut to point to
+// ** the new object and return SQLITE_OK. Or, if an error does occur, set *ppOut
+// ** to NULL and return an SQLite error code.
+// **
+// ** When this function is called, *piOffset is set to the offset of the
+// ** first PMA to read from pTask->file. Assuming no error occurs, it is
+// ** set to the offset immediately following the last byte of the last
+// ** PMA before returning. If an error does occur, then the final value of
+// ** *piOffset is undefined.
+// */
func _vdbeMergeEngineLevel0(tls *crt.TLS, _pTask *XSortSubtask, _nPMA int32, _piOffset *int64, _ppOut **XMergeEngine) (r0 int32) {
var _i, _rc int32
var _iOff, _1_nDummy int64
var _1_pReadr *XPmaReader
var _pNew *XMergeEngine
_iOff = *_piOffset
- _rc = i32(0)
- *_ppOut = store56(&_pNew, _vdbeMergeEngineNew(tls, _nPMA))
+ _rc = int32(0)
+ *_ppOut = store92(&_pNew, _vdbeMergeEngineNew(tls, _nPMA))
if _pNew == nil {
- _rc = _sqlite3NomemError(tls, i32(88321))
+ _rc = _sqlite3NomemError(tls, int32(88321))
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= _nPMA || _rc != i32(0) {
+ if _i >= _nPMA || _rc != int32(0) {
goto _5
}
- _1_nDummy = int64(i32(0))
- _1_pReadr = (*XPmaReader)(unsafe.Pointer(uintptr(_pNew.X3) + 52*uintptr(_i)))
- _rc = _vdbePmaReaderInit(tls, _pTask, (*XSorterFile)(unsafe.Pointer(&(_pTask.X7))), _iOff, _1_pReadr, &_1_nDummy)
- _iOff = _1_pReadr.X1
+ _1_nDummy = 0
+ _1_pReadr = elem80((*XPmaReader)(_pNew.XaReadr), uintptr(_i))
+ _rc = _vdbePmaReaderInit(tls, _pTask, &_pTask.Xfile, _iOff, _1_pReadr, &_1_nDummy)
+ _iOff = _1_pReadr.XiEof
_i += 1
goto _1
_5:
- if _rc != i32(0) {
+ if _rc != int32(0) {
_vdbeMergeEngineFree(tls, _pNew)
*_ppOut = nil
}
*_piOffset = _iOff
return _rc
-
- _ = _1_nDummy
- panic(0)
}
-// Initialize PmaReader pReadr to scan through the PMA stored in file pFile
-// starting at offset iStart and ending at offset iEof-1. This function
-// leaves the PmaReader pointing to the first key in the PMA (or EOF if the
-// PMA is empty).
-//
-// If the pnByte parameter is NULL, then it is assumed that the file
-// contains a single PMA, and that that PMA omits the initial length varint.
+// C comment
+// /*
+// ** Initialize PmaReader pReadr to scan through the PMA stored in file pFile
+// ** starting at offset iStart and ending at offset iEof-1. This function
+// ** leaves the PmaReader pointing to the first key in the PMA (or EOF if the
+// ** PMA is empty).
+// **
+// ** If the pnByte parameter is NULL, then it is assumed that the file
+// ** contains a single PMA, and that that PMA omits the initial length varint.
+// */
func _vdbePmaReaderInit(tls *crt.TLS, _pTask *XSortSubtask, _pFile *XSorterFile, _iStart int64, _pReadr *XPmaReader, _pnByte *int64) (r0 int32) {
var _rc int32
var _1_nByte uint64
func() {
- if (_pFile.X1) <= _iStart {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86747), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReaderInitØ00__func__Ø000))), unsafe.Pointer(str(87224)))
+ if _pFile.XiEof <= _iStart {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86747), unsafe.Pointer(&_vdbePmaReaderInitØ00__func__Ø000), unsafe.Pointer(str(85386)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pReadr.X5) != nil || (_pReadr.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86748), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReaderInitØ00__func__Ø000))), unsafe.Pointer(str(87243)))
+ if _pReadr.XaAlloc != nil || _pReadr.XnAlloc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86748), unsafe.Pointer(&_vdbePmaReaderInitØ00__func__Ø000), unsafe.Pointer(str(85405)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pReadr.X7) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86749), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReaderInitØ00__func__Ø000))), unsafe.Pointer(str(87282)))
+ if _pReadr.XaBuffer != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86749), unsafe.Pointer(&_vdbePmaReaderInitØ00__func__Ø000), unsafe.Pointer(str(85444)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pReadr.X9) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86750), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReaderInitØ00__func__Ø000))), unsafe.Pointer(str(87301)))
+ if _pReadr.XaMap != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86750), unsafe.Pointer(&_vdbePmaReaderInitØ00__func__Ø000), unsafe.Pointer(str(85463)))
crt.X__builtin_abort(tls)
}
}()
_rc = _vdbePmaReaderSeek(tls, _pTask, _pReadr, _pFile, _iStart)
- if _rc == i32(0) {
- _1_nByte = u64(0)
+ if _rc == int32(0) {
+ _1_nByte = uint64(0)
_rc = _vdbePmaReadVarint(tls, _pReadr, &_1_nByte)
- *(*int64)(unsafe.Pointer(&(_pReadr.X1))) = int64(uint64(_pReadr.X0) + _1_nByte)
+ _pReadr.XiEof = int64(uint64(_pReadr.XiReadOff) + _1_nByte)
{
p := _pnByte
*p = int64(uint64(*p) + _1_nByte)
- sink6(*p)
}
}
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _vdbePmaReaderNext(tls, _pReadr)
}
return _rc
@@ -66261,54 +66041,57 @@ func _vdbePmaReaderInit(tls *crt.TLS, _pTask *XSortSubtask, _pFile *XSorterFile,
var _vdbePmaReaderInitØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_vdbePmaReaderInitØ00__func__Ø000[0], str(87317), 18)
+ crt.Xstrncpy(nil, &_vdbePmaReaderInitØ00__func__Ø000[0], str(85479), 18)
}
-// Attach PmaReader pReadr to file pFile (if it is not already attached to
-// that file) and seek it to offset iOff within the file. Return SQLITE_OK
-// if successful, or an SQLite error code if an error occurs.
+// C comment
+// /*
+// ** Attach PmaReader pReadr to file pFile (if it is not already attached to
+// ** that file) and seek it to offset iOff within the file. Return SQLITE_OK
+// ** if successful, or an SQLite error code if an error occurs.
+// */
func _vdbePmaReaderSeek(tls *crt.TLS, _pTask *XSortSubtask, _pReadr *XPmaReader, _pFile *XSorterFile, _iOff int64) (r0 int32) {
var _rc, _2_pgsz, _2_iBuf, _4_nRead int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (*XIncrMerger)(_pReadr.X10) != nil && ((*XIncrMerger)(_pReadr.X10).X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86652), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReaderSeekØ00__func__Ø000))), unsafe.Pointer(str(87335)))
+ if (*XIncrMerger)(_pReadr.XpIncr) != nil && ((*XIncrMerger)(_pReadr.XpIncr).XbEof) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86652), unsafe.Pointer(&_vdbePmaReaderSeekØ00__func__Ø000), unsafe.Pointer(str(85497)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3FaultSim(tls, i32(201)) != 0 {
- return i32(266)
+ if _sqlite3FaultSim(tls, int32(201)) != 0 {
+ return int32(266)
}
- if (_pReadr.X9) != nil {
- _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pReadr.X4), int64(i32(0)), (unsafe.Pointer)(_pReadr.X9))
- *(**uint8)(unsafe.Pointer(&(_pReadr.X9))) = nil
+ if _pReadr.XaMap != nil {
+ _sqlite3OsUnfetch(tls, (*Xsqlite3_file)(_pReadr.XpFd), 0, unsafe.Pointer(_pReadr.XaMap))
+ _pReadr.XaMap = nil
}
- *(*int64)(unsafe.Pointer(&(_pReadr.X0))) = _iOff
- *(*int64)(unsafe.Pointer(&(_pReadr.X1))) = _pFile.X1
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pReadr.X4))))) = (*Xsqlite3_file)(_pFile.X0)
- _rc = _vdbeSorterMapFile(tls, _pTask, _pFile, (**uint8)(unsafe.Pointer(&(_pReadr.X9))))
- if _rc != i32(0) || (_pReadr.X9) != nil {
+ _pReadr.XiReadOff = _iOff
+ _pReadr.XiEof = _pFile.XiEof
+ *(**Xsqlite3_file)(unsafe.Pointer(&_pReadr.XpFd)) = (*Xsqlite3_file)(_pFile.XpFd)
+ _rc = _vdbeSorterMapFile(tls, _pTask, _pFile, &_pReadr.XaMap)
+ if _rc != int32(0) || _pReadr.XaMap != nil {
goto _6
}
- _2_pgsz = (*XVdbeSorter)(_pTask.X2).X3
- _2_iBuf = int32((_pReadr.X0) % int64(_2_pgsz))
- if (_pReadr.X7) != nil {
+ _2_pgsz = (*XVdbeSorter)(_pTask.XpSorter).Xpgsz
+ _2_iBuf = int32(_pReadr.XiReadOff % int64(_2_pgsz))
+ if _pReadr.XaBuffer != nil {
goto _7
}
- *(**uint8)(unsafe.Pointer(&(_pReadr.X7))) = (*uint8)(_sqlite3Malloc(tls, uint64(_2_pgsz)))
- if (_pReadr.X7) == nil {
- _rc = _sqlite3NomemError(tls, i32(86669))
+ _pReadr.XaBuffer = (*uint8)(_sqlite3Malloc(tls, uint64(_2_pgsz)))
+ if _pReadr.XaBuffer == nil {
+ _rc = _sqlite3NomemError(tls, int32(86669))
}
- *(*int32)(unsafe.Pointer(&(_pReadr.X8))) = _2_pgsz
+ _pReadr.XnBuffer = _2_pgsz
_7:
- if _rc != i32(0) || _2_iBuf == 0 {
+ if _rc != int32(0) || _2_iBuf == 0 {
goto _10
}
_4_nRead = _2_pgsz - _2_iBuf
- if ((_pReadr.X0) + int64(_4_nRead)) > (_pReadr.X1) {
- _4_nRead = int32((_pReadr.X1) - (_pReadr.X0))
+ if (_pReadr.XiReadOff + int64(_4_nRead)) > _pReadr.XiEof {
+ _4_nRead = int32(_pReadr.XiEof - _pReadr.XiReadOff)
}
- _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pReadr.X4), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pReadr.X7))+1*uintptr(_2_iBuf)))), _4_nRead, _pReadr.X0)
+ _rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_pReadr.XpFd), unsafe.Pointer(elem15(_pReadr.XaBuffer, uintptr(_2_iBuf))), _4_nRead, _pReadr.XiReadOff)
_10:
_6:
return _rc
@@ -66317,221 +66100,209 @@ _6:
var _vdbePmaReaderSeekØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_vdbePmaReaderSeekØ00__func__Ø000[0], str(87378), 18)
+ crt.Xstrncpy(nil, &_vdbePmaReaderSeekØ00__func__Ø000[0], str(85540), 18)
}
-// Attempt to memory map file pFile. If successful, set *pp to point to the
-// new mapping and return SQLITE_OK. If the mapping is not attempted
-// (because the file is too large or the VFS layer is configured not to use
-// mmap), return SQLITE_OK and set *pp to NULL.
-//
-// Or, if an error occurs, return an SQLite error code. The final value of
-// *pp is undefined in this case.
+// C comment
+// /*
+// ** Attempt to memory map file pFile. If successful, set *pp to point to the
+// ** new mapping and return SQLITE_OK. If the mapping is not attempted
+// ** (because the file is too large or the VFS layer is configured not to use
+// ** mmap), return SQLITE_OK and set *pp to NULL.
+// **
+// ** Or, if an error occurs, return an SQLite error code. The final value of
+// ** *pp is undefined in this case.
+// */
func _vdbeSorterMapFile(tls *crt.TLS, _pTask *XSortSubtask, _pFile *XSorterFile, _pp **uint8) (r0 int32) {
var _rc int32
var _1_pFd *Xsqlite3_file
- _rc = i32(0)
- if (_pFile.X1) > int64((*Xsqlite3)((*XVdbeSorter)(_pTask.X2).X6).X32) {
+ _rc = int32(0)
+ if _pFile.XiEof > int64((*Xsqlite3)((*XVdbeSorter)(_pTask.XpSorter).Xdb).XnMaxSorterMmap) {
goto _0
}
- _1_pFd = (*Xsqlite3_file)(_pFile.X0)
- if ((*Xsqlite3_io_methods)(_1_pFd.X0).X0) >= i32(3) {
- _rc = _sqlite3OsFetch(tls, _1_pFd, int64(i32(0)), int32(_pFile.X1), (*unsafe.Pointer)(unsafe.Pointer(_pp)))
+ _1_pFd = (*Xsqlite3_file)(_pFile.XpFd)
+ if ((*Xsqlite3_io_methods)(_1_pFd.XpMethods).XiVersion) >= int32(3) {
+ _rc = _sqlite3OsFetch(tls, _1_pFd, 0, int32(_pFile.XiEof), (*unsafe.Pointer)(unsafe.Pointer(_pp)))
}
_0:
return _rc
}
-// Read a varint from the stream of data accessed by p. Set *pnOut to
-// the value read.
+// C comment
+// /*
+// ** Read a varint from the stream of data accessed by p. Set *pnOut to
+// ** the value read.
+// */
func _vdbePmaReadVarint(tls *crt.TLS, _p *XPmaReader, _pnOut *uint64) (r0 int32) {
var _iBuf, _4_i, _4_rc int32
var _4_a *uint8
var _4_aVarint [16]uint8
- if (_p.X9) != nil {
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + int64(_sqlite3GetVarint(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X9))+1*uintptr(_p.X0))), _pnOut))
- sink6(*p)
- }
+ if _p.XaMap != nil {
+ _p.XiReadOff += int64(_sqlite3GetVarint(tls, elem15(_p.XaMap, uintptr(_p.XiReadOff)), _pnOut))
goto _1
}
- _iBuf = int32((_p.X0) % int64(_p.X8))
- if _iBuf != 0 && (((_p.X8) - _iBuf) >= i32(9)) {
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + int64(_sqlite3GetVarint(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X7))+1*uintptr(_iBuf))), _pnOut))
- sink6(*p)
- }
+ _iBuf = int32(_p.XiReadOff % int64(_p.XnBuffer))
+ if _iBuf != 0 && ((_p.XnBuffer - _iBuf) >= int32(9)) {
+ _p.XiReadOff += int64(_sqlite3GetVarint(tls, elem15(_p.XaBuffer, uintptr(_iBuf)), _pnOut))
goto _4
}
- _4_i = i32(0)
+ _4_i = int32(0)
_5:
- _4_rc = _vdbePmaReadBlob(tls, _p, i32(1), &_4_a)
+ _4_rc = _vdbePmaReadBlob(tls, _p, int32(1), &_4_a)
if _4_rc != 0 {
return _4_rc
}
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_4_aVarint)) + 1*uintptr(postInc1(&_4_i, int32(1))&i32(15)))) = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_4_a)) + 1*uintptr(i32(0))))
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_4_a)) + 1*uintptr(i32(0))))) & i32(128)) != i32(0) {
+ *elem15((*uint8)(unsafe.Pointer(&_4_aVarint)), uintptr(postInc2(&_4_i, 1)&int32(15))) = *elem15(_4_a, 0)
+ if (int32(*elem15(_4_a, 0)) & int32(128)) != int32(0) {
goto _5
}
_sqlite3GetVarint(tls, (*uint8)(unsafe.Pointer(&_4_aVarint)), _pnOut)
_4:
_1:
- return i32(0)
+ return int32(0)
_ = _4_aVarint
_ = _4_i
panic(0)
}
-// Read the next nByte bytes of data from the PMA p.
-// If successful, set *ppOut to point to a buffer containing the data
-// and return SQLITE_OK. Otherwise, if an error occurs, return an SQLite
-// error code.
-//
-// The buffer returned in *ppOut is only valid until the
-// next call to this function.
+// C comment
+// /*
+// ** Read the next nByte bytes of data from the PMA p.
+// ** If successful, set *ppOut to point to a buffer containing the data
+// ** and return SQLITE_OK. Otherwise, if an error occurs, return an SQLite
+// ** error code.
+// **
+// ** The buffer returned in *ppOut is only valid until the
+// ** next call to this function.
+// */
func _vdbePmaReadBlob(tls *crt.TLS, _p *XPmaReader, _nByte int32, _ppOut **uint8) (r0 int32) {
var _iBuf, _nAvail, _2_nRead, _2_rc, _6_nRem, _7_nNew, _8_rc, _8_nCopy int32
var _7_aNew, _8_aNext *uint8
- if (_p.X9) != nil {
- *_ppOut = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X9)) + 1*uintptr(_p.X0)))
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + int64(_nByte)
- sink6(*p)
- }
- return i32(0)
+ if _p.XaMap != nil {
+ *_ppOut = elem15(_p.XaMap, uintptr(_p.XiReadOff))
+ _p.XiReadOff += int64(_nByte)
+ return int32(0)
}
func() {
- if (_p.X7) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86514), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReadBlobØ00__func__Ø000))), unsafe.Pointer(str(87396)))
+ if _p.XaBuffer == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86514), unsafe.Pointer(&_vdbePmaReadBlobØ00__func__Ø000), unsafe.Pointer(str(85558)))
crt.X__builtin_abort(tls)
}
}()
- _iBuf = int32((_p.X0) % int64(_p.X8))
- if _iBuf != i32(0) {
+ _iBuf = int32(_p.XiReadOff % int64(_p.XnBuffer))
+ if _iBuf != int32(0) {
goto _3
}
- if ((_p.X1) - (_p.X0)) > int64(_p.X8) {
- _2_nRead = _p.X8
+ if (_p.XiEof - _p.XiReadOff) > int64(_p.XnBuffer) {
+ _2_nRead = _p.XnBuffer
goto _5
}
- _2_nRead = int32((_p.X1) - (_p.X0))
+ _2_nRead = int32(_p.XiEof - _p.XiReadOff)
_5:
func() {
- if _2_nRead <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86530), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReadBlobØ00__func__Ø000))), unsafe.Pointer(str(87407)))
+ if _2_nRead <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86530), unsafe.Pointer(&_vdbePmaReadBlobØ00__func__Ø000), unsafe.Pointer(str(85569)))
crt.X__builtin_abort(tls)
}
}()
- _2_rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_p.X4), (unsafe.Pointer)(_p.X7), _2_nRead, _p.X0)
+ _2_rc = _sqlite3OsRead(tls, (*Xsqlite3_file)(_p.XpFd), unsafe.Pointer(_p.XaBuffer), _2_nRead, _p.XiReadOff)
func() {
- if _2_rc == i32(522) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86534), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReadBlobØ00__func__Ø000))), unsafe.Pointer(str(87415)))
+ if _2_rc == int32(522) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86534), unsafe.Pointer(&_vdbePmaReadBlobØ00__func__Ø000), unsafe.Pointer(str(85577)))
crt.X__builtin_abort(tls)
}
}()
- if _2_rc != i32(0) {
+ if _2_rc != int32(0) {
return _2_rc
}
_3:
- _nAvail = (_p.X8) - _iBuf
+ _nAvail = _p.XnBuffer - _iBuf
if _nByte <= _nAvail {
- *_ppOut = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X7)) + 1*uintptr(_iBuf)))
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + int64(_nByte)
- sink6(*p)
- }
+ *_ppOut = elem15(_p.XaBuffer, uintptr(_iBuf))
+ _p.XiReadOff += int64(_nByte)
goto _12
}
- if (_p.X2) >= _nByte {
+ if _p.XnAlloc >= _nByte {
goto _13
}
_7_nNew = func() int32 {
- if i32(128) > ((_p.X2) * i32(2)) {
- return i32(128)
+ if int32(128) > (_p.XnAlloc * int32(2)) {
+ return int32(128)
}
- return ((_p.X2) * i32(2))
+ return (_p.XnAlloc * int32(2))
}()
_16:
if _nByte > _7_nNew {
- _7_nNew = _7_nNew * i32(2)
+ _7_nNew = _7_nNew * int32(2)
goto _16
}
- _7_aNew = (*uint8)(_sqlite3Realloc(tls, (unsafe.Pointer)(_p.X5), uint64(_7_nNew)))
+ _7_aNew = (*uint8)(_sqlite3Realloc(tls, unsafe.Pointer(_p.XaAlloc), uint64(_7_nNew)))
if _7_aNew == nil {
- return _sqlite3NomemError(tls, i32(86557))
+ return _sqlite3NomemError(tls, int32(86557))
}
- *(*int32)(unsafe.Pointer(&(_p.X2))) = _7_nNew
- *(**uint8)(unsafe.Pointer(&(_p.X5))) = _7_aNew
+ _p.XnAlloc = _7_nNew
+ _p.XaAlloc = _7_aNew
_13:
- crt.Xmemcpy(tls, (unsafe.Pointer)(_p.X5), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X7))+1*uintptr(_iBuf)))), uint32(_nAvail))
- {
- p := (*int64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + int64(_nAvail)
- sink6(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer(_p.XaAlloc), unsafe.Pointer(elem15(_p.XaBuffer, uintptr(_iBuf))), uint32(_nAvail))
+ _p.XiReadOff += int64(_nAvail)
_6_nRem = _nByte - _nAvail
_19:
- if _6_nRem <= i32(0) {
+ if _6_nRem <= int32(0) {
goto _20
}
_8_nCopy = _6_nRem
- if _6_nRem > (_p.X8) {
- _8_nCopy = _p.X8
+ if _6_nRem > _p.XnBuffer {
+ _8_nCopy = _p.XnBuffer
}
_8_rc = _vdbePmaReadBlob(tls, _p, _8_nCopy, &_8_aNext)
- if _8_rc != i32(0) {
+ if _8_rc != int32(0) {
return _8_rc
}
func() {
- if _8_aNext == (_p.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86579), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReadBlobØ00__func__Ø000))), unsafe.Pointer(str(87443)))
+ if _8_aNext == _p.XaAlloc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86579), unsafe.Pointer(&_vdbePmaReadBlobØ00__func__Ø000), unsafe.Pointer(str(85605)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X5))+1*uintptr(_nByte-_6_nRem)))), (unsafe.Pointer)(_8_aNext), uint32(_8_nCopy))
- {
- p := &_6_nRem
- *p = (*p) - _8_nCopy
- sink1(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_p.XaAlloc, uintptr(_nByte-_6_nRem))), unsafe.Pointer(_8_aNext), uint32(_8_nCopy))
+ _6_nRem -= _8_nCopy
goto _19
_20:
- *_ppOut = _p.X5
+ *_ppOut = _p.XaAlloc
_12:
- return i32(0)
+ return int32(0)
}
var _vdbePmaReadBlobØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_vdbePmaReadBlobØ00__func__Ø000[0], str(87460), 16)
+ crt.Xstrncpy(nil, &_vdbePmaReadBlobØ00__func__Ø000[0], str(85622), 16)
}
-// Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if
-// no error occurs, or an SQLite error code if one does.
+// C comment
+// /*
+// ** Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if
+// ** no error occurs, or an SQLite error code if one does.
+// */
func _vdbePmaReaderNext(tls *crt.TLS, _pReadr *XPmaReader) (r0 int32) {
var _rc, _1_bEof int32
var _nRec uint64
var _1_pIncr *XIncrMerger
- _rc = i32(0)
- _nRec = u64(0)
- if (_pReadr.X0) < (_pReadr.X1) {
+ _rc = int32(0)
+ _nRec = uint64(0)
+ if _pReadr.XiReadOff < _pReadr.XiEof {
goto _0
}
- _1_pIncr = (*XIncrMerger)(_pReadr.X10)
- _1_bEof = i32(1)
+ _1_pIncr = (*XIncrMerger)(_pReadr.XpIncr)
+ _1_bEof = int32(1)
if _1_pIncr == nil {
goto _1
}
_rc = _vdbeIncrSwap(tls, _1_pIncr)
- if (_rc == i32(0)) && ((_1_pIncr.X4) == i32(0)) {
- _rc = _vdbePmaReaderSeek(tls, (*XSortSubtask)(_1_pIncr.X0), _pReadr, (*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_1_pIncr.X6)))))+12*uintptr(i32(0)))), _1_pIncr.X2)
- _1_bEof = i32(0)
+ if (_rc == int32(0)) && (_1_pIncr.XbEof == int32(0)) {
+ _rc = _vdbePmaReaderSeek(tls, (*XSortSubtask)(_1_pIncr.XpTask), _pReadr, elem79((*XSorterFile)(unsafe.Pointer(&_1_pIncr.XaFile)), 0), _1_pIncr.XiStartOff)
+ _1_bEof = int32(0)
}
_1:
if _1_bEof != 0 {
@@ -66539,49 +66310,52 @@ _1:
return _rc
}
_0:
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _vdbePmaReadVarint(tls, _pReadr, &_nRec)
}
- if _rc == i32(0) {
- *(*int32)(unsafe.Pointer(&(_pReadr.X3))) = int32(_nRec)
- _rc = _vdbePmaReadBlob(tls, _pReadr, int32(_nRec), (**uint8)(unsafe.Pointer(&(_pReadr.X6))))
+ if _rc == int32(0) {
+ _pReadr.XnKey = int32(_nRec)
+ _rc = _vdbePmaReadBlob(tls, _pReadr, int32(_nRec), &_pReadr.XaKey)
}
return _rc
}
-// This function is called when the PmaReader corresponding to pIncr has
-// finished reading the contents of aFile[0]. Its purpose is to "refill"
-// aFile[0] such that the PmaReader should start rereading it from the
-// beginning.
-//
-// For single-threaded objects, this is accomplished by literally reading
-// keys from pIncr->pMerger and repopulating aFile[0].
-//
-// For multi-threaded objects, all that is required is to wait until the
-// background thread is finished (if it is not already) and then swap
-// aFile[0] and aFile[1] in place. If the contents of pMerger have not
-// been exhausted, this function also launches a new background thread
-// to populate the new aFile[1].
-//
-// SQLITE_OK is returned on success, or an SQLite error code otherwise.
+// C comment
+// /*
+// ** This function is called when the PmaReader corresponding to pIncr has
+// ** finished reading the contents of aFile[0]. Its purpose is to "refill"
+// ** aFile[0] such that the PmaReader should start rereading it from the
+// ** beginning.
+// **
+// ** For single-threaded objects, this is accomplished by literally reading
+// ** keys from pIncr->pMerger and repopulating aFile[0].
+// **
+// ** For multi-threaded objects, all that is required is to wait until the
+// ** background thread is finished (if it is not already) and then swap
+// ** aFile[0] and aFile[1] in place. If the contents of pMerger have not
+// ** been exhausted, this function also launches a new background thread
+// ** to populate the new aFile[1].
+// **
+// ** SQLITE_OK is returned on success, or an SQLite error code otherwise.
+// */
func _vdbeIncrSwap(tls *crt.TLS, _pIncr *XIncrMerger) (r0 int32) {
var _rc int32
var _2_f0 XSorterFile
- _rc = i32(0)
- if (_pIncr.X5) == 0 {
+ _rc = int32(0)
+ if _pIncr.XbUseThread == 0 {
goto _0
}
- _rc = _vdbeSorterJoinThread(tls, (*XSortSubtask)(_pIncr.X0))
- if _rc == i32(0) {
- _2_f0 = *(*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(0))))
- *(*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(0)))) = *(*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(1))))
- *(*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(1)))) = _2_f0
+ _rc = _vdbeSorterJoinThread(tls, (*XSortSubtask)(_pIncr.XpTask))
+ if _rc == int32(0) {
+ _2_f0 = *elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), 0)
+ *elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), 0) = *elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), uintptr(1))
+ *elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), uintptr(1)) = _2_f0
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _2
}
- if ((*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(0)))).X1) == (_pIncr.X2) {
- *(*int32)(unsafe.Pointer(&(_pIncr.X4))) = i32(1)
+ if (elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), 0).XiEof) == _pIncr.XiStartOff {
+ _pIncr.XbEof = int32(1)
goto _4
}
_rc = _vdbeIncrBgPopulate(tls, _pIncr)
@@ -66590,47 +66364,56 @@ _2:
goto _5
_0:
_rc = _vdbeIncrPopulate(tls, _pIncr)
- *(*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(0)))) = *(*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(1))))
- if ((*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(0)))).X1) == (_pIncr.X2) {
- *(*int32)(unsafe.Pointer(&(_pIncr.X4))) = i32(1)
+ *elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), 0) = *elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), uintptr(1))
+ if (elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), 0).XiEof) == _pIncr.XiStartOff {
+ _pIncr.XbEof = int32(1)
}
_5:
return _rc
}
-// Launch a background thread to populate aFile[1] of pIncr.
+// C comment
+// /*
+// ** Launch a background thread to populate aFile[1] of pIncr.
+// */
func _vdbeIncrBgPopulate(tls *crt.TLS, _pIncr *XIncrMerger) (r0 int32) {
var _p unsafe.Pointer
- _p = (unsafe.Pointer)(_pIncr)
+ _p = unsafe.Pointer(_pIncr)
func() {
- if (_pIncr.X5) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87940), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeIncrBgPopulateØ00__func__Ø000))), unsafe.Pointer(str(87476)))
+ if _pIncr.XbUseThread == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87940), unsafe.Pointer(&_vdbeIncrBgPopulateØ00__func__Ø000), unsafe.Pointer(str(85638)))
crt.X__builtin_abort(tls)
}
}()
- return _vdbeSorterCreateThread(tls, (*XSortSubtask)(_pIncr.X0), _vdbeIncrPopulateThread, _p)
+ return _vdbeSorterCreateThread(tls, (*XSortSubtask)(_pIncr.XpTask), _vdbeIncrPopulateThread, _p)
}
var _vdbeIncrBgPopulateØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeIncrBgPopulateØ00__func__Ø000[0], str(87494), 19)
+ crt.Xstrncpy(nil, &_vdbeIncrBgPopulateØ00__func__Ø000[0], str(85656), 19)
}
-// The main routine for background threads that populate aFile[1] of
-// multi-threaded IncrMerger objects.
+// C comment
+// /*
+// ** The main routine for background threads that populate aFile[1] of
+// ** multi-threaded IncrMerger objects.
+// */
func _vdbeIncrPopulateThread(tls *crt.TLS, _pCtx unsafe.Pointer) (r0 unsafe.Pointer) {
var _pRet unsafe.Pointer
var _pIncr *XIncrMerger
_pIncr = (*XIncrMerger)(_pCtx)
- _pRet = (unsafe.Pointer)(uintptr(_vdbeIncrPopulate(tls, _pIncr)))
- *(*int32)(unsafe.Pointer(&((*XSortSubtask)(_pIncr.X0).X1))) = i32(1)
+ _pRet = crt.U2P(uintptr(_vdbeIncrPopulate(tls, _pIncr)))
+ (*XSortSubtask)(_pIncr.XpTask).XbDone = int32(1)
return _pRet
}
-// Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format
-// of the data stored in aFile[1] is the same as that used by regular PMAs,
-// except that the number-of-bytes varint is omitted from the start.
+// C comment
+// /*
+// ** Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format
+// ** of the data stored in aFile[1] is the same as that used by regular PMAs,
+// ** except that the number-of-bytes varint is omitted from the start.
+// */
func _vdbeIncrPopulate(tls *crt.TLS, _pIncr *XIncrMerger) (r0 int32) {
var _rc, _rc2, _1_dummy, _1_nKey int32
var _iStart, _1_iEof int64
@@ -66639,173 +66422,173 @@ func _vdbeIncrPopulate(tls *crt.TLS, _pIncr *XIncrMerger) (r0 int32) {
var _pOut *XSorterFile
var _pMerger *XMergeEngine
var _writer XPmaWriter
- _rc = i32(0)
- _iStart = _pIncr.X2
- _pOut = (*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(1))))
- _pTask = (*XSortSubtask)(_pIncr.X0)
- _pMerger = (*XMergeEngine)(_pIncr.X1)
+ _rc = int32(0)
+ _iStart = _pIncr.XiStartOff
+ _pOut = elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), uintptr(1))
+ _pTask = (*XSortSubtask)(_pIncr.XpTask)
+ _pMerger = (*XMergeEngine)(_pIncr.XpMerger)
func() {
- if (_pIncr.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87894), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeIncrPopulateØ00__func__Ø000))), unsafe.Pointer(str(87513)))
+ if _pIncr.XbEof != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87894), unsafe.Pointer(&_vdbeIncrPopulateØ00__func__Ø000), unsafe.Pointer(str(85675)))
crt.X__builtin_abort(tls)
}
}()
- _vdbePmaWriterInit(tls, (*Xsqlite3_file)(_pOut.X0), &_writer, (*XVdbeSorter)(_pTask.X2).X3, _iStart)
+ _vdbePmaWriterInit(tls, (*Xsqlite3_file)(_pOut.XpFd), &_writer, (*XVdbeSorter)(_pTask.XpSorter).Xpgsz, _iStart)
_2:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _3
}
- _1_pReader = (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3) + 52*uintptr(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr(i32(1)))))))
- _1_nKey = _1_pReader.X3
- _1_iEof = (_writer.X5) + int64(_writer.X4)
- if (*Xsqlite3_file)(_1_pReader.X4) == nil {
+ _1_pReader = elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(*elem8(_pMerger.XaTree, uintptr(1))))
+ _1_nKey = _1_pReader.XnKey
+ _1_iEof = _writer.XiWriteOff + int64(_writer.XiBufEnd)
+ if (*Xsqlite3_file)(_1_pReader.XpFd) == nil {
goto _3
}
- if ((_1_iEof + int64(_1_nKey)) + int64(_sqlite3VarintLen(tls, uint64(_1_nKey)))) > (_iStart + int64(_pIncr.X3)) {
+ if ((_1_iEof + int64(_1_nKey)) + int64(_sqlite3VarintLen(tls, uint64(_1_nKey)))) > (_iStart + int64(_pIncr.XmxSz)) {
goto _3
}
_vdbePmaWriteVarint(tls, &_writer, uint64(_1_nKey))
- _vdbePmaWriteBlob(tls, &_writer, _1_pReader.X6, _1_nKey)
+ _vdbePmaWriteBlob(tls, &_writer, _1_pReader.XaKey, _1_nKey)
func() {
- if (*XSortSubtask)((*XMergeEngine)(_pIncr.X1).X1) != _pTask {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87913), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeIncrPopulateØ00__func__Ø000))), unsafe.Pointer(str(87528)))
+ if (*XSortSubtask)((*XMergeEngine)(_pIncr.XpMerger).XpTask) != _pTask {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87913), unsafe.Pointer(&_vdbeIncrPopulateØ00__func__Ø000), unsafe.Pointer(str(85690)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _vdbeMergeEngineStep(tls, (*XMergeEngine)(_pIncr.X1), &_1_dummy)
+ _rc = _vdbeMergeEngineStep(tls, (*XMergeEngine)(_pIncr.XpMerger), &_1_dummy)
goto _2
_3:
- _rc2 = _vdbePmaWriterFinish(tls, &_writer, (*int64)(unsafe.Pointer(&(_pOut.X1))))
- if _rc == i32(0) {
+ _rc2 = _vdbePmaWriterFinish(tls, &_writer, &_pOut.XiEof)
+ if _rc == int32(0) {
_rc = _rc2
}
return _rc
-
- _ = _writer
- _ = _1_dummy
- panic(0)
}
var _vdbeIncrPopulateØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeIncrPopulateØ00__func__Ø000[0], str(87557), 17)
+ crt.Xstrncpy(nil, &_vdbeIncrPopulateØ00__func__Ø000[0], str(85719), 17)
}
-// Advance the MergeEngine to its next entry.
-// Set *pbEof to true there is no next entry because
-// the MergeEngine has reached the end of all its inputs.
-//
-// Return SQLITE_OK if successful or an error code if an error occurs.
+// C comment
+// /*
+// ** Advance the MergeEngine to its next entry.
+// ** Set *pbEof to true there is no next entry because
+// ** the MergeEngine has reached the end of all its inputs.
+// **
+// ** Return SQLITE_OK if successful or an error code if an error occurs.
+// */
func _vdbeMergeEngineStep(tls *crt.TLS, _pMerger *XMergeEngine, _pbEof *int32) (r0 int32) {
var _rc, _iPrev, _1_i, _1_bCached, _2_iRes int32
var _1_pReadr1, _1_pReadr2 *XPmaReader
var _pTask *XSortSubtask
- _iPrev = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr(i32(1))))
- _pTask = (*XSortSubtask)(_pMerger.X1)
- _rc = _vdbePmaReaderNext(tls, (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3)+52*uintptr(_iPrev))))
- if _rc != i32(0) {
+ _iPrev = *elem8(_pMerger.XaTree, uintptr(1))
+ _pTask = (*XSortSubtask)(_pMerger.XpTask)
+ _rc = _vdbePmaReaderNext(tls, elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(_iPrev)))
+ if _rc != int32(0) {
goto _0
}
- _1_bCached = i32(0)
- _1_pReadr1 = (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3) + 52*uintptr(_iPrev&i32(65534))))
- _1_pReadr2 = (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3) + 52*uintptr(_iPrev|i32(1))))
- _1_i = ((_pMerger.X0) + _iPrev) / i32(2)
+ _1_bCached = int32(0)
+ _1_pReadr1 = elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(_iPrev&int32(65534)))
+ _1_pReadr2 = elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(_iPrev|int32(1)))
+ _1_i = (_pMerger.XnTree + _iPrev) / int32(2)
_1:
- if _1_i <= i32(0) {
+ if _1_i <= int32(0) {
goto _4
}
- if (*Xsqlite3_file)(_1_pReadr1.X4) == nil {
- _2_iRes = i32(1)
+ if (*Xsqlite3_file)(_1_pReadr1.XpFd) == nil {
+ _2_iRes = int32(1)
goto _8
}
- if (*Xsqlite3_file)(_1_pReadr2.X4) == nil {
- _2_iRes = i32(-1)
+ if (*Xsqlite3_file)(_1_pReadr2.XpFd) == nil {
+ _2_iRes = int32(-1)
goto _8
}
- _2_iRes = (*(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32
- }{(_pTask.X6)})))(tls, _pTask, &_1_bCached, (unsafe.Pointer)(_1_pReadr1.X6), _1_pReadr1.X3, (unsafe.Pointer)(_1_pReadr2.X6), _1_pReadr2.X3)
+ _2_iRes = func() func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32 {
+ v := _pTask.XxCompare
+ return *(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pTask, &_1_bCached, unsafe.Pointer(_1_pReadr1.XaKey), _1_pReadr1.XnKey, unsafe.Pointer(_1_pReadr2.XaKey), _1_pReadr2.XnKey)
_8:
- if (_2_iRes < i32(0)) || ((_2_iRes == i32(0)) && (uintptr(unsafe.Pointer(_1_pReadr1)) < uintptr(unsafe.Pointer(_1_pReadr2)))) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr(_1_i))) = int32((uintptr(unsafe.Pointer(_1_pReadr1)) - uintptr(unsafe.Pointer((*XPmaReader)(_pMerger.X3)))) / 52)
- _1_pReadr2 = (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3) + 52*uintptr(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr(_1_i^i32(1)))))))
- _1_bCached = i32(0)
+ if (_2_iRes < int32(0)) || ((_2_iRes == int32(0)) && (crt.P2U(unsafe.Pointer(_1_pReadr1)) < crt.P2U(unsafe.Pointer(_1_pReadr2)))) {
+ *elem8(_pMerger.XaTree, uintptr(_1_i)) = int32((uintptr(unsafe.Pointer(_1_pReadr1)) - uintptr(_pMerger.XaReadr)) / 52)
+ _1_pReadr2 = elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(*elem8(_pMerger.XaTree, uintptr(_1_i^int32(1)))))
+ _1_bCached = int32(0)
goto _12
}
- if (*Xsqlite3_file)(_1_pReadr1.X4) != nil {
- _1_bCached = i32(0)
+ if _1_pReadr1.XpFd != nil {
+ _1_bCached = int32(0)
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr(_1_i))) = int32((uintptr(unsafe.Pointer(_1_pReadr2)) - uintptr(unsafe.Pointer((*XPmaReader)(_pMerger.X3)))) / 52)
- _1_pReadr1 = (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3) + 52*uintptr(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr(_1_i^i32(1)))))))
+ *elem8(_pMerger.XaTree, uintptr(_1_i)) = int32((uintptr(unsafe.Pointer(_1_pReadr2)) - uintptr(_pMerger.XaReadr)) / 52)
+ _1_pReadr1 = elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(*elem8(_pMerger.XaTree, uintptr(_1_i^int32(1)))))
_12:
- _1_i = _1_i / i32(2)
+ _1_i = _1_i / int32(2)
goto _1
_4:
- *_pbEof = bool2int((*Xsqlite3_file)((*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3)+52*uintptr(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr(i32(1))))))).X4) == nil)
+ *_pbEof = bool2int((*Xsqlite3_file)(elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(*elem8(_pMerger.XaTree, uintptr(1)))).XpFd) == nil)
_0:
return func() int32 {
- if _rc == i32(0) {
- return int32((*XUnpackedRecord)(_pTask.X3).X4)
+ if _rc == int32(0) {
+ return int32((*XUnpackedRecord)(_pTask.XpUnpacked).XerrCode)
}
return _rc
}()
-
- _ = _1_bCached
- panic(0)
}
-// pRoot is the root of an incremental merge-tree with depth nDepth (according
-// to vdbeSorterTreeDepth()). pLeaf is the iSeq'th leaf to be added to the
-// tree, counting from zero. This function adds pLeaf to the tree.
-//
-// If successful, SQLITE_OK is returned. If an error occurs, an SQLite error
-// code is returned and pLeaf is freed.
+// C comment
+// /*
+// ** pRoot is the root of an incremental merge-tree with depth nDepth (according
+// ** to vdbeSorterTreeDepth()). pLeaf is the iSeq'th leaf to be added to the
+// ** tree, counting from zero. This function adds pLeaf to the tree.
+// **
+// ** If successful, SQLITE_OK is returned. If an error occurs, an SQLite error
+// ** code is returned and pLeaf is freed.
+// */
func _vdbeSorterAddToTree(tls *crt.TLS, _pTask *XSortSubtask, _nDepth int32, _iSeq int32, _pRoot *XMergeEngine, _pLeaf *XMergeEngine) (r0 int32) {
var _rc, _nDiv, _i, _2_iIter int32
var _2_pReadr *XPmaReader
var _pIncr *XIncrMerger
var _p, _3_pNew *XMergeEngine
- _rc = i32(0)
- _nDiv = i32(1)
+ _rc = int32(0)
+ _nDiv = int32(1)
_p = _pRoot
_rc = _vdbeIncrMergerNew(tls, _pTask, _pLeaf, &_pIncr)
- _i = i32(1)
+ _i = int32(1)
_0:
if _i >= _nDepth {
goto _3
}
- _nDiv = _nDiv * i32(16)
+ _nDiv = _nDiv * int32(16)
_i += 1
goto _0
_3:
- _i = i32(1)
+ _i = int32(1)
_4:
- if _i >= _nDepth || _rc != i32(0) {
+ if _i >= _nDepth || _rc != int32(0) {
goto _8
}
- _2_iIter = (_iSeq / _nDiv) % i32(16)
- _2_pReadr = (*XPmaReader)(unsafe.Pointer(uintptr(_p.X3) + 52*uintptr(_2_iIter)))
- if (*XIncrMerger)(_2_pReadr.X10) != nil {
+ _2_iIter = (_iSeq / _nDiv) % int32(16)
+ _2_pReadr = elem80((*XPmaReader)(_p.XaReadr), uintptr(_2_iIter))
+ if (*XIncrMerger)(_2_pReadr.XpIncr) != nil {
goto _9
}
- _3_pNew = _vdbeMergeEngineNew(tls, i32(16))
+ _3_pNew = _vdbeMergeEngineNew(tls, int32(16))
if _3_pNew == nil {
- _rc = _sqlite3NomemError(tls, i32(88392))
+ _rc = _sqlite3NomemError(tls, int32(88392))
goto _11
}
- _rc = _vdbeIncrMergerNew(tls, _pTask, _3_pNew, (**XIncrMerger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pReadr.X10))))))
+ _rc = _vdbeIncrMergerNew(tls, _pTask, _3_pNew, (**XIncrMerger)(unsafe.Pointer(&_2_pReadr.XpIncr)))
_11:
_9:
- if _rc == i32(0) {
- _p = (*XMergeEngine)((*XIncrMerger)(_2_pReadr.X10).X1)
- _nDiv = _nDiv / i32(16)
+ if _rc == int32(0) {
+ _p = (*XMergeEngine)((*XIncrMerger)(_2_pReadr.XpIncr).XpMerger)
+ _nDiv = _nDiv / int32(16)
}
_i += 1
goto _4
_8:
- if _rc == i32(0) {
- *(**XIncrMerger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XPmaReader)(unsafe.Pointer(uintptr(_p.X3) + 52*uintptr(_iSeq%i32(16)))).X10))))) = _pIncr
+ if _rc == int32(0) {
+ *(**XIncrMerger)(unsafe.Pointer(&(elem80((*XPmaReader)(_p.XaReadr), uintptr(_iSeq%int32(16))).XpIncr))) = _pIncr
goto _14
}
_vdbeIncrFree(tls, _pIncr)
@@ -66813,38 +66596,37 @@ _14:
return _rc
}
-// Allocate and return a new IncrMerger object to read data from pMerger.
-//
-// If an OOM condition is encountered, return NULL. In this case free the
-// pMerger argument before returning.
+// C comment
+// /*
+// ** Allocate and return a new IncrMerger object to read data from pMerger.
+// **
+// ** If an OOM condition is encountered, return NULL. In this case free the
+// ** pMerger argument before returning.
+// */
func _vdbeIncrMergerNew(tls *crt.TLS, _pTask *XSortSubtask, _pMerger *XMergeEngine, _ppOut **XIncrMerger) (r0 int32) {
var _rc int32
var _pIncr *XIncrMerger
- _rc = i32(0)
- _pIncr = store55(_ppOut, (*XIncrMerger)(func() unsafe.Pointer {
- if _sqlite3FaultSim(tls, i32(100)) != 0 {
- return unsafe.Pointer(nil)
+ _rc = int32(0)
+ _pIncr = store91(_ppOut, (*XIncrMerger)(func() unsafe.Pointer {
+ if _sqlite3FaultSim(tls, int32(100)) != 0 {
+ return nil
}
- return _sqlite3MallocZero(tls, uint64(u32(52)))
+ return _sqlite3MallocZero(tls, uint64(52))
}()))
if _pIncr != nil {
- *(**XMergeEngine)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIncr.X1))))) = _pMerger
- *(**XSortSubtask)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIncr.X0))))) = _pTask
- *(*int32)(unsafe.Pointer(&(_pIncr.X3))) = func() int32 {
- if (((*XVdbeSorter)(_pTask.X2).X2) + i32(9)) > (((*XVdbeSorter)(_pTask.X2).X1) / i32(2)) {
- return (((*XVdbeSorter)(_pTask.X2).X2) + i32(9))
+ *(**XMergeEngine)(unsafe.Pointer(&_pIncr.XpMerger)) = _pMerger
+ *(**XSortSubtask)(unsafe.Pointer(&_pIncr.XpTask)) = _pTask
+ _pIncr.XmxSz = func() int32 {
+ if (((*XVdbeSorter)(_pTask.XpSorter).XmxKeysize) + int32(9)) > (((*XVdbeSorter)(_pTask.XpSorter).XmxPmaSize) / int32(2)) {
+ return (((*XVdbeSorter)(_pTask.XpSorter).XmxKeysize) + int32(9))
}
- return (((*XVdbeSorter)(_pTask.X2).X1) / i32(2))
+ return (((*XVdbeSorter)(_pTask.XpSorter).XmxPmaSize) / int32(2))
}()
- {
- p := (*int64)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X1)))
- *p = (*p) + int64(_pIncr.X3)
- sink6(*p)
- }
+ _pTask.Xfile2.XiEof += int64(_pIncr.XmxSz)
goto _5
}
_vdbeMergeEngineFree(tls, _pMerger)
- _rc = _sqlite3NomemError(tls, i32(88016))
+ _rc = _sqlite3NomemError(tls, int32(88016))
_5:
return _rc
}
@@ -66852,46 +66634,48 @@ _5:
var _vdbeSorterSetupMergeØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeSorterSetupMergeØ00__func__Ø000[0], str(87574), 21)
+ crt.Xstrncpy(nil, &_vdbeSorterSetupMergeØ00__func__Ø000[0], str(85736), 21)
}
-// Set the "use-threads" flag on object pIncr.
+// C comment
+// /*
+// ** Set the "use-threads" flag on object pIncr.
+// */
func _vdbeIncrMergerSetThreads(tls *crt.TLS, _pIncr *XIncrMerger) {
- *(*int32)(unsafe.Pointer(&(_pIncr.X5))) = i32(1)
- {
- p := (*int64)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(&((*XSortSubtask)(_pIncr.X0).X8))).X1)))
- *p = (*p) - int64(_pIncr.X3)
- sink6(*p)
- }
-}
-
-// If the PmaReader passed as the first argument is not an incremental-reader
-// (if pReadr->pIncr==0), then this function is a no-op. Otherwise, it invokes
-// the vdbePmaReaderIncrMergeInit() function with the parameters passed to
-// this routine to initialize the incremental merge.
-//
-// If the IncrMerger object is multi-threaded (IncrMerger.bUseThread==1),
-// then a background thread is launched to call vdbePmaReaderIncrMergeInit().
-// Or, if the IncrMerger is single threaded, the same function is called
-// using the current thread.
+ _pIncr.XbUseThread = int32(1)
+ ((*XSortSubtask)(_pIncr.XpTask).Xfile2).XiEof -= int64(_pIncr.XmxSz)
+}
+
+// C comment
+// /*
+// ** If the PmaReader passed as the first argument is not an incremental-reader
+// ** (if pReadr->pIncr==0), then this function is a no-op. Otherwise, it invokes
+// ** the vdbePmaReaderIncrMergeInit() function with the parameters passed to
+// ** this routine to initialize the incremental merge.
+// **
+// ** If the IncrMerger object is multi-threaded (IncrMerger.bUseThread==1),
+// ** then a background thread is launched to call vdbePmaReaderIncrMergeInit().
+// ** Or, if the IncrMerger is single threaded, the same function is called
+// ** using the current thread.
+// */
func _vdbePmaReaderIncrInit(tls *crt.TLS, _pReadr *XPmaReader, _eMode int32) (r0 int32) {
var _rc int32
var _2_pCtx unsafe.Pointer
var _pIncr *XIncrMerger
- _pIncr = (*XIncrMerger)(_pReadr.X10)
- _rc = i32(0)
+ _pIncr = (*XIncrMerger)(_pReadr.XpIncr)
+ _rc = int32(0)
if _pIncr == nil {
goto _0
}
func() {
- if (_pIncr.X5) != i32(0) && _eMode != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88284), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReaderIncrInitØ00__func__Ø000))), unsafe.Pointer(str(87595)))
+ if _pIncr.XbUseThread != int32(0) && _eMode != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88284), unsafe.Pointer(&_vdbePmaReaderIncrInitØ00__func__Ø000), unsafe.Pointer(str(85757)))
crt.X__builtin_abort(tls)
}
}()
- if (_pIncr.X5) != 0 {
- _2_pCtx = (unsafe.Pointer)(_pReadr)
- _rc = _vdbeSorterCreateThread(tls, (*XSortSubtask)(_pIncr.X0), _vdbePmaReaderBgIncrInit, _2_pCtx)
+ if _pIncr.XbUseThread != 0 {
+ _2_pCtx = unsafe.Pointer(_pReadr)
+ _rc = _vdbeSorterCreateThread(tls, (*XSortSubtask)(_pIncr.XpTask), _vdbePmaReaderBgIncrInit, _2_pCtx)
goto _5
}
_rc = _vdbePmaReaderIncrMergeInit(tls, _pReadr, _eMode)
@@ -66903,307 +66687,318 @@ _0:
var _vdbePmaReaderIncrInitØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_vdbePmaReaderIncrInitØ00__func__Ø000[0], str(87640), 22)
+ crt.Xstrncpy(nil, &_vdbePmaReaderIncrInitØ00__func__Ø000[0], str(85802), 22)
}
-// The main routine for vdbePmaReaderIncrMergeInit() operations run in
-// background threads.
+// C comment
+// /*
+// ** The main routine for vdbePmaReaderIncrMergeInit() operations run in
+// ** background threads.
+// */
func _vdbePmaReaderBgIncrInit(tls *crt.TLS, _pCtx unsafe.Pointer) (r0 unsafe.Pointer) {
var _pRet unsafe.Pointer
var _pReader *XPmaReader
_pReader = (*XPmaReader)(_pCtx)
- _pRet = (unsafe.Pointer)(uintptr(_vdbePmaReaderIncrMergeInit(tls, _pReader, i32(1))))
- *(*int32)(unsafe.Pointer(&((*XSortSubtask)((*XIncrMerger)(_pReader.X10).X0).X1))) = i32(1)
+ _pRet = crt.U2P(uintptr(_vdbePmaReaderIncrMergeInit(tls, _pReader, int32(1))))
+ (*XSortSubtask)((*XIncrMerger)(_pReader.XpIncr).XpTask).XbDone = int32(1)
return _pRet
}
-// The PmaReader passed as the first argument is guaranteed to be an
-// incremental-reader (pReadr->pIncr!=0). This function serves to open
-// and/or initialize the temp file related fields of the IncrMerge
-// object at (pReadr->pIncr).
-//
-// If argument eMode is set to INCRINIT_NORMAL, then all PmaReaders
-// in the sub-tree headed by pReadr are also initialized. Data is then
-// loaded into the buffers belonging to pReadr and it is set to point to
-// the first key in its range.
-//
-// If argument eMode is set to INCRINIT_TASK, then pReadr is guaranteed
-// to be a multi-threaded PmaReader and this function is being called in a
-// background thread. In this case all PmaReaders in the sub-tree are
-// initialized as for INCRINIT_NORMAL and the aFile[1] buffer belonging to
-// pReadr is populated. However, pReadr itself is not set up to point
-// to its first key. A call to vdbePmaReaderNext() is still required to do
-// that.
-//
-// The reason this function does not call vdbePmaReaderNext() immediately
-// in the INCRINIT_TASK case is that vdbePmaReaderNext() assumes that it has
-// to block on thread (pTask->thread) before accessing aFile[1]. But, since
-// this entire function is being run by thread (pTask->thread), that will
-// lead to the current background thread attempting to join itself.
-//
-// Finally, if argument eMode is set to INCRINIT_ROOT, it may be assumed
-// that pReadr->pIncr is a multi-threaded IncrMerge objects, and that all
-// child-trees have already been initialized using IncrInit(INCRINIT_TASK).
-// In this case vdbePmaReaderNext() is called on all child PmaReaders and
-// the current PmaReader set to point to the first key in its range.
-//
-// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+// C comment
+// /*
+// ** The PmaReader passed as the first argument is guaranteed to be an
+// ** incremental-reader (pReadr->pIncr!=0). This function serves to open
+// ** and/or initialize the temp file related fields of the IncrMerge
+// ** object at (pReadr->pIncr).
+// **
+// ** If argument eMode is set to INCRINIT_NORMAL, then all PmaReaders
+// ** in the sub-tree headed by pReadr are also initialized. Data is then
+// ** loaded into the buffers belonging to pReadr and it is set to point to
+// ** the first key in its range.
+// **
+// ** If argument eMode is set to INCRINIT_TASK, then pReadr is guaranteed
+// ** to be a multi-threaded PmaReader and this function is being called in a
+// ** background thread. In this case all PmaReaders in the sub-tree are
+// ** initialized as for INCRINIT_NORMAL and the aFile[1] buffer belonging to
+// ** pReadr is populated. However, pReadr itself is not set up to point
+// ** to its first key. A call to vdbePmaReaderNext() is still required to do
+// ** that.
+// **
+// ** The reason this function does not call vdbePmaReaderNext() immediately
+// ** in the INCRINIT_TASK case is that vdbePmaReaderNext() assumes that it has
+// ** to block on thread (pTask->thread) before accessing aFile[1]. But, since
+// ** this entire function is being run by thread (pTask->thread), that will
+// ** lead to the current background thread attempting to join itself.
+// **
+// ** Finally, if argument eMode is set to INCRINIT_ROOT, it may be assumed
+// ** that pReadr->pIncr is a multi-threaded IncrMerge objects, and that all
+// ** child-trees have already been initialized using IncrInit(INCRINIT_TASK).
+// ** In this case vdbePmaReaderNext() is called on all child PmaReaders and
+// ** the current PmaReader set to point to the first key in its range.
+// **
+// ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+// */
func _vdbePmaReaderIncrMergeInit(tls *crt.TLS, _pReadr *XPmaReader, _eMode int32) (r0 int32) {
var _rc, _1_mxSz int32
var _db *Xsqlite3
var _pIncr *XIncrMerger
var _pTask *XSortSubtask
- _rc = i32(0)
- _pIncr = (*XIncrMerger)(_pReadr.X10)
- _pTask = (*XSortSubtask)(_pIncr.X0)
- _db = (*Xsqlite3)((*XVdbeSorter)(_pTask.X2).X6)
- i32(0)
- _rc = _vdbeMergeEngineInit(tls, _pTask, (*XMergeEngine)(_pIncr.X1), _eMode)
- if _rc != i32(0) {
+ _rc = int32(0)
+ _pIncr = (*XIncrMerger)(_pReadr.XpIncr)
+ _pTask = (*XSortSubtask)(_pIncr.XpTask)
+ _db = (*Xsqlite3)((*XVdbeSorter)(_pTask.XpSorter).Xdb)
+
+ _rc = _vdbeMergeEngineInit(tls, _pTask, (*XMergeEngine)(_pIncr.XpMerger), _eMode)
+ if _rc != int32(0) {
goto _0
}
- _1_mxSz = _pIncr.X3
- if (_pIncr.X5) == 0 {
+ _1_mxSz = _pIncr.XmxSz
+ if _pIncr.XbUseThread == 0 {
goto _1
}
- _rc = _vdbeSorterOpenTempFile(tls, _db, int64(_1_mxSz), (**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(0)))).X0))))))
- if _rc == i32(0) {
- _rc = _vdbeSorterOpenTempFile(tls, _db, int64(_1_mxSz), (**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(1)))).X0))))))
+ _rc = _vdbeSorterOpenTempFile(tls, _db, int64(_1_mxSz), (**Xsqlite3_file)(unsafe.Pointer(&(elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), 0).XpFd))))
+ if _rc == int32(0) {
+ _rc = _vdbeSorterOpenTempFile(tls, _db, int64(_1_mxSz), (**Xsqlite3_file)(unsafe.Pointer(&(elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), uintptr(1)).XpFd))))
}
goto _3
_1:
- if (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X0) == nil {
+ if (*Xsqlite3_file)(_pTask.Xfile2.XpFd) == nil {
func() {
- if ((*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X1) <= int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88217), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReaderIncrMergeInitØ00__func__Ø000))), unsafe.Pointer(str(87662)))
+ if (_pTask.Xfile2.XiEof) <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88217), unsafe.Pointer(&_vdbePmaReaderIncrMergeInitØ00__func__Ø000), unsafe.Pointer(str(85824)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _vdbeSorterOpenTempFile(tls, _db, (*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X1, (**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X0))))))
- *(*int64)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X1))) = int64(i32(0))
+ _rc = _vdbeSorterOpenTempFile(tls, _db, _pTask.Xfile2.XiEof, (**Xsqlite3_file)(unsafe.Pointer(&(_pTask.Xfile2.XpFd))))
+ _pTask.Xfile2.XiEof = 0
}
- if _rc == i32(0) {
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]XSorterFile)(unsafe.Pointer(&(_pIncr.X6))))) + 12*uintptr(i32(1)))).X0))))) = (*Xsqlite3_file)((*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X0)
- *(*int64)(unsafe.Pointer(&(_pIncr.X2))) = (*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X1
- {
- p := (*int64)(unsafe.Pointer(&((*XSorterFile)(unsafe.Pointer(&(_pTask.X8))).X1)))
- *p = (*p) + int64(_1_mxSz)
- sink6(*p)
- }
+ if _rc == int32(0) {
+ *(**Xsqlite3_file)(unsafe.Pointer(&(elem79((*XSorterFile)(unsafe.Pointer(&_pIncr.XaFile)), uintptr(1)).XpFd))) = (*Xsqlite3_file)(_pTask.Xfile2.XpFd)
+ _pIncr.XiStartOff = _pTask.Xfile2.XiEof
+ _pTask.Xfile2.XiEof += int64(_1_mxSz)
}
_3:
_0:
- if (_rc == i32(0)) && (_pIncr.X5) != 0 {
+ if (_rc == int32(0)) && _pIncr.XbUseThread != 0 {
func() {
- if _eMode != i32(2) && _eMode != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88241), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbePmaReaderIncrMergeInitØ00__func__Ø000))), unsafe.Pointer(str(87682)))
+ if _eMode != int32(2) && _eMode != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88241), unsafe.Pointer(&_vdbePmaReaderIncrMergeInitØ00__func__Ø000), unsafe.Pointer(str(85844)))
crt.X__builtin_abort(tls)
}
}()
_rc = _vdbeIncrPopulate(tls, _pIncr)
}
- if (_rc == i32(0)) && (i32(0) != 0 || (_eMode != i32(1))) {
+ if (_rc == int32(0)) && (int32(0) != 0 || (_eMode != int32(1))) {
_rc = _vdbePmaReaderNext(tls, _pReadr)
}
return _rc
}
-// Initialize the MergeEngine object passed as the second argument. Once this
-// function returns, the first key of merged data may be read from the
-// MergeEngine object in the usual fashion.
-//
-// If argument eMode is INCRINIT_ROOT, then it is assumed that any IncrMerge
-// objects attached to the PmaReader objects that the merger reads from have
-// already been populated, but that they have not yet populated aFile[0] and
-// set the PmaReader objects up to read from it. In this case all that is
-// required is to call vdbePmaReaderNext() on each PmaReader to point it at
-// its first key.
-//
-// Otherwise, if eMode is any value other than INCRINIT_ROOT, then use
-// vdbePmaReaderIncrMergeInit() to initialize each PmaReader that feeds data
-// to pMerger.
-//
-// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+// C comment
+// /*
+// ** Initialize the MergeEngine object passed as the second argument. Once this
+// ** function returns, the first key of merged data may be read from the
+// ** MergeEngine object in the usual fashion.
+// **
+// ** If argument eMode is INCRINIT_ROOT, then it is assumed that any IncrMerge
+// ** objects attached to the PmaReader objects that the merger reads from have
+// ** already been populated, but that they have not yet populated aFile[0] and
+// ** set the PmaReader objects up to read from it. In this case all that is
+// ** required is to call vdbePmaReaderNext() on each PmaReader to point it at
+// ** its first key.
+// **
+// ** Otherwise, if eMode is any value other than INCRINIT_ROOT, then use
+// ** vdbePmaReaderIncrMergeInit() to initialize each PmaReader that feeds data
+// ** to pMerger.
+// **
+// ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+// */
func _vdbeMergeEngineInit(tls *crt.TLS, _pTask *XSortSubtask, _pMerger *XMergeEngine, _eMode int32) (r0 int32) {
var _rc, _i, _nTree int32
- _rc = i32(0)
- _nTree = _pMerger.X0
- i32(0)
+ _rc = int32(0)
+ _nTree = _pMerger.XnTree
+
func() {
- if (*XSortSubtask)(_pMerger.X1) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88133), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeMergeEngineInitØ00__func__Ø000))), unsafe.Pointer(str(87727)))
+ if (*XSortSubtask)(_pMerger.XpTask) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88133), unsafe.Pointer(&_vdbeMergeEngineInitØ00__func__Ø000), unsafe.Pointer(str(85889)))
crt.X__builtin_abort(tls)
}
}()
- *(**XSortSubtask)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMerger.X1))))) = _pTask
- _i = i32(0)
+ *(**XSortSubtask)(unsafe.Pointer(&_pMerger.XpTask)) = _pTask
+ _i = int32(0)
_2:
if _i >= _nTree {
goto _5
}
- if i32(1) != 0 && (_eMode == i32(2)) {
- _rc = _vdbePmaReaderNext(tls, (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3)+52*uintptr((_nTree-_i)-i32(1)))))
+ if int32(1) != 0 && (_eMode == int32(2)) {
+ _rc = _vdbePmaReaderNext(tls, elem80((*XPmaReader)(_pMerger.XaReadr), uintptr((_nTree-_i)-int32(1))))
goto _8
}
- _rc = _vdbePmaReaderIncrInit(tls, (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3)+52*uintptr(_i))), i32(0))
+ _rc = _vdbePmaReaderIncrInit(tls, elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(_i)), int32(0))
_8:
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
_i += 1
goto _2
_5:
- _i = (_pMerger.X0) - i32(1)
+ _i = _pMerger.XnTree - int32(1)
_10:
- if _i <= i32(0) {
+ if _i <= int32(0) {
goto _13
}
_vdbeMergeEngineCompare(tls, _pMerger, _i)
_i -= 1
goto _10
_13:
- return int32((*XUnpackedRecord)(_pTask.X3).X4)
+ return int32((*XUnpackedRecord)(_pTask.XpUnpacked).XerrCode)
}
var _vdbeMergeEngineInitØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeMergeEngineInitØ00__func__Ø000[0], str(87745), 20)
+ crt.Xstrncpy(nil, &_vdbeMergeEngineInitØ00__func__Ø000[0], str(85907), 20)
}
-// Recompute pMerger->aTree[iOut] by comparing the next keys on the
-// two PmaReaders that feed that entry. Neither of the PmaReaders
-// are advanced. This routine merely does the comparison.
+// C comment
+// /*
+// ** Recompute pMerger->aTree[iOut] by comparing the next keys on the
+// ** two PmaReaders that feed that entry. Neither of the PmaReaders
+// ** are advanced. This routine merely does the comparison.
+// */
func _vdbeMergeEngineCompare(tls *crt.TLS, _pMerger *XMergeEngine, _iOut int32) {
var _i1, _i2, _iRes, _5_bCached, _5_res int32
var _p1, _p2 *XPmaReader
var _5_pTask *XSortSubtask
func() {
- if _iOut >= (_pMerger.X0) || _iOut <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88048), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeMergeEngineCompareØ00__func__Ø000))), unsafe.Pointer(str(87765)))
+ if _iOut >= _pMerger.XnTree || _iOut <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88048), unsafe.Pointer(&_vdbeMergeEngineCompareØ00__func__Ø000), unsafe.Pointer(str(85927)))
crt.X__builtin_abort(tls)
}
}()
- if _iOut >= ((_pMerger.X0) / i32(2)) {
- _i1 = (_iOut - ((_pMerger.X0) / i32(2))) * i32(2)
- _i2 = _i1 + i32(1)
+ if _iOut >= (_pMerger.XnTree / int32(2)) {
+ _i1 = (_iOut - (_pMerger.XnTree / int32(2))) * int32(2)
+ _i2 = _i1 + int32(1)
goto _4
}
- _i1 = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr(_iOut*i32(2))))
- _i2 = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr((_iOut*i32(2))+i32(1))))
+ _i1 = *elem8(_pMerger.XaTree, uintptr(_iOut*int32(2)))
+ _i2 = *elem8(_pMerger.XaTree, uintptr((_iOut*int32(2))+int32(1)))
_4:
- _p1 = (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3) + 52*uintptr(_i1)))
- _p2 = (*XPmaReader)(unsafe.Pointer(uintptr(_pMerger.X3) + 52*uintptr(_i2)))
- if (*Xsqlite3_file)(_p1.X4) == nil {
+ _p1 = elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(_i1))
+ _p2 = elem80((*XPmaReader)(_pMerger.XaReadr), uintptr(_i2))
+ if (*Xsqlite3_file)(_p1.XpFd) == nil {
_iRes = _i2
goto _8
}
- if (*Xsqlite3_file)(_p2.X4) == nil {
+ if (*Xsqlite3_file)(_p2.XpFd) == nil {
_iRes = _i1
goto _8
}
- _5_pTask = (*XSortSubtask)(_pMerger.X1)
- _5_bCached = i32(0)
+ _5_pTask = (*XSortSubtask)(_pMerger.XpTask)
+ _5_bCached = int32(0)
func() {
- if (*XUnpackedRecord)(_5_pTask.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88069), unsafe.Pointer((*int8)(unsafe.Pointer(&_vdbeMergeEngineCompareØ00__func__Ø000))), unsafe.Pointer(str(87795)))
+ if (*XUnpackedRecord)(_5_pTask.XpUnpacked) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88069), unsafe.Pointer(&_vdbeMergeEngineCompareØ00__func__Ø000), unsafe.Pointer(str(85957)))
crt.X__builtin_abort(tls)
}
}()
- _5_res = (*(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32
- }{(_5_pTask.X6)})))(tls, _5_pTask, &_5_bCached, (unsafe.Pointer)(_p1.X6), _p1.X3, (unsafe.Pointer)(_p2.X6), _p2.X3)
- if _5_res <= i32(0) {
+ _5_res = func() func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32 {
+ v := _5_pTask.XxCompare
+ return *(*func(*crt.TLS, *XSortSubtask, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _5_pTask, &_5_bCached, unsafe.Pointer(_p1.XaKey), _p1.XnKey, unsafe.Pointer(_p2.XaKey), _p2.XnKey)
+ if _5_res <= int32(0) {
_iRes = _i1
goto _12
}
_iRes = _i2
_12:
_8:
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pMerger.X2)) + 4*uintptr(_iOut))) = _iRes
- _ = _5_bCached
+ *elem8(_pMerger.XaTree, uintptr(_iOut)) = _iRes
}
var _vdbeMergeEngineCompareØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_vdbeMergeEngineCompareØ00__func__Ø000[0], str(87815), 23)
+ crt.Xstrncpy(nil, &_vdbeMergeEngineCompareØ00__func__Ø000[0], str(85977), 23)
}
var _vdbePmaReaderIncrMergeInitØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_vdbePmaReaderIncrMergeInitØ00__func__Ø000[0], str(87838), 27)
+ crt.Xstrncpy(nil, &_vdbePmaReaderIncrMergeInitØ00__func__Ø000[0], str(86000), 27)
}
-// Advance to the next element in the sorter.
+// C comment
+// /*
+// ** Advance to the next element in the sorter.
+// */
func _sqlite3VdbeSorterNext(tls *crt.TLS, _db *Xsqlite3, _pCsr *XVdbeCursor, _pbEof *int32) (r0 int32) {
var _rc int32
var _pSorter *XVdbeSorter
var _4_pFree *XSorterRecord
func() {
- if int32(_pCsr.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88635), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000))), unsafe.Pointer(str(57861)))
+ if int32(_pCsr.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88635), unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000), unsafe.Pointer(str(57837)))
crt.X__builtin_abort(tls)
}
}()
- _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCsr.X14))))))
+ _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCsr.Xuc)))
func() {
- if (_pSorter.X12) == 0 && ((*XPmaReader)(_pSorter.X4) != nil || (*XMergeEngine)(_pSorter.X5) != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88637), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000))), unsafe.Pointer(str(87865)))
+ if _pSorter.XbUsePMA == 0 && ((*XPmaReader)(_pSorter.XpReader) != nil || (*XMergeEngine)(_pSorter.XpMerger) != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88637), unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000), unsafe.Pointer(str(86027)))
crt.X__builtin_abort(tls)
}
}()
- if (_pSorter.X12) == 0 {
+ if _pSorter.XbUsePMA == 0 {
goto _6
}
func() {
- if (*XPmaReader)(_pSorter.X4) != nil && (*XMergeEngine)(_pSorter.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88639), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000))), unsafe.Pointer(str(87930)))
+ if (*XPmaReader)(_pSorter.XpReader) != nil && (*XMergeEngine)(_pSorter.XpMerger) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88639), unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000), unsafe.Pointer(str(86092)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pSorter.X13) != i32(0) && (*XPmaReader)(_pSorter.X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88640), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000))), unsafe.Pointer(str(87973)))
+ if int32(_pSorter.XbUseThreads) != int32(0) && _pSorter.XpReader == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88640), unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000), unsafe.Pointer(str(86135)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pSorter.X13) != i32(1) && (*XMergeEngine)(_pSorter.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88641), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000))), unsafe.Pointer(str(88017)))
+ if int32(_pSorter.XbUseThreads) != int32(1) && _pSorter.XpMerger == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88641), unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000), unsafe.Pointer(str(86179)))
crt.X__builtin_abort(tls)
}
}()
- if (_pSorter.X13) != 0 {
- _rc = _vdbePmaReaderNext(tls, (*XPmaReader)(_pSorter.X4))
- *_pbEof = bool2int((*Xsqlite3_file)((*XPmaReader)(_pSorter.X4).X4) == nil)
+ if _pSorter.XbUseThreads != 0 {
+ _rc = _vdbePmaReaderNext(tls, (*XPmaReader)(_pSorter.XpReader))
+ *_pbEof = bool2int((*Xsqlite3_file)((*XPmaReader)(_pSorter.XpReader).XpFd) == nil)
goto _17
}
func() {
- if (*XMergeEngine)(_pSorter.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88649), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000))), unsafe.Pointer(str(88061)))
+ if (*XMergeEngine)(_pSorter.XpMerger) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88649), unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000), unsafe.Pointer(str(86223)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSortSubtask)((*XMergeEngine)(_pSorter.X5).X1) != (*XSortSubtask)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XSortSubtask)(unsafe.Pointer(&(_pSorter.X17)))))+60*uintptr(i32(0)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(88650), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000))), unsafe.Pointer(str(88081)))
+ if (*XSortSubtask)((*XMergeEngine)(_pSorter.XpMerger).XpTask) != elem78((*XSortSubtask)(unsafe.Pointer(&_pSorter.XaTask)), 0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(88650), unsafe.Pointer(&_sqlite3VdbeSorterNextØ00__func__Ø000), unsafe.Pointer(str(86243)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _vdbeMergeEngineStep(tls, (*XMergeEngine)(_pSorter.X5), _pbEof)
+ _rc = _vdbeMergeEngineStep(tls, (*XMergeEngine)(_pSorter.XpMerger), _pbEof)
_17:
goto _22
_6:
- _4_pFree = (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0)
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0))))) = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_4_pFree.X1))))))
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_4_pFree.X1))))))) = nil
- if ((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1) == nil {
+ _4_pFree = (*XSorterRecord)(_pSorter.Xlist.XpList)
+ *(**XSorterRecord)(unsafe.Pointer(&(_pSorter.Xlist.XpList))) = (*XSorterRecord)(*(*unsafe.Pointer)(unsafe.Pointer(&_4_pFree.Xu)))
+ *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_4_pFree.Xu)))) = nil
+ if (_pSorter.Xlist.XaMemory) == nil {
_vdbeSorterRecordFree(tls, _db, _4_pFree)
}
- *_pbEof = bool2int((*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0) == nil)
- _rc = i32(0)
+ *_pbEof = bool2int((_pSorter.Xlist.XpList) == nil)
+ _rc = int32(0)
_22:
return _rc
}
@@ -67211,269 +67006,261 @@ _22:
var _sqlite3VdbeSorterNextØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSorterNextØ00__func__Ø000[0], str(88127), 22)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSorterNextØ00__func__Ø000[0], str(86289), 22)
}
-// Add a record to the sorter.
+// C comment
+// /*
+// ** Add a record to the sorter.
+// */
func _sqlite3VdbeSorterWrite(tls *crt.TLS, _pCsr *XVdbeCursor, _pVal *XMem) (r0 int32) {
var _rc, _bFlush, _nReq, _nPMA, _t, _9_nMin, _10_iListOff, _10_nNew int32
var _10_aNew *uint8
var _pSorter *XVdbeSorter
var _pNew *XSorterRecord
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if int32(_pCsr.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87790), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterWriteØ00__func__Ø000))), unsafe.Pointer(str(57861)))
+ if int32(_pCsr.XeCurType) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87790), unsafe.Pointer(&_sqlite3VdbeSorterWriteØ00__func__Ø000), unsafe.Pointer(str(57837)))
crt.X__builtin_abort(tls)
}
}()
- _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pCsr.X14))))))
+ _pSorter = (*XVdbeSorter)(*(*unsafe.Pointer)(unsafe.Pointer(&_pCsr.Xuc)))
func() int32 {
- if int32(*(*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pVal.X5)) + 1*uintptr(i32(1))))))) < int32(u8(128)) {
+ if int32(*(*uint8)(unsafe.Pointer(elem1(_pVal.Xz, uintptr(1))))) < int32(128) {
return func() int32 {
- _t = int32(uint32(*(*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pVal.X5)) + 1*uintptr(i32(1))))))))
- return i32(1)
+ _t = int32(uint32(*(*uint8)(unsafe.Pointer(elem1(_pVal.Xz, uintptr(1))))))
+ return int32(1)
}()
}
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pVal.X5))+1*uintptr(i32(1)))))), (*uint32)(unsafe.Pointer(&_t))))
+ return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(elem1(_pVal.Xz, uintptr(1)))), (*uint32)(unsafe.Pointer(&_t))))
}()
- if ((_t > i32(0)) && (_t < i32(10))) && (_t != i32(7)) {
+ if ((_t > int32(0)) && (_t < int32(10))) && (_t != int32(7)) {
{
- p := (*uint8)(unsafe.Pointer(&(_pSorter.X16)))
- *p = uint8(int32(*p) & i32(1))
- sink2(*p)
+ p := &_pSorter.XtypeMask
+ *p = uint8(int32(*p) & int32(1))
}
goto _10
}
- if (_t > i32(10)) && (_t&i32(1)) != 0 {
+ if (_t > int32(10)) && (_t&int32(1)) != 0 {
{
- p := (*uint8)(unsafe.Pointer(&(_pSorter.X16)))
- *p = uint8(int32(*p) & i32(2))
- sink2(*p)
+ p := &_pSorter.XtypeMask
+ *p = uint8(int32(*p) & int32(2))
}
goto _10
}
- *(*uint8)(unsafe.Pointer(&(_pSorter.X16))) = uint8(i32(0))
+ _pSorter.XtypeMask = 0
_10:
func() {
if _pSorter == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87801), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterWriteØ00__func__Ø000))), unsafe.Pointer(str(86043)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87801), unsafe.Pointer(&_sqlite3VdbeSorterWriteØ00__func__Ø000), unsafe.Pointer(str(84205)))
crt.X__builtin_abort(tls)
}
}()
- _nReq = int32(uint32(_pVal.X4) + u32(8))
- _nPMA = (_pVal.X4) + _sqlite3VarintLen(tls, uint64(_pVal.X4))
- if (_pSorter.X1) == 0 {
+ _nReq = int32(uint32(_pVal.Xn) + uint32(8))
+ _nPMA = _pVal.Xn + _sqlite3VarintLen(tls, uint64(_pVal.Xn))
+ if _pSorter.XmxPmaSize == 0 {
goto _13
}
- if ((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1) != nil {
- _bFlush = bool2int((_pSorter.X10) != 0 && (((_pSorter.X10) + _nReq) > (_pSorter.X1)))
+ if (_pSorter.Xlist.XaMemory) != nil {
+ _bFlush = bool2int(_pSorter.XiMemory != 0 && ((_pSorter.XiMemory + _nReq) > _pSorter.XmxPmaSize))
goto _16
}
- _bFlush = bool2int((((*t47)(unsafe.Pointer(&(_pSorter.X9))).X2) > (_pSorter.X1)) || ((((*t47)(unsafe.Pointer(&(_pSorter.X9))).X2) > (_pSorter.X0)) && _sqlite3HeapNearlyFull(tls) != 0))
+ _bFlush = bool2int(((_pSorter.Xlist.XszPMA) > _pSorter.XmxPmaSize) || (((_pSorter.Xlist.XszPMA) > _pSorter.XmnPmaSize) && _sqlite3HeapNearlyFull(tls) != 0))
_16:
if _bFlush != 0 {
_rc = _vdbeSorterFlushPMA(tls, _pSorter)
- *(*int32)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X2))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_pSorter.X10))) = i32(0)
+ _pSorter.Xlist.XszPMA = int32(0)
+ _pSorter.XiMemory = int32(0)
func() {
- if _rc == i32(0) && (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(87834), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSorterWriteØ00__func__Ø000))), unsafe.Pointer(str(88149)))
+ if _rc == int32(0) && (*XSorterRecord)(_pSorter.Xlist.XpList) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(87834), unsafe.Pointer(&_sqlite3VdbeSorterWriteØ00__func__Ø000), unsafe.Pointer(str(86311)))
crt.X__builtin_abort(tls)
}
}()
}
_13:
- {
- p := (*int32)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X2)))
- *p = (*p) + _nPMA
- sink1(*p)
- }
- if _nPMA > (_pSorter.X2) {
- *(*int32)(unsafe.Pointer(&(_pSorter.X2))) = _nPMA
+ _pSorter.Xlist.XszPMA += _nPMA
+ if _nPMA > _pSorter.XmxKeysize {
+ _pSorter.XmxKeysize = _nPMA
}
- if ((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1) == nil {
+ if (_pSorter.Xlist.XaMemory) == nil {
goto _24
}
- _9_nMin = (_pSorter.X10) + _nReq
- if _9_nMin <= (_pSorter.X11) {
+ _9_nMin = _pSorter.XiMemory + _nReq
+ if _9_nMin <= _pSorter.XnMemory {
goto _25
}
- _10_iListOff = int32((uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0))))) - uintptr(unsafe.Pointer((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1))) / 1)
- _10_nNew = (_pSorter.X11) * i32(2)
+ _10_iListOff = int32(uintptr(_pSorter.Xlist.XpList) - uintptr(unsafe.Pointer(_pSorter.Xlist.XaMemory)))
+ _10_nNew = _pSorter.XnMemory * int32(2)
_26:
if _10_nNew < _9_nMin {
- _10_nNew = _10_nNew * i32(2)
+ _10_nNew = _10_nNew * int32(2)
goto _26
}
- if _10_nNew > (_pSorter.X1) {
- _10_nNew = _pSorter.X1
+ if _10_nNew > _pSorter.XmxPmaSize {
+ _10_nNew = _pSorter.XmxPmaSize
}
if _10_nNew < _9_nMin {
_10_nNew = _9_nMin
}
- _10_aNew = (*uint8)(_sqlite3Realloc(tls, (unsafe.Pointer)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1), uint64(_10_nNew)))
+ _10_aNew = (*uint8)(_sqlite3Realloc(tls, unsafe.Pointer(_pSorter.Xlist.XaMemory), uint64(_10_nNew)))
if _10_aNew == nil {
- return _sqlite3NomemError(tls, i32(87855))
+ return _sqlite3NomemError(tls, int32(87855))
}
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0))))) = (*XSorterRecord)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_10_aNew)) + 1*uintptr(_10_iListOff)))))
- *(**uint8)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1))) = _10_aNew
- *(*int32)(unsafe.Pointer(&(_pSorter.X11))) = _10_nNew
+ *(**XSorterRecord)(unsafe.Pointer(&(_pSorter.Xlist.XpList))) = (*XSorterRecord)(unsafe.Pointer(elem15(_10_aNew, uintptr(_10_iListOff))))
+ _pSorter.Xlist.XaMemory = _10_aNew
+ _pSorter.XnMemory = _10_nNew
_25:
- _pNew = (*XSorterRecord)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1)) + 1*uintptr(_pSorter.X10)))))
- {
- p := (*int32)(unsafe.Pointer(&(_pSorter.X10)))
- *p = (*p) + ((_nReq + i32(7)) & i32(-8))
- sink1(*p)
- }
- if (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0) != nil {
- *(*int32)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_pNew.X1))))) = int32((uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0))))) - uintptr(unsafe.Pointer((*t47)(unsafe.Pointer(&(_pSorter.X9))).X1))) / 1)
+ _pNew = (*XSorterRecord)(unsafe.Pointer(elem15(_pSorter.Xlist.XaMemory, uintptr(_pSorter.XiMemory))))
+ _pSorter.XiMemory += (_nReq + int32(7)) & int32(-8)
+ if (_pSorter.Xlist.XpList) != nil {
+ *(*int32)(unsafe.Pointer(&_pNew.Xu)) = int32(uintptr(_pSorter.Xlist.XpList) - uintptr(unsafe.Pointer(_pSorter.Xlist.XaMemory)))
}
goto _32
_24:
_pNew = (*XSorterRecord)(_sqlite3Malloc(tls, uint64(_nReq)))
if _pNew == nil {
- return _sqlite3NomemError(tls, i32(87869))
+ return _sqlite3NomemError(tls, int32(87869))
}
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t48)(unsafe.Pointer(&(_pNew.X1))))))) = (*XSorterRecord)((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0)
+ *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pNew.Xu)))) = (*XSorterRecord)(_pSorter.Xlist.XpList)
_32:
- crt.Xmemcpy(tls, (unsafe.Pointer)((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer(_pNew))+uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(i32(1))))))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8)))))))))))), (unsafe.Pointer)(_pVal.X5), uint32(_pVal.X4))
- *(*int32)(unsafe.Pointer(&(_pNew.X0))) = _pVal.X4
- *(**XSorterRecord)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t47)(unsafe.Pointer(&(_pSorter.X9))).X0))))) = _pNew
+ crt.Xmemcpy(tls, unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer(_pNew))+uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(int32(1))*uintptr(unsafe.Pointer((*XSorterRecord)(unsafe.Pointer(uintptr(8)))))))))))), unsafe.Pointer(_pVal.Xz), uint32(_pVal.Xn))
+ _pNew.XnVal = _pVal.Xn
+ *(**XSorterRecord)(unsafe.Pointer(&(_pSorter.Xlist.XpList))) = _pNew
return _rc
}
var _sqlite3VdbeSorterWriteØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSorterWriteØ00__func__Ø000[0], str(88189), 23)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSorterWriteØ00__func__Ø000[0], str(86351), 23)
}
-// pCur points at an index entry created using the OP_MakeRecord opcode.
-// Read the rowid (the last field in the record) and store it in *rowid.
-// Return SQLITE_OK if everything works, or an error code otherwise.
-//
-// pCur might be pointing to text obtained from a corrupt database file.
-// So the content cannot be trusted. Do appropriate checks on the content.
+// C comment
+// /*
+// ** pCur points at an index entry created using the OP_MakeRecord opcode.
+// ** Read the rowid (the last field in the record) and store it in *rowid.
+// ** Return SQLITE_OK if everything works, or an error code otherwise.
+// **
+// ** pCur might be pointing to text obtained from a corrupt database file.
+// ** So the content cannot be trusted. Do appropriate checks on the content.
+// */
func _sqlite3VdbeIdxRowid(tls *crt.TLS, _db *Xsqlite3, _pCur *XBtCursor, _rowid *int64) (r0 int32) {
var _rc int32
var _nCellKey int64
var _szHdr, _typeRowid, _lenRowid uint32
var _m, _v XMem
- _nCellKey = i64(0)
+ _nCellKey = int64(0)
func() {
if _sqlite3BtreeCursorIsValid(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75814), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIdxRowidØ00__func__Ø000))), unsafe.Pointer(str(77407)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75814), unsafe.Pointer(&_sqlite3VdbeIdxRowidØ00__func__Ø000), unsafe.Pointer(str(75569)))
crt.X__builtin_abort(tls)
}
}()
_nCellKey = int64(_sqlite3BtreePayloadSize(tls, _pCur))
func() {
- if (uint64(_nCellKey) & u64(4294967295)) != uint64(_nCellKey) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75816), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIdxRowidØ00__func__Ø000))), unsafe.Pointer(str(88212)))
+ if (uint64(_nCellKey) & uint64(4294967295)) != uint64(_nCellKey) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75816), unsafe.Pointer(&_sqlite3VdbeIdxRowidØ00__func__Ø000), unsafe.Pointer(str(86374)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemInit(tls, &_m, _db, uint16(i32(0)))
- _rc = _sqlite3VdbeMemFromBtree(tls, _pCur, uint32(i32(0)), uint32(_nCellKey), &_m)
+ _sqlite3VdbeMemInit(tls, &_m, _db, 0)
+ _rc = _sqlite3VdbeMemFromBtree(tls, _pCur, 0, uint32(_nCellKey), &_m)
if _rc != 0 {
return _rc
}
func() int32 {
- if int32(*(*uint8)(unsafe.Pointer(_m.X5))) < int32(u8(128)) {
- return func() int32 { _szHdr = uint32(*(*uint8)(unsafe.Pointer(_m.X5))); return i32(1) }()
+ if int32(*(*uint8)(unsafe.Pointer(_m.Xz))) < int32(128) {
+ return func() int32 { _szHdr = uint32(*(*uint8)(unsafe.Pointer(_m.Xz))); return int32(1) }()
}
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(_m.X5)), &_szHdr))
+ return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(_m.Xz)), &_szHdr))
}()
- if (_szHdr < uint32(i32(3))) || (int32(_szHdr) > (_m.X4)) {
+ if (_szHdr < uint32(3)) || (int32(_szHdr) > _m.Xn) {
goto _idx_rowid_corruption
}
func() int32 {
- if int32(*(*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_m.X5)) + 1*uintptr(_szHdr-uint32(i32(1)))))))) < int32(u8(128)) {
+ if int32(*(*uint8)(unsafe.Pointer(elem1(_m.Xz, uintptr(_szHdr-uint32(1)))))) < int32(128) {
return func() int32 {
- _typeRowid = uint32(*(*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_m.X5)) + 1*uintptr(_szHdr-uint32(i32(1))))))))
- return i32(1)
+ _typeRowid = uint32(*(*uint8)(unsafe.Pointer(elem1(_m.Xz, uintptr(_szHdr-uint32(1))))))
+ return int32(1)
}()
}
- return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_m.X5))+1*uintptr(_szHdr-uint32(i32(1))))))), &_typeRowid))
+ return int32(_sqlite3GetVarint32(tls, (*uint8)(unsafe.Pointer(elem1(_m.Xz, uintptr(_szHdr-uint32(1))))), &_typeRowid))
}()
- if ((_typeRowid < uint32(i32(1))) || (_typeRowid > uint32(i32(9)))) || (_typeRowid == uint32(i32(7))) {
+ if ((_typeRowid < uint32(1)) || (_typeRowid > uint32(9))) || (_typeRowid == uint32(7)) {
goto _idx_rowid_corruption
}
- _lenRowid = uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3SmallTypeSizes)) + 1*uintptr(_typeRowid))))
- if uint32(_m.X4) < (_szHdr + _lenRowid) {
+ _lenRowid = uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3SmallTypeSizes)), uintptr(_typeRowid)))
+ if uint32(_m.Xn) < (_szHdr + _lenRowid) {
goto _idx_rowid_corruption
}
- _sqlite3VdbeSerialGet(tls, (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_m.X5))+1*uintptr(uint32(_m.X4)-_lenRowid))))), _typeRowid, &_v)
- *_rowid = *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_v.X0)))))
+ _sqlite3VdbeSerialGet(tls, (*uint8)(unsafe.Pointer(elem1(_m.Xz, uintptr(uint32(_m.Xn)-_lenRowid)))), _typeRowid, &_v)
+ *_rowid = *(*int64)(unsafe.Pointer(&_v.Xu))
_sqlite3VdbeMemRelease(tls, &_m)
- return i32(0)
+ return int32(0)
_idx_rowid_corruption:
_sqlite3VdbeMemRelease(tls, &_m)
- return _sqlite3CorruptError(tls, i32(75864))
-
- _ = _m
- _ = _v
- panic(0)
+ return _sqlite3CorruptError(tls, int32(75864))
}
var _sqlite3VdbeIdxRowidØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeIdxRowidØ00__func__Ø000[0], str(88255), 20)
+ crt.Xstrncpy(nil, &_sqlite3VdbeIdxRowidØ00__func__Ø000[0], str(86417), 20)
}
-// Compare the key of the index entry that cursor pC is pointing to against
-// the key string in pUnpacked. Write into *pRes a number
-// that is negative, zero, or positive if pC is less than, equal to,
-// or greater than pUnpacked. Return SQLITE_OK on success.
-//
-// pUnpacked is either created without a rowid or is truncated so that it
-// omits the rowid at the end. The rowid at the end of the index entry
-// is ignored as well. Hence, this routine only compares the prefixes
-// of the keys prior to the final rowid, not the entire key.
+// C comment
+// /*
+// ** Compare the key of the index entry that cursor pC is pointing to against
+// ** the key string in pUnpacked. Write into *pRes a number
+// ** that is negative, zero, or positive if pC is less than, equal to,
+// ** or greater than pUnpacked. Return SQLITE_OK on success.
+// **
+// ** pUnpacked is either created without a rowid or is truncated so that it
+// ** omits the rowid at the end. The rowid at the end of the index entry
+// ** is ignored as well. Hence, this routine only compares the prefixes
+// ** of the keys prior to the final rowid, not the entire key.
+// */
func _sqlite3VdbeIdxKeyCompare(tls *crt.TLS, _db *Xsqlite3, _pC *XVdbeCursor, _pUnpacked *XUnpackedRecord, _res *int32) (r0 int32) {
var _rc int32
var _nCellKey int64
var _m XMem
var _pCur *XBtCursor
- _nCellKey = i64(0)
+ _nCellKey = int64(0)
func() {
- if int32(_pC.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75889), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIdxKeyCompareØ00__func__Ø000))), unsafe.Pointer(str(65779)))
+ if int32(_pC.XeCurType) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75889), unsafe.Pointer(&_sqlite3VdbeIdxKeyCompareØ00__func__Ø000), unsafe.Pointer(str(63921)))
crt.X__builtin_abort(tls)
}
}()
- _pCur = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_pC.X14))))))
+ _pCur = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_pC.Xuc)))
func() {
if _sqlite3BtreeCursorIsValid(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75891), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeIdxKeyCompareØ00__func__Ø000))), unsafe.Pointer(str(77407)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75891), unsafe.Pointer(&_sqlite3VdbeIdxKeyCompareØ00__func__Ø000), unsafe.Pointer(str(75569)))
crt.X__builtin_abort(tls)
}
}()
_nCellKey = int64(_sqlite3BtreePayloadSize(tls, _pCur))
- if (_nCellKey <= int64(i32(0))) || (_nCellKey > int64(i32(2147483647))) {
- *_res = i32(0)
- return _sqlite3CorruptError(tls, i32(75897))
+ if (_nCellKey <= (0)) || (_nCellKey > int64(2147483647)) {
+ *_res = int32(0)
+ return _sqlite3CorruptError(tls, int32(75897))
}
- _sqlite3VdbeMemInit(tls, &_m, _db, uint16(i32(0)))
- _rc = _sqlite3VdbeMemFromBtree(tls, _pCur, uint32(i32(0)), uint32(_nCellKey), &_m)
+ _sqlite3VdbeMemInit(tls, &_m, _db, 0)
+ _rc = _sqlite3VdbeMemFromBtree(tls, _pCur, 0, uint32(_nCellKey), &_m)
if _rc != 0 {
return _rc
}
- *_res = _sqlite3VdbeRecordCompare(tls, _m.X4, (unsafe.Pointer)(_m.X5), _pUnpacked)
+ *_res = _sqlite3VdbeRecordCompare(tls, _m.Xn, unsafe.Pointer(_m.Xz), _pUnpacked)
_sqlite3VdbeMemRelease(tls, &_m)
- return i32(0)
-
- _ = _m
- panic(0)
+ return int32(0)
}
var _sqlite3VdbeIdxKeyCompareØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeIdxKeyCompareØ00__func__Ø000[0], str(88275), 25)
+ crt.Xstrncpy(nil, &_sqlite3VdbeIdxKeyCompareØ00__func__Ø000[0], str(86437), 25)
}
func _sqlite3BtreeDropTable(tls *crt.TLS, _p *XBtree, _iTable int32, _piMoved *int32) (r0 int32) {
@@ -67484,50 +67271,53 @@ func _sqlite3BtreeDropTable(tls *crt.TLS, _p *XBtree, _iTable int32, _piMoved *i
return _rc
}
-// Erase all information in a table and add the root of the table to
-// the freelist. Except, the root of the principle table (the one on
-// page 1) is never added to the freelist.
-//
-// This routine will fail with SQLITE_LOCKED if there are any open
-// cursors on the table.
-//
-// If AUTOVACUUM is enabled and the page at iTable is not the last
-// root page in the database file, then the last root page
-// in the database file is moved into the slot formerly occupied by
-// iTable and that last slot formerly occupied by the last root page
-// is added to the freelist instead of iTable. In this say, all
-// root pages are kept at the beginning of the database file, which
-// is necessary for AUTOVACUUM to work right. *piMoved is set to the
-// page number that used to be the last root page in the file before
-// the move. If no page gets moved, *piMoved is set to 0.
-// The last root page is recorded in meta[3] and the value of
-// meta[3] is updated by this procedure.
+// C comment
+// /*
+// ** Erase all information in a table and add the root of the table to
+// ** the freelist. Except, the root of the principle table (the one on
+// ** page 1) is never added to the freelist.
+// **
+// ** This routine will fail with SQLITE_LOCKED if there are any open
+// ** cursors on the table.
+// **
+// ** If AUTOVACUUM is enabled and the page at iTable is not the last
+// ** root page in the database file, then the last root page
+// ** in the database file is moved into the slot formerly occupied by
+// ** iTable and that last slot formerly occupied by the last root page
+// ** is added to the freelist instead of iTable. In this say, all
+// ** root pages are kept at the beginning of the database file, which
+// ** is necessary for AUTOVACUUM to work right. *piMoved is set to the
+// ** page number that used to be the last root page in the file before
+// ** the move. If no page gets moved, *piMoved is set to 0.
+// ** The last root page is recorded in meta[3] and the value of
+// ** meta[3] is updated by this procedure.
+// */
func _btreeDropTable(tls *crt.TLS, _p *XBtree, _iTable uint32, _piMoved *int32) (r0 int32) {
var _rc int32
var _2_maxRootPgno uint32
var _pBt *XBtShared
var _pPage, _5_pMove *XMemPage
_pPage = nil
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
if _sqlite3BtreeHoldsMutex(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67751), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeDropTableØ00__func__Ø000))), unsafe.Pointer(str(17487)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67751), unsafe.Pointer(&_btreeDropTableØ00__func__Ø000), unsafe.Pointer(str(17442)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X2) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67752), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeDropTableØ00__func__Ø000))), unsafe.Pointer(str(77829)))
+ if int32(_p.XinTrans) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67752), unsafe.Pointer(&_btreeDropTableØ00__func__Ø000), unsafe.Pointer(str(75991)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iTable < uint32(i32(2)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67753), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeDropTableØ00__func__Ø000))), unsafe.Pointer(str(88300)))
+ if _iTable < uint32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67753), unsafe.Pointer(&_btreeDropTableØ00__func__Ø000), unsafe.Pointer(str(86462)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _btreeGetPage(tls, _pBt, _iTable, &_pPage, i32(0))
+ _rc = _btreeGetPage(tls, _pBt, _iTable, &_pPage, int32(0))
if _rc != 0 {
return _rc
}
@@ -67536,53 +67326,53 @@ func _btreeDropTable(tls *crt.TLS, _p *XBtree, _iTable uint32, _piMoved *int32)
_releasePage(tls, _pPage)
return _rc
}
- *_piMoved = i32(0)
- if (_pBt.X5) == 0 {
+ *_piMoved = int32(0)
+ if _pBt.XautoVacuum == 0 {
goto _8
}
- _sqlite3BtreeGetMeta(tls, _p, i32(4), &_2_maxRootPgno)
+ _sqlite3BtreeGetMeta(tls, _p, int32(4), &_2_maxRootPgno)
if _iTable != _2_maxRootPgno {
goto _9
}
_freePage(tls, _pPage, &_rc)
_releasePage(tls, _pPage)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
goto _11
_9:
_releasePage(tls, _pPage)
- _rc = _btreeGetPage(tls, _pBt, _2_maxRootPgno, &_5_pMove, i32(0))
- if _rc != i32(0) {
+ _rc = _btreeGetPage(tls, _pBt, _2_maxRootPgno, &_5_pMove, int32(0))
+ if _rc != int32(0) {
return _rc
}
- _rc = _relocatePage(tls, _pBt, _5_pMove, uint8(i32(1)), uint32(i32(0)), _iTable, i32(0))
+ _rc = _relocatePage(tls, _pBt, _5_pMove, uint8(1), 0, _iTable, int32(0))
_releasePage(tls, _5_pMove)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
_5_pMove = nil
- _rc = _btreeGetPage(tls, _pBt, _2_maxRootPgno, &_5_pMove, i32(0))
+ _rc = _btreeGetPage(tls, _pBt, _2_maxRootPgno, &_5_pMove, int32(0))
_freePage(tls, _5_pMove, &_rc)
_releasePage(tls, _5_pMove)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
*_piMoved = int32(_2_maxRootPgno)
_11:
_2_maxRootPgno -= 1
_15:
- if (_2_maxRootPgno == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1)))) || (_ptrmapPageno(tls, _pBt, _2_maxRootPgno) == _2_maxRootPgno) {
+ if (_2_maxRootPgno == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1))) || (_ptrmapPageno(tls, _pBt, _2_maxRootPgno) == _2_maxRootPgno) {
_2_maxRootPgno -= 1
goto _15
}
func() {
- if _2_maxRootPgno == ((uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67818), unsafe.Pointer((*int8)(unsafe.Pointer(&_btreeDropTableØ00__func__Ø000))), unsafe.Pointer(str(88310)))
+ if _2_maxRootPgno == ((uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67818), unsafe.Pointer(&_btreeDropTableØ00__func__Ø000), unsafe.Pointer(str(86472)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeUpdateMeta(tls, _p, i32(4), _2_maxRootPgno)
+ _rc = _sqlite3BtreeUpdateMeta(tls, _p, int32(4), _2_maxRootPgno)
goto _20
_8:
_freePage(tls, _pPage, &_rc)
@@ -67594,35 +67384,38 @@ _20:
var _btreeDropTableØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_btreeDropTableØ00__func__Ø000[0], str(88346), 15)
+ crt.Xstrncpy(nil, &_btreeDropTableØ00__func__Ø000[0], str(86508), 15)
}
-// Delete all information from a single table in the database. iTable is
-// the page number of the root of the table. After this routine returns,
-// the root page is empty, but still exists.
-//
-// This routine will fail with SQLITE_LOCKED if there are any open
-// read cursors on the table. Open write cursors are moved to the
-// root of the table.
-//
-// If pnChange is not NULL, then table iTable must be an intkey table. The
-// integer value pointed to by pnChange is incremented by the number of
-// entries in the table.
+// C comment
+// /*
+// ** Delete all information from a single table in the database. iTable is
+// ** the page number of the root of the table. After this routine returns,
+// ** the root page is empty, but still exists.
+// **
+// ** This routine will fail with SQLITE_LOCKED if there are any open
+// ** read cursors on the table. Open write cursors are moved to the
+// ** root of the table.
+// **
+// ** If pnChange is not NULL, then table iTable must be an intkey table. The
+// ** integer value pointed to by pnChange is incremented by the number of
+// ** entries in the table.
+// */
func _sqlite3BtreeClearTable(tls *crt.TLS, _p *XBtree, _iTable int32, _pnChange *int32) (r0 int32) {
var _rc int32
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
_sqlite3BtreeEnter(tls, _p)
func() {
- if int32(_p.X2) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67702), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeClearTableØ00__func__Ø000))), unsafe.Pointer(str(77829)))
+ if int32(_p.XinTrans) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67702), unsafe.Pointer(&_sqlite3BtreeClearTableØ00__func__Ø000), unsafe.Pointer(str(75991)))
crt.X__builtin_abort(tls)
}
}()
_rc = _saveAllCursors(tls, _pBt, uint32(_iTable), nil)
- if i32(0) == _rc {
- _invalidateIncrblobCursors(tls, _p, uint32(_iTable), int64(i32(0)), i32(1))
- _rc = _clearDatabasePage(tls, _pBt, uint32(_iTable), i32(0), _pnChange)
+ if int32(0) == _rc {
+ _invalidateIncrblobCursors(tls, _p, uint32(_iTable), 0, int32(1))
+ _rc = _clearDatabasePage(tls, _pBt, uint32(_iTable), int32(0), _pnChange)
}
_sqlite3BtreeLeave(tls, _p)
return _rc
@@ -67631,45 +67424,48 @@ func _sqlite3BtreeClearTable(tls *crt.TLS, _p *XBtree, _iTable int32, _pnChange
var _sqlite3BtreeClearTableØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeClearTableØ00__func__Ø000[0], str(88361), 23)
+ crt.Xstrncpy(nil, &_sqlite3BtreeClearTableØ00__func__Ø000[0], str(86523), 23)
}
-// Erase the given database page and all its children. Return
-// the page to the freelist.
+// C comment
+// /*
+// ** Erase the given database page and all its children. Return
+// ** the page to the freelist.
+// */
func _clearDatabasePage(tls *crt.TLS, _pBt *XBtShared, _pgno uint32, _freePageFlag int32, _pnChange *int32) (r0 int32) {
var _rc, _i, _hdr int32
var _pCell *uint8
var _info XCellInfo
var _pPage *XMemPage
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.X21)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67644), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearDatabasePageØ00__func__Ø000))), unsafe.Pointer(str(9280)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pBt.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67644), unsafe.Pointer(&_clearDatabasePageØ00__func__Ø000), unsafe.Pointer(str(9235)))
crt.X__builtin_abort(tls)
}
}()
if _pgno > _btreePagecount(tls, _pBt) {
- return _sqlite3CorruptError(tls, i32(67646))
+ return _sqlite3CorruptError(tls, int32(67646))
}
- _rc = _getAndInitPage(tls, _pBt, _pgno, &_pPage, nil, i32(0))
+ _rc = _getAndInitPage(tls, _pBt, _pgno, &_pPage, nil, int32(0))
if _rc != 0 {
return _rc
}
- if (_pPage.X1) != 0 {
- _rc = _sqlite3CorruptError(tls, i32(67651))
+ if _pPage.XbBusy != 0 {
+ _rc = _sqlite3CorruptError(tls, int32(67651))
goto _cleardatabasepage_out
}
- *(*uint8)(unsafe.Pointer(&(_pPage.X1))) = uint8(i32(1))
- _hdr = int32(_pPage.X6)
- _i = i32(0)
+ _pPage.XbBusy = uint8(1)
+ _hdr = int32(_pPage.XhdrOffset)
+ _i = int32(0)
_5:
- if _i >= int32(_pPage.X14) {
+ if _i >= int32(_pPage.XnCell) {
goto _8
}
- _pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.X19)) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(int32(_pPage.X15)&((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_i))))) + 1*uintptr(i32(0)))))<<uint(i32(8)))|int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X21))+1*uintptr(i32(2)*_i))))) + 1*uintptr(i32(1)))))))))))))
- if (_pPage.X5) != 0 {
+ _pCell = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pPage.XaData)) + uintptr(int32(_pPage.XmaskPage)&((int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_i)), 0))<<8)|int32(*elem15(elem15(_pPage.XaCellIdx, uintptr(int32(2)*_i)), uintptr(1)))))))
+ if _pPage.Xleaf != 0 {
goto _9
}
- _rc = _clearDatabasePage(tls, _pBt, _sqlite3Get4byte(tls, _pCell), i32(1), _pnChange)
+ _rc = _clearDatabasePage(tls, _pBt, _sqlite3Get4byte(tls, _pCell), int32(1), _pnChange)
if _rc != 0 {
goto _cleardatabasepage_out
}
@@ -67681,10 +67477,10 @@ _9:
_i += 1
goto _5
_8:
- if (_pPage.X5) != 0 {
+ if _pPage.Xleaf != 0 {
goto _12
}
- _rc = _clearDatabasePage(tls, _pBt, _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19))+1*uintptr(_hdr+i32(8))))), i32(1), _pnChange)
+ _rc = _clearDatabasePage(tls, _pBt, _sqlite3Get4byte(tls, elem15(_pPage.XaData, uintptr(_hdr+int32(8)))), int32(1), _pnChange)
if _rc != 0 {
goto _cleardatabasepage_out
}
@@ -67692,38 +67488,31 @@ _8:
_12:
if _pnChange != nil {
func() {
- if (_pPage.X2) == 0 && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(67669), unsafe.Pointer((*int8)(unsafe.Pointer(&_clearDatabasePageØ00__func__Ø000))), unsafe.Pointer(str(88384)))
+ if _pPage.XintKey == 0 && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(67669), unsafe.Pointer(&_clearDatabasePageØ00__func__Ø000), unsafe.Pointer(str(86546)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := _pnChange
- *p = (*p) + int32(_pPage.X14)
- sink1(*p)
- }
+ *_pnChange += int32(_pPage.XnCell)
}
_15:
if _freePageFlag != 0 {
_freePage(tls, _pPage, &_rc)
goto _cleardatabasepage_out
}
- if store1(&_rc, _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.X23))) == i32(0) {
- _zeroPage(tls, _pPage, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPage.X19)) + 1*uintptr(_hdr))))|i32(8))
+ if store2(&_rc, _sqlite3PagerWrite(tls, (*XPgHdr)(_pPage.XpDbPage))) == int32(0) {
+ _zeroPage(tls, _pPage, int32(*elem15(_pPage.XaData, uintptr(_hdr)))|int32(8))
}
_cleardatabasepage_out:
- *(*uint8)(unsafe.Pointer(&(_pPage.X1))) = uint8(i32(0))
+ _pPage.XbBusy = 0
_releasePage(tls, _pPage)
return _rc
-
- _ = _info
- panic(0)
}
var _clearDatabasePageØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_clearDatabasePageØ00__func__Ø000[0], str(88412), 18)
+ crt.Xstrncpy(nil, &_clearDatabasePageØ00__func__Ø000[0], str(86574), 18)
}
func _sqlite3RootPageMoved(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _iFrom int32, _iTo int32) {
@@ -67734,35 +67523,35 @@ func _sqlite3RootPageMoved(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _iFrom int32
var _3_pIdx *XIndex
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101998), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RootPageMovedØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101998), unsafe.Pointer(&_sqlite3RootPageMovedØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb)))
- _pHash = (*XHash)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X2)))
- _pElem = (*XHashElem)(_pHash.X2)
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb))
+ _pHash = &((*XSchema)(_pDb.XpSchema).XtblHash)
+ _pElem = (*XHashElem)(_pHash.Xfirst)
_2:
if _pElem == nil {
goto _5
}
- _1_pTab = (*XTable)(_pElem.X2)
- if (_1_pTab.X7) == _iFrom {
- *(*int32)(unsafe.Pointer(&(_1_pTab.X7))) = _iTo
+ _1_pTab = (*XTable)(_pElem.Xdata)
+ if _1_pTab.Xtnum == _iFrom {
+ _1_pTab.Xtnum = _iTo
}
- _pElem = (*XHashElem)(_pElem.X0)
+ _pElem = (*XHashElem)(_pElem.Xnext)
goto _2
_5:
- _pHash = (*XHash)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X3)))
- _pElem = (*XHashElem)(_pHash.X2)
+ _pHash = &((*XSchema)(_pDb.XpSchema).XidxHash)
+ _pElem = (*XHashElem)(_pHash.Xfirst)
_7:
if _pElem == nil {
goto _10
}
- _3_pIdx = (*XIndex)(_pElem.X2)
- if (_3_pIdx.X11) == _iFrom {
- *(*int32)(unsafe.Pointer(&(_3_pIdx.X11))) = _iTo
+ _3_pIdx = (*XIndex)(_pElem.Xdata)
+ if _3_pIdx.Xtnum == _iFrom {
+ _3_pIdx.Xtnum = _iTo
}
- _pElem = (*XHashElem)(_pElem.X0)
+ _pElem = (*XHashElem)(_pElem.Xnext)
goto _7
_10:
}
@@ -67770,136 +67559,873 @@ _10:
var _sqlite3RootPageMovedØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RootPageMovedØ00__func__Ø000[0], str(88430), 21)
+ crt.Xstrncpy(nil, &_sqlite3RootPageMovedØ00__func__Ø000[0], str(86592), 21)
}
-// Delete all information from the single table that pCur is open on.
-//
-// This routine only work for pCur on an ephemeral table.
+// C comment
+// /*
+// ** Delete all information from the single table that pCur is open on.
+// **
+// ** This routine only work for pCur on an ephemeral table.
+// */
func _sqlite3BtreeClearTableOfCursor(tls *crt.TLS, _pCur *XBtCursor) (r0 int32) {
- return _sqlite3BtreeClearTable(tls, (*XBtree)(_pCur.X0), int32(_pCur.X7), nil)
+ return _sqlite3BtreeClearTable(tls, (*XBtree)(_pCur.XpBtree), int32(_pCur.XpgnoRoot), nil)
+}
+
+// C comment
+// /*
+// ** Load the content of the sqlite_stat1 and sqlite_stat3/4 tables. The
+// ** contents of sqlite_stat1 are used to populate the Index.aiRowEst[]
+// ** arrays. The contents of sqlite_stat3/4 are used to populate the
+// ** Index.aSample[] arrays.
+// **
+// ** If the sqlite_stat1 table is not present in the database, SQLITE_ERROR
+// ** is returned. In this case, even if SQLITE_ENABLE_STAT3/4 was defined
+// ** during compilation and the sqlite_stat3/4 table is present, no data is
+// ** read from it.
+// **
+// ** If SQLITE_ENABLE_STAT3/4 was defined during compilation and the
+// ** sqlite_stat4 table is not present in the database, SQLITE_ERROR is
+// ** returned. However, in this case, data is read from the sqlite_stat1
+// ** table (if it is present) before returning.
+// **
+// ** If an OOM error occurs, this function always sets db->mallocFailed.
+// ** This means if the caller does not care about other errors, the return
+// ** code may be ignored.
+// */
+func _sqlite3AnalysisLoad(tls *crt.TLS, _db *Xsqlite3, _iDb int32) (r0 int32) {
+ var _rc int32
+ var _zSql *int8
+ var _pSchema *XSchema
+ var _i *XHashElem
+ var _1_pTab *XTable
+ var _2_pIdx, _6_pIdx *XIndex
+ var _sInfo XanalysisInfo
+ _rc = int32(0)
+ _pSchema = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema)
+ func() {
+ if _iDb < int32(0) || _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98771), unsafe.Pointer(&_sqlite3AnalysisLoadØ00__func__Ø000), unsafe.Pointer(str(21693)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ func() {
+ if (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpBt) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98772), unsafe.Pointer(&_sqlite3AnalysisLoadØ00__func__Ø000), unsafe.Pointer(str(65334)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ func() {
+ if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98775), unsafe.Pointer(&_sqlite3AnalysisLoadØ00__func__Ø000), unsafe.Pointer(str(51126)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _i = (*XHashElem)(_pSchema.XtblHash.Xfirst)
+_7:
+ if _i == nil {
+ goto _10
+ }
+ _1_pTab = (*XTable)(_i.Xdata)
+ _1_pTab.XtabFlags &= uint32(4294967279)
+ _i = (*XHashElem)(_i.Xnext)
+ goto _7
+_10:
+ _i = (*XHashElem)(_pSchema.XidxHash.Xfirst)
+_11:
+ if _i == nil {
+ goto _14
+ }
+ _2_pIdx = (*XIndex)(_i.Xdata)
+ storebits5(&_2_pIdx.XidxType, 0, 128, 7)
+ _i = (*XHashElem)(_i.Xnext)
+ goto _11
+_14:
+ *(**Xsqlite3)(unsafe.Pointer(&_sInfo.Xdb)) = _db
+ _sInfo.XzDatabase = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ if _sqlite3FindTable(tls, _db, str(86613), _sInfo.XzDatabase) == nil {
+ goto _15
+ }
+ _zSql = _sqlite3MPrintf(tls, _db, str(86626), unsafe.Pointer(_sInfo.XzDatabase))
+ if _zSql == nil {
+ _rc = _sqlite3NomemError(tls, int32(98796))
+ goto _17
+ }
+ _rc = Xsqlite3_exec(tls, _db, _zSql, _analysisLoader, unsafe.Pointer(&_sInfo), nil)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zSql))
+_17:
+_15:
+ func() {
+ if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98804), unsafe.Pointer(&_sqlite3AnalysisLoadØ00__func__Ø000), unsafe.Pointer(str(51126)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _i = (*XHashElem)(_pSchema.XidxHash.Xfirst)
+_20:
+ if _i == nil {
+ goto _23
+ }
+ _6_pIdx = (*XIndex)(_i.Xdata)
+ if ((uint32(_6_pIdx.XidxType>>7) << 31) >> 31) == 0 {
+ _sqlite3DefaultRowEst(tls, _6_pIdx)
+ }
+ _i = (*XHashElem)(_i.Xnext)
+ goto _20
+_23:
+ if _rc == int32(7) {
+ _sqlite3OomFault(tls, _db)
+ }
+ return _rc
}
-// Unlink the given table from the hash tables and the delete the
-// table structure with all its indices and foreign keys.
+var _sqlite3AnalysisLoadØ00__func__Ø000 [20]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_sqlite3AnalysisLoadØ00__func__Ø000[0], str(86667), 20)
+}
+
+// C comment
+// /*
+// ** Locate the in-memory structure that describes a particular database
+// ** table given the name of that table and (optionally) the name of the
+// ** database containing the table. Return NULL if not found.
+// **
+// ** If zDatabase is 0, all databases are searched for the table and the
+// ** first matching table is returned. (No checking for duplicate table
+// ** names is done.) The search order is TEMP first, then MAIN, then any
+// ** auxiliary databases added using the ATTACH command.
+// **
+// ** See also sqlite3LocateTable().
+// */
+func _sqlite3FindTable(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _zDatabase *int8) (r0 *XTable) {
+ var _i, _2_j int32
+ var _p *XTable
+ _p = nil
+ func() {
+ if _zDatabase == nil && _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99999), unsafe.Pointer(&_sqlite3FindTableØ00__func__Ø000), unsafe.Pointer(str(86687)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+_3:
+ _i = int32(0)
+_5:
+ if _i >= _db.XnDb {
+ goto _8
+ }
+ _2_j = func() int32 {
+ if _i < int32(2) {
+ return (_i ^ int32(1))
+ }
+ return _i
+ }()
+ if _zDatabase != nil && _sqlite3StrICmp(tls, _zDatabase, elem27((*XDb)(_db.XaDb), uintptr(_2_j)).XzDbSName) != int32(0) {
+ goto _12
+ }
+ func() {
+ if _sqlite3SchemaMutexHeld(tls, _db, _2_j, nil) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100011), unsafe.Pointer(&_sqlite3FindTableØ00__func__Ø000), unsafe.Pointer(str(59943)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _p = (*XTable)(_sqlite3HashFind(tls, &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_2_j)).XpSchema).XtblHash), _zName))
+ if _p != nil {
+ return _p
+ }
+_12:
+ _i += 1
+ goto _5
+_8:
+ if _sqlite3StrICmp(tls, _zName, str(49981)) != int32(0) {
+ goto _4
+ }
+ if Xsqlite3_stricmp(tls, _zDatabase, elem27((*XDb)(_db.XaDb), uintptr(1)).XzDbSName) != int32(0) {
+ goto _4
+ }
+ _zName = str(49962)
+ goto _3
+_4:
+ return nil
+}
+
+var _sqlite3FindTableØ00__func__Ø000 [17]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_sqlite3FindTableØ00__func__Ø000[0], str(86735), 17)
+}
+
+// C comment
+// /*
+// ** This callback is invoked once for each index when reading the
+// ** sqlite_stat1 table.
+// **
+// ** argv[0] = name of the table
+// ** argv[1] = name of the index (might be NULL)
+// ** argv[2] = results of analysis - on integer for each column
+// **
+// ** Entries for which argv[1]==NULL simply record the number of rows in
+// ** the table.
+// */
+func _analysisLoader(tls *crt.TLS, _pData unsafe.Pointer, _argc int32, _argv **int8, _NotUsed **int8) (r0 int32) {
+ var _6_nCol int32
+ var _z *int8
+ var _6_aiRowEst *uint32
+ var _pTable *XTable
+ var _pIndex *XIndex
+ var _8_fakeIdx XIndex
+ var _pInfo *XanalysisInfo
+ _pInfo = (*XanalysisInfo)(_pData)
+ func() {
+ if _argc != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98427), unsafe.Pointer(&_analysisLoaderØ00__func__Ø000), unsafe.Pointer(str(50249)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _ = _argc
+
+ if ((_argv == nil) || ((*elem0(_argv, 0)) == nil)) || ((*elem0(_argv, uintptr(2))) == nil) {
+ return int32(0)
+ }
+ _pTable = _sqlite3FindTable(tls, (*Xsqlite3)(_pInfo.Xdb), *elem0(_argv, 0), _pInfo.XzDatabase)
+ if _pTable == nil {
+ return int32(0)
+ }
+ if (*elem0(_argv, uintptr(1))) == nil {
+ _pIndex = nil
+ goto _9
+ }
+ if Xsqlite3_stricmp(tls, *elem0(_argv, 0), *elem0(_argv, uintptr(1))) == int32(0) {
+ _pIndex = _sqlite3PrimaryKeyIndex(tls, _pTable)
+ goto _9
+ }
+ _pIndex = _sqlite3FindIndex(tls, (*Xsqlite3)(_pInfo.Xdb), *elem0(_argv, uintptr(1)), _pInfo.XzDatabase)
+_9:
+ _z = *elem0(_argv, uintptr(2))
+ if _pIndex == nil {
+ goto _10
+ }
+ _6_aiRowEst = nil
+ _6_nCol = int32(_pIndex.XnKeyCol) + int32(1)
+ storebits5(&_pIndex.XidxType, 0, 4, 2)
+ _decodeIntArray(tls, _z, _6_nCol, _6_aiRowEst, _pIndex.XaiRowLogEst, _pIndex)
+ storebits5(&_pIndex.XidxType, int8(1), 128, 7)
+ if (*XExpr)(_pIndex.XpPartIdxWhere) == nil {
+ _pTable.XnRowLogEst = *elem50(_pIndex.XaiRowLogEst, 0)
+ _pTable.XtabFlags |= uint32(16)
+ }
+ goto _12
+_10:
+ _8_fakeIdx.XszIdxRow = _pTable.XszTabRow
+ _decodeIntArray(tls, _z, int32(1), nil, &_pTable.XnRowLogEst, &_8_fakeIdx)
+ _pTable.XszTabRow = _8_fakeIdx.XszIdxRow
+ _pTable.XtabFlags |= uint32(16)
+_12:
+ return int32(0)
+}
+
+var _analysisLoaderØ00__func__Ø000 [15]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_analysisLoaderØ00__func__Ø000[0], str(86752), 15)
+}
+
+// C comment
+// /*
+// ** The first argument points to a nul-terminated string containing a
+// ** list of space separated integers. Read the first nOut of these into
+// ** the array aOut[].
+// */
+func _decodeIntArray(tls *crt.TLS, _zIntArray *int8, _nOut int32, _aOut *uint32, _aLog *int16, _pIndex *XIndex) {
+ var _c, _i int32
+ var _v uint32
+ var _z *int8
+ _z = _zIntArray
+ func() {
+ if _z == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98365), unsafe.Pointer(&_decodeIntArrayØ00__func__Ø000), unsafe.Pointer(str(44406)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _i = int32(0)
+_2:
+ if (*_z) == 0 || _i >= _nOut {
+ goto _6
+ }
+ _v = 0
+_7:
+ if (store2(&_c, int32(*elem1(_z, 0))) >= int32(48)) && (_c <= int32(57)) {
+ _v = ((_v * uint32(10)) + uint32(_c)) - uint32(48)
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
+ goto _7
+ }
+ func() {
+ if _aOut != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98377), unsafe.Pointer(&_decodeIntArrayØ00__func__Ø000), unsafe.Pointer(str(86767)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+
+ func() {
+ if _aLog == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98379), unsafe.Pointer(&_decodeIntArrayØ00__func__Ø000), unsafe.Pointer(str(86775)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ *elem50(_aLog, uintptr(_i)) = _sqlite3LogEst(tls, uint64(_v))
+ if int32(*_z) == int32(32) {
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
+ }
+ _i += 1
+ goto _2
+_6:
+ func() {
+ if _pIndex == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98385), unsafe.Pointer(&_decodeIntArrayØ00__func__Ø000), unsafe.Pointer(str(86783)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ storebits5(&_pIndex.XidxType, 0, 4, 2)
+ storebits5(&_pIndex.XidxType, 0, 64, 6)
+_17:
+ if (*elem1(_z, 0)) == 0 {
+ goto _18
+ }
+ if Xsqlite3_strglob(tls, str(86793), _z) == int32(0) {
+ storebits5(&_pIndex.XidxType, int8(1), 4, 2)
+ goto _23
+ }
+ if Xsqlite3_strglob(tls, str(86804), _z) == int32(0) {
+ _pIndex.XszIdxRow = _sqlite3LogEst(tls, uint64(_sqlite3Atoi(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(int32(3)))))))
+ goto _23
+ }
+ if Xsqlite3_strglob(tls, str(86814), _z) == int32(0) {
+ storebits5(&_pIndex.XidxType, int8(1), 64, 6)
+ }
+_23:
+ if (int32(*elem1(_z, 0)) != int32(0)) && (int32(*elem1(_z, 0)) != int32(32)) {
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
+ goto _23
+ }
+_25:
+ if int32(*elem1(_z, 0)) == int32(32) {
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
+ goto _25
+ }
+ goto _17
+_18:
+}
+
+var _decodeIntArrayØ00__func__Ø000 [15]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_decodeIntArrayØ00__func__Ø000[0], str(86826), 15)
+}
+
+// C comment
+// /*
+// ** The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and
+// ** non-zero if there is no match.
+// */
+func Xsqlite3_strglob(tls *crt.TLS, _zGlobPattern *int8, _zString *int8) (r0 int32) {
+ return _patternCompare(tls, (*uint8)(unsafe.Pointer(_zGlobPattern)), (*uint8)(unsafe.Pointer(_zString)), &_globInfo, uint32(91))
+}
+
+// C comment
+// /*
+// ** Compare two UTF-8 strings for equality where the first string is
+// ** a GLOB or LIKE expression. Return values:
+// **
+// ** SQLITE_MATCH: Match
+// ** SQLITE_NOMATCH: No match
+// ** SQLITE_NOWILDCARDMATCH: No match in spite of having * or % wildcards.
+// **
+// ** Globbing rules:
+// **
+// ** '*' Matches any sequence of zero or more characters.
+// **
+// ** '?' Matches exactly one character.
+// **
+// ** [...] Matches one character from the enclosed list of
+// ** characters.
+// **
+// ** [^...] Matches one character not in the enclosed list.
+// **
+// ** With the [...] and [^...] matching, a ']' character can be included
+// ** in the list by making it the first character after '[' or '^'. A
+// ** range of characters can be specified using '-'. Example:
+// ** "[a-z]" matches any single lower-case letter. To match a '-', make
+// ** it the last character in the list.
+// **
+// ** Like matching rules:
+// **
+// ** '%' Matches any sequence of zero or more characters
+// **
+// *** '_' Matches any one character
+// **
+// ** Ec Where E is the "esc" character and c is any other
+// ** character, including '%', '_', and esc, match exactly c.
+// **
+// ** The comments within this routine usually assume glob matching.
+// **
+// ** This routine is usually quick, but can be N**2 in the worst case.
+// */
+func _patternCompare(tls *crt.TLS, _zPattern *uint8, _zString *uint8, _pInfo *TcompareInfo, _matchOther uint32) (r0 int32) {
+ var _9_bMatch, _13_bMatch, _17_bMatch, _21_seen, _21_invert int32
+ var _c, _c2, _matchOne, _matchAll, _13_cx, _21_prior_c uint32
+ var _noCase uint8
+ var _zEscaped *uint8
+ _matchOne = uint32(_pInfo.XmatchOne)
+ _matchAll = uint32(_pInfo.XmatchAll)
+ _noCase = _pInfo.XnoCase
+ _zEscaped = nil
+_0:
+ if store23(&_c, func() uint32 {
+ if int32(*elem15(_zPattern, 0)) < int32(128) {
+ return uint32(*postInc15(&_zPattern, 1))
+ }
+ return _sqlite3Utf8Read(tls, &_zPattern)
+ }()) == (0) {
+ goto _1
+ }
+ if _c != _matchAll {
+ goto _4
+ }
+_5:
+ if store23(&_c, func() uint32 {
+ if int32(*elem15(_zPattern, 0)) < int32(128) {
+ return uint32(*postInc15(&_zPattern, 1))
+ }
+ return _sqlite3Utf8Read(tls, &_zPattern)
+ }()) != _matchAll && _c != _matchOne {
+ goto _6
+ }
+ if (_c == _matchOne) && (_sqlite3Utf8Read(tls, &_zString) == (0)) {
+ return int32(2)
+ }
+ goto _5
+_6:
+ if _c == (0) {
+ return int32(0)
+ }
+ if _c != _matchOther {
+ goto _14
+ }
+ if int32(_pInfo.XmatchSet) != int32(0) {
+ goto _15
+ }
+ _c = _sqlite3Utf8Read(tls, &_zPattern)
+ if _c == (0) {
+ return int32(2)
+ }
+ goto _17
+_15:
+ func() {
+ if _matchOther >= uint32(128) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106217), unsafe.Pointer(&_patternCompareØ00__func__Ø000), unsafe.Pointer(str(86841)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+_20:
+ if (*_zString) == 0 {
+ goto _21
+ }
+ _9_bMatch = _patternCompare(tls, elem15(_zPattern, uintptr(4294967295)), _zString, _pInfo, _matchOther)
+ if _9_bMatch != int32(1) {
+ return _9_bMatch
+ }
+ if int32(*postInc15(&_zString, 1)) < int32(192) {
+ goto _23
+ }
+_24:
+ if (int32(*_zString) & int32(192)) == int32(128) {
+ *(*uintptr)(unsafe.Pointer(&_zString)) += uintptr(1)
+ goto _24
+ }
+_23:
+ goto _20
+_21:
+ return int32(2)
+
+_17:
+_14:
+ if _c > uint32(128) {
+ goto _26
+ }
+ if _noCase != 0 {
+ _13_cx = _c & uint32(^(int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(_c)))) & int32(32)))
+ _c = uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(_c))))
+ goto _28
+ }
+ _13_cx = _c
+_28:
+ if store23(&_c2, uint32(*postInc15(&_zString, 1))) == (0) {
+ goto _30
+ }
+ if (_c2 != _c) && (_c2 != _13_cx) {
+ goto _28
+ }
+ _13_bMatch = _patternCompare(tls, _zPattern, _zString, _pInfo, _matchOther)
+ if _13_bMatch != int32(1) {
+ return _13_bMatch
+ }
+ goto _28
+_30:
+ goto _34
+_26:
+_35:
+ if store23(&_c2, func() uint32 {
+ if int32(*elem15(_zString, 0)) < int32(128) {
+ return uint32(*postInc15(&_zString, 1))
+ }
+ return _sqlite3Utf8Read(tls, &_zString)
+ }()) == (0) {
+ goto _36
+ }
+ if _c2 != _c {
+ goto _35
+ }
+ _17_bMatch = _patternCompare(tls, _zPattern, _zString, _pInfo, _matchOther)
+ if _17_bMatch != int32(1) {
+ return _17_bMatch
+ }
+ goto _35
+_36:
+_34:
+ return int32(2)
+
+_4:
+ if _c != _matchOther {
+ goto _41
+ }
+ if int32(_pInfo.XmatchSet) != int32(0) {
+ goto _42
+ }
+ _c = _sqlite3Utf8Read(tls, &_zPattern)
+ if _c == (0) {
+ return int32(1)
+ }
+ _zEscaped = _zPattern
+ goto _44
+_42:
+ _21_prior_c = 0
+ _21_seen = int32(0)
+ _21_invert = int32(0)
+ _c = _sqlite3Utf8Read(tls, &_zString)
+ if _c == (0) {
+ return int32(1)
+ }
+ _c2 = _sqlite3Utf8Read(tls, &_zPattern)
+ if _c2 == uint32(94) {
+ _21_invert = int32(1)
+ _c2 = _sqlite3Utf8Read(tls, &_zPattern)
+ }
+ if _c2 != uint32(93) {
+ goto _47
+ }
+ if _c == uint32(93) {
+ _21_seen = int32(1)
+ }
+ _c2 = _sqlite3Utf8Read(tls, &_zPattern)
+_47:
+ if _c2 == 0 || _c2 == uint32(93) {
+ goto _50
+ }
+ if _c2 != uint32(45) || int32(*elem15(_zPattern, 0)) == int32(93) || int32(*elem15(_zPattern, 0)) == int32(0) || _21_prior_c <= (0) {
+ goto _55
+ }
+ _c2 = _sqlite3Utf8Read(tls, &_zPattern)
+ if (_c >= _21_prior_c) && (_c <= _c2) {
+ _21_seen = int32(1)
+ }
+ _21_prior_c = 0
+ goto _58
+_55:
+ if _c == _c2 {
+ _21_seen = int32(1)
+ }
+ _21_prior_c = _c2
+_58:
+ _c2 = _sqlite3Utf8Read(tls, &_zPattern)
+ goto _47
+_50:
+ if (_c2 == (0)) || ((_21_seen ^ _21_invert) == int32(0)) {
+ return int32(1)
+ }
+ goto _0
+_44:
+_41:
+ _c2 = func() uint32 {
+ if int32(*elem15(_zString, 0)) < int32(128) {
+ return uint32(*postInc15(&_zString, 1))
+ }
+ return _sqlite3Utf8Read(tls, &_zString)
+ }()
+ if _c == _c2 {
+ goto _0
+ }
+ if (((_noCase != 0) && (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(_c)))) == int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(_c2)))))) && (_c < uint32(128))) && (_c2 < uint32(128)) {
+ goto _0
+ }
+ if ((_c == _matchOne) && (_zPattern != _zEscaped)) && (_c2 != (0)) {
+ goto _0
+ }
+ return int32(1)
+
+_1:
+ return func() int32 {
+ if int32(*_zString) == int32(0) {
+ return int32(0)
+ }
+ return int32(1)
+ }()
+}
+
+func _sqlite3Utf8Read(tls *crt.TLS, _pz **uint8) (r0 uint32) {
+ var _c uint32
+ _c = uint32(*postInc15(_pz, 1))
+ if _c < uint32(192) {
+ goto _0
+ }
+ _c = uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3Utf8Trans1)), uintptr(_c-uint32(192))))
+_1:
+ if (int32(*(*_pz)) & int32(192)) == int32(128) {
+ _c = (_c << 6) + uint32(int32(63)&int32(*postInc15(_pz, 1)))
+ goto _1
+ }
+ if ((_c < uint32(128)) || ((_c & uint32(4294965248)) == uint32(55296))) || ((_c & uint32(4294967294)) == uint32(65534)) {
+ _c = uint32(65533)
+ }
+_0:
+ return _c
+}
+
+var _patternCompareØ00__func__Ø000 [15]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_patternCompareØ00__func__Ø000[0], str(86857), 15)
+}
+
+var _globInfo TcompareInfo
+
+func init() {
+ _globInfo = TcompareInfo{XmatchAll: uint8(42), XmatchOne: uint8(63), XmatchSet: uint8(91)}
+}
+
+// C comment
+// /*
+// ** Fill the Index.aiRowEst[] array with default information - information
+// ** to be used when we have not run the ANALYZE command.
+// **
+// ** aiRowEst[0] is supposed to contain the number of elements in the index.
+// ** Since we do not know, guess 1 million. aiRowEst[1] is an estimate of the
+// ** number of rows in the table that match any particular value of the
+// ** first column of the index. aiRowEst[2] is an estimate of the number
+// ** of rows that match any particular combination of the first 2 columns
+// ** of the index. And so forth. It must always be the case that
+// *
+// ** aiRowEst[N]<=aiRowEst[N-1]
+// ** aiRowEst[N]>=1
+// **
+// ** Apart from that, we have little to go on besides intuition as to
+// ** how aiRowEst[] should be initialized. The numbers generated here
+// ** are based on typical values found in actual indices.
+// */
+func _sqlite3DefaultRowEst(tls *crt.TLS, _pIdx *XIndex) {
+ var _nCopy, _i int32
+ var _a *int16
+ var _aVal [5]int16
+ _aVal = [5]int16{int16(33), int16(32), int16(30), int16(28), int16(26)}
+ _a = _pIdx.XaiRowLogEst
+ _nCopy = func() int32 {
+ if int32(5) < int32(_pIdx.XnKeyCol) {
+ return int32(5)
+ }
+ return int32(_pIdx.XnKeyCol)
+ }()
+ func() {
+ if ((uint32(_pIdx.XidxType>>7) << 31) >> 31) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103155), unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000), unsafe.Pointer(str(86872)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ *elem50(_a, 0) = (*XTable)(_pIdx.XpTable).XnRowLogEst
+ if (*XExpr)(_pIdx.XpPartIdxWhere) != nil {
+ {
+ p := elem50(_a, 0)
+ *p = int16(int32(*p) - int32(10))
+ }
+ }
+ func() {
+ if int32(10) != int32(_sqlite3LogEst(tls, uint64(2))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103161), unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000), unsafe.Pointer(str(86888)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ if int32(*elem50(_a, 0)) < int32(33) {
+ *elem50(_a, 0) = int16(33)
+ }
+ func() {
+ if int32(33) != int32(_sqlite3LogEst(tls, uint64(10))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103162), unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000), unsafe.Pointer(str(86909)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ crt.Xmemcpy(tls, unsafe.Pointer(elem50(_a, uintptr(1))), unsafe.Pointer(&_aVal), uint32(_nCopy)*uint32(2))
+ _i = _nCopy + int32(1)
+_10:
+ if _i > int32(_pIdx.XnKeyCol) {
+ goto _13
+ }
+ *elem50(_a, uintptr(_i)) = int16(23)
+ func() {
+ if int32(23) != int32(_sqlite3LogEst(tls, uint64(5))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103168), unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000), unsafe.Pointer(str(86931)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _i += 1
+ goto _10
+_13:
+ func() {
+ if int32(0) != int32(_sqlite3LogEst(tls, uint64(1))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103171), unsafe.Pointer(&_sqlite3DefaultRowEstØ00__func__Ø000), unsafe.Pointer(str(46336)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ if int32(_pIdx.XonError) != int32(0) {
+ *elem50(_a, uintptr(_pIdx.XnKeyCol)) = 0
+ }
+ _ = _aVal
+}
+
+var _sqlite3DefaultRowEstØ00__func__Ø000 [21]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_sqlite3DefaultRowEstØ00__func__Ø000[0], str(86952), 21)
+}
+
+// C comment
+// /*
+// ** Unlink the given table from the hash tables and the delete the
+// ** table structure with all its indices and foreign keys.
+// */
func _sqlite3UnlinkAndDeleteTable(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _zTabName *int8) {
var _pDb *XDb
var _p *XTable
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100356), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteTableØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100356), unsafe.Pointer(&_sqlite3UnlinkAndDeleteTableØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iDb < i32(0) || _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100357), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteTableØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _iDb < int32(0) || _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100357), unsafe.Pointer(&_sqlite3UnlinkAndDeleteTableØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _zTabName == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100358), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteTableØ00__func__Ø000))), unsafe.Pointer(str(88451)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100358), unsafe.Pointer(&_sqlite3UnlinkAndDeleteTableØ00__func__Ø000), unsafe.Pointer(str(86973)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100359), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteTableØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100359), unsafe.Pointer(&_sqlite3UnlinkAndDeleteTableØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb)))
- _p = (*XTable)(_sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X2))), _zTabName, nil))
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb))
+ _p = (*XTable)(_sqlite3HashInsert(tls, &((*XSchema)(_pDb.XpSchema).XtblHash), _zTabName, nil))
_sqlite3DeleteTable(tls, _db, _p)
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(2)
- sink1(*p)
- }
+ _db.Xflags |= int32(2)
}
var _sqlite3UnlinkAndDeleteTableØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3UnlinkAndDeleteTableØ00__func__Ø000[0], str(88460), 28)
+ crt.Xstrncpy(nil, &_sqlite3UnlinkAndDeleteTableØ00__func__Ø000[0], str(86982), 28)
}
-// For the index called zIdxName which is found in the database iDb,
-// unlike that index from its Table then remove the index from
-// the index hash table and free all memory structures associated
-// with the index.
+// C comment
+// /*
+// ** For the index called zIdxName which is found in the database iDb,
+// ** unlike that index from its Table then remove the index from
+// ** the index hash table and free all memory structures associated
+// ** with the index.
+// */
func _sqlite3UnlinkAndDeleteIndex(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _zIdxName *int8) {
var _pHash *XHash
var _pIndex, _3_p *XIndex
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100160), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100160), unsafe.Pointer(&_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- _pHash = (*XHash)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4).X3)))
+ _pHash = &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).XidxHash)
_pIndex = (*XIndex)(_sqlite3HashInsert(tls, _pHash, _zIdxName, nil))
if func() int32 {
if _pIndex != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100163), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100163), unsafe.Pointer(&_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _4
}
- if (*XIndex)((*XTable)(_pIndex.X3).X2) == _pIndex {
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XTable)(_pIndex.X3).X2))))) = (*XIndex)(_pIndex.X5)
+ if (*XIndex)((*XTable)(_pIndex.XpTable).XpIndex) == _pIndex {
+ *(**XIndex)(unsafe.Pointer(&((*XTable)(_pIndex.XpTable).XpIndex))) = (*XIndex)(_pIndex.XpNext)
goto _6
}
- _3_p = (*XIndex)((*XTable)(_pIndex.X3).X2)
+ _3_p = (*XIndex)((*XTable)(_pIndex.XpTable).XpIndex)
_7:
if func() int32 {
if _3_p != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100171), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100171), unsafe.Pointer(&_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() != 0 && ((*XIndex)(_3_p.X5) != _pIndex) {
- _3_p = (*XIndex)(_3_p.X5)
+ }() != 0 && ((*XIndex)(_3_p.XpNext) != _pIndex) {
+ _3_p = (*XIndex)(_3_p.XpNext)
goto _7
}
if func() int32 {
- if (_3_p != nil) && ((*XIndex)(_3_p.X5) == _pIndex) {
- return i32(1)
+ if (_3_p != nil) && ((*XIndex)(_3_p.XpNext) == _pIndex) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100172), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100172), unsafe.Pointer(&_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_p.X5))))) = (*XIndex)(_pIndex.X5)
+ *(**XIndex)(unsafe.Pointer(&_3_p.XpNext)) = (*XIndex)(_pIndex.XpNext)
}
_6:
_freeIndex(tls, _db, _pIndex)
_4:
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(2)
- sink1(*p)
- }
+ _db.Xflags |= int32(2)
}
var _sqlite3UnlinkAndDeleteIndexØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000[0], str(88488), 28)
+ crt.Xstrncpy(nil, &_sqlite3UnlinkAndDeleteIndexØ00__func__Ø000[0], str(87010), 28)
}
-// Remove a trigger from the hash tables of the sqlite* pointer.
+// C comment
+// /*
+// ** Remove a trigger from the hash tables of the sqlite* pointer.
+// */
func _sqlite3UnlinkAndDeleteTrigger(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _zName *int8) {
var _pHash *XHash
var _pTrigger *XTrigger
@@ -67907,70 +68433,72 @@ func _sqlite3UnlinkAndDeleteTrigger(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _zN
var _2_pp **XTrigger
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123220), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteTriggerØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123220), unsafe.Pointer(&_sqlite3UnlinkAndDeleteTriggerØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- _pHash = (*XHash)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4).X4)))
+ _pHash = &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).XtrigHash)
_pTrigger = (*XTrigger)(_sqlite3HashInsert(tls, _pHash, _zName, nil))
if func() int32 {
if _pTrigger != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123223), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UnlinkAndDeleteTriggerØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123223), unsafe.Pointer(&_sqlite3UnlinkAndDeleteTriggerØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _4
}
- if (*XSchema)(_pTrigger.X6) != (*XSchema)(_pTrigger.X7) {
+ if (*XSchema)(_pTrigger.XpSchema) != (*XSchema)(_pTrigger.XpTabSchema) {
goto _5
}
_2_pTab = _tableOfTrigger(tls, _pTrigger)
- _2_pp = (**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pTab.X19)))))
+ _2_pp = (**XTrigger)(unsafe.Pointer(&_2_pTab.XpTrigger))
_6:
if (*_2_pp) == _pTrigger {
goto _9
}
- _2_pp = (**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*_2_pp).X9)))))
+ _2_pp = (**XTrigger)(unsafe.Pointer(&((*_2_pp).XpNext)))
goto _6
_9:
- *_2_pp = (*XTrigger)((*_2_pp).X9)
+ *_2_pp = (*XTrigger)((*_2_pp).XpNext)
_5:
_sqlite3DeleteTrigger(tls, _db, _pTrigger)
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(2)
- sink1(*p)
- }
+ _db.Xflags |= int32(2)
_4:
}
var _sqlite3UnlinkAndDeleteTriggerØ00__func__Ø000 [30]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3UnlinkAndDeleteTriggerØ00__func__Ø000[0], str(88516), 30)
+ crt.Xstrncpy(nil, &_sqlite3UnlinkAndDeleteTriggerØ00__func__Ø000[0], str(87038), 30)
}
-// Return a pointer to the Table structure for the table that a trigger
-// is set on.
+// C comment
+// /*
+// ** Return a pointer to the Table structure for the table that a trigger
+// ** is set on.
+// */
func _tableOfTrigger(tls *crt.TLS, _pTrigger *XTrigger) (r0 *XTable) {
- return (*XTable)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&((*XSchema)(_pTrigger.X7).X2))), _pTrigger.X1))
-}
-
-// This routine does a complete check of the given BTree file. aRoot[] is
-// an array of pages numbers were each page number is the root page of
-// a table. nRoot is the number of entries in aRoot.
-//
-// A read-only or read-write transaction must be opened before calling
-// this function.
-//
-// Write the number of error seen in *pnErr. Except for some memory
-// allocation errors, an error message held in memory obtained from
-// malloc is returned if *pnErr is non-zero. If *pnErr==0 then NULL is
-// returned. If a memory allocation error occurs, NULL is returned.
+ return (*XTable)(_sqlite3HashFind(tls, &((*XSchema)(_pTrigger.XpTabSchema).XtblHash), _pTrigger.Xtable))
+}
+
+// C comment
+// /*
+// ** This routine does a complete check of the given BTree file. aRoot[] is
+// ** an array of pages numbers were each page number is the root page of
+// ** a table. nRoot is the number of entries in aRoot.
+// **
+// ** A read-only or read-write transaction must be opened before calling
+// ** this function.
+// **
+// ** Write the number of error seen in *pnErr. Except for some memory
+// ** allocation errors, an error message held in memory obtained from
+// ** malloc is returned if *pnErr is non-zero. If *pnErr==0 then NULL is
+// ** returned. If a memory allocation error occurs, NULL is returned.
+// */
func _sqlite3BtreeIntegrityCheck(tls *crt.TLS, _p *XBtree, _aRoot *int32, _nRoot int32, _mxErr int32, _pnErr *int32) (r0 *int8) {
var _savedDbFlags, _nRef int32
var _4_notUsed int64
@@ -67978,145 +68506,144 @@ func _sqlite3BtreeIntegrityCheck(tls *crt.TLS, _p *XBtree, _aRoot *int32, _nRoot
var _zErr [100]int8
var _pBt *XBtShared
var _sCheck XIntegrityCk
- _pBt = (*XBtShared)(_p.X1)
- _savedDbFlags = (*Xsqlite3)(_pBt.X1).X6
+ _pBt = (*XBtShared)(_p.XpBt)
+ _savedDbFlags = (*Xsqlite3)(_pBt.Xdb).Xflags
_sqlite3BtreeEnter(tls, _p)
func() {
- if int32(_p.X2) <= i32(0) || int32(_pBt.X8) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68515), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIntegrityCheckØ00__func__Ø000))), unsafe.Pointer(str(88546)))
+ if int32(_p.XinTrans) <= int32(0) || int32(_pBt.XinTransaction) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68515), unsafe.Pointer(&_sqlite3BtreeIntegrityCheckØ00__func__Ø000), unsafe.Pointer(str(87068)))
crt.X__builtin_abort(tls)
}
}()
- _nRef = _sqlite3PagerRefcount(tls, (*XPager)(_pBt.X0))
+ _nRef = _sqlite3PagerRefcount(tls, (*XPager)(_pBt.XpPager))
func() {
- if _nRef < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68517), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIntegrityCheckØ00__func__Ø000))), unsafe.Pointer(str(88601)))
+ if _nRef < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68517), unsafe.Pointer(&_sqlite3BtreeIntegrityCheckØ00__func__Ø000), unsafe.Pointer(str(87123)))
crt.X__builtin_abort(tls)
}
}()
- *(**XBtShared)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sCheck.X0))))) = _pBt
- *(**XPager)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sCheck.X1))))) = (*XPager)(_pBt.X0)
- *(*uint32)(unsafe.Pointer(&(_sCheck.X3))) = _btreePagecount(tls, (*XBtShared)(_sCheck.X0))
- *(*int32)(unsafe.Pointer(&(_sCheck.X4))) = _mxErr
- *(*int32)(unsafe.Pointer(&(_sCheck.X5))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_sCheck.X6))) = i32(0)
- *(**int8)(unsafe.Pointer(&(_sCheck.X7))) = nil
- *(*int32)(unsafe.Pointer(&(_sCheck.X8))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_sCheck.X9))) = i32(0)
- *(**uint8)(unsafe.Pointer(&(_sCheck.X2))) = nil
- *(**uint32)(unsafe.Pointer(&(_sCheck.X11))) = nil
- _sqlite3StrAccumInit(tls, (*XStrAccum)(unsafe.Pointer(&(_sCheck.X10))), nil, (*int8)(unsafe.Pointer(&_zErr)), int32(u32(100)), i32(1000000000))
- *(*uint8)(unsafe.Pointer(&((*XStrAccum)(unsafe.Pointer(&(_sCheck.X10))).X7))) = uint8(i32(1))
- if (_sCheck.X3) == uint32(i32(0)) {
+ *(**XBtShared)(unsafe.Pointer(&_sCheck.XpBt)) = _pBt
+ *(**XPager)(unsafe.Pointer(&_sCheck.XpPager)) = (*XPager)(_pBt.XpPager)
+ _sCheck.XnPage = _btreePagecount(tls, (*XBtShared)(_sCheck.XpBt))
+ _sCheck.XmxErr = _mxErr
+ _sCheck.XnErr = int32(0)
+ _sCheck.XmallocFailed = int32(0)
+ _sCheck.XzPfx = nil
+ _sCheck.Xv1 = int32(0)
+ _sCheck.Xv2 = int32(0)
+ _sCheck.XaPgRef = nil
+ _sCheck.Xheap = nil
+ _sqlite3StrAccumInit(tls, &_sCheck.XerrMsg, nil, (*int8)(unsafe.Pointer(&_zErr)), int32(100), int32(1000000000))
+ _sCheck.XerrMsg.XprintfFlags = uint8(1)
+ if _sCheck.XnPage == (0) {
goto _integrity_ck_cleanup
}
- *(**uint8)(unsafe.Pointer(&(_sCheck.X2))) = (*uint8)(_sqlite3MallocZero(tls, uint64(((_sCheck.X3)/uint32(i32(8)))+uint32(i32(1)))))
- if (_sCheck.X2) == nil {
- *(*int32)(unsafe.Pointer(&(_sCheck.X6))) = i32(1)
+ _sCheck.XaPgRef = (*uint8)(_sqlite3MallocZero(tls, uint64((_sCheck.XnPage/uint32(8))+uint32(1))))
+ if _sCheck.XaPgRef == nil {
+ _sCheck.XmallocFailed = int32(1)
goto _integrity_ck_cleanup
}
- *(**uint32)(unsafe.Pointer(&(_sCheck.X11))) = (*uint32)(_sqlite3PageMalloc(tls, int32(_pBt.X15)))
- if (_sCheck.X11) == nil {
- *(*int32)(unsafe.Pointer(&(_sCheck.X6))) = i32(1)
+ _sCheck.Xheap = (*uint32)(_sqlite3PageMalloc(tls, int32(_pBt.XpageSize)))
+ if _sCheck.Xheap == nil {
+ _sCheck.XmallocFailed = int32(1)
goto _integrity_ck_cleanup
}
- _i = (uint32(_sqlite3PendingByte) / (_pBt.X15)) + uint32(i32(1))
- if _i <= (_sCheck.X3) {
+ _i = (uint32(_sqlite3PendingByte) / _pBt.XpageSize) + uint32(1)
+ if _i <= _sCheck.XnPage {
_setPageReferenced(tls, &_sCheck, _i)
}
- *(**int8)(unsafe.Pointer(&(_sCheck.X7))) = str(88609)
- _checkList(tls, &_sCheck, i32(1), int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(32)))))), int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(36)))))))
- *(**int8)(unsafe.Pointer(&(_sCheck.X7))) = nil
- {
- p := (*int32)(unsafe.Pointer(&((*Xsqlite3)(_pBt.X1).X6)))
- *p = (*p) & i32(-536870913)
- sink1(*p)
- }
- _i = uint32(i32(0))
+ _sCheck.XzPfx = str(87131)
+ _checkList(tls, &_sCheck, int32(1), int32(_sqlite3Get4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(32)))), int32(_sqlite3Get4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(36)))))
+ _sCheck.XzPfx = nil
+ (*Xsqlite3)(_pBt.Xdb).Xflags &= int32(-536870913)
+ _i = 0
_9:
- if int32(_i) >= _nRoot || (_sCheck.X4) == 0 {
+ if int32(_i) >= _nRoot || _sCheck.XmxErr == 0 {
goto _13
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRoot)) + 4*uintptr(_i)))) == i32(0) {
+ if (*elem8(_aRoot, uintptr(_i))) == int32(0) {
goto _10
}
- if ((_pBt.X5) != 0) && ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRoot)) + 4*uintptr(_i)))) > i32(1)) {
- _checkPtrmap(tls, &_sCheck, uint32(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRoot)) + 4*uintptr(_i)))), uint8(i32(1)), uint32(i32(0)))
+ if (_pBt.XautoVacuum != 0) && ((*elem8(_aRoot, uintptr(_i))) > int32(1)) {
+ _checkPtrmap(tls, &_sCheck, uint32(*elem8(_aRoot, uintptr(_i))), uint8(1), 0)
}
- _checkTreePage(tls, &_sCheck, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRoot)) + 4*uintptr(_i))), &_4_notUsed, i64(9223372036854775807))
+ _checkTreePage(tls, &_sCheck, *elem8(_aRoot, uintptr(_i)), &_4_notUsed, int64(9223372036854775807))
_10:
_i += 1
goto _9
_13:
- *(*int32)(unsafe.Pointer(&((*Xsqlite3)(_pBt.X1).X6))) = _savedDbFlags
- _i = uint32(i32(1))
+ (*Xsqlite3)(_pBt.Xdb).Xflags = _savedDbFlags
+ _i = uint32(1)
_17:
- if _i > (_sCheck.X3) || (_sCheck.X4) == 0 {
+ if _i > _sCheck.XnPage || _sCheck.XmxErr == 0 {
goto _integrity_ck_cleanup
}
- if (_getPageReferenced(tls, &_sCheck, _i) == i32(0)) && ((_ptrmapPageno(tls, _pBt, _i) != _i) || ((_pBt.X5) == 0)) {
- _checkAppendMsg(tls, &_sCheck, str(88625), _i)
+ if (_getPageReferenced(tls, &_sCheck, _i) == int32(0)) && ((_ptrmapPageno(tls, _pBt, _i) != _i) || (_pBt.XautoVacuum == 0)) {
+ _checkAppendMsg(tls, &_sCheck, str(87147), _i)
}
- if (_getPageReferenced(tls, &_sCheck, _i) != i32(0)) && ((_ptrmapPageno(tls, _pBt, _i) == _i) && ((_pBt.X5) != 0)) {
- _checkAppendMsg(tls, &_sCheck, str(88647), _i)
+ if (_getPageReferenced(tls, &_sCheck, _i) != int32(0)) && ((_ptrmapPageno(tls, _pBt, _i) == _i) && (_pBt.XautoVacuum != 0)) {
+ _checkAppendMsg(tls, &_sCheck, str(87169), _i)
}
_i += 1
goto _17
_integrity_ck_cleanup:
- _sqlite3PageFree(tls, (unsafe.Pointer)(_sCheck.X11))
- Xsqlite3_free(tls, (unsafe.Pointer)(_sCheck.X2))
- if (_sCheck.X6) != 0 {
- _sqlite3StrAccumReset(tls, (*XStrAccum)(unsafe.Pointer(&(_sCheck.X10))))
- *(*int32)(unsafe.Pointer(&(_sCheck.X5))) += 1
+ _sqlite3PageFree(tls, unsafe.Pointer(_sCheck.Xheap))
+ Xsqlite3_free(tls, unsafe.Pointer(_sCheck.XaPgRef))
+ if _sCheck.XmallocFailed != 0 {
+ _sqlite3StrAccumReset(tls, &_sCheck.XerrMsg)
+ _sCheck.XnErr += 1
}
- *_pnErr = _sCheck.X5
- if (_sCheck.X5) == i32(0) {
- _sqlite3StrAccumReset(tls, (*XStrAccum)(unsafe.Pointer(&(_sCheck.X10))))
+ *_pnErr = _sCheck.XnErr
+ if _sCheck.XnErr == int32(0) {
+ _sqlite3StrAccumReset(tls, &_sCheck.XerrMsg)
}
func() {
- if _nRef != _sqlite3PagerRefcount(tls, (*XPager)(_pBt.X0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68606), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIntegrityCheckØ00__func__Ø000))), unsafe.Pointer(str(88681)))
+ if _nRef != _sqlite3PagerRefcount(tls, (*XPager)(_pBt.XpPager)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68606), unsafe.Pointer(&_sqlite3BtreeIntegrityCheckØ00__func__Ø000), unsafe.Pointer(str(87203)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeLeave(tls, _p)
- return _sqlite3StrAccumFinish(tls, (*XStrAccum)(unsafe.Pointer(&(_sCheck.X10))))
+ return _sqlite3StrAccumFinish(tls, &_sCheck.XerrMsg)
- _ = _sCheck
_ = _zErr
- _ = _4_notUsed
panic(0)
}
var _sqlite3BtreeIntegrityCheckØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeIntegrityCheckØ00__func__Ø000[0], str(88721), 27)
+ crt.Xstrncpy(nil, &_sqlite3BtreeIntegrityCheckØ00__func__Ø000[0], str(87243), 27)
}
-// Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg.
+// C comment
+// /*
+// ** Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg.
+// */
func _setPageReferenced(tls *crt.TLS, _pCheck *XIntegrityCk, _iPg uint32) {
func() {
- if _iPg > (_pCheck.X3) || i32(1) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68037), unsafe.Pointer((*int8)(unsafe.Pointer(&_setPageReferencedØ00__func__Ø000))), unsafe.Pointer(str(88748)))
+ if _iPg > _pCheck.XnPage || int32(1) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68037), unsafe.Pointer(&_setPageReferencedØ00__func__Ø000), unsafe.Pointer(str(87270)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCheck.X2)) + 1*uintptr(_iPg/uint32(i32(8)))))
- *p = uint8(int32(*p) | (i32(1) << uint(int32(_iPg&uint32(i32(7))))))
- sink2(*p)
+ p := elem15(_pCheck.XaPgRef, uintptr(_iPg/uint32(8)))
+ *p = uint8(int32(*p) | (int32(1) << uint(int32(_iPg&uint32(7)))))
}
}
var _setPageReferencedØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_setPageReferencedØ00__func__Ø000[0], str(88799), 18)
+ crt.Xstrncpy(nil, &_setPageReferencedØ00__func__Ø000[0], str(87321), 18)
}
-// Check the integrity of the freelist or of an overflow page list.
-// Verify that the number of pages on the list is N.
+// C comment
+// /*
+// ** Check the integrity of the freelist or of an overflow page list.
+// ** Verify that the number of pages on the list is N.
+// */
func _checkList(tls *crt.TLS, _pCheck *XIntegrityCk, _isFreeList int32, _iPage int32, _N int32) {
var _i, _expected, _iFirst, _4_n int32
var _8_iFreePage uint32
@@ -68125,164 +68652,175 @@ func _checkList(tls *crt.TLS, _pCheck *XIntegrityCk, _isFreeList int32, _iPage i
_expected = _N
_iFirst = _iPage
_0:
- if postInc1(&_N, int32(-1)) <= i32(0) || (_pCheck.X4) == 0 {
+ if postInc2(&_N, -1) <= int32(0) || _pCheck.XmxErr == 0 {
goto _1
}
- if _iPage < i32(1) {
- _checkAppendMsg(tls, _pCheck, str(88817), _N+i32(1), _expected, _iFirst)
+ if _iPage < int32(1) {
+ _checkAppendMsg(tls, _pCheck, str(87339), _N+int32(1), _expected, _iFirst)
goto _1
}
if _checkRef(tls, _pCheck, uint32(_iPage)) != 0 {
goto _1
}
- if _sqlite3PagerGet(tls, (*XPager)(_pCheck.X1), uint32(_iPage), &_1_pOvflPage, i32(0)) != 0 {
- _checkAppendMsg(tls, _pCheck, str(88874), _iPage)
+ if _sqlite3PagerGet(tls, (*XPager)(_pCheck.XpPager), uint32(_iPage), &_1_pOvflPage, int32(0)) != 0 {
+ _checkAppendMsg(tls, _pCheck, str(87396), _iPage)
goto _1
}
_1_pOvflData = (*uint8)(_sqlite3PagerGetData(tls, _1_pOvflPage))
if _isFreeList == 0 {
goto _6
}
- _4_n = int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pOvflData))+1*uintptr(i32(4))))))
- if ((*XBtShared)(_pCheck.X0).X5) != 0 {
- _checkPtrmap(tls, _pCheck, uint32(_iPage), uint8(i32(2)), uint32(i32(0)))
+ _4_n = int32(_sqlite3Get4byte(tls, elem15(_1_pOvflData, uintptr(4))))
+ if ((*XBtShared)(_pCheck.XpBt).XautoVacuum) != 0 {
+ _checkPtrmap(tls, _pCheck, uint32(_iPage), uint8(2), 0)
}
- if _4_n > ((int32((*XBtShared)(_pCheck.X0).X16) / i32(4)) - i32(2)) {
- _checkAppendMsg(tls, _pCheck, str(88896), _iPage)
+ if _4_n > ((int32((*XBtShared)(_pCheck.XpBt).XusableSize) / int32(4)) - int32(2)) {
+ _checkAppendMsg(tls, _pCheck, str(87418), _iPage)
_N -= 1
goto _9
}
- _i = i32(0)
+ _i = int32(0)
_10:
if _i >= _4_n {
goto _13
}
- _8_iFreePage = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pOvflData))+1*uintptr(i32(8)+(_i*i32(4))))))
- if ((*XBtShared)(_pCheck.X0).X5) != 0 {
- _checkPtrmap(tls, _pCheck, _8_iFreePage, uint8(i32(2)), uint32(i32(0)))
+ _8_iFreePage = _sqlite3Get4byte(tls, elem15(_1_pOvflData, uintptr(int32(8)+(_i*int32(4)))))
+ if ((*XBtShared)(_pCheck.XpBt).XautoVacuum) != 0 {
+ _checkPtrmap(tls, _pCheck, _8_iFreePage, uint8(2), 0)
}
_checkRef(tls, _pCheck, _8_iFreePage)
_i += 1
goto _10
_13:
- {
- p := &_N
- *p = (*p) - _4_n
- sink1(*p)
- }
+ _N -= _4_n
_9:
goto _15
_6:
- if (((*XBtShared)(_pCheck.X0).X5) != 0) && (_N > i32(0)) {
+ if (((*XBtShared)(_pCheck.XpBt).XautoVacuum) != 0) && (_N > int32(0)) {
_i = int32(_sqlite3Get4byte(tls, _1_pOvflData))
- _checkPtrmap(tls, _pCheck, uint32(_i), uint8(i32(4)), uint32(_iPage))
+ _checkPtrmap(tls, _pCheck, uint32(_i), uint8(4), uint32(_iPage))
}
_15:
_iPage = int32(_sqlite3Get4byte(tls, _1_pOvflData))
_sqlite3PagerUnref(tls, _1_pOvflPage)
- if _isFreeList != 0 && (_N < bool2int(_iPage != i32(0))) {
- _checkAppendMsg(tls, _pCheck, str(88935))
+ if _isFreeList != 0 && (_N < bool2int(_iPage != int32(0))) {
+ _checkAppendMsg(tls, _pCheck, str(87457))
}
goto _0
_1:
}
-// Append a message to the error message string.
+// C comment
+// /*
+// ** Append a message to the error message string.
+// */
func _checkAppendMsg(tls *crt.TLS, _pCheck *XIntegrityCk, _zFormat *int8, args ...interface{}) {
var _ap []interface{}
- if (_pCheck.X4) == 0 {
+ if _pCheck.XmxErr == 0 {
return
}
- *(*int32)(unsafe.Pointer(&(_pCheck.X4))) -= 1
- *(*int32)(unsafe.Pointer(&(_pCheck.X5))) += 1
+ _pCheck.XmxErr -= 1
+ _pCheck.XnErr += 1
_ap = args
- if ((*XStrAccum)(unsafe.Pointer(&(_pCheck.X10))).X3) != 0 {
- _sqlite3StrAccumAppend(tls, (*XStrAccum)(unsafe.Pointer(&(_pCheck.X10))), str(37700), i32(1))
+ if (_pCheck.XerrMsg.XnChar) != 0 {
+ _sqlite3StrAccumAppend(tls, &_pCheck.XerrMsg, str(37655), int32(1))
}
- if (_pCheck.X7) != nil {
- _sqlite3XPrintf(tls, (*XStrAccum)(unsafe.Pointer(&(_pCheck.X10))), _pCheck.X7, _pCheck.X8, _pCheck.X9)
+ if _pCheck.XzPfx != nil {
+ _sqlite3XPrintf(tls, &_pCheck.XerrMsg, _pCheck.XzPfx, _pCheck.Xv1, _pCheck.Xv2)
}
- _sqlite3VXPrintf(tls, (*XStrAccum)(unsafe.Pointer(&(_pCheck.X10))), _zFormat, _ap)
+ _sqlite3VXPrintf(tls, &_pCheck.XerrMsg, _zFormat, _ap)
_ap = nil
- if int32((*XStrAccum)(unsafe.Pointer(&(_pCheck.X10))).X6) == i32(1) {
- *(*int32)(unsafe.Pointer(&(_pCheck.X6))) = i32(1)
+ if int32(_pCheck.XerrMsg.XaccError) == int32(1) {
+ _pCheck.XmallocFailed = int32(1)
}
}
-// Add 1 to the reference count for page iPage. If this is the second
-// reference to the page, add an error message to pCheck->zErrMsg.
-// Return 1 if there are 2 or more references to the page and 0 if
-// if this is the first reference to the page.
-//
-// Also check that the page number is in bounds.
+// C comment
+// /*
+// ** Add 1 to the reference count for page iPage. If this is the second
+// ** reference to the page, add an error message to pCheck->zErrMsg.
+// ** Return 1 if there are 2 or more references to the page and 0 if
+// ** if this is the first reference to the page.
+// **
+// ** Also check that the page number is in bounds.
+// */
func _checkRef(tls *crt.TLS, _pCheck *XIntegrityCk, _iPage uint32) (r0 int32) {
- if _iPage == uint32(i32(0)) {
- return i32(1)
+ if _iPage == (0) {
+ return int32(1)
}
- if _iPage > (_pCheck.X3) {
- _checkAppendMsg(tls, _pCheck, str(88974), _iPage)
- return i32(1)
+ if _iPage > _pCheck.XnPage {
+ _checkAppendMsg(tls, _pCheck, str(87496), _iPage)
+ return int32(1)
}
if _getPageReferenced(tls, _pCheck, _iPage) != 0 {
- _checkAppendMsg(tls, _pCheck, str(88997), _iPage)
- return i32(1)
+ _checkAppendMsg(tls, _pCheck, str(87519), _iPage)
+ return int32(1)
}
_setPageReferenced(tls, _pCheck, _iPage)
- return i32(0)
+ return int32(0)
}
-// Return non-zero if the bit in the IntegrityCk.aPgRef[] array that
-// corresponds to page iPg is already set.
+// C comment
+// /*
+// ** Return non-zero if the bit in the IntegrityCk.aPgRef[] array that
+// ** corresponds to page iPg is already set.
+// */
func _getPageReferenced(tls *crt.TLS, _pCheck *XIntegrityCk, _iPg uint32) (r0 int32) {
func() {
- if _iPg > (_pCheck.X3) || i32(1) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68029), unsafe.Pointer((*int8)(unsafe.Pointer(&_getPageReferencedØ00__func__Ø000))), unsafe.Pointer(str(88748)))
+ if _iPg > _pCheck.XnPage || int32(1) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68029), unsafe.Pointer(&_getPageReferencedØ00__func__Ø000), unsafe.Pointer(str(87270)))
crt.X__builtin_abort(tls)
}
}()
- return int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCheck.X2)) + 1*uintptr(_iPg/uint32(i32(8)))))) & (i32(1) << uint(int32(_iPg&uint32(i32(7)))))
+ return int32(*elem15(_pCheck.XaPgRef, uintptr(_iPg/uint32(8)))) & (int32(1) << uint(int32(_iPg&uint32(7))))
}
var _getPageReferencedØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_getPageReferencedØ00__func__Ø000[0], str(89022), 18)
+ crt.Xstrncpy(nil, &_getPageReferencedØ00__func__Ø000[0], str(87544), 18)
}
-// Check that the entry in the pointer-map for page iChild maps to
-// page iParent, pointer type ptrType. If not, append an error message
-// to pCheck.
+// C comment
+// /*
+// ** Check that the entry in the pointer-map for page iChild maps to
+// ** page iParent, pointer type ptrType. If not, append an error message
+// ** to pCheck.
+// */
func _checkPtrmap(tls *crt.TLS, _pCheck *XIntegrityCk, _iChild uint32, _eType uint8, _iParent uint32) {
var _rc int32
var _iPtrmapParent uint32
var _ePtrmapType uint8
- _rc = _ptrmapGet(tls, (*XBtShared)(_pCheck.X0), _iChild, &_ePtrmapType, &_iPtrmapParent)
- if _rc == i32(0) {
+ _rc = _ptrmapGet(tls, (*XBtShared)(_pCheck.XpBt), _iChild, &_ePtrmapType, &_iPtrmapParent)
+ if _rc == int32(0) {
goto _0
}
- if (_rc == i32(7)) || (_rc == i32(3082)) {
- *(*int32)(unsafe.Pointer(&(_pCheck.X6))) = i32(1)
+ if (_rc == int32(7)) || (_rc == int32(3082)) {
+ _pCheck.XmallocFailed = int32(1)
}
- _checkAppendMsg(tls, _pCheck, str(89040), _iChild)
+ _checkAppendMsg(tls, _pCheck, str(87562), _iChild)
return
_0:
if (int32(_ePtrmapType) != int32(_eType)) || (_iPtrmapParent != _iParent) {
- _checkAppendMsg(tls, _pCheck, str(89069), _iChild, int32(_eType), _iParent, int32(_ePtrmapType), _iPtrmapParent)
- }
-}
-
-// Do various sanity checks on a single page of a tree. Return
-// the tree depth. Root pages return 0. Parents of root pages
-// return 1, and so forth.
-//
-// These checks are done:
-//
-// 1. Make sure that cells and freeblocks do not overlap
-// but combine to completely cover the page.
-// 2. Make sure integer cell keys are in order.
-// 3. Check the integrity of overflow pages.
-// 4. Recursively call checkTreePage on all children.
-// 5. Verify that the depth of all children is the same.
+ _checkAppendMsg(tls, _pCheck, str(87591), _iChild, int32(_eType), _iParent, int32(_ePtrmapType), _iPtrmapParent)
+ }
+}
+
+// C comment
+// /*
+// ** Do various sanity checks on a single page of a tree. Return
+// ** the tree depth. Root pages return 0. Parents of root pages
+// ** return 1, and so forth.
+// **
+// ** These checks are done:
+// **
+// ** 1. Make sure that cells and freeblocks do not overlap
+// ** but combine to completely cover the page.
+// ** 2. Make sure integer cell keys are in order.
+// ** 3. Check the integrity of overflow pages.
+// ** 4. Recursively call checkTreePage on all children.
+// ** 5. Verify that the depth of all children is the same.
+// */
func _checkTreePage(tls *crt.TLS, _pCheck *XIntegrityCk, _iPage int32, _piMinKey *int64, _maxKey int64) (r0 int32) {
var _i, _rc, _depth, _d2, _pgno, _nFrag, _hdr, _cellStart, _nCell, _doCoverageCheck, _keyCanBeEqual, _saved_v1, _saved_v2, _11_nPage, _20_size, _20_j int32
var _pc, _usableSize, _contentOffset, _x, _prev, _11_pgnoOvfl, _19_size uint32
@@ -68294,296 +68832,292 @@ func _checkTreePage(tls *crt.TLS, _pCheck *XIntegrityCk, _iPage int32, _piMinKey
var _6_info XCellInfo
var _pPage *XMemPage
_pPage = nil
- _depth = i32(-1)
- _doCoverageCheck = i32(1)
- _keyCanBeEqual = i32(1)
+ _depth = int32(-1)
+ _doCoverageCheck = int32(1)
+ _keyCanBeEqual = int32(1)
_heap = nil
- _prev = u32(0)
- _saved_zPfx = _pCheck.X7
- _saved_v1 = _pCheck.X8
- _saved_v2 = _pCheck.X9
- _savedIsInit = u8(0)
- _pBt = (*XBtShared)(_pCheck.X0)
- _usableSize = _pBt.X16
- if _iPage == i32(0) {
- return i32(0)
+ _prev = uint32(0)
+ _saved_zPfx = _pCheck.XzPfx
+ _saved_v1 = _pCheck.Xv1
+ _saved_v2 = _pCheck.Xv2
+ _savedIsInit = uint8(0)
+ _pBt = (*XBtShared)(_pCheck.XpBt)
+ _usableSize = _pBt.XusableSize
+ if _iPage == int32(0) {
+ return int32(0)
}
if _checkRef(tls, _pCheck, uint32(_iPage)) != 0 {
- return i32(0)
+ return int32(0)
}
- *(**int8)(unsafe.Pointer(&(_pCheck.X7))) = str(89123)
- *(*int32)(unsafe.Pointer(&(_pCheck.X8))) = _iPage
- if store1(&_rc, _btreeGetPage(tls, _pBt, uint32(_iPage), &_pPage, i32(0))) != i32(0) {
- _checkAppendMsg(tls, _pCheck, str(89133), _rc)
+ _pCheck.XzPfx = str(87645)
+ _pCheck.Xv1 = _iPage
+ if store2(&_rc, _btreeGetPage(tls, _pBt, uint32(_iPage), &_pPage, int32(0))) != int32(0) {
+ _checkAppendMsg(tls, _pCheck, str(87655), _rc)
goto _end_of_check
}
- _savedIsInit = _pPage.X0
- *(*uint8)(unsafe.Pointer(&(_pPage.X0))) = uint8(i32(0))
- if store1(&_rc, _btreeInitPage(tls, _pPage)) != i32(0) {
+ _savedIsInit = _pPage.XisInit
+ _pPage.XisInit = 0
+ if store2(&_rc, _btreeInitPage(tls, _pPage)) != int32(0) {
func() {
- if _rc != i32(11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68286), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89171)))
+ if _rc != int32(11) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68286), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(87693)))
crt.X__builtin_abort(tls)
}
}()
- _checkAppendMsg(tls, _pCheck, str(89190), _rc)
+ _checkAppendMsg(tls, _pCheck, str(87712), _rc)
goto _end_of_check
}
- _data = _pPage.X19
- _hdr = int32(_pPage.X6)
- *(**int8)(unsafe.Pointer(&(_pCheck.X7))) = str(89228)
- _contentOffset = uint32(((((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(5)))))) + 1*uintptr(i32(1)))))) - i32(1)) & i32(65535)) + i32(1))
+ _data = _pPage.XaData
+ _hdr = int32(_pPage.XhdrOffset)
+ _pCheck.XzPfx = str(87750)
+ _contentOffset = uint32(((((int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_hdr+int32(5))), uintptr(1)))) - int32(1)) & int32(65535)) + int32(1))
func() {
if _contentOffset > _usableSize {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68297), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89254)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68297), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(87776)))
crt.X__builtin_abort(tls)
}
}()
- _nCell = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(3)))))) + 1*uintptr(i32(1)))))
+ _nCell = (int32(*elem15(elem15(_data, uintptr(_hdr+int32(3))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_hdr+int32(3))), uintptr(1)))
func() {
- if int32(_pPage.X14) != _nCell {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68302), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89280)))
+ if int32(_pPage.XnCell) != _nCell {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68302), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(87802)))
crt.X__builtin_abort(tls)
}
}()
- _cellStart = (_hdr + i32(12)) - (i32(4) * int32(_pPage.X5))
+ _cellStart = (_hdr + int32(12)) - (int32(4) * int32(_pPage.Xleaf))
func() {
- if (_pPage.X21) != (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_cellStart))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68307), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89300)))
+ if _pPage.XaCellIdx != elem15(_data, uintptr(_cellStart)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68307), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(87822)))
crt.X__builtin_abort(tls)
}
}()
- _pCellIdx = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_cellStart+(i32(2)*(_nCell-i32(1))))))
- if (_pPage.X5) != 0 {
+ _pCellIdx = elem15(_data, uintptr(_cellStart+(int32(2)*(_nCell-int32(1)))))
+ if _pPage.Xleaf != 0 {
goto _12
}
- _pgno = int32(_sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(8))))))
- if (_pBt.X5) != 0 {
- *(**int8)(unsafe.Pointer(&(_pCheck.X7))) = str(89334)
- _checkPtrmap(tls, _pCheck, uint32(_pgno), uint8(i32(5)), uint32(_iPage))
+ _pgno = int32(_sqlite3Get4byte(tls, elem15(_data, uintptr(_hdr+int32(8)))))
+ if _pBt.XautoVacuum != 0 {
+ _pCheck.XzPfx = str(87856)
+ _checkPtrmap(tls, _pCheck, uint32(_pgno), uint8(5), uint32(_iPage))
}
_depth = _checkTreePage(tls, _pCheck, _pgno, &_maxKey, _maxKey)
- _keyCanBeEqual = i32(0)
+ _keyCanBeEqual = int32(0)
goto _14
_12:
- _heap = _pCheck.X11
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_heap)) + 4*uintptr(i32(0)))) = uint32(i32(0))
+ _heap = _pCheck.Xheap
+ *elem7(_heap, 0) = 0
_14:
- _i = _nCell - i32(1)
+ _i = _nCell - int32(1)
_15:
- if _i < i32(0) || (_pCheck.X4) == 0 {
+ if _i < int32(0) || _pCheck.XmxErr == 0 {
goto _19
}
- *(*int32)(unsafe.Pointer(&(_pCheck.X9))) = _i
+ _pCheck.Xv2 = _i
func() {
- if _pCellIdx != (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_cellStart+(_i*i32(2))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68335), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89362)))
+ if _pCellIdx != elem15(_data, uintptr(_cellStart+(_i*int32(2)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68335), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(87884)))
crt.X__builtin_abort(tls)
}
}()
- _pc = uint32((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCellIdx)) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCellIdx)) + 1*uintptr(i32(1))))))
- {
- p := &_pCellIdx
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) - 1*uintptr(i32(2))))
- sink13(*p)
- }
- if (_pc < _contentOffset) || (_pc > (_usableSize - uint32(i32(4)))) {
- _checkAppendMsg(tls, _pCheck, str(89395), _pc, _contentOffset, _usableSize-uint32(i32(4)))
- _doCoverageCheck = i32(0)
+ _pc = uint32((int32(*elem15(_pCellIdx, 0)) << 8) | int32(*elem15(_pCellIdx, uintptr(1))))
+ *(*uintptr)(unsafe.Pointer(&_pCellIdx)) -= uintptr(int32(2))
+ if (_pc < _contentOffset) || (_pc > (_usableSize - uint32(4))) {
+ _checkAppendMsg(tls, _pCheck, str(87917), _pc, _contentOffset, _usableSize-uint32(4))
+ _doCoverageCheck = int32(0)
goto _16
}
- _pCell = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_pc)))
- (*(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
- }{(_pPage.X25)})))(tls, _pPage, _pCell, &_6_info)
- if (_pc + uint32(_6_info.X4)) > _usableSize {
- _checkAppendMsg(tls, _pCheck, str(89425))
- _doCoverageCheck = i32(0)
+ _pCell = elem15(_data, uintptr(_pc))
+ func() func(*crt.TLS, *XMemPage, *uint8, *XCellInfo) {
+ v := _pPage.XxParseCell
+ return *(*func(*crt.TLS, *XMemPage, *uint8, *XCellInfo))(unsafe.Pointer(&v))
+ }()(tls, _pPage, _pCell, &_6_info)
+ if (_pc + uint32(_6_info.XnSize)) > _usableSize {
+ _checkAppendMsg(tls, _pCheck, str(87947))
+ _doCoverageCheck = int32(0)
goto _16
}
- if (_pPage.X2) == 0 {
+ if _pPage.XintKey == 0 {
goto _25
}
if func() int32 {
if _keyCanBeEqual != 0 {
- return bool2int((_6_info.X0) > _maxKey)
+ return bool2int(_6_info.XnKey > _maxKey)
}
- return bool2int((_6_info.X0) >= _maxKey)
+ return bool2int(_6_info.XnKey >= _maxKey)
}() != 0 {
- _checkAppendMsg(tls, _pCheck, str(89449), _6_info.X0)
+ _checkAppendMsg(tls, _pCheck, str(87971), _6_info.XnKey)
}
- _maxKey = _6_info.X0
- _keyCanBeEqual = i32(0)
+ _maxKey = _6_info.XnKey
+ _keyCanBeEqual = int32(0)
_25:
- if (_6_info.X2) <= uint32(_6_info.X3) {
+ if _6_info.XnPayload <= uint32(_6_info.XnLocal) {
goto _29
}
func() {
- if ((_pc + uint32(_6_info.X4)) - uint32(i32(4))) > _usableSize {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68365), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89473)))
+ if ((_pc + uint32(_6_info.XnSize)) - uint32(4)) > _usableSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68365), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(87995)))
crt.X__builtin_abort(tls)
}
}()
- _11_nPage = int32(((((_6_info.X2) - uint32(_6_info.X3)) + _usableSize) - uint32(i32(5))) / (_usableSize - uint32(i32(4))))
- _11_pgnoOvfl = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCell))+1*uintptr(int32(_6_info.X4)-i32(4)))))
- if (_pBt.X5) != 0 {
- _checkPtrmap(tls, _pCheck, _11_pgnoOvfl, uint8(i32(3)), uint32(_iPage))
+ _11_nPage = int32((((_6_info.XnPayload - uint32(_6_info.XnLocal)) + _usableSize) - uint32(5)) / (_usableSize - uint32(4)))
+ _11_pgnoOvfl = _sqlite3Get4byte(tls, elem15(_pCell, uintptr(int32(_6_info.XnSize)-int32(4))))
+ if _pBt.XautoVacuum != 0 {
+ _checkPtrmap(tls, _pCheck, _11_pgnoOvfl, uint8(3), uint32(_iPage))
}
- _checkList(tls, _pCheck, i32(0), int32(_11_pgnoOvfl), _11_nPage)
+ _checkList(tls, _pCheck, int32(0), int32(_11_pgnoOvfl), _11_nPage)
_29:
- if (_pPage.X5) != 0 {
+ if _pPage.Xleaf != 0 {
goto _33
}
_pgno = int32(_sqlite3Get4byte(tls, _pCell))
- if (_pBt.X5) != 0 {
- _checkPtrmap(tls, _pCheck, uint32(_pgno), uint8(i32(5)), uint32(_iPage))
+ if _pBt.XautoVacuum != 0 {
+ _checkPtrmap(tls, _pCheck, uint32(_pgno), uint8(5), uint32(_iPage))
}
_d2 = _checkTreePage(tls, _pCheck, _pgno, &_maxKey, _maxKey)
- _keyCanBeEqual = i32(0)
+ _keyCanBeEqual = int32(0)
if _d2 != _depth {
- _checkAppendMsg(tls, _pCheck, str(89507))
+ _checkAppendMsg(tls, _pCheck, str(88029))
_depth = _d2
}
goto _36
_33:
- _btreeHeapInsert(tls, _heap, (_pc<<uint(i32(16)))|((_pc+uint32(_6_info.X4))-uint32(i32(1))))
+ _btreeHeapInsert(tls, _heap, (_pc<<16)|((_pc+uint32(_6_info.XnSize))-uint32(1)))
_36:
_16:
_i -= 1
goto _15
_19:
*_piMinKey = _maxKey
- *(**int8)(unsafe.Pointer(&(_pCheck.X7))) = nil
- if _doCoverageCheck == 0 || (_pCheck.X4) <= i32(0) {
+ _pCheck.XzPfx = nil
+ if _doCoverageCheck == 0 || _pCheck.XmxErr <= int32(0) {
goto _end_of_check
}
- if (_pPage.X5) != 0 {
+ if _pPage.Xleaf != 0 {
goto _39
}
- _heap = _pCheck.X11
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_heap)) + 4*uintptr(i32(0)))) = uint32(i32(0))
- _i = _nCell - i32(1)
+ _heap = _pCheck.Xheap
+ *elem7(_heap, 0) = 0
+ _i = _nCell - int32(1)
_40:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _43
}
- _pc = uint32((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_cellStart+(_i*i32(2))))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_cellStart+(_i*i32(2))))))) + 1*uintptr(i32(1))))))
- _19_size = uint32((*(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- }{(_pPage.X24)})))(tls, _pPage, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_pc)))))
- _btreeHeapInsert(tls, _heap, (_pc<<uint(i32(16)))|((_pc+_19_size)-uint32(i32(1))))
+ _pc = uint32((int32(*elem15(elem15(_data, uintptr(_cellStart+(_i*int32(2)))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_cellStart+(_i*int32(2)))), uintptr(1))))
+ _19_size = uint32(func() func(*crt.TLS, *XMemPage, *uint8) uint16 {
+ v := _pPage.XxCellSize
+ return *(*func(*crt.TLS, *XMemPage, *uint8) uint16)(unsafe.Pointer(&v))
+ }()(tls, _pPage, elem15(_data, uintptr(_pc))))
+ _btreeHeapInsert(tls, _heap, (_pc<<16)|((_pc+_19_size)-uint32(1)))
_i -= 1
goto _40
_43:
_39:
- _i = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(1)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_hdr+i32(1)))))) + 1*uintptr(i32(1)))))
+ _i = (int32(*elem15(elem15(_data, uintptr(_hdr+int32(1))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_hdr+int32(1))), uintptr(1)))
_44:
- if _i > i32(0) {
+ if _i > int32(0) {
func() {
- if uint32(_i) > (_usableSize - uint32(i32(4))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68423), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89532)))
+ if uint32(_i) > (_usableSize - uint32(4)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68423), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(88054)))
crt.X__builtin_abort(tls)
}
}()
- _20_size = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_i+i32(2)))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_i+i32(2)))))) + 1*uintptr(i32(1)))))
+ _20_size = (int32(*elem15(elem15(_data, uintptr(_i+int32(2))), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_i+int32(2))), uintptr(1)))
func() {
if uint32(_i+_20_size) > _usableSize {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68425), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89553)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68425), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(88075)))
crt.X__builtin_abort(tls)
}
}()
- _btreeHeapInsert(tls, _heap, (uint32(_i)<<uint(i32(16)))|uint32((_i+_20_size)-i32(1)))
- _20_j = (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_i))))) + 1*uintptr(i32(0))))) << uint(i32(8))) | int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data))+1*uintptr(_i))))) + 1*uintptr(i32(1)))))
+ _btreeHeapInsert(tls, _heap, (uint32(_i)<<16)|uint32((_i+_20_size)-int32(1)))
+ _20_j = (int32(*elem15(elem15(_data, uintptr(_i)), 0)) << 8) | int32(*elem15(elem15(_data, uintptr(_i)), uintptr(1)))
func() {
- if _20_j != i32(0) && _20_j <= (_i+_20_size) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68434), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89579)))
+ if _20_j != int32(0) && _20_j <= (_i+_20_size) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68434), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(88101)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if uint32(_20_j) > (_usableSize - uint32(i32(4))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68435), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkTreePageØ00__func__Ø000))), unsafe.Pointer(str(89596)))
+ if uint32(_20_j) > (_usableSize - uint32(4)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68435), unsafe.Pointer(&_checkTreePageØ00__func__Ø000), unsafe.Pointer(str(88118)))
crt.X__builtin_abort(tls)
}
}()
_i = _20_j
goto _44
}
- _nFrag = i32(0)
- _prev = _contentOffset - uint32(i32(1))
+ _nFrag = int32(0)
+ _prev = _contentOffset - uint32(1)
_55:
if _btreeHeapPull(tls, _heap, &_x) == 0 {
goto _56
}
- if (_prev & uint32(i32(65535))) >= (_x >> uint(i32(16))) {
- _checkAppendMsg(tls, _pCheck, str(89617), _x>>uint(i32(16)), _iPage)
+ if (_prev & uint32(65535)) >= (_x >> 16) {
+ _checkAppendMsg(tls, _pCheck, str(88139), _x>>16, _iPage)
goto _56
}
{
p := &_nFrag
- *p = int32(uint32(*p) + (((_x >> uint(i32(16))) - (_prev & uint32(i32(65535)))) - uint32(i32(1))))
- sink1(*p)
+ *p = int32(uint32(*p) + (((_x >> 16) - (_prev & uint32(65535))) - uint32(1)))
}
_prev = _x
goto _55
_56:
{
p := &_nFrag
- *p = int32(uint32(*p) + ((_usableSize - (_prev & uint32(i32(65535)))) - uint32(i32(1))))
- sink1(*p)
+ *p = int32(uint32(*p) + ((_usableSize - (_prev & uint32(65535))) - uint32(1)))
}
- if ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_heap)) + 4*uintptr(i32(0))))) == uint32(i32(0))) && (_nFrag != int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(7)))))) {
- _checkAppendMsg(tls, _pCheck, str(89654), _nFrag, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_data)) + 1*uintptr(_hdr+i32(7))))), _iPage)
+ if ((*elem7(_heap, 0)) == (0)) && (_nFrag != int32(*elem15(_data, uintptr(_hdr+int32(7))))) {
+ _checkAppendMsg(tls, _pCheck, str(88176), _nFrag, int32(*elem15(_data, uintptr(_hdr+int32(7)))), _iPage)
}
_end_of_check:
if _doCoverageCheck == 0 {
- *(*uint8)(unsafe.Pointer(&(_pPage.X0))) = _savedIsInit
+ _pPage.XisInit = _savedIsInit
}
_releasePage(tls, _pPage)
- *(**int8)(unsafe.Pointer(&(_pCheck.X7))) = _saved_zPfx
- *(*int32)(unsafe.Pointer(&(_pCheck.X8))) = _saved_v1
- *(*int32)(unsafe.Pointer(&(_pCheck.X9))) = _saved_v2
- return _depth + i32(1)
-
- _ = _6_info
- panic(0)
+ _pCheck.XzPfx = _saved_zPfx
+ _pCheck.Xv1 = _saved_v1
+ _pCheck.Xv2 = _saved_v2
+ return _depth + int32(1)
}
var _checkTreePageØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_checkTreePageØ00__func__Ø000[0], str(89706), 14)
-}
-
-// An implementation of a min-heap.
-//
-// aHeap[0] is the number of elements on the heap. aHeap[1] is the
-// root element. The daughter nodes of aHeap[N] are aHeap[N*2]
-// and aHeap[N*2+1].
-//
-// The heap property is this: Every node is less than or equal to both
-// of its daughter nodes. A consequence of the heap property is that the
-// root node aHeap[1] is always the minimum value currently in the heap.
-//
-// The btreeHeapInsert() routine inserts an unsigned 32-bit number onto
-// the heap, preserving the heap property. The btreeHeapPull() routine
-// removes the root element from the heap (the minimum value in the heap)
-// and then moves other nodes around as necessary to preserve the heap
-// property.
-//
-// This heap is used for cell overlap and coverage testing. Each u32
-// entry represents the span of a cell or freeblock on a btree page.
-// The upper 16 bits are the index of the first byte of a range and the
-// lower 16 bits are the index of the last byte of that range.
+ crt.Xstrncpy(nil, &_checkTreePageØ00__func__Ø000[0], str(88228), 14)
+}
+
+// C comment
+// /*
+// ** An implementation of a min-heap.
+// **
+// ** aHeap[0] is the number of elements on the heap. aHeap[1] is the
+// ** root element. The daughter nodes of aHeap[N] are aHeap[N*2]
+// ** and aHeap[N*2+1].
+// **
+// ** The heap property is this: Every node is less than or equal to both
+// ** of its daughter nodes. A consequence of the heap property is that the
+// ** root node aHeap[1] is always the minimum value currently in the heap.
+// **
+// ** The btreeHeapInsert() routine inserts an unsigned 32-bit number onto
+// ** the heap, preserving the heap property. The btreeHeapPull() routine
+// ** removes the root element from the heap (the minimum value in the heap)
+// ** and then moves other nodes around as necessary to preserve the heap
+// ** property.
+// **
+// ** This heap is used for cell overlap and coverage testing. Each u32
+// ** entry represents the span of a cell or freeblock on a btree page.
+// ** The upper 16 bits are the index of the first byte of a range and the
+// ** lower 16 bits are the index of the last byte of that range.
+// */
func _btreeHeapInsert(tls *crt.TLS, _aHeap *uint32, _x uint32) {
var _j, _i uint32
- _i = preInc5((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap))+4*uintptr(i32(0)))), uint32(1))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_i))) = _x
+ _i = preInc23(elem7(_aHeap, 0), uint32(1))
+ *elem7(_aHeap, uintptr(_i)) = _x
_0:
- if (store5(&_j, _i/uint32(i32(2))) > uint32(i32(0))) && ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_j)))) > (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_i))))) {
- _x = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_j)))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_j))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_i)))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_i))) = _x
+ if (store23(&_j, _i/uint32(2)) > (0)) && ((*elem7(_aHeap, uintptr(_j))) > (*elem7(_aHeap, uintptr(_i)))) {
+ _x = *elem7(_aHeap, uintptr(_j))
+ *elem7(_aHeap, uintptr(_j)) = *elem7(_aHeap, uintptr(_i))
+ *elem7(_aHeap, uintptr(_i)) = _x
_i = _j
goto _0
}
@@ -68591,127 +69125,136 @@ _0:
func _btreeHeapPull(tls *crt.TLS, _aHeap *uint32, _pOut *uint32) (r0 int32) {
var _j, _i, _x uint32
- if store5(&_x, *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(i32(0))))) == uint32(i32(0)) {
- return i32(0)
- }
- *_pOut = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(i32(1))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(i32(1)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_x)))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_x))) = u32(4294967295)
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(i32(0)))) -= 1
- _i = uint32(i32(1))
+ if store23(&_x, *elem7(_aHeap, 0)) == (0) {
+ return int32(0)
+ }
+ *_pOut = *elem7(_aHeap, uintptr(1))
+ *elem7(_aHeap, uintptr(1)) = *elem7(_aHeap, uintptr(_x))
+ *elem7(_aHeap, uintptr(_x)) = uint32(4294967295)
+ *elem7(_aHeap, 0) -= 1
+ _i = uint32(1)
_1:
- if store5(&_j, _i*uint32(i32(2))) > (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(i32(0))))) {
+ if store23(&_j, _i*uint32(2)) > (*elem7(_aHeap, 0)) {
goto _2
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_j)))) > (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_j+uint32(i32(1)))))) {
+ if (*elem7(_aHeap, uintptr(_j))) > (*elem7(_aHeap, uintptr(_j+uint32(1)))) {
_j += 1
}
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_i)))) < (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_j)))) {
+ if (*elem7(_aHeap, uintptr(_i))) < (*elem7(_aHeap, uintptr(_j))) {
goto _2
}
- _x = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_i)))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_i))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_j)))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aHeap)) + 4*uintptr(_j))) = _x
+ _x = *elem7(_aHeap, uintptr(_i))
+ *elem7(_aHeap, uintptr(_i)) = *elem7(_aHeap, uintptr(_j))
+ *elem7(_aHeap, uintptr(_j)) = _x
_i = _j
goto _1
_2:
- return i32(1)
+ return int32(1)
}
-// Delete any previous value and set the value of pMem to be an
-// empty boolean index.
+// C comment
+// /*
+// ** Delete any previous value and set the value of pMem to be an
+// ** empty boolean index.
+// */
func _sqlite3VdbeMemSetRowSet(tls *crt.TLS, _pMem *XMem) {
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pMem.X9)
+ _db = (*Xsqlite3)(_pMem.Xdb)
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70429), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemSetRowSetØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70429), unsafe.Pointer(&_sqlite3VdbeMemSetRowSetØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pMem.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70430), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemSetRowSetØ00__func__Ø000))), unsafe.Pointer(str(6728)))
+ if (int32(_pMem.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70430), unsafe.Pointer(&_sqlite3VdbeMemSetRowSetØ00__func__Ø000), unsafe.Pointer(str(6629)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeMemRelease(tls, _pMem)
- *(**int8)(unsafe.Pointer(&(_pMem.X6))) = (*int8)(_sqlite3DbMallocRawNN(tls, _db, uint64(i32(64))))
- if (_db.X17) != 0 {
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(1))
- *(*int32)(unsafe.Pointer(&(_pMem.X7))) = i32(0)
+ _pMem.XzMalloc = (*int8)(_sqlite3DbMallocRawNN(tls, _db, uint64(64)))
+ if _db.XmallocFailed != 0 {
+ _pMem.Xflags = uint16(1)
+ _pMem.XszMalloc = int32(0)
goto _5
}
func() {
- if (_pMem.X6) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70437), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemSetRowSetØ00__func__Ø000))), unsafe.Pointer(str(89720)))
+ if _pMem.XzMalloc == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70437), unsafe.Pointer(&_sqlite3VdbeMemSetRowSetØ00__func__Ø000), unsafe.Pointer(str(88242)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pMem.X7))) = _sqlite3DbMallocSize(tls, _db, (unsafe.Pointer)(_pMem.X6))
- *(**XRowSet)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0))))))) = _sqlite3RowSetInit(tls, _db, (unsafe.Pointer)(_pMem.X6), uint32(_pMem.X7))
+ _pMem.XszMalloc = _sqlite3DbMallocSize(tls, _db, unsafe.Pointer(_pMem.XzMalloc))
+ *(**XRowSet)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pMem.Xu)))) = _sqlite3RowSetInit(tls, _db, unsafe.Pointer(_pMem.XzMalloc), uint32(_pMem.XszMalloc))
func() {
- if (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pMem.X0)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70440), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemSetRowSetØ00__func__Ø000))), unsafe.Pointer(str(89734)))
+ if (*XRowSet)(*(*unsafe.Pointer)(unsafe.Pointer(&_pMem.Xu))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70440), unsafe.Pointer(&_sqlite3VdbeMemSetRowSetØ00__func__Ø000), unsafe.Pointer(str(88256)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&(_pMem.X1))) = uint16(i32(32))
+ _pMem.Xflags = uint16(32)
_5:
}
var _sqlite3VdbeMemSetRowSetØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemSetRowSetØ00__func__Ø000[0], str(89753), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemSetRowSetØ00__func__Ø000[0], str(88275), 24)
}
-// Turn bulk memory into a RowSet object. N bytes of memory
-// are available at pSpace. The db pointer is used as a memory context
-// for any subsequent allocations that need to occur.
-// Return a pointer to the new RowSet object.
-//
-// It must be the case that N is sufficient to make a Rowset. If not
-// an assertion fault occurs.
-//
-// If N is larger than the minimum, use the surplus as an initial
-// allocation of entries available to be filled.
+// C comment
+// /*
+// ** Turn bulk memory into a RowSet object. N bytes of memory
+// ** are available at pSpace. The db pointer is used as a memory context
+// ** for any subsequent allocations that need to occur.
+// ** Return a pointer to the new RowSet object.
+// **
+// ** It must be the case that N is sufficient to make a Rowset. If not
+// ** an assertion fault occurs.
+// **
+// ** If N is larger than the minimum, use the surplus as an initial
+// ** allocation of entries available to be filled.
+// */
func _sqlite3RowSetInit(tls *crt.TLS, _db *Xsqlite3, _pSpace unsafe.Pointer, _N uint32) (r0 *XRowSet) {
var _p *XRowSet
func() {
- if _N < u32(32) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46404), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RowSetInitØ00__func__Ø000))), unsafe.Pointer(str(89777)))
+ if _N < uint32(32) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46404), unsafe.Pointer(&_sqlite3RowSetInitØ00__func__Ø000), unsafe.Pointer(str(88299)))
crt.X__builtin_abort(tls)
}
}()
_p = (*XRowSet)(_pSpace)
- *(**TRowSetChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = nil
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = _db
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = nil
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3))))) = nil
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X5))))) = nil
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))))) = (*TRowSetEntry)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(u32(32)))))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_p))))))))
- *(*uint16)(unsafe.Pointer(&(_p.X6))) = uint16((_N - u32(32)) / u32(16))
- *(*uint16)(unsafe.Pointer(&(_p.X7))) = uint16(i32(1))
- *(*int32)(unsafe.Pointer(&(_p.X8))) = i32(0)
+ *(**TRowSetChunk)(unsafe.Pointer(&_p.XpChunk)) = nil
+ *(**Xsqlite3)(unsafe.Pointer(&_p.Xdb)) = _db
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpEntry)) = nil
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpLast)) = nil
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpForest)) = nil
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpFresh)) = (*TRowSetEntry)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(uint32(32)) + uintptr(unsafe.Pointer(_p))))))
+ _p.XnFresh = uint16((_N - uint32(32)) / uint32(16))
+ _p.XrsFlags = uint16(1)
+ _p.XiBatch = int32(0)
return _p
}
var _sqlite3RowSetInitØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RowSetInitØ00__func__Ø000[0], str(89801), 18)
+ crt.Xstrncpy(nil, &_sqlite3RowSetInitØ00__func__Ø000[0], str(88323), 18)
}
-// Insert a new value into a RowSet.
-//
-// The mallocFailed flag of the database connection is set if a
-// memory allocation fails.
+// C comment
+// /*
+// ** Insert a new value into a RowSet.
+// **
+// ** The mallocFailed flag of the database connection is set if a
+// ** memory allocation fails.
+// */
func _sqlite3RowSetInsert(tls *crt.TLS, _p *XRowSet, _rowid int64) {
var _pEntry, _pLast *TRowSetEntry
func() {
- if _p == nil || (int32(_p.X7)&i32(2)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46475), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RowSetInsertØ00__func__Ø000))), unsafe.Pointer(str(89819)))
+ if _p == nil || (int32(_p.XrsFlags)&int32(2)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46475), unsafe.Pointer(&_sqlite3RowSetInsertØ00__func__Ø000), unsafe.Pointer(str(88341)))
crt.X__builtin_abort(tls)
}
}()
@@ -68719,164 +69262,168 @@ func _sqlite3RowSetInsert(tls *crt.TLS, _p *XRowSet, _rowid int64) {
if _pEntry == nil {
return
}
- *(*int64)(unsafe.Pointer(&(_pEntry.X0))) = _rowid
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pEntry.X1))))) = nil
- _pLast = (*TRowSetEntry)(_p.X3)
+ _pEntry.Xv = _rowid
+ *(**TRowSetEntry)(unsafe.Pointer(&_pEntry.XpRight)) = nil
+ _pLast = (*TRowSetEntry)(_p.XpLast)
if _pLast == nil {
goto _4
}
- if _rowid <= (_pLast.X0) {
+ if _rowid <= _pLast.Xv {
{
- p := (*uint16)(unsafe.Pointer(&(_p.X7)))
- *p = uint16(int32(*p) & i32(-2))
- sink14(*p)
+ p := &_p.XrsFlags
+ *p = uint16(int32(*p) & int32(-2))
}
}
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pLast.X1))))) = _pEntry
+ *(**TRowSetEntry)(unsafe.Pointer(&_pLast.XpRight)) = _pEntry
goto _6
_4:
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = _pEntry
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpEntry)) = _pEntry
_6:
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3))))) = _pEntry
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpLast)) = _pEntry
}
var _sqlite3RowSetInsertØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RowSetInsertØ00__func__Ø000[0], str(89857), 20)
+ crt.Xstrncpy(nil, &_sqlite3RowSetInsertØ00__func__Ø000[0], str(88379), 20)
}
-// Allocate a new RowSetEntry object that is associated with the
-// given RowSet. Return a pointer to the new and completely uninitialized
-// objected.
-//
-// In an OOM situation, the RowSet.db->mallocFailed flag is set and this
-// routine returns NULL.
+// C comment
+// /*
+// ** Allocate a new RowSetEntry object that is associated with the
+// ** given RowSet. Return a pointer to the new and completely uninitialized
+// ** objected.
+// **
+// ** In an OOM situation, the RowSet.db->mallocFailed flag is set and this
+// ** routine returns NULL.
+// */
func _rowSetEntryAlloc(tls *crt.TLS, _p *XRowSet) (r0 *TRowSetEntry) {
var _1_pNew *TRowSetChunk
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46446), unsafe.Pointer((*int8)(unsafe.Pointer(&_rowSetEntryAllocØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46446), unsafe.Pointer(&_rowSetEntryAllocØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_p.X6) != i32(0) {
+ if int32(_p.XnFresh) != int32(0) {
goto _2
}
- _1_pNew = (*TRowSetChunk)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_p.X1), uint64(u32(1012))))
+ _1_pNew = (*TRowSetChunk)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_p.Xdb), uint64(1012)))
if _1_pNew == nil {
return nil
}
- *(**TRowSetChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X0))))) = (*TRowSetChunk)(_p.X0)
- *(**TRowSetChunk)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _1_pNew
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))))) = (*TRowSetEntry)(unsafe.Pointer((*[63]TRowSetEntry)(unsafe.Pointer(&(_1_pNew.X1)))))
- *(*uint16)(unsafe.Pointer(&(_p.X6))) = uint16(u32(63))
+ *(**TRowSetChunk)(unsafe.Pointer(&_1_pNew.XpNextChunk)) = (*TRowSetChunk)(_p.XpChunk)
+ *(**TRowSetChunk)(unsafe.Pointer(&_p.XpChunk)) = _1_pNew
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpFresh)) = (*TRowSetEntry)(unsafe.Pointer(&_1_pNew.XaEntry))
+ _p.XnFresh = uint16(63)
_2:
- *(*uint16)(unsafe.Pointer(&(_p.X6))) -= 1
- return postInc57((**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))))), 16)
+ _p.XnFresh -= 1
+ return postInc93((**TRowSetEntry)(unsafe.Pointer(&_p.XpFresh)), 16)
}
var _rowSetEntryAllocØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_rowSetEntryAllocØ00__func__Ø000[0], str(89877), 17)
+ crt.Xstrncpy(nil, &_rowSetEntryAllocØ00__func__Ø000[0], str(88399), 17)
}
-// Extract the smallest element from the RowSet.
-// Write the element into *pRowid. Return 1 on success. Return
-// 0 if the RowSet is already empty.
-//
-// After this routine has been called, the sqlite3RowSetInsert()
-// routine may not be called again.
-//
-// This routine may not be called after sqlite3RowSetTest() has
-// been used. Older versions of RowSet allowed that, but as the
-// capability was not used by the code generator, it was removed
-// for code economy.
+// C comment
+// /*
+// ** Extract the smallest element from the RowSet.
+// ** Write the element into *pRowid. Return 1 on success. Return
+// ** 0 if the RowSet is already empty.
+// **
+// ** After this routine has been called, the sqlite3RowSetInsert()
+// ** routine may not be called again.
+// **
+// ** This routine may not be called after sqlite3RowSetTest() has
+// ** been used. Older versions of RowSet allowed that, but as the
+// ** capability was not used by the code generator, it was removed
+// ** for code economy.
+// */
func _sqlite3RowSetNext(tls *crt.TLS, _p *XRowSet, _pRowid *int64) (r0 int32) {
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46669), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RowSetNextØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46669), unsafe.Pointer(&_sqlite3RowSetNextØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*TRowSetEntry)(_p.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46670), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RowSetNextØ00__func__Ø000))), unsafe.Pointer(str(89894)))
+ if (*TRowSetEntry)(_p.XpForest) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46670), unsafe.Pointer(&_sqlite3RowSetNextØ00__func__Ø000), unsafe.Pointer(str(88416)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_p.X7) & i32(2)) != i32(0) {
+ if (int32(_p.XrsFlags) & int32(2)) != int32(0) {
goto _4
}
- if (int32(_p.X7) & i32(1)) == i32(0) {
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = _rowSetEntrySort(tls, (*TRowSetEntry)(_p.X2))
+ if (int32(_p.XrsFlags) & int32(1)) == int32(0) {
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpEntry)) = _rowSetEntrySort(tls, (*TRowSetEntry)(_p.XpEntry))
}
{
- p := (*uint16)(unsafe.Pointer(&(_p.X7)))
- *p = uint16(int32(*p) | i32(3))
- sink14(*p)
+ p := &_p.XrsFlags
+ *p = uint16(int32(*p) | int32(3))
}
_4:
- if (*TRowSetEntry)(_p.X2) == nil {
+ if _p.XpEntry == nil {
goto _6
}
- *_pRowid = (*TRowSetEntry)(_p.X2).X0
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = (*TRowSetEntry)((*TRowSetEntry)(_p.X2).X1)
- if (*TRowSetEntry)(_p.X2) == nil {
+ *_pRowid = (*TRowSetEntry)(_p.XpEntry).Xv
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpEntry)) = (*TRowSetEntry)((*TRowSetEntry)(_p.XpEntry).XpRight)
+ if (*TRowSetEntry)(_p.XpEntry) == nil {
_sqlite3RowSetClear(tls, _p)
}
- return i32(1)
+ return int32(1)
_6:
- return i32(0)
+ return int32(0)
}
var _sqlite3RowSetNextØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RowSetNextØ00__func__Ø000[0], str(89908), 18)
+ crt.Xstrncpy(nil, &_sqlite3RowSetNextØ00__func__Ø000[0], str(88430), 18)
}
func _rowSetEntrySort(tls *crt.TLS, _pIn *TRowSetEntry) (r0 *TRowSetEntry) {
var _i uint32
var _pNext *TRowSetEntry
var _aBucket [40]*TRowSetEntry
- crt.Xmemset(tls, (unsafe.Pointer)(&_aBucket), i32(0), u32(160))
+ crt.Xmemset(tls, unsafe.Pointer(&_aBucket), int32(0), uint32(160))
_0:
if _pIn == nil {
goto _1
}
- _pNext = (*TRowSetEntry)(_pIn.X1)
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIn.X1))))) = nil
- _i = uint32(i32(0))
+ _pNext = (*TRowSetEntry)(_pIn.XpRight)
+ *(**TRowSetEntry)(unsafe.Pointer(&_pIn.XpRight)) = nil
+ _i = 0
_2:
- if (*(**TRowSetEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aBucket)) + 4*uintptr(_i)))) == nil {
+ if (*elem94((**TRowSetEntry)(unsafe.Pointer(&_aBucket)), uintptr(_i))) == nil {
goto _5
}
- _pIn = _rowSetEntryMerge(tls, *(**TRowSetEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aBucket)) + 4*uintptr(_i))), _pIn)
- *(**TRowSetEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aBucket)) + 4*uintptr(_i))) = nil
+ _pIn = _rowSetEntryMerge(tls, *elem94((**TRowSetEntry)(unsafe.Pointer(&_aBucket)), uintptr(_i)), _pIn)
+ *elem94((**TRowSetEntry)(unsafe.Pointer(&_aBucket)), uintptr(_i)) = nil
_i += 1
goto _2
_5:
- *(**TRowSetEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aBucket)) + 4*uintptr(_i))) = _pIn
+ *elem94((**TRowSetEntry)(unsafe.Pointer(&_aBucket)), uintptr(_i)) = _pIn
_pIn = _pNext
goto _0
_1:
- _pIn = *(**TRowSetEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aBucket)) + 4*uintptr(i32(0))))
- _i = uint32(i32(1))
+ _pIn = *elem94((**TRowSetEntry)(unsafe.Pointer(&_aBucket)), 0)
+ _i = uint32(1)
_6:
- if _i >= u32(40) {
+ if _i >= uint32(40) {
goto _9
}
- if (*(**TRowSetEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aBucket)) + 4*uintptr(_i)))) == nil {
+ if (*elem94((**TRowSetEntry)(unsafe.Pointer(&_aBucket)), uintptr(_i))) == nil {
goto _7
}
_pIn = func() *TRowSetEntry {
if _pIn != nil {
- return _rowSetEntryMerge(tls, _pIn, *(**TRowSetEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aBucket)) + 4*uintptr(_i))))
+ return _rowSetEntryMerge(tls, _pIn, *elem94((**TRowSetEntry)(unsafe.Pointer(&_aBucket)), uintptr(_i)))
}
- return (*(**TRowSetEntry)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aBucket)) + 4*uintptr(_i))))
+ return (*elem94((**TRowSetEntry)(unsafe.Pointer(&_aBucket)), uintptr(_i)))
}()
_7:
_i += 1
@@ -68888,191 +69435,193 @@ _9:
panic(0)
}
-// Merge two lists of RowSetEntry objects. Remove duplicates.
-//
-// The input lists are connected via pRight pointers and are
-// assumed to each already be in sorted order.
+// C comment
+// /*
+// ** Merge two lists of RowSetEntry objects. Remove duplicates.
+// **
+// ** The input lists are connected via pRight pointers and are
+// ** assumed to each already be in sorted order.
+// */
func _rowSetEntryMerge(tls *crt.TLS, _pA *TRowSetEntry, _pB *TRowSetEntry) (r0 *TRowSetEntry) {
var _head TRowSetEntry
var _pTail *TRowSetEntry
_pTail = &_head
func() {
if _pA == nil || _pB == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46509), unsafe.Pointer((*int8)(unsafe.Pointer(&_rowSetEntryMergeØ00__func__Ø000))), unsafe.Pointer(str(16619)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46509), unsafe.Pointer(&_rowSetEntryMergeØ00__func__Ø000), unsafe.Pointer(str(16574)))
crt.X__builtin_abort(tls)
}
}()
_3:
func() {
- if (*TRowSetEntry)(_pA.X1) != nil && (_pA.X0) > ((*TRowSetEntry)(_pA.X1).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46511), unsafe.Pointer((*int8)(unsafe.Pointer(&_rowSetEntryMergeØ00__func__Ø000))), unsafe.Pointer(str(89926)))
+ if (*TRowSetEntry)(_pA.XpRight) != nil && _pA.Xv > ((*TRowSetEntry)(_pA.XpRight).Xv) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46511), unsafe.Pointer(&_rowSetEntryMergeØ00__func__Ø000), unsafe.Pointer(str(88448)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*TRowSetEntry)(_pB.X1) != nil && (_pB.X0) > ((*TRowSetEntry)(_pB.X1).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46512), unsafe.Pointer((*int8)(unsafe.Pointer(&_rowSetEntryMergeØ00__func__Ø000))), unsafe.Pointer(str(89964)))
+ if (*TRowSetEntry)(_pB.XpRight) != nil && _pB.Xv > ((*TRowSetEntry)(_pB.XpRight).Xv) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46512), unsafe.Pointer(&_rowSetEntryMergeØ00__func__Ø000), unsafe.Pointer(str(88486)))
crt.X__builtin_abort(tls)
}
}()
- if (_pA.X0) > (_pB.X0) {
+ if _pA.Xv > _pB.Xv {
goto _12
}
- if (_pA.X0) < (_pB.X0) {
- _pTail = store57((**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTail.X1))))), _pA)
+ if _pA.Xv < _pB.Xv {
+ _pTail = store93((**TRowSetEntry)(unsafe.Pointer(&_pTail.XpRight)), _pA)
}
- _pA = (*TRowSetEntry)(_pA.X1)
+ _pA = (*TRowSetEntry)(_pA.XpRight)
if _pA == nil {
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTail.X1))))) = _pB
+ *(**TRowSetEntry)(unsafe.Pointer(&_pTail.XpRight)) = _pB
goto _5
}
goto _15
_12:
- _pTail = store57((**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTail.X1))))), _pB)
- _pB = (*TRowSetEntry)(_pB.X1)
+ _pTail = store93((**TRowSetEntry)(unsafe.Pointer(&_pTail.XpRight)), _pB)
+ _pB = (*TRowSetEntry)(_pB.XpRight)
if _pB == nil {
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTail.X1))))) = _pA
+ *(**TRowSetEntry)(unsafe.Pointer(&_pTail.XpRight)) = _pA
goto _5
}
_15:
goto _3
_5:
- return (*TRowSetEntry)(_head.X1)
-
- _ = _head
- panic(0)
+ return (*TRowSetEntry)(_head.XpRight)
}
var _rowSetEntryMergeØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_rowSetEntryMergeØ00__func__Ø000[0], str(90002), 17)
+ crt.Xstrncpy(nil, &_rowSetEntryMergeØ00__func__Ø000[0], str(88524), 17)
}
-// Check to see if element iRowid was inserted into the rowset as
-// part of any insert batch prior to iBatch. Return 1 or 0.
-//
-// If this is the first test of a new batch and if there exist entries
-// on pRowSet->pEntry, then sort those entries into the forest at
-// pRowSet->pForest so that they can be tested.
+// C comment
+// /*
+// ** Check to see if element iRowid was inserted into the rowset as
+// ** part of any insert batch prior to iBatch. Return 1 or 0.
+// **
+// ** If this is the first test of a new batch and if there exist entries
+// ** on pRowSet->pEntry, then sort those entries into the forest at
+// ** pRowSet->pForest so that they can be tested.
+// */
func _sqlite3RowSetTest(tls *crt.TLS, _pRowSet *XRowSet, _iBatch int32, _iRowid int64) (r0 int32) {
var _p, _pTree, _6_pAux, _6_pTail *TRowSetEntry
var _2_ppPrevTree **TRowSetEntry
func() {
- if _pRowSet == nil || (int32(_pRowSet.X7)&i32(2)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46706), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RowSetTestØ00__func__Ø000))), unsafe.Pointer(str(90019)))
+ if _pRowSet == nil || (int32(_pRowSet.XrsFlags)&int32(2)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46706), unsafe.Pointer(&_sqlite3RowSetTestØ00__func__Ø000), unsafe.Pointer(str(88541)))
crt.X__builtin_abort(tls)
}
}()
- if _iBatch == (_pRowSet.X8) {
+ if _iBatch == _pRowSet.XiBatch {
goto _3
}
- _p = (*TRowSetEntry)(_pRowSet.X2)
+ _p = (*TRowSetEntry)(_pRowSet.XpEntry)
if _p == nil {
goto _4
}
- _2_ppPrevTree = (**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRowSet.X5)))))
- if (int32(_pRowSet.X7) & i32(1)) == i32(0) {
+ _2_ppPrevTree = (**TRowSetEntry)(unsafe.Pointer(&_pRowSet.XpForest))
+ if (int32(_pRowSet.XrsFlags) & int32(1)) == int32(0) {
_p = _rowSetEntrySort(tls, _p)
}
- _pTree = (*TRowSetEntry)(_pRowSet.X5)
+ _pTree = (*TRowSetEntry)(_pRowSet.XpForest)
_6:
if _pTree == nil {
goto _9
}
- _2_ppPrevTree = (**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTree.X1)))))
- if (*TRowSetEntry)(_pTree.X2) == nil {
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTree.X2))))) = _rowSetListToTree(tls, _p)
+ _2_ppPrevTree = (**TRowSetEntry)(unsafe.Pointer(&_pTree.XpRight))
+ if (*TRowSetEntry)(_pTree.XpLeft) == nil {
+ *(**TRowSetEntry)(unsafe.Pointer(&_pTree.XpLeft)) = _rowSetListToTree(tls, _p)
goto _9
}
- _rowSetTreeToList(tls, (*TRowSetEntry)(_pTree.X2), &_6_pAux, &_6_pTail)
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTree.X2))))) = nil
+ _rowSetTreeToList(tls, (*TRowSetEntry)(_pTree.XpLeft), &_6_pAux, &_6_pTail)
+ *(**TRowSetEntry)(unsafe.Pointer(&_pTree.XpLeft)) = nil
_p = _rowSetEntryMerge(tls, _6_pAux, _p)
- _pTree = (*TRowSetEntry)(_pTree.X1)
+ _pTree = (*TRowSetEntry)(_pTree.XpRight)
goto _6
_9:
if _pTree != nil {
goto _12
}
- *_2_ppPrevTree = store57(&_pTree, _rowSetEntryAlloc(tls, _pRowSet))
+ *_2_ppPrevTree = store93(&_pTree, _rowSetEntryAlloc(tls, _pRowSet))
if _pTree != nil {
- *(*int64)(unsafe.Pointer(&(_pTree.X0))) = int64(i32(0))
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTree.X1))))) = nil
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTree.X2))))) = _rowSetListToTree(tls, _p)
+ _pTree.Xv = 0
+ *(**TRowSetEntry)(unsafe.Pointer(&_pTree.XpRight)) = nil
+ *(**TRowSetEntry)(unsafe.Pointer(&_pTree.XpLeft)) = _rowSetListToTree(tls, _p)
}
_12:
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRowSet.X2))))) = nil
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRowSet.X3))))) = nil
+ *(**TRowSetEntry)(unsafe.Pointer(&_pRowSet.XpEntry)) = nil
+ *(**TRowSetEntry)(unsafe.Pointer(&_pRowSet.XpLast)) = nil
{
- p := (*uint16)(unsafe.Pointer(&(_pRowSet.X7)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ p := &_pRowSet.XrsFlags
+ *p = uint16(int32(*p) | int32(1))
}
_4:
- *(*int32)(unsafe.Pointer(&(_pRowSet.X8))) = _iBatch
+ _pRowSet.XiBatch = _iBatch
_3:
- _pTree = (*TRowSetEntry)(_pRowSet.X5)
+ _pTree = (*TRowSetEntry)(_pRowSet.XpForest)
_14:
if _pTree == nil {
goto _17
}
- _p = (*TRowSetEntry)(_pTree.X2)
+ _p = (*TRowSetEntry)(_pTree.XpLeft)
_18:
if _p == nil {
goto _19
}
- if (_p.X0) < _iRowid {
- _p = (*TRowSetEntry)(_p.X1)
+ if _p.Xv < _iRowid {
+ _p = (*TRowSetEntry)(_p.XpRight)
goto _23
}
- if (_p.X0) > _iRowid {
- _p = (*TRowSetEntry)(_p.X2)
+ if _p.Xv > _iRowid {
+ _p = (*TRowSetEntry)(_p.XpLeft)
goto _23
}
- return i32(1)
+ return int32(1)
_23:
goto _18
_19:
- _pTree = (*TRowSetEntry)(_pTree.X1)
+ _pTree = (*TRowSetEntry)(_pTree.XpRight)
goto _14
_17:
- return i32(0)
-
- _ = _6_pTail
- panic(0)
+ return int32(0)
}
var _sqlite3RowSetTestØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RowSetTestØ00__func__Ø000[0], str(90069), 18)
+ crt.Xstrncpy(nil, &_sqlite3RowSetTestØ00__func__Ø000[0], str(88591), 18)
}
-// Convert a sorted list of elements into a binary tree. Make the tree
-// as deep as it needs to be in order to contain the entire list.
+// C comment
+// /*
+// ** Convert a sorted list of elements into a binary tree. Make the tree
+// ** as deep as it needs to be in order to contain the entire list.
+// */
func _rowSetListToTree(tls *crt.TLS, _pList *TRowSetEntry) (r0 *TRowSetEntry) {
var _iDepth int32
var _p, _pLeft *TRowSetEntry
func() {
if _pList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46641), unsafe.Pointer((*int8)(unsafe.Pointer(&_rowSetListToTreeØ00__func__Ø000))), unsafe.Pointer(str(90087)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46641), unsafe.Pointer(&_rowSetListToTreeØ00__func__Ø000), unsafe.Pointer(str(88609)))
crt.X__builtin_abort(tls)
}
}()
_p = _pList
- _pList = (*TRowSetEntry)(_p.X1)
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = store57((**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))), nil)
- _iDepth = i32(1)
+ _pList = (*TRowSetEntry)(_p.XpRight)
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpLeft)) = store93((**TRowSetEntry)(unsafe.Pointer(&_p.XpRight)), nil)
+ _iDepth = int32(1)
_2:
if _pList == nil {
goto _5
}
_pLeft = _p
_p = _pList
- _pList = (*TRowSetEntry)(_p.X1)
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = _pLeft
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = _rowSetNDeepTree(tls, &_pList, _iDepth)
+ _pList = (*TRowSetEntry)(_p.XpRight)
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpLeft)) = _pLeft
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpRight)) = _rowSetNDeepTree(tls, &_pList, _iDepth)
_iDepth += 1
goto _2
_5:
@@ -69082,72 +69631,78 @@ _5:
var _rowSetListToTreeØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_rowSetListToTreeØ00__func__Ø000[0], str(90096), 17)
+ crt.Xstrncpy(nil, &_rowSetListToTreeØ00__func__Ø000[0], str(88618), 17)
}
-// Convert a sorted list of elements (connected by pRight) into a binary
-// tree with depth of iDepth. A depth of 1 means the tree contains a single
-// node taken from the head of *ppList. A depth of 2 means a tree with
-// three nodes. And so forth.
-//
-// Use as many entries from the input list as required and update the
-// *ppList to point to the unused elements of the list. If the input
-// list contains too few elements, then construct an incomplete tree
-// and leave *ppList set to NULL.
-//
-// Return a pointer to the root of the constructed binary tree.
+// C comment
+// /*
+// ** Convert a sorted list of elements (connected by pRight) into a binary
+// ** tree with depth of iDepth. A depth of 1 means the tree contains a single
+// ** node taken from the head of *ppList. A depth of 2 means a tree with
+// ** three nodes. And so forth.
+// **
+// ** Use as many entries from the input list as required and update the
+// ** *ppList to point to the unused elements of the list. If the input
+// ** list contains too few elements, then construct an incomplete tree
+// ** and leave *ppList set to NULL.
+// **
+// ** Return a pointer to the root of the constructed binary tree.
+// */
func _rowSetNDeepTree(tls *crt.TLS, _ppList **TRowSetEntry, _iDepth int32) (r0 *TRowSetEntry) {
var _p, _pLeft *TRowSetEntry
if (*_ppList) == nil {
return nil
}
- if _iDepth <= i32(1) {
+ if _iDepth <= int32(1) {
goto _1
}
- _pLeft = _rowSetNDeepTree(tls, _ppList, _iDepth-i32(1))
+ _pLeft = _rowSetNDeepTree(tls, _ppList, _iDepth-int32(1))
_p = *_ppList
if _p == nil {
return _pLeft
}
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = _pLeft
- *_ppList = (*TRowSetEntry)(_p.X1)
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = _rowSetNDeepTree(tls, _ppList, _iDepth-i32(1))
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpLeft)) = _pLeft
+ *_ppList = (*TRowSetEntry)(_p.XpRight)
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpRight)) = _rowSetNDeepTree(tls, _ppList, _iDepth-int32(1))
goto _3
_1:
_p = *_ppList
- *_ppList = (*TRowSetEntry)(_p.X1)
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = store57((**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))), nil)
+ *_ppList = (*TRowSetEntry)(_p.XpRight)
+ *(**TRowSetEntry)(unsafe.Pointer(&_p.XpLeft)) = store93((**TRowSetEntry)(unsafe.Pointer(&_p.XpRight)), nil)
_3:
return _p
}
-// The input, pIn, is a binary tree (or subtree) of RowSetEntry objects.
-// Convert this tree into a linked list connected by the pRight pointers
-// and return pointers to the first and last elements of the new list.
+// C comment
+// /*
+// ** The input, pIn, is a binary tree (or subtree) of RowSetEntry objects.
+// ** Convert this tree into a linked list connected by the pRight pointers
+// ** and return pointers to the first and last elements of the new list.
+// */
func _rowSetTreeToList(tls *crt.TLS, _pIn *TRowSetEntry, _ppFirst **TRowSetEntry, _ppLast **TRowSetEntry) {
var _1_p *TRowSetEntry
func() {
if _pIn == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46570), unsafe.Pointer((*int8)(unsafe.Pointer(&_rowSetTreeToListØ00__func__Ø000))), unsafe.Pointer(str(90113)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46570), unsafe.Pointer(&_rowSetTreeToListØ00__func__Ø000), unsafe.Pointer(str(88635)))
crt.X__builtin_abort(tls)
}
}()
- if (*TRowSetEntry)(_pIn.X2) != nil {
- _rowSetTreeToList(tls, (*TRowSetEntry)(_pIn.X2), _ppFirst, &_1_p)
- *(**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_p.X1))))) = _pIn
+ if _pIn.XpLeft != nil {
+ _rowSetTreeToList(tls, (*TRowSetEntry)(_pIn.XpLeft), _ppFirst, &_1_p)
+ *(**TRowSetEntry)(unsafe.Pointer(&_1_p.XpRight)) = _pIn
goto _3
}
*_ppFirst = _pIn
_3:
- if (*TRowSetEntry)(_pIn.X1) != nil {
- _rowSetTreeToList(tls, (*TRowSetEntry)(_pIn.X1), (**TRowSetEntry)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIn.X1))))), _ppLast)
+ if _pIn.XpRight != nil {
+ _rowSetTreeToList(tls, (*TRowSetEntry)(_pIn.XpRight), (**TRowSetEntry)(unsafe.Pointer(&_pIn.XpRight)), _ppLast)
goto _5
}
*_ppLast = _pIn
_5:
func() {
- if (*TRowSetEntry)((*_ppLast).X1) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(46583), unsafe.Pointer((*int8)(unsafe.Pointer(&_rowSetTreeToListØ00__func__Ø000))), unsafe.Pointer(str(90120)))
+ if (*TRowSetEntry)((*_ppLast).XpRight) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(46583), unsafe.Pointer(&_rowSetTreeToListØ00__func__Ø000), unsafe.Pointer(str(88642)))
crt.X__builtin_abort(tls)
}
}()
@@ -69156,70 +69711,73 @@ _5:
var _rowSetTreeToListØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_rowSetTreeToListØ00__func__Ø000[0], str(90141), 17)
-}
-
-// Run a checkpoint on database iDb. This is a no-op if database iDb is
-// not currently open in WAL mode.
-//
-// If a transaction is open on the database being checkpointed, this
-// function returns SQLITE_LOCKED and a checkpoint is not attempted. If
-// an error occurs while running the checkpoint, an SQLite error code is
-// returned (i.e. SQLITE_IOERR). Otherwise, SQLITE_OK.
-//
-// The mutex on database handle db should be held by the caller. The mutex
-// associated with the specific b-tree being checkpointed is taken by
-// this function while the checkpoint is running.
-//
-// If iDb is passed SQLITE_MAX_ATTACHED, then all attached databases are
-// checkpointed. If an error is encountered it is returned immediately -
-// no attempt is made to checkpoint any remaining databases.
-//
-// Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
+ crt.Xstrncpy(nil, &_rowSetTreeToListØ00__func__Ø000[0], str(88663), 17)
+}
+
+// C comment
+// /*
+// ** Run a checkpoint on database iDb. This is a no-op if database iDb is
+// ** not currently open in WAL mode.
+// **
+// ** If a transaction is open on the database being checkpointed, this
+// ** function returns SQLITE_LOCKED and a checkpoint is not attempted. If
+// ** an error occurs while running the checkpoint, an SQLite error code is
+// ** returned (i.e. SQLITE_IOERR). Otherwise, SQLITE_OK.
+// **
+// ** The mutex on database handle db should be held by the caller. The mutex
+// ** associated with the specific b-tree being checkpointed is taken by
+// ** this function while the checkpoint is running.
+// **
+// ** If iDb is passed SQLITE_MAX_ATTACHED, then all attached databases are
+// ** checkpointed. If an error is encountered it is returned immediately -
+// ** no attempt is made to checkpoint any remaining databases.
+// **
+// ** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
+// */
func _sqlite3Checkpoint(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _eMode int32, _pnLog *int32, _pnCkpt *int32) (r0 int32) {
var _rc, _i, _bBusy int32
- _rc = i32(0)
- _bBusy = i32(0)
+ _rc = int32(0)
+ _bBusy = int32(0)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142642), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CheckpointØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142642), unsafe.Pointer(&_sqlite3CheckpointØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pnLog != nil && (*_pnLog) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142643), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CheckpointØ00__func__Ø000))), unsafe.Pointer(str(90158)))
+ if _pnLog != nil && (*_pnLog) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142643), unsafe.Pointer(&_sqlite3CheckpointØ00__func__Ø000), unsafe.Pointer(str(88680)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pnCkpt != nil && (*_pnCkpt) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142644), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CheckpointØ00__func__Ø000))), unsafe.Pointer(str(90179)))
+ if _pnCkpt != nil && (*_pnCkpt) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142644), unsafe.Pointer(&_sqlite3CheckpointØ00__func__Ø000), unsafe.Pointer(str(88701)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_8:
- if _i >= (_db.X5) || _rc != i32(0) {
+ if _i >= _db.XnDb || _rc != int32(0) {
goto _12
}
- if _i != _iDb && _iDb != i32(10) {
+ if _i != _iDb && _iDb != int32(10) {
goto _14
}
- _rc = _sqlite3BtreeCheckpoint(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_i))).X1), _eMode, _pnLog, _pnCkpt)
+ _rc = _sqlite3BtreeCheckpoint(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt), _eMode, _pnLog, _pnCkpt)
_pnLog = nil
_pnCkpt = nil
- if _rc == i32(5) {
- _bBusy = i32(1)
- _rc = i32(0)
+ if _rc == int32(5) {
+ _bBusy = int32(1)
+ _rc = int32(0)
}
_14:
_i += 1
goto _8
_12:
return func() int32 {
- if (_rc == i32(0)) && _bBusy != 0 {
- return i32(5)
+ if (_rc == int32(0)) && _bBusy != 0 {
+ return int32(5)
}
return _rc
}()
@@ -69228,128 +69786,140 @@ _12:
var _sqlite3CheckpointØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CheckpointØ00__func__Ø000[0], str(90202), 18)
+ crt.Xstrncpy(nil, &_sqlite3CheckpointØ00__func__Ø000[0], str(88724), 18)
}
-// Run a checkpoint on the Btree passed as the first argument.
-//
-// Return SQLITE_LOCKED if this or any other connection has an open
-// transaction on the shared-cache the argument Btree is connected to.
-//
-// Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
+// C comment
+// /*
+// ** Run a checkpoint on the Btree passed as the first argument.
+// **
+// ** Return SQLITE_LOCKED if this or any other connection has an open
+// ** transaction on the shared-cache the argument Btree is connected to.
+// **
+// ** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
+// */
func _sqlite3BtreeCheckpoint(tls *crt.TLS, _p *XBtree, _eMode int32, _pnLog *int32, _pnCkpt *int32) (r0 int32) {
var _rc int32
var _1_pBt *XBtShared
- _rc = i32(0)
+ _rc = int32(0)
if _p == nil {
goto _0
}
- _1_pBt = (*XBtShared)(_p.X1)
+ _1_pBt = (*XBtShared)(_p.XpBt)
_sqlite3BtreeEnter(tls, _p)
- if int32(_1_pBt.X8) != i32(0) {
- _rc = i32(6)
+ if int32(_1_pBt.XinTransaction) != int32(0) {
+ _rc = int32(6)
goto _2
}
- _rc = _sqlite3PagerCheckpoint(tls, (*XPager)(_1_pBt.X0), (*Xsqlite3)(_p.X0), _eMode, _pnLog, _pnCkpt)
+ _rc = _sqlite3PagerCheckpoint(tls, (*XPager)(_1_pBt.XpPager), (*Xsqlite3)(_p.Xdb), _eMode, _pnLog, _pnCkpt)
_2:
_sqlite3BtreeLeave(tls, _p)
_0:
return _rc
}
-// This function is called when the user invokes "PRAGMA wal_checkpoint",
-// "PRAGMA wal_blocking_checkpoint" or calls the sqlite3_wal_checkpoint()
-// or wal_blocking_checkpoint() API functions.
-//
-// Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
+// C comment
+// /*
+// ** This function is called when the user invokes "PRAGMA wal_checkpoint",
+// ** "PRAGMA wal_blocking_checkpoint" or calls the sqlite3_wal_checkpoint()
+// ** or wal_blocking_checkpoint() API functions.
+// **
+// ** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
+// */
func _sqlite3PagerCheckpoint(tls *crt.TLS, _pPager *XPager, _db *Xsqlite3, _eMode int32, _pnLog *int32, _pnCkpt *int32) (r0 int32) {
var _rc int32
- _rc = i32(0)
- if (*XWal)(_pPager.X60) != nil {
- _rc = _sqlite3WalCheckpoint(tls, (*XWal)(_pPager.X60), _db, _eMode, func() func(*crt.TLS, unsafe.Pointer) int32 {
- if _eMode == i32(0) {
+ _rc = int32(0)
+ if _pPager.XpWal != nil {
+ _rc = _sqlite3WalCheckpoint(tls, (*XWal)(_pPager.XpWal), _db, _eMode, func() func(*crt.TLS, unsafe.Pointer) int32 {
+ if _eMode == int32(0) {
return nil
}
- return (_pPager.X53)
- }(), _pPager.X54, int32(_pPager.X7), _pPager.X48, (*uint8)(unsafe.Pointer(_pPager.X58)), _pnLog, _pnCkpt)
+ return _pPager.XxBusyHandler
+ }(), _pPager.XpBusyHandlerArg, int32(_pPager.XckptSyncFlags), _pPager.XpageSize, (*uint8)(unsafe.Pointer(_pPager.XpTmpSpace)), _pnLog, _pnCkpt)
}
return _rc
}
-// Return TRUE if the pager is in a state where it is OK to change the
-// journalmode. Journalmode changes can only happen when the database
-// is unmodified.
+// C comment
+// /*
+// ** Return TRUE if the pager is in a state where it is OK to change the
+// ** journalmode. Journalmode changes can only happen when the database
+// ** is unmodified.
+// */
func _sqlite3PagerOkToChangeJournalMode(tls *crt.TLS, _pPager *XPager) (r0 int32) {
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54187), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOkToChangeJournalModeØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54187), unsafe.Pointer(&_sqlite3PagerOkToChangeJournalModeØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pPager.X14) >= i32(3) {
- return i32(0)
+ if int32(_pPager.XeState) >= int32(3) {
+ return int32(0)
}
if func() int32 {
- if ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X32).X0) != nil) && ((_pPager.X34) > int64(i32(0))) {
+ if ((*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xjfd).XpMethods) != nil) && (_pPager.XjournalOff > (0)) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54189), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerOkToChangeJournalModeØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54189), unsafe.Pointer(&_sqlite3PagerOkToChangeJournalModeØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return i32(0)
+ return int32(0)
}
- return i32(1)
+ return int32(1)
}
var _sqlite3PagerOkToChangeJournalModeØ00__func__Ø000 [34]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerOkToChangeJournalModeØ00__func__Ø000[0], str(90220), 34)
+ crt.Xstrncpy(nil, &_sqlite3PagerOkToChangeJournalModeØ00__func__Ø000[0], str(88742), 34)
}
-// This function is called to close the connection to the log file prior
-// to switching from WAL to rollback mode.
-//
-// Before closing the log file, this function attempts to take an
-// EXCLUSIVE lock on the database file. If this cannot be obtained, an
-// error (SQLITE_BUSY) is returned and the log connection is not closed.
-// If successful, the EXCLUSIVE lock is not released before returning.
+// C comment
+// /*
+// ** This function is called to close the connection to the log file prior
+// ** to switching from WAL to rollback mode.
+// **
+// ** Before closing the log file, this function attempts to take an
+// ** EXCLUSIVE lock on the database file. If this cannot be obtained, an
+// ** error (SQLITE_BUSY) is returned and the log connection is not closed.
+// ** If successful, the EXCLUSIVE lock is not released before returning.
+// */
func _sqlite3PagerCloseWal(tls *crt.TLS, _pPager *XPager, _db *Xsqlite3) (r0 int32) {
var _rc, _1_logexists int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if int32(_pPager.X2) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54380), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCloseWalØ00__func__Ø000))), unsafe.Pointer(str(90254)))
+ if int32(_pPager.XjournalMode) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54380), unsafe.Pointer(&_sqlite3PagerCloseWalØ00__func__Ø000), unsafe.Pointer(str(88776)))
crt.X__builtin_abort(tls)
}
}()
- if (*XWal)(_pPager.X60) != nil {
+ if _pPager.XpWal != nil {
goto _2
}
- _1_logexists = i32(0)
- _rc = _pagerLockDb(tls, _pPager, i32(1))
- if _rc == i32(0) {
- _rc = _sqlite3OsAccess(tls, (*Xsqlite3_vfs)(_pPager.X0), _pPager.X61, i32(0), &_1_logexists)
+ _1_logexists = int32(0)
+ _rc = _pagerLockDb(tls, _pPager, int32(1))
+ if _rc == int32(0) {
+ _rc = _sqlite3OsAccess(tls, (*Xsqlite3_vfs)(_pPager.XpVfs), _pPager.XzWal, int32(0), &_1_logexists)
}
- if (_rc == i32(0)) && _1_logexists != 0 {
+ if (_rc == int32(0)) && _1_logexists != 0 {
_rc = _pagerOpenWal(tls, _pPager)
}
_2:
- if _rc != i32(0) || (*XWal)(_pPager.X60) == nil {
+ if _rc != int32(0) || _pPager.XpWal == nil {
goto _7
}
_rc = _pagerExclusiveLock(tls, _pPager)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _8
}
- _rc = _sqlite3WalClose(tls, (*XWal)(_pPager.X60), _db, int32(_pPager.X7), _pPager.X48, (*uint8)(unsafe.Pointer(_pPager.X58)))
- *(**XWal)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X60))))) = nil
+ _rc = _sqlite3WalClose(tls, (*XWal)(_pPager.XpWal), _db, int32(_pPager.XckptSyncFlags), _pPager.XpageSize, (*uint8)(unsafe.Pointer(_pPager.XpTmpSpace)))
+ *(**XWal)(unsafe.Pointer(&_pPager.XpWal)) = nil
_pagerFixMaplimit(tls, _pPager)
- if _rc != 0 && ((_pPager.X1) == 0) {
- _pagerUnlockDb(tls, _pPager, i32(1))
+ if _rc != 0 && (_pPager.XexclusiveMode == 0) {
+ _pagerUnlockDb(tls, _pPager, int32(1))
}
_8:
_7:
@@ -69359,54 +69929,57 @@ _7:
var _sqlite3PagerCloseWalØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerCloseWalØ00__func__Ø000[0], str(90297), 21)
-}
-
-// Set the journal-mode for this pager. Parameter eMode must be one of:
-//
-// PAGER_JOURNALMODE_DELETE
-// PAGER_JOURNALMODE_TRUNCATE
-// PAGER_JOURNALMODE_PERSIST
-// PAGER_JOURNALMODE_OFF
-// PAGER_JOURNALMODE_MEMORY
-// PAGER_JOURNALMODE_WAL
-//
-// The journalmode is set to the value specified if the change is allowed.
-// The change may be disallowed for the following reasons:
-//
-// * An in-memory database can only have its journal_mode set to _OFF
-// or _MEMORY.
-//
-// * Temporary databases cannot have _WAL journalmode.
-//
-// The returned indicate the current (possibly updated) journal-mode.
+ crt.Xstrncpy(nil, &_sqlite3PagerCloseWalØ00__func__Ø000[0], str(88819), 21)
+}
+
+// C comment
+// /*
+// ** Set the journal-mode for this pager. Parameter eMode must be one of:
+// **
+// ** PAGER_JOURNALMODE_DELETE
+// ** PAGER_JOURNALMODE_TRUNCATE
+// ** PAGER_JOURNALMODE_PERSIST
+// ** PAGER_JOURNALMODE_OFF
+// ** PAGER_JOURNALMODE_MEMORY
+// ** PAGER_JOURNALMODE_WAL
+// **
+// ** The journalmode is set to the value specified if the change is allowed.
+// ** The change may be disallowed for the following reasons:
+// **
+// ** * An in-memory database can only have its journal_mode set to _OFF
+// ** or _MEMORY.
+// **
+// ** * Temporary databases cannot have _WAL journalmode.
+// **
+// ** The returned indicate the current (possibly updated) journal-mode.
+// */
func _sqlite3PagerSetJournalMode(tls *crt.TLS, _pPager *XPager, _eMode int32) (r0 int32) {
var _6_rc, _6_state int32
var _eOld uint8
- _eOld = _pPager.X2
+ _eOld = _pPager.XjournalMode
_print_pager_state(tls, _pPager)
func() {
- if _eMode != i32(0) && _eMode != i32(3) && _eMode != i32(1) && _eMode != i32(2) && _eMode != i32(5) && _eMode != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54090), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000))), unsafe.Pointer(str(90318)))
+ if _eMode != int32(0) && _eMode != int32(3) && _eMode != int32(1) && _eMode != int32(2) && _eMode != int32(5) && _eMode != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54090), unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000), unsafe.Pointer(str(88840)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pPager.X10) != i32(0) && _eMode == i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54101), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000))), unsafe.Pointer(str(90522)))
+ if int32(_pPager.XtempFile) != int32(0) && _eMode == int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54101), unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000), unsafe.Pointer(str(89044)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X13) == 0 {
+ if _pPager.XmemDb == 0 {
goto _10
}
func() {
- if int32(_eOld) != i32(4) && int32(_eOld) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54107), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000))), unsafe.Pointer(str(90574)))
+ if int32(_eOld) != int32(4) && int32(_eOld) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54107), unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000), unsafe.Pointer(str(89096)))
crt.X__builtin_abort(tls)
}
}()
- if (_eMode != i32(4)) && (_eMode != i32(2)) {
+ if (_eMode != int32(4)) && (_eMode != int32(2)) {
_eMode = int32(_eOld)
}
_10:
@@ -69414,183 +69987,181 @@ _10:
goto _16
}
func() {
- if int32(_pPager.X14) == i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54116), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000))), unsafe.Pointer(str(15064)))
+ if int32(_pPager.XeState) == int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54116), unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000), unsafe.Pointer(str(15019)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pPager.X2))) = uint8(_eMode)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
+ _pPager.XjournalMode = uint8(_eMode)
+
func() {
- if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.X31).X0) == nil && (_pPager.X1) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54130), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000))), unsafe.Pointer(str(90636)))
+ if (*Xsqlite3_io_methods)((*Xsqlite3_file)(_pPager.Xfd).XpMethods) == nil && _pPager.XexclusiveMode == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54130), unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000), unsafe.Pointer(str(89158)))
crt.X__builtin_abort(tls)
}
}()
- if (_pPager.X1) != 0 || (int32(_eOld)&i32(5)) != i32(1) || (_eMode&i32(1)) != i32(0) {
+ if _pPager.XexclusiveMode != 0 || (int32(_eOld)&int32(5)) != int32(1) || (_eMode&int32(1)) != int32(0) {
goto _24
}
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X32))
- if int32(_pPager.X15) >= i32(2) {
- _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pPager.X0), _pPager.X52, i32(0))
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xjfd))
+ if int32(_pPager.XeLock) >= int32(2) {
+ _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pPager.XpVfs), _pPager.XzJournal, int32(0))
goto _26
}
- _6_rc = i32(0)
- _6_state = int32(_pPager.X14)
+ _6_rc = int32(0)
+ _6_state = int32(_pPager.XeState)
func() {
- if _6_state != i32(0) && _6_state != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54147), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000))), unsafe.Pointer(str(90680)))
+ if _6_state != int32(0) && _6_state != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54147), unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000), unsafe.Pointer(str(89202)))
crt.X__builtin_abort(tls)
}
}()
- if _6_state == i32(0) {
+ if _6_state == int32(0) {
_6_rc = _sqlite3PagerSharedLock(tls, _pPager)
}
- if int32(_pPager.X14) == i32(1) {
+ if int32(_pPager.XeState) == int32(1) {
func() {
- if _6_rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54152), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _6_rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54152), unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
- _6_rc = _pagerLockDb(tls, _pPager, i32(2))
+ _6_rc = _pagerLockDb(tls, _pPager, int32(2))
}
- if _6_rc == i32(0) {
- _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pPager.X0), _pPager.X52, i32(0))
+ if _6_rc == int32(0) {
+ _sqlite3OsDelete(tls, (*Xsqlite3_vfs)(_pPager.XpVfs), _pPager.XzJournal, int32(0))
}
- if (_6_rc == i32(0)) && (_6_state == i32(1)) {
- _pagerUnlockDb(tls, _pPager, i32(1))
+ if (_6_rc == int32(0)) && (_6_state == int32(1)) {
+ _pagerUnlockDb(tls, _pPager, int32(1))
goto _38
}
- if _6_state == i32(0) {
+ if _6_state == int32(0) {
_pager_unlock(tls, _pPager)
}
_38:
func() {
- if _6_state != int32(_pPager.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54163), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000))), unsafe.Pointer(str(90721)))
+ if _6_state != int32(_pPager.XeState) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54163), unsafe.Pointer(&_sqlite3PagerSetJournalModeØ00__func__Ø000), unsafe.Pointer(str(89243)))
crt.X__builtin_abort(tls)
}
}()
_26:
goto _42
_24:
- if _eMode == i32(2) {
- _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.X32))
+ if _eMode == int32(2) {
+ _sqlite3OsClose(tls, (*Xsqlite3_file)(_pPager.Xjfd))
}
_42:
_16:
- return int32(_pPager.X2)
-}
-
-// Return a pointer to a human readable string in a static buffer
-// containing the state of the Pager object passed as an argument. This
-// is intended to be used within debuggers. For example, as an alternative
-// to "print *pPager" in gdb:
-//
-// (gdb) printf "%s", print_pager_state(pPager)
+ return int32(_pPager.XjournalMode)
+}
+
+// C comment
+// /*
+// ** Return a pointer to a human readable string in a static buffer
+// ** containing the state of the Pager object passed as an argument. This
+// ** is intended to be used within debuggers. For example, as an alternative
+// ** to "print *pPager" in gdb:
+// **
+// ** (gdb) printf "%s", print_pager_state(pPager)
+// */
func _print_pager_state(tls *crt.TLS, _p *XPager) (r0 *int8) {
- Xsqlite3_snprintf(tls, i32(1024), (*int8)(unsafe.Pointer(&_print_pager_stateØ00zRetØ001)), str(90743), unsafe.Pointer(_p.X51), unsafe.Pointer(func() *int8 {
- if int32(_p.X14) == i32(0) {
- return str(91021)
+ Xsqlite3_snprintf(tls, int32(1024), (*int8)(unsafe.Pointer(&_print_pager_stateØ00zRetØ001)), str(89265), unsafe.Pointer(_p.XzFilename), unsafe.Pointer(func() *int8 {
+ if int32(_p.XeState) == int32(0) {
+ return str(89543)
}
return func() *int8 {
- if int32(_p.X14) == i32(1) {
- return str(91026)
+ if int32(_p.XeState) == int32(1) {
+ return str(89548)
}
return func() *int8 {
- if int32(_p.X14) == i32(2) {
- return str(91033)
+ if int32(_p.XeState) == int32(2) {
+ return str(89555)
}
return func() *int8 {
- if int32(_p.X14) == i32(3) {
- return str(91047)
+ if int32(_p.XeState) == int32(3) {
+ return str(89569)
}
return func() *int8 {
- if int32(_p.X14) == i32(4) {
- return str(91063)
+ if int32(_p.XeState) == int32(4) {
+ return str(89585)
}
return func() *int8 {
- if int32(_p.X14) == i32(5) {
- return str(91076)
+ if int32(_p.XeState) == int32(5) {
+ return str(89598)
}
return func() *int8 {
- if int32(_p.X14) == i32(6) {
- return str(91092)
+ if int32(_p.XeState) == int32(6) {
+ return str(89614)
}
- return str(91098)
+ return str(89620)
}()
}()
}()
}()
}()
}()
- }()), _p.X26, unsafe.Pointer(func() *int8 {
- if int32(_p.X15) == i32(0) {
- return str(91106)
+ }()), _p.XerrCode, unsafe.Pointer(func() *int8 {
+ if int32(_p.XeLock) == int32(0) {
+ return str(89628)
}
return func() *int8 {
- if int32(_p.X15) == i32(2) {
- return str(91114)
+ if int32(_p.XeLock) == int32(2) {
+ return str(89636)
}
return func() *int8 {
- if int32(_p.X15) == i32(4) {
- return str(25020)
+ if int32(_p.XeLock) == int32(4) {
+ return str(24975)
}
return func() *int8 {
- if int32(_p.X15) == i32(1) {
- return str(91123)
+ if int32(_p.XeLock) == int32(1) {
+ return str(89645)
}
return func() *int8 {
- if int32(_p.X15) == i32(5) {
- return str(91130)
+ if int32(_p.XeLock) == int32(5) {
+ return str(89652)
}
- return str(91098)
+ return str(89620)
}()
}()
}()
}()
}()), unsafe.Pointer(func() *int8 {
- if (_p.X1) != 0 {
- return str(91138)
+ if _p.XexclusiveMode != 0 {
+ return str(89660)
}
- return str(91148)
+ return str(89670)
}()), unsafe.Pointer(func() *int8 {
- if int32(_p.X2) == i32(4) {
- return str(91155)
+ if int32(_p.XjournalMode) == int32(4) {
+ return str(89677)
}
return func() *int8 {
- if int32(_p.X2) == i32(2) {
- return str(91162)
+ if int32(_p.XjournalMode) == int32(2) {
+ return str(89684)
}
return func() *int8 {
- if int32(_p.X2) == i32(0) {
- return str(91166)
+ if int32(_p.XjournalMode) == int32(0) {
+ return str(89688)
}
return func() *int8 {
- if int32(_p.X2) == i32(1) {
- return str(91173)
+ if int32(_p.XjournalMode) == int32(1) {
+ return str(89695)
}
return func() *int8 {
- if int32(_p.X2) == i32(3) {
- return str(91181)
+ if int32(_p.XjournalMode) == int32(3) {
+ return str(89703)
}
return func() *int8 {
- if int32(_p.X2) == i32(5) {
- return str(91190)
+ if int32(_p.XjournalMode) == int32(5) {
+ return str(89712)
}
- return str(91098)
+ return str(89620)
}()
}()
}()
}()
}()
- }()), int32(_p.X10), int32(_p.X13), int32(_p.X3), _p.X34, _p.X35, int32(_p.X22), int32(_p.X23), int32(_p.X24))
+ }()), int32(_p.XtempFile), int32(_p.XmemDb), int32(_p.XuseJournal), _p.XjournalOff, _p.XjournalHdr, int32(_p.XdbSize), int32(_p.XdbOrigSize), int32(_p.XdbFileSize))
return (*int8)(unsafe.Pointer(&_print_pager_stateØ00zRetØ001))
}
@@ -69599,59 +70170,59 @@ var _print_pager_stateØ00zRetØ001 [1024]int8
var _sqlite3PagerSetJournalModeØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerSetJournalModeØ00__func__Ø000[0], str(91194), 27)
+ crt.Xstrncpy(nil, &_sqlite3PagerSetJournalModeØ00__func__Ø000[0], str(89716), 27)
}
-// Set both the "read version" (single byte at byte offset 18) and
-// "write version" (single byte at byte offset 19) fields in the database
-// header to iVersion.
+// C comment
+// /*
+// ** Set both the "read version" (single byte at byte offset 18) and
+// ** "write version" (single byte at byte offset 19) fields in the database
+// ** header to iVersion.
+// */
func _sqlite3BtreeSetVersion(tls *crt.TLS, _pBtree *XBtree, _iVersion int32) (r0 int32) {
var _rc int32
var _1_aData *uint8
var _pBt *XBtShared
- _pBt = (*XBtShared)(_pBtree.X1)
+ _pBt = (*XBtShared)(_pBtree.XpBt)
func() {
- if _iVersion != i32(1) && _iVersion != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68831), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSetVersionØ00__func__Ø000))), unsafe.Pointer(str(91221)))
+ if _iVersion != int32(1) && _iVersion != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68831), unsafe.Pointer(&_sqlite3BtreeSetVersionØ00__func__Ø000), unsafe.Pointer(str(89743)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) & i32(-17))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) & int32(-17))
}
- if _iVersion == i32(1) {
+ if _iVersion == int32(1) {
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) | i32(16))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) | int32(16))
}
}
- _rc = _sqlite3BtreeBeginTrans(tls, _pBtree, i32(0))
- if _rc != i32(0) {
+ _rc = _sqlite3BtreeBeginTrans(tls, _pBtree, int32(0))
+ if _rc != int32(0) {
goto _4
}
- _1_aData = (*XMemPage)(_pBt.X3).X19
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aData)) + 1*uintptr(i32(18))))) == int32(uint8(_iVersion)) && int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aData)) + 1*uintptr(i32(19))))) == int32(uint8(_iVersion)) {
+ _1_aData = (*XMemPage)(_pBt.XpPage1).XaData
+ if int32(*elem15(_1_aData, uintptr(18))) == int32(uint8(_iVersion)) && int32(*elem15(_1_aData, uintptr(19))) == int32(uint8(_iVersion)) {
goto _6
}
- _rc = _sqlite3BtreeBeginTrans(tls, _pBtree, i32(2))
- if _rc != i32(0) {
+ _rc = _sqlite3BtreeBeginTrans(tls, _pBtree, int32(2))
+ if _rc != int32(0) {
goto _7
}
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.X3).X23))
- if _rc == i32(0) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aData)) + 1*uintptr(i32(18)))) = uint8(_iVersion)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aData)) + 1*uintptr(i32(19)))) = uint8(_iVersion)
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.XpPage1).XpDbPage))
+ if _rc == int32(0) {
+ *elem15(_1_aData, uintptr(18)) = uint8(_iVersion)
+ *elem15(_1_aData, uintptr(19)) = uint8(_iVersion)
}
_7:
_6:
_4:
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) & i32(-17))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) & int32(-17))
}
return _rc
}
@@ -69659,44 +70230,44 @@ _4:
var _sqlite3BtreeSetVersionØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeSetVersionØ00__func__Ø000[0], str(91248), 23)
+ crt.Xstrncpy(nil, &_sqlite3BtreeSetVersionØ00__func__Ø000[0], str(89770), 23)
}
-// Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants
-// defined in pager.h. This function returns the associated lowercase
-// journal-mode name.
+// C comment
+// /*
+// ** Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants
+// ** defined in pager.h. This function returns the associated lowercase
+// ** journal-mode name.
+// */
func _sqlite3JournalModename(tls *crt.TLS, _eMode int32) (r0 *int8) {
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
func() {
- if _eMode < i32(0) || _eMode > i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113499), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3JournalModenameØ00__func__Ø000))), unsafe.Pointer(str(91271)))
+ if _eMode < int32(0) || _eMode > int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113499), unsafe.Pointer(&_sqlite3JournalModenameØ00__func__Ø000), unsafe.Pointer(str(89793)))
crt.X__builtin_abort(tls)
}
}()
- if _eMode == i32(6) {
+ if _eMode == int32(6) {
return nil
}
- return *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3JournalModenameØ00azModeNameØ001)) + 4*uintptr(_eMode)))
+ return *elem0((**int8)(unsafe.Pointer(&_sqlite3JournalModenameØ00azModeNameØ001)), uintptr(_eMode))
}
var _sqlite3JournalModenameØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3JournalModenameØ00__func__Ø000[0], str(91312), 23)
+ crt.Xstrncpy(nil, &_sqlite3JournalModenameØ00__func__Ø000[0], str(89834), 23)
}
var _sqlite3JournalModenameØ00azModeNameØ001 [6]*int8
func init() {
- _sqlite3JournalModenameØ00azModeNameØ001 = [6]*int8{str(91166), str(91173), str(91162), str(91181), str(91155), str(91190)}
+ _sqlite3JournalModenameØ00azModeNameØ001 = [6]*int8{str(89688), str(89695), str(89684), str(89703), str(89677), str(89712)}
}
-// This routine implements the OP_Vacuum opcode of the VDBE.
+// C comment
+// /*
+// ** This routine implements the OP_Vacuum opcode of the VDBE.
+// */
func _sqlite3RunVacuum(tls *crt.TLS, _pzErrMsg **int8, _db *Xsqlite3, _iDb int32) (r0 int32) {
var _rc, _saved_flags, _saved_nChange, _saved_nTotalChange, _isMemDb, _nRes, _nDb, _5_i int32
var _5_meta uint32
@@ -69704,212 +70275,199 @@ func _sqlite3RunVacuum(tls *crt.TLS, _pzErrMsg **int8, _db *Xsqlite3, _iDb int32
var _saved_mTrace uint8
var _pMain, _pTemp *XBtree
var _pDb *XDb
- _rc = i32(0)
+ _rc = int32(0)
_pDb = nil
- if (_db.X15) == 0 {
- _sqlite3SetString(tls, _pzErrMsg, _db, str(91335))
- return i32(1)
- }
- if (_db.X34) > i32(1) {
- _sqlite3SetString(tls, _pzErrMsg, _db, str(91375))
- return i32(1)
- }
- _saved_flags = _db.X6
- _saved_nChange = _db.X29
- _saved_nTotalChange = _db.X30
- _saved_mTrace = _db.X24
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(270542848)
- sink1(*p)
- }
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-655489)
- sink1(*p)
- }
- *(*uint8)(unsafe.Pointer(&(_db.X24))) = uint8(i32(0))
- _zDbMain = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- _pMain = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X1)
+ if _db.XautoCommit == 0 {
+ _sqlite3SetString(tls, _pzErrMsg, _db, str(89857))
+ return int32(1)
+ }
+ if _db.XnVdbeActive > int32(1) {
+ _sqlite3SetString(tls, _pzErrMsg, _db, str(89897))
+ return int32(1)
+ }
+ _saved_flags = _db.Xflags
+ _saved_nChange = _db.XnChange
+ _saved_nTotalChange = _db.XnTotalChange
+ _saved_mTrace = _db.XmTrace
+ _db.Xflags |= int32(270542848)
+ _db.Xflags &= int32(-655489)
+ _db.XmTrace = 0
+ _zDbMain = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ _pMain = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpBt)
_isMemDb = _sqlite3PagerIsMemdb(tls, _sqlite3BtreePager(tls, _pMain))
- _nDb = _db.X5
- _rc = _execSql(tls, _db, _pzErrMsg, str(91418))
- if _rc != i32(0) {
+ _nDb = _db.XnDb
+ _rc = _execSql(tls, _db, _pzErrMsg, str(89940))
+ if _rc != int32(0) {
goto _end_of_vacuum
}
func() {
- if ((_db.X5) - i32(1)) != _nDb {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124801), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000))), unsafe.Pointer(str(91439)))
+ if (_db.XnDb - int32(1)) != _nDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124801), unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000), unsafe.Pointer(str(89961)))
crt.X__builtin_abort(tls)
}
}()
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_nDb)))
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_nDb))
func() {
- if crt.Xstrcmp(tls, _pDb.X0, str(91456)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124803), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000))), unsafe.Pointer(str(91466)))
+ if crt.Xstrcmp(tls, _pDb.XzDbSName, str(89978)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124803), unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000), unsafe.Pointer(str(89988)))
crt.X__builtin_abort(tls)
}
}()
- _pTemp = (*XBtree)(_pDb.X1)
+ _pTemp = (*XBtree)(_pDb.XpBt)
_sqlite3BtreeCommit(tls, _pTemp)
_nRes = _sqlite3BtreeGetOptimalReserve(tls, _pMain)
- _sqlite3BtreeSetCacheSize(tls, _pTemp, (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X4).X10)
- _sqlite3BtreeSetSpillSize(tls, _pTemp, _sqlite3BtreeSetSpillSize(tls, _pMain, i32(0)))
- _sqlite3BtreeSetPagerFlags(tls, _pTemp, uint32(i32(33)))
- _rc = _execSql(tls, _db, _pzErrMsg, str(24983))
- if _rc != i32(0) {
+ _sqlite3BtreeSetCacheSize(tls, _pTemp, (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).Xcache_size)
+ _sqlite3BtreeSetSpillSize(tls, _pTemp, _sqlite3BtreeSetSpillSize(tls, _pMain, int32(0)))
+ _sqlite3BtreeSetPagerFlags(tls, _pTemp, uint32(33))
+ _rc = _execSql(tls, _db, _pzErrMsg, str(24938))
+ if _rc != int32(0) {
goto _end_of_vacuum
}
- _rc = _sqlite3BtreeBeginTrans(tls, _pMain, i32(2))
- if _rc != i32(0) {
+ _rc = _sqlite3BtreeBeginTrans(tls, _pMain, int32(2))
+ if _rc != int32(0) {
goto _end_of_vacuum
}
- if _sqlite3PagerGetJournalMode(tls, _sqlite3BtreePager(tls, _pMain)) == i32(5) {
- *(*int32)(unsafe.Pointer(&(_db.X27))) = i32(0)
+ if _sqlite3PagerGetJournalMode(tls, _sqlite3BtreePager(tls, _pMain)) == int32(5) {
+ _db.XnextPagesize = int32(0)
}
- if (_sqlite3BtreeSetPageSize(tls, _pTemp, _sqlite3BtreeGetPageSize(tls, _pMain), _nRes, i32(0)) != 0 || ((_isMemDb == 0) && _sqlite3BtreeSetPageSize(tls, _pTemp, _db.X27, _nRes, i32(0)) != 0)) || func() int32 {
- if (_db.X17) != 0 {
+ if (_sqlite3BtreeSetPageSize(tls, _pTemp, _sqlite3BtreeGetPageSize(tls, _pMain), _nRes, int32(0)) != 0 || ((_isMemDb == 0) && _sqlite3BtreeSetPageSize(tls, _pTemp, _db.XnextPagesize, _nRes, int32(0)) != 0)) || func() int32 {
+ if _db.XmallocFailed != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124846), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124846), unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- _rc = _sqlite3NomemError(tls, i32(124848))
+ _rc = _sqlite3NomemError(tls, int32(124848))
goto _end_of_vacuum
}
_sqlite3BtreeSetAutoVacuum(tls, _pTemp, func() int32 {
- if int32(_db.X20) >= i32(0) {
- return int32(_db.X20)
+ if int32(_db.XnextAutovac) >= int32(0) {
+ return int32(_db.XnextAutovac)
}
return _sqlite3BtreeGetAutoVacuum(tls, _pMain)
}())
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X1))) = uint8(_nDb)
- _rc = _execSqlF(tls, _db, _pzErrMsg, str(91503), unsafe.Pointer(_zDbMain))
- if _rc != i32(0) {
+ _db.Xinit.XiDb = uint8(_nDb)
+ _rc = _execSqlF(tls, _db, _pzErrMsg, str(90025), unsafe.Pointer(_zDbMain))
+ if _rc != int32(0) {
goto _end_of_vacuum
}
- _rc = _execSqlF(tls, _db, _pzErrMsg, str(91611), unsafe.Pointer(_zDbMain))
- if _rc != i32(0) {
+ _rc = _execSqlF(tls, _db, _pzErrMsg, str(90133), unsafe.Pointer(_zDbMain))
+ if _rc != int32(0) {
goto _end_of_vacuum
}
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X1))) = uint8(i32(0))
- _rc = _execSqlF(tls, _db, _pzErrMsg, str(91684), unsafe.Pointer(_zDbMain))
+ _db.Xinit.XiDb = 0
+ _rc = _execSqlF(tls, _db, _pzErrMsg, str(90206), unsafe.Pointer(_zDbMain))
func() {
- if ((_db.X6) & i32(268435456)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124887), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000))), unsafe.Pointer(str(91835)))
+ if (_db.Xflags & int32(268435456)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124887), unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000), unsafe.Pointer(str(90357)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-268435457)
- sink1(*p)
- }
- if _rc != i32(0) {
+ _db.Xflags &= int32(-268435457)
+ if _rc != int32(0) {
goto _end_of_vacuum
}
- _rc = _execSqlF(tls, _db, _pzErrMsg, str(91866), unsafe.Pointer(_zDbMain))
+ _rc = _execSqlF(tls, _db, _pzErrMsg, str(90388), unsafe.Pointer(_zDbMain))
if _rc != 0 {
goto _end_of_vacuum
}
func() {
- if i32(1) != _sqlite3BtreeIsInTrans(tls, _pTemp) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124929), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000))), unsafe.Pointer(str(91996)))
+ if int32(1) != _sqlite3BtreeIsInTrans(tls, _pTemp) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124929), unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000), unsafe.Pointer(str(90518)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if i32(1) != _sqlite3BtreeIsInTrans(tls, _pMain) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124930), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000))), unsafe.Pointer(str(92028)))
+ if int32(1) != _sqlite3BtreeIsInTrans(tls, _pMain) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124930), unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000), unsafe.Pointer(str(90550)))
crt.X__builtin_abort(tls)
}
}()
- _5_i = i32(0)
+ _5_i = int32(0)
_28:
- if _5_i >= i32(10) {
+ if _5_i >= int32(10) {
goto _31
}
- _sqlite3BtreeGetMeta(tls, _pMain, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3RunVacuumØ00aCopyØ001)) + 1*uintptr(_5_i)))), &_5_meta)
- _rc = _sqlite3BtreeUpdateMeta(tls, _pTemp, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3RunVacuumØ00aCopyØ001)) + 1*uintptr(_5_i)))), _5_meta+uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3RunVacuumØ00aCopyØ001)) + 1*uintptr(_5_i+i32(1))))))
+ _sqlite3BtreeGetMeta(tls, _pMain, int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3RunVacuumØ00aCopyØ001)), uintptr(_5_i))), &_5_meta)
+ _rc = _sqlite3BtreeUpdateMeta(tls, _pTemp, int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3RunVacuumØ00aCopyØ001)), uintptr(_5_i))), _5_meta+uint32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3RunVacuumØ00aCopyØ001)), uintptr(_5_i+int32(1)))))
if func() int32 {
- if _rc != i32(0) {
+ if _rc != int32(0) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124938), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124938), unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _end_of_vacuum
}
- {
- p := &_5_i
- *p = (*p) + i32(2)
- sink1(*p)
- }
+ _5_i += int32(2)
goto _28
_31:
_rc = _sqlite3BtreeCopyFile(tls, _pMain, _pTemp)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _end_of_vacuum
}
_rc = _sqlite3BtreeCommit(tls, _pTemp)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _end_of_vacuum
}
_sqlite3BtreeSetAutoVacuum(tls, _pMain, _sqlite3BtreeGetAutoVacuum(tls, _pTemp))
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124950), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124950), unsafe.Pointer(&_sqlite3RunVacuumØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3BtreeSetPageSize(tls, _pMain, _sqlite3BtreeGetPageSize(tls, _pTemp), _nRes, i32(1))
+ _rc = _sqlite3BtreeSetPageSize(tls, _pMain, _sqlite3BtreeGetPageSize(tls, _pTemp), _nRes, int32(1))
_end_of_vacuum:
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X1))) = uint8(i32(0))
- *(*int32)(unsafe.Pointer(&(_db.X6))) = _saved_flags
- *(*int32)(unsafe.Pointer(&(_db.X29))) = _saved_nChange
- *(*int32)(unsafe.Pointer(&(_db.X30))) = _saved_nTotalChange
- *(*uint8)(unsafe.Pointer(&(_db.X24))) = _saved_mTrace
- _sqlite3BtreeSetPageSize(tls, _pMain, i32(-1), i32(-1), i32(1))
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(1))
+ _db.Xinit.XiDb = 0
+ _db.Xflags = _saved_flags
+ _db.XnChange = _saved_nChange
+ _db.XnTotalChange = _saved_nTotalChange
+ _db.XmTrace = _saved_mTrace
+ _sqlite3BtreeSetPageSize(tls, _pMain, int32(-1), int32(-1), int32(1))
+ _db.XautoCommit = uint8(1)
if _pDb != nil {
- _sqlite3BtreeClose(tls, (*XBtree)(_pDb.X1))
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pDb.X1))))) = nil
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pDb.X4))))) = nil
+ _sqlite3BtreeClose(tls, (*XBtree)(_pDb.XpBt))
+ *(**XBtree)(unsafe.Pointer(&_pDb.XpBt)) = nil
+ *(**XSchema)(unsafe.Pointer(&_pDb.XpSchema)) = nil
}
_sqlite3ResetAllSchemasOfConnection(tls, _db)
return _rc
}
-// Execute zSql on database db.
-//
-// If zSql returns rows, then each row will have exactly one
-// column. (This will only happen if zSql begins with "SELECT".)
-// Take each row of result and call execSql() again recursively.
-//
-// The execSqlF() routine does the same thing, except it accepts
-// a format string as its third argument
+// C comment
+// /*
+// ** Execute zSql on database db.
+// **
+// ** If zSql returns rows, then each row will have exactly one
+// ** column. (This will only happen if zSql begins with "SELECT".)
+// ** Take each row of result and call execSql() again recursively.
+// **
+// ** The execSqlF() routine does the same thing, except it accepts
+// ** a format string as its third argument
+// */
func _execSql(tls *crt.TLS, _db *Xsqlite3, _pzErrMsg **int8, _zSql *int8) (r0 int32) {
var _rc int32
var _1_zSubSql *int8
var _pStmt unsafe.Pointer
- _rc = Xsqlite3_prepare_v2(tls, _db, _zSql, i32(-1), &_pStmt, nil)
- if _rc != i32(0) {
+ _rc = Xsqlite3_prepare_v2(tls, _db, _zSql, int32(-1), &_pStmt, nil)
+ if _rc != int32(0) {
return _rc
}
_0:
- if i32(100) != store1(&_rc, Xsqlite3_step(tls, _pStmt)) {
+ if int32(100) != store2(&_rc, Xsqlite3_step(tls, _pStmt)) {
goto _2
}
- _1_zSubSql = (*int8)(unsafe.Pointer(Xsqlite3_column_text(tls, _pStmt, i32(0))))
+ _1_zSubSql = (*int8)(unsafe.Pointer(Xsqlite3_column_text(tls, _pStmt, int32(0))))
func() {
- if Xsqlite3_strnicmp(tls, _zSql, str(25702), i32(6)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124657), unsafe.Pointer((*int8)(unsafe.Pointer(&_execSqlØ00__func__Ø000))), unsafe.Pointer(str(92060)))
+ if Xsqlite3_strnicmp(tls, _zSql, str(25657), int32(6)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124657), unsafe.Pointer(&_execSqlØ00__func__Ø000), unsafe.Pointer(str(90582)))
crt.X__builtin_abort(tls)
}
}()
@@ -69917,26 +70475,26 @@ _0:
goto _5
}
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_zSubSql)) + 1*uintptr(i32(0))))) == i32(83) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124659), unsafe.Pointer((*int8)(unsafe.Pointer(&_execSqlØ00__func__Ø000))), unsafe.Pointer(str(92097)))
+ if int32(*elem1(_1_zSubSql, 0)) == int32(83) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124659), unsafe.Pointer(&_execSqlØ00__func__Ø000), unsafe.Pointer(str(90619)))
crt.X__builtin_abort(tls)
}
}()
_rc = _execSql(tls, _db, _pzErrMsg, _1_zSubSql)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _2
}
_5:
goto _0
_2:
func() {
- if _rc == i32(100) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124664), unsafe.Pointer((*int8)(unsafe.Pointer(&_execSqlØ00__func__Ø000))), unsafe.Pointer(str(92113)))
+ if _rc == int32(100) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124664), unsafe.Pointer(&_execSqlØ00__func__Ø000), unsafe.Pointer(str(90635)))
crt.X__builtin_abort(tls)
}
}()
- if _rc == i32(101) {
- _rc = i32(0)
+ if _rc == int32(101) {
+ _rc = int32(0)
}
if _rc != 0 {
_sqlite3SetString(tls, _pzErrMsg, _db, Xsqlite3_errmsg(tls, _db))
@@ -69948,22 +70506,25 @@ _2:
var _execSqlØ00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_execSqlØ00__func__Ø000[0], str(92128), 8)
+ crt.Xstrncpy(nil, &_execSqlØ00__func__Ø000[0], str(90650), 8)
}
var _sqlite3RunVacuumØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RunVacuumØ00__func__Ø000[0], str(92136), 17)
+ crt.Xstrncpy(nil, &_sqlite3RunVacuumØ00__func__Ø000[0], str(90658), 17)
}
-// Return the number of bytes of space at the end of every page that
-// are intentually left unused. This is the "reserved" space that is
-// sometimes used by extensions.
-//
-// If SQLITE_HAS_MUTEX is defined then the number returned is the
-// greater of the current reserved space and the maximum requested
-// reserve space.
+// C comment
+// /*
+// ** Return the number of bytes of space at the end of every page that
+// ** are intentually left unused. This is the "reserved" space that is
+// ** sometimes used by extensions.
+// **
+// ** If SQLITE_HAS_MUTEX is defined then the number returned is the
+// ** greater of the current reserved space and the maximum requested
+// ** reserve space.
+// */
func _sqlite3BtreeGetOptimalReserve(tls *crt.TLS, _p *XBtree) (r0 int32) {
var _n int32
_sqlite3BtreeEnter(tls, _p)
@@ -69972,26 +70533,29 @@ func _sqlite3BtreeGetOptimalReserve(tls *crt.TLS, _p *XBtree) (r0 int32) {
return _n
}
-// Change the "spill" limit on the number of pages in the cache.
-// If the number of pages exceeds this limit during a write transaction,
-// the pager might attempt to "spill" pages to the journal early in
-// order to free up memory.
-//
-// The value returned is the current spill size. If zero is passed
-// as an argument, no changes are made to the spill size setting, so
-// using mxPage of 0 is a way to query the current spill size.
+// C comment
+// /*
+// ** Change the "spill" limit on the number of pages in the cache.
+// ** If the number of pages exceeds this limit during a write transaction,
+// ** the pager might attempt to "spill" pages to the journal early in
+// ** order to free up memory.
+// **
+// ** The value returned is the current spill size. If zero is passed
+// ** as an argument, no changes are made to the spill size setting, so
+// ** using mxPage of 0 is a way to query the current spill size.
+// */
func _sqlite3BtreeSetSpillSize(tls *crt.TLS, _p *XBtree, _mxPage int32) (r0 int32) {
var _res int32
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61682), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSetSpillSizeØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61682), unsafe.Pointer(&_sqlite3BtreeSetSpillSizeØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
- _res = _sqlite3PagerSetSpillsize(tls, (*XPager)(_pBt.X0), _mxPage)
+ _res = _sqlite3PagerSetSpillsize(tls, (*XPager)(_pBt.XpPager), _mxPage)
_sqlite3BtreeLeave(tls, _p)
return _res
}
@@ -69999,37 +70563,43 @@ func _sqlite3BtreeSetSpillSize(tls *crt.TLS, _p *XBtree, _mxPage int32) (r0 int3
var _sqlite3BtreeSetSpillSizeØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeSetSpillSizeØ00__func__Ø000[0], str(92153), 25)
+ crt.Xstrncpy(nil, &_sqlite3BtreeSetSpillSizeØ00__func__Ø000[0], str(90675), 25)
}
-// Change the maximum number of in-memory pages that are allowed
-// before attempting to spill pages to journal.
+// C comment
+// /*
+// ** Change the maximum number of in-memory pages that are allowed
+// ** before attempting to spill pages to journal.
+// */
func _sqlite3PagerSetSpillsize(tls *crt.TLS, _pPager *XPager, _mxPage int32) (r0 int32) {
- return _sqlite3PcacheSetSpillsize(tls, (*XPCache)(_pPager.X59), _mxPage)
+ return _sqlite3PcacheSetSpillsize(tls, (*XPCache)(_pPager.XpPCache), _mxPage)
}
-// Set the suggested cache-spill value. Make no changes if if the
-// argument is zero. Return the effective cache-spill size, which will
-// be the larger of the szSpill and szCache.
+// C comment
+// /*
+// ** Set the suggested cache-spill value. Make no changes if if the
+// ** argument is zero. Return the effective cache-spill size, which will
+// ** be the larger of the szSpill and szCache.
+// */
func _sqlite3PcacheSetSpillsize(tls *crt.TLS, _p *XPCache, _mxPage int32) (r0 int32) {
var _res int32
func() {
- if (_p.X12) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44952), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheSetSpillsizeØ00__func__Ø000))), unsafe.Pointer(str(92178)))
+ if _p.XpCache == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44952), unsafe.Pointer(&_sqlite3PcacheSetSpillsizeØ00__func__Ø000), unsafe.Pointer(str(90700)))
crt.X__builtin_abort(tls)
}
}()
if _mxPage == 0 {
goto _2
}
- if _mxPage < i32(0) {
- _mxPage = int32((int64(i32(-1024)) * int64(_mxPage)) / int64((_p.X6)+(_p.X7)))
+ if _mxPage < int32(0) {
+ _mxPage = int32((int64(-1024) * int64(_mxPage)) / int64(_p.XszPage+_p.XszExtra))
}
- *(*int32)(unsafe.Pointer(&(_p.X5))) = _mxPage
+ _p.XszSpill = _mxPage
_2:
_res = _numberOfCachePages(tls, _p)
- if _res < (_p.X5) {
- _res = _p.X5
+ if _res < _p.XszSpill {
+ _res = _p.XszSpill
}
return _res
}
@@ -70037,166 +70607,165 @@ _2:
var _sqlite3PcacheSetSpillsizeØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheSetSpillsizeØ00__func__Ø000[0], str(92191), 26)
+ crt.Xstrncpy(nil, &_sqlite3PcacheSetSpillsizeØ00__func__Ø000[0], str(90713), 26)
}
func _sqlite3BtreeSetPagerFlags(tls *crt.TLS, _p *XBtree, _pgFlags uint32) (r0 int32) {
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61718), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSetPagerFlagsØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61718), unsafe.Pointer(&_sqlite3BtreeSetPagerFlagsØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
- _sqlite3PagerSetFlags(tls, (*XPager)(_pBt.X0), _pgFlags)
+ _sqlite3PagerSetFlags(tls, (*XPager)(_pBt.XpPager), _pgFlags)
_sqlite3BtreeLeave(tls, _p)
- return i32(0)
+ return int32(0)
}
var _sqlite3BtreeSetPagerFlagsØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeSetPagerFlagsØ00__func__Ø000[0], str(92217), 26)
+ crt.Xstrncpy(nil, &_sqlite3BtreeSetPagerFlagsØ00__func__Ø000[0], str(90739), 26)
}
func _sqlite3PagerSetFlags(tls *crt.TLS, _pPager *XPager, _pgFlags uint32) {
var _level uint32
- _level = _pgFlags & uint32(i32(7))
- if (_pPager.X10) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pPager.X4))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_pPager.X5))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pPager.X6))) = uint8(i32(0))
+ _level = _pgFlags & uint32(7)
+ if _pPager.XtempFile != 0 {
+ _pPager.XnoSync = uint8(1)
+ _pPager.XfullSync = 0
+ _pPager.XextraSync = 0
goto _1
}
- *(*uint8)(unsafe.Pointer(&(_pPager.X4))) = uint8(func() int32 {
- if _level == uint32(i32(1)) {
- return i32(1)
+ _pPager.XnoSync = uint8(func() int32 {
+ if _level == uint32(1) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- *(*uint8)(unsafe.Pointer(&(_pPager.X5))) = uint8(func() int32 {
- if _level >= uint32(i32(3)) {
- return i32(1)
+ _pPager.XfullSync = uint8(func() int32 {
+ if _level >= uint32(3) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- *(*uint8)(unsafe.Pointer(&(_pPager.X6))) = uint8(func() int32 {
- if _level == uint32(i32(4)) {
- return i32(1)
+ _pPager.XextraSync = uint8(func() int32 {
+ if _level == uint32(4) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
_1:
- if (_pPager.X4) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pPager.X9))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pPager.X7))) = uint8(i32(0))
+ if _pPager.XnoSync != 0 {
+ _pPager.XsyncFlags = 0
+ _pPager.XckptSyncFlags = 0
goto _13
}
- if (_pgFlags & uint32(i32(8))) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pPager.X9))) = uint8(i32(3))
- *(*uint8)(unsafe.Pointer(&(_pPager.X7))) = uint8(i32(3))
+ if (_pgFlags & uint32(8)) != 0 {
+ _pPager.XsyncFlags = uint8(3)
+ _pPager.XckptSyncFlags = uint8(3)
goto _13
}
- if (_pgFlags & uint32(i32(16))) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pPager.X9))) = uint8(i32(2))
- *(*uint8)(unsafe.Pointer(&(_pPager.X7))) = uint8(i32(3))
+ if (_pgFlags & uint32(16)) != 0 {
+ _pPager.XsyncFlags = uint8(2)
+ _pPager.XckptSyncFlags = uint8(3)
goto _13
}
- *(*uint8)(unsafe.Pointer(&(_pPager.X9))) = uint8(i32(2))
- *(*uint8)(unsafe.Pointer(&(_pPager.X7))) = uint8(i32(2))
+ _pPager.XsyncFlags = uint8(2)
+ _pPager.XckptSyncFlags = uint8(2)
_13:
- *(*uint8)(unsafe.Pointer(&(_pPager.X8))) = _pPager.X9
- if (_pPager.X5) != 0 {
+ _pPager.XwalSyncFlags = _pPager.XsyncFlags
+ if _pPager.XfullSync != 0 {
{
- p := (*uint8)(unsafe.Pointer(&(_pPager.X8)))
- *p = uint8(int32(*p) | i32(32))
- sink2(*p)
+ p := &_pPager.XwalSyncFlags
+ *p = uint8(int32(*p) | int32(32))
}
}
- if (_pgFlags & uint32(i32(32))) != 0 {
+ if (_pgFlags & uint32(32)) != 0 {
{
- p := (*uint8)(unsafe.Pointer(&(_pPager.X18)))
- *p = uint8(int32(*p) & i32(-2))
- sink2(*p)
+ p := &_pPager.XdoNotSpill
+ *p = uint8(int32(*p) & int32(-2))
}
goto _16
}
{
- p := (*uint8)(unsafe.Pointer(&(_pPager.X18)))
- *p = uint8(int32(*p) | i32(1))
- sink2(*p)
+ p := &_pPager.XdoNotSpill
+ *p = uint8(int32(*p) | int32(1))
}
_16:
}
-// Change the default pages size and the number of reserved bytes per page.
-// Or, if the page size has already been fixed, return SQLITE_READONLY
-// without changing anything.
-//
-// The page size must be a power of 2 between 512 and 65536. If the page
-// size supplied does not meet this constraint then the page size is not
-// changed.
-//
-// Page sizes are constrained to be a power of two so that the region
-// of the database file used for locking (beginning at PENDING_BYTE,
-// the first byte past the 1GB boundary, 0x40000000) needs to occur
-// at the beginning of a page.
-//
-// If parameter nReserve is less than zero, then the number of reserved
-// bytes per page is left unchanged.
-//
-// If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size
-// and autovacuum mode can no longer be changed.
+// C comment
+// /*
+// ** Change the default pages size and the number of reserved bytes per page.
+// ** Or, if the page size has already been fixed, return SQLITE_READONLY
+// ** without changing anything.
+// **
+// ** The page size must be a power of 2 between 512 and 65536. If the page
+// ** size supplied does not meet this constraint then the page size is not
+// ** changed.
+// **
+// ** Page sizes are constrained to be a power of two so that the region
+// ** of the database file used for locking (beginning at PENDING_BYTE,
+// ** the first byte past the 1GB boundary, 0x40000000) needs to occur
+// ** at the beginning of a page.
+// **
+// ** If parameter nReserve is less than zero, then the number of reserved
+// ** bytes per page is left unchanged.
+// **
+// ** If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size
+// ** and autovacuum mode can no longer be changed.
+// */
func _sqlite3BtreeSetPageSize(tls *crt.TLS, _p *XBtree, _pageSize int32, _nReserve int32, _iFix int32) (r0 int32) {
var _rc int32
var _pBt *XBtShared
- _rc = i32(0)
- _pBt = (*XBtShared)(_p.X1)
+ _rc = int32(0)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
- if _nReserve < i32(-1) || _nReserve > i32(255) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61749), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSetPageSizeØ00__func__Ø000))), unsafe.Pointer(str(92243)))
+ if _nReserve < int32(-1) || _nReserve > int32(255) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61749), unsafe.Pointer(&_sqlite3BtreeSetPageSizeØ00__func__Ø000), unsafe.Pointer(str(90765)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
- if (int32(_pBt.X10) & i32(2)) != 0 {
+ if (int32(_pBt.XbtsFlags) & int32(2)) != 0 {
_sqlite3BtreeLeave(tls, _p)
- return i32(8)
+ return int32(8)
}
- if _nReserve < i32(0) {
- _nReserve = int32((_pBt.X15) - (_pBt.X16))
+ if _nReserve < int32(0) {
+ _nReserve = int32(_pBt.XpageSize - _pBt.XusableSize)
}
func() {
- if _nReserve < i32(0) || _nReserve > i32(255) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61761), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSetPageSizeØ00__func__Ø000))), unsafe.Pointer(str(92273)))
+ if _nReserve < int32(0) || _nReserve > int32(255) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61761), unsafe.Pointer(&_sqlite3BtreeSetPageSizeØ00__func__Ø000), unsafe.Pointer(str(90795)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pageSize >= i32(512)) && (_pageSize <= i32(65536))) && (((_pageSize - i32(1)) & _pageSize) == i32(0)) {
+ if ((_pageSize >= int32(512)) && (_pageSize <= int32(65536))) && (((_pageSize - int32(1)) & _pageSize) == int32(0)) {
func() {
- if (_pageSize & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61764), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSetPageSizeØ00__func__Ø000))), unsafe.Pointer(str(51388)))
+ if (_pageSize & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61764), unsafe.Pointer(&_sqlite3BtreeSetPageSizeØ00__func__Ø000), unsafe.Pointer(str(51364)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtCursor)(_pBt.X2) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61765), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSetPageSizeØ00__func__Ø000))), unsafe.Pointer(str(22109)))
+ if _pBt.XpCursor != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61765), unsafe.Pointer(&_sqlite3BtreeSetPageSizeØ00__func__Ø000), unsafe.Pointer(str(22064)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_pBt.X15))) = uint32(_pageSize)
+ _pBt.XpageSize = uint32(_pageSize)
_freeTempSpace(tls, _pBt)
}
- _rc = _sqlite3PagerSetPagesize(tls, (*XPager)(_pBt.X0), (*uint32)(unsafe.Pointer(&(_pBt.X15))), _nReserve)
- *(*uint32)(unsafe.Pointer(&(_pBt.X16))) = (_pBt.X15) - uint32(uint16(_nReserve))
+ _rc = _sqlite3PagerSetPagesize(tls, (*XPager)(_pBt.XpPager), &_pBt.XpageSize, _nReserve)
+ _pBt.XusableSize = _pBt.XpageSize - uint32(uint16(_nReserve))
if _iFix != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_pBt.X10)))
- *p = uint16(int32(*p) | i32(2))
- sink14(*p)
+ p := &_pBt.XbtsFlags
+ *p = uint16(int32(*p) | int32(2))
}
}
_sqlite3BtreeLeave(tls, _p)
@@ -70206,61 +70775,67 @@ func _sqlite3BtreeSetPageSize(tls *crt.TLS, _p *XBtree, _pageSize int32, _nReser
var _sqlite3BtreeSetPageSizeØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeSetPageSizeØ00__func__Ø000[0], str(92302), 24)
+ crt.Xstrncpy(nil, &_sqlite3BtreeSetPageSizeØ00__func__Ø000[0], str(90824), 24)
}
-// Change the 'auto-vacuum' property of the database. If the 'autoVacuum'
-// parameter is non-zero, then auto-vacuum mode is enabled. If zero, it
-// is disabled. The default value for the auto-vacuum property is
-// determined by the SQLITE_DEFAULT_AUTOVACUUM macro.
+// C comment
+// /*
+// ** Change the 'auto-vacuum' property of the database. If the 'autoVacuum'
+// ** parameter is non-zero, then auto-vacuum mode is enabled. If zero, it
+// ** is disabled. The default value for the auto-vacuum property is
+// ** determined by the SQLITE_DEFAULT_AUTOVACUUM macro.
+// */
func _sqlite3BtreeSetAutoVacuum(tls *crt.TLS, _p *XBtree, _autoVacuum int32) (r0 int32) {
var _rc int32
var _av uint8
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
- _rc = i32(0)
+ _pBt = (*XBtShared)(_p.XpBt)
+ _rc = int32(0)
_av = uint8(_autoVacuum)
_sqlite3BtreeEnter(tls, _p)
- if ((int32(_pBt.X10) & i32(2)) != i32(0)) && (func() int32 {
+ if ((int32(_pBt.XbtsFlags) & int32(2)) != int32(0)) && (func() int32 {
if _av != 0 {
- return i32(1)
+ return int32(1)
}
- return i32(0)
- }() != int32(_pBt.X5)) {
- _rc = i32(8)
+ return int32(0)
+ }() != int32(_pBt.XautoVacuum)) {
+ _rc = int32(8)
goto _4
}
- *(*uint8)(unsafe.Pointer(&(_pBt.X5))) = uint8(func() int32 {
+ _pBt.XautoVacuum = uint8(func() int32 {
if _av != 0 {
- return i32(1)
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- *(*uint8)(unsafe.Pointer(&(_pBt.X6))) = uint8(func() int32 {
- if int32(_av) == i32(2) {
- return i32(1)
+ _pBt.XincrVacuum = uint8(func() int32 {
+ if int32(_av) == int32(2) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
_4:
_sqlite3BtreeLeave(tls, _p)
return _rc
}
-// Return the value of the 'auto-vacuum' property. If auto-vacuum is
-// enabled 1 is returned. Otherwise 0.
+// C comment
+// /*
+// ** Return the value of the 'auto-vacuum' property. If auto-vacuum is
+// ** enabled 1 is returned. Otherwise 0.
+// */
func _sqlite3BtreeGetAutoVacuum(tls *crt.TLS, _p *XBtree) (r0 int32) {
var _rc int32
_sqlite3BtreeEnter(tls, _p)
_rc = func() int32 {
- if ((*XBtShared)(_p.X1).X5) == 0 {
- return i32(0)
+ if ((*XBtShared)(_p.XpBt).XautoVacuum) == 0 {
+ return int32(0)
}
return func() int32 {
- if ((*XBtShared)(_p.X1).X6) == 0 {
- return i32(1)
+ if ((*XBtShared)(_p.XpBt).XincrVacuum) == 0 {
+ return int32(1)
}
- return i32(2)
+ return int32(2)
}()
}()
_sqlite3BtreeLeave(tls, _p)
@@ -70275,10 +70850,10 @@ func _execSqlF(tls *crt.TLS, _db *Xsqlite3, _pzErrMsg **int8, _zSql *int8, args
_z = _sqlite3VMPrintf(tls, _db, _zSql, _ap)
_ap = nil
if _z == nil {
- return i32(7)
+ return int32(7)
}
_rc = _execSql(tls, _db, _pzErrMsg, _z)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_z))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_z))
return _rc
}
@@ -70288,12 +70863,15 @@ func init() {
_sqlite3RunVacuumØ00aCopyØ001 = [10]uint8{1, 1, 3, 0, 5, 0, 6, 0, 8, 0}
}
-// Copy the complete content of pBtFrom into pBtTo. A transaction
-// must be active for both files.
-//
-// The size of file pTo may be reduced by this operation. If anything
-// goes wrong, the transaction on pTo is rolled back. If successful, the
-// transaction is committed before returning.
+// C comment
+// /*
+// ** Copy the complete content of pBtFrom into pBtTo. A transaction
+// ** must be active for both files.
+// **
+// ** The size of file pTo may be reduced by this operation. If anything
+// ** goes wrong, the transaction on pTo is rolled back. If successful, the
+// ** transaction is committed before returning.
+// */
func _sqlite3BtreeCopyFile(tls *crt.TLS, _pTo *XBtree, _pFrom *XBtree) (r0 int32) {
var _rc int32
var _1_nByte int64
@@ -70303,49 +70881,48 @@ func _sqlite3BtreeCopyFile(tls *crt.TLS, _pTo *XBtree, _pFrom *XBtree) (r0 int32
_sqlite3BtreeEnter(tls, _pFrom)
func() {
if _sqlite3BtreeIsInTrans(tls, _pTo) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69652), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCopyFileØ00__func__Ø000))), unsafe.Pointer(str(92326)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69652), unsafe.Pointer(&_sqlite3BtreeCopyFileØ00__func__Ø000), unsafe.Pointer(str(90848)))
crt.X__builtin_abort(tls)
}
}()
_pFd = _sqlite3PagerFile(tls, _sqlite3BtreePager(tls, _pTo))
- if (*Xsqlite3_io_methods)(_pFd.X0) == nil {
+ if _pFd.XpMethods == nil {
goto _2
}
_1_nByte = int64(_sqlite3BtreeGetPageSize(tls, _pFrom)) * int64(_sqlite3BtreeLastPage(tls, _pFrom))
- _rc = _sqlite3OsFileControl(tls, _pFd, i32(11), (unsafe.Pointer)(&_1_nByte))
- if _rc == i32(12) {
- _rc = i32(0)
+ _rc = _sqlite3OsFileControl(tls, _pFd, int32(11), unsafe.Pointer(&_1_nByte))
+ if _rc == int32(12) {
+ _rc = int32(0)
}
if _rc != 0 {
goto _copy_finished
}
_2:
- crt.Xmemset(tls, (unsafe.Pointer)(&_b), i32(0), u32(48))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_b.X5))))) = (*Xsqlite3)(_pFrom.X0)
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_b.X6))))) = _pFrom
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_b.X1))))) = _pTo
- *(*uint32)(unsafe.Pointer(&(_b.X4))) = uint32(i32(1))
- Xsqlite3_backup_step(tls, &_b, i32(2147483647))
+ crt.Xmemset(tls, unsafe.Pointer(&_b), int32(0), uint32(48))
+ *(**Xsqlite3)(unsafe.Pointer(&_b.XpSrcDb)) = (*Xsqlite3)(_pFrom.Xdb)
+ *(**XBtree)(unsafe.Pointer(&_b.XpSrc)) = _pFrom
+ *(**XBtree)(unsafe.Pointer(&_b.XpDest)) = _pTo
+ _b.XiNext = uint32(1)
+ Xsqlite3_backup_step(tls, &_b, int32(2147483647))
func() {
- if (_b.X7) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69683), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCopyFileØ00__func__Ø000))), unsafe.Pointer(str(92353)))
+ if _b.Xrc == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69683), unsafe.Pointer(&_sqlite3BtreeCopyFileØ00__func__Ø000), unsafe.Pointer(str(90875)))
crt.X__builtin_abort(tls)
}
}()
_rc = Xsqlite3_backup_finish(tls, &_b)
- if _rc == i32(0) {
+ if _rc == int32(0) {
{
- p := (*uint16)(unsafe.Pointer(&((*XBtShared)(_pTo.X1).X10)))
- *p = uint16(int32(*p) & i32(-3))
- sink14(*p)
+ p := &((*XBtShared)(_pTo.XpBt).XbtsFlags)
+ *p = uint16(int32(*p) & int32(-3))
}
goto _8
}
- _sqlite3PagerClearCache(tls, _sqlite3BtreePager(tls, (*XBtree)(_b.X1)))
+ _sqlite3PagerClearCache(tls, _sqlite3BtreePager(tls, (*XBtree)(_b.XpDest)))
_8:
func() {
- if _sqlite3BtreeIsInTrans(tls, _pTo) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69692), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeCopyFileØ00__func__Ø000))), unsafe.Pointer(str(92369)))
+ if _sqlite3BtreeIsInTrans(tls, _pTo) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69692), unsafe.Pointer(&_sqlite3BtreeCopyFileØ00__func__Ø000), unsafe.Pointer(str(90891)))
crt.X__builtin_abort(tls)
}
}()
@@ -70354,7 +70931,6 @@ _copy_finished:
_sqlite3BtreeLeave(tls, _pTo)
return _rc
- _ = _b
_ = _1_nByte
panic(0)
}
@@ -70362,10 +70938,13 @@ _copy_finished:
var _sqlite3BtreeCopyFileØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeCopyFileØ00__func__Ø000[0], str(92399), 21)
+ crt.Xstrncpy(nil, &_sqlite3BtreeCopyFileØ00__func__Ø000[0], str(90921), 21)
}
-// Copy nPage pages from the source b-tree to the destination.
+// C comment
+// /*
+// ** Copy nPage pages from the source b-tree to the destination.
+// */
func Xsqlite3_backup_step(tls *crt.TLS, _p *Xsqlite3_backup, _nPage int32) (r0 int32) {
var _rc, _destMode, _pgszSrc, _pgszDest, _2_ii, _2_nSrcPage, _2_bCloseTrans, _21_nDestTruncate, _22_ratio, _25_nDstPage, _36_rc2 int32
var _25_iSize, _25_iOff, _25_iEnd int64
@@ -70374,119 +70953,119 @@ func Xsqlite3_backup_step(tls *crt.TLS, _p *Xsqlite3_backup, _nPage int32) (r0 i
var _2_pSrcPager, _2_pDestPager *XPager
var _25_pFile *Xsqlite3_file
var _10_pSrcPg, _27_pPg, _30_pSrcPg *XPgHdr
- _pgszSrc = i32(0)
- _pgszDest = i32(0)
+ _pgszSrc = int32(0)
+ _pgszDest = int32(0)
if _p == nil {
- return _sqlite3MisuseError(tls, i32(69253))
+ return _sqlite3MisuseError(tls, int32(69253))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X5).X3))
- _sqlite3BtreeEnter(tls, (*XBtree)(_p.X6))
- if (*Xsqlite3)(_p.X0) != nil {
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.XpSrcDb).Xmutex))
+ _sqlite3BtreeEnter(tls, (*XBtree)(_p.XpSrc))
+ if _p.XpDestDb != nil {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.XpDestDb).Xmutex))
}
- _rc = _p.X7
+ _rc = _p.Xrc
if _isFatalError(tls, _rc) != 0 {
goto _2
}
- _2_pSrcPager = _sqlite3BtreePager(tls, (*XBtree)(_p.X6))
- _2_pDestPager = _sqlite3BtreePager(tls, (*XBtree)(_p.X1))
- _2_nSrcPage = i32(-1)
- _2_bCloseTrans = i32(0)
- if ((*Xsqlite3)(_p.X0) != nil) && (int32((*XBtShared)((*XBtree)(_p.X6).X1).X8) == i32(2)) {
- _rc = i32(5)
+ _2_pSrcPager = _sqlite3BtreePager(tls, (*XBtree)(_p.XpSrc))
+ _2_pDestPager = _sqlite3BtreePager(tls, (*XBtree)(_p.XpDest))
+ _2_nSrcPage = int32(-1)
+ _2_bCloseTrans = int32(0)
+ if (_p.XpDestDb != nil) && (int32((*XBtShared)((*XBtree)(_p.XpSrc).XpBt).XinTransaction) == int32(2)) {
+ _rc = int32(5)
goto _5
}
- _rc = i32(0)
+ _rc = int32(0)
_5:
- if (_rc == i32(0)) && (i32(0) == _sqlite3BtreeIsInReadTrans(tls, (*XBtree)(_p.X6))) {
- _rc = _sqlite3BtreeBeginTrans(tls, (*XBtree)(_p.X6), i32(0))
- _2_bCloseTrans = i32(1)
+ if (_rc == int32(0)) && (int32(0) == _sqlite3BtreeIsInReadTrans(tls, (*XBtree)(_p.XpSrc))) {
+ _rc = _sqlite3BtreeBeginTrans(tls, (*XBtree)(_p.XpSrc), int32(0))
+ _2_bCloseTrans = int32(1)
}
- if (((_p.X3) == i32(0)) && (_rc == i32(0))) && (_setDestPgsz(tls, _p) == i32(7)) {
- _rc = i32(7)
+ if ((_p.XbDestLocked == int32(0)) && (_rc == int32(0))) && (_setDestPgsz(tls, _p) == int32(7)) {
+ _rc = int32(7)
}
- if ((i32(0) == _rc) && ((_p.X3) == i32(0))) && (i32(0) == store1(&_rc, _sqlite3BtreeBeginTrans(tls, (*XBtree)(_p.X1), i32(2)))) {
- *(*int32)(unsafe.Pointer(&(_p.X3))) = i32(1)
- _sqlite3BtreeGetMeta(tls, (*XBtree)(_p.X1), i32(1), (*uint32)(unsafe.Pointer(&(_p.X2))))
+ if ((int32(0) == _rc) && (_p.XbDestLocked == int32(0))) && (int32(0) == store2(&_rc, _sqlite3BtreeBeginTrans(tls, (*XBtree)(_p.XpDest), int32(2)))) {
+ _p.XbDestLocked = int32(1)
+ _sqlite3BtreeGetMeta(tls, (*XBtree)(_p.XpDest), int32(1), &_p.XiDestSchema)
}
- _pgszSrc = _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.X6))
- _pgszDest = _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.X1))
- _destMode = _sqlite3PagerGetJournalMode(tls, _sqlite3BtreePager(tls, (*XBtree)(_p.X1)))
- if ((i32(0) == _rc) && (_destMode == i32(5))) && (_pgszSrc != _pgszDest) {
- _rc = i32(8)
+ _pgszSrc = _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.XpSrc))
+ _pgszDest = _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.XpDest))
+ _destMode = _sqlite3PagerGetJournalMode(tls, _sqlite3BtreePager(tls, (*XBtree)(_p.XpDest)))
+ if ((int32(0) == _rc) && (_destMode == int32(5))) && (_pgszSrc != _pgszDest) {
+ _rc = int32(8)
}
- _2_nSrcPage = int32(_sqlite3BtreeLastPage(tls, (*XBtree)(_p.X6)))
+ _2_nSrcPage = int32(_sqlite3BtreeLastPage(tls, (*XBtree)(_p.XpSrc)))
func() {
- if _2_nSrcPage < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69318), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000))), unsafe.Pointer(str(92420)))
+ if _2_nSrcPage < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69318), unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000), unsafe.Pointer(str(90942)))
crt.X__builtin_abort(tls)
}
}()
- _2_ii = i32(0)
+ _2_ii = int32(0)
_19:
- if _nPage >= i32(0) && _2_ii >= _nPage || (_p.X4) > uint32(_2_nSrcPage) || _rc != 0 {
+ if _nPage >= int32(0) && _2_ii >= _nPage || _p.XiNext > uint32(_2_nSrcPage) || _rc != 0 {
goto _25
}
- _9_iSrcPg = _p.X4
- if _9_iSrcPg == ((uint32(_sqlite3PendingByte) / ((*XBtShared)((*XBtree)(_p.X6).X1).X15)) + uint32(i32(1))) {
+ _9_iSrcPg = _p.XiNext
+ if _9_iSrcPg == ((uint32(_sqlite3PendingByte) / ((*XBtShared)((*XBtree)(_p.XpSrc).XpBt).XpageSize)) + uint32(1)) {
goto _26
}
- _rc = _sqlite3PagerGet(tls, _2_pSrcPager, _9_iSrcPg, &_10_pSrcPg, i32(2))
- if _rc == i32(0) {
- _rc = _backupOnePage(tls, _p, _9_iSrcPg, (*uint8)(_sqlite3PagerGetData(tls, _10_pSrcPg)), i32(0))
+ _rc = _sqlite3PagerGet(tls, _2_pSrcPager, _9_iSrcPg, &_10_pSrcPg, int32(2))
+ if _rc == int32(0) {
+ _rc = _backupOnePage(tls, _p, _9_iSrcPg, (*uint8)(_sqlite3PagerGetData(tls, _10_pSrcPg)), int32(0))
_sqlite3PagerUnref(tls, _10_pSrcPg)
}
_26:
- *(*uint32)(unsafe.Pointer(&(_p.X4))) += 1
+ _p.XiNext += 1
_2_ii += 1
goto _19
_25:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _28
}
- *(*uint32)(unsafe.Pointer(&(_p.X9))) = uint32(_2_nSrcPage)
- *(*uint32)(unsafe.Pointer(&(_p.X8))) = uint32(_2_nSrcPage+i32(1)) - (_p.X4)
- if (_p.X4) > uint32(_2_nSrcPage) {
- _rc = i32(101)
+ _p.XnPagecount = uint32(_2_nSrcPage)
+ _p.XnRemaining = uint32(_2_nSrcPage+int32(1)) - _p.XiNext
+ if _p.XiNext > uint32(_2_nSrcPage) {
+ _rc = int32(101)
goto _31
}
- if (_p.X10) == 0 {
+ if _p.XisAttached == 0 {
_attachBackupObject(tls, _p)
}
_31:
_28:
- if _rc != i32(101) {
+ if _rc != int32(101) {
goto _32
}
- if _2_nSrcPage == i32(0) {
- _rc = _sqlite3BtreeNewDb(tls, (*XBtree)(_p.X1))
- _2_nSrcPage = i32(1)
+ if _2_nSrcPage == int32(0) {
+ _rc = _sqlite3BtreeNewDb(tls, (*XBtree)(_p.XpDest))
+ _2_nSrcPage = int32(1)
}
- if (_rc == i32(0)) || (_rc == i32(101)) {
- _rc = _sqlite3BtreeUpdateMeta(tls, (*XBtree)(_p.X1), i32(1), (_p.X2)+uint32(i32(1)))
+ if (_rc == int32(0)) || (_rc == int32(101)) {
+ _rc = _sqlite3BtreeUpdateMeta(tls, (*XBtree)(_p.XpDest), int32(1), _p.XiDestSchema+uint32(1))
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _36
}
- if (*Xsqlite3)(_p.X0) != nil {
- _sqlite3ResetAllSchemasOfConnection(tls, (*Xsqlite3)(_p.X0))
+ if _p.XpDestDb != nil {
+ _sqlite3ResetAllSchemasOfConnection(tls, (*Xsqlite3)(_p.XpDestDb))
}
- if _destMode == i32(5) {
- _rc = _sqlite3BtreeSetVersion(tls, (*XBtree)(_p.X1), i32(2))
+ if _destMode == int32(5) {
+ _rc = _sqlite3BtreeSetVersion(tls, (*XBtree)(_p.XpDest), int32(2))
}
_36:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _39
}
func() {
- if _pgszSrc != _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.X6)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69376), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000))), unsafe.Pointer(str(92432)))
+ if _pgszSrc != _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.XpSrc)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69376), unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000), unsafe.Pointer(str(90954)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pgszDest != _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.X1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69377), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000))), unsafe.Pointer(str(92474)))
+ if _pgszDest != _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.XpDest)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69377), unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000), unsafe.Pointer(str(90996)))
crt.X__builtin_abort(tls)
}
}()
@@ -70494,8 +71073,8 @@ _36:
goto _44
}
_22_ratio = _pgszDest / _pgszSrc
- _21_nDestTruncate = ((_2_nSrcPage + _22_ratio) - i32(1)) / _22_ratio
- if _21_nDestTruncate == int32((uint32(_sqlite3PendingByte)/((*XBtShared)((*XBtree)(_p.X1).X1).X15))+uint32(i32(1))) {
+ _21_nDestTruncate = ((_2_nSrcPage + _22_ratio) - int32(1)) / _22_ratio
+ if _21_nDestTruncate == int32((uint32(_sqlite3PendingByte)/((*XBtShared)((*XBtree)(_p.XpDest).XpBt).XpageSize))+uint32(1)) {
_21_nDestTruncate -= 1
}
goto _46
@@ -70503,8 +71082,8 @@ _44:
_21_nDestTruncate = _2_nSrcPage * (_pgszSrc / _pgszDest)
_46:
func() {
- if _21_nDestTruncate <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69387), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000))), unsafe.Pointer(str(92518)))
+ if _21_nDestTruncate <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69387), unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000), unsafe.Pointer(str(91040)))
crt.X__builtin_abort(tls)
}
}()
@@ -70515,27 +71094,27 @@ _46:
_25_pFile = _sqlite3PagerFile(tls, _2_pDestPager)
func() {
if _25_pFile == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69406), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000))), unsafe.Pointer(str(58046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69406), unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000), unsafe.Pointer(str(58022)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _21_nDestTruncate != i32(0) && (int64(_21_nDestTruncate)*int64(_pgszDest)) < _25_iSize && (_21_nDestTruncate != int32(((uint32(_sqlite3PendingByte)/((*XBtShared)((*XBtree)(_p.X1).X1).X15))+uint32(i32(1)))-uint32(i32(1))) || _25_iSize < int64(_sqlite3PendingByte) || _25_iSize > int64(_sqlite3PendingByte+_pgszDest)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69407), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000))), unsafe.Pointer(str(92534)))
+ if _21_nDestTruncate != int32(0) && (int64(_21_nDestTruncate)*int64(_pgszDest)) < _25_iSize && (_21_nDestTruncate != int32(((uint32(_sqlite3PendingByte)/((*XBtShared)((*XBtree)(_p.XpDest).XpBt).XpageSize))+uint32(1))-uint32(1)) || _25_iSize < int64(_sqlite3PendingByte) || _25_iSize > int64(_sqlite3PendingByte+_pgszDest)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69407), unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000), unsafe.Pointer(str(91056)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3PagerPagecount(tls, _2_pDestPager, &_25_nDstPage)
_25_iPg = uint32(_21_nDestTruncate)
_58:
- if _rc != i32(0) || _25_iPg > uint32(_25_nDstPage) {
+ if _rc != int32(0) || _25_iPg > uint32(_25_nDstPage) {
goto _62
}
- if _25_iPg == ((uint32(_sqlite3PendingByte) / ((*XBtShared)((*XBtree)(_p.X1).X1).X15)) + uint32(i32(1))) {
+ if _25_iPg == ((uint32(_sqlite3PendingByte) / ((*XBtShared)((*XBtree)(_p.XpDest).XpBt).XpageSize)) + uint32(1)) {
goto _63
}
- _rc = _sqlite3PagerGet(tls, _2_pDestPager, _25_iPg, &_27_pPg, i32(0))
- if _rc == i32(0) {
+ _rc = _sqlite3PagerGet(tls, _2_pDestPager, _25_iPg, &_27_pPg, int32(0))
+ if _rc == int32(0) {
_rc = _sqlite3PagerWrite(tls, _27_pPg)
_sqlite3PagerUnref(tls, _27_pPg)
}
@@ -70543,8 +71122,8 @@ _63:
_25_iPg += 1
goto _58
_62:
- if _rc == i32(0) {
- _rc = _sqlite3PagerCommitPhaseOne(tls, _2_pDestPager, nil, i32(1))
+ if _rc == int32(0) {
+ _rc = _sqlite3PagerCommitPhaseOne(tls, _2_pDestPager, nil, int32(1))
}
_25_iEnd = func() int64 {
if int64(_sqlite3PendingByte+_pgszDest) < _25_iSize {
@@ -70554,195 +71133,208 @@ _62:
}()
_25_iOff = int64(_sqlite3PendingByte + _pgszSrc)
_68:
- if _rc != i32(0) || _25_iOff >= _25_iEnd {
+ if _rc != int32(0) || _25_iOff >= _25_iEnd {
goto _72
}
_30_pSrcPg = nil
- _30_iSrcPg = uint32((_25_iOff / int64(_pgszSrc)) + int64(i32(1)))
- _rc = _sqlite3PagerGet(tls, _2_pSrcPager, _30_iSrcPg, &_30_pSrcPg, i32(0))
- if _rc == i32(0) {
+ _30_iSrcPg = uint32((_25_iOff / int64(_pgszSrc)) + int64(1))
+ _rc = _sqlite3PagerGet(tls, _2_pSrcPager, _30_iSrcPg, &_30_pSrcPg, int32(0))
+ if _rc == int32(0) {
_31_zData = (*uint8)(_sqlite3PagerGetData(tls, _30_pSrcPg))
- _rc = _sqlite3OsWrite(tls, _25_pFile, (unsafe.Pointer)(_31_zData), _pgszSrc, _25_iOff)
+ _rc = _sqlite3OsWrite(tls, _25_pFile, unsafe.Pointer(_31_zData), _pgszSrc, _25_iOff)
}
_sqlite3PagerUnref(tls, _30_pSrcPg)
- {
- p := &_25_iOff
- *p = (*p) + int64(_pgszSrc)
- sink6(*p)
- }
+ _25_iOff += int64(_pgszSrc)
goto _68
_72:
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _backupTruncateFile(tls, _25_pFile, _25_iSize)
}
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _sqlite3PagerSync(tls, _2_pDestPager, nil)
}
goto _76
_49:
_sqlite3PagerTruncateImage(tls, _2_pDestPager, uint32(_21_nDestTruncate))
- _rc = _sqlite3PagerCommitPhaseOne(tls, _2_pDestPager, nil, i32(0))
+ _rc = _sqlite3PagerCommitPhaseOne(tls, _2_pDestPager, nil, int32(0))
_76:
- if (i32(0) == _rc) && (i32(0) == store1(&_rc, _sqlite3BtreeCommitPhaseTwo(tls, (*XBtree)(_p.X1), i32(0)))) {
- _rc = i32(101)
+ if (int32(0) == _rc) && (int32(0) == store2(&_rc, _sqlite3BtreeCommitPhaseTwo(tls, (*XBtree)(_p.XpDest), int32(0)))) {
+ _rc = int32(101)
}
_39:
_32:
if _2_bCloseTrans != 0 {
- _36_rc2 = _sqlite3BtreeCommitPhaseOne(tls, (*XBtree)(_p.X6), nil)
- {
- p := &_36_rc2
- *p = (*p) | _sqlite3BtreeCommitPhaseTwo(tls, (*XBtree)(_p.X6), i32(0))
- sink1(*p)
- }
+ _36_rc2 = _sqlite3BtreeCommitPhaseOne(tls, (*XBtree)(_p.XpSrc), nil)
+ _36_rc2 |= _sqlite3BtreeCommitPhaseTwo(tls, (*XBtree)(_p.XpSrc), int32(0))
func() {
- if _36_rc2 != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69481), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000))), unsafe.Pointer(str(18873)))
+ if _36_rc2 != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69481), unsafe.Pointer(&_sqlite3_backup_stepØ00__func__Ø000), unsafe.Pointer(str(18828)))
crt.X__builtin_abort(tls)
}
}()
}
- if _rc == i32(3082) {
- _rc = _sqlite3NomemError(tls, i32(69485))
+ if _rc == int32(3082) {
+ _rc = _sqlite3NomemError(tls, int32(69485))
}
- *(*int32)(unsafe.Pointer(&(_p.X7))) = _rc
+ _p.Xrc = _rc
_2:
- if (*Xsqlite3)(_p.X0) != nil {
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ if _p.XpDestDb != nil {
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.XpDestDb).Xmutex))
}
- _sqlite3BtreeLeave(tls, (*XBtree)(_p.X6))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X5).X3))
+ _sqlite3BtreeLeave(tls, (*XBtree)(_p.XpSrc))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.XpSrcDb).Xmutex))
return _rc
}
-// Attempt to set the page size of the destination to match the page size
-// of the source.
+// C comment
+// /*
+// ** Attempt to set the page size of the destination to match the page size
+// ** of the source.
+// */
func _setDestPgsz(tls *crt.TLS, _p *Xsqlite3_backup) (r0 int32) {
var _rc int32
- _rc = _sqlite3BtreeSetPageSize(tls, (*XBtree)(_p.X1), _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.X6)), i32(-1), i32(0))
+ _rc = _sqlite3BtreeSetPageSize(tls, (*XBtree)(_p.XpDest), _sqlite3BtreeGetPageSize(tls, (*XBtree)(_p.XpSrc)), int32(-1), int32(0))
return _rc
}
var _sqlite3_backup_stepØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_backup_stepØ00__func__Ø000[0], str(92715), 20)
+ crt.Xstrncpy(nil, &_sqlite3_backup_stepØ00__func__Ø000[0], str(91237), 20)
}
-// Register this backup object with the associated source pager for
-// callbacks when pages are changed or the cache invalidated.
+// C comment
+// /*
+// ** Register this backup object with the associated source pager for
+// ** callbacks when pages are changed or the cache invalidated.
+// */
func _attachBackupObject(tls *crt.TLS, _p *Xsqlite3_backup) {
var _pp **Xsqlite3_backup
func() {
- if _sqlite3BtreeHoldsMutex(tls, (*XBtree)(_p.X6)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(69236), unsafe.Pointer((*int8)(unsafe.Pointer(&_attachBackupObjectØ00__func__Ø000))), unsafe.Pointer(str(92735)))
+ if _sqlite3BtreeHoldsMutex(tls, (*XBtree)(_p.XpSrc)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(69236), unsafe.Pointer(&_attachBackupObjectØ00__func__Ø000), unsafe.Pointer(str(91257)))
crt.X__builtin_abort(tls)
}
}()
- _pp = _sqlite3PagerBackupPtr(tls, _sqlite3BtreePager(tls, (*XBtree)(_p.X6)))
- *(**Xsqlite3_backup)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X11))))) = *_pp
+ _pp = _sqlite3PagerBackupPtr(tls, _sqlite3BtreePager(tls, (*XBtree)(_p.XpSrc)))
+ *(**Xsqlite3_backup)(unsafe.Pointer(&_p.XpNext)) = *_pp
*_pp = _p
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(1)
+ _p.XisAttached = int32(1)
}
var _attachBackupObjectØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_attachBackupObjectØ00__func__Ø000[0], str(92767), 19)
+ crt.Xstrncpy(nil, &_attachBackupObjectØ00__func__Ø000[0], str(91289), 19)
}
-// Return a pointer to the pPager->pBackup variable. The backup module
-// in backup.c maintains the content of this variable. This module
-// uses it opaquely as an argument to sqlite3BackupRestart() and
-// sqlite3BackupUpdate() only.
+// C comment
+// /*
+// ** Return a pointer to the pPager->pBackup variable. The backup module
+// ** in backup.c maintains the content of this variable. This module
+// ** uses it opaquely as an argument to sqlite3BackupRestart() and
+// ** sqlite3BackupUpdate() only.
+// */
func _sqlite3PagerBackupPtr(tls *crt.TLS, _pPager *XPager) (r0 **Xsqlite3_backup) {
- return (**Xsqlite3_backup)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPager.X36)))))
+ return (**Xsqlite3_backup)(unsafe.Pointer(&_pPager.XpBackup))
}
-// Initialize the first page of the database file (creating a database
-// consisting of a single page and no schema objects). Return SQLITE_OK
-// if successful, or an SQLite error code otherwise.
+// C comment
+// /*
+// ** Initialize the first page of the database file (creating a database
+// ** consisting of a single page and no schema objects). Return SQLITE_OK
+// ** if successful, or an SQLite error code otherwise.
+// */
func _sqlite3BtreeNewDb(tls *crt.TLS, _p *XBtree) (r0 int32) {
var _rc int32
_sqlite3BtreeEnter(tls, _p)
- *(*uint32)(unsafe.Pointer(&((*XBtShared)(_p.X1).X18))) = uint32(i32(0))
- _rc = _newDatabase(tls, (*XBtShared)(_p.X1))
+ (*XBtShared)(_p.XpBt).XnPage = 0
+ _rc = _newDatabase(tls, (*XBtShared)(_p.XpBt))
_sqlite3BtreeLeave(tls, _p)
return _rc
}
-// If pFile is currently larger than iSize bytes, then truncate it to
-// exactly iSize bytes. If pFile is not larger than iSize bytes, then
-// this function is a no-op.
-//
-// Return SQLITE_OK if everything is successful, or an SQLite error
-// code if an error occurs.
+// C comment
+// /*
+// ** If pFile is currently larger than iSize bytes, then truncate it to
+// ** exactly iSize bytes. If pFile is not larger than iSize bytes, then
+// ** this function is a no-op.
+// **
+// ** Return SQLITE_OK if everything is successful, or an SQLite error
+// ** code if an error occurs.
+// */
func _backupTruncateFile(tls *crt.TLS, _pFile *Xsqlite3_file, _iSize int64) (r0 int32) {
var _rc int32
var _iCurrent int64
_rc = _sqlite3OsFileSize(tls, _pFile, &_iCurrent)
- if (_rc == i32(0)) && (_iCurrent > _iSize) {
+ if (_rc == int32(0)) && (_iCurrent > _iSize) {
_rc = _sqlite3OsTruncate(tls, _pFile, _iSize)
}
return _rc
}
-// Release all resources associated with an sqlite3_backup* handle.
+// C comment
+// /*
+// ** Release all resources associated with an sqlite3_backup* handle.
+// */
func Xsqlite3_backup_finish(tls *crt.TLS, _p *Xsqlite3_backup) (r0 int32) {
var _rc int32
var _pSrcDb *Xsqlite3
var _pp **Xsqlite3_backup
if _p == nil {
- return i32(0)
+ return int32(0)
}
- _pSrcDb = (*Xsqlite3)(_p.X5)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pSrcDb.X3))
- _sqlite3BtreeEnter(tls, (*XBtree)(_p.X6))
- if (*Xsqlite3)(_p.X0) != nil {
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ _pSrcDb = (*Xsqlite3)(_p.XpSrcDb)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pSrcDb.Xmutex))
+ _sqlite3BtreeEnter(tls, (*XBtree)(_p.XpSrc))
+ if _p.XpDestDb != nil {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.XpDestDb).Xmutex))
}
- if (*Xsqlite3)(_p.X0) != nil {
- *(*int32)(unsafe.Pointer(&((*XBtree)(_p.X6).X7))) -= 1
+ if _p.XpDestDb != nil {
+ (*XBtree)(_p.XpSrc).XnBackup -= 1
}
- if (_p.X10) == 0 {
+ if _p.XisAttached == 0 {
goto _3
}
- _pp = _sqlite3PagerBackupPtr(tls, _sqlite3BtreePager(tls, (*XBtree)(_p.X6)))
+ _pp = _sqlite3PagerBackupPtr(tls, _sqlite3BtreePager(tls, (*XBtree)(_p.XpSrc)))
_4:
if (*_pp) != _p {
- _pp = (**Xsqlite3_backup)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*_pp).X11)))))
+ _pp = (**Xsqlite3_backup)(unsafe.Pointer(&((*_pp).XpNext)))
goto _4
}
- *_pp = (*Xsqlite3_backup)(_p.X11)
+ *_pp = (*Xsqlite3_backup)(_p.XpNext)
_3:
- _sqlite3BtreeRollback(tls, (*XBtree)(_p.X1), i32(0), i32(0))
+ _sqlite3BtreeRollback(tls, (*XBtree)(_p.XpDest), int32(0), int32(0))
_rc = func() int32 {
- if (_p.X7) == i32(101) {
- return i32(0)
+ if _p.Xrc == int32(101) {
+ return int32(0)
}
- return (_p.X7)
+ return _p.Xrc
}()
- if (*Xsqlite3)(_p.X0) != nil {
- _sqlite3Error(tls, (*Xsqlite3)(_p.X0), _rc)
- _sqlite3LeaveMutexAndCloseZombie(tls, (*Xsqlite3)(_p.X0))
+ if _p.XpDestDb != nil {
+ _sqlite3Error(tls, (*Xsqlite3)(_p.XpDestDb), _rc)
+ _sqlite3LeaveMutexAndCloseZombie(tls, (*Xsqlite3)(_p.XpDestDb))
}
- _sqlite3BtreeLeave(tls, (*XBtree)(_p.X6))
- if (*Xsqlite3)(_p.X0) != nil {
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ _sqlite3BtreeLeave(tls, (*XBtree)(_p.XpSrc))
+ if _p.XpDestDb != nil {
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
}
_sqlite3LeaveMutexAndCloseZombie(tls, _pSrcDb)
return _rc
}
-// Unless this is an in-memory or temporary database, clear the pager cache.
+// C comment
+// /*
+// ** Unless this is an in-memory or temporary database, clear the pager cache.
+// */
func _sqlite3PagerClearCache(tls *crt.TLS, _pPager *XPager) {
func() {
- if int32(_pPager.X13) != i32(0) && (_pPager.X10) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54222), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerClearCacheØ00__func__Ø000))), unsafe.Pointer(str(55898)))
+ if int32(_pPager.XmemDb) != int32(0) && _pPager.XtempFile == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54222), unsafe.Pointer(&_sqlite3PagerClearCacheØ00__func__Ø000), unsafe.Pointer(str(55874)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pPager.X10) == i32(0) {
+ if int32(_pPager.XtempFile) == int32(0) {
_pager_reset(tls, _pPager)
}
}
@@ -70750,53 +71342,56 @@ func _sqlite3PagerClearCache(tls *crt.TLS, _pPager *XPager) {
var _sqlite3PagerClearCacheØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerClearCacheØ00__func__Ø000[0], str(92786), 23)
+ crt.Xstrncpy(nil, &_sqlite3PagerClearCacheØ00__func__Ø000[0], str(91308), 23)
}
-// A write-transaction must be opened before calling this function.
-// It performs a single unit of work towards an incremental vacuum.
-//
-// If the incremental vacuum is finished after this function has run,
-// SQLITE_DONE is returned. If it is not finished, but no error occurred,
-// SQLITE_OK is returned. Otherwise an SQLite error code.
+// C comment
+// /*
+// ** A write-transaction must be opened before calling this function.
+// ** It performs a single unit of work towards an incremental vacuum.
+// **
+// ** If the incremental vacuum is finished after this function has run,
+// ** SQLITE_DONE is returned. If it is not finished, but no error occurred,
+// ** SQLITE_OK is returned. Otherwise an SQLite error code.
+// */
func _sqlite3BtreeIncrVacuum(tls *crt.TLS, _p *XBtree) (r0 int32) {
var _rc int32
var _2_nOrig, _2_nFree, _2_nFin uint32
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
_sqlite3BtreeEnter(tls, _p)
func() {
- if int32(_pBt.X8) != i32(2) || int32(_p.X2) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(62715), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeIncrVacuumØ00__func__Ø000))), unsafe.Pointer(str(92809)))
+ if int32(_pBt.XinTransaction) != int32(2) || int32(_p.XinTrans) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(62715), unsafe.Pointer(&_sqlite3BtreeIncrVacuumØ00__func__Ø000), unsafe.Pointer(str(91331)))
crt.X__builtin_abort(tls)
}
}()
- if (_pBt.X5) == 0 {
- _rc = i32(101)
+ if _pBt.XautoVacuum == 0 {
+ _rc = int32(101)
goto _4
}
_2_nOrig = _btreePagecount(tls, _pBt)
- _2_nFree = _sqlite3Get4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(36)))))
+ _2_nFree = _sqlite3Get4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(36)))
_2_nFin = _finalDbSize(tls, _pBt, _2_nOrig, _2_nFree)
if _2_nOrig < _2_nFin {
- _rc = _sqlite3CorruptError(tls, i32(62724))
+ _rc = _sqlite3CorruptError(tls, int32(62724))
goto _10
}
- if _2_nFree <= uint32(i32(0)) {
+ if _2_nFree <= (0) {
goto _7
}
- _rc = _saveAllCursors(tls, _pBt, uint32(i32(0)), nil)
- if _rc == i32(0) {
+ _rc = _saveAllCursors(tls, _pBt, 0, nil)
+ if _rc == int32(0) {
_invalidateAllOverflowCache(tls, _pBt)
- _rc = _incrVacuumStep(tls, _pBt, _2_nFin, _2_nOrig, i32(0))
+ _rc = _incrVacuumStep(tls, _pBt, _2_nFin, _2_nOrig, int32(0))
}
- if _rc == i32(0) {
- _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.X3).X23))
- _sqlite3Put4byte(tls, (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XMemPage)(_pBt.X3).X19))+1*uintptr(i32(28)))), _pBt.X18)
+ if _rc == int32(0) {
+ _rc = _sqlite3PagerWrite(tls, (*XPgHdr)((*XMemPage)(_pBt.XpPage1).XpDbPage))
+ _sqlite3Put4byte(tls, elem15((*XMemPage)(_pBt.XpPage1).XaData, uintptr(28)), _pBt.XnPage)
}
goto _10
_7:
- _rc = i32(101)
+ _rc = int32(101)
_10:
_4:
_sqlite3BtreeLeave(tls, _p)
@@ -70806,36 +71401,39 @@ _4:
var _sqlite3BtreeIncrVacuumØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeIncrVacuumØ00__func__Ø000[0], str(92868), 23)
+ crt.Xstrncpy(nil, &_sqlite3BtreeIncrVacuumØ00__func__Ø000[0], str(91390), 23)
}
-// Obtain a lock on the table whose root page is iTab. The
-// lock is a write lock if isWritelock is true or a read lock
-// if it is false.
+// C comment
+// /*
+// ** Obtain a lock on the table whose root page is iTab. The
+// ** lock is a write lock if isWritelock is true or a read lock
+// ** if it is false.
+// */
func _sqlite3BtreeLockTable(tls *crt.TLS, _p *XBtree, _iTab int32, _isWriteLock uint8) (r0 int32) {
var _rc int32
var _1_lockType uint8
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if int32(_p.X2) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68740), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLockTableØ00__func__Ø000))), unsafe.Pointer(str(92891)))
+ if int32(_p.XinTrans) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68740), unsafe.Pointer(&_sqlite3BtreeLockTableØ00__func__Ø000), unsafe.Pointer(str(91413)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X3) == 0 {
+ if _p.Xsharable == 0 {
goto _2
}
- _1_lockType = uint8(i32(1) + int32(_isWriteLock))
- i32(0)
+ _1_lockType = uint8(int32(1) + int32(_isWriteLock))
+
func() {
- if int32(_isWriteLock) != i32(0) && int32(_isWriteLock) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68744), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeLockTableØ00__func__Ø000))), unsafe.Pointer(str(71791)))
+ if int32(_isWriteLock) != int32(0) && int32(_isWriteLock) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68744), unsafe.Pointer(&_sqlite3BtreeLockTableØ00__func__Ø000), unsafe.Pointer(str(69953)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
_rc = _querySharedCacheTableLock(tls, _p, uint32(_iTab), _1_lockType)
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _setSharedCacheTableLock(tls, _p, uint32(_iTab), _1_lockType)
}
_sqlite3BtreeLeave(tls, _p)
@@ -70846,154 +71444,158 @@ _2:
var _sqlite3BtreeLockTableØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeLockTableØ00__func__Ø000[0], str(92914), 22)
-}
-
-// Add a lock on the table with root-page iTable to the shared-btree used
-// by Btree handle p. Parameter eLock must be either READ_LOCK or
-// WRITE_LOCK.
-//
-// This function assumes the following:
-//
-// (a) The specified Btree object p is connected to a sharable
-// database (one with the BtShared.sharable flag set), and
-//
-// (b) No other Btree objects hold a lock that conflicts
-// with the requested lock (i.e. querySharedCacheTableLock() has
-// already been called and returned SQLITE_OK).
-//
-// SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM
-// is returned if a malloc attempt fails.
+ crt.Xstrncpy(nil, &_sqlite3BtreeLockTableØ00__func__Ø000[0], str(91436), 22)
+}
+
+// C comment
+// /*
+// ** Add a lock on the table with root-page iTable to the shared-btree used
+// ** by Btree handle p. Parameter eLock must be either READ_LOCK or
+// ** WRITE_LOCK.
+// **
+// ** This function assumes the following:
+// **
+// ** (a) The specified Btree object p is connected to a sharable
+// ** database (one with the BtShared.sharable flag set), and
+// **
+// ** (b) No other Btree objects hold a lock that conflicts
+// ** with the requested lock (i.e. querySharedCacheTableLock() has
+// ** already been called and returned SQLITE_OK).
+// **
+// ** SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM
+// ** is returned if a malloc attempt fails.
+// */
func _setSharedCacheTableLock(tls *crt.TLS, _p *XBtree, _iTable uint32, _eLock uint8) (r0 int32) {
var _pBt *XBtShared
var _pLock, _pIter *XBtLock
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
_pLock = nil
func() {
if _sqlite3BtreeHoldsMutex(tls, _p) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59358), unsafe.Pointer((*int8)(unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(17487)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59358), unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(17442)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_eLock) != i32(1) && int32(_eLock) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59359), unsafe.Pointer((*int8)(unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(50750)))
+ if int32(_eLock) != int32(1) && int32(_eLock) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59359), unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(50726)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59360), unsafe.Pointer((*int8)(unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(23676)))
+ if (*Xsqlite3)(_p.Xdb) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59360), unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(23631)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if i32(0) != (((*Xsqlite3)(_p.X0).X6)&i32(16384)) && int32(_eLock) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59366), unsafe.Pointer((*int8)(unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(92936)))
+ if int32(0) != (((*Xsqlite3)(_p.Xdb).Xflags)&int32(16384)) && int32(_eLock) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59366), unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(91458)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X3) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59370), unsafe.Pointer((*int8)(unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(92998)))
+ if _p.Xsharable == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59370), unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(91520)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if i32(0) != _querySharedCacheTableLock(tls, _p, _iTable, _eLock) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(59371), unsafe.Pointer((*int8)(unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000))), unsafe.Pointer(str(93010)))
+ if int32(0) != _querySharedCacheTableLock(tls, _p, _iTable, _eLock) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(59371), unsafe.Pointer(&_setSharedCacheTableLockØ00__func__Ø000), unsafe.Pointer(str(91532)))
crt.X__builtin_abort(tls)
}
}()
- _pIter = (*XBtLock)(_pBt.X25)
+ _pIter = (*XBtLock)(_pBt.XpLock)
_14:
if _pIter == nil {
goto _17
}
- if ((_pIter.X1) == _iTable) && ((*XBtree)(_pIter.X0) == _p) {
+ if (_pIter.XiTable == _iTable) && ((*XBtree)(_pIter.XpBtree) == _p) {
_pLock = _pIter
goto _17
}
- _pIter = (*XBtLock)(_pIter.X3)
+ _pIter = (*XBtLock)(_pIter.XpNext)
goto _14
_17:
if _pLock != nil {
goto _20
}
- _pLock = (*XBtLock)(_sqlite3MallocZero(tls, uint64(u32(16))))
+ _pLock = (*XBtLock)(_sqlite3MallocZero(tls, uint64(16)))
if _pLock == nil {
- return _sqlite3NomemError(tls, i32(59387))
+ return _sqlite3NomemError(tls, int32(59387))
}
- *(*uint32)(unsafe.Pointer(&(_pLock.X1))) = _iTable
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pLock.X0))))) = _p
- *(**XBtLock)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pLock.X3))))) = (*XBtLock)(_pBt.X25)
- *(**XBtLock)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBt.X25))))) = _pLock
+ _pLock.XiTable = _iTable
+ *(**XBtree)(unsafe.Pointer(&_pLock.XpBtree)) = _p
+ *(**XBtLock)(unsafe.Pointer(&_pLock.XpNext)) = (*XBtLock)(_pBt.XpLock)
+ *(**XBtLock)(unsafe.Pointer(&_pBt.XpLock)) = _pLock
_20:
- i32(0)
- if int32(_eLock) > int32(_pLock.X2) {
- *(*uint8)(unsafe.Pointer(&(_pLock.X2))) = _eLock
+
+ if int32(_eLock) > int32(_pLock.XeLock) {
+ _pLock.XeLock = _eLock
}
- return i32(0)
+ return int32(0)
}
var _setSharedCacheTableLockØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_setSharedCacheTableLockØ00__func__Ø000[0], str(93065), 24)
+ crt.Xstrncpy(nil, &_setSharedCacheTableLockØ00__func__Ø000[0], str(91587), 24)
}
-// If the virtual table pVtab supports the transaction interface
-// (xBegin/xRollback/xCommit and optionally xSync) and a transaction is
-// not currently open, invoke the xBegin method now.
-//
-// If the xBegin call is successful, place the sqlite3_vtab pointer
-// in the sqlite3.aVTrans array.
+// C comment
+// /*
+// ** If the virtual table pVtab supports the transaction interface
+// ** (xBegin/xRollback/xCommit and optionally xSync) and a transaction is
+// ** not currently open, invoke the xBegin method now.
+// **
+// ** If the xBegin call is successful, place the sqlite3_vtab pointer
+// ** in the sqlite3.aVTrans array.
+// */
func _sqlite3VtabBegin(tls *crt.TLS, _db *Xsqlite3, _pVTab *XVTable) (r0 int32) {
var _rc, _3_i, _7_iSvpt int32
var _pModule *Xsqlite3_module
- _rc = i32(0)
- if ((_db.X64) > i32(0)) && ((**XVTable)(unsafe.Pointer(_db.X67)) == nil) {
- return i32(6)
+ _rc = int32(0)
+ if (_db.XnVTrans > int32(0)) && ((**XVTable)(unsafe.Pointer(_db.XaVTrans)) == nil) {
+ return int32(6)
}
if _pVTab == nil {
- return i32(0)
+ return int32(0)
}
- _pModule = (*Xsqlite3_module)((*Xsqlite3_vtab)(_pVTab.X2).X0)
- if (*(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_pModule.X14)}))) == nil {
+ _pModule = (*Xsqlite3_module)((*Xsqlite3_vtab)(_pVTab.XpVtab).XpModule)
+ if _pModule.XxBegin == nil {
goto _3
}
- _3_i = i32(0)
+ _3_i = int32(0)
_4:
- if _3_i >= (_db.X64) {
+ if _3_i >= _db.XnVTrans {
goto _7
}
- if (*(**XVTable)(unsafe.Pointer(uintptr((unsafe.Pointer)(_db.X67)) + 4*uintptr(_3_i)))) == _pVTab {
- return i32(0)
+ if (*elem28((**XVTable)(unsafe.Pointer(_db.XaVTrans)), uintptr(_3_i))) == _pVTab {
+ return int32(0)
}
_3_i += 1
goto _4
_7:
_rc = _growVTrans(tls, _db)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _9
}
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{(_pModule.X14)})))(tls, (*Xsqlite3_vtab)(_pVTab.X2))
- if _rc != i32(0) {
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab) int32 {
+ v := _pModule.XxBegin
+ return *(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&v))
+ }()(tls, (*Xsqlite3_vtab)(_pVTab.XpVtab))
+ if _rc != int32(0) {
goto _10
}
- _7_iSvpt = (_db.X76) + (_db.X75)
+ _7_iSvpt = _db.XnStatement + _db.XnSavepoint
_addToVTrans(tls, _db, _pVTab)
- if _7_iSvpt != 0 && ((*(*func(*crt.TLS, *Xsqlite3_vtab, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{(_pModule.X20)}))) != nil) {
- *(*int32)(unsafe.Pointer(&(_pVTab.X5))) = _7_iSvpt
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vtab, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{(_pModule.X20)})))(tls, (*Xsqlite3_vtab)(_pVTab.X2), _7_iSvpt-i32(1))
+ if _7_iSvpt != 0 && (_pModule.XxSavepoint != nil) {
+ _pVTab.XiSavepoint = _7_iSvpt
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab, int32) int32 {
+ v := _pModule.XxSavepoint
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, (*Xsqlite3_vtab)(_pVTab.XpVtab), _7_iSvpt-int32(1))
}
_10:
_9:
@@ -71001,61 +71603,68 @@ _3:
return _rc
}
-// Grow the db->aVTrans[] array so that there is room for at least one
-// more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise.
+// C comment
+// /*
+// ** Grow the db->aVTrans[] array so that there is room for at least one
+// ** more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise.
+// */
func _growVTrans(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
var _ARRAY_INCR, _1_nBytes int32
var _1_aVTrans **XVTable
- _ARRAY_INCR = i32(5)
- if ((_db.X64) % _ARRAY_INCR) != i32(0) {
+ _ARRAY_INCR = int32(5)
+ if (_db.XnVTrans % _ARRAY_INCR) != int32(0) {
goto _0
}
- _1_nBytes = int32(u32(4) * uint32((_db.X64)+_ARRAY_INCR))
- _1_aVTrans = (**XVTable)(_sqlite3DbRealloc(tls, _db, (unsafe.Pointer)(_db.X67), uint64(_1_nBytes)))
+ _1_nBytes = int32(uint32(4) * uint32(_db.XnVTrans+_ARRAY_INCR))
+ _1_aVTrans = (**XVTable)(_sqlite3DbRealloc(tls, _db, unsafe.Pointer(_db.XaVTrans), uint64(_1_nBytes)))
if _1_aVTrans == nil {
- return _sqlite3NomemError(tls, i32(125653))
+ return _sqlite3NomemError(tls, int32(125653))
}
- crt.Xmemset(tls, (unsafe.Pointer)((**XVTable)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aVTrans))+4*uintptr(_db.X64)))), i32(0), u32(4)*uint32(_ARRAY_INCR))
- *(***XVTable)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_db.X67))))) = _1_aVTrans
+ crt.Xmemset(tls, unsafe.Pointer(elem28(_1_aVTrans, uintptr(_db.XnVTrans))), int32(0), uint32(4)*uint32(_ARRAY_INCR))
+ *(***XVTable)(unsafe.Pointer(&_db.XaVTrans)) = _1_aVTrans
_0:
- return i32(0)
+ return int32(0)
}
-// Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should
-// have already been reserved using growVTrans().
+// C comment
+// /*
+// ** Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should
+// ** have already been reserved using growVTrans().
+// */
func _addToVTrans(tls *crt.TLS, _db *Xsqlite3, _pVTab *XVTable) {
- *(**XVTable)(unsafe.Pointer(uintptr((unsafe.Pointer)(_db.X67)) + 4*uintptr(postInc1((*int32)(unsafe.Pointer(&(_db.X64))), int32(1))))) = _pVTab
+ *elem28((**XVTable)(unsafe.Pointer(_db.XaVTrans)), uintptr(postInc2(&_db.XnVTrans, 1))) = _pVTab
_sqlite3VtabLock(tls, _pVTab)
}
-// Make a full copy of pFrom into pTo. Prior contents of pTo are
-// freed before the copy is made.
+// C comment
+// /*
+// ** Make a full copy of pFrom into pTo. Prior contents of pTo are
+// ** freed before the copy is made.
+// */
func _sqlite3VdbeMemCopy(tls *crt.TLS, _pTo *XMem, _pFrom *XMem) (r0 int32) {
var _rc int32
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (int32(_pFrom.X1) & i32(32)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(70514), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMemCopyØ00__func__Ø000))), unsafe.Pointer(str(72987)))
+ if (int32(_pFrom.Xflags) & int32(32)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(70514), unsafe.Pointer(&_sqlite3VdbeMemCopyØ00__func__Ø000), unsafe.Pointer(str(71149)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pTo.X1) & i32(9312)) != i32(0) {
+ if (int32(_pTo.Xflags) & int32(9312)) != int32(0) {
_vdbeMemClearExternAndSetNull(tls, _pTo)
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pTo), (unsafe.Pointer)(_pFrom), u32(20))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pTo), unsafe.Pointer(_pFrom), uint32(20))
{
- p := (*uint16)(unsafe.Pointer(&(_pTo.X1)))
- *p = uint16(int32(*p) & i32(-1025))
- sink14(*p)
+ p := &_pTo.Xflags
+ *p = uint16(int32(*p) & int32(-1025))
}
- if (int32(_pTo.X1) & i32(18)) == 0 {
+ if (int32(_pTo.Xflags) & int32(18)) == 0 {
goto _3
}
- if i32(0) == (int32(_pFrom.X1) & i32(2048)) {
+ if int32(0) == (int32(_pFrom.Xflags) & int32(2048)) {
{
- p := (*uint16)(unsafe.Pointer(&(_pTo.X1)))
- *p = uint16(int32(*p) | i32(4096))
- sink14(*p)
+ p := &_pTo.Xflags
+ *p = uint16(int32(*p) | int32(4096))
}
_rc = _sqlite3VdbeMemMakeWriteable(tls, _pTo)
}
@@ -71066,65 +71675,63 @@ _3:
var _sqlite3VdbeMemCopyØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMemCopyØ00__func__Ø000[0], str(93089), 19)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMemCopyØ00__func__Ø000[0], str(91611), 19)
}
-// This function is invoked by the vdbe to call the xCreate method
-// of the virtual table named zTab in database iDb.
-//
-// If an error occurs, *pzErr is set to point to an English language
-// description of the error and an SQLITE_XXX error code is returned.
-// In this case the caller must call sqlite3DbFree(db, ) on *pzErr.
+// C comment
+// /*
+// ** This function is invoked by the vdbe to call the xCreate method
+// ** of the virtual table named zTab in database iDb.
+// **
+// ** If an error occurs, *pzErr is set to point to an English language
+// ** description of the error and an SQLITE_XXX error code is returned.
+// ** In this case the caller must call sqlite3DbFree(db, ) on *pzErr.
+// */
func _sqlite3VtabCallCreate(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _zTab *int8, _pzErr **int8) (r0 int32) {
var _rc int32
var _zMod *int8
var _pTab *XTable
var _pMod *XModule
- _rc = i32(0)
- _pTab = _sqlite3FindTable(tls, _db, _zTab, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0)
+ _rc = int32(0)
+ _pTab = _sqlite3FindTable(tls, _db, _zTab, elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName)
func() {
- if _pTab == nil || (_pTab.X16) == 0 || (*XVTable)(_pTab.X18) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125687), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabCallCreateØ00__func__Ø000))), unsafe.Pointer(str(93108)))
+ if _pTab == nil || _pTab.XnModuleArg == 0 || _pTab.XpVTable != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125687), unsafe.Pointer(&_sqlite3VtabCallCreateØ00__func__Ø000), unsafe.Pointer(str(91630)))
crt.X__builtin_abort(tls)
}
}()
- _zMod = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTab.X17)) + 4*uintptr(i32(0))))
- _pMod = (*XModule)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&(_db.X65))), _zMod))
- if ((_pMod == nil) || (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32
- }{(*(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
- }{((*Xsqlite3_module)(_pMod.X0).X1)})))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32
- }{nil})))) || (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab) int32
- }{(*(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_module)(_pMod.X0).X5)})))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab) int32
- }{nil}))) {
- *_pzErr = _sqlite3MPrintf(tls, _db, str(93150), unsafe.Pointer(_zMod))
- _rc = i32(1)
+ _zMod = *elem0(_pTab.XazModuleArg, 0)
+ _pMod = (*XModule)(_sqlite3HashFind(tls, &_db.XaModule, _zMod))
+ if ((_pMod == nil) || (func() func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32 {
+ v := (*Xsqlite3_module)(_pMod.XpModule).XxCreate
+ return *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&v))
+ }() == nil)) || (func() func(*crt.TLS, *Xsqlite3_vtab) int32 {
+ v := (*Xsqlite3_module)(_pMod.XpModule).XxDestroy
+ return *(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&v))
+ }() == nil) {
+ *_pzErr = _sqlite3MPrintf(tls, _db, str(91672), unsafe.Pointer(_zMod))
+ _rc = int32(1)
goto _7
}
- _rc = _vtabCallConstructor(tls, _db, _pTab, _pMod, *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
- }{((*Xsqlite3_module)(_pMod.X0).X1)})), _pzErr)
+ _rc = _vtabCallConstructor(tls, _db, _pTab, _pMod, func() func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32 {
+ v := (*Xsqlite3_module)(_pMod.XpModule).XxCreate
+ return *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&v))
+ }(), _pzErr)
_7:
- if _rc != i32(0) || func() int32 {
+ if _rc != int32(0) || func() int32 {
if _sqlite3GetVTable(tls, _db, _pTab) != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125706), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabCallCreateØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125706), unsafe.Pointer(&_sqlite3VtabCallCreateØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _11
}
_rc = _growVTrans(tls, _db)
- if _rc == i32(0) {
+ if _rc == int32(0) {
_addToVTrans(tls, _db, _sqlite3GetVTable(tls, _db, _pTab))
}
_11:
@@ -71134,12 +71741,15 @@ _11:
var _sqlite3VtabCallCreateØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabCallCreateØ00__func__Ø000[0], str(93169), 22)
+ crt.Xstrncpy(nil, &_sqlite3VtabCallCreateØ00__func__Ø000[0], str(91691), 22)
}
-// Invoke a virtual table constructor (either xCreate or xConnect). The
-// pointer to the function to invoke is passed as the fourth parameter
-// to this procedure.
+// C comment
+// /*
+// ** Invoke a virtual table constructor (either xCreate or xConnect). The
+// ** pointer to the function to invoke is passed as the fourth parameter
+// ** to this procedure.
+// */
func _vtabCallConstructor(tls *crt.TLS, _db *Xsqlite3, _pTab *XTable, _pMod *XModule, _xConstruct func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32, _pzErr **int8) (r0 int32) {
var _rc, _nArg, _iDb, _10_iCol, _11_nType, _11_i, _14_j, _14_nDel int32
var _zErr, _zModuleName, _9_zFormat, _11_zType *int8
@@ -71148,114 +71758,114 @@ func _vtabCallConstructor(tls *crt.TLS, _db *Xsqlite3, _pTab *XTable, _pMod *XMo
var _pVTable *XVTable
var _sCtx XVtabCtx
var _pCtx *XVtabCtx
- _azArg = _pTab.X17
- _nArg = _pTab.X16
+ _azArg = _pTab.XazModuleArg
+ _nArg = _pTab.XnModuleArg
_zErr = nil
- _pCtx = (*XVtabCtx)(_db.X66)
+ _pCtx = (*XVtabCtx)(_db.XpVtabCtx)
_0:
if _pCtx == nil {
goto _3
}
- if (*XTable)(_pCtx.X1) == _pTab {
- *_pzErr = _sqlite3MPrintf(tls, _db, str(93191), unsafe.Pointer(_pTab.X0))
- return i32(6)
+ if (*XTable)(_pCtx.XpTab) == _pTab {
+ *_pzErr = _sqlite3MPrintf(tls, _db, str(91713), unsafe.Pointer(_pTab.XzName))
+ return int32(6)
}
- _pCtx = (*XVtabCtx)(_pCtx.X2)
+ _pCtx = (*XVtabCtx)(_pCtx.XpPrior)
goto _0
_3:
- _zModuleName = _sqlite3MPrintf(tls, _db, str(24576), unsafe.Pointer(_pTab.X0))
+ _zModuleName = _sqlite3MPrintf(tls, _db, str(24531), unsafe.Pointer(_pTab.XzName))
if _zModuleName == nil {
- return _sqlite3NomemError(tls, i32(125510))
+ return _sqlite3NomemError(tls, int32(125510))
}
- _pVTable = (*XVTable)(_sqlite3DbMallocZero(tls, _db, uint64(u32(28))))
+ _pVTable = (*XVTable)(_sqlite3DbMallocZero(tls, _db, uint64(28)))
if _pVTable == nil {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zModuleName))
- return _sqlite3NomemError(tls, i32(125516))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zModuleName))
+ return _sqlite3NomemError(tls, int32(125516))
}
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pVTable.X0))))) = _db
- *(**XModule)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pVTable.X1))))) = _pMod
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTab.X17)) + 4*uintptr(i32(1)))) = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
+ *(**Xsqlite3)(unsafe.Pointer(&_pVTable.Xdb)) = _db
+ *(**XModule)(unsafe.Pointer(&_pVTable.XpMod)) = _pMod
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
+ *elem0(_pTab.XazModuleArg, uintptr(1)) = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
func() {
- if (**XVtabCtx)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X66))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125525), unsafe.Pointer((*int8)(unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000))), unsafe.Pointer(str(93233)))
+ if &_db.XpVtabCtx == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125525), unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000), unsafe.Pointer(str(91755)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _xConstruct == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125526), unsafe.Pointer((*int8)(unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000))), unsafe.Pointer(str(93247)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125526), unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000), unsafe.Pointer(str(91769)))
crt.X__builtin_abort(tls)
}
}()
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sCtx.X1))))) = _pTab
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sCtx.X0))))) = _pVTable
- *(**XVtabCtx)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sCtx.X2))))) = (*XVtabCtx)(_db.X66)
- *(*int32)(unsafe.Pointer(&(_sCtx.X3))) = i32(0)
- *(**XVtabCtx)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X66))))) = &_sCtx
- _rc = _xConstruct(tls, _db, _pMod.X2, _nArg, _azArg, (**Xsqlite3_vtab)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pVTable.X2))))), &_zErr)
- *(**XVtabCtx)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X66))))) = (*XVtabCtx)(_sCtx.X2)
- if _rc == i32(7) {
+ *(**XTable)(unsafe.Pointer(&_sCtx.XpTab)) = _pTab
+ *(**XVTable)(unsafe.Pointer(&_sCtx.XpVTable)) = _pVTable
+ *(**XVtabCtx)(unsafe.Pointer(&_sCtx.XpPrior)) = (*XVtabCtx)(_db.XpVtabCtx)
+ _sCtx.XbDeclared = int32(0)
+ *(**XVtabCtx)(unsafe.Pointer(&_db.XpVtabCtx)) = &_sCtx
+ _rc = _xConstruct(tls, _db, _pMod.XpAux, _nArg, _azArg, (**Xsqlite3_vtab)(unsafe.Pointer(&_pVTable.XpVtab)), &_zErr)
+ *(**XVtabCtx)(unsafe.Pointer(&_db.XpVtabCtx)) = (*XVtabCtx)(_sCtx.XpPrior)
+ if _rc == int32(7) {
_sqlite3OomFault(tls, _db)
}
func() {
- if (*XTable)(_sCtx.X1) != _pTab {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125535), unsafe.Pointer((*int8)(unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000))), unsafe.Pointer(str(93258)))
+ if (*XTable)(_sCtx.XpTab) != _pTab {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125535), unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000), unsafe.Pointer(str(91780)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) == _rc {
+ if int32(0) == _rc {
goto _14
}
if _zErr == nil {
- *_pzErr = _sqlite3MPrintf(tls, _db, str(93274), unsafe.Pointer(_zModuleName))
+ *_pzErr = _sqlite3MPrintf(tls, _db, str(91796), unsafe.Pointer(_zModuleName))
goto _16
}
- *_pzErr = _sqlite3MPrintf(tls, _db, str(24576), unsafe.Pointer(_zErr))
- Xsqlite3_free(tls, (unsafe.Pointer)(_zErr))
+ *_pzErr = _sqlite3MPrintf(tls, _db, str(24531), unsafe.Pointer(_zErr))
+ Xsqlite3_free(tls, unsafe.Pointer(_zErr))
_16:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pVTable))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pVTable))
goto _20
_14:
if func() int32 {
- if (*Xsqlite3_vtab)(_pVTable.X2) != nil {
- return i32(1)
+ if _pVTable.XpVtab != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125545), unsafe.Pointer((*int8)(unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125545), unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _20
}
- crt.Xmemset(tls, _pVTable.X2, i32(0), u32(12))
- *(**Xsqlite3_module)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*Xsqlite3_vtab)(_pVTable.X2).X0))))) = (*Xsqlite3_module)(_pMod.X0)
- *(*int32)(unsafe.Pointer(&(_pVTable.X3))) = i32(1)
- if (_sCtx.X3) == i32(0) {
- _9_zFormat = str(93304)
- *_pzErr = _sqlite3MPrintf(tls, _db, _9_zFormat, unsafe.Pointer(_pTab.X0))
+ crt.Xmemset(tls, _pVTable.XpVtab, int32(0), uint32(12))
+ *(**Xsqlite3_module)(unsafe.Pointer(&((*Xsqlite3_vtab)(_pVTable.XpVtab).XpModule))) = (*Xsqlite3_module)(_pMod.XpModule)
+ _pVTable.XnRef = int32(1)
+ if _sCtx.XbDeclared == int32(0) {
+ _9_zFormat = str(91826)
+ *_pzErr = _sqlite3MPrintf(tls, _db, _9_zFormat, unsafe.Pointer(_pTab.XzName))
_sqlite3VtabUnlock(tls, _pVTable)
- _rc = i32(1)
+ _rc = int32(1)
goto _22
}
- _10_oooHidden = u8(0)
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pVTable.X6))))) = (*XVTable)(_pTab.X18)
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X18))))) = _pVTable
- _10_iCol = i32(0)
+ _10_oooHidden = uint8(0)
+ *(**XVTable)(unsafe.Pointer(&_pVTable.XpNext)) = (*XVTable)(_pTab.XpVTable)
+ *(**XVTable)(unsafe.Pointer(&_pTab.XpVTable)) = _pVTable
+ _10_iCol = int32(0)
_23:
- if _10_iCol >= int32(_pTab.X11) {
+ if _10_iCol >= int32(_pTab.XnCol) {
goto _26
}
- _11_zType = _sqlite3ColumnType(tls, (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_10_iCol))), str(0))
- _11_i = i32(0)
+ _11_zType = _sqlite3ColumnType(tls, elem41((*XColumn)(_pTab.XaCol), uintptr(_10_iCol)), str(284))
+ _11_i = int32(0)
_11_nType = _sqlite3Strlen30(tls, _11_zType)
- _11_i = i32(0)
+ _11_i = int32(0)
_27:
if _11_i >= _11_nType {
goto _30
}
- if ((i32(0) == Xsqlite3_strnicmp(tls, str(93350), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType))+1*uintptr(_11_i))), i32(6))) && ((_11_i == i32(0)) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType)) + 1*uintptr(_11_i-i32(1))))) == i32(32)))) && ((int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType)) + 1*uintptr(_11_i+i32(6))))) == i32(0)) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType)) + 1*uintptr(_11_i+i32(6))))) == i32(32))) {
+ if ((int32(0) == Xsqlite3_strnicmp(tls, str(91872), elem1(_11_zType, uintptr(_11_i)), int32(6))) && ((_11_i == int32(0)) || (int32(*elem1(_11_zType, uintptr(_11_i-int32(1)))) == int32(32)))) && ((int32(*elem1(_11_zType, uintptr(_11_i+int32(6)))) == int32(0)) || (int32(*elem1(_11_zType, uintptr(_11_i+int32(6)))) == int32(32))) {
goto _30
}
_11_i += 1
@@ -71264,139 +71874,134 @@ _30:
if _11_i >= _11_nType {
goto _36
}
- _14_nDel = i32(6) + func() int32 {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType)) + 1*uintptr(_11_i+i32(6))))) != 0 {
- return i32(1)
+ _14_nDel = int32(6) + func() int32 {
+ if (*elem1(_11_zType, uintptr(_11_i+int32(6)))) != 0 {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}()
_14_j = _11_i
_39:
if (_14_j + _14_nDel) > _11_nType {
goto _42
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType)) + 1*uintptr(_14_j))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType)) + 1*uintptr(_14_j+_14_nDel)))
+ *elem1(_11_zType, uintptr(_14_j)) = *elem1(_11_zType, uintptr(_14_j+_14_nDel))
_14_j += 1
goto _39
_42:
- if (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType)) + 1*uintptr(_11_i)))) == i32(0)) && (_11_i > i32(0)) {
+ if (int32(*elem1(_11_zType, uintptr(_11_i))) == int32(0)) && (_11_i > int32(0)) {
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType)) + 1*uintptr(_11_i-i32(1))))) != i32(32) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125587), unsafe.Pointer((*int8)(unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000))), unsafe.Pointer(str(93357)))
+ if int32(*elem1(_11_zType, uintptr(_11_i-int32(1)))) != int32(32) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125587), unsafe.Pointer(&_vtabCallConstructorØ00__func__Ø000), unsafe.Pointer(str(91879)))
crt.X__builtin_abort(tls)
}
}()
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_zType)) + 1*uintptr(_11_i-i32(1)))) = int8(i32(0))
+ *elem1(_11_zType, uintptr(_11_i-int32(1))) = 0
}
{
- p := (*uint8)(unsafe.Pointer(&((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_10_iCol))).X6)))
- *p = uint8(int32(*p) | i32(2))
- sink2(*p)
+ p := &(elem41((*XColumn)(_pTab.XaCol), uintptr(_10_iCol)).XcolFlags)
+ *p = uint8(int32(*p) | int32(2))
}
- _10_oooHidden = uint8(i32(128))
+ _10_oooHidden = uint8(128)
goto _47
_36:
- {
- p := (*uint32)(unsafe.Pointer(&(_pTab.X9)))
- *p = (*p) | uint32(_10_oooHidden)
- sink5(*p)
- }
+ _pTab.XtabFlags |= uint32(_10_oooHidden)
_47:
_10_iCol += 1
goto _23
_26:
_22:
_20:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zModuleName))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zModuleName))
return _rc
-
- _ = _sCtx
- panic(0)
}
var _vtabCallConstructorØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_vtabCallConstructorØ00__func__Ø000[0], str(93373), 20)
+ crt.Xstrncpy(nil, &_vtabCallConstructorØ00__func__Ø000[0], str(91895), 20)
}
-// Return the declared type of a column. Or return zDflt if the column
-// has no declared type.
-//
-// The column type is an extra string stored after the zero-terminator on
-// the column name if and only if the COLFLAG_HASTYPE flag is set.
+// C comment
+// /*
+// ** Return the declared type of a column. Or return zDflt if the column
+// ** has no declared type.
+// **
+// ** The column type is an extra string stored after the zero-terminator on
+// ** the column name if and only if the COLFLAG_HASTYPE flag is set.
+// */
func _sqlite3ColumnType(tls *crt.TLS, _pCol *XColumn, _zDflt *int8) (r0 *int8) {
- if (int32(_pCol.X6) & i32(4)) == i32(0) {
+ if (int32(_pCol.XcolFlags) & int32(4)) == int32(0) {
return _zDflt
}
- return (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCol.X0))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(crt.Xstrlen(tls, _pCol.X0)))))))))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(1))))))))
+ return (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pCol.XzName))+uintptr(crt.Xstrlen(tls, _pCol.XzName)))))) + uintptr(int32(1))))
}
-// This function is invoked by the vdbe to call the xDestroy method
-// of the virtual table named zTab in database iDb. This occurs
-// when a DROP TABLE is mentioned.
-//
-// This call is a no-op if zTab is not a virtual table.
+// C comment
+// /*
+// ** This function is invoked by the vdbe to call the xDestroy method
+// ** of the virtual table named zTab in database iDb. This occurs
+// ** when a DROP TABLE is mentioned.
+// **
+// ** This call is a no-op if zTab is not a virtual table.
+// */
func _sqlite3VtabCallDestroy(tls *crt.TLS, _db *Xsqlite3, _iDb int32, _zTab *int8) (r0 int32) {
var _rc int32
var _pTab *XTable
var _1_p *XVTable
var _1_xDestroy func(*crt.TLS, *Xsqlite3_vtab) int32
- _rc = i32(0)
- _pTab = _sqlite3FindTable(tls, _db, _zTab, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0)
+ _rc = int32(0)
+ _pTab = _sqlite3FindTable(tls, _db, _zTab, elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName)
if _pTab == nil || func() int32 {
- if (*XVTable)(_pTab.X18) != nil {
- return i32(1)
+ if (*XVTable)(_pTab.XpVTable) != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125811), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabCallDestroyØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125811), unsafe.Pointer(&_sqlite3VtabCallDestroyØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _3
}
- _1_p = (*XVTable)(_pTab.X18)
+ _1_p = (*XVTable)(_pTab.XpVTable)
_4:
if _1_p == nil {
goto _7
}
func() {
- if (*Xsqlite3_vtab)(_1_p.X2) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125815), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabCallDestroyØ00__func__Ø000))), unsafe.Pointer(str(93393)))
+ if _1_p.XpVtab == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125815), unsafe.Pointer(&_sqlite3VtabCallDestroyØ00__func__Ø000), unsafe.Pointer(str(91915)))
crt.X__builtin_abort(tls)
}
}()
- if ((*Xsqlite3_vtab)(_1_p.X2).X1) > i32(0) {
- return i32(6)
+ if ((*Xsqlite3_vtab)(_1_p.XpVtab).XnRef) > int32(0) {
+ return int32(6)
}
- _1_p = (*XVTable)(_1_p.X6)
+ _1_p = (*XVTable)(_1_p.XpNext)
goto _4
_7:
_1_p = _vtabDisconnectAll(tls, _db, _pTab)
- _1_xDestroy = *(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_module)((*XModule)(_1_p.X1).X0).X5)}))
+ _1_xDestroy = func() func(*crt.TLS, *Xsqlite3_vtab) int32 {
+ v := (*Xsqlite3_module)((*XModule)(_1_p.XpMod).XpModule).XxDestroy
+ return *(*func(*crt.TLS, *Xsqlite3_vtab) int32)(unsafe.Pointer(&v))
+ }()
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab) int32
- }{_1_xDestroy})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab) int32
- }{nil})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125822), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabCallDestroyØ00__func__Ø000))), unsafe.Pointer(str(93402)))
+ if _1_xDestroy == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125822), unsafe.Pointer(&_sqlite3VtabCallDestroyØ00__func__Ø000), unsafe.Pointer(str(91924)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _1_xDestroy(tls, (*Xsqlite3_vtab)(_1_p.X2))
- if _rc == i32(0) {
+ _rc = _1_xDestroy(tls, (*Xsqlite3_vtab)(_1_p.XpVtab))
+ if _rc == int32(0) {
func() {
- if (*XVTable)(_pTab.X18) != _1_p || (*XVTable)(_1_p.X6) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125826), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabCallDestroyØ00__func__Ø000))), unsafe.Pointer(str(93414)))
+ if (*XVTable)(_pTab.XpVTable) != _1_p || (*XVTable)(_1_p.XpNext) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125826), unsafe.Pointer(&_sqlite3VtabCallDestroyØ00__func__Ø000), unsafe.Pointer(str(91936)))
crt.X__builtin_abort(tls)
}
}()
- *(**Xsqlite3_vtab)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_p.X2))))) = nil
- *(**XVTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X18))))) = nil
+ *(**Xsqlite3_vtab)(unsafe.Pointer(&_1_p.XpVtab)) = nil
+ *(**XVTable)(unsafe.Pointer(&_pTab.XpVTable)) = nil
_sqlite3VtabUnlock(tls, _1_p)
}
_3:
@@ -71406,72 +72011,81 @@ _3:
var _sqlite3VtabCallDestroyØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabCallDestroyØ00__func__Ø000[0], str(93446), 23)
+ crt.Xstrncpy(nil, &_sqlite3VtabCallDestroyØ00__func__Ø000[0], str(91968), 23)
}
-// Set the maximum page count for a database if mxPage is positive.
-// No changes are made if mxPage is 0 or negative.
-// Regardless of the value of mxPage, return the maximum page count.
+// C comment
+// /*
+// ** Set the maximum page count for a database if mxPage is positive.
+// ** No changes are made if mxPage is 0 or negative.
+// ** Regardless of the value of mxPage, return the maximum page count.
+// */
func _sqlite3BtreeMaxPageCount(tls *crt.TLS, _p *XBtree, _mxPage int32) (r0 int32) {
var _n int32
_sqlite3BtreeEnter(tls, _p)
- _n = _sqlite3PagerMaxPageCount(tls, (*XPager)((*XBtShared)(_p.X1).X0), _mxPage)
+ _n = _sqlite3PagerMaxPageCount(tls, (*XPager)((*XBtShared)(_p.XpBt).XpPager), _mxPage)
_sqlite3BtreeLeave(tls, _p)
return _n
}
-// Attempt to set the maximum database page count if mxPage is positive.
-// Make no changes if mxPage is zero or negative. And never reduce the
-// maximum page count below the current size of the database.
-//
-// Regardless of mxPage, return the current maximum page count.
+// C comment
+// /*
+// ** Attempt to set the maximum database page count if mxPage is positive.
+// ** Make no changes if mxPage is zero or negative. And never reduce the
+// ** maximum page count below the current size of the database.
+// **
+// ** Regardless of mxPage, return the current maximum page count.
+// */
func _sqlite3PagerMaxPageCount(tls *crt.TLS, _pPager *XPager, _mxPage int32) (r0 int32) {
- if _mxPage > i32(0) {
- *(*uint32)(unsafe.Pointer(&(_pPager.X49))) = uint32(_mxPage)
+ if _mxPage > int32(0) {
+ _pPager.XmxPgno = uint32(_mxPage)
}
func() {
- if int32(_pPager.X14) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50719), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMaxPageCountØ00__func__Ø000))), unsafe.Pointer(str(93469)))
+ if int32(_pPager.XeState) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50719), unsafe.Pointer(&_sqlite3PagerMaxPageCountØ00__func__Ø000), unsafe.Pointer(str(91991)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pPager.X49) < (_pPager.X22) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(50720), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerMaxPageCountØ00__func__Ø000))), unsafe.Pointer(str(93496)))
+ if _pPager.XmxPgno < _pPager.XdbSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(50720), unsafe.Pointer(&_sqlite3PagerMaxPageCountØ00__func__Ø000), unsafe.Pointer(str(92018)))
crt.X__builtin_abort(tls)
}
}()
- return int32(_pPager.X49)
+ return int32(_pPager.XmxPgno)
}
var _sqlite3PagerMaxPageCountØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerMaxPageCountØ00__func__Ø000[0], str(93527), 25)
-}
-
-// This function returns a pointer to a nul-terminated string in memory
-// obtained from sqlite3DbMalloc(). If sqlite3.nVdbeExec is 1, then the
-// string contains a copy of zRawSql but with host parameters expanded to
-// their current bindings. Or, if sqlite3.nVdbeExec is greater than 1,
-// then the returned string holds a copy of zRawSql with "-- " prepended
-// to each line of text.
-//
-// If the SQLITE_TRACE_SIZE_LIMIT macro is defined to an integer, then
-// then long strings and blobs are truncated to that many bytes. This
-// can be used to prevent unreasonably large trace strings when dealing
-// with large (multi-megabyte) strings and blobs.
-//
-// The calling function is responsible for making sure the memory returned
-// is eventually freed.
-//
-// ALGORITHM: Scan the input string looking for host parameters in any of
-// these forms: ?, ?N, $A, @A, :A. Take care to avoid text within
-// string literals, quoted identifier names, and comments. For text forms,
-// the host parameter index is found by scanning the prepared
-// statement for the corresponding OP_Variable opcode. Once the host
-// parameter index is known, locate the value in p->aVar[]. Then render
-// the value as a literal in place of the host parameter name.
+ crt.Xstrncpy(nil, &_sqlite3PagerMaxPageCountØ00__func__Ø000[0], str(92049), 25)
+}
+
+// C comment
+// /*
+// ** This function returns a pointer to a nul-terminated string in memory
+// ** obtained from sqlite3DbMalloc(). If sqlite3.nVdbeExec is 1, then the
+// ** string contains a copy of zRawSql but with host parameters expanded to
+// ** their current bindings. Or, if sqlite3.nVdbeExec is greater than 1,
+// ** then the returned string holds a copy of zRawSql with "-- " prepended
+// ** to each line of text.
+// **
+// ** If the SQLITE_TRACE_SIZE_LIMIT macro is defined to an integer, then
+// ** then long strings and blobs are truncated to that many bytes. This
+// ** can be used to prevent unreasonably large trace strings when dealing
+// ** with large (multi-megabyte) strings and blobs.
+// **
+// ** The calling function is responsible for making sure the memory returned
+// ** is eventually freed.
+// **
+// ** ALGORITHM: Scan the input string looking for host parameters in any of
+// ** these forms: ?, ?N, $A, @A, :A. Take care to avoid text within
+// ** string literals, quoted identifier names, and comments. For text forms,
+// ** the host parameter index is found by scanning the prepared
+// ** statement for the corresponding OP_Variable opcode. Once the host
+// ** parameter index is known, locate the value in p->aVar[]. Then render
+// ** the value as a literal in place of the host parameter name.
+// */
func _sqlite3VdbeExpandSql(tls *crt.TLS, _p *TVdbe, _zRawSql *int8) (r0 *int8) {
var _idx, _nextIndex, _n, _nToken, _i, _13_nOut, _17_nOut int32
var _2_zStart *int8
@@ -71481,11 +72095,11 @@ func _sqlite3VdbeExpandSql(tls *crt.TLS, _p *TVdbe, _zRawSql *int8) (r0 *int8) {
var _pVar *XMem
var _zBase [100]int8
var _out XStrAccum
- _idx = i32(0)
- _nextIndex = i32(1)
- _db = (*Xsqlite3)(_p.X0)
- _sqlite3StrAccumInit(tls, &_out, nil, (*int8)(unsafe.Pointer(&_zBase)), int32(u32(100)), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0)))))
- if (_db.X37) <= i32(1) {
+ _idx = int32(0)
+ _nextIndex = int32(1)
+ _db = (*Xsqlite3)(_p.Xdb)
+ _sqlite3StrAccumInit(tls, &_out, nil, (*int8)(unsafe.Pointer(&_zBase)), int32(100), *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0))
+ if _db.XnVdbeExec <= int32(1) {
goto _0
}
_1:
@@ -71494,62 +72108,58 @@ _1:
}
_2_zStart = _zRawSql
_3:
- if (int32(*postInc0(&_zRawSql, 1)) != i32(10)) && ((*_zRawSql) != 0) {
+ if (int32(*postInc1(&_zRawSql, 1)) != int32(10)) && ((*_zRawSql) != 0) {
goto _3
}
- _sqlite3StrAccumAppend(tls, &_out, str(72354), i32(3))
+ _sqlite3StrAccumAppend(tls, &_out, str(70516), int32(3))
func() {
- if int32((uintptr(unsafe.Pointer(_zRawSql))-uintptr(unsafe.Pointer(_2_zStart)))/1) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78101), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000))), unsafe.Pointer(str(93552)))
+ if int32(uintptr(unsafe.Pointer(_zRawSql))-uintptr(unsafe.Pointer(_2_zStart))) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78101), unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000), unsafe.Pointer(str(92074)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3StrAccumAppend(tls, &_out, _2_zStart, int32((uintptr(unsafe.Pointer(_zRawSql))-uintptr(unsafe.Pointer(_2_zStart)))/1))
+ _sqlite3StrAccumAppend(tls, &_out, _2_zStart, int32(uintptr(unsafe.Pointer(_zRawSql))-uintptr(unsafe.Pointer(_2_zStart))))
goto _1
_2:
goto _10
_0:
- if int32(_p.X4) == i32(0) {
+ if int32(_p.XnVar) == int32(0) {
_sqlite3StrAccumAppend(tls, &_out, _zRawSql, _sqlite3Strlen30(tls, _zRawSql))
goto _10
}
_11:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRawSql)) + 1*uintptr(i32(0))))) == 0 {
+ if (*elem1(_zRawSql, 0)) == 0 {
goto _12
}
_n = _findNextHostParameter(tls, _zRawSql, &_nToken)
func() {
- if _n <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78109), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000))), unsafe.Pointer(str(1358)))
+ if _n <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78109), unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000), unsafe.Pointer(str(1376)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3StrAccumAppend(tls, &_out, _zRawSql, _n)
- {
- p := &_zRawSql
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n)))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zRawSql)) += uintptr(_n)
func() {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRawSql)) + 1*uintptr(i32(0))))) == 0 && _nToken != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78112), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000))), unsafe.Pointer(str(93575)))
+ if (*elem1(_zRawSql, 0)) == 0 && _nToken != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78112), unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000), unsafe.Pointer(str(92097)))
crt.X__builtin_abort(tls)
}
}()
- if _nToken == i32(0) {
+ if _nToken == int32(0) {
goto _12
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRawSql)) + 1*uintptr(i32(0))))) != i32(63) {
+ if int32(*elem1(_zRawSql, 0)) != int32(63) {
goto _19
}
- if _nToken > i32(1) {
+ if _nToken > int32(1) {
func() {
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRawSql)) + 1*uintptr(i32(1))))))))) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78116), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000))), unsafe.Pointer(str(93599)))
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zRawSql, uintptr(1)))))) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78116), unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000), unsafe.Pointer(str(92121)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3GetInt32(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRawSql))+1*uintptr(i32(1)))), &_idx)
+ _sqlite3GetInt32(tls, elem1(_zRawSql, uintptr(1)), &_idx)
goto _23
}
_idx = _nextIndex
@@ -71557,100 +72167,94 @@ _23:
goto _24
_19:
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRawSql)) + 1*uintptr(i32(0))))) != i32(58) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRawSql)) + 1*uintptr(i32(0))))) != i32(36) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRawSql)) + 1*uintptr(i32(0))))) != i32(64) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRawSql)) + 1*uintptr(i32(0))))) != i32(35) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78122), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000))), unsafe.Pointer(str(93626)))
+ if int32(*elem1(_zRawSql, 0)) != int32(58) && int32(*elem1(_zRawSql, 0)) != int32(36) && int32(*elem1(_zRawSql, 0)) != int32(64) && int32(*elem1(_zRawSql, 0)) != int32(35) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78122), unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000), unsafe.Pointer(str(92148)))
crt.X__builtin_abort(tls)
}
}()
_idx = _sqlite3VdbeParameterIndex(tls, _p, _zRawSql, _nToken)
func() {
- if _idx <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78129), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000))), unsafe.Pointer(str(93699)))
+ if _idx <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78129), unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000), unsafe.Pointer(str(92221)))
crt.X__builtin_abort(tls)
}
}()
_24:
- {
- p := &_zRawSql
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_nToken)))
- sink0(*p)
- }
- _nextIndex = _idx + i32(1)
+ *(*uintptr)(unsafe.Pointer(&_zRawSql)) += uintptr(_nToken)
+ _nextIndex = _idx + int32(1)
func() {
- if _idx <= i32(0) || _idx > int32(_p.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78133), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000))), unsafe.Pointer(str(93705)))
+ if _idx <= int32(0) || _idx > int32(_p.XnVar) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78133), unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000), unsafe.Pointer(str(92227)))
crt.X__builtin_abort(tls)
}
}()
- _pVar = (*XMem)(unsafe.Pointer(uintptr(_p.X24) + 48*uintptr(_idx-i32(1))))
- if (int32(_pVar.X1) & i32(1)) != 0 {
- _sqlite3StrAccumAppend(tls, &_out, str(155), i32(4))
+ _pVar = elem25((*XMem)(_p.XaVar), uintptr(_idx-int32(1)))
+ if (int32(_pVar.Xflags) & int32(1)) != 0 {
+ _sqlite3StrAccumAppend(tls, &_out, str(285), int32(4))
goto _47
}
- if (int32(_pVar.X1) & i32(4)) != 0 {
- _sqlite3XPrintf(tls, &_out, str(6348), *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pVar.X0))))))
+ if (int32(_pVar.Xflags) & int32(4)) != 0 {
+ _sqlite3XPrintf(tls, &_out, str(6249), *(*int64)(unsafe.Pointer(&_pVar.Xu)))
goto _47
}
- if (int32(_pVar.X1) & i32(8)) != 0 {
- _sqlite3XPrintf(tls, &_out, str(6367), *(*float64)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pVar.X0))))))
+ if (int32(_pVar.Xflags) & int32(8)) != 0 {
+ _sqlite3XPrintf(tls, &_out, str(6268), *(*float64)(unsafe.Pointer(&_pVar.Xu)))
goto _47
}
- if (int32(_pVar.X1) & i32(2)) == 0 {
+ if (int32(_pVar.Xflags) & int32(2)) == 0 {
goto _41
}
- _13_enc = _db.X14
- if int32(_13_enc) == i32(1) {
+ _13_enc = _db.Xenc
+ if int32(_13_enc) == int32(1) {
goto _42
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_utf8), i32(0), u32(48))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_utf8.X9))))) = _db
- _sqlite3VdbeMemSetStr(tls, &_utf8, _pVar.X5, _pVar.X4, _13_enc, nil)
- if i32(7) == _sqlite3VdbeChangeEncoding(tls, &_utf8, i32(1)) {
- *(*uint8)(unsafe.Pointer(&(_out.X6))) = uint8(i32(1))
- *(*uint32)(unsafe.Pointer(&(_out.X4))) = uint32(i32(0))
+ crt.Xmemset(tls, unsafe.Pointer(&_utf8), int32(0), uint32(48))
+ *(**Xsqlite3)(unsafe.Pointer(&_utf8.Xdb)) = _db
+ _sqlite3VdbeMemSetStr(tls, &_utf8, _pVar.Xz, _pVar.Xn, _13_enc, nil)
+ if int32(7) == _sqlite3VdbeChangeEncoding(tls, &_utf8, int32(1)) {
+ _out.XaccError = uint8(1)
+ _out.XnAlloc = 0
}
_pVar = &_utf8
_42:
- _13_nOut = _pVar.X4
- _sqlite3XPrintf(tls, &_out, str(93727), _13_nOut, unsafe.Pointer(_pVar.X5))
- if int32(_13_enc) != i32(1) {
+ _13_nOut = _pVar.Xn
+ _sqlite3XPrintf(tls, &_out, str(92249), _13_nOut, unsafe.Pointer(_pVar.Xz))
+ if int32(_13_enc) != int32(1) {
_sqlite3VdbeMemRelease(tls, &_utf8)
}
goto _47
_41:
- if (int32(_pVar.X1) & i32(16384)) != 0 {
- _sqlite3XPrintf(tls, &_out, str(93734), *(*int32)(unsafe.Pointer((*t15)(unsafe.Pointer(&(_pVar.X0))))))
+ if (int32(_pVar.Xflags) & int32(16384)) != 0 {
+ _sqlite3XPrintf(tls, &_out, str(92256), *(*int32)(unsafe.Pointer(&_pVar.Xu)))
goto _47
}
func() {
- if (int32(_pVar.X1) & i32(16)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78176), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000))), unsafe.Pointer(str(93747)))
+ if (int32(_pVar.Xflags) & int32(16)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78176), unsafe.Pointer(&_sqlite3VdbeExpandSqlØ00__func__Ø000), unsafe.Pointer(str(92269)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3StrAccumAppend(tls, &_out, str(93770), i32(2))
- _17_nOut = _pVar.X4
- _i = i32(0)
+ _sqlite3StrAccumAppend(tls, &_out, str(92292), int32(2))
+ _17_nOut = _pVar.Xn
+ _i = int32(0)
_50:
if _i >= _17_nOut {
goto _53
}
- _sqlite3XPrintf(tls, &_out, str(93773), int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pVar.X5)) + 1*uintptr(_i))))&i32(255))
+ _sqlite3XPrintf(tls, &_out, str(92295), int32(*elem1(_pVar.Xz, uintptr(_i)))&int32(255))
_i += 1
goto _50
_53:
- _sqlite3StrAccumAppend(tls, &_out, str(93778), i32(1))
+ _sqlite3StrAccumAppend(tls, &_out, str(92300), int32(1))
_47:
goto _11
_12:
_10:
- if (_out.X6) != 0 {
+ if _out.XaccError != 0 {
_sqlite3StrAccumReset(tls, &_out)
}
return _sqlite3StrAccumFinish(tls, &_out)
- _ = _out
- _ = _utf8
_ = _zBase
panic(0)
}
@@ -71658,42 +72262,37 @@ _10:
var _sqlite3VdbeExpandSqlØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeExpandSqlØ00__func__Ø000[0], str(93780), 21)
+ crt.Xstrncpy(nil, &_sqlite3VdbeExpandSqlØ00__func__Ø000[0], str(92302), 21)
}
-// zSql is a zero-terminated string of UTF-8 SQL text. Return the number of
-// bytes in this text up to but excluding the first character in
-// a host parameter. If the text contains no host parameters, return
-// the total number of bytes in the text.
+// C comment
+// /*
+// ** zSql is a zero-terminated string of UTF-8 SQL text. Return the number of
+// ** bytes in this text up to but excluding the first character in
+// ** a host parameter. If the text contains no host parameters, return
+// ** the total number of bytes in the text.
+// */
func _findNextHostParameter(tls *crt.TLS, _zSql *int8, _pnToken *int32) (r0 int32) {
var _tokenType, _nTotal, _n int32
- _nTotal = i32(0)
- *_pnToken = i32(0)
+ _nTotal = int32(0)
+ *_pnToken = int32(0)
_0:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSql)) + 1*uintptr(i32(0))))) == 0 {
+ if (*elem1(_zSql, 0)) == 0 {
goto _1
}
_n = _sqlite3GetToken(tls, (*uint8)(unsafe.Pointer(_zSql)), &_tokenType)
func() {
- if _n <= i32(0) || _tokenType == i32(164) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(78041), unsafe.Pointer((*int8)(unsafe.Pointer(&_findNextHostParameterØ00__func__Ø000))), unsafe.Pointer(str(93801)))
+ if _n <= int32(0) || _tokenType == int32(164) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(78041), unsafe.Pointer(&_findNextHostParameterØ00__func__Ø000), unsafe.Pointer(str(92323)))
crt.X__builtin_abort(tls)
}
}()
- if _tokenType == i32(135) {
+ if _tokenType == int32(135) {
*_pnToken = _n
goto _1
}
- {
- p := &_nTotal
- *p = (*p) + _n
- sink1(*p)
- }
- {
- p := &_zSql
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n)))
- sink0(*p)
- }
+ _nTotal += _n
+ *(*uintptr)(unsafe.Pointer(&_zSql)) += uintptr(_n)
goto _0
_1:
return _nTotal
@@ -71702,45 +72301,53 @@ _1:
var _findNextHostParameterØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_findNextHostParameterØ00__func__Ø000[0], str(93830), 22)
+ crt.Xstrncpy(nil, &_findNextHostParameterØ00__func__Ø000[0], str(92352), 22)
}
-// The sqlite3_strlike() interface. Return 0 on a match and non-zero for
-// a miss - like strcmp().
+// C comment
+// /*
+// ** The sqlite3_strlike() interface. Return 0 on a match and non-zero for
+// ** a miss - like strcmp().
+// */
func Xsqlite3_strlike(tls *crt.TLS, _zPattern *int8, _zStr *int8, _esc uint32) (r0 int32) {
return _patternCompare(tls, (*uint8)(unsafe.Pointer(_zPattern)), (*uint8)(unsafe.Pointer(_zStr)), &_likeInfoNorm, _esc)
}
+// C comment
+// /* The correct SQL-92 behavior is for the LIKE operator to ignore
+// ** case. Thus 'a' LIKE 'A' would be true. */
var _likeInfoNorm TcompareInfo
func init() {
- _likeInfoNorm = TcompareInfo{X0: u8(37), X1: u8(95), X2: u8(0), X3: u8(1)}
+ _likeInfoNorm = TcompareInfo{XmatchAll: uint8(37), XmatchOne: uint8(95), XnoCase: uint8(1)}
}
-// This function is called after a transaction has been committed. It
-// invokes callbacks registered with sqlite3_wal_hook() as required.
+// C comment
+// /*
+// ** This function is called after a transaction has been committed. It
+// ** invokes callbacks registered with sqlite3_wal_hook() as required.
+// */
func _doWalCallbacks(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
var _rc, _i, _2_nEntry int32
var _1_pBt *XBtree
- _rc = i32(0)
- _i = i32(0)
+ _rc = int32(0)
+ _i = int32(0)
_0:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _3
}
- _1_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _1_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _1_pBt == nil {
goto _4
}
_sqlite3BtreeEnter(tls, _1_pBt)
_2_nEntry = _sqlite3PagerWalCallback(tls, _sqlite3BtreePager(tls, _1_pBt))
_sqlite3BtreeLeave(tls, _1_pBt)
- if (((*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32
- }{(_db.X51)}))) != nil) && (_2_nEntry > i32(0))) && (_rc == i32(0)) {
- _rc = (*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32
- }{(_db.X51)})))(tls, _db.X52, _db, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_i))).X0, _2_nEntry)
+ if ((_db.XxWalCallback != nil) && (_2_nEntry > int32(0))) && (_rc == int32(0)) {
+ _rc = func() func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32 {
+ v := _db.XxWalCallback
+ return *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _db.XpWalArg, _db, elem27((*XDb)(_db.XaDb), uintptr(_i)).XzDbSName, _2_nEntry)
}
_4:
_i += 1
@@ -71750,64 +72357,69 @@ _3:
}
func _sqlite3PagerWalCallback(tls *crt.TLS, _pPager *XPager) (r0 int32) {
- return _sqlite3WalCallback(tls, (*XWal)(_pPager.X60))
+ return _sqlite3WalCallback(tls, (*XWal)(_pPager.XpWal))
}
-// Return the value to pass to a sqlite3_wal_hook callback, the
-// number of frames in the WAL at the point of the last commit since
-// sqlite3WalCallback() was called. If no commits have occurred since
-// the last call, then return 0.
+// C comment
+// /* Return the value to pass to a sqlite3_wal_hook callback, the
+// ** number of frames in the WAL at the point of the last commit since
+// ** sqlite3WalCallback() was called. If no commits have occurred since
+// ** the last call, then return 0.
+// */
func _sqlite3WalCallback(tls *crt.TLS, _pWal *XWal) (r0 int32) {
var _ret uint32
- _ret = u32(0)
+ _ret = uint32(0)
if _pWal != nil {
- _ret = _pWal.X3
- *(*uint32)(unsafe.Pointer(&(_pWal.X3))) = uint32(i32(0))
+ _ret = _pWal.XiCallback
+ _pWal.XiCallback = 0
}
return int32(_ret)
}
-// Rerun the compilation of a statement after a schema change.
-//
-// If the statement is successfully recompiled, return SQLITE_OK. Otherwise,
-// if the statement cannot be recompiled because another connection has
-// locked the sqlite3_master table, return SQLITE_LOCKED. If any other error
-// occurs, return SQLITE_SCHEMA.
+// C comment
+// /*
+// ** Rerun the compilation of a statement after a schema change.
+// **
+// ** If the statement is successfully recompiled, return SQLITE_OK. Otherwise,
+// ** if the statement cannot be recompiled because another connection has
+// ** locked the sqlite3_master table, return SQLITE_LOCKED. If any other error
+// ** occurs, return SQLITE_SCHEMA.
+// */
func _sqlite3Reprepare(tls *crt.TLS, _p *TVdbe) (r0 int32) {
var _rc int32
var _zSql *int8
var _pNew unsafe.Pointer
var _db *Xsqlite3
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_sqlite3VdbeDb(tls, _p).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116374), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000))), unsafe.Pointer(str(93852)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_sqlite3VdbeDb(tls, _p).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116374), unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000), unsafe.Pointer(str(92374)))
crt.X__builtin_abort(tls)
}
}()
- _zSql = Xsqlite3_sql(tls, (unsafe.Pointer)(_p))
+ _zSql = Xsqlite3_sql(tls, unsafe.Pointer(_p))
func() {
if _zSql == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116376), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000))), unsafe.Pointer(str(24614)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116376), unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000), unsafe.Pointer(str(24569)))
crt.X__builtin_abort(tls)
}
}()
_db = _sqlite3VdbeDb(tls, _p)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116378), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000))), unsafe.Pointer(str(863)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_db.Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116378), unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000), unsafe.Pointer(str(881)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _sqlite3LockAndPrepare(tls, _db, _zSql, i32(-1), i32(0), _p, &_pNew, nil)
+ _rc = _sqlite3LockAndPrepare(tls, _db, _zSql, int32(-1), int32(0), _p, &_pNew, nil)
if _rc == 0 {
goto _6
}
- if _rc == i32(7) {
+ if _rc == int32(7) {
_sqlite3OomFault(tls, _db)
}
func() {
if _pNew != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116384), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000))), unsafe.Pointer(str(93896)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116384), unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000), unsafe.Pointer(str(92418)))
crt.X__builtin_abort(tls)
}
}()
@@ -71816,364 +72428,851 @@ func _sqlite3Reprepare(tls *crt.TLS, _p *TVdbe) (r0 int32) {
_6:
func() {
if _pNew == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116387), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000))), unsafe.Pointer(str(21146)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116387), unsafe.Pointer(&_sqlite3ReprepareØ00__func__Ø000), unsafe.Pointer(str(21101)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3VdbeSwap(tls, (*TVdbe)(_pNew), _p)
- _sqlite3TransferBindings(tls, _pNew, (unsafe.Pointer)(_p))
+ _sqlite3TransferBindings(tls, _pNew, unsafe.Pointer(_p))
_sqlite3VdbeResetStepResult(tls, (*TVdbe)(_pNew))
_sqlite3VdbeFinalize(tls, (*TVdbe)(_pNew))
- return i32(0)
+ return int32(0)
}
var _sqlite3ReprepareØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ReprepareØ00__func__Ø000[0], str(93904), 17)
+ crt.Xstrncpy(nil, &_sqlite3ReprepareØ00__func__Ø000[0], str(92426), 17)
}
-// Return the SQL associated with a prepared statement
+// C comment
+// /*
+// ** Return the SQL associated with a prepared statement
+// */
func Xsqlite3_sql(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 *int8) {
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
return func() *int8 {
if _p != nil {
- return (_p.X36)
+ return _p.XzSql
}
return nil
}()
}
-// Swap all content between two VDBE structures.
+// C comment
+// /*
+// ** Swap all content between two VDBE structures.
+// */
func _sqlite3VdbeSwap(tls *crt.TLS, _pA *TVdbe, _pB *TVdbe) {
var _zTmp *int8
var _pTmp *TVdbe
var _tmp TVdbe
func() {
- if (*Xsqlite3)(_pA.X0) != (*Xsqlite3)(_pB.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71495), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSwapØ00__func__Ø000))), unsafe.Pointer(str(93921)))
+ if (*Xsqlite3)(_pA.Xdb) != (*Xsqlite3)(_pB.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71495), unsafe.Pointer(&_sqlite3VdbeSwapØ00__func__Ø000), unsafe.Pointer(str(92443)))
crt.X__builtin_abort(tls)
}
}()
_tmp = *_pA
*_pA = *_pB
*_pB = _tmp
- _pTmp = (*TVdbe)(_pA.X2)
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pA.X2))))) = (*TVdbe)(_pB.X2)
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pB.X2))))) = _pTmp
- _pTmp = (*TVdbe)(_pA.X1)
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pA.X1))))) = (*TVdbe)(_pB.X1)
- *(**TVdbe)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pB.X1))))) = _pTmp
- _zTmp = _pA.X36
- *(**int8)(unsafe.Pointer(&(_pA.X36))) = _pB.X36
- *(**int8)(unsafe.Pointer(&(_pB.X36))) = _zTmp
- storebits18((*int16)(unsafe.Pointer(&(_pB.X32))), int16((uint32((_pA.X32)>>uint(i32(9)))<<uint(i32(31)))>>uint(i32(31))), 512, 9)
- *(*uint32)(unsafe.Pointer(&(_pB.X41))) = _pA.X41
+ _pTmp = (*TVdbe)(_pA.XpNext)
+ *(**TVdbe)(unsafe.Pointer(&_pA.XpNext)) = (*TVdbe)(_pB.XpNext)
+ *(**TVdbe)(unsafe.Pointer(&_pB.XpNext)) = _pTmp
+ _pTmp = (*TVdbe)(_pA.XpPrev)
+ *(**TVdbe)(unsafe.Pointer(&_pA.XpPrev)) = (*TVdbe)(_pB.XpPrev)
+ *(**TVdbe)(unsafe.Pointer(&_pB.XpPrev)) = _pTmp
+ _zTmp = _pA.XzSql
+ _pA.XzSql = _pB.XzSql
+ _pB.XzSql = _zTmp
+ storebits26(&_pB.Xexpired, int16((uint32(_pA.Xexpired>>9)<<31)>>31), 512, 9)
+ _pB.Xexpmask = _pA.Xexpmask
}
var _sqlite3VdbeSwapØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSwapØ00__func__Ø000[0], str(93936), 16)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSwapØ00__func__Ø000[0], str(92458), 16)
}
-// Transfer all bindings from the first statement over to the second.
+// C comment
+// /*
+// ** Transfer all bindings from the first statement over to the second.
+// */
func _sqlite3TransferBindings(tls *crt.TLS, _pFromStmt unsafe.Pointer, _pToStmt unsafe.Pointer) (r0 int32) {
var _i int32
var _pFrom, _pTo *TVdbe
_pFrom = (*TVdbe)(_pFromStmt)
_pTo = (*TVdbe)(_pToStmt)
func() {
- if (*Xsqlite3)(_pTo.X0) != (*Xsqlite3)(_pFrom.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77607), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TransferBindingsØ00__func__Ø000))), unsafe.Pointer(str(73018)))
+ if (*Xsqlite3)(_pTo.Xdb) != (*Xsqlite3)(_pFrom.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77607), unsafe.Pointer(&_sqlite3TransferBindingsØ00__func__Ø000), unsafe.Pointer(str(71180)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pTo.X4) != int32(_pFrom.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77608), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TransferBindingsØ00__func__Ø000))), unsafe.Pointer(str(93952)))
+ if int32(_pTo.XnVar) != int32(_pFrom.XnVar) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77608), unsafe.Pointer(&_sqlite3TransferBindingsØ00__func__Ø000), unsafe.Pointer(str(92474)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pTo.X0).X3))
- _i = i32(0)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pTo.Xdb).Xmutex))
+ _i = int32(0)
_4:
- if _i >= int32(_pFrom.X4) {
+ if _i >= int32(_pFrom.XnVar) {
goto _7
}
- _sqlite3VdbeMemMove(tls, (*XMem)(unsafe.Pointer(uintptr(_pTo.X24)+48*uintptr(_i))), (*XMem)(unsafe.Pointer(uintptr(_pFrom.X24)+48*uintptr(_i))))
+ _sqlite3VdbeMemMove(tls, elem25((*XMem)(_pTo.XaVar), uintptr(_i)), elem25((*XMem)(_pFrom.XaVar), uintptr(_i)))
_i += 1
goto _4
_7:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pTo.X0).X3))
- return i32(0)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pTo.Xdb).Xmutex))
+ return int32(0)
}
var _sqlite3TransferBindingsØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TransferBindingsØ00__func__Ø000[0], str(93975), 24)
+ crt.Xstrncpy(nil, &_sqlite3TransferBindingsØ00__func__Ø000[0], str(92497), 24)
}
-// Each VDBE holds the result of the most recent sqlite3_step() call
-// in p->rc. This routine sets that result back to SQLITE_OK.
+// C comment
+// /*
+// ** Each VDBE holds the result of the most recent sqlite3_step() call
+// ** in p->rc. This routine sets that result back to SQLITE_OK.
+// */
func _sqlite3VdbeResetStepResult(tls *crt.TLS, _p *TVdbe) {
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(0)
+ _p.Xrc = int32(0)
}
var _sqlite3_stepØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_stepØ00__func__Ø000[0], str(93999), 13)
+ crt.Xstrncpy(nil, &_sqlite3_stepØ00__func__Ø000[0], str(92521), 13)
+}
+
+// C comment
+// /*
+// ** Parameter zName points to a nul-terminated buffer containing the name
+// ** of a database ("main", "temp" or the name of an attached db). This
+// ** function returns the index of the named database in db->aDb[], or
+// ** -1 if the named db cannot be found.
+// */
+func _sqlite3FindDbName(tls *crt.TLS, _db *Xsqlite3, _zName *int8) (r0 int32) {
+ var _i int32
+ var _1_pDb *XDb
+ _i = int32(-1)
+ if _zName == nil {
+ goto _0
+ }
+ *func() **XDb { _i = _db.XnDb - int32(1); return &_1_pDb }() = elem27((*XDb)(_db.XaDb), uintptr(_i))
+_1:
+ if _i < int32(0) {
+ goto _4
+ }
+ if int32(0) == Xsqlite3_stricmp(tls, _1_pDb.XzDbSName, _zName) {
+ goto _4
+ }
+ if (_i == int32(0)) && (int32(0) == Xsqlite3_stricmp(tls, str(92534), _zName)) {
+ goto _4
+ }
+ *(*uintptr)(unsafe.Pointer(func() **XDb { _i -= 1; return &_1_pDb }())) += uintptr(4294967280)
+ goto _1
+_4:
+_0:
+ return _i
+}
+
+// C comment
+// /*
+// ** Check to see if zTabName is really the name of a pragma. If it is,
+// ** then register an eponymous virtual table for that pragma and return
+// ** a pointer to the Module object for the new virtual table.
+// */
+func _sqlite3PragmaVtabRegister(tls *crt.TLS, _db *Xsqlite3, _zName *int8) (r0 *XModule) {
+ var _pName *XPragmaName
+ func() {
+ if Xsqlite3_strnicmp(tls, _zName, str(49769), int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115653), unsafe.Pointer(&_sqlite3PragmaVtabRegisterØ00__func__Ø000), unsafe.Pointer(str(92539)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _pName = _pragmaLocate(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zName))+uintptr(int32(7)))))
+ if _pName == nil {
+ return nil
+ }
+ if (int32(_pName.XmPragFlg) & int32(48)) == int32(0) {
+ return nil
+ }
+ func() {
+ if _sqlite3HashFind(tls, &_db.XaModule, _zName) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115657), unsafe.Pointer(&_sqlite3PragmaVtabRegisterØ00__func__Ø000), unsafe.Pointer(str(92580)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ return _sqlite3VtabCreateModule(tls, _db, _zName, &_pragmaVtabModule, unsafe.Pointer(_pName), nil)
+}
+
+var _sqlite3PragmaVtabRegisterØ00__func__Ø000 [26]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_sqlite3PragmaVtabRegisterØ00__func__Ø000[0], str(92620), 26)
+}
+
+// C comment
+// /*
+// ** Locate a pragma in the aPragmaName[] array.
+// */
+func _pragmaLocate(tls *crt.TLS, _zName *int8) (r0 *XPragmaName) {
+ var _upr, _lwr, _mid, _rc int32
+ _mid = int32(0)
+ _lwr = int32(0)
+ _upr = int32(66)
+_0:
+ if _lwr > _upr {
+ goto _1
+ }
+ _mid = (_lwr + _upr) / int32(2)
+ _rc = Xsqlite3_stricmp(tls, _zName, elem95((*XPragmaName)(unsafe.Pointer(&_aPragmaName)), uintptr(_mid)).XzName)
+ if _rc == int32(0) {
+ goto _1
+ }
+ if _rc < int32(0) {
+ _upr = _mid - int32(1)
+ goto _4
+ }
+ _lwr = _mid + int32(1)
+_4:
+ goto _0
+_1:
+ return func() *XPragmaName {
+ if _lwr > _upr {
+ return nil
+ }
+ return elem95((*XPragmaName)(unsafe.Pointer(&_aPragmaName)), uintptr(_mid))
+ }()
+}
+
+var _aPragmaName [67]XPragmaName
+
+func init() {
+ _aPragmaName = [67]XPragmaName{XPragmaName{XzName: str(92646), XmPragFlg: uint8(20), XiArg: uint32(8)}, XPragmaName{XzName: str(92661), XePragTyp: uint8(1), XmPragFlg: uint8(149)}, XPragmaName{XzName: str(92673), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(1048576)}, XPragmaName{XzName: str(92689), XePragTyp: uint8(3), XmPragFlg: uint8(16), XiPragCName: uint8(46), XnPragCName: uint8(1)}, XPragmaName{XzName: str(92702), XePragTyp: uint8(4), XmPragFlg: uint8(149)}, XPragmaName{XzName: str(92713), XePragTyp: uint8(5), XmPragFlg: uint8(148)}, XPragmaName{XzName: str(92725), XePragTyp: uint8(6), XmPragFlg: uint8(2)}, XPragmaName{XzName: str(92745), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(536870912)}, XPragmaName{XzName: str(92761), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(16)}, XPragmaName{XzName: str(92782), XePragTyp: uint8(7), XmPragFlg: uint8(16), XiPragCName: uint8(29), XnPragCName: uint8(2)}, XPragmaName{XzName: str(92797), XePragTyp: uint8(8), XmPragFlg: uint8(16)}, XPragmaName{XzName: str(92813), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(128)}, XPragmaName{XzName: str(92827), XmPragFlg: uint8(24), XiArg: uint32(15)}, XPragmaName{XzName: str(92840), XePragTyp: uint8(10), XmPragFlg: uint8(17), XiPragCName: uint8(26), XnPragCName: uint8(3)}, XPragmaName{XzName: str(92854), XePragTyp: uint8(11), XmPragFlg: uint8(149), XnPragCName: uint8(1)}, XPragmaName{XzName: str(92873), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(33554432)}, XPragmaName{XzName: str(92892), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(256)}, XPragmaName{XzName: str(92915), XePragTyp: uint8(12), XmPragFlg: uint8(20)}, XPragmaName{XzName: str(92924), XePragTyp: uint8(13), XmPragFlg: uint8(1), XiPragCName: uint8(39), XnPragCName: uint8(4)}, XPragmaName{XzName: str(92942), XePragTyp: uint8(14), XmPragFlg: uint8(97), XiPragCName: uint8(31), XnPragCName: uint8(8)}, XPragmaName{XzName: str(92959), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(524288)}, XPragmaName{XzName: str(92972), XmPragFlg: uint8(24)}, XPragmaName{XzName: str(92987), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(4)}, XPragmaName{XzName: str(93005), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(8)}, XPragmaName{XzName: str(93015), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(8192)}, XPragmaName{XzName: str(93040), XePragTyp: uint8(15), XmPragFlg: uint8(3)}, XPragmaName{XzName: str(93059), XePragTyp: uint8(16), XmPragFlg: uint8(97), XiPragCName: uint8(12), XnPragCName: uint8(3)}, XPragmaName{XzName: str(93070), XePragTyp: uint8(17), XmPragFlg: uint8(97), XiPragCName: uint8(21), XnPragCName: uint8(5)}, XPragmaName{XzName: str(93081), XePragTyp: uint8(16), XmPragFlg: uint8(97), XiPragCName: uint8(15), XnPragCName: uint8(6), XiArg: uint32(1)}, XPragmaName{XzName: str(93093), XePragTyp: uint8(18), XmPragFlg: uint8(1)}, XPragmaName{XzName: str(93109), XePragTyp: uint8(19), XmPragFlg: uint8(145)}, XPragmaName{XzName: str(93122), XePragTyp: uint8(20), XmPragFlg: uint8(144)}, XPragmaName{XzName: str(93141), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(32768)}, XPragmaName{XzName: str(93160), XePragTyp: uint8(41), XmPragFlg: uint8(16), XiPragCName: uint8(47), XnPragCName: uint8(2)}, XPragmaName{XzName: str(93172), XePragTyp: uint8(22), XmPragFlg: uint8(144)}, XPragmaName{XzName: str(93185), XePragTyp: uint8(23), XmPragFlg: uint8(145)}, XPragmaName{XzName: str(93200), XePragTyp: uint8(24)}, XPragmaName{XzName: str(93210), XePragTyp: uint8(25), XmPragFlg: uint8(33)}, XPragmaName{XzName: str(93219), XePragTyp: uint8(23), XmPragFlg: uint8(145)}, XPragmaName{XzName: str(93230), XePragTyp: uint8(26), XmPragFlg: uint8(148)}, XPragmaName{XzName: str(93240), XePragTyp: uint8(42)}, XPragmaName{XzName: str(93253), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(67108864)}, XPragmaName{XzName: str(93264), XePragTyp: uint8(18), XmPragFlg: uint8(1)}, XPragmaName{XzName: str(93276), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(16384)}, XPragmaName{XzName: str(93293), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(262144)}, XPragmaName{XzName: str(93312), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(131072)}, XPragmaName{XzName: str(93338), XmPragFlg: uint8(20), XiArg: uint32(1)}, XPragmaName{XzName: str(93353), XePragTyp: uint8(27), XmPragFlg: uint8(16)}, XPragmaName{XzName: str(93367), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(64)}, XPragmaName{XzName: str(93386), XePragTyp: uint8(28), XmPragFlg: uint8(2)}, XPragmaName{XzName: str(93400), XePragTyp: uint8(29), XmPragFlg: uint8(16)}, XPragmaName{XzName: str(93416), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(512)}, XPragmaName{XzName: str(93426), XePragTyp: uint8(43), XmPragFlg: uint8(145), XiPragCName: uint8(7), XnPragCName: uint8(5)}, XPragmaName{XzName: str(93432), XePragTyp: uint8(30), XmPragFlg: uint8(149)}, XPragmaName{XzName: str(93444), XePragTyp: uint8(31), XmPragFlg: uint8(97), XiPragCName: uint8(1), XnPragCName: uint8(6)}, XPragmaName{XzName: str(93455), XePragTyp: uint8(32), XmPragFlg: uint8(20)}, XPragmaName{XzName: str(93466), XePragTyp: uint8(33), XmPragFlg: uint8(4)}, XPragmaName{XzName: str(93487), XePragTyp: uint8(34), XmPragFlg: uint8(16)}, XPragmaName{XzName: str(93495), XmPragFlg: uint8(20), XiArg: uint32(6)}, XPragmaName{XzName: str(93508), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(4096)}, XPragmaName{XzName: str(93524), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(1537)}, XPragmaName{XzName: str(93535), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(134217728)}, XPragmaName{XzName: str(93544), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(1024)}, XPragmaName{XzName: str(93557), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(1)}, XPragmaName{XzName: str(93568), XePragTyp: uint8(35)}, XPragmaName{XzName: str(93587), XePragTyp: uint8(36), XmPragFlg: uint8(1), XiPragCName: uint8(43), XnPragCName: uint8(3)}, XPragmaName{XzName: str(93602), XePragTyp: uint8(2), XmPragFlg: uint8(20), XiArg: uint32(67584)}}
+}
+
+// C comment
+// /* The pragma virtual table object */
+var _pragmaVtabModule Xsqlite3_module
+
+func init() {
+ _pragmaVtabModule = Xsqlite3_module{XxConnect: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32
+ }{_pragmaVtabConnect})), XxBestIndex: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3_vtab, *Xsqlite3_index_info) int32
+ }{_pragmaVtabBestIndex})), XxDisconnect: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3_vtab) int32
+ }{_pragmaVtabDisconnect})), XxOpen: *(*func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3_vtab, **Xsqlite3_vtab_cursor) int32
+ }{_pragmaVtabOpen})), XxClose: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3_vtab_cursor) int32
+ }{_pragmaVtabClose})), XxFilter: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3_vtab_cursor, int32, *int8, int32, **XMem) int32
+ }{_pragmaVtabFilter})), XxNext: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3_vtab_cursor) int32
+ }{_pragmaVtabNext})), XxEof: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3_vtab_cursor) int32
+ }{_pragmaVtabEof})), XxColumn: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3_vtab_cursor, *Xsqlite3_context, int32) int32
+ }{_pragmaVtabColumn})), XxRowid: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
+ f func(*crt.TLS, *Xsqlite3_vtab_cursor, *int64) int32
+ }{_pragmaVtabRowid}))}
+}
+
+// C comment
+// /*
+// ** Pragma virtual table module xConnect method.
+// */
+func _pragmaVtabConnect(tls *crt.TLS, _db *Xsqlite3, _pAux unsafe.Pointer, _argc int32, _argv **int8, _ppVtab **Xsqlite3_vtab, _pzErr **int8) (r0 int32) {
+ var _rc, _i, _j int32
+ var _cSep int8
+ var _acc XStrAccum
+ var _zBuf [200]int8
+ var _pPragma *XPragmaName
+ var _pTab *XPragmaVtab
+ _pPragma = (*XPragmaName)(_pAux)
+ _pTab = nil
+ _cSep = int8(40)
+
+ _sqlite3StrAccumInit(tls, &_acc, nil, (*int8)(unsafe.Pointer(&_zBuf)), int32(200), int32(0))
+ _sqlite3StrAccumAppendAll(tls, &_acc, str(93618))
+ *func() *int32 { _i = int32(0); return &_j }() = int32(_pPragma.XiPragCName)
+_0:
+ if _i >= int32(_pPragma.XnPragCName) {
+ goto _3
+ }
+ _sqlite3XPrintf(tls, &_acc, str(93633), int32(_cSep), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_pragCName)), uintptr(_j))))
+ _cSep = int8(44)
+ *func() *int32 { _i += 1; return &_j }() += 1
+ goto _0
+_3:
+ if _i == int32(0) {
+ _sqlite3XPrintf(tls, &_acc, str(93640), unsafe.Pointer(_pPragma.XzName))
+ _cSep = int8(44)
+ _i += 1
+ }
+ _j = int32(0)
+ if (int32(_pPragma.XmPragFlg) & int32(32)) != 0 {
+ _sqlite3StrAccumAppendAll(tls, &_acc, str(93646))
+ _j += 1
+ }
+ if (int32(_pPragma.XmPragFlg) & int32(192)) != 0 {
+ _sqlite3StrAccumAppendAll(tls, &_acc, str(93658))
+ _j += 1
+ }
+ _sqlite3StrAccumAppend(tls, &_acc, str(37853), int32(1))
+ _sqlite3StrAccumFinish(tls, &_acc)
+ func() {
+ if crt.Xstrlen(tls, (*int8)(unsafe.Pointer(&_zBuf))) >= uint32(199) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115419), unsafe.Pointer(&_pragmaVtabConnectØ00__func__Ø000), unsafe.Pointer(str(93673)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _rc = Xsqlite3_declare_vtab(tls, _db, (*int8)(unsafe.Pointer(&_zBuf)))
+ if _rc != int32(0) {
+ goto _9
+ }
+ _pTab = (*XPragmaVtab)(Xsqlite3_malloc(tls, int32(24)))
+ if _pTab == nil {
+ _rc = int32(7)
+ goto _11
+ }
+ crt.Xmemset(tls, unsafe.Pointer(_pTab), int32(0), uint32(24))
+ *(**XPragmaName)(unsafe.Pointer(&_pTab.XpName)) = _pPragma
+ *(**Xsqlite3)(unsafe.Pointer(&_pTab.Xdb)) = _db
+ _pTab.XiHidden = uint8(_i)
+ _pTab.XnHidden = uint8(_j)
+_11:
+ goto _12
+_9:
+ *_pzErr = Xsqlite3_mprintf(tls, str(24531), unsafe.Pointer(Xsqlite3_errmsg(tls, _db)))
+_12:
+ *_ppVtab = (*Xsqlite3_vtab)(unsafe.Pointer(_pTab))
+ return _rc
+
+ _ = _zBuf
+ panic(0)
+}
+
+// C comment
+// /*
+// ** Append the complete text of zero-terminated string z[] to the p string.
+// */
+func _sqlite3StrAccumAppendAll(tls *crt.TLS, _p *XStrAccum, _z *int8) {
+ _sqlite3StrAccumAppend(tls, _p, _z, _sqlite3Strlen30(tls, _z))
+}
+
+// C comment
+// /* Names of columns for pragmas that return multi-column result
+// ** or that return single-column results where the name of the
+// ** result column is different from the name of the pragma
+// */
+var _pragCName [49]*int8
+
+func init() {
+ _pragCName = [49]*int8{str(92702), str(93703), str(93707), str(93712), str(93717), str(93725), str(93736), str(93739), str(93743), str(93747), str(93752), str(93757), str(93762), str(93703), str(93707), str(93762), str(93703), str(93707), str(93768), str(93773), str(93778), str(93782), str(93707), str(93786), str(93793), str(93800), str(93782), str(93707), str(93808), str(93782), str(93707), str(93813), str(93782), str(93816), str(26325), str(93822), str(93825), str(93835), str(93845), str(93816), str(27182), str(93851), str(93858), str(93863), str(93868), str(93872), str(93885), str(93893), str(93902)}
+}
+
+var _pragmaVtabConnectØ00__func__Ø000 [18]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_pragmaVtabConnectØ00__func__Ø000[0], str(93909), 18)
+}
+
+// C comment
+// /* Figure out the best index to use to search a pragma virtual table.
+// **
+// ** There are not really any index choices. But we want to encourage the
+// ** query planner to give == constraints on as many hidden parameters as
+// ** possible, and especially on the first hidden parameter. So return a
+// ** high cost if hidden parameters are unconstrained.
+// */
+func _pragmaVtabBestIndex(tls *crt.TLS, _tab *Xsqlite3_vtab, _pIdxInfo *Xsqlite3_index_info) (r0 int32) {
+ var _i, _j int32
+ var _seen [2]int32
+ var _pTab *XPragmaVtab
+ var _pConstraint *Tsqlite3_index_constraint
+ _pTab = (*XPragmaVtab)(unsafe.Pointer(_tab))
+ _pIdxInfo.XestimatedCost = float64(1)
+ if int32(_pTab.XnHidden) == int32(0) {
+ return int32(0)
+ }
+ _pConstraint = (*Tsqlite3_index_constraint)(_pIdxInfo.XaConstraint)
+ *elem8((*int32)(unsafe.Pointer(&_seen)), 0) = int32(0)
+ *elem8((*int32)(unsafe.Pointer(&_seen)), uintptr(1)) = int32(0)
+ _i = int32(0)
+_1:
+ if _i >= _pIdxInfo.XnConstraint {
+ goto _4
+ }
+ if int32(_pConstraint.Xusable) == int32(0) {
+ goto _2
+ }
+ if int32(_pConstraint.Xop) != int32(2) {
+ goto _2
+ }
+ if _pConstraint.XiColumn < int32(_pTab.XiHidden) {
+ goto _2
+ }
+ _j = _pConstraint.XiColumn - int32(_pTab.XiHidden)
+ func() {
+ if _j >= int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115472), unsafe.Pointer(&_pragmaVtabBestIndexØ00__func__Ø000), unsafe.Pointer(str(93927)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ *elem8((*int32)(unsafe.Pointer(&_seen)), uintptr(_j)) = _i + int32(1)
+_2:
+ *(*uintptr)(unsafe.Pointer(func() **Tsqlite3_index_constraint { _i += 1; return &_pConstraint }())) += uintptr(12)
+ goto _1
+_4:
+ if (*elem8((*int32)(unsafe.Pointer(&_seen)), 0)) == int32(0) {
+ _pIdxInfo.XestimatedCost = 2.147483647e+09
+ _pIdxInfo.XestimatedRows = int64(2147483647)
+ return int32(0)
+ }
+ _j = (*elem8((*int32)(unsafe.Pointer(&_seen)), 0)) - int32(1)
+ elem96((*Tsqlite3_index_constraint_usage)(_pIdxInfo.XaConstraintUsage), uintptr(_j)).XargvIndex = int32(1)
+ elem96((*Tsqlite3_index_constraint_usage)(_pIdxInfo.XaConstraintUsage), uintptr(_j)).Xomit = uint8(1)
+ if (*elem8((*int32)(unsafe.Pointer(&_seen)), uintptr(1))) == int32(0) {
+ return int32(0)
+ }
+ _pIdxInfo.XestimatedCost = float64(20)
+ _pIdxInfo.XestimatedRows = int64(20)
+ _j = (*elem8((*int32)(unsafe.Pointer(&_seen)), uintptr(1))) - int32(1)
+ elem96((*Tsqlite3_index_constraint_usage)(_pIdxInfo.XaConstraintUsage), uintptr(_j)).XargvIndex = int32(2)
+ elem96((*Tsqlite3_index_constraint_usage)(_pIdxInfo.XaConstraintUsage), uintptr(_j)).Xomit = uint8(1)
+ return int32(0)
+
+ _ = _seen
+ panic(0)
+}
+
+var _pragmaVtabBestIndexØ00__func__Ø000 [20]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_pragmaVtabBestIndexØ00__func__Ø000[0], str(93933), 20)
+}
+
+// C comment
+// /*
+// ** Pragma virtual table module xDisconnect method.
+// */
+func _pragmaVtabDisconnect(tls *crt.TLS, _pVtab *Xsqlite3_vtab) (r0 int32) {
+ var _pTab *XPragmaVtab
+ _pTab = (*XPragmaVtab)(unsafe.Pointer(_pVtab))
+ Xsqlite3_free(tls, unsafe.Pointer(_pTab))
+ return int32(0)
+}
+
+// C comment
+// /* Create a new cursor for the pragma virtual table */
+func _pragmaVtabOpen(tls *crt.TLS, _pVtab *Xsqlite3_vtab, _ppCursor **Xsqlite3_vtab_cursor) (r0 int32) {
+ var _pCsr *XPragmaVtabCursor
+ _pCsr = (*XPragmaVtabCursor)(Xsqlite3_malloc(tls, int32(24)))
+ if _pCsr == nil {
+ return int32(7)
+ }
+ crt.Xmemset(tls, unsafe.Pointer(_pCsr), int32(0), uint32(24))
+ *(**Xsqlite3_vtab)(unsafe.Pointer(&(_pCsr.Xbase.XpVtab))) = _pVtab
+ *_ppCursor = &_pCsr.Xbase
+ return int32(0)
+}
+
+// C comment
+// /* Close a pragma virtual table cursor */
+func _pragmaVtabClose(tls *crt.TLS, _cur *Xsqlite3_vtab_cursor) (r0 int32) {
+ var _pCsr *XPragmaVtabCursor
+ _pCsr = (*XPragmaVtabCursor)(unsafe.Pointer(_cur))
+ _pragmaVtabCursorClear(tls, _pCsr)
+ Xsqlite3_free(tls, unsafe.Pointer(_pCsr))
+ return int32(0)
+}
+
+// C comment
+// /* Clear all content from pragma virtual table cursor. */
+func _pragmaVtabCursorClear(tls *crt.TLS, _pCsr *XPragmaVtabCursor) {
+ var _i int32
+ Xsqlite3_finalize(tls, _pCsr.XpPragma)
+ _pCsr.XpPragma = nil
+ _i = int32(0)
+_0:
+ if _i >= int32(2) {
+ goto _3
+ }
+ Xsqlite3_free(tls, unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_pCsr.XazArg)), uintptr(_i))))
+ *elem0((**int8)(unsafe.Pointer(&_pCsr.XazArg)), uintptr(_i)) = nil
+ _i += 1
+ goto _0
+_3:
+}
+
+// C comment
+// /*
+// ** Pragma virtual table module xFilter method.
+// */
+func _pragmaVtabFilter(tls *crt.TLS, _pVtabCursor *Xsqlite3_vtab_cursor, _idxNum int32, _idxStr *int8, _argc int32, _argv **XMem) (r0 int32) {
+ var _rc, _i, _j int32
+ var _zSql *int8
+ var _acc XStrAccum
+ var _pTab *XPragmaVtab
+ var _pCsr *XPragmaVtabCursor
+ _pCsr = (*XPragmaVtabCursor)(unsafe.Pointer(_pVtabCursor))
+ _pTab = (*XPragmaVtab)(unsafe.Pointer((*Xsqlite3_vtab)(_pVtabCursor.XpVtab)))
+
+ _pragmaVtabCursorClear(tls, _pCsr)
+ _j = func() int32 {
+ if (int32((*XPragmaName)(_pTab.XpName).XmPragFlg) & int32(32)) != int32(0) {
+ return int32(0)
+ }
+ return int32(1)
+ }()
+ _i = int32(0)
+_2:
+ if _i >= _argc {
+ goto _5
+ }
+ func() {
+ if _j >= int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115558), unsafe.Pointer(&_pragmaVtabFilterØ00__func__Ø000), unsafe.Pointer(str(93953)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ *elem0((**int8)(unsafe.Pointer(&_pCsr.XazArg)), uintptr(_j)) = Xsqlite3_mprintf(tls, str(24531), unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, uintptr(_i)))))
+ if (*elem0((**int8)(unsafe.Pointer(&_pCsr.XazArg)), uintptr(_j))) == nil {
+ return int32(7)
+ }
+ *func() *int32 { _i += 1; return &_j }() += 1
+ goto _2
+_5:
+ _sqlite3StrAccumInit(tls, &_acc, nil, nil, int32(0), *elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_pTab.Xdb).XaLimit))), uintptr(1)))
+ _sqlite3StrAccumAppendAll(tls, &_acc, str(93978))
+ if (*elem0((**int8)(unsafe.Pointer(&_pCsr.XazArg)), uintptr(1))) != nil {
+ _sqlite3XPrintf(tls, &_acc, str(93986), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_pCsr.XazArg)), uintptr(1))))
+ }
+ _sqlite3StrAccumAppendAll(tls, &_acc, (*XPragmaName)(_pTab.XpName).XzName)
+ if (*elem0((**int8)(unsafe.Pointer(&_pCsr.XazArg)), 0)) != nil {
+ _sqlite3XPrintf(tls, &_acc, str(93990), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_pCsr.XazArg)), 0)))
+ }
+ _zSql = _sqlite3StrAccumFinish(tls, &_acc)
+ if _zSql == nil {
+ return int32(7)
+ }
+ _rc = Xsqlite3_prepare_v2(tls, (*Xsqlite3)(_pTab.Xdb), _zSql, int32(-1), &_pCsr.XpPragma, nil)
+ Xsqlite3_free(tls, unsafe.Pointer(_zSql))
+ if _rc != int32(0) {
+ _pTab.Xbase.XzErrMsg = Xsqlite3_mprintf(tls, str(24531), unsafe.Pointer(Xsqlite3_errmsg(tls, (*Xsqlite3)(_pTab.Xdb))))
+ return _rc
+ }
+ return _pragmaVtabNext(tls, _pVtabCursor)
+}
+
+var _pragmaVtabFilterØ00__func__Ø000 [17]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_pragmaVtabFilterØ00__func__Ø000[0], str(93994), 17)
+}
+
+// C comment
+// /* Advance the pragma virtual table cursor to the next row */
+func _pragmaVtabNext(tls *crt.TLS, _pVtabCursor *Xsqlite3_vtab_cursor) (r0 int32) {
+ var _rc int32
+ var _pCsr *XPragmaVtabCursor
+ _pCsr = (*XPragmaVtabCursor)(unsafe.Pointer(_pVtabCursor))
+ _rc = int32(0)
+ _pCsr.XiRowid += 1
+ func() {
+ if _pCsr.XpPragma == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115529), unsafe.Pointer(&_pragmaVtabNextØ00__func__Ø000), unsafe.Pointer(str(94011)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ if int32(100) != Xsqlite3_step(tls, _pCsr.XpPragma) {
+ _rc = Xsqlite3_finalize(tls, _pCsr.XpPragma)
+ _pCsr.XpPragma = nil
+ _pragmaVtabCursorClear(tls, _pCsr)
+ }
+ return _rc
+}
+
+var _pragmaVtabNextØ00__func__Ø000 [15]int8
+
+func init() {
+ crt.Xstrncpy(nil, &_pragmaVtabNextØ00__func__Ø000[0], str(94025), 15)
}
-// Pragma virtual table module xEof method.
-func _pragmaVtabEof(tls *crt.TLS, _pVtabCursor *Xsqlite3_file) (r0 int32) {
+// C comment
+// /*
+// ** Pragma virtual table module xEof method.
+// */
+func _pragmaVtabEof(tls *crt.TLS, _pVtabCursor *Xsqlite3_vtab_cursor) (r0 int32) {
var _pCsr *XPragmaVtabCursor
_pCsr = (*XPragmaVtabCursor)(unsafe.Pointer(_pVtabCursor))
- return bool2int(_pCsr.X1 == nil)
+ return bool2int(_pCsr.XpPragma == nil)
}
-// The xColumn method simply returns the corresponding column from
-// the PRAGMA.
-func _pragmaVtabColumn(tls *crt.TLS, _pVtabCursor *Xsqlite3_file, _ctx *Xsqlite3_context, _i int32) (r0 int32) {
+// C comment
+// /* The xColumn method simply returns the corresponding column from
+// ** the PRAGMA.
+// */
+func _pragmaVtabColumn(tls *crt.TLS, _pVtabCursor *Xsqlite3_vtab_cursor, _ctx *Xsqlite3_context, _i int32) (r0 int32) {
var _pTab *XPragmaVtab
var _pCsr *XPragmaVtabCursor
_pCsr = (*XPragmaVtabCursor)(unsafe.Pointer(_pVtabCursor))
- _pTab = (*XPragmaVtab)(unsafe.Pointer((*Xsqlite3_vtab)(_pVtabCursor.X0)))
- if _i < int32(_pTab.X4) {
- Xsqlite3_result_value(tls, _ctx, Xsqlite3_column_value(tls, _pCsr.X1, _i))
+ _pTab = (*XPragmaVtab)(unsafe.Pointer((*Xsqlite3_vtab)(_pVtabCursor.XpVtab)))
+ if _i < int32(_pTab.XiHidden) {
+ Xsqlite3_result_value(tls, _ctx, Xsqlite3_column_value(tls, _pCsr.XpPragma, _i))
goto _1
}
- Xsqlite3_result_text(tls, _ctx, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]*int8)(unsafe.Pointer(&(_pCsr.X3))))) + 4*uintptr(_i-int32(_pTab.X4)))), i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ Xsqlite3_result_text(tls, _ctx, *elem0((**int8)(unsafe.Pointer(&_pCsr.XazArg)), uintptr(_i-int32(_pTab.XiHidden))), int32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
_1:
- return i32(0)
+ return int32(0)
}
-// SQLITE_OMIT_UTF16
+// C comment
+// /* SQLITE_OMIT_UTF16 */
func Xsqlite3_result_value(tls *crt.TLS, _pCtx *Xsqlite3_context, _pValue *XMem) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76537), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_valueØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76537), unsafe.Pointer(&_sqlite3_result_valueØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemCopy(tls, (*XMem)(_pCtx.X0), _pValue)
+ _sqlite3VdbeMemCopy(tls, (*XMem)(_pCtx.XpOut), _pValue)
}
var _sqlite3_result_valueØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_valueØ00__func__Ø000[0], str(94012), 21)
+ crt.Xstrncpy(nil, &_sqlite3_result_valueØ00__func__Ø000[0], str(94040), 21)
}
-// Pragma virtual table module xRowid method.
-func _pragmaVtabRowid(tls *crt.TLS, _pVtabCursor *Xsqlite3_file, _p *int64) (r0 int32) {
+// C comment
+// /*
+// ** Pragma virtual table module xRowid method.
+// */
+func _pragmaVtabRowid(tls *crt.TLS, _pVtabCursor *Xsqlite3_vtab_cursor, _p *int64) (r0 int32) {
var _pCsr *XPragmaVtabCursor
_pCsr = (*XPragmaVtabCursor)(unsafe.Pointer(_pVtabCursor))
- *_p = _pCsr.X2
- return i32(0)
-}
-
-// Check to see if virtual table module pMod can be have an eponymous
-// virtual table instance. If it can, create one if one does not already
-// exist. Return non-zero if the eponymous virtual table instance exists
-// when this routine returns, and return zero if it does not exist.
-//
-// An eponymous virtual table instance is one that is named after its
-// module, and more importantly, does not require a CREATE VIRTUAL TABLE
-// statement in order to come into existance. Eponymous virtual table
-// instances always exist. They cannot be DROP-ed.
-//
-// Any virtual table module for which xConnect and xCreate are the same
-// method can have an eponymous virtual table instance.
+ *_p = _pCsr.XiRowid
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Check to see if virtual table module pMod can be have an eponymous
+// ** virtual table instance. If it can, create one if one does not already
+// ** exist. Return non-zero if the eponymous virtual table instance exists
+// ** when this routine returns, and return zero if it does not exist.
+// **
+// ** An eponymous virtual table instance is one that is named after its
+// ** module, and more importantly, does not require a CREATE VIRTUAL TABLE
+// ** statement in order to come into existance. Eponymous virtual table
+// ** instances always exist. They cannot be DROP-ed.
+// **
+// ** Any virtual table module for which xConnect and xCreate are the same
+// ** method can have an eponymous virtual table instance.
+// */
func _sqlite3VtabEponymousTableInit(tls *crt.TLS, _pParse *XParse, _pMod *XModule) (r0 int32) {
var _rc int32
var _zErr *int8
var _db *Xsqlite3
var _pTab *XTable
var _pModule *Xsqlite3_module
- _pModule = (*Xsqlite3_module)(_pMod.X0)
+ _pModule = (*Xsqlite3_module)(_pMod.XpModule)
_zErr = nil
- _db = (*Xsqlite3)(_pParse.X0)
- if (*XTable)(_pMod.X4) != nil {
- return i32(1)
- }
- if (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32
- }{(*(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
- }{(_pModule.X1)})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32
- }{nil}))) && (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pMod.XpEpoTab != nil {
+ return int32(1)
+ }
+ if (func() func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32 {
+ v := _pModule.XxCreate
+ return *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&v))
+ }() != nil) && (*(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32
- }{(*(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
- }{(_pModule.X1)})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{func() func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32 {
+ v := _pModule.XxCreate
+ return *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&v))
+ }()})) != *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32
- }{(*(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
- }{(_pModule.X2)})))}))) {
- return i32(0)
+ }{func() func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32 {
+ v := _pModule.XxConnect
+ return *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&v))
+ }()}))) {
+ return int32(0)
}
- _pTab = (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(u32(80))))
+ _pTab = (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(80)))
if _pTab == nil {
- return i32(0)
+ return int32(0)
}
- *(**int8)(unsafe.Pointer(&(_pTab.X0))) = _sqlite3DbStrDup(tls, _db, _pMod.X1)
- if (_pTab.X0) == nil {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pTab))
- return i32(0)
+ _pTab.XzName = _sqlite3DbStrDup(tls, _db, _pMod.XzName)
+ if _pTab.XzName == nil {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pTab))
+ return int32(0)
}
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMod.X4))))) = _pTab
- *(*uint32)(unsafe.Pointer(&(_pTab.X8))) = uint32(i32(1))
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X20))))) = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X4)
+ *(**XTable)(unsafe.Pointer(&_pMod.XpEpoTab)) = _pTab
+ _pTab.XnTabRef = uint32(1)
+ *(**XSchema)(unsafe.Pointer(&_pTab.XpSchema)) = (*XSchema)(elem27((*XDb)(_db.XaDb), 0).XpSchema)
func() {
- if (_pTab.X16) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126139), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabEponymousTableInitØ00__func__Ø000))), unsafe.Pointer(str(94033)))
+ if _pTab.XnModuleArg != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126139), unsafe.Pointer(&_sqlite3VtabEponymousTableInitØ00__func__Ø000), unsafe.Pointer(str(94061)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_pTab.X10))) = int16(i32(-1))
- _addModuleArgument(tls, _db, _pTab, _sqlite3DbStrDup(tls, _db, _pTab.X0))
+ _pTab.XiPKey = int16(-1)
+ _addModuleArgument(tls, _db, _pTab, _sqlite3DbStrDup(tls, _db, _pTab.XzName))
_addModuleArgument(tls, _db, _pTab, nil)
- _addModuleArgument(tls, _db, _pTab, _sqlite3DbStrDup(tls, _db, _pTab.X0))
- _rc = _vtabCallConstructor(tls, _db, _pTab, _pMod, *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
- }{(_pModule.X2)})), &_zErr)
+ _addModuleArgument(tls, _db, _pTab, _sqlite3DbStrDup(tls, _db, _pTab.XzName))
+ _rc = _vtabCallConstructor(tls, _db, _pTab, _pMod, func() func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32 {
+ v := _pModule.XxConnect
+ return *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&v))
+ }(), &_zErr)
if _rc != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(24576), unsafe.Pointer(_zErr))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErr))
+ _sqlite3ErrorMsg(tls, _pParse, str(24531), unsafe.Pointer(_zErr))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErr))
_sqlite3VtabEponymousTableClear(tls, _db, _pMod)
- return i32(0)
+ return int32(0)
}
- return i32(1)
+ return int32(1)
}
var _sqlite3VtabEponymousTableInitØ00__func__Ø000 [30]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabEponymousTableInitØ00__func__Ø000[0], str(94053), 30)
+ crt.Xstrncpy(nil, &_sqlite3VtabEponymousTableInitØ00__func__Ø000[0], str(94081), 30)
}
-// Add a new module argument to pTable->azModuleArg[].
-// The string is not copied - the pointer is stored. The
-// string will be freed automatically when the table is
-// deleted.
+// C comment
+// /*
+// ** Add a new module argument to pTable->azModuleArg[].
+// ** The string is not copied - the pointer is stored. The
+// ** string will be freed automatically when the table is
+// ** deleted.
+// */
func _addModuleArgument(tls *crt.TLS, _db *Xsqlite3, _pTable *XTable, _zArg *int8) {
var _nBytes, _2_i int32
var _azModuleArg **int8
- _nBytes = int32(u32(4) * uint32(i32(2)+(_pTable.X16)))
- _azModuleArg = (**int8)(_sqlite3DbRealloc(tls, _db, (unsafe.Pointer)(_pTable.X17), uint64(_nBytes)))
+ _nBytes = int32(uint32(4) * uint32(int32(2)+_pTable.XnModuleArg))
+ _azModuleArg = (**int8)(_sqlite3DbRealloc(tls, _db, unsafe.Pointer(_pTable.XazModuleArg), uint64(_nBytes)))
if _azModuleArg == nil {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zArg))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zArg))
goto _1
}
- _2_i = postInc1((*int32)(unsafe.Pointer(&(_pTable.X16))), int32(1))
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azModuleArg)) + 4*uintptr(_2_i))) = _zArg
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azModuleArg)) + 4*uintptr(_2_i+i32(1)))) = nil
- *(***int8)(unsafe.Pointer(&(_pTable.X17))) = _azModuleArg
+ _2_i = postInc2(&_pTable.XnModuleArg, 1)
+ *elem0(_azModuleArg, uintptr(_2_i)) = _zArg
+ *elem0(_azModuleArg, uintptr(_2_i+int32(1))) = nil
+ _pTable.XazModuleArg = _azModuleArg
_1:
}
-// The Table structure pTable is really a VIEW. Fill in the names of
-// the columns of the view in the pTable structure. Return the number
-// of errors. If an error is seen leave an error message in pParse->zErrMsg.
+// C comment
+// /*
+// ** The Table structure pTable is really a VIEW. Fill in the names of
+// ** the columns of the view in the pTable structure. Return the number
+// ** of errors. If an error is seen leave an error message in pParse->zErrMsg.
+// */
func _sqlite3ViewGetColumnNames(tls *crt.TLS, _pParse *XParse, _pTable *XTable) (r0 int32) {
var _nErr, _n int32
var _xAuth func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32
var _db *Xsqlite3
var _pSelTab *XTable
var _pSel *XSelect
- _nErr = i32(0)
- _db = (*Xsqlite3)(_pParse.X0)
+ _nErr = int32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _pTable == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101853), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(94083)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101853), unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000), unsafe.Pointer(str(94111)))
crt.X__builtin_abort(tls)
}
}()
if _sqlite3VtabCallConnect(tls, _pParse, _pTable) != 0 {
- return i32(1)
+ return int32(1)
}
- if (_pTable.X16) != 0 {
- return i32(0)
+ if _pTable.XnModuleArg != 0 {
+ return int32(0)
}
- if int32(_pTable.X11) > i32(0) {
- return i32(0)
+ if int32(_pTable.XnCol) > int32(0) {
+ return int32(0)
}
- if int32(_pTable.X11) < i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(94090), unsafe.Pointer(_pTable.X0))
- return i32(1)
+ if int32(_pTable.XnCol) < int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(94118), unsafe.Pointer(_pTable.XzName))
+ return int32(1)
}
func() {
- if int32(_pTable.X11) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101887), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(94120)))
+ if int32(_pTable.XnCol) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101887), unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000), unsafe.Pointer(str(94148)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(_pTable.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101896), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(94136)))
+ if _pTable.XpSelect == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101896), unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000), unsafe.Pointer(str(94164)))
crt.X__builtin_abort(tls)
}
}()
- _pSel = _sqlite3SelectDup(tls, _db, (*XSelect)(_pTable.X3), i32(0))
+ _pSel = _sqlite3SelectDup(tls, _db, (*XSelect)(_pTable.XpSelect), int32(0))
if _pSel == nil {
goto _10
}
- _n = _pParse.X17
- _sqlite3SrcListAssignCursors(tls, _pParse, (*XSrcList)(_pSel.X8))
- *(*int16)(unsafe.Pointer(&(_pTable.X11))) = int16(i32(-1))
- *(*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X0))) += 1
- _xAuth = _db.X59
- *(*func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32)(unsafe.Pointer(&(_db.X59))) = nil
+ _n = _pParse.XnTab
+ _sqlite3SrcListAssignCursors(tls, _pParse, (*XSrcList)(_pSel.XpSrc))
+ _pTable.XnCol = int16(-1)
+ _db.Xlookaside.XbDisable += 1
+ _xAuth = _db.XxAuth
+ _db.XxAuth = nil
_pSelTab = _sqlite3ResultSetOfSelect(tls, _pParse, _pSel)
- *(*func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32)(unsafe.Pointer(&(_db.X59))) = _xAuth
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) = _n
- if (*XExprList)(_pTable.X6) == nil {
+ _db.XxAuth = _xAuth
+ _pParse.XnTab = _n
+ if _pTable.XpCheck == nil {
goto _11
}
- _sqlite3ColumnsFromExprList(tls, _pParse, (*XExprList)(_pTable.X6), (*int16)(unsafe.Pointer(&(_pTable.X11))), (**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTable.X1))))))
- if ((int32(_db.X17) == i32(0)) && ((_pParse.X16) == i32(0))) && (int32(_pTable.X11) == ((*XExprList)(_pSel.X0).X0)) {
+ _sqlite3ColumnsFromExprList(tls, _pParse, (*XExprList)(_pTable.XpCheck), &_pTable.XnCol, (**XColumn)(unsafe.Pointer(&_pTable.XaCol)))
+ if ((int32(_db.XmallocFailed) == int32(0)) && (_pParse.XnErr == int32(0))) && (int32(_pTable.XnCol) == ((*XExprList)(_pSel.XpEList).XnExpr)) {
_sqlite3SelectAddColumnTypeAndCollation(tls, _pParse, _pTable, _pSel)
}
goto _21
_11:
if _pSelTab != nil {
func() {
- if (*XColumn)(_pTable.X1) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101931), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(94152)))
+ if (*XColumn)(_pTable.XaCol) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101931), unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000), unsafe.Pointer(str(94180)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_pTable.X11))) = _pSelTab.X11
- *(**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTable.X1))))) = (*XColumn)(_pSelTab.X1)
- *(*int16)(unsafe.Pointer(&(_pSelTab.X11))) = int16(i32(0))
- *(**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSelTab.X1))))) = nil
+ _pTable.XnCol = _pSelTab.XnCol
+ *(**XColumn)(unsafe.Pointer(&_pTable.XaCol)) = (*XColumn)(_pSelTab.XaCol)
+ _pSelTab.XnCol = 0
+ *(**XColumn)(unsafe.Pointer(&_pSelTab.XaCol)) = nil
func() {
- if _sqlite3SchemaMutexHeld(tls, _db, i32(0), (*XSchema)(_pTable.X20)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101936), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(94168)))
+ if _sqlite3SchemaMutexHeld(tls, _db, int32(0), (*XSchema)(_pTable.XpSchema)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101936), unsafe.Pointer(&_sqlite3ViewGetColumnNamesØ00__func__Ø000), unsafe.Pointer(str(94196)))
crt.X__builtin_abort(tls)
}
}()
goto _21
}
- *(*int16)(unsafe.Pointer(&(_pTable.X11))) = int16(i32(0))
+ _pTable.XnCol = 0
_nErr += 1
_21:
_sqlite3DeleteTable(tls, _db, _pSelTab)
_sqlite3SelectDelete(tls, _db, _pSel)
- *(*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X0))) -= 1
+ _db.Xlookaside.XbDisable -= 1
goto _22
_10:
_nErr += 1
_22:
{
- p := (*uint16)(unsafe.Pointer(&((*XSchema)(_pTable.X20).X9)))
- *p = uint16(int32(*p) | i32(2))
- sink14(*p)
+ p := &((*XSchema)(_pTable.XpSchema).XschemaFlags)
+ *p = uint16(int32(*p) | int32(2))
}
return _nErr
}
@@ -72181,45 +73280,49 @@ _22:
var _sqlite3ViewGetColumnNamesØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ViewGetColumnNamesØ00__func__Ø000[0], str(94215), 26)
+ crt.Xstrncpy(nil, &_sqlite3ViewGetColumnNamesØ00__func__Ø000[0], str(94243), 26)
}
-// This function is invoked by the parser to call the xConnect() method
-// of the virtual table pTab. If an error occurs, an error code is returned
-// and an error left in pParse.
-//
-// This call is a no-op if table pTab is not a virtual table.
+// C comment
+// /*
+// ** This function is invoked by the parser to call the xConnect() method
+// ** of the virtual table pTab. If an error occurs, an error code is returned
+// ** and an error left in pParse.
+// **
+// ** This call is a no-op if table pTab is not a virtual table.
+// */
func _sqlite3VtabCallConnect(tls *crt.TLS, _pParse *XParse, _pTab *XTable) (r0 int32) {
var _rc int32
var _zMod, _2_zModule, _3_zErr *int8
var _db *Xsqlite3
var _pMod *XModule
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125616), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabCallConnectØ00__func__Ø000))), unsafe.Pointer(str(94241)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125616), unsafe.Pointer(&_sqlite3VtabCallConnectØ00__func__Ø000), unsafe.Pointer(str(94269)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pTab.X16) == 0) || (_sqlite3GetVTable(tls, _db, _pTab) != nil) {
- return i32(0)
+ if (_pTab.XnModuleArg == 0) || (_sqlite3GetVTable(tls, _db, _pTab) != nil) {
+ return int32(0)
}
- _zMod = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTab.X17)) + 4*uintptr(i32(0))))
- _pMod = (*XModule)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&(_db.X65))), _zMod))
+ _zMod = *elem0(_pTab.XazModuleArg, 0)
+ _pMod = (*XModule)(_sqlite3HashFind(tls, &_db.XaModule, _zMod))
if _pMod == nil {
- _2_zModule = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTab.X17)) + 4*uintptr(i32(0))))
- _sqlite3ErrorMsg(tls, _pParse, str(93150), unsafe.Pointer(_2_zModule))
- _rc = i32(1)
+ _2_zModule = *elem0(_pTab.XazModuleArg, 0)
+ _sqlite3ErrorMsg(tls, _pParse, str(91672), unsafe.Pointer(_2_zModule))
+ _rc = int32(1)
goto _5
}
_3_zErr = nil
- _rc = _vtabCallConstructor(tls, _db, _pTab, _pMod, *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
- }{((*Xsqlite3_module)(_pMod.X0).X2)})), &_3_zErr)
- if _rc != i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(24576), unsafe.Pointer(_3_zErr))
- }
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_3_zErr))
+ _rc = _vtabCallConstructor(tls, _db, _pTab, _pMod, func() func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32 {
+ v := (*Xsqlite3_module)(_pMod.XpModule).XxConnect
+ return *(*func(*crt.TLS, *Xsqlite3, unsafe.Pointer, int32, **int8, **Xsqlite3_vtab, **int8) int32)(unsafe.Pointer(&v))
+ }(), &_3_zErr)
+ if _rc != int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(24531), unsafe.Pointer(_3_zErr))
+ }
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_3_zErr))
_5:
return _rc
}
@@ -72227,60 +73330,55 @@ _5:
var _sqlite3VtabCallConnectØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabCallConnectØ00__func__Ø000[0], str(94246), 23)
+ crt.Xstrncpy(nil, &_sqlite3VtabCallConnectØ00__func__Ø000[0], str(94274), 23)
}
-// Given a SELECT statement, generate a Table structure that describes
-// the result set of that SELECT.
+// C comment
+// /*
+// ** Given a SELECT statement, generate a Table structure that describes
+// ** the result set of that SELECT.
+// */
func _sqlite3ResultSetOfSelect(tls *crt.TLS, _pParse *XParse, _pSelect *XSelect) (r0 *XTable) {
var _savedFlags int32
var _db *Xsqlite3
var _pTab *XTable
- _db = (*Xsqlite3)(_pParse.X0)
- _savedFlags = _db.X6
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-5)
- sink1(*p)
- }
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(64)
- sink1(*p)
- }
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _savedFlags = _db.Xflags
+ _db.Xflags &= int32(-5)
+ _db.Xflags |= int32(64)
_sqlite3SelectPrep(tls, _pParse, _pSelect, nil)
- if (_pParse.X16) != 0 {
+ if _pParse.XnErr != 0 {
return nil
}
_0:
- if (*XSelect)(_pSelect.X13) != nil {
- _pSelect = (*XSelect)(_pSelect.X13)
+ if _pSelect.XpPrior != nil {
+ _pSelect = (*XSelect)(_pSelect.XpPrior)
goto _0
}
- *(*int32)(unsafe.Pointer(&(_db.X6))) = _savedFlags
- _pTab = (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(u32(80))))
+ _db.Xflags = _savedFlags
+ _pTab = (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(80)))
if _pTab == nil {
return nil
}
func() {
- if ((*t7)(unsafe.Pointer(&(_db.X58))).X0) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118340), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ResultSetOfSelectØ00__func__Ø000))), unsafe.Pointer(str(94269)))
+ if (_db.Xlookaside.XbDisable) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118340), unsafe.Pointer(&_sqlite3ResultSetOfSelectØ00__func__Ø000), unsafe.Pointer(str(94297)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_pTab.X8))) = uint32(i32(1))
- *(**int8)(unsafe.Pointer(&(_pTab.X0))) = nil
- *(*int16)(unsafe.Pointer(&(_pTab.X12))) = int16(i32(200))
+ _pTab.XnTabRef = uint32(1)
+ _pTab.XzName = nil
+ _pTab.XnRowLogEst = int16(200)
func() {
- if i32(200) != int32(_sqlite3LogEst(tls, uint64(i32(1048576)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118343), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ResultSetOfSelectØ00__func__Ø000))), unsafe.Pointer(str(48127)))
+ if int32(200) != int32(_sqlite3LogEst(tls, uint64(1048576))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118343), unsafe.Pointer(&_sqlite3ResultSetOfSelectØ00__func__Ø000), unsafe.Pointer(str(48082)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ColumnsFromExprList(tls, _pParse, (*XExprList)(_pSelect.X0), (*int16)(unsafe.Pointer(&(_pTab.X11))), (**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X1))))))
+ _sqlite3ColumnsFromExprList(tls, _pParse, (*XExprList)(_pSelect.XpEList), &_pTab.XnCol, (**XColumn)(unsafe.Pointer(&_pTab.XaCol)))
_sqlite3SelectAddColumnTypeAndCollation(tls, _pParse, _pTab, _pSelect)
- *(*int16)(unsafe.Pointer(&(_pTab.X10))) = int16(i32(-1))
- if (_db.X17) != 0 {
+ _pTab.XiPKey = int16(-1)
+ if _db.XmallocFailed != 0 {
_sqlite3DeleteTable(tls, _db, _pTab)
return nil
}
@@ -72290,18 +73388,21 @@ _0:
var _sqlite3ResultSetOfSelectØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ResultSetOfSelectØ00__func__Ø000[0], str(94292), 25)
+ crt.Xstrncpy(nil, &_sqlite3ResultSetOfSelectØ00__func__Ø000[0], str(94320), 25)
}
-// Add type and collation information to a column list based on
-// a SELECT statement.
-//
-// The column list presumably came from selectColumnNamesFromExprList().
-// The column list has only names, not types or collations. This
-// routine goes through and adds the types and collations.
-//
-// This routine requires that all identifiers in the SELECT
-// statement be resolved.
+// C comment
+// /*
+// ** Add type and collation information to a column list based on
+// ** a SELECT statement.
+// **
+// ** The column list presumably came from selectColumnNamesFromExprList().
+// ** The column list has only names, not types or collations. This
+// ** routine goes through and adds the types and collations.
+// **
+// ** This routine requires that all identifiers in the SELECT
+// ** statement be resolved.
+// */
func _sqlite3SelectAddColumnTypeAndCollation(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pSelect *XSelect) {
var _i, _1_n, _1_m int32
var _szAll uint64
@@ -72312,77 +73413,71 @@ func _sqlite3SelectAddColumnTypeAndCollation(tls *crt.TLS, _pParse *XParse, _pTa
var _pCol *XColumn
var _pColl *XCollSeq
var _sNC XNameContext
- _db = (*Xsqlite3)(_pParse.X0)
- _szAll = u64(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _szAll = uint64(0)
func() {
if _pSelect == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118287), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectAddColumnTypeAndCollationØ00__func__Ø000))), unsafe.Pointer(str(94317)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118287), unsafe.Pointer(&_sqlite3SelectAddColumnTypeAndCollationØ00__func__Ø000), unsafe.Pointer(str(94345)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_pSelect.X3) & uint32(i32(4))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118288), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectAddColumnTypeAndCollationØ00__func__Ø000))), unsafe.Pointer(str(94328)))
+ if (_pSelect.XselFlags & uint32(4)) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118288), unsafe.Pointer(&_sqlite3SelectAddColumnTypeAndCollationØ00__func__Ø000), unsafe.Pointer(str(94356)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pTab.X11) != ((*XExprList)(_pSelect.X0).X0) && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118289), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectAddColumnTypeAndCollationØ00__func__Ø000))), unsafe.Pointer(str(94365)))
+ if int32(_pTab.XnCol) != ((*XExprList)(_pSelect.XpEList).XnExpr) && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118289), unsafe.Pointer(&_sqlite3SelectAddColumnTypeAndCollationØ00__func__Ø000), unsafe.Pointer(str(94393)))
crt.X__builtin_abort(tls)
}
}()
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
return
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_sNC), i32(0), u32(32))
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X1))))) = (*XSrcList)(_pSelect.X8)
- _a = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSelect.X0).X2)))))
- *func() **XColumn { _i = i32(0); return &_pCol }() = (*XColumn)(_pTab.X1)
+ crt.Xmemset(tls, unsafe.Pointer(&_sNC), int32(0), uint32(32))
+ *(**XSrcList)(unsafe.Pointer(&_sNC.XpSrcList)) = (*XSrcList)(_pSelect.XpSrc)
+ _a = (*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSelect.XpEList).Xa)))
+ *func() **XColumn { _i = int32(0); return &_pCol }() = (*XColumn)(_pTab.XaCol)
_8:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _11
}
- _p = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_a)) + 20*uintptr(_i))).X0)
- _1_zType = _columnTypeImpl(tls, &_sNC, _p, (*uint8)(unsafe.Pointer(&(_pCol.X5))))
- {
- p := &_szAll
- *p = (*p) + uint64(_pCol.X5)
- sink17(*p)
- }
- *(*int8)(unsafe.Pointer(&(_pCol.X4))) = _sqlite3ExprAffinity(tls, _p)
- if _1_zType == nil || store1(&_1_m, _sqlite3Strlen30(tls, _1_zType)) <= i32(0) {
+ _p = (*XExpr)(elem57(_a, uintptr(_i)).XpExpr)
+ _1_zType = _columnTypeImpl(tls, &_sNC, _p, &_pCol.XszEst)
+ _szAll += uint64(_pCol.XszEst)
+ _pCol.Xaffinity = _sqlite3ExprAffinity(tls, _p)
+ if _1_zType == nil || store2(&_1_m, _sqlite3Strlen30(tls, _1_zType)) <= int32(0) {
goto _13
}
- _1_n = _sqlite3Strlen30(tls, _pCol.X0)
- *(**int8)(unsafe.Pointer(&(_pCol.X0))) = (*int8)(_sqlite3DbReallocOrFree(tls, _db, (unsafe.Pointer)(_pCol.X0), uint64((_1_n+_1_m)+i32(2))))
- if (_pCol.X0) != nil {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pCol.X0))+1*uintptr(_1_n+i32(1))))), (unsafe.Pointer)(_1_zType), uint32(_1_m+i32(1)))
+ _1_n = _sqlite3Strlen30(tls, _pCol.XzName)
+ _pCol.XzName = (*int8)(_sqlite3DbReallocOrFree(tls, _db, unsafe.Pointer(_pCol.XzName), uint64((_1_n+_1_m)+int32(2))))
+ if _pCol.XzName != nil {
+ crt.Xmemcpy(tls, unsafe.Pointer(elem1(_pCol.XzName, uintptr(_1_n+int32(1)))), unsafe.Pointer(_1_zType), uint32(_1_m+int32(1)))
{
- p := (*uint8)(unsafe.Pointer(&(_pCol.X6)))
- *p = uint8(int32(*p) | i32(4))
- sink2(*p)
+ p := &_pCol.XcolFlags
+ *p = uint8(int32(*p) | int32(4))
}
}
_13:
- if int32(_pCol.X4) == i32(0) {
- *(*int8)(unsafe.Pointer(&(_pCol.X4))) = int8(i32(65))
+ if int32(_pCol.Xaffinity) == int32(0) {
+ _pCol.Xaffinity = int8(65)
}
_pColl = _sqlite3ExprCollSeq(tls, _pParse, _p)
- if (_pColl != nil) && ((_pCol.X2) == nil) {
- *(**int8)(unsafe.Pointer(&(_pCol.X2))) = _sqlite3DbStrDup(tls, _db, _pColl.X0)
+ if (_pColl != nil) && (_pCol.XzColl == nil) {
+ _pCol.XzColl = _sqlite3DbStrDup(tls, _db, _pColl.XzName)
}
*(*uintptr)(unsafe.Pointer(func() **XColumn { _i += 1; return &_pCol }())) += uintptr(16)
goto _8
_11:
- *(*int16)(unsafe.Pointer(&(_pTab.X13))) = _sqlite3LogEst(tls, _szAll*uint64(i32(4)))
- _ = _sNC
+ _pTab.XszTabRow = _sqlite3LogEst(tls, _szAll*uint64(4))
}
var _sqlite3SelectAddColumnTypeAndCollationØ00__func__Ø000 [39]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SelectAddColumnTypeAndCollationØ00__func__Ø000[0], str(94420), 39)
+ crt.Xstrncpy(nil, &_sqlite3SelectAddColumnTypeAndCollationØ00__func__Ø000[0], str(94448), 39)
}
func _columnTypeImpl(tls *crt.TLS, _pNC *XNameContext, _pExpr *XExpr, _pEstWidth *uint8) (r0 *int8) {
@@ -72395,25 +73490,25 @@ func _columnTypeImpl(tls *crt.TLS, _pNC *XNameContext, _pExpr *XExpr, _pEstWidth
var _8_p, _12_p *XExpr
var _8_sNC, _12_sNC XNameContext
_zType = nil
- _estWidth = u8(1)
+ _estWidth = uint8(1)
func() {
if _pExpr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117910), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnTypeImplØ00__func__Ø000))), unsafe.Pointer(str(43636)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117910), unsafe.Pointer(&_columnTypeImplØ00__func__Ø000), unsafe.Pointer(str(43591)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSrcList)(_pNC.X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117911), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnTypeImplØ00__func__Ø000))), unsafe.Pointer(str(94459)))
+ if (*XSrcList)(_pNC.XpSrcList) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117911), unsafe.Pointer(&_columnTypeImplØ00__func__Ø000), unsafe.Pointer(str(94487)))
crt.X__builtin_abort(tls)
}
}()
- switch int32(_pExpr.X0) {
- case i32(119):
+ switch int32(_pExpr.Xop) {
+ case int32(119):
goto _7
- case i32(152):
+ case int32(152):
goto _5
- case i32(154):
+ case int32(154):
goto _5
default:
goto _8
@@ -72422,26 +73517,26 @@ func _columnTypeImpl(tls *crt.TLS, _pNC *XNameContext, _pExpr *XExpr, _pEstWidth
_5:
_2_pTab = nil
_2_pS = nil
- _2_iCol = int32(_pExpr.X9)
+ _2_iCol = int32(_pExpr.XiColumn)
_9:
if _pNC == nil || _2_pTab != nil {
goto _10
}
- _3_pTabList = (*XSrcList)(_pNC.X1)
- _j = i32(0)
+ _3_pTabList = (*XSrcList)(_pNC.XpSrcList)
+ _j = int32(0)
_12:
- if _j >= (_3_pTabList.X0) || ((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_3_pTabList.X2)))))+68*uintptr(_j))).X11) == (_pExpr.X8) {
+ if _j >= _3_pTabList.XnSrc || (elem6((*TSrcList_item)(unsafe.Pointer(&_3_pTabList.Xa)), uintptr(_j)).XiCursor) == _pExpr.XiTable {
goto _16
}
_j += 1
goto _12
_16:
- if _j < (_3_pTabList.X0) {
- _2_pTab = (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_3_pTabList.X2))))) + 68*uintptr(_j))).X4)
- _2_pS = (*XSelect)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_3_pTabList.X2))))) + 68*uintptr(_j))).X5)
+ if _j < _3_pTabList.XnSrc {
+ _2_pTab = (*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&_3_pTabList.Xa)), uintptr(_j)).XpTab)
+ _2_pS = (*XSelect)(elem6((*TSrcList_item)(unsafe.Pointer(&_3_pTabList.Xa)), uintptr(_j)).XpSelect)
goto _18
}
- _pNC = (*XNameContext)(_pNC.X4)
+ _pNC = (*XNameContext)(_pNC.XpNext)
_18:
goto _9
_10:
@@ -72449,71 +73544,71 @@ _10:
goto _8
}
func() {
- if _2_pTab == nil || (*XTable)(_pExpr.X14) != _2_pTab {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117956), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnTypeImplØ00__func__Ø000))), unsafe.Pointer(str(94476)))
+ if _2_pTab == nil || (*XTable)(_pExpr.XpTab) != _2_pTab {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117956), unsafe.Pointer(&_columnTypeImplØ00__func__Ø000), unsafe.Pointer(str(94504)))
crt.X__builtin_abort(tls)
}
}()
if _2_pS == nil {
goto _23
}
- if (_2_iCol >= i32(0)) && func() int32 {
- if _2_iCol < ((*XExprList)(_2_pS.X0).X0) {
- return i32(1)
+ if (_2_iCol >= int32(0)) && func() int32 {
+ if _2_iCol < ((*XExprList)(_2_pS.XpEList).XnExpr) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117962), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnTypeImplØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117962), unsafe.Pointer(&_columnTypeImplØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- _8_p = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_2_pS.X0).X2))))) + 20*uintptr(_2_iCol))).X0)
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_8_sNC.X1))))) = (*XSrcList)(_2_pS.X8)
- *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_8_sNC.X4))))) = _pNC
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_8_sNC.X0))))) = (*XParse)(_pNC.X0)
+ _8_p = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_2_pS.XpEList).Xa))), uintptr(_2_iCol)).XpExpr)
+ *(**XSrcList)(unsafe.Pointer(&_8_sNC.XpSrcList)) = (*XSrcList)(_2_pS.XpSrc)
+ *(**XNameContext)(unsafe.Pointer(&_8_sNC.XpNext)) = _pNC
+ *(**XParse)(unsafe.Pointer(&_8_sNC.XpParse)) = (*XParse)(_pNC.XpParse)
_zType = _columnTypeImpl(tls, &_8_sNC, _8_p, &_estWidth)
}
goto _29
_23:
- if (*XSchema)(_2_pTab.X20) == nil {
+ if _2_pTab.XpSchema == nil {
goto _29
}
func() {
if _2_pS != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117979), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnTypeImplØ00__func__Ø000))), unsafe.Pointer(str(94502)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117979), unsafe.Pointer(&_columnTypeImplØ00__func__Ø000), unsafe.Pointer(str(94530)))
crt.X__builtin_abort(tls)
}
}()
- if _2_iCol < i32(0) {
- _2_iCol = int32(_2_pTab.X10)
+ if _2_iCol < int32(0) {
+ _2_iCol = int32(_2_pTab.XiPKey)
}
func() {
- if _2_iCol != i32(-1) && (_2_iCol < i32(0) || _2_iCol >= int32(_2_pTab.X11)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117981), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnTypeImplØ00__func__Ø000))), unsafe.Pointer(str(94506)))
+ if _2_iCol != int32(-1) && (_2_iCol < int32(0) || _2_iCol >= int32(_2_pTab.XnCol)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117981), unsafe.Pointer(&_columnTypeImplØ00__func__Ø000), unsafe.Pointer(str(94534)))
crt.X__builtin_abort(tls)
}
}()
- if _2_iCol < i32(0) {
- _zType = str(25792)
+ if _2_iCol < int32(0) {
+ _zType = str(25747)
goto _38
}
- _zType = _sqlite3ColumnType(tls, (*XColumn)(unsafe.Pointer(uintptr(_2_pTab.X1)+16*uintptr(_2_iCol))), nil)
- _estWidth = (*XColumn)(unsafe.Pointer(uintptr(_2_pTab.X1) + 16*uintptr(_2_iCol))).X5
+ _zType = _sqlite3ColumnType(tls, elem41((*XColumn)(_2_pTab.XaCol), uintptr(_2_iCol)), nil)
+ _estWidth = elem41((*XColumn)(_2_pTab.XaCol), uintptr(_2_iCol)).XszEst
_38:
_29:
goto _8
_7:
- _12_pS = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
- _12_p = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_12_pS.X0).X2))))) + 20*uintptr(i32(0)))).X0)
+ _12_pS = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
+ _12_p = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_12_pS.XpEList).Xa))), 0).XpExpr)
func() {
- if ((_pExpr.X2) & uint32(i32(2048))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118016), unsafe.Pointer((*int8)(unsafe.Pointer(&_columnTypeImplØ00__func__Ø000))), unsafe.Pointer(str(45159)))
+ if (_pExpr.Xflags & uint32(2048)) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118016), unsafe.Pointer(&_columnTypeImplØ00__func__Ø000), unsafe.Pointer(str(45114)))
crt.X__builtin_abort(tls)
}
}()
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_12_sNC.X1))))) = (*XSrcList)(_12_pS.X8)
- *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_12_sNC.X4))))) = _pNC
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_12_sNC.X0))))) = (*XParse)(_pNC.X0)
+ *(**XSrcList)(unsafe.Pointer(&_12_sNC.XpSrcList)) = (*XSrcList)(_12_pS.XpSrc)
+ *(**XNameContext)(unsafe.Pointer(&_12_sNC.XpNext)) = _pNC
+ *(**XParse)(unsafe.Pointer(&_12_sNC.XpParse)) = (*XParse)(_pNC.XpParse)
_zType = _columnTypeImpl(tls, &_12_sNC, _12_p, &_estWidth)
goto _8
_8:
@@ -72521,102 +73616,101 @@ _8:
*_pEstWidth = _estWidth
}
return _zType
-
- _ = _8_sNC
- _ = _12_sNC
- panic(0)
}
var _columnTypeImplØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_columnTypeImplØ00__func__Ø000[0], str(94547), 15)
+ crt.Xstrncpy(nil, &_columnTypeImplØ00__func__Ø000[0], str(94575), 15)
}
-// Return the collation sequence for the expression pExpr. If
-// there is no defined collating sequence, return NULL.
-//
-// The collating sequence might be determined by a COLLATE operator
-// or by the presence of a column with a defined collating sequence.
-// COLLATE operators take first precedence. Left operands take
-// precedence over right operands.
+// C comment
+// /*
+// ** Return the collation sequence for the expression pExpr. If
+// ** there is no defined collating sequence, return NULL.
+// **
+// ** The collating sequence might be determined by a COLLATE operator
+// ** or by the presence of a column with a defined collating sequence.
+// ** COLLATE operators take first precedence. Left operands take
+// ** precedence over right operands.
+// */
func _sqlite3ExprCollSeq(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr) (r0 *XCollSeq) {
var _1_op, _4_j, _9_i int32
var _5_zColl *int8
var _db *Xsqlite3
var _p, _8_pNext *XExpr
var _pColl *XCollSeq
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pColl = nil
_p = _pExpr
_0:
if _p == nil {
goto _1
}
- _1_op = int32(_p.X0)
- if ((_p.X2) & uint32(i32(512))) != 0 {
+ _1_op = int32(_p.Xop)
+ if (_p.Xflags & uint32(512)) != 0 {
goto _1
}
- if (_1_op == i32(37)) || (_1_op == i32(156)) {
- _p = (*XExpr)(_p.X4)
+ if (_1_op == int32(37)) || (_1_op == int32(156)) {
+ _p = (*XExpr)(_p.XpLeft)
goto _0
}
- if (_1_op == i32(94)) || ((_1_op == i32(157)) && (int32(_p.X12) == i32(94))) {
- _pColl = _sqlite3GetCollSeq(tls, _pParse, _db.X14, nil, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3))))))
+ if (_1_op == int32(94)) || ((_1_op == int32(157)) && (int32(_p.Xop2) == int32(94))) {
+ _pColl = _sqlite3GetCollSeq(tls, _pParse, _db.Xenc, nil, *(**int8)(unsafe.Pointer(&_p.Xu)))
goto _1
}
- if _1_op != i32(154) && _1_op != i32(152) && _1_op != i32(157) && _1_op != i32(61) || (*XTable)(_p.X14) == nil {
+ if _1_op != int32(154) && _1_op != int32(152) && _1_op != int32(157) && _1_op != int32(61) || (*XTable)(_p.XpTab) == nil {
goto _12
}
- _4_j = int32(_p.X9)
- if _4_j >= i32(0) {
- _5_zColl = (*XColumn)(unsafe.Pointer(uintptr((*XTable)(_p.X14).X1) + 16*uintptr(_4_j))).X2
- _pColl = _sqlite3FindCollSeq(tls, _db, _db.X14, _5_zColl, i32(0))
+ _4_j = int32(_p.XiColumn)
+ if _4_j >= int32(0) {
+ _5_zColl = elem41((*XColumn)((*XTable)(_p.XpTab).XaCol), uintptr(_4_j)).XzColl
+ _pColl = _sqlite3FindCollSeq(tls, _db, _db.Xenc, _5_zColl, int32(0))
}
goto _1
_12:
- if ((_p.X2) & uint32(i32(256))) == 0 {
+ if (_p.Xflags & uint32(256)) == 0 {
goto _14
}
- if ((*XExpr)(_p.X4) != nil) && ((((*XExpr)(_p.X4).X2) & uint32(i32(256))) != uint32(i32(0))) {
- _p = (*XExpr)(_p.X4)
+ if (_p.XpLeft != nil) && ((((*XExpr)(_p.XpLeft).Xflags) & uint32(256)) != (0)) {
+ _p = (*XExpr)(_p.XpLeft)
goto _17
}
- _8_pNext = (*XExpr)(_p.X5)
+ _8_pNext = (*XExpr)(_p.XpRight)
func() {
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))) != nil && (*XExpr)(_p.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91064), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCollSeqØ00__func__Ø000))), unsafe.Pointer(str(21285)))
+ if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))) != nil && (*XExpr)(_p.XpRight) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91064), unsafe.Pointer(&_sqlite3ExprCollSeqØ00__func__Ø000), unsafe.Pointer(str(21240)))
crt.X__builtin_abort(tls)
}
}()
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))) == nil || func() int32 {
- if ((_p.X2) & uint32(i32(2048))) == uint32(i32(0)) {
- return i32(1)
+ if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))) == nil || func() int32 {
+ if (_p.Xflags & uint32(2048)) == (0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91068), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCollSeqØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91068), unsafe.Pointer(&_sqlite3ExprCollSeqØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _24
}
- _9_i = i32(0)
+ _9_i = int32(0)
_25:
if func() int32 {
- if _9_i < ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))).X0) {
- return i32(1)
+ if _9_i < ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))).XnExpr) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91070), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCollSeqØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91070), unsafe.Pointer(&_sqlite3ExprCollSeqØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _30
}
- if (((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))).X2))))) + 20*uintptr(_9_i))).X0).X2) & uint32(i32(256))) != uint32(i32(0)) {
- _8_pNext = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))).X2))))) + 20*uintptr(_9_i))).X0)
+ if (((*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))).Xa))), uintptr(_9_i)).XpExpr).Xflags) & uint32(256)) != (0) {
+ _8_pNext = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))).Xa))), uintptr(_9_i)).XpExpr)
goto _30
}
_9_i += 1
@@ -72640,18 +73734,21 @@ _1:
var _sqlite3ExprCollSeqØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCollSeqØ00__func__Ø000[0], str(94562), 19)
+ crt.Xstrncpy(nil, &_sqlite3ExprCollSeqØ00__func__Ø000[0], str(94590), 19)
}
-// This routine is called on a collation sequence before it is used to
-// check that it is defined. An undefined collation sequence exists when
-// a database is loaded that contains references to collation sequences
-// that have not been defined by sqlite3_create_collation() etc.
-//
-// If required, this routine calls the 'collation needed' callback to
-// request a definition of the collating sequence. If this doesn't work,
-// an equivalent collating sequence that uses a text encoding different
-// from the main database is substituted, if one is available.
+// C comment
+// /*
+// ** This routine is called on a collation sequence before it is used to
+// ** check that it is defined. An undefined collation sequence exists when
+// ** a database is loaded that contains references to collation sequences
+// ** that have not been defined by sqlite3_create_collation() etc.
+// **
+// ** If required, this routine calls the 'collation needed' callback to
+// ** request a definition of the collating sequence. If this doesn't work,
+// ** an equivalent collating sequence that uses a text encoding different
+// ** from the main database is substituted, if one is available.
+// */
func _sqlite3CheckCollSeq(tls *crt.TLS, _pParse *XParse, _pColl *XCollSeq) (r0 int32) {
var _1_zName *int8
var _1_db *Xsqlite3
@@ -72659,72 +73756,78 @@ func _sqlite3CheckCollSeq(tls *crt.TLS, _pParse *XParse, _pColl *XCollSeq) (r0 i
if _pColl == nil {
goto _0
}
- _1_zName = _pColl.X0
- _1_db = (*Xsqlite3)(_pParse.X0)
- _1_p = _sqlite3GetCollSeq(tls, _pParse, _1_db.X14, _pColl, _1_zName)
+ _1_zName = _pColl.XzName
+ _1_db = (*Xsqlite3)(_pParse.Xdb)
+ _1_p = _sqlite3GetCollSeq(tls, _pParse, _1_db.Xenc, _pColl, _1_zName)
if _1_p == nil {
- return i32(1)
+ return int32(1)
}
func() {
if _1_p != _pColl {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104276), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CheckCollSeqØ00__func__Ø000))), unsafe.Pointer(str(94581)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104276), unsafe.Pointer(&_sqlite3CheckCollSeqØ00__func__Ø000), unsafe.Pointer(str(94609)))
crt.X__builtin_abort(tls)
}
}()
_0:
- return i32(0)
+ return int32(0)
}
var _sqlite3CheckCollSeqØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CheckCollSeqØ00__func__Ø000[0], str(94590), 20)
+ crt.Xstrncpy(nil, &_sqlite3CheckCollSeqØ00__func__Ø000[0], str(94618), 20)
}
-// If the source-list item passed as an argument was augmented with an
-// INDEXED BY clause, then try to locate the specified index. If there
-// was such a clause and the named index cannot be found, return
-// SQLITE_ERROR and leave an error in pParse. Otherwise, populate
-// pFrom->pIndex and return SQLITE_OK.
+// C comment
+// /*
+// ** If the source-list item passed as an argument was augmented with an
+// ** INDEXED BY clause, then try to locate the specified index. If there
+// ** was such a clause and the named index cannot be found, return
+// ** SQLITE_ERROR and leave an error in pParse. Otherwise, populate
+// ** pFrom->pIndex and return SQLITE_OK.
+// */
func _sqlite3IndexedByLookup(tls *crt.TLS, _pParse *XParse, _pFrom *TSrcList_item) (r0 int32) {
var _1_zIndexedBy *int8
var _1_pTab *XTable
var _1_pIdx *XIndex
- if (*XTable)(_pFrom.X4) == nil || ((uint32(((*t28)(unsafe.Pointer(&(_pFrom.X9))).X1)>>uint(i32(1)))<<uint(i32(31)))>>uint(i32(31))) == 0 {
+ if _pFrom.XpTab == nil || ((uint32((_pFrom.Xfg.XnotIndexed)>>1)<<31)>>31) == 0 {
goto _1
}
- _1_pTab = (*XTable)(_pFrom.X4)
- _1_zIndexedBy = *(**int8)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_pFrom.X15)))))
- _1_pIdx = (*XIndex)(_1_pTab.X2)
+ _1_pTab = (*XTable)(_pFrom.XpTab)
+ _1_zIndexedBy = *(**int8)(unsafe.Pointer(&_pFrom.Xu1))
+ _1_pIdx = (*XIndex)(_1_pTab.XpIndex)
_2:
- if _1_pIdx == nil || _sqlite3StrICmp(tls, _1_pIdx.X0, _1_zIndexedBy) == 0 {
+ if _1_pIdx == nil || _sqlite3StrICmp(tls, _1_pIdx.XzName, _1_zIndexedBy) == 0 {
goto _6
}
- _1_pIdx = (*XIndex)(_1_pIdx.X5)
+ _1_pIdx = (*XIndex)(_1_pIdx.XpNext)
goto _2
_6:
if _1_pIdx == nil {
- _sqlite3ErrorMsg(tls, _pParse, str(94610), unsafe.Pointer(_1_zIndexedBy), i32(0))
- *(*uint8)(unsafe.Pointer(&(_pParse.X5))) = uint8(i32(1))
- return i32(1)
+ _sqlite3ErrorMsg(tls, _pParse, str(94638), unsafe.Pointer(_1_zIndexedBy), int32(0))
+ _pParse.XcheckSchema = uint8(1)
+ return int32(1)
}
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFrom.X16))))) = _1_pIdx
+ *(**XIndex)(unsafe.Pointer(&_pFrom.XpIBIndex)) = _1_pIdx
_1:
- return i32(0)
-}
-
-// This routine processes the join information for a SELECT statement.
-// ON and USING clauses are converted into extra terms of the WHERE clause.
-// NATURAL joins also create extra WHERE clause terms.
-//
-// The terms of a FROM clause are contained in the Select.pSrc structure.
-// The left most table is the first entry in Select.pSrc. The right-most
-// table is the last entry. The join operator is held in the entry to
-// the left. Thus entry 0 contains the join operator for the join between
-// entries 0 and 1. Any ON or USING clauses associated with the join are
-// also attached to the left entry.
-//
-// This routine returns the number of errors encountered.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** This routine processes the join information for a SELECT statement.
+// ** ON and USING clauses are converted into extra terms of the WHERE clause.
+// ** NATURAL joins also create extra WHERE clause terms.
+// **
+// ** The terms of a FROM clause are contained in the Select.pSrc structure.
+// ** The left most table is the first entry in Select.pSrc. The right-most
+// ** table is the last entry. The join operator is held in the entry to
+// ** the left. Thus entry 0 contains the join operator for the join between
+// ** entries 0 and 1. Any ON or USING clauses associated with the join are
+// ** also attached to the left entry.
+// **
+// ** This routine returns the number of errors encountered.
+// */
func _sqliteProcessJoin(tls *crt.TLS, _pParse *XParse, _p *XSelect) (r0 int32) {
var _i, _j, _1_isOuter, _4_iLeft, _4_iLeftCol, _9_iLeft, _9_iLeftCol, _9_iRightCol int32
var _4_zName, _9_zName *int8
@@ -72732,78 +73835,78 @@ func _sqliteProcessJoin(tls *crt.TLS, _pParse *XParse, _p *XSelect) (r0 int32) {
var _pSrc *XSrcList
var _pLeft, _pRight *TSrcList_item
var _8_pList *XIdList
- _pSrc = (*XSrcList)(_p.X8)
- _pLeft = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(i32(0))))
- _pRight = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLeft)) + 68*uintptr(i32(1))))
- _i = i32(0)
+ _pSrc = (*XSrcList)(_p.XpSrc)
+ _pLeft = elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), 0)
+ _pRight = elem6(_pLeft, uintptr(1))
+ _i = int32(0)
_0:
- if _i >= ((_pSrc.X0) - i32(1)) {
+ if _i >= (_pSrc.XnSrc - int32(1)) {
goto _3
}
- _1_pLeftTab = (*XTable)(_pLeft.X4)
- _1_pRightTab = (*XTable)(_pRight.X4)
+ _1_pLeftTab = (*XTable)(_pLeft.XpTab)
+ _1_pRightTab = (*XTable)(_pRight.XpTab)
if func() int32 {
if (_1_pLeftTab == nil) || (_1_pRightTab == nil) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116938), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqliteProcessJoinØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116938), unsafe.Pointer(&_sqliteProcessJoinØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _1
}
- _1_isOuter = bool2int((int32((*t28)(unsafe.Pointer(&(_pRight.X9))).X0) & i32(32)) != i32(0))
- if (int32((*t28)(unsafe.Pointer(&(_pRight.X9))).X0) & i32(4)) == 0 {
+ _1_isOuter = bool2int((int32(_pRight.Xfg.Xjointype) & int32(32)) != int32(0))
+ if (int32(_pRight.Xfg.Xjointype) & int32(4)) == 0 {
goto _8
}
- if ((*XExpr)(_pRight.X12) != nil) || ((*XIdList)(_pRight.X13) != nil) {
- _sqlite3ErrorMsg(tls, _pParse, str(94628), i32(0))
- return i32(1)
+ if (_pRight.XpOn != nil) || (_pRight.XpUsing != nil) {
+ _sqlite3ErrorMsg(tls, _pParse, str(94656), int32(0))
+ return int32(1)
}
- _j = i32(0)
+ _j = int32(0)
_11:
- if _j >= int32(_1_pRightTab.X11) {
+ if _j >= int32(_1_pRightTab.XnCol) {
goto _14
}
- _4_zName = (*XColumn)(unsafe.Pointer(uintptr(_1_pRightTab.X1) + 16*uintptr(_j))).X0
- if _tableAndColumnIndex(tls, _pSrc, _i+i32(1), _4_zName, &_4_iLeft, &_4_iLeftCol) != 0 {
- _addWhereTerm(tls, _pParse, _pSrc, _4_iLeft, _4_iLeftCol, _i+i32(1), _j, _1_isOuter, (**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))))
+ _4_zName = elem41((*XColumn)(_1_pRightTab.XaCol), uintptr(_j)).XzName
+ if _tableAndColumnIndex(tls, _pSrc, _i+int32(1), _4_zName, &_4_iLeft, &_4_iLeftCol) != 0 {
+ _addWhereTerm(tls, _pParse, _pSrc, _4_iLeft, _4_iLeftCol, _i+int32(1), _j, _1_isOuter, (**XExpr)(unsafe.Pointer(&_p.XpWhere)))
}
_j += 1
goto _11
_14:
_8:
- if ((*XExpr)(_pRight.X12) != nil) && ((*XIdList)(_pRight.X13) != nil) {
- _sqlite3ErrorMsg(tls, _pParse, str(94678))
- return i32(1)
+ if (_pRight.XpOn != nil) && (_pRight.XpUsing != nil) {
+ _sqlite3ErrorMsg(tls, _pParse, str(94706))
+ return int32(1)
}
- if (*XExpr)(_pRight.X12) == nil {
+ if _pRight.XpOn == nil {
goto _18
}
if _1_isOuter != 0 {
- _setJoinExpr(tls, (*XExpr)(_pRight.X12), _pRight.X11)
+ _setJoinExpr(tls, (*XExpr)(_pRight.XpOn), _pRight.XiCursor)
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))) = _sqlite3ExprAnd(tls, (*Xsqlite3)(_pParse.X0), (*XExpr)(_p.X9), (*XExpr)(_pRight.X12))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRight.X12))))) = nil
+ *(**XExpr)(unsafe.Pointer(&_p.XpWhere)) = _sqlite3ExprAnd(tls, (*Xsqlite3)(_pParse.Xdb), (*XExpr)(_p.XpWhere), (*XExpr)(_pRight.XpOn))
+ *(**XExpr)(unsafe.Pointer(&_pRight.XpOn)) = nil
_18:
- if (*XIdList)(_pRight.X13) == nil {
+ if _pRight.XpUsing == nil {
goto _20
}
- _8_pList = (*XIdList)(_pRight.X13)
- _j = i32(0)
+ _8_pList = (*XIdList)(_pRight.XpUsing)
+ _j = int32(0)
_21:
- if _j >= (_8_pList.X1) {
+ if _j >= _8_pList.XnId {
goto _24
}
- _9_zName = (*TIdList_item)(unsafe.Pointer(uintptr(_8_pList.X0) + 8*uintptr(_j))).X0
+ _9_zName = elem42((*TIdList_item)(_8_pList.Xa), uintptr(_j)).XzName
_9_iRightCol = _columnIndex(tls, _1_pRightTab, _9_zName)
- if (_9_iRightCol < i32(0)) || (_tableAndColumnIndex(tls, _pSrc, _i+i32(1), _9_zName, &_9_iLeft, &_9_iLeftCol) == 0) {
- _sqlite3ErrorMsg(tls, _pParse, str(94733), unsafe.Pointer(_9_zName))
- return i32(1)
+ if (_9_iRightCol < int32(0)) || (_tableAndColumnIndex(tls, _pSrc, _i+int32(1), _9_zName, &_9_iLeft, &_9_iLeftCol) == 0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(94761), unsafe.Pointer(_9_zName))
+ return int32(1)
}
- _addWhereTerm(tls, _pParse, _pSrc, _9_iLeft, _9_iLeftCol, _i+i32(1), _9_iRightCol, _1_isOuter, (**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))))
+ _addWhereTerm(tls, _pParse, _pSrc, _9_iLeft, _9_iLeftCol, _i+int32(1), _9_iRightCol, _1_isOuter, (**XExpr)(unsafe.Pointer(&_p.XpWhere)))
_j += 1
goto _21
_24:
@@ -72815,134 +73918,135 @@ _1:
}())) += uintptr(68)
goto _0
_3:
- return i32(0)
+ return int32(0)
}
var _sqliteProcessJoinØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqliteProcessJoinØ00__func__Ø000[0], str(94797), 18)
+ crt.Xstrncpy(nil, &_sqliteProcessJoinØ00__func__Ø000[0], str(94825), 18)
}
-// Search the first N tables in pSrc, from left to right, looking for a
-// table that has a column named zCol.
-//
-// When found, set *piTab and *piCol to the table index and column index
-// of the matching column and return TRUE.
-//
-// If not found, return FALSE.
+// C comment
+// /*
+// ** Search the first N tables in pSrc, from left to right, looking for a
+// ** table that has a column named zCol.
+// **
+// ** When found, set *piTab and *piCol to the table index and column index
+// ** of the matching column and return TRUE.
+// **
+// ** If not found, return FALSE.
+// */
func _tableAndColumnIndex(tls *crt.TLS, _pSrc *XSrcList, _N int32, _zCol *int8, _piTab *int32, _piCol *int32) (r0 int32) {
var _i, _iCol int32
func() {
if (_piTab == nil) != (_piCol == nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116809), unsafe.Pointer((*int8)(unsafe.Pointer(&_tableAndColumnIndexØ00__func__Ø000))), unsafe.Pointer(str(94815)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116809), unsafe.Pointer(&_tableAndColumnIndexØ00__func__Ø000), unsafe.Pointer(str(94843)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_2:
if _i >= _N {
goto _5
}
- _iCol = _columnIndex(tls, (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(_i))).X4), _zCol)
- if _iCol < i32(0) {
+ _iCol = _columnIndex(tls, (*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_i)).XpTab), _zCol)
+ if _iCol < int32(0) {
goto _6
}
if _piTab != nil {
*_piTab = _i
*_piCol = _iCol
}
- return i32(1)
+ return int32(1)
_6:
_i += 1
goto _2
_5:
- return i32(0)
+ return int32(0)
}
var _tableAndColumnIndexØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_tableAndColumnIndexØ00__func__Ø000[0], str(94838), 20)
+ crt.Xstrncpy(nil, &_tableAndColumnIndexØ00__func__Ø000[0], str(94866), 20)
}
-// Return the index of a column in a table. Return -1 if the column
-// is not contained in the table.
+// C comment
+// /*
+// ** Return the index of a column in a table. Return -1 if the column
+// ** is not contained in the table.
+// */
func _columnIndex(tls *crt.TLS, _pTab *XTable, _zCol *int8) (r0 int32) {
var _i int32
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _3
}
- if _sqlite3StrICmp(tls, (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X0, _zCol) == i32(0) {
+ if _sqlite3StrICmp(tls, elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XzName, _zCol) == int32(0) {
return _i
}
_i += 1
goto _0
_3:
- return i32(-1)
-}
-
-// This function is used to add terms implied by JOIN syntax to the
-// WHERE clause expression of a SELECT statement. The new term, which
-// is ANDed with the existing WHERE clause, is of the form:
-//
-// (tab1.col1 = tab2.col2)
-//
-// where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the
-// (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is
-// column iColRight of tab2.
+ return int32(-1)
+}
+
+// C comment
+// /*
+// ** This function is used to add terms implied by JOIN syntax to the
+// ** WHERE clause expression of a SELECT statement. The new term, which
+// ** is ANDed with the existing WHERE clause, is of the form:
+// **
+// ** (tab1.col1 = tab2.col2)
+// **
+// ** where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the
+// ** (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is
+// ** column iColRight of tab2.
+// */
func _addWhereTerm(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList, _iLeft int32, _iColLeft int32, _iRight int32, _iColRight int32, _isOuterJoin int32, _ppWhere **XExpr) {
var _db *Xsqlite3
var _pE1, _pE2, _pEq *XExpr
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _iLeft >= _iRight {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116849), unsafe.Pointer((*int8)(unsafe.Pointer(&_addWhereTermØ00__func__Ø000))), unsafe.Pointer(str(94858)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116849), unsafe.Pointer(&_addWhereTermØ00__func__Ø000), unsafe.Pointer(str(94886)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pSrc.X0) <= _iRight {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116850), unsafe.Pointer((*int8)(unsafe.Pointer(&_addWhereTermØ00__func__Ø000))), unsafe.Pointer(str(94871)))
+ if _pSrc.XnSrc <= _iRight {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116850), unsafe.Pointer(&_addWhereTermØ00__func__Ø000), unsafe.Pointer(str(94899)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(_iLeft))).X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116851), unsafe.Pointer((*int8)(unsafe.Pointer(&_addWhereTermØ00__func__Ø000))), unsafe.Pointer(str(94889)))
+ if (elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_iLeft)).XpTab) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116851), unsafe.Pointer(&_addWhereTermØ00__func__Ø000), unsafe.Pointer(str(94917)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(_iRight))).X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116852), unsafe.Pointer((*int8)(unsafe.Pointer(&_addWhereTermØ00__func__Ø000))), unsafe.Pointer(str(94909)))
+ if (elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_iRight)).XpTab) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116852), unsafe.Pointer(&_addWhereTermØ00__func__Ø000), unsafe.Pointer(str(94937)))
crt.X__builtin_abort(tls)
}
}()
_pE1 = _sqlite3CreateColumnExpr(tls, _db, _pSrc, _iLeft, _iColLeft)
_pE2 = _sqlite3CreateColumnExpr(tls, _db, _pSrc, _iRight, _iColRight)
- _pEq = _sqlite3PExpr(tls, _pParse, i32(78), _pE1, _pE2)
+ _pEq = _sqlite3PExpr(tls, _pParse, int32(78), _pE1, _pE2)
if (_pEq != nil) && _isOuterJoin != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&(_pEq.X2)))
- *p = (*p) | uint32(i32(1))
- sink5(*p)
- }
+ _pEq.Xflags |= uint32(1)
func() {
- if ((_pEq.X2) & uint32(i32(24576))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116860), unsafe.Pointer((*int8)(unsafe.Pointer(&_addWhereTermØ00__func__Ø000))), unsafe.Pointer(str(94930)))
+ if (_pEq.Xflags & uint32(24576)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116860), unsafe.Pointer(&_addWhereTermØ00__func__Ø000), unsafe.Pointer(str(94958)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_pEq.X2)))
- *p = (*p) | uint32(i32(131072))
- sink5(*p)
- }
- *(*int16)(unsafe.Pointer(&(_pEq.X11))) = int16(_pE2.X8)
+ _pEq.Xflags |= uint32(131072)
+ _pEq.XiRightJoinTable = int16(_pE2.XiTable)
}
*_ppWhere = _sqlite3ExprAnd(tls, _db, *_ppWhere, _pEq)
}
@@ -72950,77 +74054,78 @@ func _addWhereTerm(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList, _iLeft int32,
var _addWhereTermØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_addWhereTermØ00__func__Ø000[0], str(94977), 13)
+ crt.Xstrncpy(nil, &_addWhereTermØ00__func__Ø000[0], str(95005), 13)
}
-// Allocate and return a pointer to an expression to load the column iCol
-// from datasource iSrc in SrcList pSrc.
+// C comment
+// /*
+// ** Allocate and return a pointer to an expression to load the column iCol
+// ** from datasource iSrc in SrcList pSrc.
+// */
func _sqlite3CreateColumnExpr(tls *crt.TLS, _db *Xsqlite3, _pSrc *XSrcList, _iSrc int32, _iCol int32) (r0 *XExpr) {
var _1_pItem *TSrcList_item
var _p *XExpr
- _p = _sqlite3ExprAlloc(tls, _db, i32(152), nil, i32(0))
+ _p = _sqlite3ExprAlloc(tls, _db, int32(152), nil, int32(0))
if _p == nil {
goto _0
}
- _1_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(_iSrc)))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X14))))) = (*XTable)(_1_pItem.X4)
- *(*int32)(unsafe.Pointer(&(_p.X8))) = _1_pItem.X11
- if int32((*XTable)(_p.X14).X10) == _iCol {
- *(*int16)(unsafe.Pointer(&(_p.X9))) = int16(i32(-1))
+ _1_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_iSrc))
+ *(**XTable)(unsafe.Pointer(&_p.XpTab)) = (*XTable)(_1_pItem.XpTab)
+ _p.XiTable = _1_pItem.XiCursor
+ if int32((*XTable)(_p.XpTab).XiPKey) == _iCol {
+ _p.XiColumn = int16(-1)
goto _2
}
- *(*int16)(unsafe.Pointer(&(_p.X9))) = int16(_iCol)
- {
- p := (*uint64)(unsafe.Pointer(&(_1_pItem.X14)))
- *p = (*p) | (u64(1) << uint(func() int32 {
- if _iCol >= i32(64) {
- return i32(63)
- }
- return _iCol
- }()))
- sink17(*p)
- }
+ _p.XiColumn = int16(_iCol)
+ _1_pItem.XcolUsed |= uint64(1) << uint(func() int32 {
+ if _iCol >= int32(64) {
+ return int32(63)
+ }
+ return _iCol
+ }())
_2:
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X2)))
- *p = (*p) | uint32(i32(4))
- sink5(*p)
- }
+ _p.Xflags |= uint32(4)
_0:
return _p
}
-// Allocate an Expr node which joins as many as two subtrees.
-//
-// One or both of the subtrees can be NULL. Return a pointer to the new
-// Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed,
-// free the subtrees and return NULL.
+// C comment
+// /*
+// ** Allocate an Expr node which joins as many as two subtrees.
+// **
+// ** One or both of the subtrees can be NULL. Return a pointer to the new
+// ** Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed,
+// ** free the subtrees and return NULL.
+// */
func _sqlite3PExpr(tls *crt.TLS, _pParse *XParse, _op int32, _pLeft *XExpr, _pRight *XExpr) (r0 *XExpr) {
var _p *XExpr
- if (_op == i32(71)) && ((_pParse.X16) == i32(0)) {
- _p = _sqlite3ExprAnd(tls, (*Xsqlite3)(_pParse.X0), _pLeft, _pRight)
+ if (_op == int32(71)) && (_pParse.XnErr == int32(0)) {
+ _p = _sqlite3ExprAnd(tls, (*Xsqlite3)(_pParse.Xdb), _pLeft, _pRight)
goto _2
}
- _p = (*XExpr)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.X0), uint64(u32(48))))
+ _p = (*XExpr)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.Xdb), uint64(48)))
if _p != nil {
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(48))
- *(*uint8)(unsafe.Pointer(&(_p.X0))) = uint8(_op & i32(255))
- *(*int16)(unsafe.Pointer(&(_p.X10))) = int16(i32(-1))
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(48))
+ _p.Xop = uint8(_op & int32(255))
+ _p.XiAgg = int16(-1)
}
- _sqlite3ExprAttachSubtrees(tls, (*Xsqlite3)(_pParse.X0), _p, _pLeft, _pRight)
+ _sqlite3ExprAttachSubtrees(tls, (*Xsqlite3)(_pParse.Xdb), _p, _pLeft, _pRight)
_2:
if _p != nil {
- _sqlite3ExprCheckHeight(tls, _pParse, _p.X7)
+ _sqlite3ExprCheckHeight(tls, _pParse, _p.XnHeight)
}
return _p
}
-// Join two expressions using an AND operator. If either expression is
-// NULL, then just return the other expression.
-//
-// If one side or the other of the AND is known to be false, then instead
-// of returning an AND expression, just return a constant expression with
-// a value of false.
+// C comment
+// /*
+// ** Join two expressions using an AND operator. If either expression is
+// ** NULL, then just return the other expression.
+// **
+// ** If one side or the other of the AND is known to be false, then instead
+// ** of returning an AND expression, just return a constant expression with
+// ** a value of false.
+// */
func _sqlite3ExprAnd(tls *crt.TLS, _db *Xsqlite3, _pLeft *XExpr, _pRight *XExpr) (r0 *XExpr) {
var _4_pNew *XExpr
if _pLeft == nil {
@@ -73032,67 +74137,70 @@ func _sqlite3ExprAnd(tls *crt.TLS, _db *Xsqlite3, _pLeft *XExpr, _pRight *XExpr)
if _exprAlwaysFalse(tls, _pLeft) != 0 || _exprAlwaysFalse(tls, _pRight) != 0 {
_sqlite3ExprDelete(tls, _db, _pLeft)
_sqlite3ExprDelete(tls, _db, _pRight)
- return _sqlite3ExprAlloc(tls, _db, i32(134), (*XToken)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3IntTokens))+8*uintptr(i32(0)))), i32(0))
+ return _sqlite3ExprAlloc(tls, _db, int32(134), elem56((*XToken)(unsafe.Pointer(&_sqlite3IntTokens)), 0), int32(0))
}
- _4_pNew = _sqlite3ExprAlloc(tls, _db, i32(71), nil, i32(0))
+ _4_pNew = _sqlite3ExprAlloc(tls, _db, int32(71), nil, int32(0))
_sqlite3ExprAttachSubtrees(tls, _db, _4_pNew, _pLeft, _pRight)
return _4_pNew
}
func _exprAlwaysFalse(tls *crt.TLS, _p *XExpr) (r0 int32) {
var _v int32
- _v = i32(0)
- if ((_p.X2) & uint32(i32(1))) != uint32(i32(0)) {
- return i32(0)
+ _v = int32(0)
+ if (_p.Xflags & uint32(1)) != (0) {
+ return int32(0)
}
if _sqlite3ExprIsInteger(tls, _p, &_v) == 0 {
- return i32(0)
+ return int32(0)
}
- return bool2int(_v == i32(0))
+ return bool2int(_v == int32(0))
}
-// If the expression p codes a constant integer that is small enough
-// to fit in a 32-bit integer, return 1 and put the value of the integer
-// in *pValue. If the expression is not an integer or if it is too big
-// to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
+// C comment
+// /*
+// ** If the expression p codes a constant integer that is small enough
+// ** to fit in a 32-bit integer, return 1 and put the value of the integer
+// ** in *pValue. If the expression is not an integer or if it is too big
+// ** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
+// */
func _sqlite3ExprIsInteger(tls *crt.TLS, _p *XExpr, _pValue *int32) (r0 int32) {
var _rc, _4_v int32
- _rc = i32(0)
+ _rc = int32(0)
if _p == nil {
- return i32(0)
+ return int32(0)
}
func() {
- if int32(_p.X0) == i32(134) && ((_p.X2)&uint32(i32(1024))) == uint32(i32(0)) && _sqlite3GetInt32(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3))))), &_rc) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92815), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIsIntegerØ00__func__Ø000))), unsafe.Pointer(str(94990)))
+ if int32(_p.Xop) == int32(134) && (_p.Xflags&uint32(1024)) == (0) && _sqlite3GetInt32(tls, *(**int8)(unsafe.Pointer(&_p.Xu)), &_rc) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92815), unsafe.Pointer(&_sqlite3ExprIsIntegerØ00__func__Ø000), unsafe.Pointer(str(95018)))
crt.X__builtin_abort(tls)
}
}()
- if ((_p.X2) & uint32(i32(1024))) != 0 {
- *_pValue = *(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))
- return i32(1)
+ if (_p.Xflags & uint32(1024)) != 0 {
+ *_pValue = *(*int32)(unsafe.Pointer(&_p.Xu))
+ return int32(1)
}
- switch int32(_p.X0) {
- case i32(155):
+ switch int32(_p.Xop) {
+ case int32(155):
goto _8
- case i32(156):
+ case int32(156):
goto _7
default:
goto _9
}
_7:
- _rc = _sqlite3ExprIsInteger(tls, (*XExpr)(_p.X4), _pValue)
+ _rc = _sqlite3ExprIsInteger(tls, (*XExpr)(_p.XpLeft), _pValue)
goto _10
_8:
- if _sqlite3ExprIsInteger(tls, (*XExpr)(_p.X4), &_4_v) != 0 {
+ if _sqlite3ExprIsInteger(tls, (*XExpr)(_p.XpLeft), &_4_v) != 0 {
func() {
- if _4_v == i32(-2147483648) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92830), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIsIntegerØ00__func__Ø000))), unsafe.Pointer(str(95079)))
+ if _4_v == int32(-2147483648) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92830), unsafe.Pointer(&_sqlite3ExprIsIntegerØ00__func__Ø000), unsafe.Pointer(str(95107)))
crt.X__builtin_abort(tls)
}
}()
*_pValue = -_4_v
- _rc = i32(1)
+ _rc = int32(1)
}
goto _10
_9:
@@ -73104,24 +74212,31 @@ _10:
var _sqlite3ExprIsIntegerØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprIsIntegerØ00__func__Ø000[0], str(95098), 21)
+ crt.Xstrncpy(nil, &_sqlite3ExprIsIntegerØ00__func__Ø000[0], str(95126), 21)
}
+// C comment
+// /*
+// ** Constant tokens for values 0 and 1.
+// */
var _sqlite3IntTokens [2]XToken
func init() {
- _sqlite3IntTokens = [2]XToken{XToken{X0: str(4908), X1: u32(1)}, XToken{X0: str(50040), X1: u32(1)}}
+ _sqlite3IntTokens = [2]XToken{XToken{Xz: str(4809), Xn: uint32(1)}, XToken{Xz: str(49995), Xn: uint32(1)}}
}
-// Attach subtrees pLeft and pRight to the Expr node pRoot.
-//
-// If pRoot==NULL that means that a memory allocation error has occurred.
-// In that case, delete the subtrees pLeft and pRight.
+// C comment
+// /*
+// ** Attach subtrees pLeft and pRight to the Expr node pRoot.
+// **
+// ** If pRoot==NULL that means that a memory allocation error has occurred.
+// ** In that case, delete the subtrees pLeft and pRight.
+// */
func _sqlite3ExprAttachSubtrees(tls *crt.TLS, _db *Xsqlite3, _pRoot *XExpr, _pLeft *XExpr, _pRight *XExpr) {
if _pRoot == nil {
func() {
- if (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91693), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAttachSubtreesØ00__func__Ø000))), unsafe.Pointer(str(47848)))
+ if _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91693), unsafe.Pointer(&_sqlite3ExprAttachSubtreesØ00__func__Ø000), unsafe.Pointer(str(47803)))
crt.X__builtin_abort(tls)
}
}()
@@ -73130,20 +74245,12 @@ func _sqlite3ExprAttachSubtrees(tls *crt.TLS, _db *Xsqlite3, _pRoot *XExpr, _pLe
goto _3
}
if _pRight != nil {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRoot.X5))))) = _pRight
- {
- p := (*uint32)(unsafe.Pointer(&(_pRoot.X2)))
- *p = (*p) | (uint32(i32(2097408)) & (_pRight.X2))
- sink5(*p)
- }
+ *(**XExpr)(unsafe.Pointer(&_pRoot.XpRight)) = _pRight
+ _pRoot.Xflags |= uint32(2097408) & _pRight.Xflags
}
if _pLeft != nil {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRoot.X4))))) = _pLeft
- {
- p := (*uint32)(unsafe.Pointer(&(_pRoot.X2)))
- *p = (*p) | (uint32(i32(2097408)) & (_pLeft.X2))
- sink5(*p)
- }
+ *(**XExpr)(unsafe.Pointer(&_pRoot.XpLeft)) = _pLeft
+ _pRoot.Xflags |= uint32(2097408) & _pLeft.Xflags
}
_exprSetHeight(tls, _pRoot)
_3:
@@ -73152,66 +74259,67 @@ _3:
var _sqlite3ExprAttachSubtreesØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprAttachSubtreesØ00__func__Ø000[0], str(95119), 26)
+ crt.Xstrncpy(nil, &_sqlite3ExprAttachSubtreesØ00__func__Ø000[0], str(95147), 26)
}
-// Set the Expr.nHeight variable in the structure passed as an
-// argument. An expression with no children, Expr.pList or
-// Expr.pSelect member has a height of 1. Any other expression
-// has a height equal to the maximum height of any other
-// referenced Expr plus one.
-//
-// Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags,
-// if appropriate.
+// C comment
+// /*
+// ** Set the Expr.nHeight variable in the structure passed as an
+// ** argument. An expression with no children, Expr.pList or
+// ** Expr.pSelect member has a height of 1. Any other expression
+// ** has a height equal to the maximum height of any other
+// ** referenced Expr plus one.
+// **
+// ** Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags,
+// ** if appropriate.
+// */
func _exprSetHeight(tls *crt.TLS, _p *XExpr) {
var _nHeight int32
- _nHeight = i32(0)
- _heightOfExpr(tls, (*XExpr)(_p.X4), &_nHeight)
- _heightOfExpr(tls, (*XExpr)(_p.X5), &_nHeight)
- if ((_p.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- _heightOfSelect(tls, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))), &_nHeight)
+ _nHeight = int32(0)
+ _heightOfExpr(tls, (*XExpr)(_p.XpLeft), &_nHeight)
+ _heightOfExpr(tls, (*XExpr)(_p.XpRight), &_nHeight)
+ if (_p.Xflags & uint32(2048)) != (0) {
+ _heightOfSelect(tls, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))), &_nHeight)
goto _2
}
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))) != nil {
- _heightOfExprList(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))), &_nHeight)
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X2)))
- *p = (*p) | (uint32(i32(2097408)) & _sqlite3ExprListFlags(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6))))))))
- sink5(*p)
- }
+ if (*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))) != nil {
+ _heightOfExprList(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))), &_nHeight)
+ _p.Xflags |= uint32(2097408) & _sqlite3ExprListFlags(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))))
}
_2:
- *(*int32)(unsafe.Pointer(&(_p.X7))) = _nHeight + i32(1)
-}
-
-// The following three functions, heightOfExpr(), heightOfExprList()
-// and heightOfSelect(), are used to determine the maximum height
-// of any expression tree referenced by the structure passed as the
-// first argument.
-//
-// If this maximum height is greater than the current value pointed
-// to by pnHeight, the second parameter, then set *pnHeight to that
-// value.
+ _p.XnHeight = _nHeight + int32(1)
+}
+
+// C comment
+// /* The following three functions, heightOfExpr(), heightOfExprList()
+// ** and heightOfSelect(), are used to determine the maximum height
+// ** of any expression tree referenced by the structure passed as the
+// ** first argument.
+// **
+// ** If this maximum height is greater than the current value pointed
+// ** to by pnHeight, the second parameter, then set *pnHeight to that
+// ** value.
+// */
func _heightOfExpr(tls *crt.TLS, _p *XExpr, _pnHeight *int32) {
if _p == nil {
goto _0
}
- if (_p.X7) > (*_pnHeight) {
- *_pnHeight = _p.X7
+ if _p.XnHeight > (*_pnHeight) {
+ *_pnHeight = _p.XnHeight
}
_0:
}
func _heightOfSelect(tls *crt.TLS, _p *XSelect, _pnHeight *int32) {
if _p != nil {
- _heightOfExpr(tls, (*XExpr)(_p.X9), _pnHeight)
- _heightOfExpr(tls, (*XExpr)(_p.X11), _pnHeight)
- _heightOfExpr(tls, (*XExpr)(_p.X15), _pnHeight)
- _heightOfExpr(tls, (*XExpr)(_p.X16), _pnHeight)
- _heightOfExprList(tls, (*XExprList)(_p.X0), _pnHeight)
- _heightOfExprList(tls, (*XExprList)(_p.X10), _pnHeight)
- _heightOfExprList(tls, (*XExprList)(_p.X12), _pnHeight)
- _heightOfSelect(tls, (*XSelect)(_p.X13), _pnHeight)
+ _heightOfExpr(tls, (*XExpr)(_p.XpWhere), _pnHeight)
+ _heightOfExpr(tls, (*XExpr)(_p.XpHaving), _pnHeight)
+ _heightOfExpr(tls, (*XExpr)(_p.XpLimit), _pnHeight)
+ _heightOfExpr(tls, (*XExpr)(_p.XpOffset), _pnHeight)
+ _heightOfExprList(tls, (*XExprList)(_p.XpEList), _pnHeight)
+ _heightOfExprList(tls, (*XExprList)(_p.XpGroupBy), _pnHeight)
+ _heightOfExprList(tls, (*XExprList)(_p.XpOrderBy), _pnHeight)
+ _heightOfSelect(tls, (*XSelect)(_p.XpPrior), _pnHeight)
}
}
@@ -73220,45 +74328,44 @@ func _heightOfExprList(tls *crt.TLS, _p *XExprList, _pnHeight *int32) {
if _p == nil {
goto _0
}
- _1_i = i32(0)
+ _1_i = int32(0)
_1:
- if _1_i >= (_p.X0) {
+ if _1_i >= _p.XnExpr {
goto _4
}
- _heightOfExpr(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_p.X2)))))+20*uintptr(_1_i))).X0), _pnHeight)
+ _heightOfExpr(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_1_i)).XpExpr), _pnHeight)
_1_i += 1
goto _1
_4:
_0:
}
-// Return the bitwise-OR of all Expr.flags fields in the given
-// ExprList.
+// C comment
+// /*
+// ** Return the bitwise-OR of all Expr.flags fields in the given
+// ** ExprList.
+// */
func _sqlite3ExprListFlags(tls *crt.TLS, _pList *XExprList) (r0 uint32) {
var _i int32
var _m uint32
var _2_pExpr *XExpr
- _m = u32(0)
+ _m = uint32(0)
if _pList == nil {
goto _0
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _4
}
- _2_pExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(_i))).X0)
+ _2_pExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XpExpr)
func() {
if _2_pExpr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92578), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListFlagsØ00__func__Ø000))), unsafe.Pointer(str(43636)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92578), unsafe.Pointer(&_sqlite3ExprListFlagsØ00__func__Ø000), unsafe.Pointer(str(43591)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_m
- *p = (*p) | (_2_pExpr.X2)
- sink5(*p)
- }
+ _m |= _2_pExpr.Xflags
_i += 1
goto _1
_4:
@@ -73269,85 +74376,83 @@ _0:
var _sqlite3ExprListFlagsØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprListFlagsØ00__func__Ø000[0], str(95145), 21)
+ crt.Xstrncpy(nil, &_sqlite3ExprListFlagsØ00__func__Ø000[0], str(95173), 21)
}
-// Check that argument nHeight is less than or equal to the maximum
-// expression depth allowed. If it is not, leave an error message in
-// pParse.
+// C comment
+// /*
+// ** Check that argument nHeight is less than or equal to the maximum
+// ** expression depth allowed. If it is not, leave an error message in
+// ** pParse.
+// */
func _sqlite3ExprCheckHeight(tls *crt.TLS, _pParse *XParse, _nHeight int32) (r0 int32) {
var _rc, _mxHeight int32
- _rc = i32(0)
- _mxHeight = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_pParse.X0).X31))))) + 4*uintptr(i32(3))))
+ _rc = int32(0)
+ _mxHeight = *elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_pParse.Xdb).XaLimit))), uintptr(3))
if _nHeight > _mxHeight {
- _sqlite3ErrorMsg(tls, _pParse, str(95166), _mxHeight)
- _rc = i32(1)
+ _sqlite3ErrorMsg(tls, _pParse, str(95194), _mxHeight)
+ _rc = int32(1)
}
return _rc
}
-// Set the EP_FromJoin property on all terms of the given expression.
-// And set the Expr.iRightJoinTable to iTable for every term in the
-// expression.
-//
-// The EP_FromJoin property is used on terms of an expression to tell
-// the LEFT OUTER JOIN processing logic that this term is part of the
-// join restriction specified in the ON or USING clause and not a part
-// of the more general WHERE clause. These terms are moved over to the
-// WHERE clause during join processing but we need to remember that they
-// originated in the ON or USING clause.
-//
-// The Expr.iRightJoinTable tells the WHERE clause processing that the
-// expression depends on table iRightJoinTable even if that table is not
-// explicitly mentioned in the expression. That information is needed
-// for cases like this:
-//
-// SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.b AND t1.x=5
-//
-// The where clause needs to defer the handling of the t1.x=5
-// term until after the t2 loop of the join. In that way, a
-// NULL t2 row will be inserted whenever t1.x!=5. If we do not
-// defer the handling of t1.x=5, it will be processed immediately
-// after the t1 loop and rows with t1.x!=5 will never appear in
-// the output, which is incorrect.
+// C comment
+// /*
+// ** Set the EP_FromJoin property on all terms of the given expression.
+// ** And set the Expr.iRightJoinTable to iTable for every term in the
+// ** expression.
+// **
+// ** The EP_FromJoin property is used on terms of an expression to tell
+// ** the LEFT OUTER JOIN processing logic that this term is part of the
+// ** join restriction specified in the ON or USING clause and not a part
+// ** of the more general WHERE clause. These terms are moved over to the
+// ** WHERE clause during join processing but we need to remember that they
+// ** originated in the ON or USING clause.
+// **
+// ** The Expr.iRightJoinTable tells the WHERE clause processing that the
+// ** expression depends on table iRightJoinTable even if that table is not
+// ** explicitly mentioned in the expression. That information is needed
+// ** for cases like this:
+// **
+// ** SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.b AND t1.x=5
+// **
+// ** The where clause needs to defer the handling of the t1.x=5
+// ** term until after the t2 loop of the join. In that way, a
+// ** NULL t2 row will be inserted whenever t1.x!=5. If we do not
+// ** defer the handling of t1.x=5, it will be processed immediately
+// ** after the t1 loop and rows with t1.x!=5 will never appear in
+// ** the output, which is incorrect.
+// */
func _setJoinExpr(tls *crt.TLS, _p *XExpr, _iTable int32) {
var _2_i int32
_0:
if _p == nil {
goto _1
}
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X2)))
- *p = (*p) | uint32(i32(1))
- sink5(*p)
- }
+ _p.Xflags |= uint32(1)
func() {
- if ((_p.X2) & uint32(i32(24576))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116896), unsafe.Pointer((*int8)(unsafe.Pointer(&_setJoinExprØ00__func__Ø000))), unsafe.Pointer(str(49429)))
+ if (_p.Xflags & uint32(24576)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116896), unsafe.Pointer(&_setJoinExprØ00__func__Ø000), unsafe.Pointer(str(49384)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X2)))
- *p = (*p) | uint32(i32(131072))
- sink5(*p)
- }
- *(*int16)(unsafe.Pointer(&(_p.X11))) = int16(_iTable)
- if int32(_p.X0) != i32(151) || (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))) == nil {
+ _p.Xflags |= uint32(131072)
+ _p.XiRightJoinTable = int16(_iTable)
+ if int32(_p.Xop) != int32(151) || (*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))) == nil {
goto _5
}
- _2_i = i32(0)
+ _2_i = int32(0)
_6:
- if _2_i >= ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))).X0) {
+ if _2_i >= ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))).XnExpr) {
goto _9
}
- _setJoinExpr(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))).X2)))))+20*uintptr(_2_i))).X0), _iTable)
+ _setJoinExpr(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))).Xa))), uintptr(_2_i)).XpExpr), _iTable)
_2_i += 1
goto _6
_9:
_5:
- _setJoinExpr(tls, (*XExpr)(_p.X4), _iTable)
- _p = (*XExpr)(_p.X5)
+ _setJoinExpr(tls, (*XExpr)(_p.XpLeft), _iTable)
+ _p = (*XExpr)(_p.XpRight)
goto _0
_1:
}
@@ -73355,116 +74460,120 @@ _1:
var _setJoinExprØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_setJoinExprØ00__func__Ø000[0], str(95214), 12)
+ crt.Xstrncpy(nil, &_setJoinExprØ00__func__Ø000[0], str(95242), 12)
}
-// Subqueries stores the original database, table and column names for their
-// result sets in ExprList.a[].zSpan, in the form "DATABASE.TABLE.COLUMN".
-// Check to see if the zSpan given to this routine matches the zDb, zTab,
-// and zCol. If any of zDb, zTab, and zCol are NULL then those fields will
-// match anything.
+// C comment
+// /*
+// ** Subqueries stores the original database, table and column names for their
+// ** result sets in ExprList.a[].zSpan, in the form "DATABASE.TABLE.COLUMN".
+// ** Check to see if the zSpan given to this routine matches the zDb, zTab,
+// ** and zCol. If any of zDb, zTab, and zCol are NULL then those fields will
+// ** match anything.
+// */
func _sqlite3MatchSpanName(tls *crt.TLS, _zSpan *int8, _zCol *int8, _zTab *int8, _zDb *int8) (r0 int32) {
var _n int32
- _n = i32(0)
+ _n = int32(0)
_0:
if func() int32 {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSpan)) + 1*uintptr(_n)))) != 0 {
- return i32(1)
+ if (*elem1(_zSpan, uintptr(_n))) != 0 {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89484), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MatchSpanNameØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89484), unsafe.Pointer(&_sqlite3MatchSpanNameØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() == 0 || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSpan)) + 1*uintptr(_n)))) == i32(46) {
+ }() == 0 || int32(*elem1(_zSpan, uintptr(_n))) == int32(46) {
goto _6
}
_n += 1
goto _0
_6:
- if (_zDb != nil) && ((Xsqlite3_strnicmp(tls, _zSpan, _zDb, _n) != i32(0)) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zDb)) + 1*uintptr(_n)))) != i32(0))) {
- return i32(0)
+ if (_zDb != nil) && ((Xsqlite3_strnicmp(tls, _zSpan, _zDb, _n) != int32(0)) || (int32(*elem1(_zDb, uintptr(_n))) != int32(0))) {
+ return int32(0)
}
- {
- p := &_zSpan
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n+i32(1))))
- sink0(*p)
- }
- _n = i32(0)
+ *(*uintptr)(unsafe.Pointer(&_zSpan)) += uintptr(_n + int32(1))
+ _n = int32(0)
_10:
if func() int32 {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSpan)) + 1*uintptr(_n)))) != 0 {
- return i32(1)
+ if (*elem1(_zSpan, uintptr(_n))) != 0 {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89489), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MatchSpanNameØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89489), unsafe.Pointer(&_sqlite3MatchSpanNameØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() == 0 || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zSpan)) + 1*uintptr(_n)))) == i32(46) {
+ }() == 0 || int32(*elem1(_zSpan, uintptr(_n))) == int32(46) {
goto _16
}
_n += 1
goto _10
_16:
- if (_zTab != nil) && ((Xsqlite3_strnicmp(tls, _zSpan, _zTab, _n) != i32(0)) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zTab)) + 1*uintptr(_n)))) != i32(0))) {
- return i32(0)
+ if (_zTab != nil) && ((Xsqlite3_strnicmp(tls, _zSpan, _zTab, _n) != int32(0)) || (int32(*elem1(_zTab, uintptr(_n))) != int32(0))) {
+ return int32(0)
}
- {
- p := &_zSpan
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_n+i32(1))))
- sink0(*p)
+ *(*uintptr)(unsafe.Pointer(&_zSpan)) += uintptr(_n + int32(1))
+ if (_zCol != nil) && (_sqlite3StrICmp(tls, _zSpan, _zCol) != int32(0)) {
+ return int32(0)
}
- if (_zCol != nil) && (_sqlite3StrICmp(tls, _zSpan, _zCol) != i32(0)) {
- return i32(0)
- }
- return i32(1)
+ return int32(1)
}
var _sqlite3MatchSpanNameØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3MatchSpanNameØ00__func__Ø000[0], str(95226), 21)
+ crt.Xstrncpy(nil, &_sqlite3MatchSpanNameØ00__func__Ø000[0], str(95254), 21)
}
-// Return the index in pList of the identifier named zId. Return -1
-// if not found.
+// C comment
+// /*
+// ** Return the index in pList of the identifier named zId. Return -1
+// ** if not found.
+// */
func _sqlite3IdListIndex(tls *crt.TLS, _pList *XIdList, _zName *int8) (r0 int32) {
var _i int32
if _pList == nil {
- return i32(-1)
+ return int32(-1)
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_pList.X1) {
+ if _i >= _pList.XnId {
goto _4
}
- if _sqlite3StrICmp(tls, (*TIdList_item)(unsafe.Pointer(uintptr(_pList.X0)+8*uintptr(_i))).X0, _zName) == i32(0) {
+ if _sqlite3StrICmp(tls, elem42((*TIdList_item)(_pList.Xa), uintptr(_i)).XzName, _zName) == int32(0) {
return _i
}
_i += 1
goto _1
_4:
- return i32(-1)
+ return int32(-1)
}
-// Generate a Token object from a string
+// C comment
+// /*
+// ** Generate a Token object from a string
+// */
func _sqlite3TokenInit(tls *crt.TLS, _p *XToken, _z *int8) {
- *(**int8)(unsafe.Pointer(&(_p.X0))) = _z
- *(*uint32)(unsafe.Pointer(&(_p.X1))) = uint32(_sqlite3Strlen30(tls, _z))
-}
-
-// Set the ExprList.a[].zName element of the most recently added item
-// on the expression list.
-//
-// pList might be NULL following an OOM error. But pName should never be
-// NULL. If a memory allocation fails, the pParse->db->mallocFailed flag
-// is set.
+ _p.Xz = _z
+ _p.Xn = uint32(_sqlite3Strlen30(tls, _z))
+}
+
+// C comment
+// /*
+// ** Set the ExprList.a[].zName element of the most recently added item
+// ** on the expression list.
+// **
+// ** pList might be NULL following an OOM error. But pName should never be
+// ** NULL. If a memory allocation fails, the pParse->db->mallocFailed flag
+// ** is set.
+// */
func _sqlite3ExprListSetName(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _pName *XToken, _dequote int32) {
var _1_pItem *TExprList_item
func() {
- if _pList == nil && int32((*Xsqlite3)(_pParse.X0).X17) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92496), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListSetNameØ00__func__Ø000))), unsafe.Pointer(str(95247)))
+ if _pList == nil && int32((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92496), unsafe.Pointer(&_sqlite3ExprListSetNameØ00__func__Ø000), unsafe.Pointer(str(95275)))
crt.X__builtin_abort(tls)
}
}()
@@ -73472,21 +74581,21 @@ func _sqlite3ExprListSetName(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _
goto _3
}
func() {
- if (_pList.X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92499), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListSetNameØ00__func__Ø000))), unsafe.Pointer(str(21335)))
+ if _pList.XnExpr <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92499), unsafe.Pointer(&_sqlite3ExprListSetNameØ00__func__Ø000), unsafe.Pointer(str(21290)))
crt.X__builtin_abort(tls)
}
}()
- _1_pItem = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr((_pList.X0)-i32(1))))
+ _1_pItem = elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_pList.XnExpr-int32(1)))
func() {
- if (_1_pItem.X1) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92501), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListSetNameØ00__func__Ø000))), unsafe.Pointer(str(95287)))
+ if _1_pItem.XzName != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92501), unsafe.Pointer(&_sqlite3ExprListSetNameØ00__func__Ø000), unsafe.Pointer(str(95315)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&(_1_pItem.X1))) = _sqlite3DbStrNDup(tls, (*Xsqlite3)(_pParse.X0), _pName.X0, uint64(_pName.X1))
+ _1_pItem.XzName = _sqlite3DbStrNDup(tls, (*Xsqlite3)(_pParse.Xdb), _pName.Xz, uint64(_pName.Xn))
if _dequote != 0 {
- _sqlite3Dequote(tls, _1_pItem.X1)
+ _sqlite3Dequote(tls, _1_pItem.XzName)
}
_3:
}
@@ -73494,40 +74603,46 @@ _3:
var _sqlite3ExprListSetNameØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprListSetNameØ00__func__Ø000[0], str(95303), 23)
+ crt.Xstrncpy(nil, &_sqlite3ExprListSetNameØ00__func__Ø000[0], str(95331), 23)
}
-// If the SELECT passed as the second argument has an associated WITH
-// clause, pop it from the stack stored as part of the Parse object.
-//
-// This function is used as the xSelectCallback2() callback by
-// sqlite3SelectExpand() when walking a SELECT tree to resolve table
-// names and other FROM clause elements.
+// C comment
+// /*
+// ** If the SELECT passed as the second argument has an associated WITH
+// ** clause, pop it from the stack stored as part of the Parse object.
+// **
+// ** This function is used as the xSelectCallback2() callback by
+// ** sqlite3SelectExpand() when walking a SELECT tree to resolve table
+// ** names and other FROM clause elements.
+// */
func _selectPopWith(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) {
var _1_pWith *XWith
var _pParse *XParse
- _pParse = (*XParse)(_pWalker.X0)
- if (*XWith)(_pParse.X70) == nil || (*XSelect)(_p.X13) != nil {
+ _pParse = (*XParse)(_pWalker.XpParse)
+ if _pParse.XpWith == nil || (*XSelect)(_p.XpPrior) != nil {
goto _1
}
- _1_pWith = (*XWith)(_findRightmost(tls, _p).X17)
+ _1_pWith = (*XWith)(_findRightmost(tls, _p).XpWith)
if _1_pWith != nil {
func() {
- if (*XWith)(_pParse.X70) != _1_pWith {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120817), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectPopWithØ00__func__Ø000))), unsafe.Pointer(str(95326)))
+ if (*XWith)(_pParse.XpWith) != _1_pWith {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120817), unsafe.Pointer(&_selectPopWithØ00__func__Ø000), unsafe.Pointer(str(95354)))
crt.X__builtin_abort(tls)
}
}()
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X70))))) = (*XWith)(_1_pWith.X1)
+ *(**XWith)(unsafe.Pointer(&_pParse.XpWith)) = (*XWith)(_1_pWith.XpOuter)
}
_1:
}
-// Return a pointer to the right-most SELECT statement in a compound.
+// C comment
+// /*
+// ** Return a pointer to the right-most SELECT statement in a compound.
+// */
func _findRightmost(tls *crt.TLS, _p *XSelect) (r0 *XSelect) {
_0:
- if (*XSelect)(_p.X14) != nil {
- _p = (*XSelect)(_p.X14)
+ if _p.XpNext != nil {
+ _p = (*XSelect)(_p.XpNext)
goto _0
}
return _p
@@ -73536,51 +74651,56 @@ _0:
var _selectPopWithØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_selectPopWithØ00__func__Ø000[0], str(95347), 14)
+ crt.Xstrncpy(nil, &_selectPopWithØ00__func__Ø000[0], str(95375), 14)
}
-// Resolve all names in all expressions of a SELECT and in all
-// decendents of the SELECT, including compounds off of p->pPrior,
-// subqueries in expressions, and subqueries used as FROM clause
-// terms.
-//
-// See sqlite3ResolveExprNames() for a description of the kinds of
-// transformations that occur.
-//
-// All SELECT statements should have been expanded using
-// sqlite3SelectExpand() prior to invoking this routine.
+// C comment
+// /*
+// ** Resolve all names in all expressions of a SELECT and in all
+// ** decendents of the SELECT, including compounds off of p->pPrior,
+// ** subqueries in expressions, and subqueries used as FROM clause
+// ** terms.
+// **
+// ** See sqlite3ResolveExprNames() for a description of the kinds of
+// ** transformations that occur.
+// **
+// ** All SELECT statements should have been expanded using
+// ** sqlite3SelectExpand() prior to invoking this routine.
+// */
func _sqlite3ResolveSelectNames(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pOuterNC *XNameContext) {
var _w XWalker
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90853), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ResolveSelectNamesØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90853), unsafe.Pointer(&_sqlite3ResolveSelectNamesØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _resolveExprStep
- *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X2))))) = _resolveSelectStep
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_w.X0))))) = _pParse
- *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_w.X6))))))) = _pOuterNC
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _resolveExprStep
+ *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&_w.XxSelectCallback)) = _resolveSelectStep
+ *(**XParse)(unsafe.Pointer(&_w.XpParse)) = _pParse
+ *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_w.Xu)))) = _pOuterNC
_sqlite3WalkSelect(tls, &_w, _p)
- _ = _w
}
var _sqlite3ResolveSelectNamesØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ResolveSelectNamesØ00__func__Ø000[0], str(95361), 26)
+ crt.Xstrncpy(nil, &_sqlite3ResolveSelectNamesØ00__func__Ø000[0], str(95389), 26)
}
-// This routine is callback for sqlite3WalkExpr().
-//
-// Resolve symbolic names into TK_COLUMN operators for the current
-// node in the expression tree. Return 0 to continue the search down
-// the tree or 2 to abort the tree walk.
-//
-// This routine also does error checking and name resolution for
-// function names. The operator for aggregate functions is changed
-// to TK_AGG_FUNCTION.
+// C comment
+// /*
+// ** This routine is callback for sqlite3WalkExpr().
+// **
+// ** Resolve symbolic names into TK_COLUMN operators for the current
+// ** node in the expression tree. Return 0 to continue the search down
+// ** the tree or 2 to abort the tree walk.
+// **
+// ** This routine also does error checking and name resolution for
+// ** function names. The operator for aggregate functions is changed
+// ** to TK_AGG_FUNCTION.
+// */
func _resolveExprStep(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
var _1_i, _9_n, _9_no_such_func, _9_wrong_num_args, _9_is_agg, _9_nId, _18_auth, _30_nRef, _33_nLeft, _33_nRight int32
var _4_zColumn, _4_zTable, _4_zDb, _9_zId *int8
@@ -73591,40 +74711,36 @@ func _resolveExprStep(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32)
var _4_pRight *XExpr
var _pParse *XParse
var _pNC, _26_pNC2 *XNameContext
- _pNC = (*XNameContext)(*(*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6))))))
+ _pNC = (*XNameContext)(*(*unsafe.Pointer)(unsafe.Pointer(&_pWalker.Xu)))
func() {
if _pNC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89925), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveExprStepØ00__func__Ø000))), unsafe.Pointer(str(95387)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89925), unsafe.Pointer(&_resolveExprStepØ00__func__Ø000), unsafe.Pointer(str(95415)))
crt.X__builtin_abort(tls)
}
}()
- _pParse = (*XParse)(_pNC.X0)
+ _pParse = (*XParse)(_pNC.XpParse)
func() {
- if _pParse != (*XParse)(_pWalker.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89927), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveExprStepØ00__func__Ø000))), unsafe.Pointer(str(95394)))
+ if _pParse != (*XParse)(_pWalker.XpParse) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89927), unsafe.Pointer(&_resolveExprStepØ00__func__Ø000), unsafe.Pointer(str(95422)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pExpr.X2) & uint32(i32(4))) != uint32(i32(0)) {
- return i32(1)
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(4))
- sink5(*p)
+ if (_pExpr.Xflags & uint32(4)) != (0) {
+ return int32(1)
}
- if (*XSrcList)(_pNC.X1) == nil || ((*XSrcList)(_pNC.X1).X1) <= uint32(i32(0)) {
+ _pExpr.Xflags |= uint32(4)
+ if _pNC.XpSrcList == nil || ((*XSrcList)(_pNC.XpSrcList).XnAlloc) <= (0) {
goto _6
}
- _1_pSrcList = (*XSrcList)(_pNC.X1)
- _1_i = i32(0)
+ _1_pSrcList = (*XSrcList)(_pNC.XpSrcList)
+ _1_i = int32(0)
_7:
- if _1_i >= ((*XSrcList)(_pNC.X1).X0) {
+ if _1_i >= ((*XSrcList)(_pNC.XpSrcList).XnSrc) {
goto _10
}
func() {
- if ((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_1_pSrcList.X2)))))+68*uintptr(_1_i))).X11) < i32(0) || ((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_1_pSrcList.X2)))))+68*uintptr(_1_i))).X11) >= (_pParse.X17) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89936), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveExprStepØ00__func__Ø000))), unsafe.Pointer(str(95418)))
+ if (elem6((*TSrcList_item)(unsafe.Pointer(&_1_pSrcList.Xa)), uintptr(_1_i)).XiCursor) < int32(0) || (elem6((*TSrcList_item)(unsafe.Pointer(&_1_pSrcList.Xa)), uintptr(_1_i)).XiCursor) >= _pParse.XnTab {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89936), unsafe.Pointer(&_resolveExprStepØ00__func__Ø000), unsafe.Pointer(str(95446)))
crt.X__builtin_abort(tls)
}
}()
@@ -73632,181 +74748,169 @@ _7:
goto _7
_10:
_6:
- switch int32(_pExpr.X0) {
- case i32(20):
+ switch int32(_pExpr.Xop) {
+ case int32(20):
goto _18
- case i32(27):
+ case int32(27):
goto _15
- case i32(72):
+ case int32(72):
goto _22
- case i32(73):
+ case int32(73):
goto _22
- case i32(74):
+ case int32(74):
goto _18
- case i32(77):
+ case int32(77):
goto _22
- case i32(78):
+ case int32(78):
goto _22
- case i32(79):
+ case int32(79):
goto _22
- case i32(80):
+ case int32(80):
goto _22
- case i32(81):
+ case int32(81):
goto _22
- case i32(82):
+ case int32(82):
goto _22
- case i32(119):
+ case int32(119):
goto _18
- case i32(122):
+ case int32(122):
goto _15
- case i32(135):
+ case int32(135):
goto _21
- case i32(148):
+ case int32(148):
goto _22
- case i32(151):
+ case int32(151):
goto _17
default:
goto _31
}
_15:
- if int32(_pExpr.X0) == i32(27) {
+ if int32(_pExpr.Xop) == int32(27) {
_4_zDb = nil
_4_zTable = nil
- _4_zColumn = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))
+ _4_zColumn = *(**int8)(unsafe.Pointer(&_pExpr.Xu))
goto _33
}
- _notValid(tls, _pParse, _pNC, str(95483), i32(32))
- _4_pRight = (*XExpr)(_pExpr.X5)
- if int32(_4_pRight.X0) == i32(27) {
+ _notValid(tls, _pParse, _pNC, str(95511), int32(32))
+ _4_pRight = (*XExpr)(_pExpr.XpRight)
+ if int32(_4_pRight.Xop) == int32(27) {
_4_zDb = nil
- _4_zTable = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&((*XExpr)(_pExpr.X4).X3)))))
- _4_zColumn = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_4_pRight.X3)))))
+ _4_zTable = *(**int8)(unsafe.Pointer(&((*XExpr)(_pExpr.XpLeft).Xu)))
+ _4_zColumn = *(**int8)(unsafe.Pointer(&_4_pRight.Xu))
goto _35
}
func() {
- if int32(_4_pRight.X0) != i32(122) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89989), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveExprStepØ00__func__Ø000))), unsafe.Pointer(str(95500)))
+ if int32(_4_pRight.Xop) != int32(122) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89989), unsafe.Pointer(&_resolveExprStepØ00__func__Ø000), unsafe.Pointer(str(95528)))
crt.X__builtin_abort(tls)
}
}()
- _4_zDb = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&((*XExpr)(_pExpr.X4).X3)))))
- _4_zTable = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&((*XExpr)(_4_pRight.X4).X3)))))
- _4_zColumn = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&((*XExpr)(_4_pRight.X5).X3)))))
+ _4_zDb = *(**int8)(unsafe.Pointer(&((*XExpr)(_pExpr.XpLeft).Xu)))
+ _4_zTable = *(**int8)(unsafe.Pointer(&((*XExpr)(_4_pRight.XpLeft).Xu)))
+ _4_zColumn = *(**int8)(unsafe.Pointer(&((*XExpr)(_4_pRight.XpRight).Xu)))
_35:
_33:
return _lookupName(tls, _pParse, _4_zDb, _4_zTable, _4_zColumn, _pNC, _pExpr)
_17:
- _9_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
+ _9_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
_9_n = func() int32 {
if _9_pList != nil {
- return (_9_pList.X0)
+ return _9_pList.XnExpr
}
- return i32(0)
+ return int32(0)
}()
- _9_no_such_func = i32(0)
- _9_wrong_num_args = i32(0)
- _9_is_agg = i32(0)
- _9_enc = (*Xsqlite3)(_pParse.X0).X14
+ _9_no_such_func = int32(0)
+ _9_wrong_num_args = int32(0)
+ _9_is_agg = int32(0)
+ _9_enc = (*Xsqlite3)(_pParse.Xdb).Xenc
func() {
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90011), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveExprStepØ00__func__Ø000))), unsafe.Pointer(str(42778)))
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90011), unsafe.Pointer(&_resolveExprStepØ00__func__Ø000), unsafe.Pointer(str(42733)))
crt.X__builtin_abort(tls)
}
}()
- _9_zId = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))
+ _9_zId = *(**int8)(unsafe.Pointer(&_pExpr.Xu))
_9_nId = _sqlite3Strlen30(tls, _9_zId)
- _9_pDef = _sqlite3FindFunction(tls, (*Xsqlite3)(_pParse.X0), _9_zId, _9_n, _9_enc, uint8(i32(0)))
+ _9_pDef = _sqlite3FindFunction(tls, (*Xsqlite3)(_pParse.Xdb), _9_zId, _9_n, _9_enc, 0)
if _9_pDef != nil {
goto _42
}
- _9_pDef = _sqlite3FindFunction(tls, (*Xsqlite3)(_pParse.X0), _9_zId, i32(-2), _9_enc, uint8(i32(0)))
+ _9_pDef = _sqlite3FindFunction(tls, (*Xsqlite3)(_pParse.Xdb), _9_zId, int32(-2), _9_enc, 0)
if _9_pDef == nil {
- _9_no_such_func = i32(1)
+ _9_no_such_func = int32(1)
goto _44
}
- _9_wrong_num_args = i32(1)
+ _9_wrong_num_args = int32(1)
_44:
goto _45
_42:
- _9_is_agg = bool2int(*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_context)
- }{(*(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{(_9_pDef.X5)})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_context)
- }{nil})))
- if (int32(_9_pDef.X1) & i32(1024)) == 0 {
+ _9_is_agg = bool2int(func() func(*crt.TLS, *Xsqlite3_context) {
+ v := _9_pDef.XxFinalize
+ return *(*func(*crt.TLS, *Xsqlite3_context))(unsafe.Pointer(&v))
+ }() != nil)
+ if (int32(_9_pDef.XfuncFlags) & int32(1024)) == 0 {
goto _46
}
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(266240))
- sink5(*p)
- }
- if _9_n != i32(2) {
+ _pExpr.Xflags |= uint32(266240)
+ if _9_n != int32(2) {
goto _47
}
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = _exprProbability(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_9_pList.X2)))))+20*uintptr(i32(1)))).X0))
- if (_pExpr.X8) < i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(95519))
- *(*int32)(unsafe.Pointer(&(_pNC.X6))) += 1
+ _pExpr.XiTable = _exprProbability(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_9_pList.Xa)), uintptr(1)).XpExpr))
+ if _pExpr.XiTable < int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(95547))
+ _pNC.XnErr += 1
}
goto _49
_47:
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = func() int32 {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_9_pDef.X6)) + 1*uintptr(i32(0))))) == i32(117) {
- return i32(8388608)
+ _pExpr.XiTable = func() int32 {
+ if int32(*elem1(_9_pDef.XzName, 0)) == int32(117) {
+ return int32(8388608)
}
- return i32(125829120)
+ return int32(125829120)
}()
_49:
_46:
- _18_auth = _sqlite3AuthCheck(tls, _pParse, i32(31), nil, _9_pDef.X6, nil)
- if _18_auth == i32(0) {
+ _18_auth = _sqlite3AuthCheck(tls, _pParse, int32(31), nil, _9_pDef.XzName, nil)
+ if _18_auth == int32(0) {
goto _52
}
- if _18_auth == i32(1) {
- _sqlite3ErrorMsg(tls, _pParse, str(95590), unsafe.Pointer(_9_pDef.X6))
- *(*int32)(unsafe.Pointer(&(_pNC.X6))) += 1
+ if _18_auth == int32(1) {
+ _sqlite3ErrorMsg(tls, _pParse, str(95618), unsafe.Pointer(_9_pDef.XzName))
+ _pNC.XnErr += 1
}
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(101))
- return i32(1)
+ _pExpr.Xop = uint8(101)
+ return int32(1)
_52:
- if (int32(_9_pDef.X1) & i32(10240)) != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(524288))
- sink5(*p)
- }
+ if (int32(_9_pDef.XfuncFlags) & int32(10240)) != 0 {
+ _pExpr.Xflags |= uint32(524288)
}
- if (int32(_9_pDef.X1) & i32(2048)) == i32(0) {
- _notValid(tls, _pParse, _pNC, str(95625), i32(34))
+ if (int32(_9_pDef.XfuncFlags) & int32(2048)) == int32(0) {
+ _notValid(tls, _pParse, _pNC, str(95653), int32(34))
}
_45:
- if _9_is_agg != 0 && ((int32(_pNC.X7) & i32(1)) == i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(95653), _9_nId, unsafe.Pointer(_9_zId))
- *(*int32)(unsafe.Pointer(&(_pNC.X6))) += 1
- _9_is_agg = i32(0)
+ if _9_is_agg != 0 && ((int32(_pNC.XncFlags) & int32(1)) == int32(0)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(95681), _9_nId, unsafe.Pointer(_9_zId))
+ _pNC.XnErr += 1
+ _9_is_agg = int32(0)
goto _62
}
- if _9_no_such_func != 0 && (int32((*t21)(unsafe.Pointer(&((*Xsqlite3)(_pParse.X0).X33))).X2) == i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(95689), _9_nId, unsafe.Pointer(_9_zId))
- *(*int32)(unsafe.Pointer(&(_pNC.X6))) += 1
+ if _9_no_such_func != 0 && (int32(((*Xsqlite3)(_pParse.Xdb).Xinit).Xbusy) == int32(0)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(95717), _9_nId, unsafe.Pointer(_9_zId))
+ _pNC.XnErr += 1
goto _62
}
if _9_wrong_num_args != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(95712), _9_nId, unsafe.Pointer(_9_zId))
- *(*int32)(unsafe.Pointer(&(_pNC.X6))) += 1
+ _sqlite3ErrorMsg(tls, _pParse, str(95740), _9_nId, unsafe.Pointer(_9_zId))
+ _pNC.XnErr += 1
}
_62:
if _9_is_agg != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_pNC.X7)))
- *p = uint16(int32(*p) & i32(-2))
- sink14(*p)
+ p := &_pNC.XncFlags
+ *p = uint16(int32(*p) & int32(-2))
}
}
_sqlite3WalkExprList(tls, _pWalker, _9_pList)
@@ -73814,170 +74918,168 @@ _62:
goto _64
}
_26_pNC2 = _pNC
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(153))
- *(*uint8)(unsafe.Pointer(&(_pExpr.X12))) = uint8(i32(0))
+ _pExpr.Xop = uint8(153)
+ _pExpr.Xop2 = 0
_65:
- if (_26_pNC2 != nil) && (_sqlite3FunctionUsesThisSrc(tls, _pExpr, (*XSrcList)(_26_pNC2.X1)) == 0) {
- *(*uint8)(unsafe.Pointer(&(_pExpr.X12))) += 1
- _26_pNC2 = (*XNameContext)(_26_pNC2.X4)
+ if (_26_pNC2 != nil) && (_sqlite3FunctionUsesThisSrc(tls, _pExpr, (*XSrcList)(_26_pNC2.XpSrcList)) == 0) {
+ _pExpr.Xop2 += 1
+ _26_pNC2 = (*XNameContext)(_26_pNC2.XpNext)
goto _65
}
func() {
if _9_pDef == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90101), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveExprStepØ00__func__Ø000))), unsafe.Pointer(str(95757)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90101), unsafe.Pointer(&_resolveExprStepØ00__func__Ø000), unsafe.Pointer(str(95785)))
crt.X__builtin_abort(tls)
}
}()
if _26_pNC2 != nil {
- i32(0)
{
- p := (*uint16)(unsafe.Pointer(&(_26_pNC2.X7)))
- *p = uint16(int32(*p) | (i32(16) | (int32(_9_pDef.X1) & i32(4096))))
- sink14(*p)
+ p := &_26_pNC2.XncFlags
+ *p = uint16(int32(*p) | (int32(16) | (int32(_9_pDef.XfuncFlags) & int32(4096))))
}
}
{
- p := (*uint16)(unsafe.Pointer(&(_pNC.X7)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ p := &_pNC.XncFlags
+ *p = uint16(int32(*p) | int32(1))
}
_64:
- return i32(1)
+ return int32(1)
_18:
- if ((_pExpr.X2) & uint32(i32(2048))) == uint32(i32(0)) {
+ if (_pExpr.Xflags & uint32(2048)) == (0) {
goto _71
}
- _30_nRef = _pNC.X5
- _notValid(tls, _pParse, _pNC, str(95765), i32(38))
- _sqlite3WalkSelect(tls, _pWalker, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))))
+ _30_nRef = _pNC.XnRef
+ _notValid(tls, _pParse, _pNC, str(95793), int32(38))
+ _sqlite3WalkSelect(tls, _pWalker, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))))
func() {
- if (_pNC.X5) < _30_nRef {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90125), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveExprStepØ00__func__Ø000))), unsafe.Pointer(str(95776)))
+ if _pNC.XnRef < _30_nRef {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90125), unsafe.Pointer(&_resolveExprStepØ00__func__Ø000), unsafe.Pointer(str(95804)))
crt.X__builtin_abort(tls)
}
}()
- if _30_nRef != (_pNC.X5) {
+ if _30_nRef != _pNC.XnRef {
+ _pExpr.Xflags |= uint32(32)
{
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(32))
- sink5(*p)
- }
- {
- p := (*uint16)(unsafe.Pointer(&(_pNC.X7)))
- *p = uint16(int32(*p) | i32(64))
- sink14(*p)
+ p := &_pNC.XncFlags
+ *p = uint16(int32(*p) | int32(64))
}
}
_71:
goto _31
_21:
- _notValid(tls, _pParse, _pNC, str(95792), i32(38))
+ _notValid(tls, _pParse, _pNC, str(95820), int32(38))
goto _31
_22:
- if ((*Xsqlite3)(_pParse.X0).X17) != 0 {
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) != 0 {
goto _31
}
func() {
- if (*XExpr)(_pExpr.X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90148), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveExprStepØ00__func__Ø000))), unsafe.Pointer(str(95803)))
+ if (*XExpr)(_pExpr.XpLeft) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90148), unsafe.Pointer(&_resolveExprStepØ00__func__Ø000), unsafe.Pointer(str(95831)))
crt.X__builtin_abort(tls)
}
}()
- _33_nLeft = _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.X4))
- if int32(_pExpr.X0) != i32(73) {
+ _33_nLeft = _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.XpLeft))
+ if int32(_pExpr.Xop) != int32(73) {
goto _78
}
- _33_nRight = _sqlite3ExprVectorSize(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2)))))+20*uintptr(i32(0)))).X0))
+ _33_nRight = _sqlite3ExprVectorSize(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), 0).XpExpr))
if _33_nRight == _33_nLeft {
- _33_nRight = _sqlite3ExprVectorSize(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2)))))+20*uintptr(i32(1)))).X0))
+ _33_nRight = _sqlite3ExprVectorSize(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), uintptr(1)).XpExpr))
}
goto _80
_78:
func() {
- if (*XExpr)(_pExpr.X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90156), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveExprStepØ00__func__Ø000))), unsafe.Pointer(str(95819)))
+ if (*XExpr)(_pExpr.XpRight) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90156), unsafe.Pointer(&_resolveExprStepØ00__func__Ø000), unsafe.Pointer(str(95847)))
crt.X__builtin_abort(tls)
}
}()
- _33_nRight = _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.X5))
+ _33_nRight = _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.XpRight))
_80:
if _33_nLeft != _33_nRight {
- _sqlite3ErrorMsg(tls, _pParse, str(43181))
+ _sqlite3ErrorMsg(tls, _pParse, str(43136))
}
goto _31
_31:
return func() int32 {
- if (_pParse.X16) != 0 || (((*Xsqlite3)(_pParse.X0).X17) != 0) {
- return i32(2)
+ if _pParse.XnErr != 0 || (((*Xsqlite3)(_pParse.Xdb).XmallocFailed) != 0) {
+ return int32(2)
}
- return i32(0)
+ return int32(0)
}()
}
var _resolveExprStepØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_resolveExprStepØ00__func__Ø000[0], str(95836), 16)
+ crt.Xstrncpy(nil, &_resolveExprStepØ00__func__Ø000[0], str(95864), 16)
}
-// Report an error that an expression is not valid for some set of
-// pNC->ncFlags values determined by validMask.
+// C comment
+// /*
+// ** Report an error that an expression is not valid for some set of
+// ** pNC->ncFlags values determined by validMask.
+// */
func _notValid(tls *crt.TLS, _pParse *XParse, _pNC *XNameContext, _zMsg *int8, _validMask int32) {
var _1_zIn *int8
func() {
- if (_validMask & i32(-39)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89884), unsafe.Pointer((*int8)(unsafe.Pointer(&_notValidØ00__func__Ø000))), unsafe.Pointer(str(95852)))
+ if (_validMask & int32(-39)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89884), unsafe.Pointer(&_notValidØ00__func__Ø000), unsafe.Pointer(str(95880)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pNC.X7) & _validMask) == i32(0) {
+ if (int32(_pNC.XncFlags) & _validMask) == int32(0) {
goto _2
}
- _1_zIn = str(95903)
- if (int32(_pNC.X7) & i32(32)) != 0 {
- _1_zIn = str(95931)
+ _1_zIn = str(95931)
+ if (int32(_pNC.XncFlags) & int32(32)) != 0 {
+ _1_zIn = str(95959)
goto _5
}
- if (int32(_pNC.X7) & i32(4)) != 0 {
- _1_zIn = str(95949)
+ if (int32(_pNC.XncFlags) & int32(4)) != 0 {
+ _1_zIn = str(95977)
}
_5:
- _sqlite3ErrorMsg(tls, _pParse, str(95967), unsafe.Pointer(_zMsg), unsafe.Pointer(_1_zIn))
+ _sqlite3ErrorMsg(tls, _pParse, str(95995), unsafe.Pointer(_zMsg), unsafe.Pointer(_1_zIn))
_2:
}
var _notValidØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_notValidØ00__func__Ø000[0], str(95987), 9)
-}
-
-// Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
-// that name in the set of source tables in pSrcList and make the pExpr
-// expression node refer back to that source column. The following changes
-// are made to pExpr:
-//
-// pExpr->iDb Set the index in db->aDb[] of the database X
-// (even if X is implied).
-// pExpr->iTable Set to the cursor number for the table obtained
-// from pSrcList.
-// pExpr->pTab Points to the Table structure of X.Y (even if
-// X and/or Y are implied.)
-// pExpr->iColumn Set to the column number within the table.
-// pExpr->op Set to TK_COLUMN.
-// pExpr->pLeft Any expression this points to is deleted
-// pExpr->pRight Any expression this points to is deleted.
-//
-// The zDb variable is the name of the database (the "X"). This value may be
-// NULL meaning that name is of the form Y.Z or Z. Any available database
-// can be used. The zTable variable is the name of the table (the "Y"). This
-// value can be NULL if zDb is also NULL. If zTable is NULL it
-// means that the form of the name is Z and that columns from any table
-// can be used.
-//
-// If the name cannot be resolved unambiguously, leave an error message
-// in pParse and return WRC_Abort. Return WRC_Prune on success.
+ crt.Xstrncpy(nil, &_notValidØ00__func__Ø000[0], str(96015), 9)
+}
+
+// C comment
+// /*
+// ** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
+// ** that name in the set of source tables in pSrcList and make the pExpr
+// ** expression node refer back to that source column. The following changes
+// ** are made to pExpr:
+// **
+// ** pExpr->iDb Set the index in db->aDb[] of the database X
+// ** (even if X is implied).
+// ** pExpr->iTable Set to the cursor number for the table obtained
+// ** from pSrcList.
+// ** pExpr->pTab Points to the Table structure of X.Y (even if
+// ** X and/or Y are implied.)
+// ** pExpr->iColumn Set to the column number within the table.
+// ** pExpr->op Set to TK_COLUMN.
+// ** pExpr->pLeft Any expression this points to is deleted
+// ** pExpr->pRight Any expression this points to is deleted.
+// **
+// ** The zDb variable is the name of the database (the "X"). This value may be
+// ** NULL meaning that name is of the form Y.Z or Z. Any available database
+// ** can be used. The zTable variable is the name of the table (the "Y"). This
+// ** value can be NULL if zDb is also NULL. If zTable is NULL it
+// ** means that the form of the name is Z and that columns from any table
+// ** can be used.
+// **
+// ** If the name cannot be resolved unambiguously, leave an error message
+// ** in pParse and return WRC_Abort. Return WRC_Prune on success.
+// */
func _lookupName(tls *crt.TLS, _pParse *XParse, _zDb *int8, _zTab *int8, _zCol *int8, _pNC *XNameContext, _pExpr *XExpr) (r0 int32) {
var _i, _j, _cnt, _cntTab, _nSubquery, _isTrigger, _9_hit, _21_op, _25_iCol, _45_n int32
var _13_zTabName, _36_zAs, _41_zErr *int8
@@ -73990,60 +75092,56 @@ func _lookupName(tls *crt.TLS, _pParse *XParse, _zDb *int8, _zTab *int8, _zCol *
var _37_pOrig *XExpr
var _pCol *XColumn
var _pTopNC *XNameContext
- _cnt = i32(0)
- _cntTab = i32(0)
- _nSubquery = i32(0)
- _db = (*Xsqlite3)(_pParse.X0)
+ _cnt = int32(0)
+ _cntTab = int32(0)
+ _nSubquery = int32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pMatch = nil
_pTopNC = _pNC
_pSchema = nil
- _isTrigger = i32(0)
+ _isTrigger = int32(0)
_pTab = nil
func() {
if _pNC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89548), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(95996)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89548), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96024)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _zCol == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89549), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96000)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89549), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96028)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_pExpr.X2) & uint32(i32(24576))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89550), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96005)))
+ if (_pExpr.Xflags & uint32(24576)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89550), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96033)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = i32(-1)
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X14))))) = nil
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(131072))
- sink5(*p)
- }
+ _pExpr.XiTable = int32(-1)
+ *(**XTable)(unsafe.Pointer(&_pExpr.XpTab)) = nil
+ _pExpr.Xflags |= uint32(131072)
if _zDb == nil {
goto _6
}
- if (int32(_pNC.X7) & i32(6)) != i32(0) {
+ if (int32(_pNC.XncFlags) & int32(6)) != int32(0) {
_zDb = nil
goto _8
}
- _i = i32(0)
+ _i = int32(0)
_9:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _12
}
func() {
- if ((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89572), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96054)))
+ if (elem27((*XDb)(_db.XaDb), uintptr(_i)).XzDbSName) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89572), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96082)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3StrICmp(tls, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_i))).X0, _zDb) == i32(0) {
- _pSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X4)
+ if _sqlite3StrICmp(tls, elem27((*XDb)(_db.XaDb), uintptr(_i)).XzDbSName, _zDb) == int32(0) {
+ _pSchema = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpSchema)
goto _12
}
_i += 1
@@ -74052,50 +75150,50 @@ _12:
_8:
_6:
func() {
- if _pNC == nil || _cnt != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89582), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96074)))
+ if _pNC == nil || _cnt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89582), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96102)))
crt.X__builtin_abort(tls)
}
}()
_19:
- _6_pSrcList = (*XSrcList)(_pNC.X1)
+ _6_pSrcList = (*XSrcList)(_pNC.XpSrcList)
if _6_pSrcList == nil {
goto _20
}
- *func() **TSrcList_item { _i = i32(0); return &_pItem }() = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_6_pSrcList.X2)))))
+ *func() **TSrcList_item { _i = int32(0); return &_pItem }() = (*TSrcList_item)(unsafe.Pointer(&_6_pSrcList.Xa))
_21:
- if _i >= (_6_pSrcList.X0) {
+ if _i >= _6_pSrcList.XnSrc {
goto _24
}
- _pTab = (*XTable)(_pItem.X4)
+ _pTab = (*XTable)(_pItem.XpTab)
func() {
- if _pTab == nil || (_pTab.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89590), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96088)))
+ if _pTab == nil || _pTab.XzName == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89590), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96116)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pTab.X11) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89591), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96114)))
+ if int32(_pTab.XnCol) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89591), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96142)))
crt.X__builtin_abort(tls)
}
}()
- if (*XSelect)(_pItem.X5) == nil || (((*XSelect)(_pItem.X5).X3)&uint32(i32(2048))) == uint32(i32(0)) {
+ if _pItem.XpSelect == nil || (((*XSelect)(_pItem.XpSelect).XselFlags)&uint32(2048)) == (0) {
goto _31
}
- _9_hit = i32(0)
- _6_pEList = (*XExprList)((*XSelect)(_pItem.X5).X0)
- _j = i32(0)
+ _9_hit = int32(0)
+ _6_pEList = (*XExprList)((*XSelect)(_pItem.XpSelect).XpEList)
+ _j = int32(0)
_32:
- if _j >= (_6_pEList.X0) {
+ if _j >= _6_pEList.XnExpr {
goto _35
}
- if _sqlite3MatchSpanName(tls, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_6_pEList.X2)))))+20*uintptr(_j))).X2, _zCol, _zTab, _zDb) != 0 {
+ if _sqlite3MatchSpanName(tls, elem57((*TExprList_item)(unsafe.Pointer(&_6_pEList.Xa)), uintptr(_j)).XzSpan, _zCol, _zTab, _zDb) != 0 {
_cnt += 1
- _cntTab = i32(2)
+ _cntTab = int32(2)
_pMatch = _pItem
- *(*int16)(unsafe.Pointer(&(_pExpr.X9))) = int16(_j)
- _9_hit = i32(1)
+ _pExpr.XiColumn = int16(_j)
+ _9_hit = int32(1)
}
_j += 1
goto _32
@@ -74104,54 +75202,54 @@ _35:
goto _22
}
_31:
- if (_zDb != nil) && ((*XSchema)(_pTab.X20) != _pSchema) {
+ if (_zDb != nil) && ((*XSchema)(_pTab.XpSchema) != _pSchema) {
goto _22
}
if _zTab == nil {
goto _41
}
_13_zTabName = func() *int8 {
- if (_pItem.X3) != nil {
- return (_pItem.X3)
+ if _pItem.XzAlias != nil {
+ return _pItem.XzAlias
}
- return (_pTab.X0)
+ return _pTab.XzName
}()
func() {
if _13_zTabName == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89611), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96127)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89611), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96155)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3StrICmp(tls, _13_zTabName, _zTab) != i32(0) {
+ if _sqlite3StrICmp(tls, _13_zTabName, _zTab) != int32(0) {
goto _22
}
_41:
- if i32(0) == postInc1(&_cntTab, int32(1)) {
+ if int32(0) == postInc2(&_cntTab, 1) {
_pMatch = _pItem
}
- *func() **XColumn { _j = i32(0); return &_pCol }() = (*XColumn)(_pTab.X1)
+ *func() **XColumn { _j = int32(0); return &_pCol }() = (*XColumn)(_pTab.XaCol)
_48:
- if _j >= int32(_pTab.X11) {
+ if _j >= int32(_pTab.XnCol) {
goto _51
}
- if _sqlite3StrICmp(tls, _pCol.X0, _zCol) != i32(0) {
+ if _sqlite3StrICmp(tls, _pCol.XzName, _zCol) != int32(0) {
goto _52
}
- if _cnt != i32(1) {
+ if _cnt != int32(1) {
goto _53
}
- if (int32((*t28)(unsafe.Pointer(&(_pItem.X9))).X0) & i32(4)) != 0 {
+ if (int32(_pItem.Xfg.Xjointype) & int32(4)) != 0 {
goto _49
}
- if _nameInUsingClause(tls, (*XIdList)(_pItem.X13), _zCol) != 0 {
+ if _nameInUsingClause(tls, (*XIdList)(_pItem.XpUsing), _zCol) != 0 {
goto _49
}
_53:
_cnt += 1
_pMatch = _pItem
- *(*int16)(unsafe.Pointer(&(_pExpr.X9))) = int16(func() int32 {
- if _j == int32(_pTab.X10) {
- return i32(-1)
+ _pExpr.XiColumn = int16(func() int32 {
+ if _j == int32(_pTab.XiPKey) {
+ return int32(-1)
}
return int32(int16(_j))
}())
@@ -74168,42 +75266,38 @@ _24:
if _pMatch == nil {
goto _58
}
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = _pMatch.X11
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X14))))) = (*XTable)(_pMatch.X4)
+ _pExpr.XiTable = _pMatch.XiCursor
+ *(**XTable)(unsafe.Pointer(&_pExpr.XpTab)) = (*XTable)(_pMatch.XpTab)
func() {
- if (int32((*t28)(unsafe.Pointer(&(_pMatch.X9))).X0) & i32(16)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89641), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96139)))
+ if (int32(_pMatch.Xfg.Xjointype) & int32(16)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89641), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96167)))
crt.X__builtin_abort(tls)
}
}()
- if (int32((*t28)(unsafe.Pointer(&(_pMatch.X9))).X0) & i32(8)) != i32(0) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(1048576))
- sink5(*p)
- }
+ if (int32(_pMatch.Xfg.Xjointype) & int32(8)) != int32(0) {
+ _pExpr.Xflags |= uint32(1048576)
}
- _pSchema = (*XSchema)((*XTable)(_pExpr.X14).X20)
+ _pSchema = (*XSchema)((*XTable)(_pExpr.XpTab).XpSchema)
_58:
_20:
- if _zDb != nil || _zTab == nil || _cntTab != i32(0) || (*XTable)(_pParse.X40) == nil {
+ if _zDb != nil || _zTab == nil || _cntTab != int32(0) || (*XTable)(_pParse.XpTriggerTab) == nil {
goto _65
}
- _21_op = int32(_pParse.X45)
+ _21_op = int32(_pParse.XeTriggerOp)
func() {
- if _21_op != i32(109) && _21_op != i32(110) && _21_op != i32(108) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89655), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96175)))
+ if _21_op != int32(109) && _21_op != int32(110) && _21_op != int32(108) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89655), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96203)))
crt.X__builtin_abort(tls)
}
}()
- if (_21_op != i32(109)) && (_sqlite3StrICmp(tls, str(43173), _zTab) == i32(0)) {
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = i32(1)
- _pTab = (*XTable)(_pParse.X40)
+ if (_21_op != int32(109)) && (_sqlite3StrICmp(tls, str(43128), _zTab) == int32(0)) {
+ _pExpr.XiTable = int32(1)
+ _pTab = (*XTable)(_pParse.XpTriggerTab)
goto _75
}
- if (_21_op != i32(108)) && (_sqlite3StrICmp(tls, str(43177), _zTab) == i32(0)) {
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = i32(0)
- _pTab = (*XTable)(_pParse.X40)
+ if (_21_op != int32(108)) && (_sqlite3StrICmp(tls, str(43132), _zTab) == int32(0)) {
+ _pExpr.XiTable = int32(0)
+ _pTab = (*XTable)(_pParse.XpTriggerTab)
goto _75
}
_pTab = nil
@@ -74211,115 +75305,107 @@ _75:
if _pTab == nil {
goto _76
}
- _pSchema = (*XSchema)(_pTab.X20)
+ _pSchema = (*XSchema)(_pTab.XpSchema)
_cntTab += 1
- *func() **XColumn { _25_iCol = i32(0); return &_pCol }() = (*XColumn)(_pTab.X1)
+ *func() **XColumn { _25_iCol = int32(0); return &_pCol }() = (*XColumn)(_pTab.XaCol)
_77:
- if _25_iCol >= int32(_pTab.X11) {
+ if _25_iCol >= int32(_pTab.XnCol) {
goto _80
}
- if _sqlite3StrICmp(tls, _pCol.X0, _zCol) != i32(0) {
+ if _sqlite3StrICmp(tls, _pCol.XzName, _zCol) != int32(0) {
goto _81
}
- if _25_iCol == int32(_pTab.X10) {
- _25_iCol = i32(-1)
+ if _25_iCol == int32(_pTab.XiPKey) {
+ _25_iCol = int32(-1)
}
goto _80
_81:
*(*uintptr)(unsafe.Pointer(func() **XColumn { _25_iCol += 1; return &_pCol }())) += uintptr(16)
goto _77
_80:
- if ((_25_iCol >= int32(_pTab.X11)) && _sqlite3IsRowid(tls, _zCol) != 0) && (((_pTab.X9) & uint32(i32(64))) == uint32(i32(0))) {
- _25_iCol = i32(-1)
+ if ((_25_iCol >= int32(_pTab.XnCol)) && _sqlite3IsRowid(tls, _zCol) != 0) && ((_pTab.XtabFlags & uint32(64)) == (0)) {
+ _25_iCol = int32(-1)
}
- if _25_iCol >= int32(_pTab.X11) {
+ if _25_iCol >= int32(_pTab.XnCol) {
goto _86
}
_cnt += 1
- if _25_iCol < i32(0) {
- *(*int8)(unsafe.Pointer(&(_pExpr.X1))) = int8(i32(68))
+ if _25_iCol < int32(0) {
+ _pExpr.Xaffinity = int8(68)
goto _92
}
- if (_pExpr.X8) == i32(0) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pParse.X43)))
- *p = (*p) | func() uint32 {
- if _25_iCol >= i32(32) {
- return u32(4294967295)
- }
- return (u32(1) << uint(_25_iCol))
- }()
- sink5(*p)
- }
- goto _92
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_pParse.X44)))
- *p = (*p) | func() uint32 {
- if _25_iCol >= i32(32) {
- return u32(4294967295)
+ if _pExpr.XiTable == int32(0) {
+ _pParse.Xoldmask |= func() uint32 {
+ if _25_iCol >= int32(32) {
+ return uint32(4294967295)
}
- return (u32(1) << uint(_25_iCol))
+ return (uint32(1) << uint(_25_iCol))
}()
- sink5(*p)
+ goto _92
}
+ _pParse.Xnewmask |= func() uint32 {
+ if _25_iCol >= int32(32) {
+ return uint32(4294967295)
+ }
+ return (uint32(1) << uint(_25_iCol))
+ }()
_92:
- *(*int16)(unsafe.Pointer(&(_pExpr.X9))) = int16(_25_iCol)
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X14))))) = _pTab
- _isTrigger = i32(1)
+ _pExpr.XiColumn = int16(_25_iCol)
+ *(**XTable)(unsafe.Pointer(&_pExpr.XpTab)) = _pTab
+ _isTrigger = int32(1)
_86:
_76:
_65:
- if (((((_cnt == i32(0)) && (_cntTab == i32(1))) && (_pMatch != nil)) && ((int32(_pNC.X7) & i32(32)) == i32(0))) && _sqlite3IsRowid(tls, _zCol) != 0) && ((((*XTable)(_pMatch.X4).X9) & uint32(i32(64))) == uint32(i32(0))) {
- _cnt = i32(1)
- *(*int16)(unsafe.Pointer(&(_pExpr.X9))) = int16(i32(-1))
- *(*int8)(unsafe.Pointer(&(_pExpr.X1))) = int8(i32(68))
+ if (((((_cnt == int32(0)) && (_cntTab == int32(1))) && (_pMatch != nil)) && ((int32(_pNC.XncFlags) & int32(32)) == int32(0))) && _sqlite3IsRowid(tls, _zCol) != 0) && ((((*XTable)(_pMatch.XpTab).XtabFlags) & uint32(64)) == (0)) {
+ _cnt = int32(1)
+ _pExpr.XiColumn = int16(-1)
+ _pExpr.Xaffinity = int8(68)
}
- if store42(&_6_pEList, (*XExprList)(_pNC.X2)) == nil || _zTab != nil || _cnt != i32(0) {
+ if store70(&_6_pEList, (*XExprList)(_pNC.XpEList)) == nil || _zTab != nil || _cnt != int32(0) {
goto _103
}
- _j = i32(0)
+ _j = int32(0)
_104:
- if _j >= (_6_pEList.X0) {
+ if _j >= _6_pEList.XnExpr {
goto _107
}
- _36_zAs = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_6_pEList.X2))))) + 20*uintptr(_j))).X1
- if _36_zAs == nil || _sqlite3StrICmp(tls, _36_zAs, _zCol) != i32(0) {
+ _36_zAs = elem57((*TExprList_item)(unsafe.Pointer(&_6_pEList.Xa)), uintptr(_j)).XzName
+ if _36_zAs == nil || _sqlite3StrICmp(tls, _36_zAs, _zCol) != int32(0) {
goto _109
}
func() {
- if (*XExpr)(_pExpr.X4) != nil || (*XExpr)(_pExpr.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89744), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96223)))
+ if (*XExpr)(_pExpr.XpLeft) != nil || (*XExpr)(_pExpr.XpRight) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89744), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96251)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89745), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96259)))
+ if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89745), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96287)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89746), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96277)))
+ if (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89746), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96305)))
crt.X__builtin_abort(tls)
}
}()
- _37_pOrig = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_6_pEList.X2))))) + 20*uintptr(_j))).X0)
- if ((int32(_pNC.X7) & i32(1)) == i32(0)) && (((_37_pOrig.X2) & uint32(i32(2))) != uint32(i32(0))) {
- _sqlite3ErrorMsg(tls, _pParse, str(96297), unsafe.Pointer(_36_zAs))
- return i32(2)
+ _37_pOrig = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_6_pEList.Xa)), uintptr(_j)).XpExpr)
+ if ((int32(_pNC.XncFlags) & int32(1)) == int32(0)) && ((_37_pOrig.Xflags & uint32(2)) != (0)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(96325), unsafe.Pointer(_36_zAs))
+ return int32(2)
}
- if _sqlite3ExprVectorSize(tls, _37_pOrig) != i32(1) {
- _sqlite3ErrorMsg(tls, _pParse, str(43181))
- return i32(2)
+ if _sqlite3ExprVectorSize(tls, _37_pOrig) != int32(1) {
+ _sqlite3ErrorMsg(tls, _pParse, str(43136))
+ return int32(2)
}
- _resolveAlias(tls, _pParse, _6_pEList, _j, _pExpr, str(0), _nSubquery)
- _cnt = i32(1)
+ _resolveAlias(tls, _pParse, _6_pEList, _j, _pExpr, str(284), _nSubquery)
+ _cnt = int32(1)
_pMatch = nil
func() {
if _zTab != nil || _zDb != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89759), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96328)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89759), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96356)))
crt.X__builtin_abort(tls)
}
}()
@@ -74332,468 +75418,463 @@ _103:
if _cnt != 0 {
goto _124
}
- _pNC = (*XNameContext)(_pNC.X4)
+ _pNC = (*XNameContext)(_pNC.XpNext)
_nSubquery += 1
if _pNC != nil {
goto _19
}
_124:
- if ((_cnt == i32(0)) && (_zTab == nil)) && (((_pExpr.X2) & uint32(i32(64))) != uint32(i32(0))) {
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(97))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X14))))) = nil
- return i32(1)
+ if ((_cnt == int32(0)) && (_zTab == nil)) && ((_pExpr.Xflags & uint32(64)) != (0)) {
+ _pExpr.Xop = uint8(97)
+ *(**XTable)(unsafe.Pointer(&_pExpr.XpTab)) = nil
+ return int32(1)
}
- if _cnt == i32(1) {
+ if _cnt == int32(1) {
goto _128
}
_41_zErr = func() *int8 {
- if _cnt == i32(0) {
- return str(96346)
+ if _cnt == int32(0) {
+ return str(96374)
}
- return str(96361)
+ return str(96389)
}()
if _zDb != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(96383), unsafe.Pointer(_41_zErr), unsafe.Pointer(_zDb), unsafe.Pointer(_zTab), unsafe.Pointer(_zCol))
+ _sqlite3ErrorMsg(tls, _pParse, str(96411), unsafe.Pointer(_41_zErr), unsafe.Pointer(_zDb), unsafe.Pointer(_zTab), unsafe.Pointer(_zCol))
goto _134
}
if _zTab != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(49822), unsafe.Pointer(_41_zErr), unsafe.Pointer(_zTab), unsafe.Pointer(_zCol))
+ _sqlite3ErrorMsg(tls, _pParse, str(49777), unsafe.Pointer(_41_zErr), unsafe.Pointer(_zTab), unsafe.Pointer(_zCol))
goto _134
}
- _sqlite3ErrorMsg(tls, _pParse, str(49832), unsafe.Pointer(_41_zErr), unsafe.Pointer(_zCol))
+ _sqlite3ErrorMsg(tls, _pParse, str(49787), unsafe.Pointer(_41_zErr), unsafe.Pointer(_zCol))
_134:
- *(*uint8)(unsafe.Pointer(&(_pParse.X5))) = uint8(i32(1))
- *(*int32)(unsafe.Pointer(&(_pTopNC.X6))) += 1
+ _pParse.XcheckSchema = uint8(1)
+ _pTopNC.XnErr += 1
_128:
- if int32(_pExpr.X9) < i32(0) || _pMatch == nil {
+ if int32(_pExpr.XiColumn) < int32(0) || _pMatch == nil {
goto _136
}
- _45_n = int32(_pExpr.X9)
- if _45_n >= i32(64) {
- _45_n = i32(63)
+ _45_n = int32(_pExpr.XiColumn)
+ if _45_n >= int32(64) {
+ _45_n = int32(63)
}
func() {
- if (_pMatch.X11) != (_pExpr.X8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89820), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96396)))
+ if _pMatch.XiCursor != _pExpr.XiTable {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89820), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96424)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint64)(unsafe.Pointer(&(_pMatch.X14)))
- *p = (*p) | (u64(1) << uint(_45_n))
- sink17(*p)
- }
+ _pMatch.XcolUsed |= uint64(1) << uint(_45_n)
_136:
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_pExpr.X4))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X4))))) = nil
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_pExpr.X5))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X5))))) = nil
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(func() int32 {
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_pExpr.XpLeft))
+ *(**XExpr)(unsafe.Pointer(&_pExpr.XpLeft)) = nil
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_pExpr.XpRight))
+ *(**XExpr)(unsafe.Pointer(&_pExpr.XpRight)) = nil
+ _pExpr.Xop = uint8(func() int32 {
if _isTrigger != 0 {
- return i32(61)
+ return int32(61)
}
- return i32(152)
+ return int32(152)
}())
_lookupname_end:
- if _cnt != i32(1) {
+ if _cnt != int32(1) {
goto _142
}
func() {
if _pNC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89833), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(95387)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89833), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(95415)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pExpr.X2) & uint32(i32(4194304))) == uint32(i32(0)) {
- _sqlite3AuthRead(tls, _pParse, _pExpr, _pSchema, (*XSrcList)(_pNC.X1))
+ if (_pExpr.Xflags & uint32(4194304)) == (0) {
+ _sqlite3AuthRead(tls, _pParse, _pExpr, _pSchema, (*XSrcList)(_pNC.XpSrcList))
}
_145:
func() {
if _pTopNC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89840), unsafe.Pointer((*int8)(unsafe.Pointer(&_lookupNameØ00__func__Ø000))), unsafe.Pointer(str(96427)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89840), unsafe.Pointer(&_lookupNameØ00__func__Ø000), unsafe.Pointer(str(96455)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pTopNC.X5))) += 1
+ _pTopNC.XnRef += 1
if _pTopNC == _pNC {
goto _148
}
- _pTopNC = (*XNameContext)(_pTopNC.X4)
+ _pTopNC = (*XNameContext)(_pTopNC.XpNext)
goto _145
_148:
- return i32(1)
+ return int32(1)
_142:
- return i32(2)
+ return int32(2)
}
var _lookupNameØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_lookupNameØ00__func__Ø000[0], str(96437), 11)
+ crt.Xstrncpy(nil, &_lookupNameØ00__func__Ø000[0], str(96465), 11)
}
-// Return TRUE if the name zCol occurs anywhere in the USING clause.
-//
-// Return FALSE if the USING clause is NULL or if it does not contain
-// zCol.
+// C comment
+// /*
+// ** Return TRUE if the name zCol occurs anywhere in the USING clause.
+// **
+// ** Return FALSE if the USING clause is NULL or if it does not contain
+// ** zCol.
+// */
func _nameInUsingClause(tls *crt.TLS, _pUsing *XIdList, _zCol *int8) (r0 int32) {
var _1_k int32
if _pUsing == nil {
goto _0
}
- _1_k = i32(0)
+ _1_k = int32(0)
_1:
- if _1_k >= (_pUsing.X1) {
+ if _1_k >= _pUsing.XnId {
goto _4
}
- if _sqlite3StrICmp(tls, (*TIdList_item)(unsafe.Pointer(uintptr(_pUsing.X0)+8*uintptr(_1_k))).X0, _zCol) == i32(0) {
- return i32(1)
+ if _sqlite3StrICmp(tls, elem42((*TIdList_item)(_pUsing.Xa), uintptr(_1_k)).XzName, _zCol) == int32(0) {
+ return int32(1)
}
_1_k += 1
goto _1
_4:
_0:
- return i32(0)
+ return int32(0)
}
-// Return TRUE if the given string is a row-id column name.
+// C comment
+// /*
+// ** Return TRUE if the given string is a row-id column name.
+// */
func _sqlite3IsRowid(tls *crt.TLS, _z *int8) (r0 int32) {
- if _sqlite3StrICmp(tls, _z, str(96448)) == i32(0) {
- return i32(1)
- }
- if _sqlite3StrICmp(tls, _z, str(96456)) == i32(0) {
- return i32(1)
- }
- if _sqlite3StrICmp(tls, _z, str(96462)) == i32(0) {
- return i32(1)
- }
- return i32(0)
-}
-
-// Turn the pExpr expression into an alias for the iCol-th column of the
-// result set in pEList.
-//
-// If the reference is followed by a COLLATE operator, then make sure
-// the COLLATE operator is preserved. For example:
-//
-// SELECT a+b, c+d FROM t1 ORDER BY 1 COLLATE nocase;
-//
-// Should be transformed into:
-//
-// SELECT a+b, c+d FROM t1 ORDER BY (a+b) COLLATE nocase;
-//
-// The nSubquery parameter specifies how many levels of subquery the
-// alias is removed from the original expression. The usual value is
-// zero but it might be more if the alias is contained within a subquery
-// of the original expression. The Expr.op2 field of TK_AGG_FUNCTION
-// structures must be increased by the nSubquery amount.
+ if _sqlite3StrICmp(tls, _z, str(96476)) == int32(0) {
+ return int32(1)
+ }
+ if _sqlite3StrICmp(tls, _z, str(96484)) == int32(0) {
+ return int32(1)
+ }
+ if _sqlite3StrICmp(tls, _z, str(96490)) == int32(0) {
+ return int32(1)
+ }
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Turn the pExpr expression into an alias for the iCol-th column of the
+// ** result set in pEList.
+// **
+// ** If the reference is followed by a COLLATE operator, then make sure
+// ** the COLLATE operator is preserved. For example:
+// **
+// ** SELECT a+b, c+d FROM t1 ORDER BY 1 COLLATE nocase;
+// **
+// ** Should be transformed into:
+// **
+// ** SELECT a+b, c+d FROM t1 ORDER BY (a+b) COLLATE nocase;
+// **
+// ** The nSubquery parameter specifies how many levels of subquery the
+// ** alias is removed from the original expression. The usual value is
+// ** zero but it might be more if the alias is contained within a subquery
+// ** of the original expression. The Expr.op2 field of TK_AGG_FUNCTION
+// ** structures must be increased by the nSubquery amount.
+// */
func _resolveAlias(tls *crt.TLS, _pParse *XParse, _pEList *XExprList, _iCol int32, _pExpr *XExpr, _zType *int8, _nSubquery int32) {
var _db *Xsqlite3
var _pOrig, _pDup *XExpr
func() {
- if _iCol < i32(0) || _iCol >= (_pEList.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89423), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveAliasØ00__func__Ø000))), unsafe.Pointer(str(96466)))
+ if _iCol < int32(0) || _iCol >= _pEList.XnExpr {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89423), unsafe.Pointer(&_resolveAliasØ00__func__Ø000), unsafe.Pointer(str(96494)))
crt.X__builtin_abort(tls)
}
}()
- _pOrig = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_iCol))).X0)
+ _pOrig = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_iCol)).XpExpr)
func() {
if _pOrig == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89425), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveAliasØ00__func__Ø000))), unsafe.Pointer(str(96496)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89425), unsafe.Pointer(&_resolveAliasØ00__func__Ø000), unsafe.Pointer(str(96524)))
crt.X__builtin_abort(tls)
}
}()
- _db = (*Xsqlite3)(_pParse.X0)
- _pDup = _sqlite3ExprDup(tls, _db, _pOrig, i32(0))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pDup = _sqlite3ExprDup(tls, _db, _pOrig, int32(0))
if _pDup == nil {
return
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zType)) + 1*uintptr(i32(0))))) != i32(71) {
+ if int32(*elem1(_zType, 0)) != int32(71) {
_incrAggFunctionDepth(tls, _pDup, _nSubquery)
}
- if int32(_pExpr.X0) == i32(94) {
- _pDup = _sqlite3ExprAddCollateString(tls, _pParse, _pDup, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_pDup.X2)))
- *p = (*p) | uint32(i32(4194304))
- sink5(*p)
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(32768))
- sink5(*p)
+ if int32(_pExpr.Xop) == int32(94) {
+ _pDup = _sqlite3ExprAddCollateString(tls, _pParse, _pDup, *(**int8)(unsafe.Pointer(&_pExpr.Xu)))
}
+ _pDup.Xflags |= uint32(4194304)
+ _pExpr.Xflags |= uint32(32768)
_sqlite3ExprDelete(tls, _db, _pExpr)
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pExpr), (unsafe.Pointer)(_pDup), u32(48))
- if (((_pExpr.X2) & uint32(i32(1024))) == uint32(i32(0))) && ((*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))) != nil) {
+ crt.Xmemcpy(tls, unsafe.Pointer(_pExpr), unsafe.Pointer(_pDup), uint32(48))
+ if ((_pExpr.Xflags & uint32(1024)) == (0)) && ((*(**int8)(unsafe.Pointer(&_pExpr.Xu))) != nil) {
func() {
- if ((_pExpr.X2) & uint32(i32(24576))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89446), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveAliasØ00__func__Ø000))), unsafe.Pointer(str(96505)))
+ if (_pExpr.Xflags & uint32(24576)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89446), unsafe.Pointer(&_resolveAliasØ00__func__Ø000), unsafe.Pointer(str(96533)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))) = _sqlite3DbStrDup(tls, _db, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))))
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(65536))
- sink5(*p)
- }
+ *(**int8)(unsafe.Pointer(&_pExpr.Xu)) = _sqlite3DbStrDup(tls, _db, *(**int8)(unsafe.Pointer(&_pExpr.Xu)))
+ _pExpr.Xflags |= uint32(65536)
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pDup))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pDup))
}
var _resolveAliasØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_resolveAliasØ00__func__Ø000[0], str(96551), 13)
+ crt.Xstrncpy(nil, &_resolveAliasØ00__func__Ø000[0], str(96579), 13)
}
func _incrAggFunctionDepth(tls *crt.TLS, _pExpr *XExpr, _N int32) {
var _1_w XWalker
- if _N > i32(0) {
- crt.Xmemset(tls, (unsafe.Pointer)(&_1_w), i32(0), u32(28))
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_1_w.X1))))) = _incrAggDepth
- *(*int32)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_1_w.X6))))) = _N
+ if _N > int32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(&_1_w), int32(0), uint32(28))
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_1_w.XxExprCallback)) = _incrAggDepth
+ *(*int32)(unsafe.Pointer(&_1_w.Xu)) = _N
_sqlite3WalkExpr(tls, &_1_w, _pExpr)
}
- _ = _1_w
}
-// Walk the expression tree pExpr and increase the aggregate function
-// depth (the Expr.op2 field) by N on every TK_AGG_FUNCTION node.
-// This needs to occur when copying a TK_AGG_FUNCTION node from an
-// outer query into an inner subquery.
-//
-// incrAggFunctionDepth(pExpr,n) is the main routine. incrAggDepth(..)
-// is a helper function - a callback for the tree walker.
+// C comment
+// /*
+// ** Walk the expression tree pExpr and increase the aggregate function
+// ** depth (the Expr.op2 field) by N on every TK_AGG_FUNCTION node.
+// ** This needs to occur when copying a TK_AGG_FUNCTION node from an
+// ** outer query into an inner subquery.
+// **
+// ** incrAggFunctionDepth(pExpr,n) is the main routine. incrAggDepth(..)
+// ** is a helper function - a callback for the tree walker.
+// */
func _incrAggDepth(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
- if int32(_pExpr.X0) == i32(153) {
+ if int32(_pExpr.Xop) == int32(153) {
{
- p := (*uint8)(unsafe.Pointer(&(_pExpr.X12)))
- *p = uint8(int32(*p) + (*(*int32)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6)))))))
- sink2(*p)
+ p := &_pExpr.Xop2
+ *p = uint8(int32(*p) + (*(*int32)(unsafe.Pointer(&_pWalker.Xu))))
}
}
- return i32(0)
+ return int32(0)
}
func _sqlite3ExprAddCollateString(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _zC *int8) (r0 *XExpr) {
var _s XToken
func() {
if _zC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90997), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAddCollateStringØ00__func__Ø000))), unsafe.Pointer(str(96564)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90997), unsafe.Pointer(&_sqlite3ExprAddCollateStringØ00__func__Ø000), unsafe.Pointer(str(96592)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3TokenInit(tls, &_s, _zC)
- return _sqlite3ExprAddCollateToken(tls, _pParse, _pExpr, &_s, i32(0))
-
- _ = _s
- panic(0)
+ return _sqlite3ExprAddCollateToken(tls, _pParse, _pExpr, &_s, int32(0))
}
var _sqlite3ExprAddCollateStringØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprAddCollateStringØ00__func__Ø000[0], str(96570), 28)
+ crt.Xstrncpy(nil, &_sqlite3ExprAddCollateStringØ00__func__Ø000[0], str(96598), 28)
}
-// Set the collating sequence for expression pExpr to be the collating
-// sequence named by pToken. Return a pointer to a new Expr node that
-// implements the COLLATE operator.
-//
-// If a memory allocation error occurs, that fact is recorded in pParse->db
-// and the pExpr parameter is returned unchanged.
+// C comment
+// /*
+// ** Set the collating sequence for expression pExpr to be the collating
+// ** sequence named by pToken. Return a pointer to a new Expr node that
+// ** implements the COLLATE operator.
+// **
+// ** If a memory allocation error occurs, that fact is recorded in pParse->db
+// ** and the pExpr parameter is returned unchanged.
+// */
func _sqlite3ExprAddCollateToken(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _pCollName *XToken, _dequote int32) (r0 *XExpr) {
var _1_pNew *XExpr
- if (_pCollName.X1) <= uint32(i32(0)) {
+ if _pCollName.Xn <= (0) {
goto _0
}
- _1_pNew = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(94), _pCollName, _dequote)
+ _1_pNew = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(94), _pCollName, _dequote)
if _1_pNew != nil {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pNew.X4))))) = _pExpr
- {
- p := (*uint32)(unsafe.Pointer(&(_1_pNew.X2)))
- *p = (*p) | uint32(i32(4352))
- sink5(*p)
- }
+ *(**XExpr)(unsafe.Pointer(&_1_pNew.XpLeft)) = _pExpr
+ _1_pNew.Xflags |= uint32(4352)
_pExpr = _1_pNew
}
_0:
return _pExpr
}
-// The pExpr should be a TK_COLUMN expression. The table referred to
-// is in pTabList or else it is the NEW or OLD table of a trigger.
-// Check to see if it is OK to read this particular column.
-//
-// If the auth function returns SQLITE_IGNORE, change the TK_COLUMN
-// instruction into a TK_NULL. If the auth function returns SQLITE_DENY,
-// then generate an error.
+// C comment
+// /*
+// ** The pExpr should be a TK_COLUMN expression. The table referred to
+// ** is in pTabList or else it is the NEW or OLD table of a trigger.
+// ** Check to see if it is OK to read this particular column.
+// **
+// ** If the auth function returns SQLITE_IGNORE, change the TK_COLUMN
+// ** instruction into a TK_NULL. If the auth function returns SQLITE_DENY,
+// ** then generate an error.
+// */
func _sqlite3AuthRead(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _pSchema *XSchema, _pTabList *XSrcList) {
var _iSrc, _iDb, _iCol int32
var _zCol *int8
var _db *Xsqlite3
var _pTab *XTable
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pTab = nil
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32
- }{(_db.X59)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32
- }{nil})) {
+ if _db.XxAuth == nil {
return
}
- _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), _pSchema)
- if _iDb < i32(0) {
+ _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), _pSchema)
+ if _iDb < int32(0) {
return
}
func() {
- if int32(_pExpr.X0) != i32(152) && int32(_pExpr.X0) != i32(61) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99583), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000))), unsafe.Pointer(str(96598)))
+ if int32(_pExpr.Xop) != int32(152) && int32(_pExpr.Xop) != int32(61) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99583), unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000), unsafe.Pointer(str(96626)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pExpr.X0) == i32(61) {
- _pTab = (*XTable)(_pParse.X40)
+ if int32(_pExpr.Xop) == int32(61) {
+ _pTab = (*XTable)(_pParse.XpTriggerTab)
goto _6
}
func() {
if _pTabList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99587), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000))), unsafe.Pointer(str(96644)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99587), unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000), unsafe.Pointer(str(96672)))
crt.X__builtin_abort(tls)
}
}()
- _iSrc = i32(0)
+ _iSrc = int32(0)
_9:
if func() int32 {
- if _iSrc < (_pTabList.X0) {
- return i32(1)
+ if _iSrc < _pTabList.XnSrc {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99588), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99588), unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _14
}
- if (_pExpr.X8) == ((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(_iSrc))).X11) {
- _pTab = (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(_iSrc))).X4)
+ if _pExpr.XiTable == (elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_iSrc)).XiCursor) {
+ _pTab = (*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_iSrc)).XpTab)
goto _14
}
_iSrc += 1
goto _9
_14:
_6:
- _iCol = int32(_pExpr.X9)
+ _iCol = int32(_pExpr.XiColumn)
if func() int32 {
if _pTab == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99596), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99596), unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
- if _iCol >= i32(0) {
+ if _iCol >= int32(0) {
func() {
- if _iCol >= int32(_pTab.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99599), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000))), unsafe.Pointer(str(45575)))
+ if _iCol >= int32(_pTab.XnCol) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99599), unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000), unsafe.Pointer(str(45530)))
crt.X__builtin_abort(tls)
}
}()
- _zCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_iCol))).X0
+ _zCol = elem41((*XColumn)(_pTab.XaCol), uintptr(_iCol)).XzName
goto _26
}
- if int32(_pTab.X10) >= i32(0) {
+ if int32(_pTab.XiPKey) >= int32(0) {
func() {
- if int32(_pTab.X10) >= int32(_pTab.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99602), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000))), unsafe.Pointer(str(96653)))
+ if int32(_pTab.XiPKey) >= int32(_pTab.XnCol) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99602), unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000), unsafe.Pointer(str(96681)))
crt.X__builtin_abort(tls)
}
}()
- _zCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_pTab.X10))).X0
+ _zCol = elem41((*XColumn)(_pTab.XaCol), uintptr(_pTab.XiPKey)).XzName
goto _26
}
- _zCol = str(96456)
+ _zCol = str(96484)
_26:
func() {
- if _iDb < i32(0) || _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99607), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _iDb < int32(0) || _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99607), unsafe.Pointer(&_sqlite3AuthReadØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
- if i32(2) == _sqlite3AuthReadCol(tls, _pParse, _pTab.X0, _zCol, _iDb) {
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(101))
+ if int32(2) == _sqlite3AuthReadCol(tls, _pParse, _pTab.XzName, _zCol, _iDb) {
+ _pExpr.Xop = uint8(101)
}
}
var _sqlite3AuthReadØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AuthReadØ00__func__Ø000[0], str(96676), 16)
+ crt.Xstrncpy(nil, &_sqlite3AuthReadØ00__func__Ø000[0], str(96704), 16)
}
-// Invoke the authorization callback for permission to read column zCol from
-// table zTab in database zDb. This function assumes that an authorization
-// callback has been registered (i.e. that sqlite3.xAuth is not NULL).
-//
-// If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed
-// to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE
-// is treated as SQLITE_DENY. In this case an error is left in pParse.
+// C comment
+// /*
+// ** Invoke the authorization callback for permission to read column zCol from
+// ** table zTab in database zDb. This function assumes that an authorization
+// ** callback has been registered (i.e. that sqlite3.xAuth is not NULL).
+// **
+// ** If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed
+// ** to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE
+// ** is treated as SQLITE_DENY. In this case an error is left in pParse.
+// */
func _sqlite3AuthReadCol(tls *crt.TLS, _pParse *XParse, _zTab *int8, _zCol *int8, _iDb int32) (r0 int32) {
var _rc int32
var _zDb *int8
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pParse.X0)
- _zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 {
- return i32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ if (_db.Xinit.Xbusy) != 0 {
+ return int32(0)
}
- _rc = (_db.X59)(tls, _db.X60, i32(20), _zTab, _zCol, _zDb, _pParse.X65)
- if _rc != i32(1) {
+ _rc = _db.XxAuth(tls, _db.XpAuthArg, int32(20), _zTab, _zCol, _zDb, _pParse.XzAuthContext)
+ if _rc != int32(1) {
goto _1
}
- if ((_db.X5) > i32(2)) || (_iDb != i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(96692), unsafe.Pointer(_zDb), unsafe.Pointer(_zTab), unsafe.Pointer(_zCol))
+ if (_db.XnDb > int32(2)) || (_iDb != int32(0)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(96720), unsafe.Pointer(_zDb), unsafe.Pointer(_zTab), unsafe.Pointer(_zCol))
goto _4
}
- _sqlite3ErrorMsg(tls, _pParse, str(96725), unsafe.Pointer(_zTab), unsafe.Pointer(_zCol))
+ _sqlite3ErrorMsg(tls, _pParse, str(96753), unsafe.Pointer(_zTab), unsafe.Pointer(_zCol))
_4:
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = i32(23)
+ _pParse.Xrc = int32(23)
goto _7
_1:
- if (_rc != i32(2)) && (_rc != i32(0)) {
+ if (_rc != int32(2)) && (_rc != int32(0)) {
_sqliteAuthBadReturnCode(tls, _pParse)
}
_7:
return _rc
}
-// Expression p should encode a floating point value between 1.0 and 0.0.
-// Return 1024 times this value. Or return -1 if p is not a floating point
-// value between 1.0 and 0.0.
+// C comment
+// /*
+// ** Expression p should encode a floating point value between 1.0 and 0.0.
+// ** Return 1024 times this value. Or return -1 if p is not a floating point
+// ** value between 1.0 and 0.0.
+// */
func _exprProbability(tls *crt.TLS, _p *XExpr) (r0 int32) {
var _r float64
_r = -1
- if int32(_p.X0) != i32(132) {
- return i32(-1)
+ if int32(_p.Xop) != int32(132) {
+ return int32(-1)
}
- _sqlite3AtoF(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3))))), &_r, _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))), uint8(i32(1)))
+ _sqlite3AtoF(tls, *(**int8)(unsafe.Pointer(&_p.Xu)), &_r, _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer(&_p.Xu))), uint8(1))
func() {
if _r < float64(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(89904), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprProbabilityØ00__func__Ø000))), unsafe.Pointer(str(96755)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(89904), unsafe.Pointer(&_exprProbabilityØ00__func__Ø000), unsafe.Pointer(str(96783)))
crt.X__builtin_abort(tls)
}
}()
if _r > float64(1) {
- return i32(-1)
+ return int32(-1)
}
return int32(_r * (1.34217728e+08))
}
@@ -74801,95 +75882,100 @@ func _exprProbability(tls *crt.TLS, _p *XExpr) (r0 int32) {
var _exprProbabilityØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_exprProbabilityØ00__func__Ø000[0], str(96762), 16)
+ crt.Xstrncpy(nil, &_exprProbabilityØ00__func__Ø000[0], str(96790), 16)
}
-// Determine if any of the arguments to the pExpr Function reference
-// pSrcList. Return true if they do. Also return true if the function
-// has no arguments or has only constant arguments. Return false if pExpr
-// references columns but not columns of tables found in pSrcList.
+// C comment
+// /*
+// ** Determine if any of the arguments to the pExpr Function reference
+// ** pSrcList. Return true if they do. Also return true if the function
+// ** has no arguments or has only constant arguments. Return false if pExpr
+// ** references columns but not columns of tables found in pSrcList.
+// */
func _sqlite3FunctionUsesThisSrc(tls *crt.TLS, _pExpr *XExpr, _pSrcList *XSrcList) (r0 int32) {
var _w XWalker
var _cnt TSrcCount
func() {
- if int32(_pExpr.X0) != i32(153) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95801), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FunctionUsesThisSrcØ00__func__Ø000))), unsafe.Pointer(str(96778)))
+ if int32(_pExpr.Xop) != int32(153) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95801), unsafe.Pointer(&_sqlite3FunctionUsesThisSrcØ00__func__Ø000), unsafe.Pointer(str(96806)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _exprSrcCount
- *(**TSrcCount)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_w.X6))))))) = &_cnt
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_cnt.X0))))) = _pSrcList
- *(*int32)(unsafe.Pointer(&(_cnt.X1))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_cnt.X2))) = i32(0)
- _sqlite3WalkExprList(tls, &_w, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))))
- return bool2int(((_cnt.X1) > i32(0)) || ((_cnt.X2) == i32(0)))
-
- _ = _w
- _ = _cnt
- panic(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _exprSrcCount
+ *(**TSrcCount)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_w.Xu)))) = &_cnt
+ *(**XSrcList)(unsafe.Pointer(&_cnt.XpSrc)) = _pSrcList
+ _cnt.XnThis = int32(0)
+ _cnt.XnOther = int32(0)
+ _sqlite3WalkExprList(tls, &_w, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))))
+ return bool2int((_cnt.XnThis > int32(0)) || (_cnt.XnOther == int32(0)))
}
var _sqlite3FunctionUsesThisSrcØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FunctionUsesThisSrcØ00__func__Ø000[0], str(96805), 27)
+ crt.Xstrncpy(nil, &_sqlite3FunctionUsesThisSrcØ00__func__Ø000[0], str(96833), 27)
}
-// Count the number of references to columns.
+// C comment
+// /*
+// ** Count the number of references to columns.
+// */
func _exprSrcCount(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
var _1_i, _1_nSrc int32
var _1_pSrc *XSrcList
var _1_p *TSrcCount
- if int32(_pExpr.X0) != i32(152) && func() int32 {
- if int32(_pExpr.X0) == i32(154) {
+ if int32(_pExpr.Xop) != int32(152) && func() int32 {
+ if int32(_pExpr.Xop) == int32(154) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95775), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprSrcCountØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95775), unsafe.Pointer(&_exprSrcCountØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() == 0 {
goto _3
}
- _1_p = (*TSrcCount)(*(*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6))))))
- _1_pSrc = (*XSrcList)(_1_p.X0)
+ _1_p = (*TSrcCount)(*(*unsafe.Pointer)(unsafe.Pointer(&_pWalker.Xu)))
+ _1_pSrc = (*XSrcList)(_1_p.XpSrc)
_1_nSrc = func() int32 {
if _1_pSrc != nil {
- return (_1_pSrc.X0)
+ return _1_pSrc.XnSrc
}
- return i32(0)
+ return int32(0)
}()
- _1_i = i32(0)
+ _1_i = int32(0)
_6:
if _1_i >= _1_nSrc {
goto _9
}
- if (_pExpr.X8) == ((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_1_pSrc.X2))))) + 68*uintptr(_1_i))).X11) {
+ if _pExpr.XiTable == (elem6((*TSrcList_item)(unsafe.Pointer(&_1_pSrc.Xa)), uintptr(_1_i)).XiCursor) {
goto _9
}
_1_i += 1
goto _6
_9:
if _1_i < _1_nSrc {
- *(*int32)(unsafe.Pointer(&(_1_p.X1))) += 1
+ _1_p.XnThis += 1
goto _12
}
- *(*int32)(unsafe.Pointer(&(_1_p.X2))) += 1
+ _1_p.XnOther += 1
_12:
_3:
- return i32(0)
+ return int32(0)
}
var _exprSrcCountØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_exprSrcCountØ00__func__Ø000[0], str(96832), 13)
+ crt.Xstrncpy(nil, &_exprSrcCountØ00__func__Ø000[0], str(96860), 13)
}
-// Resolve names in the SELECT statement p and all of its descendants.
+// C comment
+// /*
+// ** Resolve names in the SELECT statement p and all of its descendants.
+// */
func _resolveSelectStep(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) (r0 int32) {
var _isCompound, _nCompound, _i, _7_nRef int32
var _7_zSavedContext *int8
@@ -74903,429 +75989,395 @@ func _resolveSelectStep(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) (r0 int32)
var _pOuterNC, _7_pNC *XNameContext
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90520), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90520), unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
- if ((_p.X3) & uint32(i32(4))) != 0 {
- return i32(1)
+ if (_p.XselFlags & uint32(4)) != 0 {
+ return int32(1)
}
- _pOuterNC = (*XNameContext)(*(*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6))))))
- _pParse = (*XParse)(_pWalker.X0)
- _db = (*Xsqlite3)(_pParse.X0)
- if ((_p.X3) & uint32(i32(64))) == uint32(i32(0)) {
+ _pOuterNC = (*XNameContext)(*(*unsafe.Pointer)(unsafe.Pointer(&_pWalker.Xu)))
+ _pParse = (*XParse)(_pWalker.XpParse)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if (_p.XselFlags & uint32(64)) == (0) {
_sqlite3SelectPrep(tls, _pParse, _p, _pOuterNC)
return func() int32 {
- if (_pParse.X16) != 0 || ((_db.X17) != 0) {
- return i32(2)
+ if _pParse.XnErr != 0 || (_db.XmallocFailed != 0) {
+ return int32(2)
}
- return i32(1)
+ return int32(1)
}()
}
- _isCompound = bool2int((*XSelect)(_p.X13) != nil)
- _nCompound = i32(0)
+ _isCompound = bool2int((*XSelect)(_p.XpPrior) != nil)
+ _nCompound = int32(0)
_pLeftmost = _p
_7:
if _p == nil {
goto _8
}
func() {
- if ((_p.X3) & uint32(i32(64))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90545), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000))), unsafe.Pointer(str(96845)))
+ if (_p.XselFlags & uint32(64)) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90545), unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000), unsafe.Pointer(str(96873)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X3) & uint32(i32(4))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90546), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000))), unsafe.Pointer(str(96876)))
+ if (_p.XselFlags & uint32(4)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90546), unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000), unsafe.Pointer(str(96904)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) | uint32(i32(4))
- sink5(*p)
+ _p.XselFlags |= uint32(4)
+ crt.Xmemset(tls, unsafe.Pointer(&_sNC), int32(0), uint32(32))
+ *(**XParse)(unsafe.Pointer(&_sNC.XpParse)) = _pParse
+ if _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)(_p.XpLimit)) != 0 || _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)(_p.XpOffset)) != 0 {
+ return int32(2)
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_sNC), i32(0), u32(32))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X0))))) = _pParse
- if _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)(_p.X15)) != 0 || _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)(_p.X16)) != 0 {
- return i32(2)
- }
- if ((_p.X3) & uint32(i32(65536))) != 0 {
- _5_pSub = (*XSelect)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.X8).X2))))) + 68*uintptr(i32(0)))).X5)
+ if (_p.XselFlags & uint32(65536)) != 0 {
+ _5_pSub = (*XSelect)(elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.XpSrc).Xa))), 0).XpSelect)
func() {
- if ((*XSrcList)(_p.X8).X0) != i32(1) || (*XExprList)(_p.X12) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90567), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000))), unsafe.Pointer(str(96907)))
+ if ((*XSrcList)(_p.XpSrc).XnSrc) != int32(1) || _p.XpOrderBy == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90567), unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000), unsafe.Pointer(str(96935)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(_5_pSub.X13) == nil || (*XExprList)(_5_pSub.X12) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90568), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000))), unsafe.Pointer(str(96939)))
+ if _5_pSub.XpPrior == nil || (*XExprList)(_5_pSub.XpOrderBy) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90568), unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000), unsafe.Pointer(str(96967)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_5_pSub.X12))))) = (*XExprList)(_p.X12)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = nil
+ *(**XExprList)(unsafe.Pointer(&_5_pSub.XpOrderBy)) = (*XExprList)(_p.XpOrderBy)
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = nil
}
- _i = i32(0)
+ _i = int32(0)
_22:
- if _i >= ((*XSrcList)(_p.X8).X0) {
+ if _i >= ((*XSrcList)(_p.XpSrc).XnSrc) {
goto _25
}
- _6_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.X8).X2))))) + 68*uintptr(_i)))
- if (*XSelect)(_6_pItem.X5) == nil {
+ _6_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.XpSrc).Xa))), uintptr(_i))
+ if _6_pItem.XpSelect == nil {
goto _26
}
- _7_nRef = i32(0)
- _7_zSavedContext = _pParse.X65
+ _7_nRef = int32(0)
+ _7_zSavedContext = _pParse.XzAuthContext
_7_pNC = _pOuterNC
_27:
if _7_pNC == nil {
goto _30
}
- {
- p := &_7_nRef
- *p = (*p) + (_7_pNC.X5)
- sink1(*p)
- }
- _7_pNC = (*XNameContext)(_7_pNC.X4)
+ _7_nRef += _7_pNC.XnRef
+ _7_pNC = (*XNameContext)(_7_pNC.XpNext)
goto _27
_30:
- if (_6_pItem.X2) != nil {
- *(**int8)(unsafe.Pointer(&(_pParse.X65))) = _6_pItem.X2
+ if _6_pItem.XzName != nil {
+ _pParse.XzAuthContext = _6_pItem.XzName
}
- _sqlite3ResolveSelectNames(tls, _pParse, (*XSelect)(_6_pItem.X5), _pOuterNC)
- *(**int8)(unsafe.Pointer(&(_pParse.X65))) = _7_zSavedContext
- if (_pParse.X16) != 0 || ((_db.X17) != 0) {
- return i32(2)
+ _sqlite3ResolveSelectNames(tls, _pParse, (*XSelect)(_6_pItem.XpSelect), _pOuterNC)
+ _pParse.XzAuthContext = _7_zSavedContext
+ if _pParse.XnErr != 0 || (_db.XmallocFailed != 0) {
+ return int32(2)
}
_7_pNC = _pOuterNC
_34:
if _7_pNC == nil {
goto _37
}
- {
- p := &_7_nRef
- *p = (*p) - (_7_pNC.X5)
- sink1(*p)
- }
- _7_pNC = (*XNameContext)(_7_pNC.X4)
+ _7_nRef -= _7_pNC.XnRef
+ _7_pNC = (*XNameContext)(_7_pNC.XpNext)
goto _34
_37:
func() {
- if int32((uint32(((*t28)(unsafe.Pointer(&(_6_pItem.X9))).X1)>>uint(i32(3)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) || _7_nRef > i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90595), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000))), unsafe.Pointer(str(96973)))
+ if int32((uint32((_6_pItem.Xfg.XnotIndexed)>>3)<<31)>>31) != int32(0) || _7_nRef > int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90595), unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000), unsafe.Pointer(str(97001)))
crt.X__builtin_abort(tls)
}
}()
- storebits3((*int8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&(_6_pItem.X9))).X1))), int8(bool2int(_7_nRef != i32(0))), 8, 3)
+ storebits5(&(_6_pItem.Xfg.XnotIndexed), int8(bool2int(_7_nRef != int32(0))), 8, 3)
_26:
_i += 1
goto _22
_25:
- *(*uint16)(unsafe.Pointer(&(_sNC.X7))) = uint16(i32(1))
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X1))))) = (*XSrcList)(_p.X8)
- *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X4))))) = _pOuterNC
- if _sqlite3ResolveExprListNames(tls, &_sNC, (*XExprList)(_p.X0)) != 0 {
- return i32(2)
+ _sNC.XncFlags = uint16(1)
+ *(**XSrcList)(unsafe.Pointer(&_sNC.XpSrcList)) = (*XSrcList)(_p.XpSrc)
+ *(**XNameContext)(unsafe.Pointer(&_sNC.XpNext)) = _pOuterNC
+ if _sqlite3ResolveExprListNames(tls, &_sNC, (*XExprList)(_p.XpEList)) != 0 {
+ return int32(2)
}
func() {
- if ((_p.X3) & uint32(i32(8))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90613), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000))), unsafe.Pointer(str(97010)))
+ if (_p.XselFlags & uint32(8)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90613), unsafe.Pointer(&_resolveSelectStepØ00__func__Ø000), unsafe.Pointer(str(97038)))
crt.X__builtin_abort(tls)
}
}()
- _pGroupBy = (*XExprList)(_p.X10)
- if (_pGroupBy != nil) || ((int32(_sNC.X7) & i32(16)) != i32(0)) {
- i32(0)
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) | uint32(i32(8)|(int32(_sNC.X7)&i32(4096)))
- sink5(*p)
- }
+ _pGroupBy = (*XExprList)(_p.XpGroupBy)
+ if (_pGroupBy != nil) || ((int32(_sNC.XncFlags) & int32(16)) != int32(0)) {
+ _p.XselFlags |= uint32(int32(8) | (int32(_sNC.XncFlags) & int32(4096)))
goto _46
}
{
- p := (*uint16)(unsafe.Pointer(&(_sNC.X7)))
- *p = uint16(int32(*p) & i32(-2))
- sink14(*p)
+ p := &_sNC.XncFlags
+ *p = uint16(int32(*p) & int32(-2))
}
_46:
- if ((*XExpr)(_p.X11) != nil) && (_pGroupBy == nil) {
- _sqlite3ErrorMsg(tls, _pParse, str(97042))
- return i32(2)
+ if (_p.XpHaving != nil) && (_pGroupBy == nil) {
+ _sqlite3ErrorMsg(tls, _pParse, str(97070))
+ return int32(2)
}
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X2))))) = (*XExprList)(_p.X0)
- if _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)(_p.X11)) != 0 {
- return i32(2)
+ *(**XExprList)(unsafe.Pointer(&_sNC.XpEList)) = (*XExprList)(_p.XpEList)
+ if _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)(_p.XpHaving)) != 0 {
+ return int32(2)
}
- if _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)(_p.X9)) != 0 {
- return i32(2)
+ if _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)(_p.XpWhere)) != 0 {
+ return int32(2)
}
- _i = i32(0)
+ _i = int32(0)
_51:
- if _i >= ((*XSrcList)(_p.X8).X0) {
+ if _i >= ((*XSrcList)(_p.XpSrc).XnSrc) {
goto _54
}
- _11_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.X8).X2))))) + 68*uintptr(_i)))
- if (((uint32(((*t28)(unsafe.Pointer(&(_11_pItem.X9))).X1)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0) && _sqlite3ResolveExprListNames(tls, &_sNC, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_11_pItem.X15))))))) != 0 {
- return i32(2)
+ _11_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.XpSrc).Xa))), uintptr(_i))
+ if (((uint32((_11_pItem.Xfg.XnotIndexed)>>2) << 31) >> 31) != 0) && _sqlite3ResolveExprListNames(tls, &_sNC, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_11_pItem.Xu1)))) != 0 {
+ return int32(2)
}
_i += 1
goto _51
_54:
- *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X4))))) = nil
+ *(**XNameContext)(unsafe.Pointer(&_sNC.XpNext)) = nil
{
- p := (*uint16)(unsafe.Pointer(&(_sNC.X7)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ p := &_sNC.XncFlags
+ *p = uint16(int32(*p) | int32(1))
}
- if ((_p.X3) & uint32(i32(65536))) != 0 {
- _13_pSub = (*XSelect)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.X8).X2))))) + 68*uintptr(i32(0)))).X5)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = (*XExprList)(_13_pSub.X12)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_13_pSub.X12))))) = nil
+ if (_p.XselFlags & uint32(65536)) != 0 {
+ _13_pSub = (*XSelect)(elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.XpSrc).Xa))), 0).XpSelect)
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = (*XExprList)(_13_pSub.XpOrderBy)
+ *(**XExprList)(unsafe.Pointer(&_13_pSub.XpOrderBy)) = nil
}
- if (_isCompound <= _nCompound) && _resolveOrderGroupBy(tls, &_sNC, _p, (*XExprList)(_p.X12), str(25745)) != 0 {
- return i32(2)
+ if (_isCompound <= _nCompound) && _resolveOrderGroupBy(tls, &_sNC, _p, (*XExprList)(_p.XpOrderBy), str(25700)) != 0 {
+ return int32(2)
}
- if (_db.X17) != 0 {
- return i32(2)
+ if _db.XmallocFailed != 0 {
+ return int32(2)
}
if _pGroupBy == nil {
goto _61
}
- if _resolveOrderGroupBy(tls, &_sNC, _p, _pGroupBy, str(25751)) != 0 || ((_db.X17) != 0) {
- return i32(2)
+ if _resolveOrderGroupBy(tls, &_sNC, _p, _pGroupBy, str(25706)) != 0 || (_db.XmallocFailed != 0) {
+ return int32(2)
}
- *func() **TExprList_item { _i = i32(0); return &_16_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pGroupBy.X2)))))
+ *func() **TExprList_item { _i = int32(0); return &_16_pItem }() = (*TExprList_item)(unsafe.Pointer(&_pGroupBy.Xa))
_64:
- if _i >= (_pGroupBy.X0) {
+ if _i >= _pGroupBy.XnExpr {
goto _67
}
- if (((*XExpr)(_16_pItem.X0).X2) & uint32(i32(2))) != uint32(i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(97086))
- return i32(2)
+ if (((*XExpr)(_16_pItem.XpExpr).Xflags) & uint32(2)) != (0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(97114))
+ return int32(2)
}
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i += 1; return &_16_pItem }())) += uintptr(20)
goto _64
_67:
_61:
- if ((*XSelect)(_p.X14) != nil) && (((*XExprList)(_p.X0).X0) != ((*XExprList)((*XSelect)(_p.X14).X0).X0)) {
- _sqlite3SelectWrongNumTermsError(tls, _pParse, (*XSelect)(_p.X14))
- return i32(2)
+ if (_p.XpNext != nil) && (((*XExprList)(_p.XpEList).XnExpr) != ((*XExprList)((*XSelect)(_p.XpNext).XpEList).XnExpr)) {
+ _sqlite3SelectWrongNumTermsError(tls, _pParse, (*XSelect)(_p.XpNext))
+ return int32(2)
}
- _p = (*XSelect)(_p.X13)
+ _p = (*XSelect)(_p.XpPrior)
_nCompound += 1
goto _7
_8:
if _isCompound != 0 && _resolveCompoundOrderBy(tls, _pParse, _pLeftmost) != 0 {
- return i32(2)
+ return int32(2)
}
- return i32(1)
-
- _ = _sNC
- panic(0)
+ return int32(1)
}
var _resolveSelectStepØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_resolveSelectStepØ00__func__Ø000[0], str(97145), 18)
-}
-
-// This routine walks an expression tree and resolves references to
-// table columns and result-set columns. At the same time, do error
-// checking on function usage and set a flag if any aggregate functions
-// are seen.
-//
-// To resolve table columns references we look for nodes (or subtrees) of the
-// form X.Y.Z or Y.Z or just Z where
-//
-// X: The name of a database. Ex: "main" or "temp" or
-// the symbolic name assigned to an ATTACH-ed database.
-//
-// Y: The name of a table in a FROM clause. Or in a trigger
-// one of the special names "old" or "new".
-//
-// Z: The name of a column in table Y.
-//
-// The node at the root of the subtree is modified as follows:
-//
-// Expr.op Changed to TK_COLUMN
-// Expr.pTab Points to the Table object for X.Y
-// Expr.iColumn The column index in X.Y. -1 for the rowid.
-// Expr.iTable The VDBE cursor number for X.Y
-//
-//
-// To resolve result-set references, look for expression nodes of the
-// form Z (with no X and Y prefix) where the Z matches the right-hand
-// size of an AS clause in the result-set of a SELECT. The Z expression
-// is replaced by a copy of the left-hand side of the result-set expression.
-// Table-name and function resolution occurs on the substituted expression
-// tree. For example, in:
-//
-// SELECT a+b AS x, c+d AS y FROM t1 ORDER BY x;
-//
-// The "x" term of the order by is replaced by "a+b" to render:
-//
-// SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b;
-//
-// Function calls are checked to make sure that the function is
-// defined and that the correct number of arguments are specified.
-// If the function is an aggregate function, then the NC_HasAgg flag is
-// set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION.
-// If an expression contains aggregate functions then the EP_Agg
-// property on the expression is set.
-//
-// An error message is left in pParse if anything is amiss. The number
-// if errors is returned.
+ crt.Xstrncpy(nil, &_resolveSelectStepØ00__func__Ø000[0], str(97173), 18)
+}
+
+// C comment
+// /*
+// ** This routine walks an expression tree and resolves references to
+// ** table columns and result-set columns. At the same time, do error
+// ** checking on function usage and set a flag if any aggregate functions
+// ** are seen.
+// **
+// ** To resolve table columns references we look for nodes (or subtrees) of the
+// ** form X.Y.Z or Y.Z or just Z where
+// **
+// ** X: The name of a database. Ex: "main" or "temp" or
+// ** the symbolic name assigned to an ATTACH-ed database.
+// **
+// ** Y: The name of a table in a FROM clause. Or in a trigger
+// ** one of the special names "old" or "new".
+// **
+// ** Z: The name of a column in table Y.
+// **
+// ** The node at the root of the subtree is modified as follows:
+// **
+// ** Expr.op Changed to TK_COLUMN
+// ** Expr.pTab Points to the Table object for X.Y
+// ** Expr.iColumn The column index in X.Y. -1 for the rowid.
+// ** Expr.iTable The VDBE cursor number for X.Y
+// **
+// **
+// ** To resolve result-set references, look for expression nodes of the
+// ** form Z (with no X and Y prefix) where the Z matches the right-hand
+// ** size of an AS clause in the result-set of a SELECT. The Z expression
+// ** is replaced by a copy of the left-hand side of the result-set expression.
+// ** Table-name and function resolution occurs on the substituted expression
+// ** tree. For example, in:
+// **
+// ** SELECT a+b AS x, c+d AS y FROM t1 ORDER BY x;
+// **
+// ** The "x" term of the order by is replaced by "a+b" to render:
+// **
+// ** SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b;
+// **
+// ** Function calls are checked to make sure that the function is
+// ** defined and that the correct number of arguments are specified.
+// ** If the function is an aggregate function, then the NC_HasAgg flag is
+// ** set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION.
+// ** If an expression contains aggregate functions then the EP_Agg
+// ** property on the expression is set.
+// **
+// ** An error message is left in pParse if anything is amiss. The number
+// ** if errors is returned.
+// */
func _sqlite3ResolveExprNames(tls *crt.TLS, _pNC *XNameContext, _pExpr *XExpr) (r0 int32) {
var _savedHasAgg uint16
var _1_pParse *XParse
var _w XWalker
if _pExpr == nil {
- return i32(0)
+ return int32(0)
}
- _1_pParse = (*XParse)(_pNC.X0)
- if _sqlite3ExprCheckHeight(tls, _1_pParse, (_pExpr.X7)+((*XParse)(_pNC.X0).X57)) != 0 {
- return i32(1)
+ _1_pParse = (*XParse)(_pNC.XpParse)
+ if _sqlite3ExprCheckHeight(tls, _1_pParse, _pExpr.XnHeight+((*XParse)(_pNC.XpParse).XnHeight)) != 0 {
+ return int32(1)
}
+ _1_pParse.XnHeight += _pExpr.XnHeight
+ _savedHasAgg = uint16(int32(_pNC.XncFlags) & int32(4112))
{
- p := (*int32)(unsafe.Pointer(&(_1_pParse.X57)))
- *p = (*p) + (_pExpr.X7)
- sink1(*p)
+ p := &_pNC.XncFlags
+ *p = uint16(int32(*p) & int32(-4113))
}
- _savedHasAgg = uint16(int32(_pNC.X7) & i32(4112))
- {
- p := (*uint16)(unsafe.Pointer(&(_pNC.X7)))
- *p = uint16(int32(*p) & i32(-4113))
- sink14(*p)
- }
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_w.X0))))) = (*XParse)(_pNC.X0)
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _resolveExprStep
- *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X2))))) = _resolveSelectStep
- *(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&(_w.X3))))) = nil
- *(*int32)(unsafe.Pointer(&(_w.X4))) = i32(0)
- *(*uint8)(unsafe.Pointer(&(_w.X5))) = uint8(i32(0))
- *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_w.X6))))))) = _pNC
+ *(**XParse)(unsafe.Pointer(&_w.XpParse)) = (*XParse)(_pNC.XpParse)
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _resolveExprStep
+ *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&_w.XxSelectCallback)) = _resolveSelectStep
+ *(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer(&_w.XxSelectCallback2)) = nil
+ _w.XwalkerDepth = int32(0)
+ _w.XeCode = 0
+ *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_w.Xu)))) = _pNC
_sqlite3WalkExpr(tls, &_w, _pExpr)
- {
- p := (*int32)(unsafe.Pointer(&((*XParse)(_pNC.X0).X57)))
- *p = (*p) - (_pExpr.X7)
- sink1(*p)
+ (*XParse)(_pNC.XpParse).XnHeight -= _pExpr.XnHeight
+ if (_pNC.XnErr > int32(0)) || (((*XParse)(_w.XpParse).XnErr) > int32(0)) {
+ _pExpr.Xflags |= uint32(8)
}
- if ((_pNC.X6) > i32(0)) || (((*XParse)(_w.X0).X16) > i32(0)) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(8))
- sink5(*p)
- }
- }
- if (int32(_pNC.X7) & i32(16)) != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(2))
- sink5(*p)
- }
+ if (int32(_pNC.XncFlags) & int32(16)) != 0 {
+ _pExpr.Xflags |= uint32(2)
}
{
- p := (*uint16)(unsafe.Pointer(&(_pNC.X7)))
+ p := &_pNC.XncFlags
*p = uint16(int32(*p) | int32(_savedHasAgg))
- sink14(*p)
}
- return bool2int(((_pExpr.X2) & uint32(i32(8))) != uint32(i32(0)))
-
- _ = _w
- panic(0)
+ return bool2int((_pExpr.Xflags & uint32(8)) != (0))
}
-// Resolve all names for all expression in an expression list. This is
-// just like sqlite3ResolveExprNames() except that it works for an expression
-// list rather than a single expression.
+// C comment
+// /*
+// ** Resolve all names for all expression in an expression list. This is
+// ** just like sqlite3ResolveExprNames() except that it works for an expression
+// ** list rather than a single expression.
+// */
func _sqlite3ResolveExprListNames(tls *crt.TLS, _pNC *XNameContext, _pList *XExprList) (r0 int32) {
var _i int32
if _pList == nil {
goto _0
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _4
}
- if _sqlite3ResolveExprNames(tls, _pNC, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_i))).X0)) != 0 {
- return i32(2)
+ if _sqlite3ResolveExprNames(tls, _pNC, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XpExpr)) != 0 {
+ return int32(2)
}
_i += 1
goto _1
_4:
_0:
- return i32(0)
-}
-
-// pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.
-// The Name context of the SELECT statement is pNC. zType is either
-// "ORDER" or "GROUP" depending on which type of clause pOrderBy is.
-//
-// This routine resolves each term of the clause into an expression.
-// If the order-by term is an integer I between 1 and N (where N is the
-// number of columns in the result set of the SELECT) then the expression
-// in the resolution is a copy of the I-th result-set expression. If
-// the order-by term is an identifier that corresponds to the AS-name of
-// a result-set expression, then the term resolves to a copy of the
-// result-set expression. Otherwise, the expression is resolved in
-// the usual way - using sqlite3ResolveExprNames().
-//
-// This routine returns the number of errors. If errors occur, then
-// an appropriate error message might be left in pParse. (OOM errors
-// excepted.)
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.
+// ** The Name context of the SELECT statement is pNC. zType is either
+// ** "ORDER" or "GROUP" depending on which type of clause pOrderBy is.
+// **
+// ** This routine resolves each term of the clause into an expression.
+// ** If the order-by term is an integer I between 1 and N (where N is the
+// ** number of columns in the result set of the SELECT) then the expression
+// ** in the resolution is a copy of the I-th result-set expression. If
+// ** the order-by term is an identifier that corresponds to the AS-name of
+// ** a result-set expression, then the term resolves to a copy of the
+// ** result-set expression. Otherwise, the expression is resolved in
+// ** the usual way - using sqlite3ResolveExprNames().
+// **
+// ** This routine returns the number of errors. If errors occur, then
+// ** an appropriate error message might be left in pParse. (OOM errors
+// ** excepted.)
+// */
func _resolveOrderGroupBy(tls *crt.TLS, _pNC *XNameContext, _pSelect *XSelect, _pOrderBy *XExprList, _zType *int8) (r0 int32) {
var _i, _j, _iCol, _nResult int32
var _pItem *TExprList_item
var _1_pE, _1_pE2 *XExpr
var _pParse *XParse
if _pOrderBy == nil {
- return i32(0)
+ return int32(0)
}
- _nResult = (*XExprList)(_pSelect.X0).X0
- _pParse = (*XParse)(_pNC.X0)
- *func() **TExprList_item { _i = i32(0); return &_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))
+ _nResult = (*XExprList)(_pSelect.XpEList).XnExpr
+ _pParse = (*XParse)(_pNC.XpParse)
+ *func() **TExprList_item { _i = int32(0); return &_pItem }() = (*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa))
_1:
- if _i >= (_pOrderBy.X0) {
+ if _i >= _pOrderBy.XnExpr {
goto _4
}
- _1_pE = (*XExpr)(_pItem.X0)
+ _1_pE = (*XExpr)(_pItem.XpExpr)
_1_pE2 = _sqlite3ExprSkipCollate(tls, _1_pE)
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zType)) + 1*uintptr(i32(0))))) == i32(71) {
+ if int32(*elem1(_zType, 0)) == int32(71) {
goto _5
}
- _iCol = _resolveAsName(tls, _pParse, (*XExprList)(_pSelect.X0), _1_pE2)
- if _iCol > i32(0) {
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_pItem.X5))))).X0))) = uint16(_iCol)
+ _iCol = _resolveAsName(tls, _pParse, (*XExprList)(_pSelect.XpEList), _1_pE2)
+ if _iCol > int32(0) {
+ (*t71)(unsafe.Pointer(&_pItem.Xu)).XiOrderByCol = uint16(_iCol)
goto _2
}
_5:
if _sqlite3ExprIsInteger(tls, _1_pE2, &_iCol) == 0 {
goto _7
}
- if (_iCol < i32(1)) || (_iCol > i32(65535)) {
- _resolveOutOfRangeError(tls, _pParse, _zType, _i+i32(1), _nResult)
- return i32(1)
+ if (_iCol < int32(1)) || (_iCol > int32(65535)) {
+ _resolveOutOfRangeError(tls, _pParse, _zType, _i+int32(1), _nResult)
+ return int32(1)
}
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_pItem.X5))))).X0))) = uint16(_iCol)
+ (*t71)(unsafe.Pointer(&_pItem.Xu)).XiOrderByCol = uint16(_iCol)
goto _2
_7:
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_pItem.X5))))).X0))) = uint16(i32(0))
+ (*t71)(unsafe.Pointer(&_pItem.Xu)).XiOrderByCol = 0
if _sqlite3ResolveExprNames(tls, _pNC, _1_pE) != 0 {
- return i32(1)
+ return int32(1)
}
- _j = i32(0)
+ _j = int32(0)
_11:
- if _j >= ((*XExprList)(_pSelect.X0).X0) {
+ if _j >= ((*XExprList)(_pSelect.XpEList).XnExpr) {
goto _14
}
- if _sqlite3ExprCompare(tls, _1_pE, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSelect.X0).X2)))))+20*uintptr(_j))).X0), i32(-1)) == i32(0) {
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_pItem.X5))))).X0))) = uint16(_j + i32(1))
+ if _sqlite3ExprCompare(tls, _1_pE, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSelect.XpEList).Xa))), uintptr(_j)).XpExpr), int32(-1)) == int32(0) {
+ (*t71)(unsafe.Pointer(&_pItem.Xu)).XiOrderByCol = uint16(_j + int32(1))
}
_j += 1
goto _11
@@ -75337,407 +76389,431 @@ _4:
return _sqlite3ResolveOrderGroupBy(tls, _pParse, _pSelect, _pOrderBy, _zType)
}
-// pEList is a list of expressions which are really the result set of the
-// a SELECT statement. pE is a term in an ORDER BY or GROUP BY clause.
-// This routine checks to see if pE is a simple identifier which corresponds
-// to the AS-name of one of the terms of the expression list. If it is,
-// this routine return an integer between 1 and N where N is the number of
-// elements in pEList, corresponding to the matching entry. If there is
-// no match, or if pE is not a simple identifier, then this routine
-// return 0.
-//
-// pEList has been resolved. pE has not.
+// C comment
+// /*
+// ** pEList is a list of expressions which are really the result set of the
+// ** a SELECT statement. pE is a term in an ORDER BY or GROUP BY clause.
+// ** This routine checks to see if pE is a simple identifier which corresponds
+// ** to the AS-name of one of the terms of the expression list. If it is,
+// ** this routine return an integer between 1 and N where N is the number of
+// ** elements in pEList, corresponding to the matching entry. If there is
+// ** no match, or if pE is not a simple identifier, then this routine
+// ** return 0.
+// **
+// ** pEList has been resolved. pE has not.
+// */
func _resolveAsName(tls *crt.TLS, _pParse *XParse, _pEList *XExprList, _pE *XExpr) (r0 int32) {
var _i int32
var _1_zCol, _2_zAs *int8
- if int32(_pE.X0) != i32(27) {
+ if int32(_pE.Xop) != int32(27) {
goto _0
}
- _1_zCol = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pE.X3)))))
- _i = i32(0)
+ _1_zCol = *(**int8)(unsafe.Pointer(&_pE.Xu))
+ _i = int32(0)
_1:
- if _i >= (_pEList.X0) {
+ if _i >= _pEList.XnExpr {
goto _4
}
- _2_zAs = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_i))).X1
- if (_2_zAs != nil) && (_sqlite3StrICmp(tls, _2_zAs, _1_zCol) == i32(0)) {
- return _i + i32(1)
+ _2_zAs = elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XzName
+ if (_2_zAs != nil) && (_sqlite3StrICmp(tls, _2_zAs, _1_zCol) == int32(0)) {
+ return _i + int32(1)
}
_i += 1
goto _1
_4:
_0:
- return i32(0)
+ return int32(0)
}
-// Generate an ORDER BY or GROUP BY term out-of-range error.
+// C comment
+// /*
+// ** Generate an ORDER BY or GROUP BY term out-of-range error.
+// */
func _resolveOutOfRangeError(tls *crt.TLS, _pParse *XParse, _zType *int8, _i int32, _mx int32) {
- _sqlite3ErrorMsg(tls, _pParse, str(97163), _i, unsafe.Pointer(_zType), _mx)
-}
-
-// Do a deep comparison of two expression trees. Return 0 if the two
-// expressions are completely identical. Return 1 if they differ only
-// by a COLLATE operator at the top level. Return 2 if there are differences
-// other than the top-level COLLATE operator.
-//
-// If any subelement of pB has Expr.iTable==(-1) then it is allowed
-// to compare equal to an equivalent element in pA with Expr.iTable==iTab.
-//
-// The pA side might be using TK_REGISTER. If that is the case and pB is
-// not using TK_REGISTER but is otherwise equivalent, then still return 0.
-//
-// Sometimes this routine will return 2 even if the two expressions
-// really are equivalent. If we cannot prove that the expressions are
-// identical, we return 2 just to be safe. So if this routine
-// returns 2, then you do not really know for certain if the two
-// expressions are the same. But if you get a 0 or 1 return, then you
-// can be sure the expressions are the same. In the places where
-// this routine is used, it does not hurt to get an extra 2 - that
-// just might result in some slightly slower code. But returning
-// an incorrect 0 or 1 could lead to a malfunction.
+ _sqlite3ErrorMsg(tls, _pParse, str(97191), _i, unsafe.Pointer(_zType), _mx)
+}
+
+// C comment
+// /*
+// ** Do a deep comparison of two expression trees. Return 0 if the two
+// ** expressions are completely identical. Return 1 if they differ only
+// ** by a COLLATE operator at the top level. Return 2 if there are differences
+// ** other than the top-level COLLATE operator.
+// **
+// ** If any subelement of pB has Expr.iTable==(-1) then it is allowed
+// ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
+// **
+// ** The pA side might be using TK_REGISTER. If that is the case and pB is
+// ** not using TK_REGISTER but is otherwise equivalent, then still return 0.
+// **
+// ** Sometimes this routine will return 2 even if the two expressions
+// ** really are equivalent. If we cannot prove that the expressions are
+// ** identical, we return 2 just to be safe. So if this routine
+// ** returns 2, then you do not really know for certain if the two
+// ** expressions are the same. But if you get a 0 or 1 return, then you
+// ** can be sure the expressions are the same. In the places where
+// ** this routine is used, it does not hurt to get an extra 2 - that
+// ** just might result in some slightly slower code. But returning
+// ** an incorrect 0 or 1 could lead to a malfunction.
+// */
func _sqlite3ExprCompare(tls *crt.TLS, _pA *XExpr, _pB *XExpr, _iTab int32) (r0 int32) {
var _combinedFlags uint32
if (_pA == nil) || (_pB == nil) {
return func() int32 {
if _pB == _pA {
- return i32(0)
+ return int32(0)
}
- return i32(2)
+ return int32(2)
}()
}
- _combinedFlags = (_pA.X2) | (_pB.X2)
- if (_combinedFlags & uint32(i32(1024))) == 0 {
+ _combinedFlags = _pA.Xflags | _pB.Xflags
+ if (_combinedFlags & uint32(1024)) == 0 {
goto _4
}
- if ((((_pA.X2) & (_pB.X2)) & uint32(i32(1024))) != uint32(i32(0))) && ((*(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pA.X3)))))) == (*(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pB.X3))))))) {
- return i32(0)
+ if (((_pA.Xflags & _pB.Xflags) & uint32(1024)) != (0)) && ((*(*int32)(unsafe.Pointer(&_pA.Xu))) == (*(*int32)(unsafe.Pointer(&_pB.Xu)))) {
+ return int32(0)
}
- return i32(2)
+ return int32(2)
_4:
- if int32(_pA.X0) == int32(_pB.X0) {
+ if int32(_pA.Xop) == int32(_pB.Xop) {
goto _7
}
- if (int32(_pA.X0) == i32(94)) && (_sqlite3ExprCompare(tls, (*XExpr)(_pA.X4), _pB, _iTab) < i32(2)) {
- return i32(1)
+ if (int32(_pA.Xop) == int32(94)) && (_sqlite3ExprCompare(tls, (*XExpr)(_pA.XpLeft), _pB, _iTab) < int32(2)) {
+ return int32(1)
}
- if (int32(_pB.X0) == i32(94)) && (_sqlite3ExprCompare(tls, _pA, (*XExpr)(_pB.X4), _iTab) < i32(2)) {
- return i32(1)
+ if (int32(_pB.Xop) == int32(94)) && (_sqlite3ExprCompare(tls, _pA, (*XExpr)(_pB.XpLeft), _iTab) < int32(2)) {
+ return int32(1)
}
- return i32(2)
+ return int32(2)
_7:
- if int32(_pA.X0) == i32(152) || int32(_pA.X0) == i32(154) || (*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pA.X3)))))) == nil {
+ if int32(_pA.Xop) == int32(152) || int32(_pA.Xop) == int32(154) || (*(**int8)(unsafe.Pointer(&_pA.Xu))) == nil {
goto _14
}
- if int32(_pA.X0) != i32(151) {
+ if int32(_pA.Xop) != int32(151) {
goto _15
}
- if _sqlite3StrICmp(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pA.X3))))), *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pB.X3)))))) != i32(0) {
- return i32(2)
+ if _sqlite3StrICmp(tls, *(**int8)(unsafe.Pointer(&_pA.Xu)), *(**int8)(unsafe.Pointer(&_pB.Xu))) != int32(0) {
+ return int32(2)
}
goto _18
_15:
- if crt.Xstrcmp(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pA.X3))))), *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pB.X3)))))) != i32(0) {
+ if crt.Xstrcmp(tls, *(**int8)(unsafe.Pointer(&_pA.Xu)), *(**int8)(unsafe.Pointer(&_pB.Xu))) != int32(0) {
return func() int32 {
- if int32(_pA.X0) == i32(94) {
- return i32(1)
+ if int32(_pA.Xop) == int32(94) {
+ return int32(1)
}
- return i32(2)
+ return int32(2)
}()
}
_18:
_14:
- if ((_pA.X2) & uint32(i32(16))) != ((_pB.X2) & uint32(i32(16))) {
- return i32(2)
+ if (_pA.Xflags & uint32(16)) != (_pB.Xflags & uint32(16)) {
+ return int32(2)
}
if func() int32 {
- if (_combinedFlags & uint32(i32(16384))) == uint32(i32(0)) {
- return i32(1)
+ if (_combinedFlags & uint32(16384)) == (0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95607), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCompareØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95607), unsafe.Pointer(&_sqlite3ExprCompareØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _24
}
- if (_combinedFlags & uint32(i32(2048))) != 0 {
- return i32(2)
+ if (_combinedFlags & uint32(2048)) != 0 {
+ return int32(2)
}
- if _sqlite3ExprCompare(tls, (*XExpr)(_pA.X4), (*XExpr)(_pB.X4), _iTab) != 0 {
- return i32(2)
+ if _sqlite3ExprCompare(tls, (*XExpr)(_pA.XpLeft), (*XExpr)(_pB.XpLeft), _iTab) != 0 {
+ return int32(2)
}
- if _sqlite3ExprCompare(tls, (*XExpr)(_pA.X5), (*XExpr)(_pB.X5), _iTab) != 0 {
- return i32(2)
+ if _sqlite3ExprCompare(tls, (*XExpr)(_pA.XpRight), (*XExpr)(_pB.XpRight), _iTab) != 0 {
+ return int32(2)
}
- if _sqlite3ExprListCompare(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pA.X6)))))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pB.X6)))))), _iTab) != 0 {
- return i32(2)
+ if _sqlite3ExprListCompare(tls, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pA.Xx))), (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pB.Xx))), _iTab) != 0 {
+ return int32(2)
}
if func() int32 {
- if (_combinedFlags & uint32(i32(8192))) == uint32(i32(0)) {
- return i32(1)
+ if (_combinedFlags & uint32(8192)) == (0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95612), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCompareØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95612), unsafe.Pointer(&_sqlite3ExprCompareØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() == 0 || int32(_pA.X0) == i32(97) {
+ }() == 0 || int32(_pA.Xop) == int32(97) {
goto _32
}
- if int32(_pA.X9) != int32(_pB.X9) {
- return i32(2)
+ if int32(_pA.XiColumn) != int32(_pB.XiColumn) {
+ return int32(2)
}
- if ((_pA.X8) != (_pB.X8)) && (((_pA.X8) != _iTab) || func() int32 {
- if (_pB.X8) >= i32(0) {
+ if (_pA.XiTable != _pB.XiTable) && ((_pA.XiTable != _iTab) || func() int32 {
+ if _pB.XiTable >= int32(0) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95615), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCompareØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95615), unsafe.Pointer(&_sqlite3ExprCompareØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0) {
- return i32(2)
+ return int32(2)
}
_32:
_24:
- return i32(0)
+ return int32(0)
}
var _sqlite3ExprCompareØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCompareØ00__func__Ø000[0], str(97219), 19)
-}
-
-// Compare two ExprList objects. Return 0 if they are identical and
-// non-zero if they differ in any way.
-//
-// If any subelement of pB has Expr.iTable==(-1) then it is allowed
-// to compare equal to an equivalent element in pA with Expr.iTable==iTab.
-//
-// This routine might return non-zero for equivalent ExprLists. The
-// only consequence will be disabled optimizations. But this routine
-// must never return 0 if the two ExprList objects are different, or
-// a malfunction will result.
-//
-// Two NULL pointers are considered to be the same. But a NULL pointer
-// always differs from a non-NULL pointer.
+ crt.Xstrncpy(nil, &_sqlite3ExprCompareØ00__func__Ø000[0], str(97247), 19)
+}
+
+// C comment
+// /*
+// ** Compare two ExprList objects. Return 0 if they are identical and
+// ** non-zero if they differ in any way.
+// **
+// ** If any subelement of pB has Expr.iTable==(-1) then it is allowed
+// ** to compare equal to an equivalent element in pA with Expr.iTable==iTab.
+// **
+// ** This routine might return non-zero for equivalent ExprLists. The
+// ** only consequence will be disabled optimizations. But this routine
+// ** must never return 0 if the two ExprList objects are different, or
+// ** a malfunction will result.
+// **
+// ** Two NULL pointers are considered to be the same. But a NULL pointer
+// ** always differs from a non-NULL pointer.
+// */
func _sqlite3ExprListCompare(tls *crt.TLS, _pA *XExprList, _pB *XExprList, _iTab int32) (r0 int32) {
var _i int32
var _1_pExprA, _1_pExprB *XExpr
if (_pA == nil) && (_pB == nil) {
- return i32(0)
+ return int32(0)
}
if (_pA == nil) || (_pB == nil) {
- return i32(1)
+ return int32(1)
}
- if (_pA.X0) != (_pB.X0) {
- return i32(1)
+ if _pA.XnExpr != _pB.XnExpr {
+ return int32(1)
}
- _i = i32(0)
+ _i = int32(0)
_5:
- if _i >= (_pA.X0) {
+ if _i >= _pA.XnExpr {
goto _8
}
- _1_pExprA = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pA.X2))))) + 20*uintptr(_i))).X0)
- _1_pExprB = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pB.X2))))) + 20*uintptr(_i))).X0)
- if int32((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pA.X2)))))+20*uintptr(_i))).X3) != int32((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pB.X2)))))+20*uintptr(_i))).X3) {
- return i32(1)
+ _1_pExprA = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pA.Xa)), uintptr(_i)).XpExpr)
+ _1_pExprB = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pB.Xa)), uintptr(_i)).XpExpr)
+ if int32(elem57((*TExprList_item)(unsafe.Pointer(&_pA.Xa)), uintptr(_i)).XsortOrder) != int32(elem57((*TExprList_item)(unsafe.Pointer(&_pB.Xa)), uintptr(_i)).XsortOrder) {
+ return int32(1)
}
if _sqlite3ExprCompare(tls, _1_pExprA, _1_pExprB, _iTab) != 0 {
- return i32(1)
+ return int32(1)
}
_i += 1
goto _5
_8:
- return i32(0)
-}
-
-// Check every term in the ORDER BY or GROUP BY clause pOrderBy of
-// the SELECT statement pSelect. If any term is reference to a
-// result set expression (as determined by the ExprList.a.u.x.iOrderByCol
-// field) then convert that term into a copy of the corresponding result set
-// column.
-//
-// If any errors are detected, add an error message to pParse and
-// return non-zero. Return zero if no errors are seen.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Check every term in the ORDER BY or GROUP BY clause pOrderBy of
+// ** the SELECT statement pSelect. If any term is reference to a
+// ** result set expression (as determined by the ExprList.a.u.x.iOrderByCol
+// ** field) then convert that term into a copy of the corresponding result set
+// ** column.
+// **
+// ** If any errors are detected, add an error message to pParse and
+// ** return non-zero. Return zero if no errors are seen.
+// */
func _sqlite3ResolveOrderGroupBy(tls *crt.TLS, _pParse *XParse, _pSelect *XSelect, _pOrderBy *XExprList, _zType *int8) (r0 int32) {
var _i int32
var _db *Xsqlite3
var _pEList *XExprList
var _pItem *TExprList_item
- _db = (*Xsqlite3)(_pParse.X0)
- if (_pOrderBy == nil) || (((*Xsqlite3)(_pParse.X0).X17) != 0) {
- return i32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if (_pOrderBy == nil) || (((*Xsqlite3)(_pParse.Xdb).XmallocFailed) != 0) {
+ return int32(0)
}
- if (_pOrderBy.X0) > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(2))))) {
- _sqlite3ErrorMsg(tls, _pParse, str(97238), unsafe.Pointer(_zType))
- return i32(1)
+ if _pOrderBy.XnExpr > (*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(2))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(97266), unsafe.Pointer(_zType))
+ return int32(1)
}
- _pEList = (*XExprList)(_pSelect.X0)
+ _pEList = (*XExprList)(_pSelect.XpEList)
func() {
if _pEList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90418), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ResolveOrderGroupByØ00__func__Ø000))), unsafe.Pointer(str(45052)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90418), unsafe.Pointer(&_sqlite3ResolveOrderGroupByØ00__func__Ø000), unsafe.Pointer(str(45007)))
crt.X__builtin_abort(tls)
}
}()
- *func() **TExprList_item { _i = i32(0); return &_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))
+ *func() **TExprList_item { _i = int32(0); return &_pItem }() = (*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa))
_5:
- if _i >= (_pOrderBy.X0) {
+ if _i >= _pOrderBy.XnExpr {
goto _8
}
- if ((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_pItem.X5))))).X0) == 0 {
+ if ((*t71)(unsafe.Pointer(&_pItem.Xu)).XiOrderByCol) == 0 {
goto _9
}
- if int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_pItem.X5))))).X0) > (_pEList.X0) {
- _resolveOutOfRangeError(tls, _pParse, _zType, _i+i32(1), _pEList.X0)
- return i32(1)
+ if int32((*t71)(unsafe.Pointer(&_pItem.Xu)).XiOrderByCol) > _pEList.XnExpr {
+ _resolveOutOfRangeError(tls, _pParse, _zType, _i+int32(1), _pEList.XnExpr)
+ return int32(1)
}
- _resolveAlias(tls, _pParse, _pEList, int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_pItem.X5))))).X0)-i32(1), (*XExpr)(_pItem.X0), _zType, i32(0))
+ _resolveAlias(tls, _pParse, _pEList, int32((*t71)(unsafe.Pointer(&_pItem.Xu)).XiOrderByCol)-int32(1), (*XExpr)(_pItem.XpExpr), _zType, int32(0))
_9:
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i += 1; return &_pItem }())) += uintptr(20)
goto _5
_8:
- return i32(0)
+ return int32(0)
}
var _sqlite3ResolveOrderGroupByØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ResolveOrderGroupByØ00__func__Ø000[0], str(97269), 27)
+ crt.Xstrncpy(nil, &_sqlite3ResolveOrderGroupByØ00__func__Ø000[0], str(97297), 27)
}
-// Error message for when two or more terms of a compound select have different
-// size result sets.
+// C comment
+// /*
+// ** Error message for when two or more terms of a compound select have different
+// ** size result sets.
+// */
func _sqlite3SelectWrongNumTermsError(tls *crt.TLS, _pParse *XParse, _p *XSelect) {
- if ((_p.X3) & uint32(i32(512))) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(97296))
+ if (_p.XselFlags & uint32(512)) != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(97324))
goto _1
}
- _sqlite3ErrorMsg(tls, _pParse, str(97342), unsafe.Pointer(_selectOpName(tls, int32(_p.X1))))
+ _sqlite3ErrorMsg(tls, _pParse, str(97370), unsafe.Pointer(_selectOpName(tls, int32(_p.Xop))))
_1:
}
-// Name of the connection operator, used for error messages.
+// C comment
+// /*
+// ** Name of the connection operator, used for error messages.
+// */
func _selectOpName(tls *crt.TLS, _id int32) (r0 *int8) {
var _z *int8
switch _id {
- case i32(116):
+ case int32(116):
goto _1
- case i32(117):
+ case int32(117):
goto _3
- case i32(118):
+ case int32(118):
goto _2
default:
goto _4
}
_1:
- _z = str(47100)
+ _z = str(47055)
goto _5
_2:
- _z = str(25692)
+ _z = str(25647)
goto _5
_3:
- _z = str(25685)
+ _z = str(25640)
goto _5
_4:
- _z = str(25675)
+ _z = str(25630)
goto _5
_5:
return _z
}
-// Analyze the ORDER BY clause in a compound SELECT statement. Modify
-// each term of the ORDER BY clause is a constant integer between 1
-// and N where N is the number of columns in the compound SELECT.
-//
-// ORDER BY terms that are already an integer between 1 and N are
-// unmodified. ORDER BY terms that are integers outside the range of
-// 1 through N generate an error. ORDER BY terms that are expressions
-// are matched against result set expressions of compound SELECT
-// beginning with the left-most SELECT and working toward the right.
-// At the first match, the ORDER BY expression is transformed into
-// the integer column number.
-//
-// Return the number of errors seen.
+// C comment
+// /*
+// ** Analyze the ORDER BY clause in a compound SELECT statement. Modify
+// ** each term of the ORDER BY clause is a constant integer between 1
+// ** and N where N is the number of columns in the compound SELECT.
+// **
+// ** ORDER BY terms that are already an integer between 1 and N are
+// ** unmodified. ORDER BY terms that are integers outside the range of
+// ** 1 through N generate an error. ORDER BY terms that are expressions
+// ** are matched against result set expressions of compound SELECT
+// ** beginning with the left-most SELECT and working toward the right.
+// ** At the first match, the ORDER BY expression is transformed into
+// ** the integer column number.
+// **
+// ** Return the number of errors seen.
+// */
func _resolveCompoundOrderBy(tls *crt.TLS, _pParse *XParse, _pSelect *XSelect) (r0 int32) {
var _i, _moreToDo, _5_iCol int32
var _db *Xsqlite3
var _pOrderBy, _pEList *XExprList
var _4_pItem *TExprList_item
var _5_pE, _5_pDup, _11_pNew, _13_pParent *XExpr
- _moreToDo = i32(1)
- _pOrderBy = (*XExprList)(_pSelect.X12)
+ _moreToDo = int32(1)
+ _pOrderBy = (*XExprList)(_pSelect.XpOrderBy)
if _pOrderBy == nil {
- return i32(0)
+ return int32(0)
}
- _db = (*Xsqlite3)(_pParse.X0)
- if (_pOrderBy.X0) > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(2))))) {
- _sqlite3ErrorMsg(tls, _pParse, str(97424))
- return i32(1)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pOrderBy.XnExpr > (*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(2))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(97452))
+ return int32(1)
}
- _i = i32(0)
+ _i = int32(0)
_2:
- if _i >= (_pOrderBy.X0) {
+ if _i >= _pOrderBy.XnExpr {
goto _5
}
- storebits3((*int8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2))))) + 20*uintptr(_i))).X4))), int8(i32(0)), 1, 0)
+ storebits5(&(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).Xdone), 0, 1, 0)
_i += 1
goto _2
_5:
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSelect.X14))))) = nil
+ *(**XSelect)(unsafe.Pointer(&_pSelect.XpNext)) = nil
_6:
- if (*XSelect)(_pSelect.X13) != nil {
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XSelect)(_pSelect.X13).X14))))) = _pSelect
- _pSelect = (*XSelect)(_pSelect.X13)
+ if _pSelect.XpPrior != nil {
+ *(**XSelect)(unsafe.Pointer(&((*XSelect)(_pSelect.XpPrior).XpNext))) = _pSelect
+ _pSelect = (*XSelect)(_pSelect.XpPrior)
goto _6
}
_7:
if _pSelect == nil || _moreToDo == 0 {
goto _9
}
- _moreToDo = i32(0)
- _pEList = (*XExprList)(_pSelect.X0)
+ _moreToDo = int32(0)
+ _pEList = (*XExprList)(_pSelect.XpEList)
func() {
if _pEList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90332), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveCompoundOrderByØ00__func__Ø000))), unsafe.Pointer(str(45052)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90332), unsafe.Pointer(&_resolveCompoundOrderByØ00__func__Ø000), unsafe.Pointer(str(45007)))
crt.X__builtin_abort(tls)
}
}()
- *func() **TExprList_item { _i = i32(0); return &_4_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))
+ *func() **TExprList_item { _i = int32(0); return &_4_pItem }() = (*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa))
_13:
- if _i >= (_pOrderBy.X0) {
+ if _i >= _pOrderBy.XnExpr {
goto _16
}
- _5_iCol = i32(-1)
- if ((uint32(_4_pItem.X4) << uint(i32(31))) >> uint(i32(31))) != 0 {
+ _5_iCol = int32(-1)
+ if ((uint32(_4_pItem.Xdone) << 31) >> 31) != 0 {
goto _14
}
- _5_pE = _sqlite3ExprSkipCollate(tls, (*XExpr)(_4_pItem.X0))
+ _5_pE = _sqlite3ExprSkipCollate(tls, (*XExpr)(_4_pItem.XpExpr))
if _sqlite3ExprIsInteger(tls, _5_pE, &_5_iCol) == 0 {
goto _18
}
- if (_5_iCol <= i32(0)) || (_5_iCol > (_pEList.X0)) {
- _resolveOutOfRangeError(tls, _pParse, str(25745), _i+i32(1), _pEList.X0)
- return i32(1)
+ if (_5_iCol <= int32(0)) || (_5_iCol > _pEList.XnExpr) {
+ _resolveOutOfRangeError(tls, _pParse, str(25700), _i+int32(1), _pEList.XnExpr)
+ return int32(1)
}
goto _21
_18:
_5_iCol = _resolveAsName(tls, _pParse, _pEList, _5_pE)
- if _5_iCol != i32(0) {
+ if _5_iCol != int32(0) {
goto _22
}
- _5_pDup = _sqlite3ExprDup(tls, _db, _5_pE, i32(0))
- if (_db.X17) == 0 {
+ _5_pDup = _sqlite3ExprDup(tls, _db, _5_pE, int32(0))
+ if _db.XmallocFailed == 0 {
func() {
if _5_pDup == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90348), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveCompoundOrderByØ00__func__Ø000))), unsafe.Pointer(str(97458)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90348), unsafe.Pointer(&_resolveCompoundOrderByØ00__func__Ø000), unsafe.Pointer(str(97486)))
crt.X__builtin_abort(tls)
}
}()
@@ -75746,94 +76822,93 @@ _18:
_sqlite3ExprDelete(tls, _db, _5_pDup)
_22:
_21:
- if _5_iCol <= i32(0) {
+ if _5_iCol <= int32(0) {
goto _26
}
- _11_pNew = _sqlite3Expr(tls, _db, i32(134), nil)
+ _11_pNew = _sqlite3Expr(tls, _db, int32(134), nil)
if _11_pNew == nil {
- return i32(1)
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_11_pNew.X2)))
- *p = (*p) | uint32(i32(1024))
- sink5(*p)
+ return int32(1)
}
- *(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_11_pNew.X3))))) = _5_iCol
- if (*XExpr)(_4_pItem.X0) == _5_pE {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_4_pItem.X0))))) = _11_pNew
+ _11_pNew.Xflags |= uint32(1024)
+ *(*int32)(unsafe.Pointer(&_11_pNew.Xu)) = _5_iCol
+ if (*XExpr)(_4_pItem.XpExpr) == _5_pE {
+ *(**XExpr)(unsafe.Pointer(&_4_pItem.XpExpr)) = _11_pNew
goto _29
}
- _13_pParent = (*XExpr)(_4_pItem.X0)
+ _13_pParent = (*XExpr)(_4_pItem.XpExpr)
func() {
- if int32(_13_pParent.X0) != i32(94) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90365), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveCompoundOrderByØ00__func__Ø000))), unsafe.Pointer(str(97463)))
+ if int32(_13_pParent.Xop) != int32(94) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90365), unsafe.Pointer(&_resolveCompoundOrderByØ00__func__Ø000), unsafe.Pointer(str(97491)))
crt.X__builtin_abort(tls)
}
}()
_32:
- if int32((*XExpr)(_13_pParent.X4).X0) == i32(94) {
- _13_pParent = (*XExpr)(_13_pParent.X4)
+ if int32((*XExpr)(_13_pParent.XpLeft).Xop) == int32(94) {
+ _13_pParent = (*XExpr)(_13_pParent.XpLeft)
goto _32
}
func() {
- if (*XExpr)(_13_pParent.X4) != _5_pE {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90367), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveCompoundOrderByØ00__func__Ø000))), unsafe.Pointer(str(97487)))
+ if (*XExpr)(_13_pParent.XpLeft) != _5_pE {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90367), unsafe.Pointer(&_resolveCompoundOrderByØ00__func__Ø000), unsafe.Pointer(str(97515)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_13_pParent.X4))))) = _11_pNew
+ *(**XExpr)(unsafe.Pointer(&_13_pParent.XpLeft)) = _11_pNew
_29:
_sqlite3ExprDelete(tls, _db, _5_pE)
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_4_pItem.X5))))).X0))) = uint16(_5_iCol)
- storebits3((*int8)(unsafe.Pointer(&(_4_pItem.X4))), int8(i32(1)), 1, 0)
+ (*t71)(unsafe.Pointer(&_4_pItem.Xu)).XiOrderByCol = uint16(_5_iCol)
+ storebits5(&_4_pItem.Xdone, int8(1), 1, 0)
goto _36
_26:
- _moreToDo = i32(1)
+ _moreToDo = int32(1)
_36:
_14:
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i += 1; return &_4_pItem }())) += uintptr(20)
goto _13
_16:
- _pSelect = (*XSelect)(_pSelect.X14)
+ _pSelect = (*XSelect)(_pSelect.XpNext)
goto _7
_9:
- _i = i32(0)
+ _i = int32(0)
_37:
- if _i >= (_pOrderBy.X0) {
+ if _i >= _pOrderBy.XnExpr {
goto _40
}
- if int32((uint32((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))+20*uintptr(_i))).X4)<<uint(i32(31)))>>uint(i32(31))) == i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(97506), _i+i32(1))
- return i32(1)
+ if int32((uint32(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).Xdone)<<31)>>31) == int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(97534), _i+int32(1))
+ return int32(1)
}
_i += 1
goto _37
_40:
- return i32(0)
+ return int32(0)
}
var _resolveCompoundOrderByØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_resolveCompoundOrderByØ00__func__Ø000[0], str(97567), 23)
-}
-
-// pE is a pointer to an expression which is a single term in the
-// ORDER BY of a compound SELECT. The expression has not been
-// name resolved.
-//
-// At the point this routine is called, we already know that the
-// ORDER BY term is not an integer index into the result set. That
-// case is handled by the calling routine.
-//
-// Attempt to match pE against result set columns in the left-most
-// SELECT statement. Return the index i of the matching column,
-// as an indication to the caller that it should sort by the i-th column.
-// The left-most column is 1. In other words, the value returned is the
-// same integer value that would be used in the SQL statement to indicate
-// the column.
-//
-// If there is no match, return 0. Return -1 if an error occurs.
+ crt.Xstrncpy(nil, &_resolveCompoundOrderByØ00__func__Ø000[0], str(97595), 23)
+}
+
+// C comment
+// /*
+// ** pE is a pointer to an expression which is a single term in the
+// ** ORDER BY of a compound SELECT. The expression has not been
+// ** name resolved.
+// **
+// ** At the point this routine is called, we already know that the
+// ** ORDER BY term is not an integer index into the result set. That
+// ** case is handled by the calling routine.
+// **
+// ** Attempt to match pE against result set columns in the left-most
+// ** SELECT statement. Return the index i of the matching column,
+// ** as an indication to the caller that it should sort by the i-th column.
+// ** The left-most column is 1. In other words, the value returned is the
+// ** same integer value that would be used in the SQL statement to indicate
+// ** the column.
+// **
+// ** If there is no match, return 0. Return -1 if an error occurs.
+// */
func _resolveOrderByTermToExprList(tls *crt.TLS, _pParse *XParse, _pSelect *XSelect, _pE *XExpr) (r0 int32) {
var _i, _rc int32
var _savedSuppErr uint8
@@ -75841,75 +76916,77 @@ func _resolveOrderByTermToExprList(tls *crt.TLS, _pParse *XParse, _pSelect *XSel
var _pEList *XExprList
var _nc XNameContext
func() {
- if _sqlite3ExprIsInteger(tls, _pE, &_i) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90240), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveOrderByTermToExprListØ00__func__Ø000))), unsafe.Pointer(str(97590)))
+ if _sqlite3ExprIsInteger(tls, _pE, &_i) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90240), unsafe.Pointer(&_resolveOrderByTermToExprListØ00__func__Ø000), unsafe.Pointer(str(97618)))
crt.X__builtin_abort(tls)
}
}()
- _pEList = (*XExprList)(_pSelect.X0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_nc), i32(0), u32(32))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_nc.X0))))) = _pParse
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_nc.X1))))) = (*XSrcList)(_pSelect.X8)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_nc.X2))))) = _pEList
- *(*uint16)(unsafe.Pointer(&(_nc.X7))) = uint16(i32(1))
- *(*int32)(unsafe.Pointer(&(_nc.X6))) = i32(0)
- _db = (*Xsqlite3)(_pParse.X0)
- _savedSuppErr = _db.X21
- *(*uint8)(unsafe.Pointer(&(_db.X21))) = uint8(i32(1))
+ _pEList = (*XExprList)(_pSelect.XpEList)
+ crt.Xmemset(tls, unsafe.Pointer(&_nc), int32(0), uint32(32))
+ *(**XParse)(unsafe.Pointer(&_nc.XpParse)) = _pParse
+ *(**XSrcList)(unsafe.Pointer(&_nc.XpSrcList)) = (*XSrcList)(_pSelect.XpSrc)
+ *(**XExprList)(unsafe.Pointer(&_nc.XpEList)) = _pEList
+ _nc.XncFlags = uint16(1)
+ _nc.XnErr = int32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _savedSuppErr = _db.XsuppressErr
+ _db.XsuppressErr = uint8(1)
_rc = _sqlite3ResolveExprNames(tls, &_nc, _pE)
- *(*uint8)(unsafe.Pointer(&(_db.X21))) = _savedSuppErr
+ _db.XsuppressErr = _savedSuppErr
if _rc != 0 {
- return i32(0)
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_3:
- if _i >= (_pEList.X0) {
+ if _i >= _pEList.XnExpr {
goto _6
}
- if _sqlite3ExprCompare(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))+20*uintptr(_i))).X0), _pE, i32(-1)) < i32(2) {
- return _i + i32(1)
+ if _sqlite3ExprCompare(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XpExpr), _pE, int32(-1)) < int32(2) {
+ return _i + int32(1)
}
_i += 1
goto _3
_6:
- return i32(0)
-
- _ = _nc
- panic(0)
+ return int32(0)
}
var _resolveOrderByTermToExprListØ00__func__Ø000 [29]int8
func init() {
- crt.Xstrncpy(nil, &_resolveOrderByTermToExprListØ00__func__Ø000[0], str(97622), 29)
+ crt.Xstrncpy(nil, &_resolveOrderByTermToExprListØ00__func__Ø000[0], str(97650), 29)
}
-// This routine adds datatype and collating sequence information to
-// the Table structures of all FROM-clause subqueries in a
-// SELECT statement.
-//
-// Use this routine after name resolution.
+// C comment
+// /*
+// ** This routine adds datatype and collating sequence information to
+// ** the Table structures of all FROM-clause subqueries in a
+// ** SELECT statement.
+// **
+// ** Use this routine after name resolution.
+// */
func _sqlite3SelectAddTypeInfo(tls *crt.TLS, _pParse *XParse, _pSelect *XSelect) {
var _w XWalker
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&(_w.X3))))) = _selectAddSubqueryTypeInfo
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _sqlite3ExprWalkNoop
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_w.X0))))) = _pParse
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ *(*func(*crt.TLS, *XWalker, *XSelect))(unsafe.Pointer(&_w.XxSelectCallback2)) = _selectAddSubqueryTypeInfo
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _sqlite3ExprWalkNoop
+ *(**XParse)(unsafe.Pointer(&_w.XpParse)) = _pParse
_sqlite3WalkSelect(tls, &_w, _pSelect)
- _ = _w
-}
-
-// This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo()
-// interface.
-//
-// For each FROM-clause subquery, add Column.zType and Column.zColl
-// information to the Table structure that represents the result set
-// of that subquery.
-//
-// The Table structure that represents the result set was constructed
-// by selectExpander() but the type and collation information was omitted
-// at that point because identifiers had not yet been resolved. This
-// routine is called after identifier resolution.
+}
+
+// C comment
+// /*
+// ** This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo()
+// ** interface.
+// **
+// ** For each FROM-clause subquery, add Column.zType and Column.zColl
+// ** information to the Table structure that represents the result set
+// ** of that subquery.
+// **
+// ** The Table structure that represents the result set was constructed
+// ** by selectExpander() but the type and collation information was omitted
+// ** at that point because identifiers had not yet been resolved. This
+// ** routine is called after identifier resolution.
+// */
func _selectAddSubqueryTypeInfo(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) {
var _i int32
var _1_pTab *XTable
@@ -75918,46 +76995,42 @@ func _selectAddSubqueryTypeInfo(tls *crt.TLS, _pWalker *XWalker, _p *XSelect) {
var _2_pSel *XSelect
var _pParse *XParse
func() {
- if ((_p.X3) & uint32(i32(4))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121182), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectAddSubqueryTypeInfoØ00__func__Ø000))), unsafe.Pointer(str(97651)))
+ if (_p.XselFlags & uint32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121182), unsafe.Pointer(&_selectAddSubqueryTypeInfoØ00__func__Ø000), unsafe.Pointer(str(97679)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X3) & uint32(i32(128))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121183), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectAddSubqueryTypeInfoØ00__func__Ø000))), unsafe.Pointer(str(97677)))
+ if (_p.XselFlags & uint32(128)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121183), unsafe.Pointer(&_selectAddSubqueryTypeInfoØ00__func__Ø000), unsafe.Pointer(str(97705)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) | uint32(i32(128))
- sink5(*p)
- }
- _pParse = (*XParse)(_pWalker.X0)
- _pTabList = (*XSrcList)(_p.X8)
- *func() **TSrcList_item { _i = i32(0); return &_pFrom }() = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))
+ _p.XselFlags |= uint32(128)
+ _pParse = (*XParse)(_pWalker.XpParse)
+ _pTabList = (*XSrcList)(_p.XpSrc)
+ *func() **TSrcList_item { _i = int32(0); return &_pFrom }() = (*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa))
_4:
- if _i >= (_pTabList.X0) {
+ if _i >= _pTabList.XnSrc {
goto _7
}
- _1_pTab = (*XTable)(_pFrom.X4)
+ _1_pTab = (*XTable)(_pFrom.XpTab)
func() {
if _1_pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121189), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectAddSubqueryTypeInfoØ00__func__Ø000))), unsafe.Pointer(str(43594)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121189), unsafe.Pointer(&_selectAddSubqueryTypeInfoØ00__func__Ø000), unsafe.Pointer(str(43549)))
crt.X__builtin_abort(tls)
}
}()
- if ((_1_pTab.X9) & uint32(i32(2))) == uint32(i32(0)) {
+ if (_1_pTab.XtabFlags & uint32(2)) == (0) {
goto _10
}
- _2_pSel = (*XSelect)(_pFrom.X5)
+ _2_pSel = (*XSelect)(_pFrom.XpSelect)
if _2_pSel == nil {
goto _11
}
_12:
- if (*XSelect)(_2_pSel.X13) != nil {
- _2_pSel = (*XSelect)(_2_pSel.X13)
+ if _2_pSel.XpPrior != nil {
+ _2_pSel = (*XSelect)(_2_pSel.XpPrior)
goto _12
}
_sqlite3SelectAddColumnTypeAndCollation(tls, _pParse, _1_pTab, _2_pSel)
@@ -75971,147 +77044,150 @@ _7:
var _selectAddSubqueryTypeInfoØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_selectAddSubqueryTypeInfoØ00__func__Ø000[0], str(97711), 26)
-}
-
-// This routine attempts to flatten subqueries as a performance optimization.
-// This routine returns 1 if it makes changes and 0 if no flattening occurs.
-//
-// To understand the concept of flattening, consider the following
-// query:
-//
-// SELECT a FROM (SELECT x+y AS a FROM t1 WHERE z<100) WHERE a>5
-//
-// The default way of implementing this query is to execute the
-// subquery first and store the results in a temporary table, then
-// run the outer query on that temporary table. This requires two
-// passes over the data. Furthermore, because the temporary table
-// has no indices, the WHERE clause on the outer query cannot be
-// optimized.
-//
-// This routine attempts to rewrite queries such as the above into
-// a single flat select, like this:
-//
-// SELECT x+y AS a FROM t1 WHERE z<100 AND a>5
-//
-// The code generated for this simplification gives the same result
-// but only has to scan the data once. And because indices might
-// exist on the table t1, a complete scan of the data might be
-// avoided.
-//
-// Flattening is only attempted if all of the following are true:
-//
-// (1) The subquery and the outer query do not both use aggregates.
-//
-// (2) The subquery is not an aggregate or (2a) the outer query is not a join
-// and (2b) the outer query does not use subqueries other than the one
-// FROM-clause subquery that is a candidate for flattening. (2b is
-// due to ticket [2f7170d73bf9abf80] from 2015-02-09.)
-//
-// (3) The subquery is not the right operand of a LEFT JOIN
-// or the subquery is not itself a join and the outer query is not
-// an aggregate.
-//
-// (4) The subquery is not DISTINCT.
-//
-// (**) At one point restrictions (4) and (5) defined a subset of DISTINCT
-// sub-queries that were excluded from this optimization. Restriction
-// (4) has since been expanded to exclude all DISTINCT subqueries.
-//
-// (6) The subquery does not use aggregates or the outer query is not
-// DISTINCT.
-//
-// (7) The subquery has a FROM clause. TODO: For subqueries without
-// A FROM clause, consider adding a FROM clause with the special
-// table sqlite_once that consists of a single row containing a
-// single NULL.
-//
-// (8) The subquery does not use LIMIT or the outer query is not a join.
-//
-// (9) The subquery does not use LIMIT or the outer query does not use
-// aggregates.
-//
-// (**) Restriction (10) was removed from the code on 2005-02-05 but we
-// accidently carried the comment forward until 2014-09-15. Original
-// text: "The subquery does not use aggregates or the outer query
-// does not use LIMIT."
-//
-// (11) The subquery and the outer query do not both have ORDER BY clauses.
-//
-// (**) Not implemented. Subsumed into restriction (3). Was previously
-// a separate restriction deriving from ticket #350.
-//
-// (13) The subquery and outer query do not both use LIMIT.
-//
-// (14) The subquery does not use OFFSET.
-//
-// (15) The outer query is not part of a compound select or the
-// subquery does not have a LIMIT clause.
-// (See ticket #2339 and ticket [02a8e81d44]).
-//
-// (16) The outer query is not an aggregate or the subquery does
-// not contain ORDER BY. (Ticket #2942) This used to not matter
-// until we introduced the group_concat() function.
-//
-// (17) The sub-query is not a compound select, or it is a UNION ALL
-// compound clause made up entirely of non-aggregate queries, and
-// the parent query:
-//
-// * is not itself part of a compound select,
-// * is not an aggregate or DISTINCT query, and
-// * is not a join
-//
-// The parent and sub-query may contain WHERE clauses. Subject to
-// rules (11), (13) and (14), they may also contain ORDER BY,
-// LIMIT and OFFSET clauses. The subquery cannot use any compound
-// operator other than UNION ALL because all the other compound
-// operators have an implied DISTINCT which is disallowed by
-// restriction (4).
-//
-// Also, each component of the sub-query must return the same number
-// of result columns. This is actually a requirement for any compound
-// SELECT statement, but all the code here does is make sure that no
-// such (illegal) sub-query is flattened. The caller will detect the
-// syntax error and return a detailed message.
-//
-// (18) If the sub-query is a compound select, then all terms of the
-// ORDER by clause of the parent must be simple references to
-// columns of the sub-query.
-//
-// (19) The subquery does not use LIMIT or the outer query does not
-// have a WHERE clause.
-//
-// (20) If the sub-query is a compound select, then it must not use
-// an ORDER BY clause. Ticket #3773. We could relax this constraint
-// somewhat by saying that the terms of the ORDER BY clause must
-// appear as unmodified result columns in the outer query. But we
-// have other optimizations in mind to deal with that case.
-//
-// (21) The subquery does not use LIMIT or the outer query is not
-// DISTINCT. (See ticket [752e1646fc]).
-//
-// (22) The subquery is not a recursive CTE.
-//
-// (23) The parent is not a recursive CTE, or the sub-query is not a
-// compound query. This restriction is because transforming the
-// parent to a compound query confuses the code that handles
-// recursive queries in multiSelect().
-//
-// (24) The subquery is not an aggregate that uses the built-in min() or
-// or max() functions. (Without this restriction, a query like:
-// "SELECT x FROM (SELECT max(y), x FROM t1)" would not necessarily
-// return the value X for which Y was maximal.)
-//
-//
-// In this routine, the "p" parameter is a pointer to the outer query.
-// The subquery is p->pSrc->a[iFrom]. isAgg is true if the outer query
-// uses aggregates and subqueryIsAgg is true if the subquery uses aggregates.
-//
-// If flattening is not attempted, this routine is a no-op and returns 0.
-// If flattening is attempted this routine returns 1.
-//
-// All of the expression analysis must occur on both the outer query and
-// the subquery before this routine runs.
+ crt.Xstrncpy(nil, &_selectAddSubqueryTypeInfoØ00__func__Ø000[0], str(97739), 26)
+}
+
+// C comment
+// /*
+// ** This routine attempts to flatten subqueries as a performance optimization.
+// ** This routine returns 1 if it makes changes and 0 if no flattening occurs.
+// **
+// ** To understand the concept of flattening, consider the following
+// ** query:
+// **
+// ** SELECT a FROM (SELECT x+y AS a FROM t1 WHERE z<100) WHERE a>5
+// **
+// ** The default way of implementing this query is to execute the
+// ** subquery first and store the results in a temporary table, then
+// ** run the outer query on that temporary table. This requires two
+// ** passes over the data. Furthermore, because the temporary table
+// ** has no indices, the WHERE clause on the outer query cannot be
+// ** optimized.
+// **
+// ** This routine attempts to rewrite queries such as the above into
+// ** a single flat select, like this:
+// **
+// ** SELECT x+y AS a FROM t1 WHERE z<100 AND a>5
+// **
+// ** The code generated for this simplification gives the same result
+// ** but only has to scan the data once. And because indices might
+// ** exist on the table t1, a complete scan of the data might be
+// ** avoided.
+// **
+// ** Flattening is only attempted if all of the following are true:
+// **
+// ** (1) The subquery and the outer query do not both use aggregates.
+// **
+// ** (2) The subquery is not an aggregate or (2a) the outer query is not a join
+// ** and (2b) the outer query does not use subqueries other than the one
+// ** FROM-clause subquery that is a candidate for flattening. (2b is
+// ** due to ticket [2f7170d73bf9abf80] from 2015-02-09.)
+// **
+// ** (3) The subquery is not the right operand of a LEFT JOIN
+// ** or the subquery is not itself a join and the outer query is not
+// ** an aggregate.
+// **
+// ** (4) The subquery is not DISTINCT.
+// **
+// ** (**) At one point restrictions (4) and (5) defined a subset of DISTINCT
+// ** sub-queries that were excluded from this optimization. Restriction
+// ** (4) has since been expanded to exclude all DISTINCT subqueries.
+// **
+// ** (6) The subquery does not use aggregates or the outer query is not
+// ** DISTINCT.
+// **
+// ** (7) The subquery has a FROM clause. TODO: For subqueries without
+// ** A FROM clause, consider adding a FROM clause with the special
+// ** table sqlite_once that consists of a single row containing a
+// ** single NULL.
+// **
+// ** (8) The subquery does not use LIMIT or the outer query is not a join.
+// **
+// ** (9) The subquery does not use LIMIT or the outer query does not use
+// ** aggregates.
+// **
+// ** (**) Restriction (10) was removed from the code on 2005-02-05 but we
+// ** accidently carried the comment forward until 2014-09-15. Original
+// ** text: "The subquery does not use aggregates or the outer query
+// ** does not use LIMIT."
+// **
+// ** (11) The subquery and the outer query do not both have ORDER BY clauses.
+// **
+// ** (**) Not implemented. Subsumed into restriction (3). Was previously
+// ** a separate restriction deriving from ticket #350.
+// **
+// ** (13) The subquery and outer query do not both use LIMIT.
+// **
+// ** (14) The subquery does not use OFFSET.
+// **
+// ** (15) The outer query is not part of a compound select or the
+// ** subquery does not have a LIMIT clause.
+// ** (See ticket #2339 and ticket [02a8e81d44]).
+// **
+// ** (16) The outer query is not an aggregate or the subquery does
+// ** not contain ORDER BY. (Ticket #2942) This used to not matter
+// ** until we introduced the group_concat() function.
+// **
+// ** (17) The sub-query is not a compound select, or it is a UNION ALL
+// ** compound clause made up entirely of non-aggregate queries, and
+// ** the parent query:
+// **
+// ** * is not itself part of a compound select,
+// ** * is not an aggregate or DISTINCT query, and
+// ** * is not a join
+// **
+// ** The parent and sub-query may contain WHERE clauses. Subject to
+// ** rules (11), (13) and (14), they may also contain ORDER BY,
+// ** LIMIT and OFFSET clauses. The subquery cannot use any compound
+// ** operator other than UNION ALL because all the other compound
+// ** operators have an implied DISTINCT which is disallowed by
+// ** restriction (4).
+// **
+// ** Also, each component of the sub-query must return the same number
+// ** of result columns. This is actually a requirement for any compound
+// ** SELECT statement, but all the code here does is make sure that no
+// ** such (illegal) sub-query is flattened. The caller will detect the
+// ** syntax error and return a detailed message.
+// **
+// ** (18) If the sub-query is a compound select, then all terms of the
+// ** ORDER by clause of the parent must be simple references to
+// ** columns of the sub-query.
+// **
+// ** (19) The subquery does not use LIMIT or the outer query does not
+// ** have a WHERE clause.
+// **
+// ** (20) If the sub-query is a compound select, then it must not use
+// ** an ORDER BY clause. Ticket #3773. We could relax this constraint
+// ** somewhat by saying that the terms of the ORDER BY clause must
+// ** appear as unmodified result columns in the outer query. But we
+// ** have other optimizations in mind to deal with that case.
+// **
+// ** (21) The subquery does not use LIMIT or the outer query is not
+// ** DISTINCT. (See ticket [752e1646fc]).
+// **
+// ** (22) The subquery is not a recursive CTE.
+// **
+// ** (23) The parent is not a recursive CTE, or the sub-query is not a
+// ** compound query. This restriction is because transforming the
+// ** parent to a compound query confuses the code that handles
+// ** recursive queries in multiSelect().
+// **
+// ** (24) The subquery is not an aggregate that uses the built-in min() or
+// ** or max() functions. (Without this restriction, a query like:
+// ** "SELECT x FROM (SELECT max(y), x FROM t1)" would not necessarily
+// ** return the value X for which Y was maximal.)
+// **
+// **
+// ** In this routine, the "p" parameter is a pointer to the outer query.
+// ** The subquery is p->pSrc->a[iFrom]. isAgg is true if the outer query
+// ** uses aggregates and subqueryIsAgg is true if the subquery uses aggregates.
+// **
+// ** If flattening is not attempted, this routine is a no-op and returns 0.
+// ** If flattening is attempted this routine returns 1.
+// **
+// ** All of the expression analysis must occur on both the outer query and
+// ** the subquery before this routine runs.
+// */
func _flattenSubquery(tls *crt.TLS, _pParse *XParse, _p *XSelect, _iFrom int32, _isAgg int32, _subqueryIsAgg int32) (r0 int32) {
var _iParent, _iNewParent, _isLeftJoin, _i, _17_ii, _25_nSubSrc int32
var _zSavedAuthContext, _33_zName *int8
@@ -76125,38 +77201,38 @@ func _flattenSubquery(tls *crt.TLS, _pParse *XParse, _p *XSelect, _iFrom int32,
var _pWhere, _19_pLimit, _19_pOffset *XExpr
var _23_pToplevel *XParse
var _39_x XSubstContext
- _zSavedAuthContext = _pParse.X65
- _iNewParent = i32(-1)
- _isLeftJoin = i32(0)
- _db = (*Xsqlite3)(_pParse.X0)
+ _zSavedAuthContext = _pParse.XzAuthContext
+ _iNewParent = int32(-1)
+ _isLeftJoin = int32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119953), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119953), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(_p.X13) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119954), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97737)))
+ if (*XSelect)(_p.XpPrior) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119954), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(97765)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_db.X13) & i32(1)) != i32(0) {
- return i32(0)
+ if (int32(_db.XdbOptFlags) & int32(1)) != int32(0) {
+ return int32(0)
}
- _pSrc = (*XSrcList)(_p.X8)
+ _pSrc = (*XSrcList)(_p.XpSrc)
func() {
- if _pSrc == nil || _iFrom < i32(0) || _iFrom >= (_pSrc.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119957), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97750)))
+ if _pSrc == nil || _iFrom < int32(0) || _iFrom >= _pSrc.XnSrc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119957), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(97778)))
crt.X__builtin_abort(tls)
}
}()
- _pSubitem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(_iFrom)))
- _iParent = _pSubitem.X11
- _pSub = (*XSelect)(_pSubitem.X5)
+ _pSubitem = elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_iFrom))
+ _iParent = _pSubitem.XiCursor
+ _pSub = (*XSelect)(_pSubitem.XpSelect)
func() {
if _pSub == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119961), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97787)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119961), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(97815)))
crt.X__builtin_abort(tls)
}
}()
@@ -76164,77 +77240,77 @@ func _flattenSubquery(tls *crt.TLS, _pParse *XParse, _p *XSelect, _iFrom int32,
goto _11
}
if _isAgg != 0 {
- return i32(0)
+ return int32(0)
}
- if (_pSrc.X0) > i32(1) {
- return i32(0)
+ if _pSrc.XnSrc > int32(1) {
+ return int32(0)
}
- if ((((*XExpr)(_p.X9) != nil) && ((((*XExpr)(_p.X9).X2) & uint32(i32(2097152))) != uint32(i32(0)))) || ((_sqlite3ExprListFlags(tls, (*XExprList)(_p.X0)) & uint32(i32(2097152))) != uint32(i32(0)))) || ((_sqlite3ExprListFlags(tls, (*XExprList)(_p.X12)) & uint32(i32(2097152))) != uint32(i32(0))) {
- return i32(0)
+ if (((_p.XpWhere != nil) && ((((*XExpr)(_p.XpWhere).Xflags) & uint32(2097152)) != (0))) || ((_sqlite3ExprListFlags(tls, (*XExprList)(_p.XpEList)) & uint32(2097152)) != (0))) || ((_sqlite3ExprListFlags(tls, (*XExprList)(_p.XpOrderBy)) & uint32(2097152)) != (0)) {
+ return int32(0)
}
_11:
- _pSubSrc = (*XSrcList)(_pSub.X8)
+ _pSubSrc = (*XSrcList)(_pSub.XpSrc)
func() {
if _pSubSrc == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119974), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97795)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119974), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(97823)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XExpr)(_pSub.X15) != nil) && ((*XExpr)(_p.X15) != nil) {
- return i32(0)
+ if (_pSub.XpLimit != nil) && (_p.XpLimit != nil) {
+ return int32(0)
}
- if (*XExpr)(_pSub.X16) != nil {
- return i32(0)
+ if _pSub.XpOffset != nil {
+ return int32(0)
}
- if (((_p.X3) & uint32(i32(256))) != uint32(i32(0))) && ((*XExpr)(_pSub.X15) != nil) {
- return i32(0)
+ if ((_p.XselFlags & uint32(256)) != (0)) && (_pSub.XpLimit != nil) {
+ return int32(0)
}
- if (_pSubSrc.X0) == i32(0) {
- return i32(0)
+ if _pSubSrc.XnSrc == int32(0) {
+ return int32(0)
}
- if ((_pSub.X3) & uint32(i32(1))) != 0 {
- return i32(0)
+ if (_pSub.XselFlags & uint32(1)) != 0 {
+ return int32(0)
}
- if ((*XExpr)(_pSub.X15) != nil) && (((_pSrc.X0) > i32(1)) || _isAgg != 0) {
- return i32(0)
+ if (_pSub.XpLimit != nil) && ((_pSrc.XnSrc > int32(1)) || _isAgg != 0) {
+ return int32(0)
}
- if (((_p.X3) & uint32(i32(1))) != uint32(i32(0))) && _subqueryIsAgg != 0 {
- return i32(0)
+ if ((_p.XselFlags & uint32(1)) != (0)) && _subqueryIsAgg != 0 {
+ return int32(0)
}
- if ((*XExprList)(_p.X12) != nil) && ((*XExprList)(_pSub.X12) != nil) {
- return i32(0)
+ if (_p.XpOrderBy != nil) && (_pSub.XpOrderBy != nil) {
+ return int32(0)
}
- if _isAgg != 0 && ((*XExprList)(_pSub.X12) != nil) {
- return i32(0)
+ if _isAgg != 0 && (_pSub.XpOrderBy != nil) {
+ return int32(0)
}
- if ((*XExpr)(_pSub.X15) != nil) && ((*XExpr)(_p.X9) != nil) {
- return i32(0)
+ if (_pSub.XpLimit != nil) && (_p.XpWhere != nil) {
+ return int32(0)
}
- if ((*XExpr)(_pSub.X15) != nil) && (((_p.X3) & uint32(i32(1))) != uint32(i32(0))) {
- return i32(0)
+ if (_pSub.XpLimit != nil) && ((_p.XselFlags & uint32(1)) != (0)) {
+ return int32(0)
}
- if ((_pSub.X3) & uint32(i32(12288))) != 0 {
- return i32(0)
+ if (_pSub.XselFlags & uint32(12288)) != 0 {
+ return int32(0)
}
- if (((_p.X3) & uint32(i32(8192))) != 0) && ((*XSelect)(_pSub.X13) != nil) {
- return i32(0)
+ if ((_p.XselFlags & uint32(8192)) != 0) && (_pSub.XpPrior != nil) {
+ return int32(0)
}
- if (int32((*t28)(unsafe.Pointer(&(_pSubitem.X9))).X0) & i32(32)) == i32(0) {
+ if (int32(_pSubitem.Xfg.Xjointype) & int32(32)) == int32(0) {
goto _43
}
- _isLeftJoin = i32(1)
- if ((_pSubSrc.X0) > i32(1)) || _isAgg != 0 {
- return i32(0)
+ _isLeftJoin = int32(1)
+ if (_pSubSrc.XnSrc > int32(1)) || _isAgg != 0 {
+ return int32(0)
}
_43:
- if (*XSelect)(_pSub.X13) == nil {
+ if _pSub.XpPrior == nil {
goto _46
}
- if (*XExprList)(_pSub.X12) != nil {
- return i32(0)
+ if _pSub.XpOrderBy != nil {
+ return int32(0)
}
- if (_isAgg != 0 || (((_p.X3) & uint32(i32(1))) != uint32(i32(0)))) || ((_pSrc.X0) != i32(1)) {
- return i32(0)
+ if (_isAgg != 0 || ((_p.XselFlags & uint32(1)) != (0))) || (_pSrc.XnSrc != int32(1)) {
+ return int32(0)
}
_pSub1 = _pSub
_51:
@@ -76242,300 +77318,293 @@ _51:
goto _54
}
func() {
- if (*XSrcList)(_pSub.X8) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120059), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97803)))
+ if (*XSrcList)(_pSub.XpSrc) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120059), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(97831)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XExprList)(_pSub.X0).X0) != ((*XExprList)(_pSub1.X0).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120060), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97817)))
+ if ((*XExprList)(_pSub.XpEList).XnExpr) != ((*XExprList)(_pSub1.XpEList).XnExpr) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120060), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(97845)))
crt.X__builtin_abort(tls)
}
}()
- if ((((_pSub1.X3) & uint32(i32(9))) != uint32(i32(0))) || (((*XSelect)(_pSub1.X13) != nil) && (int32(_pSub1.X1) != i32(116)))) || (((*XSrcList)(_pSub1.X8).X0) < i32(1)) {
- return i32(0)
+ if (((_pSub1.XselFlags & uint32(9)) != (0)) || ((_pSub1.XpPrior != nil) && (int32(_pSub1.Xop) != int32(116)))) || (((*XSrcList)(_pSub1.XpSrc).XnSrc) < int32(1)) {
+ return int32(0)
}
- _pSub1 = (*XSelect)(_pSub1.X13)
+ _pSub1 = (*XSelect)(_pSub1.XpPrior)
goto _51
_54:
- if (*XExprList)(_p.X12) == nil {
+ if _p.XpOrderBy == nil {
goto _63
}
- _17_ii = i32(0)
+ _17_ii = int32(0)
_64:
- if _17_ii >= ((*XExprList)(_p.X12).X0) {
+ if _17_ii >= ((*XExprList)(_p.XpOrderBy).XnExpr) {
goto _67
}
- if int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.X12).X2))))) + 20*uintptr(_17_ii))).X5))))).X0) == i32(0) {
- return i32(0)
+ if int32((*t71)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.XpOrderBy).Xa))), uintptr(_17_ii)).Xu))).XiOrderByCol) == int32(0) {
+ return int32(0)
}
_17_ii += 1
goto _64
_67:
_63:
_46:
- if (Xsqlite3SelectTrace & i32(1)) != 0 {
+ if (Xsqlite3SelectTrace & int32(1)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(97859)
- }(), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_pSub.X6)))))), unsafe.Pointer(_pSub), _iFrom)
- }
- *(**int8)(unsafe.Pointer(&(_pParse.X65))) = _pSubitem.X2
- _i = _sqlite3AuthCheck(tls, _pParse, i32(21), nil, nil, nil)
- *(**int8)(unsafe.Pointer(&(_pParse.X65))) = _zSavedAuthContext
- _pSub = (*XSelect)(_pSub.X13)
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(97887)
+ }(), unsafe.Pointer(&_pSub.XzSelName), unsafe.Pointer(_pSub), _iFrom)
+ }
+ _pParse.XzAuthContext = _pSubitem.XzName
+ _i = _sqlite3AuthCheck(tls, _pParse, int32(21), nil, nil, nil)
+ _pParse.XzAuthContext = _zSavedAuthContext
+ _pSub = (*XSelect)(_pSub.XpPrior)
_70:
if _pSub == nil {
goto _73
}
- _19_pOrderBy = (*XExprList)(_p.X12)
- _19_pLimit = (*XExpr)(_p.X15)
- _19_pOffset = (*XExpr)(_p.X16)
- _19_pPrior = (*XSelect)(_p.X13)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = nil
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X8))))) = nil
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = nil
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = nil
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))) = nil
- _19_pNew = _sqlite3SelectDup(tls, _db, _p, i32(0))
- _sqlite3SelectSetName(tls, _19_pNew, (*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_pSub.X6))))))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))) = _19_pOffset
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = _19_pLimit
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = _19_pOrderBy
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X8))))) = _pSrc
- *(*uint8)(unsafe.Pointer(&(_p.X1))) = uint8(i32(116))
+ _19_pOrderBy = (*XExprList)(_p.XpOrderBy)
+ _19_pLimit = (*XExpr)(_p.XpLimit)
+ _19_pOffset = (*XExpr)(_p.XpOffset)
+ _19_pPrior = (*XSelect)(_p.XpPrior)
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = nil
+ *(**XSrcList)(unsafe.Pointer(&_p.XpSrc)) = nil
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = nil
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = nil
+ *(**XExpr)(unsafe.Pointer(&_p.XpOffset)) = nil
+ _19_pNew = _sqlite3SelectDup(tls, _db, _p, int32(0))
+ _sqlite3SelectSetName(tls, _19_pNew, (*int8)(unsafe.Pointer(&_pSub.XzSelName)))
+ *(**XExpr)(unsafe.Pointer(&_p.XpOffset)) = _19_pOffset
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = _19_pLimit
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = _19_pOrderBy
+ *(**XSrcList)(unsafe.Pointer(&_p.XpSrc)) = _pSrc
+ _p.Xop = uint8(116)
if _19_pNew == nil {
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _19_pPrior
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = _19_pPrior
goto _75
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_19_pNew.X13))))) = _19_pPrior
+ *(**XSelect)(unsafe.Pointer(&_19_pNew.XpPrior)) = _19_pPrior
if _19_pPrior != nil {
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_19_pPrior.X14))))) = _19_pNew
+ *(**XSelect)(unsafe.Pointer(&_19_pPrior.XpNext)) = _19_pNew
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_19_pNew.X14))))) = _p
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _19_pNew
- if (Xsqlite3SelectTrace & i32(2)) != 0 {
+ *(**XSelect)(unsafe.Pointer(&_19_pNew.XpNext)) = _p
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = _19_pNew
+ if (Xsqlite3SelectTrace & int32(2)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(97887)
- }(), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_19_pNew.X6)))))), unsafe.Pointer(_19_pNew))
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(97915)
+ }(), unsafe.Pointer(&_19_pNew.XzSelName), unsafe.Pointer(_19_pNew))
}
_75:
- if (_db.X17) != 0 {
- return i32(1)
+ if _db.XmallocFailed != 0 {
+ return int32(1)
}
- _pSub = (*XSelect)(_pSub.X13)
+ _pSub = (*XSelect)(_pSub.XpPrior)
goto _70
_73:
- _pSub = store59(&_pSub1, (*XSelect)(_pSubitem.X5))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pSubitem.X1))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pSubitem.X2))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pSubitem.X3))
- *(**int8)(unsafe.Pointer(&(_pSubitem.X1))) = nil
- *(**int8)(unsafe.Pointer(&(_pSubitem.X2))) = nil
- *(**int8)(unsafe.Pointer(&(_pSubitem.X3))) = nil
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSubitem.X5))))) = nil
+ _pSub = store97(&_pSub1, (*XSelect)(_pSubitem.XpSelect))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pSubitem.XzDatabase))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pSubitem.XzName))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pSubitem.XzAlias))
+ _pSubitem.XzDatabase = nil
+ _pSubitem.XzName = nil
+ _pSubitem.XzAlias = nil
+ *(**XSelect)(unsafe.Pointer(&_pSubitem.XpSelect)) = nil
if func() int32 {
- if (*XTable)(_pSubitem.X4) != nil {
- return i32(1)
+ if (*XTable)(_pSubitem.XpTab) != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120177), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120177), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _81
}
- _22_pTabToDel = (*XTable)(_pSubitem.X4)
- if (_22_pTabToDel.X8) == uint32(i32(1)) {
+ _22_pTabToDel = (*XTable)(_pSubitem.XpTab)
+ if _22_pTabToDel.XnTabRef == uint32(1) {
_23_pToplevel = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_22_pTabToDel.X21))))) = (*XTable)(_23_pToplevel.X68)
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_23_pToplevel.X68))))) = _22_pTabToDel
+ *(**XTable)(unsafe.Pointer(&_22_pTabToDel.XpNextZombie)) = (*XTable)(_23_pToplevel.XpZombieTab)
+ *(**XTable)(unsafe.Pointer(&_23_pToplevel.XpZombieTab)) = _22_pTabToDel
goto _85
}
- *(*uint32)(unsafe.Pointer(&(_22_pTabToDel.X8))) -= 1
+ _22_pTabToDel.XnTabRef -= 1
_85:
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSubitem.X4))))) = nil
+ *(**XTable)(unsafe.Pointer(&_pSubitem.XpTab)) = nil
_81:
_pParent = _p
_86:
if _pParent == nil {
goto _89
}
- _25_jointype = uint8(i32(0))
- _pSubSrc = (*XSrcList)(_pSub.X8)
- _25_nSubSrc = _pSubSrc.X0
- _pSrc = (*XSrcList)(_pParent.X8)
+ _25_jointype = 0
+ _pSubSrc = (*XSrcList)(_pSub.XpSrc)
+ _25_nSubSrc = _pSubSrc.XnSrc
+ _pSrc = (*XSrcList)(_pParent.XpSrc)
if _pSrc != nil {
func() {
if _pParent != _p {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120210), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97938)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120210), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(97966)))
crt.X__builtin_abort(tls)
}
}()
- _25_jointype = (*t28)(unsafe.Pointer(&(_pSubitem.X9))).X0
+ _25_jointype = _pSubitem.Xfg.Xjointype
goto _93
}
func() {
if _pParent == _p {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120213), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97949)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120213), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(97977)))
crt.X__builtin_abort(tls)
}
}()
- _pSrc = store60((**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParent.X8))))), _sqlite3SrcListAppend(tls, _db, nil, nil, nil))
+ _pSrc = store98((**XSrcList)(unsafe.Pointer(&_pParent.XpSrc)), _sqlite3SrcListAppend(tls, _db, nil, nil, nil))
if _pSrc == nil {
func() {
- if (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120216), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(47848)))
+ if _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120216), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(47803)))
crt.X__builtin_abort(tls)
}
}()
goto _89
}
_93:
- if _25_nSubSrc <= i32(1) {
+ if _25_nSubSrc <= int32(1) {
goto _99
}
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParent.X8))))) = store60(&_pSrc, _sqlite3SrcListEnlarge(tls, _db, _pSrc, _25_nSubSrc-i32(1), _iFrom+i32(1)))
- if (_db.X17) != 0 {
+ *(**XSrcList)(unsafe.Pointer(&_pParent.XpSrc)) = store98(&_pSrc, _sqlite3SrcListEnlarge(tls, _db, _pSrc, _25_nSubSrc-int32(1), _iFrom+int32(1)))
+ if _db.XmallocFailed != 0 {
goto _89
}
_99:
- _i = i32(0)
+ _i = int32(0)
_101:
if _i >= _25_nSubSrc {
goto _104
}
- _sqlite3IdListDelete(tls, _db, (*XIdList)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(_i+_iFrom))).X13))
+ _sqlite3IdListDelete(tls, _db, (*XIdList)(elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_i+_iFrom)).XpUsing))
func() {
- if int32((uint32(((*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(_i+_iFrom))).X9))).X1)>>uint(i32(2)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120248), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97960)))
+ if int32((uint32(((elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_i+_iFrom)).Xfg).XnotIndexed)>>2)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120248), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(97988)))
crt.X__builtin_abort(tls)
}
}()
- *(*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(_i+_iFrom))) = *(*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSubSrc.X2))))) + 68*uintptr(_i)))
- _iNewParent = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSubSrc.X2))))) + 68*uintptr(_i))).X11
- crt.Xmemset(tls, (unsafe.Pointer)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSubSrc.X2)))))+68*uintptr(_i)))), i32(0), u32(68))
+ *elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_i+_iFrom)) = *elem6((*TSrcList_item)(unsafe.Pointer(&_pSubSrc.Xa)), uintptr(_i))
+ _iNewParent = elem6((*TSrcList_item)(unsafe.Pointer(&_pSubSrc.Xa)), uintptr(_i)).XiCursor
+ crt.Xmemset(tls, unsafe.Pointer(elem6((*TSrcList_item)(unsafe.Pointer(&_pSubSrc.Xa)), uintptr(_i))), int32(0), uint32(68))
_i += 1
goto _101
_104:
- *(*uint8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(_iFrom))).X9))).X0))) = _25_jointype
- _pList = (*XExprList)(_pParent.X0)
- _i = i32(0)
+ (elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_iFrom)).Xfg).Xjointype = _25_jointype
+ _pList = (*XExprList)(_pParent.XpEList)
+ _i = int32(0)
_107:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _110
}
- if ((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(_i))).X1) == nil {
- _33_zName = _sqlite3DbStrDup(tls, _db, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_i))).X2)
+ if (elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XzName) == nil {
+ _33_zName = _sqlite3DbStrDup(tls, _db, elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XzSpan)
_sqlite3Dequote(tls, _33_zName)
- *(**int8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(_i))).X1))) = _33_zName
+ elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XzName = _33_zName
}
_i += 1
goto _107
_110:
- if (*XExprList)(_pSub.X12) == nil {
+ if _pSub.XpOrderBy == nil {
goto _112
}
- _34_pOrderBy = (*XExprList)(_pSub.X12)
- _i = i32(0)
+ _34_pOrderBy = (*XExprList)(_pSub.XpOrderBy)
+ _i = int32(0)
_113:
- if _i >= (_34_pOrderBy.X0) {
+ if _i >= _34_pOrderBy.XnExpr {
goto _116
}
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_34_pOrderBy.X2))))) + 20*uintptr(_i))).X5))))).X0))) = uint16(i32(0))
+ (*t71)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&_34_pOrderBy.Xa)), uintptr(_i)).Xu))).XiOrderByCol = 0
_i += 1
goto _113
_116:
func() {
- if (*XExprList)(_pParent.X12) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120290), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(97993)))
+ if (*XExprList)(_pParent.XpOrderBy) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120290), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(98021)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(_pSub.X13) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120291), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(98014)))
+ if (*XSelect)(_pSub.XpPrior) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120291), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(98042)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParent.X12))))) = _34_pOrderBy
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSub.X12))))) = nil
+ *(**XExprList)(unsafe.Pointer(&_pParent.XpOrderBy)) = _34_pOrderBy
+ *(**XExprList)(unsafe.Pointer(&_pSub.XpOrderBy)) = nil
_112:
- _pWhere = _sqlite3ExprDup(tls, _db, (*XExpr)(_pSub.X9), i32(0))
- if _isLeftJoin > i32(0) {
+ _pWhere = _sqlite3ExprDup(tls, _db, (*XExpr)(_pSub.XpWhere), int32(0))
+ if _isLeftJoin > int32(0) {
_setJoinExpr(tls, _pWhere, _iNewParent)
}
if _subqueryIsAgg != 0 {
func() {
- if (*XExpr)(_pParent.X11) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120300), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(98030)))
+ if (*XExpr)(_pParent.XpHaving) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120300), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(98058)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParent.X11))))) = (*XExpr)(_pParent.X9)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParent.X9))))) = _pWhere
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParent.X11))))) = _sqlite3ExprAnd(tls, _db, _sqlite3ExprDup(tls, _db, (*XExpr)(_pSub.X11), i32(0)), (*XExpr)(_pParent.X11))
+ *(**XExpr)(unsafe.Pointer(&_pParent.XpHaving)) = (*XExpr)(_pParent.XpWhere)
+ *(**XExpr)(unsafe.Pointer(&_pParent.XpWhere)) = _pWhere
+ *(**XExpr)(unsafe.Pointer(&_pParent.XpHaving)) = _sqlite3ExprAnd(tls, _db, _sqlite3ExprDup(tls, _db, (*XExpr)(_pSub.XpHaving), int32(0)), (*XExpr)(_pParent.XpHaving))
func() {
- if (*XExprList)(_pParent.X10) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120306), unsafe.Pointer((*int8)(unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000))), unsafe.Pointer(str(98050)))
+ if (*XExprList)(_pParent.XpGroupBy) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120306), unsafe.Pointer(&_flattenSubqueryØ00__func__Ø000), unsafe.Pointer(str(98078)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParent.X10))))) = _sqlite3ExprListDup(tls, _db, (*XExprList)(_pSub.X10), i32(0))
+ *(**XExprList)(unsafe.Pointer(&_pParent.XpGroupBy)) = _sqlite3ExprListDup(tls, _db, (*XExprList)(_pSub.XpGroupBy), int32(0))
goto _127
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParent.X9))))) = _sqlite3ExprAnd(tls, _db, _pWhere, (*XExpr)(_pParent.X9))
+ *(**XExpr)(unsafe.Pointer(&_pParent.XpWhere)) = _sqlite3ExprAnd(tls, _db, _pWhere, (*XExpr)(_pParent.XpWhere))
_127:
- if int32(_db.X17) == i32(0) {
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_39_x.X0))))) = _pParse
- *(*int32)(unsafe.Pointer(&(_39_x.X1))) = _iParent
- *(*int32)(unsafe.Pointer(&(_39_x.X2))) = _iNewParent
- *(*int32)(unsafe.Pointer(&(_39_x.X3))) = _isLeftJoin
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_39_x.X4))))) = (*XExprList)(_pSub.X0)
- _substSelect(tls, &_39_x, _pParent, i32(0))
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_pParent.X3)))
- *p = (*p) | ((_pSub.X3) & uint32(i32(1)))
- sink5(*p)
- }
- if (*XExpr)(_pSub.X15) != nil {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParent.X15))))) = (*XExpr)(_pSub.X15)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSub.X15))))) = nil
- }
- *func() **XSelect { _pParent = (*XSelect)(_pParent.X13); return &_pSub }() = (*XSelect)(_pSub.X13)
+ if int32(_db.XmallocFailed) == int32(0) {
+ *(**XParse)(unsafe.Pointer(&_39_x.XpParse)) = _pParse
+ _39_x.XiTable = _iParent
+ _39_x.XiNewTable = _iNewParent
+ _39_x.XisLeftJoin = _isLeftJoin
+ *(**XExprList)(unsafe.Pointer(&_39_x.XpEList)) = (*XExprList)(_pSub.XpEList)
+ _substSelect(tls, &_39_x, _pParent, int32(0))
+ }
+ _pParent.XselFlags |= _pSub.XselFlags & uint32(1)
+ if _pSub.XpLimit != nil {
+ *(**XExpr)(unsafe.Pointer(&_pParent.XpLimit)) = (*XExpr)(_pSub.XpLimit)
+ *(**XExpr)(unsafe.Pointer(&_pSub.XpLimit)) = nil
+ }
+ *func() **XSelect { _pParent = (*XSelect)(_pParent.XpPrior); return &_pSub }() = (*XSelect)(_pSub.XpPrior)
goto _86
_89:
_sqlite3SelectDelete(tls, _db, _pSub1)
- if (Xsqlite3SelectTrace & i32(256)) == 0 {
+ if (Xsqlite3SelectTrace & int32(256)) == 0 {
goto _130
}
- if (Xsqlite3SelectTrace & i32(256)) != 0 {
+ if (Xsqlite3SelectTrace & int32(256)) != 0 {
_sqlite3DebugPrintf(tls, func() *int8 {
- _sqlite3DebugPrintf(tls, str(45660), ((_pParse.X35)*i32(2))-i32(2), unsafe.Pointer(str(0)), unsafe.Pointer((*int8)(unsafe.Pointer((*[12]int8)(unsafe.Pointer(&(_p.X6)))))), unsafe.Pointer(_p))
- return str(98071)
+ _sqlite3DebugPrintf(tls, str(45615), (_pParse.XnSelectIndent*int32(2))-int32(2), unsafe.Pointer(str(284)), unsafe.Pointer(&_p.XzSelName), unsafe.Pointer(_p))
+ return str(98099)
}())
}
- _sqlite3TreeViewSelect(tls, nil, _p, uint8(i32(0)))
+ _sqlite3TreeViewSelect(tls, nil, _p, 0)
_130:
- return i32(1)
-
- _ = _39_x
- panic(0)
+ return int32(1)
}
var _flattenSubqueryØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_flattenSubqueryØ00__func__Ø000[0], str(98090), 16)
+ crt.Xstrncpy(nil, &_flattenSubqueryØ00__func__Ø000[0], str(98118), 16)
}
func _substSelect(tls *crt.TLS, _pSubst *XSubstContext, _p *XSelect, _doPrior int32) {
@@ -76546,62 +77615,67 @@ func _substSelect(tls *crt.TLS, _pSubst *XSubstContext, _p *XSelect, _doPrior in
return
}
_0:
- _substExprList(tls, _pSubst, (*XExprList)(_p.X0))
- _substExprList(tls, _pSubst, (*XExprList)(_p.X10))
- _substExprList(tls, _pSubst, (*XExprList)(_p.X12))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X11))))) = _substExpr(tls, _pSubst, (*XExpr)(_p.X11))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X9))))) = _substExpr(tls, _pSubst, (*XExpr)(_p.X9))
- _pSrc = (*XSrcList)(_p.X8)
+ _substExprList(tls, _pSubst, (*XExprList)(_p.XpEList))
+ _substExprList(tls, _pSubst, (*XExprList)(_p.XpGroupBy))
+ _substExprList(tls, _pSubst, (*XExprList)(_p.XpOrderBy))
+ *(**XExpr)(unsafe.Pointer(&_p.XpHaving)) = _substExpr(tls, _pSubst, (*XExpr)(_p.XpHaving))
+ *(**XExpr)(unsafe.Pointer(&_p.XpWhere)) = _substExpr(tls, _pSubst, (*XExpr)(_p.XpWhere))
+ _pSrc = (*XSrcList)(_p.XpSrc)
func() {
if _pSrc == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119777), unsafe.Pointer((*int8)(unsafe.Pointer(&_substSelectØ00__func__Ø000))), unsafe.Pointer(str(47821)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119777), unsafe.Pointer(&_substSelectØ00__func__Ø000), unsafe.Pointer(str(47776)))
crt.X__builtin_abort(tls)
}
}()
- *func() **TSrcList_item { _i = _pSrc.X0; return &_pItem }() = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))
+ *func() **TSrcList_item { _i = _pSrc.XnSrc; return &_pItem }() = (*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa))
_4:
- if _i <= i32(0) {
+ if _i <= int32(0) {
goto _7
}
- _substSelect(tls, _pSubst, (*XSelect)(_pItem.X5), i32(1))
- if ((uint32(((*t28)(unsafe.Pointer(&(_pItem.X9))).X1)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _substExprList(tls, _pSubst, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_pItem.X15)))))))
+ _substSelect(tls, _pSubst, (*XSelect)(_pItem.XpSelect), int32(1))
+ if ((uint32((_pItem.Xfg.XnotIndexed)>>2) << 31) >> 31) != 0 {
+ _substExprList(tls, _pSubst, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pItem.Xu1))))
}
*(*uintptr)(unsafe.Pointer(func() **TSrcList_item { _i -= 1; return &_pItem }())) += uintptr(68)
goto _4
_7:
- if _doPrior != 0 && (store59(&_p, (*XSelect)(_p.X13)) != nil) {
+ if _doPrior != 0 && (store97(&_p, (*XSelect)(_p.XpPrior)) != nil) {
goto _0
}
}
+// C comment
+// /* Forward Declarations */
func _substExprList(tls *crt.TLS, _pSubst *XSubstContext, _pList *XExprList) {
var _i int32
if _pList == nil {
return
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _4
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(_i))).X0))))) = _substExpr(tls, _pSubst, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_i))).X0))
+ *(**XExpr)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XpExpr))) = _substExpr(tls, _pSubst, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XpExpr))
_i += 1
goto _1
_4:
}
-// Scan through the expression pExpr. Replace every reference to
-// a column in table number iTable with a copy of the iColumn-th
-// entry in pEList. (But leave references to the ROWID column
-// unchanged.)
-//
-// This routine is part of the flattening procedure. A subquery
-// whose result set is defined by pEList appears as entry in the
-// FROM clause of a SELECT such that the VDBE cursor assigned to that
-// FORM clause entry is iTable. This routine makes the necessary
-// changes to pExpr so that it refers directly to the source table
-// of the subquery rather the result set of the subquery.
+// C comment
+// /*
+// ** Scan through the expression pExpr. Replace every reference to
+// ** a column in table number iTable with a copy of the iColumn-th
+// ** entry in pEList. (But leave references to the ROWID column
+// ** unchanged.)
+// **
+// ** This routine is part of the flattening procedure. A subquery
+// ** whose result set is defined by pEList appears as entry in the
+// ** FROM clause of a SELECT such that the VDBE cursor assigned to that
+// ** FORM clause entry is iTable. This routine makes the necessary
+// ** changes to pExpr so that it refers directly to the source table
+// ** of the subquery rather the result set of the subquery.
+// */
func _substExpr(tls *crt.TLS, _pSubst *XSubstContext, _pExpr *XExpr) (r0 *XExpr) {
var _6_db *Xsqlite3
var _4_pNew, _4_pCopy *XExpr
@@ -76609,49 +77683,45 @@ func _substExpr(tls *crt.TLS, _pSubst *XSubstContext, _pExpr *XExpr) (r0 *XExpr)
if _pExpr == nil {
return nil
}
- if (((_pExpr.X2) & uint32(i32(1))) != uint32(i32(0))) && (int32(_pExpr.X11) == (_pSubst.X1)) {
- *(*int16)(unsafe.Pointer(&(_pExpr.X11))) = int16(_pSubst.X2)
+ if ((_pExpr.Xflags & uint32(1)) != (0)) && (int32(_pExpr.XiRightJoinTable) == _pSubst.XiTable) {
+ _pExpr.XiRightJoinTable = int16(_pSubst.XiNewTable)
}
- if int32(_pExpr.X0) != i32(152) || (_pExpr.X8) != (_pSubst.X1) {
+ if int32(_pExpr.Xop) != int32(152) || _pExpr.XiTable != _pSubst.XiTable {
goto _4
}
- if int32(_pExpr.X9) < i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(101))
+ if int32(_pExpr.XiColumn) < int32(0) {
+ _pExpr.Xop = uint8(101)
goto _6
}
- _4_pCopy = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSubst.X4).X2))))) + 20*uintptr(_pExpr.X9))).X0)
+ _4_pCopy = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSubst.XpEList).Xa))), uintptr(_pExpr.XiColumn)).XpExpr)
func() {
- if (*XExprList)(_pSubst.X4) == nil || int32(_pExpr.X9) >= ((*XExprList)(_pSubst.X4).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119715), unsafe.Pointer((*int8)(unsafe.Pointer(&_substExprØ00__func__Ø000))), unsafe.Pointer(str(98106)))
+ if (*XExprList)(_pSubst.XpEList) == nil || int32(_pExpr.XiColumn) >= ((*XExprList)(_pSubst.XpEList).XnExpr) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119715), unsafe.Pointer(&_substExprØ00__func__Ø000), unsafe.Pointer(str(98134)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)(_pExpr.X4) != nil || (*XExpr)(_pExpr.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119716), unsafe.Pointer((*int8)(unsafe.Pointer(&_substExprØ00__func__Ø000))), unsafe.Pointer(str(96223)))
+ if (*XExpr)(_pExpr.XpLeft) != nil || (*XExpr)(_pExpr.XpRight) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119716), unsafe.Pointer(&_substExprØ00__func__Ø000), unsafe.Pointer(str(96251)))
crt.X__builtin_abort(tls)
}
}()
if _sqlite3ExprIsVector(tls, _4_pCopy) != 0 {
- _sqlite3VectorErrorMsg(tls, (*XParse)(_pSubst.X0), _4_pCopy)
+ _sqlite3VectorErrorMsg(tls, (*XParse)(_pSubst.XpParse), _4_pCopy)
goto _14
}
- _6_db = (*Xsqlite3)((*XParse)(_pSubst.X0).X0)
- if (_pSubst.X3) != 0 && (int32(_4_pCopy.X0) != i32(152)) {
- crt.Xmemset(tls, (unsafe.Pointer)(&_4_ifNullRow), i32(0), u32(48))
- *(*uint8)(unsafe.Pointer(&(_4_ifNullRow.X0))) = uint8(i32(160))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_4_ifNullRow.X4))))) = _4_pCopy
- *(*int32)(unsafe.Pointer(&(_4_ifNullRow.X8))) = _pSubst.X2
+ _6_db = (*Xsqlite3)((*XParse)(_pSubst.XpParse).Xdb)
+ if _pSubst.XisLeftJoin != 0 && (int32(_4_pCopy.Xop) != int32(152)) {
+ crt.Xmemset(tls, unsafe.Pointer(&_4_ifNullRow), int32(0), uint32(48))
+ _4_ifNullRow.Xop = uint8(160)
+ *(**XExpr)(unsafe.Pointer(&_4_ifNullRow.XpLeft)) = _4_pCopy
+ _4_ifNullRow.XiTable = _pSubst.XiNewTable
_4_pCopy = &_4_ifNullRow
}
- _4_pNew = _sqlite3ExprDup(tls, _6_db, _4_pCopy, i32(0))
- if (_4_pNew != nil) && (((_pExpr.X2) & uint32(i32(1))) != 0) {
- *(*int16)(unsafe.Pointer(&(_4_pNew.X11))) = _pExpr.X11
- {
- p := (*uint32)(unsafe.Pointer(&(_4_pNew.X2)))
- *p = (*p) | uint32(i32(1))
- sink5(*p)
- }
+ _4_pNew = _sqlite3ExprDup(tls, _6_db, _4_pCopy, int32(0))
+ if (_4_pNew != nil) && ((_pExpr.Xflags & uint32(1)) != 0) {
+ _4_pNew.XiRightJoinTable = _pExpr.XiRightJoinTable
+ _4_pNew.Xflags |= uint32(1)
}
_sqlite3ExprDelete(tls, _6_db, _pExpr)
_pExpr = _4_pNew
@@ -76659,80 +77729,80 @@ _14:
_6:
goto _19
_4:
- if (int32(_pExpr.X0) == i32(160)) && ((_pExpr.X8) == (_pSubst.X1)) {
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = _pSubst.X2
+ if (int32(_pExpr.Xop) == int32(160)) && (_pExpr.XiTable == _pSubst.XiTable) {
+ _pExpr.XiTable = _pSubst.XiNewTable
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X4))))) = _substExpr(tls, _pSubst, (*XExpr)(_pExpr.X4))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X5))))) = _substExpr(tls, _pSubst, (*XExpr)(_pExpr.X5))
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- _substSelect(tls, _pSubst, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))), i32(1))
+ *(**XExpr)(unsafe.Pointer(&_pExpr.XpLeft)) = _substExpr(tls, _pSubst, (*XExpr)(_pExpr.XpLeft))
+ *(**XExpr)(unsafe.Pointer(&_pExpr.XpRight)) = _substExpr(tls, _pSubst, (*XExpr)(_pExpr.XpRight))
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ _substSelect(tls, _pSubst, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))), int32(1))
goto _23
}
- _substExprList(tls, _pSubst, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))))
+ _substExprList(tls, _pSubst, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))))
_23:
_19:
return _pExpr
-
- _ = _4_ifNullRow
- panic(0)
}
var _substExprØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_substExprØ00__func__Ø000[0], str(98164), 10)
+ crt.Xstrncpy(nil, &_substExprØ00__func__Ø000[0], str(98192), 10)
}
func _sqlite3VectorErrorMsg(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr) {
- if ((_pExpr.X2) & uint32(i32(2048))) != 0 {
- _sqlite3SubselectError(tls, _pParse, (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0).X0, i32(1))
+ if (_pExpr.Xflags & uint32(2048)) != 0 {
+ _sqlite3SubselectError(tls, _pParse, (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XpEList).XnExpr, int32(1))
goto _1
}
- _sqlite3ErrorMsg(tls, _pParse, str(43181))
+ _sqlite3ErrorMsg(tls, _pParse, str(43136))
_1:
}
func _sqlite3SubselectError(tls *crt.TLS, _pParse *XParse, _nActual int32, _nExpect int32) {
var _zFmt *int8
- _zFmt = str(98174)
+ _zFmt = str(98202)
_sqlite3ErrorMsg(tls, _pParse, _zFmt, _nActual, _nExpect)
}
var _substSelectØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_substSelectØ00__func__Ø000[0], str(98218), 12)
-}
-
-// This routine is called to process a compound query form from
-// two or more separate queries using UNION, UNION ALL, EXCEPT, or
-// INTERSECT
-//
-// "p" points to the right-most of the two queries. the query on the
-// left is p->pPrior. The left query could also be a compound query
-// in which case this routine will be called recursively.
-//
-// The results of the total query are to be written into a destination
-// of type eDest with parameter iParm.
-//
-// Example 1: Consider a three-way compound SQL statement.
-//
-// SELECT a FROM t1 UNION SELECT b FROM t2 UNION SELECT c FROM t3
-//
-// This statement is parsed up as follows:
-//
-// SELECT c FROM t3
-// |
-// `-----> SELECT b FROM t2
-// |
-// `------> SELECT a FROM t1
-//
-// The arrows in the diagram above represent the Select.pPrior pointer.
-// So if this routine is called with p equal to the t3 query, then
-// pPrior will be the t2 query. p->op will be TK_UNION in this case.
-//
-// Notice that because of the way SQLite parses compound SELECTs, the
-// individual selects always group from left to right.
+ crt.Xstrncpy(nil, &_substSelectØ00__func__Ø000[0], str(98246), 12)
+}
+
+// C comment
+// /*
+// ** This routine is called to process a compound query form from
+// ** two or more separate queries using UNION, UNION ALL, EXCEPT, or
+// ** INTERSECT
+// **
+// ** "p" points to the right-most of the two queries. the query on the
+// ** left is p->pPrior. The left query could also be a compound query
+// ** in which case this routine will be called recursively.
+// **
+// ** The results of the total query are to be written into a destination
+// ** of type eDest with parameter iParm.
+// **
+// ** Example 1: Consider a three-way compound SQL statement.
+// **
+// ** SELECT a FROM t1 UNION SELECT b FROM t2 UNION SELECT c FROM t3
+// **
+// ** This statement is parsed up as follows:
+// **
+// ** SELECT c FROM t3
+// ** |
+// ** `-----> SELECT b FROM t2
+// ** |
+// ** `------> SELECT a FROM t1
+// **
+// ** The arrows in the diagram above represent the Select.pPrior pointer.
+// ** So if this routine is called with p equal to the t3 query, then
+// ** pPrior will be the t2 query. p->op will be TK_UNION in this case.
+// **
+// ** Notice that because of the way SQLite parses compound SELECTs, the
+// ** individual selects always group from left to right.
+// */
func _multiSelect(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pDest *XSelectDest) (r0 int32) {
var _rc, _iSub1, _iSub2, _8_addr, _8_nLimit, _14_unionTab, _14_priorOp, _14_addr, _21_iCont, _21_iBreak, _21_iStart, _23_tab1, _23_tab2, _23_iCont, _23_iBreak, _23_iStart, _23_addr, _23_r1, _26_i, _26_nCol, _31_addr int32
var _14_op uint8
@@ -76743,378 +77813,370 @@ func _multiSelect(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pDest *XSelectDes
var _26_pKeyInfo *XKeyInfo
var _26_apColl **XCollSeq
var _dest, _14_uniondest, _23_intersectdest XSelectDest
- _rc = i32(0)
+ _rc = int32(0)
_pDelete = nil
- _iSub1 = i32(0)
- _iSub2 = i32(0)
+ _iSub1 = int32(0)
+ _iSub2 = int32(0)
func() {
- if _p == nil || (*XSelect)(_p.X13) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118776), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98230)))
+ if _p == nil || _p.XpPrior == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118776), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98258)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_p.X3)&uint32(i32(8192))) != uint32(i32(0)) && int32(_p.X1) != i32(116) && int32(_p.X1) != i32(115) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118777), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98245)))
+ if (_p.XselFlags&uint32(8192)) != (0) && int32(_p.Xop) != int32(116) && int32(_p.Xop) != int32(115) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118777), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98273)))
crt.X__builtin_abort(tls)
}
}()
- _db = (*Xsqlite3)(_pParse.X0)
- _pPrior = (*XSelect)(_p.X13)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pPrior = (*XSelect)(_p.XpPrior)
_dest = *_pDest
- if (*XExprList)(_pPrior.X12) != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(98313), unsafe.Pointer(_selectOpName(tls, int32(_p.X1))))
- _rc = i32(1)
+ if _pPrior.XpOrderBy != nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(98341), unsafe.Pointer(_selectOpName(tls, int32(_p.Xop))))
+ _rc = int32(1)
goto _multi_select_end
}
- if (*XExpr)(_pPrior.X15) != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(98361), unsafe.Pointer(_selectOpName(tls, int32(_p.X1))))
- _rc = i32(1)
+ if _pPrior.XpLimit != nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(98389), unsafe.Pointer(_selectOpName(tls, int32(_p.Xop))))
+ _rc = int32(1)
goto _multi_select_end
}
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118795), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118795), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_dest.X0) == i32(12) {
+ if int32(_dest.XeDest) == int32(12) {
func() {
- if (*XExprList)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118800), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98406)))
+ if _p.XpEList == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118800), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98434)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp2(tls, _v, i32(110), _dest.X2, (*XExprList)(_p.X0).X0)
- *(*uint8)(unsafe.Pointer(&(_dest.X0))) = uint8(i32(14))
+ _sqlite3VdbeAddOp2(tls, _v, int32(110), _dest.XiSDParm, (*XExprList)(_p.XpEList).XnExpr)
+ _dest.XeDest = uint8(14)
}
- if ((_p.X3) & uint32(i32(1024))) != 0 {
+ if (_p.XselFlags & uint32(1024)) != 0 {
_rc = _multiSelectValues(tls, _pParse, _p, &_dest)
goto _multi_select_end
}
func() {
- if (*XExprList)(_p.X0) == nil || (*XExprList)(_pPrior.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118815), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98416)))
+ if _p.XpEList == nil || _pPrior.XpEList == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118815), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98444)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XExprList)(_p.X0).X0) != ((*XExprList)(_pPrior.X0).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118816), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98444)))
+ if ((*XExprList)(_p.XpEList).XnExpr) != ((*XExprList)(_pPrior.XpEList).XnExpr) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118816), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98472)))
crt.X__builtin_abort(tls)
}
}()
- if ((_p.X3) & uint32(i32(8192))) != 0 {
+ if (_p.XselFlags & uint32(8192)) != 0 {
_generateWithRecursiveQuery(tls, _pParse, _p, &_dest)
goto _39
}
- if (*XExprList)(_p.X12) != nil {
+ if _p.XpOrderBy != nil {
return _multiSelectOrderBy(tls, _pParse, _p, _pDest)
}
- switch int32(_p.X1) {
- case i32(115):
+ switch int32(_p.Xop) {
+ case int32(115):
goto _26
- case i32(116):
+ case int32(116):
goto _25
- case i32(117):
+ case int32(117):
goto _26
default:
goto _28
}
_25:
- _8_addr = i32(0)
+ _8_addr = int32(0)
func() {
- if (*XExpr)(_pPrior.X15) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118836), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98484)))
+ if _pPrior.XpLimit != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118836), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98512)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pPrior.X4))) = _p.X4
- *(*int32)(unsafe.Pointer(&(_pPrior.X5))) = _p.X5
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPrior.X15))))) = (*XExpr)(_p.X15)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPrior.X16))))) = (*XExpr)(_p.X16)
- _iSub1 = _pParse.X59
+ _pPrior.XiLimit = _p.XiLimit
+ _pPrior.XiOffset = _p.XiOffset
+ *(**XExpr)(unsafe.Pointer(&_pPrior.XpLimit)) = (*XExpr)(_p.XpLimit)
+ *(**XExpr)(unsafe.Pointer(&_pPrior.XpOffset)) = (*XExpr)(_p.XpOffset)
+ _iSub1 = _pParse.XiNextSelectId
_rc = _sqlite3Select(tls, _pParse, _pPrior, &_dest)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = nil
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))) = nil
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = nil
+ *(**XExpr)(unsafe.Pointer(&_p.XpOffset)) = nil
if _rc != 0 {
goto _multi_select_end
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = nil
- *(*int32)(unsafe.Pointer(&(_p.X4))) = _pPrior.X4
- *(*int32)(unsafe.Pointer(&(_p.X5))) = _pPrior.X5
- if (_p.X4) == 0 {
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = nil
+ _p.XiLimit = _pPrior.XiLimit
+ _p.XiOffset = _pPrior.XiOffset
+ if _p.XiLimit == 0 {
goto _32
}
- _8_addr = _sqlite3VdbeAddOp1(tls, _v, i32(22), _p.X4)
- _sqlite3VdbeComment(tls, _v, str(98500))
- if (_p.X5) != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(149), _p.X4, (_p.X5)+i32(1), _p.X5)
+ _8_addr = _sqlite3VdbeAddOp1(tls, _v, int32(22), _p.XiLimit)
+ _sqlite3VdbeComment(tls, _v, str(98528))
+ if _p.XiOffset != 0 {
+ _sqlite3VdbeAddOp3(tls, _v, int32(149), _p.XiLimit, _p.XiOffset+int32(1), _p.XiOffset)
}
_32:
- _iSub2 = _pParse.X59
+ _iSub2 = _pParse.XiNextSelectId
_rc = _sqlite3Select(tls, _pParse, _p, &_dest)
- _pDelete = (*XSelect)(_p.X13)
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _pPrior
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _sqlite3LogEstAdd(tls, _p.X2, _pPrior.X2)
- if ((((*XExpr)(_pPrior.X15) != nil) && _sqlite3ExprIsInteger(tls, (*XExpr)(_pPrior.X15), &_8_nLimit) != 0) && (_8_nLimit > i32(0))) && (int32(_p.X2) > int32(_sqlite3LogEst(tls, uint64(_8_nLimit)))) {
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _sqlite3LogEst(tls, uint64(_8_nLimit))
+ _pDelete = (*XSelect)(_p.XpPrior)
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = _pPrior
+ _p.XnSelectRow = _sqlite3LogEstAdd(tls, _p.XnSelectRow, _pPrior.XnSelectRow)
+ if (((_pPrior.XpLimit != nil) && _sqlite3ExprIsInteger(tls, (*XExpr)(_pPrior.XpLimit), &_8_nLimit) != 0) && (_8_nLimit > int32(0))) && (int32(_p.XnSelectRow) > int32(_sqlite3LogEst(tls, uint64(_8_nLimit)))) {
+ _p.XnSelectRow = _sqlite3LogEst(tls, uint64(_8_nLimit))
}
if _8_addr != 0 {
_sqlite3VdbeJumpHere(tls, _v, _8_addr)
}
goto _39
_26:
- _14_op = u8(0)
- _14_priorOp = i32(1)
- if int32(_dest.X0) == _14_priorOp {
+ _14_op = uint8(0)
+ _14_priorOp = int32(1)
+ if int32(_dest.XeDest) == _14_priorOp {
func() {
- if (*XExpr)(_p.X15) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118892), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98528)))
+ if (*XExpr)(_p.XpLimit) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118892), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98556)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)(_p.X16) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118893), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98541)))
+ if (*XExpr)(_p.XpOffset) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118893), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98569)))
crt.X__builtin_abort(tls)
}
}()
- _14_unionTab = _dest.X2
+ _14_unionTab = _dest.XiSDParm
goto _45
}
- _14_unionTab = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ _14_unionTab = postInc2(&_pParse.XnTab, 1)
func() {
- if (*XExprList)(_p.X12) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118900), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98555)))
+ if (*XExprList)(_p.XpOrderBy) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118900), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98583)))
crt.X__builtin_abort(tls)
}
}()
- _14_addr = _sqlite3VdbeAddOp2(tls, _v, i32(110), _14_unionTab, i32(0))
+ _14_addr = _sqlite3VdbeAddOp2(tls, _v, int32(110), _14_unionTab, int32(0))
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_p.X7))))) + 4*uintptr(i32(0))))) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118902), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98570)))
+ if (*elem8((*int32)(unsafe.Pointer(&_p.XaddrOpenEphm)), 0)) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118902), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98598)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_p.X7))))) + 4*uintptr(i32(0)))) = _14_addr
- {
- p := (*uint32)(unsafe.Pointer(&(_findRightmost(tls, _p).X3)))
- *p = (*p) | uint32(i32(32))
- sink5(*p)
- }
+ *elem8((*int32)(unsafe.Pointer(&_p.XaddrOpenEphm)), 0) = _14_addr
+ _findRightmost(tls, _p).XselFlags |= uint32(32)
func() {
- if (*XExprList)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118905), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98406)))
+ if _p.XpEList == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118905), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98434)))
crt.X__builtin_abort(tls)
}
}()
_45:
func() {
- if (*XExprList)(_pPrior.X12) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118910), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98595)))
+ if _pPrior.XpOrderBy != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118910), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98623)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3SelectDestInit(tls, &_14_uniondest, _14_priorOp, _14_unionTab)
- _iSub1 = _pParse.X59
+ _iSub1 = _pParse.XiNextSelectId
_rc = _sqlite3Select(tls, _pParse, _pPrior, &_14_uniondest)
if _rc != 0 {
goto _multi_select_end
}
- if int32(_p.X1) == i32(117) {
- _14_op = uint8(i32(2))
+ if int32(_p.Xop) == int32(117) {
+ _14_op = uint8(2)
goto _56
}
func() {
- if int32(_p.X1) != i32(115) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118923), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98613)))
+ if int32(_p.Xop) != int32(115) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118923), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98641)))
crt.X__builtin_abort(tls)
}
}()
- _14_op = uint8(i32(1))
+ _14_op = uint8(1)
_56:
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = nil
- _14_pLimit = (*XExpr)(_p.X15)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = nil
- _14_pOffset = (*XExpr)(_p.X16)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))) = nil
- *(*uint8)(unsafe.Pointer(&(_14_uniondest.X0))) = _14_op
- _iSub2 = _pParse.X59
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = nil
+ _14_pLimit = (*XExpr)(_p.XpLimit)
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = nil
+ _14_pOffset = (*XExpr)(_p.XpOffset)
+ *(**XExpr)(unsafe.Pointer(&_p.XpOffset)) = nil
+ _14_uniondest.XeDest = _14_op
+ _iSub2 = _pParse.XiNextSelectId
_rc = _sqlite3Select(tls, _pParse, _p, &_14_uniondest)
- _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.X12))
- _pDelete = (*XSelect)(_p.X13)
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _pPrior
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = nil
- if int32(_p.X1) == i32(115) {
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _sqlite3LogEstAdd(tls, _p.X2, _pPrior.X2)
+ _sqlite3ExprListDelete(tls, _db, (*XExprList)(_p.XpOrderBy))
+ _pDelete = (*XSelect)(_p.XpPrior)
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = _pPrior
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = nil
+ if int32(_p.Xop) == int32(115) {
+ _p.XnSelectRow = _sqlite3LogEstAdd(tls, _p.XnSelectRow, _pPrior.XnSelectRow)
}
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X15))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = _14_pLimit
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))) = _14_pOffset
- *(*int32)(unsafe.Pointer(&(_p.X4))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_p.X5))) = i32(0)
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpLimit))
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = _14_pLimit
+ *(**XExpr)(unsafe.Pointer(&_p.XpOffset)) = _14_pOffset
+ _p.XiLimit = int32(0)
+ _p.XiOffset = int32(0)
func() {
- if _14_unionTab != (_dest.X2) && int32(_dest.X0) == _14_priorOp {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118953), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98629)))
+ if _14_unionTab != _dest.XiSDParm && int32(_dest.XeDest) == _14_priorOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118953), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98657)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_dest.X0) == _14_priorOp {
+ if int32(_dest.XeDest) == _14_priorOp {
goto _63
}
func() {
- if (*XExprList)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118956), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98406)))
+ if _p.XpEList == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118956), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98434)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_dest.X0) != i32(9) {
+ if int32(_dest.XeDest) != int32(9) {
goto _66
}
_22_pFirst = _p
_67:
- if (*XSelect)(_22_pFirst.X13) != nil {
- _22_pFirst = (*XSelect)(_22_pFirst.X13)
+ if _22_pFirst.XpPrior != nil {
+ _22_pFirst = (*XSelect)(_22_pFirst.XpPrior)
goto _67
}
- _generateColumnNames(tls, _pParse, (*XSrcList)(_22_pFirst.X8), (*XExprList)(_22_pFirst.X0))
+ _generateColumnNames(tls, _pParse, (*XSrcList)(_22_pFirst.XpSrc), (*XExprList)(_22_pFirst.XpEList))
_66:
_21_iBreak = _sqlite3VdbeMakeLabel(tls, _v)
_21_iCont = _sqlite3VdbeMakeLabel(tls, _v)
_computeLimitRegisters(tls, _pParse, _p, _21_iBreak)
- _sqlite3VdbeAddOp2(tls, _v, i32(37), _14_unionTab, _21_iBreak)
+ _sqlite3VdbeAddOp2(tls, _v, int32(37), _14_unionTab, _21_iBreak)
_21_iStart = _sqlite3VdbeCurrentAddr(tls, _v)
- _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.X0), _14_unionTab, nil, nil, &_dest, _21_iCont, _21_iBreak)
+ _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.XpEList), _14_unionTab, nil, nil, &_dest, _21_iCont, _21_iBreak)
_sqlite3VdbeResolveLabel(tls, _v, _21_iCont)
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _14_unionTab, _21_iStart)
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _14_unionTab, _21_iStart)
_sqlite3VdbeResolveLabel(tls, _v, _21_iBreak)
- _sqlite3VdbeAddOp2(tls, _v, i32(114), _14_unionTab, i32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(114), _14_unionTab, int32(0))
_63:
goto _39
_28:
func() {
- if int32(_p.X1) != i32(118) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118976), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98675)))
+ if int32(_p.Xop) != int32(118) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118976), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98703)))
crt.X__builtin_abort(tls)
}
}()
- _23_tab1 = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _23_tab2 = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ _23_tab1 = postInc2(&_pParse.XnTab, 1)
+ _23_tab2 = postInc2(&_pParse.XnTab, 1)
func() {
- if (*XExprList)(_p.X12) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118990), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98555)))
+ if (*XExprList)(_p.XpOrderBy) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118990), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98583)))
crt.X__builtin_abort(tls)
}
}()
- _23_addr = _sqlite3VdbeAddOp2(tls, _v, i32(110), _23_tab1, i32(0))
+ _23_addr = _sqlite3VdbeAddOp2(tls, _v, int32(110), _23_tab1, int32(0))
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_p.X7))))) + 4*uintptr(i32(0))))) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118993), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98570)))
+ if (*elem8((*int32)(unsafe.Pointer(&_p.XaddrOpenEphm)), 0)) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118993), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98598)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_p.X7))))) + 4*uintptr(i32(0)))) = _23_addr
- {
- p := (*uint32)(unsafe.Pointer(&(_findRightmost(tls, _p).X3)))
- *p = (*p) | uint32(i32(32))
- sink5(*p)
- }
+ *elem8((*int32)(unsafe.Pointer(&_p.XaddrOpenEphm)), 0) = _23_addr
+ _findRightmost(tls, _p).XselFlags |= uint32(32)
func() {
- if (*XExprList)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118996), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98406)))
+ if _p.XpEList == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118996), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98434)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3SelectDestInit(tls, &_23_intersectdest, i32(1), _23_tab1)
- _iSub1 = _pParse.X59
+ _sqlite3SelectDestInit(tls, &_23_intersectdest, int32(1), _23_tab1)
+ _iSub1 = _pParse.XiNextSelectId
_rc = _sqlite3Select(tls, _pParse, _pPrior, &_23_intersectdest)
if _rc != 0 {
goto _multi_select_end
}
- _23_addr = _sqlite3VdbeAddOp2(tls, _v, i32(110), _23_tab2, i32(0))
+ _23_addr = _sqlite3VdbeAddOp2(tls, _v, int32(110), _23_tab2, int32(0))
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_p.X7))))) + 4*uintptr(i32(1))))) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119010), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98695)))
+ if (*elem8((*int32)(unsafe.Pointer(&_p.XaddrOpenEphm)), uintptr(1))) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119010), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98723)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_p.X7))))) + 4*uintptr(i32(1)))) = _23_addr
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = nil
- _23_pLimit = (*XExpr)(_p.X15)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = nil
- _23_pOffset = (*XExpr)(_p.X16)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))) = nil
- *(*int32)(unsafe.Pointer(&(_23_intersectdest.X2))) = _23_tab2
- _iSub2 = _pParse.X59
+ *elem8((*int32)(unsafe.Pointer(&_p.XaddrOpenEphm)), uintptr(1)) = _23_addr
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = nil
+ _23_pLimit = (*XExpr)(_p.XpLimit)
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = nil
+ _23_pOffset = (*XExpr)(_p.XpOffset)
+ *(**XExpr)(unsafe.Pointer(&_p.XpOffset)) = nil
+ _23_intersectdest.XiSDParm = _23_tab2
+ _iSub2 = _pParse.XiNextSelectId
_rc = _sqlite3Select(tls, _pParse, _p, &_23_intersectdest)
- _pDelete = (*XSelect)(_p.X13)
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _pPrior
- if int32(_p.X2) > int32(_pPrior.X2) {
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _pPrior.X2
+ _pDelete = (*XSelect)(_p.XpPrior)
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = _pPrior
+ if int32(_p.XnSelectRow) > int32(_pPrior.XnSelectRow) {
+ _p.XnSelectRow = _pPrior.XnSelectRow
}
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X15))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = _23_pLimit
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))) = _23_pOffset
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpLimit))
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = _23_pLimit
+ *(**XExpr)(unsafe.Pointer(&_p.XpOffset)) = _23_pOffset
func() {
- if (*XExprList)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119031), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98406)))
+ if _p.XpEList == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119031), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98434)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_dest.X0) != i32(9) {
+ if int32(_dest.XeDest) != int32(9) {
goto _83
}
_25_pFirst = _p
_84:
- if (*XSelect)(_25_pFirst.X13) != nil {
- _25_pFirst = (*XSelect)(_25_pFirst.X13)
+ if _25_pFirst.XpPrior != nil {
+ _25_pFirst = (*XSelect)(_25_pFirst.XpPrior)
goto _84
}
- _generateColumnNames(tls, _pParse, (*XSrcList)(_25_pFirst.X8), (*XExprList)(_25_pFirst.X0))
+ _generateColumnNames(tls, _pParse, (*XSrcList)(_25_pFirst.XpSrc), (*XExprList)(_25_pFirst.XpEList))
_83:
_23_iBreak = _sqlite3VdbeMakeLabel(tls, _v)
_23_iCont = _sqlite3VdbeMakeLabel(tls, _v)
_computeLimitRegisters(tls, _pParse, _p, _23_iBreak)
- _sqlite3VdbeAddOp2(tls, _v, i32(37), _23_tab1, _23_iBreak)
+ _sqlite3VdbeAddOp2(tls, _v, int32(37), _23_tab1, _23_iBreak)
_23_r1 = _sqlite3GetTempReg(tls, _pParse)
- _23_iStart = _sqlite3VdbeAddOp2(tls, _v, i32(124), _23_tab1, _23_r1)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(29), _23_tab2, _23_iCont, _23_r1, i32(0))
+ _23_iStart = _sqlite3VdbeAddOp2(tls, _v, int32(124), _23_tab1, _23_r1)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(29), _23_tab2, _23_iCont, _23_r1, int32(0))
_sqlite3ReleaseTempReg(tls, _pParse, _23_r1)
- _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.X0), _23_tab1, nil, nil, &_dest, _23_iCont, _23_iBreak)
+ _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.XpEList), _23_tab1, nil, nil, &_dest, _23_iCont, _23_iBreak)
_sqlite3VdbeResolveLabel(tls, _v, _23_iCont)
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _23_tab1, _23_iStart)
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _23_tab1, _23_iStart)
_sqlite3VdbeResolveLabel(tls, _v, _23_iBreak)
- _sqlite3VdbeAddOp2(tls, _v, i32(114), _23_tab2, i32(0))
- _sqlite3VdbeAddOp2(tls, _v, i32(114), _23_tab1, i32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(114), _23_tab2, int32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(114), _23_tab1, int32(0))
goto _39
_39:
- _explainComposite(tls, _pParse, int32(_p.X1), _iSub1, _iSub2, bool2int(int32(_p.X1) != i32(116)))
- if ((_p.X3) & uint32(i32(32))) == 0 {
+ _explainComposite(tls, _pParse, int32(_p.Xop), _iSub1, _iSub2, bool2int(int32(_p.Xop) != int32(116)))
+ if (_p.XselFlags & uint32(32)) == 0 {
goto _multi_select_end
}
func() {
- if (*XSelect)(_p.X14) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119074), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98720)))
+ if (*XSelect)(_p.XpNext) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119074), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98748)))
crt.X__builtin_abort(tls)
}
}()
- _26_nCol = (*XExprList)(_p.X0).X0
- _26_pKeyInfo = _sqlite3KeyInfoAlloc(tls, _db, _26_nCol, i32(1))
+ _26_nCol = (*XExprList)(_p.XpEList).XnExpr
+ _26_pKeyInfo = _sqlite3KeyInfoAlloc(tls, _db, _26_nCol, int32(1))
if _26_pKeyInfo == nil {
- _rc = _sqlite3NomemError(tls, i32(119078))
+ _rc = _sqlite3NomemError(tls, int32(119078))
goto _multi_select_end
}
- *func() ***XCollSeq { _26_i = i32(0); return &_26_apColl }() = (**XCollSeq)(unsafe.Pointer((*[1]unsafe.Pointer)(unsafe.Pointer(&(_26_pKeyInfo.X6)))))
+ *func() ***XCollSeq { _26_i = int32(0); return &_26_apColl }() = (**XCollSeq)(unsafe.Pointer(&_26_pKeyInfo.XaColl))
_90:
if _26_i >= _26_nCol {
goto _93
}
*_26_apColl = _multiSelectCollSeq(tls, _pParse, _p, _26_i)
if nil == (*_26_apColl) {
- *_26_apColl = (*XCollSeq)(_db.X2)
+ *_26_apColl = (*XCollSeq)(_db.XpDfltColl)
}
*(*uintptr)(unsafe.Pointer(func() ***XCollSeq { _26_i += 1; return &_26_apColl }())) += uintptr(4)
goto _90
@@ -77124,125 +78186,123 @@ _95:
if _26_pLoop == nil {
goto _98
}
- _26_i = i32(0)
+ _26_i = int32(0)
_99:
- if _26_i >= i32(2) {
+ if _26_i >= int32(2) {
goto _102
}
- _31_addr = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_26_pLoop.X7))))) + 4*uintptr(_26_i)))
- if _31_addr < i32(0) {
+ _31_addr = *elem8((*int32)(unsafe.Pointer(&_26_pLoop.XaddrOpenEphm)), uintptr(_26_i))
+ if _31_addr < int32(0) {
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_26_pLoop.X7))))) + 4*uintptr(i32(1))))) >= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119094), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectØ00__func__Ø000))), unsafe.Pointer(str(98732)))
+ if (*elem8((*int32)(unsafe.Pointer(&_26_pLoop.XaddrOpenEphm)), uintptr(1))) >= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119094), unsafe.Pointer(&_multiSelectØ00__func__Ø000), unsafe.Pointer(str(98760)))
crt.X__builtin_abort(tls)
}
}()
goto _102
}
_sqlite3VdbeChangeP2(tls, _v, uint32(_31_addr), _26_nCol)
- _sqlite3VdbeChangeP4(tls, _v, _31_addr, (*int8)(unsafe.Pointer(_sqlite3KeyInfoRef(tls, _26_pKeyInfo))), i32(-5))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_26_pLoop.X7))))) + 4*uintptr(_26_i))) = i32(-1)
+ _sqlite3VdbeChangeP4(tls, _v, _31_addr, (*int8)(unsafe.Pointer(_sqlite3KeyInfoRef(tls, _26_pKeyInfo))), int32(-5))
+ *elem8((*int32)(unsafe.Pointer(&_26_pLoop.XaddrOpenEphm)), uintptr(_26_i)) = int32(-1)
_26_i += 1
goto _99
_102:
- _26_pLoop = (*XSelect)(_26_pLoop.X13)
+ _26_pLoop = (*XSelect)(_26_pLoop.XpPrior)
goto _95
_98:
_sqlite3KeyInfoUnref(tls, _26_pKeyInfo)
_multi_select_end:
- *(*int32)(unsafe.Pointer(&(_pDest.X3))) = _dest.X3
- *(*int32)(unsafe.Pointer(&(_pDest.X4))) = _dest.X4
+ _pDest.XiSdst = _dest.XiSdst
+ _pDest.XnSdst = _dest.XnSdst
_sqlite3SelectDelete(tls, _db, _pDelete)
return _rc
-
- _ = _dest
- _ = _14_uniondest
- _ = _23_intersectdest
- panic(0)
}
var _multiSelectØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_multiSelectØ00__func__Ø000[0], str(98757), 12)
+ crt.Xstrncpy(nil, &_multiSelectØ00__func__Ø000[0], str(98785), 12)
}
-// Handle the special case of a compound-select that originates from a
-// VALUES clause. By handling this as a special case, we avoid deep
-// recursion, and thus do not need to enforce the SQLITE_LIMIT_COMPOUND_SELECT
-// on a VALUES clause.
-//
-// Because the Select object originates from a VALUES clause:
-// (1) It has no LIMIT or OFFSET
-// (2) All terms are UNION ALL
-// (3) There is no ORDER BY clause
+// C comment
+// /*
+// ** Handle the special case of a compound-select that originates from a
+// ** VALUES clause. By handling this as a special case, we avoid deep
+// ** recursion, and thus do not need to enforce the SQLITE_LIMIT_COMPOUND_SELECT
+// ** on a VALUES clause.
+// **
+// ** Because the Select object originates from a VALUES clause:
+// ** (1) It has no LIMIT or OFFSET
+// ** (2) All terms are UNION ALL
+// ** (3) There is no ORDER BY clause
+// */
func _multiSelectValues(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pDest *XSelectDest) (r0 int32) {
var _nRow, _rc int32
var _pPrior *XSelect
- _nRow = i32(1)
- _rc = i32(0)
+ _nRow = int32(1)
+ _rc = int32(0)
func() {
- if ((_p.X3) & uint32(i32(1024))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118702), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000))), unsafe.Pointer(str(98769)))
+ if (_p.XselFlags & uint32(1024)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118702), unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000), unsafe.Pointer(str(98797)))
crt.X__builtin_abort(tls)
}
}()
_2:
func() {
- if ((_p.X3) & uint32(i32(512))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118704), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000))), unsafe.Pointer(str(98797)))
+ if (_p.XselFlags & uint32(512)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118704), unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000), unsafe.Pointer(str(98825)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X1) != i32(116) && (int32(_p.X1) != i32(119) || (*XSelect)(_p.X13) != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118705), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000))), unsafe.Pointer(str(98821)))
+ if int32(_p.Xop) != int32(116) && (int32(_p.Xop) != int32(119) || (*XSelect)(_p.XpPrior) != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118705), unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000), unsafe.Pointer(str(98849)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)(_p.X15) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118706), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000))), unsafe.Pointer(str(98528)))
+ if (*XExpr)(_p.XpLimit) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118706), unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000), unsafe.Pointer(str(98556)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)(_p.X16) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118707), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000))), unsafe.Pointer(str(98541)))
+ if (*XExpr)(_p.XpOffset) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118707), unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000), unsafe.Pointer(str(98569)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(_p.X14) != nil && ((*XExprList)(_p.X0).X0) != ((*XExprList)((*XSelect)(_p.X14).X0).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118708), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000))), unsafe.Pointer(str(98873)))
+ if (*XSelect)(_p.XpNext) != nil && ((*XExprList)(_p.XpEList).XnExpr) != ((*XExprList)((*XSelect)(_p.XpNext).XpEList).XnExpr) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118708), unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000), unsafe.Pointer(str(98901)))
crt.X__builtin_abort(tls)
}
}()
- if (*XSelect)(_p.X13) == nil {
+ if (*XSelect)(_p.XpPrior) == nil {
goto _17
}
func() {
- if (*XSelect)((*XSelect)(_p.X13).X14) != _p {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118710), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000))), unsafe.Pointer(str(98930)))
+ if (*XSelect)((*XSelect)(_p.XpPrior).XpNext) != _p {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118710), unsafe.Pointer(&_multiSelectValuesØ00__func__Ø000), unsafe.Pointer(str(98958)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*XSelect)(_p.X13)
+ _p = (*XSelect)(_p.XpPrior)
_nRow += 1
goto _2
_17:
if _p == nil {
goto _21
}
- _pPrior = (*XSelect)(_p.X13)
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = nil
+ _pPrior = (*XSelect)(_p.XpPrior)
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = nil
_rc = _sqlite3Select(tls, _pParse, _p, _pDest)
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _pPrior
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = _pPrior
if _rc != 0 {
goto _21
}
- *(*int16)(unsafe.Pointer(&(_p.X2))) = int16(_nRow)
- _p = (*XSelect)(_p.X14)
+ _p.XnSelectRow = int16(_nRow)
+ _p = (*XSelect)(_p.XpNext)
goto _17
_21:
return _rc
@@ -77251,43 +78311,46 @@ _21:
var _multiSelectValuesØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_multiSelectValuesØ00__func__Ø000[0], str(98950), 18)
-}
-
-// This routine generates VDBE code to compute the content of a WITH RECURSIVE
-// query of the form:
-//
-// <recursive-table> AS (<setup-query> UNION [ALL] <recursive-query>)
-// \___________/ \_______________/
-// p->pPrior p
-//
-//
-// There is exactly one reference to the recursive-table in the FROM clause
-// of recursive-query, marked with the SrcList->a[].fg.isRecursive flag.
-//
-// The setup-query runs once to generate an initial set of rows that go
-// into a Queue table. Rows are extracted from the Queue table one by
-// one. Each row extracted from Queue is output to pDest. Then the single
-// extracted row (now in the iCurrent table) becomes the content of the
-// recursive-table for a recursive-query run. The output of the recursive-query
-// is added back into the Queue table. Then another row is extracted from Queue
-// and the iteration continues until the Queue table is empty.
-//
-// If the compound query operator is UNION then no duplicate rows are ever
-// inserted into the Queue table. The iDistinct table keeps a copy of all rows
-// that have ever been inserted into Queue and causes duplicates to be
-// discarded. If the operator is UNION ALL, then duplicates are allowed.
-//
-// If the query has an ORDER BY, then entries in the Queue table are kept in
-// ORDER BY order and the first entry is extracted for each cycle. Without
-// an ORDER BY, the Queue table is just a FIFO.
-//
-// If a LIMIT clause is provided, then the iteration stops after LIMIT rows
-// have been output to pDest. A LIMIT of zero means to output no rows and a
-// negative LIMIT means to output all rows. If there is also an OFFSET clause
-// with a positive value, then the first OFFSET outputs are discarded rather
-// than being sent to pDest. The LIMIT count does not begin until after OFFSET
-// rows have been skipped.
+ crt.Xstrncpy(nil, &_multiSelectValuesØ00__func__Ø000[0], str(98978), 18)
+}
+
+// C comment
+// /*
+// ** This routine generates VDBE code to compute the content of a WITH RECURSIVE
+// ** query of the form:
+// **
+// ** <recursive-table> AS (<setup-query> UNION [ALL] <recursive-query>)
+// ** \___________/ \_______________/
+// ** p->pPrior p
+// **
+// **
+// ** There is exactly one reference to the recursive-table in the FROM clause
+// ** of recursive-query, marked with the SrcList->a[].fg.isRecursive flag.
+// **
+// ** The setup-query runs once to generate an initial set of rows that go
+// ** into a Queue table. Rows are extracted from the Queue table one by
+// ** one. Each row extracted from Queue is output to pDest. Then the single
+// ** extracted row (now in the iCurrent table) becomes the content of the
+// ** recursive-table for a recursive-query run. The output of the recursive-query
+// ** is added back into the Queue table. Then another row is extracted from Queue
+// ** and the iteration continues until the Queue table is empty.
+// **
+// ** If the compound query operator is UNION then no duplicate rows are ever
+// ** inserted into the Queue table. The iDistinct table keeps a copy of all rows
+// ** that have ever been inserted into Queue and causes duplicates to be
+// ** discarded. If the operator is UNION ALL, then duplicates are allowed.
+// **
+// ** If the query has an ORDER BY, then entries in the Queue table are kept in
+// ** ORDER BY order and the first entry is extracted for each cycle. Without
+// ** an ORDER BY, the Queue table is just a FIFO.
+// **
+// ** If a LIMIT clause is provided, then the iteration stops after LIMIT rows
+// ** have been output to pDest. A LIMIT of zero means to output no rows and a
+// ** negative LIMIT means to output all rows. If there is also an OFFSET clause
+// ** with a positive value, then the first OFFSET outputs are discarded rather
+// ** than being sent to pDest. The LIMIT count does not begin until after OFFSET
+// ** rows have been skipped.
+// */
func _generateWithRecursiveQuery(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pDest *XSelectDest) {
var _nCol, _addrTop, _addrCont, _addrBreak, _iCurrent, _regCurrent, _iQueue, _iDistinct, _eDest, _i, _rc, _regLimit, _regOffset int32
var _v *TVdbe
@@ -77297,260 +78360,262 @@ func _generateWithRecursiveQuery(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pD
var _pLimit, _pOffset *XExpr
var _5_pKeyInfo *XKeyInfo
var _destQueue XSelectDest
- _pSrc = (*XSrcList)(_p.X8)
- _nCol = (*XExprList)(_p.X0).X0
- _v = (*TVdbe)(_pParse.X2)
- _pSetup = (*XSelect)(_p.X13)
- _iCurrent = i32(0)
- _iDistinct = i32(0)
- _eDest = i32(5)
- if _sqlite3AuthCheck(tls, _pParse, i32(33), nil, nil, nil) != 0 {
+ _pSrc = (*XSrcList)(_p.XpSrc)
+ _nCol = (*XExprList)(_p.XpEList).XnExpr
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _pSetup = (*XSelect)(_p.XpPrior)
+ _iCurrent = int32(0)
+ _iDistinct = int32(0)
+ _eDest = int32(5)
+ if _sqlite3AuthCheck(tls, _pParse, int32(33), nil, nil, nil) != 0 {
return
}
_addrBreak = _sqlite3VdbeMakeLabel(tls, _v)
- *(*int16)(unsafe.Pointer(&(_p.X2))) = int16(i32(320))
+ _p.XnSelectRow = int16(320)
_computeLimitRegisters(tls, _pParse, _p, _addrBreak)
- _pLimit = (*XExpr)(_p.X15)
- _pOffset = (*XExpr)(_p.X16)
- _regLimit = _p.X4
- _regOffset = _p.X5
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = store36((**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))), nil)
- *(*int32)(unsafe.Pointer(&(_p.X4))) = store1((*int32)(unsafe.Pointer(&(_p.X5))), i32(0))
- _pOrderBy = (*XExprList)(_p.X12)
- _i = i32(0)
+ _pLimit = (*XExpr)(_p.XpLimit)
+ _pOffset = (*XExpr)(_p.XpOffset)
+ _regLimit = _p.XiLimit
+ _regOffset = _p.XiOffset
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = store58((**XExpr)(unsafe.Pointer(&_p.XpOffset)), nil)
+ _p.XiLimit = store2(&_p.XiOffset, int32(0))
+ _pOrderBy = (*XExprList)(_p.XpOrderBy)
+ _i = int32(0)
_1:
if func() int32 {
- if _i < (_pSrc.X0) {
- return i32(1)
+ if _i < _pSrc.XnSrc {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118583), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateWithRecursiveQueryØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118583), unsafe.Pointer(&_generateWithRecursiveQueryØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _6
}
- if ((uint32(((*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(_i))).X9))).X1)>>uint(i32(5))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _iCurrent = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(_i))).X11
+ if ((uint32(((elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_i)).Xfg).XnotIndexed)>>5) << 31) >> 31) != 0 {
+ _iCurrent = elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_i)).XiCursor
goto _6
}
_i += 1
goto _1
_6:
- _iQueue = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- if int32(_p.X1) == i32(115) {
+ _iQueue = postInc2(&_pParse.XnTab, 1)
+ if int32(_p.Xop) == int32(115) {
_eDest = func() int32 {
if _pOrderBy != nil {
- return i32(8)
+ return int32(8)
}
- return i32(6)
+ return int32(6)
}()
- _iDistinct = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ _iDistinct = postInc2(&_pParse.XnTab, 1)
goto _11
}
_eDest = func() int32 {
if _pOrderBy != nil {
- return i32(7)
+ return int32(7)
}
- return i32(5)
+ return int32(5)
}()
_11:
_sqlite3SelectDestInit(tls, &_destQueue, _eDest, _iQueue)
- _regCurrent = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp3(tls, _v, i32(113), _iCurrent, _regCurrent, _nCol)
+ _regCurrent = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp3(tls, _v, int32(113), _iCurrent, _regCurrent, _nCol)
if _pOrderBy != nil {
- _5_pKeyInfo = _multiSelectOrderByKeyInfo(tls, _pParse, _p, i32(1))
- _sqlite3VdbeAddOp4(tls, _v, i32(110), _iQueue, (_pOrderBy.X0)+i32(2), i32(0), (*int8)(unsafe.Pointer(_5_pKeyInfo)), i32(-5))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_destQueue.X5))))) = _pOrderBy
+ _5_pKeyInfo = _multiSelectOrderByKeyInfo(tls, _pParse, _p, int32(1))
+ _sqlite3VdbeAddOp4(tls, _v, int32(110), _iQueue, _pOrderBy.XnExpr+int32(2), int32(0), (*int8)(unsafe.Pointer(_5_pKeyInfo)), int32(-5))
+ *(**XExprList)(unsafe.Pointer(&_destQueue.XpOrderBy)) = _pOrderBy
goto _15
}
- _sqlite3VdbeAddOp2(tls, _v, i32(110), _iQueue, _nCol)
+ _sqlite3VdbeAddOp2(tls, _v, int32(110), _iQueue, _nCol)
_15:
- _sqlite3VdbeComment(tls, _v, str(98968))
+ _sqlite3VdbeComment(tls, _v, str(98996))
if _iDistinct != 0 {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_p.X7))))) + 4*uintptr(i32(0)))) = _sqlite3VdbeAddOp2(tls, _v, i32(110), _iDistinct, i32(0))
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) | uint32(i32(32))
- sink5(*p)
- }
+ *elem8((*int32)(unsafe.Pointer(&_p.XaddrOpenEphm)), 0) = _sqlite3VdbeAddOp2(tls, _v, int32(110), _iDistinct, int32(0))
+ _p.XselFlags |= uint32(32)
}
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = nil
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSetup.X14))))) = nil
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = nil
+ *(**XSelect)(unsafe.Pointer(&_pSetup.XpNext)) = nil
_rc = _sqlite3Select(tls, _pParse, _pSetup, &_destQueue)
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSetup.X14))))) = _p
+ *(**XSelect)(unsafe.Pointer(&_pSetup.XpNext)) = _p
if _rc != 0 {
goto _end_of_recursive_query
}
- _addrTop = _sqlite3VdbeAddOp2(tls, _v, i32(37), _iQueue, _addrBreak)
- _sqlite3VdbeAddOp1(tls, _v, i32(126), _iCurrent)
+ _addrTop = _sqlite3VdbeAddOp2(tls, _v, int32(37), _iQueue, _addrBreak)
+ _sqlite3VdbeAddOp1(tls, _v, int32(126), _iCurrent)
if _pOrderBy != nil {
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _iQueue, (_pOrderBy.X0)+i32(1), _regCurrent)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _iQueue, _pOrderBy.XnExpr+int32(1), _regCurrent)
goto _19
}
- _sqlite3VdbeAddOp2(tls, _v, i32(124), _iQueue, _regCurrent)
+ _sqlite3VdbeAddOp2(tls, _v, int32(124), _iQueue, _regCurrent)
_19:
- _sqlite3VdbeAddOp1(tls, _v, i32(120), _iQueue)
+ _sqlite3VdbeAddOp1(tls, _v, int32(120), _iQueue)
_addrCont = _sqlite3VdbeMakeLabel(tls, _v)
_codeOffset(tls, _v, _regOffset, _addrCont)
- _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.X0), _iCurrent, nil, nil, _pDest, _addrCont, _addrBreak)
+ _selectInnerLoop(tls, _pParse, _p, (*XExprList)(_p.XpEList), _iCurrent, nil, nil, _pDest, _addrCont, _addrBreak)
if _regLimit != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(48), _regLimit, _addrBreak)
+ _sqlite3VdbeAddOp2(tls, _v, int32(48), _regLimit, _addrBreak)
}
_sqlite3VdbeResolveLabel(tls, _v, _addrCont)
- if ((_p.X3) & uint32(i32(8))) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(98980))
+ if (_p.XselFlags & uint32(8)) != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(99008))
goto _22
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = nil
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = nil
_sqlite3Select(tls, _pParse, _p, &_destQueue)
func() {
- if (*XSelect)(_p.X13) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118659), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateWithRecursiveQueryØ00__func__Ø000))), unsafe.Pointer(str(97737)))
+ if (*XSelect)(_p.XpPrior) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118659), unsafe.Pointer(&_generateWithRecursiveQueryØ00__func__Ø000), unsafe.Pointer(str(97765)))
crt.X__builtin_abort(tls)
}
}()
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _pSetup
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = _pSetup
_22:
_sqlite3VdbeGoto(tls, _v, _addrTop)
_sqlite3VdbeResolveLabel(tls, _v, _addrBreak)
_end_of_recursive_query:
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), (*XExprList)(_p.X12))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = _pOrderBy
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = _pLimit
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))) = _pOffset
- _ = _destQueue
-}
-
-// Compute the iLimit and iOffset fields of the SELECT based on the
-// pLimit and pOffset expressions. pLimit and pOffset hold the expressions
-// that appear in the original SQL statement after the LIMIT and OFFSET
-// keywords. Or NULL if those keywords are omitted. iLimit and iOffset
-// are the integer memory register numbers for counters used to compute
-// the limit and offset. If there is no limit and/or offset, then
-// iLimit and iOffset are negative.
-//
-// This routine changes the values of iLimit and iOffset only if
-// a limit or offset is defined by pLimit and pOffset. iLimit and
-// iOffset should have been preset to appropriate default values (zero)
-// prior to calling this routine.
-//
-// The iOffset register (if it exists) is initialized to the value
-// of the OFFSET. The iLimit register is initialized to LIMIT. Register
-// iOffset+1 is initialized to LIMIT+OFFSET.
-//
-// Only if pLimit!=0 or pOffset!=0 do the limit registers get
-// redefined. The UNION ALL operator uses this property to force
-// the reuse of the same limit and offset registers across multiple
-// SELECT statements.
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), (*XExprList)(_p.XpOrderBy))
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = _pOrderBy
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = _pLimit
+ *(**XExpr)(unsafe.Pointer(&_p.XpOffset)) = _pOffset
+}
+
+// C comment
+// /*
+// ** Compute the iLimit and iOffset fields of the SELECT based on the
+// ** pLimit and pOffset expressions. pLimit and pOffset hold the expressions
+// ** that appear in the original SQL statement after the LIMIT and OFFSET
+// ** keywords. Or NULL if those keywords are omitted. iLimit and iOffset
+// ** are the integer memory register numbers for counters used to compute
+// ** the limit and offset. If there is no limit and/or offset, then
+// ** iLimit and iOffset are negative.
+// **
+// ** This routine changes the values of iLimit and iOffset only if
+// ** a limit or offset is defined by pLimit and pOffset. iLimit and
+// ** iOffset should have been preset to appropriate default values (zero)
+// ** prior to calling this routine.
+// **
+// ** The iOffset register (if it exists) is initialized to the value
+// ** of the OFFSET. The iLimit register is initialized to LIMIT. Register
+// ** iOffset+1 is initialized to LIMIT+OFFSET.
+// **
+// ** Only if pLimit!=0 or pOffset!=0 do the limit registers get
+// ** redefined. The UNION ALL operator uses this property to force
+// ** the reuse of the same limit and offset registers across multiple
+// ** SELECT statements.
+// */
func _computeLimitRegisters(tls *crt.TLS, _pParse *XParse, _p *XSelect, _iBreak int32) {
var _iLimit, _iOffset, _n int32
var _v *TVdbe
_v = nil
- _iLimit = i32(0)
- if (_p.X4) != 0 {
+ _iLimit = int32(0)
+ if _p.XiLimit != 0 {
return
}
_sqlite3ExprCacheClear(tls, _pParse)
func() {
- if (*XExpr)(_p.X16) != nil && (*XExpr)(_p.X15) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118411), unsafe.Pointer((*int8)(unsafe.Pointer(&_computeLimitRegistersØ00__func__Ø000))), unsafe.Pointer(str(99022)))
+ if (*XExpr)(_p.XpOffset) != nil && (*XExpr)(_p.XpLimit) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118411), unsafe.Pointer(&_computeLimitRegistersØ00__func__Ø000), unsafe.Pointer(str(99050)))
crt.X__builtin_abort(tls)
}
}()
- if (*XExpr)(_p.X15) == nil {
+ if _p.XpLimit == nil {
goto _4
}
- *(*int32)(unsafe.Pointer(&(_p.X4))) = store1(&_iLimit, preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1))
+ _p.XiLimit = store2(&_iLimit, preInc2(&_pParse.XnMem, 1))
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118415), unsafe.Pointer((*int8)(unsafe.Pointer(&_computeLimitRegistersØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118415), unsafe.Pointer(&_computeLimitRegistersØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3ExprIsInteger(tls, (*XExpr)(_p.X15), &_n) == 0 {
+ if _sqlite3ExprIsInteger(tls, (*XExpr)(_p.XpLimit), &_n) == 0 {
goto _7
}
- _sqlite3VdbeAddOp2(tls, _v, i32(56), _n, _iLimit)
- _sqlite3VdbeComment(tls, _v, str(99052))
- if _n == i32(0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), _n, _iLimit)
+ _sqlite3VdbeComment(tls, _v, str(99080))
+ if _n == int32(0) {
_sqlite3VdbeGoto(tls, _v, _iBreak)
goto _11
}
- if (_n >= i32(0)) && (int32(_p.X2) > int32(_sqlite3LogEst(tls, uint64(_n)))) {
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _sqlite3LogEst(tls, uint64(_n))
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X3)))
- *p = (*p) | uint32(i32(16384))
- sink5(*p)
- }
+ if (_n >= int32(0)) && (int32(_p.XnSelectRow) > int32(_sqlite3LogEst(tls, uint64(_n)))) {
+ _p.XnSelectRow = _sqlite3LogEst(tls, uint64(_n))
+ _p.XselFlags |= uint32(16384)
}
_11:
goto _12
_7:
- _sqlite3ExprCode(tls, _pParse, (*XExpr)(_p.X15), _iLimit)
- _sqlite3VdbeAddOp1(tls, _v, i32(17), _iLimit)
- _sqlite3VdbeComment(tls, _v, str(99052))
- _sqlite3VdbeAddOp2(tls, _v, i32(22), _iLimit, _iBreak)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(_p.XpLimit), _iLimit)
+ _sqlite3VdbeAddOp1(tls, _v, int32(17), _iLimit)
+ _sqlite3VdbeComment(tls, _v, str(99080))
+ _sqlite3VdbeAddOp2(tls, _v, int32(22), _iLimit, _iBreak)
_12:
- if (*XExpr)(_p.X16) != nil {
- *(*int32)(unsafe.Pointer(&(_p.X5))) = store1(&_iOffset, preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1))
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) += 1
- _sqlite3ExprCode(tls, _pParse, (*XExpr)(_p.X16), _iOffset)
- _sqlite3VdbeAddOp1(tls, _v, i32(17), _iOffset)
- _sqlite3VdbeComment(tls, _v, str(99066))
- _sqlite3VdbeAddOp3(tls, _v, i32(149), _iLimit, _iOffset+i32(1), _iOffset)
- _sqlite3VdbeComment(tls, _v, str(99081))
+ if _p.XpOffset != nil {
+ _p.XiOffset = store2(&_iOffset, preInc2(&_pParse.XnMem, 1))
+ _pParse.XnMem += 1
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(_p.XpOffset), _iOffset)
+ _sqlite3VdbeAddOp1(tls, _v, int32(17), _iOffset)
+ _sqlite3VdbeComment(tls, _v, str(99094))
+ _sqlite3VdbeAddOp3(tls, _v, int32(149), _iLimit, _iOffset+int32(1), _iOffset)
+ _sqlite3VdbeComment(tls, _v, str(99109))
}
_4:
}
-// Clear all column cache entries.
+// C comment
+// /*
+// ** Clear all column cache entries.
+// */
func _sqlite3ExprCacheClear(tls *crt.TLS, _pParse *XParse) {
var _i int32
- if (((*Xsqlite3)(_pParse.X0).X6) & i32(4096)) != 0 {
- crt.Xprintf(tls, str(99094))
+ if (((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(4096)) != 0 {
+ crt.Xprintf(tls, str(99122))
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= int32(_pParse.X13) {
+ if _i >= int32(_pParse.XnColCache) {
goto _4
}
- if (((*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(_i))).X2) != 0) && (int32(_pParse.X7) < i32(8)) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[8]int32)(unsafe.Pointer(&(_pParse.X49))))) + 4*uintptr(postInc2((*uint8)(unsafe.Pointer(&(_pParse.X7))), uint8(1))))) = (*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(_i))).X4
+ if ((elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(_i)).XtempReg) != 0) && (int32(_pParse.XnTempReg) < int32(8)) {
+ *elem8((*int32)(unsafe.Pointer(&_pParse.XaTempReg)), uintptr(postInc3(&_pParse.XnTempReg, byte(1)))) = elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(_i)).XiReg
}
_i += 1
goto _1
_4:
- *(*uint8)(unsafe.Pointer(&(_pParse.X13))) = uint8(i32(0))
+ _pParse.XnColCache = 0
}
var _computeLimitRegistersØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_computeLimitRegistersØ00__func__Ø000[0], str(99101), 22)
+ crt.Xstrncpy(nil, &_computeLimitRegistersØ00__func__Ø000[0], str(99129), 22)
}
-// Generate code for an unconditional jump to instruction iDest
+// C comment
+// /* Generate code for an unconditional jump to instruction iDest
+// */
func _sqlite3VdbeGoto(tls *crt.TLS, _p *TVdbe, _iDest int32) (r0 int32) {
- return _sqlite3VdbeAddOp3(tls, _p, i32(13), i32(0), _iDest, i32(0))
+ return _sqlite3VdbeAddOp3(tls, _p, int32(13), int32(0), _iDest, int32(0))
}
var _generateWithRecursiveQueryØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_generateWithRecursiveQueryØ00__func__Ø000[0], str(99123), 27)
+ crt.Xstrncpy(nil, &_generateWithRecursiveQueryØ00__func__Ø000[0], str(99151), 27)
}
-// The select statement passed as the second parameter is a compound SELECT
-// with an ORDER BY clause. This function allocates and returns a KeyInfo
-// structure suitable for implementing the ORDER BY.
-//
-// Space to hold the KeyInfo structure is obtained from malloc. The calling
-// function is responsible for ensuring that this structure is eventually
-// freed.
+// C comment
+// /*
+// ** The select statement passed as the second parameter is a compound SELECT
+// ** with an ORDER BY clause. This function allocates and returns a KeyInfo
+// ** structure suitable for implementing the ORDER BY.
+// **
+// ** Space to hold the KeyInfo structure is obtained from malloc. The calling
+// ** function is responsible for ensuring that this structure is eventually
+// ** freed.
+// */
func _multiSelectOrderByKeyInfo(tls *crt.TLS, _pParse *XParse, _p *XSelect, _nExtra int32) (r0 *XKeyInfo) {
var _nOrderBy, _1_i int32
var _db *Xsqlite3
@@ -77559,38 +78624,38 @@ func _multiSelectOrderByKeyInfo(tls *crt.TLS, _pParse *XParse, _p *XSelect, _nEx
var _2_pTerm *XExpr
var _pRet *XKeyInfo
var _2_pColl *XCollSeq
- _pOrderBy = (*XExprList)(_p.X12)
- _nOrderBy = (*XExprList)(_p.X12).X0
- _db = (*Xsqlite3)(_pParse.X0)
- _pRet = _sqlite3KeyInfoAlloc(tls, _db, _nOrderBy+_nExtra, i32(1))
+ _pOrderBy = (*XExprList)(_p.XpOrderBy)
+ _nOrderBy = (*XExprList)(_p.XpOrderBy).XnExpr
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pRet = _sqlite3KeyInfoAlloc(tls, _db, _nOrderBy+_nExtra, int32(1))
if _pRet == nil {
goto _0
}
- _1_i = i32(0)
+ _1_i = int32(0)
_1:
if _1_i >= _nOrderBy {
goto _4
}
- _2_pItem = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2))))) + 20*uintptr(_1_i)))
- _2_pTerm = (*XExpr)(_2_pItem.X0)
- if ((_2_pTerm.X2) & uint32(i32(256))) != 0 {
+ _2_pItem = elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_1_i))
+ _2_pTerm = (*XExpr)(_2_pItem.XpExpr)
+ if (_2_pTerm.Xflags & uint32(256)) != 0 {
_2_pColl = _sqlite3ExprCollSeq(tls, _pParse, _2_pTerm)
goto _6
}
- _2_pColl = _multiSelectCollSeq(tls, _pParse, _p, int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_2_pItem.X5))))).X0)-i32(1))
+ _2_pColl = _multiSelectCollSeq(tls, _pParse, _p, int32((*t71)(unsafe.Pointer(&_2_pItem.Xu)).XiOrderByCol)-int32(1))
if _2_pColl == nil {
- _2_pColl = (*XCollSeq)(_db.X2)
+ _2_pColl = (*XCollSeq)(_db.XpDfltColl)
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2))))) + 20*uintptr(_1_i))).X0))))) = _sqlite3ExprAddCollateString(tls, _pParse, _2_pTerm, _2_pColl.X0)
+ *(**XExpr)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_1_i)).XpExpr))) = _sqlite3ExprAddCollateString(tls, _pParse, _2_pTerm, _2_pColl.XzName)
_6:
func() {
if _sqlite3KeyInfoIsWriteable(tls, _pRet) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118498), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByKeyInfoØ00__func__Ø000))), unsafe.Pointer(str(99150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118498), unsafe.Pointer(&_multiSelectOrderByKeyInfoØ00__func__Ø000), unsafe.Pointer(str(99178)))
crt.X__builtin_abort(tls)
}
}()
- *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_pRet.X6))))) + 4*uintptr(_1_i))) = _2_pColl
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pRet.X5)) + 1*uintptr(_1_i))) = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2))))) + 20*uintptr(_1_i))).X3
+ *elem62((**XCollSeq)(unsafe.Pointer(&_pRet.XaColl)), uintptr(_1_i)) = _2_pColl
+ *elem15(_pRet.XaSortOrder, uintptr(_1_i)) = elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_1_i)).XsortOrder
_1_i += 1
goto _1
_4:
@@ -77598,37 +78663,40 @@ _0:
return _pRet
}
-// Return the appropriate collating sequence for the iCol-th column of
-// the result set for the compound-select statement "p". Return NULL if
-// the column has no default collating sequence.
-//
-// The collating sequence for the compound select is taken from the
-// left-most term of the select that has a collating sequence.
+// C comment
+// /*
+// ** Return the appropriate collating sequence for the iCol-th column of
+// ** the result set for the compound-select statement "p". Return NULL if
+// ** the column has no default collating sequence.
+// **
+// ** The collating sequence for the compound select is taken from the
+// ** left-most term of the select that has a collating sequence.
+// */
func _multiSelectCollSeq(tls *crt.TLS, _pParse *XParse, _p *XSelect, _iCol int32) (r0 *XCollSeq) {
var _pRet *XCollSeq
- if (*XSelect)(_p.X13) != nil {
- _pRet = _multiSelectCollSeq(tls, _pParse, (*XSelect)(_p.X13), _iCol)
+ if _p.XpPrior != nil {
+ _pRet = _multiSelectCollSeq(tls, _pParse, (*XSelect)(_p.XpPrior), _iCol)
goto _1
}
_pRet = nil
_1:
func() {
- if _iCol < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118459), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectCollSeqØ00__func__Ø000))), unsafe.Pointer(str(99182)))
+ if _iCol < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118459), unsafe.Pointer(&_multiSelectCollSeqØ00__func__Ø000), unsafe.Pointer(str(99210)))
crt.X__builtin_abort(tls)
}
}()
if (_pRet == nil) && func() int32 {
- if _iCol < ((*XExprList)(_p.X0).X0) {
- return i32(1)
+ if _iCol < ((*XExprList)(_p.XpEList).XnExpr) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118463), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectCollSeqØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118463), unsafe.Pointer(&_multiSelectCollSeqØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- _pRet = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.X0).X2)))))+20*uintptr(_iCol))).X0))
+ _pRet = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.XpEList).Xa))), uintptr(_iCol)).XpExpr))
}
return _pRet
}
@@ -77636,30 +78704,36 @@ _1:
var _multiSelectCollSeqØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_multiSelectCollSeqØ00__func__Ø000[0], str(99190), 19)
+ crt.Xstrncpy(nil, &_multiSelectCollSeqØ00__func__Ø000[0], str(99218), 19)
}
var _multiSelectOrderByKeyInfoØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_multiSelectOrderByKeyInfoØ00__func__Ø000[0], str(99209), 26)
+ crt.Xstrncpy(nil, &_multiSelectOrderByKeyInfoØ00__func__Ø000[0], str(99237), 26)
}
-// Add code to implement the OFFSET
+// C comment
+// /*
+// ** Add code to implement the OFFSET
+// */
func _codeOffset(tls *crt.TLS, _v *TVdbe, _iOffset int32, _iContinue int32) {
- if _iOffset > i32(0) {
- _sqlite3VdbeAddOp3(tls, _v, i32(46), _iOffset, _iContinue, i32(1))
- _sqlite3VdbeComment(tls, _v, str(25292))
- }
-}
-
-// This routine generates the code for the inside of the inner loop
-// of a SELECT.
-//
-// If srcTab is negative, then the pEList expressions
-// are evaluated in order to get the data for this row. If srcTab is
-// zero or more, then data is pulled from srcTab and pEList is used only
-// to get the number of columns and the collation sequence for each column.
+ if _iOffset > int32(0) {
+ _sqlite3VdbeAddOp3(tls, _v, int32(46), _iOffset, _iContinue, int32(1))
+ _sqlite3VdbeComment(tls, _v, str(25247))
+ }
+}
+
+// C comment
+// /*
+// ** This routine generates the code for the inside of the inner loop
+// ** of a SELECT.
+// **
+// ** If srcTab is negative, then the pEList expressions
+// ** are evaluated in order to get the data for this row. If srcTab is
+// ** zero or more, then data is pulled from srcTab and pEList is used only
+// ** to get the number of columns and the collation sequence for each column.
+// */
func _selectInnerLoop(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pEList *XExprList, _srcTab int32, _pSort *XSortCtx, _pDistinct *XDistinctCtx, _pDest *XSelectDest, _iContinue int32, _iBreak int32) {
var _i, _hasDistinct, _eDest, _iParm, _nResultCol, _nPrefixReg, _regResult, _regOrig, _11_j, _15_iJump, _15_regPrev, _23_r1, _25_r1, _26_addr, _28_r2, _31_r1, _40_nKey, _40_r1, _40_r2, _40_r3, _40_addrTest int32
var _7_ecelFlags uint8
@@ -77667,221 +78741,204 @@ func _selectInnerLoop(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pEList *XExpr
var _40_pSO *XExprList
var _15_pOp *XVdbeOp
var _16_pColl *XCollSeq
- _v = (*TVdbe)(_pParse.X2)
- _eDest = int32(_pDest.X0)
- _iParm = _pDest.X2
- _nPrefixReg = i32(0)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _eDest = int32(_pDest.XeDest)
+ _iParm = _pDest.XiSDParm
+ _nPrefixReg = int32(0)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117220), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(41861)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117220), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(41816)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pEList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117221), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(45052)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117221), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(45007)))
crt.X__builtin_abort(tls)
}
}()
_hasDistinct = func() int32 {
if _pDistinct != nil {
- return int32(_pDistinct.X1)
+ return int32(_pDistinct.XeTnctType)
}
- return i32(0)
+ return int32(0)
}()
- if (_pSort != nil) && ((*XExprList)(_pSort.X0) == nil) {
+ if (_pSort != nil) && ((*XExprList)(_pSort.XpOrderBy) == nil) {
_pSort = nil
}
if (_pSort == nil) && (_hasDistinct == 0) {
func() {
- if _iContinue == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117225), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99235)))
+ if _iContinue == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117225), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99263)))
crt.X__builtin_abort(tls)
}
}()
- _codeOffset(tls, _v, _p.X5, _iContinue)
+ _codeOffset(tls, _v, _p.XiOffset, _iContinue)
}
- _nResultCol = _pEList.X0
- if (_pDest.X3) != i32(0) {
+ _nResultCol = _pEList.XnExpr
+ if _pDest.XiSdst != int32(0) {
goto _12
}
if _pSort == nil {
goto _13
}
- _nPrefixReg = (*XExprList)(_pSort.X0).X0
- if (int32(_pSort.X7) & i32(1)) == 0 {
+ _nPrefixReg = (*XExprList)(_pSort.XpOrderBy).XnExpr
+ if (int32(_pSort.XsortFlags) & int32(1)) == 0 {
_nPrefixReg += 1
}
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _nPrefixReg
- sink1(*p)
- }
+ _pParse.XnMem += _nPrefixReg
_13:
- *(*int32)(unsafe.Pointer(&(_pDest.X3))) = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _nResultCol
- sink1(*p)
- }
+ _pDest.XiSdst = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _nResultCol
goto _16
_12:
- if ((_pDest.X3) + _nResultCol) > (_pParse.X18) {
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _nResultCol
- sink1(*p)
- }
+ if (_pDest.XiSdst + _nResultCol) > _pParse.XnMem {
+ _pParse.XnMem += _nResultCol
}
_16:
- *(*int32)(unsafe.Pointer(&(_pDest.X4))) = _nResultCol
- _regOrig = store1(&_regResult, _pDest.X3)
- if _srcTab < i32(0) {
+ _pDest.XnSdst = _nResultCol
+ _regOrig = store2(&_regResult, _pDest.XiSdst)
+ if _srcTab < int32(0) {
goto _17
}
- _i = i32(0)
+ _i = int32(0)
_18:
if _i >= _nResultCol {
goto _21
}
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _srcTab, _i, _regResult+_i)
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))+20*uintptr(_i))).X1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _srcTab, _i, _regResult+_i)
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XzName))
_i += 1
goto _18
_21:
goto _23
_17:
- if _eDest == i32(3) {
+ if _eDest == int32(3) {
goto _23
}
- if ((_eDest == i32(10)) || (_eDest == i32(9))) || (_eDest == i32(13)) {
- _7_ecelFlags = uint8(i32(1))
+ if ((_eDest == int32(10)) || (_eDest == int32(9))) || (_eDest == int32(13)) {
+ _7_ecelFlags = uint8(1)
goto _27
}
- _7_ecelFlags = uint8(i32(0))
+ _7_ecelFlags = 0
_27:
- if _pSort == nil || _hasDistinct != i32(0) || _eDest == i32(12) || _eDest == i32(14) {
+ if _pSort == nil || _hasDistinct != int32(0) || _eDest == int32(12) || _eDest == int32(14) {
goto _31
}
{
p := &_7_ecelFlags
- *p = uint8(int32(*p) | i32(12))
- sink2(*p)
+ *p = uint8(int32(*p) | int32(12))
}
- _i = _pSort.X1
+ _i = _pSort.XnOBSat
_32:
- if _i >= ((*XExprList)(_pSort.X0).X0) {
+ if _i >= ((*XExprList)(_pSort.XpOrderBy).XnExpr) {
goto _35
}
- if store1(&_11_j, int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSort.X0).X2)))))+20*uintptr(_i))).X5))))).X0)) > i32(0) {
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_11_j-i32(1)))).X5))))).X0))) = uint16((_i + i32(1)) - (_pSort.X1))
+ if store2(&_11_j, int32((*t71)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSort.XpOrderBy).Xa))), uintptr(_i)).Xu))).XiOrderByCol)) > int32(0) {
+ (*t71)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_11_j-int32(1))).Xu))).XiOrderByCol = uint16((_i + int32(1)) - _pSort.XnOBSat)
}
_i += 1
goto _32
_35:
- _regOrig = i32(0)
+ _regOrig = int32(0)
func() {
- if _eDest != i32(11) && _eDest != i32(10) && _eDest != i32(13) && _eDest != i32(9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117281), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99248)))
+ if _eDest != int32(11) && _eDest != int32(10) && _eDest != int32(13) && _eDest != int32(9) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117281), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99276)))
crt.X__builtin_abort(tls)
}
}()
_31:
- _nResultCol = _sqlite3ExprCodeExprList(tls, _pParse, _pEList, _regResult, i32(0), _7_ecelFlags)
+ _nResultCol = _sqlite3ExprCodeExprList(tls, _pParse, _pEList, _regResult, int32(0), _7_ecelFlags)
_23:
if _hasDistinct == 0 {
goto _42
}
- switch int32(_pDistinct.X1) {
- case i32(1):
+ switch int32(_pDistinct.XeTnctType) {
+ case int32(1):
goto _45
- case i32(2):
+ case int32(2):
goto _44
default:
goto _46
}
_44:
- _15_regPrev = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _nResultCol
- sink1(*p)
- }
- _sqlite3VdbeChangeToNoop(tls, _v, _pDistinct.X3)
- _15_pOp = _sqlite3VdbeGetOp(tls, _v, _pDistinct.X3)
- *(*uint8)(unsafe.Pointer(&(_15_pOp.X0))) = uint8(i32(59))
- *(*int32)(unsafe.Pointer(&(_15_pOp.X3))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_15_pOp.X4))) = _15_regPrev
+ _15_regPrev = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _nResultCol
+ _sqlite3VdbeChangeToNoop(tls, _v, _pDistinct.XaddrTnct)
+ _15_pOp = _sqlite3VdbeGetOp(tls, _v, _pDistinct.XaddrTnct)
+ _15_pOp.Xopcode = uint8(59)
+ _15_pOp.Xp1 = int32(1)
+ _15_pOp.Xp2 = _15_regPrev
_15_iJump = _sqlite3VdbeCurrentAddr(tls, _v) + _nResultCol
- _i = i32(0)
+ _i = int32(0)
_47:
if _i >= _nResultCol {
goto _50
}
- _16_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))+20*uintptr(_i))).X0))
- if _i < (_nResultCol - i32(1)) {
- _sqlite3VdbeAddOp3(tls, _v, i32(77), _regResult+_i, _15_iJump, _15_regPrev+_i)
+ _16_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XpExpr))
+ if _i < (_nResultCol - int32(1)) {
+ _sqlite3VdbeAddOp3(tls, _v, int32(77), _regResult+_i, _15_iJump, _15_regPrev+_i)
goto _52
}
- _sqlite3VdbeAddOp3(tls, _v, i32(78), _regResult+_i, _iContinue, _15_regPrev+_i)
+ _sqlite3VdbeAddOp3(tls, _v, int32(78), _regResult+_i, _iContinue, _15_regPrev+_i)
_52:
- _sqlite3VdbeChangeP4(tls, _v, i32(-1), (*int8)(unsafe.Pointer(_16_pColl)), i32(-3))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(128)))
+ _sqlite3VdbeChangeP4(tls, _v, int32(-1), (*int8)(unsafe.Pointer(_16_pColl)), int32(-3))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(128))
_i += 1
goto _47
_50:
func() {
- if _sqlite3VdbeCurrentAddr(tls, _v) != _15_iJump && ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117327), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99326)))
+ if _sqlite3VdbeCurrentAddr(tls, _v) != _15_iJump && ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117327), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99354)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp3(tls, _v, i32(64), _regResult, _15_regPrev, _nResultCol-i32(1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(64), _regResult, _15_regPrev, _nResultCol-int32(1))
goto _56
_45:
- _sqlite3VdbeChangeToNoop(tls, _v, _pDistinct.X3)
+ _sqlite3VdbeChangeToNoop(tls, _v, _pDistinct.XaddrTnct)
goto _56
_46:
func() {
- if int32(_pDistinct.X1) != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117338), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99387)))
+ if int32(_pDistinct.XeTnctType) != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117338), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99415)))
crt.X__builtin_abort(tls)
}
}()
- _codeDistinct(tls, _pParse, _pDistinct.X2, _iContinue, _nResultCol, _regResult)
+ _codeDistinct(tls, _pParse, _pDistinct.XtabTnct, _iContinue, _nResultCol, _regResult)
goto _56
_56:
if _pSort == nil {
- _codeOffset(tls, _v, _p.X5, _iContinue)
+ _codeOffset(tls, _v, _p.XiOffset, _iContinue)
}
_42:
switch _eDest {
- case i32(1):
+ case int32(1):
goto _61
- case i32(2):
+ case int32(2):
goto _62
- case i32(3):
+ case int32(3):
goto _68
- case i32(5):
+ case int32(5):
goto _63
- case i32(6):
+ case int32(6):
goto _63
- case i32(7):
+ case int32(7):
goto _72
- case i32(8):
+ case int32(8):
goto _72
- case i32(9):
+ case int32(9):
goto _70
- case i32(10):
+ case int32(10):
goto _69
- case i32(11):
+ case int32(11):
goto _67
- case i32(12):
+ case int32(12):
goto _63
- case i32(13):
+ case int32(13):
goto _70
- case i32(14):
+ case int32(14):
goto _63
default:
goto _74
@@ -77889,38 +78946,38 @@ _42:
_61:
_23_r1 = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _regResult, _nResultCol, _23_r1)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _iParm, _23_r1, _regResult, _nResultCol)
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _regResult, _nResultCol, _23_r1)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _iParm, _23_r1, _regResult, _nResultCol)
_sqlite3ReleaseTempReg(tls, _pParse, _23_r1)
goto _75
_62:
- _sqlite3VdbeAddOp3(tls, _v, i32(129), _iParm, _regResult, _nResultCol)
+ _sqlite3VdbeAddOp3(tls, _v, int32(129), _iParm, _regResult, _nResultCol)
goto _75
_63:
- _25_r1 = _sqlite3GetTempRange(tls, _pParse, _nPrefixReg+i32(1))
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _regResult, _nResultCol, _25_r1+_nPrefixReg)
- if _eDest == i32(6) {
- _26_addr = _sqlite3VdbeCurrentAddr(tls, _v) + i32(4)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(30), _iParm+i32(1), _26_addr, _25_r1, i32(0))
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _iParm+i32(1), _25_r1, _regResult, _nResultCol)
+ _25_r1 = _sqlite3GetTempRange(tls, _pParse, _nPrefixReg+int32(1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _regResult, _nResultCol, _25_r1+_nPrefixReg)
+ if _eDest == int32(6) {
+ _26_addr = _sqlite3VdbeCurrentAddr(tls, _v) + int32(4)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(30), _iParm+int32(1), _26_addr, _25_r1, int32(0))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _iParm+int32(1), _25_r1, _regResult, _nResultCol)
func() {
if _pSort != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117396), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99434)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117396), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99462)))
crt.X__builtin_abort(tls)
}
}()
}
if _pSort != nil {
- _pushOntoSorter(tls, _pParse, _pSort, _p, _25_r1+_nPrefixReg, _regResult, i32(1), _nPrefixReg)
+ _pushOntoSorter(tls, _pParse, _pSort, _p, _25_r1+_nPrefixReg, _regResult, int32(1), _nPrefixReg)
goto _80
}
_28_r2 = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp2(tls, _v, i32(117), _iParm, _28_r2)
- _sqlite3VdbeAddOp3(tls, _v, i32(118), _iParm, _25_r1, _28_r2)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(8)))
+ _sqlite3VdbeAddOp2(tls, _v, int32(117), _iParm, _28_r2)
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), _iParm, _25_r1, _28_r2)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(8))
_sqlite3ReleaseTempReg(tls, _pParse, _28_r2)
_80:
- _sqlite3ReleaseTempRange(tls, _pParse, _25_r1, _nPrefixReg+i32(1))
+ _sqlite3ReleaseTempRange(tls, _pParse, _25_r1, _nPrefixReg+int32(1))
goto _75
_67:
if _pSort != nil {
@@ -77929,25 +78986,25 @@ _67:
}
_31_r1 = _sqlite3GetTempReg(tls, _pParse)
func() {
- if _sqlite3Strlen30(tls, _pDest.X1) != _nResultCol {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117427), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99443)))
+ if _sqlite3Strlen30(tls, _pDest.XzAffSdst) != _nResultCol {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117427), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99471)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _regResult, _nResultCol, _31_r1, _pDest.X1, _nResultCol)
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _regResult, _nResultCol, _31_r1, _pDest.XzAffSdst, _nResultCol)
_sqlite3ExprCacheAffinityChange(tls, _pParse, _regResult, _nResultCol)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _iParm, _31_r1, _regResult, _nResultCol)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _iParm, _31_r1, _regResult, _nResultCol)
_sqlite3ReleaseTempReg(tls, _pParse, _31_r1)
_82:
goto _75
_68:
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(1), _iParm)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(1), _iParm)
goto _75
_69:
if _pSort != nil {
func() {
- if _nResultCol > (_pDest.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117451), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99488)))
+ if _nResultCol > _pDest.XnSdst {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117451), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99516)))
crt.X__builtin_abort(tls)
}
}()
@@ -77955,14 +79012,14 @@ _69:
goto _88
}
func() {
- if _nResultCol != (_pDest.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117455), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99513)))
+ if _nResultCol != _pDest.XnSdst {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117455), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99541)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _regResult != _iParm {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117456), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99538)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117456), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99566)))
crt.X__builtin_abort(tls)
}
}()
@@ -77973,87 +79030,90 @@ _70:
_pushOntoSorter(tls, _pParse, _pSort, _p, _regResult, _regOrig, _nResultCol, _nPrefixReg)
goto _96
}
- if _eDest == i32(13) {
- _sqlite3VdbeAddOp1(tls, _v, i32(16), _pDest.X2)
+ if _eDest == int32(13) {
+ _sqlite3VdbeAddOp1(tls, _v, int32(16), _pDest.XiSDParm)
goto _96
}
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _regResult, _nResultCol)
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _regResult, _nResultCol)
_sqlite3ExprCacheAffinityChange(tls, _pParse, _regResult, _nResultCol)
_96:
goto _75
_72:
- _40_addrTest = i32(0)
- _40_pSO = (*XExprList)(_pDest.X5)
+ _40_addrTest = int32(0)
+ _40_pSO = (*XExprList)(_pDest.XpOrderBy)
func() {
if _40_pSO == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117493), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99555)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117493), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99583)))
crt.X__builtin_abort(tls)
}
}()
- _40_nKey = _40_pSO.X0
+ _40_nKey = _40_pSO.XnExpr
_40_r1 = _sqlite3GetTempReg(tls, _pParse)
- _40_r2 = _sqlite3GetTempRange(tls, _pParse, _40_nKey+i32(2))
- _40_r3 = (_40_r2 + _40_nKey) + i32(1)
- if _eDest == i32(8) {
- _40_addrTest = _sqlite3VdbeAddOp4Int(tls, _v, i32(30), _iParm+i32(1), i32(0), _regResult, _nResultCol)
+ _40_r2 = _sqlite3GetTempRange(tls, _pParse, _40_nKey+int32(2))
+ _40_r3 = (_40_r2 + _40_nKey) + int32(1)
+ if _eDest == int32(8) {
+ _40_addrTest = _sqlite3VdbeAddOp4Int(tls, _v, int32(30), _iParm+int32(1), int32(0), _regResult, _nResultCol)
}
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _regResult, _nResultCol, _40_r3)
- if _eDest == i32(8) {
- _sqlite3VdbeAddOp2(tls, _v, i32(128), _iParm+i32(1), _40_r3)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(16)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _regResult, _nResultCol, _40_r3)
+ if _eDest == int32(8) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(128), _iParm+int32(1), _40_r3)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(16))
}
- _i = i32(0)
+ _i = int32(0)
_101:
if _i >= _40_nKey {
goto _104
}
- _sqlite3VdbeAddOp2(tls, _v, i32(65), (_regResult+int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_40_pSO.X2)))))+20*uintptr(_i))).X5))))).X0))-i32(1), _40_r2+_i)
+ _sqlite3VdbeAddOp2(tls, _v, int32(65), (_regResult+int32((*t71)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&_40_pSO.Xa)), uintptr(_i)).Xu))).XiOrderByCol))-int32(1), _40_r2+_i)
_i += 1
goto _101
_104:
- _sqlite3VdbeAddOp2(tls, _v, i32(116), _iParm, _40_r2+_40_nKey)
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _40_r2, _40_nKey+i32(2), _40_r1)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _iParm, _40_r1, _40_r2, _40_nKey+i32(2))
+ _sqlite3VdbeAddOp2(tls, _v, int32(116), _iParm, _40_r2+_40_nKey)
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _40_r2, _40_nKey+int32(2), _40_r1)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _iParm, _40_r1, _40_r2, _40_nKey+int32(2))
if _40_addrTest != 0 {
_sqlite3VdbeJumpHere(tls, _v, _40_addrTest)
}
_sqlite3ReleaseTempReg(tls, _pParse, _40_r1)
- _sqlite3ReleaseTempRange(tls, _pParse, _40_r2, _40_nKey+i32(2))
+ _sqlite3ReleaseTempRange(tls, _pParse, _40_r2, _40_nKey+int32(2))
goto _75
_74:
func() {
- if _eDest != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117535), unsafe.Pointer((*int8)(unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000))), unsafe.Pointer(str(99559)))
+ if _eDest != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117535), unsafe.Pointer(&_selectInnerLoopØ00__func__Ø000), unsafe.Pointer(str(99587)))
crt.X__builtin_abort(tls)
}
}()
goto _75
_75:
- if (_pSort == nil) && (_p.X4) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(48), _p.X4, _iBreak)
+ if (_pSort == nil) && _p.XiLimit != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(48), _p.XiLimit, _iBreak)
}
}
var _selectInnerLoopØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_selectInnerLoopØ00__func__Ø000[0], str(99578), 16)
-}
-
-// Generate code that pushes the value of every element of the given
-// expression list into a sequence of registers beginning at target.
-//
-// Return the number of elements evaluated.
-//
-// The SQLITE_ECEL_DUP flag prevents the arguments from being
-// filled using OP_SCopy. OP_Copy must be used instead.
-//
-// The SQLITE_ECEL_FACTOR argument allows constant arguments to be
-// factored out into initialization code.
-//
-// The SQLITE_ECEL_REF flag means that expressions in the list with
-// ExprList.a[].u.x.iOrderByCol>0 have already been evaluated and stored
-// in registers at srcReg, and so the value can be copied from there.
+ crt.Xstrncpy(nil, &_selectInnerLoopØ00__func__Ø000[0], str(99606), 16)
+}
+
+// C comment
+// /*
+// ** Generate code that pushes the value of every element of the given
+// ** expression list into a sequence of registers beginning at target.
+// **
+// ** Return the number of elements evaluated.
+// **
+// ** The SQLITE_ECEL_DUP flag prevents the arguments from being
+// ** filled using OP_SCopy. OP_Copy must be used instead.
+// **
+// ** The SQLITE_ECEL_FACTOR argument allows constant arguments to be
+// ** factored out into initialization code.
+// **
+// ** The SQLITE_ECEL_REF flag means that expressions in the list with
+// ** ExprList.a[].u.x.iOrderByCol>0 have already been evaluated and stored
+// ** in registers at srcReg, and so the value can be copied from there.
+// */
func _sqlite3ExprCodeExprList(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _target int32, _srcReg int32, _flags uint8) (r0 int32) {
var _i, _j, _n, _6_inReg int32
var _copyOp uint8
@@ -78062,60 +79122,56 @@ func _sqlite3ExprCodeExprList(tls *crt.TLS, _pParse *XParse, _pList *XExprList,
var _1_pExpr *XExpr
var _7_pOp *XVdbeOp
_copyOp = uint8(func() int32 {
- if (int32(_flags) & i32(1)) != 0 {
- return i32(64)
+ if (int32(_flags) & int32(1)) != 0 {
+ return int32(64)
}
- return i32(65)
+ return int32(65)
}())
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
if _pList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95149), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeExprListØ00__func__Ø000))), unsafe.Pointer(str(90087)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95149), unsafe.Pointer(&_sqlite3ExprCodeExprListØ00__func__Ø000), unsafe.Pointer(str(88609)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _target <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95150), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeExprListØ00__func__Ø000))), unsafe.Pointer(str(99594)))
+ if _target <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95150), unsafe.Pointer(&_sqlite3ExprCodeExprListØ00__func__Ø000), unsafe.Pointer(str(99622)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*TVdbe)(_pParse.X2) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95151), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeExprListØ00__func__Ø000))), unsafe.Pointer(str(99603)))
+ if (*TVdbe)(_pParse.XpVdbe) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95151), unsafe.Pointer(&_sqlite3ExprCodeExprListØ00__func__Ø000), unsafe.Pointer(str(99631)))
crt.X__builtin_abort(tls)
}
}()
- _n = _pList.X0
- if (_pParse.X11) == 0 {
+ _n = _pList.XnExpr
+ if _pParse.XokConstFactor == 0 {
{
p := &_flags
- *p = uint8(int32(*p) & i32(-3))
- sink2(*p)
+ *p = uint8(int32(*p) & int32(-3))
}
}
- *func() *int32 {
- _pItem = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))
- return &_i
- }() = i32(0)
+ *func() *int32 { _pItem = (*TExprList_item)(unsafe.Pointer(&_pList.Xa)); return &_i }() = int32(0)
_9:
if _i >= _n {
goto _12
}
- _1_pExpr = (*XExpr)(_pItem.X0)
- if (int32(_flags)&i32(4)) == i32(0) || store1(&_j, int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_pItem.X5))))).X0)) <= i32(0) {
+ _1_pExpr = (*XExpr)(_pItem.XpExpr)
+ if (int32(_flags)&int32(4)) == int32(0) || store2(&_j, int32((*t71)(unsafe.Pointer(&_pItem.Xu)).XiOrderByCol)) <= int32(0) {
goto _14
}
- if (int32(_flags) & i32(8)) != 0 {
+ if (int32(_flags) & int32(8)) != 0 {
_i -= 1
_n -= 1
goto _16
}
- _sqlite3VdbeAddOp2(tls, _v, int32(_copyOp), (_j+_srcReg)-i32(1), _target+_i)
+ _sqlite3VdbeAddOp2(tls, _v, int32(_copyOp), (_j+_srcReg)-int32(1), _target+_i)
_16:
goto _20
_14:
- if ((int32(_flags) & i32(2)) != i32(0)) && _sqlite3ExprIsConstant(tls, _1_pExpr) != 0 {
+ if ((int32(_flags) & int32(2)) != int32(0)) && _sqlite3ExprIsConstant(tls, _1_pExpr) != 0 {
_sqlite3ExprCodeAtInit(tls, _pParse, _1_pExpr, _target+_i)
goto _20
}
@@ -78123,8 +79179,8 @@ _14:
if _6_inReg == (_target + _i) {
goto _21
}
- if (((int32(_copyOp) == i32(64)) && (int32(store40(&_7_pOp, _sqlite3VdbeGetOp(tls, _v, i32(-1))).X0) == i32(64))) && ((((_7_pOp.X3) + (_7_pOp.X5)) + i32(1)) == _6_inReg)) && ((((_7_pOp.X4) + (_7_pOp.X5)) + i32(1)) == (_target + _i)) {
- *(*int32)(unsafe.Pointer(&(_7_pOp.X5))) += 1
+ if (((int32(_copyOp) == int32(64)) && (int32(store61(&_7_pOp, _sqlite3VdbeGetOp(tls, _v, int32(-1))).Xopcode) == int32(64))) && (((_7_pOp.Xp1 + _7_pOp.Xp3) + int32(1)) == _6_inReg)) && (((_7_pOp.Xp2 + _7_pOp.Xp3) + int32(1)) == (_target + _i)) {
+ _7_pOp.Xp3 += 1
goto _26
}
_sqlite3VdbeAddOp2(tls, _v, int32(_copyOp), _6_inReg, _target+_i)
@@ -78140,465 +79196,472 @@ _12:
var _sqlite3ExprCodeExprListØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCodeExprListØ00__func__Ø000[0], str(99620), 24)
+ crt.Xstrncpy(nil, &_sqlite3ExprCodeExprListØ00__func__Ø000[0], str(99648), 24)
}
-// Walk an expression tree. Return non-zero if the expression is constant
-// and 0 if it involves variables or function calls.
-//
-// For the purposes of this function, a double-quoted string (ex: "abc")
-// is considered a variable but a single-quoted string (ex: 'abc') is
-// a constant.
+// C comment
+// /*
+// ** Walk an expression tree. Return non-zero if the expression is constant
+// ** and 0 if it involves variables or function calls.
+// **
+// ** For the purposes of this function, a double-quoted string (ex: "abc")
+// ** is considered a variable but a single-quoted string (ex: 'abc') is
+// ** a constant.
+// */
func _sqlite3ExprIsConstant(tls *crt.TLS, _p *XExpr) (r0 int32) {
- return _exprIsConst(tls, _p, i32(1), i32(0))
+ return _exprIsConst(tls, _p, int32(1), int32(0))
}
func _exprIsConst(tls *crt.TLS, _p *XExpr, _initFlag int32, _iCur int32) (r0 int32) {
var _w XWalker
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*uint8)(unsafe.Pointer(&(_w.X5))) = uint8(_initFlag)
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _exprNodeIsConstant
- *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X2))))) = _selectNodeIsConstant
- *(*int32)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_w.X6))))) = _iCur
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ _w.XeCode = uint8(_initFlag)
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _exprNodeIsConstant
+ *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&_w.XxSelectCallback)) = _selectNodeIsConstant
+ *(*int32)(unsafe.Pointer(&_w.Xu)) = _iCur
_sqlite3WalkExpr(tls, &_w, _p)
- return int32(_w.X5)
-
- _ = _w
- panic(0)
-}
-
-// These routines are Walker callbacks used to check expressions to
-// see if they are "constant" for some definition of constant. The
-// Walker.eCode value determines the type of "constant" we are looking
-// for.
-//
-// These callback routines are used to implement the following:
-//
-// sqlite3ExprIsConstant() pWalker->eCode==1
-// sqlite3ExprIsConstantNotJoin() pWalker->eCode==2
-// sqlite3ExprIsTableConstant() pWalker->eCode==3
-// sqlite3ExprIsConstantOrFunction() pWalker->eCode==4 or 5
-//
-// In all cases, the callbacks set Walker.eCode=0 and abort if the expression
-// is found to not be a constant.
-//
-// The sqlite3ExprIsConstantOrFunction() is used for evaluating expressions
-// in a CREATE TABLE statement. The Walker.eCode value is 5 when parsing
-// an existing schema and 4 when processing a new statement. A bound
-// parameter raises an error for new statements, but is silently converted
-// to NULL for existing schemas. This allows sqlite_master tables that
-// contain a bound parameter because they were generated by older versions
-// of SQLite to be parsed by newer versions of SQLite without raising a
-// malformed schema error.
+ return int32(_w.XeCode)
+}
+
+// C comment
+// /*
+// ** These routines are Walker callbacks used to check expressions to
+// ** see if they are "constant" for some definition of constant. The
+// ** Walker.eCode value determines the type of "constant" we are looking
+// ** for.
+// **
+// ** These callback routines are used to implement the following:
+// **
+// ** sqlite3ExprIsConstant() pWalker->eCode==1
+// ** sqlite3ExprIsConstantNotJoin() pWalker->eCode==2
+// ** sqlite3ExprIsTableConstant() pWalker->eCode==3
+// ** sqlite3ExprIsConstantOrFunction() pWalker->eCode==4 or 5
+// **
+// ** In all cases, the callbacks set Walker.eCode=0 and abort if the expression
+// ** is found to not be a constant.
+// **
+// ** The sqlite3ExprIsConstantOrFunction() is used for evaluating expressions
+// ** in a CREATE TABLE statement. The Walker.eCode value is 5 when parsing
+// ** an existing schema and 4 when processing a new statement. A bound
+// ** parameter raises an error for new statements, but is silently converted
+// ** to NULL for existing schemas. This allows sqlite_master tables that
+// ** contain a bound parameter because they were generated by older versions
+// ** of SQLite to be parsed by newer versions of SQLite without raising a
+// ** malformed schema error.
+// */
func _exprNodeIsConstant(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
- if (int32(_pWalker.X5) == i32(2)) && (((_pExpr.X2) & uint32(i32(1))) != uint32(i32(0))) {
- *(*uint8)(unsafe.Pointer(&(_pWalker.X5))) = uint8(i32(0))
- return i32(2)
+ if (int32(_pWalker.XeCode) == int32(2)) && ((_pExpr.Xflags & uint32(1)) != (0)) {
+ _pWalker.XeCode = 0
+ return int32(2)
}
- switch int32(_pExpr.X0) {
- case i32(27):
+ switch int32(_pExpr.Xop) {
+ case int32(27):
goto _4
- case i32(135):
+ case int32(135):
goto _9
- case i32(151):
+ case int32(151):
goto _3
- case i32(152):
+ case int32(152):
goto _4
- case i32(153):
+ case int32(153):
goto _4
- case i32(154):
+ case int32(154):
goto _4
- case i32(160):
+ case int32(160):
goto _15
default:
goto _18
}
_3:
- if (int32(_pWalker.X5) >= i32(4)) || (((_pExpr.X2) & uint32(i32(524288))) != uint32(i32(0))) {
- return i32(0)
+ if (int32(_pWalker.XeCode) >= int32(4)) || ((_pExpr.Xflags & uint32(524288)) != (0)) {
+ return int32(0)
}
- *(*uint8)(unsafe.Pointer(&(_pWalker.X5))) = uint8(i32(0))
- return i32(2)
+ _pWalker.XeCode = 0
+ return int32(2)
_4:
- if (int32(_pWalker.X5) == i32(3)) && ((_pExpr.X8) == (*(*int32)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6))))))) {
- return i32(0)
+ if (int32(_pWalker.XeCode) == int32(3)) && (_pExpr.XiTable == (*(*int32)(unsafe.Pointer(&_pWalker.Xu)))) {
+ return int32(0)
}
_15:
- *(*uint8)(unsafe.Pointer(&(_pWalker.X5))) = uint8(i32(0))
- return i32(2)
+ _pWalker.XeCode = 0
+ return int32(2)
_9:
- if int32(_pWalker.X5) == i32(5) {
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(101))
+ if int32(_pWalker.XeCode) == int32(5) {
+ _pExpr.Xop = uint8(101)
goto _18
}
- if int32(_pWalker.X5) == i32(4) {
- *(*uint8)(unsafe.Pointer(&(_pWalker.X5))) = uint8(i32(0))
- return i32(2)
+ if int32(_pWalker.XeCode) == int32(4) {
+ _pWalker.XeCode = 0
+ return int32(2)
}
_18:
- return i32(0)
+ return int32(0)
}
func _selectNodeIsConstant(tls *crt.TLS, _pWalker *XWalker, _NotUsed *XSelect) (r0 int32) {
- *(*uint8)(unsafe.Pointer(&(_pWalker.X5))) = uint8(i32(0))
- return i32(2)
-}
-
-// Factor out the code of the given expression to initialization time.
-//
-// If regDest>=0 then the result is always stored in that register and the
-// result is not reusable. If regDest<0 then this routine is free to
-// store the value whereever it wants. The register where the expression
-// is stored is returned. When regDest<0, two identical expressions will
-// code to the same register.
+ _pWalker.XeCode = 0
+ return int32(2)
+}
+
+// C comment
+// /*
+// ** Factor out the code of the given expression to initialization time.
+// **
+// ** If regDest>=0 then the result is always stored in that register and the
+// ** result is not reusable. If regDest<0 then this routine is free to
+// ** store the value whereever it wants. The register where the expression
+// ** is stored is returned. When regDest<0, two identical expressions will
+// ** code to the same register.
+// */
func _sqlite3ExprCodeAtInit(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _regDest int32) (r0 int32) {
var _1_i int32
var _p *XExprList
var _1_pItem, _4_pItem *TExprList_item
func() {
- if (_pParse.X11) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94994), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeAtInitØ00__func__Ø000))), unsafe.Pointer(str(99644)))
+ if _pParse.XokConstFactor == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94994), unsafe.Pointer(&_sqlite3ExprCodeAtInitØ00__func__Ø000), unsafe.Pointer(str(99672)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*XExprList)(_pParse.X27)
- if _regDest >= i32(0) || _p == nil {
+ _p = (*XExprList)(_pParse.XpConstExpr)
+ if _regDest >= int32(0) || _p == nil {
goto _3
}
- *func() *int32 {
- _1_pItem = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_p.X2)))))
- return &_1_i
- }() = _p.X0
+ *func() *int32 { _1_pItem = (*TExprList_item)(unsafe.Pointer(&_p.Xa)); return &_1_i }() = _p.XnExpr
_4:
- if _1_i <= i32(0) {
+ if _1_i <= int32(0) {
goto _7
}
- if (((uint32((_1_pItem.X4)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0) && (_sqlite3ExprCompare(tls, (*XExpr)(_1_pItem.X0), _pExpr, i32(-1)) == i32(0)) {
- return *(*int32)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_1_pItem.X5)))))
+ if (((uint32(_1_pItem.Xdone>>2) << 31) >> 31) != 0) && (_sqlite3ExprCompare(tls, (*XExpr)(_1_pItem.XpExpr), _pExpr, int32(-1)) == int32(0)) {
+ return *(*int32)(unsafe.Pointer(&_1_pItem.Xu))
}
*func() *int32 { *(*uintptr)(unsafe.Pointer(&_1_pItem)) += uintptr(20); return &_1_i }() -= 1
goto _4
_7:
_3:
- _pExpr = _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.X0), _pExpr, i32(0))
+ _pExpr = _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.Xdb), _pExpr, int32(0))
_p = _sqlite3ExprListAppend(tls, _pParse, _p, _pExpr)
if _p == nil {
goto _10
}
- _4_pItem = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_p.X2))))) + 20*uintptr((_p.X0)-i32(1))))
- storebits3((*int8)(unsafe.Pointer(&(_4_pItem.X4))), int8(bool2int(_regDest < i32(0))), 4, 2)
- if _regDest < i32(0) {
- _regDest = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ _4_pItem = elem57((*TExprList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_p.XnExpr-int32(1)))
+ storebits5(&_4_pItem.Xdone, int8(bool2int(_regDest < int32(0))), 4, 2)
+ if _regDest < int32(0) {
+ _regDest = preInc2(&_pParse.XnMem, 1)
}
- *(*int32)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_4_pItem.X5))))) = _regDest
+ *(*int32)(unsafe.Pointer(&_4_pItem.Xu)) = _regDest
_10:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X27))))) = _p
+ *(**XExprList)(unsafe.Pointer(&_pParse.XpConstExpr)) = _p
return _regDest
}
var _sqlite3ExprCodeAtInitØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCodeAtInitØ00__func__Ø000[0], str(99666), 22)
+ crt.Xstrncpy(nil, &_sqlite3ExprCodeAtInitØ00__func__Ø000[0], str(99694), 22)
}
-// Change the opcode at addr into OP_Noop
+// C comment
+// /*
+// ** Change the opcode at addr into OP_Noop
+// */
func _sqlite3VdbeChangeToNoop(tls *crt.TLS, _p *TVdbe, _addr int32) (r0 int32) {
var _pOp *XVdbeOp
- if ((*Xsqlite3)(_p.X0).X17) != 0 {
- return i32(0)
+ if ((*Xsqlite3)(_p.Xdb).XmallocFailed) != 0 {
+ return int32(0)
}
func() {
- if _addr < i32(0) || _addr >= (_p.X27) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72328), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeChangeToNoopØ00__func__Ø000))), unsafe.Pointer(str(99688)))
+ if _addr < int32(0) || _addr >= _p.XnOp {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72328), unsafe.Pointer(&_sqlite3VdbeChangeToNoopØ00__func__Ø000), unsafe.Pointer(str(99716)))
crt.X__builtin_abort(tls)
}
}()
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr(_addr)))
- _freeP4(tls, (*Xsqlite3)(_p.X0), int32(_pOp.X1), *(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(0))
- *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))) = nil
- *(*uint8)(unsafe.Pointer(&(_pOp.X0))) = uint8(i32(164))
- return i32(1)
+ _pOp = elem61((*XVdbeOp)(_p.XaOp), uintptr(_addr))
+ _freeP4(tls, (*Xsqlite3)(_p.Xdb), int32(_pOp.Xp4type), *(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
+ _pOp.Xp4type = 0
+ *(**int8)(unsafe.Pointer(&_pOp.Xp4)) = nil
+ _pOp.Xopcode = uint8(164)
+ return int32(1)
}
var _sqlite3VdbeChangeToNoopØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeChangeToNoopØ00__func__Ø000[0], str(99711), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeChangeToNoopØ00__func__Ø000[0], str(99739), 24)
}
-// Return the address of the next instruction to be inserted.
+// C comment
+// /*
+// ** Return the address of the next instruction to be inserted.
+// */
func _sqlite3VdbeCurrentAddr(tls *crt.TLS, _p *TVdbe) (r0 int32) {
func() {
- if (_p.X5) != uint32(i32(381479589)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72061), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeCurrentAddrØ00__func__Ø000))), unsafe.Pointer(str(37642)))
+ if _p.Xmagic != uint32(381479589) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72061), unsafe.Pointer(&_sqlite3VdbeCurrentAddrØ00__func__Ø000), unsafe.Pointer(str(37597)))
crt.X__builtin_abort(tls)
}
}()
- return _p.X27
+ return _p.XnOp
}
var _sqlite3VdbeCurrentAddrØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeCurrentAddrØ00__func__Ø000[0], str(99735), 23)
+ crt.Xstrncpy(nil, &_sqlite3VdbeCurrentAddrØ00__func__Ø000[0], str(99763), 23)
}
-// Add code that will check to make sure the N registers starting at iMem
-// form a distinct entry. iTab is a sorting index that holds previously
-// seen combinations of the N values. A new entry is made in iTab
-// if the current N values are new.
-//
-// A jump to addrRepeat is made and the N+1 values are popped from the
-// stack if the top N elements are not distinct.
+// C comment
+// /*
+// ** Add code that will check to make sure the N registers starting at iMem
+// ** form a distinct entry. iTab is a sorting index that holds previously
+// ** seen combinations of the N values. A new entry is made in iTab
+// ** if the current N values are new.
+// **
+// ** A jump to addrRepeat is made and the N+1 values are popped from the
+// ** stack if the top N elements are not distinct.
+// */
func _codeDistinct(tls *crt.TLS, _pParse *XParse, _iTab int32, _addrRepeat int32, _N int32, _iMem int32) {
var _r1 int32
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
_r1 = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(30), _iTab, _addrRepeat, _iMem, _N)
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _iMem, _N, _r1)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _iTab, _r1, _iMem, _N)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(16)))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(30), _iTab, _addrRepeat, _iMem, _N)
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _iMem, _N, _r1)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _iTab, _r1, _iMem, _N)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(16))
_sqlite3ReleaseTempReg(tls, _pParse, _r1)
}
-// Allocate a single new register for use to hold some intermediate result.
+// C comment
+// /*
+// ** Allocate a single new register for use to hold some intermediate result.
+// */
func _sqlite3GetTempReg(tls *crt.TLS, _pParse *XParse) (r0 int32) {
- if int32(_pParse.X7) == i32(0) {
- return preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ if int32(_pParse.XnTempReg) == int32(0) {
+ return preInc2(&_pParse.XnMem, 1)
}
- return *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[8]int32)(unsafe.Pointer(&(_pParse.X49))))) + 4*uintptr(preInc2((*uint8)(unsafe.Pointer(&(_pParse.X7))), byte(255)))))
+ return *elem8((*int32)(unsafe.Pointer(&_pParse.XaTempReg)), uintptr(preInc3(&_pParse.XnTempReg, byte(255))))
}
-// Deallocate a register, making available for reuse for some other
-// purpose.
-//
-// If a register is currently being used by the column cache, then
-// the deallocation is deferred until the column cache line that uses
-// the register becomes stale.
+// C comment
+// /*
+// ** Deallocate a register, making available for reuse for some other
+// ** purpose.
+// **
+// ** If a register is currently being used by the column cache, then
+// ** the deallocation is deferred until the column cache line that uses
+// ** the register becomes stale.
+// */
func _sqlite3ReleaseTempReg(tls *crt.TLS, _pParse *XParse, _iReg int32) {
var _1_i int32
var _1_p *TyColCache
- if _iReg == 0 || int32(_pParse.X7) >= i32(8) {
+ if _iReg == 0 || int32(_pParse.XnTempReg) >= int32(8) {
goto _1
}
- *func() **TyColCache { _1_i = i32(0); return &_1_p }() = (*TyColCache)(unsafe.Pointer((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48)))))
+ *func() **TyColCache { _1_i = int32(0); return &_1_p }() = (*TyColCache)(unsafe.Pointer(&_pParse.XaColCache))
_2:
- if _1_i >= int32(_pParse.X13) {
+ if _1_i >= int32(_pParse.XnColCache) {
goto _5
}
- if (_1_p.X4) == _iReg {
- *(*uint8)(unsafe.Pointer(&(_1_p.X2))) = uint8(i32(1))
+ if _1_p.XiReg == _iReg {
+ _1_p.XtempReg = uint8(1)
return
}
*(*uintptr)(unsafe.Pointer(func() **TyColCache { _1_i += 1; return &_1_p }())) += uintptr(20)
goto _2
_5:
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[8]int32)(unsafe.Pointer(&(_pParse.X49))))) + 4*uintptr(postInc2((*uint8)(unsafe.Pointer(&(_pParse.X7))), uint8(1))))) = _iReg
+ *elem8((*int32)(unsafe.Pointer(&_pParse.XaTempReg)), uintptr(postInc3(&_pParse.XnTempReg, byte(1)))) = _iReg
_1:
}
-// Allocate or deallocate a block of nReg consecutive registers.
+// C comment
+// /*
+// ** Allocate or deallocate a block of nReg consecutive registers.
+// */
func _sqlite3GetTempRange(tls *crt.TLS, _pParse *XParse, _nReg int32) (r0 int32) {
var _i, _n int32
- if _nReg == i32(1) {
+ if _nReg == int32(1) {
return _sqlite3GetTempReg(tls, _pParse)
}
- _i = _pParse.X15
- _n = _pParse.X14
+ _i = _pParse.XiRangeReg
+ _n = _pParse.XnRangeReg
if _nReg <= _n {
func() {
- if _usedAsColumnCache(tls, _pParse, _i, (_i+_n)-i32(1)) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96056), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GetTempRangeØ00__func__Ø000))), unsafe.Pointer(str(99758)))
+ if _usedAsColumnCache(tls, _pParse, _i, (_i+_n)-int32(1)) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96056), unsafe.Pointer(&_sqlite3GetTempRangeØ00__func__Ø000), unsafe.Pointer(str(99786)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X15)))
- *p = (*p) + _nReg
- sink1(*p)
- }
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X14)))
- *p = (*p) - _nReg
- sink1(*p)
- }
+ _pParse.XiRangeReg += _nReg
+ _pParse.XnRangeReg -= _nReg
goto _4
}
- _i = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _nReg
- sink1(*p)
- }
+ _i = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _nReg
_4:
return _i
}
-// Return true if any register in the range iFrom..iTo (inclusive)
-// is used as part of the column cache.
-//
-// This routine is used within assert() and testcase() macros only
-// and does not appear in a normal build.
+// C comment
+// /*
+// ** Return true if any register in the range iFrom..iTo (inclusive)
+// ** is used as part of the column cache.
+// **
+// ** This routine is used within assert() and testcase() macros only
+// ** and does not appear in a normal build.
+// */
func _usedAsColumnCache(tls *crt.TLS, _pParse *XParse, _iFrom int32, _iTo int32) (r0 int32) {
var _i, _1_r int32
var _p *TyColCache
- *func() **TyColCache { _i = i32(0); return &_p }() = (*TyColCache)(unsafe.Pointer((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48)))))
+ *func() **TyColCache { _i = int32(0); return &_p }() = (*TyColCache)(unsafe.Pointer(&_pParse.XaColCache))
_0:
- if _i >= int32(_pParse.X13) {
+ if _i >= int32(_pParse.XnColCache) {
goto _3
}
- _1_r = _p.X4
+ _1_r = _p.XiReg
if (_1_r >= _iFrom) && (_1_r <= _iTo) {
- return i32(1)
+ return int32(1)
}
*(*uintptr)(unsafe.Pointer(func() **TyColCache { _i += 1; return &_p }())) += uintptr(20)
goto _0
_3:
- return i32(0)
+ return int32(0)
}
var _sqlite3GetTempRangeØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3GetTempRangeØ00__func__Ø000[0], str(99795), 20)
+ crt.Xstrncpy(nil, &_sqlite3GetTempRangeØ00__func__Ø000[0], str(99823), 20)
}
-// Generate code that will push the record in registers regData
-// through regData+nData-1 onto the sorter.
+// C comment
+// /*
+// ** Generate code that will push the record in registers regData
+// ** through regData+nData-1 onto the sorter.
+// */
func _pushOntoSorter(tls *crt.TLS, _pParse *XParse, _pSort *XSortCtx, _pSelect *XSelect, _regData int32, _regOrigData int32, _nData int32, _nPrefixReg int32) {
var _bSeq, _nExpr, _nBase, _regBase, _regRecord, _nOBSat, _op, _iLimit, _5_regPrevKey, _5_addrFirst, _5_addrJmp, _5_nKey, _11_addr, _11_r1, _13_iBrk int32
var _v *TVdbe
var _5_pKI *XKeyInfo
var _5_pOp *XVdbeOp
- _v = (*TVdbe)(_pParse.X2)
- _bSeq = bool2int((int32(_pSort.X7) & i32(1)) == i32(0))
- _nExpr = (*XExprList)(_pSort.X0).X0
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _bSeq = bool2int((int32(_pSort.XsortFlags) & int32(1)) == int32(0))
+ _nExpr = (*XExprList)(_pSort.XpOrderBy).XnExpr
_nBase = (_nExpr + _bSeq) + _nData
- _regRecord = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _nOBSat = _pSort.X1
+ _regRecord = preInc2(&_pParse.XnMem, 1)
+ _nOBSat = _pSort.XnOBSat
func() {
- if _bSeq != i32(0) && _bSeq != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117043), unsafe.Pointer((*int8)(unsafe.Pointer(&_pushOntoSorterØ00__func__Ø000))), unsafe.Pointer(str(99815)))
+ if _bSeq != int32(0) && _bSeq != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117043), unsafe.Pointer(&_pushOntoSorterØ00__func__Ø000), unsafe.Pointer(str(99843)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nData != i32(1) && _regData != _regOrigData && _regOrigData != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117044), unsafe.Pointer((*int8)(unsafe.Pointer(&_pushOntoSorterØ00__func__Ø000))), unsafe.Pointer(str(99834)))
+ if _nData != int32(1) && _regData != _regOrigData && _regOrigData != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117044), unsafe.Pointer(&_pushOntoSorterØ00__func__Ø000), unsafe.Pointer(str(99862)))
crt.X__builtin_abort(tls)
}
}()
if _nPrefixReg != 0 {
func() {
if _nPrefixReg != (_nExpr + _bSeq) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117046), unsafe.Pointer((*int8)(unsafe.Pointer(&_pushOntoSorterØ00__func__Ø000))), unsafe.Pointer(str(99885)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117046), unsafe.Pointer(&_pushOntoSorterØ00__func__Ø000), unsafe.Pointer(str(99913)))
crt.X__builtin_abort(tls)
}
}()
_regBase = (_regData - _nExpr) - _bSeq
goto _10
}
- _regBase = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _nBase
- sink1(*p)
- }
+ _regBase = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _nBase
_10:
func() {
- if (_pSelect.X5) != i32(0) && (_pSelect.X4) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117052), unsafe.Pointer((*int8)(unsafe.Pointer(&_pushOntoSorterØ00__func__Ø000))), unsafe.Pointer(str(99908)))
+ if _pSelect.XiOffset != int32(0) && _pSelect.XiLimit == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117052), unsafe.Pointer(&_pushOntoSorterØ00__func__Ø000), unsafe.Pointer(str(99936)))
crt.X__builtin_abort(tls)
}
}()
_iLimit = func() int32 {
- if (_pSelect.X5) != 0 {
- return ((_pSelect.X5) + i32(1))
+ if _pSelect.XiOffset != 0 {
+ return (_pSelect.XiOffset + int32(1))
}
- return (_pSelect.X4)
+ return _pSelect.XiLimit
}()
- *(*int32)(unsafe.Pointer(&(_pSort.X6))) = _sqlite3VdbeMakeLabel(tls, _v)
- _sqlite3ExprCodeExprList(tls, _pParse, (*XExprList)(_pSort.X0), _regBase, _regOrigData, uint8(i32(1)|func() int32 {
+ _pSort.XlabelDone = _sqlite3VdbeMakeLabel(tls, _v)
+ _sqlite3ExprCodeExprList(tls, _pParse, (*XExprList)(_pSort.XpOrderBy), _regBase, _regOrigData, uint8(int32(1)|func() int32 {
if _regOrigData != 0 {
- return i32(4)
+ return int32(4)
}
- return i32(0)
+ return int32(0)
}()))
if _bSeq != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(116), _pSort.X2, _regBase+_nExpr)
+ _sqlite3VdbeAddOp2(tls, _v, int32(116), _pSort.XiECursor, _regBase+_nExpr)
}
- if (_nPrefixReg == i32(0)) && (_nData > i32(0)) {
+ if (_nPrefixReg == int32(0)) && (_nData > int32(0)) {
_sqlite3ExprCodeMove(tls, _pParse, _regData, (_regBase+_nExpr)+_bSeq, _nData)
}
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _regBase+_nOBSat, _nBase-_nOBSat, _regRecord)
- if _nOBSat <= i32(0) {
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _regBase+_nOBSat, _nBase-_nOBSat, _regRecord)
+ if _nOBSat <= int32(0) {
goto _21
}
- _5_regPrevKey = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + (_pSort.X1)
- sink1(*p)
- }
- _5_nKey = (_nExpr - (_pSort.X1)) + _bSeq
+ _5_regPrevKey = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _pSort.XnOBSat
+ _5_nKey = (_nExpr - _pSort.XnOBSat) + _bSeq
if _bSeq != 0 {
- _5_addrFirst = _sqlite3VdbeAddOp1(tls, _v, i32(22), _regBase+_nExpr)
+ _5_addrFirst = _sqlite3VdbeAddOp1(tls, _v, int32(22), _regBase+_nExpr)
goto _23
}
- _5_addrFirst = _sqlite3VdbeAddOp1(tls, _v, i32(112), _pSort.X2)
+ _5_addrFirst = _sqlite3VdbeAddOp1(tls, _v, int32(112), _pSort.XiECursor)
_23:
- _sqlite3VdbeAddOp3(tls, _v, i32(98), _5_regPrevKey, _regBase, _pSort.X1)
- _5_pOp = _sqlite3VdbeGetOp(tls, _v, _pSort.X5)
- if ((*Xsqlite3)(_pParse.X0).X17) != 0 {
+ _sqlite3VdbeAddOp3(tls, _v, int32(98), _5_regPrevKey, _regBase, _pSort.XnOBSat)
+ _5_pOp = _sqlite3VdbeGetOp(tls, _v, _pSort.XaddrSortIndex)
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) != 0 {
return
}
- *(*int32)(unsafe.Pointer(&(_5_pOp.X4))) = _5_nKey + _nData
- _5_pKI = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_5_pOp.X6))))))
- crt.Xmemset(tls, (unsafe.Pointer)(_5_pKI.X5), i32(0), uint32(_5_pKI.X2))
- _sqlite3VdbeChangeP4(tls, _v, i32(-1), (*int8)(unsafe.Pointer(_5_pKI)), i32(-5))
- *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_5_pOp.X6))))))) = _keyInfoFromExprList(tls, _pParse, (*XExprList)(_pSort.X0), _nOBSat, int32(_5_pKI.X3)-i32(1))
+ _5_pOp.Xp2 = _5_nKey + _nData
+ _5_pKI = (*XKeyInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_5_pOp.Xp4)))
+ crt.Xmemset(tls, unsafe.Pointer(_5_pKI.XaSortOrder), int32(0), uint32(_5_pKI.XnField))
+ _sqlite3VdbeChangeP4(tls, _v, int32(-1), (*int8)(unsafe.Pointer(_5_pKI)), int32(-5))
+ *(**XKeyInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_5_pOp.Xp4)))) = _keyInfoFromExprList(tls, _pParse, (*XExprList)(_pSort.XpOrderBy), _nOBSat, int32(_5_pKI.XnXField)-int32(1))
_5_addrJmp = _sqlite3VdbeCurrentAddr(tls, _v)
- _sqlite3VdbeAddOp3(tls, _v, i32(18), _5_addrJmp+i32(1), i32(0), _5_addrJmp+i32(1))
- *(*int32)(unsafe.Pointer(&(_pSort.X4))) = _sqlite3VdbeMakeLabel(tls, _v)
- *(*int32)(unsafe.Pointer(&(_pSort.X3))) = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _pSort.X3, _pSort.X4)
- _sqlite3VdbeAddOp1(tls, _v, i32(135), _pSort.X2)
+ _sqlite3VdbeAddOp3(tls, _v, int32(18), _5_addrJmp+int32(1), int32(0), _5_addrJmp+int32(1))
+ _pSort.XlabelBkOut = _sqlite3VdbeMakeLabel(tls, _v)
+ _pSort.XregReturn = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _pSort.XregReturn, _pSort.XlabelBkOut)
+ _sqlite3VdbeAddOp1(tls, _v, int32(135), _pSort.XiECursor)
if _iLimit != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(22), _iLimit, _pSort.X6)
+ _sqlite3VdbeAddOp2(tls, _v, int32(22), _iLimit, _pSort.XlabelDone)
}
_sqlite3VdbeJumpHere(tls, _v, _5_addrFirst)
- _sqlite3ExprCodeMove(tls, _pParse, _regBase, _5_regPrevKey, _pSort.X1)
+ _sqlite3ExprCodeMove(tls, _pParse, _regBase, _5_regPrevKey, _pSort.XnOBSat)
_sqlite3VdbeJumpHere(tls, _v, _5_addrJmp)
_21:
- if (int32(_pSort.X7) & i32(1)) != 0 {
- _op = i32(127)
+ if (int32(_pSort.XsortFlags) & int32(1)) != 0 {
+ _op = int32(127)
goto _27
}
- _op = i32(128)
+ _op = int32(128)
_27:
- _sqlite3VdbeAddOp4Int(tls, _v, _op, _pSort.X2, _regRecord, _regBase+_nOBSat, _nBase-_nOBSat)
+ _sqlite3VdbeAddOp4Int(tls, _v, _op, _pSort.XiECursor, _regRecord, _regBase+_nOBSat, _nBase-_nOBSat)
if _iLimit == 0 {
goto _28
}
- _11_r1 = i32(0)
- _11_addr = _sqlite3VdbeAddOp1(tls, _v, i32(47), _iLimit)
- _sqlite3VdbeAddOp1(tls, _v, i32(33), _pSort.X2)
- if (_pSort.X8) != 0 {
- _11_r1 = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _pSort.X2, _nExpr, _11_r1)
- _sqlite3VdbeComment(tls, _v, str(61696))
+ _11_r1 = int32(0)
+ _11_addr = _sqlite3VdbeAddOp1(tls, _v, int32(47), _iLimit)
+ _sqlite3VdbeAddOp1(tls, _v, int32(33), _pSort.XiECursor)
+ if _pSort.XbOrderedInnerLoop != 0 {
+ _11_r1 = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _pSort.XiECursor, _nExpr, _11_r1)
+ _sqlite3VdbeComment(tls, _v, str(93782))
}
- _sqlite3VdbeAddOp1(tls, _v, i32(120), _pSort.X2)
- if (_pSort.X8) != 0 {
- _13_iBrk = _sqlite3VdbeCurrentAddr(tls, _v) + i32(2)
- _sqlite3VdbeAddOp3(tls, _v, i32(78), _regBase+_nExpr, _13_iBrk, _11_r1)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(128)))
+ _sqlite3VdbeAddOp1(tls, _v, int32(120), _pSort.XiECursor)
+ if _pSort.XbOrderedInnerLoop != 0 {
+ _13_iBrk = _sqlite3VdbeCurrentAddr(tls, _v) + int32(2)
+ _sqlite3VdbeAddOp3(tls, _v, int32(78), _regBase+_nExpr, _13_iBrk, _11_r1)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(128))
}
_sqlite3VdbeJumpHere(tls, _v, _11_addr)
_28:
@@ -78607,69 +79670,75 @@ _28:
var _pushOntoSorterØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_pushOntoSorterØ00__func__Ø000[0], str(99950), 15)
+ crt.Xstrncpy(nil, &_pushOntoSorterØ00__func__Ø000[0], str(99978), 15)
}
-// Generate code to move content from registers iFrom...iFrom+nReg-1
-// over to iTo..iTo+nReg-1. Keep the column cache up-to-date.
+// C comment
+// /*
+// ** Generate code to move content from registers iFrom...iFrom+nReg-1
+// ** over to iTo..iTo+nReg-1. Keep the column cache up-to-date.
+// */
func _sqlite3ExprCodeMove(tls *crt.TLS, _pParse *XParse, _iFrom int32, _iTo int32, _nReg int32) {
func() {
if _iFrom < (_iTo+_nReg) && (_iFrom+_nReg) > _iTo {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94255), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeMoveØ00__func__Ø000))), unsafe.Pointer(str(99965)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94255), unsafe.Pointer(&_sqlite3ExprCodeMoveØ00__func__Ø000), unsafe.Pointer(str(99993)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp3(tls, (*TVdbe)(_pParse.X2), i32(63), _iFrom, _iTo, _nReg)
+ _sqlite3VdbeAddOp3(tls, (*TVdbe)(_pParse.XpVdbe), int32(63), _iFrom, _iTo, _nReg)
_sqlite3ExprCacheRemove(tls, _pParse, _iFrom, _nReg)
}
var _sqlite3ExprCodeMoveØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCodeMoveØ00__func__Ø000[0], str(100000), 20)
-}
-
-// Given an expression list, generate a KeyInfo structure that records
-// the collating sequence for each expression in that expression list.
-//
-// If the ExprList is an ORDER BY or GROUP BY clause then the resulting
-// KeyInfo structure is appropriate for initializing a virtual index to
-// implement that clause. If the ExprList is the result set of a SELECT
-// then the KeyInfo structure is appropriate for initializing a virtual
-// index to implement a DISTINCT test.
-//
-// Space to hold the KeyInfo structure is obtained from malloc. The calling
-// function is responsible for seeing that this structure is eventually
-// freed.
+ crt.Xstrncpy(nil, &_sqlite3ExprCodeMoveØ00__func__Ø000[0], str(100028), 20)
+}
+
+// C comment
+// /*
+// ** Given an expression list, generate a KeyInfo structure that records
+// ** the collating sequence for each expression in that expression list.
+// **
+// ** If the ExprList is an ORDER BY or GROUP BY clause then the resulting
+// ** KeyInfo structure is appropriate for initializing a virtual index to
+// ** implement that clause. If the ExprList is the result set of a SELECT
+// ** then the KeyInfo structure is appropriate for initializing a virtual
+// ** index to implement a DISTINCT test.
+// **
+// ** Space to hold the KeyInfo structure is obtained from malloc. The calling
+// ** function is responsible for seeing that this structure is eventually
+// ** freed.
+// */
func _keyInfoFromExprList(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _iStart int32, _nExtra int32) (r0 *XKeyInfo) {
var _nExpr, _i int32
var _db *Xsqlite3
var _pItem *TExprList_item
var _pInfo *XKeyInfo
var _2_pColl *XCollSeq
- _db = (*Xsqlite3)(_pParse.X0)
- _nExpr = _pList.X0
- _pInfo = _sqlite3KeyInfoAlloc(tls, _db, _nExpr-_iStart, _nExtra+i32(1))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _nExpr = _pList.XnExpr
+ _pInfo = _sqlite3KeyInfoAlloc(tls, _db, _nExpr-_iStart, _nExtra+int32(1))
if _pInfo == nil {
goto _0
}
func() {
if _sqlite3KeyInfoIsWriteable(tls, _pInfo) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117632), unsafe.Pointer((*int8)(unsafe.Pointer(&_keyInfoFromExprListØ00__func__Ø000))), unsafe.Pointer(str(100020)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117632), unsafe.Pointer(&_keyInfoFromExprListØ00__func__Ø000), unsafe.Pointer(str(100048)))
crt.X__builtin_abort(tls)
}
}()
- *func() **TExprList_item { _i = _iStart; return &_pItem }() = (*TExprList_item)(unsafe.Pointer(uintptr(unsafe.Pointer((*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))))) + uintptr(unsafe.Pointer((*TExprList_item)(unsafe.Pointer(uintptr(unsafe.Pointer((*TExprList_item)(unsafe.Pointer(uintptr(_iStart)))))*uintptr(unsafe.Pointer((*TExprList_item)(unsafe.Pointer(uintptr(20)))))))))))
+ *func() **TExprList_item { _i = _iStart; return &_pItem }() = (*TExprList_item)(unsafe.Pointer(uintptr(unsafe.Pointer(&_pList.Xa)) + uintptr(unsafe.Pointer((*TExprList_item)(unsafe.Pointer(uintptr(_iStart)*uintptr(unsafe.Pointer((*TExprList_item)(unsafe.Pointer(uintptr(20)))))))))))
_3:
if _i >= _nExpr {
goto _6
}
- _2_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pItem.X0))
+ _2_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pItem.XpExpr))
if _2_pColl == nil {
- _2_pColl = (*XCollSeq)(_db.X2)
+ _2_pColl = (*XCollSeq)(_db.XpDfltColl)
}
- *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_pInfo.X6))))) + 4*uintptr(_i-_iStart))) = _2_pColl
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pInfo.X5)) + 1*uintptr(_i-_iStart))) = _pItem.X3
+ *elem62((**XCollSeq)(unsafe.Pointer(&_pInfo.XaColl)), uintptr(_i-_iStart)) = _2_pColl
+ *elem15(_pInfo.XaSortOrder, uintptr(_i-_iStart)) = _pItem.XsortOrder
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i += 1; return &_pItem }())) += uintptr(20)
goto _3
_6:
@@ -78680,58 +79749,63 @@ _0:
var _keyInfoFromExprListØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_keyInfoFromExprListØ00__func__Ø000[0], str(100053), 20)
+ crt.Xstrncpy(nil, &_keyInfoFromExprListØ00__func__Ø000[0], str(100081), 20)
}
func _sqlite3ReleaseTempRange(tls *crt.TLS, _pParse *XParse, _iReg int32, _nReg int32) {
- if _nReg == i32(1) {
+ if _nReg == int32(1) {
_sqlite3ReleaseTempReg(tls, _pParse, _iReg)
return
}
_sqlite3ExprCacheRemove(tls, _pParse, _iReg, _nReg)
- if _nReg > (_pParse.X14) {
- *(*int32)(unsafe.Pointer(&(_pParse.X14))) = _nReg
- *(*int32)(unsafe.Pointer(&(_pParse.X15))) = _iReg
+ if _nReg > _pParse.XnRangeReg {
+ _pParse.XnRangeReg = _nReg
+ _pParse.XiRangeReg = _iReg
}
}
-// Resolve label "x" to be the address of the next instruction to
-// be inserted. The parameter "x" must have been obtained from
-// a prior call to sqlite3VdbeMakeLabel().
+// C comment
+// /*
+// ** Resolve label "x" to be the address of the next instruction to
+// ** be inserted. The parameter "x" must have been obtained from
+// ** a prior call to sqlite3VdbeMakeLabel().
+// */
func _sqlite3VdbeResolveLabel(tls *crt.TLS, _v *TVdbe, _x int32) {
var _j int32
var _p *XParse
- _p = (*XParse)(_v.X3)
- _j = i32(-1) - _x
+ _p = (*XParse)(_v.XpParse)
+ _j = int32(-1) - _x
func() {
- if (_v.X5) != uint32(i32(381479589)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71803), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeResolveLabelØ00__func__Ø000))), unsafe.Pointer(str(44897)))
+ if _v.Xmagic != uint32(381479589) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71803), unsafe.Pointer(&_sqlite3VdbeResolveLabelØ00__func__Ø000), unsafe.Pointer(str(44852)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _j >= (_p.X25) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71804), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeResolveLabelØ00__func__Ø000))), unsafe.Pointer(str(100073)))
+ if _j >= _p.XnLabel {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71804), unsafe.Pointer(&_sqlite3VdbeResolveLabelØ00__func__Ø000), unsafe.Pointer(str(100101)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _j < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71805), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeResolveLabelØ00__func__Ø000))), unsafe.Pointer(str(100085)))
+ if _j < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71805), unsafe.Pointer(&_sqlite3VdbeResolveLabelØ00__func__Ø000), unsafe.Pointer(str(100113)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X26) != nil {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X26)) + 4*uintptr(_j))) = _v.X27
+ if _p.XaLabel != nil {
+ *elem8(_p.XaLabel, uintptr(_j)) = _v.XnOp
}
}
var _sqlite3VdbeResolveLabelØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeResolveLabelØ00__func__Ø000[0], str(100090), 24)
+ crt.Xstrncpy(nil, &_sqlite3VdbeResolveLabelØ00__func__Ø000[0], str(100118), 24)
}
+// C comment
+// /* Forward references */
func _multiSelectOrderBy(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pDest *XSelectDest) (r0 int32) {
var _i, _j, _regAddrA, _regAddrB, _addrSelectA, _addrSelectB, _regOutA, _regOutB, _addrOutA, _addrOutB, _addrEofA, _addrEofA_noB, _addrEofB, _addrAltB, _addrAeqB, _addrAgtB, _regLimitA, _regLimitB, _regPrev, _savedLimit, _savedOffset, _labelCmpr, _labelEnd, _addr1, _op, _nOrderBy, _iSub1, _iSub2, _9_nExpr int32
var _aPermute *int32
@@ -78743,66 +79817,66 @@ func _multiSelectOrderBy(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pDest *XSe
var _4_pNew *XExpr
var _pKeyDup, _pKeyMerge *XKeyInfo
var _destA, _destB XSelectDest
- _addrOutB = i32(0)
+ _addrOutB = int32(0)
_pKeyDup = nil
func() {
- if (*XExprList)(_p.X12) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119400), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(100114)))
+ if (*XExprList)(_p.XpOrderBy) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119400), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(100142)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pKeyDup != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119401), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(100129)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119401), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(100157)))
crt.X__builtin_abort(tls)
}
}()
- _db = (*Xsqlite3)(_pParse.X0)
- _v = (*TVdbe)(_pParse.X2)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119404), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119404), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
_labelEnd = _sqlite3VdbeMakeLabel(tls, _v)
_labelCmpr = _sqlite3VdbeMakeLabel(tls, _v)
- _op = int32(_p.X1)
- _pPrior = (*XSelect)(_p.X13)
+ _op = int32(_p.Xop)
+ _pPrior = (*XSelect)(_p.XpPrior)
func() {
- if (*XExprList)(_pPrior.X12) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119413), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(100140)))
+ if (*XExprList)(_pPrior.XpOrderBy) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119413), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(100168)))
crt.X__builtin_abort(tls)
}
}()
- _pOrderBy = (*XExprList)(_p.X12)
+ _pOrderBy = (*XExprList)(_p.XpOrderBy)
func() {
if _pOrderBy == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119415), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(100160)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119415), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(100188)))
crt.X__builtin_abort(tls)
}
}()
- _nOrderBy = _pOrderBy.X0
- if _op == i32(116) {
+ _nOrderBy = _pOrderBy.XnExpr
+ if _op == int32(116) {
goto _10
}
- _i = i32(1)
+ _i = int32(1)
_11:
- if int32(_db.X17) != i32(0) || _i > ((*XExprList)(_p.X0).X0) {
+ if int32(_db.XmallocFailed) != int32(0) || _i > ((*XExprList)(_p.XpEList).XnExpr) {
goto _15
}
- *func() **TExprList_item { _j = i32(0); return &_2_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))
+ *func() **TExprList_item { _j = int32(0); return &_2_pItem }() = (*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa))
_16:
if _j >= _nOrderBy {
goto _19
}
func() {
- if int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_2_pItem.X5))))).X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119426), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(100169)))
+ if int32((*t71)(unsafe.Pointer(&_2_pItem.Xu)).XiOrderByCol) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119426), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(100197)))
crt.X__builtin_abort(tls)
}
}()
- if int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_2_pItem.X5))))).X0) == _i {
+ if int32((*t71)(unsafe.Pointer(&_2_pItem.Xu)).XiOrderByCol) == _i {
goto _19
}
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _j += 1; return &_2_pItem }())) += uintptr(20)
@@ -78811,316 +79885,309 @@ _19:
if _j != _nOrderBy {
goto _23
}
- _4_pNew = _sqlite3Expr(tls, _db, i32(134), nil)
+ _4_pNew = _sqlite3Expr(tls, _db, int32(134), nil)
if _4_pNew == nil {
- return _sqlite3NomemError(tls, i32(119431))
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_4_pNew.X2)))
- *p = (*p) | uint32(i32(1024))
- sink5(*p)
+ return _sqlite3NomemError(tls, int32(119431))
}
- *(*int32)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_4_pNew.X3))))) = _i
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = store42(&_pOrderBy, _sqlite3ExprListAppend(tls, _pParse, _pOrderBy, _4_pNew))
+ _4_pNew.Xflags |= uint32(1024)
+ *(*int32)(unsafe.Pointer(&_4_pNew.Xu)) = _i
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = store70(&_pOrderBy, _sqlite3ExprListAppend(tls, _pParse, _pOrderBy, _4_pNew))
if _pOrderBy != nil {
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2))))) + 20*uintptr(postInc1(&_nOrderBy, int32(1))))).X5))))).X0))) = uint16(_i)
+ (*t71)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(postInc2(&_nOrderBy, 1))).Xu))).XiOrderByCol = uint16(_i)
}
_23:
_i += 1
goto _11
_15:
_10:
- _aPermute = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(4)*uint32(_nOrderBy+i32(1)))))
+ _aPermute = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(4)*uint32(_nOrderBy+int32(1)))))
if _aPermute == nil {
goto _26
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPermute)) + 4*uintptr(i32(0)))) = _nOrderBy
- *func() **TExprList_item { _i = i32(1); return &_5_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))
+ *elem8(_aPermute, 0) = _nOrderBy
+ *func() **TExprList_item { _i = int32(1); return &_5_pItem }() = (*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa))
_27:
if _i > _nOrderBy {
goto _30
}
func() {
- if int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_5_pItem.X5))))).X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119452), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(100169)))
+ if int32((*t71)(unsafe.Pointer(&_5_pItem.Xu)).XiOrderByCol) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119452), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(100197)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_5_pItem.X5))))).X0) > ((*XExprList)(_p.X0).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119453), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(100194)))
+ if int32((*t71)(unsafe.Pointer(&_5_pItem.Xu)).XiOrderByCol) > ((*XExprList)(_p.XpEList).XnExpr) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119453), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(100222)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aPermute)) + 4*uintptr(_i))) = int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&(_5_pItem.X5))))).X0) - i32(1)
+ *elem8(_aPermute, uintptr(_i)) = int32((*t71)(unsafe.Pointer(&_5_pItem.Xu)).XiOrderByCol) - int32(1)
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i += 1; return &_5_pItem }())) += uintptr(20)
goto _27
_30:
- _pKeyMerge = _multiSelectOrderByKeyInfo(tls, _pParse, _p, i32(1))
+ _pKeyMerge = _multiSelectOrderByKeyInfo(tls, _pParse, _p, int32(1))
goto _35
_26:
_pKeyMerge = nil
_35:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X12))))) = _pOrderBy
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPrior.X12))))) = _sqlite3ExprListDup(tls, (*Xsqlite3)(_pParse.X0), _pOrderBy, i32(0))
- if _op == i32(116) {
- _regPrev = i32(0)
+ *(**XExprList)(unsafe.Pointer(&_p.XpOrderBy)) = _pOrderBy
+ *(**XExprList)(unsafe.Pointer(&_pPrior.XpOrderBy)) = _sqlite3ExprListDup(tls, (*Xsqlite3)(_pParse.Xdb), _pOrderBy, int32(0))
+ if _op == int32(116) {
+ _regPrev = int32(0)
goto _37
}
- _9_nExpr = (*XExprList)(_p.X0).X0
+ _9_nExpr = (*XExprList)(_p.XpEList).XnExpr
func() {
- if _nOrderBy < _9_nExpr && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119474), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(100235)))
+ if _nOrderBy < _9_nExpr && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119474), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(100263)))
crt.X__builtin_abort(tls)
}
}()
- _regPrev = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + (_9_nExpr + i32(1))
- sink1(*p)
- }
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _regPrev)
- _pKeyDup = _sqlite3KeyInfoAlloc(tls, _db, _9_nExpr, i32(1))
+ _regPrev = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _9_nExpr + int32(1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _regPrev)
+ _pKeyDup = _sqlite3KeyInfoAlloc(tls, _db, _9_nExpr, int32(1))
if _pKeyDup == nil {
goto _41
}
func() {
if _sqlite3KeyInfoIsWriteable(tls, _pKeyDup) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119480), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000))), unsafe.Pointer(str(100271)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119480), unsafe.Pointer(&_multiSelectOrderByØ00__func__Ø000), unsafe.Pointer(str(100299)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_44:
if _i >= _9_nExpr {
goto _47
}
- *(**XCollSeq)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]unsafe.Pointer)(unsafe.Pointer(&(_pKeyDup.X6))))) + 4*uintptr(_i))) = _multiSelectCollSeq(tls, _pParse, _p, _i)
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pKeyDup.X5)) + 1*uintptr(_i))) = uint8(i32(0))
+ *elem62((**XCollSeq)(unsafe.Pointer(&_pKeyDup.XaColl)), uintptr(_i)) = _multiSelectCollSeq(tls, _pParse, _p, _i)
+ *elem15(_pKeyDup.XaSortOrder, uintptr(_i)) = 0
_i += 1
goto _44
_47:
_41:
_37:
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = nil
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPrior.X14))))) = nil
- _sqlite3ResolveOrderGroupBy(tls, _pParse, _p, (*XExprList)(_p.X12), str(25745))
- if (*XSelect)(_pPrior.X13) == nil {
- _sqlite3ResolveOrderGroupBy(tls, _pParse, _pPrior, (*XExprList)(_pPrior.X12), str(25745))
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = nil
+ *(**XSelect)(unsafe.Pointer(&_pPrior.XpNext)) = nil
+ _sqlite3ResolveOrderGroupBy(tls, _pParse, _p, (*XExprList)(_p.XpOrderBy), str(25700))
+ if (*XSelect)(_pPrior.XpPrior) == nil {
+ _sqlite3ResolveOrderGroupBy(tls, _pParse, _pPrior, (*XExprList)(_pPrior.XpOrderBy), str(25700))
}
_computeLimitRegisters(tls, _pParse, _p, _labelEnd)
- if (_p.X4) != 0 && (_op == i32(116)) {
- _regLimitA = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _regLimitB = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(64), func() int32 {
- if (_p.X5) != 0 {
- return ((_p.X5) + i32(1))
+ if _p.XiLimit != 0 && (_op == int32(116)) {
+ _regLimitA = preInc2(&_pParse.XnMem, 1)
+ _regLimitB = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(64), func() int32 {
+ if _p.XiOffset != 0 {
+ return (_p.XiOffset + int32(1))
}
- return (_p.X4)
+ return _p.XiLimit
}(), _regLimitA)
- _sqlite3VdbeAddOp2(tls, _v, i32(64), _regLimitA, _regLimitB)
+ _sqlite3VdbeAddOp2(tls, _v, int32(64), _regLimitA, _regLimitB)
goto _53
}
- _regLimitA = store1(&_regLimitB, i32(0))
+ _regLimitA = store2(&_regLimitB, int32(0))
_53:
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X15))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) = nil
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.X16))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X16))))) = nil
- _regAddrA = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _regAddrB = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _regOutA = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _regOutB = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3SelectDestInit(tls, &_destA, i32(13), _regAddrA)
- _sqlite3SelectDestInit(tls, &_destB, i32(13), _regAddrB)
- _addrSelectA = _sqlite3VdbeCurrentAddr(tls, _v) + i32(1)
- _addr1 = _sqlite3VdbeAddOp3(tls, _v, i32(15), _regAddrA, i32(0), _addrSelectA)
- _sqlite3VdbeComment(tls, _v, str(100306))
- *(*int32)(unsafe.Pointer(&(_pPrior.X4))) = _regLimitA
- _iSub1 = _pParse.X59
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpLimit))
+ *(**XExpr)(unsafe.Pointer(&_p.XpLimit)) = nil
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_p.XpOffset))
+ *(**XExpr)(unsafe.Pointer(&_p.XpOffset)) = nil
+ _regAddrA = preInc2(&_pParse.XnMem, 1)
+ _regAddrB = preInc2(&_pParse.XnMem, 1)
+ _regOutA = preInc2(&_pParse.XnMem, 1)
+ _regOutB = preInc2(&_pParse.XnMem, 1)
+ _sqlite3SelectDestInit(tls, &_destA, int32(13), _regAddrA)
+ _sqlite3SelectDestInit(tls, &_destB, int32(13), _regAddrB)
+ _addrSelectA = _sqlite3VdbeCurrentAddr(tls, _v) + int32(1)
+ _addr1 = _sqlite3VdbeAddOp3(tls, _v, int32(15), _regAddrA, int32(0), _addrSelectA)
+ _sqlite3VdbeComment(tls, _v, str(100334))
+ _pPrior.XiLimit = _regLimitA
+ _iSub1 = _pParse.XiNextSelectId
_sqlite3Select(tls, _pParse, _pPrior, &_destA)
_sqlite3VdbeEndCoroutine(tls, _v, _regAddrA)
_sqlite3VdbeJumpHere(tls, _v, _addr1)
- _addrSelectB = _sqlite3VdbeCurrentAddr(tls, _v) + i32(1)
- _addr1 = _sqlite3VdbeAddOp3(tls, _v, i32(15), _regAddrB, i32(0), _addrSelectB)
- _sqlite3VdbeComment(tls, _v, str(100318))
- _savedLimit = _p.X4
- _savedOffset = _p.X5
- *(*int32)(unsafe.Pointer(&(_p.X4))) = _regLimitB
- *(*int32)(unsafe.Pointer(&(_p.X5))) = i32(0)
- _iSub2 = _pParse.X59
+ _addrSelectB = _sqlite3VdbeCurrentAddr(tls, _v) + int32(1)
+ _addr1 = _sqlite3VdbeAddOp3(tls, _v, int32(15), _regAddrB, int32(0), _addrSelectB)
+ _sqlite3VdbeComment(tls, _v, str(100346))
+ _savedLimit = _p.XiLimit
+ _savedOffset = _p.XiOffset
+ _p.XiLimit = _regLimitB
+ _p.XiOffset = int32(0)
+ _iSub2 = _pParse.XiNextSelectId
_sqlite3Select(tls, _pParse, _p, &_destB)
- *(*int32)(unsafe.Pointer(&(_p.X4))) = _savedLimit
- *(*int32)(unsafe.Pointer(&(_p.X5))) = _savedOffset
+ _p.XiLimit = _savedLimit
+ _p.XiOffset = _savedOffset
_sqlite3VdbeEndCoroutine(tls, _v, _regAddrB)
- _sqlite3VdbeNoopComment(tls, _v, str(100331))
+ _sqlite3VdbeNoopComment(tls, _v, str(100359))
_addrOutA = _generateOutputSubroutine(tls, _pParse, _p, &_destA, _pDest, _regOutA, _regPrev, _pKeyDup, _labelEnd)
- if (_op == i32(116)) || (_op == i32(115)) {
- _sqlite3VdbeNoopComment(tls, _v, str(100352))
+ if (_op == int32(116)) || (_op == int32(115)) {
+ _sqlite3VdbeNoopComment(tls, _v, str(100380))
_addrOutB = _generateOutputSubroutine(tls, _pParse, _p, &_destB, _pDest, _regOutB, _regPrev, _pKeyDup, _labelEnd)
}
_sqlite3KeyInfoUnref(tls, _pKeyDup)
- if (_op == i32(117)) || (_op == i32(118)) {
- _addrEofA_noB = store1(&_addrEofA, _labelEnd)
+ if (_op == int32(117)) || (_op == int32(118)) {
+ _addrEofA_noB = store2(&_addrEofA, _labelEnd)
goto _58
}
- _sqlite3VdbeNoopComment(tls, _v, str(100373))
- _addrEofA = _sqlite3VdbeAddOp2(tls, _v, i32(14), _regOutB, _addrOutB)
- _addrEofA_noB = _sqlite3VdbeAddOp2(tls, _v, i32(16), _regAddrB, _labelEnd)
+ _sqlite3VdbeNoopComment(tls, _v, str(100401))
+ _addrEofA = _sqlite3VdbeAddOp2(tls, _v, int32(14), _regOutB, _addrOutB)
+ _addrEofA_noB = _sqlite3VdbeAddOp2(tls, _v, int32(16), _regAddrB, _labelEnd)
_sqlite3VdbeGoto(tls, _v, _addrEofA)
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _sqlite3LogEstAdd(tls, _p.X2, _pPrior.X2)
+ _p.XnSelectRow = _sqlite3LogEstAdd(tls, _p.XnSelectRow, _pPrior.XnSelectRow)
_58:
- if _op != i32(118) {
+ if _op != int32(118) {
goto _59
}
_addrEofB = _addrEofA
- if int32(_p.X2) > int32(_pPrior.X2) {
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _pPrior.X2
+ if int32(_p.XnSelectRow) > int32(_pPrior.XnSelectRow) {
+ _p.XnSelectRow = _pPrior.XnSelectRow
}
goto _61
_59:
- _sqlite3VdbeNoopComment(tls, _v, str(100390))
- _addrEofB = _sqlite3VdbeAddOp2(tls, _v, i32(14), _regOutA, _addrOutA)
- _sqlite3VdbeAddOp2(tls, _v, i32(16), _regAddrA, _labelEnd)
+ _sqlite3VdbeNoopComment(tls, _v, str(100418))
+ _addrEofB = _sqlite3VdbeAddOp2(tls, _v, int32(14), _regOutA, _addrOutA)
+ _sqlite3VdbeAddOp2(tls, _v, int32(16), _regAddrA, _labelEnd)
_sqlite3VdbeGoto(tls, _v, _addrEofB)
_61:
- _sqlite3VdbeNoopComment(tls, _v, str(100407))
- _addrAltB = _sqlite3VdbeAddOp2(tls, _v, i32(14), _regOutA, _addrOutA)
- _sqlite3VdbeAddOp2(tls, _v, i32(16), _regAddrA, _addrEofA)
+ _sqlite3VdbeNoopComment(tls, _v, str(100435))
+ _addrAltB = _sqlite3VdbeAddOp2(tls, _v, int32(14), _regOutA, _addrOutA)
+ _sqlite3VdbeAddOp2(tls, _v, int32(16), _regAddrA, _addrEofA)
_sqlite3VdbeGoto(tls, _v, _labelCmpr)
- if _op == i32(116) {
+ if _op == int32(116) {
_addrAeqB = _addrAltB
goto _65
}
- if _op == i32(118) {
+ if _op == int32(118) {
_addrAeqB = _addrAltB
_addrAltB += 1
goto _65
}
- _sqlite3VdbeNoopComment(tls, _v, str(100425))
- _addrAeqB = _sqlite3VdbeAddOp2(tls, _v, i32(16), _regAddrA, _addrEofA)
+ _sqlite3VdbeNoopComment(tls, _v, str(100453))
+ _addrAeqB = _sqlite3VdbeAddOp2(tls, _v, int32(16), _regAddrA, _addrEofA)
_sqlite3VdbeGoto(tls, _v, _labelCmpr)
_65:
- _sqlite3VdbeNoopComment(tls, _v, str(100443))
+ _sqlite3VdbeNoopComment(tls, _v, str(100471))
_addrAgtB = _sqlite3VdbeCurrentAddr(tls, _v)
- if (_op == i32(116)) || (_op == i32(115)) {
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _regOutB, _addrOutB)
+ if (_op == int32(116)) || (_op == int32(115)) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _regOutB, _addrOutB)
}
- _sqlite3VdbeAddOp2(tls, _v, i32(16), _regAddrB, _addrEofB)
+ _sqlite3VdbeAddOp2(tls, _v, int32(16), _regAddrB, _addrEofB)
_sqlite3VdbeGoto(tls, _v, _labelCmpr)
_sqlite3VdbeJumpHere(tls, _v, _addr1)
- _sqlite3VdbeAddOp2(tls, _v, i32(16), _regAddrA, _addrEofA_noB)
- _sqlite3VdbeAddOp2(tls, _v, i32(16), _regAddrB, _addrEofB)
+ _sqlite3VdbeAddOp2(tls, _v, int32(16), _regAddrA, _addrEofA_noB)
+ _sqlite3VdbeAddOp2(tls, _v, int32(16), _regAddrB, _addrEofB)
_sqlite3VdbeResolveLabel(tls, _v, _labelCmpr)
- _sqlite3VdbeAddOp4(tls, _v, i32(96), i32(0), i32(0), i32(0), (*int8)(unsafe.Pointer(_aPermute)), i32(-12))
- _sqlite3VdbeAddOp4(tls, _v, i32(98), _destA.X3, _destB.X3, _nOrderBy, (*int8)(unsafe.Pointer(_pKeyMerge)), i32(-5))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(1)))
- _sqlite3VdbeAddOp3(tls, _v, i32(18), _addrAltB, _addrAeqB, _addrAgtB)
+ _sqlite3VdbeAddOp4(tls, _v, int32(96), int32(0), int32(0), int32(0), (*int8)(unsafe.Pointer(_aPermute)), int32(-12))
+ _sqlite3VdbeAddOp4(tls, _v, int32(98), _destA.XiSdst, _destB.XiSdst, _nOrderBy, (*int8)(unsafe.Pointer(_pKeyMerge)), int32(-5))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(18), _addrAltB, _addrAeqB, _addrAgtB)
_sqlite3VdbeResolveLabel(tls, _v, _labelEnd)
- if int32(_pDest.X0) != i32(9) {
+ if int32(_pDest.XeDest) != int32(9) {
goto _68
}
_24_pFirst = _pPrior
_69:
- if (*XSelect)(_24_pFirst.X13) != nil {
- _24_pFirst = (*XSelect)(_24_pFirst.X13)
+ if _24_pFirst.XpPrior != nil {
+ _24_pFirst = (*XSelect)(_24_pFirst.XpPrior)
goto _69
}
- _generateColumnNames(tls, _pParse, (*XSrcList)(_24_pFirst.X8), (*XExprList)(_24_pFirst.X0))
+ _generateColumnNames(tls, _pParse, (*XSrcList)(_24_pFirst.XpSrc), (*XExprList)(_24_pFirst.XpEList))
_68:
- if (*XSelect)(_p.X13) != nil {
- _sqlite3SelectDelete(tls, _db, (*XSelect)(_p.X13))
+ if _p.XpPrior != nil {
+ _sqlite3SelectDelete(tls, _db, (*XSelect)(_p.XpPrior))
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _pPrior
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPrior.X14))))) = _p
- _explainComposite(tls, _pParse, int32(_p.X1), _iSub1, _iSub2, i32(0))
- return bool2int((_pParse.X16) != i32(0))
-
- _ = _destA
- _ = _destB
- panic(0)
+ *(**XSelect)(unsafe.Pointer(&_p.XpPrior)) = _pPrior
+ *(**XSelect)(unsafe.Pointer(&_pPrior.XpNext)) = _p
+ _explainComposite(tls, _pParse, int32(_p.Xop), _iSub1, _iSub2, int32(0))
+ return bool2int(_pParse.XnErr != int32(0))
}
var _multiSelectOrderByØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_multiSelectOrderByØ00__func__Ø000[0], str(100461), 19)
+ crt.Xstrncpy(nil, &_multiSelectOrderByØ00__func__Ø000[0], str(100489), 19)
}
-// Insert the end of a co-routine
+// C comment
+// /* Insert the end of a co-routine
+// */
func _sqlite3VdbeEndCoroutine(tls *crt.TLS, _v *TVdbe, _regYield int32) {
- _sqlite3VdbeAddOp1(tls, _v, i32(53), _regYield)
- *(*uint8)(unsafe.Pointer(&((*XParse)(_v.X3).X7))) = uint8(i32(0))
- *(*int32)(unsafe.Pointer(&((*XParse)(_v.X3).X14))) = i32(0)
+ _sqlite3VdbeAddOp1(tls, _v, int32(53), _regYield)
+ (*XParse)(_v.XpParse).XnTempReg = 0
+ (*XParse)(_v.XpParse).XnRangeReg = int32(0)
}
func _sqlite3VdbeNoopComment(tls *crt.TLS, _p *TVdbe, _zFormat *int8, args ...interface{}) {
var _ap []interface{}
if _p != nil {
- _sqlite3VdbeAddOp0(tls, _p, i32(164))
+ _sqlite3VdbeAddOp0(tls, _p, int32(164))
_ap = args
_vdbeVComment(tls, _p, _zFormat, _ap)
_ap = nil
}
}
-// Code an output subroutine for a coroutine implementation of a
-// SELECT statment.
-//
-// The data to be output is contained in pIn->iSdst. There are
-// pIn->nSdst columns to be output. pDest is where the output should
-// be sent.
-//
-// regReturn is the number of the register holding the subroutine
-// return address.
-//
-// If regPrev>0 then it is the first register in a vector that
-// records the previous output. mem[regPrev] is a flag that is false
-// if there has been no previous output. If regPrev>0 then code is
-// generated to suppress duplicates. pKeyInfo is used for comparing
-// keys.
-//
-// If the LIMIT found in p->iLimit is reached, jump immediately to
-// iBreak.
+// C comment
+// /*
+// ** Code an output subroutine for a coroutine implementation of a
+// ** SELECT statment.
+// **
+// ** The data to be output is contained in pIn->iSdst. There are
+// ** pIn->nSdst columns to be output. pDest is where the output should
+// ** be sent.
+// **
+// ** regReturn is the number of the register holding the subroutine
+// ** return address.
+// **
+// ** If regPrev>0 then it is the first register in a vector that
+// ** records the previous output. mem[regPrev] is a flag that is false
+// ** if there has been no previous output. If regPrev>0 then code is
+// ** generated to suppress duplicates. pKeyInfo is used for comparing
+// ** keys.
+// **
+// ** If the LIMIT found in p->iLimit is reached, jump immediately to
+// ** iBreak.
+// */
func _generateOutputSubroutine(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pIn *XSelectDest, _pDest *XSelectDest, _regReturn int32, _regPrev int32, _pKeyInfo *XKeyInfo, _iBreak int32) (r0 int32) {
var _iContinue, _addr, _1_addr1, _1_addr2, _3_r1, _3_r2, _4_r1 int32
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
_addr = _sqlite3VdbeCurrentAddr(tls, _v)
_iContinue = _sqlite3VdbeMakeLabel(tls, _v)
if _regPrev != 0 {
- _1_addr1 = _sqlite3VdbeAddOp1(tls, _v, i32(22), _regPrev)
- _1_addr2 = _sqlite3VdbeAddOp4(tls, _v, i32(98), _pIn.X3, _regPrev+i32(1), _pIn.X4, (*int8)(unsafe.Pointer(_sqlite3KeyInfoRef(tls, _pKeyInfo))), i32(-5))
- _sqlite3VdbeAddOp3(tls, _v, i32(18), _1_addr2+i32(2), _iContinue, _1_addr2+i32(2))
+ _1_addr1 = _sqlite3VdbeAddOp1(tls, _v, int32(22), _regPrev)
+ _1_addr2 = _sqlite3VdbeAddOp4(tls, _v, int32(98), _pIn.XiSdst, _regPrev+int32(1), _pIn.XnSdst, (*int8)(unsafe.Pointer(_sqlite3KeyInfoRef(tls, _pKeyInfo))), int32(-5))
+ _sqlite3VdbeAddOp3(tls, _v, int32(18), _1_addr2+int32(2), _iContinue, _1_addr2+int32(2))
_sqlite3VdbeJumpHere(tls, _v, _1_addr1)
- _sqlite3VdbeAddOp3(tls, _v, i32(64), _pIn.X3, _regPrev+i32(1), (_pIn.X4)-i32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(1), _regPrev)
+ _sqlite3VdbeAddOp3(tls, _v, int32(64), _pIn.XiSdst, _regPrev+int32(1), _pIn.XnSdst-int32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(1), _regPrev)
}
- if ((*Xsqlite3)(_pParse.X0).X17) != 0 {
- return i32(0)
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) != 0 {
+ return int32(0)
}
- _codeOffset(tls, _v, _p.X5, _iContinue)
+ _codeOffset(tls, _v, _p.XiOffset, _iContinue)
func() {
- if int32(_pDest.X0) == i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119182), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateOutputSubroutineØ00__func__Ø000))), unsafe.Pointer(str(100480)))
+ if int32(_pDest.XeDest) == int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119182), unsafe.Pointer(&_generateOutputSubroutineØ00__func__Ø000), unsafe.Pointer(str(100508)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pDest.X0) == i32(14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119183), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateOutputSubroutineØ00__func__Ø000))), unsafe.Pointer(str(100505)))
+ if int32(_pDest.XeDest) == int32(14) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119183), unsafe.Pointer(&_generateOutputSubroutineØ00__func__Ø000), unsafe.Pointer(str(100533)))
crt.X__builtin_abort(tls)
}
}()
- switch int32(_pDest.X0) {
- case i32(10):
+ switch int32(_pDest.XeDest) {
+ case int32(10):
goto _9
- case i32(11):
+ case int32(11):
goto _8
- case i32(12):
+ case int32(12):
goto _7
- case i32(13):
+ case int32(13):
goto _10
default:
goto _11
@@ -79129,66 +80196,69 @@ func _generateOutputSubroutine(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pIn
_7:
_3_r1 = _sqlite3GetTempReg(tls, _pParse)
_3_r2 = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _pIn.X3, _pIn.X4, _3_r1)
- _sqlite3VdbeAddOp2(tls, _v, i32(117), _pDest.X2, _3_r2)
- _sqlite3VdbeAddOp3(tls, _v, i32(118), _pDest.X2, _3_r1, _3_r2)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(8)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _pIn.XiSdst, _pIn.XnSdst, _3_r1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(117), _pDest.XiSDParm, _3_r2)
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), _pDest.XiSDParm, _3_r1, _3_r2)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(8))
_sqlite3ReleaseTempReg(tls, _pParse, _3_r2)
_sqlite3ReleaseTempReg(tls, _pParse, _3_r1)
goto _12
_8:
_4_r1 = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _pIn.X3, _pIn.X4, _4_r1, _pDest.X1, _pIn.X4)
- _sqlite3ExprCacheAffinityChange(tls, _pParse, _pIn.X3, _pIn.X4)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _pDest.X2, _4_r1, _pIn.X3, _pIn.X4)
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _pIn.XiSdst, _pIn.XnSdst, _4_r1, _pDest.XzAffSdst, _pIn.XnSdst)
+ _sqlite3ExprCacheAffinityChange(tls, _pParse, _pIn.XiSdst, _pIn.XnSdst)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _pDest.XiSDParm, _4_r1, _pIn.XiSdst, _pIn.XnSdst)
_sqlite3ReleaseTempReg(tls, _pParse, _4_r1)
goto _12
_9:
func() {
- if (_pIn.X4) != i32(1) && (_pParse.X16) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119220), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateOutputSubroutineØ00__func__Ø000))), unsafe.Pointer(str(100529)))
+ if _pIn.XnSdst != int32(1) && _pParse.XnErr <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119220), unsafe.Pointer(&_generateOutputSubroutineØ00__func__Ø000), unsafe.Pointer(str(100557)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ExprCodeMove(tls, _pParse, _pIn.X3, _pDest.X2, i32(1))
+ _sqlite3ExprCodeMove(tls, _pParse, _pIn.XiSdst, _pDest.XiSDParm, int32(1))
goto _12
_10:
- if (_pDest.X3) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_pDest.X3))) = _sqlite3GetTempRange(tls, _pParse, _pIn.X4)
- *(*int32)(unsafe.Pointer(&(_pDest.X4))) = _pIn.X4
+ if _pDest.XiSdst == int32(0) {
+ _pDest.XiSdst = _sqlite3GetTempRange(tls, _pParse, _pIn.XnSdst)
+ _pDest.XnSdst = _pIn.XnSdst
}
- _sqlite3ExprCodeMove(tls, _pParse, _pIn.X3, _pDest.X3, _pIn.X4)
- _sqlite3VdbeAddOp1(tls, _v, i32(16), _pDest.X2)
+ _sqlite3ExprCodeMove(tls, _pParse, _pIn.XiSdst, _pDest.XiSdst, _pIn.XnSdst)
+ _sqlite3VdbeAddOp1(tls, _v, int32(16), _pDest.XiSDParm)
goto _12
_11:
func() {
- if int32(_pDest.X0) != i32(9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(119249), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateOutputSubroutineØ00__func__Ø000))), unsafe.Pointer(str(100561)))
+ if int32(_pDest.XeDest) != int32(9) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(119249), unsafe.Pointer(&_generateOutputSubroutineØ00__func__Ø000), unsafe.Pointer(str(100589)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _pIn.X3, _pIn.X4)
- _sqlite3ExprCacheAffinityChange(tls, _pParse, _pIn.X3, _pIn.X4)
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _pIn.XiSdst, _pIn.XnSdst)
+ _sqlite3ExprCacheAffinityChange(tls, _pParse, _pIn.XiSdst, _pIn.XnSdst)
goto _12
_12:
- if (_p.X4) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(48), _p.X4, _iBreak)
+ if _p.XiLimit != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(48), _p.XiLimit, _iBreak)
}
_sqlite3VdbeResolveLabel(tls, _v, _iContinue)
- _sqlite3VdbeAddOp1(tls, _v, i32(52), _regReturn)
+ _sqlite3VdbeAddOp1(tls, _v, int32(52), _regReturn)
return _addr
}
-// Make a new pointer to a KeyInfo object
+// C comment
+// /*
+// ** Make a new pointer to a KeyInfo object
+// */
func _sqlite3KeyInfoRef(tls *crt.TLS, _p *XKeyInfo) (r0 *XKeyInfo) {
if _p != nil {
func() {
- if (_p.X0) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117587), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3KeyInfoRefØ00__func__Ø000))), unsafe.Pointer(str(13857)))
+ if _p.XnRef <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117587), unsafe.Pointer(&_sqlite3KeyInfoRefØ00__func__Ø000), unsafe.Pointer(str(13812)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_p.X0))) += 1
+ _p.XnRef += 1
}
return _p
}
@@ -79196,39 +80266,42 @@ func _sqlite3KeyInfoRef(tls *crt.TLS, _p *XKeyInfo) (r0 *XKeyInfo) {
var _sqlite3KeyInfoRefØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3KeyInfoRefØ00__func__Ø000[0], str(100586), 18)
+ crt.Xstrncpy(nil, &_sqlite3KeyInfoRefØ00__func__Ø000[0], str(100614), 18)
}
var _generateOutputSubroutineØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_generateOutputSubroutineØ00__func__Ø000[0], str(100604), 25)
+ crt.Xstrncpy(nil, &_generateOutputSubroutineØ00__func__Ø000[0], str(100632), 25)
}
-// Find (an approximate) sum of two LogEst values. This computation is
-// not a simple "+" operator because LogEst is stored as a logarithmic
-// value.
-//
+// C comment
+// /*
+// ** Find (an approximate) sum of two LogEst values. This computation is
+// ** not a simple "+" operator because LogEst is stored as a logarithmic
+// ** value.
+// **
+// */
func _sqlite3LogEstAdd(tls *crt.TLS, _a int16, _b int16) (r0 int16) {
if int32(_a) < int32(_b) {
goto _0
}
- if int32(_a) > (int32(_b) + i32(49)) {
+ if int32(_a) > (int32(_b) + int32(49)) {
return _a
}
- if int32(_a) > (int32(_b) + i32(31)) {
- return int16(int32(_a) + i32(1))
+ if int32(_a) > (int32(_b) + int32(31)) {
+ return int16(int32(_a) + int32(1))
}
- return int16(int32(_a) + int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3LogEstAddØ00xØ001)) + 1*uintptr(int32(_a)-int32(_b))))))
+ return int16(int32(_a) + int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3LogEstAddØ00xØ001)), uintptr(int32(_a)-int32(_b)))))
_0:
- if int32(_b) > (int32(_a) + i32(49)) {
+ if int32(_b) > (int32(_a) + int32(49)) {
return _b
}
- if int32(_b) > (int32(_a) + i32(31)) {
- return int16(int32(_b) + i32(1))
+ if int32(_b) > (int32(_a) + int32(31)) {
+ return int16(int32(_b) + int32(1))
}
- return int16(int32(_b) + int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3LogEstAddØ00xØ001)) + 1*uintptr(int32(_b)-int32(_a))))))
+ return int16(int32(_b) + int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3LogEstAddØ00xØ001)), uintptr(int32(_b)-int32(_a)))))
}
var _sqlite3LogEstAddØ00xØ001 [32]uint8
@@ -79237,9 +80310,12 @@ func init() {
_sqlite3LogEstAddØ00xØ001 = [32]uint8{10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2}
}
-// Generate code that will tell the VDBE the names of columns
-// in the result set. This information is used to provide the
-// azCol[] values in the callback.
+// C comment
+// /*
+// ** Generate code that will tell the VDBE the names of columns
+// ** in the result set. This information is used to provide the
+// ** azCol[] values in the callback.
+// */
func _generateColumnNames(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pEList *XExprList) {
var _i, _fullNames, _shortNames, _4_iCol int32
var _3_zName, _4_zCol, _8_zName, _10_z *int8
@@ -79247,100 +80323,103 @@ func _generateColumnNames(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _p
var _pTab *XTable
var _v *TVdbe
var _2_p *XExpr
- _v = (*TVdbe)(_pParse.X2)
- _db = (*Xsqlite3)(_pParse.X0)
- if (_pParse.X54) != 0 {
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pParse.Xexplain != 0 {
return
}
- if ((_pParse.X4) != 0) || ((_db.X17) != 0) {
+ if (_pParse.XcolNamesSet != 0) || (_db.XmallocFailed != 0) {
return
}
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118115), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118115), unsafe.Pointer(&_generateColumnNamesØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pTabList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118116), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(100629)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118116), unsafe.Pointer(&_generateColumnNamesØ00__func__Ø000), unsafe.Pointer(str(100657)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pParse.X4))) = uint8(i32(1))
- _fullNames = bool2int(((_db.X6) & i32(4)) != i32(0))
- _shortNames = bool2int(((_db.X6) & i32(64)) != i32(0))
- _sqlite3VdbeSetNumCols(tls, _v, _pEList.X0)
- _i = i32(0)
+ _pParse.XcolNamesSet = uint8(1)
+ _fullNames = bool2int((_db.Xflags & int32(4)) != int32(0))
+ _shortNames = bool2int((_db.Xflags & int32(64)) != int32(0))
+ _sqlite3VdbeSetNumCols(tls, _v, _pEList.XnExpr)
+ _i = int32(0)
_7:
- if _i >= (_pEList.X0) {
+ if _i >= _pEList.XnExpr {
goto _10
}
- _2_p = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_i))).X0)
+ _2_p = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XpExpr)
if func() int32 {
if _2_p == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118124), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118124), unsafe.Pointer(&_generateColumnNamesØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _8
}
- if ((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_i))).X1) != nil {
- _3_zName = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_i))).X1
- _sqlite3VdbeSetColName(tls, _v, _i, i32(0), _3_zName, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ if (elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XzName) != nil {
+ _3_zName = elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XzName
+ _sqlite3VdbeSetColName(tls, _v, _i, int32(0), _3_zName, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
goto _31
}
- if int32(_2_p.X0) != i32(152) && int32(_2_p.X0) != i32(154) || store44(&_pTab, _tableWithCursor(tls, _pTabList, _2_p.X8)) == nil {
+ if int32(_2_p.Xop) != int32(152) && int32(_2_p.Xop) != int32(154) || store72(&_pTab, _tableWithCursor(tls, _pTabList, _2_p.XiTable)) == nil {
goto _18
}
- _4_iCol = int32(_2_p.X9)
- if _4_iCol < i32(0) {
- _4_iCol = int32(_pTab.X10)
+ _4_iCol = int32(_2_p.XiColumn)
+ if _4_iCol < int32(0) {
+ _4_iCol = int32(_pTab.XiPKey)
}
func() {
- if _4_iCol != i32(-1) && (_4_iCol < i32(0) || _4_iCol >= int32(_pTab.X11)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(118134), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateColumnNamesØ00__func__Ø000))), unsafe.Pointer(str(94506)))
+ if _4_iCol != int32(-1) && (_4_iCol < int32(0) || _4_iCol >= int32(_pTab.XnCol)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(118134), unsafe.Pointer(&_generateColumnNamesØ00__func__Ø000), unsafe.Pointer(str(94534)))
crt.X__builtin_abort(tls)
}
}()
- if _4_iCol < i32(0) {
- _4_zCol = str(27227)
+ if _4_iCol < int32(0) {
+ _4_zCol = str(27182)
goto _25
}
- _4_zCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_4_iCol))).X0
+ _4_zCol = elem41((*XColumn)(_pTab.XaCol), uintptr(_4_iCol)).XzName
_25:
if (_shortNames == 0) && (_fullNames == 0) {
- _sqlite3VdbeSetColName(tls, _v, _i, i32(0), _sqlite3DbStrDup(tls, _db, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))+20*uintptr(_i))).X2), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ _sqlite3VdbeSetColName(tls, _v, _i, int32(0), _sqlite3DbStrDup(tls, _db, elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XzSpan), func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
goto _30
}
if _fullNames != 0 {
_8_zName = nil
- _8_zName = _sqlite3MPrintf(tls, _db, str(8018), unsafe.Pointer(_pTab.X0), unsafe.Pointer(_4_zCol))
- _sqlite3VdbeSetColName(tls, _v, _i, i32(0), _8_zName, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ _8_zName = _sqlite3MPrintf(tls, _db, str(7919), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(_4_zCol))
+ _sqlite3VdbeSetColName(tls, _v, _i, int32(0), _8_zName, func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
goto _30
}
- _sqlite3VdbeSetColName(tls, _v, _i, i32(0), _4_zCol, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ _sqlite3VdbeSetColName(tls, _v, _i, int32(0), _4_zCol, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
_30:
goto _31
_18:
- _10_z = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_i))).X2
+ _10_z = elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XzSpan
_10_z = func() *int8 {
if _10_z == nil {
- return _sqlite3MPrintf(tls, _db, str(100641), _i+i32(1))
+ return _sqlite3MPrintf(tls, _db, str(100669), _i+int32(1))
}
return _sqlite3DbStrDup(tls, _db, _10_z)
}()
- _sqlite3VdbeSetColName(tls, _v, _i, i32(0), _10_z, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ _sqlite3VdbeSetColName(tls, _v, _i, int32(0), _10_z, func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
_31:
_8:
_i += 1
@@ -79352,20 +80431,23 @@ _10:
var _generateColumnNamesØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_generateColumnNamesØ00__func__Ø000[0], str(100650), 20)
+ crt.Xstrncpy(nil, &_generateColumnNamesØ00__func__Ø000[0], str(100678), 20)
}
-// Return the Table objecct in the SrcList that has cursor iCursor.
-// Or return NULL if no such Table object exists in the SrcList.
+// C comment
+// /*
+// ** Return the Table objecct in the SrcList that has cursor iCursor.
+// ** Or return NULL if no such Table object exists in the SrcList.
+// */
func _tableWithCursor(tls *crt.TLS, _pList *XSrcList, _iCursor int32) (r0 *XTable) {
var _j int32
- _j = i32(0)
+ _j = int32(0)
_0:
- if _j >= (_pList.X0) {
+ if _j >= _pList.XnSrc {
goto _3
}
- if ((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pList.X2))))) + 68*uintptr(_j))).X11) == _iCursor {
- return (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pList.X2))))) + 68*uintptr(_j))).X4)
+ if (elem6((*TSrcList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_j)).XiCursor) == _iCursor {
+ return (*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_j)).XpTab)
}
_j += 1
goto _0
@@ -79373,148 +80455,155 @@ _3:
return nil
}
-// Generate code that will tell the VDBE the declaration types of columns
-// in the result set.
+// C comment
+// /*
+// ** Generate code that will tell the VDBE the declaration types of columns
+// ** in the result set.
+// */
func _generateColumnTypes(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pEList *XExprList) {
var _i int32
var _1_zType *int8
var _v *TVdbe
var _1_p *XExpr
var _sNC XNameContext
- _v = (*TVdbe)(_pParse.X2)
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X1))))) = _pTabList
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X0))))) = _pParse
- *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X4))))) = nil
- _i = i32(0)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ *(**XSrcList)(unsafe.Pointer(&_sNC.XpSrcList)) = _pTabList
+ *(**XParse)(unsafe.Pointer(&_sNC.XpParse)) = _pParse
+ *(**XNameContext)(unsafe.Pointer(&_sNC.XpNext)) = nil
+ _i = int32(0)
_0:
- if _i >= (_pEList.X0) {
+ if _i >= _pEList.XnExpr {
goto _3
}
- _1_p = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_i))).X0)
+ _1_p = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XpExpr)
_1_zType = _columnTypeImpl(tls, &_sNC, _1_p, nil)
- _sqlite3VdbeSetColName(tls, _v, _i, i32(1), _1_zType, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ _sqlite3VdbeSetColName(tls, _v, _i, int32(1), _1_zType, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
_i += 1
goto _0
_3:
- _ = _sNC
-}
-
-// Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
-// is a no-op. Otherwise, it adds a single row of output to the EQP result,
-// where the caption is of one of the two forms:
-//
-// "COMPOSITE SUBQUERIES iSub1 and iSub2 (op)"
-// "COMPOSITE SUBQUERIES iSub1 and iSub2 USING TEMP B-TREE (op)"
-//
-// where iSub1 and iSub2 are the integers passed as the corresponding
-// function parameters, and op is the text representation of the parameter
-// of the same name. The parameter "op" must be one of TK_UNION, TK_EXCEPT,
-// TK_INTERSECT or TK_ALL. The first form is used if argument bUseTmp is
-// false, or the second form if it is true.
+}
+
+// C comment
+// /*
+// ** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
+// ** is a no-op. Otherwise, it adds a single row of output to the EQP result,
+// ** where the caption is of one of the two forms:
+// **
+// ** "COMPOSITE SUBQUERIES iSub1 and iSub2 (op)"
+// ** "COMPOSITE SUBQUERIES iSub1 and iSub2 USING TEMP B-TREE (op)"
+// **
+// ** where iSub1 and iSub2 are the integers passed as the corresponding
+// ** function parameters, and op is the text representation of the parameter
+// ** of the same name. The parameter "op" must be one of TK_UNION, TK_EXCEPT,
+// ** TK_INTERSECT or TK_ALL. The first form is used if argument bUseTmp is
+// ** false, or the second form if it is true.
+// */
func _explainComposite(tls *crt.TLS, _pParse *XParse, _op int32, _iSub1 int32, _iSub2 int32, _bUseTmp int32) {
var _1_zMsg *int8
var _1_v *TVdbe
func() {
- if _op != i32(115) && _op != i32(117) && _op != i32(118) && _op != i32(116) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117714), unsafe.Pointer((*int8)(unsafe.Pointer(&_explainCompositeØ00__func__Ø000))), unsafe.Pointer(str(100670)))
+ if _op != int32(115) && _op != int32(117) && _op != int32(118) && _op != int32(116) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117714), unsafe.Pointer(&_explainCompositeØ00__func__Ø000), unsafe.Pointer(str(100698)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pParse.X54) == i32(2) {
- _1_v = (*TVdbe)(_pParse.X2)
- _1_zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.X0), str(100734), _iSub1, _iSub2, unsafe.Pointer(func() *int8 {
+ if int32(_pParse.Xexplain) == int32(2) {
+ _1_v = (*TVdbe)(_pParse.XpVdbe)
+ _1_zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.Xdb), str(100762), _iSub1, _iSub2, unsafe.Pointer(func() *int8 {
if _bUseTmp != 0 {
- return str(100771)
+ return str(100799)
}
- return str(0)
+ return str(284)
}()), unsafe.Pointer(_selectOpName(tls, _op)))
- _sqlite3VdbeAddOp4(tls, _1_v, i32(165), _pParse.X58, i32(0), i32(0), _1_zMsg, i32(-1))
+ _sqlite3VdbeAddOp4(tls, _1_v, int32(165), _pParse.XiSelectId, int32(0), int32(0), _1_zMsg, int32(-1))
}
}
var _explainCompositeØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_explainCompositeØ00__func__Ø000[0], str(100790), 17)
+ crt.Xstrncpy(nil, &_explainCompositeØ00__func__Ø000[0], str(100818), 17)
}
-// Return the maximum height of any expression tree referenced
-// by the select statement passed as an argument.
+// C comment
+// /*
+// ** Return the maximum height of any expression tree referenced
+// ** by the select statement passed as an argument.
+// */
func _sqlite3SelectExprHeight(tls *crt.TLS, _p *XSelect) (r0 int32) {
var _nHeight int32
- _nHeight = i32(0)
+ _nHeight = int32(0)
_heightOfSelect(tls, _p, &_nHeight)
return _nHeight
}
-// Make copies of relevant WHERE clause terms of the outer query into
-// the WHERE clause of subquery. Example:
-//
-// SELECT * FROM (SELECT a AS x, c-d AS y FROM t1) WHERE x=5 AND y=10;
-//
-// Transformed into:
-//
-// SELECT * FROM (SELECT a AS x, c-d AS y FROM t1 WHERE a=5 AND c-d=10)
-// WHERE x=5 AND y=10;
-//
-// The hope is that the terms added to the inner query will make it more
-// efficient.
-//
-// Do not attempt this optimization if:
-//
-// (1) The inner query is an aggregate. (In that case, we'd really want
-// to copy the outer WHERE-clause terms onto the HAVING clause of the
-// inner query. But they probably won't help there so do not bother.)
-//
-// (2) The inner query is the recursive part of a common table expression.
-//
-// (3) The inner query has a LIMIT clause (since the changes to the WHERE
-// close would change the meaning of the LIMIT).
-//
-// (4) The inner query is the right operand of a LEFT JOIN. (The caller
-// enforces this restriction since this routine does not have enough
-// information to know.)
-//
-// (5) The WHERE clause expression originates in the ON or USING clause
-// of a LEFT JOIN.
-//
-// Return 0 if no changes are made and non-zero if one or more WHERE clause
-// terms are duplicated into the subquery.
+// C comment
+// /*
+// ** Make copies of relevant WHERE clause terms of the outer query into
+// ** the WHERE clause of subquery. Example:
+// **
+// ** SELECT * FROM (SELECT a AS x, c-d AS y FROM t1) WHERE x=5 AND y=10;
+// **
+// ** Transformed into:
+// **
+// ** SELECT * FROM (SELECT a AS x, c-d AS y FROM t1 WHERE a=5 AND c-d=10)
+// ** WHERE x=5 AND y=10;
+// **
+// ** The hope is that the terms added to the inner query will make it more
+// ** efficient.
+// **
+// ** Do not attempt this optimization if:
+// **
+// ** (1) The inner query is an aggregate. (In that case, we'd really want
+// ** to copy the outer WHERE-clause terms onto the HAVING clause of the
+// ** inner query. But they probably won't help there so do not bother.)
+// **
+// ** (2) The inner query is the recursive part of a common table expression.
+// **
+// ** (3) The inner query has a LIMIT clause (since the changes to the WHERE
+// ** close would change the meaning of the LIMIT).
+// **
+// ** (4) The inner query is the right operand of a LEFT JOIN. (The caller
+// ** enforces this restriction since this routine does not have enough
+// ** information to know.)
+// **
+// ** (5) The WHERE clause expression originates in the ON or USING clause
+// ** of a LEFT JOIN.
+// **
+// ** Return 0 if no changes are made and non-zero if one or more WHERE clause
+// ** terms are duplicated into the subquery.
+// */
func _pushDownWhereTerms(tls *crt.TLS, _pParse *XParse, _pSubq *XSelect, _pWhere *XExpr, _iCursor int32) (r0 int32) {
var _nChng int32
var _pX *XSelect
var _pNew *XExpr
var _6_x XSubstContext
- _nChng = i32(0)
+ _nChng = int32(0)
if _pWhere == nil {
- return i32(0)
+ return int32(0)
}
_pX = _pSubq
_1:
if _pX == nil {
goto _4
}
- if ((_pX.X3) & uint32(i32(8200))) != uint32(i32(0)) {
- return i32(0)
+ if (_pX.XselFlags & uint32(8200)) != (0) {
+ return int32(0)
}
- _pX = (*XSelect)(_pX.X13)
+ _pX = (*XSelect)(_pX.XpPrior)
goto _1
_4:
- if (*XExpr)(_pSubq.X15) != nil {
- return i32(0)
+ if (*XExpr)(_pSubq.XpLimit) != nil {
+ return int32(0)
}
_6:
- if int32(_pWhere.X0) == i32(71) {
- {
- p := &_nChng
- *p = (*p) + _pushDownWhereTerms(tls, _pParse, _pSubq, (*XExpr)(_pWhere.X5), _iCursor)
- sink1(*p)
- }
- _pWhere = (*XExpr)(_pWhere.X4)
+ if int32(_pWhere.Xop) == int32(71) {
+ _nChng += _pushDownWhereTerms(tls, _pParse, _pSubq, (*XExpr)(_pWhere.XpRight), _iCursor)
+ _pWhere = (*XExpr)(_pWhere.XpLeft)
goto _6
}
- if ((_pWhere.X2) & uint32(i32(1))) != uint32(i32(0)) {
- return i32(0)
+ if (_pWhere.Xflags & uint32(1)) != (0) {
+ return int32(0)
}
if _sqlite3ExprIsTableConstant(tls, _pWhere, _iCursor) == 0 {
goto _10
@@ -79522,64 +80611,70 @@ _6:
_nChng += 1
_11:
if _pSubq != nil {
- _pNew = _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.X0), _pWhere, i32(0))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_6_x.X0))))) = _pParse
- *(*int32)(unsafe.Pointer(&(_6_x.X1))) = _iCursor
- *(*int32)(unsafe.Pointer(&(_6_x.X2))) = _iCursor
- *(*int32)(unsafe.Pointer(&(_6_x.X3))) = i32(0)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_6_x.X4))))) = (*XExprList)(_pSubq.X0)
+ _pNew = _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.Xdb), _pWhere, int32(0))
+ *(**XParse)(unsafe.Pointer(&_6_x.XpParse)) = _pParse
+ _6_x.XiTable = _iCursor
+ _6_x.XiNewTable = _iCursor
+ _6_x.XisLeftJoin = int32(0)
+ *(**XExprList)(unsafe.Pointer(&_6_x.XpEList)) = (*XExprList)(_pSubq.XpEList)
_pNew = _substExpr(tls, &_6_x, _pNew)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSubq.X9))))) = _sqlite3ExprAnd(tls, (*Xsqlite3)(_pParse.X0), (*XExpr)(_pSubq.X9), _pNew)
- _pSubq = (*XSelect)(_pSubq.X13)
+ *(**XExpr)(unsafe.Pointer(&_pSubq.XpWhere)) = _sqlite3ExprAnd(tls, (*Xsqlite3)(_pParse.Xdb), (*XExpr)(_pSubq.XpWhere), _pNew)
+ _pSubq = (*XSelect)(_pSubq.XpPrior)
goto _11
}
_10:
return _nChng
-
- _ = _6_x
- panic(0)
}
-// Walk an expression tree. Return non-zero if the expression is constant
-// for any single row of the table with cursor iCur. In other words, the
-// expression must not refer to any non-deterministic function nor any
-// table other than iCur.
+// C comment
+// /*
+// ** Walk an expression tree. Return non-zero if the expression is constant
+// ** for any single row of the table with cursor iCur. In other words, the
+// ** expression must not refer to any non-deterministic function nor any
+// ** table other than iCur.
+// */
func _sqlite3ExprIsTableConstant(tls *crt.TLS, _p *XExpr, _iCur int32) (r0 int32) {
- return _exprIsConst(tls, _p, i32(3), _iCur)
+ return _exprIsConst(tls, _p, int32(3), _iCur)
}
-// Mark all temporary registers as being unavailable for reuse.
+// C comment
+// /*
+// ** Mark all temporary registers as being unavailable for reuse.
+// */
func _sqlite3ClearTempRegCache(tls *crt.TLS, _pParse *XParse) {
- *(*uint8)(unsafe.Pointer(&(_pParse.X7))) = uint8(i32(0))
- *(*int32)(unsafe.Pointer(&(_pParse.X14))) = i32(0)
+ _pParse.XnTempReg = 0
+ _pParse.XnRangeReg = int32(0)
}
-// Check to see if the pThis entry of pTabList is a self-join of a prior view.
-// If it is, then return the SrcList_item for the prior view. If it is not,
-// then return 0.
+// C comment
+// /*
+// ** Check to see if the pThis entry of pTabList is a self-join of a prior view.
+// ** If it is, then return the SrcList_item for the prior view. If it is not,
+// ** then return 0.
+// */
func _isSelfJoinView(tls *crt.TLS, _pTabList *XSrcList, _pThis *TSrcList_item) (r0 *TSrcList_item) {
var _pItem *TSrcList_item
- _pItem = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))
+ _pItem = (*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa))
_0:
- if uintptr(unsafe.Pointer(_pItem)) >= uintptr(unsafe.Pointer(_pThis)) {
+ if crt.P2U(unsafe.Pointer(_pItem)) >= crt.P2U(unsafe.Pointer(_pThis)) {
goto _3
}
- if (*XSelect)(_pItem.X5) == nil {
+ if (*XSelect)(_pItem.XpSelect) == nil {
goto _1
}
- if ((uint32(((*t28)(unsafe.Pointer(&(_pItem.X9))).X1)>>uint(i32(4))) << uint(i32(31))) >> uint(i32(31))) != 0 {
+ if ((uint32((_pItem.Xfg.XnotIndexed)>>4) << 31) >> 31) != 0 {
goto _1
}
- if (_pItem.X2) == nil {
+ if _pItem.XzName == nil {
goto _1
}
- if Xsqlite3_stricmp(tls, _pItem.X1, _pThis.X1) != i32(0) {
+ if Xsqlite3_stricmp(tls, _pItem.XzDatabase, _pThis.XzDatabase) != int32(0) {
goto _1
}
- if Xsqlite3_stricmp(tls, _pItem.X2, _pThis.X2) != i32(0) {
+ if Xsqlite3_stricmp(tls, _pItem.XzName, _pThis.XzName) != int32(0) {
goto _1
}
- if _sqlite3ExprCompare(tls, (*XExpr)((*XSelect)(_pThis.X5).X9), (*XExpr)((*XSelect)(_pItem.X5).X9), i32(-1)) != 0 {
+ if _sqlite3ExprCompare(tls, (*XExpr)((*XSelect)(_pThis.XpSelect).XpWhere), (*XExpr)((*XSelect)(_pItem.XpSelect).XpWhere), int32(-1)) != 0 {
goto _1
}
return _pItem
@@ -79592,101 +80687,107 @@ _3:
}
func _sqlite3VdbeChangeP1(tls *crt.TLS, _p *TVdbe, _addr uint32, _val int32) {
- *(*int32)(unsafe.Pointer(&(_sqlite3VdbeGetOp(tls, _p, int32(_addr)).X3))) = _val
+ _sqlite3VdbeGetOp(tls, _p, int32(_addr)).Xp1 = _val
}
-// Change the value of the opcode, or P1, P2, P3, or P5 operands
-// for a specific instruction.
+// C comment
+// /*
+// ** Change the value of the opcode, or P1, P2, P3, or P5 operands
+// ** for a specific instruction.
+// */
func _sqlite3VdbeChangeOpcode(tls *crt.TLS, _p *TVdbe, _addr uint32, _iNewOpcode uint8) {
- *(*uint8)(unsafe.Pointer(&(_sqlite3VdbeGetOp(tls, _p, int32(_addr)).X0))) = _iNewOpcode
-}
-
-// Generate the beginning of the loop used for WHERE clause processing.
-// The return value is a pointer to an opaque structure that contains
-// information needed to terminate the loop. Later, the calling routine
-// should invoke sqlite3WhereEnd() with the return value of this function
-// in order to complete the WHERE clause processing.
-//
-// If an error occurs, this routine returns NULL.
-//
-// The basic idea is to do a nested loop, one loop for each table in
-// the FROM clause of a select. (INSERT and UPDATE statements are the
-// same as a SELECT with only a single table in the FROM clause.) For
-// example, if the SQL is this:
-//
-// SELECT * FROM t1, t2, t3 WHERE ...;
-//
-// Then the code generated is conceptually like the following:
-//
-// foreach row1 in t1 do \ Code generated
-// foreach row2 in t2 do |-- by sqlite3WhereBegin()
-// foreach row3 in t3 do /
-// ...
-// end \ Code generated
-// end |-- by sqlite3WhereEnd()
-// end /
-//
-// Note that the loops might not be nested in the order in which they
-// appear in the FROM clause if a different order is better able to make
-// use of indices. Note also that when the IN operator appears in
-// the WHERE clause, it might result in additional nested loops for
-// scanning through all values on the right-hand side of the IN.
-//
-// There are Btree cursors associated with each table. t1 uses cursor
-// number pTabList->a[0].iCursor. t2 uses the cursor pTabList->a[1].iCursor.
-// And so forth. This routine generates code to open those VDBE cursors
-// and sqlite3WhereEnd() generates the code to close them.
-//
-// The code that sqlite3WhereBegin() generates leaves the cursors named
-// in pTabList pointing at their appropriate entries. The [...] code
-// can use OP_Column and OP_Rowid opcodes on these cursors to extract
-// data from the various tables of the loop.
-//
-// If the WHERE clause is empty, the foreach loops must each scan their
-// entire tables. Thus a three-way join is an O(N^3) operation. But if
-// the tables have indices and there are terms in the WHERE clause that
-// refer to those indices, a complete table scan can be avoided and the
-// code will run much faster. Most of the work of this routine is checking
-// to see if there are indices that can be used to speed up the loop.
-//
-// Terms of the WHERE clause are also used to limit which rows actually
-// make it to the "..." in the middle of the loop. After each "foreach",
-// terms of the WHERE clause that use only terms in that loop and outer
-// loops are evaluated and if false a jump is made around all subsequent
-// inner loops (or around the "..." if the test occurs within the inner-
-// most loop)
-//
-// OUTER JOINS
-//
-// An outer join of tables t1 and t2 is conceptally coded as follows:
-//
-// foreach row1 in t1 do
-// flag = 0
-// foreach row2 in t2 do
-// start:
-// ...
-// flag = 1
-// end
-// if flag==0 then
-// move the row2 cursor to a null row
-// goto start
-// fi
-// end
-//
-// ORDER BY CLAUSE PROCESSING
-//
-// pOrderBy is a pointer to the ORDER BY clause (or the GROUP BY clause
-// if the WHERE_GROUPBY flag is set in wctrlFlags) of a SELECT statement
-// if there is one. If there is no ORDER BY clause or if this routine
-// is called from an UPDATE or DELETE statement, then pOrderBy is NULL.
-//
-// The iIdxCur parameter is the cursor number of an index. If
-// WHERE_OR_SUBCLAUSE is set, iIdxCur is the cursor number of an index
-// to use for OR clause processing. The WHERE clause should use this
-// specific cursor. If WHERE_ONEPASS_DESIRED is set, then iIdxCur is
-// the first cursor in an array of cursors for all indices. iIdxCur should
-// be used to compute the appropriate cursor depending on which index is
-// used.
+ _sqlite3VdbeGetOp(tls, _p, int32(_addr)).Xopcode = _iNewOpcode
+}
+
+// C comment
+// /*
+// ** Generate the beginning of the loop used for WHERE clause processing.
+// ** The return value is a pointer to an opaque structure that contains
+// ** information needed to terminate the loop. Later, the calling routine
+// ** should invoke sqlite3WhereEnd() with the return value of this function
+// ** in order to complete the WHERE clause processing.
+// **
+// ** If an error occurs, this routine returns NULL.
+// **
+// ** The basic idea is to do a nested loop, one loop for each table in
+// ** the FROM clause of a select. (INSERT and UPDATE statements are the
+// ** same as a SELECT with only a single table in the FROM clause.) For
+// ** example, if the SQL is this:
+// **
+// ** SELECT * FROM t1, t2, t3 WHERE ...;
+// **
+// ** Then the code generated is conceptually like the following:
+// **
+// ** foreach row1 in t1 do \ Code generated
+// ** foreach row2 in t2 do |-- by sqlite3WhereBegin()
+// ** foreach row3 in t3 do /
+// ** ...
+// ** end \ Code generated
+// ** end |-- by sqlite3WhereEnd()
+// ** end /
+// **
+// ** Note that the loops might not be nested in the order in which they
+// ** appear in the FROM clause if a different order is better able to make
+// ** use of indices. Note also that when the IN operator appears in
+// ** the WHERE clause, it might result in additional nested loops for
+// ** scanning through all values on the right-hand side of the IN.
+// **
+// ** There are Btree cursors associated with each table. t1 uses cursor
+// ** number pTabList->a[0].iCursor. t2 uses the cursor pTabList->a[1].iCursor.
+// ** And so forth. This routine generates code to open those VDBE cursors
+// ** and sqlite3WhereEnd() generates the code to close them.
+// **
+// ** The code that sqlite3WhereBegin() generates leaves the cursors named
+// ** in pTabList pointing at their appropriate entries. The [...] code
+// ** can use OP_Column and OP_Rowid opcodes on these cursors to extract
+// ** data from the various tables of the loop.
+// **
+// ** If the WHERE clause is empty, the foreach loops must each scan their
+// ** entire tables. Thus a three-way join is an O(N^3) operation. But if
+// ** the tables have indices and there are terms in the WHERE clause that
+// ** refer to those indices, a complete table scan can be avoided and the
+// ** code will run much faster. Most of the work of this routine is checking
+// ** to see if there are indices that can be used to speed up the loop.
+// **
+// ** Terms of the WHERE clause are also used to limit which rows actually
+// ** make it to the "..." in the middle of the loop. After each "foreach",
+// ** terms of the WHERE clause that use only terms in that loop and outer
+// ** loops are evaluated and if false a jump is made around all subsequent
+// ** inner loops (or around the "..." if the test occurs within the inner-
+// ** most loop)
+// **
+// ** OUTER JOINS
+// **
+// ** An outer join of tables t1 and t2 is conceptally coded as follows:
+// **
+// ** foreach row1 in t1 do
+// ** flag = 0
+// ** foreach row2 in t2 do
+// ** start:
+// ** ...
+// ** flag = 1
+// ** end
+// ** if flag==0 then
+// ** move the row2 cursor to a null row
+// ** goto start
+// ** fi
+// ** end
+// **
+// ** ORDER BY CLAUSE PROCESSING
+// **
+// ** pOrderBy is a pointer to the ORDER BY clause (or the GROUP BY clause
+// ** if the WHERE_GROUPBY flag is set in wctrlFlags) of a SELECT statement
+// ** if there is one. If there is no ORDER BY clause or if this routine
+// ** is called from an UPDATE or DELETE statement, then pOrderBy is NULL.
+// **
+// ** The iIdxCur parameter is the cursor number of an index. If
+// ** WHERE_OR_SUBCLAUSE is set, iIdxCur is the cursor number of an index
+// ** to use for OR clause processing. The WHERE clause should use this
+// ** specific cursor. If WHERE_ONEPASS_DESIRED is set, then iIdxCur is
+// ** the first cursor in an array of cursors for all indices. iIdxCur should
+// ** be used to compute the appropriate cursor depending on which index is
+// ** used.
+// */
func _sqlite3WhereBegin(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pWhere *XExpr, _pOrderBy *XExprList, _pResultSet *XExprList, _wctrlFlags uint16, _iAuxArg int32) (r0 *XWhereInfo) {
var _nByteWInfo, _nTabList, _ii, _rc, _23_wsFlags, _23_bOnerow, _27_iDb, _29_iCur, _31_op, _33_n, _37_iIndexCur, _37_op, _45_addrExplain, _45_wsFlags int32
var _notReady, _9_m, _17_tabUsed, _33_b uint64
@@ -79703,323 +80804,312 @@ func _sqlite3WhereBegin(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pWh
var _19_pTerm, _19_pEnd *XWhereTerm
var _pMaskSet *XWhereMaskSet
var _sWLB XWhereLoopBuilder
- _v = (*TVdbe)(_pParse.X2)
- _bFordelete = u8(0)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _bFordelete = uint8(0)
func() {
- if (int32(_wctrlFlags)&i32(8)) != i32(0) && ((int32(_wctrlFlags)&i32(4)) == i32(0) || (int32(_wctrlFlags)&i32(32)) != i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134785), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(100807)))
+ if (int32(_wctrlFlags)&int32(8)) != int32(0) && ((int32(_wctrlFlags)&int32(4)) == int32(0) || (int32(_wctrlFlags)&int32(32)) != int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134785), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(100835)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_wctrlFlags)&i32(32)) != i32(0) && (int32(_wctrlFlags)&i32(16384)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134791), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(100935)))
+ if (int32(_wctrlFlags)&int32(32)) != int32(0) && (int32(_wctrlFlags)&int32(16384)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134791), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(100963)))
crt.X__builtin_abort(tls)
}
}()
- _db = (*Xsqlite3)(_pParse.X0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_sWLB), i32(0), u32(24))
- if (_pOrderBy != nil) && ((_pOrderBy.X0) >= i32(64)) {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ crt.Xmemset(tls, unsafe.Pointer(&_sWLB), int32(0), uint32(24))
+ if (_pOrderBy != nil) && (_pOrderBy.XnExpr >= int32(64)) {
_pOrderBy = nil
}
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sWLB.X2))))) = _pOrderBy
- if (int32(_db.X13) & i32(32)) != i32(0) {
+ *(**XExprList)(unsafe.Pointer(&_sWLB.XpOrderBy)) = _pOrderBy
+ if (int32(_db.XdbOptFlags) & int32(32)) != int32(0) {
{
p := &_wctrlFlags
- *p = uint16(int32(*p) & i32(-257))
- sink14(*p)
+ *p = uint16(int32(*p) & int32(-257))
}
}
- if (_pTabList.X0) > i32(64) {
- _sqlite3ErrorMsg(tls, _pParse, str(101009), i32(64))
+ if _pTabList.XnSrc > int32(64) {
+ _sqlite3ErrorMsg(tls, _pParse, str(101037), int32(64))
return nil
}
_nTabList = func() int32 {
- if (int32(_wctrlFlags) & i32(32)) != 0 {
- return i32(1)
+ if (int32(_wctrlFlags) & int32(32)) != 0 {
+ return int32(1)
}
- return (_pTabList.X0)
+ return _pTabList.XnSrc
}()
- _nByteWInfo = int32(((u32(820) + (uint32(_nTabList-i32(1)) * u32(76))) + uint32(i32(7))) & uint32(i32(-8)))
- _pWInfo = (*XWhereInfo)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(_nByteWInfo)+u32(72))))
- if (_db.X17) != 0 {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pWInfo))
+ _nByteWInfo = int32(((uint32(820) + (uint32(_nTabList-int32(1)) * uint32(76))) + uint32(7)) & uint32(4294967288))
+ _pWInfo = (*XWhereInfo)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(_nByteWInfo)+uint32(72))))
+ if _db.XmallocFailed != 0 {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pWInfo))
_pWInfo = nil
goto _whereBeginError
}
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWInfo.X0))))) = _pParse
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWInfo.X1))))) = _pTabList
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWInfo.X2))))) = _pOrderBy
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWInfo.X4))))) = _pWhere
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWInfo.X3))))) = _pResultSet
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_pWInfo.X6))))) + 4*uintptr(i32(0)))) = store1((*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_pWInfo.X6)))))+4*uintptr(i32(1)))), i32(-1))
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X11))) = uint8(_nTabList)
- *(*int32)(unsafe.Pointer(&(_pWInfo.X8))) = store1((*int32)(unsafe.Pointer(&(_pWInfo.X7))), _sqlite3VdbeMakeLabel(tls, _v))
- *(*uint16)(unsafe.Pointer(&(_pWInfo.X10))) = _wctrlFlags
- *(*int16)(unsafe.Pointer(&(_pWInfo.X5))) = int16(_iAuxArg)
- *(*int32)(unsafe.Pointer(&(_pWInfo.X9))) = int32(_pParse.X42)
- crt.Xmemset(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(&(_pWInfo.X12)))), i32(0), u32(29))
- crt.Xmemset(tls, (unsafe.Pointer)((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24)))))+76*uintptr(i32(0))))), i32(0), u32(72)+(uint32(_nTabList)*u32(76)))
+ *(**XParse)(unsafe.Pointer(&_pWInfo.XpParse)) = _pParse
+ *(**XSrcList)(unsafe.Pointer(&_pWInfo.XpTabList)) = _pTabList
+ *(**XExprList)(unsafe.Pointer(&_pWInfo.XpOrderBy)) = _pOrderBy
+ *(**XExpr)(unsafe.Pointer(&_pWInfo.XpWhere)) = _pWhere
+ *(**XExprList)(unsafe.Pointer(&_pWInfo.XpResultSet)) = _pResultSet
+ *elem8((*int32)(unsafe.Pointer(&_pWInfo.XaiCurOnePass)), 0) = store2(elem8((*int32)(unsafe.Pointer(&_pWInfo.XaiCurOnePass)), uintptr(1)), int32(-1))
+ _pWInfo.XnLevel = uint8(_nTabList)
+ _pWInfo.XiBreak = store2(&_pWInfo.XiContinue, _sqlite3VdbeMakeLabel(tls, _v))
+ _pWInfo.XwctrlFlags = _wctrlFlags
+ _pWInfo.XiLimit = int16(_iAuxArg)
+ _pWInfo.XsavedNQueryLoop = int32(_pParse.XnQueryLoop)
+ crt.Xmemset(tls, unsafe.Pointer(&_pWInfo.XnOBSat), int32(0), uint32(29))
+ crt.Xmemset(tls, unsafe.Pointer(elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), 0)), int32(0), uint32(72)+(uint32(_nTabList)*uint32(76)))
func() {
- if int32(_pWInfo.X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134853), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101037)))
+ if int32(_pWInfo.XeOnePass) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134853), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101065)))
crt.X__builtin_abort(tls)
}
}()
- _pMaskSet = (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23)))
- *(**XWhereInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sWLB.X0))))) = _pWInfo
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sWLB.X1))))) = (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22)))
- *(**XWhereLoop)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sWLB.X3))))) = (*XWhereLoop)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pWInfo)))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_nByteWInfo)))))))))
+ _pMaskSet = &_pWInfo.XsMaskSet
+ *(**XWhereInfo)(unsafe.Pointer(&_sWLB.XpWInfo)) = _pWInfo
+ *(**XWhereClause)(unsafe.Pointer(&_sWLB.XpWC)) = &_pWInfo.XsWC
+ *(**XWhereLoop)(unsafe.Pointer(&_sWLB.XpNew)) = (*XWhereLoop)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pWInfo)) + uintptr(_nByteWInfo)))))
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer((*XWhereLoop)(_sWLB.X3)))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134858), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101067)))
+ if (int32(uintptr(_sWLB.XpNew)) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134858), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101095)))
crt.X__builtin_abort(tls)
}
}()
- _whereLoopInit(tls, (*XWhereLoop)(_sWLB.X3))
- *(*int8)(unsafe.Pointer(&((*XWhereLoop)(_sWLB.X3).X2))) = int8(i32(42))
- *(*int32)(unsafe.Pointer(&(_pMaskSet.X0))) = i32(0)
- _sqlite3WhereClauseInit(tls, (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22))), _pWInfo)
- _sqlite3WhereSplit(tls, (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22))), _pWhere, uint8(i32(71)))
- _ii = i32(0)
+ _whereLoopInit(tls, (*XWhereLoop)(_sWLB.XpNew))
+ (*XWhereLoop)(_sWLB.XpNew).XcId = int8(42)
+ _pMaskSet.Xn = int32(0)
+ _sqlite3WhereClauseInit(tls, &_pWInfo.XsWC, _pWInfo)
+ _sqlite3WhereSplit(tls, &_pWInfo.XsWC, _pWhere, uint8(71))
+ _ii = int32(0)
_18:
- if _ii >= ((*XWhereClause)(_sWLB.X1).X3) {
+ if _ii >= ((*XWhereClause)(_sWLB.XpWC).XnTerm) {
goto _21
}
- if (_nTabList == i32(0)) || _sqlite3ExprIsConstantNotJoin(tls, (*XExpr)((*XWhereTerm)(unsafe.Pointer(uintptr((*XWhereClause)(_sWLB.X1).X5)+48*uintptr(_ii))).X0)) != 0 {
- _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)((*XWhereTerm)(unsafe.Pointer(uintptr((*XWhereClause)(_sWLB.X1).X5)+48*uintptr(_ii))).X0), _pWInfo.X8, i32(16))
+ if (_nTabList == int32(0)) || _sqlite3ExprIsConstantNotJoin(tls, (*XExpr)(elem100((*XWhereTerm)((*XWhereClause)(_sWLB.XpWC).Xa), uintptr(_ii)).XpExpr)) != 0 {
+ _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(elem100((*XWhereTerm)((*XWhereClause)(_sWLB.XpWC).Xa), uintptr(_ii)).XpExpr), _pWInfo.XiBreak, int32(16))
{
- p := (*uint16)(unsafe.Pointer(&((*XWhereTerm)(unsafe.Pointer(uintptr((*XWhereClause)(_sWLB.X1).X5) + 48*uintptr(_ii))).X3)))
- *p = uint16(int32(*p) | i32(4))
- sink14(*p)
+ p := &(elem100((*XWhereTerm)((*XWhereClause)(_sWLB.XpWC).Xa), uintptr(_ii)).XwtFlags)
+ *p = uint16(int32(*p) | int32(4))
}
}
_ii += 1
goto _18
_21:
- if _nTabList != i32(0) {
+ if _nTabList != int32(0) {
goto _24
}
if _pOrderBy != nil {
- *(*int8)(unsafe.Pointer(&(_pWInfo.X12))) = int8(_pOrderBy.X0)
+ _pWInfo.XnOBSat = int8(_pOrderBy.XnExpr)
}
- if (int32(_wctrlFlags) & i32(256)) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X16))) = uint8(i32(1))
+ if (int32(_wctrlFlags) & int32(256)) != 0 {
+ _pWInfo.XeDistinct = uint8(1)
}
_24:
- _ii = i32(0)
+ _ii = int32(0)
_27:
- if _ii >= (_pTabList.X0) {
+ if _ii >= _pTabList.XnSrc {
goto _30
}
- _createMask(tls, _pMaskSet, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))+68*uintptr(_ii))).X11)
- _sqlite3WhereTabFuncArgs(tls, _pParse, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))+68*uintptr(_ii))), (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22))))
+ _createMask(tls, _pMaskSet, elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_ii)).XiCursor)
+ _sqlite3WhereTabFuncArgs(tls, _pParse, elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_ii)), &_pWInfo.XsWC)
_ii += 1
goto _27
_30:
- _ii = i32(0)
+ _ii = int32(0)
_31:
- if _ii >= (_pTabList.X0) {
+ if _ii >= _pTabList.XnSrc {
goto _34
}
- _9_m = _sqlite3WhereGetMask(tls, _pMaskSet, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))+68*uintptr(_ii))).X11)
+ _9_m = _sqlite3WhereGetMask(tls, _pMaskSet, elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_ii)).XiCursor)
func() {
- if _9_m != (u64(1) << uint(_ii)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134912), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101099)))
+ if _9_m != (uint64(1) << uint(_ii)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134912), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101127)))
crt.X__builtin_abort(tls)
}
}()
_ii += 1
goto _31
_34:
- _sqlite3WhereExprAnalyze(tls, _pTabList, (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22))))
- if (_db.X17) != 0 {
+ _sqlite3WhereExprAnalyze(tls, _pTabList, &_pWInfo.XsWC)
+ if _db.XmallocFailed != 0 {
goto _whereBeginError
}
- if (int32(_wctrlFlags) & i32(256)) == 0 {
+ if (int32(_wctrlFlags) & int32(256)) == 0 {
goto _38
}
- if _isDistinctRedundant(tls, _pParse, _pTabList, (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22))), _pResultSet) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X16))) = uint8(i32(1))
+ if _isDistinctRedundant(tls, _pParse, _pTabList, &_pWInfo.XsWC, _pResultSet) != 0 {
+ _pWInfo.XeDistinct = uint8(1)
goto _41
}
if _pOrderBy == nil {
{
- p := (*uint16)(unsafe.Pointer(&(_pWInfo.X10)))
- *p = uint16(int32(*p) | i32(128))
- sink14(*p)
+ p := &_pWInfo.XwctrlFlags
+ *p = uint16(int32(*p) | int32(128))
}
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWInfo.X2))))) = _pResultSet
+ *(**XExprList)(unsafe.Pointer(&_pWInfo.XpOrderBy)) = _pResultSet
}
_41:
_38:
- if _nTabList == i32(1) && _whereShortCut(tls, &_sWLB) != i32(0) {
+ if _nTabList == int32(1) && _whereShortCut(tls, &_sWLB) != int32(0) {
goto _43
}
_rc = _whereLoopAddAll(tls, &_sWLB)
if _rc != 0 {
goto _whereBeginError
}
- _wherePathSolver(tls, _pWInfo, int16(i32(0)))
- if (_db.X17) != 0 {
+ _wherePathSolver(tls, _pWInfo, 0)
+ if _db.XmallocFailed != 0 {
goto _whereBeginError
}
- if (*XExprList)(_pWInfo.X2) == nil {
+ if _pWInfo.XpOrderBy == nil {
goto _46
}
- _wherePathSolver(tls, _pWInfo, int16(int32(_pWInfo.X21)+i32(1)))
- if (_db.X17) != 0 {
+ _wherePathSolver(tls, _pWInfo, int16(int32(_pWInfo.XnRowOut)+int32(1)))
+ if _db.XmallocFailed != 0 {
goto _whereBeginError
}
_46:
_43:
- if ((*XExprList)(_pWInfo.X2) == nil) && (((_db.X6) & i32(131072)) != i32(0)) {
- *(*uint64)(unsafe.Pointer(&(_pWInfo.X20))) = u64(18446744073709551615)
+ if ((*XExprList)(_pWInfo.XpOrderBy) == nil) && ((_db.Xflags & int32(131072)) != int32(0)) {
+ _pWInfo.XrevMask = uint64(18446744073709551615)
}
- if (_pParse.X16) != 0 || func() int32 {
- if (_db.X17) != 0 {
+ if _pParse.XnErr != 0 || func() int32 {
+ if _db.XmallocFailed != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134972), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134972), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _whereBeginError
}
- if int32(_pWInfo.X11) < i32(2) || _pResultSet == nil || (int32(_db.X13)&i32(1024)) != i32(0) {
+ if int32(_pWInfo.XnLevel) < int32(2) || _pResultSet == nil || (int32(_db.XdbOptFlags)&int32(1024)) != int32(0) {
goto _56
}
_17_tabUsed = _sqlite3WhereExprListUsage(tls, _pMaskSet, _pResultSet)
- if (*XExprList)(_sWLB.X2) != nil {
- {
- p := &_17_tabUsed
- *p = (*p) | _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(_sWLB.X2))
- sink17(*p)
- }
+ if _sWLB.XpOrderBy != nil {
+ _17_tabUsed |= _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(_sWLB.XpOrderBy))
}
_57:
- if int32(_pWInfo.X11) < i32(2) {
+ if int32(_pWInfo.XnLevel) < int32(2) {
goto _59
}
- _pLoop = (*XWhereLoop)((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(int32(_pWInfo.X11)-i32(1)))).X18)
- if (int32((*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.X1).X2))))) + 68*uintptr(_pLoop.X3))).X9))).X0) & i32(8)) == i32(0) {
+ _pLoop = (*XWhereLoop)(elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), uintptr(int32(_pWInfo.XnLevel)-int32(1))).XpWLoop)
+ if (int32((elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.XpTabList).Xa))), uintptr(_pLoop.XiTab)).Xfg).Xjointype) & int32(8)) == int32(0) {
goto _59
}
- if ((int32(_wctrlFlags) & i32(256)) == i32(0)) && (((_pLoop.X9) & uint32(i32(4096))) == uint32(i32(0))) {
+ if ((int32(_wctrlFlags) & int32(256)) == int32(0)) && ((_pLoop.XwsFlags & uint32(4096)) == (0)) {
goto _59
}
- if (_17_tabUsed & (_pLoop.X1)) != uint64(i32(0)) {
+ if (_17_tabUsed & _pLoop.XmaskSelf) != (0) {
goto _59
}
- _19_pEnd = (*XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereTerm)((*XWhereClause)(_sWLB.X1).X5))) + uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr((*XWhereClause)(_sWLB.X1).X3)))))*uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(48)))))))))))
- _19_pTerm = (*XWhereTerm)((*XWhereClause)(_sWLB.X1).X5)
+ _19_pEnd = (*XWhereTerm)(unsafe.Pointer(uintptr((*XWhereClause)(_sWLB.XpWC).Xa) + uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr((*XWhereClause)(_sWLB.XpWC).XnTerm)*uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(48)))))))))))
+ _19_pTerm = (*XWhereTerm)((*XWhereClause)(_sWLB.XpWC).Xa)
_64:
- if uintptr(unsafe.Pointer(_19_pTerm)) >= uintptr(unsafe.Pointer(_19_pEnd)) {
+ if crt.P2U(unsafe.Pointer(_19_pTerm)) >= crt.P2U(unsafe.Pointer(_19_pEnd)) {
goto _67
}
- if (((_19_pTerm.X12) & (_pLoop.X1)) != uint64(i32(0))) && ((((*XExpr)(_19_pTerm.X0).X2) & uint32(i32(1))) == uint32(i32(0))) {
+ if ((_19_pTerm.XprereqAll & _pLoop.XmaskSelf) != (0)) && ((((*XExpr)(_19_pTerm.XpExpr).Xflags) & uint32(1)) == (0)) {
goto _67
}
*(*uintptr)(unsafe.Pointer(&_19_pTerm)) += uintptr(48)
goto _64
_67:
- if uintptr(unsafe.Pointer(_19_pTerm)) < uintptr(unsafe.Pointer(_19_pEnd)) {
+ if crt.P2U(unsafe.Pointer(_19_pTerm)) < crt.P2U(unsafe.Pointer(_19_pEnd)) {
goto _59
}
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X11))) -= 1
+ _pWInfo.XnLevel -= 1
_nTabList -= 1
goto _57
_59:
_56:
- {
- p := (*uint32)(unsafe.Pointer(&((*XParse)(_pWInfo.X0).X42)))
- *p = (*p) + uint32(_pWInfo.X21)
- sink5(*p)
- }
+ (*XParse)(_pWInfo.XpParse).XnQueryLoop += uint32(_pWInfo.XnRowOut)
func() {
- if (int32(_wctrlFlags)&i32(4)) != i32(0) && int32(_pWInfo.X11) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135040), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101114)))
+ if (int32(_wctrlFlags)&int32(4)) != int32(0) && int32(_pWInfo.XnLevel) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135040), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101142)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_wctrlFlags) & i32(4)) == i32(0) {
+ if (int32(_wctrlFlags) & int32(4)) == int32(0) {
goto _74
}
- _23_wsFlags = int32((*XWhereLoop)((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(i32(0)))).X18).X9)
- _23_bOnerow = bool2int((_23_wsFlags & i32(4096)) != i32(0))
- if _23_bOnerow == 0 && ((int32(_wctrlFlags)&i32(8)) == i32(0) || i32(0) != (_23_wsFlags&i32(1024))) {
+ _23_wsFlags = int32((*XWhereLoop)(elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), 0).XpWLoop).XwsFlags)
+ _23_bOnerow = bool2int((_23_wsFlags & int32(4096)) != int32(0))
+ if _23_bOnerow == 0 && ((int32(_wctrlFlags)&int32(8)) == int32(0) || int32(0) != (_23_wsFlags&int32(1024))) {
goto _77
}
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X14))) = uint8(func() int32 {
+ _pWInfo.XeOnePass = uint8(func() int32 {
if _23_bOnerow != 0 {
- return i32(1)
+ return int32(1)
}
- return i32(2)
+ return int32(2)
}())
- if (((*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))+68*uintptr(i32(0)))).X4).X9)&uint32(i32(32))) != uint32(i32(0)) || (_23_wsFlags&i32(64)) == 0 {
+ if (((*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), 0).XpTab).XtabFlags)&uint32(32)) != (0) || (_23_wsFlags&int32(64)) == 0 {
goto _81
}
- if (int32(_wctrlFlags) & i32(8)) != 0 {
- _bFordelete = uint8(i32(8))
+ if (int32(_wctrlFlags) & int32(8)) != 0 {
+ _bFordelete = uint8(8)
}
- *(*uint32)(unsafe.Pointer(&((*XWhereLoop)((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(i32(0)))).X18).X9))) = uint32(_23_wsFlags & i32(-65))
+ (*XWhereLoop)(elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), 0).XpWLoop).XwsFlags = uint32(_23_wsFlags & int32(-65))
_81:
_77:
_74:
- *func() **XWhereLevel { _ii = i32(0); return &_pLevel }() = (*XWhereLevel)(unsafe.Pointer((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24)))))
+ *func() **XWhereLevel { _ii = int32(0); return &_pLevel }() = (*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa))
_83:
if _ii >= _nTabList {
goto _86
}
- _27_pTabItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(_pLevel.X11)))
- _27_pTab = (*XTable)(_27_pTabItem.X4)
- _27_iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_27_pTab.X20))
- _pLoop = (*XWhereLoop)(_pLevel.X18)
- if (((_27_pTab.X9) & uint32(i32(2))) != uint32(i32(0))) || ((*XSelect)(_27_pTab.X3) != nil) {
+ _27_pTabItem = elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_pLevel.XiFrom))
+ _27_pTab = (*XTable)(_27_pTabItem.XpTab)
+ _27_iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_27_pTab.XpSchema))
+ _pLoop = (*XWhereLoop)(_pLevel.XpWLoop)
+ if ((_27_pTab.XtabFlags & uint32(2)) != (0)) || (_27_pTab.XpSelect != nil) {
goto _108
}
- if ((_pLoop.X9) & uint32(i32(1024))) != uint32(i32(0)) {
+ if (_pLoop.XwsFlags & uint32(1024)) != (0) {
_29_pVTab = (*int8)(unsafe.Pointer(_sqlite3GetVTable(tls, _db, _27_pTab)))
- _29_iCur = _27_pTabItem.X11
- _sqlite3VdbeAddOp4(tls, _v, i32(158), _29_iCur, i32(0), i32(0), _29_pVTab, i32(-8))
+ _29_iCur = _27_pTabItem.XiCursor
+ _sqlite3VdbeAddOp4(tls, _v, int32(158), _29_iCur, int32(0), int32(0), _29_pVTab, int32(-8))
goto _108
}
- if (_27_pTab.X16) != 0 {
+ if _27_pTab.XnModuleArg != 0 {
goto _108
}
- if ((_pLoop.X9)&uint32(i32(64))) != uint32(i32(0)) || (int32(_wctrlFlags)&i32(32)) != i32(0) {
+ if (_pLoop.XwsFlags&uint32(64)) != (0) || (int32(_wctrlFlags)&int32(32)) != int32(0) {
goto _95
}
- _31_op = i32(106)
- if int32(_pWInfo.X14) != i32(0) {
- _31_op = i32(107)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_pWInfo.X6))))) + 4*uintptr(i32(0)))) = _27_pTabItem.X11
+ _31_op = int32(106)
+ if int32(_pWInfo.XeOnePass) != int32(0) {
+ _31_op = int32(107)
+ *elem8((*int32)(unsafe.Pointer(&_pWInfo.XaiCurOnePass)), 0) = _27_pTabItem.XiCursor
}
- _sqlite3OpenTable(tls, _pParse, _27_pTabItem.X11, _27_iDb, _27_pTab, _31_op)
+ _sqlite3OpenTable(tls, _pParse, _27_pTabItem.XiCursor, _27_iDb, _27_pTab, _31_op)
func() {
- if (_27_pTabItem.X11) != (_pLevel.X1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135090), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101175)))
+ if _27_pTabItem.XiCursor != _pLevel.XiTabCur {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135090), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101203)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pWInfo.X14) != i32(0) || int32(_27_pTab.X11) >= i32(64) || ((_27_pTab.X9)&uint32(i32(32))) != uint32(i32(0)) {
+ if int32(_pWInfo.XeOnePass) != int32(0) || int32(_27_pTab.XnCol) >= int32(64) || (_27_pTab.XtabFlags&uint32(32)) != (0) {
goto _101
}
- _33_b = _27_pTabItem.X14
- _33_n = i32(0)
+ _33_b = _27_pTabItem.XcolUsed
+ _33_n = int32(0)
_102:
if _33_b == 0 {
goto _105
}
- *func() *int32 { _33_b = _33_b >> uint(i32(1)); return &_33_n }() += 1
+ *func() *int32 { _33_b = _33_b >> 1; return &_33_n }() += 1
goto _102
_105:
- _sqlite3VdbeChangeP4(tls, _v, i32(-1), (*int8)((unsafe.Pointer)(uintptr(_33_n))), i32(-11))
+ _sqlite3VdbeChangeP4(tls, _v, int32(-1), (*int8)(crt.U2P(uintptr(_33_n))), int32(-11))
func() {
- if _33_n > int32(_27_pTab.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135098), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101210)))
+ if _33_n > int32(_27_pTab.XnCol) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135098), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101238)))
crt.X__builtin_abort(tls)
}
}()
@@ -80027,116 +81117,116 @@ _101:
_sqlite3VdbeChangeP5(tls, _v, uint16(_bFordelete))
goto _108
_95:
- _sqlite3TableLock(tls, _pParse, _27_iDb, _27_pTab.X7, uint8(i32(0)), _27_pTab.X0)
+ _sqlite3TableLock(tls, _pParse, _27_iDb, _27_pTab.Xtnum, 0, _27_pTab.XzName)
_108:
- if ((_pLoop.X9) & uint32(i32(512))) == 0 {
+ if (_pLoop.XwsFlags & uint32(512)) == 0 {
goto _109
}
- _37_pIx = (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4)
- _37_op = i32(106)
+ _37_pIx = (*XIndex)((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex)
+ _37_op = int32(106)
func() {
- if _iAuxArg == i32(0) && (int32(_pWInfo.X10)&i32(4)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135120), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101224)))
+ if _iAuxArg == int32(0) && (int32(_pWInfo.XwctrlFlags)&int32(4)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135120), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101252)))
crt.X__builtin_abort(tls)
}
}()
- if ((((_27_pTab.X9) & uint32(i32(32))) != uint32(i32(0))) && (int32((uint32(_37_pIx.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(2))) && ((int32(_wctrlFlags) & i32(32)) != i32(0)) {
- _37_iIndexCur = _pLevel.X1
- _37_op = i32(0)
+ if (((_27_pTab.XtabFlags & uint32(32)) != (0)) && (int32((uint32(_37_pIx.XidxType)<<30)>>30) == int32(2))) && ((int32(_wctrlFlags) & int32(32)) != int32(0)) {
+ _37_iIndexCur = _pLevel.XiTabCur
+ _37_op = int32(0)
goto _128
}
- if int32(_pWInfo.X14) == i32(0) {
+ if int32(_pWInfo.XeOnePass) == int32(0) {
goto _117
}
- _39_pJ = (*XIndex)((*XTable)(_27_pTabItem.X4).X2)
+ _39_pJ = (*XIndex)((*XTable)(_27_pTabItem.XpTab).XpIndex)
_37_iIndexCur = _iAuxArg
func() {
- if (int32(_wctrlFlags) & i32(4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135131), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101286)))
+ if (int32(_wctrlFlags) & int32(4)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135131), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101314)))
crt.X__builtin_abort(tls)
}
}()
_120:
if func() int32 {
if _39_pJ != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135132), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135132), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 && (_39_pJ != _37_pIx) {
_37_iIndexCur += 1
- _39_pJ = (*XIndex)(_39_pJ.X5)
+ _39_pJ = (*XIndex)(_39_pJ.XpNext)
goto _120
}
- _37_op = i32(107)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_pWInfo.X6))))) + 4*uintptr(i32(1)))) = _37_iIndexCur
+ _37_op = int32(107)
+ *elem8((*int32)(unsafe.Pointer(&_pWInfo.XaiCurOnePass)), uintptr(1)) = _37_iIndexCur
goto _128
_117:
- if _iAuxArg != 0 && ((int32(_wctrlFlags) & i32(32)) != i32(0)) {
+ if _iAuxArg != 0 && ((int32(_wctrlFlags) & int32(32)) != int32(0)) {
_37_iIndexCur = _iAuxArg
- _37_op = i32(105)
+ _37_op = int32(105)
goto _128
}
- _37_iIndexCur = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ _37_iIndexCur = postInc2(&_pParse.XnTab, 1)
_128:
- *(*int32)(unsafe.Pointer(&(_pLevel.X2))) = _37_iIndexCur
+ _pLevel.XiIdxCur = _37_iIndexCur
func() {
- if (*XSchema)(_37_pIx.X6) != (*XSchema)(_27_pTab.X20) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135145), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101321)))
+ if (*XSchema)(_37_pIx.XpSchema) != (*XSchema)(_27_pTab.XpSchema) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135145), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101349)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _37_iIndexCur < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135146), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000))), unsafe.Pointer(str(101349)))
+ if _37_iIndexCur < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135146), unsafe.Pointer(&_sqlite3WhereBeginØ00__func__Ø000), unsafe.Pointer(str(101377)))
crt.X__builtin_abort(tls)
}
}()
if _37_op == 0 {
goto _133
}
- _sqlite3VdbeAddOp3(tls, _v, _37_op, _37_iIndexCur, _37_pIx.X11, _27_iDb)
+ _sqlite3VdbeAddOp3(tls, _v, _37_op, _37_iIndexCur, _37_pIx.Xtnum, _27_iDb)
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _37_pIx)
- if (((((_pLoop.X9) & uint32(i32(15))) != uint32(i32(0))) && (((_pLoop.X9) & uint32(i32(32770))) == uint32(i32(0)))) && ((int32(_pWInfo.X10) & i32(1)) == i32(0))) && (int32(_pWInfo.X16) != i32(2)) {
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(2)))
+ if ((((_pLoop.XwsFlags & uint32(15)) != (0)) && ((_pLoop.XwsFlags & uint32(32770)) == (0))) && ((int32(_pWInfo.XwctrlFlags) & int32(1)) == int32(0))) && (int32(_pWInfo.XeDistinct) != int32(2)) {
+ _sqlite3VdbeChangeP5(tls, _v, uint16(2))
}
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_37_pIx.X0))
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_37_pIx.XzName))
_133:
_109:
- if _27_iDb >= i32(0) {
+ if _27_iDb >= int32(0) {
_sqlite3CodeVerifySchema(tls, _pParse, _27_iDb)
}
*(*uintptr)(unsafe.Pointer(func() **XWhereLevel { _ii += 1; return &_pLevel }())) += uintptr(76)
goto _83
_86:
- *(*int32)(unsafe.Pointer(&(_pWInfo.X18))) = _sqlite3VdbeCurrentAddr(tls, _v)
- if (_db.X17) != 0 {
+ _pWInfo.XiTop = _sqlite3VdbeCurrentAddr(tls, _v)
+ if _db.XmallocFailed != 0 {
goto _whereBeginError
}
- _notReady = u64(18446744073709551615)
- _ii = i32(0)
+ _notReady = uint64(18446744073709551615)
+ _ii = int32(0)
_140:
if _ii >= _nTabList {
goto _143
}
- _pLevel = (*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(_ii)))
- _45_wsFlags = int32((*XWhereLoop)(_pLevel.X18).X9)
- if (((*XWhereLoop)(_pLevel.X18).X9) & uint32(i32(16384))) == uint32(i32(0)) {
+ _pLevel = elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), uintptr(_ii))
+ _45_wsFlags = int32((*XWhereLoop)(_pLevel.XpWLoop).XwsFlags)
+ if (((*XWhereLoop)(_pLevel.XpWLoop).XwsFlags) & uint32(16384)) == (0) {
goto _144
}
- _constructAutomaticIndex(tls, _pParse, (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22))), (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))+68*uintptr(_pLevel.X11))), _notReady, _pLevel)
- if (_db.X17) != 0 {
+ _constructAutomaticIndex(tls, _pParse, &_pWInfo.XsWC, elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_pLevel.XiFrom)), _notReady, _pLevel)
+ if _db.XmallocFailed != 0 {
goto _whereBeginError
}
_144:
- _45_addrExplain = _sqlite3WhereExplainOneScan(tls, _pParse, _pTabList, _pLevel, _ii, int32(_pLevel.X11), _wctrlFlags)
- *(*int32)(unsafe.Pointer(&(_pLevel.X8))) = _sqlite3VdbeCurrentAddr(tls, _v)
+ _45_addrExplain = _sqlite3WhereExplainOneScan(tls, _pParse, _pTabList, _pLevel, _ii, int32(_pLevel.XiFrom), _wctrlFlags)
+ _pLevel.XaddrBody = _sqlite3VdbeCurrentAddr(tls, _v)
_notReady = _sqlite3WhereCodeOneLoopStart(tls, _pWInfo, _ii, _notReady)
- *(*int32)(unsafe.Pointer(&(_pWInfo.X7))) = _pLevel.X6
- if ((_45_wsFlags & i32(8192)) == i32(0)) && ((int32(_wctrlFlags) & i32(32)) == i32(0)) {
+ _pWInfo.XiContinue = _pLevel.XaddrCont
+ if ((_45_wsFlags & int32(8192)) == int32(0)) && ((int32(_wctrlFlags) & int32(32)) == int32(0)) {
}
_ii += 1
goto _140
@@ -80145,12 +81235,11 @@ _143:
_whereBeginError:
if _pWInfo != nil {
- *(*uint32)(unsafe.Pointer(&(_pParse.X42))) = uint32(_pWInfo.X9)
+ _pParse.XnQueryLoop = uint32(_pWInfo.XsavedNQueryLoop)
_whereInfoFree(tls, _db, _pWInfo)
}
return nil
- _ = _sWLB
_ = _45_addrExplain
panic(0)
}
@@ -80158,284 +81247,297 @@ _whereBeginError:
var _sqlite3WhereBeginØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WhereBeginØ00__func__Ø000[0], str(101362), 18)
+ crt.Xstrncpy(nil, &_sqlite3WhereBeginØ00__func__Ø000[0], str(101390), 18)
}
-// Convert bulk memory into a valid WhereLoop that can be passed
-// to whereLoopClear harmlessly.
+// C comment
+// /*
+// ** Convert bulk memory into a valid WhereLoop that can be passed
+// ** to whereLoopClear harmlessly.
+// */
func _whereLoopInit(tls *crt.TLS, _p *XWhereLoop) {
- *(***XWhereTerm)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = (**XWhereTerm)(unsafe.Pointer((*[3]unsafe.Pointer)(unsafe.Pointer(&(_p.X15)))))
- *(*uint16)(unsafe.Pointer(&(_p.X10))) = uint16(i32(0))
- *(*uint16)(unsafe.Pointer(&(_p.X12))) = uint16(i32(3))
- *(*uint32)(unsafe.Pointer(&(_p.X9))) = uint32(i32(0))
+ *(***XWhereTerm)(unsafe.Pointer(&_p.XaLTerm)) = (**XWhereTerm)(unsafe.Pointer(&_p.XaLTermSpace))
+ _p.XnLTerm = 0
+ _p.XnLSlot = uint16(3)
+ _p.XwsFlags = 0
}
-// Initialize a preallocated WhereClause structure.
+// C comment
+// /*
+// ** Initialize a preallocated WhereClause structure.
+// */
func _sqlite3WhereClauseInit(tls *crt.TLS, _pWC *XWhereClause, _pWInfo *XWhereInfo) {
- *(**XWhereInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWC.X0))))) = _pWInfo
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWC.X1))))) = nil
- *(*int32)(unsafe.Pointer(&(_pWC.X3))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_pWC.X4))) = i32(8)
- *(**XWhereTerm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWC.X5))))) = (*XWhereTerm)(unsafe.Pointer((*[8]XWhereTerm)(unsafe.Pointer(&(_pWC.X6)))))
-}
-
-// This routine identifies subexpressions in the WHERE clause where
-// each subexpression is separated by the AND operator or some other
-// operator specified in the op parameter. The WhereClause structure
-// is filled with pointers to subexpressions. For example:
-//
-// WHERE a=='hello' AND coalesce(b,11)<10 AND (c+12!=d OR c==22)
-// \________/ \_______________/ \________________/
-// slot[0] slot[1] slot[2]
-//
-// The original WHERE clause in pExpr is unaltered. All this routine
-// does is make slot[] entries point to substructure within pExpr.
-//
-// In the previous sentence and in the diagram, "slot[]" refers to
-// the WhereClause.a[] array. The slot[] array grows as needed to contain
-// all terms of the WHERE clause.
+ *(**XWhereInfo)(unsafe.Pointer(&_pWC.XpWInfo)) = _pWInfo
+ *(**XWhereClause)(unsafe.Pointer(&_pWC.XpOuter)) = nil
+ _pWC.XnTerm = int32(0)
+ _pWC.XnSlot = int32(8)
+ *(**XWhereTerm)(unsafe.Pointer(&_pWC.Xa)) = (*XWhereTerm)(unsafe.Pointer(&_pWC.XaStatic))
+}
+
+// C comment
+// /*
+// ** This routine identifies subexpressions in the WHERE clause where
+// ** each subexpression is separated by the AND operator or some other
+// ** operator specified in the op parameter. The WhereClause structure
+// ** is filled with pointers to subexpressions. For example:
+// **
+// ** WHERE a=='hello' AND coalesce(b,11)<10 AND (c+12!=d OR c==22)
+// ** \________/ \_______________/ \________________/
+// ** slot[0] slot[1] slot[2]
+// **
+// ** The original WHERE clause in pExpr is unaltered. All this routine
+// ** does is make slot[] entries point to substructure within pExpr.
+// **
+// ** In the previous sentence and in the diagram, "slot[]" refers to
+// ** the WhereClause.a[] array. The slot[] array grows as needed to contain
+// ** all terms of the WHERE clause.
+// */
func _sqlite3WhereSplit(tls *crt.TLS, _pWC *XWhereClause, _pExpr *XExpr, _op uint8) {
var _pE2 *XExpr
_pE2 = _sqlite3ExprSkipCollate(tls, _pExpr)
- *(*uint8)(unsafe.Pointer(&(_pWC.X2))) = _op
+ _pWC.Xop = _op
if _pE2 == nil {
return
}
- if int32(_pE2.X0) != int32(_op) {
- _whereClauseInsert(tls, _pWC, _pExpr, uint16(i32(0)))
+ if int32(_pE2.Xop) != int32(_op) {
+ _whereClauseInsert(tls, _pWC, _pExpr, 0)
goto _2
}
- _sqlite3WhereSplit(tls, _pWC, (*XExpr)(_pE2.X4), _op)
- _sqlite3WhereSplit(tls, _pWC, (*XExpr)(_pE2.X5), _op)
+ _sqlite3WhereSplit(tls, _pWC, (*XExpr)(_pE2.XpLeft), _op)
+ _sqlite3WhereSplit(tls, _pWC, (*XExpr)(_pE2.XpRight), _op)
_2:
}
-// Add a single new WhereTerm entry to the WhereClause object pWC.
-// The new WhereTerm object is constructed from Expr p and with wtFlags.
-// The index in pWC->a[] of the new WhereTerm is returned on success.
-// 0 is returned if the new WhereTerm could not be added due to a memory
-// allocation error. The memory allocation failure will be recorded in
-// the db->mallocFailed flag so that higher-level functions can detect it.
-//
-// This routine will increase the size of the pWC->a[] array as necessary.
-//
-// If the wtFlags argument includes TERM_DYNAMIC, then responsibility
-// for freeing the expression p is assumed by the WhereClause object pWC.
-// This is true even if this routine fails to allocate a new WhereTerm.
-//
-// WARNING: This routine might reallocate the space used to store
-// WhereTerms. All pointers to WhereTerms should be invalidated after
-// calling this routine. Such pointers may be reinitialized by referencing
-// the pWC->a[] array.
+// C comment
+// /*
+// ** Add a single new WhereTerm entry to the WhereClause object pWC.
+// ** The new WhereTerm object is constructed from Expr p and with wtFlags.
+// ** The index in pWC->a[] of the new WhereTerm is returned on success.
+// ** 0 is returned if the new WhereTerm could not be added due to a memory
+// ** allocation error. The memory allocation failure will be recorded in
+// ** the db->mallocFailed flag so that higher-level functions can detect it.
+// **
+// ** This routine will increase the size of the pWC->a[] array as necessary.
+// **
+// ** If the wtFlags argument includes TERM_DYNAMIC, then responsibility
+// ** for freeing the expression p is assumed by the WhereClause object pWC.
+// ** This is true even if this routine fails to allocate a new WhereTerm.
+// **
+// ** WARNING: This routine might reallocate the space used to store
+// ** WhereTerms. All pointers to WhereTerms should be invalidated after
+// ** calling this routine. Such pointers may be reinitialized by referencing
+// ** the pWC->a[] array.
+// */
func _whereClauseInsert(tls *crt.TLS, _pWC *XWhereClause, _p *XExpr, _wtFlags uint16) (r0 int32) {
var _idx int32
var _1_db *Xsqlite3
var _pTerm, _1_pOld *XWhereTerm
- if (_pWC.X3) < (_pWC.X4) {
+ if _pWC.XnTerm < _pWC.XnSlot {
goto _0
}
- _1_pOld = (*XWhereTerm)(_pWC.X5)
- _1_db = (*Xsqlite3)((*XParse)((*XWhereInfo)(_pWC.X0).X0).X0)
- *(**XWhereTerm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWC.X5))))) = (*XWhereTerm)(_sqlite3DbMallocRawNN(tls, _1_db, uint64((u32(48)*uint32(_pWC.X4))*uint32(i32(2)))))
- if (*XWhereTerm)(_pWC.X5) != nil {
+ _1_pOld = (*XWhereTerm)(_pWC.Xa)
+ _1_db = (*Xsqlite3)((*XParse)((*XWhereInfo)(_pWC.XpWInfo).XpParse).Xdb)
+ *(**XWhereTerm)(unsafe.Pointer(&_pWC.Xa)) = (*XWhereTerm)(_sqlite3DbMallocRawNN(tls, _1_db, uint64((uint32(48)*uint32(_pWC.XnSlot))*uint32(2))))
+ if (*XWhereTerm)(_pWC.Xa) != nil {
goto _1
}
- if (int32(_wtFlags) & i32(1)) != 0 {
+ if (int32(_wtFlags) & int32(1)) != 0 {
_sqlite3ExprDelete(tls, _1_db, _p)
}
- *(**XWhereTerm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWC.X5))))) = _1_pOld
- return i32(0)
+ *(**XWhereTerm)(unsafe.Pointer(&_pWC.Xa)) = _1_pOld
+ return int32(0)
_1:
- crt.Xmemcpy(tls, _pWC.X5, (unsafe.Pointer)(_1_pOld), u32(48)*uint32(_pWC.X3))
- if _1_pOld != (*XWhereTerm)(unsafe.Pointer((*[8]XWhereTerm)(unsafe.Pointer(&(_pWC.X6))))) {
- _sqlite3DbFree(tls, _1_db, (unsafe.Pointer)(_1_pOld))
+ crt.Xmemcpy(tls, _pWC.Xa, unsafe.Pointer(_1_pOld), uint32(48)*uint32(_pWC.XnTerm))
+ if _1_pOld != (*XWhereTerm)(unsafe.Pointer(&_pWC.XaStatic)) {
+ _sqlite3DbFree(tls, _1_db, unsafe.Pointer(_1_pOld))
}
- *(*int32)(unsafe.Pointer(&(_pWC.X4))) = int32(uint32(_sqlite3DbMallocSize(tls, _1_db, _pWC.X5)) / u32(48))
+ _pWC.XnSlot = int32(uint32(_sqlite3DbMallocSize(tls, _1_db, _pWC.Xa)) / uint32(48))
_0:
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(store1(&_idx, postInc1((*int32)(unsafe.Pointer(&(_pWC.X3))), int32(1))))))
- if (_p != nil) && (((_p.X2) & uint32(i32(262144))) != uint32(i32(0))) {
- *(*int16)(unsafe.Pointer(&(_pTerm.X2))) = int16(int32(_sqlite3LogEst(tls, uint64(_p.X8))) - i32(270))
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(store2(&_idx, postInc2(&_pWC.XnTerm, 1))))
+ if (_p != nil) && ((_p.Xflags & uint32(262144)) != (0)) {
+ _pTerm.XtruthProb = int16(int32(_sqlite3LogEst(tls, uint64(_p.XiTable))) - int32(270))
goto _6
}
- *(*int16)(unsafe.Pointer(&(_pTerm.X2))) = int16(i32(1))
+ _pTerm.XtruthProb = int16(1)
_6:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTerm.X0))))) = _sqlite3ExprSkipCollate(tls, _p)
- *(*uint16)(unsafe.Pointer(&(_pTerm.X3))) = _wtFlags
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTerm.X1))))) = _pWC
- *(*int32)(unsafe.Pointer(&(_pTerm.X7))) = i32(-1)
- crt.Xmemset(tls, (unsafe.Pointer)((*uint16)(unsafe.Pointer(&(_pTerm.X4)))), i32(0), u32(36))
+ *(**XExpr)(unsafe.Pointer(&_pTerm.XpExpr)) = _sqlite3ExprSkipCollate(tls, _p)
+ _pTerm.XwtFlags = _wtFlags
+ *(**XWhereClause)(unsafe.Pointer(&_pTerm.XpWC)) = _pWC
+ _pTerm.XiParent = int32(-1)
+ crt.Xmemset(tls, unsafe.Pointer(&_pTerm.XeOperator), int32(0), uint32(36))
return _idx
}
-// Walk an expression tree. Return non-zero if the expression is constant
-// that does no originate from the ON or USING clauses of a join.
-// Return 0 if it involves variables or function calls or terms from
-// an ON or USING clause.
+// C comment
+// /*
+// ** Walk an expression tree. Return non-zero if the expression is constant
+// ** that does no originate from the ON or USING clauses of a join.
+// ** Return 0 if it involves variables or function calls or terms from
+// ** an ON or USING clause.
+// */
func _sqlite3ExprIsConstantNotJoin(tls *crt.TLS, _p *XExpr) (r0 int32) {
- return _exprIsConst(tls, _p, i32(2), i32(0))
-}
-
-// Generate code for a boolean expression such that a jump is made
-// to the label "dest" if the expression is false but execution
-// continues straight thru if the expression is true.
-//
-// If the expression evaluates to NULL (neither true nor false) then
-// jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull
-// is 0.
+ return _exprIsConst(tls, _p, int32(2), int32(0))
+}
+
+// C comment
+// /*
+// ** Generate code for a boolean expression such that a jump is made
+// ** to the label "dest" if the expression is false but execution
+// ** continues straight thru if the expression is true.
+// **
+// ** If the expression evaluates to NULL (neither true nor false) then
+// ** jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull
+// ** is 0.
+// */
func _sqlite3ExprIfFalse(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _dest int32, _jumpIfNull int32) {
var _op, _regFree1, _regFree2, _r1, _r2, _3_d2, _10_destIfNull int32
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
- _op = i32(0)
- _regFree1 = i32(0)
- _regFree2 = i32(0)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _op = int32(0)
+ _regFree1 = int32(0)
+ _regFree2 = int32(0)
func() {
- if _jumpIfNull != i32(16) && _jumpIfNull != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95403), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(101380)))
+ if _jumpIfNull != int32(16) && _jumpIfNull != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95403), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(101408)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
if _v == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95404), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95404), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
if _pExpr == nil {
return
}
- _op = ((int32(_pExpr.X0) + i32(1)) ^ i32(1)) - i32(1)
+ _op = ((int32(_pExpr.Xop) + int32(1)) ^ int32(1)) - int32(1)
func() {
- if int32(_pExpr.X0) == i32(75) && _op != i32(76) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95429), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(101427)))
+ if int32(_pExpr.Xop) == int32(75) && _op != int32(76) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95429), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(101455)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) == i32(76) && _op != i32(75) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95430), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(101466)))
+ if int32(_pExpr.Xop) == int32(76) && _op != int32(75) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95430), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(101494)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) == i32(77) && _op != i32(78) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95431), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(101505)))
+ if int32(_pExpr.Xop) == int32(77) && _op != int32(78) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95431), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(101533)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) == i32(78) && _op != i32(77) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95432), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(101535)))
+ if int32(_pExpr.Xop) == int32(78) && _op != int32(77) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95432), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(101563)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) == i32(81) && _op != i32(82) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95433), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(101565)))
+ if int32(_pExpr.Xop) == int32(81) && _op != int32(82) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95433), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(101593)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) == i32(80) && _op != i32(79) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95434), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(101595)))
+ if int32(_pExpr.Xop) == int32(80) && _op != int32(79) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95434), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(101623)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) == i32(79) && _op != i32(80) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95435), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(101625)))
+ if int32(_pExpr.Xop) == int32(79) && _op != int32(80) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95435), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(101653)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) == i32(82) && _op != i32(81) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95436), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000))), unsafe.Pointer(str(101655)))
+ if int32(_pExpr.Xop) == int32(82) && _op != int32(81) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95436), unsafe.Pointer(&_sqlite3ExprIfFalseØ00__func__Ø000), unsafe.Pointer(str(101683)))
crt.X__builtin_abort(tls)
}
}()
- switch int32(_pExpr.X0) {
- case i32(19):
+ switch int32(_pExpr.Xop) {
+ case int32(19):
goto _34
- case i32(70):
+ case int32(70):
goto _33
- case i32(71):
+ case int32(71):
goto _32
- case i32(72):
+ case int32(72):
goto _35
- case i32(73):
+ case int32(73):
goto _45
- case i32(74):
+ case int32(74):
goto _46
- case i32(75):
+ case int32(75):
goto _43
- case i32(76):
+ case int32(76):
goto _43
- case i32(77):
+ case int32(77):
goto _37
- case i32(78):
+ case int32(78):
goto _37
- case i32(79):
+ case int32(79):
goto _37
- case i32(80):
+ case int32(80):
goto _37
- case i32(81):
+ case int32(81):
goto _37
- case i32(82):
+ case int32(82):
goto _37
- case i32(148):
+ case int32(148):
goto _35
default:
goto _47
}
_32:
- _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.X4), _dest, _jumpIfNull)
+ _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _dest, _jumpIfNull)
_sqlite3ExprCachePush(tls, _pParse)
- _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.X5), _dest, _jumpIfNull)
+ _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.XpRight), _dest, _jumpIfNull)
_sqlite3ExprCachePop(tls, _pParse)
goto _48
_33:
_3_d2 = _sqlite3VdbeMakeLabel(tls, _v)
- _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.X4), _3_d2, _jumpIfNull^i32(16))
+ _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _3_d2, _jumpIfNull^int32(16))
_sqlite3ExprCachePush(tls, _pParse)
- _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.X5), _dest, _jumpIfNull)
+ _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.XpRight), _dest, _jumpIfNull)
_sqlite3VdbeResolveLabel(tls, _v, _3_d2)
_sqlite3ExprCachePop(tls, _pParse)
goto _48
_34:
- _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.X4), _dest, _jumpIfNull)
+ _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _dest, _jumpIfNull)
goto _48
_35:
_op = func() int32 {
- if int32(_pExpr.X0) == i32(72) {
- return i32(77)
+ if int32(_pExpr.Xop) == int32(72) {
+ return int32(77)
}
- return i32(78)
+ return int32(78)
}()
- _jumpIfNull = i32(128)
+ _jumpIfNull = int32(128)
_37:
- if _sqlite3ExprIsVector(tls, (*XExpr)(_pExpr.X4)) != 0 {
+ if _sqlite3ExprIsVector(tls, (*XExpr)(_pExpr.XpLeft)) != 0 {
goto _default_expr
}
- _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X4), &_regFree1)
- _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X5), &_regFree2)
- _codeCompare(tls, _pParse, (*XExpr)(_pExpr.X4), (*XExpr)(_pExpr.X5), _op, _r1, _r2, _dest, _jumpIfNull)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
+ _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpLeft), &_regFree1)
+ _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpRight), &_regFree2)
+ _codeCompare(tls, _pParse, (*XExpr)(_pExpr.XpLeft), (*XExpr)(_pExpr.XpRight), _op, _r1, _r2, _dest, _jumpIfNull)
+
goto _48
_43:
- _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X4), &_regFree1)
+ _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpLeft), &_regFree1)
_sqlite3VdbeAddOp2(tls, _v, _op, _r1, _dest)
goto _48
_45:
@@ -80461,7 +81563,7 @@ _default_expr:
goto _57
}
_r1 = _sqlite3ExprCodeTemp(tls, _pParse, _pExpr, &_regFree1)
- _sqlite3VdbeAddOp3(tls, _v, i32(22), _r1, _dest, bool2int(_jumpIfNull != i32(0)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(22), _r1, _dest, bool2int(_jumpIfNull != int32(0)))
_57:
goto _48
_48:
@@ -80472,30 +81574,33 @@ _48:
var _sqlite3ExprIfFalseØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprIfFalseØ00__func__Ø000[0], str(101685), 19)
+ crt.Xstrncpy(nil, &_sqlite3ExprIfFalseØ00__func__Ø000[0], str(101713), 19)
}
-// Remove from the column cache any entries that were added since the
-// the previous sqlite3ExprCachePush operation. In other words, restore
-// the cache to the state it was in prior the most recent Push.
+// C comment
+// /*
+// ** Remove from the column cache any entries that were added since the
+// ** the previous sqlite3ExprCachePush operation. In other words, restore
+// ** the cache to the state it was in prior the most recent Push.
+// */
func _sqlite3ExprCachePop(tls *crt.TLS, _pParse *XParse) {
var _i int32
- _i = i32(0)
+ _i = int32(0)
func() {
- if (_pParse.X23) < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94086), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCachePopØ00__func__Ø000))), unsafe.Pointer(str(101704)))
+ if _pParse.XiCacheLevel < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94086), unsafe.Pointer(&_sqlite3ExprCachePopØ00__func__Ø000), unsafe.Pointer(str(101732)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pParse.X23))) -= 1
- if (((*Xsqlite3)(_pParse.X0).X6) & i32(4096)) != 0 {
- crt.Xprintf(tls, str(101727), _pParse.X23)
+ _pParse.XiCacheLevel -= 1
+ if (((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(4096)) != 0 {
+ crt.Xprintf(tls, str(101755), _pParse.XiCacheLevel)
}
_2:
- if _i >= int32(_pParse.X13) {
+ if _i >= int32(_pParse.XnColCache) {
goto _4
}
- if ((*TyColCache)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]TyColCache)(unsafe.Pointer(&(_pParse.X48))))) + 20*uintptr(_i))).X3) > (_pParse.X23) {
+ if (elem69((*TyColCache)(unsafe.Pointer(&_pParse.XaColCache)), uintptr(_i)).XiLevel) > _pParse.XiCacheLevel {
_cacheEntryClear(tls, _pParse, _i)
goto _6
}
@@ -80508,89 +81613,92 @@ _4:
var _sqlite3ExprCachePopØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCachePopØ00__func__Ø000[0], str(101739), 20)
-}
-
-// Generate code for a boolean expression such that a jump is made
-// to the label "dest" if the expression is true but execution
-// continues straight thru if the expression is false.
-//
-// If the expression evaluates to NULL (neither true nor false), then
-// take the jump if the jumpIfNull flag is SQLITE_JUMPIFNULL.
-//
-// This code depends on the fact that certain token values (ex: TK_EQ)
-// are the same as opcode values (ex: OP_Eq) that implement the corresponding
-// operation. Special comments in vdbe.c and the mkopcodeh.awk script in
-// the make process cause these values to align. Assert()s in the code
-// below verify that the numbers are aligned correctly.
+ crt.Xstrncpy(nil, &_sqlite3ExprCachePopØ00__func__Ø000[0], str(101767), 20)
+}
+
+// C comment
+// /*
+// ** Generate code for a boolean expression such that a jump is made
+// ** to the label "dest" if the expression is true but execution
+// ** continues straight thru if the expression is false.
+// **
+// ** If the expression evaluates to NULL (neither true nor false), then
+// ** take the jump if the jumpIfNull flag is SQLITE_JUMPIFNULL.
+// **
+// ** This code depends on the fact that certain token values (ex: TK_EQ)
+// ** are the same as opcode values (ex: OP_Eq) that implement the corresponding
+// ** operation. Special comments in vdbe.c and the mkopcodeh.awk script in
+// ** the make process cause these values to align. Assert()s in the code
+// ** below verify that the numbers are aligned correctly.
+// */
func _sqlite3ExprIfTrue(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _dest int32, _jumpIfNull int32) {
var _op, _regFree1, _regFree2, _r1, _r2, _2_d2, _8_destIfFalse, _8_destIfNull int32
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
- _op = i32(0)
- _regFree1 = i32(0)
- _regFree2 = i32(0)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _op = int32(0)
+ _regFree1 = int32(0)
+ _regFree2 = int32(0)
func() {
- if _jumpIfNull != i32(16) && _jumpIfNull != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95280), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfTrueØ00__func__Ø000))), unsafe.Pointer(str(101380)))
+ if _jumpIfNull != int32(16) && _jumpIfNull != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95280), unsafe.Pointer(&_sqlite3ExprIfTrueØ00__func__Ø000), unsafe.Pointer(str(101408)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
if _v == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95281), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfTrueØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95281), unsafe.Pointer(&_sqlite3ExprIfTrueØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
if func() int32 {
if _pExpr == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95282), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIfTrueØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95282), unsafe.Pointer(&_sqlite3ExprIfTrueØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
- _op = int32(_pExpr.X0)
+ _op = int32(_pExpr.Xop)
switch _op {
- case i32(19):
+ case int32(19):
goto _12
- case i32(70):
+ case int32(70):
goto _11
- case i32(71):
+ case int32(71):
goto _10
- case i32(72):
+ case int32(72):
goto _13
- case i32(73):
+ case int32(73):
goto _23
- case i32(74):
+ case int32(74):
goto _24
- case i32(75):
+ case int32(75):
goto _21
- case i32(76):
+ case int32(76):
goto _21
- case i32(77):
+ case int32(77):
goto _15
- case i32(78):
+ case int32(78):
goto _15
- case i32(79):
+ case int32(79):
goto _15
- case i32(80):
+ case int32(80):
goto _15
- case i32(81):
+ case int32(81):
goto _15
- case i32(82):
+ case int32(82):
goto _15
- case i32(148):
+ case int32(148):
goto _13
default:
goto _25
@@ -80598,47 +81706,41 @@ func _sqlite3ExprIfTrue(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _dest int3
_10:
_2_d2 = _sqlite3VdbeMakeLabel(tls, _v)
- _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.X4), _2_d2, _jumpIfNull^i32(16))
+ _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _2_d2, _jumpIfNull^int32(16))
_sqlite3ExprCachePush(tls, _pParse)
- _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.X5), _dest, _jumpIfNull)
+ _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.XpRight), _dest, _jumpIfNull)
_sqlite3VdbeResolveLabel(tls, _v, _2_d2)
_sqlite3ExprCachePop(tls, _pParse)
goto _26
_11:
- _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.X4), _dest, _jumpIfNull)
+ _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _dest, _jumpIfNull)
_sqlite3ExprCachePush(tls, _pParse)
- _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.X5), _dest, _jumpIfNull)
+ _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(_pExpr.XpRight), _dest, _jumpIfNull)
_sqlite3ExprCachePop(tls, _pParse)
goto _26
_12:
- _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.X4), _dest, _jumpIfNull)
+ _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _dest, _jumpIfNull)
goto _26
_13:
_op = func() int32 {
- if _op == i32(72) {
- return i32(78)
+ if _op == int32(72) {
+ return int32(78)
}
- return i32(77)
+ return int32(77)
}()
- _jumpIfNull = i32(128)
+ _jumpIfNull = int32(128)
_15:
- if _sqlite3ExprIsVector(tls, (*XExpr)(_pExpr.X4)) != 0 {
+ if _sqlite3ExprIsVector(tls, (*XExpr)(_pExpr.XpLeft)) != 0 {
goto _default_expr
}
- _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X4), &_regFree1)
- _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X5), &_regFree2)
- _codeCompare(tls, _pParse, (*XExpr)(_pExpr.X4), (*XExpr)(_pExpr.X5), _op, _r1, _r2, _dest, _jumpIfNull)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
+ _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpLeft), &_regFree1)
+ _r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpRight), &_regFree2)
+ _codeCompare(tls, _pParse, (*XExpr)(_pExpr.XpLeft), (*XExpr)(_pExpr.XpRight), _op, _r1, _r2, _dest, _jumpIfNull)
+
goto _26
_21:
- i32(0)
- i32(0)
- _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.X4), &_regFree1)
+
+ _r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_pExpr.XpLeft), &_regFree1)
_sqlite3VdbeAddOp2(tls, _v, _op, _r1, _dest)
goto _26
_23:
@@ -80666,7 +81768,7 @@ _default_expr:
goto _35
}
_r1 = _sqlite3ExprCodeTemp(tls, _pParse, _pExpr, &_regFree1)
- _sqlite3VdbeAddOp3(tls, _v, i32(21), _r1, _dest, bool2int(_jumpIfNull != i32(0)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(21), _r1, _dest, bool2int(_jumpIfNull != int32(0)))
_35:
goto _26
_26:
@@ -80677,26 +81779,29 @@ _26:
var _sqlite3ExprIfTrueØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprIfTrueØ00__func__Ø000[0], str(101759), 18)
+ crt.Xstrncpy(nil, &_sqlite3ExprIfTrueØ00__func__Ø000[0], str(101787), 18)
}
-// Generate code to evaluate an expression and store the results
-// into a register. Return the register number where the results
-// are stored.
-//
-// If the register is a temporary register that can be deallocated,
-// then write its number into *pReg. If the result register is not
-// a temporary, then set *pReg to zero.
-//
-// If pExpr is a constant, then this routine might generate this
-// code to fill the register in the initialization section of the
-// VDBE program, in order to factor it out of the evaluation loop.
+// C comment
+// /*
+// ** Generate code to evaluate an expression and store the results
+// ** into a register. Return the register number where the results
+// ** are stored.
+// **
+// ** If the register is a temporary register that can be deallocated,
+// ** then write its number into *pReg. If the result register is not
+// ** a temporary, then set *pReg to zero.
+// **
+// ** If pExpr is a constant, then this routine might generate this
+// ** code to fill the register in the initialization section of the
+// ** VDBE program, in order to factor it out of the evaluation loop.
+// */
func _sqlite3ExprCodeTemp(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _pReg *int32) (r0 int32) {
var _r2, _2_r1 int32
_pExpr = _sqlite3ExprSkipCollate(tls, _pExpr)
- if (((_pParse.X11) != 0) && (int32(_pExpr.X0) != i32(157))) && _sqlite3ExprIsConstantNotJoin(tls, _pExpr) != 0 {
- *_pReg = i32(0)
- _r2 = _sqlite3ExprCodeAtInit(tls, _pParse, _pExpr, i32(-1))
+ if ((_pParse.XokConstFactor != 0) && (int32(_pExpr.Xop) != int32(157))) && _sqlite3ExprIsConstantNotJoin(tls, _pExpr) != 0 {
+ *_pReg = int32(0)
+ _r2 = _sqlite3ExprCodeAtInit(tls, _pParse, _pExpr, int32(-1))
goto _3
}
_2_r1 = _sqlite3GetTempReg(tls, _pParse)
@@ -80706,46 +81811,52 @@ func _sqlite3ExprCodeTemp(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _pReg *i
goto _5
}
_sqlite3ReleaseTempReg(tls, _pParse, _2_r1)
- *_pReg = i32(0)
+ *_pReg = int32(0)
_5:
_3:
return _r2
}
-// Generate code for a comparison operator.
+// C comment
+// /*
+// ** Generate code for a comparison operator.
+// */
func _codeCompare(tls *crt.TLS, _pParse *XParse, _pLeft *XExpr, _pRight *XExpr, _opcode int32, _in1 int32, _in2 int32, _dest int32, _jumpIfNull int32) (r0 int32) {
var _p5, _addr int32
var _p4 *XCollSeq
_p4 = _sqlite3BinaryCompareCollSeq(tls, _pParse, _pLeft, _pRight)
_p5 = int32(_binaryCompareP5(tls, _pLeft, _pRight, _jumpIfNull))
- _addr = _sqlite3VdbeAddOp4(tls, (*TVdbe)(_pParse.X2), _opcode, _in2, _dest, _in1, (*int8)((unsafe.Pointer)(_p4)), i32(-3))
- _sqlite3VdbeChangeP5(tls, (*TVdbe)(_pParse.X2), uint16(uint8(_p5)))
+ _addr = _sqlite3VdbeAddOp4(tls, (*TVdbe)(_pParse.XpVdbe), _opcode, _in2, _dest, _in1, (*int8)(unsafe.Pointer(_p4)), int32(-3))
+ _sqlite3VdbeChangeP5(tls, (*TVdbe)(_pParse.XpVdbe), uint16(uint8(_p5)))
return _addr
}
-// Return a pointer to the collation sequence that should be used by
-// a binary comparison operator comparing pLeft and pRight.
-//
-// If the left hand expression has a collating sequence type, then it is
-// used. Otherwise the collation sequence for the right hand expression
-// is used, or the default (BINARY) if neither expression has a collating
-// type.
-//
-// Argument pRight (but not pLeft) may be a null pointer. In this case,
-// it is not considered.
+// C comment
+// /*
+// ** Return a pointer to the collation sequence that should be used by
+// ** a binary comparison operator comparing pLeft and pRight.
+// **
+// ** If the left hand expression has a collating sequence type, then it is
+// ** used. Otherwise the collation sequence for the right hand expression
+// ** is used, or the default (BINARY) if neither expression has a collating
+// ** type.
+// **
+// ** Argument pRight (but not pLeft) may be a null pointer. In this case,
+// ** it is not considered.
+// */
func _sqlite3BinaryCompareCollSeq(tls *crt.TLS, _pParse *XParse, _pLeft *XExpr, _pRight *XExpr) (r0 *XCollSeq) {
var _pColl *XCollSeq
func() {
if _pLeft == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91184), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BinaryCompareCollSeqØ00__func__Ø000))), unsafe.Pointer(str(42746)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91184), unsafe.Pointer(&_sqlite3BinaryCompareCollSeqØ00__func__Ø000), unsafe.Pointer(str(42701)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pLeft.X2) & uint32(i32(256))) != 0 {
+ if (_pLeft.Xflags & uint32(256)) != 0 {
_pColl = _sqlite3ExprCollSeq(tls, _pParse, _pLeft)
goto _6
}
- if (_pRight != nil) && (((_pRight.X2) & uint32(i32(256))) != uint32(i32(0))) {
+ if (_pRight != nil) && ((_pRight.Xflags & uint32(256)) != (0)) {
_pColl = _sqlite3ExprCollSeq(tls, _pParse, _pRight)
goto _6
}
@@ -80760,11 +81871,14 @@ _6:
var _sqlite3BinaryCompareCollSeqØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BinaryCompareCollSeqØ00__func__Ø000[0], str(101777), 28)
+ crt.Xstrncpy(nil, &_sqlite3BinaryCompareCollSeqØ00__func__Ø000[0], str(101805), 28)
}
-// Return the P5 value that should be used for a binary comparison
-// opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2.
+// C comment
+// /*
+// ** Return the P5 value that should be used for a binary comparison
+// ** opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2.
+// */
func _binaryCompareP5(tls *crt.TLS, _pExpr1 *XExpr, _pExpr2 *XExpr, _jumpIfNull int32) (r0 uint8) {
var _aff uint8
_aff = uint8(_sqlite3ExprAffinity(tls, _pExpr2))
@@ -80772,118 +81886,111 @@ func _binaryCompareP5(tls *crt.TLS, _pExpr1 *XExpr, _pExpr2 *XExpr, _jumpIfNull
return _aff
}
-// Generate code for a BETWEEN operator.
-//
-// x BETWEEN y AND z
-//
-// The above is equivalent to
-//
-// x>=y AND x<=z
-//
-// Code it as such, taking care to do the common subexpression
-// elimination of x.
-//
-// The xJumpIf parameter determines details:
-//
-// NULL: Store the boolean result in reg[dest]
-// sqlite3ExprIfTrue: Jump to dest if true
-// sqlite3ExprIfFalse: Jump to dest if false
-//
-// The jumpIfNull parameter is ignored if xJumpIf is NULL.
+// C comment
+// /*
+// ** Generate code for a BETWEEN operator.
+// **
+// ** x BETWEEN y AND z
+// **
+// ** The above is equivalent to
+// **
+// ** x>=y AND x<=z
+// **
+// ** Code it as such, taking care to do the common subexpression
+// ** elimination of x.
+// **
+// ** The xJumpIf parameter determines details:
+// **
+// ** NULL: Store the boolean result in reg[dest]
+// ** sqlite3ExprIfTrue: Jump to dest if true
+// ** sqlite3ExprIfFalse: Jump to dest if false
+// **
+// ** The jumpIfNull parameter is ignored if xJumpIf is NULL.
+// */
func _exprCodeBetween(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _dest int32, _xJump func(*crt.TLS, *XParse, *XExpr, int32, int32), _jumpIfNull int32) {
var _regFree1 int32
var _exprAnd, _compLeft, _compRight, _exprX XExpr
- _regFree1 = i32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_compLeft), i32(0), u32(48))
- crt.Xmemset(tls, (unsafe.Pointer)(&_compRight), i32(0), u32(48))
- crt.Xmemset(tls, (unsafe.Pointer)(&_exprAnd), i32(0), u32(48))
- func() {
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95222), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprCodeBetweenØ00__func__Ø000))), unsafe.Pointer(str(42778)))
- crt.X__builtin_abort(tls)
- }
- }()
- _exprX = *(*XExpr)(_pExpr.X4)
- *(*uint8)(unsafe.Pointer(&(_exprAnd.X0))) = uint8(i32(71))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_exprAnd.X4))))) = &_compLeft
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_exprAnd.X5))))) = &_compRight
- *(*uint8)(unsafe.Pointer(&(_compLeft.X0))) = uint8(i32(82))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_compLeft.X4))))) = &_exprX
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_compLeft.X5))))) = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2))))) + 20*uintptr(i32(0)))).X0)
- *(*uint8)(unsafe.Pointer(&(_compRight.X0))) = uint8(i32(80))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_compRight.X4))))) = &_exprX
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_compRight.X5))))) = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2))))) + 20*uintptr(i32(1)))).X0)
+ _regFree1 = int32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_compLeft), int32(0), uint32(48))
+ crt.Xmemset(tls, unsafe.Pointer(&_compRight), int32(0), uint32(48))
+ crt.Xmemset(tls, unsafe.Pointer(&_exprAnd), int32(0), uint32(48))
+ func() {
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95222), unsafe.Pointer(&_exprCodeBetweenØ00__func__Ø000), unsafe.Pointer(str(42733)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ _exprX = *(*XExpr)(_pExpr.XpLeft)
+ _exprAnd.Xop = uint8(71)
+ *(**XExpr)(unsafe.Pointer(&_exprAnd.XpLeft)) = &_compLeft
+ *(**XExpr)(unsafe.Pointer(&_exprAnd.XpRight)) = &_compRight
+ _compLeft.Xop = uint8(82)
+ *(**XExpr)(unsafe.Pointer(&_compLeft.XpLeft)) = &_exprX
+ *(**XExpr)(unsafe.Pointer(&_compLeft.XpRight)) = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), 0).XpExpr)
+ _compRight.Xop = uint8(80)
+ *(**XExpr)(unsafe.Pointer(&_compRight.XpLeft)) = &_exprX
+ *(**XExpr)(unsafe.Pointer(&_compRight.XpRight)) = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), uintptr(1)).XpExpr)
_exprToRegister(tls, &_exprX, _exprCodeVector(tls, _pParse, &_exprX, &_regFree1))
if _xJump != nil {
_xJump(tls, _pParse, &_exprAnd, _dest, _jumpIfNull)
goto _3
}
- {
- p := (*uint32)(unsafe.Pointer(&(_exprX.X2)))
- *p = (*p) | uint32(i32(1))
- sink5(*p)
- }
+ _exprX.Xflags |= uint32(1)
_sqlite3ExprCodeTarget(tls, _pParse, &_exprAnd, _dest)
_3:
_sqlite3ReleaseTempReg(tls, _pParse, _regFree1)
- _ = _exprAnd
- _ = _compLeft
- _ = _compRight
- _ = _exprX
}
var _exprCodeBetweenØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_exprCodeBetweenØ00__func__Ø000[0], str(101805), 16)
+ crt.Xstrncpy(nil, &_exprCodeBetweenØ00__func__Ø000[0], str(101833), 16)
}
-// Convert a scalar expression node to a TK_REGISTER referencing
-// register iReg. The caller must ensure that iReg already contains
-// the correct value for the expression.
+// C comment
+// /*
+// ** Convert a scalar expression node to a TK_REGISTER referencing
+// ** register iReg. The caller must ensure that iReg already contains
+// ** the correct value for the expression.
+// */
func _exprToRegister(tls *crt.TLS, _p *XExpr, _iReg int32) {
- *(*uint8)(unsafe.Pointer(&(_p.X12))) = _p.X0
- *(*uint8)(unsafe.Pointer(&(_p.X0))) = uint8(i32(157))
- *(*int32)(unsafe.Pointer(&(_p.X8))) = _iReg
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X2)))
- *p = (*p) & uint32(i32(-4097))
- sink5(*p)
- }
-}
-
-// Evaluate an expression (either a vector or a scalar expression) and store
-// the result in continguous temporary registers. Return the index of
-// the first register used to store the result.
-//
-// If the returned result register is a temporary scalar, then also write
-// that register number into *piFreeable. If the returned result register
-// is not a temporary or if the expression is a vector set *piFreeable
-// to 0.
+ _p.Xop2 = _p.Xop
+ _p.Xop = uint8(157)
+ _p.XiTable = _iReg
+ _p.Xflags &= uint32(4294963199)
+}
+
+// C comment
+// /*
+// ** Evaluate an expression (either a vector or a scalar expression) and store
+// ** the result in continguous temporary registers. Return the index of
+// ** the first register used to store the result.
+// **
+// ** If the returned result register is a temporary scalar, then also write
+// ** that register number into *piFreeable. If the returned result register
+// ** is not a temporary or if the expression is a vector set *piFreeable
+// ** to 0.
+// */
func _exprCodeVector(tls *crt.TLS, _pParse *XParse, _p *XExpr, _piFreeable *int32) (r0 int32) {
var _iResult, _nResult, _4_i int32
_nResult = _sqlite3ExprVectorSize(tls, _p)
- if _nResult == i32(1) {
+ if _nResult == int32(1) {
_iResult = _sqlite3ExprCodeTemp(tls, _pParse, _p, _piFreeable)
goto _1
}
- *_piFreeable = i32(0)
- if int32(_p.X0) == i32(119) {
- _iResult = _sqlite3CodeSubselect(tls, _pParse, _p, i32(0), i32(0))
+ *_piFreeable = int32(0)
+ if int32(_p.Xop) == int32(119) {
+ _iResult = _sqlite3CodeSubselect(tls, _pParse, _p, int32(0), int32(0))
goto _3
}
- _iResult = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _nResult
- sink1(*p)
- }
- _4_i = i32(0)
+ _iResult = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _nResult
+ _4_i = int32(0)
_4:
if _4_i >= _nResult {
goto _7
}
- _sqlite3ExprCodeFactorable(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))).X2)))))+20*uintptr(_4_i))).X0), _4_i+_iResult)
+ _sqlite3ExprCodeFactorable(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))).Xa))), uintptr(_4_i)).XpExpr), _4_i+_iResult)
_4_i += 1
goto _4
_7:
@@ -80892,12 +81999,15 @@ _1:
return _iResult
}
-// Generate code that will evaluate expression pExpr and store the
-// results in register target. The results are guaranteed to appear
-// in register target. If the expression is constant, then this routine
-// might choose to code the expression at initialization time.
+// C comment
+// /*
+// ** Generate code that will evaluate expression pExpr and store the
+// ** results in register target. The results are guaranteed to appear
+// ** in register target. If the expression is constant, then this routine
+// ** might choose to code the expression at initialization time.
+// */
func _sqlite3ExprCodeFactorable(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _target int32) {
- if ((_pParse.X11) != 0) && _sqlite3ExprIsConstant(tls, _pExpr) != 0 {
+ if (_pParse.XokConstFactor != 0) && _sqlite3ExprIsConstant(tls, _pExpr) != 0 {
_sqlite3ExprCodeAtInit(tls, _pParse, _pExpr, _target)
goto _2
}
@@ -80905,29 +82015,32 @@ func _sqlite3ExprCodeFactorable(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _t
_2:
}
-// Generate code for an IN expression.
-//
-// x IN (SELECT ...)
-// x IN (value, value, ...)
-//
-// The left-hand side (LHS) is a scalar or vector expression. The
-// right-hand side (RHS) is an array of zero or more scalar values, or a
-// subquery. If the RHS is a subquery, the number of result columns must
-// match the number of columns in the vector on the LHS. If the RHS is
-// a list of values, the LHS must be a scalar.
-//
-// The IN operator is true if the LHS value is contained within the RHS.
-// The result is false if the LHS is definitely not in the RHS. The
-// result is NULL if the presence of the LHS in the RHS cannot be
-// determined due to NULLs.
-//
-// This routine generates code that jumps to destIfFalse if the LHS is not
-// contained within the RHS. If due to NULLs we cannot determine if the LHS
-// is contained in the RHS then jump to destIfNull. If the LHS is contained
-// within the RHS then fall through.
-//
-// See the separate in-operator.md documentation file in the canonical
-// SQLite source tree for additional information.
+// C comment
+// /*
+// ** Generate code for an IN expression.
+// **
+// ** x IN (SELECT ...)
+// ** x IN (value, value, ...)
+// **
+// ** The left-hand side (LHS) is a scalar or vector expression. The
+// ** right-hand side (RHS) is an array of zero or more scalar values, or a
+// ** subquery. If the RHS is a subquery, the number of result columns must
+// ** match the number of columns in the vector on the LHS. If the RHS is
+// ** a list of values, the LHS must be a scalar.
+// **
+// ** The IN operator is true if the LHS value is contained within the RHS.
+// ** The result is false if the LHS is definitely not in the RHS. The
+// ** result is NULL if the presence of the LHS in the RHS cannot be
+// ** determined due to NULLs.
+// **
+// ** This routine generates code that jumps to destIfFalse if the LHS is not
+// ** contained within the RHS. If due to NULLs we cannot determine if the LHS
+// ** is contained in the RHS then jump to destIfNull. If the LHS is contained
+// ** within the RHS then fall through.
+// **
+// ** See the separate in-operator.md documentation file in the canonical
+// ** SQLite source tree for additional information.
+// */
func _sqlite3ExprCodeIN(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _destIfFalse int32, _destIfNull int32) {
var _rRhsHasNull, _eType, _rLhs, _rLhsOrig, _nVector, _iDummy, _i, _destStep2, _destStep6, _addrTruthOp, _destNotNull, _addrTop, _1_j, _1_cnt, _6_labelOk, _6_r2, _6_regToFree, _6_regCkNull, _6_ii, _23_r3 int32
var _aiMap *int32
@@ -80936,59 +82049,59 @@ func _sqlite3ExprCodeIN(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _destIfFal
var _6_pList *XExprList
var _pLeft, _15_p, _23_p *XExpr
var _6_pColl, _23_pColl *XCollSeq
- _rRhsHasNull = i32(0)
+ _rRhsHasNull = int32(0)
_aiMap = nil
_zAff = nil
- _destStep6 = i32(0)
- _pLeft = (*XExpr)(_pExpr.X4)
+ _destStep6 = int32(0)
+ _pLeft = (*XExpr)(_pExpr.XpLeft)
if _sqlite3ExprCheckIN(tls, _pParse, _pExpr) != 0 {
return
}
_zAff = _exprINAffinity(tls, _pParse, _pExpr)
- _nVector = _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.X4))
- _aiMap = (*int32)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.X0), uint64((uint32(_nVector)*u32(5))+uint32(i32(1)))))
- if ((*Xsqlite3)(_pParse.X0).X17) != 0 {
+ _nVector = _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.XpLeft))
+ _aiMap = (*int32)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.Xdb), uint64((uint32(_nVector)*uint32(5))+uint32(1))))
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) != 0 {
goto _sqlite3ExprCodeIN_oom_error
}
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93723), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93723), unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeNoopComment(tls, _v, str(101821))
- _eType = _sqlite3FindInIndex(tls, _pParse, _pExpr, uint32(i32(3)), func() *int32 {
+ _sqlite3VdbeNoopComment(tls, _v, str(101849))
+ _eType = _sqlite3FindInIndex(tls, _pParse, _pExpr, uint32(3), func() *int32 {
if _destIfFalse == _destIfNull {
return nil
}
return &_rRhsHasNull
}(), _aiMap)
func() {
- if (_pParse.X16) == 0 && _nVector != i32(1) && _eType != i32(2) && _eType != i32(3) && _eType != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93729), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000))), unsafe.Pointer(str(101835)))
+ if _pParse.XnErr == 0 && _nVector != int32(1) && _eType != int32(2) && _eType != int32(3) && _eType != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93729), unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000), unsafe.Pointer(str(101863)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_12:
if _i >= _nVector {
goto _15
}
- _1_cnt = store1(&_1_j, i32(0))
+ _1_cnt = store2(&_1_j, int32(0))
_16:
if _1_j >= _nVector {
goto _19
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiMap)) + 4*uintptr(_1_j)))) == _i {
+ if (*elem8(_aiMap, uintptr(_1_j))) == _i {
_1_cnt += 1
}
_1_j += 1
goto _16
_19:
func() {
- if _1_cnt != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93738), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000))), unsafe.Pointer(str(101944)))
+ if _1_cnt != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93738), unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000), unsafe.Pointer(str(101972)))
crt.X__builtin_abort(tls)
}
}()
@@ -80997,9 +82110,9 @@ _19:
_15:
_sqlite3ExprCachePush(tls, _pParse)
_rLhsOrig = _exprCodeVector(tls, _pParse, _pLeft, &_iDummy)
- _i = i32(0)
+ _i = int32(0)
_23:
- if _i >= _nVector || (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiMap)) + 4*uintptr(_i)))) != _i {
+ if _i >= _nVector || (*elem8(_aiMap, uintptr(_i))) != _i {
goto _27
}
_i += 1
@@ -81010,62 +82123,62 @@ _27:
goto _29
}
_rLhs = _sqlite3GetTempRange(tls, _pParse, _nVector)
- _i = i32(0)
+ _i = int32(0)
_30:
if _i >= _nVector {
goto _33
}
- _sqlite3VdbeAddOp3(tls, _v, i32(64), _rLhsOrig+_i, _rLhs+(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiMap)) + 4*uintptr(_i)))), i32(0))
+ _sqlite3VdbeAddOp3(tls, _v, int32(64), _rLhsOrig+_i, _rLhs+(*elem8(_aiMap, uintptr(_i))), int32(0))
_i += 1
goto _30
_33:
_29:
- if _eType != i32(5) {
+ if _eType != int32(5) {
goto _34
}
- _6_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
- _6_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.X4))
+ _6_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
+ _6_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.XpLeft))
_6_labelOk = _sqlite3VdbeMakeLabel(tls, _v)
- _6_regCkNull = i32(0)
+ _6_regCkNull = int32(0)
func() {
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93778), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000))), unsafe.Pointer(str(42778)))
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93778), unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000), unsafe.Pointer(str(42733)))
crt.X__builtin_abort(tls)
}
}()
if _destIfNull != _destIfFalse {
_6_regCkNull = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp3(tls, _v, i32(84), _rLhs, _rLhs, _6_regCkNull)
+ _sqlite3VdbeAddOp3(tls, _v, int32(84), _rLhs, _rLhs, _6_regCkNull)
}
- _6_ii = i32(0)
+ _6_ii = int32(0)
_38:
- if _6_ii >= (_6_pList.X0) {
+ if _6_ii >= _6_pList.XnExpr {
goto _41
}
- _6_r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_6_pList.X2)))))+20*uintptr(_6_ii))).X0), &_6_regToFree)
- if _6_regCkNull != 0 && _sqlite3ExprCanBeNull(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_6_pList.X2)))))+20*uintptr(_6_ii))).X0)) != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(84), _6_regCkNull, _6_r2, _6_regCkNull)
+ _6_r2 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_6_pList.Xa)), uintptr(_6_ii)).XpExpr), &_6_regToFree)
+ if _6_regCkNull != 0 && _sqlite3ExprCanBeNull(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_6_pList.Xa)), uintptr(_6_ii)).XpExpr)) != 0 {
+ _sqlite3VdbeAddOp3(tls, _v, int32(84), _6_regCkNull, _6_r2, _6_regCkNull)
}
- if (_6_ii < ((_6_pList.X0) - i32(1))) || (_destIfNull != _destIfFalse) {
- _sqlite3VdbeAddOp4(tls, _v, i32(78), _rLhs, _6_labelOk, _6_r2, (*int8)((unsafe.Pointer)(_6_pColl)), i32(-3))
- _sqlite3VdbeChangeP5(tls, _v, uint16(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(i32(0))))))
+ if (_6_ii < (_6_pList.XnExpr - int32(1))) || (_destIfNull != _destIfFalse) {
+ _sqlite3VdbeAddOp4(tls, _v, int32(78), _rLhs, _6_labelOk, _6_r2, (*int8)(unsafe.Pointer(_6_pColl)), int32(-3))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(*elem1(_zAff, 0)))
goto _46
}
func() {
if _destIfNull != _destIfFalse {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93795), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000))), unsafe.Pointer(str(101951)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93795), unsafe.Pointer(&_sqlite3ExprCodeINØ00__func__Ø000), unsafe.Pointer(str(101979)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4(tls, _v, i32(77), _rLhs, _destIfFalse, _6_r2, (*int8)((unsafe.Pointer)(_6_pColl)), i32(-3))
- _sqlite3VdbeChangeP5(tls, _v, uint16(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(i32(0)))))|i32(16)))
+ _sqlite3VdbeAddOp4(tls, _v, int32(77), _rLhs, _destIfFalse, _6_r2, (*int8)(unsafe.Pointer(_6_pColl)), int32(-3))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(int32(*elem1(_zAff, 0))|int32(16)))
_46:
_sqlite3ReleaseTempReg(tls, _pParse, _6_regToFree)
_6_ii += 1
goto _38
_41:
if _6_regCkNull != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(75), _6_regCkNull, _destIfNull)
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), _6_regCkNull, _destIfNull)
_sqlite3VdbeGoto(tls, _v, _destIfFalse)
}
_sqlite3VdbeResolveLabel(tls, _v, _6_labelOk)
@@ -81076,34 +82189,34 @@ _34:
_destStep2 = _destIfFalse
goto _51
}
- _destStep2 = store1(&_destStep6, _sqlite3VdbeMakeLabel(tls, _v))
+ _destStep2 = store2(&_destStep6, _sqlite3VdbeMakeLabel(tls, _v))
_51:
- _i = i32(0)
+ _i = int32(0)
_52:
if _i >= _nVector {
goto _55
}
- _15_p = _sqlite3VectorFieldSubexpr(tls, (*XExpr)(_pExpr.X4), _i)
+ _15_p = _sqlite3VectorFieldSubexpr(tls, (*XExpr)(_pExpr.XpLeft), _i)
if _sqlite3ExprCanBeNull(tls, _15_p) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(75), _rLhs+_i, _destStep2)
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), _rLhs+_i, _destStep2)
}
_i += 1
goto _52
_55:
- if _eType == i32(1) {
- _sqlite3VdbeAddOp3(tls, _v, i32(31), _pExpr.X8, _destIfFalse, _rLhs)
- _addrTruthOp = _sqlite3VdbeAddOp0(tls, _v, i32(13))
+ if _eType == int32(1) {
+ _sqlite3VdbeAddOp3(tls, _v, int32(31), _pExpr.XiTable, _destIfFalse, _rLhs)
+ _addrTruthOp = _sqlite3VdbeAddOp0(tls, _v, int32(13))
goto _58
}
- _sqlite3VdbeAddOp4(tls, _v, i32(100), _rLhs, _nVector, i32(0), _zAff, _nVector)
+ _sqlite3VdbeAddOp4(tls, _v, int32(100), _rLhs, _nVector, int32(0), _zAff, _nVector)
if _destIfFalse == _destIfNull {
- _sqlite3VdbeAddOp4Int(tls, _v, i32(29), _pExpr.X8, _destIfFalse, _rLhs, _nVector)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(29), _pExpr.XiTable, _destIfFalse, _rLhs, _nVector)
goto _sqlite3ExprCodeIN_finished
}
- _addrTruthOp = _sqlite3VdbeAddOp4Int(tls, _v, i32(30), _pExpr.X8, i32(0), _rLhs, _nVector)
+ _addrTruthOp = _sqlite3VdbeAddOp4Int(tls, _v, int32(30), _pExpr.XiTable, int32(0), _rLhs, _nVector)
_58:
- if _rRhsHasNull != 0 && (_nVector == i32(1)) {
- _sqlite3VdbeAddOp2(tls, _v, i32(76), _rRhsHasNull, _destIfFalse)
+ if _rRhsHasNull != 0 && (_nVector == int32(1)) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(76), _rRhsHasNull, _destIfFalse)
}
if _destIfFalse == _destIfNull {
_sqlite3VdbeGoto(tls, _v, _destIfFalse)
@@ -81111,14 +82224,14 @@ _58:
if _destStep6 != 0 {
_sqlite3VdbeResolveLabel(tls, _v, _destStep6)
}
- _addrTop = _sqlite3VdbeAddOp2(tls, _v, i32(37), _pExpr.X8, _destIfFalse)
- if _nVector > i32(1) {
+ _addrTop = _sqlite3VdbeAddOp2(tls, _v, int32(37), _pExpr.XiTable, _destIfFalse)
+ if _nVector > int32(1) {
_destNotNull = _sqlite3VdbeMakeLabel(tls, _v)
goto _65
}
_destNotNull = _destIfFalse
_65:
- _i = i32(0)
+ _i = int32(0)
_66:
if _i >= _nVector {
goto _69
@@ -81126,17 +82239,17 @@ _66:
_23_r3 = _sqlite3GetTempReg(tls, _pParse)
_23_p = _sqlite3VectorFieldSubexpr(tls, _pLeft, _i)
_23_pColl = _sqlite3ExprCollSeq(tls, _pParse, _23_p)
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _pExpr.X8, _i, _23_r3)
- _sqlite3VdbeAddOp4(tls, _v, i32(77), _rLhs+_i, _destNotNull, _23_r3, (*int8)((unsafe.Pointer)(_23_pColl)), i32(-3))
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _pExpr.XiTable, _i, _23_r3)
+ _sqlite3VdbeAddOp4(tls, _v, int32(77), _rLhs+_i, _destNotNull, _23_r3, (*int8)(unsafe.Pointer(_23_pColl)), int32(-3))
_sqlite3ReleaseTempReg(tls, _pParse, _23_r3)
_i += 1
goto _66
_69:
- _sqlite3VdbeAddOp2(tls, _v, i32(13), i32(0), _destIfNull)
- if _nVector > i32(1) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(13), int32(0), _destIfNull)
+ if _nVector > int32(1) {
_sqlite3VdbeResolveLabel(tls, _v, _destNotNull)
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _pExpr.X8, _addrTop+i32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(13), i32(0), _destIfFalse)
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _pExpr.XiTable, _addrTop+int32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(13), int32(0), _destIfFalse)
}
_sqlite3VdbeJumpHere(tls, _v, _addrTruthOp)
_sqlite3ExprCodeIN_finished:
@@ -81144,43 +82257,47 @@ _sqlite3ExprCodeIN_finished:
_sqlite3ReleaseTempReg(tls, _pParse, _rLhs)
}
_sqlite3ExprCachePop(tls, _pParse)
- _sqlite3VdbeComment(tls, _v, str(101975))
+ _sqlite3VdbeComment(tls, _v, str(102003))
_sqlite3ExprCodeIN_oom_error:
- _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_aiMap))
- _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_zAff))
- _ = _iDummy
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_aiMap))
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_zAff))
}
-// Expr pIn is an IN(...) expression. This function checks that the
-// sub-select on the RHS of the IN() operator has the same number of
-// columns as the vector on the LHS. Or, if the RHS of the IN() is not
-// a sub-query, that the LHS is a vector of size 1.
+// C comment
+// /*
+// ** Expr pIn is an IN(...) expression. This function checks that the
+// ** sub-select on the RHS of the IN() operator has the same number of
+// ** columns as the vector on the LHS. Or, if the RHS of the IN() is not
+// ** a sub-query, that the LHS is a vector of size 1.
+// */
func _sqlite3ExprCheckIN(tls *crt.TLS, _pParse *XParse, _pIn *XExpr) (r0 int32) {
var _nVector int32
- _nVector = _sqlite3ExprVectorSize(tls, (*XExpr)(_pIn.X4))
- if ((_pIn.X2) & uint32(i32(2048))) == 0 {
+ _nVector = _sqlite3ExprVectorSize(tls, (*XExpr)(_pIn.XpLeft))
+ if (_pIn.Xflags & uint32(2048)) == 0 {
goto _0
}
- if _nVector != ((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pIn.X6)))))).X0).X0) {
- _sqlite3SubselectError(tls, _pParse, (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pIn.X6)))))).X0).X0, _nVector)
- return i32(1)
+ if _nVector != ((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pIn.Xx))).XpEList).XnExpr) {
+ _sqlite3SubselectError(tls, _pParse, (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pIn.Xx))).XpEList).XnExpr, _nVector)
+ return int32(1)
}
goto _3
_0:
- if _nVector != i32(1) {
- _sqlite3VectorErrorMsg(tls, _pParse, (*XExpr)(_pIn.X4))
- return i32(1)
+ if _nVector != int32(1) {
+ _sqlite3VectorErrorMsg(tls, _pParse, (*XExpr)(_pIn.XpLeft))
+ return int32(1)
}
_3:
- return i32(0)
+ return int32(0)
}
var _sqlite3ExprCodeINØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCodeINØ00__func__Ø000[0], str(101987), 18)
+ crt.Xstrncpy(nil, &_sqlite3ExprCodeINØ00__func__Ø000[0], str(102015), 18)
}
+// C comment
+// /* IN operator used as a loop */
func _sqlite3FindInIndex(tls *crt.TLS, _pParse *XParse, _pX *XExpr, _inFlags uint32, _prRhsHasNull *int32, _aiMap *int32) (r0 int32) {
var _4_iDb int16
var _eType, _iTab, _mustBeUnique, _1_i, _4_nExpr, _5_iAddr, _6_affinity_ok, _6_i, _7_iCol, _13_j, _16_iAddr, _20_rMayHaveNull, _25_i, _25_n int32
@@ -81195,90 +82312,90 @@ func _sqlite3FindInIndex(tls *crt.TLS, _pParse *XParse, _pX *XExpr, _inFlags uin
var _7_pLhs, _13_pLhs, _13_pRhs *XExpr
var _6_pIdx *XIndex
var _13_pReq *XCollSeq
- _eType = i32(0)
- _iTab = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ _eType = int32(0)
+ _iTab = postInc2(&_pParse.XnTab, 1)
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
- if int32(_pX.X0) != i32(74) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93103), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000))), unsafe.Pointer(str(102005)))
+ if int32(_pX.Xop) != int32(74) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93103), unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000), unsafe.Pointer(str(102033)))
crt.X__builtin_abort(tls)
}
}()
- _mustBeUnique = bool2int((_inFlags & uint32(i32(4))) != uint32(i32(0)))
- if _prRhsHasNull == nil || ((_pX.X2)&uint32(i32(2048))) == 0 {
+ _mustBeUnique = bool2int((_inFlags & uint32(4)) != (0))
+ if _prRhsHasNull == nil || (_pX.Xflags&uint32(2048)) == 0 {
goto _3
}
- _1_pEList = (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pX.X6)))))).X0)
- _1_i = i32(0)
+ _1_pEList = (*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pX.Xx))).XpEList)
+ _1_i = int32(0)
_4:
- if _1_i >= (_1_pEList.X0) {
+ if _1_i >= _1_pEList.XnExpr {
goto _7
}
- if _sqlite3ExprCanBeNull(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_1_pEList.X2)))))+20*uintptr(_1_i))).X0)) != 0 {
+ if _sqlite3ExprCanBeNull(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_1_pEList.Xa)), uintptr(_1_i)).XpExpr)) != 0 {
goto _7
}
_1_i += 1
goto _4
_7:
- if _1_i == (_1_pEList.X0) {
+ if _1_i == _1_pEList.XnExpr {
_prRhsHasNull = nil
}
_3:
- if (_pParse.X16) != i32(0) || store59(&_p, _isCandidateForInOpt(tls, _pX)) == nil {
+ if _pParse.XnErr != int32(0) || store97(&_p, _isCandidateForInOpt(tls, _pX)) == nil {
goto _11
}
- _4_db = (*Xsqlite3)(_pParse.X0)
- _4_pEList = (*XExprList)(_p.X0)
- _4_nExpr = _4_pEList.X0
+ _4_db = (*Xsqlite3)(_pParse.Xdb)
+ _4_pEList = (*XExprList)(_p.XpEList)
+ _4_nExpr = _4_pEList.XnExpr
func() {
- if (*XExprList)(_p.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93132), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000))), unsafe.Pointer(str(46087)))
+ if (*XExprList)(_p.XpEList) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93132), unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000), unsafe.Pointer(str(46042)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.X0).X2)))))+20*uintptr(i32(0)))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93133), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000))), unsafe.Pointer(str(102019)))
+ if (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.XpEList).Xa))), 0).XpExpr) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93133), unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000), unsafe.Pointer(str(102047)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSrcList)(_p.X8) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93134), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000))), unsafe.Pointer(str(102044)))
+ if (*XSrcList)(_p.XpSrc) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93134), unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000), unsafe.Pointer(str(102072)))
crt.X__builtin_abort(tls)
}
}()
- _4_pTab = (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.X8).X2))))) + 68*uintptr(i32(0)))).X4)
- _4_iDb = int16(_sqlite3SchemaToIndex(tls, _4_db, (*XSchema)(_4_pTab.X20)))
+ _4_pTab = (*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.XpSrc).Xa))), 0).XpTab)
+ _4_iDb = int16(_sqlite3SchemaToIndex(tls, _4_db, (*XSchema)(_4_pTab.XpSchema)))
_sqlite3CodeVerifySchema(tls, _pParse, int32(_4_iDb))
- _sqlite3TableLock(tls, _pParse, int32(_4_iDb), _4_pTab.X7, uint8(i32(0)), _4_pTab.X0)
+ _sqlite3TableLock(tls, _pParse, int32(_4_iDb), _4_pTab.Xtnum, 0, _4_pTab.XzName)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93142), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000))), unsafe.Pointer(str(41861)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93142), unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000), unsafe.Pointer(str(41816)))
crt.X__builtin_abort(tls)
}
}()
- if (_4_nExpr == i32(1)) && (int32((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_4_pEList.X2)))))+20*uintptr(i32(0)))).X0).X9) < i32(0)) {
- _5_iAddr = _sqlite3VdbeAddOp0(tls, _v, i32(20))
- _sqlite3OpenTable(tls, _pParse, _iTab, int32(_4_iDb), _4_pTab, i32(106))
- _eType = i32(1)
+ if (_4_nExpr == int32(1)) && (int32((*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_4_pEList.Xa)), 0).XpExpr).XiColumn) < int32(0)) {
+ _5_iAddr = _sqlite3VdbeAddOp0(tls, _v, int32(20))
+ _sqlite3OpenTable(tls, _pParse, _iTab, int32(_4_iDb), _4_pTab, int32(106))
+ _eType = int32(1)
_sqlite3VdbeJumpHere(tls, _v, _5_iAddr)
goto _22
}
- _6_affinity_ok = i32(1)
- _6_i = i32(0)
+ _6_affinity_ok = int32(1)
+ _6_i = int32(0)
_23:
if _6_i >= _4_nExpr || _6_affinity_ok == 0 {
goto _27
}
- _7_pLhs = _sqlite3VectorFieldSubexpr(tls, (*XExpr)(_pX.X4), _6_i)
- _7_iCol = int32((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_4_pEList.X2))))) + 20*uintptr(_6_i))).X0).X9)
+ _7_pLhs = _sqlite3VectorFieldSubexpr(tls, (*XExpr)(_pX.XpLeft), _6_i)
+ _7_iCol = int32((*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_4_pEList.Xa)), uintptr(_6_i)).XpExpr).XiColumn)
_7_idxaff = _sqlite3TableColumnAffinity(tls, _4_pTab, _7_iCol)
_7_cmpaff = _sqlite3CompareAffinity(tls, _7_pLhs, _7_idxaff)
switch int32(_7_cmpaff) {
- case i32(65):
+ case int32(65):
goto _29
- case i32(66):
+ case int32(66):
goto _30
default:
goto _31
@@ -81288,14 +82405,14 @@ _29:
goto _32
_30:
func() {
- if int32(_7_idxaff) != i32(66) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93176), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000))), unsafe.Pointer(str(102055)))
+ if int32(_7_idxaff) != int32(66) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93176), unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000), unsafe.Pointer(str(102083)))
crt.X__builtin_abort(tls)
}
}()
goto _32
_31:
- _6_affinity_ok = bool2int(int32(_7_idxaff) >= i32(67))
+ _6_affinity_ok = bool2int(int32(_7_idxaff) >= int32(67))
_32:
_6_i += 1
goto _23
@@ -81303,54 +82420,54 @@ _27:
if _6_affinity_ok == 0 {
goto _35
}
- _6_pIdx = (*XIndex)(_4_pTab.X2)
+ _6_pIdx = (*XIndex)(_4_pTab.XpIndex)
_36:
- if _6_pIdx == nil || _eType != i32(0) {
+ if _6_pIdx == nil || _eType != int32(0) {
goto _40
}
- if int32(_6_pIdx.X14) < _4_nExpr {
+ if int32(_6_pIdx.XnColumn) < _4_nExpr {
goto _37
}
- if int32(_6_pIdx.X14) >= i32(63) {
+ if int32(_6_pIdx.XnColumn) >= int32(63) {
goto _37
}
if _mustBeUnique == 0 {
goto _43
}
- if (int32(_6_pIdx.X13) > _4_nExpr) || ((int32(_6_pIdx.X14) > _4_nExpr) && (int32(_6_pIdx.X15) == i32(0))) {
+ if (int32(_6_pIdx.XnKeyCol) > _4_nExpr) || ((int32(_6_pIdx.XnColumn) > _4_nExpr) && (int32(_6_pIdx.XonError) == int32(0))) {
goto _37
}
_43:
- _10_colUsed = uint64(i32(0))
- _6_i = i32(0)
+ _10_colUsed = 0
+ _6_i = int32(0)
_47:
if _6_i >= _4_nExpr {
goto _50
}
- _13_pLhs = _sqlite3VectorFieldSubexpr(tls, (*XExpr)(_pX.X4), _6_i)
- _13_pRhs = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_4_pEList.X2))))) + 20*uintptr(_6_i))).X0)
+ _13_pLhs = _sqlite3VectorFieldSubexpr(tls, (*XExpr)(_pX.XpLeft), _6_i)
+ _13_pRhs = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_4_pEList.Xa)), uintptr(_6_i)).XpExpr)
_13_pReq = _sqlite3BinaryCompareCollSeq(tls, _pParse, _13_pLhs, _13_pRhs)
func() {
- if _13_pReq == nil && int32(_13_pRhs.X9) != i32(-1) && (_pParse.X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93209), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000))), unsafe.Pointer(str(102079)))
+ if _13_pReq == nil && int32(_13_pRhs.XiColumn) != int32(-1) && _pParse.XnErr == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93209), unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000), unsafe.Pointer(str(102107)))
crt.X__builtin_abort(tls)
}
}()
- _13_j = i32(0)
+ _13_j = int32(0)
_55:
if _13_j >= _4_nExpr {
goto _58
}
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_pIdx.X1)) + 2*uintptr(_13_j)))) != int32(_13_pRhs.X9) {
+ if int32(*elem50(_6_pIdx.XaiColumn, uintptr(_13_j))) != int32(_13_pRhs.XiColumn) {
goto _56
}
func() {
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_pIdx.X8)) + 4*uintptr(_13_j)))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93212), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000))), unsafe.Pointer(str(102130)))
+ if (*elem0(_6_pIdx.XazColl, uintptr(_13_j))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93212), unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000), unsafe.Pointer(str(102158)))
crt.X__builtin_abort(tls)
}
}()
- if (_13_pReq != nil) && (_sqlite3StrICmp(tls, _13_pReq.X0, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_pIdx.X8)) + 4*uintptr(_13_j)))) != i32(0)) {
+ if (_13_pReq != nil) && (_sqlite3StrICmp(tls, _13_pReq.XzName, *elem0(_6_pIdx.XazColl, uintptr(_13_j))) != int32(0)) {
goto _56
}
goto _58
@@ -81361,92 +82478,88 @@ _58:
if _13_j == _4_nExpr {
goto _50
}
- _10_mCol = u64(1) << uint(_13_j)
+ _10_mCol = uint64(1) << uint(_13_j)
if (_10_mCol & _10_colUsed) != 0 {
goto _50
}
- {
- p := &_10_colUsed
- *p = (*p) | _10_mCol
- sink17(*p)
- }
+ _10_colUsed |= _10_mCol
if _aiMap != nil {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiMap)) + 4*uintptr(_6_i))) = _13_j
+ *elem8(_aiMap, uintptr(_6_i)) = _13_j
}
_6_i += 1
goto _47
_50:
func() {
- if _6_i != _4_nExpr && _10_colUsed == ((u64(1)<<uint(_4_nExpr))-uint64(i32(1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(93225), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000))), unsafe.Pointer(str(102146)))
+ if _6_i != _4_nExpr && _10_colUsed == ((uint64(1)<<uint(_4_nExpr))-uint64(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(93225), unsafe.Pointer(&_sqlite3FindInIndexØ00__func__Ø000), unsafe.Pointer(str(102174)))
crt.X__builtin_abort(tls)
}
}()
- if _10_colUsed != ((u64(1) << uint(_4_nExpr)) - uint64(i32(1))) {
+ if _10_colUsed != ((uint64(1) << uint(_4_nExpr)) - uint64(1)) {
goto _70
}
- _16_iAddr = _sqlite3VdbeAddOp0(tls, _v, i32(20))
- _sqlite3VdbeAddOp4(tls, _v, i32(165), i32(0), i32(0), i32(0), _sqlite3MPrintf(tls, _4_db, str(102186), unsafe.Pointer(_6_pIdx.X0)), i32(-1))
- _sqlite3VdbeAddOp3(tls, _v, i32(106), _iTab, _6_pIdx.X11, int32(_4_iDb))
+ _16_iAddr = _sqlite3VdbeAddOp0(tls, _v, int32(20))
+ _sqlite3VdbeAddOp4(tls, _v, int32(165), int32(0), int32(0), int32(0), _sqlite3MPrintf(tls, _4_db, str(102214), unsafe.Pointer(_6_pIdx.XzName)), int32(-1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(106), _iTab, _6_pIdx.Xtnum, int32(_4_iDb))
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _6_pIdx)
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_6_pIdx.X0))
- i32(0)
- _eType = i32(3) + int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_pIdx.X7)) + 1*uintptr(i32(0)))))
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_6_pIdx.XzName))
+
+ _eType = int32(3) + int32(*elem15(_6_pIdx.XaSortOrder, 0))
if _prRhsHasNull == nil {
goto _71
}
- *_prRhsHasNull = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- if _4_nExpr == i32(1) {
+ *_prRhsHasNull = preInc2(&_pParse.XnMem, 1)
+ if _4_nExpr == int32(1) {
_sqlite3SetHasNullFlag(tls, _v, _iTab, *_prRhsHasNull)
}
_71:
_sqlite3VdbeJumpHere(tls, _v, _16_iAddr)
_70:
_37:
- _6_pIdx = (*XIndex)(_6_pIdx.X5)
+ _6_pIdx = (*XIndex)(_6_pIdx.XpNext)
goto _36
_40:
_35:
_22:
_11:
- if (((_eType == i32(0)) && ((_inFlags & uint32(i32(1))) != 0)) && (((_pX.X2) & uint32(i32(2048))) == uint32(i32(0)))) && ((_sqlite3InRhsIsConstant(tls, _pX) == 0) || (((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pX.X6)))))).X0) <= i32(2))) {
- _eType = i32(5)
+ if (((_eType == int32(0)) && ((_inFlags & uint32(1)) != 0)) && ((_pX.Xflags & uint32(2048)) == (0))) && ((_sqlite3InRhsIsConstant(tls, _pX) == 0) || (((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pX.Xx))).XnExpr) <= int32(2))) {
+ _eType = int32(5)
}
- if _eType != i32(0) {
+ if _eType != int32(0) {
goto _78
}
- _20_savedNQueryLoop = _pParse.X42
- _20_rMayHaveNull = i32(0)
- _eType = i32(2)
- if (_inFlags & uint32(i32(4))) == 0 {
+ _20_savedNQueryLoop = _pParse.XnQueryLoop
+ _20_rMayHaveNull = int32(0)
+ _eType = int32(2)
+ if (_inFlags & uint32(4)) == 0 {
goto _79
}
- *(*uint32)(unsafe.Pointer(&(_pParse.X42))) = uint32(i32(0))
- if (int32((*XExpr)(_pX.X4).X9) < i32(0)) && (((_pX.X2) & uint32(i32(2048))) == uint32(i32(0))) {
- _eType = i32(1)
+ _pParse.XnQueryLoop = 0
+ if (int32((*XExpr)(_pX.XpLeft).XiColumn) < int32(0)) && ((_pX.Xflags & uint32(2048)) == (0)) {
+ _eType = int32(1)
}
goto _83
_79:
if _prRhsHasNull != nil {
- *_prRhsHasNull = store1(&_20_rMayHaveNull, preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1))
+ *_prRhsHasNull = store2(&_20_rMayHaveNull, preInc2(&_pParse.XnMem, 1))
}
_83:
- _sqlite3CodeSubselect(tls, _pParse, _pX, _20_rMayHaveNull, bool2int(_eType == i32(1)))
- *(*uint32)(unsafe.Pointer(&(_pParse.X42))) = _20_savedNQueryLoop
+ _sqlite3CodeSubselect(tls, _pParse, _pX, _20_rMayHaveNull, bool2int(_eType == int32(1)))
+ _pParse.XnQueryLoop = _20_savedNQueryLoop
goto _84
_78:
- *(*int32)(unsafe.Pointer(&(_pX.X8))) = _iTab
+ _pX.XiTable = _iTab
_84:
- if _aiMap == nil || _eType == i32(3) || _eType == i32(4) {
+ if _aiMap == nil || _eType == int32(3) || _eType == int32(4) {
goto _87
}
- _25_n = _sqlite3ExprVectorSize(tls, (*XExpr)(_pX.X4))
- _25_i = i32(0)
+ _25_n = _sqlite3ExprVectorSize(tls, (*XExpr)(_pX.XpLeft))
+ _25_i = int32(0)
_88:
if _25_i >= _25_n {
goto _91
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiMap)) + 4*uintptr(_25_i))) = _25_i
+ *elem8(_aiMap, uintptr(_25_i)) = _25_i
_25_i += 1
goto _88
_91:
@@ -81457,67 +82570,70 @@ _87:
var _sqlite3FindInIndexØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FindInIndexØ00__func__Ø000[0], str(102217), 19)
-}
-
-// Return FALSE if there is no chance that the expression can be NULL.
-//
-// If the expression might be NULL or if the expression is too complex
-// to tell return TRUE.
-//
-// This routine is used as an optimization, to skip OP_IsNull opcodes
-// when we know that a value cannot be NULL. Hence, a false positive
-// (returning TRUE when in fact the expression can never be NULL) might
-// be a small performance hit but is otherwise harmless. On the other
-// hand, a false negative (returning FALSE when the result could be NULL)
-// will likely result in an incorrect answer. So when in doubt, return
-// TRUE.
+ crt.Xstrncpy(nil, &_sqlite3FindInIndexØ00__func__Ø000[0], str(102245), 19)
+}
+
+// C comment
+// /*
+// ** Return FALSE if there is no chance that the expression can be NULL.
+// **
+// ** If the expression might be NULL or if the expression is too complex
+// ** to tell return TRUE.
+// **
+// ** This routine is used as an optimization, to skip OP_IsNull opcodes
+// ** when we know that a value cannot be NULL. Hence, a false positive
+// ** (returning TRUE when in fact the expression can never be NULL) might
+// ** be a small performance hit but is otherwise harmless. On the other
+// ** hand, a false negative (returning FALSE when the result could be NULL)
+// ** will likely result in an incorrect answer. So when in doubt, return
+// ** TRUE.
+// */
func _sqlite3ExprCanBeNull(tls *crt.TLS, _p *XExpr) (r0 int32) {
var _op uint8
_0:
- if (int32(_p.X0) == i32(156)) || (int32(_p.X0) == i32(155)) {
- _p = (*XExpr)(_p.X4)
+ if (int32(_p.Xop) == int32(156)) || (int32(_p.Xop) == int32(155)) {
+ _p = (*XExpr)(_p.XpLeft)
goto _0
}
- _op = _p.X0
- if int32(_op) == i32(157) {
- _op = _p.X12
+ _op = _p.Xop
+ if int32(_op) == int32(157) {
+ _op = _p.Xop2
}
switch int32(_op) {
- case i32(97):
+ case int32(97):
goto _5
- case i32(132):
+ case int32(132):
goto _5
- case i32(133):
+ case int32(133):
goto _5
- case i32(134):
+ case int32(134):
goto _5
- case i32(152):
+ case int32(152):
goto _9
default:
goto _10
}
_5:
- return i32(0)
+ return int32(0)
_9:
func() {
- if (*XTable)(_p.X14) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92867), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCanBeNullØ00__func__Ø000))), unsafe.Pointer(str(102236)))
+ if (*XTable)(_p.XpTab) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92867), unsafe.Pointer(&_sqlite3ExprCanBeNullØ00__func__Ø000), unsafe.Pointer(str(102264)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int((((_p.X2) & uint32(i32(1048576))) != uint32(i32(0))) || ((int32(_p.X9) >= i32(0)) && (int32((*XColumn)(unsafe.Pointer(uintptr((*XTable)(_p.X14).X1)+16*uintptr(_p.X9))).X3) == i32(0))))
+ return bool2int(((_p.Xflags & uint32(1048576)) != (0)) || ((int32(_p.XiColumn) >= int32(0)) && (int32(elem41((*XColumn)((*XTable)(_p.XpTab).XaCol), uintptr(_p.XiColumn)).XnotNull) == int32(0))))
_10:
- return i32(1)
+ return int32(1)
}
var _sqlite3ExprCanBeNullØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCanBeNullØ00__func__Ø000[0], str(102247), 21)
+ crt.Xstrncpy(nil, &_sqlite3ExprCanBeNullØ00__func__Ø000[0], str(102275), 21)
}
func _isCandidateForInOpt(tls *crt.TLS, _pX *XExpr) (r0 *XSelect) {
@@ -81527,85 +82643,85 @@ func _isCandidateForInOpt(tls *crt.TLS, _pX *XExpr) (r0 *XSelect) {
var _pEList *XExprList
var _p *XSelect
var _2_pRes *XExpr
- if ((_pX.X2) & uint32(i32(2048))) == uint32(i32(0)) {
+ if (_pX.Xflags & uint32(2048)) == (0) {
return nil
}
- if ((_pX.X2) & uint32(i32(32))) != uint32(i32(0)) {
+ if (_pX.Xflags & uint32(32)) != (0) {
return nil
}
- _p = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pX.X6))))))
- if (*XSelect)(_p.X13) != nil {
+ _p = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pX.Xx)))
+ if _p.XpPrior != nil {
return nil
}
- if ((_p.X3) & uint32(i32(9))) != 0 {
+ if (_p.XselFlags & uint32(9)) != 0 {
return nil
}
func() {
- if (*XExprList)(_p.X10) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92948), unsafe.Pointer((*int8)(unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000))), unsafe.Pointer(str(46719)))
+ if (*XExprList)(_p.XpGroupBy) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92948), unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000), unsafe.Pointer(str(46674)))
crt.X__builtin_abort(tls)
}
}()
- if (*XExpr)(_p.X15) != nil {
+ if _p.XpLimit != nil {
return nil
}
func() {
- if (*XExpr)(_p.X16) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92950), unsafe.Pointer((*int8)(unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000))), unsafe.Pointer(str(98541)))
+ if (*XExpr)(_p.XpOffset) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92950), unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000), unsafe.Pointer(str(98569)))
crt.X__builtin_abort(tls)
}
}()
- if (*XExpr)(_p.X9) != nil {
+ if _p.XpWhere != nil {
return nil
}
- _pSrc = (*XSrcList)(_p.X8)
+ _pSrc = (*XSrcList)(_p.XpSrc)
func() {
if _pSrc == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92953), unsafe.Pointer((*int8)(unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000))), unsafe.Pointer(str(47821)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92953), unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000), unsafe.Pointer(str(47776)))
crt.X__builtin_abort(tls)
}
}()
- if (_pSrc.X0) != i32(1) {
+ if _pSrc.XnSrc != int32(1) {
return nil
}
- if (*XSelect)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(i32(0)))).X5) != nil {
+ if (elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), 0).XpSelect) != nil {
return nil
}
- _pTab = (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(i32(0)))).X4)
+ _pTab = (*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), 0).XpTab)
func() {
if _pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92957), unsafe.Pointer((*int8)(unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000))), unsafe.Pointer(str(43594)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92957), unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000), unsafe.Pointer(str(43549)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(_pTab.X3) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92958), unsafe.Pointer((*int8)(unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000))), unsafe.Pointer(str(102268)))
+ if (*XSelect)(_pTab.XpSelect) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92958), unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000), unsafe.Pointer(str(102296)))
crt.X__builtin_abort(tls)
}
}()
- if (_pTab.X16) != 0 {
+ if _pTab.XnModuleArg != 0 {
return nil
}
- _pEList = (*XExprList)(_p.X0)
+ _pEList = (*XExprList)(_p.XpEList)
func() {
if _pEList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92961), unsafe.Pointer((*int8)(unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000))), unsafe.Pointer(str(45052)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92961), unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000), unsafe.Pointer(str(45007)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_21:
- if _i >= (_pEList.X0) {
+ if _i >= _pEList.XnExpr {
goto _24
}
- _2_pRes = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2))))) + 20*uintptr(_i))).X0)
- if int32(_2_pRes.X0) != i32(152) {
+ _2_pRes = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_i)).XpExpr)
+ if int32(_2_pRes.Xop) != int32(152) {
return nil
}
func() {
- if (_2_pRes.X8) != ((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(i32(0)))).X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92966), unsafe.Pointer((*int8)(unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000))), unsafe.Pointer(str(102285)))
+ if _2_pRes.XiTable != (elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), 0).XiCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92966), unsafe.Pointer(&_isCandidateForInOptØ00__func__Ø000), unsafe.Pointer(str(102313)))
crt.X__builtin_abort(tls)
}
}()
@@ -81618,54 +82734,53 @@ _24:
var _isCandidateForInOptØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_isCandidateForInOptØ00__func__Ø000[0], str(102318), 20)
+ crt.Xstrncpy(nil, &_isCandidateForInOptØ00__func__Ø000[0], str(102346), 20)
}
-// Record the fact that the schema cookie will need to be verified
-// for database iDb. The code to actually verify the schema cookie
-// will occur at the end of the top-level VDBE and will be generated
-// later, by sqlite3FinishCoding().
+// C comment
+// /*
+// ** Record the fact that the schema cookie will need to be verified
+// ** for database iDb. The code to actually verify the schema cookie
+// ** will occur at the end of the top-level VDBE and will be generated
+// ** later, by sqlite3FinishCoding().
+// */
func _sqlite3CodeVerifySchema(tls *crt.TLS, _pParse *XParse, _iDb int32) {
var _pToplevel *XParse
_pToplevel = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
func() {
- if _iDb < i32(0) || _iDb >= ((*Xsqlite3)(_pParse.X0).X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103756), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeVerifySchemaØ00__func__Ø000))), unsafe.Pointer(str(102338)))
+ if _iDb < int32(0) || _iDb >= ((*Xsqlite3)(_pParse.Xdb).XnDb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103756), unsafe.Pointer(&_sqlite3CodeVerifySchemaØ00__func__Ø000), unsafe.Pointer(str(102366)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_pParse.X0).X4)+16*uintptr(_iDb))).X1) == nil && _iDb != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103757), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeVerifySchemaØ00__func__Ø000))), unsafe.Pointer(str(102368)))
+ if (*XBtree)(elem27((*XDb)((*Xsqlite3)(_pParse.Xdb).XaDb), uintptr(_iDb)).XpBt) == nil && _iDb != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103757), unsafe.Pointer(&_sqlite3CodeVerifySchemaØ00__func__Ø000), unsafe.Pointer(str(102396)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iDb >= i32(12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103758), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeVerifySchemaØ00__func__Ø000))), unsafe.Pointer(str(102406)))
+ if _iDb >= int32(12) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103758), unsafe.Pointer(&_sqlite3CodeVerifySchemaØ00__func__Ø000), unsafe.Pointer(str(102434)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3SchemaMutexHeld(tls, (*Xsqlite3)(_pParse.X0), _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103759), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeVerifySchemaØ00__func__Ø000))), unsafe.Pointer(str(102432)))
+ if _sqlite3SchemaMutexHeld(tls, (*Xsqlite3)(_pParse.Xdb), _iDb, nil) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103759), unsafe.Pointer(&_sqlite3CodeVerifySchemaØ00__func__Ø000), unsafe.Pointer(str(102460)))
crt.X__builtin_abort(tls)
}
}()
- if bool2int(((_pToplevel.X30)&(u32(1)<<uint(_iDb))) != uint32(i32(0))) != i32(0) {
+ if bool2int((_pToplevel.XcookieMask&(uint32(1)<<uint(_iDb))) != (0)) != int32(0) {
goto _12
}
- {
- p := (*uint32)(unsafe.Pointer(&(_pToplevel.X30)))
- *p = (*p) | (u32(1) << uint(_iDb))
- sink5(*p)
- }
- if i32(1) != 0 && (_iDb == i32(1)) {
+ _pToplevel.XcookieMask |= uint32(1) << uint(_iDb)
+ if int32(1) != 0 && (_iDb == int32(1)) {
_sqlite3OpenTempDatabase(tls, _pToplevel)
}
_12:
@@ -81674,183 +82789,201 @@ _12:
var _sqlite3CodeVerifySchemaØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CodeVerifySchemaØ00__func__Ø000[0], str(102475), 24)
+ crt.Xstrncpy(nil, &_sqlite3CodeVerifySchemaØ00__func__Ø000[0], str(102503), 24)
}
-// Make sure the TEMP database is open and available for use. Return
-// the number of errors. Leave any error messages in the pParse structure.
+// C comment
+// /*
+// ** Make sure the TEMP database is open and available for use. Return
+// ** the number of errors. Leave any error messages in the pParse structure.
+// */
func _sqlite3OpenTempDatabase(tls *crt.TLS, _pParse *XParse) (r0 int32) {
var _1_rc int32
var _db *Xsqlite3
var _1_pBt *XBtree
- _db = (*Xsqlite3)(_pParse.X0)
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X1) != nil || (_pParse.X54) != 0 {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(1)).XpBt) != nil || _pParse.Xexplain != 0 {
goto _1
}
- _1_rc = _sqlite3BtreeOpen(tls, (*Xsqlite3_vfs)(_db.X0), nil, _db, &_1_pBt, i32(0), _sqlite3OpenTempDatabaseØ00flagsØ001)
- if _1_rc != i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(102499))
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = _1_rc
- return i32(1)
+ _1_rc = _sqlite3BtreeOpen(tls, (*Xsqlite3_vfs)(_db.XpVfs), nil, _db, &_1_pBt, int32(0), _sqlite3OpenTempDatabaseØ00flagsØ001)
+ if _1_rc != int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(102527))
+ _pParse.Xrc = _1_rc
+ return int32(1)
}
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(1)))).X1))))) = _1_pBt
+ *(**XBtree)(unsafe.Pointer(&(elem27((*XDb)(_db.XaDb), uintptr(1)).XpBt))) = _1_pBt
func() {
- if (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103738), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OpenTempDatabaseØ00__func__Ø000))), unsafe.Pointer(str(102569)))
+ if (elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103738), unsafe.Pointer(&_sqlite3OpenTempDatabaseØ00__func__Ø000), unsafe.Pointer(str(102597)))
crt.X__builtin_abort(tls)
}
}()
- if i32(7) == _sqlite3BtreeSetPageSize(tls, _1_pBt, _db.X27, i32(-1), i32(0)) {
+ if int32(7) == _sqlite3BtreeSetPageSize(tls, _1_pBt, _db.XnextPagesize, int32(-1), int32(0)) {
_sqlite3OomFault(tls, _db)
- return i32(1)
+ return int32(1)
}
_1:
- return i32(0)
+ return int32(0)
}
var _sqlite3OpenTempDatabaseØ00flagsØ001 int32
func init() {
- _sqlite3OpenTempDatabaseØ00flagsØ001 = i32(542)
+ _sqlite3OpenTempDatabaseØ00flagsØ001 = int32(542)
}
var _sqlite3OpenTempDatabaseØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3OpenTempDatabaseØ00__func__Ø000[0], str(102588), 24)
+ crt.Xstrncpy(nil, &_sqlite3OpenTempDatabaseØ00__func__Ø000[0], str(102616), 24)
}
-// Generate code that checks the left-most column of index table iCur to see if
-// it contains any NULL entries. Cause the register at regHasNull to be set
-// to a non-NULL value if iCur contains no NULLs. Cause register regHasNull
-// to be set to NULL if iCur contains one or more NULL values.
+// C comment
+// /*
+// ** Generate code that checks the left-most column of index table iCur to see if
+// ** it contains any NULL entries. Cause the register at regHasNull to be set
+// ** to a non-NULL value if iCur contains no NULLs. Cause register regHasNull
+// ** to be set to NULL if iCur contains one or more NULL values.
+// */
func _sqlite3SetHasNullFlag(tls *crt.TLS, _v *TVdbe, _iCur int32, _regHasNull int32) {
var _addr1 int32
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _regHasNull)
- _addr1 = _sqlite3VdbeAddOp1(tls, _v, i32(37), _iCur)
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _iCur, i32(0), _regHasNull)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(128)))
- _sqlite3VdbeComment(tls, _v, str(102612), _iCur)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _regHasNull)
+ _addr1 = _sqlite3VdbeAddOp1(tls, _v, int32(37), _iCur)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _iCur, int32(0), _regHasNull)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(128))
+ _sqlite3VdbeComment(tls, _v, str(102640), _iCur)
_sqlite3VdbeJumpHere(tls, _v, _addr1)
}
-// The argument is an IN operator with a list (not a subquery) on the
-// right-hand side. Return TRUE if that list is constant.
+// C comment
+// /*
+// ** The argument is an IN operator with a list (not a subquery) on the
+// ** right-hand side. Return TRUE if that list is constant.
+// */
func _sqlite3InRhsIsConstant(tls *crt.TLS, _pIn *XExpr) (r0 int32) {
var _res int32
var _pLHS *XExpr
func() {
- if ((_pIn.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92999), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InRhsIsConstantØ00__func__Ø000))), unsafe.Pointer(str(102631)))
+ if (_pIn.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92999), unsafe.Pointer(&_sqlite3InRhsIsConstantØ00__func__Ø000), unsafe.Pointer(str(102659)))
crt.X__builtin_abort(tls)
}
}()
- _pLHS = (*XExpr)(_pIn.X4)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIn.X4))))) = nil
+ _pLHS = (*XExpr)(_pIn.XpLeft)
+ *(**XExpr)(unsafe.Pointer(&_pIn.XpLeft)) = nil
_res = _sqlite3ExprIsConstant(tls, _pIn)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIn.X4))))) = _pLHS
+ *(**XExpr)(unsafe.Pointer(&_pIn.XpLeft)) = _pLHS
return _res
}
var _sqlite3InRhsIsConstantØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3InRhsIsConstantØ00__func__Ø000[0], str(102667), 23)
-}
-
-// If the expression is always either TRUE or FALSE (respectively),
-// then return 1. If one cannot determine the truth value of the
-// expression at compile-time return 0.
-//
-// This is an optimization. If is OK to return 0 here even if
-// the expression really is always false or false (a false negative).
-// But it is a bug to return 1 if the expression might have different
-// boolean values in different circumstances (a false positive.)
-//
-// Note that if the expression is part of conditional for a
-// LEFT JOIN, then we cannot determine at compile-time whether or not
-// is it true or false, so always return 0.
+ crt.Xstrncpy(nil, &_sqlite3InRhsIsConstantØ00__func__Ø000[0], str(102695), 23)
+}
+
+// C comment
+// /*
+// ** If the expression is always either TRUE or FALSE (respectively),
+// ** then return 1. If one cannot determine the truth value of the
+// ** expression at compile-time return 0.
+// **
+// ** This is an optimization. If is OK to return 0 here even if
+// ** the expression really is always false or false (a false negative).
+// ** But it is a bug to return 1 if the expression might have different
+// ** boolean values in different circumstances (a false positive.)
+// **
+// ** Note that if the expression is part of conditional for a
+// ** LEFT JOIN, then we cannot determine at compile-time whether or not
+// ** is it true or false, so always return 0.
+// */
func _exprAlwaysTrue(tls *crt.TLS, _p *XExpr) (r0 int32) {
var _v int32
- _v = i32(0)
- if ((_p.X2) & uint32(i32(1))) != uint32(i32(0)) {
- return i32(0)
+ _v = int32(0)
+ if (_p.Xflags & uint32(1)) != (0) {
+ return int32(0)
}
if _sqlite3ExprIsInteger(tls, _p, &_v) == 0 {
- return i32(0)
+ return int32(0)
}
- return bool2int(_v != i32(0))
+ return bool2int(_v != int32(0))
}
-// Create a new mask for cursor iCursor.
-//
-// There is one cursor per table in the FROM clause. The number of
-// tables in the FROM clause is limited by a test early in the
-// sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[]
-// array will never overflow.
+// C comment
+// /*
+// ** Create a new mask for cursor iCursor.
+// **
+// ** There is one cursor per table in the FROM clause. The number of
+// ** tables in the FROM clause is limited by a test early in the
+// ** sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[]
+// ** array will never overflow.
+// */
func _createMask(tls *crt.TLS, _pMaskSet *XWhereMaskSet, _iCursor int32) {
func() {
- if (_pMaskSet.X0) >= i32(64) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130573), unsafe.Pointer((*int8)(unsafe.Pointer(&_createMaskØ00__func__Ø000))), unsafe.Pointer(str(102690)))
+ if _pMaskSet.Xn >= int32(64) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130573), unsafe.Pointer(&_createMaskØ00__func__Ø000), unsafe.Pointer(str(102718)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[64]int32)(unsafe.Pointer(&(_pMaskSet.X1))))) + 4*uintptr(postInc1((*int32)(unsafe.Pointer(&(_pMaskSet.X0))), int32(1))))) = _iCursor
+ *elem8((*int32)(unsafe.Pointer(&_pMaskSet.Xix)), uintptr(postInc2(&_pMaskSet.Xn, 1))) = _iCursor
}
var _createMaskØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_createMaskØ00__func__Ø000[0], str(102728), 11)
+ crt.Xstrncpy(nil, &_createMaskØ00__func__Ø000[0], str(102756), 11)
}
-// For table-valued-functions, transform the function arguments into
-// new WHERE clause terms.
-//
-// Each function argument translates into an equality constraint against
-// a HIDDEN column in the table.
+// C comment
+// /*
+// ** For table-valued-functions, transform the function arguments into
+// ** new WHERE clause terms.
+// **
+// ** Each function argument translates into an equality constraint against
+// ** a HIDDEN column in the table.
+// */
func _sqlite3WhereTabFuncArgs(tls *crt.TLS, _pParse *XParse, _pItem *TSrcList_item, _pWC *XWhereClause) {
var _j, _k int32
var _pTab *XTable
var _pArgs *XExprList
var _pColRef, _pTerm *XExpr
- if int32((uint32(((*t28)(unsafe.Pointer(&(_pItem.X9))).X1)>>uint(i32(2)))<<uint(i32(31)))>>uint(i32(31))) == i32(0) {
+ if int32((uint32((_pItem.Xfg.XnotIndexed)>>2)<<31)>>31) == int32(0) {
return
}
- _pTab = (*XTable)(_pItem.X4)
+ _pTab = (*XTable)(_pItem.XpTab)
func() {
if _pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130367), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereTabFuncArgsØ00__func__Ø000))), unsafe.Pointer(str(43594)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130367), unsafe.Pointer(&_sqlite3WhereTabFuncArgsØ00__func__Ø000), unsafe.Pointer(str(43549)))
crt.X__builtin_abort(tls)
}
}()
- _pArgs = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_pItem.X15))))))
+ _pArgs = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pItem.Xu1)))
if _pArgs == nil {
return
}
- _j = store1(&_k, i32(0))
+ _j = store2(&_k, int32(0))
_4:
- if _j >= (_pArgs.X0) {
+ if _j >= _pArgs.XnExpr {
goto _7
}
_8:
- if (_k < int32(_pTab.X11)) && ((int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_k))).X6) & i32(2)) == i32(0)) {
+ if (_k < int32(_pTab.XnCol)) && ((int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_k)).XcolFlags) & int32(2)) == int32(0)) {
_k += 1
goto _8
}
- if _k >= int32(_pTab.X11) {
- _sqlite3ErrorMsg(tls, _pParse, str(102739), unsafe.Pointer(_pTab.X0), _j)
+ if _k >= int32(_pTab.XnCol) {
+ _sqlite3ErrorMsg(tls, _pParse, str(102767), unsafe.Pointer(_pTab.XzName), _j)
return
}
- _pColRef = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.X0), i32(152), nil, i32(0))
+ _pColRef = _sqlite3ExprAlloc(tls, (*Xsqlite3)(_pParse.Xdb), int32(152), nil, int32(0))
if _pColRef == nil {
return
}
- *(*int32)(unsafe.Pointer(&(_pColRef.X8))) = _pItem.X11
- *(*int16)(unsafe.Pointer(&(_pColRef.X9))) = int16(postInc1(&_k, int32(1)))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pColRef.X14))))) = _pTab
- _pTerm = _sqlite3PExpr(tls, _pParse, i32(78), _pColRef, _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.X0), (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pArgs.X2)))))+20*uintptr(_j))).X0), i32(0)))
- _whereClauseInsert(tls, _pWC, _pTerm, uint16(i32(1)))
+ _pColRef.XiTable = _pItem.XiCursor
+ _pColRef.XiColumn = int16(postInc2(&_k, 1))
+ *(**XTable)(unsafe.Pointer(&_pColRef.XpTab)) = _pTab
+ _pTerm = _sqlite3PExpr(tls, _pParse, int32(78), _pColRef, _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.Xdb), (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pArgs.Xa)), uintptr(_j)).XpExpr), int32(0)))
+ _whereClauseInsert(tls, _pWC, _pTerm, uint16(1))
_j += 1
goto _4
_7:
@@ -81859,50 +82992,56 @@ _7:
var _sqlite3WhereTabFuncArgsØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WhereTabFuncArgsØ00__func__Ø000[0], str(102775), 24)
+ crt.Xstrncpy(nil, &_sqlite3WhereTabFuncArgsØ00__func__Ø000[0], str(102803), 24)
}
-// Return the bitmask for the given cursor number. Return 0 if
-// iCursor is not in the set.
+// C comment
+// /*
+// ** Return the bitmask for the given cursor number. Return 0 if
+// ** iCursor is not in the set.
+// */
func _sqlite3WhereGetMask(tls *crt.TLS, _pMaskSet *XWhereMaskSet, _iCursor int32) (r0 uint64) {
var _i int32
func() {
- if (_pMaskSet.X0) > i32(64) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130555), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereGetMaskØ00__func__Ø000))), unsafe.Pointer(str(102799)))
+ if _pMaskSet.Xn > int32(64) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130555), unsafe.Pointer(&_sqlite3WhereGetMaskØ00__func__Ø000), unsafe.Pointer(str(102827)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_2:
- if _i >= (_pMaskSet.X0) {
+ if _i >= _pMaskSet.Xn {
goto _5
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[64]int32)(unsafe.Pointer(&(_pMaskSet.X1))))) + 4*uintptr(_i)))) == _iCursor {
- return u64(1) << uint(_i)
+ if (*elem8((*int32)(unsafe.Pointer(&_pMaskSet.Xix)), uintptr(_i))) == _iCursor {
+ return uint64(1) << uint(_i)
}
_i += 1
goto _2
_5:
- return uint64(i32(0))
+ return 0
}
var _sqlite3WhereGetMaskØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WhereGetMaskØ00__func__Ø000[0], str(102835), 20)
+ crt.Xstrncpy(nil, &_sqlite3WhereGetMaskØ00__func__Ø000[0], str(102863), 20)
}
-// Call exprAnalyze on all terms in a WHERE clause.
-//
-// Note that exprAnalyze() might add new virtual terms onto the
-// end of the WHERE clause. We do not want to analyze these new
-// virtual terms, so start analyzing at the end and work forward
-// so that the added virtual terms are never processed.
+// C comment
+// /*
+// ** Call exprAnalyze on all terms in a WHERE clause.
+// **
+// ** Note that exprAnalyze() might add new virtual terms onto the
+// ** end of the WHERE clause. We do not want to analyze these new
+// ** virtual terms, so start analyzing at the end and work forward
+// ** so that the added virtual terms are never processed.
+// */
func _sqlite3WhereExprAnalyze(tls *crt.TLS, _pTabList *XSrcList, _pWC *XWhereClause) {
var _i int32
- _i = (_pWC.X3) - i32(1)
+ _i = _pWC.XnTerm - int32(1)
_0:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _3
}
_exprAnalyze(tls, _pTabList, _pWC, _i)
@@ -81911,22 +83050,25 @@ _0:
_3:
}
-// The input to this routine is an WhereTerm structure with only the
-// "pExpr" field filled in. The job of this routine is to analyze the
-// subexpression and populate all the other fields of the WhereTerm
-// structure.
-//
-// If the expression is of the form "<expr> <op> X" it gets commuted
-// to the standard form of "X <op> <expr>".
-//
-// If the expression is of the form "X <op> Y" where both X and Y are
-// columns, then the original expression is unchanged and a new virtual
-// term of the form "Y <op> X" is added to the WHERE clause and
-// analyzed separately. The original term is marked with TERM_COPIED
-// and the new term is marked with TERM_DYNAMIC (because it's pExpr
-// needs to be freed with the WhereClause) and TERM_VIRTUAL (because it
-// is a commuted copy of a prior term.) The original term has nChild=1
-// and the copy has idxParent set to the index of the original term.
+// C comment
+// /*
+// ** The input to this routine is an WhereTerm structure with only the
+// ** "pExpr" field filled in. The job of this routine is to analyze the
+// ** subexpression and populate all the other fields of the WhereTerm
+// ** structure.
+// **
+// ** If the expression is of the form "<expr> <op> X" it gets commuted
+// ** to the standard form of "X <op> <expr>".
+// **
+// ** If the expression is of the form "X <op> Y" where both X and Y are
+// ** columns, then the original expression is unchanged and a new virtual
+// ** term of the form "Y <op> X" is added to the WHERE clause and
+// ** analyzed separately. The original term is marked with TERM_COPIED
+// ** and the new term is marked with TERM_DYNAMIC (because it's pExpr
+// ** needs to be freed with the WhereClause) and TERM_VIRTUAL (because it
+// ** is a commuted copy of a prior term.) The original term has nChild=1
+// ** and the copy has idxParent set to the index of the original term.
+// */
func _exprAnalyze(tls *crt.TLS, _pSrc *XSrcList, _pWC *XWhereClause, _idxTerm int32) {
var _isComplete, _noCase, _op, _nLeft, _13_idxNew, _17_i, _18_idxNew, _20_idxNew1, _20_idxNew2, _21_i, _26_idxNew, _28_i, _29_idxNew, _30_i, _31_idxNew int32
var _21_c int8
@@ -81943,155 +83085,147 @@ func _exprAnalyze(tls *crt.TLS, _pSrc *XSrcList, _pWC *XWhereClause, _idxTerm in
var _pWInfo *XWhereInfo
var _pTerm, _12_pNew, _26_pNewTerm *XWhereTerm
var _pMaskSet *XWhereMaskSet
- _pWInfo = (*XWhereInfo)(_pWC.X0)
- _extraRight = u64(0)
+ _pWInfo = (*XWhereInfo)(_pWC.XpWInfo)
+ _extraRight = uint64(0)
_pStr1 = nil
- _isComplete = i32(0)
- _noCase = i32(0)
- _pParse = (*XParse)(_pWInfo.X0)
- _db = (*Xsqlite3)(_pParse.X0)
- if (_db.X17) != 0 {
+ _isComplete = int32(0)
+ _noCase = int32(0)
+ _pParse = (*XParse)(_pWInfo.XpParse)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _db.XmallocFailed != 0 {
return
}
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
- _pMaskSet = (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23)))
- _pExpr = (*XExpr)(_pTerm.X0)
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
+ _pMaskSet = &_pWInfo.XsMaskSet
+ _pExpr = (*XExpr)(_pTerm.XpExpr)
func() {
- if int32(_pExpr.X0) == i32(24) || int32(_pExpr.X0) == i32(94) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129865), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000))), unsafe.Pointer(str(102855)))
+ if int32(_pExpr.Xop) == int32(24) || int32(_pExpr.Xop) == int32(94) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129865), unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000), unsafe.Pointer(str(102883)))
crt.X__builtin_abort(tls)
}
}()
- _prereqLeft = _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_pExpr.X4))
- _op = int32(_pExpr.X0)
- if _op != i32(74) {
+ _prereqLeft = _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_pExpr.XpLeft))
+ _op = int32(_pExpr.Xop)
+ if _op != int32(74) {
goto _4
}
func() {
- if (*XExpr)(_pExpr.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129869), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000))), unsafe.Pointer(str(102897)))
+ if (*XExpr)(_pExpr.XpRight) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129869), unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000), unsafe.Pointer(str(102925)))
crt.X__builtin_abort(tls)
}
}()
if _sqlite3ExprCheckIN(tls, _pParse, _pExpr) != 0 {
return
}
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- *(*uint64)(unsafe.Pointer(&(_pTerm.X11))) = _exprSelectUsage(tls, _pMaskSet, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))))
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ _pTerm.XprereqRight = _exprSelectUsage(tls, _pMaskSet, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))))
goto _9
}
- *(*uint64)(unsafe.Pointer(&(_pTerm.X11))) = _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))))
+ _pTerm.XprereqRight = _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))))
_9:
goto _12
_4:
- if _op == i32(75) {
- *(*uint64)(unsafe.Pointer(&(_pTerm.X11))) = uint64(i32(0))
+ if _op == int32(75) {
+ _pTerm.XprereqRight = 0
goto _12
}
- *(*uint64)(unsafe.Pointer(&(_pTerm.X11))) = _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_pExpr.X5))
+ _pTerm.XprereqRight = _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_pExpr.XpRight))
_12:
_prereqAll = _sqlite3WhereExprUsage(tls, _pMaskSet, _pExpr)
- if ((_pExpr.X2) & uint32(i32(1))) == uint32(i32(0)) {
+ if (_pExpr.Xflags & uint32(1)) == (0) {
goto _13
}
- _7_x = _sqlite3WhereGetMask(tls, _pMaskSet, int32(_pExpr.X11))
- {
- p := &_prereqAll
- *p = (*p) | _7_x
- sink17(*p)
- }
- _extraRight = _7_x - uint64(i32(1))
- if (_prereqAll >> uint(i32(1))) >= _7_x {
- _sqlite3ErrorMsg(tls, _pParse, str(102914))
+ _7_x = _sqlite3WhereGetMask(tls, _pMaskSet, int32(_pExpr.XiRightJoinTable))
+ _prereqAll |= _7_x
+ _extraRight = _7_x - uint64(1)
+ if (_prereqAll >> 1) >= _7_x {
+ _sqlite3ErrorMsg(tls, _pParse, str(102942))
return
}
_13:
- *(*uint64)(unsafe.Pointer(&(_pTerm.X12))) = _prereqAll
- *(*int32)(unsafe.Pointer(&(_pTerm.X8))) = i32(-1)
- *(*int32)(unsafe.Pointer(&(_pTerm.X7))) = i32(-1)
- *(*uint16)(unsafe.Pointer(&(_pTerm.X4))) = uint16(i32(0))
+ _pTerm.XprereqAll = _prereqAll
+ _pTerm.XleftCursor = int32(-1)
+ _pTerm.XiParent = int32(-1)
+ _pTerm.XeOperator = 0
if _allowedOp(tls, _op) == 0 {
goto _15
}
- _9_pLeft = _sqlite3ExprSkipCollate(tls, (*XExpr)(_pExpr.X4))
- _9_pRight = _sqlite3ExprSkipCollate(tls, (*XExpr)(_pExpr.X5))
+ _9_pLeft = _sqlite3ExprSkipCollate(tls, (*XExpr)(_pExpr.XpLeft))
+ _9_pRight = _sqlite3ExprSkipCollate(tls, (*XExpr)(_pExpr.XpRight))
_9_opMask = uint16(func() int32 {
- if ((_pTerm.X11) & _prereqLeft) == uint64(i32(0)) {
- return i32(8191)
+ if (_pTerm.XprereqRight & _prereqLeft) == (0) {
+ return int32(8191)
}
- return i32(2048)
+ return int32(2048)
}())
- if (_pTerm.X9) > i32(0) {
+ if _pTerm.XiField > int32(0) {
func() {
- if _op != i32(74) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129903), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000))), unsafe.Pointer(str(102955)))
+ if _op != int32(74) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129903), unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000), unsafe.Pointer(str(102983)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_9_pLeft.X0) != i32(158) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129904), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000))), unsafe.Pointer(str(102965)))
+ if int32(_9_pLeft.Xop) != int32(158) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129904), unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000), unsafe.Pointer(str(102993)))
crt.X__builtin_abort(tls)
}
}()
- _9_pLeft = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_9_pLeft.X6)))))).X2))))) + 20*uintptr((_pTerm.X9)-i32(1)))).X0)
+ _9_pLeft = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_9_pLeft.Xx))).Xa))), uintptr(_pTerm.XiField-int32(1))).XpExpr)
}
if _exprMightBeIndexed(tls, _pSrc, _prereqLeft, (*int32)(unsafe.Pointer(&_9_aiCurCol)), _9_pLeft, _op) != 0 {
- *(*int32)(unsafe.Pointer(&(_pTerm.X8))) = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_9_aiCurCol)) + 4*uintptr(i32(0))))
- *(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10))))) = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_9_aiCurCol)) + 4*uintptr(i32(1))))
- *(*uint16)(unsafe.Pointer(&(_pTerm.X4))) = uint16(int32(_operatorMask(tls, _op)) & int32(_9_opMask))
+ _pTerm.XleftCursor = *elem8((*int32)(unsafe.Pointer(&_9_aiCurCol)), 0)
+ *(*int32)(unsafe.Pointer(&_pTerm.Xu)) = *elem8((*int32)(unsafe.Pointer(&_9_aiCurCol)), uintptr(1))
+ _pTerm.XeOperator = uint16(int32(_operatorMask(tls, _op)) & int32(_9_opMask))
}
- if _op == i32(72) {
+ if _op == int32(72) {
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X3)))
- *p = uint16(int32(*p) | i32(2048))
- sink14(*p)
+ p := &_pTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(2048))
}
}
- if _9_pRight == nil || _exprMightBeIndexed(tls, _pSrc, _pTerm.X11, (*int32)(unsafe.Pointer(&_9_aiCurCol)), _9_pRight, _op) == 0 {
+ if _9_pRight == nil || _exprMightBeIndexed(tls, _pSrc, _pTerm.XprereqRight, (*int32)(unsafe.Pointer(&_9_aiCurCol)), _9_pRight, _op) == 0 {
goto _26
}
- _12_eExtraOp = u16(0)
+ _12_eExtraOp = uint16(0)
func() {
- if (_pTerm.X9) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129920), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000))), unsafe.Pointer(str(102986)))
+ if _pTerm.XiField != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129920), unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000), unsafe.Pointer(str(103014)))
crt.X__builtin_abort(tls)
}
}()
- if (_pTerm.X8) < i32(0) {
+ if _pTerm.XleftCursor < int32(0) {
goto _29
}
- _12_pDup = _sqlite3ExprDup(tls, _db, _pExpr, i32(0))
- if (_db.X17) != 0 {
+ _12_pDup = _sqlite3ExprDup(tls, _db, _pExpr, int32(0))
+ if _db.XmallocFailed != 0 {
_sqlite3ExprDelete(tls, _db, _12_pDup)
return
}
- _13_idxNew = _whereClauseInsert(tls, _pWC, _12_pDup, uint16(i32(3)))
- if _13_idxNew == i32(0) {
+ _13_idxNew = _whereClauseInsert(tls, _pWC, _12_pDup, uint16(3))
+ if _13_idxNew == int32(0) {
return
}
- _12_pNew = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_13_idxNew)))
+ _12_pNew = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_13_idxNew))
_markTermAsChild(tls, _pWC, _13_idxNew, _idxTerm)
- if _op == i32(72) {
+ if _op == int32(72) {
{
- p := (*uint16)(unsafe.Pointer(&(_12_pNew.X3)))
- *p = uint16(int32(*p) | i32(2048))
- sink14(*p)
+ p := &_12_pNew.XwtFlags
+ *p = uint16(int32(*p) | int32(2048))
}
}
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X3)))
- *p = uint16(int32(*p) | i32(8))
- sink14(*p)
+ p := &_pTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(8))
}
if _termIsEquivalence(tls, _pParse, _12_pDup) != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X4)))
- *p = uint16(int32(*p) | i32(2048))
- sink14(*p)
+ p := &_pTerm.XeOperator
+ *p = uint16(int32(*p) | int32(2048))
}
- _12_eExtraOp = uint16(i32(2048))
+ _12_eExtraOp = uint16(2048)
}
goto _34
_29:
@@ -82099,248 +83233,229 @@ _29:
_12_pNew = _pTerm
_34:
_exprCommute(tls, _pParse, _12_pDup)
- *(*int32)(unsafe.Pointer(&(_12_pNew.X8))) = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_9_aiCurCol)) + 4*uintptr(i32(0))))
- *(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_12_pNew.X10))))) = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_9_aiCurCol)) + 4*uintptr(i32(1))))
- *(*uint64)(unsafe.Pointer(&(_12_pNew.X11))) = _prereqLeft | _extraRight
- *(*uint64)(unsafe.Pointer(&(_12_pNew.X12))) = _prereqAll
- *(*uint16)(unsafe.Pointer(&(_12_pNew.X4))) = uint16((int32(_operatorMask(tls, int32(_12_pDup.X0))) + int32(_12_eExtraOp)) & int32(_9_opMask))
+ _12_pNew.XleftCursor = *elem8((*int32)(unsafe.Pointer(&_9_aiCurCol)), 0)
+ *(*int32)(unsafe.Pointer(&_12_pNew.Xu)) = *elem8((*int32)(unsafe.Pointer(&_9_aiCurCol)), uintptr(1))
+ _12_pNew.XprereqRight = _prereqLeft | _extraRight
+ _12_pNew.XprereqAll = _prereqAll
+ _12_pNew.XeOperator = uint16((int32(_operatorMask(tls, int32(_12_pDup.Xop))) + int32(_12_eExtraOp)) & int32(_9_opMask))
_26:
goto _47
_15:
- if int32(_pExpr.X0) != i32(73) || int32(_pWC.X2) != i32(71) {
+ if int32(_pExpr.Xop) != int32(73) || int32(_pWC.Xop) != int32(71) {
goto _37
}
- _17_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
+ _17_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
func() {
if _17_pList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129974), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000))), unsafe.Pointer(str(90087)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129974), unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000), unsafe.Pointer(str(88609)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_17_pList.X0) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129975), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000))), unsafe.Pointer(str(103003)))
+ if _17_pList.XnExpr != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129975), unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000), unsafe.Pointer(str(103031)))
crt.X__builtin_abort(tls)
}
}()
- _17_i = i32(0)
+ _17_i = int32(0)
_42:
- if _17_i >= i32(2) {
+ if _17_i >= int32(2) {
goto _45
}
- _18_pNewExpr = _sqlite3PExpr(tls, _pParse, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_exprAnalyzeØ00opsØ001)) + 1*uintptr(_17_i)))), _sqlite3ExprDup(tls, _db, (*XExpr)(_pExpr.X4), i32(0)), _sqlite3ExprDup(tls, _db, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_17_pList.X2)))))+20*uintptr(_17_i))).X0), i32(0)))
+ _18_pNewExpr = _sqlite3PExpr(tls, _pParse, int32(*elem15((*uint8)(unsafe.Pointer(&_exprAnalyzeØ00opsØ001)), uintptr(_17_i))), _sqlite3ExprDup(tls, _db, (*XExpr)(_pExpr.XpLeft), int32(0)), _sqlite3ExprDup(tls, _db, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_17_pList.Xa)), uintptr(_17_i)).XpExpr), int32(0)))
_transferJoinMarkings(tls, _18_pNewExpr, _pExpr)
- _18_idxNew = _whereClauseInsert(tls, _pWC, _18_pNewExpr, uint16(i32(3)))
+ _18_idxNew = _whereClauseInsert(tls, _pWC, _18_pNewExpr, uint16(3))
_exprAnalyze(tls, _pSrc, _pWC, _18_idxNew)
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
_markTermAsChild(tls, _pWC, _18_idxNew, _idxTerm)
_17_i += 1
goto _42
_45:
goto _47
_37:
- if int32(_pExpr.X0) == i32(70) {
+ if int32(_pExpr.Xop) == int32(70) {
func() {
- if int32(_pWC.X2) != i32(71) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129997), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000))), unsafe.Pointer(str(103019)))
+ if int32(_pWC.Xop) != int32(71) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129997), unsafe.Pointer(&_exprAnalyzeØ00__func__Ø000), unsafe.Pointer(str(103047)))
crt.X__builtin_abort(tls)
}
}()
_exprAnalyzeOrTerm(tls, _pSrc, _pWC, _idxTerm)
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
}
_47:
- if int32(_pWC.X2) != i32(71) || _isLikeOrGlob(tls, _pParse, _pExpr, &_pStr1, &_isComplete, &_noCase) == 0 {
+ if int32(_pWC.Xop) != int32(71) || _isLikeOrGlob(tls, _pParse, _pExpr, &_pStr1, &_isComplete, &_noCase) == 0 {
goto _51
}
- _20_wtFlags = u16(259)
- _20_pLeft = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2))))) + 20*uintptr(i32(1)))).X0)
- _20_pStr2 = _sqlite3ExprDup(tls, _db, _pStr1, i32(0))
- if _noCase == 0 || ((*Xsqlite3)(_pParse.X0).X17) != 0 {
+ _20_wtFlags = uint16(259)
+ _20_pLeft = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), uintptr(1)).XpExpr)
+ _20_pStr2 = _sqlite3ExprDup(tls, _db, _pStr1, int32(0))
+ if _noCase == 0 || ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) != 0 {
goto _53
}
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X3)))
- *p = uint16(int32(*p) | i32(1024))
- sink14(*p)
+ p := &_pTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(1024))
}
- _21_i = i32(0)
+ _21_i = int32(0)
_54:
- if int32(store3(&_21_c, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pStr1.X3))))))) + 1*uintptr(_21_i))))) == i32(0) {
+ if int32(store5(&_21_c, *elem1(*(**int8)(unsafe.Pointer(&_pStr1.Xu)), uintptr(_21_i)))) == int32(0) {
goto _57
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pStr1.X3))))))) + 1*uintptr(_21_i))) = int8(int32(_21_c) & (^(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(_21_c))))) & i32(32))))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_20_pStr2.X3))))))) + 1*uintptr(_21_i))) = int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(_21_c)))))
+ *elem1(*(**int8)(unsafe.Pointer(&_pStr1.Xu)), uintptr(_21_i)) = int8(int32(_21_c) & (^(int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(_21_c)))) & int32(32))))
+ *elem1(*(**int8)(unsafe.Pointer(&_20_pStr2.Xu)), uintptr(_21_i)) = int8(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(_21_c))))
_21_i += 1
goto _54
_57:
_53:
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
goto _58
}
- _23_pC = (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_20_pStr2.X3))))))) + 1*uintptr(_sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_20_pStr2.X3))))))-i32(1))))))
+ _23_pC = (*uint8)(unsafe.Pointer(elem1(*(**int8)(unsafe.Pointer(&_20_pStr2.Xu)), uintptr(_sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer(&_20_pStr2.Xu)))-int32(1)))))
_23_c = *_23_pC
if _noCase == 0 {
goto _59
}
- if int32(_23_c) == i32(64) {
- _isComplete = i32(0)
+ if int32(_23_c) == int32(64) {
+ _isComplete = int32(0)
}
- _23_c = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(_23_c)))
+ _23_c = *elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(_23_c))
_59:
- *_23_pC = uint8(int32(_23_c) + i32(1))
+ *_23_pC = uint8(int32(_23_c) + int32(1))
_58:
_20_zCollSeqName = func() *int8 {
if _noCase != 0 {
- return str(103035)
+ return str(103063)
}
- return str(37881)
+ return str(37836)
}()
- _20_pNewExpr1 = _sqlite3ExprDup(tls, _db, _20_pLeft, i32(0))
- _20_pNewExpr1 = _sqlite3PExpr(tls, _pParse, i32(82), _sqlite3ExprAddCollateString(tls, _pParse, _20_pNewExpr1, _20_zCollSeqName), _pStr1)
+ _20_pNewExpr1 = _sqlite3ExprDup(tls, _db, _20_pLeft, int32(0))
+ _20_pNewExpr1 = _sqlite3PExpr(tls, _pParse, int32(82), _sqlite3ExprAddCollateString(tls, _pParse, _20_pNewExpr1, _20_zCollSeqName), _pStr1)
_transferJoinMarkings(tls, _20_pNewExpr1, _pExpr)
_20_idxNew1 = _whereClauseInsert(tls, _pWC, _20_pNewExpr1, _20_wtFlags)
_exprAnalyze(tls, _pSrc, _pWC, _20_idxNew1)
- _20_pNewExpr2 = _sqlite3ExprDup(tls, _db, _20_pLeft, i32(0))
- _20_pNewExpr2 = _sqlite3PExpr(tls, _pParse, i32(81), _sqlite3ExprAddCollateString(tls, _pParse, _20_pNewExpr2, _20_zCollSeqName), _20_pStr2)
+ _20_pNewExpr2 = _sqlite3ExprDup(tls, _db, _20_pLeft, int32(0))
+ _20_pNewExpr2 = _sqlite3PExpr(tls, _pParse, int32(81), _sqlite3ExprAddCollateString(tls, _pParse, _20_pNewExpr2, _20_zCollSeqName), _20_pStr2)
_transferJoinMarkings(tls, _20_pNewExpr2, _pExpr)
_20_idxNew2 = _whereClauseInsert(tls, _pWC, _20_pNewExpr2, _20_wtFlags)
_exprAnalyze(tls, _pSrc, _pWC, _20_idxNew2)
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
if _isComplete != 0 {
_markTermAsChild(tls, _pWC, _20_idxNew1, _idxTerm)
_markTermAsChild(tls, _pWC, _20_idxNew2, _idxTerm)
}
_51:
- if int32(_pWC.X2) != i32(71) || _isMatchOfColumn(tls, _pExpr, &_eOp2) == 0 {
+ if int32(_pWC.Xop) != int32(71) || _isMatchOfColumn(tls, _pExpr, &_eOp2) == 0 {
goto _65
}
- _26_pRight = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2))))) + 20*uintptr(i32(0)))).X0)
- _26_pLeft = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2))))) + 20*uintptr(i32(1)))).X0)
+ _26_pRight = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), 0).XpExpr)
+ _26_pLeft = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), uintptr(1)).XpExpr)
_26_prereqExpr = _sqlite3WhereExprUsage(tls, _pMaskSet, _26_pRight)
_26_prereqColumn = _sqlite3WhereExprUsage(tls, _pMaskSet, _26_pLeft)
- if (_26_prereqExpr & _26_prereqColumn) == uint64(i32(0)) {
- _27_pNewExpr = _sqlite3PExpr(tls, _pParse, i32(50), nil, _sqlite3ExprDup(tls, _db, _26_pRight, i32(0)))
- _26_idxNew = _whereClauseInsert(tls, _pWC, _27_pNewExpr, uint16(i32(3)))
- _26_pNewTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_26_idxNew)))
- *(*uint64)(unsafe.Pointer(&(_26_pNewTerm.X11))) = _26_prereqExpr
- *(*int32)(unsafe.Pointer(&(_26_pNewTerm.X8))) = _26_pLeft.X8
- *(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_26_pNewTerm.X10))))) = int32(_26_pLeft.X9)
- *(*uint16)(unsafe.Pointer(&(_26_pNewTerm.X4))) = uint16(i32(64))
- *(*uint8)(unsafe.Pointer(&(_26_pNewTerm.X6))) = _eOp2
+ if (_26_prereqExpr & _26_prereqColumn) == (0) {
+ _27_pNewExpr = _sqlite3PExpr(tls, _pParse, int32(50), nil, _sqlite3ExprDup(tls, _db, _26_pRight, int32(0)))
+ _26_idxNew = _whereClauseInsert(tls, _pWC, _27_pNewExpr, uint16(3))
+ _26_pNewTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_26_idxNew))
+ _26_pNewTerm.XprereqRight = _26_prereqExpr
+ _26_pNewTerm.XleftCursor = _26_pLeft.XiTable
+ *(*int32)(unsafe.Pointer(&_26_pNewTerm.Xu)) = int32(_26_pLeft.XiColumn)
+ _26_pNewTerm.XeOperator = uint16(64)
+ _26_pNewTerm.XeMatchOp = _eOp2
_markTermAsChild(tls, _pWC, _26_idxNew, _idxTerm)
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X3)))
- *p = uint16(int32(*p) | i32(8))
- sink14(*p)
+ p := &_pTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(8))
}
- *(*uint64)(unsafe.Pointer(&(_26_pNewTerm.X12))) = _pTerm.X12
+ _26_pNewTerm.XprereqAll = _pTerm.XprereqAll
}
_65:
- if int32(_pWC.X2) != i32(71) || int32(_pExpr.X0) != i32(78) && int32(_pExpr.X0) != i32(72) || store1(&_nLeft, _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.X4))) <= i32(1) || _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.X5)) != _nLeft || (((*XExpr)(_pExpr.X4).X2)&uint32(i32(2048))) != uint32(i32(0)) && (((*XExpr)(_pExpr.X5).X2)&uint32(i32(2048))) != uint32(i32(0)) {
+ if int32(_pWC.Xop) != int32(71) || int32(_pExpr.Xop) != int32(78) && int32(_pExpr.Xop) != int32(72) || store2(&_nLeft, _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.XpLeft))) <= int32(1) || _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.XpRight)) != _nLeft || (((*XExpr)(_pExpr.XpLeft).Xflags)&uint32(2048)) != (0) && (((*XExpr)(_pExpr.XpRight).Xflags)&uint32(2048)) != (0) {
goto _73
}
- _28_i = i32(0)
+ _28_i = int32(0)
_74:
if _28_i >= _nLeft {
goto _77
}
- _29_pLeft = _sqlite3ExprForVectorField(tls, _pParse, (*XExpr)(_pExpr.X4), _28_i)
- _29_pRight = _sqlite3ExprForVectorField(tls, _pParse, (*XExpr)(_pExpr.X5), _28_i)
- _29_pNew = _sqlite3PExpr(tls, _pParse, int32(_pExpr.X0), _29_pLeft, _29_pRight)
+ _29_pLeft = _sqlite3ExprForVectorField(tls, _pParse, (*XExpr)(_pExpr.XpLeft), _28_i)
+ _29_pRight = _sqlite3ExprForVectorField(tls, _pParse, (*XExpr)(_pExpr.XpRight), _28_i)
+ _29_pNew = _sqlite3PExpr(tls, _pParse, int32(_pExpr.Xop), _29_pLeft, _29_pRight)
_transferJoinMarkings(tls, _29_pNew, _pExpr)
- _29_idxNew = _whereClauseInsert(tls, _pWC, _29_pNew, uint16(i32(1)))
+ _29_idxNew = _whereClauseInsert(tls, _pWC, _29_pNew, uint16(1))
_exprAnalyze(tls, _pSrc, _pWC, _29_idxNew)
_28_i += 1
goto _74
_77:
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
- *(*uint16)(unsafe.Pointer(&(_pTerm.X3))) = uint16(i32(6))
- *(*uint16)(unsafe.Pointer(&(_pTerm.X4))) = uint16(i32(0))
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
+ _pTerm.XwtFlags = uint16(6)
+ _pTerm.XeOperator = 0
_73:
- if int32(_pWC.X2) != i32(71) || int32(_pExpr.X0) != i32(74) || (_pTerm.X9) != i32(0) || int32((*XExpr)(_pExpr.X4).X0) != i32(158) || (*XSelect)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X13) != nil {
+ if int32(_pWC.Xop) != int32(71) || int32(_pExpr.Xop) != int32(74) || _pTerm.XiField != int32(0) || int32((*XExpr)(_pExpr.XpLeft).Xop) != int32(158) || (*XSelect)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XpPrior) != nil {
goto _82
}
- _30_i = i32(0)
+ _30_i = int32(0)
_83:
- if _30_i >= _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.X4)) {
+ if _30_i >= _sqlite3ExprVectorSize(tls, (*XExpr)(_pExpr.XpLeft)) {
goto _86
}
- _31_idxNew = _whereClauseInsert(tls, _pWC, _pExpr, uint16(i32(2)))
- *(*int32)(unsafe.Pointer(&((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_31_idxNew))).X9))) = _30_i + i32(1)
+ _31_idxNew = _whereClauseInsert(tls, _pWC, _pExpr, uint16(2))
+ elem100((*XWhereTerm)(_pWC.Xa), uintptr(_31_idxNew)).XiField = _30_i + int32(1)
_exprAnalyze(tls, _pSrc, _pWC, _31_idxNew)
_markTermAsChild(tls, _pWC, _31_idxNew, _idxTerm)
_30_i += 1
goto _83
_86:
_82:
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
- {
- p := (*uint64)(unsafe.Pointer(&(_pTerm.X11)))
- *p = (*p) | _extraRight
- sink17(*p)
- }
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
+ _pTerm.XprereqRight |= _extraRight
_ = _9_aiCurCol
}
var _exprAnalyzeØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_exprAnalyzeØ00__func__Ø000[0], str(103042), 12)
+ crt.Xstrncpy(nil, &_exprAnalyzeØ00__func__Ø000[0], str(103070), 12)
}
-// These routines walk (recursively) an expression tree and generate
-// a bitmask indicating which tables are used in that expression
-// tree.
+// C comment
+// /*
+// ** These routines walk (recursively) an expression tree and generate
+// ** a bitmask indicating which tables are used in that expression
+// ** tree.
+// */
func _sqlite3WhereExprUsage(tls *crt.TLS, _pMaskSet *XWhereMaskSet, _p *XExpr) (r0 uint64) {
var _mask uint64
if _p == nil {
- return uint64(i32(0))
+ return 0
}
- if int32(_p.X0) == i32(152) {
- return _sqlite3WhereGetMask(tls, _pMaskSet, _p.X8)
+ if int32(_p.Xop) == int32(152) {
+ return _sqlite3WhereGetMask(tls, _pMaskSet, _p.XiTable)
}
_mask = func() uint64 {
- if int32(_p.X0) == i32(160) {
- return _sqlite3WhereGetMask(tls, _pMaskSet, _p.X8)
+ if int32(_p.Xop) == int32(160) {
+ return _sqlite3WhereGetMask(tls, _pMaskSet, _p.XiTable)
}
- return uint64(i32(0))
+ return (0)
}()
func() {
- if ((_p.X2) & uint32(i32(16384))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130308), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereExprUsageØ00__func__Ø000))), unsafe.Pointer(str(103054)))
+ if (_p.Xflags & uint32(16384)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130308), unsafe.Pointer(&_sqlite3WhereExprUsageØ00__func__Ø000), unsafe.Pointer(str(103082)))
crt.X__builtin_abort(tls)
}
}()
- if (*XExpr)(_p.X5) != nil {
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_p.X5))
- sink17(*p)
- }
+ if _p.XpRight != nil {
+ _mask |= _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_p.XpRight))
}
- if (*XExpr)(_p.X4) != nil {
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_p.X4))
- sink17(*p)
- }
+ if _p.XpLeft != nil {
+ _mask |= _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_p.XpLeft))
}
- if ((_p.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- {
- p := &_mask
- *p = (*p) | _exprSelectUsage(tls, _pMaskSet, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))))
- sink17(*p)
- }
+ if (_p.Xflags & uint32(2048)) != (0) {
+ _mask |= _exprSelectUsage(tls, _pMaskSet, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))))
goto _10
}
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))) != nil {
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6)))))))
- sink17(*p)
- }
+ if (*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))) != nil {
+ _mask |= _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx))))
}
_10:
return _mask
@@ -82349,79 +83464,54 @@ _10:
var _sqlite3WhereExprUsageØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WhereExprUsageØ00__func__Ø000[0], str(103088), 22)
+ crt.Xstrncpy(nil, &_sqlite3WhereExprUsageØ00__func__Ø000[0], str(103116), 22)
}
-// Recursively walk the expressions of a SELECT statement and generate
-// a bitmask indicating which tables are used in that expression
-// tree.
+// C comment
+// /*
+// ** Recursively walk the expressions of a SELECT statement and generate
+// ** a bitmask indicating which tables are used in that expression
+// ** tree.
+// */
func _exprSelectUsage(tls *crt.TLS, _pMaskSet *XWhereMaskSet, _pS *XSelect) (r0 uint64) {
var _2_i int32
var _mask uint64
var _1_pSrc *XSrcList
- _mask = u64(0)
+ _mask = uint64(0)
_0:
if _pS == nil {
goto _1
}
- _1_pSrc = (*XSrcList)(_pS.X8)
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(_pS.X0))
- sink17(*p)
- }
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(_pS.X10))
- sink17(*p)
- }
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(_pS.X12))
- sink17(*p)
- }
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_pS.X9))
- sink17(*p)
- }
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_pS.X11))
- sink17(*p)
- }
+ _1_pSrc = (*XSrcList)(_pS.XpSrc)
+ _mask |= _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(_pS.XpEList))
+ _mask |= _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(_pS.XpGroupBy))
+ _mask |= _sqlite3WhereExprListUsage(tls, _pMaskSet, (*XExprList)(_pS.XpOrderBy))
+ _mask |= _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_pS.XpWhere))
+ _mask |= _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(_pS.XpHaving))
if func() int32 {
if _1_pSrc != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129744), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprSelectUsageØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129744), unsafe.Pointer(&_exprSelectUsageØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _4
}
- _2_i = i32(0)
+ _2_i = int32(0)
_5:
- if _2_i >= (_1_pSrc.X0) {
+ if _2_i >= _1_pSrc.XnSrc {
goto _8
}
- {
- p := &_mask
- *p = (*p) | _exprSelectUsage(tls, _pMaskSet, (*XSelect)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_1_pSrc.X2)))))+68*uintptr(_2_i))).X5))
- sink17(*p)
- }
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_1_pSrc.X2)))))+68*uintptr(_2_i))).X12))
- sink17(*p)
- }
+ _mask |= _exprSelectUsage(tls, _pMaskSet, (*XSelect)(elem6((*TSrcList_item)(unsafe.Pointer(&_1_pSrc.Xa)), uintptr(_2_i)).XpSelect))
+ _mask |= _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(elem6((*TSrcList_item)(unsafe.Pointer(&_1_pSrc.Xa)), uintptr(_2_i)).XpOn))
_2_i += 1
goto _5
_8:
_4:
- _pS = (*XSelect)(_pS.X13)
+ _pS = (*XSelect)(_pS.XpPrior)
goto _0
_1:
return _mask
@@ -82430,20 +83520,16 @@ _1:
func _sqlite3WhereExprListUsage(tls *crt.TLS, _pMaskSet *XWhereMaskSet, _pList *XExprList) (r0 uint64) {
var _i int32
var _mask uint64
- _mask = u64(0)
+ _mask = uint64(0)
if _pList == nil {
goto _0
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _4
}
- {
- p := &_mask
- *p = (*p) | _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_i))).X0))
- sink17(*p)
- }
+ _mask |= _sqlite3WhereExprUsage(tls, _pMaskSet, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XpExpr))
_i += 1
goto _1
_4:
@@ -82454,51 +83540,48 @@ _0:
var _exprSelectUsageØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_exprSelectUsageØ00__func__Ø000[0], str(103110), 16)
+ crt.Xstrncpy(nil, &_exprSelectUsageØ00__func__Ø000[0], str(103138), 16)
}
-// Return TRUE if the given operator is one of the operators that is
-// allowed for an indexable WHERE clause term. The allowed operators are
-// "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL"
+// C comment
+// /*
+// ** Return TRUE if the given operator is one of the operators that is
+// ** allowed for an indexable WHERE clause term. The allowed operators are
+// ** "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL"
+// */
func _allowedOp(tls *crt.TLS, _op int32) (r0 int32) {
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- return bool2int((((_op == i32(74)) || ((_op >= i32(78)) && (_op <= i32(82)))) || (_op == i32(75))) || (_op == i32(72)))
+ return bool2int((((_op == int32(74)) || ((_op >= int32(78)) && (_op <= int32(82)))) || (_op == int32(75))) || (_op == int32(72)))
}
func _exprMightBeIndexed(tls *crt.TLS, _pFrom *XSrcList, _mPrereq uint64, _aiCurCol *int32, _pExpr *XExpr, _op int32) (r0 int32) {
- i32(0)
- i32(0)
func() {
- if _op > i32(82) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129805), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprMightBeIndexedØ00__func__Ø000))), unsafe.Pointer(str(103126)))
+ if _op > int32(82) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129805), unsafe.Pointer(&_exprMightBeIndexedØ00__func__Ø000), unsafe.Pointer(str(103154)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pExpr.X0) == i32(158)) && ((_op >= i32(79)) && func() int32 {
- if _op <= i32(82) {
- return i32(1)
+ if (int32(_pExpr.Xop) == int32(158)) && ((_op >= int32(79)) && func() int32 {
+ if _op <= int32(82) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129806), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprMightBeIndexedØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129806), unsafe.Pointer(&_exprMightBeIndexedØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0) {
- _pExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X2))))) + 20*uintptr(i32(0)))).X0)
+ _pExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).Xa))), 0).XpExpr)
}
- if int32(_pExpr.X0) == i32(152) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCurCol)) + 4*uintptr(i32(0)))) = _pExpr.X8
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCurCol)) + 4*uintptr(i32(1)))) = int32(_pExpr.X9)
- return i32(1)
+ if int32(_pExpr.Xop) == int32(152) {
+ *elem8(_aiCurCol, 0) = _pExpr.XiTable
+ *elem8(_aiCurCol, uintptr(1)) = int32(_pExpr.XiColumn)
+ return int32(1)
}
- if _mPrereq == uint64(i32(0)) {
- return i32(0)
+ if _mPrereq == (0) {
+ return int32(0)
}
- if (_mPrereq & (_mPrereq - uint64(i32(1)))) != uint64(i32(0)) {
- return i32(0)
+ if (_mPrereq & (_mPrereq - uint64(1))) != (0) {
+ return int32(0)
}
return _exprMightBeIndexed2(tls, _pFrom, _mPrereq, _aiCurCol, _pExpr)
}
@@ -82506,148 +83589,153 @@ func _exprMightBeIndexed(tls *crt.TLS, _pFrom *XSrcList, _mPrereq uint64, _aiCur
var _exprMightBeIndexedØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_exprMightBeIndexedØ00__func__Ø000[0], str(103136), 19)
+ crt.Xstrncpy(nil, &_exprMightBeIndexedØ00__func__Ø000[0], str(103164), 19)
}
-// Expression pExpr is one operand of a comparison operator that might
-// be useful for indexing. This routine checks to see if pExpr appears
-// in any index. Return TRUE (1) if pExpr is an indexed term and return
-// FALSE (0) if not. If TRUE is returned, also set aiCurCol[0] to the cursor
-// number of the table that is indexed and aiCurCol[1] to the column number
-// of the column that is indexed, or XN_EXPR (-2) if an expression is being
-// indexed.
-//
-// If pExpr is a TK_COLUMN column reference, then this routine always returns
-// true even if that particular column is not indexed, because the column
-// might be added to an automatic index later.
+// C comment
+// /*
+// ** Expression pExpr is one operand of a comparison operator that might
+// ** be useful for indexing. This routine checks to see if pExpr appears
+// ** in any index. Return TRUE (1) if pExpr is an indexed term and return
+// ** FALSE (0) if not. If TRUE is returned, also set aiCurCol[0] to the cursor
+// ** number of the table that is indexed and aiCurCol[1] to the column number
+// ** of the column that is indexed, or XN_EXPR (-2) if an expression is being
+// ** indexed.
+// **
+// ** If pExpr is a TK_COLUMN column reference, then this routine always returns
+// ** true even if that particular column is not indexed, because the column
+// ** might be added to an automatic index later.
+// */
func _exprMightBeIndexed2(tls *crt.TLS, _pFrom *XSrcList, _mPrereq uint64, _aiCurCol *int32, _pExpr *XExpr) (r0 int32) {
var _i, _iCur int32
var _pIdx *XIndex
- _i = i32(0)
+ _i = int32(0)
_0:
- if _mPrereq <= uint64(i32(1)) {
+ if _mPrereq <= uint64(1) {
goto _3
}
- {
- p := func() *uint64 { _i += 1; return &_mPrereq }()
- *p = (*p) >> uint(i32(1))
- sink17(*p)
- }
+ *func() *uint64 { _i += 1; return &_mPrereq }() >>= 1
goto _0
_3:
- _iCur = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pFrom.X2))))) + 68*uintptr(_i))).X11
- _pIdx = (*XIndex)((*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pFrom.X2))))) + 68*uintptr(_i))).X4).X2)
+ _iCur = elem6((*TSrcList_item)(unsafe.Pointer(&_pFrom.Xa)), uintptr(_i)).XiCursor
+ _pIdx = (*XIndex)((*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&_pFrom.Xa)), uintptr(_i)).XpTab).XpIndex)
_4:
if _pIdx == nil {
goto _7
}
- if (*XExprList)(_pIdx.X10) == nil {
+ if (*XExprList)(_pIdx.XaColExpr) == nil {
goto _5
}
- _i = i32(0)
+ _i = int32(0)
_9:
- if _i >= int32(_pIdx.X13) {
+ if _i >= int32(_pIdx.XnKeyCol) {
goto _12
}
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i)))) != i32(-2) {
+ if int32(*elem50(_pIdx.XaiColumn, uintptr(_i))) != int32(-2) {
goto _10
}
- if _sqlite3ExprCompareSkip(tls, _pExpr, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.X10).X2)))))+20*uintptr(_i))).X0), _iCur) == i32(0) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCurCol)) + 4*uintptr(i32(0)))) = _iCur
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCurCol)) + 4*uintptr(i32(1)))) = i32(-2)
- return i32(1)
+ if _sqlite3ExprCompareSkip(tls, _pExpr, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.XaColExpr).Xa))), uintptr(_i)).XpExpr), _iCur) == int32(0) {
+ *elem8(_aiCurCol, 0) = _iCur
+ *elem8(_aiCurCol, uintptr(1)) = int32(-2)
+ return int32(1)
}
_10:
_i += 1
goto _9
_12:
_5:
- _pIdx = (*XIndex)(_pIdx.X5)
+ _pIdx = (*XIndex)(_pIdx.XpNext)
goto _4
_7:
- return i32(0)
+ return int32(0)
}
-// Like sqlite3ExprCompare() except COLLATE operators at the top-level
-// are ignored.
+// C comment
+// /*
+// ** Like sqlite3ExprCompare() except COLLATE operators at the top-level
+// ** are ignored.
+// */
func _sqlite3ExprCompareSkip(tls *crt.TLS, _pA *XExpr, _pB *XExpr, _iTab int32) (r0 int32) {
return _sqlite3ExprCompare(tls, _sqlite3ExprSkipCollate(tls, _pA), _sqlite3ExprSkipCollate(tls, _pB), _iTab)
}
-// Translate from TK_xx operator to WO_xx bitmask.
+// C comment
+// /*
+// ** Translate from TK_xx operator to WO_xx bitmask.
+// */
func _operatorMask(tls *crt.TLS, _op int32) (r0 uint16) {
var _c uint16
func() {
if _allowedOp(tls, _op) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129081), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103155)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129081), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103183)))
crt.X__builtin_abort(tls)
}
}()
- if _op == i32(74) {
- _c = uint16(i32(1))
+ if _op == int32(74) {
+ _c = uint16(1)
goto _7
}
- if _op == i32(75) {
- _c = uint16(i32(256))
+ if _op == int32(75) {
+ _c = uint16(256)
goto _7
}
- if _op == i32(72) {
- _c = uint16(i32(128))
+ if _op == int32(72) {
+ _c = uint16(128)
goto _7
}
func() {
- if (i32(2) << uint(_op-i32(78))) >= i32(32767) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129089), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103169)))
+ if (int32(2) << uint(_op-int32(78))) >= int32(32767) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129089), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103197)))
crt.X__builtin_abort(tls)
}
}()
- _c = uint16(i32(2) << uint(_op-i32(78)))
+ _c = uint16(int32(2) << uint(_op-int32(78)))
_7:
func() {
- if _op == i32(75) && int32(_c) != i32(256) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129092), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103198)))
+ if _op == int32(75) && int32(_c) != int32(256) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129092), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103226)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op == i32(74) && int32(_c) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129093), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103228)))
+ if _op == int32(74) && int32(_c) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129093), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103256)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op == i32(78) && int32(_c) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129094), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103250)))
+ if _op == int32(78) && int32(_c) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129094), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103278)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op == i32(81) && int32(_c) != i32(16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129095), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103272)))
+ if _op == int32(81) && int32(_c) != int32(16) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129095), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103300)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op == i32(80) && int32(_c) != i32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129096), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103294)))
+ if _op == int32(80) && int32(_c) != int32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129096), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103322)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op == i32(79) && int32(_c) != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129097), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103316)))
+ if _op == int32(79) && int32(_c) != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129097), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103344)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op == i32(82) && int32(_c) != i32(32) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129098), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103338)))
+ if _op == int32(82) && int32(_c) != int32(32) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129098), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103366)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op == i32(72) && int32(_c) != i32(128) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129099), unsafe.Pointer((*int8)(unsafe.Pointer(&_operatorMaskØ00__func__Ø000))), unsafe.Pointer(str(103360)))
+ if _op == int32(72) && int32(_c) != int32(128) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129099), unsafe.Pointer(&_operatorMaskØ00__func__Ø000), unsafe.Pointer(str(103388)))
crt.X__builtin_abort(tls)
}
}()
@@ -82657,86 +83745,95 @@ _7:
var _operatorMaskØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_operatorMaskØ00__func__Ø000[0], str(103382), 13)
+ crt.Xstrncpy(nil, &_operatorMaskØ00__func__Ø000[0], str(103410), 13)
}
-// Mark term iChild as being a child of term iParent
+// C comment
+// /*
+// ** Mark term iChild as being a child of term iParent
+// */
func _markTermAsChild(tls *crt.TLS, _pWC *XWhereClause, _iChild int32, _iParent int32) {
- *(*int32)(unsafe.Pointer(&((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_iChild))).X7))) = _iParent
- *(*int16)(unsafe.Pointer(&((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_iChild))).X2))) = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_iParent))).X2
- *(*uint8)(unsafe.Pointer(&((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_iParent))).X5))) += 1
-}
-
-// We already know that pExpr is a binary operator where both operands are
-// column references. This routine checks to see if pExpr is an equivalence
-// relation:
-// 1. The SQLITE_Transitive optimization must be enabled
-// 2. Must be either an == or an IS operator
-// 3. Not originating in the ON clause of an OUTER JOIN
-// 4. The affinities of A and B must be compatible
-// 5a. Both operands use the same collating sequence OR
-// 5b. The overall collating sequence is BINARY
-// If this routine returns TRUE, that means that the RHS can be substituted
-// for the LHS anyplace else in the WHERE clause where the LHS column occurs.
-// This is an optimization. No harm comes from returning 0. But if 1 is
-// returned when it should not be, then incorrect answers might result.
+ elem100((*XWhereTerm)(_pWC.Xa), uintptr(_iChild)).XiParent = _iParent
+ elem100((*XWhereTerm)(_pWC.Xa), uintptr(_iChild)).XtruthProb = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_iParent)).XtruthProb
+ elem100((*XWhereTerm)(_pWC.Xa), uintptr(_iParent)).XnChild += 1
+}
+
+// C comment
+// /*
+// ** We already know that pExpr is a binary operator where both operands are
+// ** column references. This routine checks to see if pExpr is an equivalence
+// ** relation:
+// ** 1. The SQLITE_Transitive optimization must be enabled
+// ** 2. Must be either an == or an IS operator
+// ** 3. Not originating in the ON clause of an OUTER JOIN
+// ** 4. The affinities of A and B must be compatible
+// ** 5a. Both operands use the same collating sequence OR
+// ** 5b. The overall collating sequence is BINARY
+// ** If this routine returns TRUE, that means that the RHS can be substituted
+// ** for the LHS anyplace else in the WHERE clause where the LHS column occurs.
+// ** This is an optimization. No harm comes from returning 0. But if 1 is
+// ** returned when it should not be, then incorrect answers might result.
+// */
func _termIsEquivalence(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr) (r0 int32) {
var _aff1, _aff2 int8
var _zColl1, _zColl2 *int8
var _pColl *XCollSeq
- if (int32((*Xsqlite3)(_pParse.X0).X13) & i32(512)) != i32(0) {
- return i32(0)
+ if (int32((*Xsqlite3)(_pParse.Xdb).XdbOptFlags) & int32(512)) != int32(0) {
+ return int32(0)
}
- if (int32(_pExpr.X0) != i32(78)) && (int32(_pExpr.X0) != i32(72)) {
- return i32(0)
+ if (int32(_pExpr.Xop) != int32(78)) && (int32(_pExpr.Xop) != int32(72)) {
+ return int32(0)
}
- if ((_pExpr.X2) & uint32(i32(1))) != uint32(i32(0)) {
- return i32(0)
+ if (_pExpr.Xflags & uint32(1)) != (0) {
+ return int32(0)
}
- _aff1 = _sqlite3ExprAffinity(tls, (*XExpr)(_pExpr.X4))
- _aff2 = _sqlite3ExprAffinity(tls, (*XExpr)(_pExpr.X5))
- if (int32(_aff1) != int32(_aff2)) && ((int32(_aff1) < i32(67)) || (int32(_aff2) < i32(67))) {
- return i32(0)
+ _aff1 = _sqlite3ExprAffinity(tls, (*XExpr)(_pExpr.XpLeft))
+ _aff2 = _sqlite3ExprAffinity(tls, (*XExpr)(_pExpr.XpRight))
+ if (int32(_aff1) != int32(_aff2)) && ((int32(_aff1) < int32(67)) || (int32(_aff2) < int32(67))) {
+ return int32(0)
}
- _pColl = _sqlite3BinaryCompareCollSeq(tls, _pParse, (*XExpr)(_pExpr.X4), (*XExpr)(_pExpr.X5))
- if (_pColl == nil) || (_sqlite3StrICmp(tls, _pColl.X0, str(37881)) == i32(0)) {
- return i32(1)
+ _pColl = _sqlite3BinaryCompareCollSeq(tls, _pParse, (*XExpr)(_pExpr.XpLeft), (*XExpr)(_pExpr.XpRight))
+ if (_pColl == nil) || (_sqlite3StrICmp(tls, _pColl.XzName, str(37836)) == int32(0)) {
+ return int32(1)
}
- _pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.X4))
+ _pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.XpLeft))
_zColl1 = func() *int8 {
if _pColl != nil {
- return (_pColl.X0)
+ return _pColl.XzName
}
return nil
}()
- _pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.X5))
+ _pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.XpRight))
_zColl2 = func() *int8 {
if _pColl != nil {
- return (_pColl.X0)
+ return _pColl.XzName
}
return nil
}()
- return bool2int(Xsqlite3_stricmp(tls, _zColl1, _zColl2) == i32(0))
-}
-
-// Commute a comparison operator. Expressions of the form "X op Y"
-// are converted into "Y op X".
-//
-// If left/right precedence rules come into play when determining the
-// collating sequence, then COLLATE operators are adjusted to ensure
-// that the collating sequence does not change. For example:
-// "Y collate NOCASE op X" becomes "X op Y" because any collation sequence on
-// the left hand side of a comparison overrides any collation sequence
-// attached to the right. For the same reason the EP_Collate flag
-// is not commuted.
+ return bool2int(Xsqlite3_stricmp(tls, _zColl1, _zColl2) == int32(0))
+}
+
+// C comment
+// /*
+// ** Commute a comparison operator. Expressions of the form "X op Y"
+// ** are converted into "Y op X".
+// **
+// ** If left/right precedence rules come into play when determining the
+// ** collating sequence, then COLLATE operators are adjusted to ensure
+// ** that the collating sequence does not change. For example:
+// ** "Y collate NOCASE op X" becomes "X op Y" because any collation sequence on
+// ** the left hand side of a comparison overrides any collation sequence
+// ** attached to the right. For the same reason the EP_Collate flag
+// ** is not commuted.
+// */
func _exprCommute(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr) {
var _expRight, _expLeft uint16
var _4_t *XExpr
- _expRight = uint16(((*XExpr)(_pExpr.X5).X2) & uint32(i32(256)))
- _expLeft = uint16(((*XExpr)(_pExpr.X4).X2) & uint32(i32(256)))
+ _expRight = uint16(((*XExpr)(_pExpr.XpRight).Xflags) & uint32(256))
+ _expLeft = uint16(((*XExpr)(_pExpr.XpLeft).Xflags) & uint32(256))
func() {
- if _allowedOp(tls, int32(_pExpr.X0)) == 0 || int32(_pExpr.X0) == i32(74) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129051), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprCommuteØ00__func__Ø000))), unsafe.Pointer(str(103395)))
+ if _allowedOp(tls, int32(_pExpr.Xop)) == 0 || int32(_pExpr.Xop) == int32(74) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129051), unsafe.Pointer(&_exprCommuteØ00__func__Ø000), unsafe.Pointer(str(103423)))
crt.X__builtin_abort(tls)
}
}()
@@ -82744,44 +83841,32 @@ func _exprCommute(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr) {
goto _3
}
if _expRight != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&((*XExpr)(_pExpr.X5).X2)))
- *p = (*p) & uint32(i32(-257))
- sink5(*p)
- }
+ (*XExpr)(_pExpr.XpRight).Xflags &= uint32(4294967039)
goto _6
}
- if _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.X4)) != nil {
- {
- p := (*uint32)(unsafe.Pointer(&((*XExpr)(_pExpr.X4).X2)))
- *p = (*p) | uint32(i32(256))
- sink5(*p)
- }
+ if _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_pExpr.XpLeft)) != nil {
+ (*XExpr)(_pExpr.XpLeft).Xflags |= uint32(256)
}
_6:
_3:
- _4_t = (*XExpr)(_pExpr.X5)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X5))))) = (*XExpr)(_pExpr.X4)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X4))))) = _4_t
- if int32(_pExpr.X0) >= i32(79) {
- i32(0)
- i32(0)
- i32(0)
- i32(0)
+ _4_t = (*XExpr)(_pExpr.XpRight)
+ *(**XExpr)(unsafe.Pointer(&_pExpr.XpRight)) = (*XExpr)(_pExpr.XpLeft)
+ *(**XExpr)(unsafe.Pointer(&_pExpr.XpLeft)) = _4_t
+ if int32(_pExpr.Xop) >= int32(79) {
func() {
- if int32(_pExpr.X0) < i32(79) || int32(_pExpr.X0) > i32(82) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129071), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprCommuteØ00__func__Ø000))), unsafe.Pointer(str(103436)))
+ if int32(_pExpr.Xop) < int32(79) || int32(_pExpr.Xop) > int32(82) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129071), unsafe.Pointer(&_exprCommuteØ00__func__Ø000), unsafe.Pointer(str(103464)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(((int32(_pExpr.X0) - i32(79)) ^ i32(2)) + i32(79))
+ _pExpr.Xop = uint8(((int32(_pExpr.Xop) - int32(79)) ^ int32(2)) + int32(79))
}
}
var _exprCommuteØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_exprCommuteØ00__func__Ø000[0], str(103473), 12)
+ crt.Xstrncpy(nil, &_exprCommuteØ00__func__Ø000[0], str(103501), 12)
}
var _exprAnalyzeØ00opsØ001 [2]uint8
@@ -82790,104 +83875,106 @@ func init() {
_exprAnalyzeØ00opsØ001 = [2]uint8{82, 80}
}
-// If the pBase expression originated in the ON or USING clause of
-// a join, then transfer the appropriate markings over to derived.
+// C comment
+// /*
+// ** If the pBase expression originated in the ON or USING clause of
+// ** a join, then transfer the appropriate markings over to derived.
+// */
func _transferJoinMarkings(tls *crt.TLS, _pDerived *XExpr, _pBase *XExpr) {
if _pDerived != nil {
- {
- p := (*uint32)(unsafe.Pointer(&(_pDerived.X2)))
- *p = (*p) | ((_pBase.X2) & uint32(i32(1)))
- sink5(*p)
- }
- *(*int16)(unsafe.Pointer(&(_pDerived.X11))) = _pBase.X11
- }
-}
-
-// Analyze a term that consists of two or more OR-connected
-// subterms. So in:
-//
-// ... WHERE (a=5) AND (b=7 OR c=9 OR d=13) AND (d=13)
-// ^^^^^^^^^^^^^^^^^^^^
-//
-// This routine analyzes terms such as the middle term in the above example.
-// A WhereOrTerm object is computed and attached to the term under
-// analysis, regardless of the outcome of the analysis. Hence:
-//
-// WhereTerm.wtFlags |= TERM_ORINFO
-// WhereTerm.u.pOrInfo = a dynamically allocated WhereOrTerm object
-//
-// The term being analyzed must have two or more of OR-connected subterms.
-// A single subterm might be a set of AND-connected sub-subterms.
-// Examples of terms under analysis:
-//
-// (A) t1.x=t2.y OR t1.x=t2.z OR t1.y=15 OR t1.z=t3.a+5
-// (B) x=expr1 OR expr2=x OR x=expr3
-// (C) t1.x=t2.y OR (t1.x=t2.z AND t1.y=15)
-// (D) x=expr1 OR (y>11 AND y<22 AND z LIKE '*hello*')
-// (E) (p.a=1 AND q.b=2 AND r.c=3) OR (p.x=4 AND q.y=5 AND r.z=6)
-// (F) x>A OR (x=A AND y>=B)
-//
-// CASE 1:
-//
-// If all subterms are of the form T.C=expr for some single column of C and
-// a single table T (as shown in example B above) then create a new virtual
-// term that is an equivalent IN expression. In other words, if the term
-// being analyzed is:
-//
-// x = expr1 OR expr2 = x OR x = expr3
-//
-// then create a new virtual term like this:
-//
-// x IN (expr1,expr2,expr3)
-//
-// CASE 2:
-//
-// If there are exactly two disjuncts and one side has x>A and the other side
-// has x=A (for the same x and A) then add a new virtual conjunct term to the
-// WHERE clause of the form "x>=A". Example:
-//
-// x>A OR (x=A AND y>B) adds: x>=A
-//
-// The added conjunct can sometimes be helpful in query planning.
-//
-// CASE 3:
-//
-// If all subterms are indexable by a single table T, then set
-//
-// WhereTerm.eOperator = WO_OR
-// WhereTerm.u.pOrInfo->indexable |= the cursor number for table T
-//
-// A subterm is "indexable" if it is of the form
-// "T.C <op> <expr>" where C is any column of table T and
-// <op> is one of "=", "<", "<=", ">", ">=", "IS NULL", or "IN".
-// A subterm is also indexable if it is an AND of two or more
-// subsubterms at least one of which is indexable. Indexable AND
-// subterms have their eOperator set to WO_AND and they have
-// u.pAndInfo set to a dynamically allocated WhereAndTerm object.
-//
-// From another point of view, "indexable" means that the subterm could
-// potentially be used with an index if an appropriate index exists.
-// This analysis does not consider whether or not the index exists; that
-// is decided elsewhere. This analysis only looks at whether subterms
-// appropriate for indexing exist.
-//
-// All examples A through E above satisfy case 3. But if a term
-// also satisfies case 1 (such as B) we know that the optimizer will
-// always prefer case 1, so in that case we pretend that case 3 is not
-// satisfied.
-//
-// It might be the case that multiple tables are indexable. For example,
-// (E) above is indexable on tables P, Q, and R.
-//
-// Terms that satisfy case 3 are candidates for lookup by using
-// separate indices to find rowids for each subterm and composing
-// the union of all rowids using a RowSet object. This is similar
-// to "bitmap indices" in other database engines.
-//
-// OTHERWISE:
-//
-// If none of cases 1, 2, or 3 apply, then leave the eOperator set to
-// zero. This term is not useful for search.
+ _pDerived.Xflags |= _pBase.Xflags & uint32(1)
+ _pDerived.XiRightJoinTable = _pBase.XiRightJoinTable
+ }
+}
+
+// C comment
+// /*
+// ** Analyze a term that consists of two or more OR-connected
+// ** subterms. So in:
+// **
+// ** ... WHERE (a=5) AND (b=7 OR c=9 OR d=13) AND (d=13)
+// ** ^^^^^^^^^^^^^^^^^^^^
+// **
+// ** This routine analyzes terms such as the middle term in the above example.
+// ** A WhereOrTerm object is computed and attached to the term under
+// ** analysis, regardless of the outcome of the analysis. Hence:
+// **
+// ** WhereTerm.wtFlags |= TERM_ORINFO
+// ** WhereTerm.u.pOrInfo = a dynamically allocated WhereOrTerm object
+// **
+// ** The term being analyzed must have two or more of OR-connected subterms.
+// ** A single subterm might be a set of AND-connected sub-subterms.
+// ** Examples of terms under analysis:
+// **
+// ** (A) t1.x=t2.y OR t1.x=t2.z OR t1.y=15 OR t1.z=t3.a+5
+// ** (B) x=expr1 OR expr2=x OR x=expr3
+// ** (C) t1.x=t2.y OR (t1.x=t2.z AND t1.y=15)
+// ** (D) x=expr1 OR (y>11 AND y<22 AND z LIKE '*hello*')
+// ** (E) (p.a=1 AND q.b=2 AND r.c=3) OR (p.x=4 AND q.y=5 AND r.z=6)
+// ** (F) x>A OR (x=A AND y>=B)
+// **
+// ** CASE 1:
+// **
+// ** If all subterms are of the form T.C=expr for some single column of C and
+// ** a single table T (as shown in example B above) then create a new virtual
+// ** term that is an equivalent IN expression. In other words, if the term
+// ** being analyzed is:
+// **
+// ** x = expr1 OR expr2 = x OR x = expr3
+// **
+// ** then create a new virtual term like this:
+// **
+// ** x IN (expr1,expr2,expr3)
+// **
+// ** CASE 2:
+// **
+// ** If there are exactly two disjuncts and one side has x>A and the other side
+// ** has x=A (for the same x and A) then add a new virtual conjunct term to the
+// ** WHERE clause of the form "x>=A". Example:
+// **
+// ** x>A OR (x=A AND y>B) adds: x>=A
+// **
+// ** The added conjunct can sometimes be helpful in query planning.
+// **
+// ** CASE 3:
+// **
+// ** If all subterms are indexable by a single table T, then set
+// **
+// ** WhereTerm.eOperator = WO_OR
+// ** WhereTerm.u.pOrInfo->indexable |= the cursor number for table T
+// **
+// ** A subterm is "indexable" if it is of the form
+// ** "T.C <op> <expr>" where C is any column of table T and
+// ** <op> is one of "=", "<", "<=", ">", ">=", "IS NULL", or "IN".
+// ** A subterm is also indexable if it is an AND of two or more
+// ** subsubterms at least one of which is indexable. Indexable AND
+// ** subterms have their eOperator set to WO_AND and they have
+// ** u.pAndInfo set to a dynamically allocated WhereAndTerm object.
+// **
+// ** From another point of view, "indexable" means that the subterm could
+// ** potentially be used with an index if an appropriate index exists.
+// ** This analysis does not consider whether or not the index exists; that
+// ** is decided elsewhere. This analysis only looks at whether subterms
+// ** appropriate for indexing exist.
+// **
+// ** All examples A through E above satisfy case 3. But if a term
+// ** also satisfies case 1 (such as B) we know that the optimizer will
+// ** always prefer case 1, so in that case we pretend that case 3 is not
+// ** satisfied.
+// **
+// ** It might be the case that multiple tables are indexable. For example,
+// ** (E) above is indexable on tables P, Q, and R.
+// **
+// ** Terms that satisfy case 3 are candidates for lookup by using
+// ** separate indices to find rowids for each subterm and composing
+// ** the union of all rowids using a RowSet object. This is similar
+// ** to "bitmap indices" in other database engines.
+// **
+// ** OTHERWISE:
+// **
+// ** If none of cases 1, 2, or 3 apply, then leave the eOperator set to
+// ** zero. This term is not useful for search.
+// */
func _exprAnalyzeOrTerm(tls *crt.TLS, _pSrc *XSrcList, _pWC *XWhereClause, _idxTerm int32) {
var _i, _3_j, _12_iOne, _13_iTwo, _15_okToChngToIN, _15_iColumn, _15_iCursor, _15_j, _24_affLeft, _24_affRight, _29_idxNew int32
var _chngToIN, _indexable, _3_b, _8_b uint64
@@ -82900,163 +83987,141 @@ func _exprAnalyzeOrTerm(tls *crt.TLS, _pSrc *XSrcList, _pWC *XWhereClause, _idxT
var _pOrWc, _3_pAndWC *XWhereClause
var _pOrInfo *XWhereOrInfo
var _2_pAndInfo *XWhereAndInfo
- _pWInfo = (*XWhereInfo)(_pWC.X0)
- _pParse = (*XParse)(_pWInfo.X0)
- _db = (*Xsqlite3)(_pParse.X0)
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
- _pExpr = (*XExpr)(_pTerm.X0)
+ _pWInfo = (*XWhereInfo)(_pWC.XpWInfo)
+ _pParse = (*XParse)(_pWInfo.XpParse)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
+ _pExpr = (*XExpr)(_pTerm.XpExpr)
func() {
- if (int32(_pTerm.X3) & i32(49)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129466), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103485)))
+ if (int32(_pTerm.XwtFlags) & int32(49)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129466), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103513)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) != i32(70) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129467), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103547)))
+ if int32(_pExpr.Xop) != int32(70) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129467), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103575)))
crt.X__builtin_abort(tls)
}
}()
- *(**XWhereOrInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10))))))) = store64(&_pOrInfo, (*XWhereOrInfo)(_sqlite3DbMallocZero(tls, _db, uint64(u32(416)))))
+ *(**XWhereOrInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pTerm.Xu)))) = store102(&_pOrInfo, (*XWhereOrInfo)(_sqlite3DbMallocZero(tls, _db, uint64(416))))
if _pOrInfo == nil {
return
}
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X3)))
- *p = uint16(int32(*p) | i32(16))
- sink14(*p)
+ p := &_pTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(16))
}
- _pOrWc = (*XWhereClause)(unsafe.Pointer(&(_pOrInfo.X0)))
- crt.Xmemset(tls, (unsafe.Pointer)((*[8]XWhereTerm)(unsafe.Pointer(&(_pOrWc.X6)))), i32(0), u32(384))
+ _pOrWc = &_pOrInfo.Xwc
+ crt.Xmemset(tls, unsafe.Pointer(&_pOrWc.XaStatic), int32(0), uint32(384))
_sqlite3WhereClauseInit(tls, _pOrWc, _pWInfo)
- _sqlite3WhereSplit(tls, _pOrWc, _pExpr, uint8(i32(70)))
+ _sqlite3WhereSplit(tls, _pOrWc, _pExpr, uint8(70))
_sqlite3WhereExprAnalyze(tls, _pSrc, _pOrWc)
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
return
}
func() {
- if (_pOrWc.X3) < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129477), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103564)))
+ if _pOrWc.XnTerm < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129477), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103592)))
crt.X__builtin_abort(tls)
}
}()
- _indexable = u64(18446744073709551615)
- _chngToIN = u64(18446744073709551615)
- *func() **XWhereTerm { _i = (_pOrWc.X3) - i32(1); return &_pOrTerm }() = (*XWhereTerm)(_pOrWc.X5)
+ _indexable = uint64(18446744073709551615)
+ _chngToIN = uint64(18446744073709551615)
+ *func() **XWhereTerm { _i = _pOrWc.XnTerm - int32(1); return &_pOrTerm }() = (*XWhereTerm)(_pOrWc.Xa)
_8:
- if _i < i32(0) || _indexable == 0 {
+ if _i < int32(0) || _indexable == 0 {
goto _12
}
- if (int32(_pOrTerm.X4) & i32(511)) != i32(0) {
+ if (int32(_pOrTerm.XeOperator) & int32(511)) != int32(0) {
goto _13
}
func() {
- if (int32(_pOrTerm.X3) & i32(48)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129487), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103580)))
+ if (int32(_pOrTerm.XwtFlags) & int32(48)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129487), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103608)))
crt.X__builtin_abort(tls)
}
}()
- _chngToIN = uint64(i32(0))
- _2_pAndInfo = (*XWhereAndInfo)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(408))))
+ _chngToIN = 0
+ _2_pAndInfo = (*XWhereAndInfo)(_sqlite3DbMallocRawNN(tls, _db, uint64(408)))
if _2_pAndInfo == nil {
goto _16
}
- _3_b = uint64(i32(0))
- *(**XWhereAndInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pOrTerm.X10))))))) = _2_pAndInfo
+ _3_b = 0
+ *(**XWhereAndInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pOrTerm.Xu)))) = _2_pAndInfo
{
- p := (*uint16)(unsafe.Pointer(&(_pOrTerm.X3)))
- *p = uint16(int32(*p) | i32(32))
- sink14(*p)
- }
- *(*uint16)(unsafe.Pointer(&(_pOrTerm.X4))) = uint16(i32(1024))
- _3_pAndWC = (*XWhereClause)(unsafe.Pointer(&(_2_pAndInfo.X0)))
- crt.Xmemset(tls, (unsafe.Pointer)((*[8]XWhereTerm)(unsafe.Pointer(&(_3_pAndWC.X6)))), i32(0), u32(384))
- _sqlite3WhereClauseInit(tls, _3_pAndWC, (*XWhereInfo)(_pWC.X0))
- _sqlite3WhereSplit(tls, _3_pAndWC, (*XExpr)(_pOrTerm.X0), uint8(i32(71)))
+ p := &_pOrTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(32))
+ }
+ _pOrTerm.XeOperator = uint16(1024)
+ _3_pAndWC = &_2_pAndInfo.Xwc
+ crt.Xmemset(tls, unsafe.Pointer(&_3_pAndWC.XaStatic), int32(0), uint32(384))
+ _sqlite3WhereClauseInit(tls, _3_pAndWC, (*XWhereInfo)(_pWC.XpWInfo))
+ _sqlite3WhereSplit(tls, _3_pAndWC, (*XExpr)(_pOrTerm.XpExpr), uint8(71))
_sqlite3WhereExprAnalyze(tls, _pSrc, _3_pAndWC)
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_pAndWC.X1))))) = _pWC
- if (_db.X17) != 0 {
+ *(**XWhereClause)(unsafe.Pointer(&_3_pAndWC.XpOuter)) = _pWC
+ if _db.XmallocFailed != 0 {
goto _17
}
- *func() **XWhereTerm { _3_j = i32(0); return &_3_pAndTerm }() = (*XWhereTerm)(_3_pAndWC.X5)
+ *func() **XWhereTerm { _3_j = int32(0); return &_3_pAndTerm }() = (*XWhereTerm)(_3_pAndWC.Xa)
_18:
- if _3_j >= (_3_pAndWC.X3) {
+ if _3_j >= _3_pAndWC.XnTerm {
goto _21
}
func() {
- if (*XExpr)(_3_pAndTerm.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129506), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103631)))
+ if _3_pAndTerm.XpExpr == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129506), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103659)))
crt.X__builtin_abort(tls)
}
}()
- if _allowedOp(tls, int32((*XExpr)(_3_pAndTerm.X0).X0)) != 0 || (int32(_3_pAndTerm.X4) == i32(64)) {
- {
- p := &_3_b
- *p = (*p) | _sqlite3WhereGetMask(tls, (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))), _3_pAndTerm.X8)
- sink17(*p)
- }
+ if _allowedOp(tls, int32((*XExpr)(_3_pAndTerm.XpExpr).Xop)) != 0 || (int32(_3_pAndTerm.XeOperator) == int32(64)) {
+ _3_b |= _sqlite3WhereGetMask(tls, &_pWInfo.XsMaskSet, _3_pAndTerm.XleftCursor)
}
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _3_j += 1; return &_3_pAndTerm }())) += uintptr(48)
goto _18
_21:
_17:
- {
- p := &_indexable
- *p = (*p) & _3_b
- sink17(*p)
- }
+ _indexable &= _3_b
_16:
goto _28
_13:
- if (int32(_pOrTerm.X3) & i32(8)) != 0 {
+ if (int32(_pOrTerm.XwtFlags) & int32(8)) != 0 {
goto _28
}
- _8_b = _sqlite3WhereGetMask(tls, (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))), _pOrTerm.X8)
- if (int32(_pOrTerm.X3) & i32(2)) != 0 {
- _9_pOther = (*XWhereTerm)(unsafe.Pointer(uintptr(_pOrWc.X5) + 48*uintptr(_pOrTerm.X7)))
- {
- p := &_8_b
- *p = (*p) | _sqlite3WhereGetMask(tls, (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))), _9_pOther.X8)
- sink17(*p)
- }
- }
- {
- p := &_indexable
- *p = (*p) & _8_b
- sink17(*p)
+ _8_b = _sqlite3WhereGetMask(tls, &_pWInfo.XsMaskSet, _pOrTerm.XleftCursor)
+ if (int32(_pOrTerm.XwtFlags) & int32(2)) != 0 {
+ _9_pOther = elem100((*XWhereTerm)(_pOrWc.Xa), uintptr(_pOrTerm.XiParent))
+ _8_b |= _sqlite3WhereGetMask(tls, &_pWInfo.XsMaskSet, _9_pOther.XleftCursor)
}
- if (int32(_pOrTerm.X4) & i32(2)) == i32(0) {
- _chngToIN = uint64(i32(0))
+ _indexable &= _8_b
+ if (int32(_pOrTerm.XeOperator) & int32(2)) == int32(0) {
+ _chngToIN = 0
goto _31
}
- {
- p := &_chngToIN
- *p = (*p) & _8_b
- sink17(*p)
- }
+ _chngToIN &= _8_b
_31:
_28:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _i -= 1; return &_pOrTerm }())) += uintptr(48)
goto _8
_12:
- *(*uint64)(unsafe.Pointer(&(_pOrInfo.X1))) = _indexable
- *(*uint16)(unsafe.Pointer(&(_pTerm.X4))) = uint16(func() int32 {
- if _indexable == uint64(i32(0)) {
- return i32(0)
+ _pOrInfo.Xindexable = _indexable
+ _pTerm.XeOperator = uint16(func() int32 {
+ if _indexable == (0) {
+ return int32(0)
}
- return i32(512)
+ return int32(512)
}())
- if _indexable == 0 || (_pOrWc.X3) != i32(2) {
+ if _indexable == 0 || _pOrWc.XnTerm != int32(2) {
goto _35
}
- _12_iOne = i32(0)
+ _12_iOne = int32(0)
_36:
- if store65(&_12_pOne, _whereNthSubterm(tls, (*XWhereTerm)(unsafe.Pointer(uintptr(_pOrWc.X5)+48*uintptr(i32(0)))), postInc1(&_12_iOne, int32(1)))) == nil {
+ if store100(&_12_pOne, _whereNthSubterm(tls, elem100((*XWhereTerm)(_pOrWc.Xa), 0), postInc2(&_12_iOne, 1))) == nil {
goto _37
}
- _13_iTwo = i32(0)
+ _13_iTwo = int32(0)
_38:
- if store65(&_13_pTwo, _whereNthSubterm(tls, (*XWhereTerm)(unsafe.Pointer(uintptr(_pOrWc.X5)+48*uintptr(i32(1)))), postInc1(&_13_iTwo, int32(1)))) != nil {
+ if store100(&_13_pTwo, _whereNthSubterm(tls, elem100((*XWhereTerm)(_pOrWc.Xa), uintptr(1)), postInc2(&_13_iTwo, 1))) != nil {
_whereCombineDisjuncts(tls, _pSrc, _pWC, _12_pOne, _13_pTwo)
goto _38
}
@@ -83066,111 +84131,108 @@ _35:
if _chngToIN == 0 {
goto _40
}
- _15_okToChngToIN = i32(0)
- _15_iColumn = i32(-1)
- _15_iCursor = i32(-1)
- _15_j = i32(0)
- _15_j = i32(0)
+ _15_okToChngToIN = int32(0)
+ _15_iColumn = int32(-1)
+ _15_iCursor = int32(-1)
+ _15_j = int32(0)
+ _15_j = int32(0)
_41:
- if _15_j >= i32(2) || _15_okToChngToIN != 0 {
+ if _15_j >= int32(2) || _15_okToChngToIN != 0 {
goto _45
}
- _pOrTerm = (*XWhereTerm)(_pOrWc.X5)
- _i = (_pOrWc.X3) - i32(1)
+ _pOrTerm = (*XWhereTerm)(_pOrWc.Xa)
+ _i = _pOrWc.XnTerm - int32(1)
_46:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _49
}
func() {
- if (int32(_pOrTerm.X4) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129592), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103647)))
+ if (int32(_pOrTerm.XeOperator) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129592), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103675)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&(_pOrTerm.X3)))
- *p = uint16(int32(*p) & i32(-65))
- sink14(*p)
+ p := &_pOrTerm.XwtFlags
+ *p = uint16(int32(*p) & int32(-65))
}
- if (_pOrTerm.X8) == _15_iCursor {
+ if _pOrTerm.XleftCursor == _15_iCursor {
func() {
- if _15_j != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129597), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103674)))
+ if _15_j != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129597), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103702)))
crt.X__builtin_abort(tls)
}
}()
goto _47
}
- if (_chngToIN & _sqlite3WhereGetMask(tls, (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))), _pOrTerm.X8)) == uint64(i32(0)) {
+ if (_chngToIN & _sqlite3WhereGetMask(tls, &_pWInfo.XsMaskSet, _pOrTerm.XleftCursor)) == (0) {
func() {
- if (int32(_pOrTerm.X3) & i32(10)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129608), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103679)))
+ if (int32(_pOrTerm.XwtFlags) & int32(10)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129608), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103707)))
crt.X__builtin_abort(tls)
}
}()
goto _47
}
- _15_iColumn = *(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pOrTerm.X10)))))
- _15_iCursor = _pOrTerm.X8
+ _15_iColumn = *(*int32)(unsafe.Pointer(&_pOrTerm.Xu))
+ _15_iCursor = _pOrTerm.XleftCursor
goto _49
_47:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _i -= 1; return &_pOrTerm }())) += uintptr(48)
goto _46
_49:
- if _i < i32(0) {
+ if _i < int32(0) {
func() {
- if _15_j != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129618), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103674)))
+ if _15_j != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129618), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103702)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_chngToIN & (_chngToIN - uint64(i32(1)))) != uint64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129619), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103725)))
+ if (_chngToIN & (_chngToIN - uint64(1))) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129619), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103753)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _chngToIN != _sqlite3WhereGetMask(tls, (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))), _15_iCursor) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129620), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103748)))
+ if _chngToIN != _sqlite3WhereGetMask(tls, &_pWInfo.XsMaskSet, _15_iCursor) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129620), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103776)))
crt.X__builtin_abort(tls)
}
}()
goto _45
}
- _15_okToChngToIN = i32(1)
+ _15_okToChngToIN = int32(1)
_65:
- if _i < i32(0) || _15_okToChngToIN == 0 {
+ if _i < int32(0) || _15_okToChngToIN == 0 {
goto _69
}
func() {
- if (int32(_pOrTerm.X4) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129629), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103647)))
+ if (int32(_pOrTerm.XeOperator) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129629), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103675)))
crt.X__builtin_abort(tls)
}
}()
- if (_pOrTerm.X8) != _15_iCursor {
+ if _pOrTerm.XleftCursor != _15_iCursor {
{
- p := (*uint16)(unsafe.Pointer(&(_pOrTerm.X3)))
- *p = uint16(int32(*p) & i32(-65))
- sink14(*p)
+ p := &_pOrTerm.XwtFlags
+ *p = uint16(int32(*p) & int32(-65))
}
goto _75
}
- if (*(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pOrTerm.X10)))))) != _15_iColumn {
- _15_okToChngToIN = i32(0)
+ if (*(*int32)(unsafe.Pointer(&_pOrTerm.Xu))) != _15_iColumn {
+ _15_okToChngToIN = int32(0)
goto _75
}
- _24_affRight = int32(_sqlite3ExprAffinity(tls, (*XExpr)((*XExpr)(_pOrTerm.X0).X5)))
- _24_affLeft = int32(_sqlite3ExprAffinity(tls, (*XExpr)((*XExpr)(_pOrTerm.X0).X4)))
- if (_24_affRight != i32(0)) && (_24_affRight != _24_affLeft) {
- _15_okToChngToIN = i32(0)
+ _24_affRight = int32(_sqlite3ExprAffinity(tls, (*XExpr)((*XExpr)(_pOrTerm.XpExpr).XpRight)))
+ _24_affLeft = int32(_sqlite3ExprAffinity(tls, (*XExpr)((*XExpr)(_pOrTerm.XpExpr).XpLeft)))
+ if (_24_affRight != int32(0)) && (_24_affRight != _24_affLeft) {
+ _15_okToChngToIN = int32(0)
goto _78
}
{
- p := (*uint16)(unsafe.Pointer(&(_pOrTerm.X3)))
- *p = uint16(int32(*p) | i32(64))
- sink14(*p)
+ p := &_pOrTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(64))
}
_78:
_75:
@@ -83185,65 +84247,65 @@ _45:
}
_27_pList = nil
_27_pLeft = nil
- *func() **XWhereTerm { _i = (_pOrWc.X3) - i32(1); return &_pOrTerm }() = (*XWhereTerm)(_pOrWc.X5)
+ *func() **XWhereTerm { _i = _pOrWc.XnTerm - int32(1); return &_pOrTerm }() = (*XWhereTerm)(_pOrWc.Xa)
_80:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _83
}
- if (int32(_pOrTerm.X3) & i32(64)) == i32(0) {
+ if (int32(_pOrTerm.XwtFlags) & int32(64)) == int32(0) {
goto _81
}
func() {
- if (int32(_pOrTerm.X4) & i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129663), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103647)))
+ if (int32(_pOrTerm.XeOperator) & int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129663), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103675)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pOrTerm.X8) != _15_iCursor {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129664), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103806)))
+ if _pOrTerm.XleftCursor != _15_iCursor {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129664), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103834)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pOrTerm.X10)))))) != _15_iColumn {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129665), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103835)))
+ if (*(*int32)(unsafe.Pointer(&_pOrTerm.Xu))) != _15_iColumn {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129665), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103863)))
crt.X__builtin_abort(tls)
}
}()
- _27_pDup = _sqlite3ExprDup(tls, _db, (*XExpr)((*XExpr)(_pOrTerm.X0).X5), i32(0))
- _27_pList = _sqlite3ExprListAppend(tls, (*XParse)(_pWInfo.X0), _27_pList, _27_pDup)
- _27_pLeft = (*XExpr)((*XExpr)(_pOrTerm.X0).X4)
+ _27_pDup = _sqlite3ExprDup(tls, _db, (*XExpr)((*XExpr)(_pOrTerm.XpExpr).XpRight), int32(0))
+ _27_pList = _sqlite3ExprListAppend(tls, (*XParse)(_pWInfo.XpParse), _27_pList, _27_pDup)
+ _27_pLeft = (*XExpr)((*XExpr)(_pOrTerm.XpExpr).XpLeft)
_81:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _i -= 1; return &_pOrTerm }())) += uintptr(48)
goto _80
_83:
func() {
if _27_pLeft == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129670), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103866)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129670), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103894)))
crt.X__builtin_abort(tls)
}
}()
- _27_pDup = _sqlite3ExprDup(tls, _db, _27_pLeft, i32(0))
- _27_pNew = _sqlite3PExpr(tls, _pParse, i32(74), _27_pDup, nil)
+ _27_pDup = _sqlite3ExprDup(tls, _db, _27_pLeft, int32(0))
+ _27_pNew = _sqlite3PExpr(tls, _pParse, int32(74), _27_pDup, nil)
if _27_pNew != nil {
_transferJoinMarkings(tls, _27_pNew, _pExpr)
func() {
- if ((_27_pNew.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129676), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000))), unsafe.Pointer(str(103875)))
+ if (_27_pNew.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129676), unsafe.Pointer(&_exprAnalyzeOrTermØ00__func__Ø000), unsafe.Pointer(str(103903)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_27_pNew.X6))))))) = _27_pList
- _29_idxNew = _whereClauseInsert(tls, _pWC, _27_pNew, uint16(i32(3)))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_27_pNew.Xx)))) = _27_pList
+ _29_idxNew = _whereClauseInsert(tls, _pWC, _27_pNew, uint16(3))
_exprAnalyze(tls, _pSrc, _pWC, _29_idxNew)
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_idxTerm)))
+ _pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_idxTerm))
_markTermAsChild(tls, _pWC, _29_idxNew, _idxTerm)
goto _96
}
_sqlite3ExprListDelete(tls, _db, _27_pList)
_96:
- *(*uint16)(unsafe.Pointer(&(_pTerm.X4))) = uint16(i32(4096))
+ _pTerm.XeOperator = uint16(4096)
_79:
_40:
_ = _12_iOne
@@ -83253,134 +84315,143 @@ _40:
var _exprAnalyzeOrTermØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_exprAnalyzeOrTermØ00__func__Ø000[0], str(103912), 18)
+ crt.Xstrncpy(nil, &_exprAnalyzeOrTermØ00__func__Ø000[0], str(103940), 18)
}
-// Return the N-th AND-connected subterm of pTerm. Or if pTerm is not
-// a conjunction, then return just pTerm when N==0. If N is exceeds
-// the number of available subterms, return NULL.
+// C comment
+// /*
+// ** Return the N-th AND-connected subterm of pTerm. Or if pTerm is not
+// ** a conjunction, then return just pTerm when N==0. If N is exceeds
+// ** the number of available subterms, return NULL.
+// */
func _whereNthSubterm(tls *crt.TLS, _pTerm *XWhereTerm, _N int32) (r0 *XWhereTerm) {
- if int32(_pTerm.X4) != i32(1024) {
+ if int32(_pTerm.XeOperator) != int32(1024) {
return func() *XWhereTerm {
- if _N == i32(0) {
+ if _N == int32(0) {
return _pTerm
}
return nil
}()
}
- if _N < ((*XWhereClause)(unsafe.Pointer(&((*XWhereAndInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))).X0))).X3) {
- return (*XWhereTerm)(unsafe.Pointer(uintptr((*XWhereClause)(unsafe.Pointer(&((*XWhereAndInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))).X0))).X5) + 48*uintptr(_N)))
+ if _N < (((*XWhereAndInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pTerm.Xu))).Xwc).XnTerm) {
+ return elem100((*XWhereTerm)(((*XWhereAndInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pTerm.Xu))).Xwc).Xa), uintptr(_N))
}
return nil
}
-// Subterms pOne and pTwo are contained within WHERE clause pWC. The
-// two subterms are in disjunction - they are OR-ed together.
-//
-// If these two terms are both of the form: "A op B" with the same
-// A and B values but different operators and if the operators are
-// compatible (if one is = and the other is <, for example) then
-// add a new virtual AND term to pWC that is the combination of the
-// two.
-//
-// Some examples:
-//
-// x<y OR x=y --> x<=y
-// x=y OR x=y --> x=y
-// x<=y OR x<y --> x<=y
-//
-// The following is NOT generated:
-//
-// x<y OR x>y --> x!=y
+// C comment
+// /*
+// ** Subterms pOne and pTwo are contained within WHERE clause pWC. The
+// ** two subterms are in disjunction - they are OR-ed together.
+// **
+// ** If these two terms are both of the form: "A op B" with the same
+// ** A and B values but different operators and if the operators are
+// ** compatible (if one is = and the other is <, for example) then
+// ** add a new virtual AND term to pWC that is the combination of the
+// ** two.
+// **
+// ** Some examples:
+// **
+// ** x<y OR x=y --> x<=y
+// ** x=y OR x=y --> x=y
+// ** x<=y OR x<y --> x<=y
+// **
+// ** The following is NOT generated:
+// **
+// ** x<y OR x>y --> x!=y
+// */
func _whereCombineDisjuncts(tls *crt.TLS, _pSrc *XSrcList, _pWC *XWhereClause, _pOne *XWhereTerm, _pTwo *XWhereTerm) {
var _op, _idxNew int32
var _eOp uint16
var _db *Xsqlite3
var _pNew *XExpr
- _eOp = uint16(int32(_pOne.X4) | int32(_pTwo.X4))
- if (int32(_pOne.X4) & i32(62)) == i32(0) {
+ _eOp = uint16(int32(_pOne.XeOperator) | int32(_pTwo.XeOperator))
+ if (int32(_pOne.XeOperator) & int32(62)) == int32(0) {
return
}
- if (int32(_pTwo.X4) & i32(62)) == i32(0) {
+ if (int32(_pTwo.XeOperator) & int32(62)) == int32(0) {
return
}
- if ((int32(_eOp) & i32(26)) != int32(_eOp)) && ((int32(_eOp) & i32(38)) != int32(_eOp)) {
+ if ((int32(_eOp) & int32(26)) != int32(_eOp)) && ((int32(_eOp) & int32(38)) != int32(_eOp)) {
return
}
func() {
- if (*XExpr)((*XExpr)(_pOne.X0).X4) == nil || (*XExpr)((*XExpr)(_pOne.X0).X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129334), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereCombineDisjunctsØ00__func__Ø000))), unsafe.Pointer(str(103930)))
+ if (*XExpr)((*XExpr)(_pOne.XpExpr).XpLeft) == nil || (*XExpr)((*XExpr)(_pOne.XpExpr).XpRight) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129334), unsafe.Pointer(&_whereCombineDisjunctsØ00__func__Ø000), unsafe.Pointer(str(103958)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)((*XExpr)(_pTwo.X0).X4) == nil || (*XExpr)((*XExpr)(_pTwo.X0).X5) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129335), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereCombineDisjunctsØ00__func__Ø000))), unsafe.Pointer(str(103978)))
+ if (*XExpr)((*XExpr)(_pTwo.XpExpr).XpLeft) == nil || (*XExpr)((*XExpr)(_pTwo.XpExpr).XpRight) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129335), unsafe.Pointer(&_whereCombineDisjunctsØ00__func__Ø000), unsafe.Pointer(str(104006)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3ExprCompare(tls, (*XExpr)((*XExpr)(_pOne.X0).X4), (*XExpr)((*XExpr)(_pTwo.X0).X4), i32(-1)) != 0 {
+ if _sqlite3ExprCompare(tls, (*XExpr)((*XExpr)(_pOne.XpExpr).XpLeft), (*XExpr)((*XExpr)(_pTwo.XpExpr).XpLeft), int32(-1)) != 0 {
return
}
- if _sqlite3ExprCompare(tls, (*XExpr)((*XExpr)(_pOne.X0).X5), (*XExpr)((*XExpr)(_pTwo.X0).X5), i32(-1)) != 0 {
+ if _sqlite3ExprCompare(tls, (*XExpr)((*XExpr)(_pOne.XpExpr).XpRight), (*XExpr)((*XExpr)(_pTwo.XpExpr).XpRight), int32(-1)) != 0 {
return
}
- if (int32(_eOp) & (int32(_eOp) - i32(1))) == i32(0) {
+ if (int32(_eOp) & (int32(_eOp) - int32(1))) == int32(0) {
goto _12
}
- if (int32(_eOp) & i32(24)) != 0 {
- _eOp = uint16(i32(8))
+ if (int32(_eOp) & int32(24)) != 0 {
+ _eOp = uint16(8)
goto _14
}
func() {
- if (int32(_eOp) & i32(36)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129343), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereCombineDisjunctsØ00__func__Ø000))), unsafe.Pointer(str(104026)))
+ if (int32(_eOp) & int32(36)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129343), unsafe.Pointer(&_whereCombineDisjunctsØ00__func__Ø000), unsafe.Pointer(str(104054)))
crt.X__builtin_abort(tls)
}
}()
- _eOp = uint16(i32(32))
+ _eOp = uint16(32)
_14:
_12:
- _db = (*Xsqlite3)((*XParse)((*XWhereInfo)(_pWC.X0).X0).X0)
- _pNew = _sqlite3ExprDup(tls, _db, (*XExpr)(_pOne.X0), i32(0))
+ _db = (*Xsqlite3)((*XParse)((*XWhereInfo)(_pWC.XpWInfo).XpParse).Xdb)
+ _pNew = _sqlite3ExprDup(tls, _db, (*XExpr)(_pOne.XpExpr), int32(0))
if _pNew == nil {
return
}
- _op = i32(78)
+ _op = int32(78)
_18:
- if int32(_eOp) == (i32(2) << uint(_op-i32(78))) {
+ if int32(_eOp) == (int32(2) << uint(_op-int32(78))) {
goto _21
}
func() {
- if _op >= i32(82) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129350), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereCombineDisjunctsØ00__func__Ø000))), unsafe.Pointer(str(104046)))
+ if _op >= int32(82) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129350), unsafe.Pointer(&_whereCombineDisjunctsØ00__func__Ø000), unsafe.Pointer(str(104074)))
crt.X__builtin_abort(tls)
}
}()
_op += 1
goto _18
_21:
- *(*uint8)(unsafe.Pointer(&(_pNew.X0))) = uint8(_op)
- _idxNew = _whereClauseInsert(tls, _pWC, _pNew, uint16(i32(3)))
+ _pNew.Xop = uint8(_op)
+ _idxNew = _whereClauseInsert(tls, _pWC, _pNew, uint16(3))
_exprAnalyze(tls, _pSrc, _pWC, _idxNew)
}
var _whereCombineDisjunctsØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_whereCombineDisjunctsØ00__func__Ø000[0], str(104055), 22)
+ crt.Xstrncpy(nil, &_whereCombineDisjunctsØ00__func__Ø000[0], str(104083), 22)
}
-// Check to see if the given expression is a LIKE or GLOB operator that
-// can be optimized using inequality constraints. Return TRUE if it is
-// so and false if not.
-//
-// In order for the operator to be optimizible, the RHS must be a string
-// literal that does not begin with a wildcard. The LHS must be a column
-// that may only be NULL, a string, or a BLOB, never a number. (This means
-// that virtual tables cannot participate in the LIKE optimization.) The
-// collating sequence for the column on the LHS must be appropriate for
-// the operator.
+// C comment
+// /*
+// ** Check to see if the given expression is a LIKE or GLOB operator that
+// ** can be optimized using inequality constraints. Return TRUE if it is
+// ** so and false if not.
+// **
+// ** In order for the operator to be optimizible, the RHS must be a string
+// ** literal that does not begin with a wildcard. The LHS must be a column
+// ** that may only be NULL, a string, or a BLOB, never a number. (This means
+// ** that virtual tables cannot participate in the LIKE optimization.) The
+// ** collating sequence for the column on the LHS must be appropriate for
+// ** the operator.
+// */
func _isLikeOrGlob(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _ppPrefix **XExpr, _pisComplete *int32, _pnoCase *int32) (r0 int32) {
var _c, _cnt, _op, _rc, _2_iCol, _11_r1 int32
var _z *int8
@@ -83391,72 +84462,72 @@ func _isLikeOrGlob(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _ppPrefix **XEx
var _pRight, _pLeft, _9_pPrefix *XExpr
var _wc [3]int8
_z = nil
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pVal = nil
if _sqlite3IsLikeFunction(tls, _db, _pExpr, _pnoCase, (*int8)(unsafe.Pointer(&_wc))) == 0 {
- return i32(0)
+ return int32(0)
}
- _pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
- _pLeft = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(i32(1)))).X0)
- _pRight = _sqlite3ExprSkipCollate(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(i32(0)))).X0))
- _op = int32(_pRight.X0)
- if _op != i32(135) {
+ _pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
+ _pLeft = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(1)).XpExpr)
+ _pRight = _sqlite3ExprSkipCollate(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), 0).XpExpr))
+ _op = int32(_pRight.Xop)
+ if _op != int32(135) {
goto _1
}
- _2_pReprepare = (*TVdbe)(_pParse.X61)
- _2_iCol = int32(_pRight.X9)
- _pVal = _sqlite3VdbeGetBoundValue(tls, _2_pReprepare, _2_iCol, uint8(i32(65)))
- if (_pVal != nil) && (Xsqlite3_value_type(tls, _pVal) == i32(3)) {
+ _2_pReprepare = (*TVdbe)(_pParse.XpReprepare)
+ _2_iCol = int32(_pRight.XiColumn)
+ _pVal = _sqlite3VdbeGetBoundValue(tls, _2_pReprepare, _2_iCol, uint8(65))
+ if (_pVal != nil) && (Xsqlite3_value_type(tls, _pVal) == int32(3)) {
_z = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, _pVal)))
}
- _sqlite3VdbeSetVarmask(tls, (*TVdbe)(_pParse.X2), _2_iCol)
+ _sqlite3VdbeSetVarmask(tls, (*TVdbe)(_pParse.XpVdbe), _2_iCol)
func() {
- if int32(_pRight.X0) != i32(135) && int32(_pRight.X0) != i32(157) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(129154), unsafe.Pointer((*int8)(unsafe.Pointer(&_isLikeOrGlobØ00__func__Ø000))), unsafe.Pointer(str(104077)))
+ if int32(_pRight.Xop) != int32(135) && int32(_pRight.Xop) != int32(157) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(129154), unsafe.Pointer(&_isLikeOrGlobØ00__func__Ø000), unsafe.Pointer(str(104105)))
crt.X__builtin_abort(tls)
}
}()
goto _8
_1:
- if _op == i32(97) {
- _z = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pRight.X3)))))
+ if _op == int32(97) {
+ _z = *(**int8)(unsafe.Pointer(&_pRight.Xu))
}
_8:
if _z == nil {
goto _9
}
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0)))))))))&i32(4)) == 0 && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(45) {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_z, 0)))))&int32(4)) == 0 && int32(*elem1(_z, 0)) != int32(45) {
goto _11
}
- if ((int32(_pLeft.X0) != i32(152)) || (int32(_sqlite3ExprAffinity(tls, _pLeft)) != i32(66))) || ((*XTable)(_pLeft.X14).X16) != 0 {
+ if ((int32(_pLeft.Xop) != int32(152)) || (int32(_sqlite3ExprAffinity(tls, _pLeft)) != int32(66))) || ((*XTable)(_pLeft.XpTab).XnModuleArg) != 0 {
_sqlite3ValueFree(tls, _pVal)
- return i32(0)
+ return int32(0)
}
_11:
- _cnt = i32(0)
+ _cnt = int32(0)
_15:
- if (((store1(&_c, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_cnt))))) != i32(0)) && (_c != int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_wc)) + 1*uintptr(i32(0))))))) && (_c != int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_wc)) + 1*uintptr(i32(1))))))) && (_c != int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_wc)) + 1*uintptr(i32(2)))))) {
+ if (((store2(&_c, int32(*elem1(_z, uintptr(_cnt)))) != int32(0)) && (_c != int32(*elem1((*int8)(unsafe.Pointer(&_wc)), 0)))) && (_c != int32(*elem1((*int8)(unsafe.Pointer(&_wc)), uintptr(1))))) && (_c != int32(*elem1((*int8)(unsafe.Pointer(&_wc)), uintptr(2)))) {
_cnt += 1
goto _15
}
- if _cnt == i32(0) || i32(255) == int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_cnt-i32(1)))))) {
+ if _cnt == int32(0) || int32(255) == int32(uint8(*elem1(_z, uintptr(_cnt-int32(1))))) {
goto _21
}
- *_pisComplete = bool2int((_c == int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_wc)) + 1*uintptr(i32(0)))))) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_cnt+i32(1))))) == i32(0)))
- _9_pPrefix = _sqlite3Expr(tls, _db, i32(97), _z)
+ *_pisComplete = bool2int((_c == int32(*elem1((*int8)(unsafe.Pointer(&_wc)), 0))) && (int32(*elem1(_z, uintptr(_cnt+int32(1)))) == int32(0)))
+ _9_pPrefix = _sqlite3Expr(tls, _db, int32(97), _z)
if _9_pPrefix != nil {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_9_pPrefix.X3))))))) + 1*uintptr(_cnt))) = int8(i32(0))
+ *elem1(*(**int8)(unsafe.Pointer(&_9_pPrefix.Xu)), uintptr(_cnt)) = 0
}
*_ppPrefix = _9_pPrefix
- if _op != i32(135) {
+ if _op != int32(135) {
goto _24
}
- _10_v = (*TVdbe)(_pParse.X2)
- _sqlite3VdbeSetVarmask(tls, _10_v, int32(_pRight.X9))
- if (*_pisComplete) != 0 && ((*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pRight.X3))))))) + 1*uintptr(i32(1))))) != 0) {
+ _10_v = (*TVdbe)(_pParse.XpVdbe)
+ _sqlite3VdbeSetVarmask(tls, _10_v, int32(_pRight.XiColumn))
+ if (*_pisComplete) != 0 && ((*elem1(*(**int8)(unsafe.Pointer(&_pRight.Xu)), uintptr(1))) != 0) {
_11_r1 = _sqlite3GetTempReg(tls, _pParse)
_sqlite3ExprCodeTarget(tls, _pParse, _pRight, _11_r1)
- _sqlite3VdbeChangeP3(tls, _10_v, uint32(_sqlite3VdbeCurrentAddr(tls, _10_v)-i32(1)), i32(0))
+ _sqlite3VdbeChangeP3(tls, _10_v, uint32(_sqlite3VdbeCurrentAddr(tls, _10_v)-int32(1)), int32(0))
_sqlite3ReleaseTempReg(tls, _pParse, _11_r1)
}
_24:
@@ -83473,100 +84544,109 @@ _9:
panic(0)
}
-// pExpr points to an expression which implements a function. If
-// it is appropriate to apply the LIKE optimization to that function
-// then set aWc[0] through aWc[2] to the wildcard characters and
-// return TRUE. If the function is not a LIKE-style function then
-// return FALSE.
-//
-// *pIsNocase is set to true if uppercase and lowercase are equivalent for
-// the function (default for LIKE). If the function makes the distinction
-// between uppercase and lowercase (as does GLOB) then *pIsNocase is set to
-// false.
+// C comment
+// /*
+// ** pExpr points to an expression which implements a function. If
+// ** it is appropriate to apply the LIKE optimization to that function
+// ** then set aWc[0] through aWc[2] to the wildcard characters and
+// ** return TRUE. If the function is not a LIKE-style function then
+// ** return FALSE.
+// **
+// ** *pIsNocase is set to true if uppercase and lowercase are equivalent for
+// ** the function (default for LIKE). If the function makes the distinction
+// ** between uppercase and lowercase (as does GLOB) then *pIsNocase is set to
+// ** false.
+// */
func _sqlite3IsLikeFunction(tls *crt.TLS, _db *Xsqlite3, _pExpr *XExpr, _pIsNocase *int32, _aWc *int8) (r0 int32) {
var _pDef *XFuncDef
- if ((int32(_pExpr.X0) != i32(151)) || ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))) == nil)) || (((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0) != i32(2)) {
- return i32(0)
+ if ((int32(_pExpr.Xop) != int32(151)) || ((*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))) == nil)) || (((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XnExpr) != int32(2)) {
+ return int32(0)
}
func() {
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107262), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000))), unsafe.Pointer(str(42778)))
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107262), unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000), unsafe.Pointer(str(42733)))
crt.X__builtin_abort(tls)
}
}()
- _pDef = _sqlite3FindFunction(tls, _db, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), i32(2), uint8(i32(1)), uint8(i32(0)))
+ _pDef = _sqlite3FindFunction(tls, _db, *(**int8)(unsafe.Pointer(&_pExpr.Xu)), int32(2), uint8(1), 0)
if func() int32 {
if _pDef == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107264), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107264), unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
- }() != 0 || ((int32(_pDef.X1) & i32(4)) == i32(0)) {
- return i32(0)
+ return int32(0)
+ }() != 0 || ((int32(_pDef.XfuncFlags) & int32(4)) == int32(0)) {
+ return int32(0)
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_aWc), _pDef.X2, uint32(i32(3)))
+ crt.Xmemcpy(tls, unsafe.Pointer(_aWc), _pDef.XpUserData, uint32(3))
func() {
- if (*int8)(unsafe.Pointer(&_likeInfoAlt)) != (*int8)(unsafe.Pointer((*uint8)(unsafe.Pointer(&(_likeInfoAlt.X0))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107273), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000))), unsafe.Pointer(str(104128)))
+ if (*int8)(unsafe.Pointer(&_likeInfoAlt)) != (*int8)(unsafe.Pointer(&_likeInfoAlt.XmatchAll)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107273), unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000), unsafe.Pointer(str(104156)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_likeInfoAlt))+1*uintptr(i32(1)))) != (*int8)(unsafe.Pointer((*uint8)(unsafe.Pointer(&(_likeInfoAlt.X1))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107274), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000))), unsafe.Pointer(str(104180)))
+ if elem1((*int8)(unsafe.Pointer(&_likeInfoAlt)), uintptr(1)) != (*int8)(unsafe.Pointer(&_likeInfoAlt.XmatchOne)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107274), unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000), unsafe.Pointer(str(104208)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_likeInfoAlt))+1*uintptr(i32(2)))) != (*int8)(unsafe.Pointer((*uint8)(unsafe.Pointer(&(_likeInfoAlt.X2))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107275), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000))), unsafe.Pointer(str(104238)))
+ if elem1((*int8)(unsafe.Pointer(&_likeInfoAlt)), uintptr(2)) != (*int8)(unsafe.Pointer(&_likeInfoAlt.XmatchSet)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107275), unsafe.Pointer(&_sqlite3IsLikeFunctionØ00__func__Ø000), unsafe.Pointer(str(104266)))
crt.X__builtin_abort(tls)
}
}()
- *_pIsNocase = bool2int((int32(_pDef.X1) & i32(8)) == i32(0))
- return i32(1)
+ *_pIsNocase = bool2int((int32(_pDef.XfuncFlags) & int32(8)) == int32(0))
+ return int32(1)
}
var _sqlite3IsLikeFunctionØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3IsLikeFunctionØ00__func__Ø000[0], str(104296), 22)
+ crt.Xstrncpy(nil, &_sqlite3IsLikeFunctionØ00__func__Ø000[0], str(104324), 22)
}
+// C comment
+// /* If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator
+// ** is case sensitive causing 'a' LIKE 'A' to be false */
var _likeInfoAlt TcompareInfo
func init() {
- _likeInfoAlt = TcompareInfo{X0: u8(37), X1: u8(95), X2: u8(0), X3: u8(0)}
+ _likeInfoAlt = TcompareInfo{XmatchAll: uint8(37), XmatchOne: uint8(95)}
}
-// Return a pointer to an sqlite3_value structure containing the value bound
-// parameter iVar of VM v. Except, if the value is an SQL NULL, return
-// 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_*
-// constants) to the value before returning it.
-//
-// The returned value must be freed by the caller using sqlite3ValueFree().
+// C comment
+// /*
+// ** Return a pointer to an sqlite3_value structure containing the value bound
+// ** parameter iVar of VM v. Except, if the value is an SQL NULL, return
+// ** 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_*
+// ** constants) to the value before returning it.
+// **
+// ** The returned value must be freed by the caller using sqlite3ValueFree().
+// */
func _sqlite3VdbeGetBoundValue(tls *crt.TLS, _v *TVdbe, _iVar int32, _aff uint8) (r0 *XMem) {
var _1_pMem, _2_pRet *XMem
func() {
- if _iVar <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75960), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeGetBoundValueØ00__func__Ø000))), unsafe.Pointer(str(104318)))
+ if _iVar <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75960), unsafe.Pointer(&_sqlite3VdbeGetBoundValueØ00__func__Ø000), unsafe.Pointer(str(104346)))
crt.X__builtin_abort(tls)
}
}()
if _v == nil {
goto _2
}
- _1_pMem = (*XMem)(unsafe.Pointer(uintptr(_v.X24) + 48*uintptr(_iVar-i32(1))))
- if i32(0) != (int32(_1_pMem.X1) & i32(1)) {
+ _1_pMem = elem25((*XMem)(_v.XaVar), uintptr(_iVar-int32(1)))
+ if int32(0) != (int32(_1_pMem.Xflags) & int32(1)) {
goto _3
}
- _2_pRet = _sqlite3ValueNew(tls, (*Xsqlite3)(_v.X0))
+ _2_pRet = _sqlite3ValueNew(tls, (*Xsqlite3)(_v.Xdb))
if _2_pRet != nil {
_sqlite3VdbeMemCopy(tls, _2_pRet, _1_pMem)
- _sqlite3ValueApplyAffinity(tls, _2_pRet, _aff, uint8(i32(1)))
+ _sqlite3ValueApplyAffinity(tls, _2_pRet, _aff, uint8(1))
}
return _2_pRet
@@ -83578,142 +84658,143 @@ _2:
var _sqlite3VdbeGetBoundValueØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeGetBoundValueØ00__func__Ø000[0], str(104325), 25)
+ crt.Xstrncpy(nil, &_sqlite3VdbeGetBoundValueØ00__func__Ø000[0], str(104353), 25)
}
-// Configure SQL variable iVar so that binding a new value to it signals
-// to sqlite3_reoptimize() that re-preparing the statement may result
-// in a better query plan.
+// C comment
+// /*
+// ** Configure SQL variable iVar so that binding a new value to it signals
+// ** to sqlite3_reoptimize() that re-preparing the statement may result
+// ** in a better query plan.
+// */
func _sqlite3VdbeSetVarmask(tls *crt.TLS, _v *TVdbe, _iVar int32) {
func() {
- if _iVar <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(75981), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeSetVarmaskØ00__func__Ø000))), unsafe.Pointer(str(104318)))
+ if _iVar <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(75981), unsafe.Pointer(&_sqlite3VdbeSetVarmaskØ00__func__Ø000), unsafe.Pointer(str(104346)))
crt.X__builtin_abort(tls)
}
}()
- if _iVar >= i32(32) {
- {
- p := (*uint32)(unsafe.Pointer(&(_v.X41)))
- *p = (*p) | u32(2147483648)
- sink5(*p)
- }
+ if _iVar >= int32(32) {
+ _v.Xexpmask |= uint32(2147483648)
goto _3
}
- {
- p := (*uint32)(unsafe.Pointer(&(_v.X41)))
- *p = (*p) | (u32(1) << uint(_iVar-i32(1)))
- sink5(*p)
- }
+ _v.Xexpmask |= uint32(1) << uint(_iVar-int32(1))
_3:
}
var _sqlite3VdbeSetVarmaskØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeSetVarmaskØ00__func__Ø000[0], str(104350), 22)
+ crt.Xstrncpy(nil, &_sqlite3VdbeSetVarmaskØ00__func__Ø000[0], str(104378), 22)
}
var _isLikeOrGlobØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_isLikeOrGlobØ00__func__Ø000[0], str(104372), 13)
+ crt.Xstrncpy(nil, &_isLikeOrGlobØ00__func__Ø000[0], str(104400), 13)
}
func _sqlite3VdbeChangeP3(tls *crt.TLS, _p *TVdbe, _addr uint32, _val int32) {
- *(*int32)(unsafe.Pointer(&(_sqlite3VdbeGetOp(tls, _p, int32(_addr)).X5))) = _val
-}
-
-// Check to see if the given expression is of the form
-//
-// column OP expr
-//
-// where OP is one of MATCH, GLOB, LIKE or REGEXP and "column" is a
-// column of a virtual table.
-//
-// If it is then return TRUE. If not, return FALSE.
+ _sqlite3VdbeGetOp(tls, _p, int32(_addr)).Xp3 = _val
+}
+
+// C comment
+// /*
+// ** Check to see if the given expression is of the form
+// **
+// ** column OP expr
+// **
+// ** where OP is one of MATCH, GLOB, LIKE or REGEXP and "column" is a
+// ** column of a virtual table.
+// **
+// ** If it is then return TRUE. If not, return FALSE.
+// */
func _isMatchOfColumn(tls *crt.TLS, _pExpr *XExpr, _peOp2 *uint8) (r0 int32) {
var _i int32
var _pList *XExprList
var _pCol *XExpr
- if int32(_pExpr.X0) != i32(151) {
- return i32(0)
+ if int32(_pExpr.Xop) != int32(151) {
+ return int32(0)
}
- _pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))
- if (_pList == nil) || ((_pList.X0) != i32(2)) {
- return i32(0)
+ _pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))
+ if (_pList == nil) || (_pList.XnExpr != int32(2)) {
+ return int32(0)
}
- _pCol = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(i32(1)))).X0)
- if (int32(_pCol.X0) != i32(152)) || (((*XTable)(_pCol.X14).X16) == 0) {
- return i32(0)
+ _pCol = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(1)).XpExpr)
+ if (int32(_pCol.Xop) != int32(152)) || (((*XTable)(_pCol.XpTab).XnModuleArg) == 0) {
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_5:
- if _i >= i32(4) {
+ if _i >= int32(4) {
goto _8
}
- if _sqlite3StrICmp(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), (*TEncName)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_isMatchOfColumnØ00aOpØ001))+8*uintptr(_i))).X0) == i32(0) {
- *_peOp2 = (*TEncName)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_isMatchOfColumnØ00aOpØ001)) + 8*uintptr(_i))).X1
- return i32(1)
+ if _sqlite3StrICmp(tls, *(**int8)(unsafe.Pointer(&_pExpr.Xu)), elem103((*TOp2)(unsafe.Pointer(&_isMatchOfColumnØ00aOpØ001)), uintptr(_i)).XzOp) == int32(0) {
+ *_peOp2 = elem103((*TOp2)(unsafe.Pointer(&_isMatchOfColumnØ00aOpØ001)), uintptr(_i)).XeOp2
+ return int32(1)
}
_i += 1
goto _5
_8:
- return i32(0)
-}
-
-var _isMatchOfColumnØ00aOpØ001 [4]TEncName
-
-func init() {
- _isMatchOfColumnØ00aOpØ001 = [4]TEncName{TEncName{X0: str(61759), X1: u8(64)}, TEncName{X0: str(7961), X1: u8(66)}, TEncName{X0: str(7966), X1: u8(65)}, TEncName{X0: str(104385), X1: u8(67)}}
-}
-
-// Compute and return a new Expr object which when passed to
-// sqlite3ExprCode() will generate all necessary code to compute
-// the iField-th column of the vector expression pVector.
-//
-// It is ok for pVector to be a scalar (as long as iField==0).
-// In that case, this routine works like sqlite3ExprDup().
-//
-// The caller owns the returned Expr object and is responsible for
-// ensuring that the returned value eventually gets freed.
-//
-// The caller retains ownership of pVector. If pVector is a TK_SELECT,
-// then the returned object will reference pVector and so pVector must remain
-// valid for the life of the returned object. If pVector is a TK_VECTOR
-// or a scalar expression, then it can be deleted as soon as this routine
-// returns.
-//
-// A trick to cause a TK_SELECT pVector to be deleted together with
-// the returned Expr object is to attach the pVector to the pRight field
-// of the returned TK_SELECT_COLUMN Expr object.
+ return int32(0)
+}
+
+var _isMatchOfColumnØ00aOpØ001 [4]TOp2
+
+func init() {
+ _isMatchOfColumnØ00aOpØ001 = [4]TOp2{TOp2{XzOp: str(93845), XeOp2: uint8(64)}, TOp2{XzOp: str(7862), XeOp2: uint8(66)}, TOp2{XzOp: str(7867), XeOp2: uint8(65)}, TOp2{XzOp: str(104413), XeOp2: uint8(67)}}
+}
+
+// C comment
+// /*
+// ** Compute and return a new Expr object which when passed to
+// ** sqlite3ExprCode() will generate all necessary code to compute
+// ** the iField-th column of the vector expression pVector.
+// **
+// ** It is ok for pVector to be a scalar (as long as iField==0).
+// ** In that case, this routine works like sqlite3ExprDup().
+// **
+// ** The caller owns the returned Expr object and is responsible for
+// ** ensuring that the returned value eventually gets freed.
+// **
+// ** The caller retains ownership of pVector. If pVector is a TK_SELECT,
+// ** then the returned object will reference pVector and so pVector must remain
+// ** valid for the life of the returned object. If pVector is a TK_VECTOR
+// ** or a scalar expression, then it can be deleted as soon as this routine
+// ** returns.
+// **
+// ** A trick to cause a TK_SELECT pVector to be deleted together with
+// ** the returned Expr object is to attach the pVector to the pRight field
+// ** of the returned TK_SELECT_COLUMN Expr object.
+// */
func _sqlite3ExprForVectorField(tls *crt.TLS, _pParse *XParse, _pVector *XExpr, _iField int32) (r0 *XExpr) {
var _pRet *XExpr
- if int32(_pVector.X0) != i32(119) {
+ if int32(_pVector.Xop) != int32(119) {
goto _0
}
func() {
- if ((_pVector.X2) & uint32(i32(2048))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91309), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprForVectorFieldØ00__func__Ø000))), unsafe.Pointer(str(104392)))
+ if (_pVector.Xflags & uint32(2048)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91309), unsafe.Pointer(&_sqlite3ExprForVectorFieldØ00__func__Ø000), unsafe.Pointer(str(104420)))
crt.X__builtin_abort(tls)
}
}()
- _pRet = _sqlite3PExpr(tls, _pParse, i32(159), nil, nil)
+ _pRet = _sqlite3PExpr(tls, _pParse, int32(159), nil, nil)
if _pRet != nil {
- *(*int16)(unsafe.Pointer(&(_pRet.X9))) = int16(_iField)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRet.X4))))) = _pVector
+ _pRet.XiColumn = int16(_iField)
+ *(**XExpr)(unsafe.Pointer(&_pRet.XpLeft)) = _pVector
}
func() {
- if _pRet != nil && (_pRet.X8) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91331), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprForVectorFieldØ00__func__Ø000))), unsafe.Pointer(str(104422)))
+ if _pRet != nil && _pRet.XiTable != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91331), unsafe.Pointer(&_sqlite3ExprForVectorFieldØ00__func__Ø000), unsafe.Pointer(str(104450)))
crt.X__builtin_abort(tls)
}
}()
goto _7
_0:
- if int32(_pVector.X0) == i32(158) {
- _pVector = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pVector.X6)))))).X2))))) + 20*uintptr(_iField))).X0)
+ if int32(_pVector.Xop) == int32(158) {
+ _pVector = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pVector.Xx))).Xa))), uintptr(_iField)).XpExpr)
}
- _pRet = _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.X0), _pVector, i32(0))
+ _pRet = _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.Xdb), _pVector, int32(0))
_7:
return _pRet
}
@@ -83721,113 +84802,115 @@ _7:
var _sqlite3ExprForVectorFieldØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprForVectorFieldØ00__func__Ø000[0], str(104449), 26)
+ crt.Xstrncpy(nil, &_sqlite3ExprForVectorFieldØ00__func__Ø000[0], str(104477), 26)
}
-// Return true if the DISTINCT expression-list passed as the third argument
-// is redundant.
-//
-// A DISTINCT list is redundant if any subset of the columns in the
-// DISTINCT list are collectively unique and individually non-null.
+// C comment
+// /*
+// ** Return true if the DISTINCT expression-list passed as the third argument
+// ** is redundant.
+// **
+// ** A DISTINCT list is redundant if any subset of the columns in the
+// ** DISTINCT list are collectively unique and individually non-null.
+// */
func _isDistinctRedundant(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pWC *XWhereClause, _pDistinct *XExprList) (r0 int32) {
var _i, _iBase int32
var _pTab *XTable
var _1_p *XExpr
var _pIdx *XIndex
- if (_pTabList.X0) != i32(1) {
- return i32(0)
+ if _pTabList.XnSrc != int32(1) {
+ return int32(0)
}
- _iBase = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(i32(0)))).X11
- _pTab = (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(i32(0)))).X4)
- _i = i32(0)
+ _iBase = elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), 0).XiCursor
+ _pTab = (*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), 0).XpTab)
+ _i = int32(0)
_1:
- if _i >= (_pDistinct.X0) {
+ if _i >= _pDistinct.XnExpr {
goto _4
}
- _1_p = _sqlite3ExprSkipCollate(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pDistinct.X2)))))+20*uintptr(_i))).X0))
- if ((int32(_1_p.X0) == i32(152)) && ((_1_p.X8) == _iBase)) && (int32(_1_p.X9) < i32(0)) {
- return i32(1)
+ _1_p = _sqlite3ExprSkipCollate(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pDistinct.Xa)), uintptr(_i)).XpExpr))
+ if ((int32(_1_p.Xop) == int32(152)) && (_1_p.XiTable == _iBase)) && (int32(_1_p.XiColumn) < int32(0)) {
+ return int32(1)
}
_i += 1
goto _1
_4:
- _pIdx = (*XIndex)(_pTab.X2)
+ _pIdx = (*XIndex)(_pTab.XpIndex)
_8:
if _pIdx == nil {
goto _11
}
- if int32(_pIdx.X15) == i32(0) {
+ if int32(_pIdx.XonError) == int32(0) {
goto _9
}
- _i = i32(0)
+ _i = int32(0)
_13:
- if _i >= int32(_pIdx.X13) {
+ if _i >= int32(_pIdx.XnKeyCol) {
goto _16
}
- if nil != _sqlite3WhereFindTerm(tls, _pWC, _iBase, _i, u64(18446744073709551615), uint32(i32(2)), _pIdx) {
+ if nil != _sqlite3WhereFindTerm(tls, _pWC, _iBase, _i, uint64(18446744073709551615), uint32(2), _pIdx) {
goto _17
}
- if _findIndexCol(tls, _pParse, _pDistinct, _iBase, _pIdx, _i) < i32(0) {
+ if _findIndexCol(tls, _pParse, _pDistinct, _iBase, _pIdx, _i) < int32(0) {
goto _16
}
- if _indexColumnNotNull(tls, _pIdx, _i) == i32(0) {
+ if _indexColumnNotNull(tls, _pIdx, _i) == int32(0) {
goto _16
}
_17:
_i += 1
goto _13
_16:
- if _i == int32(_pIdx.X13) {
- return i32(1)
+ if _i == int32(_pIdx.XnKeyCol) {
+ return int32(1)
}
_9:
- _pIdx = (*XIndex)(_pIdx.X5)
+ _pIdx = (*XIndex)(_pIdx.XpNext)
goto _8
_11:
- return i32(0)
-}
-
-// Search for a term in the WHERE clause that is of the form "X <op> <expr>"
-// where X is a reference to the iColumn of table iCur or of index pIdx
-// if pIdx!=0 and <op> is one of the WO_xx operator codes specified by
-// the op parameter. Return a pointer to the term. Return 0 if not found.
-//
-// If pIdx!=0 then it must be one of the indexes of table iCur.
-// Search for terms matching the iColumn-th column of pIdx
-// rather than the iColumn-th column of table iCur.
-//
-// The term returned might by Y=<expr> if there is another constraint in
-// the WHERE clause that specifies that X=Y. Any such constraints will be
-// identified by the WO_EQUIV bit in the pTerm->eOperator field. The
-// aiCur[]/iaColumn[] arrays hold X and all its equivalents. There are 11
-// slots in aiCur[]/aiColumn[] so that means we can look for X plus up to 10
-// other equivalent values. Hence a search for X will return <expr> if X=A1
-// and A1=A2 and A2=A3 and ... and A9=A10 and A10=<expr>.
-//
-// If there are multiple terms in the WHERE clause of the form "X <op> <expr>"
-// then try for the one with no dependencies on <expr> - in other words where
-// <expr> is a constant expression of some kind. Only return entries of
-// the form "X <op> Y" where Y is a column in another table if no terms of
-// the form "X <op> <const-expr>" exist. If no terms with a constant RHS
-// exist, try to return a term that does not use WO_EQUIV.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Search for a term in the WHERE clause that is of the form "X <op> <expr>"
+// ** where X is a reference to the iColumn of table iCur or of index pIdx
+// ** if pIdx!=0 and <op> is one of the WO_xx operator codes specified by
+// ** the op parameter. Return a pointer to the term. Return 0 if not found.
+// **
+// ** If pIdx!=0 then it must be one of the indexes of table iCur.
+// ** Search for terms matching the iColumn-th column of pIdx
+// ** rather than the iColumn-th column of table iCur.
+// **
+// ** The term returned might by Y=<expr> if there is another constraint in
+// ** the WHERE clause that specifies that X=Y. Any such constraints will be
+// ** identified by the WO_EQUIV bit in the pTerm->eOperator field. The
+// ** aiCur[]/iaColumn[] arrays hold X and all its equivalents. There are 11
+// ** slots in aiCur[]/aiColumn[] so that means we can look for X plus up to 10
+// ** other equivalent values. Hence a search for X will return <expr> if X=A1
+// ** and A1=A2 and A2=A3 and ... and A9=A10 and A10=<expr>.
+// **
+// ** If there are multiple terms in the WHERE clause of the form "X <op> <expr>"
+// ** then try for the one with no dependencies on <expr> - in other words where
+// ** <expr> is a constant expression of some kind. Only return entries of
+// ** the form "X <op> Y" where Y is a column in another table if no terms of
+// ** the form "X <op> <const-expr>" exist. If no terms with a constant RHS
+// ** exist, try to return a term that does not use WO_EQUIV.
+// */
func _sqlite3WhereFindTerm(tls *crt.TLS, _pWC *XWhereClause, _iCur int32, _iColumn int32, _notReady uint64, _op uint32, _pIdx *XIndex) (r0 *XWhereTerm) {
var _pResult, _p *XWhereTerm
var _scan XWhereScan
_pResult = nil
_p = _whereScanInit(tls, &_scan, _pWC, _iCur, _iColumn, _op, _pIdx)
- {
- p := &_op
- *p = (*p) & uint32(i32(130))
- sink5(*p)
- }
+ _op &= uint32(130)
_0:
if _p == nil {
goto _1
}
- if ((_p.X11) & _notReady) != uint64(i32(0)) {
+ if (_p.XprereqRight & _notReady) != (0) {
goto _2
}
- if ((_p.X11) == uint64(i32(0))) && ((uint32(_p.X4) & _op) != uint32(i32(0))) {
+ if (_p.XprereqRight == (0)) && ((uint32(_p.XeOperator) & _op) != (0)) {
return _p
}
if _pResult == nil {
@@ -83838,72 +84921,75 @@ _2:
goto _0
_1:
return _pResult
-
- _ = _scan
- panic(0)
}
-// Initialize a WHERE clause scanner object. Return a pointer to the
-// first match. Return NULL if there are no matches.
-//
-// The scanner will be searching the WHERE clause pWC. It will look
-// for terms of the form "X <op> <expr>" where X is column iColumn of table
-// iCur. Or if pIdx!=0 then X is column iColumn of index pIdx. pIdx
-// must be one of the indexes of table iCur.
-//
-// The <op> must be one of the operators described by opMask.
-//
-// If the search is for X and the WHERE clause contains terms of the
-// form X=Y then this routine might also return terms of the form
-// "Y <op> <expr>". The number of levels of transitivity is limited,
-// but is enough to handle most commonly occurring SQL statements.
-//
-// If X is not the INTEGER PRIMARY KEY then X must be compatible with
-// index pIdx.
+// C comment
+// /*
+// ** Initialize a WHERE clause scanner object. Return a pointer to the
+// ** first match. Return NULL if there are no matches.
+// **
+// ** The scanner will be searching the WHERE clause pWC. It will look
+// ** for terms of the form "X <op> <expr>" where X is column iColumn of table
+// ** iCur. Or if pIdx!=0 then X is column iColumn of index pIdx. pIdx
+// ** must be one of the indexes of table iCur.
+// **
+// ** The <op> must be one of the operators described by opMask.
+// **
+// ** If the search is for X and the WHERE clause contains terms of the
+// ** form X=Y then this routine might also return terms of the form
+// ** "Y <op> <expr>". The number of levels of transitivity is limited,
+// ** but is enough to handle most commonly occurring SQL statements.
+// **
+// ** If X is not the INTEGER PRIMARY KEY then X must be compatible with
+// ** index pIdx.
+// */
func _whereScanInit(tls *crt.TLS, _pScan *XWhereScan, _pWC *XWhereClause, _iCur int32, _iColumn int32, _opMask uint32, _pIdx *XIndex) (r0 *XWhereTerm) {
var _1_j int32
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pScan.X0))))) = _pWC
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pScan.X1))))) = _pWC
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pScan.X3))))) = nil
- *(*int8)(unsafe.Pointer(&(_pScan.X4))) = int8(i32(0))
- *(**int8)(unsafe.Pointer(&(_pScan.X2))) = nil
+ *(**XWhereClause)(unsafe.Pointer(&_pScan.XpOrigWC)) = _pWC
+ *(**XWhereClause)(unsafe.Pointer(&_pScan.XpWC)) = _pWC
+ *(**XExpr)(unsafe.Pointer(&_pScan.XpIdxExpr)) = nil
+ _pScan.Xidxaff = 0
+ _pScan.XzCollName = nil
if _pIdx == nil {
goto _0
}
_1_j = _iColumn
- _iColumn = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_1_j))))
- if _iColumn == i32(-2) {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pScan.X3))))) = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.X10).X2))))) + 20*uintptr(_1_j))).X0)
- *(**int8)(unsafe.Pointer(&(_pScan.X2))) = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_1_j)))
+ _iColumn = int32(*elem50(_pIdx.XaiColumn, uintptr(_1_j)))
+ if _iColumn == int32(-2) {
+ *(**XExpr)(unsafe.Pointer(&_pScan.XpIdxExpr)) = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.XaColExpr).Xa))), uintptr(_1_j)).XpExpr)
+ _pScan.XzCollName = *elem0(_pIdx.XazColl, uintptr(_1_j))
goto _5
}
- if _iColumn == int32((*XTable)(_pIdx.X3).X10) {
- _iColumn = i32(-1)
+ if _iColumn == int32((*XTable)(_pIdx.XpTable).XiPKey) {
+ _iColumn = int32(-1)
goto _5
}
- if _iColumn >= i32(0) {
- *(*int8)(unsafe.Pointer(&(_pScan.X4))) = (*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pIdx.X3).X1) + 16*uintptr(_iColumn))).X4
- *(**int8)(unsafe.Pointer(&(_pScan.X2))) = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_1_j)))
+ if _iColumn >= int32(0) {
+ _pScan.Xidxaff = elem41((*XColumn)((*XTable)(_pIdx.XpTable).XaCol), uintptr(_iColumn)).Xaffinity
+ _pScan.XzCollName = *elem0(_pIdx.XazColl, uintptr(_1_j))
}
_5:
goto _7
_0:
- if _iColumn == i32(-2) {
+ if _iColumn == int32(-2) {
return nil
}
_7:
- *(*uint32)(unsafe.Pointer(&(_pScan.X7))) = _opMask
- *(*int32)(unsafe.Pointer(&(_pScan.X8))) = i32(0)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int32)(unsafe.Pointer(&(_pScan.X9))))) + 4*uintptr(i32(0)))) = _iCur
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int16)(unsafe.Pointer(&(_pScan.X10))))) + 2*uintptr(i32(0)))) = int16(_iColumn)
- *(*uint8)(unsafe.Pointer(&(_pScan.X5))) = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_pScan.X6))) = uint8(i32(1))
+ _pScan.XopMask = _opMask
+ _pScan.Xk = int32(0)
+ *elem8((*int32)(unsafe.Pointer(&_pScan.XaiCur)), 0) = _iCur
+ *elem50((*int16)(unsafe.Pointer(&_pScan.XaiColumn)), 0) = int16(_iColumn)
+ _pScan.XnEquiv = uint8(1)
+ _pScan.XiEquiv = uint8(1)
return _whereScanNext(tls, _pScan)
}
-// Advance to the next WhereTerm that matches according to the criteria
-// established when the pScan object was initialized by whereScanInit().
-// Return NULL if there are no more matching WhereTerms.
+// C comment
+// /*
+// ** Advance to the next WhereTerm that matches according to the criteria
+// ** established when the pScan object was initialized by whereScanInit().
+// ** Return NULL if there are no more matching WhereTerms.
+// */
func _whereScanNext(tls *crt.TLS, _pScan *XWhereScan) (r0 *XWhereTerm) {
var _iColumn int16
var _iCur, _k, _5_j int32
@@ -83912,82 +84998,82 @@ func _whereScanNext(tls *crt.TLS, _pScan *XWhereScan) (r0 *XWhereTerm) {
var _10_pColl *XCollSeq
var _pTerm *XWhereTerm
var _pWC *XWhereClause
- _k = _pScan.X8
+ _k = _pScan.Xk
func() {
- if int32(_pScan.X6) > int32(_pScan.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130590), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereScanNextØ00__func__Ø000))), unsafe.Pointer(str(104475)))
+ if int32(_pScan.XiEquiv) > int32(_pScan.XnEquiv) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130590), unsafe.Pointer(&_whereScanNextØ00__func__Ø000), unsafe.Pointer(str(104503)))
crt.X__builtin_abort(tls)
}
}()
- _pWC = (*XWhereClause)(_pScan.X1)
+ _pWC = (*XWhereClause)(_pScan.XpWC)
_2:
- _iColumn = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int16)(unsafe.Pointer(&(_pScan.X10))))) + 2*uintptr(int32(_pScan.X6)-i32(1))))
- _iCur = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int32)(unsafe.Pointer(&(_pScan.X9))))) + 4*uintptr(int32(_pScan.X6)-i32(1))))
+ _iColumn = *elem50((*int16)(unsafe.Pointer(&_pScan.XaiColumn)), uintptr(int32(_pScan.XiEquiv)-int32(1)))
+ _iCur = *elem8((*int32)(unsafe.Pointer(&_pScan.XaiCur)), uintptr(int32(_pScan.XiEquiv)-int32(1)))
func() {
if _pWC == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130595), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereScanNextØ00__func__Ø000))), unsafe.Pointer(str(104504)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130595), unsafe.Pointer(&_whereScanNextØ00__func__Ø000), unsafe.Pointer(str(104532)))
crt.X__builtin_abort(tls)
}
}()
_6:
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereTerm)(_pWC.X5))) + uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(_k)))))*uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(48)))))))))))
+ _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.Xa) + uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(_k)*uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(48)))))))))))
_7:
- if _k >= (_pWC.X3) {
+ if _k >= _pWC.XnTerm {
goto _10
}
- if (_pTerm.X8) != _iCur || (*(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))) != int32(_iColumn) || int32(_iColumn) == i32(-2) && _sqlite3ExprCompareSkip(tls, (*XExpr)((*XExpr)(_pTerm.X0).X4), (*XExpr)(_pScan.X3), _iCur) != i32(0) || int32(_pScan.X6) > i32(1) && (((*XExpr)(_pTerm.X0).X2)&uint32(i32(1))) != uint32(i32(0)) {
+ if _pTerm.XleftCursor != _iCur || (*(*int32)(unsafe.Pointer(&_pTerm.Xu))) != int32(_iColumn) || int32(_iColumn) == int32(-2) && _sqlite3ExprCompareSkip(tls, (*XExpr)((*XExpr)(_pTerm.XpExpr).XpLeft), (*XExpr)(_pScan.XpIdxExpr), _iCur) != int32(0) || int32(_pScan.XiEquiv) > int32(1) && (((*XExpr)(_pTerm.XpExpr).Xflags)&uint32(1)) != (0) {
goto _16
}
- if (int32(_pTerm.X4)&i32(2048)) == i32(0) || int32(_pScan.X5) >= i32(11) || int32(store36(&_pX, _sqlite3ExprSkipCollate(tls, (*XExpr)((*XExpr)(_pTerm.X0).X5))).X0) != i32(152) {
+ if (int32(_pTerm.XeOperator)&int32(2048)) == int32(0) || int32(_pScan.XnEquiv) >= int32(11) || int32(store58(&_pX, _sqlite3ExprSkipCollate(tls, (*XExpr)((*XExpr)(_pTerm.XpExpr).XpRight))).Xop) != int32(152) {
goto _19
}
- _5_j = i32(0)
+ _5_j = int32(0)
_20:
- if _5_j >= int32(_pScan.X5) {
+ if _5_j >= int32(_pScan.XnEquiv) {
goto _23
}
- if ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int32)(unsafe.Pointer(&(_pScan.X9))))) + 4*uintptr(_5_j)))) == (_pX.X8)) && (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int16)(unsafe.Pointer(&(_pScan.X10))))) + 2*uintptr(_5_j)))) == int32(_pX.X9)) {
+ if ((*elem8((*int32)(unsafe.Pointer(&_pScan.XaiCur)), uintptr(_5_j))) == _pX.XiTable) && (int32(*elem50((*int16)(unsafe.Pointer(&_pScan.XaiColumn)), uintptr(_5_j))) == int32(_pX.XiColumn)) {
goto _23
}
_5_j += 1
goto _20
_23:
- if _5_j == int32(_pScan.X5) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int32)(unsafe.Pointer(&(_pScan.X9))))) + 4*uintptr(_5_j))) = _pX.X8
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int16)(unsafe.Pointer(&(_pScan.X10))))) + 2*uintptr(_5_j))) = _pX.X9
- *(*uint8)(unsafe.Pointer(&(_pScan.X5))) += 1
+ if _5_j == int32(_pScan.XnEquiv) {
+ *elem8((*int32)(unsafe.Pointer(&_pScan.XaiCur)), uintptr(_5_j)) = _pX.XiTable
+ *elem50((*int16)(unsafe.Pointer(&_pScan.XaiColumn)), uintptr(_5_j)) = _pX.XiColumn
+ _pScan.XnEquiv += 1
}
_19:
- if (uint32(_pTerm.X4) & (_pScan.X7)) == uint32(i32(0)) {
+ if (uint32(_pTerm.XeOperator) & _pScan.XopMask) == (0) {
goto _27
}
- if (_pScan.X2) == nil || (int32(_pTerm.X4)&i32(256)) != i32(0) {
+ if _pScan.XzCollName == nil || (int32(_pTerm.XeOperator)&int32(256)) != int32(0) {
goto _29
}
- _10_pParse = (*XParse)((*XWhereInfo)(_pWC.X0).X0)
- _pX = (*XExpr)(_pTerm.X0)
- if _sqlite3IndexAffinityOk(tls, _pX, _pScan.X4) == 0 {
+ _10_pParse = (*XParse)((*XWhereInfo)(_pWC.XpWInfo).XpParse)
+ _pX = (*XExpr)(_pTerm.XpExpr)
+ if _sqlite3IndexAffinityOk(tls, _pX, _pScan.Xidxaff) == 0 {
goto _8
}
func() {
- if (*XExpr)(_pX.X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130631), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereScanNextØ00__func__Ø000))), unsafe.Pointer(str(104511)))
+ if _pX.XpLeft == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130631), unsafe.Pointer(&_whereScanNextØ00__func__Ø000), unsafe.Pointer(str(104539)))
crt.X__builtin_abort(tls)
}
}()
- _10_pColl = _sqlite3BinaryCompareCollSeq(tls, _10_pParse, (*XExpr)(_pX.X4), (*XExpr)(_pX.X5))
+ _10_pColl = _sqlite3BinaryCompareCollSeq(tls, _10_pParse, (*XExpr)(_pX.XpLeft), (*XExpr)(_pX.XpRight))
if _10_pColl == nil {
- _10_pColl = (*XCollSeq)((*Xsqlite3)(_10_pParse.X0).X2)
+ _10_pColl = (*XCollSeq)((*Xsqlite3)(_10_pParse.Xdb).XpDfltColl)
}
- if _sqlite3StrICmp(tls, _10_pColl.X0, _pScan.X2) != 0 {
+ if _sqlite3StrICmp(tls, _10_pColl.XzName, _pScan.XzCollName) != 0 {
goto _8
}
_29:
- if ((((int32(_pTerm.X4) & i32(130)) != i32(0)) && (int32(store36(&_pX, (*XExpr)((*XExpr)(_pTerm.X0).X5)).X0) == i32(152))) && ((_pX.X8) == (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int32)(unsafe.Pointer(&(_pScan.X9))))) + 4*uintptr(i32(0))))))) && (int32(_pX.X9) == int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[11]int16)(unsafe.Pointer(&(_pScan.X10))))) + 2*uintptr(i32(0)))))) {
+ if ((((int32(_pTerm.XeOperator) & int32(130)) != int32(0)) && (int32(store58(&_pX, (*XExpr)((*XExpr)(_pTerm.XpExpr).XpRight)).Xop) == int32(152))) && (_pX.XiTable == (*elem8((*int32)(unsafe.Pointer(&_pScan.XaiCur)), 0)))) && (int32(_pX.XiColumn) == int32(*elem50((*int16)(unsafe.Pointer(&_pScan.XaiColumn)), 0))) {
goto _8
}
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pScan.X1))))) = _pWC
- *(*int32)(unsafe.Pointer(&(_pScan.X8))) = _k + i32(1)
+ *(**XWhereClause)(unsafe.Pointer(&_pScan.XpWC)) = _pWC
+ _pScan.Xk = _k + int32(1)
return _pTerm
_27:
@@ -83996,17 +85082,17 @@ _8:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _k += 1; return &_pTerm }())) += uintptr(48)
goto _7
_10:
- _pWC = (*XWhereClause)(_pWC.X1)
- _k = i32(0)
+ _pWC = (*XWhereClause)(_pWC.XpOuter)
+ _k = int32(0)
if _pWC != nil {
goto _6
}
- if int32(_pScan.X6) >= int32(_pScan.X5) {
+ if int32(_pScan.XiEquiv) >= int32(_pScan.XnEquiv) {
goto _3
}
- _pWC = (*XWhereClause)(_pScan.X0)
- _k = i32(0)
- *(*uint8)(unsafe.Pointer(&(_pScan.X6))) += 1
+ _pWC = (*XWhereClause)(_pScan.XpOrigWC)
+ _k = int32(0)
+ _pScan.XiEquiv += 1
goto _2
_3:
return nil
@@ -84015,62 +85101,68 @@ _3:
var _whereScanNextØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_whereScanNextØ00__func__Ø000[0], str(104521), 14)
+ crt.Xstrncpy(nil, &_whereScanNextØ00__func__Ø000[0], str(104549), 14)
}
-// pExpr is a comparison expression, eg. '=', '<', IN(...) etc.
-// idx_affinity is the affinity of an indexed column. Return true
-// if the index with affinity idx_affinity may be used to implement
-// the comparison in pExpr.
+// C comment
+// /*
+// ** pExpr is a comparison expression, eg. '=', '<', IN(...) etc.
+// ** idx_affinity is the affinity of an indexed column. Return true
+// ** if the index with affinity idx_affinity may be used to implement
+// ** the comparison in pExpr.
+// */
func _sqlite3IndexAffinityOk(tls *crt.TLS, _pExpr *XExpr, _idx_affinity int8) (r0 int32) {
var _aff int8
_aff = _comparisonAffinity(tls, _pExpr)
switch int32(_aff) {
- case i32(65):
+ case int32(65):
goto _1
- case i32(66):
+ case int32(66):
goto _2
default:
goto _3
}
_1:
- return i32(1)
+ return int32(1)
_2:
- return bool2int(int32(_idx_affinity) == i32(66))
+ return bool2int(int32(_idx_affinity) == int32(66))
_3:
- return bool2int(int32(_idx_affinity) >= i32(67))
+ return bool2int(int32(_idx_affinity) >= int32(67))
}
-// pExpr is a comparison operator. Return the type affinity that should
-// be applied to both operands prior to doing the comparison.
+// C comment
+// /*
+// ** pExpr is a comparison operator. Return the type affinity that should
+// ** be applied to both operands prior to doing the comparison.
+// */
func _comparisonAffinity(tls *crt.TLS, _pExpr *XExpr) (r0 int8) {
var _aff int8
func() {
- if int32(_pExpr.X0) != i32(78) && int32(_pExpr.X0) != i32(74) && int32(_pExpr.X0) != i32(81) && int32(_pExpr.X0) != i32(79) && int32(_pExpr.X0) != i32(82) && int32(_pExpr.X0) != i32(80) && int32(_pExpr.X0) != i32(77) && int32(_pExpr.X0) != i32(72) && int32(_pExpr.X0) != i32(148) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91123), unsafe.Pointer((*int8)(unsafe.Pointer(&_comparisonAffinityØ00__func__Ø000))), unsafe.Pointer(str(104535)))
+ if int32(_pExpr.Xop) != int32(78) && int32(_pExpr.Xop) != int32(74) && int32(_pExpr.Xop) != int32(81) && int32(_pExpr.Xop) != int32(79) && int32(_pExpr.Xop) != int32(82) && int32(_pExpr.Xop) != int32(80) && int32(_pExpr.Xop) != int32(77) && int32(_pExpr.Xop) != int32(72) && int32(_pExpr.Xop) != int32(148) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91123), unsafe.Pointer(&_comparisonAffinityØ00__func__Ø000), unsafe.Pointer(str(104563)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)(_pExpr.X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91126), unsafe.Pointer((*int8)(unsafe.Pointer(&_comparisonAffinityØ00__func__Ø000))), unsafe.Pointer(str(104715)))
+ if _pExpr.XpLeft == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91126), unsafe.Pointer(&_comparisonAffinityØ00__func__Ø000), unsafe.Pointer(str(104743)))
crt.X__builtin_abort(tls)
}
}()
- _aff = _sqlite3ExprAffinity(tls, (*XExpr)(_pExpr.X4))
- if (*XExpr)(_pExpr.X5) != nil {
- _aff = _sqlite3CompareAffinity(tls, (*XExpr)(_pExpr.X5), _aff)
+ _aff = _sqlite3ExprAffinity(tls, (*XExpr)(_pExpr.XpLeft))
+ if _pExpr.XpRight != nil {
+ _aff = _sqlite3CompareAffinity(tls, (*XExpr)(_pExpr.XpRight), _aff)
goto _16
}
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- _aff = _sqlite3CompareAffinity(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0).X2)))))+20*uintptr(i32(0)))).X0), _aff)
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ _aff = _sqlite3CompareAffinity(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XpEList).Xa))), 0).XpExpr), _aff)
goto _16
}
- if int32(_aff) == i32(0) {
- _aff = int8(i32(65))
+ if int32(_aff) == int32(0) {
+ _aff = int8(65)
}
_16:
return _aff
@@ -84079,86 +85171,95 @@ _16:
var _comparisonAffinityØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_comparisonAffinityØ00__func__Ø000[0], str(104728), 19)
+ crt.Xstrncpy(nil, &_comparisonAffinityØ00__func__Ø000[0], str(104756), 19)
}
-// This function searches pList for an entry that matches the iCol-th column
-// of index pIdx.
-//
-// If such an expression is found, its index in pList->a[] is returned. If
-// no expression is found, -1 is returned.
+// C comment
+// /*
+// ** This function searches pList for an entry that matches the iCol-th column
+// ** of index pIdx.
+// **
+// ** If such an expression is found, its index in pList->a[] is returned. If
+// ** no expression is found, -1 is returned.
+// */
func _findIndexCol(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _iBase int32, _pIdx *XIndex, _iCol int32) (r0 int32) {
var _i int32
var _zColl *int8
var _1_p *XExpr
var _2_pColl *XCollSeq
- _zColl = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_iCol)))
- _i = i32(0)
+ _zColl = *elem0(_pIdx.XazColl, uintptr(_iCol))
+ _i = int32(0)
_0:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _3
}
- _1_p = _sqlite3ExprSkipCollate(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_i))).X0))
- if int32(_1_p.X0) != i32(152) || int32(_1_p.X9) != int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_iCol)))) || (_1_p.X8) != _iBase {
+ _1_p = _sqlite3ExprSkipCollate(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XpExpr))
+ if int32(_1_p.Xop) != int32(152) || int32(_1_p.XiColumn) != int32(*elem50(_pIdx.XaiColumn, uintptr(_iCol))) || _1_p.XiTable != _iBase {
goto _6
}
- _2_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_i))).X0))
- if (_2_pColl != nil) && (i32(0) == _sqlite3StrICmp(tls, _2_pColl.X0, _zColl)) {
+ _2_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XpExpr))
+ if (_2_pColl != nil) && (int32(0) == _sqlite3StrICmp(tls, _2_pColl.XzName, _zColl)) {
return _i
}
_6:
_i += 1
goto _0
_3:
- return i32(-1)
+ return int32(-1)
}
-// Return TRUE if the iCol-th column of index pIdx is NOT NULL
+// C comment
+// /*
+// ** Return TRUE if the iCol-th column of index pIdx is NOT NULL
+// */
func _indexColumnNotNull(tls *crt.TLS, _pIdx *XIndex, _iCol int32) (r0 int32) {
var _j int32
func() {
if _pIdx == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130810), unsafe.Pointer((*int8)(unsafe.Pointer(&_indexColumnNotNullØ00__func__Ø000))), unsafe.Pointer(str(42069)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130810), unsafe.Pointer(&_indexColumnNotNullØ00__func__Ø000), unsafe.Pointer(str(42024)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iCol < i32(0) || _iCol >= int32(_pIdx.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130811), unsafe.Pointer((*int8)(unsafe.Pointer(&_indexColumnNotNullØ00__func__Ø000))), unsafe.Pointer(str(104747)))
+ if _iCol < int32(0) || _iCol >= int32(_pIdx.XnColumn) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130811), unsafe.Pointer(&_indexColumnNotNullØ00__func__Ø000), unsafe.Pointer(str(104775)))
crt.X__builtin_abort(tls)
}
}()
- _j = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_iCol))))
- if _j >= i32(0) {
- return int32((*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pIdx.X3).X1) + 16*uintptr(_j))).X3)
+ _j = int32(*elem50(_pIdx.XaiColumn, uintptr(_iCol)))
+ if _j >= int32(0) {
+ return int32(elem41((*XColumn)((*XTable)(_pIdx.XpTable).XaCol), uintptr(_j)).XnotNull)
}
- if _j == i32(-1) {
- return i32(1)
+ if _j == int32(-1) {
+ return int32(1)
}
func() {
- if _j != i32(-2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130818), unsafe.Pointer((*int8)(unsafe.Pointer(&_indexColumnNotNullØ00__func__Ø000))), unsafe.Pointer(str(104777)))
+ if _j != int32(-2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130818), unsafe.Pointer(&_indexColumnNotNullØ00__func__Ø000), unsafe.Pointer(str(104805)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
}
var _indexColumnNotNullØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_indexColumnNotNullØ00__func__Ø000[0], str(104785), 19)
+ crt.Xstrncpy(nil, &_indexColumnNotNullØ00__func__Ø000[0], str(104813), 19)
}
-// Most queries use only a single table (they are not joins) and have
-// simple == constraints against indexed fields. This routine attempts
-// to plan those simple cases using much less ceremony than the
-// general-purpose query planner, and thereby yield faster sqlite3_prepare()
-// times for the common case.
-//
-// Return non-zero on success, if this query can be handled by this
-// no-frills query planner. Return zero if this query needs the
-// general-purpose query planner.
+// C comment
+// /*
+// ** Most queries use only a single table (they are not joins) and have
+// ** simple == constraints against indexed fields. This routine attempts
+// ** to plan those simple cases using much less ceremony than the
+// ** general-purpose query planner, and thereby yield faster sqlite3_prepare()
+// ** times for the common case.
+// **
+// ** Return non-zero on success, if this query can be handled by this
+// ** no-frills query planner. Return zero if this query needs the
+// ** general-purpose query planner.
+// */
func _whereShortCut(tls *crt.TLS, _pBuilder *XWhereLoopBuilder) (r0 int32) {
var _iCur, _j, _3_opMask int32
var _pTab *XTable
@@ -84168,146 +85269,141 @@ func _whereShortCut(tls *crt.TLS, _pBuilder *XWhereLoopBuilder) (r0 int32) {
var _pLoop *XWhereLoop
var _pTerm *XWhereTerm
var _pWC *XWhereClause
- _pWInfo = (*XWhereInfo)(_pBuilder.X0)
- if (int32(_pWInfo.X10) & i32(32)) != 0 {
- return i32(0)
+ _pWInfo = (*XWhereInfo)(_pBuilder.XpWInfo)
+ if (int32(_pWInfo.XwctrlFlags) & int32(32)) != 0 {
+ return int32(0)
}
func() {
- if ((*XSrcList)(_pWInfo.X1).X0) < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134607), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereShortCutØ00__func__Ø000))), unsafe.Pointer(str(104804)))
+ if ((*XSrcList)(_pWInfo.XpTabList).XnSrc) < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134607), unsafe.Pointer(&_whereShortCutØ00__func__Ø000), unsafe.Pointer(str(104832)))
crt.X__builtin_abort(tls)
}
}()
- _pItem = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.X1).X2)))))
- _pTab = (*XTable)(_pItem.X4)
- if (_pTab.X16) != 0 {
- return i32(0)
+ _pItem = (*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.XpTabList).Xa)))
+ _pTab = (*XTable)(_pItem.XpTab)
+ if _pTab.XnModuleArg != 0 {
+ return int32(0)
}
- if ((uint32(((*t28)(unsafe.Pointer(&(_pItem.X9))).X1)>>uint(i32(1))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- return i32(0)
+ if ((uint32((_pItem.Xfg.XnotIndexed)>>1) << 31) >> 31) != 0 {
+ return int32(0)
}
- _iCur = _pItem.X11
- _pWC = (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22)))
- _pLoop = (*XWhereLoop)(_pBuilder.X3)
- *(*uint32)(unsafe.Pointer(&(_pLoop.X9))) = uint32(i32(0))
- *(*uint16)(unsafe.Pointer(&(_pLoop.X11))) = uint16(i32(0))
- _pTerm = _sqlite3WhereFindTerm(tls, _pWC, _iCur, i32(-1), uint64(i32(0)), uint32(i32(130)), nil)
+ _iCur = _pItem.XiCursor
+ _pWC = &_pWInfo.XsWC
+ _pLoop = (*XWhereLoop)(_pBuilder.XpNew)
+ _pLoop.XwsFlags = 0
+ _pLoop.XnSkip = 0
+ _pTerm = _sqlite3WhereFindTerm(tls, _pWC, _iCur, int32(-1), 0, uint32(130), nil)
if _pTerm != nil {
- *(*uint32)(unsafe.Pointer(&(_pLoop.X9))) = uint32(i32(4353))
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(i32(0)))) = _pTerm
- *(*uint16)(unsafe.Pointer(&(_pLoop.X10))) = uint16(i32(1))
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0))) = uint16(i32(1))
- *(*int16)(unsafe.Pointer(&(_pLoop.X6))) = int16(i32(33))
+ _pLoop.XwsFlags = uint32(4353)
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), 0) = _pTerm
+ _pLoop.XnLTerm = uint16(1)
+ (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq = uint16(1)
+ _pLoop.XrRun = int16(33)
goto _6
}
- _pIdx = (*XIndex)(_pTab.X2)
+ _pIdx = (*XIndex)(_pTab.XpIndex)
_7:
if _pIdx == nil {
goto _10
}
func() {
- if (**XWhereTerm)(unsafe.Pointer((*[3]unsafe.Pointer)(unsafe.Pointer(&(_pLoop.X15))))) != (**XWhereTerm)(unsafe.Pointer(_pLoop.X13)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134629), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereShortCutØ00__func__Ø000))), unsafe.Pointer(str(104830)))
+ if (**XWhereTerm)(unsafe.Pointer(&_pLoop.XaLTermSpace)) != (**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134629), unsafe.Pointer(&_whereShortCutØ00__func__Ø000), unsafe.Pointer(str(104858)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_pIdx.X15) == i32(0)) || ((*XExpr)(_pIdx.X9) != nil)) || (int32(_pIdx.X13) > i32(3)) {
+ if ((int32(_pIdx.XonError) == int32(0)) || ((*XExpr)(_pIdx.XpPartIdxWhere) != nil)) || (int32(_pIdx.XnKeyCol) > int32(3)) {
goto _8
}
_3_opMask = func() int32 {
- if ((uint32((_pIdx.X16)>>uint(i32(3))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- return i32(130)
+ if ((uint32(_pIdx.XidxType>>3) << 31) >> 31) != 0 {
+ return int32(130)
}
- return i32(2)
+ return int32(2)
}()
- _j = i32(0)
+ _j = int32(0)
_18:
- if _j >= int32(_pIdx.X13) {
+ if _j >= int32(_pIdx.XnKeyCol) {
goto _21
}
- _pTerm = _sqlite3WhereFindTerm(tls, _pWC, _iCur, _j, uint64(i32(0)), uint32(_3_opMask), _pIdx)
+ _pTerm = _sqlite3WhereFindTerm(tls, _pWC, _iCur, _j, 0, uint32(_3_opMask), _pIdx)
if _pTerm == nil {
goto _21
}
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_j))) = _pTerm
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_j)) = _pTerm
_j += 1
goto _18
_21:
- if _j != int32(_pIdx.X13) {
+ if _j != int32(_pIdx.XnKeyCol) {
goto _8
}
- *(*uint32)(unsafe.Pointer(&(_pLoop.X9))) = uint32(i32(4609))
- if (((uint32((_pIdx.X16)>>uint(i32(5))) << uint(i32(31))) >> uint(i32(31))) != 0) || (((_pItem.X14) & (^_columnsInIndex(tls, _pIdx))) == uint64(i32(0))) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pLoop.X9)))
- *p = (*p) | uint32(i32(64))
- sink5(*p)
- }
+ _pLoop.XwsFlags = uint32(4609)
+ if (((uint32(_pIdx.XidxType>>5) << 31) >> 31) != 0) || ((_pItem.XcolUsed & (^_columnsInIndex(tls, _pIdx))) == (0)) {
+ _pLoop.XwsFlags |= uint32(64)
}
- *(*uint16)(unsafe.Pointer(&(_pLoop.X10))) = uint16(_j)
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0))) = uint16(_j)
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4))))) = _pIdx
- *(*int16)(unsafe.Pointer(&(_pLoop.X6))) = int16(i32(39))
+ _pLoop.XnLTerm = uint16(_j)
+ (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq = uint16(_j)
+ *(**XIndex)(unsafe.Pointer(&((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex))) = _pIdx
+ _pLoop.XrRun = int16(39)
goto _10
_8:
- _pIdx = (*XIndex)(_pIdx.X5)
+ _pIdx = (*XIndex)(_pIdx.XpNext)
goto _7
_10:
_6:
- if (_pLoop.X9) == 0 {
+ if _pLoop.XwsFlags == 0 {
goto _26
}
- *(*int16)(unsafe.Pointer(&(_pLoop.X7))) = i16(1)
- *(**XWhereLoop)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(i32(0)))).X18))))) = _pLoop
+ _pLoop.XnOut = int16(1)
+ *(**XWhereLoop)(unsafe.Pointer(&(elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), 0).XpWLoop))) = _pLoop
func() {
- if ((*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))).X0) != i32(1) || _iCur != (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[64]int32)(unsafe.Pointer(&((*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))).X1))))) + 4*uintptr(i32(0))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134657), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereShortCutØ00__func__Ø000))), unsafe.Pointer(str(104864)))
+ if (_pWInfo.XsMaskSet.Xn) != int32(1) || _iCur != (*elem8((*int32)(unsafe.Pointer(&(_pWInfo.XsMaskSet.Xix))), 0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134657), unsafe.Pointer(&_whereShortCutØ00__func__Ø000), unsafe.Pointer(str(104892)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint64)(unsafe.Pointer(&(_pLoop.X1))) = uint64(i32(1))
- *(*int32)(unsafe.Pointer(&((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(i32(0)))).X1))) = _iCur
- *(*int16)(unsafe.Pointer(&(_pWInfo.X21))) = int16(i32(1))
- if (*XExprList)(_pWInfo.X2) != nil {
- *(*int8)(unsafe.Pointer(&(_pWInfo.X12))) = int8((*XExprList)(_pWInfo.X2).X0)
+ _pLoop.XmaskSelf = uint64(1)
+ elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), 0).XiTabCur = _iCur
+ _pWInfo.XnRowOut = int16(1)
+ if _pWInfo.XpOrderBy != nil {
+ _pWInfo.XnOBSat = int8((*XExprList)(_pWInfo.XpOrderBy).XnExpr)
}
- if (int32(_pWInfo.X10) & i32(256)) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X16))) = uint8(i32(1))
+ if (int32(_pWInfo.XwctrlFlags) & int32(256)) != 0 {
+ _pWInfo.XeDistinct = uint8(1)
}
- *(*int8)(unsafe.Pointer(&(_pLoop.X2))) = int8(i32(48))
- return i32(1)
+ _pLoop.XcId = int8(48)
+ return int32(1)
_26:
- return i32(0)
+ return int32(0)
}
var _whereShortCutØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_whereShortCutØ00__func__Ø000[0], str(104918), 14)
+ crt.Xstrncpy(nil, &_whereShortCutØ00__func__Ø000[0], str(104946), 14)
}
-// Return a bitmask where 1s indicate that the corresponding column of
-// the table is used by an index. Only the first 63 columns are considered.
+// C comment
+// /*
+// ** Return a bitmask where 1s indicate that the corresponding column of
+// ** the table is used by an index. Only the first 63 columns are considered.
+// */
func _columnsInIndex(tls *crt.TLS, _pIdx *XIndex) (r0 uint64) {
var _j, _1_x int32
var _m uint64
- _m = u64(0)
- _j = int32(_pIdx.X14) - i32(1)
+ _m = uint64(0)
+ _j = int32(_pIdx.XnColumn) - int32(1)
_0:
- if _j < i32(0) {
+ if _j < int32(0) {
goto _3
}
- _1_x = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_j))))
- if _1_x < i32(0) {
+ _1_x = int32(*elem50(_pIdx.XaiColumn, uintptr(_j)))
+ if _1_x < int32(0) {
goto _4
}
- if _1_x < i32(63) {
- {
- p := &_m
- *p = (*p) | (u64(1) << uint(_1_x))
- sink17(*p)
- }
+ if _1_x < int32(63) {
+ _m |= uint64(1) << uint(_1_x)
}
_4:
_j -= 1
@@ -84316,7 +85412,10 @@ _3:
return _m
}
-// Add all WhereLoop objects for all tables
+// C comment
+// /*
+// ** Add all WhereLoop objects for all tables
+// */
func _whereLoopAddAll(tls *crt.TLS, _pBuilder *XWhereLoopBuilder) (r0 int32) {
var _iTab, _rc int32
var _mPrereq, _mPrior, _1_mUnusable uint64
@@ -84326,42 +85425,38 @@ func _whereLoopAddAll(tls *crt.TLS, _pBuilder *XWhereLoopBuilder) (r0 int32) {
var _pItem, _pEnd, _3_p *TSrcList_item
var _pWInfo *XWhereInfo
var _pNew *XWhereLoop
- _pWInfo = (*XWhereInfo)(_pBuilder.X0)
- _mPrereq = u64(0)
- _mPrior = u64(0)
- _pTabList = (*XSrcList)(_pWInfo.X1)
- _pEnd = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(_pWInfo.X11)))
- _db = (*Xsqlite3)((*XParse)(_pWInfo.X0).X0)
- _rc = i32(0)
- _priorJointype = u8(0)
- _pNew = (*XWhereLoop)(_pBuilder.X3)
+ _pWInfo = (*XWhereInfo)(_pBuilder.XpWInfo)
+ _mPrereq = uint64(0)
+ _mPrior = uint64(0)
+ _pTabList = (*XSrcList)(_pWInfo.XpTabList)
+ _pEnd = elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_pWInfo.XnLevel))
+ _db = (*Xsqlite3)((*XParse)(_pWInfo.XpParse).Xdb)
+ _rc = int32(0)
+ _priorJointype = uint8(0)
+ _pNew = (*XWhereLoop)(_pBuilder.XpNew)
_whereLoopInit(tls, _pNew)
- *func() **TSrcList_item { _iTab = i32(0); return &_pItem }() = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))
+ *func() **TSrcList_item { _iTab = int32(0); return &_pItem }() = (*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa))
_0:
- if uintptr(unsafe.Pointer(_pItem)) >= uintptr(unsafe.Pointer(_pEnd)) {
+ if crt.P2U(unsafe.Pointer(_pItem)) >= crt.P2U(unsafe.Pointer(_pEnd)) {
goto _3
}
- _1_mUnusable = uint64(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pNew.X3))) = uint8(_iTab)
- *(*uint64)(unsafe.Pointer(&(_pNew.X1))) = _sqlite3WhereGetMask(tls, (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))), _pItem.X11)
- if ((int32((*t28)(unsafe.Pointer(&(_pItem.X9))).X0) | int32(_priorJointype)) & i32(10)) != i32(0) {
+ _1_mUnusable = 0
+ _pNew.XiTab = uint8(_iTab)
+ _pNew.XmaskSelf = _sqlite3WhereGetMask(tls, &_pWInfo.XsMaskSet, _pItem.XiCursor)
+ if ((int32(_pItem.Xfg.Xjointype) | int32(_priorJointype)) & int32(10)) != int32(0) {
_mPrereq = _mPrior
}
- _priorJointype = (*t28)(unsafe.Pointer(&(_pItem.X9))).X0
- if ((*XTable)(_pItem.X4).X16) == 0 {
+ _priorJointype = _pItem.Xfg.Xjointype
+ if ((*XTable)(_pItem.XpTab).XnModuleArg) == 0 {
goto _5
}
- _3_p = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pItem)) + 68*uintptr(i32(1))))
+ _3_p = elem6(_pItem, uintptr(1))
_6:
- if uintptr(unsafe.Pointer(_3_p)) >= uintptr(unsafe.Pointer(_pEnd)) {
+ if crt.P2U(unsafe.Pointer(_3_p)) >= crt.P2U(unsafe.Pointer(_pEnd)) {
goto _9
}
- if (_1_mUnusable != 0) || (int32((*t28)(unsafe.Pointer(&(_3_p.X9))).X0)&i32(10)) != 0 {
- {
- p := &_1_mUnusable
- *p = (*p) | _sqlite3WhereGetMask(tls, (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))), _3_p.X11)
- sink17(*p)
- }
+ if (_1_mUnusable != 0) || (int32(_3_p.Xfg.Xjointype)&int32(10)) != 0 {
+ _1_mUnusable |= _sqlite3WhereGetMask(tls, &_pWInfo.XsMaskSet, _3_p.XiCursor)
}
*(*uintptr)(unsafe.Pointer(&_3_p)) += uintptr(68)
goto _6
@@ -84371,15 +85466,11 @@ _9:
_5:
_rc = _whereLoopAddBtree(tls, _pBuilder, _mPrereq)
_12:
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _whereLoopAddOr(tls, _pBuilder, _mPrereq, _1_mUnusable)
}
- {
- p := &_mPrior
- *p = (*p) | (_pNew.X1)
- sink17(*p)
- }
- if _rc != 0 || ((_db.X17) != 0) {
+ _mPrior |= _pNew.XmaskSelf
+ if _rc != 0 || (_db.XmallocFailed != 0) {
goto _3
}
*(*uintptr)(unsafe.Pointer(func() **TSrcList_item { _iTab += 1; return &_pItem }())) += uintptr(68)
@@ -84389,29 +85480,32 @@ _3:
return _rc
}
-// Add all WhereLoop objects for a table of the join identified by
-// pBuilder->pNew->iTab. That table is guaranteed to be a virtual table.
-//
-// If there are no LEFT or CROSS JOIN joins in the query, both mPrereq and
-// mUnusable are set to 0. Otherwise, mPrereq is a mask of all FROM clause
-// entries that occur before the virtual table in the FROM clause and are
-// separated from it by at least one LEFT or CROSS JOIN. Similarly, the
-// mUnusable mask contains all FROM clause entries that occur after the
-// virtual table and are separated from it by at least one LEFT or
-// CROSS JOIN.
-//
-// For example, if the query were:
-//
-// ... FROM t1, t2 LEFT JOIN t3, t4, vt CROSS JOIN t5, t6;
-//
-// then mPrereq corresponds to (t1, t2) and mUnusable to (t5, t6).
-//
-// All the tables in mPrereq must be scanned before the current virtual
-// table. So any terms for which all prerequisites are satisfied by
-// mPrereq may be specified as "usable" in all calls to xBestIndex.
-// Conversely, all tables in mUnusable must be scanned after the current
-// virtual table, so any terms for which the prerequisites overlap with
-// mUnusable should always be configured as "not-usable" for xBestIndex.
+// C comment
+// /*
+// ** Add all WhereLoop objects for a table of the join identified by
+// ** pBuilder->pNew->iTab. That table is guaranteed to be a virtual table.
+// **
+// ** If there are no LEFT or CROSS JOIN joins in the query, both mPrereq and
+// ** mUnusable are set to 0. Otherwise, mPrereq is a mask of all FROM clause
+// ** entries that occur before the virtual table in the FROM clause and are
+// ** separated from it by at least one LEFT or CROSS JOIN. Similarly, the
+// ** mUnusable mask contains all FROM clause entries that occur after the
+// ** virtual table and are separated from it by at least one LEFT or
+// ** CROSS JOIN.
+// **
+// ** For example, if the query were:
+// **
+// ** ... FROM t1, t2 LEFT JOIN t3, t4, vt CROSS JOIN t5, t6;
+// **
+// ** then mPrereq corresponds to (t1, t2) and mUnusable to (t5, t6).
+// **
+// ** All the tables in mPrereq must be scanned before the current virtual
+// ** table. So any terms for which all prerequisites are satisfied by
+// ** mPrereq may be specified as "usable" in all calls to xBestIndex.
+// ** Conversely, all tables in mUnusable must be scanned after the current
+// ** virtual table, so any terms for which the prerequisites overlap with
+// ** mUnusable should always be configured as "not-usable" for xBestIndex.
+// */
func _whereLoopAddVirtual(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _mPrereq uint64, _mUnusable uint64) (r0 int32) {
var _rc, _nConstraint, _bIn, _2_seenZero, _2_seenZeroNoIN, _5_i int32
var _mBest, _2_mPrev, _2_mBestNoIn, _5_mNext, _6_mThis uint64
@@ -84422,77 +85516,77 @@ func _whereLoopAddVirtual(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _mPrereq u
var _p *Xsqlite3_index_info
var _pNew *XWhereLoop
var _pWC *XWhereClause
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (_mPrereq & _mUnusable) != uint64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133550), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualØ00__func__Ø000))), unsafe.Pointer(str(104932)))
+ if (_mPrereq & _mUnusable) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133550), unsafe.Pointer(&_whereLoopAddVirtualØ00__func__Ø000), unsafe.Pointer(str(104960)))
crt.X__builtin_abort(tls)
}
}()
- _pWInfo = (*XWhereInfo)(_pBuilder.X0)
- _pParse = (*XParse)(_pWInfo.X0)
- _pWC = (*XWhereClause)(_pBuilder.X1)
- _pNew = (*XWhereLoop)(_pBuilder.X3)
- _pSrc = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.X1).X2))))) + 68*uintptr(_pNew.X3)))
+ _pWInfo = (*XWhereInfo)(_pBuilder.XpWInfo)
+ _pParse = (*XParse)(_pWInfo.XpParse)
+ _pWC = (*XWhereClause)(_pBuilder.XpWC)
+ _pNew = (*XWhereLoop)(_pBuilder.XpNew)
+ _pSrc = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.XpTabList).Xa))), uintptr(_pNew.XiTab))
func() {
- if ((*XTable)(_pSrc.X4).X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133556), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualØ00__func__Ø000))), unsafe.Pointer(str(104957)))
+ if ((*XTable)(_pSrc.XpTab).XnModuleArg) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133556), unsafe.Pointer(&_whereLoopAddVirtualØ00__func__Ø000), unsafe.Pointer(str(104985)))
crt.X__builtin_abort(tls)
}
}()
- _p = _allocateIndexInfo(tls, _pParse, _pWC, _mUnusable, _pSrc, (*XExprList)(_pBuilder.X2), &_mNoOmit)
+ _p = _allocateIndexInfo(tls, _pParse, _pWC, _mUnusable, _pSrc, (*XExprList)(_pBuilder.XpOrderBy), &_mNoOmit)
if _p == nil {
- return _sqlite3NomemError(tls, i32(133559))
- }
- *(*int16)(unsafe.Pointer(&(_pNew.X5))) = int16(i32(0))
- *(*uint32)(unsafe.Pointer(&(_pNew.X9))) = uint32(i32(1024))
- *(*uint16)(unsafe.Pointer(&(_pNew.X10))) = uint16(i32(0))
- *(*uint8)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1))) = uint8(i32(0))
- _nConstraint = _p.X0
- if _whereLoopResize(tls, (*Xsqlite3)(_pParse.X0), _pNew, _nConstraint) != 0 {
- _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_p))
- return _sqlite3NomemError(tls, i32(133567))
- }
- _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, u64(18446744073709551615), uint16(i32(0)), _p, _mNoOmit, &_bIn)
- if _rc != i32(0) || store17(&_mBest, (_pNew.X0)&(^_mPrereq)) == uint64(i32(0)) {
+ return _sqlite3NomemError(tls, int32(133559))
+ }
+ _pNew.XrSetup = 0
+ _pNew.XwsFlags = uint32(1024)
+ _pNew.XnLTerm = 0
+ (*t105)(unsafe.Pointer(&_pNew.Xu)).XneedFree = 0
+ _nConstraint = _p.XnConstraint
+ if _whereLoopResize(tls, (*Xsqlite3)(_pParse.Xdb), _pNew, _nConstraint) != 0 {
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_p))
+ return _sqlite3NomemError(tls, int32(133567))
+ }
+ _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, uint64(18446744073709551615), 0, _p, _mNoOmit, &_bIn)
+ if _rc != int32(0) || store85(&_mBest, _pNew.Xprereq&(^_mPrereq)) == (0) {
goto _7
}
- _2_seenZero = i32(0)
- _2_seenZeroNoIN = i32(0)
- _2_mPrev = u64(0)
- _2_mBestNoIn = u64(0)
+ _2_seenZero = int32(0)
+ _2_seenZeroNoIN = int32(0)
+ _2_mPrev = uint64(0)
+ _2_mBestNoIn = uint64(0)
if _bIn == 0 {
goto _8
}
- _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, u64(18446744073709551615), uint16(i32(1)), _p, _mNoOmit, &_bIn)
+ _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, uint64(18446744073709551615), uint16(1), _p, _mNoOmit, &_bIn)
func() {
- if _bIn != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133591), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualØ00__func__Ø000))), unsafe.Pointer(str(104979)))
+ if _bIn != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133591), unsafe.Pointer(&_whereLoopAddVirtualØ00__func__Ø000), unsafe.Pointer(str(105007)))
crt.X__builtin_abort(tls)
}
}()
- _2_mBestNoIn = (_pNew.X0) & (^_mPrereq)
- if _2_mBestNoIn == uint64(i32(0)) {
- _2_seenZero = i32(1)
- _2_seenZeroNoIN = i32(1)
+ _2_mBestNoIn = _pNew.Xprereq & (^_mPrereq)
+ if _2_mBestNoIn == (0) {
+ _2_seenZero = int32(1)
+ _2_seenZeroNoIN = int32(1)
}
_8:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _13
}
- _5_mNext = u64(18446744073709551615)
+ _5_mNext = uint64(18446744073709551615)
func() {
- if _5_mNext <= uint64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133604), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualØ00__func__Ø000))), unsafe.Pointer(str(104986)))
+ if _5_mNext <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133604), unsafe.Pointer(&_whereLoopAddVirtualØ00__func__Ø000), unsafe.Pointer(str(105014)))
crt.X__builtin_abort(tls)
}
}()
- _5_i = i32(0)
+ _5_i = int32(0)
_16:
if _5_i >= _nConstraint {
goto _19
}
- _6_mThis = ((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr((*Tsqlite3_index_constraint)(unsafe.Pointer(uintptr(_p.X1)+12*uintptr(_5_i))).X3))).X11) & (^_mPrereq)
+ _6_mThis = (elem100((*XWhereTerm)(_pWC.Xa), uintptr(elem106((*Tsqlite3_index_constraint)(_p.XaConstraint), uintptr(_5_i)).XiTermOffset)).XprereqRight) & (^_mPrereq)
if (_6_mThis > _2_mPrev) && (_6_mThis < _5_mNext) {
_5_mNext = _6_mThis
}
@@ -84500,51 +85594,54 @@ _16:
goto _16
_19:
_2_mPrev = _5_mNext
- if _5_mNext == u64(18446744073709551615) {
+ if _5_mNext == uint64(18446744073709551615) {
goto _13
}
if (_5_mNext == _mBest) || (_5_mNext == _2_mBestNoIn) {
goto _8
}
- _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, _5_mNext|_mPrereq, uint16(i32(0)), _p, _mNoOmit, &_bIn)
- if (_pNew.X0) != _mPrereq {
+ _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, _5_mNext|_mPrereq, 0, _p, _mNoOmit, &_bIn)
+ if _pNew.Xprereq != _mPrereq {
goto _25
}
- _2_seenZero = i32(1)
- if _bIn == i32(0) {
- _2_seenZeroNoIN = i32(1)
+ _2_seenZero = int32(1)
+ if _bIn == int32(0) {
+ _2_seenZeroNoIN = int32(1)
}
_25:
goto _8
_13:
- if _rc != i32(0) || _2_seenZero != i32(0) {
+ if _rc != int32(0) || _2_seenZero != int32(0) {
goto _28
}
- _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, _mPrereq, uint16(i32(0)), _p, _mNoOmit, &_bIn)
- if _bIn == i32(0) {
- _2_seenZeroNoIN = i32(1)
+ _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, _mPrereq, 0, _p, _mNoOmit, &_bIn)
+ if _bIn == int32(0) {
+ _2_seenZeroNoIN = int32(1)
}
_28:
- if (_rc == i32(0)) && (_2_seenZeroNoIN == i32(0)) {
- _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, _mPrereq, uint16(i32(1)), _p, _mNoOmit, &_bIn)
+ if (_rc == int32(0)) && (_2_seenZeroNoIN == int32(0)) {
+ _rc = _whereLoopAddVirtualOne(tls, _pBuilder, _mPrereq, _mPrereq, uint16(1), _p, _mNoOmit, &_bIn)
}
_7:
- if (_p.X7) != 0 {
- Xsqlite3_free(tls, (unsafe.Pointer)(_p.X6))
+ if _p.XneedToFreeIdxStr != 0 {
+ Xsqlite3_free(tls, unsafe.Pointer(_p.XidxStr))
}
- _sqlite3DbFreeNN(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_p))
+ _sqlite3DbFreeNN(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_p))
return _rc
}
var _whereLoopAddVirtualØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_whereLoopAddVirtualØ00__func__Ø000[0], str(104994), 20)
+ crt.Xstrncpy(nil, &_whereLoopAddVirtualØ00__func__Ø000[0], str(105022), 20)
}
-// Allocate and populate an sqlite3_index_info structure. It is the
-// responsibility of the caller to eventually release the structure
-// by passing the pointer returned by this function to sqlite3_free().
+// C comment
+// /*
+// ** Allocate and populate an sqlite3_index_info structure. It is the
+// ** responsibility of the caller to eventually release the structure
+// ** by passing the pointer returned by this function to sqlite3_free().
+// */
func _allocateIndexInfo(tls *crt.TLS, _pParse *XParse, _pWC *XWhereClause, _mUnusable uint64, _pSrc *TSrcList_item, _pOrderBy *XExprList, _pmNoOmit *uint16) (r0 *Xsqlite3_index_info) {
var _i, _j, _nTerm, _nOrderBy, _2_n int32
var _mNoOmit uint16
@@ -84552,35 +85649,36 @@ func _allocateIndexInfo(tls *crt.TLS, _pParse *XParse, _pWC *XWhereClause, _mUnu
var _3_pExpr, _9_pExpr *XExpr
var _pIdxInfo *Xsqlite3_index_info
var _pIdxCons *Tsqlite3_index_constraint
- var _pIdxOrderBy, _pUsage *Tsqlite3_index_orderby
+ var _pUsage *Tsqlite3_index_constraint_usage
var _pTerm *XWhereTerm
- _mNoOmit = u16(0)
- *func() **XWhereTerm { _i = store1(&_nTerm, i32(0)); return &_pTerm }() = (*XWhereTerm)(_pWC.X5)
+ var _pIdxOrderBy *Tsqlite3_index_orderby
+ _mNoOmit = uint16(0)
+ *func() **XWhereTerm { _i = store2(&_nTerm, int32(0)); return &_pTerm }() = (*XWhereTerm)(_pWC.Xa)
_0:
- if _i >= (_pWC.X3) {
+ if _i >= _pWC.XnTerm {
goto _3
}
- if (_pTerm.X8) != (_pSrc.X11) {
+ if _pTerm.XleftCursor != _pSrc.XiCursor {
goto _1
}
- if ((_pTerm.X11) & _mUnusable) != 0 {
+ if (_pTerm.XprereqRight & _mUnusable) != 0 {
goto _1
}
func() {
- if ((int32(_pTerm.X4) & i32(-2049)) & ((int32(_pTerm.X4) & i32(-2049)) - i32(1))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131246), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000))), unsafe.Pointer(str(105014)))
+ if ((int32(_pTerm.XeOperator) & int32(-2049)) & ((int32(_pTerm.XeOperator) & int32(-2049)) - int32(1))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131246), unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000), unsafe.Pointer(str(105042)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pTerm.X4) & i32(-2433)) == i32(0) {
+ if (int32(_pTerm.XeOperator) & int32(-2433)) == int32(0) {
goto _1
}
- if (int32(_pTerm.X3) & i32(0)) != 0 {
+ if (int32(_pTerm.XwtFlags) & int32(0)) != 0 {
goto _1
}
func() {
- if (*(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))) < i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131253), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000))), unsafe.Pointer(str(105057)))
+ if (*(*int32)(unsafe.Pointer(&_pTerm.Xu))) < int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131253), unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000), unsafe.Pointer(str(105085)))
crt.X__builtin_abort(tls)
}
}()
@@ -84589,18 +85687,18 @@ _1:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _i += 1; return &_pTerm }())) += uintptr(48)
goto _0
_3:
- _nOrderBy = i32(0)
+ _nOrderBy = int32(0)
if _pOrderBy == nil {
goto _12
}
- _2_n = _pOrderBy.X0
- _i = i32(0)
+ _2_n = _pOrderBy.XnExpr
+ _i = int32(0)
_13:
if _i >= _2_n {
goto _16
}
- _3_pExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2))))) + 20*uintptr(_i))).X0)
- if (int32(_3_pExpr.X0) != i32(152)) || ((_3_pExpr.X8) != (_pSrc.X11)) {
+ _3_pExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XpExpr)
+ if (int32(_3_pExpr.Xop) != int32(152)) || (_3_pExpr.XiTable != _pSrc.XiCursor) {
goto _16
}
_i += 1
@@ -84610,85 +85708,79 @@ _16:
_nOrderBy = _2_n
}
_12:
- _pIdxInfo = (*Xsqlite3_index_info)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.X0), uint64((u32(64)+(u32(20)*uint32(_nTerm)))+(u32(8)*uint32(_nOrderBy)))))
+ _pIdxInfo = (*Xsqlite3_index_info)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.Xdb), uint64((uint32(64)+(uint32(20)*uint32(_nTerm)))+(uint32(8)*uint32(_nOrderBy)))))
if _pIdxInfo == nil {
- _sqlite3ErrorMsg(tls, _pParse, str(59419))
+ _sqlite3ErrorMsg(tls, _pParse, str(59395))
return nil
}
- _pIdxCons = (*Tsqlite3_index_constraint)(unsafe.Pointer((*Xsqlite3_index_info)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxInfo)) + 64*uintptr(i32(1))))))
- _pIdxOrderBy = (*Tsqlite3_index_orderby)(unsafe.Pointer((*Tsqlite3_index_constraint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxCons)) + 12*uintptr(_nTerm)))))
- _pUsage = (*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxOrderBy)) + 8*uintptr(_nOrderBy)))
- *(*int32)(unsafe.Pointer(&(_pIdxInfo.X0))) = _nTerm
- *(*int32)(unsafe.Pointer(&(_pIdxInfo.X2))) = _nOrderBy
- *(**Tsqlite3_index_constraint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIdxInfo.X1))))) = _pIdxCons
- *(**Tsqlite3_index_orderby)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIdxInfo.X3))))) = _pIdxOrderBy
- *(**Tsqlite3_index_orderby)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIdxInfo.X4))))) = _pUsage
- *func() **XWhereTerm { _i = store1(&_j, i32(0)); return &_pTerm }() = (*XWhereTerm)(_pWC.X5)
+ _pIdxCons = (*Tsqlite3_index_constraint)(unsafe.Pointer(elem107(_pIdxInfo, uintptr(1))))
+ _pIdxOrderBy = (*Tsqlite3_index_orderby)(unsafe.Pointer(elem106(_pIdxCons, uintptr(_nTerm))))
+ _pUsage = (*Tsqlite3_index_constraint_usage)(unsafe.Pointer(elem108(_pIdxOrderBy, uintptr(_nOrderBy))))
+ _pIdxInfo.XnConstraint = _nTerm
+ _pIdxInfo.XnOrderBy = _nOrderBy
+ *(**Tsqlite3_index_constraint)(unsafe.Pointer(&_pIdxInfo.XaConstraint)) = _pIdxCons
+ *(**Tsqlite3_index_orderby)(unsafe.Pointer(&_pIdxInfo.XaOrderBy)) = _pIdxOrderBy
+ *(**Tsqlite3_index_constraint_usage)(unsafe.Pointer(&_pIdxInfo.XaConstraintUsage)) = _pUsage
+ *func() **XWhereTerm { _i = store2(&_j, int32(0)); return &_pTerm }() = (*XWhereTerm)(_pWC.Xa)
_21:
- if _i >= (_pWC.X3) {
+ if _i >= _pWC.XnTerm {
goto _24
}
- if (_pTerm.X8) != (_pSrc.X11) {
+ if _pTerm.XleftCursor != _pSrc.XiCursor {
goto _22
}
- if ((_pTerm.X11) & _mUnusable) != 0 {
+ if (_pTerm.XprereqRight & _mUnusable) != 0 {
goto _22
}
func() {
- if ((int32(_pTerm.X4) & i32(-2049)) & ((int32(_pTerm.X4) & i32(-2049)) - i32(1))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131302), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000))), unsafe.Pointer(str(105014)))
+ if ((int32(_pTerm.XeOperator) & int32(-2049)) & ((int32(_pTerm.XeOperator) & int32(-2049)) - int32(1))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131302), unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000), unsafe.Pointer(str(105042)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pTerm.X4) & i32(-2433)) == i32(0) {
+ if (int32(_pTerm.XeOperator) & int32(-2433)) == int32(0) {
goto _22
}
- if (int32(_pTerm.X3) & i32(0)) != 0 {
+ if (int32(_pTerm.XwtFlags) & int32(0)) != 0 {
goto _22
}
func() {
- if (*(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))) < i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131309), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000))), unsafe.Pointer(str(105057)))
+ if (*(*int32)(unsafe.Pointer(&_pTerm.Xu))) < int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131309), unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000), unsafe.Pointer(str(105085)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&((*Tsqlite3_index_constraint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxCons)) + 12*uintptr(_j))).X0))) = *(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))
- *(*int32)(unsafe.Pointer(&((*Tsqlite3_index_constraint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxCons)) + 12*uintptr(_j))).X3))) = _i
- _6_op = uint8(int32(uint8(_pTerm.X4)) & i32(8191))
- if int32(_6_op) == i32(1) {
- _6_op = uint8(i32(2))
+ elem106(_pIdxCons, uintptr(_j)).XiColumn = *(*int32)(unsafe.Pointer(&_pTerm.Xu))
+ elem106(_pIdxCons, uintptr(_j)).XiTermOffset = _i
+ _6_op = uint8(int32(uint8(_pTerm.XeOperator)) & int32(8191))
+ if int32(_6_op) == int32(1) {
+ _6_op = uint8(2)
}
- if int32(_6_op) == i32(64) {
- _6_op = _pTerm.X6
+ if int32(_6_op) == int32(64) {
+ _6_op = _pTerm.XeMatchOp
}
- *(*uint8)(unsafe.Pointer(&((*Tsqlite3_index_constraint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxCons)) + 12*uintptr(_j))).X1))) = _6_op
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- i32(0)
+ elem106(_pIdxCons, uintptr(_j)).Xop = _6_op
+
func() {
- if (int32(_pTerm.X4) & i32(127)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131327), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000))), unsafe.Pointer(str(105083)))
+ if (int32(_pTerm.XeOperator) & int32(127)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131327), unsafe.Pointer(&_allocateIndexInfoØ00__func__Ø000), unsafe.Pointer(str(105111)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_6_op)&i32(60)) == 0 || _sqlite3ExprIsVector(tls, (*XExpr)((*XExpr)(_pTerm.X0).X5)) == 0 {
+ if (int32(_6_op)&int32(60)) == 0 || _sqlite3ExprIsVector(tls, (*XExpr)((*XExpr)(_pTerm.XpExpr).XpRight)) == 0 {
goto _38
}
- if _i < i32(16) {
+ if _i < int32(16) {
{
p := &_mNoOmit
- *p = uint16(int32(*p) | (i32(1) << uint(_i)))
- sink14(*p)
+ *p = uint16(int32(*p) | (int32(1) << uint(_i)))
}
}
- if int32(_6_op) == i32(16) {
- *(*uint8)(unsafe.Pointer(&((*Tsqlite3_index_constraint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxCons)) + 12*uintptr(_j))).X1))) = uint8(i32(8))
+ if int32(_6_op) == int32(16) {
+ elem106(_pIdxCons, uintptr(_j)).Xop = uint8(8)
}
- if int32(_6_op) == i32(4) {
- *(*uint8)(unsafe.Pointer(&((*Tsqlite3_index_constraint)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxCons)) + 12*uintptr(_j))).X1))) = uint8(i32(32))
+ if int32(_6_op) == int32(4) {
+ elem106(_pIdxCons, uintptr(_j)).Xop = uint8(32)
}
_38:
_j += 1
@@ -84696,14 +85788,14 @@ _22:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _i += 1; return &_pTerm }())) += uintptr(48)
goto _21
_24:
- _i = i32(0)
+ _i = int32(0)
_42:
if _i >= _nOrderBy {
goto _45
}
- _9_pExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2))))) + 20*uintptr(_i))).X0)
- *(*int32)(unsafe.Pointer(&((*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxOrderBy)) + 8*uintptr(_i))).X0))) = int32(_9_pExpr.X9)
- *(*uint8)(unsafe.Pointer(&((*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdxOrderBy)) + 8*uintptr(_i))).X1))) = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2))))) + 20*uintptr(_i))).X3
+ _9_pExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XpExpr)
+ elem108(_pIdxOrderBy, uintptr(_i)).XiColumn = int32(_9_pExpr.XiColumn)
+ elem108(_pIdxOrderBy, uintptr(_i)).Xdesc = elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XsortOrder
_i += 1
goto _42
_45:
@@ -84714,169 +85806,166 @@ _45:
var _allocateIndexInfoØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_allocateIndexInfoØ00__func__Ø000[0], str(105149), 18)
+ crt.Xstrncpy(nil, &_allocateIndexInfoØ00__func__Ø000[0], str(105177), 18)
}
-// Increase the memory allocation for pLoop->aLTerm[] to be at least n.
+// C comment
+// /*
+// ** Increase the memory allocation for pLoop->aLTerm[] to be at least n.
+// */
func _whereLoopResize(tls *crt.TLS, _db *Xsqlite3, _p *XWhereLoop, _n int32) (r0 int32) {
var _paNew **XWhereTerm
- if int32(_p.X12) >= _n {
- return i32(0)
+ if int32(_p.XnLSlot) >= _n {
+ return int32(0)
}
- _n = (_n + i32(7)) & i32(-8)
- _paNew = (**XWhereTerm)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(4)*uint32(_n))))
+ _n = (_n + int32(7)) & int32(-8)
+ _paNew = (**XWhereTerm)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(4)*uint32(_n))))
if _paNew == nil {
- return _sqlite3NomemError(tls, i32(132201))
- }
- crt.Xmemcpy(tls, (unsafe.Pointer)(_paNew), (unsafe.Pointer)(_p.X13), u32(4)*uint32(_p.X12))
- if (**XWhereTerm)(unsafe.Pointer(_p.X13)) != (**XWhereTerm)(unsafe.Pointer((*[3]unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) {
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_p.X13))
- }
- *(***XWhereTerm)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _paNew
- *(*uint16)(unsafe.Pointer(&(_p.X12))) = uint16(_n)
- return i32(0)
-}
-
-// Argument pIdxInfo is already populated with all constraints that may
-// be used by the virtual table identified by pBuilder->pNew->iTab. This
-// function marks a subset of those constraints usable, invokes the
-// xBestIndex method and adds the returned plan to pBuilder.
-//
-// A constraint is marked usable if:
-//
-// * Argument mUsable indicates that its prerequisites are available, and
-//
-// * It is not one of the operators specified in the mExclude mask passed
-// as the fourth argument (which in practice is either WO_IN or 0).
-//
-// Argument mPrereq is a mask of tables that must be scanned before the
-// virtual table in question. These are added to the plans prerequisites
-// before it is added to pBuilder.
-//
-// Output parameter *pbIn is set to true if the plan added to pBuilder
-// uses one or more WO_IN terms, or false otherwise.
+ return _sqlite3NomemError(tls, int32(132201))
+ }
+ crt.Xmemcpy(tls, unsafe.Pointer(_paNew), unsafe.Pointer(_p.XaLTerm), uint32(4)*uint32(_p.XnLSlot))
+ if (**XWhereTerm)(unsafe.Pointer(_p.XaLTerm)) != (**XWhereTerm)(unsafe.Pointer(&_p.XaLTermSpace)) {
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_p.XaLTerm))
+ }
+ *(***XWhereTerm)(unsafe.Pointer(&_p.XaLTerm)) = _paNew
+ _p.XnLSlot = uint16(_n)
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Argument pIdxInfo is already populated with all constraints that may
+// ** be used by the virtual table identified by pBuilder->pNew->iTab. This
+// ** function marks a subset of those constraints usable, invokes the
+// ** xBestIndex method and adds the returned plan to pBuilder.
+// **
+// ** A constraint is marked usable if:
+// **
+// ** * Argument mUsable indicates that its prerequisites are available, and
+// **
+// ** * It is not one of the operators specified in the mExclude mask passed
+// ** as the fourth argument (which in practice is either WO_IN or 0).
+// **
+// ** Argument mPrereq is a mask of tables that must be scanned before the
+// ** virtual table in question. These are added to the plans prerequisites
+// ** before it is added to pBuilder.
+// **
+// ** Output parameter *pbIn is set to true if the plan added to pBuilder
+// ** uses one or more WO_IN terms, or false otherwise.
+// */
func _whereLoopAddVirtualOne(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _mPrereq uint64, _mUsable uint64, _mExclude uint16, _pIdxInfo *Xsqlite3_index_info, _mNoOmit uint16, _pbIn *int32) (r0 int32) {
var _i, _mxTerm, _rc, _nConstraint, _3_iTerm, _4_j int32
var _pSrc *TSrcList_item
var _pParse *XParse
var _pIdxCons *Tsqlite3_index_constraint
- var _pUsage *Tsqlite3_index_orderby
+ var _pUsage *Tsqlite3_index_constraint_usage
var _pNew *XWhereLoop
var _1_pTerm, _4_pTerm *XWhereTerm
var _pWC *XWhereClause
- _pWC = (*XWhereClause)(_pBuilder.X1)
- _pUsage = (*Tsqlite3_index_orderby)(_pIdxInfo.X4)
- _rc = i32(0)
- _pNew = (*XWhereLoop)(_pBuilder.X3)
- _pParse = (*XParse)((*XWhereInfo)(_pBuilder.X0).X0)
- _pSrc = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)((*XWhereInfo)(_pBuilder.X0).X1).X2))))) + 68*uintptr(_pNew.X3)))
- _nConstraint = _pIdxInfo.X0
+ _pWC = (*XWhereClause)(_pBuilder.XpWC)
+ _pUsage = (*Tsqlite3_index_constraint_usage)(_pIdxInfo.XaConstraintUsage)
+ _rc = int32(0)
+ _pNew = (*XWhereLoop)(_pBuilder.XpNew)
+ _pParse = (*XParse)((*XWhereInfo)(_pBuilder.XpWInfo).XpParse)
+ _pSrc = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)((*XWhereInfo)(_pBuilder.XpWInfo).XpTabList).Xa))), uintptr(_pNew.XiTab))
+ _nConstraint = _pIdxInfo.XnConstraint
func() {
if (_mUsable & _mPrereq) != _mPrereq {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133399), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000))), unsafe.Pointer(str(105167)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133399), unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000), unsafe.Pointer(str(105195)))
crt.X__builtin_abort(tls)
}
}()
- *_pbIn = i32(0)
- *(*uint64)(unsafe.Pointer(&(_pNew.X0))) = _mPrereq
- _pIdxCons = *(**Tsqlite3_index_constraint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIdxInfo.X1)))))
- _i = i32(0)
+ *_pbIn = int32(0)
+ _pNew.Xprereq = _mPrereq
+ _pIdxCons = *(**Tsqlite3_index_constraint)(unsafe.Pointer(&_pIdxInfo.XaConstraint))
+ _i = int32(0)
_2:
if _i >= _nConstraint {
goto _5
}
- _1_pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_pIdxCons.X3)))
- *(*uint8)(unsafe.Pointer(&(_pIdxCons.X2))) = uint8(i32(0))
- if (((_1_pTerm.X11) & _mUsable) == (_1_pTerm.X11)) && ((int32(_1_pTerm.X4) & int32(_mExclude)) == i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pIdxCons.X2))) = uint8(i32(1))
+ _1_pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_pIdxCons.XiTermOffset))
+ _pIdxCons.Xusable = 0
+ if ((_1_pTerm.XprereqRight & _mUsable) == _1_pTerm.XprereqRight) && ((int32(_1_pTerm.XeOperator) & int32(_mExclude)) == int32(0)) {
+ _pIdxCons.Xusable = uint8(1)
}
*(*uintptr)(unsafe.Pointer(func() **Tsqlite3_index_constraint { _i += 1; return &_pIdxCons }())) += uintptr(12)
goto _2
_5:
- crt.Xmemset(tls, (unsafe.Pointer)(_pUsage), i32(0), u32(8)*uint32(_nConstraint))
+ crt.Xmemset(tls, unsafe.Pointer(_pUsage), int32(0), uint32(8)*uint32(_nConstraint))
func() {
- if (_pIdxInfo.X7) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133418), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000))), unsafe.Pointer(str(105196)))
+ if _pIdxInfo.XneedToFreeIdxStr != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133418), unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000), unsafe.Pointer(str(105224)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&(_pIdxInfo.X6))) = nil
- *(*int32)(unsafe.Pointer(&(_pIdxInfo.X5))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_pIdxInfo.X8))) = i32(0)
- *(*float64)(unsafe.Pointer(&(_pIdxInfo.X9))) = float64(5e+98)
- *(*int64)(unsafe.Pointer(&(_pIdxInfo.X10))) = int64(i32(25))
- *(*int32)(unsafe.Pointer(&(_pIdxInfo.X11))) = i32(0)
- *(*uint64)(unsafe.Pointer(&(_pIdxInfo.X12))) = uint64(int64(_pSrc.X14))
- _rc = _vtabBestIndex(tls, _pParse, (*XTable)(_pSrc.X4), _pIdxInfo)
+ _pIdxInfo.XidxStr = nil
+ _pIdxInfo.XidxNum = int32(0)
+ _pIdxInfo.XorderByConsumed = int32(0)
+ _pIdxInfo.XestimatedCost = float64(5e+98)
+ _pIdxInfo.XestimatedRows = int64(25)
+ _pIdxInfo.XidxFlags = int32(0)
+ _pIdxInfo.XcolUsed = uint64(int64(_pSrc.XcolUsed))
+ _rc = _vtabBestIndex(tls, _pParse, (*XTable)(_pSrc.XpTab), _pIdxInfo)
if _rc != 0 {
return _rc
}
- _mxTerm = i32(-1)
+ _mxTerm = int32(-1)
func() {
- if int32(_pNew.X12) < _nConstraint {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133432), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000))), unsafe.Pointer(str(105226)))
+ if int32(_pNew.XnLSlot) < _nConstraint {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133432), unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000), unsafe.Pointer(str(105254)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_13:
if _i >= _nConstraint {
goto _16
}
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(_i))) = nil
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), uintptr(_i)) = nil
_i += 1
goto _13
_16:
- *(*uint16)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X3))) = uint16(i32(0))
- _pIdxCons = *(**Tsqlite3_index_constraint)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIdxInfo.X1)))))
- _i = i32(0)
+ (*t105)(unsafe.Pointer(&_pNew.Xu)).XomitMask = 0
+ _pIdxCons = *(**Tsqlite3_index_constraint)(unsafe.Pointer(&_pIdxInfo.XaConstraint))
+ _i = int32(0)
_17:
if _i >= _nConstraint {
goto _20
}
- if store1(&_3_iTerm, ((*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pUsage))+8*uintptr(_i))).X0)-i32(1)) < i32(0) {
+ if store2(&_3_iTerm, (elem96(_pUsage, uintptr(_i)).XargvIndex)-int32(1)) < int32(0) {
goto _21
}
- _4_j = _pIdxCons.X3
- if ((((_3_iTerm >= _nConstraint) || (_4_j < i32(0))) || (_4_j >= (_pWC.X3))) || ((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(_3_iTerm)))) != nil)) || (int32(_pIdxCons.X2) == i32(0)) {
- _rc = i32(1)
- _sqlite3ErrorMsg(tls, _pParse, str(105252), unsafe.Pointer((*XTable)(_pSrc.X4).X0))
+ _4_j = _pIdxCons.XiTermOffset
+ if ((((_3_iTerm >= _nConstraint) || (_4_j < int32(0))) || (_4_j >= _pWC.XnTerm)) || ((*elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), uintptr(_3_iTerm))) != nil)) || (int32(_pIdxCons.Xusable) == int32(0)) {
+ _rc = int32(1)
+ _sqlite3ErrorMsg(tls, _pParse, str(105280), unsafe.Pointer((*XTable)(_pSrc.XpTab).XzName))
return _rc
}
- _4_pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_4_j)))
- {
- p := (*uint64)(unsafe.Pointer(&(_pNew.X0)))
- *p = (*p) | (_4_pTerm.X11)
- sink17(*p)
- }
+ _4_pTerm = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_4_j))
+ _pNew.Xprereq |= _4_pTerm.XprereqRight
func() {
- if _3_iTerm >= int32(_pNew.X12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133456), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000))), unsafe.Pointer(str(105278)))
+ if _3_iTerm >= int32(_pNew.XnLSlot) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133456), unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000), unsafe.Pointer(str(105306)))
crt.X__builtin_abort(tls)
}
}()
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(_3_iTerm))) = _4_pTerm
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), uintptr(_3_iTerm)) = _4_pTerm
if _3_iTerm > _mxTerm {
_mxTerm = _3_iTerm
}
- if (_3_iTerm < i32(16)) && (((*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pUsage)) + 8*uintptr(_i))).X1) != 0) {
+ if (_3_iTerm < int32(16)) && ((elem96(_pUsage, uintptr(_i)).Xomit) != 0) {
{
- p := (*uint16)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X3)))
- *p = uint16(int32(*p) | (i32(1) << uint(_3_iTerm)))
- sink14(*p)
+ p := &((*t105)(unsafe.Pointer(&_pNew.Xu)).XomitMask)
+ *p = uint16(int32(*p) | (int32(1) << uint(_3_iTerm)))
}
}
- if (int32(_4_pTerm.X4) & i32(1)) != i32(0) {
- *(*int32)(unsafe.Pointer(&(_pIdxInfo.X8))) = i32(0)
- {
- p := (*int32)(unsafe.Pointer(&(_pIdxInfo.X11)))
- *p = (*p) & i32(-2)
- sink1(*p)
- }
- *_pbIn = i32(1)
+ if (int32(_4_pTerm.XeOperator) & int32(1)) != int32(0) {
+ _pIdxInfo.XorderByConsumed = int32(0)
+ _pIdxInfo.XidxFlags &= int32(-2)
+ *_pbIn = int32(1)
func() {
- if (int32(_mExclude) & i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133470), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000))), unsafe.Pointer(str(105297)))
+ if (int32(_mExclude) & int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133470), unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000), unsafe.Pointer(str(105325)))
crt.X__builtin_abort(tls)
}
}()
@@ -84886,48 +85975,39 @@ _21:
goto _17
_20:
{
- p := (*uint16)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X3)))
+ p := &((*t105)(unsafe.Pointer(&_pNew.Xu)).XomitMask)
*p = uint16(int32(*p) & (^int32(_mNoOmit)))
- sink14(*p)
}
- *(*uint16)(unsafe.Pointer(&(_pNew.X10))) = uint16(_mxTerm + i32(1))
+ _pNew.XnLTerm = uint16(_mxTerm + int32(1))
func() {
- if int32(_pNew.X10) > int32(_pNew.X12) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133477), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000))), unsafe.Pointer(str(105319)))
+ if int32(_pNew.XnLTerm) > int32(_pNew.XnLSlot) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133477), unsafe.Pointer(&_whereLoopAddVirtualOneØ00__func__Ø000), unsafe.Pointer(str(105347)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0))) = _pIdxInfo.X5
- *(*uint8)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1))) = uint8(_pIdxInfo.X7)
- *(*int32)(unsafe.Pointer(&(_pIdxInfo.X7))) = i32(0)
- *(**int8)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X4))) = _pIdxInfo.X6
- *(*int8)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X2))) = int8(func() int32 {
- if (_pIdxInfo.X8) != 0 {
- return (_pIdxInfo.X2)
+ (*t105)(unsafe.Pointer(&_pNew.Xu)).XidxNum = _pIdxInfo.XidxNum
+ (*t105)(unsafe.Pointer(&_pNew.Xu)).XneedFree = uint8(_pIdxInfo.XneedToFreeIdxStr)
+ _pIdxInfo.XneedToFreeIdxStr = int32(0)
+ (*t105)(unsafe.Pointer(&_pNew.Xu)).XidxStr = _pIdxInfo.XidxStr
+ (*t105)(unsafe.Pointer(&_pNew.Xu)).XisOrdered = int8(func() int32 {
+ if _pIdxInfo.XorderByConsumed != 0 {
+ return _pIdxInfo.XnOrderBy
}
- return i32(0)
+ return int32(0)
}())
- *(*int16)(unsafe.Pointer(&(_pNew.X5))) = int16(i32(0))
- *(*int16)(unsafe.Pointer(&(_pNew.X6))) = _sqlite3LogEstFromDouble(tls, _pIdxInfo.X9)
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = _sqlite3LogEst(tls, uint64(_pIdxInfo.X10))
- if ((_pIdxInfo.X11) & i32(1)) != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(4096))
- sink5(*p)
- }
+ _pNew.XrSetup = 0
+ _pNew.XrRun = _sqlite3LogEstFromDouble(tls, _pIdxInfo.XestimatedCost)
+ _pNew.XnOut = _sqlite3LogEst(tls, uint64(_pIdxInfo.XestimatedRows))
+ if (_pIdxInfo.XidxFlags & int32(1)) != 0 {
+ _pNew.XwsFlags |= uint32(4096)
goto _40
}
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) & uint32(i32(-4097))
- sink5(*p)
- }
+ _pNew.XwsFlags &= uint32(4294963199)
_40:
_rc = _whereLoopInsert(tls, _pBuilder, _pNew)
- if ((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1) != 0 {
- Xsqlite3_free(tls, (unsafe.Pointer)((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X4))
- *(*uint8)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1))) = uint8(i32(0))
+ if ((*t105)(unsafe.Pointer(&_pNew.Xu)).XneedFree) != 0 {
+ Xsqlite3_free(tls, unsafe.Pointer((*t105)(unsafe.Pointer(&_pNew.Xu)).XidxStr))
+ (*t105)(unsafe.Pointer(&_pNew.Xu)).XneedFree = 0
}
return _rc
}
@@ -84935,86 +86015,96 @@ _40:
var _whereLoopAddVirtualOneØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_whereLoopAddVirtualOneØ00__func__Ø000[0], str(105346), 23)
-}
-
-// The table object reference passed as the second argument to this function
-// must represent a virtual table. This function invokes the xBestIndex()
-// method of the virtual table with the sqlite3_index_info object that
-// comes in as the 3rd argument to this function.
-//
-// If an error occurs, pParse is populated with an error message and a
-// non-zero value is returned. Otherwise, 0 is returned and the output
-// part of the sqlite3_index_info structure is left populated.
-//
-// Whether or not an error is returned, it is the responsibility of the
-// caller to eventually free p->idxStr if p->needToFreeIdxStr indicates
-// that this is required.
+ crt.Xstrncpy(nil, &_whereLoopAddVirtualOneØ00__func__Ø000[0], str(105374), 23)
+}
+
+// C comment
+// /*
+// ** The table object reference passed as the second argument to this function
+// ** must represent a virtual table. This function invokes the xBestIndex()
+// ** method of the virtual table with the sqlite3_index_info object that
+// ** comes in as the 3rd argument to this function.
+// **
+// ** If an error occurs, pParse is populated with an error message and a
+// ** non-zero value is returned. Otherwise, 0 is returned and the output
+// ** part of the sqlite3_index_info structure is left populated.
+// **
+// ** Whether or not an error is returned, it is the responsibility of the
+// ** caller to eventually free p->idxStr if p->needToFreeIdxStr indicates
+// ** that this is required.
+// */
func _vtabBestIndex(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _p *Xsqlite3_index_info) (r0 int32) {
var _rc int32
var _pVtab *Xsqlite3_vtab
- _pVtab = (*Xsqlite3_vtab)(_sqlite3GetVTable(tls, (*Xsqlite3)(_pParse.X0), _pTab).X2)
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vtab, *Xsqlite3_index_info) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- }{((*Xsqlite3_module)(_pVtab.X0).X3)})))(tls, _pVtab, _p)
- if _rc == i32(0) {
+ _pVtab = (*Xsqlite3_vtab)(_sqlite3GetVTable(tls, (*Xsqlite3)(_pParse.Xdb), _pTab).XpVtab)
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab, *Xsqlite3_index_info) int32 {
+ v := (*Xsqlite3_module)(_pVtab.XpModule).XxBestIndex
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, *Xsqlite3_index_info) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVtab, _p)
+ if _rc == int32(0) {
goto _0
}
- if _rc == i32(7) {
- _sqlite3OomFault(tls, (*Xsqlite3)(_pParse.X0))
+ if _rc == int32(7) {
+ _sqlite3OomFault(tls, (*Xsqlite3)(_pParse.Xdb))
goto _4
}
- if (_pVtab.X2) == nil {
- _sqlite3ErrorMsg(tls, _pParse, str(24576), unsafe.Pointer(_sqlite3ErrStr(tls, _rc)))
+ if _pVtab.XzErrMsg == nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(24531), unsafe.Pointer(_sqlite3ErrStr(tls, _rc)))
goto _4
}
- _sqlite3ErrorMsg(tls, _pParse, str(24576), unsafe.Pointer(_pVtab.X2))
+ _sqlite3ErrorMsg(tls, _pParse, str(24531), unsafe.Pointer(_pVtab.XzErrMsg))
_4:
_0:
- Xsqlite3_free(tls, (unsafe.Pointer)(_pVtab.X2))
- *(**int8)(unsafe.Pointer(&(_pVtab.X2))) = nil
- return _pParse.X16
+ Xsqlite3_free(tls, unsafe.Pointer(_pVtab.XzErrMsg))
+ _pVtab.XzErrMsg = nil
+ return _pParse.XnErr
}
-// Convert a double into a LogEst
-// In other words, compute an approximation for 10*log2(x).
+// C comment
+// /*
+// ** Convert a double into a LogEst
+// ** In other words, compute an approximation for 10*log2(x).
+// */
func _sqlite3LogEstFromDouble(tls *crt.TLS, _x float64) (r0 int16) {
var _e int16
var _a uint64
- i32(0)
- if _x <= float64(i32(1)) {
- return int16(i32(0))
+
+ if _x <= (1) {
+ return 0
}
- if _x <= float64(i32(2000000000)) {
+ if _x <= (2e+09) {
return _sqlite3LogEst(tls, uint64(_x))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_a), (unsafe.Pointer)(&_x), uint32(i32(8)))
- _e = int16((_a >> uint(i32(52))) - uint64(i32(1022)))
- return int16(int32(_e) * i32(10))
-}
-
-// Insert or replace a WhereLoop entry using the template supplied.
-//
-// An existing WhereLoop entry might be overwritten if the new template
-// is better and has fewer dependencies. Or the template will be ignored
-// and no insert will occur if an existing WhereLoop is faster and has
-// fewer dependencies than the template. Otherwise a new WhereLoop is
-// added based on the template.
-//
-// If pBuilder->pOrSet is not NULL then we care about only the
-// prerequisites and rRun and nOut costs of the N best loops. That
-// information is gathered in the pBuilder->pOrSet object. This special
-// processing mode is used only for OR clause processing.
-//
-// When accumulating multiple loops (when pBuilder->pOrSet is NULL) we
-// still might overwrite similar loops with the new template if the
-// new template is better. Loops may be overwritten if the following
-// conditions are met:
-//
-// (1) They have the same iTab.
-// (2) They have the same iSortIdx.
-// (3) The template has same or fewer dependencies than the current loop
-// (4) The template has the same or lower cost than the current loop
+ crt.Xmemcpy(tls, unsafe.Pointer(&_a), unsafe.Pointer(&_x), uint32(8))
+ _e = int16((_a >> 52) - uint64(1022))
+ return int16(int32(_e) * int32(10))
+}
+
+// C comment
+// /*
+// ** Insert or replace a WhereLoop entry using the template supplied.
+// **
+// ** An existing WhereLoop entry might be overwritten if the new template
+// ** is better and has fewer dependencies. Or the template will be ignored
+// ** and no insert will occur if an existing WhereLoop is faster and has
+// ** fewer dependencies than the template. Otherwise a new WhereLoop is
+// ** added based on the template.
+// **
+// ** If pBuilder->pOrSet is not NULL then we care about only the
+// ** prerequisites and rRun and nOut costs of the N best loops. That
+// ** information is gathered in the pBuilder->pOrSet object. This special
+// ** processing mode is used only for OR clause processing.
+// **
+// ** When accumulating multiple loops (when pBuilder->pOrSet is NULL) we
+// ** still might overwrite similar loops with the new template if the
+// ** new template is better. Loops may be overwritten if the following
+// ** conditions are met:
+// **
+// ** (1) They have the same iTab.
+// ** (2) They have the same iSortIdx.
+// ** (3) The template has same or fewer dependencies than the current loop
+// ** (4) The template has the same or lower cost than the current loop
+// */
func _whereLoopInsert(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _pTemplate *XWhereLoop) (r0 int32) {
var _rc int32
var _db *Xsqlite3
@@ -85022,35 +86112,35 @@ func _whereLoopInsert(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _pTemplate *XW
var _pWInfo *XWhereInfo
var _p, _6_pToDel *XWhereLoop
var _ppPrev, _6_ppTail **XWhereLoop
- _pWInfo = (*XWhereInfo)(_pBuilder.X0)
- _db = (*Xsqlite3)((*XParse)(_pWInfo.X0).X0)
- if (*XWhereOrSet)(_pBuilder.X4) == nil {
+ _pWInfo = (*XWhereInfo)(_pBuilder.XpWInfo)
+ _db = (*Xsqlite3)((*XParse)(_pWInfo.XpParse).Xdb)
+ if (*XWhereOrSet)(_pBuilder.XpOrSet) == nil {
goto _0
}
- if (_pTemplate.X10) != 0 {
- _whereOrInsert(tls, (*XWhereOrSet)(_pBuilder.X4), _pTemplate.X0, _pTemplate.X6, _pTemplate.X7)
+ if _pTemplate.XnLTerm != 0 {
+ _whereOrInsert(tls, (*XWhereOrSet)(_pBuilder.XpOrSet), _pTemplate.Xprereq, _pTemplate.XrRun, _pTemplate.XnOut)
}
- return i32(0)
+ return int32(0)
_0:
- _whereLoopAdjustCost(tls, (*XWhereLoop)(_pWInfo.X19), _pTemplate)
- _ppPrev = _whereLoopFindLesser(tls, (**XWhereLoop)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWInfo.X19))))), _pTemplate)
+ _whereLoopAdjustCost(tls, (*XWhereLoop)(_pWInfo.XpLoops), _pTemplate)
+ _ppPrev = _whereLoopFindLesser(tls, (**XWhereLoop)(unsafe.Pointer(&_pWInfo.XpLoops)), _pTemplate)
if _ppPrev == nil {
- return i32(0)
+ return int32(0)
}
_p = *_ppPrev
if _p != nil {
goto _4
}
- *_ppPrev = store67(&_p, (*XWhereLoop)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(72)))))
+ *_ppPrev = store109(&_p, (*XWhereLoop)(_sqlite3DbMallocRawNN(tls, _db, uint64(72))))
if _p == nil {
- return _sqlite3NomemError(tls, i32(132499))
+ return _sqlite3NomemError(tls, int32(132499))
}
_whereLoopInit(tls, _p)
- *(**XWhereLoop)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X14))))) = nil
+ *(**XWhereLoop)(unsafe.Pointer(&_p.XpNextLoop)) = nil
goto _6
_4:
- _6_ppTail = (**XWhereLoop)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X14)))))
+ _6_ppTail = (**XWhereLoop)(unsafe.Pointer(&_p.XpNextLoop))
_7:
if (*_6_ppTail) == nil {
goto _8
@@ -85063,189 +86153,201 @@ _7:
if _6_pToDel == nil {
goto _8
}
- *_6_ppTail = (*XWhereLoop)(_6_pToDel.X14)
+ *_6_ppTail = (*XWhereLoop)(_6_pToDel.XpNextLoop)
_whereLoopDelete(tls, _db, _6_pToDel)
goto _7
_8:
_6:
_rc = _whereLoopXfer(tls, _db, _p, _pTemplate)
- if ((_p.X9) & uint32(i32(1024))) != uint32(i32(0)) {
+ if (_p.XwsFlags & uint32(1024)) != (0) {
goto _11
}
- _8_pIndex = (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X4)
- if (_8_pIndex != nil) && ((_8_pIndex.X11) == i32(0)) {
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X4))))) = nil
+ _8_pIndex = (*XIndex)((*t101)(unsafe.Pointer(&_p.Xu)).XpIndex)
+ if (_8_pIndex != nil) && (_8_pIndex.Xtnum == int32(0)) {
+ *(**XIndex)(unsafe.Pointer(&((*t101)(unsafe.Pointer(&_p.Xu)).XpIndex))) = nil
}
_11:
return _rc
}
-// Try to insert a new prerequisite/cost entry into the WhereOrSet pSet.
-//
-// The new entry might overwrite an existing entry, or it might be
-// appended, or it might be discarded. Do whatever is the right thing
-// so that pSet keeps the N_OR_COST best entries seen so far.
+// C comment
+// /*
+// ** Try to insert a new prerequisite/cost entry into the WhereOrSet pSet.
+// **
+// ** The new entry might overwrite an existing entry, or it might be
+// ** appended, or it might be discarded. Do whatever is the right thing
+// ** so that pSet keeps the N_OR_COST best entries seen so far.
+// */
func _whereOrInsert(tls *crt.TLS, _pSet *XWhereOrSet, _prereq uint64, _rRun int16, _nOut int16) (r0 int32) {
var _i uint16
var _p *XWhereOrCost
- *func() **XWhereOrCost { _i = _pSet.X0; return &_p }() = (*XWhereOrCost)(unsafe.Pointer((*[3]XWhereOrCost)(unsafe.Pointer(&(_pSet.X1)))))
+ *func() **XWhereOrCost { _i = _pSet.Xn; return &_p }() = (*XWhereOrCost)(unsafe.Pointer(&_pSet.Xa))
_0:
- if int32(_i) <= i32(0) {
+ if int32(_i) <= int32(0) {
goto _3
}
- if (int32(_rRun) <= int32(_p.X1)) && ((_prereq & (_p.X0)) == _prereq) {
+ if (int32(_rRun) <= int32(_p.XrRun)) && ((_prereq & _p.Xprereq) == _prereq) {
goto _whereOrInsert_done
}
- if (int32(_p.X1) <= int32(_rRun)) && (((_p.X0) & _prereq) == (_p.X0)) {
- return i32(0)
+ if (int32(_p.XrRun) <= int32(_rRun)) && ((_p.Xprereq & _prereq) == _p.Xprereq) {
+ return int32(0)
}
*(*uintptr)(unsafe.Pointer(func() **XWhereOrCost { _i -= 1; return &_p }())) += uintptr(12)
goto _0
_3:
- if int32(_pSet.X0) < i32(3) {
- _p = (*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_pSet.X1))))) + 12*uintptr(postInc14((*uint16)(unsafe.Pointer(&(_pSet.X0))), uint16(1)))))
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _nOut
+ if int32(_pSet.Xn) < int32(3) {
+ _p = elem110((*XWhereOrCost)(unsafe.Pointer(&_pSet.Xa)), uintptr(postInc76(&_pSet.Xn, uint16(1))))
+ _p.XnOut = _nOut
goto _whereOrInsert_done
}
- _p = (*XWhereOrCost)(unsafe.Pointer((*[3]XWhereOrCost)(unsafe.Pointer(&(_pSet.X1)))))
- _i = uint16(i32(1))
+ _p = (*XWhereOrCost)(unsafe.Pointer(&_pSet.Xa))
+ _i = uint16(1)
_10:
- if int32(_i) >= int32(_pSet.X0) {
+ if int32(_i) >= int32(_pSet.Xn) {
goto _13
}
- if int32(_p.X1) > int32((*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_pSet.X1)))))+12*uintptr(_i))).X1) {
- _p = (*XWhereOrCost)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereOrCost)(unsafe.Pointer((*[3]XWhereOrCost)(unsafe.Pointer(&(_pSet.X1))))))) + uintptr(unsafe.Pointer((*XWhereOrCost)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereOrCost)(unsafe.Pointer(uintptr(_i)))))*uintptr(unsafe.Pointer((*XWhereOrCost)(unsafe.Pointer(uintptr(12)))))))))))
+ if int32(_p.XrRun) > int32(elem110((*XWhereOrCost)(unsafe.Pointer(&_pSet.Xa)), uintptr(_i)).XrRun) {
+ _p = (*XWhereOrCost)(unsafe.Pointer(uintptr(unsafe.Pointer(&_pSet.Xa)) + uintptr(unsafe.Pointer((*XWhereOrCost)(unsafe.Pointer(uintptr(_i)*uintptr(unsafe.Pointer((*XWhereOrCost)(unsafe.Pointer(uintptr(12)))))))))))
}
_i += 1
goto _10
_13:
- if int32(_p.X1) <= int32(_rRun) {
- return i32(0)
+ if int32(_p.XrRun) <= int32(_rRun) {
+ return int32(0)
}
_whereOrInsert_done:
- *(*uint64)(unsafe.Pointer(&(_p.X0))) = _prereq
- *(*int16)(unsafe.Pointer(&(_p.X1))) = _rRun
- if int32(_p.X2) > int32(_nOut) {
- *(*int16)(unsafe.Pointer(&(_p.X2))) = _nOut
- }
- return i32(1)
-}
-
-// Try to adjust the cost of WhereLoop pTemplate upwards or downwards so
-// that:
-//
-// (1) pTemplate costs less than any other WhereLoops that are a proper
-// subset of pTemplate
-//
-// (2) pTemplate costs more than any other WhereLoops for which pTemplate
-// is a proper subset.
-//
-// To say "WhereLoop X is a proper subset of Y" means that X uses fewer
-// WHERE clause terms than Y and that every WHERE clause term used by X is
-// also used by Y.
+ _p.Xprereq = _prereq
+ _p.XrRun = _rRun
+ if int32(_p.XnOut) > int32(_nOut) {
+ _p.XnOut = _nOut
+ }
+ return int32(1)
+}
+
+// C comment
+// /*
+// ** Try to adjust the cost of WhereLoop pTemplate upwards or downwards so
+// ** that:
+// **
+// ** (1) pTemplate costs less than any other WhereLoops that are a proper
+// ** subset of pTemplate
+// **
+// ** (2) pTemplate costs more than any other WhereLoops for which pTemplate
+// ** is a proper subset.
+// **
+// ** To say "WhereLoop X is a proper subset of Y" means that X uses fewer
+// ** WHERE clause terms than Y and that every WHERE clause term used by X is
+// ** also used by Y.
+// */
func _whereLoopAdjustCost(tls *crt.TLS, _p *XWhereLoop, _pTemplate *XWhereLoop) {
- if ((_pTemplate.X9) & uint32(i32(512))) == uint32(i32(0)) {
+ if (_pTemplate.XwsFlags & uint32(512)) == (0) {
return
}
_0:
if _p == nil {
goto _4
}
- if int32(_p.X3) != int32(_pTemplate.X3) {
+ if int32(_p.XiTab) != int32(_pTemplate.XiTab) {
goto _2
}
- if ((_p.X9) & uint32(i32(512))) == uint32(i32(0)) {
+ if (_p.XwsFlags & uint32(512)) == (0) {
goto _2
}
if _whereLoopCheaperProperSubset(tls, _p, _pTemplate) != 0 {
- *(*int16)(unsafe.Pointer(&(_pTemplate.X6))) = _p.X6
- *(*int16)(unsafe.Pointer(&(_pTemplate.X7))) = int16(int32(_p.X7) - i32(1))
+ _pTemplate.XrRun = _p.XrRun
+ _pTemplate.XnOut = int16(int32(_p.XnOut) - int32(1))
goto _9
}
if _whereLoopCheaperProperSubset(tls, _pTemplate, _p) != 0 {
- *(*int16)(unsafe.Pointer(&(_pTemplate.X6))) = _p.X6
- *(*int16)(unsafe.Pointer(&(_pTemplate.X7))) = int16(int32(_p.X7) + i32(1))
+ _pTemplate.XrRun = _p.XrRun
+ _pTemplate.XnOut = int16(int32(_p.XnOut) + int32(1))
}
_9:
_2:
- _p = (*XWhereLoop)(_p.X14)
+ _p = (*XWhereLoop)(_p.XpNextLoop)
goto _0
_4:
}
-// Return TRUE if all of the following are true:
-//
-// (1) X has the same or lower cost that Y
-// (2) X is a proper subset of Y
-// (3) X skips at least as many columns as Y
-//
-// By "proper subset" we mean that X uses fewer WHERE clause terms
-// than Y and that every WHERE clause term used by X is also used
-// by Y.
-//
-// If X is a proper subset of Y then Y is a better choice and ought
-// to have a lower cost. This routine returns TRUE when that cost
-// relationship is inverted and needs to be adjusted. The third rule
-// was added because if X uses skip-scan less than Y it still might
-// deserve a lower cost even if it is a proper subset of Y.
+// C comment
+// /*
+// ** Return TRUE if all of the following are true:
+// **
+// ** (1) X has the same or lower cost that Y
+// ** (2) X is a proper subset of Y
+// ** (3) X skips at least as many columns as Y
+// **
+// ** By "proper subset" we mean that X uses fewer WHERE clause terms
+// ** than Y and that every WHERE clause term used by X is also used
+// ** by Y.
+// **
+// ** If X is a proper subset of Y then Y is a better choice and ought
+// ** to have a lower cost. This routine returns TRUE when that cost
+// ** relationship is inverted and needs to be adjusted. The third rule
+// ** was added because if X uses skip-scan less than Y it still might
+// ** deserve a lower cost even if it is a proper subset of Y.
+// */
func _whereLoopCheaperProperSubset(tls *crt.TLS, _pX *XWhereLoop, _pY *XWhereLoop) (r0 int32) {
var _i, _j int32
- if (int32(_pX.X10) - int32(_pX.X11)) >= (int32(_pY.X10) - int32(_pY.X11)) {
- return i32(0)
+ if (int32(_pX.XnLTerm) - int32(_pX.XnSkip)) >= (int32(_pY.XnLTerm) - int32(_pY.XnSkip)) {
+ return int32(0)
}
- if int32(_pY.X11) > int32(_pX.X11) {
- return i32(0)
+ if int32(_pY.XnSkip) > int32(_pX.XnSkip) {
+ return int32(0)
}
- if int32(_pX.X6) < int32(_pY.X6) {
+ if int32(_pX.XrRun) < int32(_pY.XrRun) {
goto _2
}
- if int32(_pX.X6) > int32(_pY.X6) {
- return i32(0)
+ if int32(_pX.XrRun) > int32(_pY.XrRun) {
+ return int32(0)
}
- if int32(_pX.X7) > int32(_pY.X7) {
- return i32(0)
+ if int32(_pX.XnOut) > int32(_pY.XnOut) {
+ return int32(0)
}
_2:
- _i = int32(_pX.X10) - i32(1)
+ _i = int32(_pX.XnLTerm) - int32(1)
_5:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _8
}
- if (*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pX.X13)) + 4*uintptr(_i)))) == nil {
+ if (*elem104((**XWhereTerm)(unsafe.Pointer(_pX.XaLTerm)), uintptr(_i))) == nil {
goto _6
}
- _j = int32(_pY.X10) - i32(1)
+ _j = int32(_pY.XnLTerm) - int32(1)
_10:
- if _j < i32(0) {
+ if _j < int32(0) {
goto _13
}
- if (*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pY.X13)) + 4*uintptr(_j)))) == (*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pX.X13)) + 4*uintptr(_i)))) {
+ if (*elem104((**XWhereTerm)(unsafe.Pointer(_pY.XaLTerm)), uintptr(_j))) == (*elem104((**XWhereTerm)(unsafe.Pointer(_pX.XaLTerm)), uintptr(_i))) {
goto _13
}
_j -= 1
goto _10
_13:
- if _j < i32(0) {
- return i32(0)
+ if _j < int32(0) {
+ return int32(0)
}
_6:
_i -= 1
goto _5
_8:
- return i32(1)
-}
-
-// Search the list of WhereLoops in *ppPrev looking for one that can be
-// supplanted by pTemplate.
-//
-// Return NULL if the WhereLoop list contains an entry that can supplant
-// pTemplate, in other words if pTemplate does not belong on the list.
-//
-// If pX is a WhereLoop that pTemplate can supplant, then return the
-// link that points to pX.
-//
-// If pTemplate cannot supplant any existing element of the list but needs
-// to be added to the list, then return a pointer to the tail of the list.
+ return int32(1)
+}
+
+// C comment
+// /*
+// ** Search the list of WhereLoops in *ppPrev looking for one that can be
+// ** supplanted by pTemplate.
+// **
+// ** Return NULL if the WhereLoop list contains an entry that can supplant
+// ** pTemplate, in other words if pTemplate does not belong on the list.
+// **
+// ** If pX is a WhereLoop that pTemplate can supplant, then return the
+// ** link that points to pX.
+// **
+// ** If pTemplate cannot supplant any existing element of the list but needs
+// ** to be added to the list, then return a pointer to the tail of the list.
+// */
func _whereLoopFindLesser(tls *crt.TLS, _ppPrev **XWhereLoop, _pTemplate *XWhereLoop) (r0 **XWhereLoop) {
var _p *XWhereLoop
_p = *_ppPrev
@@ -85253,41 +86355,38 @@ _0:
if _p == nil {
goto _3
}
- if (int32(_p.X3) != int32(_pTemplate.X3)) || (int32(_p.X4) != int32(_pTemplate.X4)) {
+ if (int32(_p.XiTab) != int32(_pTemplate.XiTab)) || (int32(_p.XiSortIdx) != int32(_pTemplate.XiSortIdx)) {
goto _1
}
func() {
- if int32(_p.X5) != i32(0) && int32(_pTemplate.X5) != i32(0) && int32(_p.X5) != int32(_pTemplate.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132363), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopFindLesserØ00__func__Ø000))), unsafe.Pointer(str(105369)))
+ if int32(_p.XrSetup) != int32(0) && int32(_pTemplate.XrSetup) != int32(0) && int32(_p.XrSetup) != int32(_pTemplate.XrSetup) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132363), unsafe.Pointer(&_whereLoopFindLesserØ00__func__Ø000), unsafe.Pointer(str(105397)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_p.X5) < int32(_pTemplate.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132369), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopFindLesserØ00__func__Ø000))), unsafe.Pointer(str(105438)))
+ if int32(_p.XrSetup) < int32(_pTemplate.XrSetup) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132369), unsafe.Pointer(&_whereLoopFindLesserØ00__func__Ø000), unsafe.Pointer(str(105466)))
crt.X__builtin_abort(tls)
}
}()
- if ((((((_p.X9) & uint32(i32(16384))) != uint32(i32(0))) && (int32(_pTemplate.X11) == i32(0))) && (((_pTemplate.X9) & uint32(i32(512))) != uint32(i32(0)))) && (((_pTemplate.X9) & uint32(i32(1))) != uint32(i32(0)))) && (((_p.X0) & (_pTemplate.X0)) == (_pTemplate.X0)) {
+ if (((((_p.XwsFlags & uint32(16384)) != (0)) && (int32(_pTemplate.XnSkip) == int32(0))) && ((_pTemplate.XwsFlags & uint32(512)) != (0))) && ((_pTemplate.XwsFlags & uint32(1)) != (0))) && ((_p.Xprereq & _pTemplate.Xprereq) == _pTemplate.Xprereq) {
goto _3
}
- if (((((_p.X0) & (_pTemplate.X0)) == (_p.X0)) && (int32(_p.X5) <= int32(_pTemplate.X5))) && (int32(_p.X6) <= int32(_pTemplate.X6))) && (int32(_p.X7) <= int32(_pTemplate.X7)) {
+ if ((((_p.Xprereq & _pTemplate.Xprereq) == _p.Xprereq) && (int32(_p.XrSetup) <= int32(_pTemplate.XrSetup))) && (int32(_p.XrRun) <= int32(_pTemplate.XrRun))) && (int32(_p.XnOut) <= int32(_pTemplate.XnOut)) {
return nil
}
- if ((((_p.X0) & (_pTemplate.X0)) == (_pTemplate.X0)) && (int32(_p.X6) >= int32(_pTemplate.X6))) && (int32(_p.X7) >= int32(_pTemplate.X7)) {
+ if (((_p.Xprereq & _pTemplate.Xprereq) == _pTemplate.Xprereq) && (int32(_p.XrRun) >= int32(_pTemplate.XrRun))) && (int32(_p.XnOut) >= int32(_pTemplate.XnOut)) {
func() {
- if int32(_p.X5) < int32(_pTemplate.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132405), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopFindLesserØ00__func__Ø000))), unsafe.Pointer(str(105438)))
+ if int32(_p.XrSetup) < int32(_pTemplate.XrSetup) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132405), unsafe.Pointer(&_whereLoopFindLesserØ00__func__Ø000), unsafe.Pointer(str(105466)))
crt.X__builtin_abort(tls)
}
}()
goto _3
}
_1:
- *func() **XWhereLoop {
- _ppPrev = (**XWhereLoop)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X14)))))
- return &_p
- }() = *_ppPrev
+ *func() **XWhereLoop { _ppPrev = (**XWhereLoop)(unsafe.Pointer(&_p.XpNextLoop)); return &_p }() = *_ppPrev
goto _0
_3:
return _ppPrev
@@ -85296,98 +86395,113 @@ _3:
var _whereLoopFindLesserØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_whereLoopFindLesserØ00__func__Ø000[0], str(105467), 20)
+ crt.Xstrncpy(nil, &_whereLoopFindLesserØ00__func__Ø000[0], str(105495), 20)
}
-// Delete a WhereLoop object
+// C comment
+// /*
+// ** Delete a WhereLoop object
+// */
func _whereLoopDelete(tls *crt.TLS, _db *Xsqlite3, _p *XWhereLoop) {
_whereLoopClear(tls, _db, _p)
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_p))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_p))
}
-// Deallocate internal memory used by a WhereLoop object
+// C comment
+// /*
+// ** Deallocate internal memory used by a WhereLoop object
+// */
func _whereLoopClear(tls *crt.TLS, _db *Xsqlite3, _p *XWhereLoop) {
- if (**XWhereTerm)(unsafe.Pointer(_p.X13)) != (**XWhereTerm)(unsafe.Pointer((*[3]unsafe.Pointer)(unsafe.Pointer(&(_p.X15))))) {
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_p.X13))
+ if (**XWhereTerm)(unsafe.Pointer(_p.XaLTerm)) != (**XWhereTerm)(unsafe.Pointer(&_p.XaLTermSpace)) {
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_p.XaLTerm))
}
_whereLoopClearUnion(tls, _db, _p)
_whereLoopInit(tls, _p)
}
-// Clear the WhereLoop.u union. Leave WhereLoop.pLTerm intact.
+// C comment
+// /*
+// ** Clear the WhereLoop.u union. Leave WhereLoop.pLTerm intact.
+// */
func _whereLoopClearUnion(tls *crt.TLS, _db *Xsqlite3, _p *XWhereLoop) {
- if ((_p.X9) & uint32(i32(17408))) == 0 {
+ if (_p.XwsFlags & uint32(17408)) == 0 {
goto _0
}
- if (((_p.X9) & uint32(i32(1024))) != uint32(i32(0))) && (((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X1) != 0) {
- Xsqlite3_free(tls, (unsafe.Pointer)((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X4))
- *(*uint8)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X1))) = uint8(i32(0))
- *(**int8)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X4))) = nil
+ if ((_p.XwsFlags & uint32(1024)) != (0)) && (((*t105)(unsafe.Pointer(&_p.Xu)).XneedFree) != 0) {
+ Xsqlite3_free(tls, unsafe.Pointer((*t105)(unsafe.Pointer(&_p.Xu)).XidxStr))
+ (*t105)(unsafe.Pointer(&_p.Xu)).XneedFree = 0
+ (*t105)(unsafe.Pointer(&_p.Xu)).XidxStr = nil
goto _5
}
- if (((_p.X9) & uint32(i32(16384))) != uint32(i32(0))) && ((*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X4) != nil) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)((*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X4).X4))
- _sqlite3DbFreeNN(tls, _db, (*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X4)
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_p.X8))))).X4))))) = nil
+ if ((_p.XwsFlags & uint32(16384)) != (0)) && ((*XIndex)((*t101)(unsafe.Pointer(&_p.Xu)).XpIndex) != nil) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer((*XIndex)((*t101)(unsafe.Pointer(&_p.Xu)).XpIndex).XzColAff))
+ _sqlite3DbFreeNN(tls, _db, (*t101)(unsafe.Pointer(&_p.Xu)).XpIndex)
+ *(**XIndex)(unsafe.Pointer(&((*t101)(unsafe.Pointer(&_p.Xu)).XpIndex))) = nil
}
_5:
_0:
}
-// Transfer content from the second pLoop into the first.
+// C comment
+// /*
+// ** Transfer content from the second pLoop into the first.
+// */
func _whereLoopXfer(tls *crt.TLS, _db *Xsqlite3, _pTo *XWhereLoop, _pFrom *XWhereLoop) (r0 int32) {
_whereLoopClearUnion(tls, _db, _pTo)
- if _whereLoopResize(tls, _db, _pTo, int32(_pFrom.X10)) != 0 {
- crt.Xmemset(tls, (unsafe.Pointer)((*t62)(unsafe.Pointer(&(_pTo.X8)))), i32(0), u32(12))
- return _sqlite3NomemError(tls, i32(132216))
- }
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pTo), (unsafe.Pointer)(_pFrom), u32(48))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pTo.X13), (unsafe.Pointer)(_pFrom.X13), uint32(_pTo.X10)*u32(4))
- if ((_pFrom.X9) & uint32(i32(1024))) != 0 {
- *(*uint8)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pFrom.X8))))).X1))) = uint8(i32(0))
+ if _whereLoopResize(tls, _db, _pTo, int32(_pFrom.XnLTerm)) != 0 {
+ crt.Xmemset(tls, unsafe.Pointer(&_pTo.Xu), int32(0), uint32(12))
+ return _sqlite3NomemError(tls, int32(132216))
+ }
+ crt.Xmemcpy(tls, unsafe.Pointer(_pTo), unsafe.Pointer(_pFrom), uint32(48))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pTo.XaLTerm), unsafe.Pointer(_pFrom.XaLTerm), uint32(_pTo.XnLTerm)*uint32(4))
+ if (_pFrom.XwsFlags & uint32(1024)) != 0 {
+ (*t105)(unsafe.Pointer(&_pFrom.Xu)).XneedFree = 0
goto _3
}
- if ((_pFrom.X9) & uint32(i32(16384))) != uint32(i32(0)) {
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pFrom.X8))))).X4))))) = nil
+ if (_pFrom.XwsFlags & uint32(16384)) != (0) {
+ *(**XIndex)(unsafe.Pointer(&((*t101)(unsafe.Pointer(&_pFrom.Xu)).XpIndex))) = nil
}
_3:
- return i32(0)
-}
-
-// Add all WhereLoop objects for a single table of the join where the table
-// is identified by pBuilder->pNew->iTab. That table is guaranteed to be
-// a b-tree table, not a virtual table.
-//
-// The costs (WhereLoop.rRun) of the b-tree loops added by this function
-// are calculated as follows:
-//
-// For a full scan, assuming the table (or index) contains nRow rows:
-//
-// cost = nRow * 3.0 // full-table scan
-// cost = nRow * K // scan of covering index
-// cost = nRow * (K+3.0) // scan of non-covering index
-//
-// where K is a value between 1.1 and 3.0 set based on the relative
-// estimated average size of the index and table records.
-//
-// For an index scan, where nVisit is the number of index rows visited
-// by the scan, and nSeek is the number of seek operations required on
-// the index b-tree:
-//
-// cost = nSeek * (log(nRow) + K * nVisit) // covering index
-// cost = nSeek * (log(nRow) + (K+3.0) * nVisit) // non-covering index
-//
-// Normally, nSeek is 1. nSeek values greater than 1 come about if the
-// WHERE clause includes "x IN (....)" terms used in place of "x=?". Or when
-// implicit "x IN (SELECT x FROM tbl)" terms are added for skip-scans.
-//
-// The estimated values (nRow, nVisit, nSeek) often contain a large amount
-// of uncertainty. For this reason, scoring is designed to pick plans that
-// "do the least harm" if the estimates are inaccurate. For example, a
-// log(nRow) factor is omitted from a non-covering index scan in order to
-// bias the scoring in favor of using an index, since the worst-case
-// performance of using an index is far better than the worst-case performance
-// of a full table scan.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Add all WhereLoop objects for a single table of the join where the table
+// ** is identified by pBuilder->pNew->iTab. That table is guaranteed to be
+// ** a b-tree table, not a virtual table.
+// **
+// ** The costs (WhereLoop.rRun) of the b-tree loops added by this function
+// ** are calculated as follows:
+// **
+// ** For a full scan, assuming the table (or index) contains nRow rows:
+// **
+// ** cost = nRow * 3.0 // full-table scan
+// ** cost = nRow * K // scan of covering index
+// ** cost = nRow * (K+3.0) // scan of non-covering index
+// **
+// ** where K is a value between 1.1 and 3.0 set based on the relative
+// ** estimated average size of the index and table records.
+// **
+// ** For an index scan, where nVisit is the number of index rows visited
+// ** by the scan, and nSeek is the number of seek operations required on
+// ** the index b-tree:
+// **
+// ** cost = nSeek * (log(nRow) + K * nVisit) // covering index
+// ** cost = nSeek * (log(nRow) + (K+3.0) * nVisit) // non-covering index
+// **
+// ** Normally, nSeek is 1. nSeek values greater than 1 come about if the
+// ** WHERE clause includes "x IN (....)" terms used in place of "x=?". Or when
+// ** implicit "x IN (SELECT x FROM tbl)" terms are added for skip-scans.
+// **
+// ** The estimated values (nRow, nVisit, nSeek) often contain a large amount
+// ** of uncertainty. For this reason, scoring is designed to pick plans that
+// ** "do the least harm" if the estimates are inaccurate. For example, a
+// ** log(nRow) factor is omitted from a non-covering index scan in order to
+// ** bias the scoring in favor of using an index, since the worst-case
+// ** performance of using an index is far better than the worst-case performance
+// ** of a full table scan.
+// */
func _whereLoopAddBtree(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _mPrereq uint64) (r0 int32) {
var _aiColumnPk, _rSize, _rLogSize, _16_nLookup int16
var _rc, _iSortIdx, _b, _16_ii, _16_iCur int32
@@ -85402,88 +86516,87 @@ func _whereLoopAddBtree(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _mPrereq uin
var _5_pTerm, _5_pWCEnd, _17_pTerm *XWhereTerm
var _pWC, _16_pWC2 *XWhereClause
var _aiRowEstPk [2]int16
- _aiColumnPk = i16(-1)
- _rc = i32(0)
- _iSortIdx = i32(1)
- _pNew = (*XWhereLoop)(_pBuilder.X3)
- _pWInfo = (*XWhereInfo)(_pBuilder.X0)
- _pTabList = (*XSrcList)(_pWInfo.X1)
- _pSrc = (*TSrcList_item)(unsafe.Pointer(uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))))) + uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(_pNew.X3)))))*uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(68)))))))))))
- _pTab = (*XTable)(_pSrc.X4)
- _pWC = (*XWhereClause)(_pBuilder.X1)
+ _aiColumnPk = int16(-1)
+ _rc = int32(0)
+ _iSortIdx = int32(1)
+ _pNew = (*XWhereLoop)(_pBuilder.XpNew)
+ _pWInfo = (*XWhereInfo)(_pBuilder.XpWInfo)
+ _pTabList = (*XSrcList)(_pWInfo.XpTabList)
+ _pSrc = (*TSrcList_item)(unsafe.Pointer(uintptr(unsafe.Pointer(&_pTabList.Xa)) + uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(_pNew.XiTab)*uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(68)))))))))))
+ _pTab = (*XTable)(_pSrc.XpTab)
+ _pWC = (*XWhereClause)(_pBuilder.XpWC)
func() {
- if ((*XTable)(_pSrc.X4).X16) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133153), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeØ00__func__Ø000))), unsafe.Pointer(str(105487)))
+ if ((*XTable)(_pSrc.XpTab).XnModuleArg) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133153), unsafe.Pointer(&_whereLoopAddBtreeØ00__func__Ø000), unsafe.Pointer(str(105515)))
crt.X__builtin_abort(tls)
}
}()
- if (*XIndex)(_pSrc.X16) != nil {
- _pProbe = (*XIndex)(_pSrc.X16)
+ if _pSrc.XpIBIndex != nil {
+ _pProbe = (*XIndex)(_pSrc.XpIBIndex)
goto _5
}
- if ((_pTab.X9) & uint32(i32(32))) != uint32(i32(0)) {
- _pProbe = (*XIndex)(_pTab.X2)
+ if (_pTab.XtabFlags & uint32(32)) != (0) {
+ _pProbe = (*XIndex)(_pTab.XpIndex)
goto _5
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_sPk), i32(0), u32(56))
- *(*uint16)(unsafe.Pointer(&(_sPk.X13))) = uint16(i32(1))
- *(*uint16)(unsafe.Pointer(&(_sPk.X14))) = uint16(i32(1))
- *(**int16)(unsafe.Pointer(&(_sPk.X1))) = &_aiColumnPk
- *(**int16)(unsafe.Pointer(&(_sPk.X2))) = (*int16)(unsafe.Pointer(&_aiRowEstPk))
- *(*uint8)(unsafe.Pointer(&(_sPk.X15))) = uint8(i32(5))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sPk.X3))))) = _pTab
- *(*int16)(unsafe.Pointer(&(_sPk.X12))) = _pTab.X13
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiRowEstPk)) + 2*uintptr(i32(0)))) = _pTab.X12
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiRowEstPk)) + 2*uintptr(i32(1)))) = int16(i32(0))
- _3_pFirst = (*XIndex)((*XTable)(_pSrc.X4).X2)
- if int32((uint32((*t28)(unsafe.Pointer(&(_pSrc.X9))).X1)<<uint(i32(31)))>>uint(i32(31))) == i32(0) {
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sPk.X5))))) = _3_pFirst
+ crt.Xmemset(tls, unsafe.Pointer(&_sPk), int32(0), uint32(56))
+ _sPk.XnKeyCol = uint16(1)
+ _sPk.XnColumn = uint16(1)
+ _sPk.XaiColumn = &_aiColumnPk
+ _sPk.XaiRowLogEst = (*int16)(unsafe.Pointer(&_aiRowEstPk))
+ _sPk.XonError = uint8(5)
+ *(**XTable)(unsafe.Pointer(&_sPk.XpTable)) = _pTab
+ _sPk.XszIdxRow = _pTab.XszTabRow
+ *elem50((*int16)(unsafe.Pointer(&_aiRowEstPk)), 0) = _pTab.XnRowLogEst
+ *elem50((*int16)(unsafe.Pointer(&_aiRowEstPk)), uintptr(1)) = 0
+ _3_pFirst = (*XIndex)((*XTable)(_pSrc.XpTab).XpIndex)
+ if int32((uint32(_pSrc.Xfg.XnotIndexed)<<31)>>31) == int32(0) {
+ *(**XIndex)(unsafe.Pointer(&_sPk.XpNext)) = _3_pFirst
}
_pProbe = &_sPk
_5:
- _rSize = _pTab.X12
+ _rSize = _pTab.XnRowLogEst
_rLogSize = _estLog(tls, _rSize)
- if (*XWhereOrSet)(_pBuilder.X4) != nil || (int32(_pWInfo.X10)&i32(32)) != i32(0) || (((*Xsqlite3)((*XParse)(_pWInfo.X0).X0).X6)&i32(1048576)) == i32(0) || (*XIndex)(_pSrc.X16) != nil || ((uint32((*t28)(unsafe.Pointer(&(_pSrc.X9))).X1)<<uint(i32(31)))>>uint(i32(31))) != 0 || ((_pTab.X9)&uint32(i32(32))) != uint32(i32(0)) || ((uint32(((*t28)(unsafe.Pointer(&(_pSrc.X9))).X1)>>uint(i32(3)))<<uint(i32(31)))>>uint(i32(31))) != 0 || ((uint32(((*t28)(unsafe.Pointer(&(_pSrc.X9))).X1)>>uint(i32(5)))<<uint(i32(31)))>>uint(i32(31))) != 0 {
+ if _pBuilder.XpOrSet != nil || (int32(_pWInfo.XwctrlFlags)&int32(32)) != int32(0) || (((*Xsqlite3)((*XParse)(_pWInfo.XpParse).Xdb).Xflags)&int32(1048576)) == int32(0) || (*XIndex)(_pSrc.XpIBIndex) != nil || ((uint32(_pSrc.Xfg.XnotIndexed)<<31)>>31) != 0 || (_pTab.XtabFlags&uint32(32)) != (0) || ((uint32((_pSrc.Xfg.XnotIndexed)>>3)<<31)>>31) != 0 || ((uint32((_pSrc.Xfg.XnotIndexed)>>5)<<31)>>31) != 0 {
goto _14
}
- _5_pWCEnd = (*XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereTerm)(_pWC.X5))) + uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X3)))))*uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(48)))))))))))
- _5_pTerm = (*XWhereTerm)(_pWC.X5)
+ _5_pWCEnd = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.Xa) + uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.XnTerm)*uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(48)))))))))))
+ _5_pTerm = (*XWhereTerm)(_pWC.Xa)
_15:
- if _rc != i32(0) || uintptr(unsafe.Pointer(_5_pTerm)) >= uintptr(unsafe.Pointer(_5_pWCEnd)) {
+ if _rc != int32(0) || crt.P2U(unsafe.Pointer(_5_pTerm)) >= crt.P2U(unsafe.Pointer(_5_pWCEnd)) {
goto _19
}
- if ((_5_pTerm.X11) & (_pNew.X1)) != 0 {
+ if (_5_pTerm.XprereqRight & _pNew.XmaskSelf) != 0 {
goto _16
}
- if _termCanDriveIndex(tls, _5_pTerm, _pSrc, uint64(i32(0))) == 0 {
+ if _termCanDriveIndex(tls, _5_pTerm, _pSrc, 0) == 0 {
goto _21
}
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0))) = uint16(i32(1))
- *(*uint16)(unsafe.Pointer(&(_pNew.X11))) = uint16(i32(0))
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X4))))) = nil
- *(*uint16)(unsafe.Pointer(&(_pNew.X10))) = uint16(i32(1))
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(i32(0)))) = _5_pTerm
- *(*int16)(unsafe.Pointer(&(_pNew.X5))) = int16((int32(_rLogSize) + int32(_rSize)) + i32(4))
- if ((*XSelect)(_pTab.X3) == nil) && (((_pTab.X9) & uint32(i32(2))) == uint32(i32(0))) {
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq = uint16(1)
+ _pNew.XnSkip = 0
+ *(**XIndex)(unsafe.Pointer(&((*t101)(unsafe.Pointer(&_pNew.Xu)).XpIndex))) = nil
+ _pNew.XnLTerm = uint16(1)
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), 0) = _5_pTerm
+ _pNew.XrSetup = int16((int32(_rLogSize) + int32(_rSize)) + int32(4))
+ if ((*XSelect)(_pTab.XpSelect) == nil) && ((_pTab.XtabFlags & uint32(2)) == (0)) {
{
- p := (*int16)(unsafe.Pointer(&(_pNew.X5)))
- *p = int16(int32(*p) + i32(24))
- sink18(*p)
+ p := &_pNew.XrSetup
+ *p = int16(int32(*p) + int32(24))
}
}
- if int32(_pNew.X5) < i32(0) {
- *(*int16)(unsafe.Pointer(&(_pNew.X5))) = int16(i32(0))
+ if int32(_pNew.XrSetup) < int32(0) {
+ _pNew.XrSetup = 0
}
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = int16(i32(43))
+ _pNew.XnOut = int16(43)
func() {
- if i32(43) != int32(_sqlite3LogEst(tls, uint64(i32(20)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133227), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeØ00__func__Ø000))), unsafe.Pointer(str(105510)))
+ if int32(43) != int32(_sqlite3LogEst(tls, uint64(20))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133227), unsafe.Pointer(&_whereLoopAddBtreeØ00__func__Ø000), unsafe.Pointer(str(105538)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_pNew.X6))) = _sqlite3LogEstAdd(tls, _rLogSize, _pNew.X7)
- *(*uint32)(unsafe.Pointer(&(_pNew.X9))) = uint32(i32(16384))
- *(*uint64)(unsafe.Pointer(&(_pNew.X0))) = _mPrereq | (_5_pTerm.X11)
+ _pNew.XrRun = _sqlite3LogEstAdd(tls, _rLogSize, _pNew.XnOut)
+ _pNew.XwsFlags = uint32(16384)
+ _pNew.Xprereq = _mPrereq | _5_pTerm.XprereqRight
_rc = _whereLoopInsert(tls, _pBuilder, _pNew)
_21:
_16:
@@ -85491,136 +86604,129 @@ _16:
goto _15
_19:
_14:
- if _rc != i32(0) || _pProbe == nil {
+ if _rc != int32(0) || _pProbe == nil {
goto _31
}
- if ((*XExpr)(_pProbe.X9) != nil) && (_whereUsablePartialIndex(tls, _pSrc.X11, _pWC, (*XExpr)(_pProbe.X9)) == 0) {
+ if ((*XExpr)(_pProbe.XpPartIdxWhere) != nil) && (_whereUsablePartialIndex(tls, _pSrc.XiCursor, _pWC, (*XExpr)(_pProbe.XpPartIdxWhere)) == 0) {
goto _28
}
- _rSize = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pProbe.X2)) + 2*uintptr(i32(0))))
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0))) = uint16(i32(0))
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1))) = uint16(i32(0))
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X2))) = uint16(i32(0))
- *(*uint16)(unsafe.Pointer(&(_pNew.X11))) = uint16(i32(0))
- *(*uint16)(unsafe.Pointer(&(_pNew.X10))) = uint16(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pNew.X4))) = uint8(i32(0))
- *(*int16)(unsafe.Pointer(&(_pNew.X5))) = int16(i32(0))
- *(*uint64)(unsafe.Pointer(&(_pNew.X0))) = _mPrereq
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = _rSize
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X4))))) = _pProbe
- _b = _indexMightHelpWithOrderBy(tls, _pBuilder, _pProbe, _pSrc.X11)
+ _rSize = *elem50(_pProbe.XaiRowLogEst, 0)
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq = 0
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnBtm = 0
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnTop = 0
+ _pNew.XnSkip = 0
+ _pNew.XnLTerm = 0
+ _pNew.XiSortIdx = 0
+ _pNew.XrSetup = 0
+ _pNew.Xprereq = _mPrereq
+ _pNew.XnOut = _rSize
+ *(**XIndex)(unsafe.Pointer(&((*t101)(unsafe.Pointer(&_pNew.Xu)).XpIndex))) = _pProbe
+ _b = _indexMightHelpWithOrderBy(tls, _pBuilder, _pProbe, _pSrc.XiCursor)
func() {
- if (int32(_pWInfo.X10)&i32(4)) != i32(0) && _b != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133258), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeØ00__func__Ø000))), unsafe.Pointer(str(105532)))
+ if (int32(_pWInfo.XwctrlFlags)&int32(4)) != int32(0) && _b != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133258), unsafe.Pointer(&_whereLoopAddBtreeØ00__func__Ø000), unsafe.Pointer(str(105560)))
crt.X__builtin_abort(tls)
}
}()
- if (_pProbe.X11) > i32(0) {
+ if _pProbe.Xtnum > int32(0) {
goto _37
}
- *(*uint32)(unsafe.Pointer(&(_pNew.X9))) = uint32(i32(256))
- *(*uint8)(unsafe.Pointer(&(_pNew.X4))) = uint8(func() int32 {
+ _pNew.XwsFlags = uint32(256)
+ _pNew.XiSortIdx = uint8(func() int32 {
if _b != 0 {
return _iSortIdx
}
- return i32(0)
+ return int32(0)
}())
- *(*int16)(unsafe.Pointer(&(_pNew.X6))) = int16(int32(_rSize) + i32(16))
+ _pNew.XrRun = int16(int32(_rSize) + int32(16))
_whereLoopOutputAdjust(tls, _pWC, _pNew, _rSize)
_rc = _whereLoopInsert(tls, _pBuilder, _pNew)
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = _rSize
+ _pNew.XnOut = _rSize
if _rc != 0 {
goto _31
}
goto _41
_37:
- if ((uint32((_pProbe.X16)>>uint(i32(5))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- *(*uint32)(unsafe.Pointer(&(_pNew.X9))) = uint32(i32(576))
- _12_m = uint64(i32(0))
+ if ((uint32(_pProbe.XidxType>>5) << 31) >> 31) != 0 {
+ _pNew.XwsFlags = uint32(576)
+ _12_m = 0
goto _43
}
- _12_m = (_pSrc.X14) & (^_columnsInIndex(tls, _pProbe))
- *(*uint32)(unsafe.Pointer(&(_pNew.X9))) = uint32(func() int32 {
- if _12_m == uint64(i32(0)) {
- return i32(576)
+ _12_m = _pSrc.XcolUsed & (^_columnsInIndex(tls, _pProbe))
+ _pNew.XwsFlags = uint32(func() int32 {
+ if _12_m == (0) {
+ return int32(576)
}
- return i32(512)
+ return int32(512)
}())
_43:
- if _b == 0 && ((_pTab.X9)&uint32(i32(32))) == uint32(i32(0)) && (*XExpr)(_pProbe.X9) == nil && (_12_m != uint64(i32(0)) || int32((uint32((_pProbe.X16)>>uint(i32(2)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) || int32(_pProbe.X12) >= int32(_pTab.X13) || (int32(_pWInfo.X10)&i32(4)) != i32(0) || (_sqlite3Config.X4) == 0 || (int32((*Xsqlite3)((*XParse)(_pWInfo.X0).X0).X13)&i32(64)) != i32(0)) {
+ if _b == 0 && (_pTab.XtabFlags&uint32(32)) == (0) && (*XExpr)(_pProbe.XpPartIdxWhere) == nil && (_12_m != (0) || int32((uint32(_pProbe.XidxType>>2)<<31)>>31) != int32(0) || int32(_pProbe.XszIdxRow) >= int32(_pTab.XszTabRow) || (int32(_pWInfo.XwctrlFlags)&int32(4)) != int32(0) || _sqlite3Config.XbUseCis == 0 || (int32((*Xsqlite3)((*XParse)(_pWInfo.XpParse).Xdb).XdbOptFlags)&int32(64)) != int32(0)) {
goto _54
}
- *(*uint8)(unsafe.Pointer(&(_pNew.X4))) = uint8(func() int32 {
+ _pNew.XiSortIdx = uint8(func() int32 {
if _b != 0 {
return _iSortIdx
}
- return i32(0)
+ return int32(0)
}())
- *(*int16)(unsafe.Pointer(&(_pNew.X6))) = int16((int32(_rSize) + i32(1)) + ((i32(15) * int32(_pProbe.X12)) / int32(_pTab.X13)))
- if _12_m == uint64(i32(0)) {
+ _pNew.XrRun = int16((int32(_rSize) + int32(1)) + ((int32(15) * int32(_pProbe.XszIdxRow)) / int32(_pTab.XszTabRow)))
+ if _12_m == (0) {
goto _57
}
- _16_nLookup = int16(int32(_rSize) + i32(16))
- _16_iCur = _pSrc.X11
- _16_pWC2 = (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22)))
- _16_ii = i32(0)
+ _16_nLookup = int16(int32(_rSize) + int32(16))
+ _16_iCur = _pSrc.XiCursor
+ _16_pWC2 = &_pWInfo.XsWC
+ _16_ii = int32(0)
_58:
- if _16_ii >= (_16_pWC2.X3) {
+ if _16_ii >= _16_pWC2.XnTerm {
goto _61
}
- _17_pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_16_pWC2.X5) + 48*uintptr(_16_ii)))
- if _sqlite3ExprCoveredByIndex(tls, (*XExpr)(_17_pTerm.X0), _16_iCur, _pProbe) == 0 {
+ _17_pTerm = elem100((*XWhereTerm)(_16_pWC2.Xa), uintptr(_16_ii))
+ if _sqlite3ExprCoveredByIndex(tls, (*XExpr)(_17_pTerm.XpExpr), _16_iCur, _pProbe) == 0 {
goto _61
}
- if int32(_17_pTerm.X2) <= i32(0) {
+ if int32(_17_pTerm.XtruthProb) <= int32(0) {
{
p := &_16_nLookup
- *p = int16(int32(*p) + int32(_17_pTerm.X2))
- sink18(*p)
+ *p = int16(int32(*p) + int32(_17_pTerm.XtruthProb))
}
goto _64
}
_16_nLookup -= 1
- if (int32(_17_pTerm.X4) & i32(130)) != 0 {
+ if (int32(_17_pTerm.XeOperator) & int32(130)) != 0 {
{
p := &_16_nLookup
- *p = int16(int32(*p) - i32(19))
- sink18(*p)
+ *p = int16(int32(*p) - int32(19))
}
}
_64:
_16_ii += 1
goto _58
_61:
- *(*int16)(unsafe.Pointer(&(_pNew.X6))) = _sqlite3LogEstAdd(tls, _pNew.X6, _16_nLookup)
+ _pNew.XrRun = _sqlite3LogEstAdd(tls, _pNew.XrRun, _16_nLookup)
_57:
_whereLoopOutputAdjust(tls, _pWC, _pNew, _rSize)
_rc = _whereLoopInsert(tls, _pBuilder, _pNew)
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = _rSize
+ _pNew.XnOut = _rSize
if _rc != 0 {
goto _31
}
_54:
_41:
- *(*uint32)(unsafe.Pointer(&(_pBuilder.X5))) = uint32(i32(0))
- _rc = _whereLoopAddBtreeIndex(tls, _pBuilder, _pSrc, _pProbe, int16(i32(0)))
- if (_pBuilder.X5) == uint32(i32(1)) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pTab.X9)))
- *p = (*p) | uint32(i32(256))
- sink5(*p)
- }
+ _pBuilder.XbldFlags = 0
+ _rc = _whereLoopAddBtreeIndex(tls, _pBuilder, _pSrc, _pProbe, 0)
+ if _pBuilder.XbldFlags == uint32(1) {
+ _pTab.XtabFlags |= uint32(256)
}
- if (*XIndex)(_pSrc.X16) != nil {
+ if _pSrc.XpIBIndex != nil {
goto _31
}
_28:
- *func() *int32 { _pProbe = (*XIndex)(_pProbe.X5); return &_iSortIdx }() += 1
+ *func() *int32 { _pProbe = (*XIndex)(_pProbe.XpNext); return &_iSortIdx }() += 1
goto _14
_31:
return _rc
- _ = _sPk
_ = _aiRowEstPk
_ = _aiColumnPk
panic(0)
@@ -85629,165 +86735,179 @@ _31:
var _whereLoopAddBtreeØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_whereLoopAddBtreeØ00__func__Ø000[0], str(105588), 18)
+ crt.Xstrncpy(nil, &_whereLoopAddBtreeØ00__func__Ø000[0], str(105616), 18)
}
-// Estimate the logarithm of the input value to base 2.
+// C comment
+// /*
+// ** Estimate the logarithm of the input value to base 2.
+// */
func _estLog(tls *crt.TLS, _N int16) (r0 int16) {
return int16(func() int32 {
- if int32(_N) <= i32(10) {
- return i32(0)
+ if int32(_N) <= int32(10) {
+ return int32(0)
}
- return (int32(_sqlite3LogEst(tls, uint64(_N))) - i32(33))
+ return (int32(_sqlite3LogEst(tls, uint64(_N))) - int32(33))
}())
}
-// Return TRUE if the WHERE clause term pTerm is of a form where it
-// could be used with an index to access pSrc, assuming an appropriate
-// index existed.
+// C comment
+// /*
+// ** Return TRUE if the WHERE clause term pTerm is of a form where it
+// ** could be used with an index to access pSrc, assuming an appropriate
+// ** index existed.
+// */
func _termCanDriveIndex(tls *crt.TLS, _pTerm *XWhereTerm, _pSrc *TSrcList_item, _notReady uint64) (r0 int32) {
var _aff int8
- if (_pTerm.X8) != (_pSrc.X11) {
- return i32(0)
+ if _pTerm.XleftCursor != _pSrc.XiCursor {
+ return int32(0)
}
- if (int32(_pTerm.X4) & i32(130)) == i32(0) {
- return i32(0)
+ if (int32(_pTerm.XeOperator) & int32(130)) == int32(0) {
+ return int32(0)
}
- if ((_pTerm.X11) & _notReady) != uint64(i32(0)) {
- return i32(0)
+ if (_pTerm.XprereqRight & _notReady) != (0) {
+ return int32(0)
}
- if (*(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))) < i32(0) {
- return i32(0)
+ if (*(*int32)(unsafe.Pointer(&_pTerm.Xu))) < int32(0) {
+ return int32(0)
}
- _aff = (*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pSrc.X4).X1) + 16*uintptr(*(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))))).X4
- if _sqlite3IndexAffinityOk(tls, (*XExpr)(_pTerm.X0), _aff) == 0 {
- return i32(0)
+ _aff = elem41((*XColumn)((*XTable)(_pSrc.XpTab).XaCol), uintptr(*(*int32)(unsafe.Pointer(&_pTerm.Xu)))).Xaffinity
+ if _sqlite3IndexAffinityOk(tls, (*XExpr)(_pTerm.XpExpr), _aff) == 0 {
+ return int32(0)
}
- return i32(1)
+ return int32(1)
}
-// Check to see if a partial index with pPartIndexWhere can be used
-// in the current query. Return true if it can be and false if not.
+// C comment
+// /* Check to see if a partial index with pPartIndexWhere can be used
+// ** in the current query. Return true if it can be and false if not.
+// */
func _whereUsablePartialIndex(tls *crt.TLS, _iTab int32, _pWC *XWhereClause, _pWhere *XExpr) (r0 int32) {
var _i int32
var _2_pExpr *XExpr
var _pTerm *XWhereTerm
_0:
- if int32(_pWhere.X0) != i32(71) {
+ if int32(_pWhere.Xop) != int32(71) {
goto _1
}
- if _whereUsablePartialIndex(tls, _iTab, _pWC, (*XExpr)(_pWhere.X4)) == 0 {
- return i32(0)
+ if _whereUsablePartialIndex(tls, _iTab, _pWC, (*XExpr)(_pWhere.XpLeft)) == 0 {
+ return int32(0)
}
- _pWhere = (*XExpr)(_pWhere.X5)
+ _pWhere = (*XExpr)(_pWhere.XpRight)
goto _0
_1:
- *func() **XWhereTerm { _i = i32(0); return &_pTerm }() = (*XWhereTerm)(_pWC.X5)
+ *func() **XWhereTerm { _i = int32(0); return &_pTerm }() = (*XWhereTerm)(_pWC.Xa)
_3:
- if _i >= (_pWC.X3) {
+ if _i >= _pWC.XnTerm {
goto _6
}
- _2_pExpr = (*XExpr)(_pTerm.X0)
- if _sqlite3ExprImpliesExpr(tls, _2_pExpr, _pWhere, _iTab) != 0 && ((((_2_pExpr.X2) & uint32(i32(1))) == uint32(i32(0))) || (int32(_2_pExpr.X11) == _iTab)) {
- return i32(1)
+ _2_pExpr = (*XExpr)(_pTerm.XpExpr)
+ if _sqlite3ExprImpliesExpr(tls, _2_pExpr, _pWhere, _iTab) != 0 && (((_2_pExpr.Xflags & uint32(1)) == (0)) || (int32(_2_pExpr.XiRightJoinTable) == _iTab)) {
+ return int32(1)
}
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _i += 1; return &_pTerm }())) += uintptr(48)
goto _3
_6:
- return i32(0)
-}
-
-// Return true if we can prove the pE2 will always be true if pE1 is
-// true. Return false if we cannot complete the proof or if pE2 might
-// be false. Examples:
-//
-// pE1: x==5 pE2: x==5 Result: true
-// pE1: x>0 pE2: x==5 Result: false
-// pE1: x=21 pE2: x=21 OR y=43 Result: true
-// pE1: x!=123 pE2: x IS NOT NULL Result: true
-// pE1: x!=?1 pE2: x IS NOT NULL Result: true
-// pE1: x IS NULL pE2: x IS NOT NULL Result: false
-// pE1: x IS ?2 pE2: x IS NOT NULL Reuslt: false
-//
-// When comparing TK_COLUMN nodes between pE1 and pE2, if pE2 has
-// Expr.iTable<0 then assume a table number given by iTab.
-//
-// When in doubt, return false. Returning true might give a performance
-// improvement. Returning false might cause a performance reduction, but
-// it will always give the correct answer and is hence always safe.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Return true if we can prove the pE2 will always be true if pE1 is
+// ** true. Return false if we cannot complete the proof or if pE2 might
+// ** be false. Examples:
+// **
+// ** pE1: x==5 pE2: x==5 Result: true
+// ** pE1: x>0 pE2: x==5 Result: false
+// ** pE1: x=21 pE2: x=21 OR y=43 Result: true
+// ** pE1: x!=123 pE2: x IS NOT NULL Result: true
+// ** pE1: x!=?1 pE2: x IS NOT NULL Result: true
+// ** pE1: x IS NULL pE2: x IS NOT NULL Result: false
+// ** pE1: x IS ?2 pE2: x IS NOT NULL Reuslt: false
+// **
+// ** When comparing TK_COLUMN nodes between pE1 and pE2, if pE2 has
+// ** Expr.iTable<0 then assume a table number given by iTab.
+// **
+// ** When in doubt, return false. Returning true might give a performance
+// ** improvement. Returning false might cause a performance reduction, but
+// ** it will always give the correct answer and is hence always safe.
+// */
func _sqlite3ExprImpliesExpr(tls *crt.TLS, _pE1 *XExpr, _pE2 *XExpr, _iTab int32) (r0 int32) {
var _3_pX *XExpr
- if _sqlite3ExprCompare(tls, _pE1, _pE2, _iTab) == i32(0) {
- return i32(1)
+ if _sqlite3ExprCompare(tls, _pE1, _pE2, _iTab) == int32(0) {
+ return int32(1)
}
- if (int32(_pE2.X0) == i32(70)) && (_sqlite3ExprImpliesExpr(tls, _pE1, (*XExpr)(_pE2.X4), _iTab) != 0 || _sqlite3ExprImpliesExpr(tls, _pE1, (*XExpr)(_pE2.X5), _iTab) != 0) {
- return i32(1)
+ if (int32(_pE2.Xop) == int32(70)) && (_sqlite3ExprImpliesExpr(tls, _pE1, (*XExpr)(_pE2.XpLeft), _iTab) != 0 || _sqlite3ExprImpliesExpr(tls, _pE1, (*XExpr)(_pE2.XpRight), _iTab) != 0) {
+ return int32(1)
}
- if int32(_pE2.X0) != i32(76) || int32(_pE1.X0) == i32(75) || int32(_pE1.X0) == i32(72) {
+ if int32(_pE2.Xop) != int32(76) || int32(_pE1.Xop) == int32(75) || int32(_pE1.Xop) == int32(72) {
goto _6
}
- _3_pX = _sqlite3ExprSkipCollate(tls, (*XExpr)(_pE1.X4))
- if _sqlite3ExprCompare(tls, _3_pX, (*XExpr)(_pE2.X4), _iTab) == i32(0) {
- return i32(1)
+ _3_pX = _sqlite3ExprSkipCollate(tls, (*XExpr)(_pE1.XpLeft))
+ if _sqlite3ExprCompare(tls, _3_pX, (*XExpr)(_pE2.XpLeft), _iTab) == int32(0) {
+ return int32(1)
}
_6:
- return i32(0)
-}
-
-// Return True if it is possible that pIndex might be useful in
-// implementing the ORDER BY clause in pBuilder.
-//
-// Return False if pBuilder does not contain an ORDER BY clause or
-// if there is no way for pIndex to be useful in implementing that
-// ORDER BY clause.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Return True if it is possible that pIndex might be useful in
+// ** implementing the ORDER BY clause in pBuilder.
+// **
+// ** Return False if pBuilder does not contain an ORDER BY clause or
+// ** if there is no way for pIndex to be useful in implementing that
+// ** ORDER BY clause.
+// */
func _indexMightHelpWithOrderBy(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _pIndex *XIndex, _iCursor int32) (r0 int32) {
var _ii, _jj int32
var _pOB, _aColExpr *XExprList
var _1_pExpr *XExpr
- if ((uint32((_pIndex.X16)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- return i32(0)
+ if ((uint32(_pIndex.XidxType>>2) << 31) >> 31) != 0 {
+ return int32(0)
}
- if store42(&_pOB, (*XExprList)((*XWhereInfo)(_pBuilder.X0).X2)) == nil {
- return i32(0)
+ if store70(&_pOB, (*XExprList)((*XWhereInfo)(_pBuilder.XpWInfo).XpOrderBy)) == nil {
+ return int32(0)
}
- _ii = i32(0)
+ _ii = int32(0)
_2:
- if _ii >= (_pOB.X0) {
+ if _ii >= _pOB.XnExpr {
goto _5
}
- _1_pExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOB.X2)))))+20*uintptr(_ii))).X0))
- if int32(_1_pExpr.X0) != i32(152) || (_1_pExpr.X8) != _iCursor {
+ _1_pExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pOB.Xa)), uintptr(_ii)).XpExpr))
+ if int32(_1_pExpr.Xop) != int32(152) || _1_pExpr.XiTable != _iCursor {
goto _7
}
- if int32(_1_pExpr.X9) < i32(0) {
- return i32(1)
+ if int32(_1_pExpr.XiColumn) < int32(0) {
+ return int32(1)
}
- _jj = i32(0)
+ _jj = int32(0)
_9:
- if _jj >= int32(_pIndex.X13) {
+ if _jj >= int32(_pIndex.XnKeyCol) {
goto _12
}
- if int32(_1_pExpr.X9) == int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_jj)))) {
- return i32(1)
+ if int32(_1_pExpr.XiColumn) == int32(*elem50(_pIndex.XaiColumn, uintptr(_jj))) {
+ return int32(1)
}
_jj += 1
goto _9
_12:
goto _15
_7:
- if store42(&_aColExpr, (*XExprList)(_pIndex.X10)) == nil {
+ if store70(&_aColExpr, (*XExprList)(_pIndex.XaColExpr)) == nil {
goto _15
}
- _jj = i32(0)
+ _jj = int32(0)
_16:
- if _jj >= int32(_pIndex.X13) {
+ if _jj >= int32(_pIndex.XnKeyCol) {
goto _19
}
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_jj)))) != i32(-2) {
+ if int32(*elem50(_pIndex.XaiColumn, uintptr(_jj))) != int32(-2) {
goto _17
}
- if _sqlite3ExprCompare(tls, _1_pExpr, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_aColExpr.X2)))))+20*uintptr(_jj))).X0), _iCursor) == i32(0) {
- return i32(1)
+ if _sqlite3ExprCompare(tls, _1_pExpr, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_aColExpr.Xa)), uintptr(_jj)).XpExpr), _iCursor) == int32(0) {
+ return int32(1)
}
_17:
_jj += 1
@@ -85797,104 +86917,106 @@ _15:
_ii += 1
goto _2
_5:
- return i32(0)
-}
-
-// Adjust the WhereLoop.nOut value downward to account for terms of the
-// WHERE clause that reference the loop but which are not used by an
-// index.
-// *
-// For every WHERE clause term that is not used by the index
-// and which has a truth probability assigned by one of the likelihood(),
-// likely(), or unlikely() SQL functions, reduce the estimated number
-// of output rows by the probability specified.
-//
-// TUNING: For every WHERE clause term that is not used by the index
-// and which does not have an assigned truth probability, heuristics
-// described below are used to try to estimate the truth probability.
-// TODO --> Perhaps this is something that could be improved by better
-// table statistics.
-//
-// Heuristic 1: Estimate the truth probability as 93.75%. The 93.75%
-// value corresponds to -1 in LogEst notation, so this means decrement
-// the WhereLoop.nOut field for every such WHERE clause term.
-//
-// Heuristic 2: If there exists one or more WHERE clause terms of the
-// form "x==EXPR" and EXPR is not a constant 0 or 1, then make sure the
-// final output row estimate is no greater than 1/4 of the total number
-// of rows in the table. In other words, assume that x==EXPR will filter
-// out at least 3 out of 4 rows. If EXPR is -1 or 0 or 1, then maybe the
-// "x" column is boolean or else -1 or 0 or 1 is a common default value
-// on the "x" column and so in that case only cap the output row estimate
-// at 1/2 instead of 1/4.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Adjust the WhereLoop.nOut value downward to account for terms of the
+// ** WHERE clause that reference the loop but which are not used by an
+// ** index.
+// *
+// ** For every WHERE clause term that is not used by the index
+// ** and which has a truth probability assigned by one of the likelihood(),
+// ** likely(), or unlikely() SQL functions, reduce the estimated number
+// ** of output rows by the probability specified.
+// **
+// ** TUNING: For every WHERE clause term that is not used by the index
+// ** and which does not have an assigned truth probability, heuristics
+// ** described below are used to try to estimate the truth probability.
+// ** TODO --> Perhaps this is something that could be improved by better
+// ** table statistics.
+// **
+// ** Heuristic 1: Estimate the truth probability as 93.75%. The 93.75%
+// ** value corresponds to -1 in LogEst notation, so this means decrement
+// ** the WhereLoop.nOut field for every such WHERE clause term.
+// **
+// ** Heuristic 2: If there exists one or more WHERE clause terms of the
+// ** form "x==EXPR" and EXPR is not a constant 0 or 1, then make sure the
+// ** final output row estimate is no greater than 1/4 of the total number
+// ** of rows in the table. In other words, assume that x==EXPR will filter
+// ** out at least 3 out of 4 rows. If EXPR is -1 or 0 or 1, then maybe the
+// ** "x" column is boolean or else -1 or 0 or 1 is a common default value
+// ** on the "x" column and so in that case only cap the output row estimate
+// ** at 1/2 instead of 1/4.
+// */
func _whereLoopOutputAdjust(tls *crt.TLS, _pWC *XWhereClause, _pLoop *XWhereLoop, _nRow int16) {
var _iReduce int16
var _i, _j, _k int32
var _notAllowed uint64
var _6_pRight *XExpr
var _pTerm, _pX *XWhereTerm
- _notAllowed = ^((_pLoop.X0) | (_pLoop.X1))
- _iReduce = i16(0)
+ _notAllowed = ^(_pLoop.Xprereq | _pLoop.XmaskSelf)
+ _iReduce = int16(0)
func() {
- if ((_pLoop.X9) & uint32(i32(16384))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132572), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopOutputAdjustØ00__func__Ø000))), unsafe.Pointer(str(105606)))
+ if (_pLoop.XwsFlags & uint32(16384)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132572), unsafe.Pointer(&_whereLoopOutputAdjustØ00__func__Ø000), unsafe.Pointer(str(105634)))
crt.X__builtin_abort(tls)
}
}()
- *func() **XWhereTerm { _i = _pWC.X3; return &_pTerm }() = (*XWhereTerm)(_pWC.X5)
+ *func() **XWhereTerm { _i = _pWC.XnTerm; return &_pTerm }() = (*XWhereTerm)(_pWC.Xa)
_2:
- if _i <= i32(0) {
+ if _i <= int32(0) {
goto _5
}
- if (int32(_pTerm.X3) & i32(2)) != i32(0) {
+ if (int32(_pTerm.XwtFlags) & int32(2)) != int32(0) {
goto _5
}
- if ((_pTerm.X12) & (_pLoop.X1)) == uint64(i32(0)) {
+ if (_pTerm.XprereqAll & _pLoop.XmaskSelf) == (0) {
goto _3
}
- if ((_pTerm.X12) & _notAllowed) != uint64(i32(0)) {
+ if (_pTerm.XprereqAll & _notAllowed) != (0) {
goto _3
}
- _j = int32(_pLoop.X10) - i32(1)
+ _j = int32(_pLoop.XnLTerm) - int32(1)
_9:
- if _j < i32(0) {
+ if _j < int32(0) {
goto _12
}
- _pX = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_j)))
+ _pX = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_j))
if _pX == nil {
goto _10
}
if _pX == _pTerm {
goto _12
}
- if ((_pX.X7) >= i32(0)) && ((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5)+48*uintptr(_pX.X7))) == _pTerm) {
+ if (_pX.XiParent >= int32(0)) && (elem100((*XWhereTerm)(_pWC.Xa), uintptr(_pX.XiParent)) == _pTerm) {
goto _12
}
_10:
_j -= 1
goto _9
_12:
- if _j >= i32(0) {
+ if _j >= int32(0) {
goto _17
}
- if int32(_pTerm.X2) <= i32(0) {
+ if int32(_pTerm.XtruthProb) <= int32(0) {
{
- p := (*int16)(unsafe.Pointer(&(_pLoop.X7)))
- *p = int16(int32(*p) + int32(_pTerm.X2))
- sink18(*p)
+ p := &_pLoop.XnOut
+ *p = int16(int32(*p) + int32(_pTerm.XtruthProb))
}
goto _19
}
- *(*int16)(unsafe.Pointer(&(_pLoop.X7))) -= 1
- if (int32(_pTerm.X4) & i32(130)) == 0 {
+ _pLoop.XnOut -= 1
+ if (int32(_pTerm.XeOperator) & int32(130)) == 0 {
goto _20
}
- _6_pRight = (*XExpr)((*XExpr)(_pTerm.X0).X5)
- if (_sqlite3ExprIsInteger(tls, _6_pRight, &_k) != 0 && (_k >= i32(-1))) && (_k <= i32(1)) {
- _k = i32(10)
+ _6_pRight = (*XExpr)((*XExpr)(_pTerm.XpExpr).XpRight)
+ if (_sqlite3ExprIsInteger(tls, _6_pRight, &_k) != 0 && (_k >= int32(-1))) && (_k <= int32(1)) {
+ _k = int32(10)
goto _24
}
- _k = i32(20)
+ _k = int32(20)
_24:
if int32(_iReduce) < _k {
_iReduce = int16(_k)
@@ -85906,62 +87028,67 @@ _3:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _i -= 1; return &_pTerm }())) += uintptr(48)
goto _2
_5:
- if int32(_pLoop.X7) > (int32(_nRow) - int32(_iReduce)) {
- *(*int16)(unsafe.Pointer(&(_pLoop.X7))) = int16(int32(_nRow) - int32(_iReduce))
+ if int32(_pLoop.XnOut) > (int32(_nRow) - int32(_iReduce)) {
+ _pLoop.XnOut = int16(int32(_nRow) - int32(_iReduce))
}
}
var _whereLoopOutputAdjustØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_whereLoopOutputAdjustØ00__func__Ø000[0], str(105645), 22)
+ crt.Xstrncpy(nil, &_whereLoopOutputAdjustØ00__func__Ø000[0], str(105673), 22)
}
-// Determine if an index pIdx on table with cursor iCur contains will
-// the expression pExpr. Return true if the index does cover the
-// expression and false if the pExpr expression references table columns
-// that are not found in the index pIdx.
-//
-// An index covering an expression means that the expression can be
-// evaluated using only the index and without having to lookup the
-// corresponding table entry.
+// C comment
+// /*
+// ** Determine if an index pIdx on table with cursor iCur contains will
+// ** the expression pExpr. Return true if the index does cover the
+// ** expression and false if the pExpr expression references table columns
+// ** that are not found in the index pIdx.
+// **
+// ** An index covering an expression means that the expression can be
+// ** evaluated using only the index and without having to lookup the
+// ** corresponding table entry.
+// */
func _sqlite3ExprCoveredByIndex(tls *crt.TLS, _pExpr *XExpr, _iCur int32, _pIdx *XIndex) (r0 int32) {
var _w XWalker
- var _xcov XIdList
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*int32)(unsafe.Pointer(&(_xcov.X1))) = _iCur
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_xcov.X0))))) = _pIdx
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _exprIdxCover
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_w.X6))))))) = &_xcov
+ var _xcov TIdxCover
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ _xcov.XiCur = _iCur
+ *(**XIndex)(unsafe.Pointer(&_xcov.XpIdx)) = _pIdx
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _exprIdxCover
+ *(**TIdxCover)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_w.Xu)))) = &_xcov
_sqlite3WalkExpr(tls, &_w, _pExpr)
- return bool2int((_w.X5) == 0)
-
- _ = _w
- _ = _xcov
- panic(0)
+ return bool2int(_w.XeCode == 0)
}
-// Check to see if there are references to columns in table
-// pWalker->u.pIdxCover->iCur can be satisfied using the index
-// pWalker->u.pIdxCover->pIdx.
+// C comment
+// /*
+// ** Check to see if there are references to columns in table
+// ** pWalker->u.pIdxCover->iCur can be satisfied using the index
+// ** pWalker->u.pIdxCover->pIdx.
+// */
func _exprIdxCover(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
- if ((int32(_pExpr.X0) == i32(152)) && ((_pExpr.X8) == ((*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6)))))).X1))) && (int32(_sqlite3ColumnOfIndex(tls, (*XIndex)((*XIdList)(*(*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6)))))).X0), _pExpr.X9)) < i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pWalker.X5))) = uint8(i32(1))
- return i32(2)
- }
- return i32(0)
-}
-
-// We have so far matched pBuilder->pNew->u.btree.nEq terms of the
-// index pIndex. Try to match one more.
-//
-// When this function is called, pBuilder->pNew->nOut contains the
-// number of rows expected to be visited by filtering using the nEq
-// terms only. If it is modified, this value is restored before this
-// function returns.
-//
-// If pProbe->tnum==0, that means pIndex is a fake index used for the
-// INTEGER PRIMARY KEY.
+ if ((int32(_pExpr.Xop) == int32(152)) && (_pExpr.XiTable == ((*TIdxCover)(*(*unsafe.Pointer)(unsafe.Pointer(&_pWalker.Xu))).XiCur))) && (int32(_sqlite3ColumnOfIndex(tls, (*XIndex)((*TIdxCover)(*(*unsafe.Pointer)(unsafe.Pointer(&_pWalker.Xu))).XpIdx), _pExpr.XiColumn)) < int32(0)) {
+ _pWalker.XeCode = uint8(1)
+ return int32(2)
+ }
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** We have so far matched pBuilder->pNew->u.btree.nEq terms of the
+// ** index pIndex. Try to match one more.
+// **
+// ** When this function is called, pBuilder->pNew->nOut contains the
+// ** number of rows expected to be visited by filtering using the nEq
+// ** terms only. If it is modified, this value is restored before this
+// ** function returns.
+// **
+// ** If pProbe->tnum==0, that means pIndex is a fake index used for the
+// ** INTEGER PRIMARY KEY.
+// */
func _whereLoopAddBtreeIndex(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _pSrc *TSrcList_item, _pProbe *XIndex, _nInMul int16) (r0 int32) {
var _saved_nOut, _rSize, _rLogSize, _3_rCostIdx, _3_nOutUnadjusted, _30_nIter int16
var _opMask, _rc, _3_nIn, _9_i, _12_iCol, _21_nEq int32
@@ -85975,139 +87102,123 @@ func _whereLoopAddBtreeIndex(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _pSrc *
var _pNew *XWhereLoop
var _pTerm, _pTop, _pBtm *XWhereTerm
var _scan XWhereScan
- _pWInfo = (*XWhereInfo)(_pBuilder.X0)
- _pParse = (*XParse)(_pWInfo.X0)
- _db = (*Xsqlite3)(_pParse.X0)
- _rc = i32(0)
+ _pWInfo = (*XWhereInfo)(_pBuilder.XpWInfo)
+ _pParse = (*XParse)(_pWInfo.XpParse)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _rc = int32(0)
_pTop = nil
_pBtm = nil
- _pNew = (*XWhereLoop)(_pBuilder.X3)
- if (_db.X17) != 0 {
- return _sqlite3NomemError(tls, i32(132723))
+ _pNew = (*XWhereLoop)(_pBuilder.XpNew)
+ if _db.XmallocFailed != 0 {
+ return _sqlite3NomemError(tls, int32(132723))
}
func() {
- if ((_pNew.X9) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132727), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(105667)))
+ if (_pNew.XwsFlags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132727), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(105695)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_pNew.X9) & uint32(i32(16))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132728), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(105707)))
+ if (_pNew.XwsFlags & uint32(16)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132728), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(105735)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pNew.X9) & uint32(i32(32))) != 0 {
- _opMask = i32(24)
+ if (_pNew.XwsFlags & uint32(32)) != 0 {
+ _opMask = int32(24)
goto _6
}
func() {
- if int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132732), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(105744)))
+ if int32((*t101)(unsafe.Pointer(&_pNew.Xu)).XnBtm) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132732), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(105772)))
crt.X__builtin_abort(tls)
}
}()
- _opMask = i32(447)
+ _opMask = int32(447)
_6:
- if ((uint32((_pProbe.X16)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- {
- p := &_opMask
- *p = (*p) & i32(-61)
- sink1(*p)
- }
+ if ((uint32(_pProbe.XidxType>>2) << 31) >> 31) != 0 {
+ _opMask &= int32(-61)
}
func() {
- if int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0) >= int32(_pProbe.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132737), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(105766)))
+ if int32((*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq) >= int32(_pProbe.XnColumn) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132737), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(105794)))
crt.X__builtin_abort(tls)
}
}()
- _saved_nEq = (*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0
- _saved_nBtm = (*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1
- _saved_nTop = (*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X2
- _saved_nSkip = _pNew.X11
- _saved_nLTerm = _pNew.X10
- _saved_wsFlags = _pNew.X9
- _saved_prereq = _pNew.X0
- _saved_nOut = _pNew.X7
- _pTerm = _whereScanInit(tls, &_scan, (*XWhereClause)(_pBuilder.X1), _pSrc.X11, int32(_saved_nEq), uint32(_opMask), _pProbe)
- *(*int16)(unsafe.Pointer(&(_pNew.X5))) = int16(i32(0))
- _rSize = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pProbe.X2)) + 2*uintptr(i32(0))))
+ _saved_nEq = (*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq
+ _saved_nBtm = (*t101)(unsafe.Pointer(&_pNew.Xu)).XnBtm
+ _saved_nTop = (*t101)(unsafe.Pointer(&_pNew.Xu)).XnTop
+ _saved_nSkip = _pNew.XnSkip
+ _saved_nLTerm = _pNew.XnLTerm
+ _saved_wsFlags = _pNew.XwsFlags
+ _saved_prereq = _pNew.Xprereq
+ _saved_nOut = _pNew.XnOut
+ _pTerm = _whereScanInit(tls, &_scan, (*XWhereClause)(_pBuilder.XpWC), _pSrc.XiCursor, int32(_saved_nEq), uint32(_opMask), _pProbe)
+ _pNew.XrSetup = 0
+ _rSize = *elem50(_pProbe.XaiRowLogEst, 0)
_rLogSize = _estLog(tls, _rSize)
_12:
- if _rc != i32(0) || _pTerm == nil {
+ if _rc != int32(0) || _pTerm == nil {
goto _16
}
- _3_eOp = _pTerm.X4
- _3_nIn = i32(0)
- if ((int32(_3_eOp) == i32(256)) || ((int32(_pTerm.X3) & i32(0)) != i32(0))) && _indexColumnNotNull(tls, _pProbe, int32(_saved_nEq)) != 0 {
+ _3_eOp = _pTerm.XeOperator
+ _3_nIn = int32(0)
+ if ((int32(_3_eOp) == int32(256)) || ((int32(_pTerm.XwtFlags) & int32(0)) != int32(0))) && _indexColumnNotNull(tls, _pProbe, int32(_saved_nEq)) != 0 {
goto _13
}
- if ((_pTerm.X11) & (_pNew.X1)) != 0 {
+ if (_pTerm.XprereqRight & _pNew.XmaskSelf) != 0 {
goto _13
}
- if (int32(_pTerm.X3)&i32(256)) != 0 && (int32(_pTerm.X4) == i32(16)) {
+ if (int32(_pTerm.XwtFlags)&int32(256)) != 0 && (int32(_pTerm.XeOperator) == int32(16)) {
goto _13
}
- if (((int32((*t28)(unsafe.Pointer(&(_pSrc.X9))).X0) & i32(8)) != i32(0)) && ((((*XExpr)(_pTerm.X0).X2) & uint32(i32(1))) == uint32(i32(0)))) && ((int32(_3_eOp) & i32(384)) != i32(0)) {
+ if (((int32(_pSrc.Xfg.Xjointype) & int32(8)) != int32(0)) && ((((*XExpr)(_pTerm.XpExpr).Xflags) & uint32(1)) == (0))) && ((int32(_3_eOp) & int32(384)) != int32(0)) {
goto _13
}
- if (int32(_pProbe.X15) != i32(0)) && (int32(_saved_nEq) == (int32(_pProbe.X13) - i32(1))) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pBuilder.X5)))
- *p = (*p) | uint32(i32(2))
- sink5(*p)
- }
+ if (int32(_pProbe.XonError) != int32(0)) && (int32(_saved_nEq) == (int32(_pProbe.XnKeyCol) - int32(1))) {
+ _pBuilder.XbldFlags |= uint32(2)
goto _28
}
- {
- p := (*uint32)(unsafe.Pointer(&(_pBuilder.X5)))
- *p = (*p) | uint32(i32(1))
- sink5(*p)
- }
+ _pBuilder.XbldFlags |= uint32(1)
_28:
- *(*uint32)(unsafe.Pointer(&(_pNew.X9))) = _saved_wsFlags
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0))) = _saved_nEq
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1))) = _saved_nBtm
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X2))) = _saved_nTop
- *(*uint16)(unsafe.Pointer(&(_pNew.X10))) = _saved_nLTerm
- if _whereLoopResize(tls, _db, _pNew, int32(_pNew.X10)+i32(1)) != 0 {
+ _pNew.XwsFlags = _saved_wsFlags
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq = _saved_nEq
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnBtm = _saved_nBtm
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnTop = _saved_nTop
+ _pNew.XnLTerm = _saved_nLTerm
+ if _whereLoopResize(tls, _db, _pNew, int32(_pNew.XnLTerm)+int32(1)) != 0 {
goto _16
}
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(postInc14((*uint16)(unsafe.Pointer(&(_pNew.X10))), uint16(1))))) = _pTerm
- *(*uint64)(unsafe.Pointer(&(_pNew.X0))) = (_saved_prereq | (_pTerm.X11)) & (^(_pNew.X1))
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), uintptr(postInc76(&_pNew.XnLTerm, uint16(1)))) = _pTerm
+ _pNew.Xprereq = (_saved_prereq | _pTerm.XprereqRight) & (^_pNew.XmaskSelf)
func() {
- if int32(_nInMul) != i32(0) && ((_pNew.X9)&uint32(i32(8))) == uint32(i32(0)) && ((_pNew.X9)&uint32(i32(4))) == uint32(i32(0)) && ((_pNew.X9)&uint32(i32(32768))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132797), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(105800)))
+ if int32(_nInMul) != int32(0) && (_pNew.XwsFlags&uint32(8)) == (0) && (_pNew.XwsFlags&uint32(4)) == (0) && (_pNew.XwsFlags&uint32(32768)) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132797), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(105828)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_3_eOp) & i32(1)) == 0 {
+ if (int32(_3_eOp) & int32(1)) == 0 {
goto _35
}
- _8_pExpr = (*XExpr)(_pTerm.X0)
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(4))
- sink5(*p)
- }
- if ((_8_pExpr.X2) & uint32(i32(2048))) == uint32(i32(0)) {
+ _8_pExpr = (*XExpr)(_pTerm.XpExpr)
+ _pNew.XwsFlags |= uint32(4)
+ if (_8_pExpr.Xflags & uint32(2048)) == (0) {
goto _36
}
- _3_nIn = i32(46)
+ _3_nIn = int32(46)
func() {
- if i32(46) != int32(_sqlite3LogEst(tls, uint64(i32(25)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132809), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(105931)))
+ if int32(46) != int32(_sqlite3LogEst(tls, uint64(25))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132809), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(105959)))
crt.X__builtin_abort(tls)
}
}()
- _9_i = i32(0)
+ _9_i = int32(0)
_39:
- if _9_i >= (int32(_pNew.X10) - i32(1)) {
+ if _9_i >= (int32(_pNew.XnLTerm) - int32(1)) {
goto _42
}
- if ((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(_9_i)))) != nil) && ((*XExpr)((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(_9_i)))).X0) == _8_pExpr) {
- _3_nIn = i32(0)
+ if ((*elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), uintptr(_9_i))) != nil) && ((*XExpr)((*elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), uintptr(_9_i))).XpExpr) == _8_pExpr) {
+ _3_nIn = int32(0)
}
_9_i += 1
goto _39
@@ -86115,19 +87226,19 @@ _42:
goto _49
_36:
if func() int32 {
- if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_8_pExpr.X6)))))) != nil) && ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_8_pExpr.X6)))))).X0) != 0 {
- return i32(1)
+ if ((*(*unsafe.Pointer)(unsafe.Pointer(&_8_pExpr.Xx))) != nil) && ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_8_pExpr.Xx))).XnExpr) != 0 {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132819), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132819), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- _3_nIn = int32(_sqlite3LogEst(tls, uint64((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_8_pExpr.X6)))))).X0)))
+ _3_nIn = int32(_sqlite3LogEst(tls, uint64((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_8_pExpr.Xx))).XnExpr)))
func() {
- if _3_nIn <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132822), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(105953)))
+ if _3_nIn <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132822), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(105981)))
crt.X__builtin_abort(tls)
}
}()
@@ -86135,301 +87246,261 @@ _36:
_49:
goto _75
_35:
- if (int32(_3_eOp) & i32(130)) == 0 {
+ if (int32(_3_eOp) & int32(130)) == 0 {
goto _53
}
- _12_iCol = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pProbe.X1)) + 2*uintptr(_saved_nEq))))
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(1))
- sink5(*p)
- }
+ _12_iCol = int32(*elem50(_pProbe.XaiColumn, uintptr(_saved_nEq)))
+ _pNew.XwsFlags |= uint32(1)
func() {
- if int32(_saved_nEq) != int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132828), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(105959)))
+ if int32(_saved_nEq) != int32((*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132828), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(105987)))
crt.X__builtin_abort(tls)
}
}()
- if _12_iCol != i32(-1) && (_12_iCol <= i32(0) || int32(_nInMul) != i32(0) || int32(_saved_nEq) != (int32(_pProbe.X13)-i32(1))) {
+ if _12_iCol != int32(-1) && (_12_iCol <= int32(0) || int32(_nInMul) != int32(0) || int32(_saved_nEq) != (int32(_pProbe.XnKeyCol)-int32(1))) {
goto _59
}
- if (_12_iCol >= i32(0)) && (int32((uint32((_pProbe.X16)>>uint(i32(3)))<<uint(i32(31)))>>uint(i32(31))) == i32(0)) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(65536))
- sink5(*p)
- }
+ if (_12_iCol >= int32(0)) && (int32((uint32(_pProbe.XidxType>>3)<<31)>>31) == int32(0)) {
+ _pNew.XwsFlags |= uint32(65536)
goto _62
}
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(4096))
- sink5(*p)
- }
+ _pNew.XwsFlags |= uint32(4096)
_62:
_59:
goto _75
_53:
- if (int32(_3_eOp) & i32(256)) != 0 {
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(8))
- sink5(*p)
- }
+ if (int32(_3_eOp) & int32(256)) != 0 {
+ _pNew.XwsFlags |= uint32(8)
goto _75
}
- if (int32(_3_eOp) & i32(36)) == 0 {
+ if (int32(_3_eOp) & int32(36)) == 0 {
goto _66
}
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(34))
- sink5(*p)
- }
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1))) = uint16(_whereRangeVectorLen(tls, _pParse, _pSrc.X11, _pProbe, int32(_saved_nEq), _pTerm))
+ _pNew.XwsFlags |= uint32(34)
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnBtm = uint16(_whereRangeVectorLen(tls, _pParse, _pSrc.XiCursor, _pProbe, int32(_saved_nEq), _pTerm))
_pBtm = _pTerm
_pTop = nil
- if (int32(_pTerm.X3) & i32(256)) == 0 {
+ if (int32(_pTerm.XwtFlags) & int32(256)) == 0 {
goto _67
}
- _pTop = (*XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTerm)) + 48*uintptr(i32(1))))
+ _pTop = elem100(_pTerm, uintptr(1))
func() {
- if int32((uintptr(unsafe.Pointer(_pTop))-uintptr(unsafe.Pointer((*XWhereTerm)((*XWhereClause)(_pTerm.X1).X5))))/48) >= ((*XWhereClause)(_pTerm.X1).X3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132853), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(105988)))
+ if int32((uintptr(unsafe.Pointer(_pTop))-uintptr((*XWhereClause)(_pTerm.XpWC).Xa))/48) >= ((*XWhereClause)(_pTerm.XpWC).XnTerm) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132853), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(106016)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pTop.X3) & i32(256)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132854), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(106029)))
+ if (int32(_pTop.XwtFlags) & int32(256)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132854), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(106057)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pTop.X4) != i32(16) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132855), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(106058)))
+ if int32(_pTop.XeOperator) != int32(16) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132855), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(106086)))
crt.X__builtin_abort(tls)
}
}()
- if _whereLoopResize(tls, _db, _pNew, int32(_pNew.X10)+i32(1)) != 0 {
+ if _whereLoopResize(tls, _db, _pNew, int32(_pNew.XnLTerm)+int32(1)) != 0 {
goto _16
}
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(postInc14((*uint16)(unsafe.Pointer(&(_pNew.X10))), uint16(1))))) = _pTop
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(16))
- sink5(*p)
- }
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X2))) = uint16(i32(1))
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), uintptr(postInc76(&_pNew.XnLTerm, uint16(1)))) = _pTop
+ _pNew.XwsFlags |= uint32(16)
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnTop = uint16(1)
_67:
goto _75
_66:
func() {
- if (int32(_3_eOp) & i32(24)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132862), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(106081)))
+ if (int32(_3_eOp) & int32(24)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132862), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(106109)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(18))
- sink5(*p)
- }
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X2))) = uint16(_whereRangeVectorLen(tls, _pParse, _pSrc.X11, _pProbe, int32(_saved_nEq), _pTerm))
+ _pNew.XwsFlags |= uint32(18)
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnTop = uint16(_whereRangeVectorLen(tls, _pParse, _pSrc.XiCursor, _pProbe, int32(_saved_nEq), _pTerm))
_pTop = _pTerm
_pBtm = func() *XWhereTerm {
- if ((_pNew.X9) & uint32(i32(32))) != uint32(i32(0)) {
- return (*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(int32(_pNew.X10)-i32(2)))))
+ if (_pNew.XwsFlags & uint32(32)) != (0) {
+ return (*elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), uintptr(int32(_pNew.XnLTerm)-int32(2))))
}
return nil
}()
_75:
func() {
- if int32(_pNew.X7) != int32(_saved_nOut) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132879), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(106101)))
+ if int32(_pNew.XnOut) != int32(_saved_nOut) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132879), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(106129)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pNew.X9) & uint32(i32(2))) != 0 {
+ if (_pNew.XwsFlags & uint32(2)) != 0 {
_whereRangeScanEst(tls, _pParse, _pBuilder, _pBtm, _pTop, _pNew)
goto _83
}
- _21_nEq = int32(preInc14((*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0))), uint16(1)))
+ _21_nEq = int32(preInc76(&((*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq), uint16(1)))
func() {
- if (int32(_3_eOp) & i32(387)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132886), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(106124)))
+ if (int32(_3_eOp) & int32(387)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132886), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(106152)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pNew.X7) != int32(_saved_nOut) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132888), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(106101)))
+ if int32(_pNew.XnOut) != int32(_saved_nOut) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132888), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(106129)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pTerm.X2) <= i32(0)) && (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pProbe.X1)) + 2*uintptr(_saved_nEq)))) >= i32(0)) {
+ if (int32(_pTerm.XtruthProb) <= int32(0)) && (int32(*elem50(_pProbe.XaiColumn, uintptr(_saved_nEq))) >= int32(0)) {
func() {
- if (int32(_3_eOp)&i32(1)) == 0 && _3_nIn != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132890), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(106160)))
+ if (int32(_3_eOp)&int32(1)) == 0 && _3_nIn != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132890), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(106188)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*int16)(unsafe.Pointer(&(_pNew.X7)))
- *p = int16(int32(*p) + int32(_pTerm.X2))
- sink18(*p)
+ p := &_pNew.XnOut
+ *p = int16(int32(*p) + int32(_pTerm.XtruthProb))
}
{
- p := (*int16)(unsafe.Pointer(&(_pNew.X7)))
+ p := &_pNew.XnOut
*p = int16(int32(*p) - _3_nIn)
- sink18(*p)
}
goto _93
}
{
- p := (*int16)(unsafe.Pointer(&(_pNew.X7)))
- *p = int16(int32(*p) + (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pProbe.X2)) + 2*uintptr(_21_nEq)))) - int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pProbe.X2)) + 2*uintptr(_21_nEq-i32(1)))))))
- sink18(*p)
+ p := &_pNew.XnOut
+ *p = int16(int32(*p) + (int32(*elem50(_pProbe.XaiRowLogEst, uintptr(_21_nEq))) - int32(*elem50(_pProbe.XaiRowLogEst, uintptr(_21_nEq-int32(1))))))
}
- if (int32(_3_eOp) & i32(256)) != 0 {
+ if (int32(_3_eOp) & int32(256)) != 0 {
{
- p := (*int16)(unsafe.Pointer(&(_pNew.X7)))
- *p = int16(int32(*p) + i32(10))
- sink18(*p)
+ p := &_pNew.XnOut
+ *p = int16(int32(*p) + int32(10))
}
}
_93:
_83:
- _3_rCostIdx = int16((int32(_pNew.X7) + i32(1)) + ((i32(15) * int32(_pProbe.X12)) / int32((*XTable)(_pSrc.X4).X13)))
- *(*int16)(unsafe.Pointer(&(_pNew.X6))) = _sqlite3LogEstAdd(tls, _rLogSize, _3_rCostIdx)
- if ((_pNew.X9) & uint32(i32(320))) == uint32(i32(0)) {
- *(*int16)(unsafe.Pointer(&(_pNew.X6))) = _sqlite3LogEstAdd(tls, _pNew.X6, int16(int32(_pNew.X7)+i32(16)))
+ _3_rCostIdx = int16((int32(_pNew.XnOut) + int32(1)) + ((int32(15) * int32(_pProbe.XszIdxRow)) / int32((*XTable)(_pSrc.XpTab).XszTabRow)))
+ _pNew.XrRun = _sqlite3LogEstAdd(tls, _rLogSize, _3_rCostIdx)
+ if (_pNew.XwsFlags & uint32(320)) == (0) {
+ _pNew.XrRun = _sqlite3LogEstAdd(tls, _pNew.XrRun, int16(int32(_pNew.XnOut)+int32(16)))
}
- _3_nOutUnadjusted = _pNew.X7
+ _3_nOutUnadjusted = _pNew.XnOut
{
- p := (*int16)(unsafe.Pointer(&(_pNew.X6)))
+ p := &_pNew.XrRun
*p = int16(int32(*p) + (int32(_nInMul) + _3_nIn))
- sink18(*p)
}
{
- p := (*int16)(unsafe.Pointer(&(_pNew.X7)))
+ p := &_pNew.XnOut
*p = int16(int32(*p) + (int32(_nInMul) + _3_nIn))
- sink18(*p)
}
- _whereLoopOutputAdjust(tls, (*XWhereClause)(_pBuilder.X1), _pNew, _rSize)
+ _whereLoopOutputAdjust(tls, (*XWhereClause)(_pBuilder.XpWC), _pNew, _rSize)
_rc = _whereLoopInsert(tls, _pBuilder, _pNew)
- if ((_pNew.X9) & uint32(i32(2))) != 0 {
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = _saved_nOut
+ if (_pNew.XwsFlags & uint32(2)) != 0 {
+ _pNew.XnOut = _saved_nOut
goto _97
}
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = _3_nOutUnadjusted
+ _pNew.XnOut = _3_nOutUnadjusted
_97:
- if (((_pNew.X9) & uint32(i32(16))) == uint32(i32(0))) && (int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0) < int32(_pProbe.X14)) {
+ if ((_pNew.XwsFlags & uint32(16)) == (0)) && (int32((*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq) < int32(_pProbe.XnColumn)) {
_whereLoopAddBtreeIndex(tls, _pBuilder, _pSrc, _pProbe, int16(int32(_nInMul)+_3_nIn))
}
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = _saved_nOut
+ _pNew.XnOut = _saved_nOut
_13:
_pTerm = _whereScanNext(tls, &_scan)
goto _12
_16:
- *(*uint64)(unsafe.Pointer(&(_pNew.X0))) = _saved_prereq
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0))) = _saved_nEq
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X1))) = _saved_nBtm
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X2))) = _saved_nTop
- *(*uint16)(unsafe.Pointer(&(_pNew.X11))) = _saved_nSkip
- *(*uint32)(unsafe.Pointer(&(_pNew.X9))) = _saved_wsFlags
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = _saved_nOut
- *(*uint16)(unsafe.Pointer(&(_pNew.X10))) = _saved_nLTerm
- func() {
- if i32(42) != int32(_sqlite3LogEst(tls, uint64(i32(18)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132985), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000))), unsafe.Pointer(str(106184)))
- crt.X__builtin_abort(tls)
- }
- }()
- if ((((int32(_saved_nEq) == int32(_saved_nSkip)) && ((int32(_saved_nEq) + i32(1)) < int32(_pProbe.X13))) && (int32((uint32((_pProbe.X16)>>uint(i32(6)))<<uint(i32(31)))>>uint(i32(31))) == i32(0))) && (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pProbe.X2)) + 2*uintptr(int32(_saved_nEq)+i32(1))))) >= i32(42))) && (store1(&_rc, _whereLoopResize(tls, _db, _pNew, int32(_pNew.X10)+i32(1))) == i32(0)) {
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0))) += 1
- *(*uint16)(unsafe.Pointer(&(_pNew.X11))) += 1
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(postInc14((*uint16)(unsafe.Pointer(&(_pNew.X10))), uint16(1))))) = nil
+ _pNew.Xprereq = _saved_prereq
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq = _saved_nEq
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnBtm = _saved_nBtm
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnTop = _saved_nTop
+ _pNew.XnSkip = _saved_nSkip
+ _pNew.XwsFlags = _saved_wsFlags
+ _pNew.XnOut = _saved_nOut
+ _pNew.XnLTerm = _saved_nLTerm
+ func() {
+ if int32(42) != int32(_sqlite3LogEst(tls, uint64(18))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132985), unsafe.Pointer(&_whereLoopAddBtreeIndexØ00__func__Ø000), unsafe.Pointer(str(106212)))
+ crt.X__builtin_abort(tls)
+ }
+ }()
+ if ((((int32(_saved_nEq) == int32(_saved_nSkip)) && ((int32(_saved_nEq) + int32(1)) < int32(_pProbe.XnKeyCol))) && (int32((uint32(_pProbe.XidxType>>6)<<31)>>31) == int32(0))) && (int32(*elem50(_pProbe.XaiRowLogEst, uintptr(int32(_saved_nEq)+int32(1)))) >= int32(42))) && (store2(&_rc, _whereLoopResize(tls, _db, _pNew, int32(_pNew.XnLTerm)+int32(1))) == int32(0)) {
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq += 1
+ _pNew.XnSkip += 1
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), uintptr(postInc76(&_pNew.XnLTerm, uint16(1)))) = nil
+ _pNew.XwsFlags |= uint32(32768)
+ _30_nIter = int16(int32(*elem50(_pProbe.XaiRowLogEst, uintptr(_saved_nEq))) - int32(*elem50(_pProbe.XaiRowLogEst, uintptr(int32(_saved_nEq)+int32(1)))))
{
- p := (*uint32)(unsafe.Pointer(&(_pNew.X9)))
- *p = (*p) | uint32(i32(32768))
- sink5(*p)
- }
- _30_nIter = int16(int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pProbe.X2)) + 2*uintptr(_saved_nEq)))) - int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pProbe.X2)) + 2*uintptr(int32(_saved_nEq)+i32(1))))))
- {
- p := (*int16)(unsafe.Pointer(&(_pNew.X7)))
+ p := &_pNew.XnOut
*p = int16(int32(*p) - int32(_30_nIter))
- sink18(*p)
}
{
p := &_30_nIter
- *p = int16(int32(*p) + i32(5))
- sink18(*p)
+ *p = int16(int32(*p) + int32(5))
}
_whereLoopAddBtreeIndex(tls, _pBuilder, _pSrc, _pProbe, int16(int32(_30_nIter)+int32(_nInMul)))
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = _saved_nOut
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pNew.X8))))).X0))) = _saved_nEq
- *(*uint16)(unsafe.Pointer(&(_pNew.X11))) = _saved_nSkip
- *(*uint32)(unsafe.Pointer(&(_pNew.X9))) = _saved_wsFlags
+ _pNew.XnOut = _saved_nOut
+ (*t101)(unsafe.Pointer(&_pNew.Xu)).XnEq = _saved_nEq
+ _pNew.XnSkip = _saved_nSkip
+ _pNew.XwsFlags = _saved_wsFlags
}
return _rc
-
- _ = _scan
- panic(0)
}
var _whereLoopAddBtreeIndexØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_whereLoopAddBtreeIndexØ00__func__Ø000[0], str(106206), 23)
-}
-
-// Term pTerm is a vector range comparison operation. The first comparison
-// in the vector can be optimized using column nEq of the index. This
-// function returns the total number of vector elements that can be used
-// as part of the range comparison.
-//
-// For example, if the query is:
-//
-// WHERE a = ? AND (b, c, d) > (?, ?, ?)
-//
-// and the index:
-//
-// CREATE INDEX ... ON (a, b, c, d, e)
-//
-// then this function would be invoked with nEq=1. The value returned in
-// this case is 3.
+ crt.Xstrncpy(nil, &_whereLoopAddBtreeIndexØ00__func__Ø000[0], str(106234), 23)
+}
+
+// C comment
+// /*
+// ** Term pTerm is a vector range comparison operation. The first comparison
+// ** in the vector can be optimized using column nEq of the index. This
+// ** function returns the total number of vector elements that can be used
+// ** as part of the range comparison.
+// **
+// ** For example, if the query is:
+// **
+// ** WHERE a = ? AND (b, c, d) > (?, ?, ?)
+// **
+// ** and the index:
+// **
+// ** CREATE INDEX ... ON (a, b, c, d, e)
+// **
+// ** then this function would be invoked with nEq=1. The value returned in
+// ** this case is 3.
+// */
func _whereRangeVectorLen(tls *crt.TLS, _pParse *XParse, _iCur int32, _pIdx *XIndex, _nEq int32, _pTerm *XWhereTerm) (r0 int32) {
var _nCmp, _i int32
var _1_aff, _1_idxaff int8
var _1_pLhs, _1_pRhs *XExpr
var _1_pColl *XCollSeq
- _nCmp = _sqlite3ExprVectorSize(tls, (*XExpr)((*XExpr)(_pTerm.X0).X4))
+ _nCmp = _sqlite3ExprVectorSize(tls, (*XExpr)((*XExpr)(_pTerm.XpExpr).XpLeft))
_nCmp = func() int32 {
- if _nCmp < (int32(_pIdx.X14) - _nEq) {
+ if _nCmp < (int32(_pIdx.XnColumn) - _nEq) {
return _nCmp
}
- return (int32(_pIdx.X14) - _nEq)
+ return (int32(_pIdx.XnColumn) - _nEq)
}()
- _i = i32(1)
+ _i = int32(1)
_2:
if _i >= _nCmp {
goto _5
}
- _1_idxaff = int8(i32(0))
- _1_pLhs = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)((*XExpr)(_pTerm.X0).X4).X6)))))).X2))))) + 20*uintptr(_i))).X0)
- _1_pRhs = (*XExpr)((*XExpr)(_pTerm.X0).X5)
- if ((_1_pRhs.X2) & uint32(i32(2048))) != 0 {
- _1_pRhs = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_1_pRhs.X6)))))).X0).X2))))) + 20*uintptr(_i))).X0)
+ _1_idxaff = 0
+ _1_pLhs = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)((*XExpr)(_pTerm.XpExpr).XpLeft).Xx)))).Xa))), uintptr(_i)).XpExpr)
+ _1_pRhs = (*XExpr)((*XExpr)(_pTerm.XpExpr).XpRight)
+ if (_1_pRhs.Xflags & uint32(2048)) != 0 {
+ _1_pRhs = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_1_pRhs.Xx))).XpEList).Xa))), uintptr(_i)).XpExpr)
goto _7
}
- _1_pRhs = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_1_pRhs.X6)))))).X2))))) + 20*uintptr(_i))).X0)
+ _1_pRhs = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_1_pRhs.Xx))).Xa))), uintptr(_i)).XpExpr)
_7:
- if (((int32(_1_pLhs.X0) != i32(152)) || ((_1_pLhs.X8) != _iCur)) || (int32(_1_pLhs.X9) != int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i+_nEq)))))) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X7)) + 1*uintptr(_i+_nEq)))) != int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X7)) + 1*uintptr(_nEq))))) {
+ if (((int32(_1_pLhs.Xop) != int32(152)) || (_1_pLhs.XiTable != _iCur)) || (int32(_1_pLhs.XiColumn) != int32(*elem50(_pIdx.XaiColumn, uintptr(_i+_nEq))))) || (int32(*elem15(_pIdx.XaSortOrder, uintptr(_i+_nEq))) != int32(*elem15(_pIdx.XaSortOrder, uintptr(_nEq)))) {
goto _5
}
_1_aff = _sqlite3CompareAffinity(tls, _1_pRhs, _sqlite3ExprAffinity(tls, _1_pLhs))
- _1_idxaff = _sqlite3TableColumnAffinity(tls, (*XTable)(_pIdx.X3), int32(_1_pLhs.X9))
+ _1_idxaff = _sqlite3TableColumnAffinity(tls, (*XTable)(_pIdx.XpTable), int32(_1_pLhs.XiColumn))
if int32(_1_aff) != int32(_1_idxaff) {
goto _5
}
@@ -86437,7 +87508,7 @@ _7:
if _1_pColl == nil {
goto _5
}
- if _sqlite3StrICmp(tls, _1_pColl.X0, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_i+_nEq)))) != 0 {
+ if _sqlite3StrICmp(tls, _1_pColl.XzName, *elem0(_pIdx.XazColl, uintptr(_i+_nEq))) != 0 {
goto _5
}
_i += 1
@@ -86446,124 +87517,123 @@ _5:
return _i
}
-// This function is used to estimate the number of rows that will be visited
-// by scanning an index for a range of values. The range may have an upper
-// bound, a lower bound, or both. The WHERE clause terms that set the upper
-// and lower bounds are represented by pLower and pUpper respectively. For
-// example, assuming that index p is on t1(a):
-//
-// ... FROM t1 WHERE a > ? AND a < ? ...
-// |_____| |_____|
-// | |
-// pLower pUpper
-//
-// If either of the upper or lower bound is not present, then NULL is passed in
-// place of the corresponding WhereTerm.
-//
-// The value in (pBuilder->pNew->u.btree.nEq) is the number of the index
-// column subject to the range constraint. Or, equivalently, the number of
-// equality constraints optimized by the proposed index scan. For example,
-// assuming index p is on t1(a, b), and the SQL query is:
-//
-// ... FROM t1 WHERE a = ? AND b > ? AND b < ? ...
-//
-// then nEq is set to 1 (as the range restricted column, b, is the second
-// left-most column of the index). Or, if the query is:
-//
-// ... FROM t1 WHERE a > ? AND a < ? ...
-//
-// then nEq is set to 0.
-//
-// When this function is called, *pnOut is set to the sqlite3LogEst() of the
-// number of rows that the index scan is expected to visit without
-// considering the range constraints. If nEq is 0, then *pnOut is the number of
-// rows in the index. Assuming no error occurs, *pnOut is adjusted (reduced)
-// to account for the range constraints pLower and pUpper.
-//
-// In the absence of sqlite_stat4 ANALYZE data, or if such data cannot be
-// used, a single range inequality reduces the search space by a factor of 4.
-// and a pair of constraints (x>? AND x<?) reduces the expected number of
-// rows visited by a factor of 64.
+// C comment
+// /*
+// ** This function is used to estimate the number of rows that will be visited
+// ** by scanning an index for a range of values. The range may have an upper
+// ** bound, a lower bound, or both. The WHERE clause terms that set the upper
+// ** and lower bounds are represented by pLower and pUpper respectively. For
+// ** example, assuming that index p is on t1(a):
+// **
+// ** ... FROM t1 WHERE a > ? AND a < ? ...
+// ** |_____| |_____|
+// ** | |
+// ** pLower pUpper
+// **
+// ** If either of the upper or lower bound is not present, then NULL is passed in
+// ** place of the corresponding WhereTerm.
+// **
+// ** The value in (pBuilder->pNew->u.btree.nEq) is the number of the index
+// ** column subject to the range constraint. Or, equivalently, the number of
+// ** equality constraints optimized by the proposed index scan. For example,
+// ** assuming index p is on t1(a, b), and the SQL query is:
+// **
+// ** ... FROM t1 WHERE a = ? AND b > ? AND b < ? ...
+// **
+// ** then nEq is set to 1 (as the range restricted column, b, is the second
+// ** left-most column of the index). Or, if the query is:
+// **
+// ** ... FROM t1 WHERE a > ? AND a < ? ...
+// **
+// ** then nEq is set to 0.
+// **
+// ** When this function is called, *pnOut is set to the sqlite3LogEst() of the
+// ** number of rows that the index scan is expected to visit without
+// ** considering the range constraints. If nEq is 0, then *pnOut is the number of
+// ** rows in the index. Assuming no error occurs, *pnOut is adjusted (reduced)
+// ** to account for the range constraints pLower and pUpper.
+// **
+// ** In the absence of sqlite_stat4 ANALYZE data, or if such data cannot be
+// ** used, a single range inequality reduces the search space by a factor of 4.
+// ** and a pair of constraints (x>? AND x<?) reduces the expected number of
+// ** rows visited by a factor of 64.
+// */
func _whereRangeScanEst(tls *crt.TLS, _pParse *XParse, _pBuilder *XWhereLoopBuilder, _pLower *XWhereTerm, _pUpper *XWhereTerm, _pLoop *XWhereLoop) (r0 int32) {
var _nNew int16
var _rc, _nOut int32
- _rc = i32(0)
- _nOut = int32(_pLoop.X7)
+ _rc = int32(0)
+ _nOut = int32(_pLoop.XnOut)
func() {
if _pLower == nil && _pUpper == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131911), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereRangeScanEstØ00__func__Ø000))), unsafe.Pointer(str(106229)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131911), unsafe.Pointer(&_whereRangeScanEstØ00__func__Ø000), unsafe.Pointer(str(106257)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pUpper != nil && (int32(_pUpper.X3)&i32(0)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131913), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereRangeScanEstØ00__func__Ø000))), unsafe.Pointer(str(106246)))
+ if _pUpper != nil && (int32(_pUpper.XwtFlags)&int32(0)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131913), unsafe.Pointer(&_whereRangeScanEstØ00__func__Ø000), unsafe.Pointer(str(106274)))
crt.X__builtin_abort(tls)
}
}()
_nNew = _whereRangeAdjust(tls, _pLower, int16(_nOut))
_nNew = _whereRangeAdjust(tls, _pUpper, _nNew)
- if (((_pLower != nil) && (int32(_pLower.X2) > i32(0))) && (_pUpper != nil)) && (int32(_pUpper.X2) > i32(0)) {
+ if (((_pLower != nil) && (int32(_pLower.XtruthProb) > int32(0))) && (_pUpper != nil)) && (int32(_pUpper.XtruthProb) > int32(0)) {
{
p := &_nNew
- *p = int16(int32(*p) - i32(20))
- sink18(*p)
+ *p = int16(int32(*p) - int32(20))
}
}
- {
- p := &_nOut
- *p = (*p) - (bool2int(_pLower != nil) + bool2int(_pUpper != nil))
- sink1(*p)
- }
- if int32(_nNew) < i32(10) {
- _nNew = int16(i32(10))
+ _nOut -= bool2int(_pLower != nil) + bool2int(_pUpper != nil)
+ if int32(_nNew) < int32(10) {
+ _nNew = int16(10)
}
if int32(_nNew) < _nOut {
_nOut = int32(_nNew)
}
- *(*int16)(unsafe.Pointer(&(_pLoop.X7))) = int16(_nOut)
+ _pLoop.XnOut = int16(_nOut)
return _rc
}
var _whereRangeScanEstØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_whereRangeScanEstØ00__func__Ø000[0], str(106293), 18)
+ crt.Xstrncpy(nil, &_whereRangeScanEstØ00__func__Ø000[0], str(106321), 18)
}
-// If it is not NULL, pTerm is a term that provides an upper or lower
-// bound on a range scan. Without considering pTerm, it is estimated
-// that the scan will visit nNew rows. This function returns the number
-// estimated to be visited after taking pTerm into account.
-//
-// If the user explicitly specified a likelihood() value for this term,
-// then the return value is the likelihood multiplied by the number of
-// input rows. Otherwise, this function assumes that an "IS NOT NULL" term
-// has a likelihood of 0.50, and any other term a likelihood of 0.25.
+// C comment
+// /*
+// ** If it is not NULL, pTerm is a term that provides an upper or lower
+// ** bound on a range scan. Without considering pTerm, it is estimated
+// ** that the scan will visit nNew rows. This function returns the number
+// ** estimated to be visited after taking pTerm into account.
+// **
+// ** If the user explicitly specified a likelihood() value for this term,
+// ** then the return value is the likelihood multiplied by the number of
+// ** input rows. Otherwise, this function assumes that an "IS NOT NULL" term
+// ** has a likelihood of 0.50, and any other term a likelihood of 0.25.
+// */
func _whereRangeAdjust(tls *crt.TLS, _pTerm *XWhereTerm, _nNew int16) (r0 int16) {
var _nRet int16
_nRet = _nNew
if _pTerm == nil {
goto _0
}
- if int32(_pTerm.X2) <= i32(0) {
+ if int32(_pTerm.XtruthProb) <= int32(0) {
{
p := &_nRet
- *p = int16(int32(*p) + int32(_pTerm.X2))
- sink18(*p)
+ *p = int16(int32(*p) + int32(_pTerm.XtruthProb))
}
goto _3
}
- if (int32(_pTerm.X3) & i32(0)) == i32(0) {
+ if (int32(_pTerm.XwtFlags) & int32(0)) == int32(0) {
{
p := &_nRet
- *p = int16(int32(*p) - i32(20))
- sink18(*p)
+ *p = int16(int32(*p) - int32(20))
}
func() {
- if i32(20) != int32(_sqlite3LogEst(tls, uint64(i32(4)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131610), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereRangeAdjustØ00__func__Ø000))), unsafe.Pointer(str(106311)))
+ if int32(20) != int32(_sqlite3LogEst(tls, uint64(4))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131610), unsafe.Pointer(&_whereRangeAdjustØ00__func__Ø000), unsafe.Pointer(str(106339)))
crt.X__builtin_abort(tls)
}
}()
@@ -86576,11 +87646,14 @@ _0:
var _whereRangeAdjustØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_whereRangeAdjustØ00__func__Ø000[0], str(106332), 17)
+ crt.Xstrncpy(nil, &_whereRangeAdjustØ00__func__Ø000[0], str(106360), 17)
}
-// Add WhereLoop entries to handle OR terms. This works for either
-// btrees or virtual tables.
+// C comment
+// /*
+// ** Add WhereLoop entries to handle OR terms. This works for either
+// ** btrees or virtual tables.
+// */
func _whereLoopAddOr(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _mPrereq uint64, _mUnusable uint64) (r0 int32) {
var _rc, _iCur, _2_once, _2_i, _2_j int32
var _pItem *TSrcList_item
@@ -86591,86 +87664,86 @@ func _whereLoopAddOr(tls *crt.TLS, _pBuilder *XWhereLoopBuilder, _mPrereq uint64
var _pWC, _2_pOrWC *XWhereClause
var _sSum, _sCur, _12_sPrev XWhereOrSet
var _sSubBuild XWhereLoopBuilder
- _pWInfo = (*XWhereInfo)(_pBuilder.X0)
- _rc = i32(0)
- _pWC = (*XWhereClause)(_pBuilder.X1)
- _pWCEnd = (*XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereTerm)(_pWC.X5))) + uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X3)))))*uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(48)))))))))))
- _pNew = (*XWhereLoop)(_pBuilder.X3)
- crt.Xmemset(tls, (unsafe.Pointer)(&_sSum), i32(0), u32(40))
- _pItem = (*TSrcList_item)(unsafe.Pointer(uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.X1).X2))))))) + uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(_pNew.X3)))))*uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(68)))))))))))
- _iCur = _pItem.X11
- _pTerm = (*XWhereTerm)(_pWC.X5)
+ _pWInfo = (*XWhereInfo)(_pBuilder.XpWInfo)
+ _rc = int32(0)
+ _pWC = (*XWhereClause)(_pBuilder.XpWC)
+ _pWCEnd = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.Xa) + uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.XnTerm)*uintptr(unsafe.Pointer((*XWhereTerm)(unsafe.Pointer(uintptr(48)))))))))))
+ _pNew = (*XWhereLoop)(_pBuilder.XpNew)
+ crt.Xmemset(tls, unsafe.Pointer(&_sSum), int32(0), uint32(40))
+ _pItem = (*TSrcList_item)(unsafe.Pointer(uintptr(unsafe.Pointer(&((*XSrcList)(_pWInfo.XpTabList).Xa))) + uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(_pNew.XiTab)*uintptr(unsafe.Pointer((*TSrcList_item)(unsafe.Pointer(uintptr(68)))))))))))
+ _iCur = _pItem.XiCursor
+ _pTerm = (*XWhereTerm)(_pWC.Xa)
_0:
- if uintptr(unsafe.Pointer(_pTerm)) >= uintptr(unsafe.Pointer(_pWCEnd)) || _rc != i32(0) {
+ if crt.P2U(unsafe.Pointer(_pTerm)) >= crt.P2U(unsafe.Pointer(_pWCEnd)) || _rc != int32(0) {
goto _4
}
- if (int32(_pTerm.X4)&i32(512)) == i32(0) || (((*XWhereOrInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))).X1)&(_pNew.X1)) == uint64(i32(0)) {
+ if (int32(_pTerm.XeOperator)&int32(512)) == int32(0) || (((*XWhereOrInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pTerm.Xu))).Xindexable)&_pNew.XmaskSelf) == (0) {
goto _6
}
- _2_pOrWC = (*XWhereClause)(unsafe.Pointer(&((*XWhereOrInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))).X0)))
- _2_pOrWCEnd = (*XWhereTerm)(unsafe.Pointer(uintptr(_2_pOrWC.X5) + 48*uintptr(_2_pOrWC.X3)))
- _2_once = i32(1)
+ _2_pOrWC = &((*XWhereOrInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pTerm.Xu))).Xwc)
+ _2_pOrWCEnd = elem100((*XWhereTerm)(_2_pOrWC.Xa), uintptr(_2_pOrWC.XnTerm))
+ _2_once = int32(1)
_sSubBuild = *_pBuilder
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sSubBuild.X2))))) = nil
- *(**XWhereOrSet)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sSubBuild.X4))))) = &_sCur
- _2_pOrTerm = (*XWhereTerm)(_2_pOrWC.X5)
+ *(**XExprList)(unsafe.Pointer(&_sSubBuild.XpOrderBy)) = nil
+ *(**XWhereOrSet)(unsafe.Pointer(&_sSubBuild.XpOrSet)) = &_sCur
+ _2_pOrTerm = (*XWhereTerm)(_2_pOrWC.Xa)
_7:
- if uintptr(unsafe.Pointer(_2_pOrTerm)) >= uintptr(unsafe.Pointer(_2_pOrWCEnd)) {
+ if crt.P2U(unsafe.Pointer(_2_pOrTerm)) >= crt.P2U(unsafe.Pointer(_2_pOrWCEnd)) {
goto _10
}
- if (int32(_2_pOrTerm.X4) & i32(1024)) != i32(0) {
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sSubBuild.X1))))) = (*XWhereClause)(unsafe.Pointer(&((*XWhereAndInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_2_pOrTerm.X10)))))).X0)))
+ if (int32(_2_pOrTerm.XeOperator) & int32(1024)) != int32(0) {
+ *(**XWhereClause)(unsafe.Pointer(&_sSubBuild.XpWC)) = &((*XWhereAndInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_2_pOrTerm.Xu))).Xwc)
goto _14
}
- if (_2_pOrTerm.X8) == _iCur {
- *(**XWhereInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_tempWC.X0))))) = (*XWhereInfo)(_pWC.X0)
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_tempWC.X1))))) = _pWC
- *(*uint8)(unsafe.Pointer(&(_tempWC.X2))) = uint8(i32(71))
- *(*int32)(unsafe.Pointer(&(_tempWC.X3))) = i32(1)
- *(**XWhereTerm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_tempWC.X5))))) = _2_pOrTerm
- *(**XWhereClause)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sSubBuild.X1))))) = &_tempWC
+ if _2_pOrTerm.XleftCursor == _iCur {
+ *(**XWhereInfo)(unsafe.Pointer(&_tempWC.XpWInfo)) = (*XWhereInfo)(_pWC.XpWInfo)
+ *(**XWhereClause)(unsafe.Pointer(&_tempWC.XpOuter)) = _pWC
+ _tempWC.Xop = uint8(71)
+ _tempWC.XnTerm = int32(1)
+ *(**XWhereTerm)(unsafe.Pointer(&_tempWC.Xa)) = _2_pOrTerm
+ *(**XWhereClause)(unsafe.Pointer(&_sSubBuild.XpWC)) = &_tempWC
goto _14
}
goto _8
_14:
- *(*uint16)(unsafe.Pointer(&(_sCur.X0))) = uint16(i32(0))
- if ((*XTable)(_pItem.X4).X16) != 0 {
+ _sCur.Xn = 0
+ if ((*XTable)(_pItem.XpTab).XnModuleArg) != 0 {
_rc = _whereLoopAddVirtual(tls, &_sSubBuild, _mPrereq, _mUnusable)
goto _16
}
_rc = _whereLoopAddBtree(tls, &_sSubBuild, _mPrereq)
_16:
- if _rc == i32(0) {
+ if _rc == int32(0) {
_rc = _whereLoopAddOr(tls, &_sSubBuild, _mPrereq, _mUnusable)
}
func() {
- if _rc != i32(0) && int32(_sCur.X0) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133724), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLoopAddOrØ00__func__Ø000))), unsafe.Pointer(str(106349)))
+ if _rc != int32(0) && int32(_sCur.Xn) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133724), unsafe.Pointer(&_whereLoopAddOrØ00__func__Ø000), unsafe.Pointer(str(106377)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_sCur.X0) == i32(0) {
- *(*uint16)(unsafe.Pointer(&(_sSum.X0))) = uint16(i32(0))
+ if int32(_sCur.Xn) == int32(0) {
+ _sSum.Xn = 0
goto _10
}
if _2_once != 0 {
_whereOrMove(tls, &_sSum, &_sCur)
- _2_once = i32(0)
+ _2_once = int32(0)
goto _24
}
_whereOrMove(tls, &_12_sPrev, &_sSum)
- *(*uint16)(unsafe.Pointer(&(_sSum.X0))) = uint16(i32(0))
- _2_i = i32(0)
+ _sSum.Xn = 0
+ _2_i = int32(0)
_25:
- if _2_i >= int32(_12_sPrev.X0) {
+ if _2_i >= int32(_12_sPrev.Xn) {
goto _28
}
- _2_j = i32(0)
+ _2_j = int32(0)
_29:
- if _2_j >= int32(_sCur.X0) {
+ if _2_j >= int32(_sCur.Xn) {
goto _32
}
- _whereOrInsert(tls, &_sSum, ((*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_12_sPrev.X1)))))+12*uintptr(_2_i))).X0)|((*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_sCur.X1)))))+12*uintptr(_2_j))).X0), _sqlite3LogEstAdd(tls, (*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_12_sPrev.X1)))))+12*uintptr(_2_i))).X1, (*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_sCur.X1)))))+12*uintptr(_2_j))).X1), _sqlite3LogEstAdd(tls, (*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_12_sPrev.X1)))))+12*uintptr(_2_i))).X2, (*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_sCur.X1)))))+12*uintptr(_2_j))).X2))
+ _whereOrInsert(tls, &_sSum, (elem110((*XWhereOrCost)(unsafe.Pointer(&_12_sPrev.Xa)), uintptr(_2_i)).Xprereq)|(elem110((*XWhereOrCost)(unsafe.Pointer(&_sCur.Xa)), uintptr(_2_j)).Xprereq), _sqlite3LogEstAdd(tls, elem110((*XWhereOrCost)(unsafe.Pointer(&_12_sPrev.Xa)), uintptr(_2_i)).XrRun, elem110((*XWhereOrCost)(unsafe.Pointer(&_sCur.Xa)), uintptr(_2_j)).XrRun), _sqlite3LogEstAdd(tls, elem110((*XWhereOrCost)(unsafe.Pointer(&_12_sPrev.Xa)), uintptr(_2_i)).XnOut, elem110((*XWhereOrCost)(unsafe.Pointer(&_sCur.Xa)), uintptr(_2_j)).XnOut))
_2_j += 1
goto _29
_32:
@@ -86682,20 +87755,20 @@ _8:
*(*uintptr)(unsafe.Pointer(&_2_pOrTerm)) += uintptr(48)
goto _7
_10:
- *(*uint16)(unsafe.Pointer(&(_pNew.X10))) = uint16(i32(1))
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X13)) + 4*uintptr(i32(0)))) = _pTerm
- *(*uint32)(unsafe.Pointer(&(_pNew.X9))) = uint32(i32(8192))
- *(*int16)(unsafe.Pointer(&(_pNew.X5))) = int16(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pNew.X4))) = uint8(i32(0))
- crt.Xmemset(tls, (unsafe.Pointer)((*t62)(unsafe.Pointer(&(_pNew.X8)))), i32(0), u32(12))
- _2_i = i32(0)
+ _pNew.XnLTerm = uint16(1)
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pNew.XaLTerm)), 0) = _pTerm
+ _pNew.XwsFlags = uint32(8192)
+ _pNew.XrSetup = 0
+ _pNew.XiSortIdx = 0
+ crt.Xmemset(tls, unsafe.Pointer(&_pNew.Xu), int32(0), uint32(12))
+ _2_i = int32(0)
_33:
- if _rc != i32(0) || _2_i >= int32(_sSum.X0) {
+ if _rc != int32(0) || _2_i >= int32(_sSum.Xn) {
goto _37
}
- *(*int16)(unsafe.Pointer(&(_pNew.X6))) = int16(int32((*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_sSum.X1)))))+12*uintptr(_2_i))).X1) + i32(1))
- *(*int16)(unsafe.Pointer(&(_pNew.X7))) = (*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_sSum.X1))))) + 12*uintptr(_2_i))).X2
- *(*uint64)(unsafe.Pointer(&(_pNew.X0))) = (*XWhereOrCost)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_sSum.X1))))) + 12*uintptr(_2_i))).X0
+ _pNew.XrRun = int16(int32(elem110((*XWhereOrCost)(unsafe.Pointer(&_sSum.Xa)), uintptr(_2_i)).XrRun) + int32(1))
+ _pNew.XnOut = elem110((*XWhereOrCost)(unsafe.Pointer(&_sSum.Xa)), uintptr(_2_i)).XnOut
+ _pNew.Xprereq = elem110((*XWhereOrCost)(unsafe.Pointer(&_sSum.Xa)), uintptr(_2_i)).Xprereq
_rc = _whereLoopInsert(tls, _pBuilder, _pNew)
_2_i += 1
goto _33
@@ -86705,37 +87778,36 @@ _6:
goto _0
_4:
return _rc
-
- _ = _tempWC
- _ = _sSubBuild
- _ = _sSum
- _ = _sCur
- _ = _12_sPrev
- panic(0)
}
var _whereLoopAddOrØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_whereLoopAddOrØ00__func__Ø000[0], str(106376), 15)
+ crt.Xstrncpy(nil, &_whereLoopAddOrØ00__func__Ø000[0], str(106404), 15)
}
-// Move the content of pSrc into pDest
+// C comment
+// /*
+// ** Move the content of pSrc into pDest
+// */
func _whereOrMove(tls *crt.TLS, _pDest *XWhereOrSet, _pSrc *XWhereOrSet) {
- *(*uint16)(unsafe.Pointer(&(_pDest.X0))) = _pSrc.X0
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_pDest.X1)))), (unsafe.Pointer)((*[3]XWhereOrCost)(unsafe.Pointer(&(_pSrc.X1)))), uint32(_pDest.X0)*u32(12))
-}
-
-// Given the list of WhereLoop objects at pWInfo->pLoops, this routine
-// attempts to find the lowest cost path that visits each WhereLoop
-// once. This path is then loaded into the pWInfo->a[].pWLoop fields.
-//
-// Assume that the total number of output rows that will need to be sorted
-// will be nRowEst (in the 10*log2 representation). Or, ignore sorting
-// costs if nRowEst==0.
-//
-// Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation
-// error occurs.
+ _pDest.Xn = _pSrc.Xn
+ crt.Xmemcpy(tls, unsafe.Pointer(&_pDest.Xa), unsafe.Pointer(&_pSrc.Xa), uint32(_pDest.Xn)*uint32(12))
+}
+
+// C comment
+// /*
+// ** Given the list of WhereLoop objects at pWInfo->pLoops, this routine
+// ** attempts to find the lowest cost path that visits each WhereLoop
+// ** once. This path is then loaded into the pWInfo->a[].pWLoop fields.
+// **
+// ** Assume that the total number of output rows that will need to be sorted
+// ** will be nRowEst (in the 10*log2 representation). Or, ignore sorting
+// ** costs if nRowEst==0.
+// **
+// ** Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation
+// ** error occurs.
+// */
func _wherePathSolver(tls *crt.TLS, _pWInfo *XWhereInfo, _nRowEst int16) (r0 int32) {
var _mxCost, _mxUnsorted, _8_nOut, _8_rCost, _8_rUnsorted int16
var _mxChoice, _nLoop, _iLoop, _ii, _jj, _mxI, _nOrderBy, _nTo, _nFrom, _nSpace, _29_rc, _37_rc, _39_nOrder int32
@@ -86750,169 +87822,164 @@ func _wherePathSolver(tls *crt.TLS, _pWInfo *XWhereInfo, _nRowEst int16) (r0 int
var _28_pLevel *XWhereLevel
var _pX **XWhereLoop
var _aFrom, _aTo, _pFrom, _pTo *XWherePath
- _mxI = i32(0)
- _mxCost = i16(0)
- _mxUnsorted = i16(0)
+ _mxI = int32(0)
+ _mxCost = int16(0)
+ _mxUnsorted = int16(0)
_aSortCost = nil
- _pParse = (*XParse)(_pWInfo.X0)
- _db = (*Xsqlite3)(_pParse.X0)
- _nLoop = int32(_pWInfo.X11)
+ _pParse = (*XParse)(_pWInfo.XpParse)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _nLoop = int32(_pWInfo.XnLevel)
_mxChoice = func() int32 {
- if _nLoop <= i32(1) {
- return i32(1)
+ if _nLoop <= int32(1) {
+ return int32(1)
}
return func() int32 {
- if _nLoop == i32(2) {
- return i32(5)
+ if _nLoop == int32(2) {
+ return int32(5)
}
- return i32(10)
+ return int32(10)
}()
}()
func() {
- if _nLoop > ((*XSrcList)(_pWInfo.X1).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134255), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSolverØ00__func__Ø000))), unsafe.Pointer(str(106391)))
+ if _nLoop > ((*XSrcList)(_pWInfo.XpTabList).XnSrc) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134255), unsafe.Pointer(&_wherePathSolverØ00__func__Ø000), unsafe.Pointer(str(106419)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XExprList)(_pWInfo.X2) == nil) || (int32(_nRowEst) == i32(0)) {
- _nOrderBy = i32(0)
+ if ((*XExprList)(_pWInfo.XpOrderBy) == nil) || (int32(_nRowEst) == int32(0)) {
+ _nOrderBy = int32(0)
goto _8
}
- _nOrderBy = (*XExprList)(_pWInfo.X2).X0
+ _nOrderBy = (*XExprList)(_pWInfo.XpOrderBy).XnExpr
_8:
- _nSpace = int32(((u32(28) + (u32(4) * uint32(_nLoop))) * uint32(_mxChoice)) * uint32(i32(2)))
+ _nSpace = int32(((uint32(28) + (uint32(4) * uint32(_nLoop))) * uint32(_mxChoice)) * uint32(2))
{
p := &_nSpace
- *p = int32(uint32(*p) + (u32(2) * uint32(_nOrderBy)))
- sink1(*p)
+ *p = int32(uint32(*p) + (uint32(2) * uint32(_nOrderBy)))
}
_pSpace = (*int8)(_sqlite3DbMallocRawNN(tls, _db, uint64(_nSpace)))
if _pSpace == nil {
- return _sqlite3NomemError(tls, i32(134273))
+ return _sqlite3NomemError(tls, int32(134273))
}
_aTo = (*XWherePath)(unsafe.Pointer(_pSpace))
- _aFrom = (*XWherePath)(unsafe.Pointer(uintptr(unsafe.Pointer(_aTo)) + uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(_mxChoice)))))*uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(28)))))))))))
- crt.Xmemset(tls, (unsafe.Pointer)(_aFrom), i32(0), u32(28))
- _pX = (**XWhereLoop)(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(unsafe.Pointer(_aFrom)) + uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(_mxChoice)))))*uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(28)))))))))))))
- *func() **XWherePath { _ii = _mxChoice * i32(2); return &_pFrom }() = _aTo
+ _aFrom = (*XWherePath)(unsafe.Pointer(uintptr(unsafe.Pointer(_aTo)) + uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(_mxChoice)*uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(28)))))))))))
+ crt.Xmemset(tls, unsafe.Pointer(_aFrom), int32(0), uint32(28))
+ _pX = (**XWhereLoop)(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(unsafe.Pointer(_aFrom)) + uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(_mxChoice)*uintptr(unsafe.Pointer((*XWherePath)(unsafe.Pointer(uintptr(28)))))))))))))
+ *func() **XWherePath { _ii = _mxChoice * int32(2); return &_pFrom }() = _aTo
_10:
- if _ii <= i32(0) {
+ if _ii <= int32(0) {
goto _13
}
- *(***XWhereLoop)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_pFrom.X6))))) = _pX
- {
- p := func() ***XWhereLoop {
- *(*uintptr)(unsafe.Pointer(func() **XWherePath { _ii -= 1; return &_pFrom }())) += uintptr(28)
- return &_pX
- }()
- *p = (**XWhereLoop)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 4*uintptr(_nLoop)))
- sink68(*p)
- }
+ *(***XWhereLoop)(unsafe.Pointer(&_pFrom.XaLoop)) = _pX
+ *(*uintptr)(unsafe.Pointer(func() ***XWhereLoop {
+ *(*uintptr)(unsafe.Pointer(func() **XWherePath { _ii -= 1; return &_pFrom }())) += uintptr(28)
+ return &_pX
+ }())) += 4 * uintptr(_nLoop)
goto _10
_13:
if _nOrderBy != 0 {
_aSortCost = (*int16)(unsafe.Pointer(_pX))
- crt.Xmemset(tls, (unsafe.Pointer)(_aSortCost), i32(0), u32(2)*uint32(_nOrderBy))
+ crt.Xmemset(tls, unsafe.Pointer(_aSortCost), int32(0), uint32(2)*uint32(_nOrderBy))
}
func() {
- if _aSortCost != nil && (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pSpace))+1*uintptr(_nSpace))) != (*int8)(unsafe.Pointer((*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSortCost))+2*uintptr(_nOrderBy))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134291), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSolverØ00__func__Ø000))), unsafe.Pointer(str(106421)))
+ if _aSortCost != nil && elem1(_pSpace, uintptr(_nSpace)) != (*int8)(unsafe.Pointer(elem50(_aSortCost, uintptr(_nOrderBy)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134291), unsafe.Pointer(&_wherePathSolverØ00__func__Ø000), unsafe.Pointer(str(106449)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _aSortCost == nil && (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pSpace))+1*uintptr(_nSpace))) != (*int8)(unsafe.Pointer(_pX)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134292), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSolverØ00__func__Ø000))), unsafe.Pointer(str(106482)))
+ if _aSortCost == nil && elem1(_pSpace, uintptr(_nSpace)) != (*int8)(unsafe.Pointer(_pX)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134292), unsafe.Pointer(&_wherePathSolverØ00__func__Ø000), unsafe.Pointer(str(106510)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&((*XWherePath)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrom)) + 28*uintptr(i32(0)))).X2))) = int16(func() uint32 {
- if (_pParse.X42) < uint32(i32(48)) {
- return (_pParse.X42)
+ elem111(_aFrom, 0).XnRow = int16(func() uint32 {
+ if _pParse.XnQueryLoop < uint32(48) {
+ return _pParse.XnQueryLoop
}
- return uint32(i32(48))
+ return uint32(48)
}())
func() {
- if i32(48) != int32(_sqlite3LogEst(tls, uint64(i32(28)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134299), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSolverØ00__func__Ø000))), unsafe.Pointer(str(106525)))
+ if int32(48) != int32(_sqlite3LogEst(tls, uint64(28))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134299), unsafe.Pointer(&_wherePathSolverØ00__func__Ø000), unsafe.Pointer(str(106553)))
crt.X__builtin_abort(tls)
}
}()
- _nFrom = i32(1)
+ _nFrom = int32(1)
func() {
- if int32((*XWherePath)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrom))+28*uintptr(i32(0)))).X5) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134301), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSolverØ00__func__Ø000))), unsafe.Pointer(str(106547)))
+ if int32(elem111(_aFrom, 0).XisOrdered) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134301), unsafe.Pointer(&_wherePathSolverØ00__func__Ø000), unsafe.Pointer(str(106575)))
crt.X__builtin_abort(tls)
}
}()
if _nOrderBy != 0 {
- *(*int8)(unsafe.Pointer(&((*XWherePath)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrom)) + 28*uintptr(i32(0)))).X5))) = int8(func() int32 {
- if _nLoop > i32(0) {
- return i32(-1)
+ elem111(_aFrom, 0).XisOrdered = int8(func() int32 {
+ if _nLoop > int32(0) {
+ return int32(-1)
}
return _nOrderBy
}())
}
- _iLoop = i32(0)
+ _iLoop = int32(0)
_30:
if _iLoop >= _nLoop {
goto _33
}
- _nTo = i32(0)
- *func() **XWherePath { _ii = i32(0); return &_pFrom }() = _aFrom
+ _nTo = int32(0)
+ *func() **XWherePath { _ii = int32(0); return &_pFrom }() = _aFrom
_34:
if _ii >= _nFrom {
goto _37
}
- _pWLoop = (*XWhereLoop)(_pWInfo.X19)
+ _pWLoop = (*XWhereLoop)(_pWInfo.XpLoops)
_38:
if _pWLoop == nil {
goto _41
}
- _8_isOrdered = _pFrom.X5
- _8_revMask = uint64(i32(0))
- if ((_pWLoop.X0) & (^(_pFrom.X0))) != uint64(i32(0)) {
+ _8_isOrdered = _pFrom.XisOrdered
+ _8_revMask = 0
+ if (_pWLoop.Xprereq & (^_pFrom.XmaskLoop)) != (0) {
goto _39
}
- if ((_pWLoop.X1) & (_pFrom.X0)) != uint64(i32(0)) {
+ if (_pWLoop.XmaskSelf & _pFrom.XmaskLoop) != (0) {
goto _39
}
- if (((_pWLoop.X9) & uint32(i32(16384))) != uint32(i32(0))) && (int32(_pFrom.X2) < i32(10)) {
+ if ((_pWLoop.XwsFlags & uint32(16384)) != (0)) && (int32(_pFrom.XnRow) < int32(10)) {
func() {
- if i32(10) != int32(_sqlite3LogEst(tls, uint64(i32(2)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134331), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSolverØ00__func__Ø000))), unsafe.Pointer(str(60363)))
+ if int32(10) != int32(_sqlite3LogEst(tls, uint64(2))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134331), unsafe.Pointer(&_wherePathSolverØ00__func__Ø000), unsafe.Pointer(str(86888)))
crt.X__builtin_abort(tls)
}
}()
goto _39
}
- _8_rUnsorted = _sqlite3LogEstAdd(tls, _pWLoop.X5, int16(int32(_pWLoop.X6)+int32(_pFrom.X2)))
- _8_rUnsorted = _sqlite3LogEstAdd(tls, _8_rUnsorted, _pFrom.X4)
- _8_nOut = int16(int32(_pFrom.X2) + int32(_pWLoop.X7))
- _8_maskNew = (_pFrom.X0) | (_pWLoop.X1)
- if int32(_8_isOrdered) < i32(0) {
- _8_isOrdered = _wherePathSatisfiesOrderBy(tls, _pWInfo, (*XExprList)(_pWInfo.X2), _pFrom, _pWInfo.X10, uint16(_iLoop), _pWLoop, &_8_revMask)
+ _8_rUnsorted = _sqlite3LogEstAdd(tls, _pWLoop.XrSetup, int16(int32(_pWLoop.XrRun)+int32(_pFrom.XnRow)))
+ _8_rUnsorted = _sqlite3LogEstAdd(tls, _8_rUnsorted, _pFrom.XrUnsorted)
+ _8_nOut = int16(int32(_pFrom.XnRow) + int32(_pWLoop.XnOut))
+ _8_maskNew = _pFrom.XmaskLoop | _pWLoop.XmaskSelf
+ if int32(_8_isOrdered) < int32(0) {
+ _8_isOrdered = _wherePathSatisfiesOrderBy(tls, _pWInfo, (*XExprList)(_pWInfo.XpOrderBy), _pFrom, _pWInfo.XwctrlFlags, uint16(_iLoop), _pWLoop, &_8_revMask)
goto _49
}
- _8_revMask = _pFrom.X1
+ _8_revMask = _pFrom.XrevLoop
_49:
- if int32(_8_isOrdered) < i32(0) || int32(_8_isOrdered) >= _nOrderBy {
+ if int32(_8_isOrdered) < int32(0) || int32(_8_isOrdered) >= _nOrderBy {
goto _51
}
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSortCost)) + 2*uintptr(_8_isOrdered)))) == i32(0) {
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSortCost)) + 2*uintptr(_8_isOrdered))) = _whereSortingCost(tls, _pWInfo, _nRowEst, _nOrderBy, int32(_8_isOrdered))
+ if int32(*elem50(_aSortCost, uintptr(_8_isOrdered))) == int32(0) {
+ *elem50(_aSortCost, uintptr(_8_isOrdered)) = _whereSortingCost(tls, _pWInfo, _nRowEst, _nOrderBy, int32(_8_isOrdered))
}
- _8_rCost = _sqlite3LogEstAdd(tls, _8_rUnsorted, *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aSortCost)) + 2*uintptr(_8_isOrdered))))
+ _8_rCost = _sqlite3LogEstAdd(tls, _8_rUnsorted, *elem50(_aSortCost, uintptr(_8_isOrdered)))
goto _53
_51:
_8_rCost = _8_rUnsorted
_53:
- *func() **XWherePath { _jj = i32(0); return &_pTo }() = _aTo
+ *func() **XWherePath { _jj = int32(0); return &_pTo }() = _aTo
_54:
if _jj >= _nTo {
goto _57
}
- if ((_pTo.X0) == _8_maskNew) && (((int32(_pTo.X5) ^ int32(_8_isOrdered)) & i32(128)) == i32(0)) {
+ if (_pTo.XmaskLoop == _8_maskNew) && (((int32(_pTo.XisOrdered) ^ int32(_8_isOrdered)) & int32(128)) == int32(0)) {
goto _57
}
*(*uintptr)(unsafe.Pointer(func() **XWherePath { _jj += 1; return &_pTo }())) += uintptr(28)
@@ -86925,40 +87992,40 @@ _57:
goto _39
}
if _nTo < _mxChoice {
- _jj = postInc1(&_nTo, int32(1))
+ _jj = postInc2(&_nTo, 1)
goto _66
}
_jj = _mxI
_66:
- _pTo = (*XWherePath)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aTo)) + 28*uintptr(_jj)))
+ _pTo = elem111(_aTo, uintptr(_jj))
goto _67
_60:
- if (int32(_pTo.X3) < int32(_8_rCost)) || ((int32(_pTo.X3) == int32(_8_rCost)) && (int32(_pTo.X2) <= int32(_8_nOut))) {
+ if (int32(_pTo.XrCost) < int32(_8_rCost)) || ((int32(_pTo.XrCost) == int32(_8_rCost)) && (int32(_pTo.XnRow) <= int32(_8_nOut))) {
goto _39
}
_67:
- *(*uint64)(unsafe.Pointer(&(_pTo.X0))) = (_pFrom.X0) | (_pWLoop.X1)
- *(*uint64)(unsafe.Pointer(&(_pTo.X1))) = _8_revMask
- *(*int16)(unsafe.Pointer(&(_pTo.X2))) = _8_nOut
- *(*int16)(unsafe.Pointer(&(_pTo.X3))) = _8_rCost
- *(*int16)(unsafe.Pointer(&(_pTo.X4))) = _8_rUnsorted
- *(*int8)(unsafe.Pointer(&(_pTo.X5))) = _8_isOrdered
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pTo.X6), (unsafe.Pointer)(_pFrom.X6), u32(4)*uint32(_iLoop))
- *(**XWhereLoop)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTo.X6)) + 4*uintptr(_iLoop))) = _pWLoop
+ _pTo.XmaskLoop = _pFrom.XmaskLoop | _pWLoop.XmaskSelf
+ _pTo.XrevLoop = _8_revMask
+ _pTo.XnRow = _8_nOut
+ _pTo.XrCost = _8_rCost
+ _pTo.XrUnsorted = _8_rUnsorted
+ _pTo.XisOrdered = _8_isOrdered
+ crt.Xmemcpy(tls, unsafe.Pointer(_pTo.XaLoop), unsafe.Pointer(_pFrom.XaLoop), uint32(4)*uint32(_iLoop))
+ *elem112((**XWhereLoop)(unsafe.Pointer(_pTo.XaLoop)), uintptr(_iLoop)) = _pWLoop
if _nTo < _mxChoice {
goto _71
}
- _mxI = i32(0)
- _mxCost = (*XWherePath)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aTo)) + 28*uintptr(i32(0)))).X3
- _mxUnsorted = (*XWherePath)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aTo)) + 28*uintptr(i32(0)))).X2
- *func() **XWherePath { _jj = i32(1); return &_pTo }() = (*XWherePath)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aTo)) + 28*uintptr(i32(1))))
+ _mxI = int32(0)
+ _mxCost = elem111(_aTo, 0).XrCost
+ _mxUnsorted = elem111(_aTo, 0).XnRow
+ *func() **XWherePath { _jj = int32(1); return &_pTo }() = elem111(_aTo, uintptr(1))
_72:
if _jj >= _mxChoice {
goto _75
}
- if (int32(_pTo.X3) > int32(_mxCost)) || ((int32(_pTo.X3) == int32(_mxCost)) && (int32(_pTo.X4) > int32(_mxUnsorted))) {
- _mxCost = _pTo.X3
- _mxUnsorted = _pTo.X4
+ if (int32(_pTo.XrCost) > int32(_mxCost)) || ((int32(_pTo.XrCost) == int32(_mxCost)) && (int32(_pTo.XrUnsorted) > int32(_mxUnsorted))) {
+ _mxCost = _pTo.XrCost
+ _mxUnsorted = _pTo.XrUnsorted
_mxI = _jj
}
*(*uintptr)(unsafe.Pointer(func() **XWherePath { _jj += 1; return &_pTo }())) += uintptr(28)
@@ -86966,7 +88033,7 @@ _72:
_75:
_71:
_39:
- _pWLoop = (*XWhereLoop)(_pWLoop.X14)
+ _pWLoop = (*XWhereLoop)(_pWLoop.XpNextLoop)
goto _38
_41:
*(*uintptr)(unsafe.Pointer(func() **XWherePath { _ii += 1; return &_pFrom }())) += uintptr(28)
@@ -86979,129 +88046,129 @@ _37:
_iLoop += 1
goto _30
_33:
- if _nFrom == i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(106569))
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_pSpace))
- return i32(1)
+ if _nFrom == int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(106597))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_pSpace))
+ return int32(1)
}
_pFrom = _aFrom
- _ii = i32(1)
+ _ii = int32(1)
_80:
if _ii >= _nFrom {
goto _83
}
- if int32(_pFrom.X3) > int32((*XWherePath)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrom))+28*uintptr(_ii))).X3) {
- _pFrom = (*XWherePath)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aFrom)) + 28*uintptr(_ii)))
+ if int32(_pFrom.XrCost) > int32(elem111(_aFrom, uintptr(_ii)).XrCost) {
+ _pFrom = elem111(_aFrom, uintptr(_ii))
}
_ii += 1
goto _80
_83:
func() {
- if int32(_pWInfo.X11) != _nLoop {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134512), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSolverØ00__func__Ø000))), unsafe.Pointer(str(106587)))
+ if int32(_pWInfo.XnLevel) != _nLoop {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134512), unsafe.Pointer(&_wherePathSolverØ00__func__Ø000), unsafe.Pointer(str(106615)))
crt.X__builtin_abort(tls)
}
}()
- _iLoop = i32(0)
+ _iLoop = int32(0)
_87:
if _iLoop >= _nLoop {
goto _90
}
- _28_pLevel = (*XWhereLevel)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereLevel)(unsafe.Pointer((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))))) + uintptr(unsafe.Pointer((*XWhereLevel)(unsafe.Pointer(uintptr(unsafe.Pointer((*XWhereLevel)(unsafe.Pointer(uintptr(_iLoop)))))*uintptr(unsafe.Pointer((*XWhereLevel)(unsafe.Pointer(uintptr(76)))))))))))
- *(**XWhereLoop)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_28_pLevel.X18))))) = store67(&_pWLoop, *(**XWhereLoop)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pFrom.X6)) + 4*uintptr(_iLoop))))
- *(*uint8)(unsafe.Pointer(&(_28_pLevel.X11))) = _pWLoop.X3
- *(*int32)(unsafe.Pointer(&(_28_pLevel.X1))) = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.X1).X2))))) + 68*uintptr(_28_pLevel.X11))).X11
+ _28_pLevel = (*XWhereLevel)(unsafe.Pointer(uintptr(unsafe.Pointer(&_pWInfo.Xa)) + uintptr(unsafe.Pointer((*XWhereLevel)(unsafe.Pointer(uintptr(_iLoop)*uintptr(unsafe.Pointer((*XWhereLevel)(unsafe.Pointer(uintptr(76)))))))))))
+ *(**XWhereLoop)(unsafe.Pointer(&_28_pLevel.XpWLoop)) = store109(&_pWLoop, *elem112((**XWhereLoop)(unsafe.Pointer(_pFrom.XaLoop)), uintptr(_iLoop)))
+ _28_pLevel.XiFrom = _pWLoop.XiTab
+ _28_pLevel.XiTabCur = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.XpTabList).Xa))), uintptr(_28_pLevel.XiFrom)).XiCursor
_iLoop += 1
goto _87
_90:
- if (int32(_pWInfo.X10)&i32(256)) == i32(0) || (int32(_pWInfo.X10)&i32(128)) != i32(0) || int32(_pWInfo.X16) != i32(0) || _nRowEst == 0 {
+ if (int32(_pWInfo.XwctrlFlags)&int32(256)) == int32(0) || (int32(_pWInfo.XwctrlFlags)&int32(128)) != int32(0) || int32(_pWInfo.XeDistinct) != int32(0) || _nRowEst == 0 {
goto _94
}
- _29_rc = int32(_wherePathSatisfiesOrderBy(tls, _pWInfo, (*XExprList)(_pWInfo.X3), _pFrom, uint16(i32(128)), uint16(_nLoop-i32(1)), *(**XWhereLoop)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pFrom.X6)) + 4*uintptr(_nLoop-i32(1)))), &_29_notUsed))
- if _29_rc == ((*XExprList)(_pWInfo.X3).X0) {
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X16))) = uint8(i32(2))
+ _29_rc = int32(_wherePathSatisfiesOrderBy(tls, _pWInfo, (*XExprList)(_pWInfo.XpResultSet), _pFrom, uint16(128), uint16(_nLoop-int32(1)), *elem112((**XWhereLoop)(unsafe.Pointer(_pFrom.XaLoop)), uintptr(_nLoop-int32(1))), &_29_notUsed))
+ if _29_rc == ((*XExprList)(_pWInfo.XpResultSet).XnExpr) {
+ _pWInfo.XeDistinct = uint8(2)
}
_94:
- if (*XExprList)(_pWInfo.X2) == nil {
+ if _pWInfo.XpOrderBy == nil {
goto _96
}
- if (int32(_pWInfo.X10) & i32(128)) == 0 {
+ if (int32(_pWInfo.XwctrlFlags) & int32(128)) == 0 {
goto _97
}
- if int32(_pFrom.X5) == ((*XExprList)(_pWInfo.X2).X0) {
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X16))) = uint8(i32(2))
+ if int32(_pFrom.XisOrdered) == ((*XExprList)(_pWInfo.XpOrderBy).XnExpr) {
+ _pWInfo.XeDistinct = uint8(2)
}
goto _99
_97:
- *(*int8)(unsafe.Pointer(&(_pWInfo.X12))) = _pFrom.X5
- *(*uint64)(unsafe.Pointer(&(_pWInfo.X20))) = _pFrom.X1
- if int32(_pWInfo.X12) > i32(0) {
+ _pWInfo.XnOBSat = _pFrom.XisOrdered
+ _pWInfo.XrevMask = _pFrom.XrevLoop
+ if int32(_pWInfo.XnOBSat) > int32(0) {
goto _100
}
- *(*int8)(unsafe.Pointer(&(_pWInfo.X12))) = int8(i32(0))
- if _nLoop <= i32(0) {
+ _pWInfo.XnOBSat = 0
+ if _nLoop <= int32(0) {
goto _101
}
- _36_wsFlags = (*(**XWhereLoop)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pFrom.X6)) + 4*uintptr(_nLoop-i32(1))))).X9
- if (_36_wsFlags&uint32(i32(4096))) != uint32(i32(0)) || (_36_wsFlags&uint32(i32(260))) == uint32(i32(260)) {
+ _36_wsFlags = (*elem112((**XWhereLoop)(unsafe.Pointer(_pFrom.XaLoop)), uintptr(_nLoop-int32(1)))).XwsFlags
+ if (_36_wsFlags&uint32(4096)) != (0) || (_36_wsFlags&uint32(260)) == uint32(260) {
goto _103
}
- _37_m = u64(0)
- _37_rc = int32(_wherePathSatisfiesOrderBy(tls, _pWInfo, (*XExprList)(_pWInfo.X2), _pFrom, uint16(i32(2048)), uint16(_nLoop-i32(1)), *(**XWhereLoop)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pFrom.X6)) + 4*uintptr(_nLoop-i32(1)))), &_37_m))
- if _37_rc == ((*XExprList)(_pWInfo.X2).X0) {
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X17))) = uint8(i32(1))
- *(*uint64)(unsafe.Pointer(&(_pWInfo.X20))) = _37_m
+ _37_m = uint64(0)
+ _37_rc = int32(_wherePathSatisfiesOrderBy(tls, _pWInfo, (*XExprList)(_pWInfo.XpOrderBy), _pFrom, uint16(2048), uint16(_nLoop-int32(1)), *elem112((**XWhereLoop)(unsafe.Pointer(_pFrom.XaLoop)), uintptr(_nLoop-int32(1))), &_37_m))
+ if _37_rc == ((*XExprList)(_pWInfo.XpOrderBy).XnExpr) {
+ _pWInfo.XbOrderedInnerLoop = uint8(1)
+ _pWInfo.XrevMask = _37_m
}
_103:
_101:
_100:
_99:
- if (int32(_pWInfo.X10)&i32(512)) == 0 || int32(_pWInfo.X12) != ((*XExprList)(_pWInfo.X2).X0) || _nLoop <= i32(0) {
+ if (int32(_pWInfo.XwctrlFlags)&int32(512)) == 0 || int32(_pWInfo.XnOBSat) != ((*XExprList)(_pWInfo.XpOrderBy).XnExpr) || _nLoop <= int32(0) {
goto _107
}
- _39_revMask = u64(0)
- _39_nOrder = int32(_wherePathSatisfiesOrderBy(tls, _pWInfo, (*XExprList)(_pWInfo.X2), _pFrom, uint16(i32(0)), uint16(_nLoop-i32(1)), *(**XWhereLoop)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pFrom.X6)) + 4*uintptr(_nLoop-i32(1)))), &_39_revMask))
+ _39_revMask = uint64(0)
+ _39_nOrder = int32(_wherePathSatisfiesOrderBy(tls, _pWInfo, (*XExprList)(_pWInfo.XpOrderBy), _pFrom, 0, uint16(_nLoop-int32(1)), *elem112((**XWhereLoop)(unsafe.Pointer(_pFrom.XaLoop)), uintptr(_nLoop-int32(1))), &_39_revMask))
func() {
- if int32(_pWInfo.X13) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134567), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSolverØ00__func__Ø000))), unsafe.Pointer(str(106609)))
+ if int32(_pWInfo.Xsorted) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134567), unsafe.Pointer(&_wherePathSolverØ00__func__Ø000), unsafe.Pointer(str(106637)))
crt.X__builtin_abort(tls)
}
}()
- if _39_nOrder == ((*XExprList)(_pWInfo.X2).X0) {
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X13))) = uint8(i32(1))
- *(*uint64)(unsafe.Pointer(&(_pWInfo.X20))) = _39_revMask
+ if _39_nOrder == ((*XExprList)(_pWInfo.XpOrderBy).XnExpr) {
+ _pWInfo.Xsorted = uint8(1)
+ _pWInfo.XrevMask = _39_revMask
}
_107:
_96:
- *(*int16)(unsafe.Pointer(&(_pWInfo.X21))) = _pFrom.X2
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_pSpace))
- return i32(0)
-
- _ = _29_notUsed
- panic(0)
+ _pWInfo.XnRowOut = _pFrom.XnRow
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_pSpace))
+ return int32(0)
}
var _wherePathSolverØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_wherePathSolverØ00__func__Ø000[0], str(106627), 16)
-}
-
-// Examine a WherePath (with the addition of the extra WhereLoop of the 6th
-// parameters) to see if it outputs rows in the requested ORDER BY
-// (or GROUP BY) without requiring a separate sort operation. Return N:
-//
-// N>0: N terms of the ORDER BY clause are satisfied
-// N==0: No terms of the ORDER BY clause are satisfied
-// N<0: Unknown yet how many terms of ORDER BY might be satisfied.
-//
-// Note that processing for WHERE_GROUPBY and WHERE_DISTINCTBY is not as
-// strict. With GROUP BY and DISTINCT the only requirement is that
-// equivalent rows appear immediately adjacent to one another. GROUP BY
-// and DISTINCT do not require rows to appear in any particular order as long
-// as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT
-// the pOrderBy terms can be matched in any order. With ORDER BY, the
-// pOrderBy terms must be matched in strict left-to-right order.
+ crt.Xstrncpy(nil, &_wherePathSolverØ00__func__Ø000[0], str(106655), 16)
+}
+
+// C comment
+// /*
+// ** Examine a WherePath (with the addition of the extra WhereLoop of the 6th
+// ** parameters) to see if it outputs rows in the requested ORDER BY
+// ** (or GROUP BY) without requiring a separate sort operation. Return N:
+// **
+// ** N>0: N terms of the ORDER BY clause are satisfied
+// ** N==0: No terms of the ORDER BY clause are satisfied
+// ** N<0: Unknown yet how many terms of ORDER BY might be satisfied.
+// **
+// ** Note that processing for WHERE_GROUPBY and WHERE_DISTINCTBY is not as
+// ** strict. With GROUP BY and DISTINCT the only requirement is that
+// ** equivalent rows appear immediately adjacent to one another. GROUP BY
+// ** and DISTINCT do not require rows to appear in any particular order as long
+// ** as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT
+// ** the pOrderBy terms can be matched in any order. With ORDER BY, the
+// ** pOrderBy terms must be matched in strict left-to-right order.
+// */
func _wherePathSatisfiesOrderBy(tls *crt.TLS, _pWInfo *XWhereInfo, _pOrderBy *XExprList, _pPath *XWherePath, _wctrlFlags uint16, _nLoop uint16, _pLast *XWhereLoop, _pRevMask *uint64) (r0 int8) {
var _iLoop, _i, _j, _iCur, _iColumn int32
var _obSat, _obDone, _orderDistinctMask, _ready, _38_mTerm, _41_m uint64
@@ -87115,212 +88182,203 @@ func _wherePathSatisfiesOrderBy(tls *crt.TLS, _pWInfo *XWhereInfo, _pOrderBy *XE
var _pLoop *XWhereLoop
var _pTerm *XWhereTerm
_pLoop = nil
- _db = (*Xsqlite3)((*XParse)(_pWInfo.X0).X0)
- _obSat = u64(0)
+ _db = (*Xsqlite3)((*XParse)(_pWInfo.XpParse).Xdb)
+ _obSat = uint64(0)
func() {
if _pOrderBy == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133901), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000))), unsafe.Pointer(str(106643)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133901), unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000), unsafe.Pointer(str(106671)))
crt.X__builtin_abort(tls)
}
}()
- if (_nLoop != 0) && ((int32(_db.X13) & i32(128)) != i32(0)) {
- return int8(i32(0))
+ if (_nLoop != 0) && ((int32(_db.XdbOptFlags) & int32(128)) != int32(0)) {
+ return 0
}
- _nOrderBy = uint16(_pOrderBy.X0)
- if int32(_nOrderBy) > i32(63) {
- return int8(i32(0))
+ _nOrderBy = uint16(_pOrderBy.XnExpr)
+ if int32(_nOrderBy) > int32(63) {
+ return 0
}
- _isOrderDistinct = uint8(i32(1))
- _obDone = (u64(1) << uint(int32(_nOrderBy))) - uint64(i32(1))
- _orderDistinctMask = uint64(i32(0))
- _ready = uint64(i32(0))
- _eqOpMask = uint16(i32(386))
- if (int32(_wctrlFlags) & i32(2048)) != 0 {
+ _isOrderDistinct = uint8(1)
+ _obDone = (uint64(1) << uint(int32(_nOrderBy))) - uint64(1)
+ _orderDistinctMask = 0
+ _ready = 0
+ _eqOpMask = uint16(386)
+ if (int32(_wctrlFlags) & int32(2048)) != 0 {
{
p := &_eqOpMask
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ *p = uint16(int32(*p) | int32(1))
}
}
- _iLoop = i32(0)
+ _iLoop = int32(0)
_6:
if _isOrderDistinct == 0 || _obSat >= _obDone || _iLoop > int32(_nLoop) {
goto _11
}
- if _iLoop > i32(0) {
- {
- p := &_ready
- *p = (*p) | (_pLoop.X1)
- sink17(*p)
- }
+ if _iLoop > int32(0) {
+ _ready |= _pLoop.XmaskSelf
}
if _iLoop >= int32(_nLoop) {
goto _13
}
- _pLoop = *(**XWhereLoop)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPath.X6)) + 4*uintptr(_iLoop)))
- if (int32(_wctrlFlags) & i32(2048)) != 0 {
+ _pLoop = *elem112((**XWhereLoop)(unsafe.Pointer(_pPath.XaLoop)), uintptr(_iLoop))
+ if (int32(_wctrlFlags) & int32(2048)) != 0 {
goto _7
}
goto _15
_13:
_pLoop = _pLast
_15:
- if ((_pLoop.X9) & uint32(i32(1024))) == 0 {
+ if (_pLoop.XwsFlags & uint32(1024)) == 0 {
goto _16
}
- if ((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X2) != 0 {
+ if ((*t105)(unsafe.Pointer(&_pLoop.Xu)).XisOrdered) != 0 {
_obSat = _obDone
}
goto _11
_16:
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X3))) = uint16(i32(0))
- _iCur = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.X1).X2))))) + 68*uintptr(_pLoop.X3))).X11
- _i = i32(0)
+ (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnIdxCol = 0
+ _iCur = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.XpTabList).Xa))), uintptr(_pLoop.XiTab)).XiCursor
+ _i = int32(0)
_19:
if _i >= int32(_nOrderBy) {
goto _22
}
- if ((u64(1) << uint(_i)) & _obSat) != 0 {
+ if ((uint64(1) << uint(_i)) & _obSat) != 0 {
goto _20
}
- _pOBExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))+20*uintptr(_i))).X0))
- if int32(_pOBExpr.X0) != i32(152) {
+ _pOBExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XpExpr))
+ if int32(_pOBExpr.Xop) != int32(152) {
goto _20
}
- if (_pOBExpr.X8) != _iCur {
+ if _pOBExpr.XiTable != _iCur {
goto _20
}
- _pTerm = _sqlite3WhereFindTerm(tls, (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22))), _iCur, int32(_pOBExpr.X9), ^_ready, uint32(_eqOpMask), nil)
+ _pTerm = _sqlite3WhereFindTerm(tls, &_pWInfo.XsWC, _iCur, int32(_pOBExpr.XiColumn), ^_ready, uint32(_eqOpMask), nil)
if _pTerm == nil {
goto _20
}
- if int32(_pTerm.X4) != i32(1) {
+ if int32(_pTerm.XeOperator) != int32(1) {
goto _27
}
func() {
- if (int32(_wctrlFlags) & i32(2048)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133946), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000))), unsafe.Pointer(str(106655)))
+ if (int32(_wctrlFlags) & int32(2048)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133946), unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000), unsafe.Pointer(str(106683)))
crt.X__builtin_abort(tls)
}
}()
- _j = i32(0)
+ _j = int32(0)
_30:
- if _j >= int32(_pLoop.X10) || _pTerm == (*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_j)))) {
+ if _j >= int32(_pLoop.XnLTerm) || _pTerm == (*elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_j))) {
goto _34
}
_j += 1
goto _30
_34:
- if _j >= int32(_pLoop.X10) {
+ if _j >= int32(_pLoop.XnLTerm) {
goto _20
}
_27:
- if (int32(_pTerm.X4)&i32(130)) == i32(0) || int32(_pOBExpr.X9) < i32(0) {
+ if (int32(_pTerm.XeOperator)&int32(130)) == int32(0) || int32(_pOBExpr.XiColumn) < int32(0) {
goto _37
}
- _pColl = _sqlite3ExprCollSeq(tls, (*XParse)(_pWInfo.X0), (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))+20*uintptr(_i))).X0))
+ _pColl = _sqlite3ExprCollSeq(tls, (*XParse)(_pWInfo.XpParse), (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XpExpr))
if _pColl == nil {
- _pColl = (*XCollSeq)(_db.X2)
+ _pColl = (*XCollSeq)(_db.XpDfltColl)
}
- _9_z1 = _pColl.X0
- _pColl = _sqlite3ExprCollSeq(tls, (*XParse)(_pWInfo.X0), (*XExpr)(_pTerm.X0))
+ _9_z1 = _pColl.XzName
+ _pColl = _sqlite3ExprCollSeq(tls, (*XParse)(_pWInfo.XpParse), (*XExpr)(_pTerm.XpExpr))
if _pColl == nil {
- _pColl = (*XCollSeq)(_db.X2)
+ _pColl = (*XCollSeq)(_db.XpDfltColl)
}
- _9_z2 = _pColl.X0
- if _sqlite3StrICmp(tls, _9_z1, _9_z2) != i32(0) {
+ _9_z2 = _pColl.XzName
+ if _sqlite3StrICmp(tls, _9_z1, _9_z2) != int32(0) {
goto _20
}
_37:
- {
- p := &_obSat
- *p = (*p) | (u64(1) << uint(_i))
- sink17(*p)
- }
+ _obSat |= uint64(1) << uint(_i)
_20:
_i += 1
goto _19
_22:
- if ((_pLoop.X9) & uint32(i32(4096))) != uint32(i32(0)) {
+ if (_pLoop.XwsFlags & uint32(4096)) != (0) {
goto _41
}
- if ((_pLoop.X9) & uint32(i32(256))) != 0 {
+ if (_pLoop.XwsFlags & uint32(256)) != 0 {
_pIndex = nil
- _nKeyCol = uint16(i32(0))
- _nColumn = uint16(i32(1))
+ _nKeyCol = 0
+ _nColumn = uint16(1)
goto _46
}
- if (store69(&_pIndex, (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4)) == nil) || (((uint32((_pIndex.X16)>>uint(i32(2))) << uint(i32(31))) >> uint(i32(31))) != 0) {
- return int8(i32(0))
+ if (store113(&_pIndex, (*XIndex)((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex)) == nil) || (((uint32(_pIndex.XidxType>>2) << 31) >> 31) != 0) {
+ return 0
}
- _nKeyCol = _pIndex.X13
- _nColumn = _pIndex.X14
+ _nKeyCol = _pIndex.XnKeyCol
+ _nColumn = _pIndex.XnColumn
func() {
- if int32(_nColumn) != (int32(_nKeyCol)+i32(1)) && (((*XTable)(_pIndex.X3).X9)&uint32(i32(32))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133974), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000))), unsafe.Pointer(str(106688)))
+ if int32(_nColumn) != (int32(_nKeyCol)+int32(1)) && (((*XTable)(_pIndex.XpTable).XtabFlags)&uint32(32)) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133974), unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000), unsafe.Pointer(str(106716)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(int32(_nColumn)-i32(1))))) != i32(-1) && (((*XTable)(_pIndex.X3).X9)&uint32(i32(32))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133975), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000))), unsafe.Pointer(str(106736)))
+ if int32(*elem50(_pIndex.XaiColumn, uintptr(int32(_nColumn)-int32(1)))) != int32(-1) && (((*XTable)(_pIndex.XpTable).XtabFlags)&uint32(32)) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133975), unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000), unsafe.Pointer(str(106764)))
crt.X__builtin_abort(tls)
}
}()
- _isOrderDistinct = uint8(bool2int(int32(_pIndex.X15) != i32(0)))
+ _isOrderDistinct = uint8(bool2int(int32(_pIndex.XonError) != int32(0)))
_46:
- _rev = store2(&_revSet, uint8(i32(0)))
- _distinctColumns = uint8(i32(0))
- _j = i32(0)
+ _rev = store3(&_revSet, 0)
+ _distinctColumns = 0
+ _j = int32(0)
_53:
if _j >= int32(_nColumn) {
goto _56
}
- _14_bOnce = uint8(i32(1))
+ _14_bOnce = uint8(1)
func() {
- if _j < int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0) && ((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_j)))) == nil) != (_j < int32(_pLoop.X11)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(133988), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000))), unsafe.Pointer(str(106803)))
+ if _j < int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq) && ((*elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_j))) == nil) != (_j < int32(_pLoop.XnSkip)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(133988), unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000), unsafe.Pointer(str(106831)))
crt.X__builtin_abort(tls)
}
}()
- if _j >= int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0) || _j < int32(_pLoop.X11) {
+ if _j >= int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq) || _j < int32(_pLoop.XnSkip) {
goto _61
}
- _15_eOp = (*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_j)))).X4
- if (int32(_15_eOp) & int32(_eqOpMask)) == i32(0) {
+ _15_eOp = (*elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_j))).XeOperator
+ if (int32(_15_eOp) & int32(_eqOpMask)) == int32(0) {
goto _62
}
- if (int32(_15_eOp) & i32(256)) != 0 {
- _isOrderDistinct = uint8(i32(0))
+ if (int32(_15_eOp) & int32(256)) != 0 {
+ _isOrderDistinct = 0
}
goto _54
_62:
if func() int32 {
- if (int32(_15_eOp) & i32(1)) != 0 {
- return i32(1)
+ if (int32(_15_eOp) & int32(1)) != 0 {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134008), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134008), unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _67
}
- _18_pX = (*XExpr)((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_j)))).X0)
- _i = _j + i32(1)
+ _18_pX = (*XExpr)((*elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_j))).XpExpr)
+ _i = _j + int32(1)
_68:
- if _i >= int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0) {
+ if _i >= int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq) {
goto _71
}
- if (*XExpr)((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_i)))).X0) == _18_pX {
+ if (*XExpr)((*elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_i))).XpExpr) == _18_pX {
func() {
- if (int32((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_i)))).X4) & i32(1)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134016), unsafe.Pointer((*int8)(unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000))), unsafe.Pointer(str(106868)))
+ if (int32((*elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_i))).XeOperator) & int32(1)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134016), unsafe.Pointer(&_wherePathSatisfiesOrderByØ00__func__Ø000), unsafe.Pointer(str(106896)))
crt.X__builtin_abort(tls)
}
}()
- _14_bOnce = uint8(i32(0))
+ _14_bOnce = 0
goto _71
}
_i += 1
@@ -87331,105 +88389,97 @@ _61:
if _pIndex == nil {
goto _75
}
- _iColumn = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_j))))
- _revIdx = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X7)) + 1*uintptr(_j)))
- if _iColumn == int32((*XTable)(_pIndex.X3).X10) {
- _iColumn = i32(-1)
+ _iColumn = int32(*elem50(_pIndex.XaiColumn, uintptr(_j)))
+ _revIdx = *elem15(_pIndex.XaSortOrder, uintptr(_j))
+ if _iColumn == int32((*XTable)(_pIndex.XpTable).XiPKey) {
+ _iColumn = int32(-1)
}
goto _77
_75:
- _iColumn = i32(-1)
- _revIdx = uint8(i32(0))
+ _iColumn = int32(-1)
+ _revIdx = 0
_77:
- if (((_isOrderDistinct != 0) && (_iColumn >= i32(0))) && (_j >= int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0))) && (int32((*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pIndex.X3).X1)+16*uintptr(_iColumn))).X3) == i32(0)) {
- _isOrderDistinct = uint8(i32(0))
+ if (((_isOrderDistinct != 0) && (_iColumn >= int32(0))) && (_j >= int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq))) && (int32(elem41((*XColumn)((*XTable)(_pIndex.XpTable).XaCol), uintptr(_iColumn)).XnotNull) == int32(0)) {
+ _isOrderDistinct = 0
}
- _isMatch = uint8(i32(0))
- _i = i32(0)
+ _isMatch = 0
+ _i = int32(0)
_82:
if _14_bOnce == 0 || _i >= int32(_nOrderBy) {
goto _86
}
- if ((u64(1) << uint(_i)) & _obSat) != 0 {
+ if ((uint64(1) << uint(_i)) & _obSat) != 0 {
goto _83
}
- _pOBExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))+20*uintptr(_i))).X0))
- if (int32(_wctrlFlags) & i32(192)) == i32(0) {
- _14_bOnce = uint8(i32(0))
+ _pOBExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XpExpr))
+ if (int32(_wctrlFlags) & int32(192)) == int32(0) {
+ _14_bOnce = 0
}
- if _iColumn < i32(-1) {
+ if _iColumn < int32(-1) {
goto _89
}
- if int32(_pOBExpr.X0) != i32(152) {
+ if int32(_pOBExpr.Xop) != int32(152) {
goto _83
}
- if (_pOBExpr.X8) != _iCur {
+ if _pOBExpr.XiTable != _iCur {
goto _83
}
- if int32(_pOBExpr.X9) != _iColumn {
+ if int32(_pOBExpr.XiColumn) != _iColumn {
goto _83
}
goto _93
_89:
- if _sqlite3ExprCompare(tls, _pOBExpr, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIndex.X10).X2)))))+20*uintptr(_j))).X0), _iCur) != 0 {
+ if _sqlite3ExprCompare(tls, _pOBExpr, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIndex.XaColExpr).Xa))), uintptr(_j)).XpExpr), _iCur) != 0 {
goto _83
}
_93:
- if _iColumn < i32(0) {
+ if _iColumn < int32(0) {
goto _95
}
- _pColl = _sqlite3ExprCollSeq(tls, (*XParse)(_pWInfo.X0), (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))+20*uintptr(_i))).X0))
+ _pColl = _sqlite3ExprCollSeq(tls, (*XParse)(_pWInfo.XpParse), (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XpExpr))
if _pColl == nil {
- _pColl = (*XCollSeq)(_db.X2)
+ _pColl = (*XCollSeq)(_db.XpDfltColl)
}
- if _sqlite3StrICmp(tls, _pColl.X0, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X8)) + 4*uintptr(_j)))) != i32(0) {
+ if _sqlite3StrICmp(tls, _pColl.XzName, *elem0(_pIndex.XazColl, uintptr(_j))) != int32(0) {
goto _83
}
_95:
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X3))) = uint16(_j + i32(1))
- _isMatch = uint8(i32(1))
+ (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnIdxCol = uint16(_j + int32(1))
+ _isMatch = uint8(1)
goto _86
_83:
_i += 1
goto _82
_86:
- if _isMatch == 0 || (int32(_wctrlFlags)&i32(64)) != i32(0) {
+ if _isMatch == 0 || (int32(_wctrlFlags)&int32(64)) != int32(0) {
goto _99
}
if _revSet == 0 {
goto _100
}
- if (int32(_rev) ^ int32(_revIdx)) != int32((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))+20*uintptr(_i))).X3) {
- _isMatch = uint8(i32(0))
+ if (int32(_rev) ^ int32(_revIdx)) != int32(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XsortOrder) {
+ _isMatch = 0
}
goto _102
_100:
- _rev = uint8(int32(_revIdx) ^ int32((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2)))))+20*uintptr(_i))).X3))
+ _rev = uint8(int32(_revIdx) ^ int32(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XsortOrder))
if _rev != 0 {
- {
- p := _pRevMask
- *p = (*p) | (u64(1) << uint(_iLoop))
- sink17(*p)
- }
+ *_pRevMask |= uint64(1) << uint(_iLoop)
}
- _revSet = uint8(i32(1))
+ _revSet = uint8(1)
_102:
_99:
if _isMatch == 0 {
goto _104
}
- if _iColumn == i32(-1) {
- _distinctColumns = uint8(i32(1))
- }
- {
- p := &_obSat
- *p = (*p) | (u64(1) << uint(_i))
- sink17(*p)
+ if _iColumn == int32(-1) {
+ _distinctColumns = uint8(1)
}
+ _obSat |= uint64(1) << uint(_i)
goto _106
_104:
- if (_j == i32(0)) || (_j < int32(_nKeyCol)) {
- _isOrderDistinct = uint8(i32(0))
+ if (_j == int32(0)) || (_j < int32(_nKeyCol)) {
+ _isOrderDistinct = 0
}
goto _56
_106:
@@ -87438,36 +88488,28 @@ _54:
goto _53
_56:
if _distinctColumns != 0 {
- _isOrderDistinct = uint8(i32(1))
+ _isOrderDistinct = uint8(1)
}
_41:
if _isOrderDistinct == 0 {
goto _110
}
- {
- p := &_orderDistinctMask
- *p = (*p) | (_pLoop.X1)
- sink17(*p)
- }
- _i = i32(0)
+ _orderDistinctMask |= _pLoop.XmaskSelf
+ _i = int32(0)
_111:
if _i >= int32(_nOrderBy) {
goto _114
}
- if ((u64(1) << uint(_i)) & _obSat) != 0 {
+ if ((uint64(1) << uint(_i)) & _obSat) != 0 {
goto _112
}
- _38_p = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pOrderBy.X2))))) + 20*uintptr(_i))).X0)
- _38_mTerm = _sqlite3WhereExprUsage(tls, (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))), _38_p)
- if (_38_mTerm == uint64(i32(0))) && (_sqlite3ExprIsConstant(tls, _38_p) == 0) {
+ _38_p = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pOrderBy.Xa)), uintptr(_i)).XpExpr)
+ _38_mTerm = _sqlite3WhereExprUsage(tls, &_pWInfo.XsMaskSet, _38_p)
+ if (_38_mTerm == (0)) && (_sqlite3ExprIsConstant(tls, _38_p) == 0) {
goto _112
}
- if (_38_mTerm & (^_orderDistinctMask)) == uint64(i32(0)) {
- {
- p := &_obSat
- *p = (*p) | (u64(1) << uint(_i))
- sink17(*p)
- }
+ if (_38_mTerm & (^_orderDistinctMask)) == (0) {
+ _obSat |= uint64(1) << uint(_i)
}
_112:
_i += 1
@@ -87484,50 +88526,52 @@ _11:
if _isOrderDistinct != 0 {
goto _120
}
- _i = int32(_nOrderBy) - i32(1)
+ _i = int32(_nOrderBy) - int32(1)
_121:
- if _i <= i32(0) {
+ if _i <= int32(0) {
goto _124
}
- _41_m = (u64(1) << uint(_i)) - uint64(i32(1))
+ _41_m = (uint64(1) << uint(_i)) - uint64(1)
if (_obSat & _41_m) == _41_m {
return int8(_i)
}
_i -= 1
goto _121
_124:
- return int8(i32(0))
+ return 0
_120:
- return int8(i32(-1))
+ return int8(-1)
}
var _wherePathSatisfiesOrderByØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_wherePathSatisfiesOrderByØ00__func__Ø000[0], str(106906), 26)
+ crt.Xstrncpy(nil, &_wherePathSatisfiesOrderByØ00__func__Ø000[0], str(106934), 26)
}
-// Return the cost of sorting nRow rows, assuming that the keys have
-// nOrderby columns and that the first nSorted columns are already in
-// order.
+// C comment
+// /*
+// ** Return the cost of sorting nRow rows, assuming that the keys have
+// ** nOrderby columns and that the first nSorted columns are already in
+// ** order.
+// */
func _whereSortingCost(tls *crt.TLS, _pWInfo *XWhereInfo, _nRow int16, _nOrderBy int32, _nSorted int32) (r0 int16) {
var _rScale, _rSortCost int16
func() {
- if _nOrderBy <= i32(0) || i32(66) != int32(_sqlite3LogEst(tls, uint64(i32(100)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134201), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereSortingCostØ00__func__Ø000))), unsafe.Pointer(str(106932)))
+ if _nOrderBy <= int32(0) || int32(66) != int32(_sqlite3LogEst(tls, uint64(100))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134201), unsafe.Pointer(&_whereSortingCostØ00__func__Ø000), unsafe.Pointer(str(106960)))
crt.X__builtin_abort(tls)
}
}()
- _rScale = int16(int32(_sqlite3LogEst(tls, uint64(((_nOrderBy-_nSorted)*i32(100))/_nOrderBy))) - i32(66))
- _rSortCost = int16((int32(_nRow) + int32(_rScale)) + i32(16))
- if ((int32(_pWInfo.X10) & i32(16384)) != i32(0)) && (int32(_pWInfo.X5) < int32(_nRow)) {
- _nRow = _pWInfo.X5
+ _rScale = int16(int32(_sqlite3LogEst(tls, uint64(((_nOrderBy-_nSorted)*int32(100))/_nOrderBy))) - int32(66))
+ _rSortCost = int16((int32(_nRow) + int32(_rScale)) + int32(16))
+ if ((int32(_pWInfo.XwctrlFlags) & int32(16384)) != int32(0)) && (int32(_pWInfo.XiLimit) < int32(_nRow)) {
+ _nRow = _pWInfo.XiLimit
}
{
p := &_rSortCost
*p = int16(int32(*p) + int32(_estLog(tls, _nRow)))
- sink18(*p)
}
return _rSortCost
}
@@ -87535,12 +88579,15 @@ func _whereSortingCost(tls *crt.TLS, _pWInfo *XWhereInfo, _nRow int16, _nOrderBy
var _whereSortingCostØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_whereSortingCostØ00__func__Ø000[0], str(106969), 17)
+ crt.Xstrncpy(nil, &_whereSortingCostØ00__func__Ø000[0], str(106997), 17)
}
-// Generate code to construct the Index object for an automatic index
-// and to set up the WhereLevel object pLevel so that the code generator
-// makes use of the automatic index.
+// C comment
+// /*
+// ** Generate code to construct the Index object for an automatic index
+// ** and to set up the WhereLevel object pLevel so that the code generator
+// ** makes use of the automatic index.
+// */
func _constructAutomaticIndex(tls *crt.TLS, _pParse *XParse, _pWC *XWhereClause, _pSrc *TSrcList_item, _notReady uint64, _pLevel *XWhereLevel) {
var _nKeyCol, _addrInit, _addrTop, _regRecord, _n, _i, _mxBitCol, _iContinue, _addrCounter, _regBase, _3_iCol, _10_iCol, _16_regYield int32
var _idxCols, _extraCols, _3_cMask, _10_cMask uint64
@@ -87554,138 +88601,126 @@ func _constructAutomaticIndex(tls *crt.TLS, _pParse *XParse, _pWC *XWhereClause,
var _pColl *XCollSeq
var _pLoop *XWhereLoop
var _pTerm, _pWCEnd *XWhereTerm
- _sentWarning = u8(0)
+ _sentWarning = uint8(0)
_pPartial = nil
- _iContinue = i32(0)
- _addrCounter = i32(0)
- _v = (*TVdbe)(_pParse.X2)
+ _iContinue = int32(0)
+ _addrCounter = int32(0)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131050), unsafe.Pointer((*int8)(unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131050), unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
- _addrInit = _sqlite3VdbeAddOp0(tls, _v, i32(20))
- _nKeyCol = i32(0)
- _pTable = (*XTable)(_pSrc.X4)
- _pWCEnd = (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_pWC.X3)))
- _pLoop = (*XWhereLoop)(_pLevel.X18)
- _idxCols = uint64(i32(0))
- _pTerm = (*XWhereTerm)(_pWC.X5)
+ _addrInit = _sqlite3VdbeAddOp0(tls, _v, int32(20))
+ _nKeyCol = int32(0)
+ _pTable = (*XTable)(_pSrc.XpTab)
+ _pWCEnd = elem100((*XWhereTerm)(_pWC.Xa), uintptr(_pWC.XnTerm))
+ _pLoop = (*XWhereLoop)(_pLevel.XpWLoop)
+ _idxCols = 0
+ _pTerm = (*XWhereTerm)(_pWC.Xa)
_2:
- if uintptr(unsafe.Pointer(_pTerm)) >= uintptr(unsafe.Pointer(_pWCEnd)) {
+ if crt.P2U(unsafe.Pointer(_pTerm)) >= crt.P2U(unsafe.Pointer(_pWCEnd)) {
goto _5
}
- _1_pExpr = (*XExpr)(_pTerm.X0)
+ _1_pExpr = (*XExpr)(_pTerm.XpExpr)
func() {
- if ((_1_pExpr.X2)&uint32(i32(1))) != uint32(i32(0)) && int32(_1_pExpr.X11) == (_pSrc.X11) && (_pLoop.X0) == uint64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131062), unsafe.Pointer((*int8)(unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000))), unsafe.Pointer(str(106986)))
+ if (_1_pExpr.Xflags&uint32(1)) != (0) && int32(_1_pExpr.XiRightJoinTable) == _pSrc.XiCursor && _pLoop.Xprereq == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131062), unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000), unsafe.Pointer(str(107014)))
crt.X__builtin_abort(tls)
}
}()
- if ((((_pLoop.X0) == uint64(i32(0))) && ((int32(_pTerm.X3) & i32(2)) == i32(0))) && (((_1_pExpr.X2) & uint32(i32(1))) == uint32(i32(0)))) && _sqlite3ExprIsTableConstant(tls, _1_pExpr, _pSrc.X11) != 0 {
- _pPartial = _sqlite3ExprAnd(tls, (*Xsqlite3)(_pParse.X0), _pPartial, _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.X0), _1_pExpr, i32(0)))
+ if (((_pLoop.Xprereq == (0)) && ((int32(_pTerm.XwtFlags) & int32(2)) == int32(0))) && ((_1_pExpr.Xflags & uint32(1)) == (0))) && _sqlite3ExprIsTableConstant(tls, _1_pExpr, _pSrc.XiCursor) != 0 {
+ _pPartial = _sqlite3ExprAnd(tls, (*Xsqlite3)(_pParse.Xdb), _pPartial, _sqlite3ExprDup(tls, (*Xsqlite3)(_pParse.Xdb), _1_pExpr, int32(0)))
}
if _termCanDriveIndex(tls, _pTerm, _pSrc, _notReady) == 0 {
goto _14
}
- _3_iCol = *(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))
+ _3_iCol = *(*int32)(unsafe.Pointer(&_pTerm.Xu))
_3_cMask = func() uint64 {
- if _3_iCol >= i32(64) {
- return u64(9223372036854775808)
+ if _3_iCol >= int32(64) {
+ return uint64(9223372036854775808)
}
- return (u64(1) << uint(_3_iCol))
+ return (uint64(1) << uint(_3_iCol))
}()
if _sentWarning == 0 {
- Xsqlite3_log(tls, i32(284), str(107084), unsafe.Pointer(_pTable.X0), unsafe.Pointer((*XColumn)(unsafe.Pointer(uintptr(_pTable.X1)+16*uintptr(_3_iCol))).X0))
- _sentWarning = uint8(i32(1))
+ Xsqlite3_log(tls, int32(284), str(107112), unsafe.Pointer(_pTable.XzName), unsafe.Pointer(elem41((*XColumn)(_pTable.XaCol), uintptr(_3_iCol)).XzName))
+ _sentWarning = uint8(1)
}
- if (_idxCols & _3_cMask) != uint64(i32(0)) {
+ if (_idxCols & _3_cMask) != (0) {
goto _18
}
- if _whereLoopResize(tls, (*Xsqlite3)(_pParse.X0), _pLoop, _nKeyCol+i32(1)) != 0 {
+ if _whereLoopResize(tls, (*Xsqlite3)(_pParse.Xdb), _pLoop, _nKeyCol+int32(1)) != 0 {
goto _end_auto_index_create
}
- *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(postInc1(&_nKeyCol, int32(1))))) = _pTerm
- {
- p := &_idxCols
- *p = (*p) | _3_cMask
- sink17(*p)
- }
+ *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(postInc2(&_nKeyCol, 1))) = _pTerm
+ _idxCols |= _3_cMask
_18:
_14:
*(*uintptr)(unsafe.Pointer(&_pTerm)) += uintptr(48)
goto _2
_5:
func() {
- if _nKeyCol <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131092), unsafe.Pointer((*int8)(unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000))), unsafe.Pointer(str(107110)))
+ if _nKeyCol <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131092), unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000), unsafe.Pointer(str(107138)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint16)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0))) = store14((*uint16)(unsafe.Pointer(&(_pLoop.X10))), uint16(_nKeyCol))
- *(*uint32)(unsafe.Pointer(&(_pLoop.X9))) = uint32(i32(16961))
- _extraCols = (_pSrc.X14) & ((^_idxCols) | u64(9223372036854775808))
+ (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq = store76(&_pLoop.XnLTerm, uint16(_nKeyCol))
+ _pLoop.XwsFlags = uint32(16961)
+ _extraCols = _pSrc.XcolUsed & ((^_idxCols) | uint64(9223372036854775808))
_mxBitCol = func() int32 {
- if i32(63) < int32(_pTable.X11) {
- return i32(63)
+ if int32(63) < int32(_pTable.XnCol) {
+ return int32(63)
}
- return int32(_pTable.X11)
+ return int32(_pTable.XnCol)
}()
- _i = i32(0)
+ _i = int32(0)
_24:
if _i >= _mxBitCol {
goto _27
}
- if (_extraCols & (u64(1) << uint(_i))) != 0 {
+ if (_extraCols & (uint64(1) << uint(_i))) != 0 {
_nKeyCol += 1
}
_i += 1
goto _24
_27:
- if ((_pSrc.X14) & u64(9223372036854775808)) != 0 {
- {
- p := &_nKeyCol
- *p = (*p) + ((int32(_pTable.X11) - i32(64)) + i32(1))
- sink1(*p)
- }
+ if (_pSrc.XcolUsed & uint64(9223372036854775808)) != 0 {
+ _nKeyCol += (int32(_pTable.XnCol) - int32(64)) + int32(1)
}
- _pIdx = _sqlite3AllocateIndexObject(tls, (*Xsqlite3)(_pParse.X0), int16(_nKeyCol+i32(1)), i32(0), &_zNotUsed)
+ _pIdx = _sqlite3AllocateIndexObject(tls, (*Xsqlite3)(_pParse.Xdb), int16(_nKeyCol+int32(1)), int32(0), &_zNotUsed)
if _pIdx == nil {
goto _end_auto_index_create
}
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4))))) = _pIdx
- *(**int8)(unsafe.Pointer(&(_pIdx.X0))) = str(107120)
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIdx.X3))))) = _pTable
- _n = i32(0)
- _idxCols = uint64(i32(0))
- _pTerm = (*XWhereTerm)(_pWC.X5)
+ *(**XIndex)(unsafe.Pointer(&((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex))) = _pIdx
+ _pIdx.XzName = str(107148)
+ *(**XTable)(unsafe.Pointer(&_pIdx.XpTable)) = _pTable
+ _n = int32(0)
+ _idxCols = 0
+ _pTerm = (*XWhereTerm)(_pWC.Xa)
_31:
- if uintptr(unsafe.Pointer(_pTerm)) >= uintptr(unsafe.Pointer(_pWCEnd)) {
+ if crt.P2U(unsafe.Pointer(_pTerm)) >= crt.P2U(unsafe.Pointer(_pWCEnd)) {
goto _34
}
if _termCanDriveIndex(tls, _pTerm, _pSrc, _notReady) == 0 {
goto _35
}
- _10_iCol = *(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))
+ _10_iCol = *(*int32)(unsafe.Pointer(&_pTerm.Xu))
_10_cMask = func() uint64 {
- if _10_iCol >= i32(64) {
- return u64(9223372036854775808)
+ if _10_iCol >= int32(64) {
+ return uint64(9223372036854775808)
}
- return (u64(1) << uint(_10_iCol))
+ return (uint64(1) << uint(_10_iCol))
}()
- if (_idxCols & _10_cMask) == uint64(i32(0)) {
- _11_pX = (*XExpr)(_pTerm.X0)
- {
- p := &_idxCols
- *p = (*p) | _10_cMask
- sink17(*p)
- }
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_n))) = int16(*(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10))))))
- _pColl = _sqlite3BinaryCompareCollSeq(tls, _pParse, (*XExpr)(_11_pX.X4), (*XExpr)(_11_pX.X5))
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_n))) = func() *int8 {
+ if (_idxCols & _10_cMask) == (0) {
+ _11_pX = (*XExpr)(_pTerm.XpExpr)
+ _idxCols |= _10_cMask
+ *elem50(_pIdx.XaiColumn, uintptr(_n)) = int16(*(*int32)(unsafe.Pointer(&_pTerm.Xu)))
+ _pColl = _sqlite3BinaryCompareCollSeq(tls, _pParse, (*XExpr)(_11_pX.XpLeft), (*XExpr)(_11_pX.XpRight))
+ *elem0(_pIdx.XazColl, uintptr(_n)) = func() *int8 {
if _pColl != nil {
- return (_pColl.X0)
+ return _pColl.XzName
}
return (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
}()
@@ -87696,34 +88731,34 @@ _35:
goto _31
_34:
func() {
- if uint32(_n) != uint32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131140), unsafe.Pointer((*int8)(unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000))), unsafe.Pointer(str(107131)))
+ if uint32(_n) != uint32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131140), unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000), unsafe.Pointer(str(107159)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_43:
if _i >= _mxBitCol {
goto _46
}
- if (_extraCols & (u64(1) << uint(_i))) != 0 {
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_n))) = int16(_i)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_n))) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
+ if (_extraCols & (uint64(1) << uint(_i))) != 0 {
+ *elem50(_pIdx.XaiColumn, uintptr(_n)) = int16(_i)
+ *elem0(_pIdx.XazColl, uintptr(_n)) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
_n += 1
}
_i += 1
goto _43
_46:
- if ((_pSrc.X14) & u64(9223372036854775808)) == 0 {
+ if (_pSrc.XcolUsed & uint64(9223372036854775808)) == 0 {
goto _48
}
- _i = i32(63)
+ _i = int32(63)
_49:
- if _i >= int32(_pTable.X11) {
+ if _i >= int32(_pTable.XnCol) {
goto _52
}
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_n))) = int16(_i)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_n))) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
+ *elem50(_pIdx.XaiColumn, uintptr(_n)) = int16(_i)
+ *elem0(_pIdx.XazColl, uintptr(_n)) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
_n += 1
_i += 1
goto _49
@@ -87731,181 +88766,170 @@ _52:
_48:
func() {
if _n != _nKeyCol {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131158), unsafe.Pointer((*int8)(unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000))), unsafe.Pointer(str(107158)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131158), unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000), unsafe.Pointer(str(107186)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_n))) = int16(i32(-1))
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_n))) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
+ *elem50(_pIdx.XaiColumn, uintptr(_n)) = int16(-1)
+ *elem0(_pIdx.XazColl, uintptr(_n)) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
func() {
- if (_pLevel.X2) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(131163), unsafe.Pointer((*int8)(unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000))), unsafe.Pointer(str(107169)))
+ if _pLevel.XiIdxCur < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(131163), unsafe.Pointer(&_constructAutomaticIndexØ00__func__Ø000), unsafe.Pointer(str(107197)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pLevel.X2))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(109), _pLevel.X2, _nKeyCol+i32(1))
+ _pLevel.XiIdxCur = postInc2(&_pParse.XnTab, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(109), _pLevel.XiIdxCur, _nKeyCol+int32(1))
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _pIdx)
- _sqlite3VdbeComment(tls, _v, str(107188), unsafe.Pointer(_pTable.X0))
+ _sqlite3VdbeComment(tls, _v, str(107216), unsafe.Pointer(_pTable.XzName))
_sqlite3ExprCachePush(tls, _pParse)
- _pTabItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)((*XWhereInfo)(_pWC.X0).X1).X2))))) + 68*uintptr(_pLevel.X11)))
- if ((uint32(((*t28)(unsafe.Pointer(&(_pTabItem.X9))).X1)>>uint(i32(4))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _16_regYield = _pTabItem.X7
- _addrCounter = _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), i32(0))
- _sqlite3VdbeAddOp3(tls, _v, i32(15), _16_regYield, i32(0), _pTabItem.X6)
- _addrTop = _sqlite3VdbeAddOp1(tls, _v, i32(16), _16_regYield)
- _sqlite3VdbeComment(tls, _v, str(107195), unsafe.Pointer((*XTable)(_pTabItem.X4).X0))
+ _pTabItem = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)((*XWhereInfo)(_pWC.XpWInfo).XpTabList).Xa))), uintptr(_pLevel.XiFrom))
+ if ((uint32((_pTabItem.Xfg.XnotIndexed)>>4) << 31) >> 31) != 0 {
+ _16_regYield = _pTabItem.XregReturn
+ _addrCounter = _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), int32(0))
+ _sqlite3VdbeAddOp3(tls, _v, int32(15), _16_regYield, int32(0), _pTabItem.XaddrFillSub)
+ _addrTop = _sqlite3VdbeAddOp1(tls, _v, int32(16), _16_regYield)
+ _sqlite3VdbeComment(tls, _v, str(107223), unsafe.Pointer((*XTable)(_pTabItem.XpTab).XzName))
goto _58
}
- _addrTop = _sqlite3VdbeAddOp1(tls, _v, i32(37), _pLevel.X1)
+ _addrTop = _sqlite3VdbeAddOp1(tls, _v, int32(37), _pLevel.XiTabCur)
_58:
if _pPartial != nil {
_iContinue = _sqlite3VdbeMakeLabel(tls, _v)
- _sqlite3ExprIfFalse(tls, _pParse, _pPartial, _iContinue, i32(16))
- {
- p := (*uint32)(unsafe.Pointer(&(_pLoop.X9)))
- *p = (*p) | uint32(i32(131072))
- sink5(*p)
- }
+ _sqlite3ExprIfFalse(tls, _pParse, _pPartial, _iContinue, int32(16))
+ _pLoop.XwsFlags |= uint32(131072)
}
_regRecord = _sqlite3GetTempReg(tls, _pParse)
- _regBase = _sqlite3GenerateIndexKey(tls, _pParse, _pIdx, _pLevel.X1, _regRecord, i32(0), nil, nil, i32(0))
- _sqlite3VdbeAddOp2(tls, _v, i32(128), _pLevel.X2, _regRecord)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(16)))
+ _regBase = _sqlite3GenerateIndexKey(tls, _pParse, _pIdx, _pLevel.XiTabCur, _regRecord, int32(0), nil, nil, int32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(128), _pLevel.XiIdxCur, _regRecord)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(16))
if _pPartial != nil {
_sqlite3VdbeResolveLabel(tls, _v, _iContinue)
}
- if ((uint32(((*t28)(unsafe.Pointer(&(_pTabItem.X9))).X1)>>uint(i32(4))) << uint(i32(31))) >> uint(i32(31))) != 0 {
+ if ((uint32((_pTabItem.Xfg.XnotIndexed)>>4) << 31) >> 31) != 0 {
_sqlite3VdbeChangeP2(tls, _v, uint32(_addrCounter), _regBase+_n)
- _translateColumnToCopy(tls, _pParse, _addrTop, _pLevel.X1, _pTabItem.X8, i32(1))
+ _translateColumnToCopy(tls, _pParse, _addrTop, _pLevel.XiTabCur, _pTabItem.XregResult, int32(1))
_sqlite3VdbeGoto(tls, _v, _addrTop)
- storebits3((*int8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&(_pTabItem.X9))).X1))), int8(i32(0)), 16, 4)
+ storebits5(&(_pTabItem.Xfg.XnotIndexed), 0, 16, 4)
goto _62
}
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _pLevel.X1, _addrTop+i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _pLevel.XiTabCur, _addrTop+int32(1))
_62:
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(3)))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(3))
_sqlite3VdbeJumpHere(tls, _v, _addrTop)
_sqlite3ReleaseTempReg(tls, _pParse, _regRecord)
_sqlite3ExprCachePop(tls, _pParse)
_sqlite3VdbeJumpHere(tls, _v, _addrInit)
_end_auto_index_create:
- _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.X0), _pPartial)
- _ = _zNotUsed
+ _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.Xdb), _pPartial)
}
var _constructAutomaticIndexØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_constructAutomaticIndexØ00__func__Ø000[0], str(107212), 24)
+ crt.Xstrncpy(nil, &_constructAutomaticIndexØ00__func__Ø000[0], str(107240), 24)
}
-// Allocate heap space to hold an Index object with nCol columns.
-//
-// Increase the allocation size to provide an extra nExtra bytes
-// of 8-byte aligned space after the Index object and return a
-// pointer to this extra space in *ppExtra.
+// C comment
+// /*
+// ** Allocate heap space to hold an Index object with nCol columns.
+// **
+// ** Increase the allocation size to provide an extra nExtra bytes
+// ** of 8-byte aligned space after the Index object and return a
+// ** pointer to this extra space in *ppExtra.
+// */
func _sqlite3AllocateIndexObject(tls *crt.TLS, _db *Xsqlite3, _nCol int16, _nExtra int32, _ppExtra **int8) (r0 *XIndex) {
var _nByte int32
var _1_pExtra *int8
var _p *XIndex
- _nByte = int32((u32(56) + (((u32(4) * uint32(_nCol)) + uint32(i32(7))) & uint32(i32(-8)))) + (((((u32(2) * uint32(int32(_nCol)+i32(1))) + (u32(2) * uint32(_nCol))) + (u32(1) * uint32(_nCol))) + uint32(i32(7))) & uint32(i32(-8))))
+ _nByte = int32((uint32(56) + (((uint32(4) * uint32(_nCol)) + uint32(7)) & uint32(4294967288))) + (((((uint32(2) * uint32(int32(_nCol)+int32(1))) + (uint32(2) * uint32(_nCol))) + (uint32(1) * uint32(_nCol))) + uint32(7)) & uint32(4294967288)))
_p = (*XIndex)(_sqlite3DbMallocZero(tls, _db, uint64(_nByte+_nExtra)))
if _p != nil {
- _1_pExtra = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_p)))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(u32(56))))))))
- *(***int8)(unsafe.Pointer(&(_p.X8))) = (**int8)(unsafe.Pointer(_1_pExtra))
- {
- p := &_1_pExtra
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(((u32(4)*uint32(_nCol))+uint32(i32(7)))&uint32(i32(-8)))))
- sink0(*p)
- }
- *(**int16)(unsafe.Pointer(&(_p.X2))) = (*int16)(unsafe.Pointer(_1_pExtra))
- {
- p := &_1_pExtra
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(u32(2)*uint32(int32(_nCol)+i32(1)))))
- sink0(*p)
- }
- *(**int16)(unsafe.Pointer(&(_p.X1))) = (*int16)(unsafe.Pointer(_1_pExtra))
- {
- p := &_1_pExtra
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(u32(2)*uint32(_nCol))))
- sink0(*p)
- }
- *(**uint8)(unsafe.Pointer(&(_p.X7))) = (*uint8)(unsafe.Pointer(_1_pExtra))
- *(*uint16)(unsafe.Pointer(&(_p.X14))) = uint16(_nCol)
- *(*uint16)(unsafe.Pointer(&(_p.X13))) = uint16(int32(_nCol) - i32(1))
- *_ppExtra = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_p)))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_nByte)))))))
+ _1_pExtra = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_p)) + uintptr(uint32(56))))
+ _p.XazColl = (**int8)(unsafe.Pointer(_1_pExtra))
+ *(*uintptr)(unsafe.Pointer(&_1_pExtra)) += uintptr(((uint32(4) * uint32(_nCol)) + uint32(7)) & uint32(4294967288))
+ _p.XaiRowLogEst = (*int16)(unsafe.Pointer(_1_pExtra))
+ *(*uintptr)(unsafe.Pointer(&_1_pExtra)) += uintptr(uint32(2) * uint32(int32(_nCol)+int32(1)))
+ _p.XaiColumn = (*int16)(unsafe.Pointer(_1_pExtra))
+ *(*uintptr)(unsafe.Pointer(&_1_pExtra)) += uintptr(uint32(2) * uint32(_nCol))
+ _p.XaSortOrder = (*uint8)(unsafe.Pointer(_1_pExtra))
+ _p.XnColumn = uint16(_nCol)
+ _p.XnKeyCol = uint16(int32(_nCol) - int32(1))
+ *_ppExtra = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_p)) + uintptr(_nByte)))
}
return _p
}
-// Generate code that will assemble an index key and stores it in register
-// regOut. The key with be for index pIdx which is an index on pTab.
-// iCur is the index of a cursor open on the pTab table and pointing to
-// the entry that needs indexing. If pTab is a WITHOUT ROWID table, then
-// iCur must be the cursor of the PRIMARY KEY index.
-//
-// Return a register number which is the first in a block of
-// registers that holds the elements of the index key. The
-// block of registers has already been deallocated by the time
-// this routine returns.
-//
-// If *piPartIdxLabel is not NULL, fill it in with a label and jump
-// to that label if pIdx is a partial index that should be skipped.
-// The label should be resolved using sqlite3ResolvePartIdxLabel().
-// A partial index should be skipped if its WHERE clause evaluates
-// to false or null. If pIdx is not a partial index, *piPartIdxLabel
-// will be set to zero which is an empty label that is ignored by
-// sqlite3ResolvePartIdxLabel().
-//
-// The pPrior and regPrior parameters are used to implement a cache to
-// avoid unnecessary register loads. If pPrior is not NULL, then it is
-// a pointer to a different index for which an index key has just been
-// computed into register regPrior. If the current pIdx index is generating
-// its key into the same sequence of registers and if pPrior and pIdx share
-// a column in common, then the register corresponding to that column already
-// holds the correct value and the loading of that register is skipped.
-// This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK
-// on a table with multiple indices, and especially with the ROWID or
-// PRIMARY KEY columns of the index.
+// C comment
+// /*
+// ** Generate code that will assemble an index key and stores it in register
+// ** regOut. The key with be for index pIdx which is an index on pTab.
+// ** iCur is the index of a cursor open on the pTab table and pointing to
+// ** the entry that needs indexing. If pTab is a WITHOUT ROWID table, then
+// ** iCur must be the cursor of the PRIMARY KEY index.
+// **
+// ** Return a register number which is the first in a block of
+// ** registers that holds the elements of the index key. The
+// ** block of registers has already been deallocated by the time
+// ** this routine returns.
+// **
+// ** If *piPartIdxLabel is not NULL, fill it in with a label and jump
+// ** to that label if pIdx is a partial index that should be skipped.
+// ** The label should be resolved using sqlite3ResolvePartIdxLabel().
+// ** A partial index should be skipped if its WHERE clause evaluates
+// ** to false or null. If pIdx is not a partial index, *piPartIdxLabel
+// ** will be set to zero which is an empty label that is ignored by
+// ** sqlite3ResolvePartIdxLabel().
+// **
+// ** The pPrior and regPrior parameters are used to implement a cache to
+// ** avoid unnecessary register loads. If pPrior is not NULL, then it is
+// ** a pointer to a different index for which an index key has just been
+// ** computed into register regPrior. If the current pIdx index is generating
+// ** its key into the same sequence of registers and if pPrior and pIdx share
+// ** a column in common, then the register corresponding to that column already
+// ** holds the correct value and the loading of that register is skipped.
+// ** This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK
+// ** on a table with multiple indices, and especially with the ROWID or
+// ** PRIMARY KEY columns of the index.
+// */
func _sqlite3GenerateIndexKey(tls *crt.TLS, _pParse *XParse, _pIdx *XIndex, _iDataCur int32, _regOut int32, _prefixOnly int32, _piPartIdxLabel *int32, _pPrior *XIndex, _regPrior int32) (r0 int32) {
var _j, _regBase, _nCol int32
var _7_zAff *int8
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
if _piPartIdxLabel == nil {
goto _0
}
- if (*XExpr)(_pIdx.X9) != nil {
+ if _pIdx.XpPartIdxWhere != nil {
*_piPartIdxLabel = _sqlite3VdbeMakeLabel(tls, _v)
- *(*int32)(unsafe.Pointer(&(_pParse.X22))) = _iDataCur
+ _pParse.XiSelfTab = _iDataCur
_sqlite3ExprCachePush(tls, _pParse)
- _sqlite3ExprIfFalseDup(tls, _pParse, (*XExpr)(_pIdx.X9), *_piPartIdxLabel, i32(16))
+ _sqlite3ExprIfFalseDup(tls, _pParse, (*XExpr)(_pIdx.XpPartIdxWhere), *_piPartIdxLabel, int32(16))
goto _2
}
- *_piPartIdxLabel = i32(0)
+ *_piPartIdxLabel = int32(0)
_2:
_0:
_nCol = int32(func() uint16 {
- if _prefixOnly != 0 && (((uint32((_pIdx.X16)>>uint(i32(3))) << uint(i32(31))) >> uint(i32(31))) != 0) {
- return (_pIdx.X13)
+ if _prefixOnly != 0 && (((uint32(_pIdx.XidxType>>3) << 31) >> 31) != 0) {
+ return _pIdx.XnKeyCol
}
- return (_pIdx.X14)
+ return _pIdx.XnColumn
}())
_regBase = _sqlite3GetTempRange(tls, _pParse, _nCol)
- if (_pPrior != nil) && ((_regBase != _regPrior) || ((*XExpr)(_pPrior.X9) != nil)) {
+ if (_pPrior != nil) && ((_regBase != _regPrior) || (_pPrior.XpPartIdxWhere != nil)) {
_pPrior = nil
}
- _j = i32(0)
+ _j = int32(0)
_9:
if _j >= _nCol {
goto _12
}
- if ((_pPrior != nil) && (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPrior.X1)) + 2*uintptr(_j)))) == int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_j)))))) && (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPrior.X1)) + 2*uintptr(_j)))) != i32(-2)) {
+ if ((_pPrior != nil) && (int32(*elem50(_pPrior.XaiColumn, uintptr(_j))) == int32(*elem50(_pIdx.XaiColumn, uintptr(_j))))) && (int32(*elem50(_pPrior.XaiColumn, uintptr(_j))) != int32(-2)) {
goto _10
}
_sqlite3ExprCodeLoadIndexColumn(tls, _pParse, _pIdx, _iDataCur, _j, _regBase+_j)
- _sqlite3VdbeDeletePriorOpcode(tls, _v, uint8(i32(74)))
+ _sqlite3VdbeDeletePriorOpcode(tls, _v, uint8(74))
_10:
_j += 1
goto _9
@@ -87913,208 +88937,225 @@ _12:
if _regOut == 0 {
goto _16
}
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _regBase, _nCol, _regOut)
- if (*XSelect)((*XTable)(_pIdx.X3).X3) != nil {
- _7_zAff = _sqlite3IndexAffinityStr(tls, (*Xsqlite3)(_pParse.X0), _pIdx)
- _sqlite3VdbeChangeP4(tls, _v, i32(-1), _7_zAff, i32(0))
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _regBase, _nCol, _regOut)
+ if ((*XTable)(_pIdx.XpTable).XpSelect) != nil {
+ _7_zAff = _sqlite3IndexAffinityStr(tls, (*Xsqlite3)(_pParse.Xdb), _pIdx)
+ _sqlite3VdbeChangeP4(tls, _v, int32(-1), _7_zAff, int32(0))
}
_16:
_sqlite3ReleaseTempRange(tls, _pParse, _regBase, _nCol)
return _regBase
}
-// Like sqlite3ExprIfFalse() except that a copy is made of pExpr before
-// code generation, and that copy is deleted after code generation. This
-// ensures that the original pExpr is unchanged.
+// C comment
+// /*
+// ** Like sqlite3ExprIfFalse() except that a copy is made of pExpr before
+// ** code generation, and that copy is deleted after code generation. This
+// ** ensures that the original pExpr is unchanged.
+// */
func _sqlite3ExprIfFalseDup(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _dest int32, _jumpIfNull int32) {
var _db *Xsqlite3
var _pCopy *XExpr
- _db = (*Xsqlite3)(_pParse.X0)
- _pCopy = _sqlite3ExprDup(tls, _db, _pExpr, i32(0))
- if int32(_db.X17) == i32(0) {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pCopy = _sqlite3ExprDup(tls, _db, _pExpr, int32(0))
+ if int32(_db.XmallocFailed) == int32(0) {
_sqlite3ExprIfFalse(tls, _pParse, _pCopy, _dest, _jumpIfNull)
}
_sqlite3ExprDelete(tls, _db, _pCopy)
}
-// Generate code that will load into register regOut a value that is
-// appropriate for the iIdxCol-th column of index pIdx.
+// C comment
+// /* Generate code that will load into register regOut a value that is
+// ** appropriate for the iIdxCol-th column of index pIdx.
+// */
func _sqlite3ExprCodeLoadIndexColumn(tls *crt.TLS, _pParse *XParse, _pIdx *XIndex, _iTabCur int32, _iIdxCol int32, _regOut int32) {
var _iTabCol int16
- _iTabCol = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_iIdxCol)))
- if int32(_iTabCol) == i32(-2) {
+ _iTabCol = *elem50(_pIdx.XaiColumn, uintptr(_iIdxCol))
+ if int32(_iTabCol) == int32(-2) {
func() {
- if (*XExprList)(_pIdx.X10) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94130), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeLoadIndexColumnØ00__func__Ø000))), unsafe.Pointer(str(107236)))
+ if _pIdx.XaColExpr == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94130), unsafe.Pointer(&_sqlite3ExprCodeLoadIndexColumnØ00__func__Ø000), unsafe.Pointer(str(107264)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*XExprList)(_pIdx.X10).X0) <= _iIdxCol {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(94131), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeLoadIndexColumnØ00__func__Ø000))), unsafe.Pointer(str(107251)))
+ if ((*XExprList)(_pIdx.XaColExpr).XnExpr) <= _iIdxCol {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(94131), unsafe.Pointer(&_sqlite3ExprCodeLoadIndexColumnØ00__func__Ø000), unsafe.Pointer(str(107279)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pParse.X22))) = _iTabCur
- _sqlite3ExprCodeCopy(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.X10).X2)))))+20*uintptr(_iIdxCol))).X0), _regOut)
+ _pParse.XiSelfTab = _iTabCur
+ _sqlite3ExprCodeCopy(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.XaColExpr).Xa))), uintptr(_iIdxCol)).XpExpr), _regOut)
goto _5
}
- _sqlite3ExprCodeGetColumnOfTable(tls, (*TVdbe)(_pParse.X2), (*XTable)(_pIdx.X3), _iTabCur, int32(_iTabCol), _regOut)
+ _sqlite3ExprCodeGetColumnOfTable(tls, (*TVdbe)(_pParse.XpVdbe), (*XTable)(_pIdx.XpTable), _iTabCur, int32(_iTabCol), _regOut)
_5:
}
var _sqlite3ExprCodeLoadIndexColumnØ00__func__Ø000 [31]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCodeLoadIndexColumnØ00__func__Ø000[0], str(107281), 31)
+ crt.Xstrncpy(nil, &_sqlite3ExprCodeLoadIndexColumnØ00__func__Ø000[0], str(107309), 31)
}
-// Make a transient copy of expression pExpr and then code it using
-// sqlite3ExprCode(). This routine works just like sqlite3ExprCode()
-// except that the input expression is guaranteed to be unchanged.
+// C comment
+// /*
+// ** Make a transient copy of expression pExpr and then code it using
+// ** sqlite3ExprCode(). This routine works just like sqlite3ExprCode()
+// ** except that the input expression is guaranteed to be unchanged.
+// */
func _sqlite3ExprCodeCopy(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _target int32) {
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pParse.X0)
- _pExpr = _sqlite3ExprDup(tls, _db, _pExpr, i32(0))
- if (_db.X17) == 0 {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pExpr = _sqlite3ExprDup(tls, _db, _pExpr, int32(0))
+ if _db.XmallocFailed == 0 {
_sqlite3ExprCode(tls, _pParse, _pExpr, _target)
}
_sqlite3ExprDelete(tls, _db, _pExpr)
}
-// If the last opcode is "op" and it is not a jump destination,
-// then remove it. Return true if and only if an opcode was removed.
+// C comment
+// /*
+// ** If the last opcode is "op" and it is not a jump destination,
+// ** then remove it. Return true if and only if an opcode was removed.
+// */
func _sqlite3VdbeDeletePriorOpcode(tls *crt.TLS, _p *TVdbe, _op uint8) (r0 int32) {
- if ((_p.X27) > i32(0)) && (int32((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr((_p.X27)-i32(1)))).X0) == int32(_op)) {
- return _sqlite3VdbeChangeToNoop(tls, _p, (_p.X27)-i32(1))
- }
- return i32(0)
-}
-
-// Return a pointer to the column affinity string associated with index
-// pIdx. A column affinity string has one character for each column in
-// the table, according to the affinity of the column:
-//
-// Character Column affinity
-// ------------------------------
-// 'A' BLOB
-// 'B' TEXT
-// 'C' NUMERIC
-// 'D' INTEGER
-// 'F' REAL
-//
-// An extra 'D' is appended to the end of the string to cover the
-// rowid that appears as the last column in every index.
-//
-// Memory for the buffer containing the column index affinity string
-// is managed along with the rest of the Index structure. It will be
-// released when sqlite3DeleteIndex() is called.
+ if (_p.XnOp > int32(0)) && (int32(elem61((*XVdbeOp)(_p.XaOp), uintptr(_p.XnOp-int32(1))).Xopcode) == int32(_op)) {
+ return _sqlite3VdbeChangeToNoop(tls, _p, _p.XnOp-int32(1))
+ }
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Return a pointer to the column affinity string associated with index
+// ** pIdx. A column affinity string has one character for each column in
+// ** the table, according to the affinity of the column:
+// **
+// ** Character Column affinity
+// ** ------------------------------
+// ** 'A' BLOB
+// ** 'B' TEXT
+// ** 'C' NUMERIC
+// ** 'D' INTEGER
+// ** 'F' REAL
+// **
+// ** An extra 'D' is appended to the end of the string to cover the
+// ** rowid that appears as the last column in every index.
+// **
+// ** Memory for the buffer containing the column index affinity string
+// ** is managed along with the rest of the Index structure. It will be
+// ** released when sqlite3DeleteIndex() is called.
+// */
func _sqlite3IndexAffinityStr(tls *crt.TLS, _db *Xsqlite3, _pIdx *XIndex) (r0 *int8) {
var _3_x int16
var _1_n int32
var _6_aff int8
var _1_pTab *XTable
- if (_pIdx.X4) != nil {
+ if _pIdx.XzColAff != nil {
goto _0
}
- _1_pTab = (*XTable)(_pIdx.X3)
- *(**int8)(unsafe.Pointer(&(_pIdx.X4))) = (*int8)(_sqlite3DbMallocRaw(tls, nil, uint64(int32(_pIdx.X14)+i32(1))))
- if (_pIdx.X4) == nil {
+ _1_pTab = (*XTable)(_pIdx.XpTable)
+ _pIdx.XzColAff = (*int8)(_sqlite3DbMallocRaw(tls, nil, uint64(int32(_pIdx.XnColumn)+int32(1))))
+ if _pIdx.XzColAff == nil {
_sqlite3OomFault(tls, _db)
return nil
}
- _1_n = i32(0)
+ _1_n = int32(0)
_2:
- if _1_n >= int32(_pIdx.X14) {
+ if _1_n >= int32(_pIdx.XnColumn) {
goto _5
}
- _3_x = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_1_n)))
- if int32(_3_x) >= i32(0) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X4)) + 1*uintptr(_1_n))) = (*XColumn)(unsafe.Pointer(uintptr(_1_pTab.X1) + 16*uintptr(_3_x))).X4
+ _3_x = *elem50(_pIdx.XaiColumn, uintptr(_1_n))
+ if int32(_3_x) >= int32(0) {
+ *elem1(_pIdx.XzColAff, uintptr(_1_n)) = elem41((*XColumn)(_1_pTab.XaCol), uintptr(_3_x)).Xaffinity
goto _9
}
- if int32(_3_x) == i32(-1) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X4)) + 1*uintptr(_1_n))) = int8(i32(68))
+ if int32(_3_x) == int32(-1) {
+ *elem1(_pIdx.XzColAff, uintptr(_1_n)) = int8(68)
goto _9
}
func() {
- if int32(_3_x) != i32(-2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108932), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3IndexAffinityStrØ00__func__Ø000))), unsafe.Pointer(str(107312)))
+ if int32(_3_x) != int32(-2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108932), unsafe.Pointer(&_sqlite3IndexAffinityStrØ00__func__Ø000), unsafe.Pointer(str(107340)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExprList)(_pIdx.X10) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108933), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3IndexAffinityStrØ00__func__Ø000))), unsafe.Pointer(str(107323)))
+ if (*XExprList)(_pIdx.XaColExpr) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108933), unsafe.Pointer(&_sqlite3IndexAffinityStrØ00__func__Ø000), unsafe.Pointer(str(107351)))
crt.X__builtin_abort(tls)
}
}()
- _6_aff = _sqlite3ExprAffinity(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.X10).X2)))))+20*uintptr(_1_n))).X0))
- if int32(_6_aff) == i32(0) {
- _6_aff = int8(i32(65))
+ _6_aff = _sqlite3ExprAffinity(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.XaColExpr).Xa))), uintptr(_1_n)).XpExpr))
+ if int32(_6_aff) == int32(0) {
+ _6_aff = int8(65)
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X4)) + 1*uintptr(_1_n))) = _6_aff
+ *elem1(_pIdx.XzColAff, uintptr(_1_n)) = _6_aff
_9:
_1_n += 1
goto _2
_5:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X4)) + 1*uintptr(_1_n))) = int8(i32(0))
+ *elem1(_pIdx.XzColAff, uintptr(_1_n)) = 0
_0:
- return _pIdx.X4
+ return _pIdx.XzColAff
}
var _sqlite3IndexAffinityStrØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3IndexAffinityStrØ00__func__Ø000[0], str(107341), 24)
+ crt.Xstrncpy(nil, &_sqlite3IndexAffinityStrØ00__func__Ø000[0], str(107369), 24)
}
-// Convert OP_Column opcodes to OP_Copy in previously generated code.
-//
-// This routine runs over generated VDBE code and translates OP_Column
-// opcodes into OP_Copy when the table is being accessed via co-routine
-// instead of via table lookup.
-//
-// If the bIncrRowid parameter is 0, then any OP_Rowid instructions on
-// cursor iTabCur are transformed into OP_Null. Or, if bIncrRowid is non-zero,
-// then each OP_Rowid is transformed into an instruction to increment the
-// value stored in its output register.
+// C comment
+// /*
+// ** Convert OP_Column opcodes to OP_Copy in previously generated code.
+// **
+// ** This routine runs over generated VDBE code and translates OP_Column
+// ** opcodes into OP_Copy when the table is being accessed via co-routine
+// ** instead of via table lookup.
+// **
+// ** If the bIncrRowid parameter is 0, then any OP_Rowid instructions on
+// ** cursor iTabCur are transformed into OP_Null. Or, if bIncrRowid is non-zero,
+// ** then each OP_Rowid is transformed into an instruction to increment the
+// ** value stored in its output register.
+// */
func _translateColumnToCopy(tls *crt.TLS, _pParse *XParse, _iStart int32, _iTabCur int32, _iRegister int32, _bIncrRowid int32) {
var _iEnd int32
var _v *TVdbe
var _pOp *XVdbeOp
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
_pOp = _sqlite3VdbeGetOp(tls, _v, _iStart)
_iEnd = _sqlite3VdbeCurrentAddr(tls, _v)
- if ((*Xsqlite3)(_pParse.X0).X17) != 0 {
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) != 0 {
return
}
_0:
if _iStart >= _iEnd {
goto _4
}
- if (_pOp.X3) != _iTabCur {
+ if _pOp.Xp1 != _iTabCur {
goto _2
}
- if int32(_pOp.X0) == i32(99) {
- *(*uint8)(unsafe.Pointer(&(_pOp.X0))) = uint8(i32(64))
- *(*int32)(unsafe.Pointer(&(_pOp.X3))) = (_pOp.X4) + _iRegister
- *(*int32)(unsafe.Pointer(&(_pOp.X4))) = _pOp.X5
- *(*int32)(unsafe.Pointer(&(_pOp.X5))) = i32(0)
+ if int32(_pOp.Xopcode) == int32(99) {
+ _pOp.Xopcode = uint8(64)
+ _pOp.Xp1 = _pOp.Xp2 + _iRegister
+ _pOp.Xp2 = _pOp.Xp3
+ _pOp.Xp3 = int32(0)
goto _8
}
- if int32(_pOp.X0) != i32(125) {
+ if int32(_pOp.Xopcode) != int32(125) {
goto _8
}
if _bIncrRowid != 0 {
- *(*uint8)(unsafe.Pointer(&(_pOp.X0))) = uint8(i32(73))
- *(*int32)(unsafe.Pointer(&(_pOp.X3))) = _pOp.X4
- *(*int32)(unsafe.Pointer(&(_pOp.X4))) = i32(1)
+ _pOp.Xopcode = uint8(73)
+ _pOp.Xp1 = _pOp.Xp2
+ _pOp.Xp2 = int32(1)
goto _10
}
- *(*uint8)(unsafe.Pointer(&(_pOp.X0))) = uint8(i32(59))
- *(*int32)(unsafe.Pointer(&(_pOp.X3))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_pOp.X5))) = i32(0)
+ _pOp.Xopcode = uint8(59)
+ _pOp.Xp1 = int32(0)
+ _pOp.Xp3 = int32(0)
_10:
_8:
_2:
@@ -88123,13 +89164,16 @@ _2:
_4:
}
-// This function is a no-op unless currently processing an EXPLAIN QUERY PLAN
-// command, or if either SQLITE_DEBUG or SQLITE_ENABLE_STMT_SCANSTATUS was
-// defined at compile-time. If it is not a no-op, a single OP_Explain opcode
-// is added to the output to describe the table scan strategy in pLevel.
-//
-// If an OP_Explain opcode is added to the VM, its address is returned.
-// Otherwise, if no OP_Explain is coded, zero is returned.
+// C comment
+// /*
+// ** This function is a no-op unless currently processing an EXPLAIN QUERY PLAN
+// ** command, or if either SQLITE_DEBUG or SQLITE_ENABLE_STMT_SCANSTATUS was
+// ** defined at compile-time. If it is not a no-op, a single OP_Explain opcode
+// ** is added to the output to describe the table scan strategy in pLevel.
+// **
+// ** If an OP_Explain opcode is added to the VM, its address is returned.
+// ** Otherwise, if no OP_Explain is coded, zero is returned.
+// */
func _sqlite3WhereExplainOneScan(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pLevel *XWhereLevel, _iLevel int32, _iFrom int32, _wctrlFlags uint16) (r0 int32) {
var _ret, _1_iId, _1_isSearch int32
var _1_flags uint32
@@ -88141,114 +89185,113 @@ func _sqlite3WhereExplainOneScan(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcL
var _1_pItem *TSrcList_item
var _5_pIdx *XIndex
var _1_pLoop *XWhereLoop
- _ret = i32(0)
- _1_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(_pLevel.X11)))
- _1_v = (*TVdbe)(_pParse.X2)
- _1_db = (*Xsqlite3)(_pParse.X0)
- _1_iId = _pParse.X58
- _1_pLoop = (*XWhereLoop)(_pLevel.X18)
- _1_flags = _1_pLoop.X9
- if ((_1_flags & uint32(i32(8192))) != 0) || (int32(_wctrlFlags)&i32(32)) != 0 {
- return i32(0)
- }
- _1_isSearch = bool2int((((_1_flags & uint32(i32(48))) != uint32(i32(0))) || (((_1_flags & uint32(i32(1024))) == uint32(i32(0))) && (int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_1_pLoop.X8))))).X0) > i32(0)))) || (int32(_wctrlFlags)&i32(3)) != 0)
- _sqlite3StrAccumInit(tls, &_1_str, _1_db, (*int8)(unsafe.Pointer(&_1_zBuf)), int32(u32(100)), i32(1000000000))
+ _ret = int32(0)
+ _1_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_pLevel.XiFrom))
+ _1_v = (*TVdbe)(_pParse.XpVdbe)
+ _1_db = (*Xsqlite3)(_pParse.Xdb)
+ _1_iId = _pParse.XiSelectId
+ _1_pLoop = (*XWhereLoop)(_pLevel.XpWLoop)
+ _1_flags = _1_pLoop.XwsFlags
+ if ((_1_flags & uint32(8192)) != 0) || (int32(_wctrlFlags)&int32(32)) != 0 {
+ return int32(0)
+ }
+ _1_isSearch = bool2int((((_1_flags & uint32(48)) != (0)) || (((_1_flags & uint32(1024)) == (0)) && (int32((*t101)(unsafe.Pointer(&_1_pLoop.Xu)).XnEq) > int32(0)))) || (int32(_wctrlFlags)&int32(3)) != 0)
+ _sqlite3StrAccumInit(tls, &_1_str, _1_db, (*int8)(unsafe.Pointer(&_1_zBuf)), int32(100), int32(1000000000))
_sqlite3StrAccumAppendAll(tls, &_1_str, func() *int8 {
if _1_isSearch != 0 {
- return str(107365)
+ return str(107393)
}
- return str(107372)
+ return str(107400)
}())
- if (*XSelect)(_1_pItem.X5) != nil {
- _sqlite3XPrintf(tls, &_1_str, str(107377), int32(_1_pItem.X10))
+ if _1_pItem.XpSelect != nil {
+ _sqlite3XPrintf(tls, &_1_str, str(107405), int32(_1_pItem.XiSelectId))
goto _8
}
- _sqlite3XPrintf(tls, &_1_str, str(107390), unsafe.Pointer(_1_pItem.X2))
+ _sqlite3XPrintf(tls, &_1_str, str(107418), unsafe.Pointer(_1_pItem.XzName))
_8:
- if (_1_pItem.X3) != nil {
- _sqlite3XPrintf(tls, &_1_str, str(107400), unsafe.Pointer(_1_pItem.X3))
+ if _1_pItem.XzAlias != nil {
+ _sqlite3XPrintf(tls, &_1_str, str(107428), unsafe.Pointer(_1_pItem.XzAlias))
}
- if (_1_flags & uint32(i32(1280))) != uint32(i32(0)) {
+ if (_1_flags & uint32(1280)) != (0) {
goto _10
}
_5_zFmt = nil
func() {
- if (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_1_pLoop.X8))))).X4) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126959), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereExplainOneScanØ00__func__Ø000))), unsafe.Pointer(str(107407)))
+ if (*XIndex)((*t101)(unsafe.Pointer(&_1_pLoop.Xu)).XpIndex) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126959), unsafe.Pointer(&_sqlite3WhereExplainOneScanØ00__func__Ø000), unsafe.Pointer(str(107435)))
crt.X__builtin_abort(tls)
}
}()
- _5_pIdx = (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_1_pLoop.X8))))).X4)
+ _5_pIdx = (*XIndex)((*t101)(unsafe.Pointer(&_1_pLoop.Xu)).XpIndex)
func() {
- if (_1_flags&uint32(i32(16384))) != 0 && (_1_flags&uint32(i32(64))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126961), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereExplainOneScanØ00__func__Ø000))), unsafe.Pointer(str(107432)))
+ if (_1_flags&uint32(16384)) != 0 && (_1_flags&uint32(64)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126961), unsafe.Pointer(&_sqlite3WhereExplainOneScanØ00__func__Ø000), unsafe.Pointer(str(107460)))
crt.X__builtin_abort(tls)
}
}()
- if (((*XTable)(_1_pItem.X4).X9)&uint32(i32(32))) == uint32(i32(0)) || int32((uint32(_5_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) != i32(2) {
+ if (((*XTable)(_1_pItem.XpTab).XtabFlags)&uint32(32)) == (0) || int32((uint32(_5_pIdx.XidxType)<<30)>>30) != int32(2) {
goto _17
}
if _1_isSearch != 0 {
- _5_zFmt = str(107484)
+ _5_zFmt = str(107512)
}
goto _25
_17:
- if (_1_flags & uint32(i32(131072))) != 0 {
- _5_zFmt = str(107496)
+ if (_1_flags & uint32(131072)) != 0 {
+ _5_zFmt = str(107524)
goto _25
}
- if (_1_flags & uint32(i32(16384))) != 0 {
- _5_zFmt = str(107529)
+ if (_1_flags & uint32(16384)) != 0 {
+ _5_zFmt = str(107557)
goto _25
}
- if (_1_flags & uint32(i32(64))) != 0 {
- _5_zFmt = str(107554)
+ if (_1_flags & uint32(64)) != 0 {
+ _5_zFmt = str(107582)
goto _25
}
- _5_zFmt = str(107572)
+ _5_zFmt = str(107600)
_25:
if _5_zFmt != nil {
- _sqlite3StrAccumAppend(tls, &_1_str, str(107581), i32(7))
- _sqlite3XPrintf(tls, &_1_str, _5_zFmt, unsafe.Pointer(_5_pIdx.X0))
+ _sqlite3StrAccumAppend(tls, &_1_str, str(107609), int32(7))
+ _sqlite3XPrintf(tls, &_1_str, _5_zFmt, unsafe.Pointer(_5_pIdx.XzName))
_explainIndexRange(tls, &_1_str, _1_pLoop)
}
goto _39
_10:
- if (_1_flags&uint32(i32(256))) == uint32(i32(0)) || (_1_flags&uint32(i32(15))) == uint32(i32(0)) {
+ if (_1_flags&uint32(256)) == (0) || (_1_flags&uint32(15)) == (0) {
goto _29
}
- if (_1_flags & uint32(i32(5))) != 0 {
- _13_zRangeOp = str(107589)
+ if (_1_flags & uint32(5)) != 0 {
+ _13_zRangeOp = str(107617)
goto _35
}
- if (_1_flags & uint32(i32(48))) == uint32(i32(48)) {
- _13_zRangeOp = str(107591)
+ if (_1_flags & uint32(48)) == uint32(48) {
+ _13_zRangeOp = str(107619)
goto _35
}
- if (_1_flags & uint32(i32(32))) != 0 {
- _13_zRangeOp = str(107605)
+ if (_1_flags & uint32(32)) != 0 {
+ _13_zRangeOp = str(107633)
goto _35
}
func() {
- if (_1_flags & uint32(i32(16))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126989), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereExplainOneScanØ00__func__Ø000))), unsafe.Pointer(str(107607)))
+ if (_1_flags & uint32(16)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126989), unsafe.Pointer(&_sqlite3WhereExplainOneScanØ00__func__Ø000), unsafe.Pointer(str(107635)))
crt.X__builtin_abort(tls)
}
}()
- _13_zRangeOp = str(107629)
+ _13_zRangeOp = str(107657)
_35:
- _sqlite3XPrintf(tls, &_1_str, str(107631), unsafe.Pointer(_13_zRangeOp))
+ _sqlite3XPrintf(tls, &_1_str, str(107659), unsafe.Pointer(_13_zRangeOp))
goto _39
_29:
- if (_1_flags & uint32(i32(1024))) != uint32(i32(0)) {
- _sqlite3XPrintf(tls, &_1_str, str(107669), (*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_1_pLoop.X8))))).X0, unsafe.Pointer((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_1_pLoop.X8))))).X4))
+ if (_1_flags & uint32(1024)) != (0) {
+ _sqlite3XPrintf(tls, &_1_str, str(107697), (*t105)(unsafe.Pointer(&_1_pLoop.Xu)).XidxNum, unsafe.Pointer((*t105)(unsafe.Pointer(&_1_pLoop.Xu)).XidxStr))
}
_39:
_1_zMsg = _sqlite3StrAccumFinish(tls, &_1_str)
- _ret = _sqlite3VdbeAddOp4(tls, _1_v, i32(165), _1_iId, _iLevel, _iFrom, _1_zMsg, i32(-1))
+ _ret = _sqlite3VdbeAddOp4(tls, _1_v, int32(165), _1_iId, _iLevel, _iFrom, _1_zMsg, int32(-1))
return _ret
- _ = _1_str
_ = _1_zBuf
panic(0)
}
@@ -88256,138 +89299,150 @@ _39:
var _sqlite3WhereExplainOneScanØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WhereExplainOneScanØ00__func__Ø000[0], str(107696), 27)
-}
-
-// Argument pLevel describes a strategy for scanning table pTab. This
-// function appends text to pStr that describes the subset of table
-// rows scanned by the strategy in the form of an SQL expression.
-//
-// For example, if the query:
-//
-// SELECT * FROM t1 WHERE a=1 AND b>2;
-//
-// is run and there is an index on (a, b), then this function returns a
-// string similar to:
-//
-// "a=? AND b>?"
+ crt.Xstrncpy(nil, &_sqlite3WhereExplainOneScanØ00__func__Ø000[0], str(107724), 27)
+}
+
+// C comment
+// /*
+// ** Argument pLevel describes a strategy for scanning table pTab. This
+// ** function appends text to pStr that describes the subset of table
+// ** rows scanned by the strategy in the form of an SQL expression.
+// **
+// ** For example, if the query:
+// **
+// ** SELECT * FROM t1 WHERE a=1 AND b>2;
+// **
+// ** is run and there is an index on (a, b), then this function returns a
+// ** string similar to:
+// **
+// ** "a=? AND b>?"
+// */
func _explainIndexRange(tls *crt.TLS, _pStr *XStrAccum, _pLoop *XWhereLoop) {
var _i, _j int32
var _1_z *int8
var _nEq, _nSkip uint16
var _pIndex *XIndex
- _pIndex = (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4)
- _nEq = (*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0
- _nSkip = _pLoop.X11
- if (int32(_nEq) == i32(0)) && (((_pLoop.X9) & uint32(i32(48))) == uint32(i32(0))) {
+ _pIndex = (*XIndex)((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex)
+ _nEq = (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq
+ _nSkip = _pLoop.XnSkip
+ if (int32(_nEq) == int32(0)) && ((_pLoop.XwsFlags & uint32(48)) == (0)) {
return
}
- _sqlite3StrAccumAppend(tls, _pStr, str(107723), i32(2))
- _i = i32(0)
+ _sqlite3StrAccumAppend(tls, _pStr, str(107751), int32(2))
+ _i = int32(0)
_2:
if _i >= int32(_nEq) {
goto _5
}
_1_z = _explainIndexColumnName(tls, _pIndex, _i)
if _i != 0 {
- _sqlite3StrAccumAppend(tls, _pStr, str(107726), i32(5))
+ _sqlite3StrAccumAppend(tls, _pStr, str(107754), int32(5))
}
_sqlite3XPrintf(tls, _pStr, func() *int8 {
if _i >= int32(_nSkip) {
- return str(107732)
+ return str(107760)
}
- return str(107737)
+ return str(107765)
}(), unsafe.Pointer(_1_z))
_i += 1
goto _2
_5:
_j = _i
- if ((_pLoop.X9) & uint32(i32(32))) != 0 {
- _explainAppendTerm(tls, _pStr, _pIndex, int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X1), _j, _i, str(107605))
- _i = i32(1)
+ if (_pLoop.XwsFlags & uint32(32)) != 0 {
+ _explainAppendTerm(tls, _pStr, _pIndex, int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnBtm), _j, _i, str(107633))
+ _i = int32(1)
}
- if ((_pLoop.X9) & uint32(i32(16))) != 0 {
- _explainAppendTerm(tls, _pStr, _pIndex, int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X2), _j, _i, str(107629))
+ if (_pLoop.XwsFlags & uint32(16)) != 0 {
+ _explainAppendTerm(tls, _pStr, _pIndex, int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnTop), _j, _i, str(107657))
}
- _sqlite3StrAccumAppend(tls, _pStr, str(37898), i32(1))
+ _sqlite3StrAccumAppend(tls, _pStr, str(37853), int32(1))
}
-// Return the name of the i-th column of the pIdx index.
+// C comment
+// /*
+// ** Return the name of the i-th column of the pIdx index.
+// */
func _explainIndexColumnName(tls *crt.TLS, _pIdx *XIndex, _i int32) (r0 *int8) {
- _i = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i))))
- if _i == i32(-2) {
- return str(107745)
+ _i = int32(*elem50(_pIdx.XaiColumn, uintptr(_i)))
+ if _i == int32(-2) {
+ return str(107773)
}
- if _i == i32(-1) {
- return str(27227)
+ if _i == int32(-1) {
+ return str(27182)
}
- return (*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pIdx.X3).X1) + 16*uintptr(_i))).X0
+ return elem41((*XColumn)((*XTable)(_pIdx.XpTable).XaCol), uintptr(_i)).XzName
}
-// This routine is a helper for explainIndexRange() below
-//
-// pStr holds the text of an expression that we are building up one term
-// at a time. This routine adds a new term to the end of the expression.
-// Terms are separated by AND so add the "AND" text for second and subsequent
-// terms only.
+// C comment
+// /*
+// ** This routine is a helper for explainIndexRange() below
+// **
+// ** pStr holds the text of an expression that we are building up one term
+// ** at a time. This routine adds a new term to the end of the expression.
+// ** Terms are separated by AND so add the "AND" text for second and subsequent
+// ** terms only.
+// */
func _explainAppendTerm(tls *crt.TLS, _pStr *XStrAccum, _pIdx *XIndex, _nTerm int32, _iTerm int32, _bAnd int32, _zOp *int8) {
var _i int32
func() {
- if _nTerm < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126844), unsafe.Pointer((*int8)(unsafe.Pointer(&_explainAppendTermØ00__func__Ø000))), unsafe.Pointer(str(107752)))
+ if _nTerm < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126844), unsafe.Pointer(&_explainAppendTermØ00__func__Ø000), unsafe.Pointer(str(107780)))
crt.X__builtin_abort(tls)
}
}()
if _bAnd != 0 {
- _sqlite3StrAccumAppend(tls, _pStr, str(107726), i32(5))
+ _sqlite3StrAccumAppend(tls, _pStr, str(107754), int32(5))
}
- if _nTerm > i32(1) {
- _sqlite3StrAccumAppend(tls, _pStr, str(107761), i32(1))
+ if _nTerm > int32(1) {
+ _sqlite3StrAccumAppend(tls, _pStr, str(107789), int32(1))
}
- _i = i32(0)
+ _i = int32(0)
_4:
if _i >= _nTerm {
goto _7
}
if _i != 0 {
- _sqlite3StrAccumAppend(tls, _pStr, str(107763), i32(1))
+ _sqlite3StrAccumAppend(tls, _pStr, str(107791), int32(1))
}
_sqlite3StrAccumAppendAll(tls, _pStr, _explainIndexColumnName(tls, _pIdx, _iTerm+_i))
_i += 1
goto _4
_7:
- if _nTerm > i32(1) {
- _sqlite3StrAccumAppend(tls, _pStr, str(37898), i32(1))
+ if _nTerm > int32(1) {
+ _sqlite3StrAccumAppend(tls, _pStr, str(37853), int32(1))
}
- _sqlite3StrAccumAppend(tls, _pStr, _zOp, i32(1))
- if _nTerm > i32(1) {
- _sqlite3StrAccumAppend(tls, _pStr, str(107761), i32(1))
+ _sqlite3StrAccumAppend(tls, _pStr, _zOp, int32(1))
+ if _nTerm > int32(1) {
+ _sqlite3StrAccumAppend(tls, _pStr, str(107789), int32(1))
}
- _i = i32(0)
+ _i = int32(0)
_11:
if _i >= _nTerm {
goto _14
}
if _i != 0 {
- _sqlite3StrAccumAppend(tls, _pStr, str(107763), i32(1))
+ _sqlite3StrAccumAppend(tls, _pStr, str(107791), int32(1))
}
- _sqlite3StrAccumAppend(tls, _pStr, str(50423), i32(1))
+ _sqlite3StrAccumAppend(tls, _pStr, str(50378), int32(1))
_i += 1
goto _11
_14:
- if _nTerm > i32(1) {
- _sqlite3StrAccumAppend(tls, _pStr, str(37898), i32(1))
+ if _nTerm > int32(1) {
+ _sqlite3StrAccumAppend(tls, _pStr, str(37853), int32(1))
}
}
var _explainAppendTermØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_explainAppendTermØ00__func__Ø000[0], str(107765), 18)
+ crt.Xstrncpy(nil, &_explainAppendTermØ00__func__Ø000[0], str(107793), 18)
}
-// Generate code for the start of the iLevel-th loop in the WHERE clause
-// implementation described by pWInfo.
+// C comment
+// /*
+// ** Generate code for the start of the iLevel-th loop in the WHERE clause
+// ** implementation described by pWInfo.
+// */
func _sqlite3WhereCodeOneLoopStart(tls *crt.TLS, _pWInfo *XWhereInfo, _iLevel int32, _notReady uint64) (r0 uint64) {
var _j, _k, _iCur, _addrNxt, _omitTable, _bRev, _addrBrk, _addrHalt, _addrCont, _iRowidReg, _iReleaseReg, _loopAgain, _3_regYield, _4_iReg, _4_addrNotFound, _4_nConstraint, _4_iIn, _5_iTarget, _15_testOp, _15_start, _15_memEndValue, _17_r1, _17_rTemp, _17_op, _26_regBase, _26_startEq, _26_endEq, _26_start_constraints, _26_nConstraint, _26_iIdxCur, _26_nExtraReg, _26_op, _65_iCovCur, _65_regReturn, _65_regRowset, _65_regRowid, _65_iLoopBody, _65_iRetInit, _65_untestedTerms, _65_ii, _66_nNotReady, _72_iTerm, _76_jmp1, _78_addrExplain, _79_r, _79_iSet, _81_nPk, _81_iPk, _82_iCol, _92_skipLikeAddr int32
var _96_x uint32
@@ -88410,164 +89465,164 @@ func _sqlite3WhereCodeOneLoopStart(tls *crt.TLS, _pWInfo *XWhereInfo, _iLevel in
var _pLevel *XWhereLevel
var _pTerm, _15_pStart, _15_pEnd, _26_pRangeStart, _26_pRangeEnd, _34_t, _75_pOrTerm, _97_pAlt *XWhereTerm
var _pWC, _65_pOrWc *XWhereClause
- _iRowidReg = i32(0)
- _iReleaseReg = i32(0)
+ _iRowidReg = int32(0)
+ _iReleaseReg = int32(0)
_pIdx = nil
- _pParse = (*XParse)(_pWInfo.X0)
- _v = (*TVdbe)(_pParse.X2)
- _pWC = (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22)))
- _db = (*Xsqlite3)(_pParse.X0)
- _pLevel = (*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(_iLevel)))
- _pLoop = (*XWhereLoop)(_pLevel.X18)
- _pTabItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.X1).X2))))) + 68*uintptr(_pLevel.X11)))
- _iCur = _pTabItem.X11
- *(*uint64)(unsafe.Pointer(&(_pLevel.X19))) = _notReady & (^_sqlite3WhereGetMask(tls, (*XWhereMaskSet)(unsafe.Pointer(&(_pWInfo.X23))), _iCur))
- _bRev = int32(((_pWInfo.X20) >> uint(_iLevel)) & uint64(i32(1)))
- _omitTable = bool2int((((_pLoop.X9) & uint32(i32(64))) != uint32(i32(0))) && ((int32(_pWInfo.X10) & i32(32)) == i32(0)))
- _addrBrk = store1((*int32)(unsafe.Pointer(&(_pLevel.X3))), store1((*int32)(unsafe.Pointer(&(_pLevel.X4))), _sqlite3VdbeMakeLabel(tls, _v)))
- _addrCont = store1((*int32)(unsafe.Pointer(&(_pLevel.X6))), _sqlite3VdbeMakeLabel(tls, _v))
- if (int32(_pLevel.X11) > i32(0)) && ((int32((*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTabItem)) + 68*uintptr(i32(0)))).X9))).X0) & i32(8)) != i32(0)) {
- *(*int32)(unsafe.Pointer(&(_pLevel.X0))) = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _pLevel.X0)
- _sqlite3VdbeComment(tls, _v, str(107783))
+ _pParse = (*XParse)(_pWInfo.XpParse)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _pWC = &_pWInfo.XsWC
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pLevel = elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), uintptr(_iLevel))
+ _pLoop = (*XWhereLoop)(_pLevel.XpWLoop)
+ _pTabItem = elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.XpTabList).Xa))), uintptr(_pLevel.XiFrom))
+ _iCur = _pTabItem.XiCursor
+ _pLevel.XnotReady = _notReady & (^_sqlite3WhereGetMask(tls, &_pWInfo.XsMaskSet, _iCur))
+ _bRev = int32((_pWInfo.XrevMask >> uint(_iLevel)) & uint64(1))
+ _omitTable = bool2int(((_pLoop.XwsFlags & uint32(64)) != (0)) && ((int32(_pWInfo.XwctrlFlags) & int32(32)) == int32(0)))
+ _addrBrk = store2(&_pLevel.XaddrBrk, store2(&_pLevel.XaddrNxt, _sqlite3VdbeMakeLabel(tls, _v)))
+ _addrCont = store2(&_pLevel.XaddrCont, _sqlite3VdbeMakeLabel(tls, _v))
+ if (int32(_pLevel.XiFrom) > int32(0)) && ((int32((elem6(_pTabItem, 0).Xfg).Xjointype) & int32(8)) != int32(0)) {
+ _pLevel.XiLeftJoin = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _pLevel.XiLeftJoin)
+ _sqlite3VdbeComment(tls, _v, str(107811))
}
_j = _iLevel
_3:
- if _j <= i32(0) || ((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24)))))+76*uintptr(_j))).X0) != i32(0) {
+ if _j <= int32(0) || (elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), uintptr(_j)).XiLeftJoin) != int32(0) {
goto _7
}
_j -= 1
goto _3
_7:
- _addrHalt = (*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(_j))).X3
- if ((uint32(((*t28)(unsafe.Pointer(&(_pTabItem.X9))).X1)>>uint(i32(4))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _3_regYield = _pTabItem.X7
- _sqlite3VdbeAddOp3(tls, _v, i32(15), _3_regYield, i32(0), _pTabItem.X6)
- *(*int32)(unsafe.Pointer(&(_pLevel.X16))) = _sqlite3VdbeAddOp2(tls, _v, i32(16), _3_regYield, _addrBrk)
- _sqlite3VdbeComment(tls, _v, str(107195), unsafe.Pointer((*XTable)(_pTabItem.X4).X0))
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = uint8(i32(13))
+ _addrHalt = elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), uintptr(_j)).XaddrBrk
+ if ((uint32((_pTabItem.Xfg.XnotIndexed)>>4) << 31) >> 31) != 0 {
+ _3_regYield = _pTabItem.XregReturn
+ _sqlite3VdbeAddOp3(tls, _v, int32(15), _3_regYield, int32(0), _pTabItem.XaddrFillSub)
+ _pLevel.Xp2 = _sqlite3VdbeAddOp2(tls, _v, int32(16), _3_regYield, _addrBrk)
+ _sqlite3VdbeComment(tls, _v, str(107223), unsafe.Pointer((*XTable)(_pTabItem.XpTab).XzName))
+ _pLevel.Xop = uint8(13)
goto _270
}
- if ((_pLoop.X9) & uint32(i32(1024))) == uint32(i32(0)) {
+ if (_pLoop.XwsFlags & uint32(1024)) == (0) {
goto _10
}
- _4_nConstraint = int32(_pLoop.X10)
+ _4_nConstraint = int32(_pLoop.XnLTerm)
_sqlite3ExprCachePush(tls, _pParse)
- _4_iReg = _sqlite3GetTempRange(tls, _pParse, _4_nConstraint+i32(2))
- _4_addrNotFound = _pLevel.X3
- _j = i32(0)
+ _4_iReg = _sqlite3GetTempRange(tls, _pParse, _4_nConstraint+int32(2))
+ _4_addrNotFound = _pLevel.XaddrBrk
+ _j = int32(0)
_11:
if _j >= _4_nConstraint {
goto _14
}
- _5_iTarget = (_4_iReg + _j) + i32(2)
- _pTerm = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_j)))
+ _5_iTarget = (_4_iReg + _j) + int32(2)
+ _pTerm = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_j))
if func() int32 {
if _pTerm == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127994), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127994), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _12
}
- if (int32(_pTerm.X4) & i32(1)) != 0 {
+ if (int32(_pTerm.XeOperator) & int32(1)) != 0 {
_codeEqualityTerm(tls, _pParse, _pTerm, _pLevel, _j, _bRev, _5_iTarget)
- _4_addrNotFound = _pLevel.X4
+ _4_addrNotFound = _pLevel.XaddrNxt
goto _19
}
- _7_pRight = (*XExpr)((*XExpr)(_pTerm.X0).X5)
- _codeExprOrVector(tls, _pParse, _7_pRight, _5_iTarget, i32(1))
+ _7_pRight = (*XExpr)((*XExpr)(_pTerm.XpExpr).XpRight)
+ _codeExprOrVector(tls, _pParse, _7_pRight, _5_iTarget, int32(1))
_19:
_12:
_j += 1
goto _11
_14:
- _sqlite3VdbeAddOp2(tls, _v, i32(56), (*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0, _4_iReg)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), _4_nConstraint, _4_iReg+i32(1))
- _sqlite3VdbeAddOp4(tls, _v, i32(11), _iCur, _4_addrNotFound, _4_iReg, (*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4, func() int32 {
- if ((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X1) != 0 {
- return i32(-1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), (*t105)(unsafe.Pointer(&_pLoop.Xu)).XidxNum, _4_iReg)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), _4_nConstraint, _4_iReg+int32(1))
+ _sqlite3VdbeAddOp4(tls, _v, int32(11), _iCur, _4_addrNotFound, _4_iReg, (*t105)(unsafe.Pointer(&_pLoop.Xu)).XidxStr, func() int32 {
+ if ((*t105)(unsafe.Pointer(&_pLoop.Xu)).XneedFree) != 0 {
+ return int32(-1)
}
- return i32(-2)
+ return int32(-2)
}())
- *(*uint8)(unsafe.Pointer(&((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X1))) = uint8(i32(0))
- *(*int32)(unsafe.Pointer(&(_pLevel.X15))) = _iCur
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = uint8(func() int32 {
- if (_pWInfo.X14) != 0 {
- return i32(164)
+ (*t105)(unsafe.Pointer(&_pLoop.Xu)).XneedFree = 0
+ _pLevel.Xp1 = _iCur
+ _pLevel.Xop = uint8(func() int32 {
+ if _pWInfo.XeOnePass != 0 {
+ return int32(164)
}
- return i32(50)
+ return int32(50)
}())
- *(*int32)(unsafe.Pointer(&(_pLevel.X16))) = _sqlite3VdbeCurrentAddr(tls, _v)
- _4_iIn = (*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X0
- _j = _4_nConstraint - i32(1)
+ _pLevel.Xp2 = _sqlite3VdbeCurrentAddr(tls, _v)
+ _4_iIn = (*t114)(unsafe.Pointer(&_pLevel.Xu)).XnIn
+ _j = _4_nConstraint - int32(1)
_24:
- if _j < i32(0) {
+ if _j < int32(0) {
goto _27
}
- _pTerm = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_j)))
- if (_j < i32(16)) && ((int32((*t66)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X3)>>uint(_j))&i32(1)) != 0 {
+ _pTerm = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_j))
+ if (_j < int32(16)) && ((int32((*t105)(unsafe.Pointer(&_pLoop.Xu)).XomitMask)>>uint(_j))&int32(1)) != 0 {
_disableTerm(tls, _pLevel, _pTerm)
goto _31
}
- if (int32(_pTerm.X4) & i32(1)) == i32(0) {
+ if (int32(_pTerm.XeOperator) & int32(1)) == int32(0) {
goto _31
}
func() {
- if (*TInLoop)((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X1) == nil && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128027), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(107812)))
+ if (*TInLoop)((*t114)(unsafe.Pointer(&_pLevel.Xu)).XaInLoop) == nil && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128027), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(107840)))
crt.X__builtin_abort(tls)
}
}()
- if (_db.X17) == 0 {
+ if _db.XmallocFailed == 0 {
func() {
- if _4_iIn <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128029), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(107856)))
+ if _4_iIn <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128029), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(107884)))
crt.X__builtin_abort(tls)
}
}()
- _10_pOp = _sqlite3VdbeGetOp(tls, _v, (*TInLoop)(unsafe.Pointer(uintptr((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X1)+12*uintptr(preInc1(&_4_iIn, -1)))).X1)
+ _10_pOp = _sqlite3VdbeGetOp(tls, _v, elem115((*TInLoop)((*t114)(unsafe.Pointer(&_pLevel.Xu)).XaInLoop), uintptr(preInc2(&_4_iIn, -1))).XaddrInTop)
func() {
- if int32(_10_pOp.X0) != i32(99) && int32(_10_pOp.X0) != i32(125) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128031), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(107862)))
+ if int32(_10_pOp.Xopcode) != int32(99) && int32(_10_pOp.Xopcode) != int32(125) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128031), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(107890)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_10_pOp.X0) == i32(99) && (_10_pOp.X5) != ((_4_iReg+_j)+i32(2)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128032), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(107910)))
+ if int32(_10_pOp.Xopcode) == int32(99) && _10_pOp.Xp3 != ((_4_iReg+_j)+int32(2)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128032), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(107938)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_10_pOp.X0) == i32(125) && (_10_pOp.X4) != ((_4_iReg+_j)+i32(2)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128033), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(107954)))
+ if int32(_10_pOp.Xopcode) == int32(125) && _10_pOp.Xp2 != ((_4_iReg+_j)+int32(2)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128033), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(107982)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp3(tls, _v, int32(_10_pOp.X0), _10_pOp.X3, _10_pOp.X4, _10_pOp.X5)
+ _sqlite3VdbeAddOp3(tls, _v, int32(_10_pOp.Xopcode), _10_pOp.Xp1, _10_pOp.Xp2, _10_pOp.Xp3)
}
- _10_pCompare = _sqlite3PExpr(tls, _pParse, i32(78), nil, nil)
+ _10_pCompare = _sqlite3PExpr(tls, _pParse, int32(78), nil, nil)
func() {
- if _10_pCompare == nil && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128041), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(107997)))
+ if _10_pCompare == nil && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128041), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108025)))
crt.X__builtin_abort(tls)
}
}()
if _10_pCompare == nil {
goto _50
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_10_pCompare.X4))))) = (*XExpr)((*XExpr)(_pTerm.X0).X4)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_10_pCompare.X5))))) = store36(&_10_pRight, _sqlite3Expr(tls, _db, i32(157), nil))
+ *(**XExpr)(unsafe.Pointer(&_10_pCompare.XpLeft)) = (*XExpr)((*XExpr)(_pTerm.XpExpr).XpLeft)
+ *(**XExpr)(unsafe.Pointer(&_10_pCompare.XpRight)) = store58(&_10_pRight, _sqlite3Expr(tls, _db, int32(157), nil))
if _10_pRight != nil {
- *(*int32)(unsafe.Pointer(&(_10_pRight.X8))) = (_4_iReg + _j) + i32(2)
- _sqlite3ExprIfFalse(tls, _pParse, _10_pCompare, _pLevel.X6, i32(0))
+ _10_pRight.XiTable = (_4_iReg + _j) + int32(2)
+ _sqlite3ExprIfFalse(tls, _pParse, _10_pCompare, _pLevel.XaddrCont, int32(0))
}
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_10_pCompare.X4))))) = nil
+ *(**XExpr)(unsafe.Pointer(&_10_pCompare.XpLeft)) = nil
_sqlite3ExprDelete(tls, _db, _10_pCompare)
_50:
_31:
@@ -88577,69 +89632,69 @@ _27:
_sqlite3ExprCachePop(tls, _pParse)
goto _270
_10:
- if ((_pLoop.X9)&uint32(i32(256))) == uint32(i32(0)) || ((_pLoop.X9)&uint32(i32(5))) == uint32(i32(0)) {
+ if (_pLoop.XwsFlags&uint32(256)) == (0) || (_pLoop.XwsFlags&uint32(5)) == (0) {
goto _54
}
func() {
- if int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128073), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108029)))
+ if int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128073), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108057)))
crt.X__builtin_abort(tls)
}
}()
- _pTerm = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(i32(0))))
+ _pTerm = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), 0)
func() {
if _pTerm == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128075), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108051)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128075), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108079)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)(_pTerm.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128076), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108060)))
+ if (*XExpr)(_pTerm.XpExpr) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128076), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108088)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _omitTable != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128077), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108076)))
+ if _omitTable != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128077), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108104)))
crt.X__builtin_abort(tls)
}
}()
- _iReleaseReg = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _iRowidReg = _codeEqualityTerm(tls, _pParse, _pTerm, _pLevel, i32(0), _bRev, _iReleaseReg)
+ _iReleaseReg = preInc2(&_pParse.XnMem, 1)
+ _iRowidReg = _codeEqualityTerm(tls, _pParse, _pTerm, _pLevel, int32(0), _bRev, _iReleaseReg)
if _iRowidReg != _iReleaseReg {
_sqlite3ReleaseTempReg(tls, _pParse, _iReleaseReg)
}
- _addrNxt = _pLevel.X4
- _sqlite3VdbeAddOp3(tls, _v, i32(31), _iCur, _addrNxt, _iRowidReg)
- _sqlite3ExprCacheAffinityChange(tls, _pParse, _iRowidReg, i32(1))
- _sqlite3ExprCacheStore(tls, _pParse, _iCur, i32(-1), _iRowidReg)
- _sqlite3VdbeComment(tls, _v, str(61650))
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = uint8(i32(164))
+ _addrNxt = _pLevel.XaddrNxt
+ _sqlite3VdbeAddOp3(tls, _v, int32(31), _iCur, _addrNxt, _iRowidReg)
+ _sqlite3ExprCacheAffinityChange(tls, _pParse, _iRowidReg, int32(1))
+ _sqlite3ExprCacheStore(tls, _pParse, _iCur, int32(-1), _iRowidReg)
+ _sqlite3VdbeComment(tls, _v, str(93736))
+ _pLevel.Xop = uint8(164)
goto _270
_54:
- if ((_pLoop.X9)&uint32(i32(256))) == uint32(i32(0)) || ((_pLoop.X9)&uint32(i32(2))) == uint32(i32(0)) {
+ if (_pLoop.XwsFlags&uint32(256)) == (0) || (_pLoop.XwsFlags&uint32(2)) == (0) {
goto _66
}
- _15_testOp = i32(164)
- _15_memEndValue = i32(0)
+ _15_testOp = int32(164)
+ _15_memEndValue = int32(0)
func() {
- if _omitTable != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128099), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108076)))
+ if _omitTable != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128099), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108104)))
crt.X__builtin_abort(tls)
}
}()
- _j = i32(0)
- _15_pStart = store65(&_15_pEnd, nil)
- if ((_pLoop.X9) & uint32(i32(32))) != 0 {
- _15_pStart = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(postInc1(&_j, int32(1)))))
+ _j = int32(0)
+ _15_pStart = store100(&_15_pEnd, nil)
+ if (_pLoop.XwsFlags & uint32(32)) != 0 {
+ _15_pStart = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(postInc2(&_j, 1)))
}
- if ((_pLoop.X9) & uint32(i32(16))) != 0 {
- _15_pEnd = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(postInc1(&_j, int32(1)))))
+ if (_pLoop.XwsFlags & uint32(16)) != 0 {
+ _15_pEnd = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(postInc2(&_j, 1)))
}
func() {
if _15_pStart == nil && _15_pEnd == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128104), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108089)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128104), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108117)))
crt.X__builtin_abort(tls)
}
}()
@@ -88651,220 +89706,210 @@ _54:
if _15_pStart == nil {
goto _75
}
- _17_aMoveOp = [4]uint8{u8(27), u8(25), u8(24), u8(26)}
- i32(0)
- i32(0)
- i32(0)
+ _17_aMoveOp = [4]uint8{uint8(27), uint8(25), uint8(24), uint8(26)}
+
func() {
- if (int32(_15_pStart.X3) & i32(0)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128129), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108110)))
+ if (int32(_15_pStart.XwtFlags) & int32(0)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128129), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108138)))
crt.X__builtin_abort(tls)
}
}()
- _17_pX = (*XExpr)(_15_pStart.X0)
+ _17_pX = (*XExpr)(_15_pStart.XpExpr)
func() {
if _17_pX == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128132), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(67534)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128132), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(65696)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3ExprIsVector(tls, (*XExpr)(_17_pX.X5)) != 0 {
- _17_r1 = store1(&_17_rTemp, _sqlite3GetTempReg(tls, _pParse))
- _codeExprOrVector(tls, _pParse, (*XExpr)(_17_pX.X5), _17_r1, i32(1))
- _17_op = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_17_aMoveOp)) + 1*uintptr((int32(_17_pX.X0)-i32(79))|i32(1)))))
+ if _sqlite3ExprIsVector(tls, (*XExpr)(_17_pX.XpRight)) != 0 {
+ _17_r1 = store2(&_17_rTemp, _sqlite3GetTempReg(tls, _pParse))
+ _codeExprOrVector(tls, _pParse, (*XExpr)(_17_pX.XpRight), _17_r1, int32(1))
+ _17_op = int32(*elem15((*uint8)(unsafe.Pointer(&_17_aMoveOp)), uintptr((int32(_17_pX.Xop)-int32(79))|int32(1))))
goto _81
}
- _17_r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_17_pX.X5), &_17_rTemp)
+ _17_r1 = _sqlite3ExprCodeTemp(tls, _pParse, (*XExpr)(_17_pX.XpRight), &_17_rTemp)
_disableTerm(tls, _pLevel, _15_pStart)
- _17_op = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_17_aMoveOp)) + 1*uintptr(int32(_17_pX.X0)-i32(79)))))
+ _17_op = int32(*elem15((*uint8)(unsafe.Pointer(&_17_aMoveOp)), uintptr(int32(_17_pX.Xop)-int32(79))))
_81:
_sqlite3VdbeAddOp3(tls, _v, _17_op, _iCur, _addrBrk, _17_r1)
- _sqlite3VdbeComment(tls, _v, str(61650))
- _sqlite3ExprCacheAffinityChange(tls, _pParse, _17_r1, i32(1))
+ _sqlite3VdbeComment(tls, _v, str(93736))
+ _sqlite3ExprCacheAffinityChange(tls, _pParse, _17_r1, int32(1))
_sqlite3ReleaseTempReg(tls, _pParse, _17_rTemp)
goto _82
_75:
_sqlite3VdbeAddOp2(tls, _v, func() int32 {
if _bRev != 0 {
- return i32(33)
+ return int32(33)
}
- return i32(37)
+ return int32(37)
}(), _iCur, _addrHalt)
_82:
if _15_pEnd == nil {
goto _85
}
- _21_pX = (*XExpr)(_15_pEnd.X0)
+ _21_pX = (*XExpr)(_15_pEnd.XpExpr)
func() {
if _21_pX == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128159), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(67534)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128159), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(65696)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_15_pEnd.X3) & i32(0)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128160), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108144)))
+ if (int32(_15_pEnd.XwtFlags) & int32(0)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128160), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108172)))
crt.X__builtin_abort(tls)
}
}()
- _15_memEndValue = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _codeExprOrVector(tls, _pParse, (*XExpr)(_21_pX.X5), _15_memEndValue, i32(1))
- if (i32(0) == _sqlite3ExprIsVector(tls, (*XExpr)(_21_pX.X5))) && ((int32(_21_pX.X0) == i32(81)) || (int32(_21_pX.X0) == i32(79))) {
+ _15_memEndValue = preInc2(&_pParse.XnMem, 1)
+ _codeExprOrVector(tls, _pParse, (*XExpr)(_21_pX.XpRight), _15_memEndValue, int32(1))
+ if (int32(0) == _sqlite3ExprIsVector(tls, (*XExpr)(_21_pX.XpRight))) && ((int32(_21_pX.Xop) == int32(81)) || (int32(_21_pX.Xop) == int32(79))) {
_15_testOp = func() int32 {
if _bRev != 0 {
- return i32(80)
+ return int32(80)
}
- return i32(82)
+ return int32(82)
}()
goto _95
}
_15_testOp = func() int32 {
if _bRev != 0 {
- return i32(81)
+ return int32(81)
}
- return i32(79)
+ return int32(79)
}()
_95:
- if i32(0) == _sqlite3ExprIsVector(tls, (*XExpr)(_21_pX.X5)) {
+ if int32(0) == _sqlite3ExprIsVector(tls, (*XExpr)(_21_pX.XpRight)) {
_disableTerm(tls, _pLevel, _15_pEnd)
}
_85:
_15_start = _sqlite3VdbeCurrentAddr(tls, _v)
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = uint8(func() int32 {
+ _pLevel.Xop = uint8(func() int32 {
if _bRev != 0 {
- return i32(6)
+ return int32(6)
}
- return i32(7)
+ return int32(7)
}())
- *(*int32)(unsafe.Pointer(&(_pLevel.X15))) = _iCur
- *(*int32)(unsafe.Pointer(&(_pLevel.X16))) = _15_start
+ _pLevel.Xp1 = _iCur
+ _pLevel.Xp2 = _15_start
func() {
- if int32(_pLevel.X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128180), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108176)))
+ if int32(_pLevel.Xp5) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128180), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108204)))
crt.X__builtin_abort(tls)
}
}()
- if _15_testOp != i32(164) {
- _iRowidReg = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(125), _iCur, _iRowidReg)
- _sqlite3ExprCacheStore(tls, _pParse, _iCur, i32(-1), _iRowidReg)
+ if _15_testOp != int32(164) {
+ _iRowidReg = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(125), _iCur, _iRowidReg)
+ _sqlite3ExprCacheStore(tls, _pParse, _iCur, int32(-1), _iRowidReg)
_sqlite3VdbeAddOp3(tls, _v, _15_testOp, _15_memEndValue, _addrBrk, _iRowidReg)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(83)))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(83))
}
goto _270
_66:
- if ((_pLoop.X9) & uint32(i32(512))) == 0 {
+ if (_pLoop.XwsFlags & uint32(512)) == 0 {
goto _105
}
- _26_nEq = (*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0
- _26_nBtm = (*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X1
- _26_nTop = (*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X2
+ _26_nEq = (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq
+ _26_nBtm = (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnBtm
+ _26_nTop = (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnTop
_26_pRangeStart = nil
_26_pRangeEnd = nil
- _26_nExtraReg = i32(0)
+ _26_nExtraReg = int32(0)
_26_zEndAff = nil
- _26_bSeekPastNull = u8(0)
- _26_bStopAtNull = u8(0)
- _pIdx = (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4)
- _26_iIdxCur = _pLevel.X2
+ _26_bSeekPastNull = uint8(0)
+ _26_bStopAtNull = uint8(0)
+ _pIdx = (*XIndex)((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex)
+ _26_iIdxCur = _pLevel.XiIdxCur
func() {
- if int32(_26_nEq) < int32(_pLoop.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128260), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108190)))
+ if int32(_26_nEq) < int32(_pLoop.XnSkip) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128260), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108218)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExprList)(_pWInfo.X2) != nil && ((*XExprList)(_pWInfo.X2).X0) != i32(1) && (int32(_pWInfo.X10)&i32(1)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128270), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108208)))
+ if (*XExprList)(_pWInfo.XpOrderBy) != nil && ((*XExprList)(_pWInfo.XpOrderBy).XnExpr) != int32(1) && (int32(_pWInfo.XwctrlFlags)&int32(1)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128270), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108236)))
crt.X__builtin_abort(tls)
}
}()
- if (((int32(_pWInfo.X10) & i32(1)) != i32(0)) && (int32(_pWInfo.X12) > i32(0))) && (int32(_pIdx.X13) > int32(_26_nEq)) {
+ if (((int32(_pWInfo.XwctrlFlags) & int32(1)) != int32(0)) && (int32(_pWInfo.XnOBSat) > int32(0))) && (int32(_pIdx.XnKeyCol) > int32(_26_nEq)) {
func() {
- if int32(_pLoop.X11) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128277), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108303)))
+ if int32(_pLoop.XnSkip) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128277), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108331)))
crt.X__builtin_abort(tls)
}
}()
- _26_bSeekPastNull = uint8(i32(1))
- _26_nExtraReg = i32(1)
+ _26_bSeekPastNull = uint8(1)
+ _26_nExtraReg = int32(1)
}
_j = int32(_26_nEq)
- if ((_pLoop.X9) & uint32(i32(32))) != 0 {
- _26_pRangeStart = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(postInc1(&_j, int32(1)))))
+ if (_pLoop.XwsFlags & uint32(32)) != 0 {
+ _26_pRangeStart = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(postInc2(&_j, 1)))
_26_nExtraReg = func() int32 {
- if _26_nExtraReg > int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X1) {
+ if _26_nExtraReg > int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnBtm) {
return _26_nExtraReg
}
- return int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X1)
+ return int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnBtm)
}()
func() {
- if (int32(_26_pRangeStart.X3)&i32(256)) != i32(0) && ((_pLoop.X9)&uint32(i32(16))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128290), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108319)))
+ if (int32(_26_pRangeStart.XwtFlags)&int32(256)) != int32(0) && (_pLoop.XwsFlags&uint32(16)) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128290), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108347)))
crt.X__builtin_abort(tls)
}
}()
}
- if ((_pLoop.X9) & uint32(i32(16))) == 0 {
+ if (_pLoop.XwsFlags & uint32(16)) == 0 {
goto _123
}
- _26_pRangeEnd = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(postInc1(&_j, int32(1)))))
+ _26_pRangeEnd = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(postInc2(&_j, 1)))
_26_nExtraReg = func() int32 {
- if _26_nExtraReg > int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X2) {
+ if _26_nExtraReg > int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnTop) {
return _26_nExtraReg
}
- return int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X2)
+ return int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnTop)
}()
- if (int32(_26_pRangeEnd.X3) & i32(256)) != i32(0) {
+ if (int32(_26_pRangeEnd.XwtFlags) & int32(256)) != int32(0) {
func() {
if _26_pRangeStart == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128298), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108401)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128298), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108429)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_26_pRangeStart.X3) & i32(256)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128299), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108416)))
+ if (int32(_26_pRangeStart.XwtFlags) & int32(256)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128299), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108444)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_pLevel.X9))) = uint32(preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1))
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(1), int32(_pLevel.X9))
- _sqlite3VdbeComment(tls, _v, str(108452))
- *(*int32)(unsafe.Pointer(&(_pLevel.X10))) = _sqlite3VdbeCurrentAddr(tls, _v)
+ _pLevel.XiLikeRepCntr = uint32(preInc2(&_pParse.XnMem, 1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(1), int32(_pLevel.XiLikeRepCntr))
+ _sqlite3VdbeComment(tls, _v, str(108480))
+ _pLevel.XaddrLikeRep = _sqlite3VdbeCurrentAddr(tls, _v)
func() {
- if (_bRev & i32(-2)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128308), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108470)))
+ if (_bRev & int32(-2)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128308), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108498)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_pLevel.X9)))
- *p = (*p) << uint(i32(1))
- sink5(*p)
- }
- {
- p := (*uint32)(unsafe.Pointer(&(_pLevel.X9)))
- *p = (*p) | uint32(_bRev^bool2int(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X7)) + 1*uintptr(_26_nEq)))) == i32(1)))
- sink5(*p)
- }
+ _pLevel.XiLikeRepCntr <<= 1
+ _pLevel.XiLikeRepCntr |= uint32(_bRev ^ bool2int(int32(*elem15(_pIdx.XaSortOrder, uintptr(_26_nEq))) == int32(1)))
}
if _26_pRangeStart != nil {
goto _133
}
- _j = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_26_nEq))))
- if ((_j >= i32(0)) && (int32((*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pIdx.X3).X1)+16*uintptr(_j))).X3) == i32(0))) || (_j == i32(-2)) {
- _26_bSeekPastNull = uint8(i32(1))
+ _j = int32(*elem50(_pIdx.XaiColumn, uintptr(_26_nEq)))
+ if ((_j >= int32(0)) && (int32(elem41((*XColumn)((*XTable)(_pIdx.XpTable).XaCol), uintptr(_j)).XnotNull) == int32(0))) || (_j == int32(-2)) {
+ _26_bSeekPastNull = uint8(1)
}
_133:
_123:
func() {
- if _26_pRangeEnd != nil && (int32(_26_pRangeEnd.X3)&i32(0)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128320), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108485)))
+ if _26_pRangeEnd != nil && (int32(_26_pRangeEnd.XwtFlags)&int32(0)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128320), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108513)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_26_nEq) < int32(_pIdx.X13)) && (_bRev == bool2int(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X7)) + 1*uintptr(_26_nEq)))) == i32(0)))) || (_bRev != 0 && (int32(_pIdx.X13) == int32(_26_nEq))) {
+ if ((int32(_26_nEq) < int32(_pIdx.XnKeyCol)) && (_bRev == bool2int(int32(*elem15(_pIdx.XaSortOrder, uintptr(_26_nEq))) == int32(0)))) || (_bRev != 0 && (int32(_pIdx.XnKeyCol) == int32(_26_nEq))) {
_34_t = _26_pRangeEnd
_26_pRangeEnd = _26_pRangeStart
_26_pRangeStart = _34_t
@@ -88878,59 +89923,55 @@ _123:
_26_regBase = _codeAllEqualityTerms(tls, _pParse, _pLevel, _bRev, _26_nExtraReg, &_26_zStartAff)
func() {
if _26_zStartAff != nil && _sqlite3Strlen30(tls, _26_zStartAff) < int32(_26_nEq) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128340), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108538)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128340), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108566)))
crt.X__builtin_abort(tls)
}
}()
if (_26_zStartAff != nil) && (_26_nTop != 0) {
- _26_zEndAff = _sqlite3DbStrDup(tls, _db, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_26_zStartAff))+1*uintptr(_26_nEq))))
+ _26_zEndAff = _sqlite3DbStrDup(tls, _db, elem1(_26_zStartAff, uintptr(_26_nEq)))
}
- _addrNxt = _pLevel.X4
- _26_startEq = bool2int((_26_pRangeStart == nil) || (int32(_26_pRangeStart.X4)&i32(40)) != 0)
- _26_endEq = bool2int((_26_pRangeEnd == nil) || (int32(_26_pRangeEnd.X4)&i32(40)) != 0)
- _26_start_constraints = bool2int((_26_pRangeStart != nil) || (int32(_26_nEq) > i32(0)))
+ _addrNxt = _pLevel.XaddrNxt
+ _26_startEq = bool2int((_26_pRangeStart == nil) || (int32(_26_pRangeStart.XeOperator)&int32(40)) != 0)
+ _26_endEq = bool2int((_26_pRangeEnd == nil) || (int32(_26_pRangeEnd.XeOperator)&int32(40)) != 0)
+ _26_start_constraints = bool2int((_26_pRangeStart != nil) || (int32(_26_nEq) > int32(0)))
_26_nConstraint = int32(_26_nEq)
if _26_pRangeStart == nil {
goto _152
}
- _38_pRight = (*XExpr)((*XExpr)(_26_pRangeStart.X0).X5)
+ _38_pRight = (*XExpr)((*XExpr)(_26_pRangeStart.XpExpr).XpRight)
_codeExprOrVector(tls, _pParse, _38_pRight, _26_regBase+int32(_26_nEq), int32(_26_nBtm))
_whereLikeOptimizationStringFixup(tls, _v, _pLevel, _26_pRangeStart)
- if ((int32(_26_pRangeStart.X3) & i32(0)) == i32(0)) && _sqlite3ExprCanBeNull(tls, _38_pRight) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(75), _26_regBase+int32(_26_nEq), _addrNxt)
+ if ((int32(_26_pRangeStart.XwtFlags) & int32(0)) == int32(0)) && _sqlite3ExprCanBeNull(tls, _38_pRight) != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), _26_regBase+int32(_26_nEq), _addrNxt)
}
if _26_zStartAff != nil {
- _updateRangeAffinityStr(tls, _38_pRight, int32(_26_nBtm), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_26_zStartAff))+1*uintptr(_26_nEq))))
- }
- {
- p := &_26_nConstraint
- *p = (*p) + int32(_26_nBtm)
- sink1(*p)
+ _updateRangeAffinityStr(tls, _38_pRight, int32(_26_nBtm), elem1(_26_zStartAff, uintptr(_26_nEq)))
}
- if _sqlite3ExprIsVector(tls, _38_pRight) == i32(0) {
+ _26_nConstraint += int32(_26_nBtm)
+ if _sqlite3ExprIsVector(tls, _38_pRight) == int32(0) {
_disableTerm(tls, _pLevel, _26_pRangeStart)
goto _157
}
- _26_startEq = i32(1)
+ _26_startEq = int32(1)
_157:
- _26_bSeekPastNull = uint8(i32(0))
+ _26_bSeekPastNull = 0
goto _159
_152:
if _26_bSeekPastNull != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _26_regBase+int32(_26_nEq))
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _26_regBase+int32(_26_nEq))
_26_nConstraint += 1
- _26_startEq = i32(0)
- _26_start_constraints = i32(1)
+ _26_startEq = int32(0)
+ _26_start_constraints = int32(1)
}
_159:
_codeApplyAffinity(tls, _pParse, _26_regBase, _26_nConstraint-int32(_26_bSeekPastNull), _26_zStartAff)
- if (int32(_pLoop.X11) > i32(0)) && (_26_nConstraint == int32(_pLoop.X11)) {
+ if (int32(_pLoop.XnSkip) > int32(0)) && (_26_nConstraint == int32(_pLoop.XnSkip)) {
goto _162
}
- _26_op = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3WhereCodeOneLoopStartØ00aStartOpØ001)) + 1*uintptr(((_26_start_constraints<<uint(i32(2)))+(_26_startEq<<uint(i32(1))))+_bRev))))
+ _26_op = int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00aStartOpØ001)), uintptr(((_26_start_constraints<<2)+(_26_startEq<<1))+_bRev)))
func() {
- if _26_op == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128390), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108586)))
+ if _26_op == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128390), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108614)))
crt.X__builtin_abort(tls)
}
}()
@@ -88940,12 +89981,12 @@ _162:
if _26_pRangeEnd == nil {
goto _165
}
- _46_pRight = (*XExpr)((*XExpr)(_26_pRangeEnd.X0).X5)
- _sqlite3ExprCacheRemove(tls, _pParse, _26_regBase+int32(_26_nEq), i32(1))
+ _46_pRight = (*XExpr)((*XExpr)(_26_pRangeEnd.XpExpr).XpRight)
+ _sqlite3ExprCacheRemove(tls, _pParse, _26_regBase+int32(_26_nEq), int32(1))
_codeExprOrVector(tls, _pParse, _46_pRight, _26_regBase+int32(_26_nEq), int32(_26_nTop))
_whereLikeOptimizationStringFixup(tls, _v, _pLevel, _26_pRangeEnd)
- if ((int32(_26_pRangeEnd.X3) & i32(0)) == i32(0)) && _sqlite3ExprCanBeNull(tls, _46_pRight) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(75), _26_regBase+int32(_26_nEq), _addrNxt)
+ if ((int32(_26_pRangeEnd.XwtFlags) & int32(0)) == int32(0)) && _sqlite3ExprCanBeNull(tls, _46_pRight) != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), _26_regBase+int32(_26_nEq), _addrNxt)
}
if _26_zEndAff != nil {
_updateRangeAffinityStr(tls, _46_pRight, int32(_26_nTop), _26_zEndAff)
@@ -88953,49 +89994,45 @@ _162:
goto _169
}
func() {
- if ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128420), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(42486)))
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128420), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(42441)))
crt.X__builtin_abort(tls)
}
}()
_169:
- {
- p := &_26_nConstraint
- *p = (*p) + int32(_26_nTop)
- sink1(*p)
- }
- if _sqlite3ExprIsVector(tls, _46_pRight) == i32(0) {
+ _26_nConstraint += int32(_26_nTop)
+ if _sqlite3ExprIsVector(tls, _46_pRight) == int32(0) {
_disableTerm(tls, _pLevel, _26_pRangeEnd)
goto _173
}
- _26_endEq = i32(1)
+ _26_endEq = int32(1)
_173:
goto _175
_165:
if _26_bStopAtNull != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _26_regBase+int32(_26_nEq))
- _26_endEq = i32(0)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _26_regBase+int32(_26_nEq))
+ _26_endEq = int32(0)
_26_nConstraint += 1
}
_175:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_26_zStartAff))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_26_zEndAff))
- *(*int32)(unsafe.Pointer(&(_pLevel.X16))) = _sqlite3VdbeCurrentAddr(tls, _v)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_26_zStartAff))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_26_zEndAff))
+ _pLevel.Xp2 = _sqlite3VdbeCurrentAddr(tls, _v)
if _26_nConstraint != 0 {
- _26_op = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3WhereCodeOneLoopStartØ00aEndOpØ002)) + 1*uintptr((_bRev*i32(2))+_26_endEq))))
+ _26_op = int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00aEndOpØ002)), uintptr((_bRev*int32(2))+_26_endEq)))
_sqlite3VdbeAddOp4Int(tls, _v, _26_op, _26_iIdxCur, _addrNxt, _26_regBase, _26_nConstraint)
}
if _omitTable != 0 {
goto _185
}
- if (((*XTable)(_pIdx.X3).X9) & uint32(i32(32))) != uint32(i32(0)) {
+ if (((*XTable)(_pIdx.XpTable).XtabFlags) & uint32(32)) != (0) {
goto _179
}
- if (int32(_pWInfo.X10)&i32(1024)) != 0 || ((int32(_pWInfo.X10)&i32(4096)) != 0 && (int32(_pWInfo.X14) == i32(1))) {
- _iRowidReg = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(131), _26_iIdxCur, _iRowidReg)
- _sqlite3ExprCacheStore(tls, _pParse, _iCur, i32(-1), _iRowidReg)
- _sqlite3VdbeAddOp3(tls, _v, i32(32), _iCur, i32(0), _iRowidReg)
+ if (int32(_pWInfo.XwctrlFlags)&int32(1024)) != 0 || ((int32(_pWInfo.XwctrlFlags)&int32(4096)) != 0 && (int32(_pWInfo.XeOnePass) == int32(1))) {
+ _iRowidReg = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(131), _26_iIdxCur, _iRowidReg)
+ _sqlite3ExprCacheStore(tls, _pParse, _iCur, int32(-1), _iRowidReg)
+ _sqlite3VdbeAddOp3(tls, _v, int32(32), _iCur, int32(0), _iRowidReg)
goto _183
}
_codeDeferredSeek(tls, _pWInfo, _pIdx, _iCur, _26_iIdxCur)
@@ -89005,45 +90042,45 @@ _179:
if _iCur == _26_iIdxCur {
goto _185
}
- _58_pPk = _sqlite3PrimaryKeyIndex(tls, (*XTable)(_pIdx.X3))
- _iRowidReg = _sqlite3GetTempRange(tls, _pParse, int32(_58_pPk.X13))
- _j = i32(0)
+ _58_pPk = _sqlite3PrimaryKeyIndex(tls, (*XTable)(_pIdx.XpTable))
+ _iRowidReg = _sqlite3GetTempRange(tls, _pParse, int32(_58_pPk.XnKeyCol))
+ _j = int32(0)
_186:
- if _j >= int32(_58_pPk.X13) {
+ if _j >= int32(_58_pPk.XnKeyCol) {
goto _189
}
- _k = int32(_sqlite3ColumnOfIndex(tls, _pIdx, *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_58_pPk.X1)) + 2*uintptr(_j)))))
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _26_iIdxCur, _k, _iRowidReg+_j)
+ _k = int32(_sqlite3ColumnOfIndex(tls, _pIdx, *elem50(_58_pPk.XaiColumn, uintptr(_j))))
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _26_iIdxCur, _k, _iRowidReg+_j)
_j += 1
goto _186
_189:
- _sqlite3VdbeAddOp4Int(tls, _v, i32(29), _iCur, _addrCont, _iRowidReg, int32(_58_pPk.X13))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(29), _iCur, _addrCont, _iRowidReg, int32(_58_pPk.XnKeyCol))
_185:
_whereIndexExprTrans(tls, _pIdx, _iCur, _26_iIdxCur, _pWInfo)
- if ((_pLoop.X9) & uint32(i32(4096))) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = uint8(i32(164))
+ if (_pLoop.XwsFlags & uint32(4096)) != 0 {
+ _pLevel.Xop = uint8(164)
goto _193
}
if _bRev != 0 {
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = uint8(i32(6))
+ _pLevel.Xop = uint8(6)
goto _193
}
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = uint8(i32(7))
+ _pLevel.Xop = uint8(7)
_193:
- *(*int32)(unsafe.Pointer(&(_pLevel.X15))) = _26_iIdxCur
- *(*uint8)(unsafe.Pointer(&(_pLevel.X13))) = uint8(func() int32 {
- if ((_pLoop.X9) & uint32(i32(65536))) != uint32(i32(0)) {
- return i32(1)
+ _pLevel.Xp1 = _26_iIdxCur
+ _pLevel.Xp3 = uint8(func() int32 {
+ if (_pLoop.XwsFlags & uint32(65536)) != (0) {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- if ((_pLoop.X9) & uint32(i32(15))) == uint32(i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pLevel.X14))) = uint8(i32(1))
+ if (_pLoop.XwsFlags & uint32(15)) == (0) {
+ _pLevel.Xp5 = uint8(1)
goto _197
}
func() {
- if int32(_pLevel.X14) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128498), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108176)))
+ if int32(_pLevel.Xp5) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128498), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108204)))
crt.X__builtin_abort(tls)
}
}()
@@ -89053,204 +90090,204 @@ _197:
}
goto _270
_105:
- if ((_pLoop.X9) & uint32(i32(8192))) == 0 {
+ if (_pLoop.XwsFlags & uint32(8192)) == 0 {
goto _202
}
_65_pCov = nil
- _65_iCovCur = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _65_regReturn = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _65_regRowset = i32(0)
- _65_regRowid = i32(0)
+ _65_iCovCur = postInc2(&_pParse.XnTab, 1)
+ _65_regReturn = preInc2(&_pParse.XnMem, 1)
+ _65_regRowset = int32(0)
+ _65_regRowid = int32(0)
_65_iLoopBody = _sqlite3VdbeMakeLabel(tls, _v)
- _65_untestedTerms = i32(0)
+ _65_untestedTerms = int32(0)
_65_pAndExpr = nil
- _65_pTab = (*XTable)(_pTabItem.X4)
- _pTerm = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(i32(0))))
+ _65_pTab = (*XTable)(_pTabItem.XpTab)
+ _pTerm = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), 0)
func() {
if _pTerm == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128565), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108051)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128565), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108079)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pTerm.X4) & i32(512)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128566), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108592)))
+ if (int32(_pTerm.XeOperator) & int32(512)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128566), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108620)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pTerm.X3) & i32(16)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128567), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108617)))
+ if (int32(_pTerm.XwtFlags) & int32(16)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128567), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108645)))
crt.X__builtin_abort(tls)
}
}()
- _65_pOrWc = (*XWhereClause)(unsafe.Pointer(&((*XWhereOrInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10)))))).X0)))
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = uint8(i32(52))
- *(*int32)(unsafe.Pointer(&(_pLevel.X15))) = _65_regReturn
- if int32(_pWInfo.X11) <= i32(1) {
+ _65_pOrWc = &((*XWhereOrInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_pTerm.Xu))).Xwc)
+ _pLevel.Xop = uint8(52)
+ _pLevel.Xp1 = _65_regReturn
+ if int32(_pWInfo.XnLevel) <= int32(1) {
goto _209
}
- _66_nNotReady = (int32(_pWInfo.X11) - _iLevel) - i32(1)
- _65_pOrTab = (*XSrcList)(_sqlite3DbMallocRaw(tls, _db, uint64(u32(76)+(uint32(_66_nNotReady)*u32(68)))))
+ _66_nNotReady = (int32(_pWInfo.XnLevel) - _iLevel) - int32(1)
+ _65_pOrTab = (*XSrcList)(_sqlite3DbMallocRaw(tls, _db, uint64(uint32(76)+(uint32(_66_nNotReady)*uint32(68)))))
if _65_pOrTab == nil {
return _notReady
}
- *(*uint32)(unsafe.Pointer(&(_65_pOrTab.X1))) = uint32(uint8(_66_nNotReady + i32(1)))
- *(*int32)(unsafe.Pointer(&(_65_pOrTab.X0))) = int32(_65_pOrTab.X1)
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_65_pOrTab.X2)))), (unsafe.Pointer)(_pTabItem), u32(68))
- _66_origSrc = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.X1).X2)))))
- _k = i32(1)
+ _65_pOrTab.XnAlloc = uint32(uint8(_66_nNotReady + int32(1)))
+ _65_pOrTab.XnSrc = int32(_65_pOrTab.XnAlloc)
+ crt.Xmemcpy(tls, unsafe.Pointer(&_65_pOrTab.Xa), unsafe.Pointer(_pTabItem), uint32(68))
+ _66_origSrc = (*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pWInfo.XpTabList).Xa)))
+ _k = int32(1)
_211:
if _k > _66_nNotReady {
goto _214
}
- crt.Xmemcpy(tls, (unsafe.Pointer)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_65_pOrTab.X2)))))+68*uintptr(_k)))), (unsafe.Pointer)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_66_origSrc))+68*uintptr((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLevel))+76*uintptr(_k))).X11)))), u32(68))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem6((*TSrcList_item)(unsafe.Pointer(&_65_pOrTab.Xa)), uintptr(_k))), unsafe.Pointer(elem6(_66_origSrc, uintptr(elem99(_pLevel, uintptr(_k)).XiFrom))), uint32(68))
_k += 1
goto _211
_214:
goto _215
_209:
- _65_pOrTab = (*XSrcList)(_pWInfo.X1)
+ _65_pOrTab = (*XSrcList)(_pWInfo.XpTabList)
_215:
- if (int32(_pWInfo.X10) & i32(16)) != i32(0) {
+ if (int32(_pWInfo.XwctrlFlags) & int32(16)) != int32(0) {
goto _216
}
- if ((_65_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
- _65_regRowset = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _65_regRowset)
+ if (_65_pTab.XtabFlags & uint32(32)) == (0) {
+ _65_regRowset = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _65_regRowset)
goto _218
}
_71_pPk = _sqlite3PrimaryKeyIndex(tls, _65_pTab)
- _65_regRowset = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(110), _65_regRowset, int32(_71_pPk.X13))
+ _65_regRowset = postInc2(&_pParse.XnTab, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(110), _65_regRowset, int32(_71_pPk.XnKeyCol))
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _71_pPk)
_218:
- _65_regRowid = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ _65_regRowid = preInc2(&_pParse.XnMem, 1)
_216:
- _65_iRetInit = _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _65_regReturn)
- if (_pWC.X3) <= i32(1) {
+ _65_iRetInit = _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _65_regReturn)
+ if _pWC.XnTerm <= int32(1) {
goto _219
}
- _72_iTerm = i32(0)
+ _72_iTerm = int32(0)
_220:
- if _72_iTerm >= (_pWC.X3) {
+ if _72_iTerm >= _pWC.XnTerm {
goto _223
}
- _73_pExpr = (*XExpr)((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5) + 48*uintptr(_72_iTerm))).X0)
- if (*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5)+48*uintptr(_72_iTerm))) == _pTerm {
+ _73_pExpr = (*XExpr)(elem100((*XWhereTerm)(_pWC.Xa), uintptr(_72_iTerm)).XpExpr)
+ if elem100((*XWhereTerm)(_pWC.Xa), uintptr(_72_iTerm)) == _pTerm {
goto _221
}
- if ((_73_pExpr.X2) & uint32(i32(1))) != uint32(i32(0)) {
+ if (_73_pExpr.Xflags & uint32(1)) != (0) {
goto _221
}
- if (int32((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5)+48*uintptr(_72_iTerm))).X3) & i32(6)) != i32(0) {
+ if (int32(elem100((*XWhereTerm)(_pWC.Xa), uintptr(_72_iTerm)).XwtFlags) & int32(6)) != int32(0) {
goto _221
}
- if (int32((*XWhereTerm)(unsafe.Pointer(uintptr(_pWC.X5)+48*uintptr(_72_iTerm))).X4) & i32(8191)) == i32(0) {
+ if (int32(elem100((*XWhereTerm)(_pWC.Xa), uintptr(_72_iTerm)).XeOperator) & int32(8191)) == int32(0) {
goto _221
}
- _73_pExpr = _sqlite3ExprDup(tls, _db, _73_pExpr, i32(0))
+ _73_pExpr = _sqlite3ExprDup(tls, _db, _73_pExpr, int32(0))
_65_pAndExpr = _sqlite3ExprAnd(tls, _db, _65_pAndExpr, _73_pExpr)
_221:
_72_iTerm += 1
goto _220
_223:
if _65_pAndExpr != nil {
- _65_pAndExpr = _sqlite3PExpr(tls, _pParse, i32(327), nil, _65_pAndExpr)
+ _65_pAndExpr = _sqlite3PExpr(tls, _pParse, int32(327), nil, _65_pAndExpr)
}
_219:
- _65_wctrlFlags = uint16(i32(32) | (int32(_pWInfo.X10) & i32(1024)))
- _65_ii = i32(0)
+ _65_wctrlFlags = uint16(int32(32) | (int32(_pWInfo.XwctrlFlags) & int32(1024)))
+ _65_ii = int32(0)
_229:
- if _65_ii >= (_65_pOrWc.X3) {
+ if _65_ii >= _65_pOrWc.XnTerm {
goto _232
}
- _75_pOrTerm = (*XWhereTerm)(unsafe.Pointer(uintptr(_65_pOrWc.X5) + 48*uintptr(_65_ii)))
- if (_75_pOrTerm.X8) != _iCur && (int32(_75_pOrTerm.X4)&i32(1024)) == i32(0) {
+ _75_pOrTerm = elem100((*XWhereTerm)(_65_pOrWc.Xa), uintptr(_65_ii))
+ if _75_pOrTerm.XleftCursor != _iCur && (int32(_75_pOrTerm.XeOperator)&int32(1024)) == int32(0) {
goto _234
}
- _76_pOrExpr = (*XExpr)(_75_pOrTerm.X0)
- _76_jmp1 = i32(0)
- if (_65_pAndExpr != nil) && (((_76_pOrExpr.X2) & uint32(i32(1))) == uint32(i32(0))) {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_65_pAndExpr.X4))))) = _76_pOrExpr
+ _76_pOrExpr = (*XExpr)(_75_pOrTerm.XpExpr)
+ _76_jmp1 = int32(0)
+ if (_65_pAndExpr != nil) && ((_76_pOrExpr.Xflags & uint32(1)) == (0)) {
+ *(**XExpr)(unsafe.Pointer(&_65_pAndExpr.XpLeft)) = _76_pOrExpr
_76_pOrExpr = _65_pAndExpr
}
_76_pSubWInfo = _sqlite3WhereBegin(tls, _pParse, _65_pOrTab, _76_pOrExpr, nil, nil, _65_wctrlFlags, _65_iCovCur)
func() {
- if _76_pSubWInfo == nil && (_pParse.X16) == 0 && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128672), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108651)))
+ if _76_pSubWInfo == nil && _pParse.XnErr == 0 && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128672), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108679)))
crt.X__builtin_abort(tls)
}
}()
if _76_pSubWInfo == nil {
goto _241
}
- _78_addrExplain = _sqlite3WhereExplainOneScan(tls, _pParse, _65_pOrTab, (*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_76_pSubWInfo.X24)))))+76*uintptr(i32(0)))), _iLevel, int32(_pLevel.X11), uint16(i32(0)))
+ _78_addrExplain = _sqlite3WhereExplainOneScan(tls, _pParse, _65_pOrTab, elem99((*XWhereLevel)(unsafe.Pointer(&_76_pSubWInfo.Xa)), 0), _iLevel, int32(_pLevel.XiFrom), 0)
- if (int32(_pWInfo.X10) & i32(16)) != i32(0) {
+ if (int32(_pWInfo.XwctrlFlags) & int32(16)) != int32(0) {
goto _242
}
_79_iSet = func() int32 {
- if _65_ii == ((_65_pOrWc.X3) - i32(1)) {
- return i32(-1)
+ if _65_ii == (_65_pOrWc.XnTerm - int32(1)) {
+ return int32(-1)
}
return _65_ii
}()
- if ((_65_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
- _79_r = _sqlite3ExprCodeGetColumn(tls, _pParse, _65_pTab, i32(-1), _iCur, _65_regRowid, uint8(i32(0)))
- _76_jmp1 = _sqlite3VdbeAddOp4Int(tls, _v, i32(43), _65_regRowset, i32(0), _79_r, _79_iSet)
+ if (_65_pTab.XtabFlags & uint32(32)) == (0) {
+ _79_r = _sqlite3ExprCodeGetColumn(tls, _pParse, _65_pTab, int32(-1), _iCur, _65_regRowid, 0)
+ _76_jmp1 = _sqlite3VdbeAddOp4Int(tls, _v, int32(43), _65_regRowset, int32(0), _79_r, _79_iSet)
goto _246
}
_81_pPk = _sqlite3PrimaryKeyIndex(tls, _65_pTab)
- _81_nPk = int32(_81_pPk.X13)
+ _81_nPk = int32(_81_pPk.XnKeyCol)
_79_r = _sqlite3GetTempRange(tls, _pParse, _81_nPk)
- _81_iPk = i32(0)
+ _81_iPk = int32(0)
_247:
if _81_iPk >= _81_nPk {
goto _250
}
- _82_iCol = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_81_pPk.X1)) + 2*uintptr(_81_iPk))))
+ _82_iCol = int32(*elem50(_81_pPk.XaiColumn, uintptr(_81_iPk)))
_sqlite3ExprCodeGetColumnToReg(tls, _pParse, _65_pTab, _82_iCol, _iCur, _79_r+_81_iPk)
_81_iPk += 1
goto _247
_250:
if _79_iSet != 0 {
- _76_jmp1 = _sqlite3VdbeAddOp4Int(tls, _v, i32(30), _65_regRowset, i32(0), _79_r, _81_nPk)
+ _76_jmp1 = _sqlite3VdbeAddOp4Int(tls, _v, int32(30), _65_regRowset, int32(0), _79_r, _81_nPk)
}
- if _79_iSet < i32(0) {
+ if _79_iSet < int32(0) {
goto _252
}
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _79_r, _81_nPk, _65_regRowid)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _65_regRowset, _65_regRowid, _79_r, _81_nPk)
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _79_r, _81_nPk, _65_regRowid)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _65_regRowset, _65_regRowid, _79_r, _81_nPk)
if _79_iSet != 0 {
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(16)))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(16))
}
_252:
_sqlite3ReleaseTempRange(tls, _pParse, _79_r, _81_nPk)
_246:
_242:
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _65_regReturn, _65_iLoopBody)
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _65_regReturn, _65_iLoopBody)
if _76_jmp1 != 0 {
_sqlite3VdbeJumpHere(tls, _v, _76_jmp1)
}
- if (_76_pSubWInfo.X15) != 0 {
- _65_untestedTerms = i32(1)
+ if _76_pSubWInfo.XuntestedTerms != 0 {
+ _65_untestedTerms = int32(1)
}
- _78_pSubLoop = (*XWhereLoop)((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_76_pSubWInfo.X24))))) + 76*uintptr(i32(0)))).X18)
+ _78_pSubLoop = (*XWhereLoop)(elem99((*XWhereLevel)(unsafe.Pointer(&_76_pSubWInfo.Xa)), 0).XpWLoop)
func() {
- if ((_78_pSubLoop.X9) & uint32(i32(16384))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128759), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108697)))
+ if (_78_pSubLoop.XwsFlags & uint32(16384)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128759), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108725)))
crt.X__builtin_abort(tls)
}
}()
- if ((((_78_pSubLoop.X9) & uint32(i32(512))) != uint32(i32(0))) && ((_65_ii == i32(0)) || ((*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_78_pSubLoop.X8))))).X4) == _65_pCov))) && ((((_65_pTab.X9) & uint32(i32(32))) == uint32(i32(0))) || (int32((uint32((*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_78_pSubLoop.X8))))).X4).X16)<<uint(i32(30)))>>uint(i32(30))) != i32(2))) {
+ if (((_78_pSubLoop.XwsFlags & uint32(512)) != (0)) && ((_65_ii == int32(0)) || ((*XIndex)((*t101)(unsafe.Pointer(&_78_pSubLoop.Xu)).XpIndex) == _65_pCov))) && (((_65_pTab.XtabFlags & uint32(32)) == (0)) || (int32((uint32((*XIndex)((*t101)(unsafe.Pointer(&_78_pSubLoop.Xu)).XpIndex).XidxType)<<30)>>30) != int32(2))) {
func() {
- if ((*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_76_pSubWInfo.X24))))) + 76*uintptr(i32(0)))).X2) != _65_iCovCur {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128764), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108739)))
+ if (elem99((*XWhereLevel)(unsafe.Pointer(&_76_pSubWInfo.Xa)), 0).XiIdxCur) != _65_iCovCur {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128764), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108767)))
crt.X__builtin_abort(tls)
}
}()
- _65_pCov = (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_78_pSubLoop.X8))))).X4)
+ _65_pCov = (*XIndex)((*t101)(unsafe.Pointer(&_78_pSubLoop.Xu)).XpIndex)
goto _265
}
_65_pCov = nil
@@ -89261,19 +90298,19 @@ _234:
_65_ii += 1
goto _229
_232:
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))))) = _65_pCov
+ *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pLevel.Xu)))) = _65_pCov
if _65_pCov != nil {
- *(*int32)(unsafe.Pointer(&(_pLevel.X2))) = _65_iCovCur
+ _pLevel.XiIdxCur = _65_iCovCur
}
if _65_pAndExpr != nil {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_65_pAndExpr.X4))))) = nil
+ *(**XExpr)(unsafe.Pointer(&_65_pAndExpr.XpLeft)) = nil
_sqlite3ExprDelete(tls, _db, _65_pAndExpr)
}
_sqlite3VdbeChangeP1(tls, _v, uint32(_65_iRetInit), _sqlite3VdbeCurrentAddr(tls, _v))
- _sqlite3VdbeGoto(tls, _v, _pLevel.X3)
+ _sqlite3VdbeGoto(tls, _v, _pLevel.XaddrBrk)
_sqlite3VdbeResolveLabel(tls, _v, _65_iLoopBody)
- if int32(_pWInfo.X11) > i32(1) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_65_pOrTab))
+ if int32(_pWInfo.XnLevel) > int32(1) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_65_pOrTab))
}
if _65_untestedTerms == 0 {
_disableTerm(tls, _pLevel, _pTerm)
@@ -89281,72 +90318,71 @@ _232:
goto _270
_202:
func() {
- if _bRev != i32(0) && _bRev != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128796), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108772)))
+ if _bRev != int32(0) && _bRev != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128796), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108800)))
crt.X__builtin_abort(tls)
}
}()
- if ((uint32(((*t28)(unsafe.Pointer(&(_pTabItem.X9))).X1)>>uint(i32(5))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = uint8(i32(164))
+ if ((uint32((_pTabItem.Xfg.XnotIndexed)>>5) << 31) >> 31) != 0 {
+ _pLevel.Xop = uint8(164)
goto _275
}
- *(*uint8)(unsafe.Pointer(&(_pLevel.X12))) = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3WhereCodeOneLoopStartØ00aStepØ003)) + 1*uintptr(_bRev)))
- *(*int32)(unsafe.Pointer(&(_pLevel.X15))) = _iCur
- *(*int32)(unsafe.Pointer(&(_pLevel.X16))) = i32(1) + _sqlite3VdbeAddOp2(tls, _v, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3WhereCodeOneLoopStartØ00aStartØ004)) + 1*uintptr(_bRev)))), _iCur, _addrHalt)
- *(*uint8)(unsafe.Pointer(&(_pLevel.X14))) = uint8(i32(1))
+ _pLevel.Xop = *elem15((*uint8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00aStepØ003)), uintptr(_bRev))
+ _pLevel.Xp1 = _iCur
+ _pLevel.Xp2 = int32(1) + _sqlite3VdbeAddOp2(tls, _v, int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00aStartØ004)), uintptr(_bRev))), _iCur, _addrHalt)
+ _pLevel.Xp5 = uint8(1)
_275:
_270:
- _loopAgain = i32(0)
- *func() *int32 { _pTerm = (*XWhereTerm)(_pWC.X5); return &_j }() = _pWC.X3
+ _loopAgain = int32(0)
+ *func() *int32 { _pTerm = (*XWhereTerm)(_pWC.Xa); return &_j }() = _pWC.XnTerm
_277:
- if _j <= i32(0) {
+ if _j <= int32(0) {
goto _280
}
- _92_skipLikeAddr = i32(0)
- if (int32(_pTerm.X3) & i32(6)) != 0 {
+ _92_skipLikeAddr = int32(0)
+ if (int32(_pTerm.XwtFlags) & int32(6)) != 0 {
goto _278
}
- if ((_pTerm.X12) & (_pLevel.X19)) != uint64(i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pWInfo.X15))) = uint8(i32(1))
+ if (_pTerm.XprereqAll & _pLevel.XnotReady) != (0) {
+ _pWInfo.XuntestedTerms = uint8(1)
goto _278
}
- _92_pE = (*XExpr)(_pTerm.X0)
+ _92_pE = (*XExpr)(_pTerm.XpExpr)
func() {
if _92_pE == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128839), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108791)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128839), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108819)))
crt.X__builtin_abort(tls)
}
}()
- if (_pLevel.X0) != 0 && (((_92_pE.X2) & uint32(i32(1))) == uint32(i32(0))) {
+ if _pLevel.XiLeftJoin != 0 && ((_92_pE.Xflags & uint32(1)) == (0)) {
goto _278
}
- if (_pIdx != nil) && (_sqlite3ExprCoveredByIndex(tls, _92_pE, _pLevel.X1, _pIdx) == 0) {
- _loopAgain = i32(1)
+ if (_pIdx != nil) && (_sqlite3ExprCoveredByIndex(tls, _92_pE, _pLevel.XiTabCur, _pIdx) == 0) {
+ _loopAgain = int32(1)
goto _278
}
- if (int32(_pTerm.X3) & i32(512)) != 0 {
- _96_x = _pLevel.X9
+ if (int32(_pTerm.XwtFlags) & int32(512)) != 0 {
+ _96_x = _pLevel.XiLikeRepCntr
func() {
- if _96_x <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128857), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108797)))
+ if _96_x <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128857), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108825)))
crt.X__builtin_abort(tls)
}
}()
_92_skipLikeAddr = _sqlite3VdbeAddOp1(tls, _v, func() int32 {
- if (_96_x & uint32(i32(1))) != 0 {
- return i32(22)
+ if (_96_x & uint32(1)) != 0 {
+ return int32(22)
}
- return i32(21)
- }(), int32(_96_x>>uint(i32(1))))
+ return int32(21)
+ }(), int32(_96_x>>1))
}
- _sqlite3ExprIfFalse(tls, _pParse, _92_pE, _addrCont, i32(16))
+ _sqlite3ExprIfFalse(tls, _pParse, _92_pE, _addrCont, int32(16))
if _92_skipLikeAddr != 0 {
_sqlite3VdbeJumpHere(tls, _v, _92_skipLikeAddr)
}
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X3)))
- *p = uint16(int32(*p) | i32(4))
- sink14(*p)
+ p := &_pTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(4))
}
_278:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _j -= 1; return &_pTerm }())) += uintptr(48)
@@ -89356,121 +90392,122 @@ _280:
if _loopAgain != 0 {
goto _270
}
- *func() *int32 { _pTerm = (*XWhereTerm)(_pWC.X5); return &_j }() = _pWC.X3
+ *func() *int32 { _pTerm = (*XWhereTerm)(_pWC.Xa); return &_j }() = _pWC.XnTerm
_295:
- if _j <= i32(0) {
+ if _j <= int32(0) {
goto _298
}
- if (int32(_pTerm.X3) & i32(6)) != 0 {
+ if (int32(_pTerm.XwtFlags) & int32(6)) != 0 {
goto _296
}
- if (int32(_pTerm.X4) & i32(130)) == i32(0) {
+ if (int32(_pTerm.XeOperator) & int32(130)) == int32(0) {
goto _296
}
- if (int32(_pTerm.X4) & i32(2048)) == i32(0) {
+ if (int32(_pTerm.XeOperator) & int32(2048)) == int32(0) {
goto _296
}
- if (_pTerm.X8) != _iCur {
+ if _pTerm.XleftCursor != _iCur {
goto _296
}
- if (_pLevel.X0) != 0 {
+ if _pLevel.XiLeftJoin != 0 {
goto _296
}
- _97_pE = (*XExpr)(_pTerm.X0)
+ _97_pE = (*XExpr)(_pTerm.XpExpr)
func() {
- if ((_97_pE.X2) & uint32(i32(1))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128886), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108801)))
+ if (_97_pE.Xflags & uint32(1)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128886), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108829)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_pTerm.X11) & (_pLevel.X19)) == uint64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128887), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108835)))
+ if (_pTerm.XprereqRight & _pLevel.XnotReady) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128887), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108863)))
crt.X__builtin_abort(tls)
}
}()
- _97_pAlt = _sqlite3WhereFindTerm(tls, _pWC, _iCur, *(*int32)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_pTerm.X10))))), _notReady, uint32(i32(131)), nil)
+ _97_pAlt = _sqlite3WhereFindTerm(tls, _pWC, _iCur, *(*int32)(unsafe.Pointer(&_pTerm.Xu)), _notReady, uint32(131), nil)
if _97_pAlt == nil {
goto _296
}
- if (int32(_97_pAlt.X3) & i32(4)) != 0 {
+ if (int32(_97_pAlt.XwtFlags) & int32(4)) != 0 {
goto _296
}
- _97_sEAlt = *(*XExpr)(_97_pAlt.X0)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_97_sEAlt.X4))))) = (*XExpr)(_97_pE.X4)
- _sqlite3ExprIfFalse(tls, _pParse, &_97_sEAlt, _addrCont, i32(16))
+ _97_sEAlt = *(*XExpr)(_97_pAlt.XpExpr)
+ *(**XExpr)(unsafe.Pointer(&_97_sEAlt.XpLeft)) = (*XExpr)(_97_pE.XpLeft)
+ _sqlite3ExprIfFalse(tls, _pParse, &_97_sEAlt, _addrCont, int32(16))
_296:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _j -= 1; return &_pTerm }())) += uintptr(48)
goto _295
_298:
- if (_pLevel.X0) == 0 {
+ if _pLevel.XiLeftJoin == 0 {
goto _310
}
- *(*int32)(unsafe.Pointer(&(_pLevel.X7))) = _sqlite3VdbeCurrentAddr(tls, _v)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(1), _pLevel.X0)
- _sqlite3VdbeComment(tls, _v, str(108878))
+ _pLevel.XaddrFirst = _sqlite3VdbeCurrentAddr(tls, _v)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(1), _pLevel.XiLeftJoin)
+ _sqlite3VdbeComment(tls, _v, str(108906))
_sqlite3ExprCacheClear(tls, _pParse)
- *func() *int32 { _pTerm = (*XWhereTerm)(_pWC.X5); return &_j }() = i32(0)
+ *func() *int32 { _pTerm = (*XWhereTerm)(_pWC.Xa); return &_j }() = int32(0)
_311:
- if _j >= (_pWC.X3) {
+ if _j >= _pWC.XnTerm {
goto _314
}
- if (int32(_pTerm.X3) & i32(6)) != 0 {
+ if (int32(_pTerm.XwtFlags) & int32(6)) != 0 {
goto _312
}
- if ((_pTerm.X12) & (_pLevel.X19)) != uint64(i32(0)) {
+ if (_pTerm.XprereqAll & _pLevel.XnotReady) != (0) {
func() {
- if (_pWInfo.X15) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128914), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108899)))
+ if _pWInfo.XuntestedTerms == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128914), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108927)))
crt.X__builtin_abort(tls)
}
}()
goto _312
}
func() {
- if (*XExpr)(_pTerm.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(128917), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000))), unsafe.Pointer(str(108921)))
+ if _pTerm.XpExpr == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(128917), unsafe.Pointer(&_sqlite3WhereCodeOneLoopStartØ00__func__Ø000), unsafe.Pointer(str(108949)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pTerm.X0), _addrCont, i32(16))
+ _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(_pTerm.XpExpr), _addrCont, int32(16))
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X3)))
- *p = uint16(int32(*p) | i32(4))
- sink14(*p)
+ p := &_pTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(4))
}
_312:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _j += 1; return &_pTerm }())) += uintptr(48)
goto _311
_314:
_310:
- return _pLevel.X19
+ return _pLevel.XnotReady
_ = _17_aMoveOp
_ = _78_addrExplain
- _ = _97_sEAlt
panic(0)
}
var _sqlite3WhereCodeOneLoopStartØ00__func__Ø000 [29]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WhereCodeOneLoopStartØ00__func__Ø000[0], str(108934), 29)
-}
-
-// Generate code for a single equality term of the WHERE clause. An equality
-// term can be either X=expr or X IN (...). pTerm is the term to be
-// coded.
-//
-// The current value for the constraint is left in a register, the index
-// of which is returned. An attempt is made store the result in iTarget but
-// this is only guaranteed for TK_ISNULL and TK_IN constraints. If the
-// constraint is a TK_EQ or TK_IS, then the current value might be left in
-// some other register and it is the caller's responsibility to compensate.
-//
-// For a constraint of the form X=expr, the expression is evaluated in
-// straight-line code. For constraints of the form X IN (...)
-// this routine sets up a loop that will iterate over all values of X.
+ crt.Xstrncpy(nil, &_sqlite3WhereCodeOneLoopStartØ00__func__Ø000[0], str(108962), 29)
+}
+
+// C comment
+// /*
+// ** Generate code for a single equality term of the WHERE clause. An equality
+// ** term can be either X=expr or X IN (...). pTerm is the term to be
+// ** coded.
+// **
+// ** The current value for the constraint is left in a register, the index
+// ** of which is returned. An attempt is made store the result in iTarget but
+// ** this is only guaranteed for TK_ISNULL and TK_IN constraints. If the
+// ** constraint is a TK_EQ or TK_IS, then the current value might be left in
+// ** some other register and it is the caller's responsibility to compensate.
+// **
+// ** For a constraint of the form X=expr, the expression is evaluated in
+// ** straight-line code. For constraints of the form X IN (...)
+// ** this routine sets up a loop that will iterate over all values of X.
+// */
func _codeEqualityTerm(tls *crt.TLS, _pParse *XParse, _pTerm *XWhereTerm, _pLevel *XWhereLevel, _iEq int32, _bRev int32, _iTarget int32) (r0 int32) {
var _iReg, _3_eType, _3_iTab, _3_i, _3_nEq, _11_iField, _19_iMap, _21_iOut, _23_iCol int32
var _3_aiMap *int32
@@ -89482,49 +90519,49 @@ func _codeEqualityTerm(tls *crt.TLS, _pParse *XParse, _pTerm *XWhereTerm, _pLeve
var _pX, _11_pNewRhs, _11_pNewLhs, _12_pLeft *XExpr
var _3_pLoop *XWhereLoop
var _3_pIn *TInLoop
- _pX = (*XExpr)(_pTerm.X0)
- _v = (*TVdbe)(_pParse.X2)
+ _pX = (*XExpr)(_pTerm.XpExpr)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
- if (*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XWhereLoop)(_pLevel.X18).X13)) + 4*uintptr(_iEq)))) != _pTerm {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127197), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000))), unsafe.Pointer(str(108963)))
+ if (*elem104((**XWhereTerm)(unsafe.Pointer((*XWhereLoop)(_pLevel.XpWLoop).XaLTerm)), uintptr(_iEq))) != _pTerm {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127197), unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000), unsafe.Pointer(str(108991)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iTarget <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127198), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000))), unsafe.Pointer(str(108998)))
+ if _iTarget <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127198), unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000), unsafe.Pointer(str(109026)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pX.X0) == i32(78)) || (int32(_pX.X0) == i32(72)) {
- _iReg = _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)(_pX.X5), _iTarget)
+ if (int32(_pX.Xop) == int32(78)) || (int32(_pX.Xop) == int32(72)) {
+ _iReg = _sqlite3ExprCodeTarget(tls, _pParse, (*XExpr)(_pX.XpRight), _iTarget)
goto _8
}
- if int32(_pX.X0) == i32(75) {
+ if int32(_pX.Xop) == int32(75) {
_iReg = _iTarget
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _iReg)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _iReg)
goto _8
}
- _3_eType = i32(5)
- _3_pLoop = (*XWhereLoop)(_pLevel.X18)
- _3_nEq = i32(0)
+ _3_eType = int32(5)
+ _3_pLoop = (*XWhereLoop)(_pLevel.XpWLoop)
+ _3_nEq = int32(0)
_3_aiMap = nil
- if ((((_3_pLoop.X9) & uint32(i32(1024))) == uint32(i32(0))) && ((*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_3_pLoop.X8))))).X4) != nil)) && ((*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_3_pLoop.X8))))).X4).X7)) + 1*uintptr(_iEq)))) != 0) {
+ if (((_3_pLoop.XwsFlags & uint32(1024)) == (0)) && ((*XIndex)((*t101)(unsafe.Pointer(&_3_pLoop.Xu)).XpIndex) != nil)) && ((*elem15((*XIndex)((*t101)(unsafe.Pointer(&_3_pLoop.Xu)).XpIndex).XaSortOrder, uintptr(_iEq))) != 0) {
_bRev = bool2int(_bRev == 0)
}
func() {
- if int32(_pX.X0) != i32(74) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127222), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000))), unsafe.Pointer(str(102005)))
+ if int32(_pX.Xop) != int32(74) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127222), unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000), unsafe.Pointer(str(102033)))
crt.X__builtin_abort(tls)
}
}()
_iReg = _iTarget
- _3_i = i32(0)
+ _3_i = int32(0)
_14:
if _3_i >= _iEq {
goto _17
}
- if ((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pLoop.X13)) + 4*uintptr(_3_i)))) != nil) && ((*XExpr)((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pLoop.X13)) + 4*uintptr(_3_i)))).X0) == _pX) {
+ if ((*elem104((**XWhereTerm)(unsafe.Pointer(_3_pLoop.XaLTerm)), uintptr(_3_i))) != nil) && ((*XExpr)((*elem104((**XWhereTerm)(unsafe.Pointer(_3_pLoop.XaLTerm)), uintptr(_3_i))).XpExpr) == _pX) {
_disableTerm(tls, _pLevel, _pTerm)
return _iTarget
}
@@ -89533,164 +90570,151 @@ _14:
_17:
_3_i = _iEq
_20:
- if _3_i >= int32(_3_pLoop.X10) {
+ if _3_i >= int32(_3_pLoop.XnLTerm) {
goto _23
}
if func() int32 {
- if (*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pLoop.X13)) + 4*uintptr(_3_i)))) != nil {
- return i32(1)
+ if (*elem104((**XWhereTerm)(unsafe.Pointer(_3_pLoop.XaLTerm)), uintptr(_3_i))) != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127232), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127232), unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() != 0 && ((*XExpr)((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pLoop.X13)) + 4*uintptr(_3_i)))).X0) == _pX) {
+ }() != 0 && ((*XExpr)((*elem104((**XWhereTerm)(unsafe.Pointer(_3_pLoop.XaLTerm)), uintptr(_3_i))).XpExpr) == _pX) {
_3_nEq += 1
}
_3_i += 1
goto _20
_23:
- if (((_pX.X2) & uint32(i32(2048))) == uint32(i32(0))) || (((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pX.X6)))))).X0).X0) == i32(1)) {
- _3_eType = _sqlite3FindInIndex(tls, _pParse, _pX, uint32(i32(4)), nil, nil)
+ if ((_pX.Xflags & uint32(2048)) == (0)) || (((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pX.Xx))).XpEList).XnExpr) == int32(1)) {
+ _3_eType = _sqlite3FindInIndex(tls, _pParse, _pX, uint32(4), nil, nil)
goto _30
}
- _9_pSelect = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pX.X6))))))
- _9_db = (*Xsqlite3)(_pParse.X0)
- _9_savedDbOptFlags = _9_db.X13
- _9_pOrigRhs = (*XExprList)(_9_pSelect.X0)
- _9_pOrigLhs = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)(_pX.X4).X6))))))
+ _9_pSelect = (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pX.Xx)))
+ _9_db = (*Xsqlite3)(_pParse.Xdb)
+ _9_savedDbOptFlags = _9_db.XdbOptFlags
+ _9_pOrigRhs = (*XExprList)(_9_pSelect.XpEList)
+ _9_pOrigLhs = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)(_pX.XpLeft).Xx))))
_9_pRhs = nil
_9_pLhs = nil
_3_i = _iEq
_31:
- if _3_i >= int32(_3_pLoop.X10) {
+ if _3_i >= int32(_3_pLoop.XnLTerm) {
goto _34
}
- if (*XExpr)((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pLoop.X13)) + 4*uintptr(_3_i)))).X0) == _pX {
- _11_iField = ((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pLoop.X13)) + 4*uintptr(_3_i)))).X9) - i32(1)
- _11_pNewRhs = _sqlite3ExprDup(tls, _9_db, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_9_pOrigRhs.X2)))))+20*uintptr(_11_iField))).X0), i32(0))
- _11_pNewLhs = _sqlite3ExprDup(tls, _9_db, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_9_pOrigLhs.X2)))))+20*uintptr(_11_iField))).X0), i32(0))
+ if (*XExpr)((*elem104((**XWhereTerm)(unsafe.Pointer(_3_pLoop.XaLTerm)), uintptr(_3_i))).XpExpr) == _pX {
+ _11_iField = ((*elem104((**XWhereTerm)(unsafe.Pointer(_3_pLoop.XaLTerm)), uintptr(_3_i))).XiField) - int32(1)
+ _11_pNewRhs = _sqlite3ExprDup(tls, _9_db, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_9_pOrigRhs.Xa)), uintptr(_11_iField)).XpExpr), int32(0))
+ _11_pNewLhs = _sqlite3ExprDup(tls, _9_db, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_9_pOrigLhs.Xa)), uintptr(_11_iField)).XpExpr), int32(0))
_9_pRhs = _sqlite3ExprListAppend(tls, _pParse, _9_pRhs, _11_pNewRhs)
_9_pLhs = _sqlite3ExprListAppend(tls, _pParse, _9_pLhs, _11_pNewLhs)
}
_3_i += 1
goto _31
_34:
- if (_9_db.X17) != 0 {
+ if _9_db.XmallocFailed != 0 {
goto _36
}
- _12_pLeft = (*XExpr)(_pX.X4)
- if (*XExprList)(_9_pSelect.X12) == nil {
+ _12_pLeft = (*XExpr)(_pX.XpLeft)
+ if _9_pSelect.XpOrderBy == nil {
goto _37
}
- _13_pOrderBy = (*XExprList)(_9_pSelect.X12)
- _3_i = i32(0)
+ _13_pOrderBy = (*XExprList)(_9_pSelect.XpOrderBy)
+ _3_i = int32(0)
_38:
- if _3_i >= (_13_pOrderBy.X0) {
+ if _3_i >= _13_pOrderBy.XnExpr {
goto _41
}
- *(*uint16)(unsafe.Pointer(&((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_13_pOrderBy.X2))))) + 20*uintptr(_3_i))).X5))))).X0))) = uint16(i32(0))
+ (*t71)(unsafe.Pointer(&(elem57((*TExprList_item)(unsafe.Pointer(&_13_pOrderBy.Xa)), uintptr(_3_i)).Xu))).XiOrderByCol = 0
_3_i += 1
goto _38
_41:
_37:
- if (_9_pLhs.X0) == i32(1) {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pX.X4))))) = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_9_pLhs.X2))))) + 20*uintptr(i32(0)))).X0)
+ if _9_pLhs.XnExpr == int32(1) {
+ *(**XExpr)(unsafe.Pointer(&_pX.XpLeft)) = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_9_pLhs.Xa)), 0).XpExpr)
goto _43
}
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_12_pLeft.X6))))))) = _9_pLhs
- _3_aiMap = (*int32)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.X0), uint64(u32(4)*uint32(_3_nEq))))
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_12_pLeft.Xx)))) = _9_pLhs
+ _3_aiMap = (*int32)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.Xdb), uint64(uint32(4)*uint32(_3_nEq))))
_43:
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_9_pSelect.X0))))) = _9_pRhs
+ *(**XExprList)(unsafe.Pointer(&_9_pSelect.XpEList)) = _9_pRhs
{
- p := (*uint16)(unsafe.Pointer(&(_9_db.X13)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
- }
- _3_eType = _sqlite3FindInIndex(tls, _pParse, _pX, uint32(i32(4)), nil, _3_aiMap)
- *(*uint16)(unsafe.Pointer(&(_9_db.X13))) = _9_savedDbOptFlags
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_9_pSelect.X0))))) = _9_pOrigRhs
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_12_pLeft.X6))))))) = _9_pOrigLhs
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pX.X4))))) = _12_pLeft
+ p := &_9_db.XdbOptFlags
+ *p = uint16(int32(*p) | int32(1))
+ }
+ _3_eType = _sqlite3FindInIndex(tls, _pParse, _pX, uint32(4), nil, _3_aiMap)
+ _9_db.XdbOptFlags = _9_savedDbOptFlags
+ *(**XExprList)(unsafe.Pointer(&_9_pSelect.XpEList)) = _9_pOrigRhs
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_12_pLeft.Xx)))) = _9_pOrigLhs
+ *(**XExpr)(unsafe.Pointer(&_pX.XpLeft)) = _12_pLeft
_36:
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), _9_pLhs)
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), _9_pRhs)
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), _9_pLhs)
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), _9_pRhs)
_30:
- if _3_eType == i32(4) {
+ if _3_eType == int32(4) {
_bRev = bool2int(_bRev == 0)
}
- _3_iTab = _pX.X8
+ _3_iTab = _pX.XiTable
_sqlite3VdbeAddOp2(tls, _v, func() int32 {
if _bRev != 0 {
- return i32(33)
+ return int32(33)
}
- return i32(37)
- }(), _3_iTab, i32(0))
+ return int32(37)
+ }(), _3_iTab, int32(0))
func() {
- if ((_3_pLoop.X9) & uint32(i32(8192))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127304), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000))), unsafe.Pointer(str(109008)))
+ if (_3_pLoop.XwsFlags & uint32(8192)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127304), unsafe.Pointer(&_codeEqualityTermØ00__func__Ø000), unsafe.Pointer(str(109036)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_3_pLoop.X9)))
- *p = (*p) | uint32(i32(2048))
- sink5(*p)
- }
- if ((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X0) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_pLevel.X4))) = _sqlite3VdbeMakeLabel(tls, _v)
- }
- _3_i = (*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X0
- {
- p := (*int32)(unsafe.Pointer(&((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X0)))
- *p = (*p) + _3_nEq
- sink1(*p)
+ _3_pLoop.XwsFlags |= uint32(2048)
+ if ((*t114)(unsafe.Pointer(&_pLevel.Xu)).XnIn) == int32(0) {
+ _pLevel.XaddrNxt = _sqlite3VdbeMakeLabel(tls, _v)
}
- *(**TInLoop)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X1))))) = (*TInLoop)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_pParse.X0), (*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X1, uint64(u32(12)*uint32((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X0))))
- _3_pIn = (*TInLoop)((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X1)
+ _3_i = (*t114)(unsafe.Pointer(&_pLevel.Xu)).XnIn
+ (*t114)(unsafe.Pointer(&_pLevel.Xu)).XnIn += _3_nEq
+ *(**TInLoop)(unsafe.Pointer(&((*t114)(unsafe.Pointer(&_pLevel.Xu)).XaInLoop))) = (*TInLoop)(_sqlite3DbReallocOrFree(tls, (*Xsqlite3)(_pParse.Xdb), (*t114)(unsafe.Pointer(&_pLevel.Xu)).XaInLoop, uint64(uint32(12)*uint32((*t114)(unsafe.Pointer(&_pLevel.Xu)).XnIn))))
+ _3_pIn = (*TInLoop)((*t114)(unsafe.Pointer(&_pLevel.Xu)).XaInLoop)
if _3_pIn == nil {
goto _50
}
- _19_iMap = i32(0)
- {
- p := &_3_pIn
- *p = (*TInLoop)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 12*uintptr(_3_i)))
- sink71(*p)
- }
+ _19_iMap = int32(0)
+ *(*uintptr)(unsafe.Pointer(&_3_pIn)) += 12 * uintptr(_3_i)
_3_i = _iEq
_51:
- if _3_i >= int32(_3_pLoop.X10) {
+ if _3_i >= int32(_3_pLoop.XnLTerm) {
goto _54
}
- if (*XExpr)((*(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pLoop.X13)) + 4*uintptr(_3_i)))).X0) != _pX {
+ if (*XExpr)((*elem104((**XWhereTerm)(unsafe.Pointer(_3_pLoop.XaLTerm)), uintptr(_3_i))).XpExpr) != _pX {
goto _55
}
_21_iOut = (_iReg + _3_i) - _iEq
- if _3_eType == i32(1) {
- *(*int32)(unsafe.Pointer(&(_3_pIn.X1))) = _sqlite3VdbeAddOp2(tls, _v, i32(125), _3_iTab, _21_iOut)
+ if _3_eType == int32(1) {
+ _3_pIn.XaddrInTop = _sqlite3VdbeAddOp2(tls, _v, int32(125), _3_iTab, _21_iOut)
goto _57
}
_23_iCol = func() int32 {
if _3_aiMap != nil {
- return (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_aiMap)) + 4*uintptr(postInc1(&_19_iMap, int32(1))))))
+ return (*elem8(_3_aiMap, uintptr(postInc2(&_19_iMap, 1))))
}
- return i32(0)
+ return int32(0)
}()
- *(*int32)(unsafe.Pointer(&(_3_pIn.X1))) = _sqlite3VdbeAddOp3(tls, _v, i32(99), _3_iTab, _23_iCol, _21_iOut)
+ _3_pIn.XaddrInTop = _sqlite3VdbeAddOp3(tls, _v, int32(99), _3_iTab, _23_iCol, _21_iOut)
_57:
- _sqlite3VdbeAddOp1(tls, _v, i32(75), _21_iOut)
+ _sqlite3VdbeAddOp1(tls, _v, int32(75), _21_iOut)
if _3_i == _iEq {
- *(*int32)(unsafe.Pointer(&(_3_pIn.X0))) = _3_iTab
- *(*uint8)(unsafe.Pointer(&(_3_pIn.X2))) = uint8(func() int32 {
+ _3_pIn.XiCur = _3_iTab
+ _3_pIn.XeEndLoopOp = uint8(func() int32 {
if _bRev != 0 {
- return i32(4)
+ return int32(4)
}
- return i32(5)
+ return int32(5)
}())
goto _63
}
- *(*uint8)(unsafe.Pointer(&(_3_pIn.X2))) = uint8(i32(164))
+ _3_pIn.XeEndLoopOp = uint8(164)
_63:
*(*uintptr)(unsafe.Pointer(&_3_pIn)) += uintptr(12)
_55:
@@ -89699,9 +90723,9 @@ _55:
_54:
goto _64
_50:
- *(*int32)(unsafe.Pointer(&((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X0))) = i32(0)
+ (*t114)(unsafe.Pointer(&_pLevel.Xu)).XnIn = int32(0)
_64:
- _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_3_aiMap))
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_3_aiMap))
_8:
_disableTerm(tls, _pLevel, _pTerm)
return _iReg
@@ -89713,85 +90737,86 @@ _8:
var _codeEqualityTermØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_codeEqualityTermØ00__func__Ø000[0], str(109045), 17)
-}
-
-// Disable a term in the WHERE clause. Except, do not disable the term
-// if it controls a LEFT OUTER JOIN and it did not originate in the ON
-// or USING clause of that join.
-//
-// Consider the term t2.z='ok' in the following queries:
-//
-// (1) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x WHERE t2.z='ok'
-// (2) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x AND t2.z='ok'
-// (3) SELECT * FROM t1, t2 WHERE t1.a=t2.x AND t2.z='ok'
-//
-// The t2.z='ok' is disabled in the in (2) because it originates
-// in the ON clause. The term is disabled in (3) because it is not part
-// of a LEFT OUTER JOIN. In (1), the term is not disabled.
-//
-// Disabling a term causes that term to not be tested in the inner loop
-// of the join. Disabling is an optimization. When terms are satisfied
-// by indices, we disable them to prevent redundant tests in the inner
-// loop. We would get the correct results if nothing were ever disabled,
-// but joins might run a little slower. The trick is to disable as much
-// as we can without disabling too much. If we disabled in (1), we'd get
-// the wrong answer. See ticket #813.
-//
-// If all the children of a term are disabled, then that term is also
-// automatically disabled. In this way, terms get disabled if derived
-// virtual terms are tested first. For example:
-//
-// x GLOB 'abc*' AND x>='abc' AND x<'acd'
-// \___________/ \______/ \_____/
-// parent child1 child2
-//
-// Only the parent term was in the original WHERE clause. The child1
-// and child2 terms were added by the LIKE optimization. If both of
-// the virtual child terms are valid, then testing of the parent can be
-// skipped.
-//
-// Usually the parent term is marked as TERM_CODED. But if the parent
-// term was originally TERM_LIKE, then the parent gets TERM_LIKECOND instead.
-// The TERM_LIKECOND marking indicates that the term should be coded inside
-// a conditional such that is only evaluated on the second pass of a
-// LIKE-optimization loop, when scanning BLOBs instead of strings.
+ crt.Xstrncpy(nil, &_codeEqualityTermØ00__func__Ø000[0], str(109073), 17)
+}
+
+// C comment
+// /*
+// ** Disable a term in the WHERE clause. Except, do not disable the term
+// ** if it controls a LEFT OUTER JOIN and it did not originate in the ON
+// ** or USING clause of that join.
+// **
+// ** Consider the term t2.z='ok' in the following queries:
+// **
+// ** (1) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x WHERE t2.z='ok'
+// ** (2) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x AND t2.z='ok'
+// ** (3) SELECT * FROM t1, t2 WHERE t1.a=t2.x AND t2.z='ok'
+// **
+// ** The t2.z='ok' is disabled in the in (2) because it originates
+// ** in the ON clause. The term is disabled in (3) because it is not part
+// ** of a LEFT OUTER JOIN. In (1), the term is not disabled.
+// **
+// ** Disabling a term causes that term to not be tested in the inner loop
+// ** of the join. Disabling is an optimization. When terms are satisfied
+// ** by indices, we disable them to prevent redundant tests in the inner
+// ** loop. We would get the correct results if nothing were ever disabled,
+// ** but joins might run a little slower. The trick is to disable as much
+// ** as we can without disabling too much. If we disabled in (1), we'd get
+// ** the wrong answer. See ticket #813.
+// **
+// ** If all the children of a term are disabled, then that term is also
+// ** automatically disabled. In this way, terms get disabled if derived
+// ** virtual terms are tested first. For example:
+// **
+// ** x GLOB 'abc*' AND x>='abc' AND x<'acd'
+// ** \___________/ \______/ \_____/
+// ** parent child1 child2
+// **
+// ** Only the parent term was in the original WHERE clause. The child1
+// ** and child2 terms were added by the LIKE optimization. If both of
+// ** the virtual child terms are valid, then testing of the parent can be
+// ** skipped.
+// **
+// ** Usually the parent term is marked as TERM_CODED. But if the parent
+// ** term was originally TERM_LIKE, then the parent gets TERM_LIKECOND instead.
+// ** The TERM_LIKECOND marking indicates that the term should be coded inside
+// ** a conditional such that is only evaluated on the second pass of a
+// ** LIKE-optimization loop, when scanning BLOBs instead of strings.
+// */
func _disableTerm(tls *crt.TLS, _pLevel *XWhereLevel, _pTerm *XWhereTerm) {
var _nLoop int32
- _nLoop = i32(0)
+ _nLoop = int32(0)
_0:
if func() int32 {
if _pTerm != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127088), unsafe.Pointer((*int8)(unsafe.Pointer(&_disableTermØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127088), unsafe.Pointer(&_disableTermØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() == 0 || (int32(_pTerm.X3)&i32(4)) != i32(0) || (_pLevel.X0) != i32(0) && (((*XExpr)(_pTerm.X0).X2)&uint32(i32(1))) == uint32(i32(0)) || ((_pLevel.X19)&(_pTerm.X12)) != uint64(i32(0)) {
+ }() == 0 || (int32(_pTerm.XwtFlags)&int32(4)) != int32(0) || _pLevel.XiLeftJoin != int32(0) && (((*XExpr)(_pTerm.XpExpr).Xflags)&uint32(1)) == (0) || (_pLevel.XnotReady&_pTerm.XprereqAll) != (0) {
goto _1
}
- if _nLoop != 0 && ((int32(_pTerm.X3) & i32(1024)) != i32(0)) {
+ if _nLoop != 0 && ((int32(_pTerm.XwtFlags) & int32(1024)) != int32(0)) {
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X3)))
- *p = uint16(int32(*p) | i32(512))
- sink14(*p)
+ p := &_pTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(512))
}
goto _10
}
{
- p := (*uint16)(unsafe.Pointer(&(_pTerm.X3)))
- *p = uint16(int32(*p) | i32(4))
- sink14(*p)
+ p := &_pTerm.XwtFlags
+ *p = uint16(int32(*p) | int32(4))
}
_10:
- if (_pTerm.X7) < i32(0) {
+ if _pTerm.XiParent < int32(0) {
goto _1
}
- _pTerm = (*XWhereTerm)(unsafe.Pointer(uintptr((*XWhereClause)(_pTerm.X1).X5) + 48*uintptr(_pTerm.X7)))
- *(*uint8)(unsafe.Pointer(&(_pTerm.X5))) -= 1
- if int32(_pTerm.X5) != i32(0) {
+ _pTerm = elem100((*XWhereTerm)((*XWhereClause)(_pTerm.XpWC).Xa), uintptr(_pTerm.XiParent))
+ _pTerm.XnChild -= 1
+ if int32(_pTerm.XnChild) != int32(0) {
goto _1
}
_nLoop += 1
@@ -89802,48 +90827,51 @@ _1:
var _disableTermØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_disableTermØ00__func__Ø000[0], str(109062), 12)
+ crt.Xstrncpy(nil, &_disableTermØ00__func__Ø000[0], str(109090), 12)
}
-// If the expression passed as the second argument is a vector, generate
-// code to write the first nReg elements of the vector into an array
-// of registers starting with iReg.
-//
-// If the expression is not a vector, then nReg must be passed 1. In
-// this case, generate code to evaluate the expression and leave the
-// result in register iReg.
+// C comment
+// /*
+// ** If the expression passed as the second argument is a vector, generate
+// ** code to write the first nReg elements of the vector into an array
+// ** of registers starting with iReg.
+// **
+// ** If the expression is not a vector, then nReg must be passed 1. In
+// ** this case, generate code to evaluate the expression and leave the
+// ** result in register iReg.
+// */
func _codeExprOrVector(tls *crt.TLS, _pParse *XParse, _p *XExpr, _iReg int32, _nReg int32) {
var _2_iSelect, _3_i int32
var _2_v *TVdbe
var _3_pList *XExprList
func() {
- if _nReg <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127810), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeExprOrVectorØ00__func__Ø000))), unsafe.Pointer(str(109074)))
+ if _nReg <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127810), unsafe.Pointer(&_codeExprOrVectorØ00__func__Ø000), unsafe.Pointer(str(109102)))
crt.X__builtin_abort(tls)
}
}()
if _sqlite3ExprIsVector(tls, _p) == 0 {
goto _2
}
- if ((_p.X2) & uint32(i32(2048))) != 0 {
- _2_v = (*TVdbe)(_pParse.X2)
- _2_iSelect = _sqlite3CodeSubselect(tls, _pParse, _p, i32(0), i32(0))
- _sqlite3VdbeAddOp3(tls, _2_v, i32(64), _2_iSelect, _iReg, _nReg-i32(1))
+ if (_p.Xflags & uint32(2048)) != 0 {
+ _2_v = (*TVdbe)(_pParse.XpVdbe)
+ _2_iSelect = _sqlite3CodeSubselect(tls, _pParse, _p, int32(0), int32(0))
+ _sqlite3VdbeAddOp3(tls, _2_v, int32(64), _2_iSelect, _iReg, _nReg-int32(1))
goto _4
}
- _3_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_p.X6))))))
+ _3_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xx)))
func() {
- if _nReg > (_3_pList.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127822), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeExprOrVectorØ00__func__Ø000))), unsafe.Pointer(str(109081)))
+ if _nReg > _3_pList.XnExpr {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127822), unsafe.Pointer(&_codeExprOrVectorØ00__func__Ø000), unsafe.Pointer(str(109109)))
crt.X__builtin_abort(tls)
}
}()
- _3_i = i32(0)
+ _3_i = int32(0)
_7:
if _3_i >= _nReg {
goto _10
}
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_3_pList.X2)))))+20*uintptr(_3_i))).X0), _iReg+_3_i)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_3_pList.Xa)), uintptr(_3_i)).XpExpr), _iReg+_3_i)
_3_i += 1
goto _7
_10:
@@ -89851,8 +90879,8 @@ _4:
goto _11
_2:
func() {
- if _nReg != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127828), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeExprOrVectorØ00__func__Ø000))), unsafe.Pointer(str(109100)))
+ if _nReg != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127828), unsafe.Pointer(&_codeExprOrVectorØ00__func__Ø000), unsafe.Pointer(str(109128)))
crt.X__builtin_abort(tls)
}
}()
@@ -89863,52 +90891,55 @@ _11:
var _codeExprOrVectorØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_codeExprOrVectorØ00__func__Ø000[0], str(109108), 17)
-}
-
-// Generate code that will evaluate all == and IN constraints for an
-// index scan.
-//
-// For example, consider table t1(a,b,c,d,e,f) with index i1(a,b,c).
-// Suppose the WHERE clause is this: a==5 AND b IN (1,2,3) AND c>5 AND c<10
-// The index has as many as three equality constraints, but in this
-// example, the third "c" value is an inequality. So only two
-// constraints are coded. This routine will generate code to evaluate
-// a==5 and b IN (1,2,3). The current values for a and b will be stored
-// in consecutive registers and the index of the first register is returned.
-//
-// In the example above nEq==2. But this subroutine works for any value
-// of nEq including 0. If nEq==0, this routine is nearly a no-op.
-// The only thing it does is allocate the pLevel->iMem memory cell and
-// compute the affinity string.
-//
-// The nExtraReg parameter is 0 or 1. It is 0 if all WHERE clause constraints
-// are == or IN and are covered by the nEq. nExtraReg is 1 if there is
-// an inequality constraint (such as the "c>=5 AND c<10" in the example) that
-// occurs after the nEq quality constraints.
-//
-// This routine allocates a range of nEq+nExtraReg memory cells and returns
-// the index of the first memory cell in that range. The code that
-// calls this routine will use that memory range to store keys for
-// start and termination conditions of the loop.
-// key value of the loop. If one or more IN operators appear, then
-// this routine allocates an additional nEq memory cells for internal
-// use.
-//
-// Before returning, *pzAff is set to point to a buffer containing a
-// copy of the column affinity string of the index allocated using
-// sqlite3DbMalloc(). Except, entries in the copy of the string associated
-// with equality constraints that use BLOB or NONE affinity are set to
-// SQLITE_AFF_BLOB. This is to deal with SQL such as the following:
-//
-// CREATE TABLE t1(a TEXT PRIMARY KEY, b);
-// SELECT ... FROM t1 AS t2, t1 WHERE t1.a = t2.b;
-//
-// In the example above, the index on t1(a) has TEXT affinity. But since
-// the right hand side of the equality constraint (t2.b) has BLOB/NONE affinity,
-// no conversion should be attempted before using a t2.b value as part of
-// a key to search the index. Hence the first byte in the returned affinity
-// string in this example would be set to SQLITE_AFF_BLOB.
+ crt.Xstrncpy(nil, &_codeExprOrVectorØ00__func__Ø000[0], str(109136), 17)
+}
+
+// C comment
+// /*
+// ** Generate code that will evaluate all == and IN constraints for an
+// ** index scan.
+// **
+// ** For example, consider table t1(a,b,c,d,e,f) with index i1(a,b,c).
+// ** Suppose the WHERE clause is this: a==5 AND b IN (1,2,3) AND c>5 AND c<10
+// ** The index has as many as three equality constraints, but in this
+// ** example, the third "c" value is an inequality. So only two
+// ** constraints are coded. This routine will generate code to evaluate
+// ** a==5 and b IN (1,2,3). The current values for a and b will be stored
+// ** in consecutive registers and the index of the first register is returned.
+// **
+// ** In the example above nEq==2. But this subroutine works for any value
+// ** of nEq including 0. If nEq==0, this routine is nearly a no-op.
+// ** The only thing it does is allocate the pLevel->iMem memory cell and
+// ** compute the affinity string.
+// **
+// ** The nExtraReg parameter is 0 or 1. It is 0 if all WHERE clause constraints
+// ** are == or IN and are covered by the nEq. nExtraReg is 1 if there is
+// ** an inequality constraint (such as the "c>=5 AND c<10" in the example) that
+// ** occurs after the nEq quality constraints.
+// **
+// ** This routine allocates a range of nEq+nExtraReg memory cells and returns
+// ** the index of the first memory cell in that range. The code that
+// ** calls this routine will use that memory range to store keys for
+// ** start and termination conditions of the loop.
+// ** key value of the loop. If one or more IN operators appear, then
+// ** this routine allocates an additional nEq memory cells for internal
+// ** use.
+// **
+// ** Before returning, *pzAff is set to point to a buffer containing a
+// ** copy of the column affinity string of the index allocated using
+// ** sqlite3DbMalloc(). Except, entries in the copy of the string associated
+// ** with equality constraints that use BLOB or NONE affinity are set to
+// ** SQLITE_AFF_BLOB. This is to deal with SQL such as the following:
+// **
+// ** CREATE TABLE t1(a TEXT PRIMARY KEY, b);
+// ** SELECT ... FROM t1 AS t2, t1 WHERE t1.a = t2.b;
+// **
+// ** In the example above, the index on t1(a) has TEXT affinity. But since
+// ** the right hand side of the equality constraint (t2.b) has BLOB/NONE affinity,
+// ** no conversion should be attempted before using a t2.b value as part of
+// ** a key to search the index. Hence the first byte in the returned affinity
+// ** string in this example would be set to SQLITE_AFF_BLOB.
+// */
func _codeAllEqualityTerms(tls *crt.TLS, _pParse *XParse, _pLevel *XWhereLevel, _bRev int32, _nExtraReg int32, _pzAff **int8) (r0 int32) {
var _j, _regBase, _nReg, _1_iIdxCur, _3_r1 int32
var _zAff *int8
@@ -89918,70 +90949,66 @@ func _codeAllEqualityTerms(tls *crt.TLS, _pParse *XParse, _pLevel *XWhereLevel,
var _pIdx *XIndex
var _pLoop *XWhereLoop
var _pTerm *XWhereTerm
- _v = (*TVdbe)(_pParse.X2)
- _pLoop = (*XWhereLoop)(_pLevel.X18)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _pLoop = (*XWhereLoop)(_pLevel.XpWLoop)
func() {
- if ((_pLoop.X9) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127415), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000))), unsafe.Pointer(str(109125)))
+ if (_pLoop.XwsFlags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127415), unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000), unsafe.Pointer(str(109153)))
crt.X__builtin_abort(tls)
}
}()
- _nEq = (*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0
- _nSkip = _pLoop.X11
- _pIdx = (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4)
+ _nEq = (*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq
+ _nSkip = _pLoop.XnSkip
+ _pIdx = (*XIndex)((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex)
func() {
if _pIdx == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127419), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000))), unsafe.Pointer(str(42069)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127419), unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000), unsafe.Pointer(str(42024)))
crt.X__builtin_abort(tls)
}
}()
- _regBase = (_pParse.X18) + i32(1)
- _nReg = int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X0) + _nExtraReg
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _nReg
- sink1(*p)
- }
- _zAff = _sqlite3DbStrDup(tls, (*Xsqlite3)(_pParse.X0), _sqlite3IndexAffinityStr(tls, (*Xsqlite3)(_pParse.X0), _pIdx))
+ _regBase = _pParse.XnMem + int32(1)
+ _nReg = int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnEq) + _nExtraReg
+ _pParse.XnMem += _nReg
+ _zAff = _sqlite3DbStrDup(tls, (*Xsqlite3)(_pParse.Xdb), _sqlite3IndexAffinityStr(tls, (*Xsqlite3)(_pParse.Xdb), _pIdx))
func() {
- if _zAff == nil && ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127428), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000))), unsafe.Pointer(str(109166)))
+ if _zAff == nil && ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127428), unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000), unsafe.Pointer(str(109194)))
crt.X__builtin_abort(tls)
}
}()
if _nSkip == 0 {
goto _7
}
- _1_iIdxCur = _pLevel.X2
+ _1_iIdxCur = _pLevel.XiIdxCur
_sqlite3VdbeAddOp1(tls, _v, func() int32 {
if _bRev != 0 {
- return i32(33)
+ return int32(33)
}
- return i32(37)
+ return int32(37)
}(), _1_iIdxCur)
- _sqlite3VdbeComment(tls, _v, str(109202), unsafe.Pointer(_pIdx.X0))
- _j = _sqlite3VdbeAddOp0(tls, _v, i32(13))
- *(*int32)(unsafe.Pointer(&(_pLevel.X5))) = _sqlite3VdbeAddOp4Int(tls, _v, func() int32 {
+ _sqlite3VdbeComment(tls, _v, str(109230), unsafe.Pointer(_pIdx.XzName))
+ _j = _sqlite3VdbeAddOp0(tls, _v, int32(13))
+ _pLevel.XaddrSkip = _sqlite3VdbeAddOp4Int(tls, _v, func() int32 {
if _bRev != 0 {
- return i32(24)
+ return int32(24)
}
- return i32(27)
- }(), _1_iIdxCur, i32(0), _regBase, int32(_nSkip))
+ return int32(27)
+ }(), _1_iIdxCur, int32(0), _regBase, int32(_nSkip))
_sqlite3VdbeJumpHere(tls, _v, _j)
- _j = i32(0)
+ _j = int32(0)
_12:
if _j >= int32(_nSkip) {
goto _15
}
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _1_iIdxCur, _j, _regBase+_j)
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_explainIndexColumnName(tls, _pIdx, _j)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _1_iIdxCur, _j, _regBase+_j)
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_explainIndexColumnName(tls, _pIdx, _j)))
_j += 1
goto _12
_15:
_7:
func() {
if _zAff != nil && int32(crt.Xstrlen(tls, _zAff)) < int32(_nEq) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127451), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000))), unsafe.Pointer(str(109224)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127451), unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000), unsafe.Pointer(str(109252)))
crt.X__builtin_abort(tls)
}
}()
@@ -89990,10 +91017,10 @@ _19:
if _j >= int32(_nEq) {
goto _22
}
- _pTerm = *(**XWhereTerm)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pLoop.X13)) + 4*uintptr(_j)))
+ _pTerm = *elem104((**XWhereTerm)(unsafe.Pointer(_pLoop.XaLTerm)), uintptr(_j))
func() {
if _pTerm == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127455), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000))), unsafe.Pointer(str(108051)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127455), unsafe.Pointer(&_codeAllEqualityTermsØ00__func__Ø000), unsafe.Pointer(str(108079)))
crt.X__builtin_abort(tls)
}
}()
@@ -90001,41 +91028,41 @@ _19:
if _3_r1 == (_regBase + _j) {
goto _25
}
- if _nReg == i32(1) {
+ if _nReg == int32(1) {
_sqlite3ReleaseTempReg(tls, _pParse, _regBase)
_regBase = _3_r1
goto _27
}
- _sqlite3VdbeAddOp2(tls, _v, i32(65), _3_r1, _regBase+_j)
+ _sqlite3VdbeAddOp2(tls, _v, int32(65), _3_r1, _regBase+_j)
_27:
_25:
- if (int32(_pTerm.X4) & i32(1)) == 0 {
+ if (int32(_pTerm.XeOperator) & int32(1)) == 0 {
goto _28
}
- if (((*XExpr)(_pTerm.X0).X2) & uint32(i32(2048))) == 0 {
+ if (((*XExpr)(_pTerm.XpExpr).Xflags) & uint32(2048)) == 0 {
goto _29
}
if _zAff != nil {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(_j))) = int8(i32(65))
+ *elem1(_zAff, uintptr(_j)) = int8(65)
}
_29:
goto _32
_28:
- if (int32(_pTerm.X4) & i32(256)) != i32(0) {
+ if (int32(_pTerm.XeOperator) & int32(256)) != int32(0) {
goto _32
}
- _9_pRight = (*XExpr)((*XExpr)(_pTerm.X0).X5)
- if ((int32(_pTerm.X3) & i32(2048)) == i32(0)) && _sqlite3ExprCanBeNull(tls, _9_pRight) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(75), _regBase+_j, _pLevel.X3)
+ _9_pRight = (*XExpr)((*XExpr)(_pTerm.XpExpr).XpRight)
+ if ((int32(_pTerm.XwtFlags) & int32(2048)) == int32(0)) && _sqlite3ExprCanBeNull(tls, _9_pRight) != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), _regBase+_j, _pLevel.XaddrBrk)
}
if _zAff == nil {
goto _35
}
- if int32(_sqlite3CompareAffinity(tls, _9_pRight, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(_j))))) == i32(65) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(_j))) = int8(i32(65))
+ if int32(_sqlite3CompareAffinity(tls, _9_pRight, *elem1(_zAff, uintptr(_j)))) == int32(65) {
+ *elem1(_zAff, uintptr(_j)) = int8(65)
}
- if _sqlite3ExprNeedsNoAffinityChange(tls, _9_pRight, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(_j)))) != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(_j))) = int8(i32(65))
+ if _sqlite3ExprNeedsNoAffinityChange(tls, _9_pRight, *elem1(_zAff, uintptr(_j))) != 0 {
+ *elem1(_zAff, uintptr(_j)) = int8(65)
}
_35:
_32:
@@ -90049,166 +91076,178 @@ _22:
var _codeAllEqualityTermsØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_codeAllEqualityTermsØ00__func__Ø000[0], str(109258), 21)
+ crt.Xstrncpy(nil, &_codeAllEqualityTermsØ00__func__Ø000[0], str(109286), 21)
}
-// Return TRUE if the given expression is a constant which would be
-// unchanged by OP_Affinity with the affinity given in the second
-// argument.
-//
-// This routine is used to determine if the OP_Affinity operation
-// can be omitted. When in doubt return FALSE. A false negative
-// is harmless. A false positive, however, can result in the wrong
-// answer.
+// C comment
+// /*
+// ** Return TRUE if the given expression is a constant which would be
+// ** unchanged by OP_Affinity with the affinity given in the second
+// ** argument.
+// **
+// ** This routine is used to determine if the OP_Affinity operation
+// ** can be omitted. When in doubt return FALSE. A false negative
+// ** is harmless. A false positive, however, can result in the wrong
+// ** answer.
+// */
func _sqlite3ExprNeedsNoAffinityChange(tls *crt.TLS, _p *XExpr, _aff int8) (r0 int32) {
var _op uint8
- if int32(_aff) == i32(65) {
- return i32(1)
+ if int32(_aff) == int32(65) {
+ return int32(1)
}
_0:
- if (int32(_p.X0) == i32(156)) || (int32(_p.X0) == i32(155)) {
- _p = (*XExpr)(_p.X4)
+ if (int32(_p.Xop) == int32(156)) || (int32(_p.Xop) == int32(155)) {
+ _p = (*XExpr)(_p.XpLeft)
goto _0
}
- _op = _p.X0
- if int32(_op) == i32(157) {
- _op = _p.X12
+ _op = _p.Xop
+ if int32(_op) == int32(157) {
+ _op = _p.Xop2
}
switch int32(_op) {
- case i32(97):
+ case int32(97):
goto _8
- case i32(132):
+ case int32(132):
goto _7
- case i32(133):
+ case int32(133):
goto _9
- case i32(134):
+ case int32(134):
goto _6
- case i32(152):
+ case int32(152):
goto _10
default:
goto _11
}
_6:
- return bool2int((int32(_aff) == i32(68)) || (int32(_aff) == i32(67)))
+ return bool2int((int32(_aff) == int32(68)) || (int32(_aff) == int32(67)))
_7:
- return bool2int((int32(_aff) == i32(69)) || (int32(_aff) == i32(67)))
+ return bool2int((int32(_aff) == int32(69)) || (int32(_aff) == int32(67)))
_8:
- return bool2int(int32(_aff) == i32(66))
+ return bool2int(int32(_aff) == int32(66))
_9:
- return i32(1)
+ return int32(1)
_10:
func() {
- if (_p.X8) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92905), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprNeedsNoAffinityChangeØ00__func__Ø000))), unsafe.Pointer(str(109279)))
+ if _p.XiTable < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92905), unsafe.Pointer(&_sqlite3ExprNeedsNoAffinityChangeØ00__func__Ø000), unsafe.Pointer(str(109307)))
crt.X__builtin_abort(tls)
}
}()
- return bool2int((int32(_p.X9) < i32(0)) && ((int32(_aff) == i32(68)) || (int32(_aff) == i32(67))))
+ return bool2int((int32(_p.XiColumn) < int32(0)) && ((int32(_aff) == int32(68)) || (int32(_aff) == int32(67))))
_11:
- return i32(0)
+ return int32(0)
}
var _sqlite3ExprNeedsNoAffinityChangeØ00__func__Ø000 [33]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprNeedsNoAffinityChangeØ00__func__Ø000[0], str(109292), 33)
-}
-
-// If the most recently coded instruction is a constant range constraint
-// (a string literal) that originated from the LIKE optimization, then
-// set P3 and P5 on the OP_String opcode so that the string will be cast
-// to a BLOB at appropriate times.
-//
-// The LIKE optimization trys to evaluate "x LIKE 'abc%'" as a range
-// expression: "x>='ABC' AND x<'abd'". But this requires that the range
-// scan loop run twice, once for strings and a second time for BLOBs.
-// The OP_String opcodes on the second pass convert the upper and lower
-// bound string constants to blobs. This routine makes the necessary changes
-// to the OP_String opcodes for that to happen.
-//
-// Except, of course, if SQLITE_LIKE_DOESNT_MATCH_BLOBS is defined, then
-// only the one pass through the string space is required, so this routine
-// becomes a no-op.
+ crt.Xstrncpy(nil, &_sqlite3ExprNeedsNoAffinityChangeØ00__func__Ø000[0], str(109320), 33)
+}
+
+// C comment
+// /*
+// ** If the most recently coded instruction is a constant range constraint
+// ** (a string literal) that originated from the LIKE optimization, then
+// ** set P3 and P5 on the OP_String opcode so that the string will be cast
+// ** to a BLOB at appropriate times.
+// **
+// ** The LIKE optimization trys to evaluate "x LIKE 'abc%'" as a range
+// ** expression: "x>='ABC' AND x<'abd'". But this requires that the range
+// ** scan loop run twice, once for strings and a second time for BLOBs.
+// ** The OP_String opcodes on the second pass convert the upper and lower
+// ** bound string constants to blobs. This routine makes the necessary changes
+// ** to the OP_String opcodes for that to happen.
+// **
+// ** Except, of course, if SQLITE_LIKE_DOESNT_MATCH_BLOBS is defined, then
+// ** only the one pass through the string space is required, so this routine
+// ** becomes a no-op.
+// */
func _whereLikeOptimizationStringFixup(tls *crt.TLS, _v *TVdbe, _pLevel *XWhereLevel, _pTerm *XWhereTerm) {
var _1_pOp *XVdbeOp
- if (int32(_pTerm.X3) & i32(256)) != 0 {
+ if (int32(_pTerm.XwtFlags) & int32(256)) != 0 {
func() {
- if (_pLevel.X9) <= uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127522), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLikeOptimizationStringFixupØ00__func__Ø000))), unsafe.Pointer(str(109325)))
+ if _pLevel.XiLikeRepCntr <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127522), unsafe.Pointer(&_whereLikeOptimizationStringFixupØ00__func__Ø000), unsafe.Pointer(str(109353)))
crt.X__builtin_abort(tls)
}
}()
- _1_pOp = _sqlite3VdbeGetOp(tls, _v, i32(-1))
+ _1_pOp = _sqlite3VdbeGetOp(tls, _v, int32(-1))
func() {
if _1_pOp == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127524), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLikeOptimizationStringFixupØ00__func__Ø000))), unsafe.Pointer(str(109348)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127524), unsafe.Pointer(&_whereLikeOptimizationStringFixupØ00__func__Ø000), unsafe.Pointer(str(109376)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_1_pOp.X0) != i32(97) && ((*Xsqlite3)((*XParse)((*XWhereInfo)((*XWhereClause)(_pTerm.X1).X0).X0).X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127525), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereLikeOptimizationStringFixupØ00__func__Ø000))), unsafe.Pointer(str(109355)))
+ if int32(_1_pOp.Xopcode) != int32(97) && ((*Xsqlite3)((*XParse)((*XWhereInfo)((*XWhereClause)(_pTerm.XpWC).XpWInfo).XpParse).Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127525), unsafe.Pointer(&_whereLikeOptimizationStringFixupØ00__func__Ø000), unsafe.Pointer(str(109383)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_1_pOp.X5))) = int32((_pLevel.X9) >> uint(i32(1)))
- *(*uint16)(unsafe.Pointer(&(_1_pOp.X2))) = uint16(uint8((_pLevel.X9) & uint32(i32(1))))
+ _1_pOp.Xp3 = int32(_pLevel.XiLikeRepCntr >> 1)
+ _1_pOp.Xp5 = uint16(uint8(_pLevel.XiLikeRepCntr & uint32(1)))
}
}
var _whereLikeOptimizationStringFixupØ00__func__Ø000 [33]int8
func init() {
- crt.Xstrncpy(nil, &_whereLikeOptimizationStringFixupØ00__func__Ø000[0], str(109427), 33)
+ crt.Xstrncpy(nil, &_whereLikeOptimizationStringFixupØ00__func__Ø000[0], str(109455), 33)
}
-// Expression pRight, which is the RHS of a comparison operation, is
-// either a vector of n elements or, if n==1, a scalar expression.
-// Before the comparison operation, affinity zAff is to be applied
-// to the pRight values. This function modifies characters within the
-// affinity string to SQLITE_AFF_BLOB if either:
-//
-// * the comparison will be performed with no affinity, or
-// * the affinity change in zAff is guaranteed not to change the value.
+// C comment
+// /*
+// ** Expression pRight, which is the RHS of a comparison operation, is
+// ** either a vector of n elements or, if n==1, a scalar expression.
+// ** Before the comparison operation, affinity zAff is to be applied
+// ** to the pRight values. This function modifies characters within the
+// ** affinity string to SQLITE_AFF_BLOB if either:
+// **
+// ** * the comparison will be performed with no affinity, or
+// ** * the affinity change in zAff is guaranteed not to change the value.
+// */
func _updateRangeAffinityStr(tls *crt.TLS, _pRight *XExpr, _n int32, _zAff *int8) {
var _i int32
var _1_p *XExpr
- _i = i32(0)
+ _i = int32(0)
_0:
if _i >= _n {
goto _3
}
_1_p = _sqlite3VectorFieldSubexpr(tls, _pRight, _i)
- if (int32(_sqlite3CompareAffinity(tls, _1_p, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(_i))))) == i32(65)) || _sqlite3ExprNeedsNoAffinityChange(tls, _1_p, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(_i)))) != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(_i))) = int8(i32(65))
+ if (int32(_sqlite3CompareAffinity(tls, _1_p, *elem1(_zAff, uintptr(_i)))) == int32(65)) || _sqlite3ExprNeedsNoAffinityChange(tls, _1_p, *elem1(_zAff, uintptr(_i))) != 0 {
+ *elem1(_zAff, uintptr(_i)) = int8(65)
}
_i += 1
goto _0
_3:
}
-// Code an OP_Affinity opcode to apply the column affinity string zAff
-// to the n registers starting at base.
-//
-// As an optimization, SQLITE_AFF_BLOB entries (which are no-ops) at the
-// beginning and end of zAff are ignored. If all entries in zAff are
-// SQLITE_AFF_BLOB, then no code gets generated.
-//
-// This routine makes its own copy of zAff so that the caller is free
-// to modify zAff after this routine returns.
+// C comment
+// /*
+// ** Code an OP_Affinity opcode to apply the column affinity string zAff
+// ** to the n registers starting at base.
+// **
+// ** As an optimization, SQLITE_AFF_BLOB entries (which are no-ops) at the
+// ** beginning and end of zAff are ignored. If all entries in zAff are
+// ** SQLITE_AFF_BLOB, then no code gets generated.
+// **
+// ** This routine makes its own copy of zAff so that the caller is free
+// ** to modify zAff after this routine returns.
+// */
func _codeApplyAffinity(tls *crt.TLS, _pParse *XParse, _base int32, _n int32, _zAff *int8) {
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
if _zAff == nil {
func() {
- if ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127120), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeApplyAffinityØ00__func__Ø000))), unsafe.Pointer(str(42486)))
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127120), unsafe.Pointer(&_codeApplyAffinityØ00__func__Ø000), unsafe.Pointer(str(42441)))
crt.X__builtin_abort(tls)
}
}()
@@ -90216,24 +91255,24 @@ func _codeApplyAffinity(tls *crt.TLS, _pParse *XParse, _base int32, _n int32, _z
}
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127123), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeApplyAffinityØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127123), unsafe.Pointer(&_codeApplyAffinityØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
_5:
- if (_n > i32(0)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(i32(0))))) == i32(65)) {
+ if (_n > int32(0)) && (int32(*elem1(_zAff, 0)) == int32(65)) {
_n -= 1
_base += 1
*(*uintptr)(unsafe.Pointer(&_zAff)) += uintptr(1)
goto _5
}
_6:
- if (_n > i32(1)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zAff)) + 1*uintptr(_n-i32(1))))) == i32(65)) {
+ if (_n > int32(1)) && (int32(*elem1(_zAff, uintptr(_n-int32(1)))) == int32(65)) {
_n -= 1
goto _6
}
- if _n > i32(0) {
- _sqlite3VdbeAddOp4(tls, _v, i32(100), _base, _n, i32(0), _zAff, _n)
+ if _n > int32(0) {
+ _sqlite3VdbeAddOp4(tls, _v, int32(100), _base, _n, int32(0), _zAff, _n)
_sqlite3ExprCacheAffinityChange(tls, _pParse, _base, _n)
}
}
@@ -90241,7 +91280,7 @@ _6:
var _codeApplyAffinityØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_codeApplyAffinityØ00__func__Ø000[0], str(109460), 18)
+ crt.Xstrncpy(nil, &_codeApplyAffinityØ00__func__Ø000[0], str(109488), 18)
}
var _sqlite3WhereCodeOneLoopStartØ00aStartOpØ001 [8]uint8
@@ -90256,75 +91295,78 @@ func init() {
_sqlite3WhereCodeOneLoopStartØ00aEndOpØ002 = [4]uint8{41, 39, 38, 40}
}
-// Cursor iCur is open on an intkey b-tree (a table). Register iRowid contains
-// a rowid value just read from cursor iIdxCur, open on index pIdx. This
-// function generates code to do a deferred seek of cursor iCur to the
-// rowid stored in register iRowid.
-//
-// Normally, this is just:
-//
-// OP_Seek $iCur $iRowid
-//
-// However, if the scan currently being coded is a branch of an OR-loop and
-// the statement currently being coded is a SELECT, then P3 of the OP_Seek
-// is set to iIdxCur and P4 is set to point to an array of integers
-// containing one entry for each column of the table cursor iCur is open
-// on. For each table column, if the column is the i'th column of the
-// index, then the corresponding array entry is set to (i+1). If the column
-// does not appear in the index at all, the array entry is set to 0.
+// C comment
+// /*
+// ** Cursor iCur is open on an intkey b-tree (a table). Register iRowid contains
+// ** a rowid value just read from cursor iIdxCur, open on index pIdx. This
+// ** function generates code to do a deferred seek of cursor iCur to the
+// ** rowid stored in register iRowid.
+// **
+// ** Normally, this is just:
+// **
+// ** OP_Seek $iCur $iRowid
+// **
+// ** However, if the scan currently being coded is a branch of an OR-loop and
+// ** the statement currently being coded is a SELECT, then P3 of the OP_Seek
+// ** is set to iIdxCur and P4 is set to point to an array of integers
+// ** containing one entry for each column of the table cursor iCur is open
+// ** on. For each table column, if the column is the i'th column of the
+// ** index, then the corresponding array entry is set to (i+1). If the column
+// ** does not appear in the index at all, the array entry is set to 0.
+// */
func _codeDeferredSeek(tls *crt.TLS, _pWInfo *XWhereInfo, _pIdx *XIndex, _iCur int32, _iIdxCur int32) {
var _1_i int32
var _1_ai *int32
var _1_pTab *XTable
var _v *TVdbe
var _pParse *XParse
- _pParse = (*XParse)(_pWInfo.X0)
- _v = (*TVdbe)(_pParse.X2)
+ _pParse = (*XParse)(_pWInfo.XpParse)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
- if _iIdxCur <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127779), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeDeferredSeekØ00__func__Ø000))), unsafe.Pointer(str(109478)))
+ if _iIdxCur <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127779), unsafe.Pointer(&_codeDeferredSeekØ00__func__Ø000), unsafe.Pointer(str(109506)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(int32(_pIdx.X14)-i32(1))))) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127780), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeDeferredSeekØ00__func__Ø000))), unsafe.Pointer(str(109488)))
+ if int32(*elem50(_pIdx.XaiColumn, uintptr(int32(_pIdx.XnColumn)-int32(1)))) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127780), unsafe.Pointer(&_codeDeferredSeekØ00__func__Ø000), unsafe.Pointer(str(109516)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp3(tls, _v, i32(130), _iIdxCur, i32(0), _iCur)
- if (int32(_pWInfo.X10)&i32(32)) == 0 || (func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ _sqlite3VdbeAddOp3(tls, _v, int32(130), _iIdxCur, int32(0), _iCur)
+ if (int32(_pWInfo.XwctrlFlags)&int32(32)) == 0 || (func() *XParse {
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
- }().X29) != uint32(i32(0)) {
+ }().XwriteMask) != (0) {
goto _7
}
- _1_pTab = (*XTable)(_pIdx.X3)
- _1_ai = (*int32)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.X0), uint64(u32(4)*uint32(int32(_1_pTab.X11)+i32(1)))))
+ _1_pTab = (*XTable)(_pIdx.XpTable)
+ _1_ai = (*int32)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.Xdb), uint64(uint32(4)*uint32(int32(_1_pTab.XnCol)+int32(1)))))
if _1_ai == nil {
goto _8
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_ai)) + 4*uintptr(i32(0)))) = int32(_1_pTab.X11)
- _1_i = i32(0)
+ *elem8(_1_ai, 0) = int32(_1_pTab.XnCol)
+ _1_i = int32(0)
_9:
- if _1_i >= (int32(_pIdx.X14) - i32(1)) {
+ if _1_i >= (int32(_pIdx.XnColumn) - int32(1)) {
goto _12
}
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_1_i)))) >= int32(_1_pTab.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127792), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeDeferredSeekØ00__func__Ø000))), unsafe.Pointer(str(109524)))
+ if int32(*elem50(_pIdx.XaiColumn, uintptr(_1_i))) >= int32(_1_pTab.XnCol) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127792), unsafe.Pointer(&_codeDeferredSeekØ00__func__Ø000), unsafe.Pointer(str(109552)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_1_i)))) >= i32(0) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_ai)) + 4*uintptr(int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_1_i))))+i32(1)))) = _1_i + i32(1)
+ if int32(*elem50(_pIdx.XaiColumn, uintptr(_1_i))) >= int32(0) {
+ *elem8(_1_ai, uintptr(int32(*elem50(_pIdx.XaiColumn, uintptr(_1_i)))+int32(1))) = _1_i + int32(1)
}
_1_i += 1
goto _9
_12:
- _sqlite3VdbeChangeP4(tls, _v, i32(-1), (*int8)(unsafe.Pointer(_1_ai)), i32(-12))
+ _sqlite3VdbeChangeP4(tls, _v, int32(-1), (*int8)(unsafe.Pointer(_1_ai)), int32(-12))
_8:
_7:
}
@@ -90332,87 +91374,93 @@ _7:
var _codeDeferredSeekØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_codeDeferredSeekØ00__func__Ø000[0], str(109553), 17)
+ crt.Xstrncpy(nil, &_codeDeferredSeekØ00__func__Ø000[0], str(109581), 17)
}
-// For an indexes on expression X, locate every instance of expression X in pExpr
-// and change that subexpression into a reference to the appropriate column of
-// the index.
+// C comment
+// /*
+// ** For an indexes on expression X, locate every instance of expression X in pExpr
+// ** and change that subexpression into a reference to the appropriate column of
+// ** the index.
+// */
func _whereIndexExprTrans(tls *crt.TLS, _pIdx *XIndex, _iTabCur int32, _iIdxCur int32, _pWInfo *XWhereInfo) {
var _iIdxCol int32
var _aColExpr *XExprList
var _w XWalker
var _x XIdxExprTrans
- _aColExpr = (*XExprList)(_pIdx.X10)
+ _aColExpr = (*XExprList)(_pIdx.XaColExpr)
if _aColExpr == nil {
return
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _whereIndexExprTransNode
- *(**XIdxExprTrans)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_w.X6))))))) = &_x
- *(*int32)(unsafe.Pointer(&(_x.X1))) = _iTabCur
- *(*int32)(unsafe.Pointer(&(_x.X2))) = _iIdxCur
- _iIdxCol = i32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _whereIndexExprTransNode
+ *(**XIdxExprTrans)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_w.Xu)))) = &_x
+ _x.XiTabCur = _iTabCur
+ _x.XiIdxCur = _iIdxCur
+ _iIdxCol = int32(0)
_1:
- if _iIdxCol >= (_aColExpr.X0) {
+ if _iIdxCol >= _aColExpr.XnExpr {
goto _4
}
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_iIdxCol)))) != i32(-2) {
+ if int32(*elem50(_pIdx.XaiColumn, uintptr(_iIdxCol))) != int32(-2) {
goto _2
}
func() {
- if (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_aColExpr.X2)))))+20*uintptr(_iIdxCol))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(127887), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereIndexExprTransØ00__func__Ø000))), unsafe.Pointer(str(109570)))
+ if (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_aColExpr.Xa)), uintptr(_iIdxCol)).XpExpr) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(127887), unsafe.Pointer(&_whereIndexExprTransØ00__func__Ø000), unsafe.Pointer(str(109598)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_x.X3))) = _iIdxCol
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_x.X0))))) = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_aColExpr.X2))))) + 20*uintptr(_iIdxCol))).X0)
- _sqlite3WalkExpr(tls, &_w, (*XExpr)(_pWInfo.X4))
- _sqlite3WalkExprList(tls, &_w, (*XExprList)(_pWInfo.X2))
- _sqlite3WalkExprList(tls, &_w, (*XExprList)(_pWInfo.X3))
+ _x.XiIdxCol = _iIdxCol
+ *(**XExpr)(unsafe.Pointer(&_x.XpIdxExpr)) = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_aColExpr.Xa)), uintptr(_iIdxCol)).XpExpr)
+ _sqlite3WalkExpr(tls, &_w, (*XExpr)(_pWInfo.XpWhere))
+ _sqlite3WalkExprList(tls, &_w, (*XExprList)(_pWInfo.XpOrderBy))
+ _sqlite3WalkExprList(tls, &_w, (*XExprList)(_pWInfo.XpResultSet))
_2:
_iIdxCol += 1
goto _1
_4:
- _ = _w
- _ = _x
}
-// The walker node callback used to transform matching expressions into
-// a reference to an index column for an index on an expression.
-//
-// If pExpr matches, then transform it into a reference to the index column
-// that contains the value of pExpr.
+// C comment
+// /* The walker node callback used to transform matching expressions into
+// ** a reference to an index column for an index on an expression.
+// **
+// ** If pExpr matches, then transform it into a reference to the index column
+// ** that contains the value of pExpr.
+// */
func _whereIndexExprTransNode(tls *crt.TLS, _p *XWalker, _pExpr *XExpr) (r0 int32) {
var _pX *XIdxExprTrans
- _pX = (*XIdxExprTrans)(*(*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_p.X6))))))
- if _sqlite3ExprCompare(tls, _pExpr, (*XExpr)(_pX.X0), _pX.X1) == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(152))
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = _pX.X2
- *(*int16)(unsafe.Pointer(&(_pExpr.X9))) = int16(_pX.X3)
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X14))))) = nil
- return i32(1)
+ _pX = (*XIdxExprTrans)(*(*unsafe.Pointer)(unsafe.Pointer(&_p.Xu)))
+ if _sqlite3ExprCompare(tls, _pExpr, (*XExpr)(_pX.XpIdxExpr), _pX.XiTabCur) == int32(0) {
+ _pExpr.Xop = uint8(152)
+ _pExpr.XiTable = _pX.XiIdxCur
+ _pExpr.XiColumn = int16(_pX.XiIdxCol)
+ *(**XTable)(unsafe.Pointer(&_pExpr.XpTab)) = nil
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}
var _whereIndexExprTransØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_whereIndexExprTransØ00__func__Ø000[0], str(109600), 20)
+ crt.Xstrncpy(nil, &_whereIndexExprTransØ00__func__Ø000[0], str(109628), 20)
}
func _sqlite3ExprCodeGetColumnToReg(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _iColumn int32, _iTable int32, _iReg int32) {
var _r1 int32
- _r1 = _sqlite3ExprCodeGetColumn(tls, _pParse, _pTab, _iColumn, _iTable, _iReg, uint8(i32(0)))
+ _r1 = _sqlite3ExprCodeGetColumn(tls, _pParse, _pTab, _iColumn, _iTable, _iReg, 0)
if _r1 != _iReg {
- _sqlite3VdbeAddOp2(tls, (*TVdbe)(_pParse.X2), i32(65), _r1, _iReg)
+ _sqlite3VdbeAddOp2(tls, (*TVdbe)(_pParse.XpVdbe), int32(65), _r1, _iReg)
}
}
-// Generate the end of the WHERE loop. See comments on
-// sqlite3WhereBegin() for additional information.
+// C comment
+// /*
+// ** Generate the end of the WHERE loop. See comments on
+// ** sqlite3WhereBegin() for additional information.
+// */
func _sqlite3WhereEnd(tls *crt.TLS, _pWInfo *XWhereInfo) {
var _i, _1_addr, _2_addrSeek, _2_n, _3_r1, _3_j, _3_op, _6_j, _11_ws, _16_k, _16_last, _22_x int32
var _db *Xsqlite3
@@ -90426,205 +91474,198 @@ func _sqlite3WhereEnd(tls *crt.TLS, _pWInfo *XWhereInfo) {
var _pLoop *XWhereLoop
var _pLevel *XWhereLevel
var _6_pIn *TInLoop
- _pParse = (*XParse)(_pWInfo.X0)
- _v = (*TVdbe)(_pParse.X2)
- _pTabList = (*XSrcList)(_pWInfo.X1)
- _db = (*Xsqlite3)(_pParse.X0)
+ _pParse = (*XParse)(_pWInfo.XpParse)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _pTabList = (*XSrcList)(_pWInfo.XpTabList)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_sqlite3ExprCacheClear(tls, _pParse)
- _i = int32(_pWInfo.X11) - i32(1)
+ _i = int32(_pWInfo.XnLevel) - int32(1)
_0:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _3
}
- _pLevel = (*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(_i)))
- _pLoop = (*XWhereLoop)(_pLevel.X18)
- if int32(_pLevel.X12) == i32(164) {
+ _pLevel = elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), uintptr(_i))
+ _pLoop = (*XWhereLoop)(_pLevel.XpWLoop)
+ if int32(_pLevel.Xop) == int32(164) {
goto _4
}
- _2_addrSeek = i32(0)
- if int32(_pWInfo.X16) != i32(2) || ((_pLoop.X9)&uint32(i32(512))) == uint32(i32(0)) || ((uint32((store69(&_2_pIdx, (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4)).X16)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31))) == 0 || store1(&_2_n, int32((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X3)) <= i32(0) || int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_pIdx.X2)) + 2*uintptr(_2_n)))) < i32(36) {
+ _2_addrSeek = int32(0)
+ if int32(_pWInfo.XeDistinct) != int32(2) || (_pLoop.XwsFlags&uint32(512)) == (0) || ((uint32((store113(&_2_pIdx, (*XIndex)((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex)).XidxType)>>7)<<31)>>31) == 0 || store2(&_2_n, int32((*t101)(unsafe.Pointer(&_pLoop.Xu)).XnIdxCol)) <= int32(0) || int32(*elem50(_2_pIdx.XaiRowLogEst, uintptr(_2_n))) < int32(36) {
goto _9
}
- _3_r1 = (_pParse.X18) + i32(1)
- _3_j = i32(0)
+ _3_r1 = _pParse.XnMem + int32(1)
+ _3_j = int32(0)
_10:
if _3_j >= _2_n {
goto _13
}
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _pLevel.X2, _3_j, _3_r1+_3_j)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _pLevel.XiIdxCur, _3_j, _3_r1+_3_j)
_3_j += 1
goto _10
_13:
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + (_2_n + i32(1))
- sink1(*p)
- }
+ _pParse.XnMem += _2_n + int32(1)
_3_op = func() int32 {
- if int32(_pLevel.X12) == i32(6) {
- return i32(24)
+ if int32(_pLevel.Xop) == int32(6) {
+ return int32(24)
}
- return i32(27)
+ return int32(27)
}()
- _2_addrSeek = _sqlite3VdbeAddOp4Int(tls, _v, _3_op, _pLevel.X2, i32(0), _3_r1, _2_n)
- _sqlite3VdbeAddOp2(tls, _v, i32(13), i32(1), _pLevel.X16)
+ _2_addrSeek = _sqlite3VdbeAddOp4Int(tls, _v, _3_op, _pLevel.XiIdxCur, int32(0), _3_r1, _2_n)
+ _sqlite3VdbeAddOp2(tls, _v, int32(13), int32(1), _pLevel.Xp2)
_9:
- _sqlite3VdbeResolveLabel(tls, _v, _pLevel.X6)
- _sqlite3VdbeAddOp3(tls, _v, int32(_pLevel.X12), _pLevel.X15, _pLevel.X16, int32(_pLevel.X13))
- _sqlite3VdbeChangeP5(tls, _v, uint16(_pLevel.X14))
+ _sqlite3VdbeResolveLabel(tls, _v, _pLevel.XaddrCont)
+ _sqlite3VdbeAddOp3(tls, _v, int32(_pLevel.Xop), _pLevel.Xp1, _pLevel.Xp2, int32(_pLevel.Xp3))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(_pLevel.Xp5))
if _2_addrSeek != 0 {
_sqlite3VdbeJumpHere(tls, _v, _2_addrSeek)
}
goto _17
_4:
- _sqlite3VdbeResolveLabel(tls, _v, _pLevel.X6)
+ _sqlite3VdbeResolveLabel(tls, _v, _pLevel.XaddrCont)
_17:
- if ((_pLoop.X9)&uint32(i32(2048))) == 0 || ((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X0) <= i32(0) {
+ if (_pLoop.XwsFlags&uint32(2048)) == 0 || ((*t114)(unsafe.Pointer(&_pLevel.Xu)).XnIn) <= int32(0) {
goto _19
}
- _sqlite3VdbeResolveLabel(tls, _v, _pLevel.X4)
- *func() **TInLoop {
- _6_j = (*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X0
- return &_6_pIn
- }() = (*TInLoop)(unsafe.Pointer(uintptr((*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))).X1) + 12*uintptr(_6_j-i32(1))))
+ _sqlite3VdbeResolveLabel(tls, _v, _pLevel.XaddrNxt)
+ *func() **TInLoop { _6_j = (*t114)(unsafe.Pointer(&_pLevel.Xu)).XnIn; return &_6_pIn }() = elem115((*TInLoop)((*t114)(unsafe.Pointer(&_pLevel.Xu)).XaInLoop), uintptr(_6_j-int32(1)))
_20:
- if _6_j <= i32(0) {
+ if _6_j <= int32(0) {
goto _23
}
- _sqlite3VdbeJumpHere(tls, _v, (_6_pIn.X1)+i32(1))
- if int32(_6_pIn.X2) != i32(164) {
- _sqlite3VdbeAddOp2(tls, _v, int32(_6_pIn.X2), _6_pIn.X0, _6_pIn.X1)
+ _sqlite3VdbeJumpHere(tls, _v, _6_pIn.XaddrInTop+int32(1))
+ if int32(_6_pIn.XeEndLoopOp) != int32(164) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(_6_pIn.XeEndLoopOp), _6_pIn.XiCur, _6_pIn.XaddrInTop)
}
- _sqlite3VdbeJumpHere(tls, _v, (_6_pIn.X1)-i32(1))
+ _sqlite3VdbeJumpHere(tls, _v, _6_pIn.XaddrInTop-int32(1))
*(*uintptr)(unsafe.Pointer(func() **TInLoop { _6_j -= 1; return &_6_pIn }())) += uintptr(4294967284)
goto _20
_23:
_19:
- _sqlite3VdbeResolveLabel(tls, _v, _pLevel.X3)
- if (_pLevel.X5) != 0 {
- _sqlite3VdbeGoto(tls, _v, _pLevel.X5)
- _sqlite3VdbeComment(tls, _v, str(109620), unsafe.Pointer((*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4).X0))
- _sqlite3VdbeJumpHere(tls, _v, _pLevel.X5)
- _sqlite3VdbeJumpHere(tls, _v, (_pLevel.X5)-i32(2))
+ _sqlite3VdbeResolveLabel(tls, _v, _pLevel.XaddrBrk)
+ if _pLevel.XaddrSkip != 0 {
+ _sqlite3VdbeGoto(tls, _v, _pLevel.XaddrSkip)
+ _sqlite3VdbeComment(tls, _v, str(109648), unsafe.Pointer((*XIndex)((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex).XzName))
+ _sqlite3VdbeJumpHere(tls, _v, _pLevel.XaddrSkip)
+ _sqlite3VdbeJumpHere(tls, _v, _pLevel.XaddrSkip-int32(2))
}
- if (_pLevel.X10) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(48), int32((_pLevel.X9)>>uint(i32(1))), _pLevel.X10)
+ if _pLevel.XaddrLikeRep != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(48), int32(_pLevel.XiLikeRepCntr>>1), _pLevel.XaddrLikeRep)
}
- if (_pLevel.X0) == 0 {
+ if _pLevel.XiLeftJoin == 0 {
goto _27
}
- _11_ws = int32(_pLoop.X9)
- _1_addr = _sqlite3VdbeAddOp1(tls, _v, i32(46), _pLevel.X0)
+ _11_ws = int32(_pLoop.XwsFlags)
+ _1_addr = _sqlite3VdbeAddOp1(tls, _v, int32(46), _pLevel.XiLeftJoin)
func() {
- if (_11_ws&i32(64)) != i32(0) && (_11_ws&i32(512)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135312), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000))), unsafe.Pointer(str(109641)))
+ if (_11_ws&int32(64)) != int32(0) && (_11_ws&int32(512)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135312), unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000), unsafe.Pointer(str(109669)))
crt.X__builtin_abort(tls)
}
}()
- if (_11_ws & i32(64)) == i32(0) {
- _sqlite3VdbeAddOp1(tls, _v, i32(126), (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2)))))+68*uintptr(_i))).X11)
+ if (_11_ws & int32(64)) == int32(0) {
+ _sqlite3VdbeAddOp1(tls, _v, int32(126), elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_i)).XiCursor)
}
- if (_11_ws&i32(512)) != 0 || ((_11_ws&i32(8192)) != 0 && ((*XIndex)(*(*unsafe.Pointer)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17)))))) != nil)) {
- _sqlite3VdbeAddOp1(tls, _v, i32(126), _pLevel.X2)
+ if (_11_ws&int32(512)) != 0 || ((_11_ws&int32(8192)) != 0 && ((*(*unsafe.Pointer)(unsafe.Pointer(&_pLevel.Xu))) != nil)) {
+ _sqlite3VdbeAddOp1(tls, _v, int32(126), _pLevel.XiIdxCur)
}
- if int32(_pLevel.X12) == i32(52) {
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _pLevel.X15, _pLevel.X7)
+ if int32(_pLevel.Xop) == int32(52) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _pLevel.Xp1, _pLevel.XaddrFirst)
goto _36
}
- _sqlite3VdbeGoto(tls, _v, _pLevel.X7)
+ _sqlite3VdbeGoto(tls, _v, _pLevel.XaddrFirst)
_36:
_sqlite3VdbeJumpHere(tls, _v, _1_addr)
_27:
_i -= 1
goto _0
_3:
- _sqlite3VdbeResolveLabel(tls, _v, _pWInfo.X8)
+ _sqlite3VdbeResolveLabel(tls, _v, _pWInfo.XiBreak)
func() {
- if int32(_pWInfo.X11) > (_pTabList.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135337), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000))), unsafe.Pointer(str(109693)))
+ if int32(_pWInfo.XnLevel) > _pTabList.XnSrc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135337), unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000), unsafe.Pointer(str(109721)))
crt.X__builtin_abort(tls)
}
}()
- *func() **XWhereLevel { _i = i32(0); return &_pLevel }() = (*XWhereLevel)(unsafe.Pointer((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24)))))
+ *func() **XWhereLevel { _i = int32(0); return &_pLevel }() = (*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa))
_39:
- if _i >= int32(_pWInfo.X11) {
+ if _i >= int32(_pWInfo.XnLevel) {
goto _42
}
_16_pIdx = nil
- _16_pTabItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(_pLevel.X11)))
- _16_pTab = (*XTable)(_16_pTabItem.X4)
+ _16_pTabItem = elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), uintptr(_pLevel.XiFrom))
+ _16_pTab = (*XTable)(_16_pTabItem.XpTab)
func() {
if _16_pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135344), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000))), unsafe.Pointer(str(43594)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135344), unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000), unsafe.Pointer(str(43549)))
crt.X__builtin_abort(tls)
}
}()
- _pLoop = (*XWhereLoop)(_pLevel.X18)
- if ((uint32(((*t28)(unsafe.Pointer(&(_16_pTabItem.X9))).X1)>>uint(i32(4))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- _translateColumnToCopy(tls, _pParse, _pLevel.X8, _pLevel.X1, _16_pTabItem.X8, i32(0))
+ _pLoop = (*XWhereLoop)(_pLevel.XpWLoop)
+ if ((uint32((_16_pTabItem.Xfg.XnotIndexed)>>4) << 31) >> 31) != 0 {
+ _translateColumnToCopy(tls, _pParse, _pLevel.XaddrBody, _pLevel.XiTabCur, _16_pTabItem.XregResult, int32(0))
goto _40
}
- if ((_pLoop.X9) & uint32(i32(576))) != 0 {
- _16_pIdx = (*XIndex)((*t61)(unsafe.Pointer((*t62)(unsafe.Pointer(&(_pLoop.X8))))).X4)
+ if (_pLoop.XwsFlags & uint32(576)) != 0 {
+ _16_pIdx = (*XIndex)((*t101)(unsafe.Pointer(&_pLoop.Xu)).XpIndex)
goto _48
}
- if ((_pLoop.X9) & uint32(i32(8192))) != 0 {
- _16_pIdx = (*XIndex)(*(*unsafe.Pointer)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_pLevel.X17))))))
+ if (_pLoop.XwsFlags & uint32(8192)) != 0 {
+ _16_pIdx = (*XIndex)(*(*unsafe.Pointer)(unsafe.Pointer(&_pLevel.Xu)))
}
_48:
- if _16_pIdx == nil || int32(_pWInfo.X14) != i32(0) && (((*XTable)(_16_pIdx.X3).X9)&uint32(i32(32))) == uint32(i32(0)) || (_db.X17) != 0 {
+ if _16_pIdx == nil || int32(_pWInfo.XeOnePass) != int32(0) && (((*XTable)(_16_pIdx.XpTable).XtabFlags)&uint32(32)) == (0) || _db.XmallocFailed != 0 {
goto _52
}
_16_last = _sqlite3VdbeCurrentAddr(tls, _v)
- _16_k = _pLevel.X8
+ _16_k = _pLevel.XaddrBody
_16_pOp = _sqlite3VdbeGetOp(tls, _v, _16_k)
_53:
if _16_k >= _16_last {
goto _56
}
- if (_16_pOp.X3) != (_pLevel.X1) {
+ if _16_pOp.Xp1 != _pLevel.XiTabCur {
goto _54
}
- if int32(_16_pOp.X0) != i32(99) {
+ if int32(_16_pOp.Xopcode) != int32(99) {
goto _58
}
- _22_x = _16_pOp.X4
+ _22_x = _16_pOp.Xp2
func() {
- if (*XTable)(_16_pIdx.X3) != _16_pTab {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135385), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000))), unsafe.Pointer(str(109724)))
+ if (*XTable)(_16_pIdx.XpTable) != _16_pTab {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135385), unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000), unsafe.Pointer(str(109752)))
crt.X__builtin_abort(tls)
}
}()
- if ((_16_pTab.X9) & uint32(i32(32))) != uint32(i32(0)) {
+ if (_16_pTab.XtabFlags & uint32(32)) != (0) {
_23_pPk = _sqlite3PrimaryKeyIndex(tls, _16_pTab)
- _22_x = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_23_pPk.X1)) + 2*uintptr(_22_x))))
+ _22_x = int32(*elem50(_23_pPk.XaiColumn, uintptr(_22_x)))
func() {
- if _22_x < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135389), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000))), unsafe.Pointer(str(109743)))
+ if _22_x < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135389), unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000), unsafe.Pointer(str(109771)))
crt.X__builtin_abort(tls)
}
}()
}
_22_x = int32(_sqlite3ColumnOfIndex(tls, _16_pIdx, int16(_22_x)))
- if _22_x >= i32(0) {
- *(*int32)(unsafe.Pointer(&(_16_pOp.X4))) = _22_x
- *(*int32)(unsafe.Pointer(&(_16_pOp.X3))) = _pLevel.X2
+ if _22_x >= int32(0) {
+ _16_pOp.Xp2 = _22_x
+ _16_pOp.Xp1 = _pLevel.XiIdxCur
}
func() {
- if ((_pLoop.X9)&uint32(i32(64))) != uint32(i32(0)) && _22_x < i32(0) && (_pWInfo.X14) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(135396), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000))), unsafe.Pointer(str(109748)))
+ if (_pLoop.XwsFlags&uint32(64)) != (0) && _22_x < int32(0) && _pWInfo.XeOnePass == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(135396), unsafe.Pointer(&_sqlite3WhereEndØ00__func__Ø000), unsafe.Pointer(str(109776)))
crt.X__builtin_abort(tls)
}
}()
goto _72
_58:
- if int32(_16_pOp.X0) == i32(125) {
- *(*int32)(unsafe.Pointer(&(_16_pOp.X3))) = _pLevel.X2
- *(*uint8)(unsafe.Pointer(&(_16_pOp.X0))) = uint8(i32(131))
+ if int32(_16_pOp.Xopcode) == int32(125) {
+ _16_pOp.Xp1 = _pLevel.XiIdxCur
+ _16_pOp.Xopcode = uint8(131)
goto _72
}
- if int32(_16_pOp.X0) == i32(23) {
- *(*int32)(unsafe.Pointer(&(_16_pOp.X3))) = _pLevel.X2
+ if int32(_16_pOp.Xopcode) == int32(23) {
+ _16_pOp.Xp1 = _pLevel.XiIdxCur
}
_72:
_54:
@@ -90636,105 +91677,117 @@ _40:
*(*uintptr)(unsafe.Pointer(func() **XWhereLevel { _i += 1; return &_pLevel }())) += uintptr(76)
goto _39
_42:
- *(*uint32)(unsafe.Pointer(&(_pParse.X42))) = uint32(_pWInfo.X9)
+ _pParse.XnQueryLoop = uint32(_pWInfo.XsavedNQueryLoop)
_whereInfoFree(tls, _db, _pWInfo)
}
var _sqlite3WhereEndØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WhereEndØ00__func__Ø000[0], str(109813), 16)
+ crt.Xstrncpy(nil, &_sqlite3WhereEndØ00__func__Ø000[0], str(109841), 16)
}
-// Free a WhereInfo structure
+// C comment
+// /*
+// ** Free a WhereInfo structure
+// */
func _whereInfoFree(tls *crt.TLS, _db *Xsqlite3, _pWInfo *XWhereInfo) {
var _1_i int32
var _4_p *XWhereLoop
var _2_pLevel *XWhereLevel
if func() int32 {
if _pWInfo != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(132240), unsafe.Pointer((*int8)(unsafe.Pointer(&_whereInfoFreeØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(132240), unsafe.Pointer(&_whereInfoFreeØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _2
}
- _1_i = i32(0)
+ _1_i = int32(0)
_3:
- if _1_i >= int32(_pWInfo.X11) {
+ if _1_i >= int32(_pWInfo.XnLevel) {
goto _6
}
- _2_pLevel = (*XWhereLevel)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]XWhereLevel)(unsafe.Pointer(&(_pWInfo.X24))))) + 76*uintptr(_1_i)))
- if ((*XWhereLoop)(_2_pLevel.X18) != nil) && ((((*XWhereLoop)(_2_pLevel.X18).X9) & uint32(i32(2048))) != 0) {
- _sqlite3DbFree(tls, _db, (*T_ht)(unsafe.Pointer((*t70)(unsafe.Pointer(&(_2_pLevel.X17))))).X1)
+ _2_pLevel = elem99((*XWhereLevel)(unsafe.Pointer(&_pWInfo.Xa)), uintptr(_1_i))
+ if (_2_pLevel.XpWLoop != nil) && ((((*XWhereLoop)(_2_pLevel.XpWLoop).XwsFlags) & uint32(2048)) != 0) {
+ _sqlite3DbFree(tls, _db, (*t114)(unsafe.Pointer(&_2_pLevel.Xu)).XaInLoop)
}
_1_i += 1
goto _3
_6:
- _sqlite3WhereClauseClear(tls, (*XWhereClause)(unsafe.Pointer(&(_pWInfo.X22))))
+ _sqlite3WhereClauseClear(tls, &_pWInfo.XsWC)
_9:
- if (*XWhereLoop)(_pWInfo.X19) != nil {
- _4_p = (*XWhereLoop)(_pWInfo.X19)
- *(**XWhereLoop)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pWInfo.X19))))) = (*XWhereLoop)(_4_p.X14)
+ if _pWInfo.XpLoops != nil {
+ _4_p = (*XWhereLoop)(_pWInfo.XpLoops)
+ *(**XWhereLoop)(unsafe.Pointer(&_pWInfo.XpLoops)) = (*XWhereLoop)(_4_p.XpNextLoop)
_whereLoopDelete(tls, _db, _4_p)
goto _9
}
- _sqlite3DbFreeNN(tls, _db, (unsafe.Pointer)(_pWInfo))
+ _sqlite3DbFreeNN(tls, _db, unsafe.Pointer(_pWInfo))
_2:
}
var _whereInfoFreeØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_whereInfoFreeØ00__func__Ø000[0], str(109829), 14)
+ crt.Xstrncpy(nil, &_whereInfoFreeØ00__func__Ø000[0], str(109857), 14)
}
-// Deallocate a WhereClause structure. The WhereClause structure
-// itself is not freed. This routine is the inverse of
-// sqlite3WhereClauseInit().
+// C comment
+// /*
+// ** Deallocate a WhereClause structure. The WhereClause structure
+// ** itself is not freed. This routine is the inverse of
+// ** sqlite3WhereClauseInit().
+// */
func _sqlite3WhereClauseClear(tls *crt.TLS, _pWC *XWhereClause) {
var _i int32
var _db *Xsqlite3
var _a *XWhereTerm
- _db = (*Xsqlite3)((*XParse)((*XWhereInfo)(_pWC.X0).X0).X0)
- *func() **XWhereTerm { _i = (_pWC.X3) - i32(1); return &_a }() = (*XWhereTerm)(_pWC.X5)
+ _db = (*Xsqlite3)((*XParse)((*XWhereInfo)(_pWC.XpWInfo).XpParse).Xdb)
+ *func() **XWhereTerm { _i = _pWC.XnTerm - int32(1); return &_a }() = (*XWhereTerm)(_pWC.Xa)
_0:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _3
}
- if (int32(_a.X3) & i32(1)) != 0 {
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_a.X0))
+ if (int32(_a.XwtFlags) & int32(1)) != 0 {
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_a.XpExpr))
}
- if (int32(_a.X3) & i32(16)) != 0 {
- _whereOrInfoDelete(tls, _db, (*XWhereOrInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_a.X10)))))))
+ if (int32(_a.XwtFlags) & int32(16)) != 0 {
+ _whereOrInfoDelete(tls, _db, (*XWhereOrInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_a.Xu))))
goto _7
}
- if (int32(_a.X3) & i32(32)) != 0 {
- _whereAndInfoDelete(tls, _db, (*XWhereAndInfo)(*(*unsafe.Pointer)(unsafe.Pointer((*t63)(unsafe.Pointer(&(_a.X10)))))))
+ if (int32(_a.XwtFlags) & int32(32)) != 0 {
+ _whereAndInfoDelete(tls, _db, (*XWhereAndInfo)(*(*unsafe.Pointer)(unsafe.Pointer(&_a.Xu))))
}
_7:
*(*uintptr)(unsafe.Pointer(func() **XWhereTerm { _i -= 1; return &_a }())) += uintptr(48)
goto _0
_3:
- if (*XWhereTerm)(_pWC.X5) != (*XWhereTerm)(unsafe.Pointer((*[8]XWhereTerm)(unsafe.Pointer(&(_pWC.X6))))) {
- _sqlite3DbFree(tls, _db, _pWC.X5)
+ if (*XWhereTerm)(_pWC.Xa) != (*XWhereTerm)(unsafe.Pointer(&_pWC.XaStatic)) {
+ _sqlite3DbFree(tls, _db, _pWC.Xa)
}
}
-// Deallocate all memory associated with a WhereOrInfo object.
+// C comment
+// /*
+// ** Deallocate all memory associated with a WhereOrInfo object.
+// */
func _whereOrInfoDelete(tls *crt.TLS, _db *Xsqlite3, _p *XWhereOrInfo) {
- _sqlite3WhereClauseClear(tls, (*XWhereClause)(unsafe.Pointer(&(_p.X0))))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p))
+ _sqlite3WhereClauseClear(tls, &_p.Xwc)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p))
}
-// Deallocate all memory associated with a WhereAndInfo object.
+// C comment
+// /*
+// ** Deallocate all memory associated with a WhereAndInfo object.
+// */
func _whereAndInfoDelete(tls *crt.TLS, _db *Xsqlite3, _p *XWhereAndInfo) {
- _sqlite3WhereClauseClear(tls, (*XWhereClause)(unsafe.Pointer(&(_p.X0))))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p))
+ _sqlite3WhereClauseClear(tls, &_p.Xwc)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p))
}
var _sqlite3WhereCodeOneLoopStartØ00aStepØ003 [2]uint8
@@ -90749,108 +91802,131 @@ func init() {
_sqlite3WhereCodeOneLoopStartØ00aStartØ004 = [2]uint8{37, 33}
}
-// Return the estimated number of output rows from a WHERE clause
+// C comment
+// /*
+// ** Return the estimated number of output rows from a WHERE clause
+// */
func _sqlite3WhereOutputRowCount(tls *crt.TLS, _pWInfo *XWhereInfo) (r0 int16) {
- return _pWInfo.X21
+ return _pWInfo.XnRowOut
}
-// Return one of the WHERE_DISTINCT_xxxxx values to indicate how this
-// WHERE clause returns outputs for DISTINCT processing.
+// C comment
+// /*
+// ** Return one of the WHERE_DISTINCT_xxxxx values to indicate how this
+// ** WHERE clause returns outputs for DISTINCT processing.
+// */
func _sqlite3WhereIsDistinct(tls *crt.TLS, _pWInfo *XWhereInfo) (r0 int32) {
- return int32(_pWInfo.X16)
+ return int32(_pWInfo.XeDistinct)
}
-// Return TRUE if the WHERE clause returns rows in ORDER BY order.
-// Return FALSE if the output needs to be sorted.
+// C comment
+// /*
+// ** Return TRUE if the WHERE clause returns rows in ORDER BY order.
+// ** Return FALSE if the output needs to be sorted.
+// */
func _sqlite3WhereIsOrdered(tls *crt.TLS, _pWInfo *XWhereInfo) (r0 int32) {
- return int32(_pWInfo.X12)
-}
-
-// Return TRUE if the innermost loop of the WHERE clause implementation
-// returns rows in ORDER BY order for complete run of the inner loop.
-//
-// Across multiple iterations of outer loops, the output rows need not be
-// sorted. As long as rows are sorted for just the innermost loop, this
-// routine can return TRUE.
+ return int32(_pWInfo.XnOBSat)
+}
+
+// C comment
+// /*
+// ** Return TRUE if the innermost loop of the WHERE clause implementation
+// ** returns rows in ORDER BY order for complete run of the inner loop.
+// **
+// ** Across multiple iterations of outer loops, the output rows need not be
+// ** sorted. As long as rows are sorted for just the innermost loop, this
+// ** routine can return TRUE.
+// */
func _sqlite3WhereOrderedInnerLoop(tls *crt.TLS, _pWInfo *XWhereInfo) (r0 int32) {
- return int32(_pWInfo.X17)
+ return int32(_pWInfo.XbOrderedInnerLoop)
}
-// Return the VDBE address or label to jump to in order to continue
-// immediately with the next row of a WHERE clause.
+// C comment
+// /*
+// ** Return the VDBE address or label to jump to in order to continue
+// ** immediately with the next row of a WHERE clause.
+// */
func _sqlite3WhereContinueLabel(tls *crt.TLS, _pWInfo *XWhereInfo) (r0 int32) {
func() {
- if (_pWInfo.X7) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(130460), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereContinueLabelØ00__func__Ø000))), unsafe.Pointer(str(109843)))
+ if _pWInfo.XiContinue == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(130460), unsafe.Pointer(&_sqlite3WhereContinueLabelØ00__func__Ø000), unsafe.Pointer(str(109871)))
crt.X__builtin_abort(tls)
}
}()
- return _pWInfo.X7
+ return _pWInfo.XiContinue
}
var _sqlite3WhereContinueLabelØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WhereContinueLabelØ00__func__Ø000[0], str(109864), 26)
+ crt.Xstrncpy(nil, &_sqlite3WhereContinueLabelØ00__func__Ø000[0], str(109892), 26)
}
-// Return the VDBE address or label to jump to in order to break
-// out of a WHERE loop.
+// C comment
+// /*
+// ** Return the VDBE address or label to jump to in order to break
+// ** out of a WHERE loop.
+// */
func _sqlite3WhereBreakLabel(tls *crt.TLS, _pWInfo *XWhereInfo) (r0 int32) {
- return _pWInfo.X8
+ return _pWInfo.XiBreak
}
-// Call sqlite3ExprAnalyzeAggregates() for every expression in an
-// expression list. Return the number of errors.
-//
-// If an error is found, the analysis is cut short.
+// C comment
+// /*
+// ** Call sqlite3ExprAnalyzeAggregates() for every expression in an
+// ** expression list. Return the number of errors.
+// **
+// ** If an error is found, the analysis is cut short.
+// */
func _sqlite3ExprAnalyzeAggList(tls *crt.TLS, _pNC *XNameContext, _pList *XExprList) {
var _i int32
var _pItem *TExprList_item
if _pList == nil {
goto _0
}
- *func() *int32 {
- _pItem = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))
- return &_i
- }() = i32(0)
+ *func() *int32 { _pItem = (*TExprList_item)(unsafe.Pointer(&_pList.Xa)); return &_i }() = int32(0)
_1:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _4
}
- _sqlite3ExprAnalyzeAggregates(tls, _pNC, (*XExpr)(_pItem.X0))
+ _sqlite3ExprAnalyzeAggregates(tls, _pNC, (*XExpr)(_pItem.XpExpr))
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i += 1; return &_pItem }())) += uintptr(20)
goto _1
_4:
_0:
}
-// Analyze the pExpr expression looking for aggregate functions and
-// for variables that need to be added to AggInfo object that pNC->pAggInfo
-// points to. Additional entries are made on the AggInfo object as
-// necessary.
-//
-// This routine should only be called after the expression has been
-// analyzed by sqlite3ResolveExprNames().
+// C comment
+// /*
+// ** Analyze the pExpr expression looking for aggregate functions and
+// ** for variables that need to be added to AggInfo object that pNC->pAggInfo
+// ** points to. Additional entries are made on the AggInfo object as
+// ** necessary.
+// **
+// ** This routine should only be called after the expression has been
+// ** analyzed by sqlite3ResolveExprNames().
+// */
func _sqlite3ExprAnalyzeAggregates(tls *crt.TLS, _pNC *XNameContext, _pExpr *XExpr) {
var _w XWalker
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _analyzeAggregate
- *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X2))))) = _analyzeAggregatesInSelect
- *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_w.X6))))))) = _pNC
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _analyzeAggregate
+ *(*func(*crt.TLS, *XWalker, *XSelect) int32)(unsafe.Pointer(&_w.XxSelectCallback)) = _analyzeAggregatesInSelect
+ *(**XNameContext)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_w.Xu)))) = _pNC
func() {
- if (*XSrcList)(_pNC.X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95995), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAnalyzeAggregatesØ00__func__Ø000))), unsafe.Pointer(str(94459)))
+ if (*XSrcList)(_pNC.XpSrcList) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95995), unsafe.Pointer(&_sqlite3ExprAnalyzeAggregatesØ00__func__Ø000), unsafe.Pointer(str(94487)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3WalkExpr(tls, &_w, _pExpr)
- _ = _w
}
-// This is the xExprCallback for a tree walker. It is used to
-// implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates
-// for additional information.
+// C comment
+// /*
+// ** This is the xExprCallback for a tree walker. It is used to
+// ** implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates
+// ** for additional information.
+// */
func _analyzeAggregate(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
var _i, _5_k, _9_j, _9_n int32
var _17_enc uint8
@@ -90864,16 +91940,16 @@ func _analyzeAggregate(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32
var _pAggInfo *XAggInfo
var _4_pCol *TAggInfo_col
var _14_pItem *TAggInfo_func
- _pNC = (*XNameContext)(*(*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6))))))
- _pParse = (*XParse)(_pNC.X0)
- _pSrcList = (*XSrcList)(_pNC.X1)
- _pAggInfo = (*XAggInfo)(_pNC.X3)
- switch int32(_pExpr.X0) {
- case i32(152):
+ _pNC = (*XNameContext)(*(*unsafe.Pointer)(unsafe.Pointer(&_pWalker.Xu)))
+ _pParse = (*XParse)(_pNC.XpParse)
+ _pSrcList = (*XSrcList)(_pNC.XpSrcList)
+ _pAggInfo = (*XAggInfo)(_pNC.XpAggInfo)
+ switch int32(_pExpr.Xop) {
+ case int32(152):
goto _1
- case i32(153):
+ case int32(153):
goto _3
- case i32(154):
+ case int32(154):
goto _1
default:
goto _4
@@ -90882,433 +91958,450 @@ func _analyzeAggregate(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32
_1:
if func() int32 {
if _pSrcList != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95863), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95863), unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _7
}
- _3_pItem = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrcList.X2)))))
- _i = i32(0)
+ _3_pItem = (*TSrcList_item)(unsafe.Pointer(&_pSrcList.Xa))
+ _i = int32(0)
_8:
- if _i >= (_pSrcList.X0) {
+ if _i >= _pSrcList.XnSrc {
goto _11
}
func() {
- if ((_pExpr.X2) & uint32(i32(24576))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95867), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000))), unsafe.Pointer(str(96005)))
+ if (_pExpr.Xflags & uint32(24576)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95867), unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000), unsafe.Pointer(str(96033)))
crt.X__builtin_abort(tls)
}
}()
- if (_pExpr.X8) != (_3_pItem.X11) {
+ if _pExpr.XiTable != _3_pItem.XiCursor {
goto _14
}
- _4_pCol = (*TAggInfo_col)(_pAggInfo.X8)
- _5_k = i32(0)
+ _4_pCol = (*TAggInfo_col)(_pAggInfo.XaCol)
+ _5_k = int32(0)
_15:
- if _5_k >= (_pAggInfo.X9) {
+ if _5_k >= _pAggInfo.XnColumn {
goto _18
}
- if ((_4_pCol.X1) == (_pExpr.X8)) && ((_4_pCol.X2) == int32(_pExpr.X9)) {
+ if (_4_pCol.XiTable == _pExpr.XiTable) && (_4_pCol.XiColumn == int32(_pExpr.XiColumn)) {
goto _18
}
*(*uintptr)(unsafe.Pointer(func() **TAggInfo_col { _5_k += 1; return &_4_pCol }())) += uintptr(24)
goto _15
_18:
- if _5_k < (_pAggInfo.X9) || store1(&_5_k, _addAggInfoColumn(tls, (*Xsqlite3)(_pParse.X0), _pAggInfo)) < i32(0) {
+ if _5_k < _pAggInfo.XnColumn || store2(&_5_k, _addAggInfoColumn(tls, (*Xsqlite3)(_pParse.Xdb), _pAggInfo)) < int32(0) {
goto _22
}
- _4_pCol = (*TAggInfo_col)(unsafe.Pointer(uintptr(_pAggInfo.X8) + 24*uintptr(_5_k)))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_4_pCol.X0))))) = (*XTable)(_pExpr.X14)
- *(*int32)(unsafe.Pointer(&(_4_pCol.X1))) = _pExpr.X8
- *(*int32)(unsafe.Pointer(&(_4_pCol.X2))) = int32(_pExpr.X9)
- *(*int32)(unsafe.Pointer(&(_4_pCol.X4))) = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- *(*int32)(unsafe.Pointer(&(_4_pCol.X3))) = i32(-1)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_4_pCol.X5))))) = _pExpr
- if (*XExprList)(_pAggInfo.X7) == nil {
+ _4_pCol = elem66((*TAggInfo_col)(_pAggInfo.XaCol), uintptr(_5_k))
+ *(**XTable)(unsafe.Pointer(&_4_pCol.XpTab)) = (*XTable)(_pExpr.XpTab)
+ _4_pCol.XiTable = _pExpr.XiTable
+ _4_pCol.XiColumn = int32(_pExpr.XiColumn)
+ _4_pCol.XiMem = preInc2(&_pParse.XnMem, 1)
+ _4_pCol.XiSorterColumn = int32(-1)
+ *(**XExpr)(unsafe.Pointer(&_4_pCol.XpExpr)) = _pExpr
+ if _pAggInfo.XpGroupBy == nil {
goto _23
}
- _9_pGB = (*XExprList)(_pAggInfo.X7)
- _9_pTerm = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_9_pGB.X2)))))
- _9_n = _9_pGB.X0
- _9_j = i32(0)
+ _9_pGB = (*XExprList)(_pAggInfo.XpGroupBy)
+ _9_pTerm = (*TExprList_item)(unsafe.Pointer(&_9_pGB.Xa))
+ _9_n = _9_pGB.XnExpr
+ _9_j = int32(0)
_24:
if _9_j >= _9_n {
goto _27
}
- _10_pE = (*XExpr)(_9_pTerm.X0)
- if ((int32(_10_pE.X0) == i32(152)) && ((_10_pE.X8) == (_pExpr.X8))) && (int32(_10_pE.X9) == int32(_pExpr.X9)) {
- *(*int32)(unsafe.Pointer(&(_4_pCol.X3))) = _9_j
+ _10_pE = (*XExpr)(_9_pTerm.XpExpr)
+ if ((int32(_10_pE.Xop) == int32(152)) && (_10_pE.XiTable == _pExpr.XiTable)) && (int32(_10_pE.XiColumn) == int32(_pExpr.XiColumn)) {
+ _4_pCol.XiSorterColumn = _9_j
goto _27
}
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _9_j += 1; return &_9_pTerm }())) += uintptr(20)
goto _24
_27:
_23:
- if (_4_pCol.X3) < i32(0) {
- *(*int32)(unsafe.Pointer(&(_4_pCol.X3))) = postInc1((*int32)(unsafe.Pointer(&(_pAggInfo.X4))), int32(1))
+ if _4_pCol.XiSorterColumn < int32(0) {
+ _4_pCol.XiSorterColumn = postInc2(&_pAggInfo.XnSortingColumn, 1)
}
_22:
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(131072))
- sink5(*p)
- }
- *(**XAggInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X13))))) = _pAggInfo
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(154))
- *(*int16)(unsafe.Pointer(&(_pExpr.X10))) = int16(_5_k)
+ _pExpr.Xflags |= uint32(131072)
+ *(**XAggInfo)(unsafe.Pointer(&_pExpr.XpAggInfo)) = _pAggInfo
+ _pExpr.Xop = uint8(154)
+ _pExpr.XiAgg = int16(_5_k)
goto _11
_14:
*(*uintptr)(unsafe.Pointer(func() **TSrcList_item { _i += 1; return &_3_pItem }())) += uintptr(68)
goto _8
_11:
_7:
- return i32(1)
+ return int32(1)
_3:
- if (int32(_pNC.X7)&i32(8)) != i32(0) || (_pWalker.X4) != int32(_pExpr.X12) {
+ if (int32(_pNC.XncFlags)&int32(8)) != int32(0) || _pWalker.XwalkerDepth != int32(_pExpr.Xop2) {
goto _33
}
- _14_pItem = (*TAggInfo_func)(_pAggInfo.X11)
- _i = i32(0)
+ _14_pItem = (*TAggInfo_func)(_pAggInfo.XaFunc)
+ _i = int32(0)
_34:
- if _i >= (_pAggInfo.X12) {
+ if _i >= _pAggInfo.XnFunc {
goto _37
}
- if _sqlite3ExprCompare(tls, (*XExpr)(_14_pItem.X0), _pExpr, i32(-1)) == i32(0) {
+ if _sqlite3ExprCompare(tls, (*XExpr)(_14_pItem.XpExpr), _pExpr, int32(-1)) == int32(0) {
goto _37
}
*(*uintptr)(unsafe.Pointer(func() **TAggInfo_func { _i += 1; return &_14_pItem }())) += uintptr(16)
goto _34
_37:
- if _i < (_pAggInfo.X12) {
+ if _i < _pAggInfo.XnFunc {
goto _39
}
- _17_enc = (*Xsqlite3)(_pParse.X0).X14
- _i = _addAggInfoFunc(tls, (*Xsqlite3)(_pParse.X0), _pAggInfo)
- if _i < i32(0) {
+ _17_enc = (*Xsqlite3)(_pParse.Xdb).Xenc
+ _i = _addAggInfoFunc(tls, (*Xsqlite3)(_pParse.Xdb), _pAggInfo)
+ if _i < int32(0) {
goto _40
}
func() {
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95945), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000))), unsafe.Pointer(str(42778)))
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95945), unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000), unsafe.Pointer(str(42733)))
crt.X__builtin_abort(tls)
}
}()
- _14_pItem = (*TAggInfo_func)(unsafe.Pointer(uintptr(_pAggInfo.X11) + 16*uintptr(_i)))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_14_pItem.X0))))) = _pExpr
- *(*int32)(unsafe.Pointer(&(_14_pItem.X2))) = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ _14_pItem = elem67((*TAggInfo_func)(_pAggInfo.XaFunc), uintptr(_i))
+ *(**XExpr)(unsafe.Pointer(&_14_pItem.XpExpr)) = _pExpr
+ _14_pItem.XiMem = preInc2(&_pParse.XnMem, 1)
func() {
- if ((_pExpr.X2) & uint32(i32(1024))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95949), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000))), unsafe.Pointer(str(42524)))
+ if (_pExpr.Xflags & uint32(1024)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95949), unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000), unsafe.Pointer(str(42479)))
crt.X__builtin_abort(tls)
}
}()
- *(**XFuncDef)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_14_pItem.X1))))) = _sqlite3FindFunction(tls, (*Xsqlite3)(_pParse.X0), *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3))))), func() int32 {
- if (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))) != nil {
- return ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6)))))).X0)
+ *(**XFuncDef)(unsafe.Pointer(&_14_pItem.XpFunc)) = _sqlite3FindFunction(tls, (*Xsqlite3)(_pParse.Xdb), *(**int8)(unsafe.Pointer(&_pExpr.Xu)), func() int32 {
+ if (*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))) != nil {
+ return ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx))).XnExpr)
}
- return i32(0)
- }(), _17_enc, uint8(i32(0)))
- if ((_pExpr.X2) & uint32(i32(16))) != 0 {
- *(*int32)(unsafe.Pointer(&(_14_pItem.X3))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ return int32(0)
+ }(), _17_enc, 0)
+ if (_pExpr.Xflags & uint32(16)) != 0 {
+ _14_pItem.XiDistinct = postInc2(&_pParse.XnTab, 1)
goto _48
}
- *(*int32)(unsafe.Pointer(&(_14_pItem.X3))) = i32(-1)
+ _14_pItem.XiDistinct = int32(-1)
_48:
_40:
_39:
func() {
- if ((_pExpr.X2) & uint32(i32(24576))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95962), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000))), unsafe.Pointer(str(96005)))
+ if (_pExpr.Xflags & uint32(24576)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95962), unsafe.Pointer(&_analyzeAggregateØ00__func__Ø000), unsafe.Pointer(str(96033)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(131072))
- sink5(*p)
- }
- *(*int16)(unsafe.Pointer(&(_pExpr.X10))) = int16(_i)
- *(**XAggInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X13))))) = _pAggInfo
- return i32(1)
+ _pExpr.Xflags |= uint32(131072)
+ _pExpr.XiAgg = int16(_i)
+ *(**XAggInfo)(unsafe.Pointer(&_pExpr.XpAggInfo)) = _pAggInfo
+ return int32(1)
_33:
- return i32(0)
+ return int32(0)
_4:
- return i32(0)
+ return int32(0)
}
var _analyzeAggregateØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_analyzeAggregateØ00__func__Ø000[0], str(109890), 17)
+ crt.Xstrncpy(nil, &_analyzeAggregateØ00__func__Ø000[0], str(109918), 17)
}
-// Add a new element to the pAggInfo->aCol[] array. Return the index of
-// the new element. Return a negative number if malloc fails.
+// C comment
+// /*
+// ** Add a new element to the pAggInfo->aCol[] array. Return the index of
+// ** the new element. Return a negative number if malloc fails.
+// */
func _addAggInfoColumn(tls *crt.TLS, _db *Xsqlite3, _pInfo *XAggInfo) (r0 int32) {
var _i int32
- *(**TAggInfo_col)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pInfo.X8))))) = (*TAggInfo_col)(_sqlite3ArrayAllocate(tls, _db, _pInfo.X8, int32(u32(24)), (*int32)(unsafe.Pointer(&(_pInfo.X9))), &_i))
+ *(**TAggInfo_col)(unsafe.Pointer(&_pInfo.XaCol)) = (*TAggInfo_col)(_sqlite3ArrayAllocate(tls, _db, _pInfo.XaCol, int32(24), &_pInfo.XnColumn, &_i))
return _i
}
-// pArray is a pointer to an array of objects. Each object in the
-// array is szEntry bytes in size. This routine uses sqlite3DbRealloc()
-// to extend the array so that there is space for a new object at the end.
-//
-// When this function is called, *pnEntry contains the current size of
-// the array (in entries - so the allocation is ((*pnEntry) * szEntry) bytes
-// in total).
-//
-// If the realloc() is successful (i.e. if no OOM condition occurs), the
-// space allocated for the new object is zeroed, *pnEntry updated to
-// reflect the new size of the array and a pointer to the new allocation
-// returned. *pIdx is set to the index of the new array entry in this case.
-//
-// Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains
-// unchanged and a copy of pArray returned.
+// C comment
+// /*
+// ** pArray is a pointer to an array of objects. Each object in the
+// ** array is szEntry bytes in size. This routine uses sqlite3DbRealloc()
+// ** to extend the array so that there is space for a new object at the end.
+// **
+// ** When this function is called, *pnEntry contains the current size of
+// ** the array (in entries - so the allocation is ((*pnEntry) * szEntry) bytes
+// ** in total).
+// **
+// ** If the realloc() is successful (i.e. if no OOM condition occurs), the
+// ** space allocated for the new object is zeroed, *pnEntry updated to
+// ** reflect the new size of the array and a pointer to the new allocation
+// ** returned. *pIdx is set to the index of the new array entry in this case.
+// **
+// ** Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains
+// ** unchanged and a copy of pArray returned.
+// */
func _sqlite3ArrayAllocate(tls *crt.TLS, _db *Xsqlite3, _pArray unsafe.Pointer, _szEntry int32, _pnEntry *int32, _pIdx *int32) (r0 unsafe.Pointer) {
var _n, _1_sz int32
var _z *int8
var _1_pNew unsafe.Pointer
_n = *_pnEntry
- if (_n & (_n - i32(1))) != i32(0) {
+ if (_n & (_n - int32(1))) != int32(0) {
goto _0
}
_1_sz = func() int32 {
- if _n == i32(0) {
- return i32(1)
+ if _n == int32(0) {
+ return int32(1)
}
- return (i32(2) * _n)
+ return (int32(2) * _n)
}()
_1_pNew = _sqlite3DbRealloc(tls, _db, _pArray, uint64(_1_sz*_szEntry))
if _1_pNew == nil {
- *_pIdx = i32(-1)
+ *_pIdx = int32(-1)
return _pArray
}
_pArray = _1_pNew
_0:
_z = (*int8)(_pArray)
- crt.Xmemset(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_n*_szEntry)))), i32(0), uint32(_szEntry))
+ crt.Xmemset(tls, unsafe.Pointer(elem1(_z, uintptr(_n*_szEntry))), int32(0), uint32(_szEntry))
*_pIdx = _n
*_pnEntry += 1
return _pArray
}
-// Add a new element to the pAggInfo->aFunc[] array. Return the index of
-// the new element. Return a negative number if malloc fails.
+// C comment
+// /*
+// ** Add a new element to the pAggInfo->aFunc[] array. Return the index of
+// ** the new element. Return a negative number if malloc fails.
+// */
func _addAggInfoFunc(tls *crt.TLS, _db *Xsqlite3, _pInfo *XAggInfo) (r0 int32) {
var _i int32
- *(**TAggInfo_func)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pInfo.X11))))) = (*TAggInfo_func)(_sqlite3ArrayAllocate(tls, _db, _pInfo.X11, int32(u32(16)), (*int32)(unsafe.Pointer(&(_pInfo.X12))), &_i))
+ *(**TAggInfo_func)(unsafe.Pointer(&_pInfo.XaFunc)) = (*TAggInfo_func)(_sqlite3ArrayAllocate(tls, _db, _pInfo.XaFunc, int32(16), &_pInfo.XnFunc, &_i))
return _i
}
func _analyzeAggregatesInSelect(tls *crt.TLS, _pWalker *XWalker, _pSelect *XSelect) (r0 int32) {
- return i32(0)
+ return int32(0)
}
var _sqlite3ExprAnalyzeAggregatesØ00__func__Ø000 [29]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprAnalyzeAggregatesØ00__func__Ø000[0], str(109907), 29)
-}
-
-// Transfer eligible terms from the HAVING clause of a query, which is
-// processed after grouping, to the WHERE clause, which is processed before
-// grouping. For example, the query:
-//
-// SELECT * FROM <tables> WHERE a=? GROUP BY b HAVING b=? AND c=?
-//
-// can be rewritten as:
-//
-// SELECT * FROM <tables> WHERE a=? AND b=? GROUP BY b HAVING c=?
-//
-// A term of the HAVING expression is eligible for transfer if it consists
-// entirely of constants and expressions that are also GROUP BY terms that
-// use the "BINARY" collation sequence.
+ crt.Xstrncpy(nil, &_sqlite3ExprAnalyzeAggregatesØ00__func__Ø000[0], str(109935), 29)
+}
+
+// C comment
+// /*
+// ** Transfer eligible terms from the HAVING clause of a query, which is
+// ** processed after grouping, to the WHERE clause, which is processed before
+// ** grouping. For example, the query:
+// **
+// ** SELECT * FROM <tables> WHERE a=? GROUP BY b HAVING b=? AND c=?
+// **
+// ** can be rewritten as:
+// **
+// ** SELECT * FROM <tables> WHERE a=? AND b=? GROUP BY b HAVING c=?
+// **
+// ** A term of the HAVING expression is eligible for transfer if it consists
+// ** entirely of constants and expressions that are also GROUP BY terms that
+// ** use the "BINARY" collation sequence.
+// */
func _havingToWhere(tls *crt.TLS, _pParse *XParse, _pGroupBy *XExprList, _pHaving *XExpr, _ppWhere **XExpr) {
var _sWalker XWalker
var _sCtx THavingToWhereCtx
- *(***XExpr)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_sCtx.X0))))) = _ppWhere
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sCtx.X1))))) = _pGroupBy
- crt.Xmemset(tls, (unsafe.Pointer)(&_sWalker), i32(0), u32(28))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sWalker.X0))))) = _pParse
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_sWalker.X1))))) = _havingToWhereExprCb
- *(**THavingToWhereCtx)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_sWalker.X6))))))) = &_sCtx
+ *(***XExpr)(unsafe.Pointer(&_sCtx.XppWhere)) = _ppWhere
+ *(**XExprList)(unsafe.Pointer(&_sCtx.XpGroupBy)) = _pGroupBy
+ crt.Xmemset(tls, unsafe.Pointer(&_sWalker), int32(0), uint32(28))
+ *(**XParse)(unsafe.Pointer(&_sWalker.XpParse)) = _pParse
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_sWalker.XxExprCallback)) = _havingToWhereExprCb
+ *(**THavingToWhereCtx)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_sWalker.Xu)))) = &_sCtx
_sqlite3WalkExpr(tls, &_sWalker, _pHaving)
- _ = _sCtx
- _ = _sWalker
-}
-
-// sqlite3WalkExpr() callback used by havingToWhere().
-//
-// If the node passed to the callback is a TK_AND node, return
-// WRC_Continue to tell sqlite3WalkExpr() to iterate through child nodes.
-//
-// Otherwise, return WRC_Prune. In this case, also check if the
-// sub-expression matches the criteria for being moved to the WHERE
-// clause. If so, add it to the WHERE clause and replace the sub-expression
-// within the HAVING expression with a constant "1".
+}
+
+// C comment
+// /*
+// ** sqlite3WalkExpr() callback used by havingToWhere().
+// **
+// ** If the node passed to the callback is a TK_AND node, return
+// ** WRC_Continue to tell sqlite3WalkExpr() to iterate through child nodes.
+// **
+// ** Otherwise, return WRC_Prune. In this case, also check if the
+// ** sub-expression matches the criteria for being moved to the WHERE
+// ** clause. If so, add it to the WHERE clause and replace the sub-expression
+// ** within the HAVING expression with a constant "1".
+// */
func _havingToWhereExprCb(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
var _2_db *Xsqlite3
var _2_pNew, _3_pWhere *XExpr
var _4_t XExpr
var _1_p *THavingToWhereCtx
- if int32(_pExpr.X0) == i32(71) {
+ if int32(_pExpr.Xop) == int32(71) {
goto _0
}
- _1_p = (*THavingToWhereCtx)(*(*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6))))))
- if _sqlite3ExprIsConstantOrGroupBy(tls, (*XParse)(_pWalker.X0), _pExpr, (*XExprList)(_1_p.X1)) == 0 {
+ _1_p = (*THavingToWhereCtx)(*(*unsafe.Pointer)(unsafe.Pointer(&_pWalker.Xu)))
+ if _sqlite3ExprIsConstantOrGroupBy(tls, (*XParse)(_pWalker.XpParse), _pExpr, (*XExprList)(_1_p.XpGroupBy)) == 0 {
goto _1
}
- _2_db = (*Xsqlite3)((*XParse)(_pWalker.X0).X0)
- _2_pNew = _sqlite3ExprAlloc(tls, _2_db, i32(134), (*XToken)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3IntTokens))+8*uintptr(i32(1)))), i32(0))
+ _2_db = (*Xsqlite3)((*XParse)(_pWalker.XpParse).Xdb)
+ _2_pNew = _sqlite3ExprAlloc(tls, _2_db, int32(134), elem56((*XToken)(unsafe.Pointer(&_sqlite3IntTokens)), uintptr(1)), int32(0))
if _2_pNew != nil {
- _3_pWhere = *(**XExpr)(unsafe.Pointer(_1_p.X0))
+ _3_pWhere = *(**XExpr)(unsafe.Pointer(_1_p.XppWhere))
_4_t = *_2_pNew
*_2_pNew = *_pExpr
*_pExpr = _4_t
_2_pNew = _sqlite3ExprAnd(tls, _2_db, _3_pWhere, _2_pNew)
- *(**XExpr)(unsafe.Pointer(_1_p.X0)) = _2_pNew
+ *(**XExpr)(unsafe.Pointer(_1_p.XppWhere)) = _2_pNew
}
_1:
- return i32(1)
+ return int32(1)
_0:
- return i32(0)
-}
-
-// Walk the expression tree passed as the first argument. Return non-zero
-// if the expression consists entirely of constants or copies of terms
-// in pGroupBy that sort with the BINARY collation sequence.
-//
-// This routine is used to determine if a term of the HAVING clause can
-// be promoted into the WHERE clause. In order for such a promotion to work,
-// the value of the HAVING clause term must be the same for all members of
-// a "group". The requirement that the GROUP BY term must be BINARY
-// assumes that no other collating sequence will have a finer-grained
-// grouping than binary. In other words (A=B COLLATE binary) implies
-// A=B in every other collating sequence. The requirement that the
-// GROUP BY be BINARY is stricter than necessary. It would also work
-// to promote HAVING clauses that use the same alternative collating
-// sequence as the GROUP BY term, but that is much harder to check,
-// alternative collating sequences are uncommon, and this is only an
-// optimization, so we take the easy way out and simply require the
-// GROUP BY to use the BINARY collating sequence.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Walk the expression tree passed as the first argument. Return non-zero
+// ** if the expression consists entirely of constants or copies of terms
+// ** in pGroupBy that sort with the BINARY collation sequence.
+// **
+// ** This routine is used to determine if a term of the HAVING clause can
+// ** be promoted into the WHERE clause. In order for such a promotion to work,
+// ** the value of the HAVING clause term must be the same for all members of
+// ** a "group". The requirement that the GROUP BY term must be BINARY
+// ** assumes that no other collating sequence will have a finer-grained
+// ** grouping than binary. In other words (A=B COLLATE binary) implies
+// ** A=B in every other collating sequence. The requirement that the
+// ** GROUP BY be BINARY is stricter than necessary. It would also work
+// ** to promote HAVING clauses that use the same alternative collating
+// ** sequence as the GROUP BY term, but that is much harder to check,
+// ** alternative collating sequences are uncommon, and this is only an
+// ** optimization, so we take the easy way out and simply require the
+// ** GROUP BY to use the BINARY collating sequence.
+// */
func _sqlite3ExprIsConstantOrGroupBy(tls *crt.TLS, _pParse *XParse, _p *XExpr, _pGroupBy *XExprList) (r0 int32) {
var _w XWalker
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*uint8)(unsafe.Pointer(&(_w.X5))) = uint8(i32(1))
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _exprNodeIsConstantOrGroupBy
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_w.X6))))))) = _pGroupBy
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_w.X0))))) = _pParse
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ _w.XeCode = uint8(1)
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _exprNodeIsConstantOrGroupBy
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_w.Xu)))) = _pGroupBy
+ *(**XParse)(unsafe.Pointer(&_w.XpParse)) = _pParse
_sqlite3WalkExpr(tls, &_w, _p)
- return int32(_w.X5)
-
- _ = _w
- panic(0)
+ return int32(_w.XeCode)
}
-// sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy().
+// C comment
+// /*
+// ** sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy().
+// */
func _exprNodeIsConstantOrGroupBy(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
var _i int32
var _pGroupBy *XExprList
var _1_p *XExpr
var _2_pColl *XCollSeq
- _pGroupBy = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6))))))
- _i = i32(0)
+ _pGroupBy = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pWalker.Xu)))
+ _i = int32(0)
_0:
- if _i >= (_pGroupBy.X0) {
+ if _i >= _pGroupBy.XnExpr {
goto _3
}
- _1_p = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pGroupBy.X2))))) + 20*uintptr(_i))).X0)
- if _sqlite3ExprCompare(tls, _pExpr, _1_p, i32(-1)) >= i32(2) {
+ _1_p = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pGroupBy.Xa)), uintptr(_i)).XpExpr)
+ if _sqlite3ExprCompare(tls, _pExpr, _1_p, int32(-1)) >= int32(2) {
goto _4
}
- _2_pColl = _sqlite3ExprCollSeq(tls, (*XParse)(_pWalker.X0), _1_p)
- if (_2_pColl == nil) || (Xsqlite3_stricmp(tls, str(37881), _2_pColl.X0) == i32(0)) {
- return i32(1)
+ _2_pColl = _sqlite3ExprCollSeq(tls, (*XParse)(_pWalker.XpParse), _1_p)
+ if (_2_pColl == nil) || (Xsqlite3_stricmp(tls, str(37836), _2_pColl.XzName) == int32(0)) {
+ return int32(1)
}
_4:
_i += 1
goto _0
_3:
- if ((_pExpr.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pWalker.X5))) = uint8(i32(0))
- return i32(2)
+ if (_pExpr.Xflags & uint32(2048)) != (0) {
+ _pWalker.XeCode = 0
+ return int32(2)
}
return _exprNodeIsConstant(tls, _pWalker, _pExpr)
}
-// Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
-// is a no-op. Otherwise, it adds a single row of output to the EQP result,
-// where the caption is of the form:
-//
-// "USE TEMP B-TREE FOR xxx"
-//
-// where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which
-// is determined by the zUsage argument.
+// C comment
+// /*
+// ** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
+// ** is a no-op. Otherwise, it adds a single row of output to the EQP result,
+// ** where the caption is of the form:
+// **
+// ** "USE TEMP B-TREE FOR xxx"
+// **
+// ** where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which
+// ** is determined by the zUsage argument.
+// */
func _explainTempTable(tls *crt.TLS, _pParse *XParse, _zUsage *int8) {
var _1_zMsg *int8
var _1_v *TVdbe
- if int32(_pParse.X54) == i32(2) {
- _1_v = (*TVdbe)(_pParse.X2)
- _1_zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.X0), str(109936), unsafe.Pointer(_zUsage))
- _sqlite3VdbeAddOp4(tls, _1_v, i32(165), _pParse.X58, i32(0), i32(0), _1_zMsg, i32(-1))
- }
-}
-
-// If the WHERE_GROUPBY flag is set in the mask passed to sqlite3WhereBegin(),
-// the planner assumes that the specified pOrderBy list is actually a GROUP
-// BY clause - and so any order that groups rows as required satisfies the
-// request.
-//
-// Normally, in this case it is not possible for the caller to determine
-// whether or not the rows are really being delivered in sorted order, or
-// just in some other order that provides the required grouping. However,
-// if the WHERE_SORTBYGROUP flag is also passed to sqlite3WhereBegin(), then
-// this function may be called on the returned WhereInfo object. It returns
-// true if the rows really will be sorted in the specified order, or false
-// otherwise.
-//
-// For example, assuming:
-//
-// CREATE INDEX i1 ON t1(x, Y);
-//
-// then
-//
-// SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1
-// SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0
+ if int32(_pParse.Xexplain) == int32(2) {
+ _1_v = (*TVdbe)(_pParse.XpVdbe)
+ _1_zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.Xdb), str(109964), unsafe.Pointer(_zUsage))
+ _sqlite3VdbeAddOp4(tls, _1_v, int32(165), _pParse.XiSelectId, int32(0), int32(0), _1_zMsg, int32(-1))
+ }
+}
+
+// C comment
+// /*
+// ** If the WHERE_GROUPBY flag is set in the mask passed to sqlite3WhereBegin(),
+// ** the planner assumes that the specified pOrderBy list is actually a GROUP
+// ** BY clause - and so any order that groups rows as required satisfies the
+// ** request.
+// **
+// ** Normally, in this case it is not possible for the caller to determine
+// ** whether or not the rows are really being delivered in sorted order, or
+// ** just in some other order that provides the required grouping. However,
+// ** if the WHERE_SORTBYGROUP flag is also passed to sqlite3WhereBegin(), then
+// ** this function may be called on the returned WhereInfo object. It returns
+// ** true if the rows really will be sorted in the specified order, or false
+// ** otherwise.
+// **
+// ** For example, assuming:
+// **
+// ** CREATE INDEX i1 ON t1(x, Y);
+// **
+// ** then
+// **
+// ** SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1
+// ** SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0
+// */
func _sqlite3WhereIsSorted(tls *crt.TLS, _pWInfo *XWhereInfo) (r0 int32) {
func() {
- if (int32(_pWInfo.X10) & i32(64)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134159), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereIsSortedØ00__func__Ø000))), unsafe.Pointer(str(109959)))
+ if (int32(_pWInfo.XwctrlFlags) & int32(64)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134159), unsafe.Pointer(&_sqlite3WhereIsSortedØ00__func__Ø000), unsafe.Pointer(str(109987)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pWInfo.X10) & i32(512)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(134160), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WhereIsSortedØ00__func__Ø000))), unsafe.Pointer(str(109994)))
+ if (int32(_pWInfo.XwctrlFlags) & int32(512)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(134160), unsafe.Pointer(&_sqlite3WhereIsSortedØ00__func__Ø000), unsafe.Pointer(str(110022)))
crt.X__builtin_abort(tls)
}
}()
- return int32(_pWInfo.X13)
+ return int32(_pWInfo.Xsorted)
}
var _sqlite3WhereIsSortedØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WhereIsSortedØ00__func__Ø000[0], str(110033), 21)
+ crt.Xstrncpy(nil, &_sqlite3WhereIsSortedØ00__func__Ø000[0], str(110061), 21)
}
-// Update the accumulator memory cells for an aggregate based on
-// the current cursor position.
+// C comment
+// /*
+// ** Update the accumulator memory cells for an aggregate based on
+// ** the current cursor position.
+// */
func _updateAccumulator(tls *crt.TLS, _pParse *XParse, _pAggInfo *XAggInfo) {
var _i, _regHit, _addrHitTest, _1_nArg, _1_addrNext, _1_regAgg, _5_j int32
var _v *TVdbe
@@ -91317,65 +92410,65 @@ func _updateAccumulator(tls *crt.TLS, _pParse *XParse, _pAggInfo *XAggInfo) {
var _5_pColl *XCollSeq
var _pC *TAggInfo_col
var _pF *TAggInfo_func
- _v = (*TVdbe)(_pParse.X2)
- _regHit = i32(0)
- _addrHitTest = i32(0)
- *(*uint8)(unsafe.Pointer(&(_pAggInfo.X0))) = uint8(i32(1))
- *func() **TAggInfo_func { _i = i32(0); return &_pF }() = (*TAggInfo_func)(_pAggInfo.X11)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _regHit = int32(0)
+ _addrHitTest = int32(0)
+ _pAggInfo.XdirectMode = uint8(1)
+ *func() **TAggInfo_func { _i = int32(0); return &_pF }() = (*TAggInfo_func)(_pAggInfo.XaFunc)
_0:
- if _i >= (_pAggInfo.X12) {
+ if _i >= _pAggInfo.XnFunc {
goto _3
}
- _1_addrNext = i32(0)
- _1_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)(_pF.X0).X6))))))
+ _1_addrNext = int32(0)
+ _1_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)(_pF.XpExpr).Xx))))
func() {
- if (((*XExpr)(_pF.X0).X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121330), unsafe.Pointer((*int8)(unsafe.Pointer(&_updateAccumulatorØ00__func__Ø000))), unsafe.Pointer(str(110054)))
+ if (((*XExpr)(_pF.XpExpr).Xflags) & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121330), unsafe.Pointer(&_updateAccumulatorØ00__func__Ø000), unsafe.Pointer(str(110082)))
crt.X__builtin_abort(tls)
}
}()
if _1_pList != nil {
- _1_nArg = _1_pList.X0
+ _1_nArg = _1_pList.XnExpr
_1_regAgg = _sqlite3GetTempRange(tls, _pParse, _1_nArg)
- _sqlite3ExprCodeExprList(tls, _pParse, _1_pList, _1_regAgg, i32(0), uint8(i32(1)))
+ _sqlite3ExprCodeExprList(tls, _pParse, _1_pList, _1_regAgg, int32(0), uint8(1))
goto _7
}
- _1_nArg = i32(0)
- _1_regAgg = i32(0)
+ _1_nArg = int32(0)
+ _1_regAgg = int32(0)
_7:
- if (_pF.X3) >= i32(0) {
+ if _pF.XiDistinct >= int32(0) {
_1_addrNext = _sqlite3VdbeMakeLabel(tls, _v)
- _codeDistinct(tls, _pParse, _pF.X3, _1_addrNext, i32(1), _1_regAgg)
+ _codeDistinct(tls, _pParse, _pF.XiDistinct, _1_addrNext, int32(1), _1_regAgg)
}
- if (int32((*XFuncDef)(_pF.X1).X1) & i32(32)) == 0 {
+ if (int32((*XFuncDef)(_pF.XpFunc).XfuncFlags) & int32(32)) == 0 {
goto _9
}
_5_pColl = nil
func() {
if _1_pList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121349), unsafe.Pointer((*int8)(unsafe.Pointer(&_updateAccumulatorØ00__func__Ø000))), unsafe.Pointer(str(90087)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121349), unsafe.Pointer(&_updateAccumulatorØ00__func__Ø000), unsafe.Pointer(str(88609)))
crt.X__builtin_abort(tls)
}
}()
- *func() **TExprList_item { _5_j = i32(0); return &_5_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_1_pList.X2)))))
+ *func() **TExprList_item { _5_j = int32(0); return &_5_pItem }() = (*TExprList_item)(unsafe.Pointer(&_1_pList.Xa))
_12:
if _5_pColl != nil || _5_j >= _1_nArg {
goto _16
}
- _5_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_5_pItem.X0))
+ _5_pColl = _sqlite3ExprCollSeq(tls, _pParse, (*XExpr)(_5_pItem.XpExpr))
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _5_j += 1; return &_5_pItem }())) += uintptr(20)
goto _12
_16:
if _5_pColl == nil {
- _5_pColl = (*XCollSeq)((*Xsqlite3)(_pParse.X0).X2)
+ _5_pColl = (*XCollSeq)((*Xsqlite3)(_pParse.Xdb).XpDfltColl)
}
- if (_regHit == i32(0)) && (_pAggInfo.X10) != 0 {
- _regHit = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ if (_regHit == int32(0)) && _pAggInfo.XnAccumulator != 0 {
+ _regHit = preInc2(&_pParse.XnMem, 1)
}
- _sqlite3VdbeAddOp4(tls, _v, i32(68), _regHit, i32(0), i32(0), (*int8)(unsafe.Pointer(_5_pColl)), i32(-3))
+ _sqlite3VdbeAddOp4(tls, _v, int32(68), _regHit, int32(0), int32(0), (*int8)(unsafe.Pointer(_5_pColl)), int32(-3))
_9:
- _sqlite3VdbeAddOp3(tls, _v, i32(150), i32(0), _1_regAgg, _pF.X2)
- _sqlite3VdbeAppendP4(tls, _v, _pF.X1, i32(-4))
+ _sqlite3VdbeAddOp3(tls, _v, int32(150), int32(0), _1_regAgg, _pF.XiMem)
+ _sqlite3VdbeAppendP4(tls, _v, _pF.XpFunc, int32(-4))
_sqlite3VdbeChangeP5(tls, _v, uint16(uint8(_1_nArg)))
_sqlite3ExprCacheAffinityChange(tls, _pParse, _1_regAgg, _1_nArg)
_sqlite3ReleaseTempRange(tls, _pParse, _1_regAgg, _1_nArg)
@@ -91387,19 +92480,19 @@ _9:
goto _0
_3:
if _regHit != 0 {
- _addrHitTest = _sqlite3VdbeAddOp1(tls, _v, i32(21), _regHit)
+ _addrHitTest = _sqlite3VdbeAddOp1(tls, _v, int32(21), _regHit)
}
_sqlite3ExprCacheClear(tls, _pParse)
- *func() **TAggInfo_col { _i = i32(0); return &_pC }() = (*TAggInfo_col)(_pAggInfo.X8)
+ *func() **TAggInfo_col { _i = int32(0); return &_pC }() = (*TAggInfo_col)(_pAggInfo.XaCol)
_22:
- if _i >= (_pAggInfo.X10) {
+ if _i >= _pAggInfo.XnAccumulator {
goto _25
}
- _sqlite3ExprCode(tls, _pParse, (*XExpr)(_pC.X5), _pC.X4)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(_pC.XpExpr), _pC.XiMem)
*(*uintptr)(unsafe.Pointer(func() **TAggInfo_col { _i += 1; return &_pC }())) += uintptr(24)
goto _22
_25:
- *(*uint8)(unsafe.Pointer(&(_pAggInfo.X0))) = uint8(i32(0))
+ _pAggInfo.XdirectMode = 0
_sqlite3ExprCacheClear(tls, _pParse)
if _addrHitTest != 0 {
_sqlite3VdbeJumpHere(tls, _v, _addrHitTest)
@@ -91409,36 +92502,39 @@ _25:
var _updateAccumulatorØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_updateAccumulatorØ00__func__Ø000[0], str(110096), 18)
+ crt.Xstrncpy(nil, &_updateAccumulatorØ00__func__Ø000[0], str(110124), 18)
}
-// Invoke the OP_AggFinalize opcode for every aggregate function
-// in the AggInfo structure.
+// C comment
+// /*
+// ** Invoke the OP_AggFinalize opcode for every aggregate function
+// ** in the AggInfo structure.
+// */
func _finalizeAggFunctions(tls *crt.TLS, _pParse *XParse, _pAggInfo *XAggInfo) {
var _i int32
var _v *TVdbe
var _1_pList *XExprList
var _pF *TAggInfo_func
- _v = (*TVdbe)(_pParse.X2)
- *func() **TAggInfo_func { _i = i32(0); return &_pF }() = (*TAggInfo_func)(_pAggInfo.X11)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ *func() **TAggInfo_func { _i = int32(0); return &_pF }() = (*TAggInfo_func)(_pAggInfo.XaFunc)
_0:
- if _i >= (_pAggInfo.X12) {
+ if _i >= _pAggInfo.XnFunc {
goto _3
}
- _1_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&((*XExpr)(_pF.X0).X6))))))
+ _1_pList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&((*XExpr)(_pF.XpExpr).Xx))))
func() {
- if (((*XExpr)(_pF.X0).X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121306), unsafe.Pointer((*int8)(unsafe.Pointer(&_finalizeAggFunctionsØ00__func__Ø000))), unsafe.Pointer(str(110054)))
+ if (((*XExpr)(_pF.XpExpr).Xflags) & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121306), unsafe.Pointer(&_finalizeAggFunctionsØ00__func__Ø000), unsafe.Pointer(str(110082)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp2(tls, _v, i32(152), _pF.X2, func() int32 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(152), _pF.XiMem, func() int32 {
if _1_pList != nil {
- return (_1_pList.X0)
+ return _1_pList.XnExpr
}
- return i32(0)
+ return int32(0)
}())
- _sqlite3VdbeAppendP4(tls, _v, _pF.X1, i32(-4))
+ _sqlite3VdbeAppendP4(tls, _v, _pF.XpFunc, int32(-4))
*(*uintptr)(unsafe.Pointer(func() **TAggInfo_func { _i += 1; return &_pF }())) += uintptr(16)
goto _0
_3:
@@ -91447,83 +92543,86 @@ _3:
var _finalizeAggFunctionsØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_finalizeAggFunctionsØ00__func__Ø000[0], str(110114), 21)
+ crt.Xstrncpy(nil, &_finalizeAggFunctionsØ00__func__Ø000[0], str(110142), 21)
}
-// Reset the aggregate accumulator.
-//
-// The aggregate accumulator is a set of memory cells that hold
-// intermediate results while calculating an aggregate. This
-// routine generates code that stores NULLs in all of those memory
-// cells.
+// C comment
+// /*
+// ** Reset the aggregate accumulator.
+// **
+// ** The aggregate accumulator is a set of memory cells that hold
+// ** intermediate results while calculating an aggregate. This
+// ** routine generates code that stores NULLs in all of those memory
+// ** cells.
+// */
func _resetAccumulator(tls *crt.TLS, _pParse *XParse, _pAggInfo *XAggInfo) {
var _i, _nReg int32
var _v *TVdbe
var _4_pE *XExpr
var _6_pKeyInfo *XKeyInfo
var _pFunc *TAggInfo_func
- _v = (*TVdbe)(_pParse.X2)
- _nReg = (_pAggInfo.X12) + (_pAggInfo.X9)
- if _nReg == i32(0) {
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _nReg = _pAggInfo.XnFunc + _pAggInfo.XnColumn
+ if _nReg == int32(0) {
return
}
func() {
- if _nReg != (((_pAggInfo.X6) - (_pAggInfo.X5)) + i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121268), unsafe.Pointer((*int8)(unsafe.Pointer(&_resetAccumulatorØ00__func__Ø000))), unsafe.Pointer(str(110135)))
+ if _nReg != ((_pAggInfo.XmxReg - _pAggInfo.XmnReg) + int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121268), unsafe.Pointer(&_resetAccumulatorØ00__func__Ø000), unsafe.Pointer(str(110163)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_3:
- if _i >= (_pAggInfo.X9) {
+ if _i >= _pAggInfo.XnColumn {
goto _6
}
func() {
- if ((*TAggInfo_col)(unsafe.Pointer(uintptr(_pAggInfo.X8)+24*uintptr(_i))).X4) < (_pAggInfo.X5) || ((*TAggInfo_col)(unsafe.Pointer(uintptr(_pAggInfo.X8)+24*uintptr(_i))).X4) > (_pAggInfo.X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121270), unsafe.Pointer((*int8)(unsafe.Pointer(&_resetAccumulatorØ00__func__Ø000))), unsafe.Pointer(str(110175)))
+ if (elem66((*TAggInfo_col)(_pAggInfo.XaCol), uintptr(_i)).XiMem) < _pAggInfo.XmnReg || (elem66((*TAggInfo_col)(_pAggInfo.XaCol), uintptr(_i)).XiMem) > _pAggInfo.XmxReg {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121270), unsafe.Pointer(&_resetAccumulatorØ00__func__Ø000), unsafe.Pointer(str(110203)))
crt.X__builtin_abort(tls)
}
}()
_i += 1
goto _3
_6:
- _i = i32(0)
+ _i = int32(0)
_10:
- if _i >= (_pAggInfo.X12) {
+ if _i >= _pAggInfo.XnFunc {
goto _13
}
func() {
- if ((*TAggInfo_func)(unsafe.Pointer(uintptr(_pAggInfo.X11)+16*uintptr(_i))).X2) < (_pAggInfo.X5) || ((*TAggInfo_func)(unsafe.Pointer(uintptr(_pAggInfo.X11)+16*uintptr(_i))).X2) > (_pAggInfo.X6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121274), unsafe.Pointer((*int8)(unsafe.Pointer(&_resetAccumulatorØ00__func__Ø000))), unsafe.Pointer(str(110258)))
+ if (elem67((*TAggInfo_func)(_pAggInfo.XaFunc), uintptr(_i)).XiMem) < _pAggInfo.XmnReg || (elem67((*TAggInfo_func)(_pAggInfo.XaFunc), uintptr(_i)).XiMem) > _pAggInfo.XmxReg {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121274), unsafe.Pointer(&_resetAccumulatorØ00__func__Ø000), unsafe.Pointer(str(110286)))
crt.X__builtin_abort(tls)
}
}()
_i += 1
goto _10
_13:
- _sqlite3VdbeAddOp3(tls, _v, i32(59), i32(0), _pAggInfo.X5, _pAggInfo.X6)
- *func() *int32 { _pFunc = (*TAggInfo_func)(_pAggInfo.X11); return &_i }() = i32(0)
+ _sqlite3VdbeAddOp3(tls, _v, int32(59), int32(0), _pAggInfo.XmnReg, _pAggInfo.XmxReg)
+ *func() *int32 { _pFunc = (*TAggInfo_func)(_pAggInfo.XaFunc); return &_i }() = int32(0)
_17:
- if _i >= (_pAggInfo.X12) {
+ if _i >= _pAggInfo.XnFunc {
goto _20
}
- if (_pFunc.X3) < i32(0) {
+ if _pFunc.XiDistinct < int32(0) {
goto _21
}
- _4_pE = (*XExpr)(_pFunc.X0)
+ _4_pE = (*XExpr)(_pFunc.XpExpr)
func() {
- if ((_4_pE.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(121282), unsafe.Pointer((*int8)(unsafe.Pointer(&_resetAccumulatorØ00__func__Ø000))), unsafe.Pointer(str(110343)))
+ if (_4_pE.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(121282), unsafe.Pointer(&_resetAccumulatorØ00__func__Ø000), unsafe.Pointer(str(110371)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_4_pE.X6)))))) == nil) || (((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_4_pE.X6)))))).X0) != i32(1)) {
- _sqlite3ErrorMsg(tls, _pParse, str(110378))
- *(*int32)(unsafe.Pointer(&(_pFunc.X3))) = i32(-1)
+ if ((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_4_pE.Xx))) == nil) || (((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_4_pE.Xx))).XnExpr) != int32(1)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(110406))
+ _pFunc.XiDistinct = int32(-1)
goto _26
}
- _6_pKeyInfo = _keyInfoFromExprList(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_4_pE.X6)))))), i32(0), i32(0))
- _sqlite3VdbeAddOp4(tls, _v, i32(110), _pFunc.X3, i32(0), i32(0), (*int8)(unsafe.Pointer(_6_pKeyInfo)), i32(-5))
+ _6_pKeyInfo = _keyInfoFromExprList(tls, _pParse, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_4_pE.Xx))), int32(0), int32(0))
+ _sqlite3VdbeAddOp4(tls, _v, int32(110), _pFunc.XiDistinct, int32(0), int32(0), (*int8)(unsafe.Pointer(_6_pKeyInfo)), int32(-5))
_26:
_21:
*(*uintptr)(unsafe.Pointer(func() **TAggInfo_func { _i += 1; return &_pFunc }())) += uintptr(16)
@@ -91534,60 +92633,63 @@ _20:
var _resetAccumulatorØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_resetAccumulatorØ00__func__Ø000[0], str(110429), 17)
+ crt.Xstrncpy(nil, &_resetAccumulatorØ00__func__Ø000[0], str(110457), 17)
}
-// The select statement passed as the first argument is an aggregate query.
-// The second argument is the associated aggregate-info object. This
-// function tests if the SELECT is of the form:
-//
-// SELECT count(*) FROM <tbl>
-//
-// where table is a database table, not a sub-select or view. If the query
-// does match this pattern, then a pointer to the Table object representing
-// <tbl> is returned. Otherwise, 0 is returned.
+// C comment
+// /*
+// ** The select statement passed as the first argument is an aggregate query.
+// ** The second argument is the associated aggregate-info object. This
+// ** function tests if the SELECT is of the form:
+// **
+// ** SELECT count(*) FROM <tbl>
+// **
+// ** where table is a database table, not a sub-select or view. If the query
+// ** does match this pattern, then a pointer to the Table object representing
+// ** <tbl> is returned. Otherwise, 0 is returned.
+// */
func _isSimpleCount(tls *crt.TLS, _p *XSelect, _pAggInfo *XAggInfo) (r0 *XTable) {
var _pTab *XTable
var _pExpr *XExpr
func() {
- if (*XExprList)(_p.X10) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120492), unsafe.Pointer((*int8)(unsafe.Pointer(&_isSimpleCountØ00__func__Ø000))), unsafe.Pointer(str(110446)))
+ if _p.XpGroupBy != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120492), unsafe.Pointer(&_isSimpleCountØ00__func__Ø000), unsafe.Pointer(str(110474)))
crt.X__builtin_abort(tls)
}
}()
- if ((((*XExpr)(_p.X9) != nil) || (((*XExprList)(_p.X0).X0) != i32(1))) || (((*XSrcList)(_p.X8).X0) != i32(1))) || ((*XSelect)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.X8).X2)))))+68*uintptr(i32(0)))).X5) != nil) {
+ if (((_p.XpWhere != nil) || (((*XExprList)(_p.XpEList).XnExpr) != int32(1))) || (((*XSrcList)(_p.XpSrc).XnSrc) != int32(1))) || ((elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.XpSrc).Xa))), 0).XpSelect) != nil) {
return nil
}
- _pTab = (*XTable)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.X8).X2))))) + 68*uintptr(i32(0)))).X4)
- _pExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.X0).X2))))) + 20*uintptr(i32(0)))).X0)
+ _pTab = (*XTable)(elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_p.XpSrc).Xa))), 0).XpTab)
+ _pExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.XpEList).Xa))), 0).XpExpr)
func() {
- if _pTab == nil || (*XSelect)(_pTab.X3) != nil || _pExpr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120501), unsafe.Pointer((*int8)(unsafe.Pointer(&_isSimpleCountØ00__func__Ø000))), unsafe.Pointer(str(110459)))
+ if _pTab == nil || _pTab.XpSelect != nil || _pExpr == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120501), unsafe.Pointer(&_isSimpleCountØ00__func__Ø000), unsafe.Pointer(str(110487)))
crt.X__builtin_abort(tls)
}
}()
- if (_pTab.X16) != 0 {
+ if _pTab.XnModuleArg != 0 {
return nil
}
- if int32(_pExpr.X0) != i32(153) {
+ if int32(_pExpr.Xop) != int32(153) {
return nil
}
if func() int32 {
- if (_pAggInfo.X12) == i32(0) {
+ if _pAggInfo.XnFunc == int32(0) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120505), unsafe.Pointer((*int8)(unsafe.Pointer(&_isSimpleCountØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120505), unsafe.Pointer(&_isSimpleCountØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return nil
}
- if (int32((*XFuncDef)((*TAggInfo_func)(unsafe.Pointer(uintptr(_pAggInfo.X11)+16*uintptr(i32(0)))).X1).X1) & i32(256)) == i32(0) {
+ if (int32((*XFuncDef)(elem67((*TAggInfo_func)(_pAggInfo.XaFunc), 0).XpFunc).XfuncFlags) & int32(256)) == int32(0) {
return nil
}
- if ((_pExpr.X2) & uint32(i32(16))) != 0 {
+ if (_pExpr.Xflags & uint32(16)) != 0 {
return nil
}
return _pTab
@@ -91596,79 +92698,82 @@ func _isSimpleCount(tls *crt.TLS, _p *XSelect, _pAggInfo *XAggInfo) (r0 *XTable)
var _isSimpleCountØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_isSimpleCountØ00__func__Ø000[0], str(110491), 14)
+ crt.Xstrncpy(nil, &_isSimpleCountØ00__func__Ø000[0], str(110519), 14)
}
func _explainSimpleCount(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pIdx *XIndex) {
var _1_bCover int32
var _1_zEqp *int8
- if int32(_pParse.X54) == i32(2) {
- _1_bCover = bool2int((_pIdx != nil) && ((((_pTab.X9) & uint32(i32(32))) == uint32(i32(0))) || (int32((uint32(_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) != i32(2))))
- _1_zEqp = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.X0), str(110505), unsafe.Pointer(_pTab.X0), unsafe.Pointer(func() *int8 {
+ if int32(_pParse.Xexplain) == int32(2) {
+ _1_bCover = bool2int((_pIdx != nil) && (((_pTab.XtabFlags & uint32(32)) == (0)) || (int32((uint32(_pIdx.XidxType)<<30)>>30) != int32(2))))
+ _1_zEqp = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.Xdb), str(110533), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(func() *int8 {
if _1_bCover != 0 {
- return str(110523)
+ return str(110551)
}
- return str(0)
+ return str(284)
}()), unsafe.Pointer(func() *int8 {
if _1_bCover != 0 {
- return (_pIdx.X0)
+ return _pIdx.XzName
}
- return str(0)
+ return str(284)
}()))
- _sqlite3VdbeAddOp4(tls, (*TVdbe)(_pParse.X2), i32(165), _pParse.X58, i32(0), i32(0), _1_zEqp, i32(-1))
- }
-}
-
-// Based on the contents of the AggInfo structure indicated by the first
-// argument, this function checks if the following are true:
-//
-// * the query contains just a single aggregate function,
-// * the aggregate function is either min() or max(), and
-// * the argument to the aggregate function is a column value.
-//
-// If all of the above are true, then WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX
-// is returned as appropriate. Also, *ppMinMax is set to point to the
-// list of arguments passed to the aggregate before returning.
-//
-// Or, if the conditions above are not met, *ppMinMax is set to 0 and
-// WHERE_ORDERBY_NORMAL is returned.
+ _sqlite3VdbeAddOp4(tls, (*TVdbe)(_pParse.XpVdbe), int32(165), _pParse.XiSelectId, int32(0), int32(0), _1_zEqp, int32(-1))
+ }
+}
+
+// C comment
+// /*
+// ** Based on the contents of the AggInfo structure indicated by the first
+// ** argument, this function checks if the following are true:
+// **
+// ** * the query contains just a single aggregate function,
+// ** * the aggregate function is either min() or max(), and
+// ** * the argument to the aggregate function is a column value.
+// **
+// ** If all of the above are true, then WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX
+// ** is returned as appropriate. Also, *ppMinMax is set to point to the
+// ** list of arguments passed to the aggregate before returning.
+// **
+// ** Or, if the conditions above are not met, *ppMinMax is set to 0 and
+// ** WHERE_ORDERBY_NORMAL is returned.
+// */
func _minMaxQuery(tls *crt.TLS, _pAggInfo *XAggInfo, _ppMinMax **XExprList) (r0 uint8) {
var _eRet int32
var _2_zFunc *int8
var _1_pEList *XExprList
var _1_pExpr *XExpr
- _eRet = i32(0)
+ _eRet = int32(0)
*_ppMinMax = nil
- if (_pAggInfo.X12) != i32(1) {
+ if _pAggInfo.XnFunc != int32(1) {
goto _0
}
- _1_pExpr = (*XExpr)((*TAggInfo_func)(unsafe.Pointer(uintptr(_pAggInfo.X11) + 16*uintptr(i32(0)))).X0)
- _1_pEList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_1_pExpr.X6))))))
+ _1_pExpr = (*XExpr)(elem67((*TAggInfo_func)(_pAggInfo.XaFunc), 0).XpExpr)
+ _1_pEList = (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_1_pExpr.Xx)))
func() {
- if int32(_1_pExpr.X0) != i32(153) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120460), unsafe.Pointer((*int8)(unsafe.Pointer(&_minMaxQueryØ00__func__Ø000))), unsafe.Pointer(str(96778)))
+ if int32(_1_pExpr.Xop) != int32(153) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120460), unsafe.Pointer(&_minMaxQueryØ00__func__Ø000), unsafe.Pointer(str(96806)))
crt.X__builtin_abort(tls)
}
}()
- if _1_pEList == nil || (_1_pEList.X0) != i32(1) || int32((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_1_pEList.X2)))))+20*uintptr(i32(0)))).X0).X0) != i32(154) {
+ if _1_pEList == nil || _1_pEList.XnExpr != int32(1) || int32((*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_1_pEList.Xa)), 0).XpExpr).Xop) != int32(154) {
goto _5
}
- _2_zFunc = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_1_pExpr.X3)))))
- if _sqlite3StrICmp(tls, _2_zFunc, str(7709)) == i32(0) {
- _eRet = i32(1)
+ _2_zFunc = *(**int8)(unsafe.Pointer(&_1_pExpr.Xu))
+ if _sqlite3StrICmp(tls, _2_zFunc, str(7610)) == int32(0) {
+ _eRet = int32(1)
*_ppMinMax = _1_pEList
goto _8
}
- if _sqlite3StrICmp(tls, _2_zFunc, str(7713)) == i32(0) {
- _eRet = i32(2)
+ if _sqlite3StrICmp(tls, _2_zFunc, str(7614)) == int32(0) {
+ _eRet = int32(2)
*_ppMinMax = _1_pEList
}
_8:
_5:
_0:
func() {
- if (*_ppMinMax) != nil && ((*_ppMinMax).X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(120473), unsafe.Pointer((*int8)(unsafe.Pointer(&_minMaxQueryØ00__func__Ø000))), unsafe.Pointer(str(110546)))
+ if (*_ppMinMax) != nil && ((*_ppMinMax).XnExpr) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(120473), unsafe.Pointer(&_minMaxQueryØ00__func__Ø000), unsafe.Pointer(str(110574)))
crt.X__builtin_abort(tls)
}
}()
@@ -91678,41 +92783,44 @@ _0:
var _minMaxQueryØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_minMaxQueryØ00__func__Ø000[0], str(110584), 12)
+ crt.Xstrncpy(nil, &_minMaxQueryØ00__func__Ø000[0], str(110612), 12)
}
-// If the inner loop was generated using a non-null pOrderBy argument,
-// then the results were placed in a sorter. After the loop is terminated
-// we need to run the sorter and output the results. The following
-// routine generates the code needed to do that.
+// C comment
+// /*
+// ** If the inner loop was generated using a non-null pOrderBy argument,
+// ** then the results were placed in a sorter. After the loop is terminated
+// ** we need to run the sorter and output the results. The following
+// ** routine generates the code needed to do that.
+// */
func _generateSortTail(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pSort *XSortCtx, _nColumn int32, _pDest *XSelectDest) {
var _addrBreak, _addrContinue, _addr, _addrOnce, _iTab, _eDest, _iParm, _regRow, _regRowid, _iCol, _nKey, _iSortTab, _nSortData, _i, _bSeq, _4_regSortOut, _7_iRead int32
var _v *TVdbe
var _pOrderBy *XExprList
var _aOutEx *TExprList_item
- _v = (*TVdbe)(_pParse.X2)
- _addrBreak = _pSort.X6
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _addrBreak = _pSort.XlabelDone
_addrContinue = _sqlite3VdbeMakeLabel(tls, _v)
- _addrOnce = i32(0)
- _pOrderBy = (*XExprList)(_pSort.X0)
- _eDest = int32(_pDest.X0)
- _iParm = _pDest.X2
- _aOutEx = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.X0).X2)))))
+ _addrOnce = int32(0)
+ _pOrderBy = (*XExprList)(_pSort.XpOrderBy)
+ _eDest = int32(_pDest.XeDest)
+ _iParm = _pDest.XiSDParm
+ _aOutEx = (*TExprList_item)(unsafe.Pointer(&((*XExprList)(_p.XpEList).Xa)))
func() {
- if _addrBreak >= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117761), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateSortTailØ00__func__Ø000))), unsafe.Pointer(str(110596)))
+ if _addrBreak >= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117761), unsafe.Pointer(&_generateSortTailØ00__func__Ø000), unsafe.Pointer(str(110624)))
crt.X__builtin_abort(tls)
}
}()
- if (_pSort.X4) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(14), _pSort.X3, _pSort.X4)
+ if _pSort.XlabelBkOut != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(14), _pSort.XregReturn, _pSort.XlabelBkOut)
_sqlite3VdbeGoto(tls, _v, _addrBreak)
- _sqlite3VdbeResolveLabel(tls, _v, _pSort.X4)
+ _sqlite3VdbeResolveLabel(tls, _v, _pSort.XlabelBkOut)
}
- _iTab = _pSort.X2
- if ((_eDest == i32(9)) || (_eDest == i32(13))) || (_eDest == i32(10)) {
- _regRowid = i32(0)
- _regRow = _pDest.X3
+ _iTab = _pSort.XiECursor
+ if ((_eDest == int32(9)) || (_eDest == int32(13))) || (_eDest == int32(10)) {
+ _regRowid = int32(0)
+ _regRow = _pDest.XiSdst
_nSortData = _nColumn
goto _6
}
@@ -91720,102 +92828,102 @@ func _generateSortTail(tls *crt.TLS, _pParse *XParse, _p *XSelect, _pSort *XSort
_regRow = _sqlite3GetTempRange(tls, _pParse, _nColumn)
_nSortData = _nColumn
_6:
- _nKey = (_pOrderBy.X0) - (_pSort.X1)
- if (int32(_pSort.X7) & i32(1)) == 0 {
+ _nKey = _pOrderBy.XnExpr - _pSort.XnOBSat
+ if (int32(_pSort.XsortFlags) & int32(1)) == 0 {
goto _7
}
- _4_regSortOut = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _iSortTab = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- if (_pSort.X4) != 0 {
- _addrOnce = _sqlite3VdbeAddOp0(tls, _v, i32(20))
+ _4_regSortOut = preInc2(&_pParse.XnMem, 1)
+ _iSortTab = postInc2(&_pParse.XnTab, 1)
+ if _pSort.XlabelBkOut != 0 {
+ _addrOnce = _sqlite3VdbeAddOp0(tls, _v, int32(20))
}
- _sqlite3VdbeAddOp3(tls, _v, i32(113), _iSortTab, _4_regSortOut, (_nKey+i32(1))+_nSortData)
+ _sqlite3VdbeAddOp3(tls, _v, int32(113), _iSortTab, _4_regSortOut, (_nKey+int32(1))+_nSortData)
if _addrOnce != 0 {
_sqlite3VdbeJumpHere(tls, _v, _addrOnce)
}
- _addr = i32(1) + _sqlite3VdbeAddOp2(tls, _v, i32(35), _iTab, _addrBreak)
- _codeOffset(tls, _v, _p.X5, _addrContinue)
- _sqlite3VdbeAddOp3(tls, _v, i32(123), _iTab, _4_regSortOut, _iSortTab)
- _bSeq = i32(0)
+ _addr = int32(1) + _sqlite3VdbeAddOp2(tls, _v, int32(35), _iTab, _addrBreak)
+ _codeOffset(tls, _v, _p.XiOffset, _addrContinue)
+ _sqlite3VdbeAddOp3(tls, _v, int32(123), _iTab, _4_regSortOut, _iSortTab)
+ _bSeq = int32(0)
goto _10
_7:
- _addr = i32(1) + _sqlite3VdbeAddOp2(tls, _v, i32(36), _iTab, _addrBreak)
- _codeOffset(tls, _v, _p.X5, _addrContinue)
+ _addr = int32(1) + _sqlite3VdbeAddOp2(tls, _v, int32(36), _iTab, _addrBreak)
+ _codeOffset(tls, _v, _p.XiOffset, _addrContinue)
_iSortTab = _iTab
- _bSeq = i32(1)
+ _bSeq = int32(1)
_10:
- *func() *int32 { _i = i32(0); return &_iCol }() = _nKey + _bSeq
+ *func() *int32 { _i = int32(0); return &_iCol }() = _nKey + _bSeq
_11:
if _i >= _nSortData {
goto _14
}
- if ((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOutEx)) + 20*uintptr(_i))).X5))))).X0) != 0 {
- _7_iRead = int32((*t43)(unsafe.Pointer((*t37)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOutEx)) + 20*uintptr(_i))).X5))))).X0) - i32(1)
+ if ((*t71)(unsafe.Pointer(&(elem57(_aOutEx, uintptr(_i)).Xu))).XiOrderByCol) != 0 {
+ _7_iRead = int32((*t71)(unsafe.Pointer(&(elem57(_aOutEx, uintptr(_i)).Xu))).XiOrderByCol) - int32(1)
goto _16
}
- _7_iRead = postInc1(&_iCol, int32(1))
+ _7_iRead = postInc2(&_iCol, 1)
_16:
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _iSortTab, _7_iRead, _regRow+_i)
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(func() *int8 {
- if ((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOutEx)) + 20*uintptr(_i))).X1) != nil {
- return ((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOutEx)) + 20*uintptr(_i))).X1)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _iSortTab, _7_iRead, _regRow+_i)
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(func() *int8 {
+ if (elem57(_aOutEx, uintptr(_i)).XzName) != nil {
+ return (elem57(_aOutEx, uintptr(_i)).XzName)
}
- return ((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOutEx)) + 20*uintptr(_i))).X2)
+ return (elem57(_aOutEx, uintptr(_i)).XzSpan)
}()))
_i += 1
goto _11
_14:
switch _eDest {
- case i32(10):
+ case int32(10):
goto _23
- case i32(11):
+ case int32(11):
goto _22
- case i32(12):
+ case int32(12):
goto _20
- case i32(14):
+ case int32(14):
goto _20
default:
goto _24
}
_20:
- _sqlite3VdbeAddOp2(tls, _v, i32(117), _iParm, _regRowid)
- _sqlite3VdbeAddOp3(tls, _v, i32(118), _iParm, _regRow, _regRowid)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(8)))
+ _sqlite3VdbeAddOp2(tls, _v, int32(117), _iParm, _regRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), _iParm, _regRow, _regRowid)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(8))
goto _25
_22:
func() {
- if _nColumn != _sqlite3Strlen30(tls, _pDest.X1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117817), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateSortTailØ00__func__Ø000))), unsafe.Pointer(str(110608)))
+ if _nColumn != _sqlite3Strlen30(tls, _pDest.XzAffSdst) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117817), unsafe.Pointer(&_generateSortTailØ00__func__Ø000), unsafe.Pointer(str(110636)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _regRow, _nColumn, _regRowid, _pDest.X1, _nColumn)
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _regRow, _nColumn, _regRowid, _pDest.XzAffSdst, _nColumn)
_sqlite3ExprCacheAffinityChange(tls, _pParse, _regRow, _nColumn)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _iParm, _regRowid, _regRow, _nColumn)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _iParm, _regRowid, _regRow, _nColumn)
goto _25
_23:
goto _25
_24:
func() {
- if _eDest != i32(9) && _eDest != i32(13) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(117830), unsafe.Pointer((*int8)(unsafe.Pointer(&_generateSortTailØ00__func__Ø000))), unsafe.Pointer(str(110650)))
+ if _eDest != int32(9) && _eDest != int32(13) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(117830), unsafe.Pointer(&_generateSortTailØ00__func__Ø000), unsafe.Pointer(str(110678)))
crt.X__builtin_abort(tls)
}
}()
- if _eDest == i32(9) {
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _pDest.X3, _nColumn)
- _sqlite3ExprCacheAffinityChange(tls, _pParse, _pDest.X3, _nColumn)
+ if _eDest == int32(9) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _pDest.XiSdst, _nColumn)
+ _sqlite3ExprCacheAffinityChange(tls, _pParse, _pDest.XiSdst, _nColumn)
goto _32
}
- _sqlite3VdbeAddOp1(tls, _v, i32(16), _pDest.X2)
+ _sqlite3VdbeAddOp1(tls, _v, int32(16), _pDest.XiSDParm)
_32:
goto _25
_25:
if _regRowid == 0 {
goto _33
}
- if _eDest == i32(11) {
+ if _eDest == int32(11) {
_sqlite3ReleaseTempRange(tls, _pParse, _regRow, _nColumn)
goto _35
}
@@ -91824,14 +92932,14 @@ _35:
_sqlite3ReleaseTempReg(tls, _pParse, _regRowid)
_33:
_sqlite3VdbeResolveLabel(tls, _v, _addrContinue)
- if (int32(_pSort.X7) & i32(1)) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(3), _iTab, _addr)
+ if (int32(_pSort.XsortFlags) & int32(1)) != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(3), _iTab, _addr)
goto _37
}
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _iTab, _addr)
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _iTab, _addr)
_37:
- if (_pSort.X3) != 0 {
- _sqlite3VdbeAddOp1(tls, _v, i32(52), _pSort.X3)
+ if _pSort.XregReturn != 0 {
+ _sqlite3VdbeAddOp1(tls, _v, int32(52), _pSort.XregReturn)
}
_sqlite3VdbeResolveLabel(tls, _v, _addrBreak)
_ = _iCol
@@ -91840,63 +92948,69 @@ _37:
var _generateSortTailØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_generateSortTailØ00__func__Ø000[0], str(110692), 17)
-}
-
-// Argument pVector points to a vector expression - either a TK_VECTOR
-// or TK_SELECT that returns more than one column. This function returns
-// the register number of a register that contains the value of
-// element iField of the vector.
-//
-// If pVector is a TK_SELECT expression, then code for it must have
-// already been generated using the exprCodeSubselect() routine. In this
-// case parameter regSelect should be the first in an array of registers
-// containing the results of the sub-select.
-//
-// If pVector is of type TK_VECTOR, then code for the requested field
-// is generated. In this case (*pRegFree) may be set to the number of
-// a temporary register to be freed by the caller before returning.
-//
-// Before returning, output parameter (*ppExpr) is set to point to the
-// Expr object corresponding to element iElem of the vector.
+ crt.Xstrncpy(nil, &_generateSortTailØ00__func__Ø000[0], str(110720), 17)
+}
+
+// C comment
+// /*
+// ** Argument pVector points to a vector expression - either a TK_VECTOR
+// ** or TK_SELECT that returns more than one column. This function returns
+// ** the register number of a register that contains the value of
+// ** element iField of the vector.
+// **
+// ** If pVector is a TK_SELECT expression, then code for it must have
+// ** already been generated using the exprCodeSubselect() routine. In this
+// ** case parameter regSelect should be the first in an array of registers
+// ** containing the results of the sub-select.
+// **
+// ** If pVector is of type TK_VECTOR, then code for the requested field
+// ** is generated. In this case (*pRegFree) may be set to the number of
+// ** a temporary register to be freed by the caller before returning.
+// **
+// ** Before returning, output parameter (*ppExpr) is set to point to the
+// ** Expr object corresponding to element iElem of the vector.
+// */
func _exprVectorRegister(tls *crt.TLS, _pParse *XParse, _pVector *XExpr, _iField int32, _regSelect int32, _ppExpr **XExpr, _pRegFree *int32) (r0 int32) {
var _op uint8
- _op = _pVector.X0
+ _op = _pVector.Xop
func() {
- if int32(_op) != i32(158) && int32(_op) != i32(157) && int32(_op) != i32(119) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91384), unsafe.Pointer((*int8)(unsafe.Pointer(&_exprVectorRegisterØ00__func__Ø000))), unsafe.Pointer(str(110709)))
+ if int32(_op) != int32(158) && int32(_op) != int32(157) && int32(_op) != int32(119) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91384), unsafe.Pointer(&_exprVectorRegisterØ00__func__Ø000), unsafe.Pointer(str(110737)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_op) == i32(157) {
+ if int32(_op) == int32(157) {
*_ppExpr = _sqlite3VectorFieldSubexpr(tls, _pVector, _iField)
- return (_pVector.X8) + _iField
+ return _pVector.XiTable + _iField
}
- if int32(_op) == i32(119) {
- *_ppExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pVector.X6)))))).X0).X2))))) + 20*uintptr(_iField))).X0)
+ if int32(_op) == int32(119) {
+ *_ppExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)((*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pVector.Xx))).XpEList).Xa))), uintptr(_iField)).XpExpr)
return _regSelect + _iField
}
- *_ppExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pVector.X6)))))).X2))))) + 20*uintptr(_iField))).X0)
+ *_ppExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pVector.Xx))).Xa))), uintptr(_iField)).XpExpr)
return _sqlite3ExprCodeTemp(tls, _pParse, *_ppExpr, _pRegFree)
}
var _exprVectorRegisterØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_exprVectorRegisterØ00__func__Ø000[0], str(110759), 19)
+ crt.Xstrncpy(nil, &_exprVectorRegisterØ00__func__Ø000[0], str(110787), 19)
}
-// The first parameter (pDef) is a function implementation. The
-// second parameter (pExpr) is the first argument to this function.
-// If pExpr is a column in a virtual table, then let the virtual
-// table implementation have an opportunity to overload the function.
-//
-// This routine is used to allow virtual table implementations to
-// overload MATCH, LIKE, GLOB, and REGEXP operators.
-//
-// Return either the pDef argument (indicating no change) or a
-// new FuncDef structure that is marked as ephemeral using the
-// SQLITE_FUNC_EPHEM flag.
+// C comment
+// /*
+// ** The first parameter (pDef) is a function implementation. The
+// ** second parameter (pExpr) is the first argument to this function.
+// ** If pExpr is a column in a virtual table, then let the virtual
+// ** table implementation have an opportunity to overload the function.
+// **
+// ** This routine is used to allow virtual table implementations to
+// ** overload MATCH, LIKE, GLOB, and REGEXP operators.
+// **
+// ** Return either the pDef argument (indicating no change) or a
+// ** new FuncDef structure that is marked as ephemeral using the
+// ** SQLITE_FUNC_EPHEM flag.
+// */
func _sqlite3VtabOverloadFunction(tls *crt.TLS, _db *Xsqlite3, _pDef *XFuncDef, _nArg int32, _pExpr *XExpr) (r0 *XFuncDef) {
var _rc int32
var _zLowerName *int8
@@ -91909,53 +93023,50 @@ func _sqlite3VtabOverloadFunction(tls *crt.TLS, _db *Xsqlite3, _pDef *XFuncDef,
var _pMod *Xsqlite3_module
_xSFunc = nil
_pArg = nil
- _rc = i32(0)
+ _rc = int32(0)
if func() int32 {
if _pExpr == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126040), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabOverloadFunctionØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126040), unsafe.Pointer(&_sqlite3VtabOverloadFunctionØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return _pDef
}
- if int32(_pExpr.X0) != i32(152) {
+ if int32(_pExpr.Xop) != int32(152) {
return _pDef
}
- _pTab = (*XTable)(_pExpr.X14)
+ _pTab = (*XTable)(_pExpr.XpTab)
if _pTab == nil {
return _pDef
}
- if (_pTab.X16) == 0 {
+ if _pTab.XnModuleArg == 0 {
return _pDef
}
- _pVtab = (*Xsqlite3_vtab)(_sqlite3GetVTable(tls, _db, _pTab).X2)
+ _pVtab = (*Xsqlite3_vtab)(_sqlite3GetVTable(tls, _db, _pTab).XpVtab)
func() {
if _pVtab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126046), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabOverloadFunctionØ00__func__Ø000))), unsafe.Pointer(str(110778)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126046), unsafe.Pointer(&_sqlite3VtabOverloadFunctionØ00__func__Ø000), unsafe.Pointer(str(110806)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3_module)(_pVtab.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126047), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabOverloadFunctionØ00__func__Ø000))), unsafe.Pointer(str(110787)))
+ if (*Xsqlite3_module)(_pVtab.XpModule) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126047), unsafe.Pointer(&_sqlite3VtabOverloadFunctionØ00__func__Ø000), unsafe.Pointer(str(110815)))
crt.X__builtin_abort(tls)
}
}()
- _pMod = (*Xsqlite3_module)(_pVtab.X0)
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, int32, *int8, *func(*crt.TLS, *Xsqlite3_context, int32, **XMem), *unsafe.Pointer) int32
- }{(*(*func(*crt.TLS, *Xsqlite3_vtab, int32, *int8, *func(*crt.TLS, *Xsqlite3_context, int32, **XMem), *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8, *func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), *unsafe.Pointer) int32
- }{(_pMod.X18)})))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, int32, *int8, *func(*crt.TLS, *Xsqlite3_context, int32, **XMem), *unsafe.Pointer) int32
- }{nil})) {
+ _pMod = (*Xsqlite3_module)(_pVtab.XpModule)
+ if func() func(*crt.TLS, *Xsqlite3_vtab, int32, *int8, *func(*crt.TLS, *Xsqlite3_context, int32, **XMem), *unsafe.Pointer) int32 {
+ v := _pMod.XxFindFunction
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, int32, *int8, *func(*crt.TLS, *Xsqlite3_context, int32, **XMem), *unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }() == nil {
return _pDef
}
- _zLowerName = _sqlite3DbStrDup(tls, _db, _pDef.X6)
+ _zLowerName = _sqlite3DbStrDup(tls, _db, _pDef.XzName)
if _zLowerName == nil {
goto _11
}
@@ -91964,31 +93075,31 @@ _12:
if (*_z) == 0 {
goto _15
}
- *_z = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(*_z)))
+ *_z = *elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(*_z))
*(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
goto _12
_15:
- _rc = (*(*func(*crt.TLS, *Xsqlite3_vtab, int32, *int8, *func(*crt.TLS, *Xsqlite3_context, int32, **XMem), *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8, *func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), *unsafe.Pointer) int32
- }{(_pMod.X18)})))(tls, _pVtab, _nArg, _zLowerName, &_xSFunc, &_pArg)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zLowerName))
+ _rc = func() func(*crt.TLS, *Xsqlite3_vtab, int32, *int8, *func(*crt.TLS, *Xsqlite3_context, int32, **XMem), *unsafe.Pointer) int32 {
+ v := _pMod.XxFindFunction
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, int32, *int8, *func(*crt.TLS, *Xsqlite3_context, int32, **XMem), *unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()(tls, _pVtab, _nArg, _zLowerName, &_xSFunc, &_pArg)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zLowerName))
_11:
- if _rc == i32(0) {
+ if _rc == int32(0) {
return _pDef
}
- _pNew = (*XFuncDef)(_sqlite3DbMallocZero(tls, _db, uint64((u32(28)+uint32(_sqlite3Strlen30(tls, _pDef.X6)))+uint32(i32(1)))))
+ _pNew = (*XFuncDef)(_sqlite3DbMallocZero(tls, _db, uint64((uint32(28)+uint32(_sqlite3Strlen30(tls, _pDef.XzName)))+uint32(1))))
if _pNew == nil {
return _pDef
}
*_pNew = *_pDef
- *(**int8)(unsafe.Pointer(&(_pNew.X6))) = (*int8)(unsafe.Pointer((*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew)) + 28*uintptr(i32(1))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*XFuncDef)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew))+28*uintptr(i32(1))))), (unsafe.Pointer)(_pDef.X6), uint32(_sqlite3Strlen30(tls, _pDef.X6)+i32(1)))
- *(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&(_pNew.X4))))) = _xSFunc
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X2))) = _pArg
+ _pNew.XzName = (*int8)(unsafe.Pointer(elem17(_pNew, uintptr(1))))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem17(_pNew, uintptr(1))), unsafe.Pointer(_pDef.XzName), uint32(_sqlite3Strlen30(tls, _pDef.XzName)+int32(1)))
+ *(*func(*crt.TLS, *Xsqlite3_context, int32, **XMem))(unsafe.Pointer(&_pNew.XxSFunc)) = _xSFunc
+ _pNew.XpUserData = _pArg
{
- p := (*uint16)(unsafe.Pointer(&(_pNew.X1)))
- *p = uint16(int32(*p) | i32(16))
- sink14(*p)
+ p := &_pNew.XfuncFlags
+ *p = uint16(int32(*p) | int32(16))
}
return _pNew
}
@@ -91996,327 +93107,334 @@ _11:
var _sqlite3VtabOverloadFunctionØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabOverloadFunctionØ00__func__Ø000[0], str(110805), 28)
-}
-
-// The code generator calls this routine if is discovers that it is
-// possible to abort a statement prior to completion. In order to
-// perform this abort without corrupting the database, we need to make
-// sure that the statement is protected by a statement transaction.
-//
-// Technically, we only need to set the mayAbort flag if the
-// isMultiWrite flag was previously set. There is a time dependency
-// such that the abort must occur after the multiwrite. This makes
-// some statements involving the REPLACE conflict resolution algorithm
-// go a little faster. But taking advantage of this time dependency
-// makes it more difficult to prove that the code is correct (in
-// particular, it prevents us from writing an effective
-// implementation of sqlite3AssertMayAbort()) and so we have chosen
-// to take the safe route and skip the optimization.
+ crt.Xstrncpy(nil, &_sqlite3VtabOverloadFunctionØ00__func__Ø000[0], str(110833), 28)
+}
+
+// C comment
+// /*
+// ** The code generator calls this routine if is discovers that it is
+// ** possible to abort a statement prior to completion. In order to
+// ** perform this abort without corrupting the database, we need to make
+// ** sure that the statement is protected by a statement transaction.
+// **
+// ** Technically, we only need to set the mayAbort flag if the
+// ** isMultiWrite flag was previously set. There is a time dependency
+// ** such that the abort must occur after the multiwrite. This makes
+// ** some statements involving the REPLACE conflict resolution algorithm
+// ** go a little faster. But taking advantage of this time dependency
+// ** makes it more difficult to prove that the code is correct (in
+// ** particular, it prevents us from writing an effective
+// ** implementation of sqlite3AssertMayAbort()) and so we have chosen
+// ** to take the safe route and skip the optimization.
+// */
func _sqlite3MayAbort(tls *crt.TLS, _pParse *XParse) {
var _pToplevel *XParse
_pToplevel = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
- *(*uint8)(unsafe.Pointer(&(_pToplevel.X9))) = uint8(i32(1))
+ _pToplevel.XmayAbort = uint8(1)
}
-// Code an OP_Halt that causes the vdbe to return an SQLITE_CONSTRAINT
-// error. The onError parameter determines which (if any) of the statement
-// and/or current transaction is rolled back.
+// C comment
+// /*
+// ** Code an OP_Halt that causes the vdbe to return an SQLITE_CONSTRAINT
+// ** error. The onError parameter determines which (if any) of the statement
+// ** and/or current transaction is rolled back.
+// */
func _sqlite3HaltConstraint(tls *crt.TLS, _pParse *XParse, _errCode int32, _onError int32, _p4 *int8, _p4type int8, _p5Errmsg uint8) {
var _v *TVdbe
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
- if (_errCode & i32(255)) != i32(19) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103850), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3HaltConstraintØ00__func__Ø000))), unsafe.Pointer(str(110833)))
+ if (_errCode & int32(255)) != int32(19) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103850), unsafe.Pointer(&_sqlite3HaltConstraintØ00__func__Ø000), unsafe.Pointer(str(110861)))
crt.X__builtin_abort(tls)
}
}()
- if _onError == i32(2) {
+ if _onError == int32(2) {
_sqlite3MayAbort(tls, _pParse)
}
- _sqlite3VdbeAddOp4(tls, _v, i32(55), _errCode, _onError, i32(0), _p4, int32(_p4type))
+ _sqlite3VdbeAddOp4(tls, _v, int32(55), _errCode, _onError, int32(0), _p4, int32(_p4type))
_sqlite3VdbeChangeP5(tls, _v, uint16(_p5Errmsg))
}
var _sqlite3HaltConstraintØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3HaltConstraintØ00__func__Ø000[0], str(110867), 22)
-}
-
-// Prepare a virtual machine for execution for the first time after
-// creating the virtual machine. This involves things such
-// as allocating registers and initializing the program counter.
-// After the VDBE has be prepped, it can be executed by one or more
-// calls to sqlite3VdbeExec().
-//
-// This function may be called exactly once on each virtual machine.
-// After this routine is called the VM has been "packaged" and is ready
-// to run. After this routine is called, further calls to
-// sqlite3VdbeAddOp() functions are prohibited. This routine disconnects
-// the Vdbe from the Parse object that helped generate it so that the
-// the Vdbe becomes an independent entity and the Parse object can be
-// destroyed.
-//
-// Use the sqlite3VdbeRewind() procedure to restore a virtual machine back
-// to its initial state after it has been run.
+ crt.Xstrncpy(nil, &_sqlite3HaltConstraintØ00__func__Ø000[0], str(110895), 22)
+}
+
+// C comment
+// /*
+// ** Prepare a virtual machine for execution for the first time after
+// ** creating the virtual machine. This involves things such
+// ** as allocating registers and initializing the program counter.
+// ** After the VDBE has be prepped, it can be executed by one or more
+// ** calls to sqlite3VdbeExec().
+// **
+// ** This function may be called exactly once on each virtual machine.
+// ** After this routine is called the VM has been "packaged" and is ready
+// ** to run. After this routine is called, further calls to
+// ** sqlite3VdbeAddOp() functions are prohibited. This routine disconnects
+// ** the Vdbe from the Parse object that helped generate it so that the
+// ** the Vdbe becomes an independent entity and the Parse object can be
+// ** destroyed.
+// **
+// ** Use the sqlite3VdbeRewind() procedure to restore a virtual machine back
+// ** to its initial state after it has been run.
+// */
func _sqlite3VdbeMakeReady(tls *crt.TLS, _p *TVdbe, _pParse *XParse) {
var _nVar, _nMem, _nCursor, _nArg, _n int32
var _db *Xsqlite3
var _x TReusableSpace
func() {
if _p == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73360), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000))), unsafe.Pointer(str(789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73360), unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000), unsafe.Pointer(str(807)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X27) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73361), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000))), unsafe.Pointer(str(41716)))
+ if _p.XnOp <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73361), unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000), unsafe.Pointer(str(41671)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pParse == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73362), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000))), unsafe.Pointer(str(110889)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73362), unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000), unsafe.Pointer(str(110917)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X5) != uint32(i32(381479589)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73363), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000))), unsafe.Pointer(str(37642)))
+ if _p.Xmagic != uint32(381479589) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73363), unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000), unsafe.Pointer(str(37597)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pParse != (*XParse)(_p.X3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73364), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000))), unsafe.Pointer(str(110899)))
+ if _pParse != (*XParse)(_p.XpParse) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73364), unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000), unsafe.Pointer(str(110927)))
crt.X__builtin_abort(tls)
}
}()
- _db = (*Xsqlite3)(_p.X0)
+ _db = (*Xsqlite3)(_p.Xdb)
func() {
- if int32(_db.X17) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73366), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000))), unsafe.Pointer(str(1244)))
+ if int32(_db.XmallocFailed) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73366), unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000), unsafe.Pointer(str(1262)))
crt.X__builtin_abort(tls)
}
}()
- _nVar = int32(_pParse.X52)
- _nMem = _pParse.X18
- _nCursor = _pParse.X17
- _nArg = _pParse.X33
- {
- p := &_nMem
- *p = (*p) + _nCursor
- sink1(*p)
- }
- if (_nCursor == i32(0)) && (_nMem > i32(0)) {
+ _nVar = int32(_pParse.XnVar)
+ _nMem = _pParse.XnMem
+ _nCursor = _pParse.XnTab
+ _nArg = _pParse.XnMaxArg
+ _nMem += _nCursor
+ if (_nCursor == int32(0)) && (_nMem > int32(0)) {
_nMem += 1
}
- _n = int32(((u32(24) * uint32(_p.X27)) + uint32(i32(7))) & uint32(i32(-8)))
- *(**uint8)(unsafe.Pointer(&(_x.X0))) = (*uint8)(unsafe.Pointer(uintptr(_p.X17) + 1*uintptr(_n)))
+ _n = int32(((uint32(24) * uint32(_p.XnOp)) + uint32(7)) & uint32(4294967288))
+ _x.XpSpace = elem15((*uint8)(unsafe.Pointer((*XVdbeOp)(_p.XaOp))), uintptr(_n))
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_x.X0))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73386), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000))), unsafe.Pointer(str(110917)))
+ if (int32(uintptr(unsafe.Pointer(_x.XpSpace))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73386), unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000), unsafe.Pointer(str(110945)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_x.X1))) = ((_pParse.X20) - _n) & i32(-8)
+ _x.XnFree = (_pParse.XszOpAlloc - _n) & int32(-8)
func() {
- if (_x.X1) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73388), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000))), unsafe.Pointer(str(110948)))
+ if _x.XnFree < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73388), unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000), unsafe.Pointer(str(110976)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_x.X0))+1*uintptr(_x.X1)))))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73389), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000))), unsafe.Pointer(str(110959)))
+ if (int32(uintptr(unsafe.Pointer(elem15(_x.XpSpace, uintptr(_x.XnFree))))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73389), unsafe.Pointer(&_sqlite3VdbeMakeReadyØ00__func__Ø000), unsafe.Pointer(str(110987)))
crt.X__builtin_abort(tls)
}
}()
_resolveP2Values(tls, _p, &_nArg)
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(uint8(bool2int(((_pParse.X8) != 0) && ((_pParse.X9) != 0)))), 64, 6)
- if ((_pParse.X54) != 0) && (_nMem < i32(10)) {
- _nMem = i32(10)
+ storebits26(&_p.Xexpired, int16(uint8(bool2int((_pParse.XisMultiWrite != 0) && (_pParse.XmayAbort != 0)))), 64, 6)
+ if (_pParse.Xexplain != 0) && (_nMem < int32(10)) {
+ _nMem = int32(10)
}
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(0)), 1, 0)
+ storebits26(&_p.Xexpired, 0, 1, 0)
_23:
- *(*int32)(unsafe.Pointer(&(_x.X2))) = i32(0)
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X18))))) = (*XMem)(_allocSpace(tls, &_x, _p.X18, int32(uint32(_nMem)*u32(48))))
- *(**XMem)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X24))))) = (*XMem)(_allocSpace(tls, &_x, _p.X24, int32(uint32(_nVar)*u32(48))))
- *(***XMem)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_p.X19))))) = (**XMem)(_allocSpace(tls, &_x, (unsafe.Pointer)(_p.X19), int32(uint32(_nArg)*u32(4))))
- *(***XVdbeCursor)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_p.X23))))) = (**XVdbeCursor)(_allocSpace(tls, &_x, (unsafe.Pointer)(_p.X23), int32(uint32(_nCursor)*u32(4))))
- if (_x.X2) == i32(0) {
+ _x.XnNeeded = int32(0)
+ *(**XMem)(unsafe.Pointer(&_p.XaMem)) = (*XMem)(_allocSpace(tls, &_x, _p.XaMem, int32(uint32(_nMem)*uint32(48))))
+ *(**XMem)(unsafe.Pointer(&_p.XaVar)) = (*XMem)(_allocSpace(tls, &_x, _p.XaVar, int32(uint32(_nVar)*uint32(48))))
+ *(***XMem)(unsafe.Pointer(&_p.XapArg)) = (**XMem)(_allocSpace(tls, &_x, unsafe.Pointer(_p.XapArg), int32(uint32(_nArg)*uint32(4))))
+ *(***XVdbeCursor)(unsafe.Pointer(&_p.XapCsr)) = (**XVdbeCursor)(_allocSpace(tls, &_x, unsafe.Pointer(_p.XapCsr), int32(uint32(_nCursor)*uint32(4))))
+ if _x.XnNeeded == int32(0) {
goto _25
}
- *(**uint8)(unsafe.Pointer(&(_x.X0))) = (*uint8)(store11((*unsafe.Pointer)(unsafe.Pointer(&(_p.X37))), _sqlite3DbMallocRawNN(tls, _db, uint64(_x.X2))))
- *(*int32)(unsafe.Pointer(&(_x.X1))) = _x.X2
- if (_db.X17) == 0 {
+ _x.XpSpace = (*uint8)(store16(&_p.XpFree, _sqlite3DbMallocRawNN(tls, _db, uint64(_x.XnNeeded))))
+ _x.XnFree = _x.XnNeeded
+ if _db.XmallocFailed == 0 {
goto _23
}
_25:
- *(**int32)(unsafe.Pointer(&(_p.X25))) = _pParse.X60
- *(**int32)(unsafe.Pointer(&(_pParse.X60))) = nil
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(_pParse.X54), 12, 2)
- if (_db.X17) != 0 {
- *(*int16)(unsafe.Pointer(&(_p.X4))) = int16(i32(0))
- *(*int32)(unsafe.Pointer(&(_p.X7))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_p.X6))) = i32(0)
+ _p.XpVList = _pParse.XpVList
+ _pParse.XpVList = nil
+ storebits26(&_p.Xexpired, int16(_pParse.Xexplain), 12, 2)
+ if _db.XmallocFailed != 0 {
+ _p.XnVar = 0
+ _p.XnCursor = int32(0)
+ _p.XnMem = int32(0)
goto _27
}
- *(*int32)(unsafe.Pointer(&(_p.X7))) = _nCursor
- *(*int16)(unsafe.Pointer(&(_p.X4))) = int16(_nVar)
- _initMemArray(tls, (*XMem)(_p.X24), _nVar, _db, uint16(i32(1)))
- *(*int32)(unsafe.Pointer(&(_p.X6))) = _nMem
- _initMemArray(tls, (*XMem)(_p.X18), _nMem, _db, uint16(i32(128)))
- crt.Xmemset(tls, (unsafe.Pointer)(_p.X23), i32(0), uint32(_nCursor)*u32(4))
+ _p.XnCursor = _nCursor
+ _p.XnVar = int16(_nVar)
+ _initMemArray(tls, (*XMem)(_p.XaVar), _nVar, _db, uint16(1))
+ _p.XnMem = _nMem
+ _initMemArray(tls, (*XMem)(_p.XaMem), _nMem, _db, uint16(128))
+ crt.Xmemset(tls, unsafe.Pointer(_p.XapCsr), int32(0), uint32(_nCursor)*uint32(4))
_27:
_sqlite3VdbeRewind(tls, _p)
- _ = _x
}
var _sqlite3VdbeMakeReadyØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMakeReadyØ00__func__Ø000[0], str(111000), 21)
-}
-
-// This routine is called after all opcodes have been inserted. It loops
-// through all the opcodes and fixes up some details.
-//
-// (1) For each jump instruction with a negative P2 value (a label)
-// resolve the P2 value to an actual address.
-//
-// (2) Compute the maximum number of arguments used by any SQL function
-// and store that value in *pMaxFuncArgs.
-//
-// (3) Update the Vdbe.readOnly and Vdbe.bIsReader flags to accurately
-// indicate what the prepared statement actually does.
-//
-// (4) Initialize the p4.xAdvance pointer on opcodes that use it.
-//
-// (5) Reclaim the memory allocated for storing labels.
-//
-// This routine will only function correctly if the mkopcodeh.tcl generator
-// script numbers the opcodes correctly. Changes to this routine must be
-// coordinated with changes to mkopcodeh.tcl.
+ crt.Xstrncpy(nil, &_sqlite3VdbeMakeReadyØ00__func__Ø000[0], str(111028), 21)
+}
+
+// C comment
+// /*
+// ** This routine is called after all opcodes have been inserted. It loops
+// ** through all the opcodes and fixes up some details.
+// **
+// ** (1) For each jump instruction with a negative P2 value (a label)
+// ** resolve the P2 value to an actual address.
+// **
+// ** (2) Compute the maximum number of arguments used by any SQL function
+// ** and store that value in *pMaxFuncArgs.
+// **
+// ** (3) Update the Vdbe.readOnly and Vdbe.bIsReader flags to accurately
+// ** indicate what the prepared statement actually does.
+// **
+// ** (4) Initialize the p4.xAdvance pointer on opcodes that use it.
+// **
+// ** (5) Reclaim the memory allocated for storing labels.
+// **
+// ** This routine will only function correctly if the mkopcodeh.tcl generator
+// ** script numbers the opcodes correctly. Changes to this routine must be
+// ** coordinated with changes to mkopcodeh.tcl.
+// */
func _resolveP2Values(tls *crt.TLS, _p *TVdbe, _pMaxFuncArgs *int32) {
var _nMaxArgs, _8_n int32
var _aLabel *int32
var _pParse *XParse
var _pOp *XVdbeOp
_nMaxArgs = *_pMaxFuncArgs
- _pParse = (*XParse)(_p.X3)
- _aLabel = _pParse.X26
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 128, 7)
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(0)), 256, 8)
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17) + 24*uintptr((_p.X27)-i32(1))))
+ _pParse = (*XParse)(_p.XpParse)
+ _aLabel = _pParse.XaLabel
+ storebits26(&_p.Xexpired, int16(1), 128, 7)
+ storebits26(&_p.Xexpired, 0, 256, 8)
+ _pOp = elem61((*XVdbeOp)(_p.XaOp), uintptr(_p.XnOp-int32(1)))
_0:
- if int32(_pOp.X0) > i32(83) {
+ if int32(_pOp.Xopcode) > int32(83) {
goto _2
}
- switch int32(_pOp.X0) {
- case i32(0):
+ switch int32(_pOp.Xopcode) {
+ case int32(0):
goto _5
- case i32(1):
+ case int32(1):
goto _5
- case i32(2):
+ case int32(2):
goto _4
- case i32(3):
+ case int32(3):
goto _12
- case i32(4):
+ case int32(4):
goto _15
- case i32(5):
+ case int32(5):
goto _12
- case i32(6):
+ case int32(6):
goto _15
- case i32(7):
+ case int32(7):
goto _12
- case i32(8):
+ case int32(8):
goto _7
- case i32(9):
+ case int32(9):
goto _7
- case i32(10):
+ case int32(10):
goto _7
- case i32(11):
+ case int32(11):
goto _11
- case i32(12):
+ case int32(12):
goto _10
default:
goto _17
}
_4:
- if (_pOp.X4) != i32(0) {
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(0)), 128, 7)
+ if _pOp.Xp2 != int32(0) {
+ storebits26(&_p.Xexpired, 0, 128, 7)
}
_5:
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 256, 8)
+ storebits26(&_p.Xexpired, int16(1), 256, 8)
goto _17
_7:
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(0)), 128, 7)
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 256, 8)
+ storebits26(&_p.Xexpired, 0, 128, 7)
+ storebits26(&_p.Xexpired, int16(1), 256, 8)
goto _17
_10:
- if (_pOp.X4) > _nMaxArgs {
- _nMaxArgs = _pOp.X4
+ if _pOp.Xp2 > _nMaxArgs {
+ _nMaxArgs = _pOp.Xp2
}
goto _17
_11:
func() {
- if int32((uintptr(unsafe.Pointer(_pOp))-uintptr(unsafe.Pointer((*XVdbeOp)(_p.X17))))/24) < i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72021), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveP2ValuesØ00__func__Ø000))), unsafe.Pointer(str(111021)))
+ if int32((uintptr(unsafe.Pointer(_pOp))-uintptr(_p.XaOp))/24) < int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72021), unsafe.Pointer(&_resolveP2ValuesØ00__func__Ø000), unsafe.Pointer(str(111049)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp))+24*uintptr(i32(-1)))).X0) != i32(56) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72022), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveP2ValuesØ00__func__Ø000))), unsafe.Pointer(str(111041)))
+ if int32(elem61(_pOp, uintptr(4294967295)).Xopcode) != int32(56) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72022), unsafe.Pointer(&_resolveP2ValuesØ00__func__Ø000), unsafe.Pointer(str(111069)))
crt.X__builtin_abort(tls)
}
}()
- _8_n = (*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOp)) + 24*uintptr(i32(-1)))).X3
+ _8_n = elem61(_pOp, uintptr(4294967295)).Xp1
if _8_n > _nMaxArgs {
_nMaxArgs = _8_n
}
goto _17
_12:
- *(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))) = _sqlite3BtreeNext
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(-14))
+ *(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&_pOp.Xp4)))) = _sqlite3BtreeNext
+ _pOp.Xp4type = int8(-14)
goto _17
_15:
- *(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))) = _sqlite3BtreePrevious
- *(*int8)(unsafe.Pointer(&(_pOp.X1))) = int8(i32(-14))
+ *(*func(*crt.TLS, *XBtCursor, *int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&_pOp.Xp4)))) = _sqlite3BtreePrevious
+ _pOp.Xp4type = int8(-14)
goto _17
_17:
- if ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3OpcodeProperty)) + 1*uintptr(_pOp.X0)))) & i32(1)) != i32(0)) && ((_pOp.X4) < i32(0)) {
+ if ((int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3OpcodeProperty)), uintptr(_pOp.Xopcode))) & int32(1)) != int32(0)) && (_pOp.Xp2 < int32(0)) {
func() {
- if (i32(-1) - (_pOp.X4)) >= (_pParse.X25) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72043), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveP2ValuesØ00__func__Ø000))), unsafe.Pointer(str(111068)))
+ if (int32(-1) - _pOp.Xp2) >= _pParse.XnLabel {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72043), unsafe.Pointer(&_resolveP2ValuesØ00__func__Ø000), unsafe.Pointer(str(111096)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pOp.X4))) = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aLabel)) + 4*uintptr(i32(-1)-(_pOp.X4))))
+ _pOp.Xp2 = *elem8(_aLabel, uintptr(int32(-1)-_pOp.Xp2))
}
_2:
- if _pOp == (*XVdbeOp)(_p.X17) {
+ if _pOp == (*XVdbeOp)(_p.XaOp) {
goto _1
}
*(*uintptr)(unsafe.Pointer(&_pOp)) += uintptr(4294967272)
goto _0
_1:
- _sqlite3DbFree(tls, (*Xsqlite3)(_p.X0), (unsafe.Pointer)(_pParse.X26))
- *(**int32)(unsafe.Pointer(&(_pParse.X26))) = nil
- *(*int32)(unsafe.Pointer(&(_pParse.X25))) = i32(0)
+ _sqlite3DbFree(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_pParse.XaLabel))
+ _pParse.XaLabel = nil
+ _pParse.XnLabel = int32(0)
*_pMaxFuncArgs = _nMaxArgs
func() {
- if int32((uint32((_p.X32)>>uint(i32(8)))<<uint(i32(31)))>>uint(i32(31))) == i32(0) && (_p.X33) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72054), unsafe.Pointer((*int8)(unsafe.Pointer(&_resolveP2ValuesØ00__func__Ø000))), unsafe.Pointer(str(111097)))
+ if int32((uint32(_p.Xexpired>>8)<<31)>>31) == int32(0) && _p.XbtreeMask != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72054), unsafe.Pointer(&_resolveP2ValuesØ00__func__Ø000), unsafe.Pointer(str(111125)))
crt.X__builtin_abort(tls)
}
}()
@@ -92325,52 +93443,46 @@ _1:
var _resolveP2ValuesØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_resolveP2ValuesØ00__func__Ø000[0], str(111144), 16)
-}
-
-// Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf
-// from the ReusableSpace object. Return a pointer to the allocated
-// memory on success. If insufficient memory is available in the
-// ReusableSpace object, increase the ReusableSpace.nNeeded
-// value by the amount needed and return NULL.
-//
-// If pBuf is not initially NULL, that means that the memory has already
-// been allocated by a prior call to this routine, so just return a copy
-// of pBuf and leave ReusableSpace unchanged.
-//
-// This allocator is employed to repurpose unused slots at the end of the
-// opcode array of prepared state for other memory needs of the prepared
-// statement.
+ crt.Xstrncpy(nil, &_resolveP2ValuesØ00__func__Ø000[0], str(111172), 16)
+}
+
+// C comment
+// /* Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf
+// ** from the ReusableSpace object. Return a pointer to the allocated
+// ** memory on success. If insufficient memory is available in the
+// ** ReusableSpace object, increase the ReusableSpace.nNeeded
+// ** value by the amount needed and return NULL.
+// **
+// ** If pBuf is not initially NULL, that means that the memory has already
+// ** been allocated by a prior call to this routine, so just return a copy
+// ** of pBuf and leave ReusableSpace unchanged.
+// **
+// ** This allocator is employed to repurpose unused slots at the end of the
+// ** opcode array of prepared state for other memory needs of the prepared
+// ** statement.
+// */
func _allocSpace(tls *crt.TLS, _p *TReusableSpace, _pBuf unsafe.Pointer, _nByte int32) (r0 unsafe.Pointer) {
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_p.X0))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73277), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocSpaceØ00__func__Ø000))), unsafe.Pointer(str(111160)))
+ if (int32(uintptr(unsafe.Pointer(_p.XpSpace))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73277), unsafe.Pointer(&_allocSpaceØ00__func__Ø000), unsafe.Pointer(str(111188)))
crt.X__builtin_abort(tls)
}
}()
if _pBuf != nil {
goto _2
}
- _nByte = (_nByte + i32(7)) & i32(-8)
- if _nByte <= (_p.X1) {
- {
- p := (*int32)(unsafe.Pointer(&(_p.X1)))
- *p = (*p) - _nByte
- sink1(*p)
- }
- _pBuf = (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X0)) + 1*uintptr(_p.X1))))
+ _nByte = (_nByte + int32(7)) & int32(-8)
+ if _nByte <= _p.XnFree {
+ _p.XnFree -= _nByte
+ _pBuf = unsafe.Pointer(elem15(_p.XpSpace, uintptr(_p.XnFree)))
goto _4
}
- {
- p := (*int32)(unsafe.Pointer(&(_p.X2)))
- *p = (*p) + _nByte
- sink1(*p)
- }
+ _p.XnNeeded += _nByte
_4:
_2:
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(_pBuf)))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(73287), unsafe.Pointer((*int8)(unsafe.Pointer(&_allocSpaceØ00__func__Ø000))), unsafe.Pointer(str(111192)))
+ if (int32(uintptr(_pBuf)) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(73287), unsafe.Pointer(&_allocSpaceØ00__func__Ø000), unsafe.Pointer(str(111220)))
crt.X__builtin_abort(tls)
}
}()
@@ -92380,156 +93492,171 @@ _2:
var _allocSpaceØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_allocSpaceØ00__func__Ø000[0], str(111219), 11)
+ crt.Xstrncpy(nil, &_allocSpaceØ00__func__Ø000[0], str(111247), 11)
}
-// Generate VDBE code for a BEGIN statement.
+// C comment
+// /*
+// ** Generate VDBE code for a BEGIN statement.
+// */
func _sqlite3BeginTransaction(tls *crt.TLS, _pParse *XParse, _type int32) {
var _i int32
var _db *Xsqlite3
var _v *TVdbe
func() {
if _pParse == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103643), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTransactionØ00__func__Ø000))), unsafe.Pointer(str(110889)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103643), unsafe.Pointer(&_sqlite3BeginTransactionØ00__func__Ø000), unsafe.Pointer(str(110917)))
crt.X__builtin_abort(tls)
}
}()
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _db == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103645), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTransactionØ00__func__Ø000))), unsafe.Pointer(str(1201)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103645), unsafe.Pointer(&_sqlite3BeginTransactionØ00__func__Ø000), unsafe.Pointer(str(1219)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3AuthCheck(tls, _pParse, i32(22), str(24983), nil, nil) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(22), str(24938), nil, nil) != 0 {
return
}
_v = _sqlite3GetVdbe(tls, _pParse)
if _v == nil {
return
}
- if _type == i32(7) {
+ if _type == int32(7) {
goto _6
}
- _i = i32(0)
+ _i = int32(0)
_7:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _10
}
- _sqlite3VdbeAddOp2(tls, _v, i32(2), _i, bool2int(_type == i32(9))+i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(2), _i, bool2int(_type == int32(9))+int32(1))
_sqlite3VdbeUsesBtree(tls, _v, _i)
_i += 1
goto _7
_10:
_6:
- _sqlite3VdbeAddOp0(tls, _v, i32(1))
+ _sqlite3VdbeAddOp0(tls, _v, int32(1))
}
var _sqlite3BeginTransactionØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BeginTransactionØ00__func__Ø000[0], str(111230), 24)
+ crt.Xstrncpy(nil, &_sqlite3BeginTransactionØ00__func__Ø000[0], str(111258), 24)
}
-// Generate VDBE code for a COMMIT statement.
+// C comment
+// /*
+// ** Generate VDBE code for a COMMIT statement.
+// */
func _sqlite3CommitTransaction(tls *crt.TLS, _pParse *XParse) {
var _v *TVdbe
func() {
if _pParse == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103666), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CommitTransactionØ00__func__Ø000))), unsafe.Pointer(str(110889)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103666), unsafe.Pointer(&_sqlite3CommitTransactionØ00__func__Ø000), unsafe.Pointer(str(110917)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pParse.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103667), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CommitTransactionØ00__func__Ø000))), unsafe.Pointer(str(111254)))
+ if (*Xsqlite3)(_pParse.Xdb) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103667), unsafe.Pointer(&_sqlite3CommitTransactionØ00__func__Ø000), unsafe.Pointer(str(111282)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3AuthCheck(tls, _pParse, i32(22), str(25030), nil, nil) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(22), str(24985), nil, nil) != 0 {
return
}
_v = _sqlite3GetVdbe(tls, _pParse)
if _v != nil {
- _sqlite3VdbeAddOp1(tls, _v, i32(1), i32(1))
+ _sqlite3VdbeAddOp1(tls, _v, int32(1), int32(1))
}
}
var _sqlite3CommitTransactionØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CommitTransactionØ00__func__Ø000[0], str(111268), 25)
+ crt.Xstrncpy(nil, &_sqlite3CommitTransactionØ00__func__Ø000[0], str(111296), 25)
}
-// Generate VDBE code for a ROLLBACK statement.
+// C comment
+// /*
+// ** Generate VDBE code for a ROLLBACK statement.
+// */
func _sqlite3RollbackTransaction(tls *crt.TLS, _pParse *XParse) {
var _v *TVdbe
func() {
if _pParse == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103683), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RollbackTransactionØ00__func__Ø000))), unsafe.Pointer(str(110889)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103683), unsafe.Pointer(&_sqlite3RollbackTransactionØ00__func__Ø000), unsafe.Pointer(str(110917)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*Xsqlite3)(_pParse.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103684), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RollbackTransactionØ00__func__Ø000))), unsafe.Pointer(str(111254)))
+ if (*Xsqlite3)(_pParse.Xdb) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103684), unsafe.Pointer(&_sqlite3RollbackTransactionØ00__func__Ø000), unsafe.Pointer(str(111282)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3AuthCheck(tls, _pParse, i32(22), str(25041), nil, nil) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(22), str(24996), nil, nil) != 0 {
return
}
_v = _sqlite3GetVdbe(tls, _pParse)
if _v != nil {
- _sqlite3VdbeAddOp2(tls, _v, i32(1), i32(1), i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(1), int32(1), int32(1))
}
}
var _sqlite3RollbackTransactionØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RollbackTransactionØ00__func__Ø000[0], str(111293), 27)
+ crt.Xstrncpy(nil, &_sqlite3RollbackTransactionØ00__func__Ø000[0], str(111321), 27)
}
-// This function is called by the parser when it parses a command to create,
-// release or rollback an SQL savepoint.
+// C comment
+// /*
+// ** This function is called by the parser when it parses a command to create,
+// ** release or rollback an SQL savepoint.
+// */
func _sqlite3Savepoint(tls *crt.TLS, _pParse *XParse, _op int32, _pName *XToken) {
var _zName *int8
var _1_v *TVdbe
- _zName = _sqlite3NameFromToken(tls, (*Xsqlite3)(_pParse.X0), _pName)
+ _zName = _sqlite3NameFromToken(tls, (*Xsqlite3)(_pParse.Xdb), _pName)
if _zName == nil {
goto _0
}
_1_v = _sqlite3GetVdbe(tls, _pParse)
- i32(0)
- if (_1_v == nil) || _sqlite3AuthCheck(tls, _pParse, i32(32), *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3SavepointØ00azØ001)) + 4*uintptr(_op))), _zName, nil) != 0 {
- _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_zName))
+
+ if (_1_v == nil) || _sqlite3AuthCheck(tls, _pParse, int32(32), *elem0((**int8)(unsafe.Pointer(&_sqlite3SavepointØ00azØ001)), uintptr(_op)), _zName, nil) != 0 {
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_zName))
return
}
- _sqlite3VdbeAddOp4(tls, _1_v, i32(0), _op, i32(0), i32(0), _zName, i32(-1))
+ _sqlite3VdbeAddOp4(tls, _1_v, int32(0), _op, int32(0), int32(0), _zName, int32(-1))
_0:
}
var _sqlite3SavepointØ00azØ001 [3]*int8
func init() {
- _sqlite3SavepointØ00azØ001 = [3]*int8{str(24983), str(25060), str(25041)}
-}
-
-// Begin constructing a new table representation in memory. This is
-// the first of several action routines that get called in response
-// to a CREATE TABLE statement. In particular, this routine is called
-// after seeing tokens "CREATE" and "TABLE" and the table name. The isTemp
-// flag is true if the table should be stored in the auxiliary database
-// file instead of in the main database file. This is normally the case
-// when the "TEMP" or "TEMPORARY" keyword occurs in between
-// CREATE and TABLE.
-//
-// The new table record is initialized and put in pParse->pNewTable.
-// As more of the CREATE TABLE statement is parsed, additional action
-// routines will be called to add more information to this record.
-// At the end of the CREATE TABLE statement, the sqlite3EndTable() routine
-// is called to complete the construction of the new table record.
+ _sqlite3SavepointØ00azØ001 = [3]*int8{str(24938), str(25015), str(24996)}
+}
+
+// C comment
+// /*
+// ** Begin constructing a new table representation in memory. This is
+// ** the first of several action routines that get called in response
+// ** to a CREATE TABLE statement. In particular, this routine is called
+// ** after seeing tokens "CREATE" and "TABLE" and the table name. The isTemp
+// ** flag is true if the table should be stored in the auxiliary database
+// ** file instead of in the main database file. This is normally the case
+// ** when the "TEMP" or "TEMPORARY" keyword occurs in between
+// ** CREATE and TABLE.
+// **
+// ** The new table record is initialized and put in pParse->pNewTable.
+// ** As more of the CREATE TABLE statement is parsed, additional action
+// ** routines will be called to add more information to this record.
+// ** At the end of the CREATE TABLE statement, the sqlite3EndTable() routine
+// ** is called to complete the construction of the new table record.
+// */
func _sqlite3StartTable(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2 *XToken, _isTemp int32, _isView int32, _isVirtual int32, _noErr int32) {
var _iDb, _16_addr1, _16_fileFormat, _16_reg1, _16_reg2, _16_reg3 int32
var _zName, _5_zDb, _8_zDb *int8
@@ -92538,70 +93665,70 @@ func _sqlite3StartTable(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2
var _v *TVdbe
var _pName *XToken
_zName = nil
- _db = (*Xsqlite3)(_pParse.X0)
- if (((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0) && (((*t21)(unsafe.Pointer(&(_db.X33))).X0) == i32(1)) {
- _iDb = int32((*t21)(unsafe.Pointer(&(_db.X33))).X1)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if ((_db.Xinit.Xbusy) != 0) && ((_db.Xinit.XnewTnum) == int32(1)) {
+ _iDb = int32(_db.Xinit.XiDb)
_zName = _sqlite3DbStrDup(tls, _db, func() *int8 {
- if i32(1) != 0 && (_iDb == i32(1)) {
- return str(50007)
+ if int32(1) != 0 && (_iDb == int32(1)) {
+ return str(49962)
}
- return str(50026)
+ return str(49981)
}())
_pName = _pName1
goto _5
}
_iDb = _sqlite3TwoPartName(tls, _pParse, _pName1, _pName2, &_pName)
- if _iDb < i32(0) {
+ if _iDb < int32(0) {
return
}
- if ((i32(1) != 0 && _isTemp != 0) && ((_pName2.X1) > uint32(i32(0)))) && (_iDb != i32(1)) {
- _sqlite3ErrorMsg(tls, _pParse, str(111320))
+ if ((int32(1) != 0 && _isTemp != 0) && (_pName2.Xn > (0))) && (_iDb != int32(1)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(111348))
return
}
- if i32(1) != 0 && _isTemp != 0 {
- _iDb = i32(1)
+ if int32(1) != 0 && _isTemp != 0 {
+ _iDb = int32(1)
}
_zName = _sqlite3NameFromToken(tls, _db, _pName)
_5:
- *(*XToken)(unsafe.Pointer(&(_pParse.X50))) = *_pName
+ _pParse.XsNameToken = *_pName
if _zName == nil {
return
}
- if i32(0) != _sqlite3CheckObjectName(tls, _pParse, _zName) {
+ if int32(0) != _sqlite3CheckObjectName(tls, _pParse, _zName) {
goto _begin_table_error
}
- if int32((*t21)(unsafe.Pointer(&(_db.X33))).X1) == i32(1) {
- _isTemp = i32(1)
+ if int32(_db.Xinit.XiDb) == int32(1) {
+ _isTemp = int32(1)
}
func() {
- if _isTemp != i32(0) && _isTemp != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100579), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000))), unsafe.Pointer(str(111361)))
+ if _isTemp != int32(0) && _isTemp != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100579), unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000), unsafe.Pointer(str(111389)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _isView != i32(0) && _isView != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100580), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000))), unsafe.Pointer(str(111384)))
+ if _isView != int32(0) && _isView != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100580), unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000), unsafe.Pointer(str(111412)))
crt.X__builtin_abort(tls)
}
}()
- _5_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- if _sqlite3AuthCheck(tls, _pParse, i32(18), func() *int8 {
- if i32(1) != 0 && (_isTemp == i32(1)) {
- return str(50007)
+ _5_zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ if _sqlite3AuthCheck(tls, _pParse, int32(18), func() *int8 {
+ if int32(1) != 0 && (_isTemp == int32(1)) {
+ return str(49962)
}
- return str(50026)
+ return str(49981)
}(), nil, _5_zDb) != 0 {
goto _begin_table_error
}
- if (_isVirtual == 0) && _sqlite3AuthCheck(tls, _pParse, int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3StartTableØ00aCodeØ001)) + 1*uintptr(_isTemp+(i32(2)*_isView))))), _zName, nil, _5_zDb) != 0 {
+ if (_isVirtual == 0) && _sqlite3AuthCheck(tls, _pParse, int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3StartTableØ00aCodeØ001)), uintptr(_isTemp+(int32(2)*_isView)))), _zName, nil, _5_zDb) != 0 {
goto _begin_table_error
}
- if (_pParse.X55) != 0 {
+ if _pParse.XdeclareVtab != 0 {
goto _28
}
- _8_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- if i32(0) != _sqlite3ReadSchema(tls, _pParse) {
+ _8_zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ if int32(0) != _sqlite3ReadSchema(tls, _pParse) {
goto _begin_table_error
}
_pTable = _sqlite3FindTable(tls, _db, _zName, _8_zDb)
@@ -92609,12 +93736,12 @@ _5:
goto _30
}
if _noErr == 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(111407), unsafe.Pointer(_pName))
+ _sqlite3ErrorMsg(tls, _pParse, str(111435), unsafe.Pointer(_pName))
goto _32
}
func() {
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 && (_sqlite3Config.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100616), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000))), unsafe.Pointer(str(111431)))
+ if (_db.Xinit.Xbusy) != 0 && _sqlite3Config.XneverCorrupt != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100616), unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000), unsafe.Pointer(str(111459)))
crt.X__builtin_abort(tls)
}
}()
@@ -92623,136 +93750,138 @@ _32:
goto _begin_table_error
_30:
if _sqlite3FindIndex(tls, _db, _zName, _8_zDb) != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(111460), unsafe.Pointer(_zName))
+ _sqlite3ErrorMsg(tls, _pParse, str(111488), unsafe.Pointer(_zName))
goto _begin_table_error
}
_28:
- _pTable = (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(u32(80))))
+ _pTable = (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(80)))
if _pTable == nil {
func() {
- if (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100629), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000))), unsafe.Pointer(str(47848)))
+ if _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100629), unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000), unsafe.Pointer(str(47803)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = _sqlite3NomemError(tls, i32(100630))
- *(*int32)(unsafe.Pointer(&(_pParse.X16))) += 1
+ _pParse.Xrc = _sqlite3NomemError(tls, int32(100630))
+ _pParse.XnErr += 1
goto _begin_table_error
}
- *(**int8)(unsafe.Pointer(&(_pTable.X0))) = _zName
- *(*int16)(unsafe.Pointer(&(_pTable.X10))) = int16(i32(-1))
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTable.X20))))) = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4)
- *(*uint32)(unsafe.Pointer(&(_pTable.X8))) = uint32(i32(1))
- *(*int16)(unsafe.Pointer(&(_pTable.X12))) = int16(i32(200))
+ _pTable.XzName = _zName
+ _pTable.XiPKey = int16(-1)
+ *(**XSchema)(unsafe.Pointer(&_pTable.XpSchema)) = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema)
+ _pTable.XnTabRef = uint32(1)
+ _pTable.XnRowLogEst = int16(200)
func() {
- if i32(200) != int32(_sqlite3LogEst(tls, uint64(i32(1048576)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100638), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000))), unsafe.Pointer(str(48127)))
+ if int32(200) != int32(_sqlite3LogEst(tls, uint64(1048576))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100638), unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000), unsafe.Pointer(str(48082)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XTable)(_pParse.X63) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100639), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000))), unsafe.Pointer(str(24634)))
+ if (*XTable)(_pParse.XpNewTable) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100639), unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000), unsafe.Pointer(str(24589)))
crt.X__builtin_abort(tls)
}
}()
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X63))))) = _pTable
- if ((_pParse.X6) == 0) && (crt.Xstrcmp(tls, _zName, str(111495)) == i32(0)) {
+ *(**XTable)(unsafe.Pointer(&_pParse.XpNewTable)) = _pTable
+ if (_pParse.Xnested == 0) && (crt.Xstrcmp(tls, _zName, str(111523)) == int32(0)) {
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100648), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100648), unsafe.Pointer(&_sqlite3StartTableØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XSchema)(_pTable.X20).X6))))) = _pTable
+ *(**XTable)(unsafe.Pointer(&((*XSchema)(_pTable.XpSchema).XpSeqTab))) = _pTable
}
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 || store38(&_v, _sqlite3GetVdbe(tls, _pParse)) == nil {
+ if (_db.Xinit.Xbusy) != 0 || store60(&_v, _sqlite3GetVdbe(tls, _pParse)) == nil {
goto _49
}
- _sqlite3BeginWriteOperation(tls, _pParse, i32(1), _iDb)
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(1), _iDb)
if _isVirtual != 0 {
- _sqlite3VdbeAddOp0(tls, _v, i32(155))
+ _sqlite3VdbeAddOp0(tls, _v, int32(155))
}
- _16_reg1 = store1((*int32)(unsafe.Pointer(&(_pParse.X31))), preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1))
- _16_reg2 = store1((*int32)(unsafe.Pointer(&(_pParse.X32))), preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1))
- _16_reg3 = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp3(tls, _v, i32(103), _iDb, _16_reg3, i32(2))
+ _16_reg1 = store2(&_pParse.XregRowid, preInc2(&_pParse.XnMem, 1))
+ _16_reg2 = store2(&_pParse.XregRoot, preInc2(&_pParse.XnMem, 1))
+ _16_reg3 = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp3(tls, _v, int32(103), _iDb, _16_reg3, int32(2))
_sqlite3VdbeUsesBtree(tls, _v, _iDb)
- _16_addr1 = _sqlite3VdbeAddOp1(tls, _v, i32(21), _16_reg3)
+ _16_addr1 = _sqlite3VdbeAddOp1(tls, _v, int32(21), _16_reg3)
_16_fileFormat = func() int32 {
- if ((_db.X6) & i32(32768)) != i32(0) {
- return i32(1)
+ if (_db.Xflags & int32(32768)) != int32(0) {
+ return int32(1)
}
- return i32(4)
+ return int32(4)
}()
- _sqlite3VdbeAddOp3(tls, _v, i32(104), _iDb, i32(2), _16_fileFormat)
- _sqlite3VdbeAddOp3(tls, _v, i32(104), _iDb, i32(5), int32(_db.X14))
+ _sqlite3VdbeAddOp3(tls, _v, int32(104), _iDb, int32(2), _16_fileFormat)
+ _sqlite3VdbeAddOp3(tls, _v, int32(104), _iDb, int32(5), int32(_db.Xenc))
_sqlite3VdbeJumpHere(tls, _v, _16_addr1)
if _isView != 0 || _isVirtual != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _16_reg2)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _16_reg2)
goto _55
}
- *(*int32)(unsafe.Pointer(&(_pParse.X41))) = _sqlite3VdbeAddOp2(tls, _v, i32(137), _iDb, _16_reg2)
+ _pParse.XaddrCrTab = _sqlite3VdbeAddOp2(tls, _v, int32(137), _iDb, _16_reg2)
_55:
_sqlite3OpenMasterTable(tls, _pParse, _iDb)
- _sqlite3VdbeAddOp2(tls, _v, i32(117), i32(0), _16_reg1)
- _sqlite3VdbeAddOp4(tls, _v, i32(61), i32(6), _16_reg3, i32(0), (*int8)(unsafe.Pointer(&_sqlite3StartTableØ00nullRowØ002)), i32(-2))
- _sqlite3VdbeAddOp3(tls, _v, i32(118), i32(0), _16_reg3, _16_reg1)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(8)))
- _sqlite3VdbeAddOp0(tls, _v, i32(114))
+ _sqlite3VdbeAddOp2(tls, _v, int32(117), int32(0), _16_reg1)
+ _sqlite3VdbeAddOp4(tls, _v, int32(61), int32(6), _16_reg3, int32(0), (*int8)(unsafe.Pointer(&_sqlite3StartTableØ00nullRowØ002)), int32(-2))
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), int32(0), _16_reg3, _16_reg1)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(8))
+ _sqlite3VdbeAddOp0(tls, _v, int32(114))
_49:
return
_begin_table_error:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zName))
-}
-
-// The table or view or trigger name is passed to this routine via tokens
-// pName1 and pName2. If the table name was fully qualified, for example:
-//
-// CREATE TABLE xxx.yyy (...);
-//
-// Then pName1 is set to "xxx" and pName2 "yyy". On the other hand if
-// the table name is not fully qualified, i.e.:
-//
-// CREATE TABLE yyy(...);
-//
-// Then pName1 is set to "yyy" and pName2 is "".
-//
-// This routine sets the *ppUnqual pointer to point at the token (pName1 or
-// pName2) that stores the unqualified table name. The index of the
-// database "xxx" is returned.
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zName))
+}
+
+// C comment
+// /* The table or view or trigger name is passed to this routine via tokens
+// ** pName1 and pName2. If the table name was fully qualified, for example:
+// **
+// ** CREATE TABLE xxx.yyy (...);
+// **
+// ** Then pName1 is set to "xxx" and pName2 "yyy". On the other hand if
+// ** the table name is not fully qualified, i.e.:
+// **
+// ** CREATE TABLE yyy(...);
+// **
+// ** Then pName1 is set to "yyy" and pName2 is "".
+// **
+// ** This routine sets the *ppUnqual pointer to point at the token (pName1 or
+// ** pName2) that stores the unqualified table name. The index of the
+// ** database "xxx" is returned.
+// */
func _sqlite3TwoPartName(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2 *XToken, _pUnqual **XToken) (r0 int32) {
var _iDb int32
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _pName2 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100464), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TwoPartNameØ00__func__Ø000))), unsafe.Pointer(str(111511)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100464), unsafe.Pointer(&_sqlite3TwoPartNameØ00__func__Ø000), unsafe.Pointer(str(111539)))
crt.X__builtin_abort(tls)
}
}()
- if (_pName2.X1) <= uint32(i32(0)) {
+ if _pName2.Xn <= (0) {
goto _2
}
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(111521))
- return i32(-1)
+ if (_db.Xinit.Xbusy) != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(111549))
+ return int32(-1)
}
*_pUnqual = _pName2
_iDb = _sqlite3FindDb(tls, _db, _pName1)
- if _iDb < i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(111538), unsafe.Pointer(_pName1))
- return i32(-1)
+ if _iDb < int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(111566), unsafe.Pointer(_pName1))
+ return int32(-1)
}
goto _5
_2:
func() {
- if int32((*t21)(unsafe.Pointer(&(_db.X33))).X1) != i32(0) && ((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 && ((_db.X6)&i32(268435456)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100477), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TwoPartNameØ00__func__Ø000))), unsafe.Pointer(str(111558)))
+ if int32(_db.Xinit.XiDb) != int32(0) && (_db.Xinit.Xbusy) == 0 && (_db.Xflags&int32(268435456)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100477), unsafe.Pointer(&_sqlite3TwoPartNameØ00__func__Ø000), unsafe.Pointer(str(111586)))
crt.X__builtin_abort(tls)
}
}()
- _iDb = int32((*t21)(unsafe.Pointer(&(_db.X33))).X1)
+ _iDb = int32(_db.Xinit.XiDb)
*_pUnqual = _pName1
_5:
return _iDb
@@ -92761,39 +93890,45 @@ _5:
var _sqlite3TwoPartNameØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TwoPartNameØ00__func__Ø000[0], str(111625), 19)
+ crt.Xstrncpy(nil, &_sqlite3TwoPartNameØ00__func__Ø000[0], str(111653), 19)
}
-// The token *pName contains the name of a database (either "main" or
-// "temp" or the name of an attached db). This routine returns the
-// index of the named database in db->aDb[], or -1 if the named db
-// does not exist.
+// C comment
+// /*
+// ** The token *pName contains the name of a database (either "main" or
+// ** "temp" or the name of an attached db). This routine returns the
+// ** index of the named database in db->aDb[], or -1 if the named db
+// ** does not exist.
+// */
func _sqlite3FindDb(tls *crt.TLS, _db *Xsqlite3, _pName *XToken) (r0 int32) {
var _i int32
var _zName *int8
_zName = _sqlite3NameFromToken(tls, _db, _pName)
_i = _sqlite3FindDbName(tls, _db, _zName)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zName))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zName))
return _i
}
-// This routine is used to check if the UTF-8 string zName is a legal
-// unqualified name for a new schema object (table, index, view or
-// trigger). All names are legal except those that begin with the string
-// "sqlite_" (in upper, lower or mixed case). This portion of the namespace
-// is reserved for internal use.
+// C comment
+// /*
+// ** This routine is used to check if the UTF-8 string zName is a legal
+// ** unqualified name for a new schema object (table, index, view or
+// ** trigger). All names are legal except those that begin with the string
+// ** "sqlite_" (in upper, lower or mixed case). This portion of the namespace
+// ** is reserved for internal use.
+// */
func _sqlite3CheckObjectName(tls *crt.TLS, _pParse *XParse, _zName *int8) (r0 int32) {
- if (((((*t21)(unsafe.Pointer(&((*Xsqlite3)(_pParse.X0).X33))).X2) == 0) && (int32(_pParse.X6) == i32(0))) && ((((*Xsqlite3)(_pParse.X0).X6) & i32(2048)) == i32(0))) && (i32(0) == Xsqlite3_strnicmp(tls, _zName, str(111644), i32(7))) {
- _sqlite3ErrorMsg(tls, _pParse, str(111652), unsafe.Pointer(_zName))
- return i32(1)
+ if ((((((*Xsqlite3)(_pParse.Xdb).Xinit).Xbusy) == 0) && (int32(_pParse.Xnested) == int32(0))) && ((((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(2048)) == int32(0))) && (int32(0) == Xsqlite3_strnicmp(tls, _zName, str(111672), int32(7))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(111680), unsafe.Pointer(_zName))
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}
var _sqlite3StartTableØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3StartTableØ00__func__Ø000[0], str(111694), 18)
+ crt.Xstrncpy(nil, &_sqlite3StartTableØ00__func__Ø000[0], str(111722), 18)
}
var _sqlite3StartTableØ00aCodeØ001 [4]uint8
@@ -92802,47 +93937,48 @@ func init() {
_sqlite3StartTableØ00aCodeØ001 = [4]uint8{2, 4, 8, 6}
}
-// Generate VDBE code that prepares for doing an operation that
-// might change the database.
-//
-// This routine starts a new transaction if we are not already within
-// a transaction. If we are already within a transaction, then a checkpoint
-// is set if the setStatement parameter is true. A checkpoint should
-// be set for operations that might fail (due to a constraint) part of
-// the way through and which will need to undo some writes without having to
-// rollback the whole transaction. For operations where all constraints
-// can be checked before any changes are made to the database, it is never
-// necessary to undo a write and the checkpoint should not be set.
+// C comment
+// /*
+// ** Generate VDBE code that prepares for doing an operation that
+// ** might change the database.
+// **
+// ** This routine starts a new transaction if we are not already within
+// ** a transaction. If we are already within a transaction, then a checkpoint
+// ** is set if the setStatement parameter is true. A checkpoint should
+// ** be set for operations that might fail (due to a constraint) part of
+// ** the way through and which will need to undo some writes without having to
+// ** rollback the whole transaction. For operations where all constraints
+// ** can be checked before any changes are made to the database, it is never
+// ** necessary to undo a write and the checkpoint should not be set.
+// */
func _sqlite3BeginWriteOperation(tls *crt.TLS, _pParse *XParse, _setStatement int32, _iDb int32) {
var _pToplevel *XParse
_pToplevel = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
_sqlite3CodeVerifySchema(tls, _pParse, _iDb)
+ _pToplevel.XwriteMask |= uint32(1) << uint(_iDb)
{
- p := (*uint32)(unsafe.Pointer(&(_pToplevel.X29)))
- *p = (*p) | (u32(1) << uint(_iDb))
- sink5(*p)
- }
- {
- p := (*uint8)(unsafe.Pointer(&(_pToplevel.X8)))
+ p := &_pToplevel.XisMultiWrite
*p = uint8(int32(*p) | _setStatement)
- sink2(*p)
}
}
-// Open the sqlite_master table stored in database number iDb for
-// writing. The table is opened using cursor 0.
+// C comment
+// /*
+// ** Open the sqlite_master table stored in database number iDb for
+// ** writing. The table is opened using cursor 0.
+// */
func _sqlite3OpenMasterTable(tls *crt.TLS, _p *XParse, _iDb int32) {
var _v *TVdbe
_v = _sqlite3GetVdbe(tls, _p)
- _sqlite3TableLock(tls, _p, _iDb, i32(1), uint8(i32(1)), str(50026))
- _sqlite3VdbeAddOp4Int(tls, _v, i32(107), i32(0), i32(1), _iDb, i32(5))
- if (_p.X17) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_p.X17))) = i32(1)
+ _sqlite3TableLock(tls, _p, _iDb, int32(1), uint8(1), str(49981))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(107), int32(0), int32(1), _iDb, int32(5))
+ if _p.XnTab == int32(0) {
+ _p.XnTab = int32(1)
}
}
@@ -92852,31 +93988,37 @@ func init() {
_sqlite3StartTableØ00nullRowØ002 = [6]int8{6, 0, 0, 0, 0, 0}
}
-// Disable lookaside memory allocation for objects that might be
-// shared across database connections.
+// C comment
+// /*
+// ** Disable lookaside memory allocation for objects that might be
+// ** shared across database connections.
+// */
func _disableLookaside(tls *crt.TLS, _pParse *XParse) {
- *(*uint8)(unsafe.Pointer(&(_pParse.X12))) += 1
- *(*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&((*Xsqlite3)(_pParse.X0).X58))).X0))) += 1
-}
-
-// This routine is called to report the final ")" that terminates
-// a CREATE TABLE statement.
-//
-// The table structure that other action routines have been building
-// is added to the internal hash tables, assuming no errors have
-// occurred.
-//
-// An entry for the table is made in the master table on disk, unless
-// this is a temporary table or db->init.busy==1. When db->init.busy==1
-// it means we are reading the sqlite_master table because we just
-// connected to the database or because the sqlite_master table has
-// recently changed, so the entry for this table already exists in
-// the sqlite_master table. We do not want to create it again.
-//
-// If the pSelect argument is not NULL, it means that this routine
-// was called to create a table generated from a
-// "CREATE TABLE ... AS SELECT ..." statement. The column names of
-// the new table will match the result set of the SELECT.
+ _pParse.XdisableLookaside += 1
+ ((*Xsqlite3)(_pParse.Xdb).Xlookaside).XbDisable += 1
+}
+
+// C comment
+// /*
+// ** This routine is called to report the final ")" that terminates
+// ** a CREATE TABLE statement.
+// **
+// ** The table structure that other action routines have been building
+// ** is added to the internal hash tables, assuming no errors have
+// ** occurred.
+// **
+// ** An entry for the table is made in the master table on disk, unless
+// ** this is a temporary table or db->init.busy==1. When db->init.busy==1
+// ** it means we are reading the sqlite_master table because we just
+// ** connected to the database or because the sqlite_master table has
+// ** recently changed, so the entry for this table already exists in
+// ** the sqlite_master table. We do not want to create it again.
+// **
+// ** If the pSelect argument is not NULL, it means that this routine
+// ** was called to create a table generated from a
+// ** "CREATE TABLE ... AS SELECT ..." statement. The column names of
+// ** the new table will match the result set of the SELECT.
+// */
func _sqlite3EndTable(tls *crt.TLS, _pParse *XParse, _pCons *XToken, _pEnd *XToken, _tabOpts uint8, _pSelect *XSelect) {
var _iDb, _9_n, _12_regYield, _12_addrTop, _12_regRec, _12_regRowid, _12_addrInsLoop, _19_nName int32
var _9_zType, _9_zType2, _9_zStmt, _19_zName *int8
@@ -92888,119 +94030,111 @@ func _sqlite3EndTable(tls *crt.TLS, _pParse *XParse, _pCons *XToken, _pEnd *XTok
var _14_pEnd2 *XToken
var _pIdx *XIndex
var _12_dest XSelectDest
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
if (_pEnd == nil) && (_pSelect == nil) {
return
}
func() {
- if (_db.X17) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101544), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000))), unsafe.Pointer(str(23869)))
+ if _db.XmallocFailed != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101544), unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000), unsafe.Pointer(str(23824)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*XTable)(_pParse.X63)
+ _p = (*XTable)(_pParse.XpNewTable)
if _p == nil {
return
}
func() {
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 && _pSelect != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101548), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000))), unsafe.Pointer(str(111712)))
+ if (_db.Xinit.Xbusy) != 0 && _pSelect != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101548), unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000), unsafe.Pointer(str(111740)))
crt.X__builtin_abort(tls)
}
}()
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 {
+ if (_db.Xinit.Xbusy) == 0 {
goto _8
}
- *(*int32)(unsafe.Pointer(&(_p.X7))) = (*t21)(unsafe.Pointer(&(_db.X33))).X0
- if (_p.X7) == i32(1) {
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X9)))
- *p = (*p) | uint32(i32(1))
- sink5(*p)
- }
+ _p.Xtnum = _db.Xinit.XnewTnum
+ if _p.Xtnum == int32(1) {
+ _p.XtabFlags |= uint32(1)
}
_8:
- if (int32(_tabOpts) & i32(32)) == 0 {
+ if (int32(_tabOpts) & int32(32)) == 0 {
goto _10
}
- if ((_p.X9) & uint32(i32(8))) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(111739))
+ if (_p.XtabFlags & uint32(8)) != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(111767))
return
}
- if ((_p.X9) & uint32(i32(4))) == uint32(i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(111789), unsafe.Pointer(_p.X0))
+ if (_p.XtabFlags & uint32(4)) == (0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(111817), unsafe.Pointer(_p.XzName))
goto _13
}
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X9)))
- *p = (*p) | uint32(i32(96))
- sink5(*p)
- }
+ _p.XtabFlags |= uint32(96)
_convertToWithoutRowidTable(tls, _pParse, _p)
_13:
_10:
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_p.X20))
- if (*XExprList)(_p.X6) != nil {
- _sqlite3ResolveSelfReference(tls, _pParse, _p, i32(4), nil, (*XExprList)(_p.X6))
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_p.XpSchema))
+ if _p.XpCheck != nil {
+ _sqlite3ResolveSelfReference(tls, _pParse, _p, int32(4), nil, (*XExprList)(_p.XpCheck))
}
_estimateTableWidth(tls, _p)
- _pIdx = (*XIndex)(_p.X2)
+ _pIdx = (*XIndex)(_p.XpIndex)
_15:
if _pIdx == nil {
goto _18
}
_estimateIndexWidth(tls, _pIdx)
- _pIdx = (*XIndex)(_pIdx.X5)
+ _pIdx = (*XIndex)(_pIdx.XpNext)
goto _15
_18:
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 {
+ if (_db.Xinit.Xbusy) != 0 {
goto _19
}
_9_v = _sqlite3GetVdbe(tls, _pParse)
if func() int32 {
if _9_v == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101609), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101609), unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
- _sqlite3VdbeAddOp1(tls, _9_v, i32(114), i32(0))
- if (*XSelect)(_p.X3) == nil {
- _9_zType = str(61730)
- _9_zType2 = str(25071)
+ _sqlite3VdbeAddOp1(tls, _9_v, int32(114), int32(0))
+ if (*XSelect)(_p.XpSelect) == nil {
+ _9_zType = str(93816)
+ _9_zType2 = str(25026)
goto _24
}
- _9_zType = str(111821)
- _9_zType2 = str(25358)
+ _9_zType = str(111849)
+ _9_zType2 = str(25313)
_24:
if _pSelect == nil {
goto _25
}
- _12_regYield = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _12_regRec = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _12_regRowid = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ _12_regYield = preInc2(&_pParse.XnMem, 1)
+ _12_regRec = preInc2(&_pParse.XnMem, 1)
+ _12_regRowid = preInc2(&_pParse.XnMem, 1)
func() {
- if (_pParse.X17) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101653), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000))), unsafe.Pointer(str(111826)))
+ if _pParse.XnTab != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101653), unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000), unsafe.Pointer(str(111854)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3MayAbort(tls, _pParse)
- _sqlite3VdbeAddOp3(tls, _9_v, i32(107), i32(1), _pParse.X32, _iDb)
- _sqlite3VdbeChangeP5(tls, _9_v, uint16(i32(16)))
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) = i32(2)
- _12_addrTop = _sqlite3VdbeCurrentAddr(tls, _9_v) + i32(1)
- _sqlite3VdbeAddOp3(tls, _9_v, i32(15), _12_regYield, i32(0), _12_addrTop)
- _sqlite3SelectDestInit(tls, &_12_dest, i32(13), _12_regYield)
+ _sqlite3VdbeAddOp3(tls, _9_v, int32(107), int32(1), _pParse.XregRoot, _iDb)
+ _sqlite3VdbeChangeP5(tls, _9_v, uint16(16))
+ _pParse.XnTab = int32(2)
+ _12_addrTop = _sqlite3VdbeCurrentAddr(tls, _9_v) + int32(1)
+ _sqlite3VdbeAddOp3(tls, _9_v, int32(15), _12_regYield, int32(0), _12_addrTop)
+ _sqlite3SelectDestInit(tls, &_12_dest, int32(13), _12_regYield)
_sqlite3Select(tls, _pParse, _pSelect, &_12_dest)
_sqlite3VdbeEndCoroutine(tls, _9_v, _12_regYield)
- _sqlite3VdbeJumpHere(tls, _9_v, _12_addrTop-i32(1))
- if (_pParse.X16) != 0 {
+ _sqlite3VdbeJumpHere(tls, _9_v, _12_addrTop-int32(1))
+ if _pParse.XnErr != 0 {
return
}
_12_pSelTab = _sqlite3ResultSetOfSelect(tls, _pParse, _pSelect)
@@ -93008,24 +94142,24 @@ _24:
return
}
func() {
- if (*XColumn)(_p.X1) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101667), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000))), unsafe.Pointer(str(111842)))
+ if (*XColumn)(_p.XaCol) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101667), unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000), unsafe.Pointer(str(111870)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_p.X11))) = _12_pSelTab.X11
- *(**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = (*XColumn)(_12_pSelTab.X1)
- *(*int16)(unsafe.Pointer(&(_12_pSelTab.X11))) = int16(i32(0))
- *(**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_12_pSelTab.X1))))) = nil
+ _p.XnCol = _12_pSelTab.XnCol
+ *(**XColumn)(unsafe.Pointer(&_p.XaCol)) = (*XColumn)(_12_pSelTab.XaCol)
+ _12_pSelTab.XnCol = 0
+ *(**XColumn)(unsafe.Pointer(&_12_pSelTab.XaCol)) = nil
_sqlite3DeleteTable(tls, _db, _12_pSelTab)
- _12_addrInsLoop = _sqlite3VdbeAddOp1(tls, _9_v, i32(16), _12_dest.X2)
- _sqlite3VdbeAddOp3(tls, _9_v, i32(101), _12_dest.X3, _12_dest.X4, _12_regRec)
- _sqlite3TableAffinity(tls, _9_v, _p, i32(0))
- _sqlite3VdbeAddOp2(tls, _9_v, i32(117), i32(1), _12_regRowid)
- _sqlite3VdbeAddOp3(tls, _9_v, i32(118), i32(1), _12_regRec, _12_regRowid)
+ _12_addrInsLoop = _sqlite3VdbeAddOp1(tls, _9_v, int32(16), _12_dest.XiSDParm)
+ _sqlite3VdbeAddOp3(tls, _9_v, int32(101), _12_dest.XiSdst, _12_dest.XnSdst, _12_regRec)
+ _sqlite3TableAffinity(tls, _9_v, _p, int32(0))
+ _sqlite3VdbeAddOp2(tls, _9_v, int32(117), int32(1), _12_regRowid)
+ _sqlite3VdbeAddOp3(tls, _9_v, int32(118), int32(1), _12_regRec, _12_regRowid)
_sqlite3VdbeGoto(tls, _9_v, _12_addrInsLoop)
_sqlite3VdbeJumpHere(tls, _9_v, _12_addrInsLoop)
- _sqlite3VdbeAddOp1(tls, _9_v, i32(114), i32(1))
+ _sqlite3VdbeAddOp1(tls, _9_v, int32(114), int32(1))
_25:
if _pSelect != nil {
_9_zStmt = _createTableStmt(tls, _db, _p)
@@ -93033,115 +94167,112 @@ _25:
}
_14_pEnd2 = func() *XToken {
if _tabOpts != 0 {
- return (*XToken)(unsafe.Pointer(&(_pParse.X51)))
+ return &_pParse.XsLastToken
}
return _pEnd
}()
- _9_n = int32((uintptr(unsafe.Pointer(_14_pEnd2.X0)) - uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(_pParse.X50))).X0))) / 1)
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_14_pEnd2.X0)) + 1*uintptr(i32(0))))) != i32(59) {
+ _9_n = int32(uintptr(unsafe.Pointer(_14_pEnd2.Xz)) - uintptr(unsafe.Pointer(_pParse.XsNameToken.Xz)))
+ if int32(*elem1(_14_pEnd2.Xz, 0)) != int32(59) {
{
p := &_9_n
- *p = int32(uint32(*p) + (_14_pEnd2.X1))
- sink1(*p)
+ *p = int32(uint32(*p) + _14_pEnd2.Xn)
}
}
- _9_zStmt = _sqlite3MPrintf(tls, _db, str(111853), unsafe.Pointer(_9_zType2), _9_n, unsafe.Pointer((*XToken)(unsafe.Pointer(&(_pParse.X50))).X0))
+ _9_zStmt = _sqlite3MPrintf(tls, _db, str(111881), unsafe.Pointer(_9_zType2), _9_n, unsafe.Pointer(_pParse.XsNameToken.Xz))
_33:
- _sqlite3NestedParse(tls, _pParse, str(111868), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0), unsafe.Pointer(str(50026)), unsafe.Pointer(_9_zType), unsafe.Pointer(_p.X0), unsafe.Pointer(_p.X0), _pParse.X32, unsafe.Pointer(_9_zStmt), _pParse.X31)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_9_zStmt))
+ _sqlite3NestedParse(tls, _pParse, str(111896), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName), unsafe.Pointer(str(49981)), unsafe.Pointer(_9_zType), unsafe.Pointer(_p.XzName), unsafe.Pointer(_p.XzName), _pParse.XregRoot, unsafe.Pointer(_9_zStmt), _pParse.XregRowid)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_9_zStmt))
_sqlite3ChangeCookie(tls, _pParse, _iDb)
- if ((_p.X9) & uint32(i32(8))) == uint32(i32(0)) {
+ if (_p.XtabFlags & uint32(8)) == (0) {
goto _37
}
- _15_pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb)))
+ _15_pDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb))
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101721), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101721), unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- if (*XTable)((*XSchema)(_15_pDb.X4).X6) == nil {
- _sqlite3NestedParse(tls, _pParse, str(111955), unsafe.Pointer(_15_pDb.X0))
+ if (*XTable)((*XSchema)(_15_pDb.XpSchema).XpSeqTab) == nil {
+ _sqlite3NestedParse(tls, _pParse, str(111983), unsafe.Pointer(_15_pDb.XzDbSName))
}
_37:
- _sqlite3VdbeAddParseSchemaOp(tls, _9_v, _iDb, _sqlite3MPrintf(tls, _db, str(111997), unsafe.Pointer(_p.X0)))
+ _sqlite3VdbeAddParseSchemaOp(tls, _9_v, _iDb, _sqlite3MPrintf(tls, _db, str(112025), unsafe.Pointer(_p.XzName)))
_19:
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 {
+ if (_db.Xinit.Xbusy) == 0 {
goto _41
}
- _17_pSchema = (*XSchema)(_p.X20)
+ _17_pSchema = (*XSchema)(_p.XpSchema)
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101742), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101742), unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- _17_pOld = (*XTable)(_sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&(_17_pSchema.X2))), _p.X0, (unsafe.Pointer)(_p)))
+ _17_pOld = (*XTable)(_sqlite3HashInsert(tls, &_17_pSchema.XtblHash, _p.XzName, unsafe.Pointer(_p)))
if _17_pOld != nil {
func() {
if _p != _17_pOld {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101745), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000))), unsafe.Pointer(str(112031)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101745), unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000), unsafe.Pointer(str(112059)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3OomFault(tls, _db)
return
}
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X63))))) = nil
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(2)
- sink1(*p)
- }
- if (*XSelect)(_p.X3) != nil {
+ *(**XTable)(unsafe.Pointer(&_pParse.XpNewTable)) = nil
+ _db.Xflags |= int32(2)
+ if _p.XpSelect != nil {
goto _47
}
- _19_zName = (*XToken)(unsafe.Pointer(&(_pParse.X50))).X0
+ _19_zName = _pParse.XsNameToken.Xz
func() {
if _pSelect != nil || _pCons == nil || _pEnd == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101756), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000))), unsafe.Pointer(str(112039)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101756), unsafe.Pointer(&_sqlite3EndTableØ00__func__Ø000), unsafe.Pointer(str(112067)))
crt.X__builtin_abort(tls)
}
}()
- if (_pCons.X0) == nil {
+ if _pCons.Xz == nil {
_pCons = _pEnd
}
- _19_nName = int32((uintptr(unsafe.Pointer(_pCons.X0)) - uintptr(unsafe.Pointer(_19_zName))) / 1)
- *(*int32)(unsafe.Pointer(&(_p.X15))) = i32(13) + _sqlite3Utf8CharLen(tls, _19_zName, _19_nName)
+ _19_nName = int32(uintptr(unsafe.Pointer(_pCons.Xz)) - uintptr(unsafe.Pointer(_19_zName)))
+ _p.XaddColOffset = int32(13) + _sqlite3Utf8CharLen(tls, _19_zName, _19_nName)
_47:
_41:
- _ = _12_dest
}
var _sqlite3EndTableØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3EndTableØ00__func__Ø000[0], str(112065), 16)
-}
-
-// This routine runs at the end of parsing a CREATE TABLE statement that
-// has a WITHOUT ROWID clause. The job of this routine is to convert both
-// internal schema data structures and the generated VDBE code so that they
-// are appropriate for a WITHOUT ROWID table instead of a rowid table.
-// Changes include:
-//
-// (1) Set all columns of the PRIMARY KEY schema object to be NOT NULL.
-// (2) Convert the OP_CreateTable into an OP_CreateIndex. There is
-// no rowid btree for a WITHOUT ROWID. Instead, the canonical
-// data storage is a covering index btree.
-// (3) Bypass the creation of the sqlite_master table entry
-// for the PRIMARY KEY as the primary key index is now
-// identified by the sqlite_master table entry of the table itself.
-// (4) Set the Index.tnum of the PRIMARY KEY Index object in the
-// schema to the rootpage from the main table.
-// (5) Add all table columns to the PRIMARY KEY Index object
-// so that the PRIMARY KEY is a covering index. The surplus
-// columns are part of KeyInfo.nXField and are not used for
-// sorting or lookup or uniqueness checks.
-// (6) Replace the rowid tail on all automatically generated UNIQUE
-// indices with the PRIMARY KEY columns.
-//
-// For virtual tables, only (1) is performed.
+ crt.Xstrncpy(nil, &_sqlite3EndTableØ00__func__Ø000[0], str(112093), 16)
+}
+
+// C comment
+// /*
+// ** This routine runs at the end of parsing a CREATE TABLE statement that
+// ** has a WITHOUT ROWID clause. The job of this routine is to convert both
+// ** internal schema data structures and the generated VDBE code so that they
+// ** are appropriate for a WITHOUT ROWID table instead of a rowid table.
+// ** Changes include:
+// **
+// ** (1) Set all columns of the PRIMARY KEY schema object to be NOT NULL.
+// ** (2) Convert the OP_CreateTable into an OP_CreateIndex. There is
+// ** no rowid btree for a WITHOUT ROWID. Instead, the canonical
+// ** data storage is a covering index btree.
+// ** (3) Bypass the creation of the sqlite_master table entry
+// ** for the PRIMARY KEY as the primary key index is now
+// ** identified by the sqlite_master table entry of the table itself.
+// ** (4) Set the Index.tnum of the PRIMARY KEY Index object in the
+// ** schema to the rootpage from the main table.
+// ** (5) Add all table columns to the PRIMARY KEY Index object
+// ** so that the PRIMARY KEY is a covering index. The surplus
+// ** columns are part of KeyInfo.nXField and are not used for
+// ** sorting or lookup or uniqueness checks.
+// ** (6) Replace the rowid tail on all automatically generated UNIQUE
+// ** indices with the PRIMARY KEY columns.
+// **
+// ** For virtual tables, only (1) is performed.
+// */
func _convertToWithoutRowidTable(tls *crt.TLS, _pParse *XParse, _pTab *XTable) {
var _nPk, _i, _j, _11_n int32
var _5_ipkToken XToken
@@ -93149,211 +94280,213 @@ func _convertToWithoutRowidTable(tls *crt.TLS, _pParse *XParse, _pTab *XTable) {
var _v *TVdbe
var _5_pList *XExprList
var _pIdx, _pPk *XIndex
- _db = (*Xsqlite3)(_pParse.X0)
- _v = (*TVdbe)(_pParse.X2)
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X4) != 0 {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ if (_db.Xinit.XimposterTable) != 0 {
goto _0
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _4
}
- if (int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X6) & i32(1)) != i32(0) {
- *(*uint8)(unsafe.Pointer(&((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_i))).X3))) = uint8(i32(2))
+ if (int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XcolFlags) & int32(1)) != int32(0) {
+ elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XnotNull = uint8(2)
}
_i += 1
goto _1
_4:
_0:
- if (_pParse.X55) != 0 {
+ if _pParse.XdeclareVtab != 0 {
return
}
- if (_pParse.X41) != 0 {
+ if _pParse.XaddrCrTab != 0 {
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101409), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000))), unsafe.Pointer(str(41861)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101409), unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000), unsafe.Pointer(str(41816)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeChangeOpcode(tls, _v, uint32(_pParse.X41), uint8(i32(136)))
+ _sqlite3VdbeChangeOpcode(tls, _v, uint32(_pParse.XaddrCrTab), uint8(136))
}
- if int32(_pTab.X10) < i32(0) {
+ if int32(_pTab.XiPKey) < int32(0) {
goto _10
}
- _sqlite3TokenInit(tls, &_5_ipkToken, (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_pTab.X10))).X0)
- _5_pList = _sqlite3ExprListAppend(tls, _pParse, nil, _sqlite3ExprAlloc(tls, _db, i32(27), &_5_ipkToken, i32(0)))
+ _sqlite3TokenInit(tls, &_5_ipkToken, elem41((*XColumn)(_pTab.XaCol), uintptr(_pTab.XiPKey)).XzName)
+ _5_pList = _sqlite3ExprListAppend(tls, _pParse, nil, _sqlite3ExprAlloc(tls, _db, int32(27), &_5_ipkToken, int32(0)))
if _5_pList == nil {
return
}
- *(*uint8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_5_pList.X2))))) + 20*uintptr(i32(0)))).X3))) = _pParse.X53
+ elem57((*TExprList_item)(unsafe.Pointer(&_5_pList.Xa)), 0).XsortOrder = _pParse.XiPkSortOrder
func() {
- if (*XTable)(_pParse.X63) != _pTab {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101424), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000))), unsafe.Pointer(str(112081)))
+ if (*XTable)(_pParse.XpNewTable) != _pTab {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101424), unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000), unsafe.Pointer(str(112109)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3CreateIndex(tls, _pParse, nil, nil, nil, _5_pList, int32(_pTab.X14), nil, nil, i32(0), i32(0), uint8(i32(2)))
- if (_db.X17) != 0 {
+ _sqlite3CreateIndex(tls, _pParse, nil, nil, nil, _5_pList, int32(_pTab.XkeyConf), nil, nil, int32(0), int32(0), uint8(2))
+ if _db.XmallocFailed != 0 {
return
}
_pPk = _sqlite3PrimaryKeyIndex(tls, _pTab)
- *(*int16)(unsafe.Pointer(&(_pTab.X10))) = int16(i32(-1))
+ _pTab.XiPKey = int16(-1)
goto _15
_10:
_pPk = _sqlite3PrimaryKeyIndex(tls, _pTab)
if _v != nil {
func() {
- if int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101438), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000))), unsafe.Pointer(str(49896)))
+ if int32(_db.Xinit.Xbusy) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101438), unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000), unsafe.Pointer(str(49851)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeChangeOpcode(tls, _v, uint32(_pPk.X11), uint8(i32(13)))
+ _sqlite3VdbeChangeOpcode(tls, _v, uint32(_pPk.Xtnum), uint8(13))
}
- _i = store1(&_j, i32(1))
+ _i = store2(&_j, int32(1))
_19:
- if _i >= int32(_pPk.X13) {
+ if _i >= int32(_pPk.XnKeyCol) {
goto _22
}
- if _hasColumn(tls, _pPk.X1, _j, int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i))))) != 0 {
- *(*uint16)(unsafe.Pointer(&(_pPk.X14))) -= 1
+ if _hasColumn(tls, _pPk.XaiColumn, _j, int32(*elem50(_pPk.XaiColumn, uintptr(_i)))) != 0 {
+ _pPk.XnColumn -= 1
goto _24
}
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(postInc1(&_j, int32(1))))) = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i)))
+ *elem50(_pPk.XaiColumn, uintptr(postInc2(&_j, 1))) = *elem50(_pPk.XaiColumn, uintptr(_i))
_24:
_i += 1
goto _19
_22:
- *(*uint16)(unsafe.Pointer(&(_pPk.X13))) = uint16(_j)
+ _pPk.XnKeyCol = uint16(_j)
_15:
func() {
if _pPk == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101456), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000))), unsafe.Pointer(str(41994)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101456), unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000), unsafe.Pointer(str(41949)))
crt.X__builtin_abort(tls)
}
}()
- storebits3((*int8)(unsafe.Pointer(&(_pPk.X16))), int8(i32(1)), 32, 5)
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X4) == 0 {
- storebits3((*int8)(unsafe.Pointer(&(_pPk.X16))), int8(i32(1)), 8, 3)
+ storebits5(&_pPk.XidxType, int8(1), 32, 5)
+ if (_db.Xinit.XimposterTable) == 0 {
+ storebits5(&_pPk.XidxType, int8(1), 8, 3)
}
- _nPk = int32(_pPk.X13)
- *(*int32)(unsafe.Pointer(&(_pPk.X11))) = _pTab.X7
- _pIdx = (*XIndex)(_pTab.X2)
+ _nPk = int32(_pPk.XnKeyCol)
+ _pPk.Xtnum = _pTab.Xtnum
+ _pIdx = (*XIndex)(_pTab.XpIndex)
_28:
if _pIdx == nil {
goto _31
}
- if int32((uint32(_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(2) {
+ if int32((uint32(_pIdx.XidxType)<<30)>>30) == int32(2) {
goto _29
}
- _i = store1(&_11_n, i32(0))
+ _i = store2(&_11_n, int32(0))
_33:
if _i >= _nPk {
goto _36
}
- if _hasColumn(tls, _pIdx.X1, int32(_pIdx.X13), int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i))))) == 0 {
+ if _hasColumn(tls, _pIdx.XaiColumn, int32(_pIdx.XnKeyCol), int32(*elem50(_pPk.XaiColumn, uintptr(_i)))) == 0 {
_11_n += 1
}
_i += 1
goto _33
_36:
- if _11_n == i32(0) {
- *(*uint16)(unsafe.Pointer(&(_pIdx.X14))) = _pIdx.X13
+ if _11_n == int32(0) {
+ _pIdx.XnColumn = _pIdx.XnKeyCol
goto _29
}
- if _resizeIndexObject(tls, _db, _pIdx, int32(_pIdx.X13)+_11_n) != 0 {
+ if _resizeIndexObject(tls, _db, _pIdx, int32(_pIdx.XnKeyCol)+_11_n) != 0 {
return
}
- *func() *int32 { _i = i32(0); return &_j }() = int32(_pIdx.X13)
+ *func() *int32 { _i = int32(0); return &_j }() = int32(_pIdx.XnKeyCol)
_40:
if _i >= _nPk {
goto _43
}
- if _hasColumn(tls, _pIdx.X1, int32(_pIdx.X13), int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i))))) == 0 {
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_j))) = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i)))
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_j))) = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X8)) + 4*uintptr(_i)))
+ if _hasColumn(tls, _pIdx.XaiColumn, int32(_pIdx.XnKeyCol), int32(*elem50(_pPk.XaiColumn, uintptr(_i)))) == 0 {
+ *elem50(_pIdx.XaiColumn, uintptr(_j)) = *elem50(_pPk.XaiColumn, uintptr(_i))
+ *elem0(_pIdx.XazColl, uintptr(_j)) = *elem0(_pPk.XazColl, uintptr(_i))
_j += 1
}
_i += 1
goto _40
_43:
func() {
- if int32(_pIdx.X14) < (int32(_pIdx.X13) + _11_n) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101486), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000))), unsafe.Pointer(str(112105)))
+ if int32(_pIdx.XnColumn) < (int32(_pIdx.XnKeyCol) + _11_n) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101486), unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000), unsafe.Pointer(str(112133)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pIdx.X14) < _j {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101487), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000))), unsafe.Pointer(str(112136)))
+ if int32(_pIdx.XnColumn) < _j {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101487), unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000), unsafe.Pointer(str(112164)))
crt.X__builtin_abort(tls)
}
}()
_29:
- _pIdx = (*XIndex)(_pIdx.X5)
+ _pIdx = (*XIndex)(_pIdx.XpNext)
goto _28
_31:
- if _nPk >= int32(_pTab.X11) {
+ if _nPk >= int32(_pTab.XnCol) {
goto _49
}
- if _resizeIndexObject(tls, _db, _pPk, int32(_pTab.X11)) != 0 {
+ if _resizeIndexObject(tls, _db, _pPk, int32(_pTab.XnCol)) != 0 {
return
}
- *func() *int32 { _i = i32(0); return &_j }() = _nPk
+ *func() *int32 { _i = int32(0); return &_j }() = _nPk
_51:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _54
}
- if _hasColumn(tls, _pPk.X1, _j, _i) == 0 {
+ if _hasColumn(tls, _pPk.XaiColumn, _j, _i) == 0 {
func() {
- if _j >= int32(_pPk.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101496), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000))), unsafe.Pointer(str(112153)))
+ if _j >= int32(_pPk.XnColumn) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101496), unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000), unsafe.Pointer(str(112181)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_j))) = int16(_i)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X8)) + 4*uintptr(_j))) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
+ *elem50(_pPk.XaiColumn, uintptr(_j)) = int16(_i)
+ *elem0(_pPk.XazColl, uintptr(_j)) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
_j += 1
}
_i += 1
goto _51
_54:
func() {
- if int32(_pPk.X14) != _j {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101502), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000))), unsafe.Pointer(str(112168)))
+ if int32(_pPk.XnColumn) != _j {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101502), unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000), unsafe.Pointer(str(112196)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pTab.X11) != _j {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101503), unsafe.Pointer((*int8)(unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000))), unsafe.Pointer(str(112184)))
+ if int32(_pTab.XnCol) != _j {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101503), unsafe.Pointer(&_convertToWithoutRowidTableØ00__func__Ø000), unsafe.Pointer(str(112212)))
crt.X__builtin_abort(tls)
}
}()
goto _62
_49:
- *(*uint16)(unsafe.Pointer(&(_pPk.X14))) = uint16(_pTab.X11)
+ _pPk.XnColumn = uint16(_pTab.XnCol)
_62:
- _ = _5_ipkToken
}
var _convertToWithoutRowidTableØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_convertToWithoutRowidTableØ00__func__Ø000[0], str(112198), 27)
+ crt.Xstrncpy(nil, &_convertToWithoutRowidTableØ00__func__Ø000[0], str(112226), 27)
}
-// Create a new index for an SQL table. pName1.pName2 is the name of the index
-// and pTblList is the name of the table that is to be indexed. Both will
-// be NULL for a primary key or an index that is created to satisfy a
-// UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
-// as the table to be indexed. pParse->pNewTable is a table that is
-// currently being constructed by a CREATE TABLE statement.
-//
-// pList is a list of columns to be indexed. pList will be NULL if this
-// is a primary key or unique-constraint on the most recent column added
-// to the table currently under construction.
+// C comment
+// /*
+// ** Create a new index for an SQL table. pName1.pName2 is the name of the index
+// ** and pTblList is the name of the table that is to be indexed. Both will
+// ** be NULL for a primary key or an index that is created to satisfy a
+// ** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
+// ** as the table to be indexed. pParse->pNewTable is a table that is
+// ** currently being constructed by a CREATE TABLE statement.
+// **
+// ** pList is a list of columns to be indexed. pList will be NULL if this
+// ** is a primary key or unique-constraint on the most recent column added
+// ** to the table currently under construction.
+// */
func _sqlite3CreateIndex(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2 *XToken, _pTblName *XSrcList, _pList *XExprList, _onError int32, _pStart *XToken, _pPIWhere *XExpr, _sortOrder int32, _ifNotExist int32, _idxType uint8) {
var _nName, _i, _j, _sortOrderMask, _iDb, _nExtra, _nExtraCol, _20_n, _34_requestedSortOrder, _42_nColl, _46_x, _53_k, _62_iMem, _63_n int32
var _zName, _zExtra, _23_zDb, _34_zColl, _54_z1, _54_z2, _62_zStmt *int8
@@ -93371,18 +94504,18 @@ func _sqlite3CreateIndex(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2
_pTab = nil
_pIndex = nil
_zName = nil
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pName = nil
- _nExtra = i32(0)
+ _nExtra = int32(0)
_zExtra = nil
_pPk = nil
- if ((_db.X17) != 0) || ((_pParse.X16) > i32(0)) {
+ if (_db.XmallocFailed != 0) || (_pParse.XnErr > int32(0)) {
goto _exit_create_index
}
- if ((_pParse.X55) != 0) && (int32(_idxType) != i32(2)) {
+ if (_pParse.XdeclareVtab != 0) && (int32(_idxType) != int32(2)) {
goto _exit_create_index
}
- if i32(0) != _sqlite3ReadSchema(tls, _pParse) {
+ if int32(0) != _sqlite3ReadSchema(tls, _pParse) {
goto _exit_create_index
}
if _pTblName == nil {
@@ -93390,93 +94523,93 @@ func _sqlite3CreateIndex(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2
}
func() {
if _pName1 == nil || _pName2 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102638), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112225)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102638), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112253)))
crt.X__builtin_abort(tls)
}
}()
_iDb = _sqlite3TwoPartName(tls, _pParse, _pName1, _pName2, &_pName)
- if _iDb < i32(0) {
+ if _iDb < int32(0) {
goto _exit_create_index
}
func() {
- if _pName == nil || (_pName.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102641), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112242)))
+ if _pName == nil || _pName.Xz == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102641), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112270)))
crt.X__builtin_abort(tls)
}
}()
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 {
+ if (_db.Xinit.Xbusy) != 0 {
goto _13
}
_pTab = _sqlite3SrcListLookup(tls, _pParse, _pTblName)
- if (((_pName2.X1) == uint32(i32(0))) && (_pTab != nil)) && ((*XSchema)(_pTab.X20) == (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X4)) {
- _iDb = i32(1)
+ if ((_pName2.Xn == (0)) && (_pTab != nil)) && ((*XSchema)(_pTab.XpSchema) == (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema)) {
+ _iDb = int32(1)
}
_13:
- _sqlite3FixInit(tls, &_sFix, _pParse, _iDb, str(112260), _pName)
+ _sqlite3FixInit(tls, &_sFix, _pParse, _iDb, str(112288), _pName)
if _sqlite3FixSrcList(tls, &_sFix, _pTblName) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102660), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102660), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
}
- _pTab = _sqlite3LocateTableItem(tls, _pParse, uint32(i32(0)), (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTblName.X2)))))+68*uintptr(i32(0)))))
+ _pTab = _sqlite3LocateTableItem(tls, _pParse, 0, elem6((*TSrcList_item)(unsafe.Pointer(&_pTblName.Xa)), 0))
func() {
- if int32(_db.X17) != i32(0) && _pTab != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102663), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112266)))
+ if int32(_db.XmallocFailed) != int32(0) && _pTab != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102663), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112294)))
crt.X__builtin_abort(tls)
}
}()
if _pTab == nil {
goto _exit_create_index
}
- if (_iDb == i32(1)) && ((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X4) != (*XSchema)(_pTab.X20)) {
- _sqlite3ErrorMsg(tls, _pParse, str(112297), unsafe.Pointer(_pTab.X0))
+ if (_iDb == int32(1)) && ((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema) != (*XSchema)(_pTab.XpSchema)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(112325), unsafe.Pointer(_pTab.XzName))
goto _exit_create_index
}
- if ((_pTab.X9) & uint32(i32(32))) != uint32(i32(0)) {
+ if (_pTab.XtabFlags & uint32(32)) != (0) {
_pPk = _sqlite3PrimaryKeyIndex(tls, _pTab)
}
goto _25
_5:
func() {
if _pName != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102673), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112347)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102673), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112375)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pStart != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102674), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112356)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102674), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112384)))
crt.X__builtin_abort(tls)
}
}()
- _pTab = (*XTable)(_pParse.X63)
+ _pTab = (*XTable)(_pParse.XpNewTable)
if _pTab == nil {
goto _exit_create_index
}
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
_25:
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb)))
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb))
func() {
if _pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102681), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(43594)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102681), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(43549)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pParse.X16) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102682), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112366)))
+ if _pParse.XnErr != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102682), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112394)))
crt.X__builtin_abort(tls)
}
}()
- if ((Xsqlite3_strnicmp(tls, _pTab.X0, str(111644), i32(7)) == i32(0)) && (int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) == i32(0))) && (Xsqlite3_strnicmp(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTab.X0))+1*uintptr(i32(7)))), str(112382), i32(9)) != i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(112392), unsafe.Pointer(_pTab.X0))
+ if ((Xsqlite3_strnicmp(tls, _pTab.XzName, str(111672), int32(7)) == int32(0)) && (int32(_db.Xinit.Xbusy) == int32(0))) && (Xsqlite3_strnicmp(tls, elem1(_pTab.XzName, uintptr(7)), str(112410), int32(9)) != int32(0)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(112420), unsafe.Pointer(_pTab.XzName))
goto _exit_create_index
}
- if (*XSelect)(_pTab.X3) != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(112420))
+ if _pTab.XpSelect != nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(112448))
goto _exit_create_index
}
- if (_pTab.X16) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(112445))
+ if _pTab.XnModuleArg != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(112473))
goto _exit_create_index
}
if _pName == nil {
@@ -93487,32 +94620,32 @@ _25:
goto _exit_create_index
}
func() {
- if (_pName.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102721), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112479)))
+ if _pName.Xz == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102721), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112507)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) != _sqlite3CheckObjectName(tls, _pParse, _zName) {
+ if int32(0) != _sqlite3CheckObjectName(tls, _pParse, _zName) {
goto _exit_create_index
}
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 {
+ if (_db.Xinit.Xbusy) != 0 {
goto _45
}
if _sqlite3FindTable(tls, _db, _zName, nil) != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(112491), unsafe.Pointer(_zName))
+ _sqlite3ErrorMsg(tls, _pParse, str(112519), unsafe.Pointer(_zName))
goto _exit_create_index
}
_45:
- if _sqlite3FindIndex(tls, _db, _zName, _pDb.X0) == nil {
+ if _sqlite3FindIndex(tls, _db, _zName, _pDb.XzDbSName) == nil {
goto _47
}
if _ifNotExist == 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(112525), unsafe.Pointer(_zName))
+ _sqlite3ErrorMsg(tls, _pParse, str(112553), unsafe.Pointer(_zName))
goto _49
}
func() {
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102735), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112549)))
+ if (_db.Xinit.Xbusy) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102735), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112577)))
crt.X__builtin_abort(tls)
}
}()
@@ -93522,75 +94655,71 @@ _49:
_47:
goto _52
_40:
- *func() *int32 { _20_pLoop = (*XIndex)(_pTab.X2); return &_20_n }() = i32(1)
+ *func() *int32 { _20_pLoop = (*XIndex)(_pTab.XpIndex); return &_20_n }() = int32(1)
_53:
if _20_pLoop == nil {
goto _56
}
- *func() *int32 { _20_pLoop = (*XIndex)(_20_pLoop.X5); return &_20_n }() += 1
+ *func() *int32 { _20_pLoop = (*XIndex)(_20_pLoop.XpNext); return &_20_n }() += 1
goto _53
_56:
- _zName = _sqlite3MPrintf(tls, _db, str(112564), unsafe.Pointer(_pTab.X0), _20_n)
+ _zName = _sqlite3MPrintf(tls, _db, str(112592), unsafe.Pointer(_pTab.XzName), _20_n)
if _zName == nil {
goto _exit_create_index
}
- if (_pParse.X55) != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zName)) + 1*uintptr(i32(7)))) += 1
+ if _pParse.XdeclareVtab != 0 {
+ *elem1(_zName, uintptr(7)) += 1
}
_52:
- _23_zDb = _pDb.X0
- if _sqlite3AuthCheck(tls, _pParse, i32(18), func() *int8 {
- if i32(1) != 0 && (_iDb == i32(1)) {
- return str(50007)
+ _23_zDb = _pDb.XzDbSName
+ if _sqlite3AuthCheck(tls, _pParse, int32(18), func() *int8 {
+ if int32(1) != 0 && (_iDb == int32(1)) {
+ return str(49962)
}
- return str(50026)
+ return str(49981)
}(), nil, _23_zDb) != 0 {
goto _exit_create_index
}
- _i = i32(1)
- if i32(1) != 0 && (_iDb == i32(1)) {
- _i = i32(3)
+ _i = int32(1)
+ if int32(1) != 0 && (_iDb == int32(1)) {
+ _i = int32(3)
}
- if _sqlite3AuthCheck(tls, _pParse, _i, _zName, _pTab.X0, _23_zDb) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, _i, _zName, _pTab.XzName, _23_zDb) != 0 {
goto _exit_create_index
}
if _pList != nil {
goto _66
}
- _sqlite3TokenInit(tls, &_26_prevCol, (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(int32(_pTab.X11)-i32(1)))).X0)
- _pList = _sqlite3ExprListAppend(tls, _pParse, nil, _sqlite3ExprAlloc(tls, _db, i32(27), &_26_prevCol, i32(0)))
+ _sqlite3TokenInit(tls, &_26_prevCol, elem41((*XColumn)(_pTab.XaCol), uintptr(int32(_pTab.XnCol)-int32(1))).XzName)
+ _pList = _sqlite3ExprListAppend(tls, _pParse, nil, _sqlite3ExprAlloc(tls, _db, int32(27), &_26_prevCol, int32(0)))
if _pList == nil {
goto _exit_create_index
}
func() {
- if (_pList.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102783), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112587)))
+ if _pList.XnExpr != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102783), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112615)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3ExprListSetSortOrder(tls, _pList, _sortOrder)
goto _70
_66:
- _sqlite3ExprListCheckLength(tls, _pParse, _pList, str(112260))
+ _sqlite3ExprListCheckLength(tls, _pParse, _pList, str(112288))
_70:
- _i = i32(0)
+ _i = int32(0)
_71:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _74
}
- _28_pExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(_i))).X0)
+ _28_pExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XpExpr)
func() {
if _28_pExpr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102794), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(43636)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102794), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(43591)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_28_pExpr.X0) == i32(94) {
- {
- p := &_nExtra
- *p = (*p) + (i32(1) + _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_28_pExpr.X3)))))))
- sink1(*p)
- }
+ if int32(_28_pExpr.Xop) == int32(94) {
+ _nExtra += int32(1) + _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer(&_28_pExpr.Xu)))
}
_i += 1
goto _71
@@ -93598,391 +94727,375 @@ _74:
_nName = _sqlite3Strlen30(tls, _zName)
_nExtraCol = func() int32 {
if _pPk != nil {
- return int32(_pPk.X13)
+ return int32(_pPk.XnKeyCol)
}
- return i32(1)
+ return int32(1)
}()
- _pIndex = _sqlite3AllocateIndexObject(tls, _db, int16((_pList.X0)+_nExtraCol), (_nName+_nExtra)+i32(1), &_zExtra)
- if (_db.X17) != 0 {
+ _pIndex = _sqlite3AllocateIndexObject(tls, _db, int16(_pList.XnExpr+_nExtraCol), (_nName+_nExtra)+int32(1), &_zExtra)
+ if _db.XmallocFailed != 0 {
goto _exit_create_index
}
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pIndex.X2))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102810), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112603)))
+ if (int32(uintptr(unsafe.Pointer(_pIndex.XaiRowLogEst))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102810), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112631)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pIndex.X8))))-uintptr(unsafe.Pointer(nil)))/1) & i32(7)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102811), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112645)))
+ if (int32(uintptr(unsafe.Pointer(_pIndex.XazColl))) & int32(7)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102811), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112673)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&(_pIndex.X0))) = _zExtra
- {
- p := &_zExtra
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_nName+i32(1))))
- sink0(*p)
- }
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pIndex.X0), (unsafe.Pointer)(_zName), uint32(_nName+i32(1)))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIndex.X3))))) = _pTab
- *(*uint8)(unsafe.Pointer(&(_pIndex.X15))) = uint8(_onError)
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(bool2int(_onError != i32(0))), 8, 3)
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(_idxType), 3, 0)
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIndex.X6))))) = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4)
- *(*uint16)(unsafe.Pointer(&(_pIndex.X13))) = uint16(_pList.X0)
+ _pIndex.XzName = _zExtra
+ *(*uintptr)(unsafe.Pointer(&_zExtra)) += uintptr(_nName + int32(1))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pIndex.XzName), unsafe.Pointer(_zName), uint32(_nName+int32(1)))
+ *(**XTable)(unsafe.Pointer(&_pIndex.XpTable)) = _pTab
+ _pIndex.XonError = uint8(_onError)
+ storebits5(&_pIndex.XidxType, int8(bool2int(_onError != int32(0))), 8, 3)
+ storebits5(&_pIndex.XidxType, int8(_idxType), 3, 0)
+ *(**XSchema)(unsafe.Pointer(&_pIndex.XpSchema)) = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema)
+ _pIndex.XnKeyCol = uint16(_pList.XnExpr)
if _pPIWhere != nil {
- _sqlite3ResolveSelfReference(tls, _pParse, _pTab, i32(2), _pPIWhere, nil)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIndex.X9))))) = _pPIWhere
+ _sqlite3ResolveSelfReference(tls, _pParse, _pTab, int32(2), _pPIWhere, nil)
+ *(**XExpr)(unsafe.Pointer(&_pIndex.XpPartIdxWhere)) = _pPIWhere
_pPIWhere = nil
}
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102826), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102826), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- if int32((*XSchema)(_pDb.X4).X7) >= i32(4) {
- _sortOrderMask = i32(-1)
+ if int32((*XSchema)(_pDb.XpSchema).Xfile_format) >= int32(4) {
+ _sortOrderMask = int32(-1)
goto _89
}
- _sortOrderMask = i32(0)
+ _sortOrderMask = int32(0)
_89:
- *func() **TExprList_item { _i = i32(0); return &_pListItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))
+ *func() **TExprList_item { _i = int32(0); return &_pListItem }() = (*TExprList_item)(unsafe.Pointer(&_pList.Xa))
_90:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _93
}
- _sqlite3StringToId(tls, (*XExpr)(_pListItem.X0))
- _sqlite3ResolveSelfReference(tls, _pParse, _pTab, i32(32), (*XExpr)(_pListItem.X0), nil)
- if (_pParse.X16) != 0 {
+ _sqlite3StringToId(tls, (*XExpr)(_pListItem.XpExpr))
+ _sqlite3ResolveSelfReference(tls, _pParse, _pTab, int32(32), (*XExpr)(_pListItem.XpExpr), nil)
+ if _pParse.XnErr != 0 {
goto _exit_create_index
}
- _34_pCExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)(_pListItem.X0))
- if int32(_34_pCExpr.X0) == i32(152) {
+ _34_pCExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)(_pListItem.XpExpr))
+ if int32(_34_pCExpr.Xop) == int32(152) {
goto _95
}
- if _pTab == (*XTable)(_pParse.X63) {
- _sqlite3ErrorMsg(tls, _pParse, str(112682))
+ if _pTab == (*XTable)(_pParse.XpNewTable) {
+ _sqlite3ErrorMsg(tls, _pParse, str(112710))
goto _exit_create_index
}
- if (*XExprList)(_pIndex.X10) != nil {
+ if (*XExprList)(_pIndex.XaColExpr) != nil {
goto _97
}
- _37_pCopy = _sqlite3ExprListDup(tls, _db, _pList, i32(0))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIndex.X10))))) = _37_pCopy
- if (_db.X17) == 0 {
+ _37_pCopy = _sqlite3ExprListDup(tls, _db, _pList, int32(0))
+ *(**XExprList)(unsafe.Pointer(&_pIndex.XaColExpr)) = _37_pCopy
+ if _db.XmallocFailed == 0 {
func() {
if _37_pCopy == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102864), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112743)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102864), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112771)))
crt.X__builtin_abort(tls)
}
}()
- _pListItem = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_37_pCopy.X2))))) + 20*uintptr(_i)))
+ _pListItem = elem57((*TExprList_item)(unsafe.Pointer(&_37_pCopy.Xa)), uintptr(_i))
}
_97:
- _j = i32(-2)
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_i))) = int16(i32(-2))
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(0)), 8, 3)
+ _j = int32(-2)
+ *elem50(_pIndex.XaiColumn, uintptr(_i)) = int16(-2)
+ storebits5(&_pIndex.XidxType, 0, 8, 3)
goto _101
_95:
- _j = int32(_34_pCExpr.X9)
+ _j = int32(_34_pCExpr.XiColumn)
func() {
- if _j > i32(32767) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102873), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112752)))
+ if _j > int32(32767) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102873), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112780)))
crt.X__builtin_abort(tls)
}
}()
- if _j < i32(0) {
- _j = int32(_pTab.X10)
+ if _j < int32(0) {
+ _j = int32(_pTab.XiPKey)
goto _106
}
- if int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_j))).X3) == i32(0) {
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(0)), 8, 3)
+ if int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_j)).XnotNull) == int32(0) {
+ storebits5(&_pIndex.XidxType, 0, 8, 3)
}
_106:
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_i))) = int16(_j)
+ *elem50(_pIndex.XaiColumn, uintptr(_i)) = int16(_j)
_101:
_34_zColl = nil
- if int32((*XExpr)(_pListItem.X0).X0) == i32(94) {
- _34_zColl = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&((*XExpr)(_pListItem.X0).X3)))))
- _42_nColl = _sqlite3Strlen30(tls, _34_zColl) + i32(1)
+ if int32((*XExpr)(_pListItem.XpExpr).Xop) == int32(94) {
+ _34_zColl = *(**int8)(unsafe.Pointer(&((*XExpr)(_pListItem.XpExpr).Xu)))
+ _42_nColl = _sqlite3Strlen30(tls, _34_zColl) + int32(1)
func() {
if _nExtra < _42_nColl {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102886), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112762)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102886), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112790)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zExtra), (unsafe.Pointer)(_34_zColl), uint32(_42_nColl))
+ crt.Xmemcpy(tls, unsafe.Pointer(_zExtra), unsafe.Pointer(_34_zColl), uint32(_42_nColl))
_34_zColl = _zExtra
- {
- p := &_zExtra
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_42_nColl)))
- sink0(*p)
- }
- {
- p := &_nExtra
- *p = (*p) - _42_nColl
- sink1(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zExtra)) += uintptr(_42_nColl)
+ _nExtra -= _42_nColl
goto _111
}
- if _j >= i32(0) {
- _34_zColl = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_j))).X2
+ if _j >= int32(0) {
+ _34_zColl = elem41((*XColumn)(_pTab.XaCol), uintptr(_j)).XzColl
}
_111:
if _34_zColl == nil {
_34_zColl = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
}
- if (((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0) && (_sqlite3LocateCollSeq(tls, _pParse, _34_zColl) == nil) {
+ if ((_db.Xinit.Xbusy) == 0) && (_sqlite3LocateCollSeq(tls, _pParse, _34_zColl) == nil) {
goto _exit_create_index
}
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X8)) + 4*uintptr(_i))) = _34_zColl
- _34_requestedSortOrder = int32(_pListItem.X3) & _sortOrderMask
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X7)) + 1*uintptr(_i))) = uint8(_34_requestedSortOrder)
+ *elem0(_pIndex.XazColl, uintptr(_i)) = _34_zColl
+ _34_requestedSortOrder = int32(_pListItem.XsortOrder) & _sortOrderMask
+ *elem15(_pIndex.XaSortOrder, uintptr(_i)) = uint8(_34_requestedSortOrder)
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i += 1; return &_pListItem }())) += uintptr(20)
goto _90
_93:
if _pPk == nil {
goto _115
}
- _j = i32(0)
+ _j = int32(0)
_116:
- if _j >= int32(_pPk.X13) {
+ if _j >= int32(_pPk.XnKeyCol) {
goto _119
}
- _46_x = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_j))))
+ _46_x = int32(*elem50(_pPk.XaiColumn, uintptr(_j)))
func() {
- if _46_x < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102910), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(109743)))
+ if _46_x < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102910), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(109771)))
crt.X__builtin_abort(tls)
}
}()
- if _hasColumn(tls, _pIndex.X1, int32(_pIndex.X13), _46_x) != 0 {
- *(*uint16)(unsafe.Pointer(&(_pIndex.X14))) -= 1
+ if _hasColumn(tls, _pIndex.XaiColumn, int32(_pIndex.XnKeyCol), _46_x) != 0 {
+ _pIndex.XnColumn -= 1
goto _123
}
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_i))) = int16(_46_x)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X8)) + 4*uintptr(_i))) = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X8)) + 4*uintptr(_j)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X7)) + 1*uintptr(_i))) = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X7)) + 1*uintptr(_j)))
+ *elem50(_pIndex.XaiColumn, uintptr(_i)) = int16(_46_x)
+ *elem0(_pIndex.XazColl, uintptr(_i)) = *elem0(_pPk.XazColl, uintptr(_j))
+ *elem15(_pIndex.XaSortOrder, uintptr(_i)) = *elem15(_pPk.XaSortOrder, uintptr(_j))
_i += 1
_123:
_j += 1
goto _116
_119:
func() {
- if _i != int32(_pIndex.X14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102920), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112776)))
+ if _i != int32(_pIndex.XnColumn) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102920), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112804)))
crt.X__builtin_abort(tls)
}
}()
goto _126
_115:
- *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_i))) = int16(i32(-1))
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X8)) + 4*uintptr(_i))) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
+ *elem50(_pIndex.XaiColumn, uintptr(_i)) = int16(-1)
+ *elem0(_pIndex.XazColl, uintptr(_i)) = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
_126:
_sqlite3DefaultRowEst(tls, _pIndex)
- if (*XTable)(_pParse.X63) == nil {
+ if (*XTable)(_pParse.XpNewTable) == nil {
_estimateIndexWidth(tls, _pIndex)
}
func() {
- if ((_pTab.X9)&uint32(i32(32))) != uint32(i32(0)) && int32(_pTab.X10) >= i32(0) && int32(_sqlite3ColumnOfIndex(tls, _pIndex, _pTab.X10)) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102930), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112795)))
+ if (_pTab.XtabFlags&uint32(32)) != (0) && int32(_pTab.XiPKey) >= int32(0) && int32(_sqlite3ColumnOfIndex(tls, _pIndex, _pTab.XiPKey)) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102930), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112823)))
crt.X__builtin_abort(tls)
}
}()
- if _pTblName == nil || int32(_pIndex.X14) < int32(_pTab.X11) {
+ if _pTblName == nil || int32(_pIndex.XnColumn) < int32(_pTab.XnCol) {
goto _133
}
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(1)), 32, 5)
- _j = i32(0)
+ storebits5(&_pIndex.XidxType, int8(1), 32, 5)
+ _j = int32(0)
_134:
- if _j >= int32(_pTab.X11) {
+ if _j >= int32(_pTab.XnCol) {
goto _137
}
- if _j == int32(_pTab.X10) {
+ if _j == int32(_pTab.XiPKey) {
goto _135
}
- if int32(_sqlite3ColumnOfIndex(tls, _pIndex, int16(_j))) >= i32(0) {
+ if int32(_sqlite3ColumnOfIndex(tls, _pIndex, int16(_j))) >= int32(0) {
goto _135
}
- storebits3((*int8)(unsafe.Pointer(&(_pIndex.X16))), int8(i32(0)), 32, 5)
+ storebits5(&_pIndex.XidxType, 0, 32, 5)
goto _137
_135:
_j += 1
goto _134
_137:
_133:
- if _pTab != (*XTable)(_pParse.X63) {
+ if _pTab != (*XTable)(_pParse.XpNewTable) {
goto _140
}
- _52_pIdx = (*XIndex)(_pTab.X2)
+ _52_pIdx = (*XIndex)(_pTab.XpIndex)
_141:
if _52_pIdx == nil {
goto _144
}
func() {
- if int32(_52_pIdx.X15) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102967), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112875)))
+ if int32(_52_pIdx.XonError) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102967), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112903)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32(_52_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102968), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112895)))
+ if int32((uint32(_52_pIdx.XidxType)<<30)>>30) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102968), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112923)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pIndex.X15) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102969), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112932)))
+ if int32(_pIndex.XonError) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102969), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112960)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_52_pIdx.X13) != int32(_pIndex.X13) {
+ if int32(_52_pIdx.XnKeyCol) != int32(_pIndex.XnKeyCol) {
goto _142
}
- _53_k = i32(0)
+ _53_k = int32(0)
_152:
- if _53_k >= int32(_52_pIdx.X13) {
+ if _53_k >= int32(_52_pIdx.XnKeyCol) {
goto _155
}
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_52_pIdx.X1)) + 2*uintptr(_53_k)))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102975), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112954)))
+ if int32(*elem50(_52_pIdx.XaiColumn, uintptr(_53_k))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102975), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112982)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_52_pIdx.X1)) + 2*uintptr(_53_k)))) != int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_53_k)))) {
+ if int32(*elem50(_52_pIdx.XaiColumn, uintptr(_53_k))) != int32(*elem50(_pIndex.XaiColumn, uintptr(_53_k))) {
goto _155
}
- _54_z1 = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_52_pIdx.X8)) + 4*uintptr(_53_k)))
- _54_z2 = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X8)) + 4*uintptr(_53_k)))
+ _54_z1 = *elem0(_52_pIdx.XazColl, uintptr(_53_k))
+ _54_z2 = *elem0(_pIndex.XazColl, uintptr(_53_k))
if _sqlite3StrICmp(tls, _54_z1, _54_z2) != 0 {
goto _155
}
_53_k += 1
goto _152
_155:
- if _53_k != int32(_52_pIdx.X13) {
+ if _53_k != int32(_52_pIdx.XnKeyCol) {
goto _160
}
- if int32(_52_pIdx.X15) == int32(_pIndex.X15) {
+ if int32(_52_pIdx.XonError) == int32(_pIndex.XonError) {
goto _161
}
- if int32(_52_pIdx.X15) != i32(10) && int32(_pIndex.X15) != i32(10) {
- _sqlite3ErrorMsg(tls, _pParse, str(112975), i32(0))
+ if int32(_52_pIdx.XonError) != int32(10) && int32(_pIndex.XonError) != int32(10) {
+ _sqlite3ErrorMsg(tls, _pParse, str(113003), int32(0))
}
- if int32(_52_pIdx.X15) == i32(10) {
- *(*uint8)(unsafe.Pointer(&(_52_pIdx.X15))) = _pIndex.X15
+ if int32(_52_pIdx.XonError) == int32(10) {
+ _52_pIdx.XonError = _pIndex.XonError
}
_161:
- if int32(_idxType) == i32(2) {
- storebits3((*int8)(unsafe.Pointer(&(_52_pIdx.X16))), int8(_idxType), 3, 0)
+ if int32(_idxType) == int32(2) {
+ storebits5(&_52_pIdx.XidxType, int8(_idxType), 3, 0)
}
goto _exit_create_index
_160:
_142:
- _52_pIdx = (*XIndex)(_52_pIdx.X5)
+ _52_pIdx = (*XIndex)(_52_pIdx.XpNext)
goto _141
_144:
_140:
func() {
- if (_pParse.X16) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103007), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(112366)))
+ if _pParse.XnErr != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103007), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(112394)))
crt.X__builtin_abort(tls)
}
}()
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 {
+ if (_db.Xinit.Xbusy) == 0 {
goto _168
}
func() {
- if (_pParse.X55) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103010), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(113017)))
+ if _pParse.XdeclareVtab != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103010), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(113045)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3SchemaMutexHeld(tls, _db, i32(0), (*XSchema)(_pIndex.X6)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103011), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(113034)))
+ if _sqlite3SchemaMutexHeld(tls, _db, int32(0), (*XSchema)(_pIndex.XpSchema)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103011), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(113062)))
crt.X__builtin_abort(tls)
}
}()
- _59_p = (*XIndex)(_sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&((*XSchema)(_pIndex.X6).X3))), _pIndex.X0, (unsafe.Pointer)(_pIndex)))
+ _59_p = (*XIndex)(_sqlite3HashInsert(tls, &((*XSchema)(_pIndex.XpSchema).XidxHash), _pIndex.XzName, unsafe.Pointer(_pIndex)))
if _59_p != nil {
func() {
if _59_p != _pIndex {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103015), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000))), unsafe.Pointer(str(113081)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103015), unsafe.Pointer(&_sqlite3CreateIndexØ00__func__Ø000), unsafe.Pointer(str(113109)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3OomFault(tls, _db)
goto _exit_create_index
}
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(2)
- sink1(*p)
- }
+ _db.Xflags |= int32(2)
if _pTblName != nil {
- *(*int32)(unsafe.Pointer(&(_pIndex.X11))) = (*t21)(unsafe.Pointer(&(_db.X33))).X0
+ _pIndex.Xtnum = _db.Xinit.XnewTnum
}
goto _179
_168:
- if ((_pTab.X9)&uint32(i32(32))) != uint32(i32(0)) && _pTblName == nil {
+ if (_pTab.XtabFlags&uint32(32)) != (0) && _pTblName == nil {
goto _179
}
- _62_iMem = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ _62_iMem = preInc2(&_pParse.XnMem, 1)
_62_v = _sqlite3GetVdbe(tls, _pParse)
if _62_v == nil {
goto _exit_create_index
}
- _sqlite3BeginWriteOperation(tls, _pParse, i32(1), _iDb)
- *(*int32)(unsafe.Pointer(&(_pIndex.X11))) = _sqlite3VdbeAddOp0(tls, _62_v, i32(164))
- _sqlite3VdbeAddOp2(tls, _62_v, i32(136), _iDb, _62_iMem)
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(1), _iDb)
+ _pIndex.Xtnum = _sqlite3VdbeAddOp0(tls, _62_v, int32(164))
+ _sqlite3VdbeAddOp2(tls, _62_v, int32(136), _iDb, _62_iMem)
if _pStart == nil {
goto _181
}
- _63_n = int32(uint32(int32((uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(_pParse.X51))).X0))-uintptr(unsafe.Pointer(_pName.X0)))/1)) + ((*XToken)(unsafe.Pointer(&(_pParse.X51))).X1))
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pName.X0)) + 1*uintptr(_63_n-i32(1))))) == i32(59) {
+ _63_n = int32(uint32(int32(uintptr(unsafe.Pointer(_pParse.XsLastToken.Xz))-uintptr(unsafe.Pointer(_pName.Xz)))) + (_pParse.XsLastToken.Xn))
+ if int32(*elem1(_pName.Xz, uintptr(_63_n-int32(1)))) == int32(59) {
_63_n -= 1
}
- _62_zStmt = _sqlite3MPrintf(tls, _db, str(113091), unsafe.Pointer(func() *int8 {
- if _onError == i32(0) {
- return str(0)
+ _62_zStmt = _sqlite3MPrintf(tls, _db, str(113119), unsafe.Pointer(func() *int8 {
+ if _onError == int32(0) {
+ return str(284)
}
- return str(113111)
- }()), _63_n, unsafe.Pointer(_pName.X0))
+ return str(113139)
+ }()), _63_n, unsafe.Pointer(_pName.Xz))
goto _185
_181:
_62_zStmt = nil
_185:
- _sqlite3NestedParse(tls, _pParse, str(113119), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0), unsafe.Pointer(str(50026)), unsafe.Pointer(_pIndex.X0), unsafe.Pointer(_pTab.X0), _62_iMem, unsafe.Pointer(_62_zStmt))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_62_zStmt))
+ _sqlite3NestedParse(tls, _pParse, str(113147), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName), unsafe.Pointer(str(49981)), unsafe.Pointer(_pIndex.XzName), unsafe.Pointer(_pTab.XzName), _62_iMem, unsafe.Pointer(_62_zStmt))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_62_zStmt))
if _pTblName != nil {
_sqlite3RefillIndex(tls, _pParse, _pIndex, _62_iMem)
_sqlite3ChangeCookie(tls, _pParse, _iDb)
- _sqlite3VdbeAddParseSchemaOp(tls, _62_v, _iDb, _sqlite3MPrintf(tls, _db, str(113167), unsafe.Pointer(_pIndex.X0)))
- _sqlite3VdbeAddOp0(tls, _62_v, i32(153))
+ _sqlite3VdbeAddParseSchemaOp(tls, _62_v, _iDb, _sqlite3MPrintf(tls, _db, str(113195), unsafe.Pointer(_pIndex.XzName)))
+ _sqlite3VdbeAddOp0(tls, _62_v, int32(153))
}
- _sqlite3VdbeJumpHere(tls, _62_v, _pIndex.X11)
+ _sqlite3VdbeJumpHere(tls, _62_v, _pIndex.Xtnum)
_179:
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 && _pTblName != nil {
+ if (_db.Xinit.Xbusy) == 0 && _pTblName != nil {
goto _exit_create_index
}
- if ((_onError != i32(5)) || ((*XIndex)(_pTab.X2) == nil)) || (int32((*XIndex)(_pTab.X2).X15) == i32(5)) {
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIndex.X5))))) = (*XIndex)(_pTab.X2)
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X2))))) = _pIndex
+ if ((_onError != int32(5)) || ((*XIndex)(_pTab.XpIndex) == nil)) || (int32((*XIndex)(_pTab.XpIndex).XonError) == int32(5)) {
+ *(**XIndex)(unsafe.Pointer(&_pIndex.XpNext)) = (*XIndex)(_pTab.XpIndex)
+ *(**XIndex)(unsafe.Pointer(&_pTab.XpIndex)) = _pIndex
goto _192
}
- _68_pOther = (*XIndex)(_pTab.X2)
+ _68_pOther = (*XIndex)(_pTab.XpIndex)
_193:
- if ((*XIndex)(_68_pOther.X5) != nil) && (int32((*XIndex)(_68_pOther.X5).X15) != i32(5)) {
- _68_pOther = (*XIndex)(_68_pOther.X5)
+ if (_68_pOther.XpNext != nil) && (int32((*XIndex)(_68_pOther.XpNext).XonError) != int32(5)) {
+ _68_pOther = (*XIndex)(_68_pOther.XpNext)
goto _193
}
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pIndex.X5))))) = (*XIndex)(_68_pOther.X5)
- *(**XIndex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_68_pOther.X5))))) = _pIndex
+ *(**XIndex)(unsafe.Pointer(&_pIndex.XpNext)) = (*XIndex)(_68_pOther.XpNext)
+ *(**XIndex)(unsafe.Pointer(&_68_pOther.XpNext)) = _pIndex
_192:
_pIndex = nil
_exit_create_index:
@@ -93992,44 +95105,45 @@ _exit_create_index:
_sqlite3ExprDelete(tls, _db, _pPIWhere)
_sqlite3ExprListDelete(tls, _db, _pList)
_sqlite3SrcListDelete(tls, _db, _pTblName)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zName))
- _ = _sFix
- _ = _26_prevCol
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zName))
}
var _sqlite3CreateIndexØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CreateIndexØ00__func__Ø000[0], str(113194), 19)
-}
-
-// While a SrcList can in general represent multiple tables and subqueries
-// (as in the FROM clause of a SELECT statement) in this case it contains
-// the name of a single table, as one might find in an INSERT, DELETE,
-// or UPDATE statement. Look up that table in the symbol table and
-// return a pointer. Set an error message and return NULL if the table
-// name is not found or if any other error occurs.
-//
-// The following fields are initialized appropriate in pSrc:
-//
-// pSrc->a[0].pTab Pointer to the Table object
-// pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one
-//
+ crt.Xstrncpy(nil, &_sqlite3CreateIndexØ00__func__Ø000[0], str(113222), 19)
+}
+
+// C comment
+// /*
+// ** While a SrcList can in general represent multiple tables and subqueries
+// ** (as in the FROM clause of a SELECT statement) in this case it contains
+// ** the name of a single table, as one might find in an INSERT, DELETE,
+// ** or UPDATE statement. Look up that table in the symbol table and
+// ** return a pointer. Set an error message and return NULL if the table
+// ** name is not found or if any other error occurs.
+// **
+// ** The following fields are initialized appropriate in pSrc:
+// **
+// ** pSrc->a[0].pTab Pointer to the Table object
+// ** pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one
+// **
+// */
func _sqlite3SrcListLookup(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList) (r0 *XTable) {
var _pTab *XTable
var _pItem *TSrcList_item
- _pItem = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))
+ _pItem = (*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa))
func() {
- if _pItem == nil || (_pSrc.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104667), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListLookupØ00__func__Ø000))), unsafe.Pointer(str(113213)))
+ if _pItem == nil || _pSrc.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104667), unsafe.Pointer(&_sqlite3SrcListLookupØ00__func__Ø000), unsafe.Pointer(str(113241)))
crt.X__builtin_abort(tls)
}
}()
- _pTab = _sqlite3LocateTableItem(tls, _pParse, uint32(i32(0)), _pItem)
- _sqlite3DeleteTable(tls, (*Xsqlite3)(_pParse.X0), (*XTable)(_pItem.X4))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pItem.X4))))) = _pTab
+ _pTab = _sqlite3LocateTableItem(tls, _pParse, 0, _pItem)
+ _sqlite3DeleteTable(tls, (*Xsqlite3)(_pParse.Xdb), (*XTable)(_pItem.XpTab))
+ *(**XTable)(unsafe.Pointer(&_pItem.XpTab)) = _pTab
if _pTab != nil {
- *(*uint32)(unsafe.Pointer(&(_pTab.X8))) += 1
+ _pTab.XnTabRef += 1
}
if _sqlite3IndexedByLookup(tls, _pParse, _pItem) != 0 {
_pTab = nil
@@ -94040,46 +95154,52 @@ func _sqlite3SrcListLookup(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList) (r0 *
var _sqlite3SrcListLookupØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SrcListLookupØ00__func__Ø000[0], str(113236), 21)
+ crt.Xstrncpy(nil, &_sqlite3SrcListLookupØ00__func__Ø000[0], str(113264), 21)
}
-// Initialize a DbFixer structure. This routine must be called prior
-// to passing the structure to one of the sqliteFixAAAA() routines below.
+// C comment
+// /*
+// ** Initialize a DbFixer structure. This routine must be called prior
+// ** to passing the structure to one of the sqliteFixAAAA() routines below.
+// */
func _sqlite3FixInit(tls *crt.TLS, _pFix *XDbFixer, _pParse *XParse, _iDb int32, _zType *int8, _pName *XToken) {
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
- if (_db.X5) <= _iDb {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99270), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FixInitØ00__func__Ø000))), unsafe.Pointer(str(113257)))
+ if _db.XnDb <= _iDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99270), unsafe.Pointer(&_sqlite3FixInitØ00__func__Ø000), unsafe.Pointer(str(113285)))
crt.X__builtin_abort(tls)
}
}()
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFix.X0))))) = _pParse
- *(**int8)(unsafe.Pointer(&(_pFix.X3))) = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFix.X1))))) = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4)
- *(**int8)(unsafe.Pointer(&(_pFix.X4))) = _zType
- *(**XToken)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFix.X5))))) = _pName
- *(*int32)(unsafe.Pointer(&(_pFix.X2))) = bool2int(_iDb == i32(1))
+ *(**XParse)(unsafe.Pointer(&_pFix.XpParse)) = _pParse
+ _pFix.XzDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ *(**XSchema)(unsafe.Pointer(&_pFix.XpSchema)) = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema)
+ _pFix.XzType = _zType
+ *(**XToken)(unsafe.Pointer(&_pFix.XpName)) = _pName
+ _pFix.XbVarOnly = bool2int(_iDb == int32(1))
}
var _sqlite3FixInitØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FixInitØ00__func__Ø000[0], str(113269), 15)
-}
-
-// The following set of routines walk through the parse tree and assign
-// a specific database to all table references where the database name
-// was left unspecified in the original SQL statement. The pFix structure
-// must have been initialized by a prior call to sqlite3FixInit().
-//
-// These routines are used to make sure that an index, trigger, or
-// view in one database does not refer to objects in a different database.
-// (Exception: indices, triggers, and views in the TEMP database are
-// allowed to refer to anything.) If a reference is explicitly made
-// to an object in a different database, an error message is added to
-// pParse->zErrMsg and these routines return non-zero. If everything
-// checks out, these routines return 0.
+ crt.Xstrncpy(nil, &_sqlite3FixInitØ00__func__Ø000[0], str(113297), 15)
+}
+
+// C comment
+// /*
+// ** The following set of routines walk through the parse tree and assign
+// ** a specific database to all table references where the database name
+// ** was left unspecified in the original SQL statement. The pFix structure
+// ** must have been initialized by a prior call to sqlite3FixInit().
+// **
+// ** These routines are used to make sure that an index, trigger, or
+// ** view in one database does not refer to objects in a different database.
+// ** (Exception: indices, triggers, and views in the TEMP database are
+// ** allowed to refer to anything.) If a reference is explicitly made
+// ** to an object in a different database, an error message is added to
+// ** pParse->zErrMsg and these routines return non-zero. If everything
+// ** checks out, these routines return 0.
+// */
func _sqlite3FixSrcList(tls *crt.TLS, _pFix *XDbFixer, _pList *XSrcList) (r0 int32) {
var _i int32
var _zDb *int8
@@ -94087,48 +95207,48 @@ func _sqlite3FixSrcList(tls *crt.TLS, _pFix *XDbFixer, _pList *XSrcList) (r0 int
if func() int32 {
if _pList == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99301), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FixSrcListØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99301), unsafe.Pointer(&_sqlite3FixSrcListØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return i32(0)
+ return int32(0)
}
- _zDb = _pFix.X3
- *func() **TSrcList_item { _i = i32(0); return &_pItem }() = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_pList.X2)))))
+ _zDb = _pFix.XzDb
+ *func() **TSrcList_item { _i = int32(0); return &_pItem }() = (*TSrcList_item)(unsafe.Pointer(&_pList.Xa))
_3:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnSrc {
goto _6
}
- if (_pFix.X2) != i32(0) {
+ if _pFix.XbVarOnly != int32(0) {
goto _7
}
- if ((_pItem.X1) != nil) && _sqlite3StrICmp(tls, _pItem.X1, _zDb) != 0 {
- _sqlite3ErrorMsg(tls, (*XParse)(_pFix.X0), str(113284), unsafe.Pointer(_pFix.X4), unsafe.Pointer((*XToken)(_pFix.X5)), unsafe.Pointer(_pItem.X1))
- return i32(1)
+ if (_pItem.XzDatabase != nil) && _sqlite3StrICmp(tls, _pItem.XzDatabase, _zDb) != 0 {
+ _sqlite3ErrorMsg(tls, (*XParse)(_pFix.XpParse), str(113312), unsafe.Pointer(_pFix.XzType), _pFix.XpName, unsafe.Pointer(_pItem.XzDatabase))
+ return int32(1)
}
- _sqlite3DbFree(tls, (*Xsqlite3)((*XParse)(_pFix.X0).X0), (unsafe.Pointer)(_pItem.X1))
- *(**int8)(unsafe.Pointer(&(_pItem.X1))) = nil
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pItem.X0))))) = (*XSchema)(_pFix.X1)
+ _sqlite3DbFree(tls, (*Xsqlite3)((*XParse)(_pFix.XpParse).Xdb), unsafe.Pointer(_pItem.XzDatabase))
+ _pItem.XzDatabase = nil
+ *(**XSchema)(unsafe.Pointer(&_pItem.XpSchema)) = (*XSchema)(_pFix.XpSchema)
_7:
- if _sqlite3FixSelect(tls, _pFix, (*XSelect)(_pItem.X5)) != 0 {
- return i32(1)
+ if _sqlite3FixSelect(tls, _pFix, (*XSelect)(_pItem.XpSelect)) != 0 {
+ return int32(1)
}
- if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pItem.X12)) != 0 {
- return i32(1)
+ if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pItem.XpOn)) != 0 {
+ return int32(1)
}
*(*uintptr)(unsafe.Pointer(func() **TSrcList_item { _i += 1; return &_pItem }())) += uintptr(68)
goto _3
_6:
- return i32(0)
+ return int32(0)
}
var _sqlite3FixSrcListØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FixSrcListØ00__func__Ø000[0], str(113330), 18)
+ crt.Xstrncpy(nil, &_sqlite3FixSrcListØ00__func__Ø000[0], str(113358), 18)
}
func _sqlite3FixSelect(tls *crt.TLS, _pFix *XDbFixer, _pSelect *XSelect) (r0 int32) {
@@ -94136,54 +95256,54 @@ _0:
if _pSelect == nil {
goto _1
}
- if _sqlite3FixExprList(tls, _pFix, (*XExprList)(_pSelect.X0)) != 0 {
- return i32(1)
+ if _sqlite3FixExprList(tls, _pFix, (*XExprList)(_pSelect.XpEList)) != 0 {
+ return int32(1)
}
- if _sqlite3FixSrcList(tls, _pFix, (*XSrcList)(_pSelect.X8)) != 0 {
- return i32(1)
+ if _sqlite3FixSrcList(tls, _pFix, (*XSrcList)(_pSelect.XpSrc)) != 0 {
+ return int32(1)
}
- if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pSelect.X9)) != 0 {
- return i32(1)
+ if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pSelect.XpWhere)) != 0 {
+ return int32(1)
}
- if _sqlite3FixExprList(tls, _pFix, (*XExprList)(_pSelect.X10)) != 0 {
- return i32(1)
+ if _sqlite3FixExprList(tls, _pFix, (*XExprList)(_pSelect.XpGroupBy)) != 0 {
+ return int32(1)
}
- if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pSelect.X11)) != 0 {
- return i32(1)
+ if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pSelect.XpHaving)) != 0 {
+ return int32(1)
}
- if _sqlite3FixExprList(tls, _pFix, (*XExprList)(_pSelect.X12)) != 0 {
- return i32(1)
+ if _sqlite3FixExprList(tls, _pFix, (*XExprList)(_pSelect.XpOrderBy)) != 0 {
+ return int32(1)
}
- if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pSelect.X15)) != 0 {
- return i32(1)
+ if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pSelect.XpLimit)) != 0 {
+ return int32(1)
}
- if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pSelect.X16)) != 0 {
- return i32(1)
+ if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pSelect.XpOffset)) != 0 {
+ return int32(1)
}
- _pSelect = (*XSelect)(_pSelect.X13)
+ _pSelect = (*XSelect)(_pSelect.XpPrior)
goto _0
_1:
- return i32(0)
+ return int32(0)
}
func _sqlite3FixExprList(tls *crt.TLS, _pFix *XDbFixer, _pList *XExprList) (r0 int32) {
var _i int32
var _pItem *TExprList_item
if _pList == nil {
- return i32(0)
+ return int32(0)
}
- *func() **TExprList_item { _i = i32(0); return &_pItem }() = (*TExprList_item)(unsafe.Pointer((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))
+ *func() **TExprList_item { _i = int32(0); return &_pItem }() = (*TExprList_item)(unsafe.Pointer(&_pList.Xa))
_1:
- if _i >= (_pList.X0) {
+ if _i >= _pList.XnExpr {
goto _4
}
- if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pItem.X0)) != 0 {
- return i32(1)
+ if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pItem.XpExpr)) != 0 {
+ return int32(1)
}
*(*uintptr)(unsafe.Pointer(func() **TExprList_item { _i += 1; return &_pItem }())) += uintptr(20)
goto _1
_4:
- return i32(0)
+ return int32(0)
}
func _sqlite3FixExpr(tls *crt.TLS, _pFix *XDbFixer, _pExpr *XExpr) (r0 int32) {
@@ -94191,229 +95311,243 @@ _0:
if _pExpr == nil {
goto _1
}
- if int32(_pExpr.X0) != i32(135) {
+ if int32(_pExpr.Xop) != int32(135) {
goto _2
}
- if ((*t21)(unsafe.Pointer(&((*Xsqlite3)((*XParse)(_pFix.X0).X0).X33))).X2) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(101))
+ if (((*Xsqlite3)((*XParse)(_pFix.XpParse).Xdb).Xinit).Xbusy) != 0 {
+ _pExpr.Xop = uint8(101)
goto _4
}
- _sqlite3ErrorMsg(tls, (*XParse)(_pFix.X0), str(113348), unsafe.Pointer(_pFix.X4))
- return i32(1)
+ _sqlite3ErrorMsg(tls, (*XParse)(_pFix.XpParse), str(113376), unsafe.Pointer(_pFix.XzType))
+ return int32(1)
_4:
_2:
- if ((_pExpr.X2) & uint32(i32(8404992))) != uint32(i32(0)) {
+ if (_pExpr.Xflags & uint32(8404992)) != (0) {
goto _1
}
- if ((_pExpr.X2) & uint32(i32(2048))) == uint32(i32(0)) {
+ if (_pExpr.Xflags & uint32(2048)) == (0) {
goto _6
}
- if _sqlite3FixSelect(tls, _pFix, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))) != 0 {
- return i32(1)
+ if _sqlite3FixSelect(tls, _pFix, (*XSelect)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))) != 0 {
+ return int32(1)
}
goto _8
_6:
- if _sqlite3FixExprList(tls, _pFix, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))) != 0 {
- return i32(1)
+ if _sqlite3FixExprList(tls, _pFix, (*XExprList)(*(*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))) != 0 {
+ return int32(1)
}
_8:
- if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pExpr.X5)) != 0 {
- return i32(1)
+ if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pExpr.XpRight)) != 0 {
+ return int32(1)
}
- _pExpr = (*XExpr)(_pExpr.X4)
+ _pExpr = (*XExpr)(_pExpr.XpLeft)
goto _0
_1:
- return i32(0)
+ return int32(0)
}
-// Set the sort order for the last element on the given ExprList.
+// C comment
+// /*
+// ** Set the sort order for the last element on the given ExprList.
+// */
func _sqlite3ExprListSetSortOrder(tls *crt.TLS, _p *XExprList, _iSortOrder int32) {
if _p == nil {
return
}
- i32(0)
+
func() {
- if (_p.X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92474), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListSetSortOrderØ00__func__Ø000))), unsafe.Pointer(str(113372)))
+ if _p.XnExpr <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92474), unsafe.Pointer(&_sqlite3ExprListSetSortOrderØ00__func__Ø000), unsafe.Pointer(str(113400)))
crt.X__builtin_abort(tls)
}
}()
- if _iSortOrder < i32(0) {
+ if _iSortOrder < int32(0) {
func() {
- if int32((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_p.X2)))))+20*uintptr((_p.X0)-i32(1)))).X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92476), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListSetSortOrderØ00__func__Ø000))), unsafe.Pointer(str(113383)))
+ if int32(elem57((*TExprList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_p.XnExpr-int32(1))).XsortOrder) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92476), unsafe.Pointer(&_sqlite3ExprListSetSortOrderØ00__func__Ø000), unsafe.Pointer(str(113411)))
crt.X__builtin_abort(tls)
}
}()
return
}
- *(*uint8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_p.X2))))) + 20*uintptr((_p.X0)-i32(1)))).X3))) = uint8(_iSortOrder)
+ elem57((*TExprList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_p.XnExpr-int32(1))).XsortOrder = uint8(_iSortOrder)
}
var _sqlite3ExprListSetSortOrderØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprListSetSortOrderØ00__func__Ø000[0], str(113425), 28)
+ crt.Xstrncpy(nil, &_sqlite3ExprListSetSortOrderØ00__func__Ø000[0], str(113453), 28)
}
-// If the expression list pEList contains more than iLimit elements,
-// leave an error message in pParse.
+// C comment
+// /*
+// ** If the expression list pEList contains more than iLimit elements,
+// ** leave an error message in pParse.
+// */
func _sqlite3ExprListCheckLength(tls *crt.TLS, _pParse *XParse, _pEList *XExprList, _zObject *int8) {
var _mx int32
- _mx = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_pParse.X0).X31))))) + 4*uintptr(i32(2))))
- if (_pEList != nil) && ((_pEList.X0) > _mx) {
- _sqlite3ErrorMsg(tls, _pParse, str(113453), unsafe.Pointer(_zObject))
- }
-}
-
-// Resolve names in expressions that can only reference a single table:
-//
-// * CHECK constraints
-// * WHERE clauses on partial indices
-//
-// The Expr.iTable value for Expr.op==TK_COLUMN nodes of the expression
-// is set to -1 and the Expr.iColumn value is set to the column number.
-//
-// Any errors cause an error message to be set in pParse.
+ _mx = *elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_pParse.Xdb).XaLimit))), uintptr(2))
+ if (_pEList != nil) && (_pEList.XnExpr > _mx) {
+ _sqlite3ErrorMsg(tls, _pParse, str(113481), unsafe.Pointer(_zObject))
+ }
+}
+
+// C comment
+// /*
+// ** Resolve names in expressions that can only reference a single table:
+// **
+// ** * CHECK constraints
+// ** * WHERE clauses on partial indices
+// **
+// ** The Expr.iTable value for Expr.op==TK_COLUMN nodes of the expression
+// ** is set to -1 and the Expr.iColumn value is set to the column number.
+// **
+// ** Any errors cause an error message to be set in pParse.
+// */
func _sqlite3ResolveSelfReference(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _type int32, _pExpr *XExpr, _pList *XExprList) {
var _sSrc XSrcList
var _sNC XNameContext
func() {
- if _type != i32(4) && _type != i32(2) && _type != i32(32) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(90883), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ResolveSelfReferenceØ00__func__Ø000))), unsafe.Pointer(str(113476)))
+ if _type != int32(4) && _type != int32(2) && _type != int32(32) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(90883), unsafe.Pointer(&_sqlite3ResolveSelfReferenceØ00__func__Ø000), unsafe.Pointer(str(113504)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, (unsafe.Pointer)(&_sNC), i32(0), u32(32))
- crt.Xmemset(tls, (unsafe.Pointer)(&_sSrc), i32(0), u32(76))
- *(*int32)(unsafe.Pointer(&(_sSrc.X0))) = i32(1)
- *(**int8)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_sSrc.X2))))) + 68*uintptr(i32(0)))).X2))) = _pTab.X0
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_sSrc.X2))))) + 68*uintptr(i32(0)))).X4))))) = _pTab
- *(*int32)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_sSrc.X2))))) + 68*uintptr(i32(0)))).X11))) = i32(-1)
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X0))))) = _pParse
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X1))))) = &_sSrc
- *(*uint16)(unsafe.Pointer(&(_sNC.X7))) = uint16(_type)
+ crt.Xmemset(tls, unsafe.Pointer(&_sNC), int32(0), uint32(32))
+ crt.Xmemset(tls, unsafe.Pointer(&_sSrc), int32(0), uint32(76))
+ _sSrc.XnSrc = int32(1)
+ elem6((*TSrcList_item)(unsafe.Pointer(&_sSrc.Xa)), 0).XzName = _pTab.XzName
+ *(**XTable)(unsafe.Pointer(&(elem6((*TSrcList_item)(unsafe.Pointer(&_sSrc.Xa)), 0).XpTab))) = _pTab
+ elem6((*TSrcList_item)(unsafe.Pointer(&_sSrc.Xa)), 0).XiCursor = int32(-1)
+ *(**XParse)(unsafe.Pointer(&_sNC.XpParse)) = _pParse
+ *(**XSrcList)(unsafe.Pointer(&_sNC.XpSrcList)) = &_sSrc
+ _sNC.XncFlags = uint16(_type)
if _sqlite3ResolveExprNames(tls, &_sNC, _pExpr) != 0 {
return
}
if _pList != nil {
_sqlite3ResolveExprListNames(tls, &_sNC, _pList)
}
- _ = _sSrc
- _ = _sNC
}
var _sqlite3ResolveSelfReferenceØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ResolveSelfReferenceØ00__func__Ø000[0], str(113533), 28)
-}
-
-// Backwards Compatibility Hack:
-//
-// Historical versions of SQLite accepted strings as column names in
-// indexes and PRIMARY KEY constraints and in UNIQUE constraints. Example:
-//
-// CREATE TABLE xyz(a,b,c,d,e,PRIMARY KEY('a'),UNIQUE('b','c' COLLATE trim)
-// CREATE INDEX abc ON xyz('c','d' DESC,'e' COLLATE nocase DESC);
-//
-// This is goofy. But to preserve backwards compatibility we continue to
-// accept it. This routine does the necessary conversion. It converts
-// the expression given in its argument from a TK_STRING into a TK_ID
-// if the expression is just a TK_STRING with an optional COLLATE clause.
-// If the epxression is anything other than TK_STRING, the expression is
-// unchanged.
+ crt.Xstrncpy(nil, &_sqlite3ResolveSelfReferenceØ00__func__Ø000[0], str(113561), 28)
+}
+
+// C comment
+// /*
+// ** Backwards Compatibility Hack:
+// **
+// ** Historical versions of SQLite accepted strings as column names in
+// ** indexes and PRIMARY KEY constraints and in UNIQUE constraints. Example:
+// **
+// ** CREATE TABLE xyz(a,b,c,d,e,PRIMARY KEY('a'),UNIQUE('b','c' COLLATE trim)
+// ** CREATE INDEX abc ON xyz('c','d' DESC,'e' COLLATE nocase DESC);
+// **
+// ** This is goofy. But to preserve backwards compatibility we continue to
+// ** accept it. This routine does the necessary conversion. It converts
+// ** the expression given in its argument from a TK_STRING into a TK_ID
+// ** if the expression is just a TK_STRING with an optional COLLATE clause.
+// ** If the epxression is anything other than TK_STRING, the expression is
+// ** unchanged.
+// */
func _sqlite3StringToId(tls *crt.TLS, _p *XExpr) {
- if int32(_p.X0) == i32(97) {
- *(*uint8)(unsafe.Pointer(&(_p.X0))) = uint8(i32(27))
+ if int32(_p.Xop) == int32(97) {
+ _p.Xop = uint8(27)
goto _3
}
- if (int32(_p.X0) == i32(94)) && (int32((*XExpr)(_p.X4).X0) == i32(97)) {
- *(*uint8)(unsafe.Pointer(&((*XExpr)(_p.X4).X0))) = uint8(i32(27))
+ if (int32(_p.Xop) == int32(94)) && (int32((*XExpr)(_p.XpLeft).Xop) == int32(97)) {
+ (*XExpr)(_p.XpLeft).Xop = uint8(27)
}
_3:
}
-// Return true if value x is found any of the first nCol entries of aiCol[]
+// C comment
+// /* Return true if value x is found any of the first nCol entries of aiCol[]
+// */
func _hasColumn(tls *crt.TLS, _aiCol *int16, _nCol int32, _x int32) (r0 int32) {
_0:
- if postInc1(&_nCol, int32(-1)) <= i32(0) {
+ if postInc2(&_nCol, -1) <= int32(0) {
goto _1
}
- if _x == int32(*postInc72(&_aiCol, 2)) {
- return i32(1)
+ if _x == int32(*postInc50(&_aiCol, 2)) {
+ return int32(1)
}
goto _0
_1:
- return i32(0)
+ return int32(0)
}
-// Estimate the average size of a row for an index.
+// C comment
+// /*
+// ** Estimate the average size of a row for an index.
+// */
func _estimateIndexWidth(tls *crt.TLS, _pIdx *XIndex) {
var _1_x int16
var _i int32
var _wIndex uint32
var _aCol *XColumn
- _wIndex = u32(0)
- _aCol = (*XColumn)((*XTable)(_pIdx.X3).X1)
- _i = i32(0)
+ _wIndex = uint32(0)
+ _aCol = (*XColumn)((*XTable)(_pIdx.XpTable).XaCol)
+ _i = int32(0)
_0:
- if _i >= int32(_pIdx.X14) {
+ if _i >= int32(_pIdx.XnColumn) {
goto _3
}
- _1_x = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i)))
+ _1_x = *elem50(_pIdx.XaiColumn, uintptr(_i))
func() {
- if int32(_1_x) >= int32((*XTable)(_pIdx.X3).X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101344), unsafe.Pointer((*int8)(unsafe.Pointer(&_estimateIndexWidthØ00__func__Ø000))), unsafe.Pointer(str(113561)))
+ if int32(_1_x) >= int32((*XTable)(_pIdx.XpTable).XnCol) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101344), unsafe.Pointer(&_estimateIndexWidthØ00__func__Ø000), unsafe.Pointer(str(113589)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_wIndex
- *p = (*p) + uint32(func() int32 {
- if int32(_1_x) < i32(0) {
- return i32(1)
- }
- return int32((*XColumn)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aCol)) + 16*uintptr(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i)))))).X5)
- }())
- sink5(*p)
- }
+ _wIndex += uint32(func() int32 {
+ if int32(_1_x) < int32(0) {
+ return int32(1)
+ }
+ return int32(elem41(_aCol, uintptr(*elem50(_pIdx.XaiColumn, uintptr(_i)))).XszEst)
+ }())
_i += 1
goto _0
_3:
- *(*int16)(unsafe.Pointer(&(_pIdx.X12))) = _sqlite3LogEst(tls, uint64(_wIndex*uint32(i32(4))))
+ _pIdx.XszIdxRow = _sqlite3LogEst(tls, uint64(_wIndex*uint32(4)))
}
var _estimateIndexWidthØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_estimateIndexWidthØ00__func__Ø000[0], str(113582), 19)
+ crt.Xstrncpy(nil, &_estimateIndexWidthØ00__func__Ø000[0], str(113610), 19)
}
-// Run the parser and code generator recursively in order to generate
-// code for the SQL statement given onto the end of the pParse context
-// currently under construction. When the parser is run recursively
-// this way, the final OP_Halt is not appended and other initialization
-// and finalization steps are omitted because those are handling by the
-// outermost parser.
-//
-// Not everything is nestable. This facility is designed to permit
-// INSERT, UPDATE, and DELETE operations against SQLITE_MASTER. Use
-// care if you decide to try to use this routine for some other purposes.
+// C comment
+// /*
+// ** Run the parser and code generator recursively in order to generate
+// ** code for the SQL statement given onto the end of the pParse context
+// ** currently under construction. When the parser is run recursively
+// ** this way, the final OP_Halt is not appended and other initialization
+// ** and finalization steps are omitted because those are handling by the
+// ** outermost parser.
+// **
+// ** Not everything is nestable. This facility is designed to permit
+// ** INSERT, UPDATE, and DELETE operations against SQLITE_MASTER. Use
+// ** care if you decide to try to use this routine for some other purposes.
+// */
func _sqlite3NestedParse(tls *crt.TLS, _pParse *XParse, _zFormat *int8, args ...interface{}) {
var _zSql, _zErrMsg *int8
var _ap []interface{}
var _db *Xsqlite3
var _saveBuf [84]int8
_zErrMsg = nil
- _db = (*Xsqlite3)(_pParse.X0)
- if (_pParse.X16) != 0 {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pParse.XnErr != 0 {
return
}
func() {
- if int32(_pParse.X6) >= i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99955), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3NestedParseØ00__func__Ø000))), unsafe.Pointer(str(113601)))
+ if int32(_pParse.Xnested) >= int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99955), unsafe.Pointer(&_sqlite3NestedParseØ00__func__Ø000), unsafe.Pointer(str(113629)))
crt.X__builtin_abort(tls)
}
}()
@@ -94423,220 +95557,234 @@ func _sqlite3NestedParse(tls *crt.TLS, _pParse *XParse, _zFormat *int8, args ...
if _zSql == nil {
return
}
- *(*uint8)(unsafe.Pointer(&(_pParse.X6))) += 1
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_saveBuf), (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pParse))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(u32(400))))))))), u32(84))
- crt.Xmemset(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pParse))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(u32(400))))))))), i32(0), u32(84))
+ _pParse.Xnested += 1
+ crt.Xmemcpy(tls, unsafe.Pointer(&_saveBuf), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pParse))+uintptr(uint32(400))))), uint32(84))
+ crt.Xmemset(tls, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pParse))+uintptr(uint32(400))))), int32(0), uint32(84))
_sqlite3RunParser(tls, _pParse, _zSql, &_zErrMsg)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErrMsg))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zSql))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(_pParse))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(u32(400))))))))), (unsafe.Pointer)(&_saveBuf), u32(84))
- *(*uint8)(unsafe.Pointer(&(_pParse.X6))) -= 1
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErrMsg))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zSql))
+ crt.Xmemcpy(tls, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_pParse))+uintptr(uint32(400))))), unsafe.Pointer(&_saveBuf), uint32(84))
+ _pParse.Xnested -= 1
_ = _saveBuf
}
var _sqlite3NestedParseØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3NestedParseØ00__func__Ø000[0], str(113619), 19)
+ crt.Xstrncpy(nil, &_sqlite3NestedParseØ00__func__Ø000[0], str(113647), 19)
}
-// Generate code that will erase and refill index *pIdx. This is
-// used to initialize a newly created index or to recompute the
-// content of an index in response to a REINDEX command.
-//
-// if memRootPage is not negative, it means that the index is newly
-// created. The register specified by memRootPage contains the
-// root page number of the index. If memRootPage is negative, then
-// the index already exists and must be cleared before being refilled and
-// the root page number of the index is taken from pIndex->tnum.
+// C comment
+// /*
+// ** Generate code that will erase and refill index *pIdx. This is
+// ** used to initialize a newly created index or to recompute the
+// ** content of an index in response to a REINDEX command.
+// **
+// ** if memRootPage is not negative, it means that the index is newly
+// ** created. The register specified by memRootPage contains the
+// ** root page number of the index. If memRootPage is negative, then
+// ** the index already exists and must be cleared before being refilled and
+// ** the root page number of the index is taken from pIndex->tnum.
+// */
func _sqlite3RefillIndex(tls *crt.TLS, _pParse *XParse, _pIndex *XIndex, _memRootPage int32) {
var _iTab, _iIdx, _iSorter, _addr1, _addr2, _tnum, _iPartIdxLabel, _regRecord, _iDb, _4_j2 int32
var _db *Xsqlite3
var _pTab *XTable
var _v *TVdbe
var _pKey *XKeyInfo
- _pTab = (*XTable)(_pIndex.X3)
- _iTab = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _iIdx = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _db = (*Xsqlite3)(_pParse.X0)
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pIndex.X6))
- if _sqlite3AuthCheck(tls, _pParse, i32(27), _pIndex.X0, nil, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0) != 0 {
+ _pTab = (*XTable)(_pIndex.XpTable)
+ _iTab = postInc2(&_pParse.XnTab, 1)
+ _iIdx = postInc2(&_pParse.XnTab, 1)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pIndex.XpSchema))
+ if _sqlite3AuthCheck(tls, _pParse, int32(27), _pIndex.XzName, nil, elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName) != 0 {
return
}
- _sqlite3TableLock(tls, _pParse, _iDb, _pTab.X7, uint8(i32(1)), _pTab.X0)
+ _sqlite3TableLock(tls, _pParse, _iDb, _pTab.Xtnum, uint8(1), _pTab.XzName)
_v = _sqlite3GetVdbe(tls, _pParse)
if _v == nil {
return
}
- if _memRootPage >= i32(0) {
+ if _memRootPage >= int32(0) {
_tnum = _memRootPage
goto _3
}
- _tnum = _pIndex.X11
+ _tnum = _pIndex.Xtnum
_3:
_pKey = _sqlite3KeyInfoOfIndex(tls, _pParse, _pIndex)
func() {
- if _pKey == nil && (_db.X17) == 0 && (_pParse.X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102495), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RefillIndexØ00__func__Ø000))), unsafe.Pointer(str(113638)))
+ if _pKey == nil && _db.XmallocFailed == 0 && _pParse.XnErr == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102495), unsafe.Pointer(&_sqlite3RefillIndexØ00__func__Ø000), unsafe.Pointer(str(113666)))
crt.X__builtin_abort(tls)
}
}()
- _iSorter = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _sqlite3VdbeAddOp4(tls, _v, i32(111), _iSorter, i32(0), int32(_pIndex.X13), (*int8)(unsafe.Pointer(_sqlite3KeyInfoRef(tls, _pKey))), i32(-5))
- _sqlite3OpenTable(tls, _pParse, _iTab, _iDb, _pTab, i32(106))
- _addr1 = _sqlite3VdbeAddOp2(tls, _v, i32(37), _iTab, i32(0))
+ _iSorter = postInc2(&_pParse.XnTab, 1)
+ _sqlite3VdbeAddOp4(tls, _v, int32(111), _iSorter, int32(0), int32(_pIndex.XnKeyCol), (*int8)(unsafe.Pointer(_sqlite3KeyInfoRef(tls, _pKey))), int32(-5))
+ _sqlite3OpenTable(tls, _pParse, _iTab, _iDb, _pTab, int32(106))
+ _addr1 = _sqlite3VdbeAddOp2(tls, _v, int32(37), _iTab, int32(0))
_regRecord = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3GenerateIndexKey(tls, _pParse, _pIndex, _iTab, _regRecord, i32(0), &_iPartIdxLabel, nil, i32(0))
- _sqlite3VdbeAddOp2(tls, _v, i32(127), _iSorter, _regRecord)
+ _sqlite3GenerateIndexKey(tls, _pParse, _pIndex, _iTab, _regRecord, int32(0), &_iPartIdxLabel, nil, int32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(127), _iSorter, _regRecord)
_sqlite3ResolvePartIdxLabel(tls, _pParse, _iPartIdxLabel)
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _iTab, _addr1+i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _iTab, _addr1+int32(1))
_sqlite3VdbeJumpHere(tls, _v, _addr1)
- if _memRootPage < i32(0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(134), _tnum, _iDb)
+ if _memRootPage < int32(0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(134), _tnum, _iDb)
}
- _sqlite3VdbeAddOp4(tls, _v, i32(107), _iIdx, _tnum, _iDb, (*int8)(unsafe.Pointer(_pKey)), i32(-5))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(1)|func() int32 {
- if _memRootPage >= i32(0) {
- return i32(16)
+ _sqlite3VdbeAddOp4(tls, _v, int32(107), _iIdx, _tnum, _iDb, (*int8)(unsafe.Pointer(_pKey)), int32(-5))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(int32(1)|func() int32 {
+ if _memRootPage >= int32(0) {
+ return int32(16)
}
- return i32(0)
+ return int32(0)
}()))
- _addr1 = _sqlite3VdbeAddOp2(tls, _v, i32(35), _iSorter, i32(0))
- if int32(_pIndex.X15) != i32(0) {
- _4_j2 = _sqlite3VdbeCurrentAddr(tls, _v) + i32(3)
+ _addr1 = _sqlite3VdbeAddOp2(tls, _v, int32(35), _iSorter, int32(0))
+ if int32(_pIndex.XonError) != int32(0) {
+ _4_j2 = _sqlite3VdbeCurrentAddr(tls, _v) + int32(3)
_sqlite3VdbeGoto(tls, _v, _4_j2)
_addr2 = _sqlite3VdbeCurrentAddr(tls, _v)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(122), _iSorter, _4_j2, _regRecord, int32(_pIndex.X13))
- _sqlite3UniqueConstraint(tls, _pParse, i32(2), _pIndex)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(122), _iSorter, _4_j2, _regRecord, int32(_pIndex.XnKeyCol))
+ _sqlite3UniqueConstraint(tls, _pParse, int32(2), _pIndex)
goto _12
}
_addr2 = _sqlite3VdbeCurrentAddr(tls, _v)
_12:
- _sqlite3VdbeAddOp3(tls, _v, i32(123), _iSorter, _regRecord, _iIdx)
- _sqlite3VdbeAddOp3(tls, _v, i32(33), _iIdx, i32(0), i32(-1))
- _sqlite3VdbeAddOp2(tls, _v, i32(128), _iIdx, _regRecord)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(16)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(123), _iSorter, _regRecord, _iIdx)
+ _sqlite3VdbeAddOp3(tls, _v, int32(33), _iIdx, int32(0), int32(-1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(128), _iIdx, _regRecord)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(16))
_sqlite3ReleaseTempReg(tls, _pParse, _regRecord)
- _sqlite3VdbeAddOp2(tls, _v, i32(3), _iSorter, _addr2)
+ _sqlite3VdbeAddOp2(tls, _v, int32(3), _iSorter, _addr2)
_sqlite3VdbeJumpHere(tls, _v, _addr1)
- _sqlite3VdbeAddOp1(tls, _v, i32(114), _iTab)
- _sqlite3VdbeAddOp1(tls, _v, i32(114), _iIdx)
- _sqlite3VdbeAddOp1(tls, _v, i32(114), _iSorter)
+ _sqlite3VdbeAddOp1(tls, _v, int32(114), _iTab)
+ _sqlite3VdbeAddOp1(tls, _v, int32(114), _iIdx)
+ _sqlite3VdbeAddOp1(tls, _v, int32(114), _iSorter)
}
var _sqlite3RefillIndexØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RefillIndexØ00__func__Ø000[0], str(113682), 19)
+ crt.Xstrncpy(nil, &_sqlite3RefillIndexØ00__func__Ø000[0], str(113710), 19)
}
-// If a prior call to sqlite3GenerateIndexKey() generated a jump-over label
-// because it was a partial index, then this routine should be called to
-// resolve that label.
+// C comment
+// /*
+// ** If a prior call to sqlite3GenerateIndexKey() generated a jump-over label
+// ** because it was a partial index, then this routine should be called to
+// ** resolve that label.
+// */
func _sqlite3ResolvePartIdxLabel(tls *crt.TLS, _pParse *XParse, _iLabel int32) {
if _iLabel != 0 {
- _sqlite3VdbeResolveLabel(tls, (*TVdbe)(_pParse.X2), _iLabel)
+ _sqlite3VdbeResolveLabel(tls, (*TVdbe)(_pParse.XpVdbe), _iLabel)
_sqlite3ExprCachePop(tls, _pParse)
}
}
-// Code an OP_Halt due to UNIQUE or PRIMARY KEY constraint violation.
+// C comment
+// /*
+// ** Code an OP_Halt due to UNIQUE or PRIMARY KEY constraint violation.
+// */
func _sqlite3UniqueConstraint(tls *crt.TLS, _pParse *XParse, _onError int32, _pIdx *XIndex) {
var _j int32
var _zErr, _3_zCol *int8
var _pTab *XTable
var _errMsg XStrAccum
- _pTab = (*XTable)(_pIdx.X3)
- _sqlite3StrAccumInit(tls, &_errMsg, (*Xsqlite3)(_pParse.X0), nil, i32(0), i32(200))
- if (*XExprList)(_pIdx.X10) != nil {
- _sqlite3XPrintf(tls, &_errMsg, str(113701), unsafe.Pointer(_pIdx.X0))
+ _pTab = (*XTable)(_pIdx.XpTable)
+ _sqlite3StrAccumInit(tls, &_errMsg, (*Xsqlite3)(_pParse.Xdb), nil, int32(0), int32(200))
+ if _pIdx.XaColExpr != nil {
+ _sqlite3XPrintf(tls, &_errMsg, str(113729), unsafe.Pointer(_pIdx.XzName))
goto _1
}
- _j = i32(0)
+ _j = int32(0)
_2:
- if _j >= int32(_pIdx.X13) {
+ if _j >= int32(_pIdx.XnKeyCol) {
goto _5
}
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_j)))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103877), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UniqueConstraintØ00__func__Ø000))), unsafe.Pointer(str(113712)))
+ if int32(*elem50(_pIdx.XaiColumn, uintptr(_j))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103877), unsafe.Pointer(&_sqlite3UniqueConstraintØ00__func__Ø000), unsafe.Pointer(str(113740)))
crt.X__builtin_abort(tls)
}
}()
- _3_zCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_j)))))).X0
+ _3_zCol = elem41((*XColumn)(_pTab.XaCol), uintptr(*elem50(_pIdx.XaiColumn, uintptr(_j)))).XzName
if _j != 0 {
- _sqlite3StrAccumAppend(tls, &_errMsg, str(113733), i32(2))
+ _sqlite3StrAccumAppend(tls, &_errMsg, str(113761), int32(2))
}
- _sqlite3XPrintf(tls, &_errMsg, str(8018), unsafe.Pointer(_pTab.X0), unsafe.Pointer(_3_zCol))
+ _sqlite3XPrintf(tls, &_errMsg, str(7919), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(_3_zCol))
_j += 1
goto _2
_5:
_1:
_zErr = _sqlite3StrAccumFinish(tls, &_errMsg)
_sqlite3HaltConstraint(tls, _pParse, func() int32 {
- if int32((uint32(_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(2) {
- return i32(1555)
+ if int32((uint32(_pIdx.XidxType)<<30)>>30) == int32(2) {
+ return int32(1555)
}
- return i32(2067)
- }(), _onError, _zErr, int8(i32(-1)), uint8(i32(2)))
- _ = _errMsg
+ return int32(2067)
+ }(), _onError, _zErr, int8(-1), uint8(2))
}
var _sqlite3UniqueConstraintØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3UniqueConstraintØ00__func__Ø000[0], str(113736), 24)
-}
-
-// Generate code that will increment the schema cookie.
-//
-// The schema cookie is used to determine when the schema for the
-// database changes. After each schema change, the cookie value
-// changes. When a process first reads the schema it records the
-// cookie. Thereafter, whenever it goes to access the database,
-// it checks the cookie to make sure the schema has not changed
-// since it was last read.
-//
-// This plan is not completely bullet-proof. It is possible for
-// the schema to change multiple times and for the cookie to be
-// set back to prior value. But schema changes are infrequent
-// and the probability of hitting the same cookie value is only
-// 1 chance in 2^32. So we're safe enough.
-//
-// IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments
-// the schema-version whenever the schema changes.
+ crt.Xstrncpy(nil, &_sqlite3UniqueConstraintØ00__func__Ø000[0], str(113764), 24)
+}
+
+// C comment
+// /*
+// ** Generate code that will increment the schema cookie.
+// **
+// ** The schema cookie is used to determine when the schema for the
+// ** database changes. After each schema change, the cookie value
+// ** changes. When a process first reads the schema it records the
+// ** cookie. Thereafter, whenever it goes to access the database,
+// ** it checks the cookie to make sure the schema has not changed
+// ** since it was last read.
+// **
+// ** This plan is not completely bullet-proof. It is possible for
+// ** the schema to change multiple times and for the cookie to be
+// ** set back to prior value. But schema changes are infrequent
+// ** and the probability of hitting the same cookie value is only
+// ** 1 chance in 2^32. So we're safe enough.
+// **
+// ** IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments
+// ** the schema-version whenever the schema changes.
+// */
func _sqlite3ChangeCookie(tls *crt.TLS, _pParse *XParse, _iDb int32) {
var _db *Xsqlite3
var _v *TVdbe
- _db = (*Xsqlite3)(_pParse.X0)
- _v = (*TVdbe)(_pParse.X2)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101170), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ChangeCookieØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101170), unsafe.Pointer(&_sqlite3ChangeCookieØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp3(tls, _v, i32(104), _iDb, i32(1), ((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X4).X0)+i32(1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(104), _iDb, int32(1), ((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).Xschema_cookie)+int32(1))
}
var _sqlite3ChangeCookieØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ChangeCookieØ00__func__Ø000[0], str(113760), 20)
+ crt.Xstrncpy(nil, &_sqlite3ChangeCookieØ00__func__Ø000[0], str(113788), 20)
}
-// Add an OP_ParseSchema opcode. This routine is broken out from
-// sqlite3VdbeAddOp4() since it needs to also needs to mark all btrees
-// as having been used.
-//
-// The zWhere string must have been obtained from sqlite3_malloc().
-// This routine will take ownership of the allocated memory.
+// C comment
+// /*
+// ** Add an OP_ParseSchema opcode. This routine is broken out from
+// ** sqlite3VdbeAddOp4() since it needs to also needs to mark all btrees
+// ** as having been used.
+// **
+// ** The zWhere string must have been obtained from sqlite3_malloc().
+// ** This routine will take ownership of the allocated memory.
+// */
func _sqlite3VdbeAddParseSchemaOp(tls *crt.TLS, _p *TVdbe, _iDb int32, _zWhere *int8) {
var _j int32
- _sqlite3VdbeAddOp4(tls, _p, i32(139), _iDb, i32(0), i32(0), _zWhere, i32(-1))
- _j = i32(0)
+ _sqlite3VdbeAddOp4(tls, _p, int32(139), _iDb, int32(0), int32(0), _zWhere, int32(-1))
+ _j = int32(0)
_0:
- if _j >= ((*Xsqlite3)(_p.X0).X5) {
+ if _j >= ((*Xsqlite3)(_p.Xdb).XnDb) {
goto _3
}
_sqlite3VdbeUsesBtree(tls, _p, _j)
@@ -94645,314 +95793,300 @@ _0:
_3:
}
-// Resize an Index object to hold N columns total. Return SQLITE_OK
-// on success and SQLITE_NOMEM on an OOM error.
+// C comment
+// /*
+// ** Resize an Index object to hold N columns total. Return SQLITE_OK
+// ** on success and SQLITE_NOMEM on an OOM error.
+// */
func _resizeIndexObject(tls *crt.TLS, _db *Xsqlite3, _pIdx *XIndex, _N int32) (r0 int32) {
var _nByte int32
var _zExtra *int8
- if int32(_pIdx.X14) >= _N {
- return i32(0)
+ if int32(_pIdx.XnColumn) >= _N {
+ return int32(0)
}
func() {
- if int32((uint32((_pIdx.X16)>>uint(i32(4)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101304), unsafe.Pointer((*int8)(unsafe.Pointer(&_resizeIndexObjectØ00__func__Ø000))), unsafe.Pointer(str(113780)))
+ if int32((uint32(_pIdx.XidxType>>4)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101304), unsafe.Pointer(&_resizeIndexObjectØ00__func__Ø000), unsafe.Pointer(str(113808)))
crt.X__builtin_abort(tls)
}
}()
- _nByte = int32(u32(7) * uint32(_N))
+ _nByte = int32(uint32(7) * uint32(_N))
_zExtra = (*int8)(_sqlite3DbMallocZero(tls, _db, uint64(_nByte)))
if _zExtra == nil {
- return _sqlite3NomemError(tls, i32(101307))
- }
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zExtra), (unsafe.Pointer)(_pIdx.X8), u32(4)*uint32(_pIdx.X14))
- *(***int8)(unsafe.Pointer(&(_pIdx.X8))) = (**int8)(unsafe.Pointer(_zExtra))
- {
- p := &_zExtra
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(u32(4)*uint32(_N))))
- sink0(*p)
- }
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zExtra), (unsafe.Pointer)(_pIdx.X1), u32(2)*uint32(_pIdx.X14))
- *(**int16)(unsafe.Pointer(&(_pIdx.X1))) = (*int16)(unsafe.Pointer(_zExtra))
- {
- p := &_zExtra
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(u32(2)*uint32(_N))))
- sink0(*p)
+ return _sqlite3NomemError(tls, int32(101307))
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zExtra), (unsafe.Pointer)(_pIdx.X7), uint32(_pIdx.X14))
- *(**uint8)(unsafe.Pointer(&(_pIdx.X7))) = (*uint8)(unsafe.Pointer(_zExtra))
- *(*uint16)(unsafe.Pointer(&(_pIdx.X14))) = uint16(_N)
- storebits3((*int8)(unsafe.Pointer(&(_pIdx.X16))), int8(i32(1)), 16, 4)
- return i32(0)
+ crt.Xmemcpy(tls, unsafe.Pointer(_zExtra), unsafe.Pointer(_pIdx.XazColl), uint32(4)*uint32(_pIdx.XnColumn))
+ _pIdx.XazColl = (**int8)(unsafe.Pointer(_zExtra))
+ *(*uintptr)(unsafe.Pointer(&_zExtra)) += uintptr(uint32(4) * uint32(_N))
+ crt.Xmemcpy(tls, unsafe.Pointer(_zExtra), unsafe.Pointer(_pIdx.XaiColumn), uint32(2)*uint32(_pIdx.XnColumn))
+ _pIdx.XaiColumn = (*int16)(unsafe.Pointer(_zExtra))
+ *(*uintptr)(unsafe.Pointer(&_zExtra)) += uintptr(uint32(2) * uint32(_N))
+ crt.Xmemcpy(tls, unsafe.Pointer(_zExtra), unsafe.Pointer(_pIdx.XaSortOrder), uint32(_pIdx.XnColumn))
+ _pIdx.XaSortOrder = (*uint8)(unsafe.Pointer(_zExtra))
+ _pIdx.XnColumn = uint16(_N)
+ storebits5(&_pIdx.XidxType, int8(1), 16, 4)
+ return int32(0)
}
var _resizeIndexObjectØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_resizeIndexObjectØ00__func__Ø000[0], str(113799), 18)
+ crt.Xstrncpy(nil, &_resizeIndexObjectØ00__func__Ø000[0], str(113827), 18)
}
-// Estimate the total row width for a table.
+// C comment
+// /*
+// ** Estimate the total row width for a table.
+// */
func _estimateTableWidth(tls *crt.TLS, _pTab *XTable) {
var _i int32
var _wTable uint32
var _pTabCol *XColumn
- _wTable = u32(0)
- *func() **XColumn { _i = int32(_pTab.X11); return &_pTabCol }() = (*XColumn)(_pTab.X1)
+ _wTable = uint32(0)
+ *func() **XColumn { _i = int32(_pTab.XnCol); return &_pTabCol }() = (*XColumn)(_pTab.XaCol)
_0:
- if _i <= i32(0) {
+ if _i <= int32(0) {
goto _3
}
- {
- p := &_wTable
- *p = (*p) + uint32(_pTabCol.X5)
- sink5(*p)
- }
+ _wTable += uint32(_pTabCol.XszEst)
*(*uintptr)(unsafe.Pointer(func() **XColumn { _i -= 1; return &_pTabCol }())) += uintptr(16)
goto _0
_3:
- if int32(_pTab.X10) < i32(0) {
+ if int32(_pTab.XiPKey) < int32(0) {
_wTable += 1
}
- *(*int16)(unsafe.Pointer(&(_pTab.X13))) = _sqlite3LogEst(tls, uint64(_wTable*uint32(i32(4))))
-}
-
-// Compute the affinity string for table pTab, if it has not already been
-// computed. As an optimization, omit trailing SQLITE_AFF_BLOB affinities.
-//
-// If the affinity exists (if it is no entirely SQLITE_AFF_BLOB values) and
-// if iReg>0 then code an OP_Affinity opcode that will set the affinities
-// for register iReg and following. Or if affinities exists and iReg==0,
-// then just set the P4 operand of the previous opcode (which should be
-// an OP_MakeRecord) to the affinity string.
-//
-// A column affinity string has one character per column:
-//
-// Character Column affinity
-// ------------------------------
-// 'A' BLOB
-// 'B' TEXT
-// 'C' NUMERIC
-// 'D' INTEGER
-// 'E' REAL
+ _pTab.XszTabRow = _sqlite3LogEst(tls, uint64(_wTable*uint32(4)))
+}
+
+// C comment
+// /*
+// ** Compute the affinity string for table pTab, if it has not already been
+// ** computed. As an optimization, omit trailing SQLITE_AFF_BLOB affinities.
+// **
+// ** If the affinity exists (if it is no entirely SQLITE_AFF_BLOB values) and
+// ** if iReg>0 then code an OP_Affinity opcode that will set the affinities
+// ** for register iReg and following. Or if affinities exists and iReg==0,
+// ** then just set the P4 operand of the previous opcode (which should be
+// ** an OP_MakeRecord) to the affinity string.
+// **
+// ** A column affinity string has one character per column:
+// **
+// ** Character Column affinity
+// ** ------------------------------
+// ** 'A' BLOB
+// ** 'B' TEXT
+// ** 'C' NUMERIC
+// ** 'D' INTEGER
+// ** 'E' REAL
+// */
func _sqlite3TableAffinity(tls *crt.TLS, _v *TVdbe, _pTab *XTable, _iReg int32) {
var _i int32
var _zColAff *int8
var _1_db *Xsqlite3
- _zColAff = _pTab.X5
+ _zColAff = _pTab.XzColAff
if _zColAff != nil {
goto _0
}
_1_db = _sqlite3VdbeDb(tls, _v)
- _zColAff = (*int8)(_sqlite3DbMallocRaw(tls, nil, uint64(int32(_pTab.X11)+i32(1))))
+ _zColAff = (*int8)(_sqlite3DbMallocRaw(tls, nil, uint64(int32(_pTab.XnCol)+int32(1))))
if _zColAff == nil {
_sqlite3OomFault(tls, _1_db)
return
}
- _i = i32(0)
+ _i = int32(0)
_2:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _5
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zColAff)) + 1*uintptr(_i))) = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_i))).X4
+ *elem1(_zColAff, uintptr(_i)) = elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).Xaffinity
_i += 1
goto _2
_5:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zColAff)) + 1*uintptr(postInc1(&_i, int32(-1))))) = int8(i32(0))
- if (_i >= i32(0)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zColAff)) + 1*uintptr(_i)))) == i32(65)) {
+ *elem1(_zColAff, uintptr(postInc2(&_i, -1))) = 0
+ if (_i >= int32(0)) && (int32(*elem1(_zColAff, uintptr(_i))) == int32(65)) {
goto _5
}
- *(**int8)(unsafe.Pointer(&(_pTab.X5))) = _zColAff
+ _pTab.XzColAff = _zColAff
_0:
_i = _sqlite3Strlen30(tls, _zColAff)
if _i == 0 {
goto _8
}
if _iReg != 0 {
- _sqlite3VdbeAddOp4(tls, _v, i32(100), _iReg, _i, i32(0), _zColAff, _i)
+ _sqlite3VdbeAddOp4(tls, _v, int32(100), _iReg, _i, int32(0), _zColAff, _i)
goto _10
}
- _sqlite3VdbeChangeP4(tls, _v, i32(-1), _zColAff, _i)
+ _sqlite3VdbeChangeP4(tls, _v, int32(-1), _zColAff, _i)
_10:
_8:
}
-// Generate a CREATE TABLE statement appropriate for the given
-// table. Memory to hold the text of the statement is obtained
-// from sqliteMalloc() and must be freed by the calling function.
+// C comment
+// /*
+// ** Generate a CREATE TABLE statement appropriate for the given
+// ** table. Memory to hold the text of the statement is obtained
+// ** from sqliteMalloc() and must be freed by the calling function.
+// */
func _createTableStmt(tls *crt.TLS, _db *Xsqlite3, _p *XTable) (r0 *int8) {
var _i, _k, _n, _5_len int32
var _zStmt, _zSep, _zSep2, _zEnd, _5_zType *int8
var _pCol *XColumn
- _n = i32(0)
- *func() *int32 { _pCol = (*XColumn)(_p.X1); return &_i }() = i32(0)
+ _n = int32(0)
+ *func() *int32 { _pCol = (*XColumn)(_p.XaCol); return &_i }() = int32(0)
_0:
- if _i >= int32(_p.X11) {
+ if _i >= int32(_p.XnCol) {
goto _3
}
- {
- p := &_n
- *p = (*p) + (_identLength(tls, _pCol.X0) + i32(5))
- sink1(*p)
- }
+ _n += _identLength(tls, _pCol.XzName) + int32(5)
*(*uintptr)(unsafe.Pointer(func() **XColumn { _i += 1; return &_pCol }())) += uintptr(16)
goto _0
_3:
- {
- p := &_n
- *p = (*p) + _identLength(tls, _p.X0)
- sink1(*p)
- }
- if _n < i32(50) {
- _zSep = str(0)
- _zSep2 = str(107763)
- _zEnd = str(37898)
+ _n += _identLength(tls, _p.XzName)
+ if _n < int32(50) {
+ _zSep = str(284)
+ _zSep2 = str(107791)
+ _zEnd = str(37853)
goto _5
}
- _zSep = str(113817)
- _zSep2 = str(113821)
- _zEnd = str(113826)
+ _zSep = str(113845)
+ _zSep2 = str(113849)
+ _zEnd = str(113854)
_5:
- {
- p := &_n
- *p = (*p) + (i32(35) + (i32(6) * int32(_p.X11)))
- sink1(*p)
- }
+ _n += int32(35) + (int32(6) * int32(_p.XnCol))
_zStmt = (*int8)(_sqlite3DbMallocRaw(tls, nil, uint64(_n)))
if _zStmt == nil {
_sqlite3OomFault(tls, _db)
return nil
}
- Xsqlite3_snprintf(tls, _n, _zStmt, str(113829))
+ Xsqlite3_snprintf(tls, _n, _zStmt, str(113857))
_k = _sqlite3Strlen30(tls, _zStmt)
- _identPut(tls, _zStmt, &_k, _p.X0)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zStmt)) + 1*uintptr(postInc1(&_k, int32(1))))) = int8(i32(40))
- *func() *int32 { _pCol = (*XColumn)(_p.X1); return &_i }() = i32(0)
+ _identPut(tls, _zStmt, &_k, _p.XzName)
+ *elem1(_zStmt, uintptr(postInc2(&_k, 1))) = int8(40)
+ *func() *int32 { _pCol = (*XColumn)(_p.XaCol); return &_i }() = int32(0)
_7:
- if _i >= int32(_p.X11) {
+ if _i >= int32(_p.XnCol) {
goto _10
}
- Xsqlite3_snprintf(tls, _n-_k, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zStmt))+1*uintptr(_k))), _zSep)
- {
- p := &_k
- *p = (*p) + _sqlite3Strlen30(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zStmt))+1*uintptr(_k))))
- sink1(*p)
- }
+ Xsqlite3_snprintf(tls, _n-_k, elem1(_zStmt, uintptr(_k)), _zSep)
+ _k += _sqlite3Strlen30(tls, elem1(_zStmt, uintptr(_k)))
_zSep = _zSep2
- _identPut(tls, _zStmt, &_k, _pCol.X0)
+ _identPut(tls, _zStmt, &_k, _pCol.XzName)
func() {
- if (int32(_pCol.X4) - i32(65)) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101276), unsafe.Pointer((*int8)(unsafe.Pointer(&_createTableStmtØ00__func__Ø000))), unsafe.Pointer(str(113843)))
+ if (int32(_pCol.Xaffinity) - int32(65)) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101276), unsafe.Pointer(&_createTableStmtØ00__func__Ø000), unsafe.Pointer(str(113871)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pCol.X4) - i32(65)) >= i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101277), unsafe.Pointer((*int8)(unsafe.Pointer(&_createTableStmtØ00__func__Ø000))), unsafe.Pointer(str(113879)))
+ if (int32(_pCol.Xaffinity) - int32(65)) >= int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101277), unsafe.Pointer(&_createTableStmtØ00__func__Ø000), unsafe.Pointer(str(113907)))
crt.X__builtin_abort(tls)
}
}()
- _5_zType = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_createTableStmtØ00azTypeØ001)) + 4*uintptr(int32(_pCol.X4)-i32(65))))
+ _5_zType = *elem0((**int8)(unsafe.Pointer(&_createTableStmtØ00azTypeØ001)), uintptr(int32(_pCol.Xaffinity)-int32(65)))
_5_len = _sqlite3Strlen30(tls, _5_zType)
func() {
- if int32(_pCol.X4) != i32(65) && int32(_pCol.X4) != int32(_sqlite3AffinityType(tls, _5_zType, nil)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101286), unsafe.Pointer((*int8)(unsafe.Pointer(&_createTableStmtØ00__func__Ø000))), unsafe.Pointer(str(113930)))
+ if int32(_pCol.Xaffinity) != int32(65) && int32(_pCol.Xaffinity) != int32(_sqlite3AffinityType(tls, _5_zType, nil)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101286), unsafe.Pointer(&_createTableStmtØ00__func__Ø000), unsafe.Pointer(str(113958)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zStmt))+1*uintptr(_k)))), (unsafe.Pointer)(_5_zType), uint32(_5_len))
- {
- p := &_k
- *p = (*p) + _5_len
- sink1(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer(elem1(_zStmt, uintptr(_k))), unsafe.Pointer(_5_zType), uint32(_5_len))
+ _k += _5_len
func() {
if _k > _n {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101290), unsafe.Pointer((*int8)(unsafe.Pointer(&_createTableStmtØ00__func__Ø000))), unsafe.Pointer(str(114011)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101290), unsafe.Pointer(&_createTableStmtØ00__func__Ø000), unsafe.Pointer(str(114039)))
crt.X__builtin_abort(tls)
}
}()
*(*uintptr)(unsafe.Pointer(func() **XColumn { _i += 1; return &_pCol }())) += uintptr(16)
goto _7
_10:
- Xsqlite3_snprintf(tls, _n-_k, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zStmt))+1*uintptr(_k))), str(24576), unsafe.Pointer(_zEnd))
+ Xsqlite3_snprintf(tls, _n-_k, elem1(_zStmt, uintptr(_k)), str(24531), unsafe.Pointer(_zEnd))
return _zStmt
}
-// Measure the number of characters needed to output the given
-// identifier. The number returned includes any quotes used
-// but does not include the null terminator.
-//
-// The estimate is conservative. It might be larger that what is
-// really needed.
+// C comment
+// /*
+// ** Measure the number of characters needed to output the given
+// ** identifier. The number returned includes any quotes used
+// ** but does not include the null terminator.
+// **
+// ** The estimate is conservative. It might be larger that what is
+// ** really needed.
+// */
func _identLength(tls *crt.TLS, _z *int8) (r0 int32) {
var _n int32
- _n = i32(0)
+ _n = int32(0)
_0:
if (*_z) == 0 {
goto _3
}
- if int32(*_z) == i32(34) {
+ if int32(*_z) == int32(34) {
_n += 1
}
*(*uintptr)(unsafe.Pointer(func() **int8 { _n += 1; return &_z }())) += uintptr(1)
goto _0
_3:
- return _n + i32(2)
-}
-
-// The first parameter is a pointer to an output buffer. The second
-// parameter is a pointer to an integer that contains the offset at
-// which to write into the output buffer. This function copies the
-// nul-terminated string pointed to by the third parameter, zSignedIdent,
-// to the specified offset in the buffer and updates *pIdx to refer
-// to the first byte after the last byte written before returning.
-//
-// If the string zSignedIdent consists entirely of alpha-numeric
-// characters, does not begin with a digit and is not an SQL keyword,
-// then it is copied to the output buffer exactly as it is. Otherwise,
-// it is quoted using double-quotes.
+ return _n + int32(2)
+}
+
+// C comment
+// /*
+// ** The first parameter is a pointer to an output buffer. The second
+// ** parameter is a pointer to an integer that contains the offset at
+// ** which to write into the output buffer. This function copies the
+// ** nul-terminated string pointed to by the third parameter, zSignedIdent,
+// ** to the specified offset in the buffer and updates *pIdx to refer
+// ** to the first byte after the last byte written before returning.
+// **
+// ** If the string zSignedIdent consists entirely of alpha-numeric
+// ** characters, does not begin with a digit and is not an SQL keyword,
+// ** then it is copied to the output buffer exactly as it is. Otherwise,
+// ** it is quoted using double-quotes.
+// */
func _identPut(tls *crt.TLS, _z *int8, _pIdx *int32, _zSignedIdent *int8) {
var _i, _j, _needQuote int32
var _zIdent *uint8
_zIdent = (*uint8)(unsafe.Pointer(_zSignedIdent))
_i = *_pIdx
- _j = i32(0)
+ _j = int32(0)
_0:
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIdent)) + 1*uintptr(_j)))) == 0 {
+ if (*elem15(_zIdent, uintptr(_j))) == 0 {
goto _3
}
- if ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIdent)) + 1*uintptr(_j))))))) & i32(6)) == 0) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIdent)) + 1*uintptr(_j)))) != i32(95)) {
+ if ((int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_zIdent, uintptr(_j))))) & int32(6)) == 0) && (int32(*elem15(_zIdent, uintptr(_j))) != int32(95)) {
goto _3
}
_j += 1
goto _0
_3:
- _needQuote = bool2int((((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIdent)) + 1*uintptr(i32(0))))))))&i32(4)) != 0 || (_sqlite3KeywordCode(tls, _zIdent, _j) != i32(27))) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIdent)) + 1*uintptr(_j)))) != i32(0))) || (_j == i32(0)))
+ _needQuote = bool2int((((int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(*elem15(_zIdent, 0))))&int32(4)) != 0 || (_sqlite3KeywordCode(tls, _zIdent, _j) != int32(27))) || (int32(*elem15(_zIdent, uintptr(_j))) != int32(0))) || (_j == int32(0)))
if _needQuote != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc1(&_i, int32(1))))) = int8(i32(34))
+ *elem1(_z, uintptr(postInc2(&_i, 1))) = int8(34)
}
- _j = i32(0)
+ _j = int32(0)
_10:
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIdent)) + 1*uintptr(_j)))) == 0 {
+ if (*elem15(_zIdent, uintptr(_j))) == 0 {
goto _13
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc1(&_i, int32(1))))) = int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIdent)) + 1*uintptr(_j))))
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIdent)) + 1*uintptr(_j)))) == i32(34) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc1(&_i, int32(1))))) = int8(i32(34))
+ *elem1(_z, uintptr(postInc2(&_i, 1))) = int8(*elem15(_zIdent, uintptr(_j)))
+ if int32(*elem15(_zIdent, uintptr(_j))) == int32(34) {
+ *elem1(_z, uintptr(postInc2(&_i, 1))) = int8(34)
}
_j += 1
goto _10
_13:
if _needQuote != 0 {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc1(&_i, int32(1))))) = int8(i32(34))
+ *elem1(_z, uintptr(postInc2(&_i, 1))) = int8(34)
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i))) = int8(i32(0))
+ *elem1(_z, uintptr(_i)) = 0
*_pIdx = _i
}
func _sqlite3KeywordCode(tls *crt.TLS, _z *uint8, _n int32) (r0 int32) {
var _id int32
- _id = i32(27)
+ _id = int32(27)
_keywordCode(tls, (*int8)(unsafe.Pointer(_z)), _n, &_id)
return _id
}
@@ -94960,46 +96094,49 @@ func _sqlite3KeywordCode(tls *crt.TLS, _z *uint8, _n int32) (r0 int32) {
var _createTableStmtØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_createTableStmtØ00__func__Ø000[0], str(114016), 16)
+ crt.Xstrncpy(nil, &_createTableStmtØ00__func__Ø000[0], str(114044), 16)
}
var _createTableStmtØ00azTypeØ001 [5]*int8
func init() {
- _createTableStmtØ00azTypeØ001 = [5]*int8{str(0), str(114032), str(114038), str(114043), str(114048)}
+ _createTableStmtØ00azTypeØ001 = [5]*int8{str(284), str(114060), str(114066), str(114071), str(114076)}
}
-// pZ is a UTF-8 encoded unicode string. If nByte is less than zero,
-// return the number of unicode characters in pZ up to (but not including)
-// the first 0x00 byte. If nByte is not less than zero, return the
-// number of unicode characters in the first nByte of pZ (or up to
-// the first 0x00, whichever comes first).
+// C comment
+// /*
+// ** pZ is a UTF-8 encoded unicode string. If nByte is less than zero,
+// ** return the number of unicode characters in pZ up to (but not including)
+// ** the first 0x00 byte. If nByte is not less than zero, return the
+// ** number of unicode characters in the first nByte of pZ (or up to
+// ** the first 0x00, whichever comes first).
+// */
func _sqlite3Utf8CharLen(tls *crt.TLS, _zIn *int8, _nByte int32) (r0 int32) {
var _r int32
var _z, _zTerm *uint8
- _r = i32(0)
+ _r = int32(0)
_z = (*uint8)(unsafe.Pointer(_zIn))
- if _nByte >= i32(0) {
- _zTerm = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_nByte)))
+ if _nByte >= int32(0) {
+ _zTerm = elem15(_z, uintptr(_nByte))
goto _1
}
- _zTerm = (*uint8)(unsafe.Pointer(uintptr(u32(4294967295))))
+ _zTerm = (*uint8)(crt.U2P(uintptr(uint32(4294967295))))
_1:
func() {
- if uintptr(unsafe.Pointer(_z)) > uintptr(unsafe.Pointer(_zTerm)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(27515), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3Utf8CharLenØ00__func__Ø000))), unsafe.Pointer(str(114054)))
+ if crt.P2U(unsafe.Pointer(_z)) > crt.P2U(unsafe.Pointer(_zTerm)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(27515), unsafe.Pointer(&_sqlite3Utf8CharLenØ00__func__Ø000), unsafe.Pointer(str(114082)))
crt.X__builtin_abort(tls)
}
}()
_4:
- if int32(*_z) == i32(0) || uintptr(unsafe.Pointer(_z)) >= uintptr(unsafe.Pointer(_zTerm)) {
+ if int32(*_z) == int32(0) || crt.P2U(unsafe.Pointer(_z)) >= crt.P2U(unsafe.Pointer(_zTerm)) {
goto _5
}
- if int32(*postInc13(&_z, 1)) < i32(192) {
+ if int32(*postInc15(&_z, 1)) < int32(192) {
goto _7
}
_8:
- if (int32(*_z) & i32(192)) == i32(128) {
+ if (int32(*_z) & int32(192)) == int32(128) {
*(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
goto _8
}
@@ -95013,284 +96150,283 @@ _5:
var _sqlite3Utf8CharLenØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3Utf8CharLenØ00__func__Ø000[0], str(114063), 19)
+ crt.Xstrncpy(nil, &_sqlite3Utf8CharLenØ00__func__Ø000[0], str(114091), 19)
}
-// Add a new column to the table currently being constructed.
-//
-// The parser calls this routine once for each column declaration
-// in a CREATE TABLE statement. sqlite3StartTable() gets called
-// first to get things going. Then this routine is called for each
-// column.
+// C comment
+// /*
+// ** Add a new column to the table currently being constructed.
+// **
+// ** The parser calls this routine once for each column declaration
+// ** in a CREATE TABLE statement. sqlite3StartTable() gets called
+// ** first to get things going. Then this routine is called for each
+// ** column.
+// */
func _sqlite3AddColumn(tls *crt.TLS, _pParse *XParse, _pName *XToken, _pType *XToken) {
var _i int32
var _z, _zType *int8
var _db *Xsqlite3
var _p *XTable
var _pCol, _4_aNew *XColumn
- _db = (*Xsqlite3)(_pParse.X0)
- if store44(&_p, (*XTable)(_pParse.X63)) == nil {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if store72(&_p, (*XTable)(_pParse.XpNewTable)) == nil {
return
}
- if (int32(_p.X11) + i32(1)) > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(2))))) {
- _sqlite3ErrorMsg(tls, _pParse, str(114082), unsafe.Pointer(_p.X0))
+ if (int32(_p.XnCol) + int32(1)) > (*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(2))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(114110), unsafe.Pointer(_p.XzName))
return
}
- _z = (*int8)(_sqlite3DbMallocRaw(tls, _db, uint64(((_pName.X1)+(_pType.X1))+uint32(i32(2)))))
+ _z = (*int8)(_sqlite3DbMallocRaw(tls, _db, uint64((_pName.Xn+_pType.Xn)+uint32(2))))
if _z == nil {
return
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_z), (unsafe.Pointer)(_pName.X0), _pName.X1)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_pName.X1))) = int8(i32(0))
+ crt.Xmemcpy(tls, unsafe.Pointer(_z), unsafe.Pointer(_pName.Xz), _pName.Xn)
+ *elem1(_z, uintptr(_pName.Xn)) = 0
_sqlite3Dequote(tls, _z)
- _i = i32(0)
+ _i = int32(0)
_3:
- if _i >= int32(_p.X11) {
+ if _i >= int32(_p.XnCol) {
goto _6
}
- if Xsqlite3_stricmp(tls, _z, (*XColumn)(unsafe.Pointer(uintptr(_p.X1)+16*uintptr(_i))).X0) == i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(114105), unsafe.Pointer(_z))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_z))
+ if Xsqlite3_stricmp(tls, _z, elem41((*XColumn)(_p.XaCol), uintptr(_i)).XzName) == int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(114133), unsafe.Pointer(_z))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_z))
return
}
_i += 1
goto _3
_6:
- if (int32(_p.X11) & i32(7)) != i32(0) {
+ if (int32(_p.XnCol) & int32(7)) != int32(0) {
goto _8
}
- _4_aNew = (*XColumn)(_sqlite3DbRealloc(tls, _db, _p.X1, uint64(uint32(int32(_p.X11)+i32(8))*u32(16))))
+ _4_aNew = (*XColumn)(_sqlite3DbRealloc(tls, _db, _p.XaCol, uint64(uint32(int32(_p.XnCol)+int32(8))*uint32(16))))
if _4_aNew == nil {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_z))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_z))
return
}
- *(**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = _4_aNew
+ *(**XColumn)(unsafe.Pointer(&_p.XaCol)) = _4_aNew
_8:
- _pCol = (*XColumn)(unsafe.Pointer(uintptr(_p.X1) + 16*uintptr(_p.X11)))
- crt.Xmemset(tls, (unsafe.Pointer)(_pCol), i32(0), u32(16))
- *(**int8)(unsafe.Pointer(&(_pCol.X0))) = _z
- if (_pType.X1) == uint32(i32(0)) {
- *(*int8)(unsafe.Pointer(&(_pCol.X4))) = int8(i32(65))
- *(*uint8)(unsafe.Pointer(&(_pCol.X5))) = uint8(i32(1))
+ _pCol = elem41((*XColumn)(_p.XaCol), uintptr(_p.XnCol))
+ crt.Xmemset(tls, unsafe.Pointer(_pCol), int32(0), uint32(16))
+ _pCol.XzName = _z
+ if _pType.Xn == (0) {
+ _pCol.Xaffinity = int8(65)
+ _pCol.XszEst = uint8(1)
goto _11
}
- _zType = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_sqlite3Strlen30(tls, _z)))))))))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(1))))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zType), (unsafe.Pointer)(_pType.X0), _pType.X1)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zType)) + 1*uintptr(_pType.X1))) = int8(i32(0))
+ _zType = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(_sqlite3Strlen30(tls, _z)))))) + uintptr(int32(1))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_zType), unsafe.Pointer(_pType.Xz), _pType.Xn)
+ *elem1(_zType, uintptr(_pType.Xn)) = 0
_sqlite3Dequote(tls, _zType)
- *(*int8)(unsafe.Pointer(&(_pCol.X4))) = _sqlite3AffinityType(tls, _zType, (*uint8)(unsafe.Pointer(&(_pCol.X5))))
+ _pCol.Xaffinity = _sqlite3AffinityType(tls, _zType, &_pCol.XszEst)
{
- p := (*uint8)(unsafe.Pointer(&(_pCol.X6)))
- *p = uint8(int32(*p) | i32(4))
- sink2(*p)
+ p := &_pCol.XcolFlags
+ *p = uint8(int32(*p) | int32(4))
}
_11:
- *(*int16)(unsafe.Pointer(&(_p.X11))) += 1
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer(&(_pParse.X28))).X1))) = uint32(i32(0))
-}
-
-// The expression is the default value for the most recently added column
-// of the table currently under construction.
-//
-// Default value expressions must be constant. Raise an exception if this
-// is not the case.
-//
-// This routine is called by the parser while in the middle of
-// parsing a CREATE TABLE statement.
+ _p.XnCol += 1
+ _pParse.XconstraintName.Xn = 0
+}
+
+// C comment
+// /*
+// ** The expression is the default value for the most recently added column
+// ** of the table currently under construction.
+// **
+// ** Default value expressions must be constant. Raise an exception if this
+// ** is not the case.
+// **
+// ** This routine is called by the parser while in the middle of
+// ** parsing a CREATE TABLE statement.
+// */
func _sqlite3AddDefaultValue(tls *crt.TLS, _pParse *XParse, _pSpan *XExprSpan) {
var _db *Xsqlite3
var _p *XTable
var _3_x XExpr
var _pCol *XColumn
- _db = (*Xsqlite3)(_pParse.X0)
- _p = (*XTable)(_pParse.X63)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _p = (*XTable)(_pParse.XpNewTable)
if _p == nil {
goto _0
}
- _pCol = (*XColumn)(unsafe.Pointer(uintptr(_p.X1) + 16*uintptr(int32(_p.X11)-i32(1))))
- if _sqlite3ExprIsConstantOrFunction(tls, (*XExpr)(_pSpan.X0), (*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(114131), unsafe.Pointer(_pCol.X0))
+ _pCol = elem41((*XColumn)(_p.XaCol), uintptr(int32(_p.XnCol)-int32(1)))
+ if _sqlite3ExprIsConstantOrFunction(tls, (*XExpr)(_pSpan.XpExpr), _db.Xinit.Xbusy) == 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(114159), unsafe.Pointer(_pCol.XzName))
goto _2
}
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_pCol.X1))
- crt.Xmemset(tls, (unsafe.Pointer)(&_3_x), i32(0), u32(48))
- *(*uint8)(unsafe.Pointer(&(_3_x.X0))) = uint8(i32(162))
- *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_3_x.X3))))) = _sqlite3DbStrNDup(tls, _db, _pSpan.X1, uint64(int32((uintptr(unsafe.Pointer(_pSpan.X2))-uintptr(unsafe.Pointer(_pSpan.X1)))/1)))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_x.X4))))) = (*XExpr)(_pSpan.X0)
- *(*uint32)(unsafe.Pointer(&(_3_x.X2))) = uint32(i32(4096))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pCol.X1))))) = _sqlite3ExprDup(tls, _db, &_3_x, i32(1))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_3_x.X3)))))))
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_pCol.XpDflt))
+ crt.Xmemset(tls, unsafe.Pointer(&_3_x), int32(0), uint32(48))
+ _3_x.Xop = uint8(162)
+ *(**int8)(unsafe.Pointer(&_3_x.Xu)) = _sqlite3DbStrNDup(tls, _db, _pSpan.XzStart, uint64(int32(uintptr(unsafe.Pointer(_pSpan.XzEnd))-uintptr(unsafe.Pointer(_pSpan.XzStart)))))
+ *(**XExpr)(unsafe.Pointer(&_3_x.XpLeft)) = (*XExpr)(_pSpan.XpExpr)
+ _3_x.Xflags = uint32(4096)
+ *(**XExpr)(unsafe.Pointer(&_pCol.XpDflt)) = _sqlite3ExprDup(tls, _db, &_3_x, int32(1))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(*(**int8)(unsafe.Pointer(&_3_x.Xu))))
_2:
_0:
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_pSpan.X0))
- _ = _3_x
-}
-
-// Walk an expression tree. Return non-zero if the expression is constant
-// or a function call with constant arguments. Return and 0 if there
-// are any variables.
-//
-// For the purposes of this function, a double-quoted string (ex: "abc")
-// is considered a variable but a single-quoted string (ex: 'abc') is
-// a constant.
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_pSpan.XpExpr))
+}
+
+// C comment
+// /*
+// ** Walk an expression tree. Return non-zero if the expression is constant
+// ** or a function call with constant arguments. Return and 0 if there
+// ** are any variables.
+// **
+// ** For the purposes of this function, a double-quoted string (ex: "abc")
+// ** is considered a variable but a single-quoted string (ex: 'abc') is
+// ** a constant.
+// */
func _sqlite3ExprIsConstantOrFunction(tls *crt.TLS, _p *XExpr, _isInit uint8) (r0 int32) {
func() {
- if int32(_isInit) != i32(0) && int32(_isInit) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92783), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprIsConstantOrFunctionØ00__func__Ø000))), unsafe.Pointer(str(114176)))
+ if int32(_isInit) != int32(0) && int32(_isInit) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92783), unsafe.Pointer(&_sqlite3ExprIsConstantOrFunctionØ00__func__Ø000), unsafe.Pointer(str(114204)))
crt.X__builtin_abort(tls)
}
}()
- return _exprIsConst(tls, _p, i32(4)+int32(_isInit), i32(0))
+ return _exprIsConst(tls, _p, int32(4)+int32(_isInit), int32(0))
}
var _sqlite3ExprIsConstantOrFunctionØ00__func__Ø000 [32]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprIsConstantOrFunctionØ00__func__Ø000[0], str(114199), 32)
+ crt.Xstrncpy(nil, &_sqlite3ExprIsConstantOrFunctionØ00__func__Ø000[0], str(114227), 32)
}
func _spanExpr(tls *crt.TLS, _pOut *XExprSpan, _pParse *XParse, _op int32, _t XToken) {
var _p *XExpr
- _p = (*XExpr)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.X0), uint64((u32(48)+(_t.X1))+uint32(i32(1)))))
+ _p = (*XExpr)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.Xdb), uint64((uint32(48)+_t.Xn)+uint32(1))))
if _p == nil {
goto _0
}
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(48))
- *(*uint8)(unsafe.Pointer(&(_p.X0))) = uint8(_op)
- *(*uint32)(unsafe.Pointer(&(_p.X2))) = uint32(i32(8388608))
- *(*int16)(unsafe.Pointer(&(_p.X10))) = int16(i32(-1))
- *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3))))) = (*int8)(unsafe.Pointer((*XExpr)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 48*uintptr(i32(1))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3)))))), (unsafe.Pointer)(_t.X0), _t.X1)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3))))))) + 1*uintptr(_t.X1))) = int8(i32(0))
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3))))))) + 1*uintptr(i32(0))))))))) & i32(128)) == 0 {
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(48))
+ _p.Xop = uint8(_op)
+ _p.Xflags = uint32(8388608)
+ _p.XiAgg = int16(-1)
+ *(**int8)(unsafe.Pointer(&_p.Xu)) = (*int8)(unsafe.Pointer(elem58(_p, uintptr(1))))
+ crt.Xmemcpy(tls, unsafe.Pointer(*(**int8)(unsafe.Pointer(&_p.Xu))), unsafe.Pointer(_t.Xz), _t.Xn)
+ *elem1(*(**int8)(unsafe.Pointer(&_p.Xu)), uintptr(_t.Xn)) = 0
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(*(**int8)(unsafe.Pointer(&_p.Xu)), 0))))) & int32(128)) == 0 {
goto _1
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3))))))) + 1*uintptr(i32(0))))) == i32(34) {
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X2)))
- *p = (*p) | uint32(i32(64))
- sink5(*p)
- }
+ if int32(*elem1(*(**int8)(unsafe.Pointer(&_p.Xu)), 0)) == int32(34) {
+ _p.Xflags |= uint32(64)
}
- _sqlite3Dequote(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_p.X3))))))
+ _sqlite3Dequote(tls, *(**int8)(unsafe.Pointer(&_p.Xu)))
_1:
- *(*int32)(unsafe.Pointer(&(_p.X7))) = i32(1)
+ _p.XnHeight = int32(1)
_0:
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pOut.X0))))) = _p
- *(**int8)(unsafe.Pointer(&(_pOut.X1))) = _t.X0
- *(**int8)(unsafe.Pointer(&(_pOut.X2))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_t.X0)) + 1*uintptr(_t.X1)))
-}
-
-// This routine is called by the parser while in the middle of
-// parsing a CREATE TABLE statement. A "NOT NULL" constraint has
-// been seen on a column. This routine sets the notNull flag on
-// the column currently under construction.
+ *(**XExpr)(unsafe.Pointer(&_pOut.XpExpr)) = _p
+ _pOut.XzStart = _t.Xz
+ _pOut.XzEnd = elem1(_t.Xz, uintptr(_t.Xn))
+}
+
+// C comment
+// /*
+// ** This routine is called by the parser while in the middle of
+// ** parsing a CREATE TABLE statement. A "NOT NULL" constraint has
+// ** been seen on a column. This routine sets the notNull flag on
+// ** the column currently under construction.
+// */
func _sqlite3AddNotNull(tls *crt.TLS, _pParse *XParse, _onError int32) {
var _p *XTable
- _p = (*XTable)(_pParse.X63)
+ _p = (*XTable)(_pParse.XpNewTable)
if (_p == nil) || func() int32 {
- if int32(_p.X11) < i32(1) {
+ if int32(_p.XnCol) < int32(1) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(100812), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AddNotNullØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(100812), unsafe.Pointer(&_sqlite3AddNotNullØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
- *(*uint8)(unsafe.Pointer(&((*XColumn)(unsafe.Pointer(uintptr(_p.X1) + 16*uintptr(int32(_p.X11)-i32(1)))).X3))) = uint8(_onError)
- {
- p := (*uint32)(unsafe.Pointer(&(_p.X9)))
- *p = (*p) | uint32(i32(512))
- sink5(*p)
- }
+ elem41((*XColumn)(_p.XaCol), uintptr(int32(_p.XnCol)-int32(1))).XnotNull = uint8(_onError)
+ _p.XtabFlags |= uint32(512)
}
var _sqlite3AddNotNullØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AddNotNullØ00__func__Ø000[0], str(114231), 18)
-}
-
-// Designate the PRIMARY KEY for the table. pList is a list of names
-// of columns that form the primary key. If pList is NULL, then the
-// most recently added column of the table is the primary key.
-//
-// A table can have at most one primary key. If the table already has
-// a primary key (and this is the second primary key) then create an
-// error.
-//
-// If the PRIMARY KEY is on a single column whose datatype is INTEGER,
-// then we will try to use that column as the rowid. Set the Table.iPKey
-// field of the table under construction to be the index of the
-// INTEGER PRIMARY KEY column. Table.iPKey is set to -1 if there is
-// no INTEGER PRIMARY KEY.
-//
-// If the key is not an INTEGER PRIMARY KEY, then create a unique
-// index for the key. No index is created for INTEGER PRIMARY KEYs.
+ crt.Xstrncpy(nil, &_sqlite3AddNotNullØ00__func__Ø000[0], str(114259), 18)
+}
+
+// C comment
+// /*
+// ** Designate the PRIMARY KEY for the table. pList is a list of names
+// ** of columns that form the primary key. If pList is NULL, then the
+// ** most recently added column of the table is the primary key.
+// **
+// ** A table can have at most one primary key. If the table already has
+// ** a primary key (and this is the second primary key) then create an
+// ** error.
+// **
+// ** If the PRIMARY KEY is on a single column whose datatype is INTEGER,
+// ** then we will try to use that column as the rowid. Set the Table.iPKey
+// ** field of the table under construction to be the index of the
+// ** INTEGER PRIMARY KEY column. Table.iPKey is set to -1 if there is
+// ** no INTEGER PRIMARY KEY.
+// **
+// ** If the key is not an INTEGER PRIMARY KEY, then create a unique
+// ** index for the key. No index is created for INTEGER PRIMARY KEYs.
+// */
func _sqlite3AddPrimaryKey(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _onError int32, _autoInc int32, _sortOrder int32) {
var _iCol, _i, _nTerm int32
var _5_zCName *int8
var _pTab *XTable
var _4_pCExpr *XExpr
var _pCol *XColumn
- _pTab = (*XTable)(_pParse.X63)
+ _pTab = (*XTable)(_pParse.XpNewTable)
_pCol = nil
- _iCol = i32(-1)
+ _iCol = int32(-1)
if _pTab == nil {
goto _primary_key_exit
}
- if ((_pTab.X9) & uint32(i32(4))) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(114249), unsafe.Pointer(_pTab.X0))
+ if (_pTab.XtabFlags & uint32(4)) != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(114277), unsafe.Pointer(_pTab.XzName))
goto _primary_key_exit
}
- {
- p := (*uint32)(unsafe.Pointer(&(_pTab.X9)))
- *p = (*p) | uint32(i32(4))
- sink5(*p)
- }
+ _pTab.XtabFlags |= uint32(4)
if _pList == nil {
- _iCol = int32(_pTab.X11) - i32(1)
- _pCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_iCol)))
+ _iCol = int32(_pTab.XnCol) - int32(1)
+ _pCol = elem41((*XColumn)(_pTab.XaCol), uintptr(_iCol))
{
- p := (*uint8)(unsafe.Pointer(&(_pCol.X6)))
- *p = uint8(int32(*p) | i32(1))
- sink2(*p)
+ p := &_pCol.XcolFlags
+ *p = uint8(int32(*p) | int32(1))
}
- _nTerm = i32(1)
+ _nTerm = int32(1)
goto _3
}
- _nTerm = _pList.X0
- _i = i32(0)
+ _nTerm = _pList.XnExpr
+ _i = int32(0)
_4:
if _i >= _nTerm {
goto _7
}
- _4_pCExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_i))).X0))
+ _4_pCExpr = _sqlite3ExprSkipCollate(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_i)).XpExpr))
func() {
if _4_pCExpr == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101013), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AddPrimaryKeyØ00__func__Ø000))), unsafe.Pointer(str(114290)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101013), unsafe.Pointer(&_sqlite3AddPrimaryKeyØ00__func__Ø000), unsafe.Pointer(str(114318)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3StringToId(tls, _4_pCExpr)
- if int32(_4_pCExpr.X0) != i32(27) {
+ if int32(_4_pCExpr.Xop) != int32(27) {
goto _10
}
- _5_zCName = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_4_pCExpr.X3)))))
- _iCol = i32(0)
+ _5_zCName = *(**int8)(unsafe.Pointer(&_4_pCExpr.Xu))
+ _iCol = int32(0)
_11:
- if _iCol >= int32(_pTab.X11) {
+ if _iCol >= int32(_pTab.XnCol) {
goto _14
}
- if _sqlite3StrICmp(tls, _5_zCName, (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_iCol))).X0) == i32(0) {
- _pCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_iCol)))
+ if _sqlite3StrICmp(tls, _5_zCName, elem41((*XColumn)(_pTab.XaCol), uintptr(_iCol)).XzName) == int32(0) {
+ _pCol = elem41((*XColumn)(_pTab.XaCol), uintptr(_iCol))
{
- p := (*uint8)(unsafe.Pointer(&(_pCol.X6)))
- *p = uint8(int32(*p) | i32(1))
- sink2(*p)
+ p := &_pCol.XcolFlags
+ *p = uint8(int32(*p) | int32(1))
}
goto _14
}
@@ -95302,142 +96438,143 @@ _10:
goto _4
_7:
_3:
- if _nTerm != i32(1) || _pCol == nil || _sqlite3StrICmp(tls, _sqlite3ColumnType(tls, _pCol, str(0)), str(25792)) != i32(0) || _sortOrder == i32(1) {
+ if _nTerm != int32(1) || _pCol == nil || _sqlite3StrICmp(tls, _sqlite3ColumnType(tls, _pCol, str(284)), str(25747)) != int32(0) || _sortOrder == int32(1) {
goto _19
}
- *(*int16)(unsafe.Pointer(&(_pTab.X10))) = int16(_iCol)
- *(*uint8)(unsafe.Pointer(&(_pTab.X14))) = uint8(_onError)
+ _pTab.XiPKey = int16(_iCol)
+ _pTab.XkeyConf = uint8(_onError)
func() {
- if _autoInc != i32(0) && _autoInc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101034), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AddPrimaryKeyØ00__func__Ø000))), unsafe.Pointer(str(114300)))
+ if _autoInc != int32(0) && _autoInc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101034), unsafe.Pointer(&_sqlite3AddPrimaryKeyØ00__func__Ø000), unsafe.Pointer(str(114328)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := (*uint32)(unsafe.Pointer(&(_pTab.X9)))
- *p = (*p) | uint32(_autoInc*i32(8))
- sink5(*p)
- }
+ _pTab.XtabFlags |= uint32(_autoInc * int32(8))
if _pList != nil {
- *(*uint8)(unsafe.Pointer(&(_pParse.X53))) = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(i32(0)))).X3
+ _pParse.XiPkSortOrder = elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), 0).XsortOrder
}
goto _primary_key_exit
_19:
if _autoInc != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(114325))
+ _sqlite3ErrorMsg(tls, _pParse, str(114353))
goto _primary_key_exit
}
- _sqlite3CreateIndex(tls, _pParse, nil, nil, nil, _pList, _onError, nil, nil, _sortOrder, i32(0), uint8(i32(2)))
+ _sqlite3CreateIndex(tls, _pParse, nil, nil, nil, _pList, _onError, nil, nil, _sortOrder, int32(0), uint8(2))
_pList = nil
_primary_key_exit:
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), _pList)
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), _pList)
}
var _sqlite3AddPrimaryKeyØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AddPrimaryKeyØ00__func__Ø000[0], str(114381), 21)
+ crt.Xstrncpy(nil, &_sqlite3AddPrimaryKeyØ00__func__Ø000[0], str(114409), 21)
}
-// Add a new CHECK constraint to the table currently under construction.
+// C comment
+// /*
+// ** Add a new CHECK constraint to the table currently under construction.
+// */
func _sqlite3AddCheckConstraint(tls *crt.TLS, _pParse *XParse, _pCheckExpr *XExpr) {
var _db *Xsqlite3
var _pTab *XTable
- _pTab = (*XTable)(_pParse.X63)
- _db = (*Xsqlite3)(_pParse.X0)
- if _pTab == nil || (_pParse.X55) != 0 || _sqlite3BtreeIsReadonly(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr((*t21)(unsafe.Pointer(&(_db.X33))).X1))).X1)) != 0 {
+ _pTab = (*XTable)(_pParse.XpNewTable)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pTab == nil || _pParse.XdeclareVtab != 0 || _sqlite3BtreeIsReadonly(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_db.Xinit.XiDb)).XpBt)) != 0 {
goto _2
}
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTab.X6))))) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(_pTab.X6), _pCheckExpr)
- if ((*XToken)(unsafe.Pointer(&(_pParse.X28))).X1) != 0 {
- _sqlite3ExprListSetName(tls, _pParse, (*XExprList)(_pTab.X6), (*XToken)(unsafe.Pointer(&(_pParse.X28))), i32(1))
+ *(**XExprList)(unsafe.Pointer(&_pTab.XpCheck)) = _sqlite3ExprListAppend(tls, _pParse, (*XExprList)(_pTab.XpCheck), _pCheckExpr)
+ if (_pParse.XconstraintName.Xn) != 0 {
+ _sqlite3ExprListSetName(tls, _pParse, (*XExprList)(_pTab.XpCheck), &_pParse.XconstraintName, int32(1))
}
goto _4
_2:
- _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.X0), _pCheckExpr)
+ _sqlite3ExprDelete(tls, (*Xsqlite3)(_pParse.Xdb), _pCheckExpr)
_4:
}
-// Return true if the given Btree is read-only.
+// C comment
+// /*
+// ** Return true if the given Btree is read-only.
+// */
func _sqlite3BtreeIsReadonly(tls *crt.TLS, _p *XBtree) (r0 int32) {
- return bool2int((int32((*XBtShared)(_p.X1).X10) & i32(1)) != i32(0))
-}
-
-// This routine is called to create a new foreign key on the table
-// currently under construction. pFromCol determines which columns
-// in the current table point to the foreign key. If pFromCol==0 then
-// connect the key to the last column inserted. pTo is the name of
-// the table referred to (a.k.a the "parent" table). pToCol is a list
-// of tables in the parent pTo table. flags contains all
-// information about the conflict resolution algorithms specified
-// in the ON DELETE, ON UPDATE and ON INSERT clauses.
-//
-// An FKey structure is created and added to the table currently
-// under construction in the pParse->pNewTable field.
-//
-// The foreign key is set for IMMEDIATE processing. A subsequent call
-// to sqlite3DeferForeignKey() might change this to DEFERRED.
+ return bool2int((int32((*XBtShared)(_p.XpBt).XbtsFlags) & int32(1)) != int32(0))
+}
+
+// C comment
+// /*
+// ** This routine is called to create a new foreign key on the table
+// ** currently under construction. pFromCol determines which columns
+// ** in the current table point to the foreign key. If pFromCol==0 then
+// ** connect the key to the last column inserted. pTo is the name of
+// ** the table referred to (a.k.a the "parent" table). pToCol is a list
+// ** of tables in the parent pTo table. flags contains all
+// ** information about the conflict resolution algorithms specified
+// ** in the ON DELETE, ON UPDATE and ON INSERT clauses.
+// **
+// ** An FKey structure is created and added to the table currently
+// ** under construction in the pParse->pNewTable field.
+// **
+// ** The foreign key is set for IMMEDIATE processing. A subsequent call
+// ** to sqlite3DeferForeignKey() might change this to DEFERRED.
+// */
func _sqlite3CreateForeignKey(tls *crt.TLS, _pParse *XParse, _pFromCol *XExprList, _pTo *XToken, _pToCol *XExprList, _flags int32) {
var _nByte, _i, _nCol, _1_iCol, _10_j, _15_n int32
var _z *int8
var _db *Xsqlite3
var _p *XTable
var _pFKey, _pNextTo *XFKey
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pFKey = nil
- _p = (*XTable)(_pParse.X63)
+ _p = (*XTable)(_pParse.XpNewTable)
func() {
if _pTo == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102337), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateForeignKeyØ00__func__Ø000))), unsafe.Pointer(str(114402)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102337), unsafe.Pointer(&_sqlite3CreateForeignKeyØ00__func__Ø000), unsafe.Pointer(str(114430)))
crt.X__builtin_abort(tls)
}
}()
- if (_p == nil) || ((_pParse.X55) != 0) {
+ if (_p == nil) || (_pParse.XdeclareVtab != 0) {
goto _fk_end
}
if _pFromCol != nil {
goto _4
}
- _1_iCol = int32(_p.X11) - i32(1)
+ _1_iCol = int32(_p.XnCol) - int32(1)
if func() int32 {
- if _1_iCol < i32(0) {
+ if _1_iCol < int32(0) {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102341), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateForeignKeyØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102341), unsafe.Pointer(&_sqlite3CreateForeignKeyØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _fk_end
}
- if (_pToCol != nil) && ((_pToCol.X0) != i32(1)) {
- _sqlite3ErrorMsg(tls, _pParse, str(114409), unsafe.Pointer((*XColumn)(unsafe.Pointer(uintptr(_p.X1)+16*uintptr(_1_iCol))).X0), unsafe.Pointer(_pTo))
+ if (_pToCol != nil) && (_pToCol.XnExpr != int32(1)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(114437), unsafe.Pointer(elem41((*XColumn)(_p.XaCol), uintptr(_1_iCol)).XzName), unsafe.Pointer(_pTo))
goto _fk_end
}
- _nCol = i32(1)
+ _nCol = int32(1)
goto _13
_4:
- if (_pToCol != nil) && ((_pToCol.X0) != (_pFromCol.X0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(114472))
+ if (_pToCol != nil) && (_pToCol.XnExpr != _pFromCol.XnExpr) {
+ _sqlite3ErrorMsg(tls, _pParse, str(114500))
goto _fk_end
}
- _nCol = _pFromCol.X0
+ _nCol = _pFromCol.XnExpr
_13:
- _nByte = int32(((u32(44) + (uint32(_nCol-i32(1)) * u32(8))) + (_pTo.X1)) + uint32(i32(1)))
+ _nByte = int32(((uint32(44) + (uint32(_nCol-int32(1)) * uint32(8))) + _pTo.Xn) + uint32(1))
if _pToCol == nil {
goto _14
}
- _i = i32(0)
+ _i = int32(0)
_15:
- if _i >= (_pToCol.X0) {
+ if _i >= _pToCol.XnExpr {
goto _18
}
- {
- p := &_nByte
- *p = (*p) + (_sqlite3Strlen30(tls, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pToCol.X2)))))+20*uintptr(_i))).X1) + i32(1))
- sink1(*p)
- }
+ _nByte += _sqlite3Strlen30(tls, elem57((*TExprList_item)(unsafe.Pointer(&_pToCol.Xa)), uintptr(_i)).XzName) + int32(1)
_i += 1
goto _15
_18:
@@ -95446,51 +96583,38 @@ _14:
if _pFKey == nil {
goto _fk_end
}
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFKey.X0))))) = _p
- *(**XFKey)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFKey.X1))))) = (*XFKey)(_p.X4)
- _z = (*int8)(unsafe.Pointer((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(_nCol)))))
- *(**int8)(unsafe.Pointer(&(_pFKey.X2))) = _z
- crt.Xmemcpy(tls, (unsafe.Pointer)(_z), (unsafe.Pointer)(_pTo.X0), _pTo.X1)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_pTo.X1))) = int8(i32(0))
+ *(**XTable)(unsafe.Pointer(&_pFKey.XpFrom)) = _p
+ *(**XFKey)(unsafe.Pointer(&_pFKey.XpNextFrom)) = (*XFKey)(_p.XpFKey)
+ _z = (*int8)(unsafe.Pointer(elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), uintptr(_nCol))))
+ _pFKey.XzTo = _z
+ crt.Xmemcpy(tls, unsafe.Pointer(_z), unsafe.Pointer(_pTo.Xz), _pTo.Xn)
+ *elem1(_z, uintptr(_pTo.Xn)) = 0
_sqlite3Dequote(tls, _z)
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr((_pTo.X1)+uint32(i32(1)))))
- sink0(*p)
- }
- *(*int32)(unsafe.Pointer(&(_pFKey.X5))) = _nCol
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_pTo.Xn + uint32(1))
+ _pFKey.XnCol = _nCol
if _pFromCol == nil {
- *(*int32)(unsafe.Pointer(&((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(i32(0)))).X0))) = int32(_p.X11) - i32(1)
+ elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), 0).XiFrom = int32(_p.XnCol) - int32(1)
goto _21
}
- _i = i32(0)
+ _i = int32(0)
_22:
if _i >= _nCol {
goto _25
}
- _10_j = i32(0)
+ _10_j = int32(0)
_26:
- if _10_j >= int32(_p.X11) {
+ if _10_j >= int32(_p.XnCol) {
goto _29
}
- if _sqlite3StrICmp(tls, (*XColumn)(unsafe.Pointer(uintptr(_p.X1)+16*uintptr(_10_j))).X0, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pFromCol.X2)))))+20*uintptr(_i))).X1) == i32(0) {
- *(*int32)(unsafe.Pointer(&((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(_i))).X0))) = _10_j
+ if _sqlite3StrICmp(tls, elem41((*XColumn)(_p.XaCol), uintptr(_10_j)).XzName, elem57((*TExprList_item)(unsafe.Pointer(&_pFromCol.Xa)), uintptr(_i)).XzName) == int32(0) {
+ elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), uintptr(_i)).XiFrom = _10_j
goto _29
}
_10_j += 1
goto _26
_29:
- if _10_j >= int32(_p.X11) {
- _sqlite3ErrorMsg(tls, _pParse, str(114566), unsafe.Pointer((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pFromCol.X2)))))+20*uintptr(_i))).X1))
+ if _10_j >= int32(_p.XnCol) {
+ _sqlite3ErrorMsg(tls, _pParse, str(114594), unsafe.Pointer(elem57((*TExprList_item)(unsafe.Pointer(&_pFromCol.Xa)), uintptr(_i)).XzName))
goto _fk_end
}
_i += 1
@@ -95500,55 +96624,48 @@ _21:
if _pToCol == nil {
goto _32
}
- _i = i32(0)
+ _i = int32(0)
_33:
if _i >= _nCol {
goto _36
}
- _15_n = _sqlite3Strlen30(tls, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pToCol.X2)))))+20*uintptr(_i))).X1)
- *(**int8)(unsafe.Pointer(&((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(_i))).X1))) = _z
- crt.Xmemcpy(tls, (unsafe.Pointer)(_z), (unsafe.Pointer)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pToCol.X2)))))+20*uintptr(_i))).X1), uint32(_15_n))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_15_n))) = int8(i32(0))
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_15_n+i32(1))))
- sink0(*p)
- }
+ _15_n = _sqlite3Strlen30(tls, elem57((*TExprList_item)(unsafe.Pointer(&_pToCol.Xa)), uintptr(_i)).XzName)
+ elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), uintptr(_i)).XzCol = _z
+ crt.Xmemcpy(tls, unsafe.Pointer(_z), unsafe.Pointer(elem57((*TExprList_item)(unsafe.Pointer(&_pToCol.Xa)), uintptr(_i)).XzName), uint32(_15_n))
+ *elem1(_z, uintptr(_15_n)) = 0
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_15_n + int32(1))
_i += 1
goto _33
_36:
_32:
- *(*uint8)(unsafe.Pointer(&(_pFKey.X6))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint8)(unsafe.Pointer(&(_pFKey.X7))))) + 1*uintptr(i32(0)))) = uint8(_flags & i32(255))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint8)(unsafe.Pointer(&(_pFKey.X7))))) + 1*uintptr(i32(1)))) = uint8((_flags >> uint(i32(8))) & i32(255))
+ _pFKey.XisDeferred = 0
+ *elem15((*uint8)(unsafe.Pointer(&_pFKey.XaAction)), 0) = uint8(_flags & int32(255))
+ *elem15((*uint8)(unsafe.Pointer(&_pFKey.XaAction)), uintptr(1)) = uint8((_flags >> 8) & int32(255))
func() {
- if _sqlite3SchemaMutexHeld(tls, _db, i32(0), (*XSchema)(_p.X20)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102408), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateForeignKeyØ00__func__Ø000))), unsafe.Pointer(str(114612)))
+ if _sqlite3SchemaMutexHeld(tls, _db, int32(0), (*XSchema)(_p.XpSchema)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102408), unsafe.Pointer(&_sqlite3CreateForeignKeyØ00__func__Ø000), unsafe.Pointer(str(114640)))
crt.X__builtin_abort(tls)
}
}()
- _pNextTo = (*XFKey)(_sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&((*XSchema)(_p.X20).X5))), _pFKey.X2, (unsafe.Pointer)(_pFKey)))
+ _pNextTo = (*XFKey)(_sqlite3HashInsert(tls, &((*XSchema)(_p.XpSchema).XfkeyHash), _pFKey.XzTo, unsafe.Pointer(_pFKey)))
if _pNextTo == _pFKey {
_sqlite3OomFault(tls, _db)
goto _fk_end
}
if _pNextTo != nil {
func() {
- if (*XFKey)(_pNextTo.X4) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102417), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateForeignKeyØ00__func__Ø000))), unsafe.Pointer(str(114654)))
+ if (*XFKey)(_pNextTo.XpPrevTo) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102417), unsafe.Pointer(&_sqlite3CreateForeignKeyØ00__func__Ø000), unsafe.Pointer(str(114682)))
crt.X__builtin_abort(tls)
}
}()
- *(**XFKey)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFKey.X3))))) = _pNextTo
- *(**XFKey)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNextTo.X4))))) = _pFKey
+ *(**XFKey)(unsafe.Pointer(&_pFKey.XpNextTo)) = _pNextTo
+ *(**XFKey)(unsafe.Pointer(&_pNextTo.XpPrevTo)) = _pFKey
}
- *(**XFKey)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))))) = _pFKey
+ *(**XFKey)(unsafe.Pointer(&_p.XpFKey)) = _pFKey
_pFKey = nil
_fk_end:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pFKey))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pFKey))
_sqlite3ExprListDelete(tls, _db, _pFromCol)
_sqlite3ExprListDelete(tls, _db, _pToCol)
}
@@ -95556,48 +96673,54 @@ _fk_end:
var _sqlite3CreateForeignKeyØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CreateForeignKeyØ00__func__Ø000[0], str(114674), 24)
+ crt.Xstrncpy(nil, &_sqlite3CreateForeignKeyØ00__func__Ø000[0], str(114702), 24)
}
-// This routine is called when an INITIALLY IMMEDIATE or INITIALLY DEFERRED
-// clause is seen as part of a foreign key definition. The isDeferred
-// parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE.
-// The behavior of the most recently created foreign key is adjusted
-// accordingly.
+// C comment
+// /*
+// ** This routine is called when an INITIALLY IMMEDIATE or INITIALLY DEFERRED
+// ** clause is seen as part of a foreign key definition. The isDeferred
+// ** parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE.
+// ** The behavior of the most recently created foreign key is adjusted
+// ** accordingly.
+// */
func _sqlite3DeferForeignKey(tls *crt.TLS, _pParse *XParse, _isDeferred int32) {
var _pTab *XTable
var _pFKey *XFKey
- if (store44(&_pTab, (*XTable)(_pParse.X63)) == nil) || (store74(&_pFKey, (*XFKey)(_pTab.X4)) == nil) {
+ if (store72(&_pTab, (*XTable)(_pParse.XpNewTable)) == nil) || (store118(&_pFKey, (*XFKey)(_pTab.XpFKey)) == nil) {
return
}
func() {
- if _isDeferred != i32(0) && _isDeferred != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102446), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeferForeignKeyØ00__func__Ø000))), unsafe.Pointer(str(114698)))
+ if _isDeferred != int32(0) && _isDeferred != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102446), unsafe.Pointer(&_sqlite3DeferForeignKeyØ00__func__Ø000), unsafe.Pointer(str(114726)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pFKey.X6))) = uint8(_isDeferred)
+ _pFKey.XisDeferred = uint8(_isDeferred)
}
var _sqlite3DeferForeignKeyØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DeferForeignKeyØ00__func__Ø000[0], str(114729), 23)
+ crt.Xstrncpy(nil, &_sqlite3DeferForeignKeyØ00__func__Ø000[0], str(114757), 23)
}
-// Set the collation function of the most recently parsed table column
-// to the CollSeq given.
+// C comment
+// /*
+// ** Set the collation function of the most recently parsed table column
+// ** to the CollSeq given.
+// */
func _sqlite3AddCollateType(tls *crt.TLS, _pParse *XParse, _pToken *XToken) {
var _i int32
var _zColl *int8
var _db *Xsqlite3
var _p *XTable
var _1_pIdx *XIndex
- if store44(&_p, (*XTable)(_pParse.X63)) == nil {
+ if store72(&_p, (*XTable)(_pParse.XpNewTable)) == nil {
return
}
- _i = int32(_p.X11) - i32(1)
- _db = (*Xsqlite3)(_pParse.X0)
+ _i = int32(_p.XnCol) - int32(1)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_zColl = _sqlite3NameFromToken(tls, _db, _pToken)
if _zColl == nil {
return
@@ -95605,58 +96728,61 @@ func _sqlite3AddCollateType(tls *crt.TLS, _pParse *XParse, _pToken *XToken) {
if _sqlite3LocateCollSeq(tls, _pParse, _zColl) == nil {
goto _2
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)((*XColumn)(unsafe.Pointer(uintptr(_p.X1)+16*uintptr(_i))).X2))
- *(**int8)(unsafe.Pointer(&((*XColumn)(unsafe.Pointer(uintptr(_p.X1) + 16*uintptr(_i))).X2))) = _zColl
- _1_pIdx = (*XIndex)(_p.X2)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(elem41((*XColumn)(_p.XaCol), uintptr(_i)).XzColl))
+ elem41((*XColumn)(_p.XaCol), uintptr(_i)).XzColl = _zColl
+ _1_pIdx = (*XIndex)(_p.XpIndex)
_3:
if _1_pIdx == nil {
goto _6
}
func() {
- if int32(_1_pIdx.X13) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101103), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AddCollateTypeØ00__func__Ø000))), unsafe.Pointer(str(114752)))
+ if int32(_1_pIdx.XnKeyCol) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101103), unsafe.Pointer(&_sqlite3AddCollateTypeØ00__func__Ø000), unsafe.Pointer(str(114780)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pIdx.X1)) + 2*uintptr(i32(0))))) == _i {
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pIdx.X8)) + 4*uintptr(i32(0)))) = (*XColumn)(unsafe.Pointer(uintptr(_p.X1) + 16*uintptr(_i))).X2
+ if int32(*elem50(_1_pIdx.XaiColumn, 0)) == _i {
+ *elem0(_1_pIdx.XazColl, 0) = elem41((*XColumn)(_p.XaCol), uintptr(_i)).XzColl
}
- _1_pIdx = (*XIndex)(_1_pIdx.X5)
+ _1_pIdx = (*XIndex)(_1_pIdx.XpNext)
goto _3
_6:
goto _10
_2:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zColl))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zColl))
_10:
}
var _sqlite3AddCollateTypeØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AddCollateTypeØ00__func__Ø000[0], str(114769), 22)
+ crt.Xstrncpy(nil, &_sqlite3AddCollateTypeØ00__func__Ø000[0], str(114797), 22)
}
-// This routine is called to do the work of a DROP TABLE statement.
-// pName is the name of the table to be dropped.
+// C comment
+// /*
+// ** This routine is called to do the work of a DROP TABLE statement.
+// ** pName is the name of the table to be dropped.
+// */
func _sqlite3DropTable(tls *crt.TLS, _pParse *XParse, _pName *XSrcList, _isView int32, _noErr int32) {
var _iDb, _4_code int32
var _4_zTab, _4_zDb, _4_zArg2 *int8
var _db *Xsqlite3
var _pTab *XTable
var _v *TVdbe
- _db = (*Xsqlite3)(_pParse.X0)
- if (_db.X17) != 0 {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _db.XmallocFailed != 0 {
goto _exit_drop_table
}
func() {
- if (_pParse.X16) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102213), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTableØ00__func__Ø000))), unsafe.Pointer(str(112366)))
+ if _pParse.XnErr != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102213), unsafe.Pointer(&_sqlite3DropTableØ00__func__Ø000), unsafe.Pointer(str(112394)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pName.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102214), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTableØ00__func__Ø000))), unsafe.Pointer(str(114791)))
+ if _pName.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102214), unsafe.Pointer(&_sqlite3DropTableØ00__func__Ø000), unsafe.Pointer(str(114819)))
crt.X__builtin_abort(tls)
}
}()
@@ -95664,92 +96790,92 @@ func _sqlite3DropTable(tls *crt.TLS, _pParse *XParse, _pName *XSrcList, _isView
goto _exit_drop_table
}
if _noErr != 0 {
- *(*uint8)(unsafe.Pointer(&(_db.X21))) += 1
+ _db.XsuppressErr += 1
}
func() {
- if _isView != i32(0) && _isView != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102217), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTableØ00__func__Ø000))), unsafe.Pointer(str(114806)))
+ if _isView != int32(0) && _isView != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102217), unsafe.Pointer(&_sqlite3DropTableØ00__func__Ø000), unsafe.Pointer(str(114834)))
crt.X__builtin_abort(tls)
}
}()
- _pTab = _sqlite3LocateTableItem(tls, _pParse, uint32(_isView), (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pName.X2)))))+68*uintptr(i32(0)))))
+ _pTab = _sqlite3LocateTableItem(tls, _pParse, uint32(_isView), elem6((*TSrcList_item)(unsafe.Pointer(&_pName.Xa)), 0))
if _noErr != 0 {
- *(*uint8)(unsafe.Pointer(&(_db.X21))) -= 1
+ _db.XsuppressErr -= 1
}
if _pTab != nil {
goto _11
}
if _noErr != 0 {
- _sqlite3CodeVerifyNamedSchema(tls, _pParse, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pName.X2)))))+68*uintptr(i32(0)))).X1)
+ _sqlite3CodeVerifyNamedSchema(tls, _pParse, elem6((*TSrcList_item)(unsafe.Pointer(&_pName.Xa)), 0).XzDatabase)
}
goto _exit_drop_table
_11:
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
func() {
- if _iDb < i32(0) || _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102226), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTableØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _iDb < int32(0) || _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102226), unsafe.Pointer(&_sqlite3DropTableØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
- if (_pTab.X16) != 0 && _sqlite3ViewGetColumnNames(tls, _pParse, _pTab) != 0 {
+ if _pTab.XnModuleArg != 0 && _sqlite3ViewGetColumnNames(tls, _pParse, _pTab) != 0 {
goto _exit_drop_table
}
_4_zTab = func() *int8 {
- if i32(1) != 0 && (_iDb == i32(1)) {
- return str(50007)
+ if int32(1) != 0 && (_iDb == int32(1)) {
+ return str(49962)
}
- return str(50026)
+ return str(49981)
}()
- _4_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
+ _4_zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
_4_zArg2 = nil
- if _sqlite3AuthCheck(tls, _pParse, i32(9), _4_zTab, nil, _4_zDb) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(9), _4_zTab, nil, _4_zDb) != 0 {
goto _exit_drop_table
}
if _isView == 0 {
goto _22
}
- if i32(1) != 0 && (_iDb == i32(1)) {
- _4_code = i32(15)
+ if int32(1) != 0 && (_iDb == int32(1)) {
+ _4_code = int32(15)
goto _25
}
- _4_code = i32(17)
+ _4_code = int32(17)
_25:
goto _28
_22:
- if (_pTab.X16) != 0 {
- _4_code = i32(30)
- _4_zArg2 = (*XModule)(_sqlite3GetVTable(tls, _db, _pTab).X1).X1
+ if _pTab.XnModuleArg != 0 {
+ _4_code = int32(30)
+ _4_zArg2 = (*XModule)(_sqlite3GetVTable(tls, _db, _pTab).XpMod).XzName
goto _28
}
- if i32(1) != 0 && (_iDb == i32(1)) {
- _4_code = i32(13)
+ if int32(1) != 0 && (_iDb == int32(1)) {
+ _4_code = int32(13)
goto _31
}
- _4_code = i32(11)
+ _4_code = int32(11)
_31:
_28:
- if _sqlite3AuthCheck(tls, _pParse, _4_code, _pTab.X0, _4_zArg2, _4_zDb) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, _4_code, _pTab.XzName, _4_zArg2, _4_zDb) != 0 {
goto _exit_drop_table
}
- if _sqlite3AuthCheck(tls, _pParse, i32(9), _pTab.X0, nil, _4_zDb) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(9), _pTab.XzName, nil, _4_zDb) != 0 {
goto _exit_drop_table
}
- if (Xsqlite3_strnicmp(tls, _pTab.X0, str(111644), i32(7)) == i32(0)) && (Xsqlite3_strnicmp(tls, _pTab.X0, str(114839), i32(11)) != i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(114851), unsafe.Pointer(_pTab.X0))
+ if (Xsqlite3_strnicmp(tls, _pTab.XzName, str(111672), int32(7)) == int32(0)) && (Xsqlite3_strnicmp(tls, _pTab.XzName, str(114867), int32(11)) != int32(0)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(114879), unsafe.Pointer(_pTab.XzName))
goto _exit_drop_table
}
- if _isView != 0 && ((*XSelect)(_pTab.X3) == nil) {
- _sqlite3ErrorMsg(tls, _pParse, str(114879), unsafe.Pointer(_pTab.X0))
+ if _isView != 0 && ((*XSelect)(_pTab.XpSelect) == nil) {
+ _sqlite3ErrorMsg(tls, _pParse, str(114907), unsafe.Pointer(_pTab.XzName))
goto _exit_drop_table
}
- if (_isView == 0) && ((*XSelect)(_pTab.X3) != nil) {
- _sqlite3ErrorMsg(tls, _pParse, str(114913), unsafe.Pointer(_pTab.X0))
+ if (_isView == 0) && (_pTab.XpSelect != nil) {
+ _sqlite3ErrorMsg(tls, _pParse, str(114941), unsafe.Pointer(_pTab.XzName))
goto _exit_drop_table
}
_v = _sqlite3GetVdbe(tls, _pParse)
if _v != nil {
- _sqlite3BeginWriteOperation(tls, _pParse, i32(1), _iDb)
- _sqlite3ClearStatTables(tls, _pParse, _iDb, str(61653), _pTab.X0)
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(1), _iDb)
+ _sqlite3ClearStatTables(tls, _pParse, _iDb, str(93739), _pTab.XzName)
_sqlite3FkDropTable(tls, _pParse, _pName, _pTab)
_sqlite3CodeDropTable(tls, _pParse, _pTab, _iDb, _isView)
}
@@ -95760,23 +96886,26 @@ _exit_drop_table:
var _sqlite3DropTableØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DropTableØ00__func__Ø000[0], str(114945), 17)
+ crt.Xstrncpy(nil, &_sqlite3DropTableØ00__func__Ø000[0], str(114973), 17)
}
-// If argument zDb is NULL, then call sqlite3CodeVerifySchema() for each
-// attached database. Otherwise, invoke it for the database named zDb only.
+// C comment
+// /*
+// ** If argument zDb is NULL, then call sqlite3CodeVerifySchema() for each
+// ** attached database. Otherwise, invoke it for the database named zDb only.
+// */
func _sqlite3CodeVerifyNamedSchema(tls *crt.TLS, _pParse *XParse, _zDb *int8) {
var _i int32
var _db *Xsqlite3
var _1_pDb *XDb
- _db = (*Xsqlite3)(_pParse.X0)
- _i = i32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _i = int32(0)
_0:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _3
}
- _1_pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i)))
- if ((*XBtree)(_1_pDb.X1) != nil) && ((_zDb == nil) || (i32(0) == _sqlite3StrICmp(tls, _zDb, _1_pDb.X0))) {
+ _1_pDb = elem27((*XDb)(_db.XaDb), uintptr(_i))
+ if (_1_pDb.XpBt != nil) && ((_zDb == nil) || (int32(0) == _sqlite3StrICmp(tls, _zDb, _1_pDb.XzDbSName))) {
_sqlite3CodeVerifySchema(tls, _pParse, _i)
}
_i += 1
@@ -95784,21 +96913,24 @@ _0:
_3:
}
-// Remove entries from the sqlite_statN tables (for N in (1,2,3))
-// after a DROP INDEX or DROP TABLE command.
+// C comment
+// /*
+// ** Remove entries from the sqlite_statN tables (for N in (1,2,3))
+// ** after a DROP INDEX or DROP TABLE command.
+// */
func _sqlite3ClearStatTables(tls *crt.TLS, _pParse *XParse, _iDb int32, _zType *int8, _zName *int8) {
var _i int32
var _zDbName *int8
var _1_zTab [24]int8
- _zDbName = (*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_pParse.X0).X4) + 16*uintptr(_iDb))).X0
- _i = i32(1)
+ _zDbName = elem27((*XDb)((*Xsqlite3)(_pParse.Xdb).XaDb), uintptr(_iDb)).XzDbSName
+ _i = int32(1)
_0:
- if _i > i32(4) {
+ if _i > int32(4) {
goto _3
}
- Xsqlite3_snprintf(tls, int32(u32(24)), (*int8)(unsafe.Pointer(&_1_zTab)), str(114962), _i)
- if _sqlite3FindTable(tls, (*Xsqlite3)(_pParse.X0), (*int8)(unsafe.Pointer(&_1_zTab)), _zDbName) != nil {
- _sqlite3NestedParse(tls, _pParse, str(114976), unsafe.Pointer(_zDbName), unsafe.Pointer((*int8)(unsafe.Pointer(&_1_zTab))), unsafe.Pointer(_zType), unsafe.Pointer(_zName))
+ Xsqlite3_snprintf(tls, int32(24), (*int8)(unsafe.Pointer(&_1_zTab)), str(114990), _i)
+ if _sqlite3FindTable(tls, (*Xsqlite3)(_pParse.Xdb), (*int8)(unsafe.Pointer(&_1_zTab)), _zDbName) != nil {
+ _sqlite3NestedParse(tls, _pParse, str(115004), unsafe.Pointer(_zDbName), unsafe.Pointer(&_1_zTab), unsafe.Pointer(_zType), unsafe.Pointer(_zName))
}
_i += 1
goto _0
@@ -95806,64 +96938,67 @@ _3:
_ = _1_zTab
}
-// This function is called to generate code that runs when table pTab is
-// being dropped from the database. The SrcList passed as the second argument
-// to this function contains a single entry guaranteed to resolve to
-// table pTab.
-//
-// Normally, no code is required. However, if either
-//
-// (a) The table is the parent table of a FK constraint, or
-// (b) The table is the child table of a deferred FK constraint and it is
-// determined at runtime that there are outstanding deferred FK
-// constraint violations in the database,
-//
-// then the equivalent of "DELETE FROM <tbl>" is executed before dropping
-// the table from the database. Triggers are disabled while running this
-// DELETE, but foreign key actions are not.
+// C comment
+// /*
+// ** This function is called to generate code that runs when table pTab is
+// ** being dropped from the database. The SrcList passed as the second argument
+// ** to this function contains a single entry guaranteed to resolve to
+// ** table pTab.
+// **
+// ** Normally, no code is required. However, if either
+// **
+// ** (a) The table is the parent table of a FK constraint, or
+// ** (b) The table is the child table of a deferred FK constraint and it is
+// ** determined at runtime that there are outstanding deferred FK
+// ** constraint violations in the database,
+// **
+// ** then the equivalent of "DELETE FROM <tbl>" is executed before dropping
+// ** the table from the database. Triggers are disabled while running this
+// ** DELETE, but foreign key actions are not.
+// */
func _sqlite3FkDropTable(tls *crt.TLS, _pParse *XParse, _pName *XSrcList, _pTab *XTable) {
var _1_iSkip int32
var _db *Xsqlite3
var _1_v *TVdbe
var _2_p *XFKey
- _db = (*Xsqlite3)(_pParse.X0)
- if ((_db.X6)&i32(524288)) == 0 || (_pTab.X16) != 0 || (*XSelect)(_pTab.X3) != nil {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if (_db.Xflags&int32(524288)) == 0 || _pTab.XnModuleArg != 0 || _pTab.XpSelect != nil {
goto _2
}
- _1_iSkip = i32(0)
+ _1_iSkip = int32(0)
_1_v = _sqlite3GetVdbe(tls, _pParse)
func() {
if _1_v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108122), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkDropTableØ00__func__Ø000))), unsafe.Pointer(str(41861)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108122), unsafe.Pointer(&_sqlite3FkDropTableØ00__func__Ø000), unsafe.Pointer(str(41816)))
crt.X__builtin_abort(tls)
}
}()
if _sqlite3FkReferences(tls, _pTab) != nil {
goto _5
}
- _2_p = (*XFKey)(_pTab.X4)
+ _2_p = (*XFKey)(_pTab.XpFKey)
_6:
if _2_p == nil {
goto _9
}
- if ((_2_p.X6) != 0) || ((_db.X6)&i32(33554432)) != 0 {
+ if (_2_p.XisDeferred != 0) || (_db.Xflags&int32(33554432)) != 0 {
goto _9
}
- _2_p = (*XFKey)(_2_p.X1)
+ _2_p = (*XFKey)(_2_p.XpNextFrom)
goto _6
_9:
if _2_p == nil {
return
}
_1_iSkip = _sqlite3VdbeMakeLabel(tls, _1_v)
- _sqlite3VdbeAddOp2(tls, _1_v, i32(45), i32(1), _1_iSkip)
+ _sqlite3VdbeAddOp2(tls, _1_v, int32(45), int32(1), _1_iSkip)
_5:
- *(*uint8)(unsafe.Pointer(&(_pParse.X47))) = uint8(i32(1))
- _sqlite3DeleteFrom(tls, _pParse, _sqlite3SrcListDup(tls, _db, _pName, i32(0)), nil)
- *(*uint8)(unsafe.Pointer(&(_pParse.X47))) = uint8(i32(0))
- if ((_db.X6) & i32(33554432)) == i32(0) {
- _sqlite3VdbeAddOp2(tls, _1_v, i32(45), i32(0), _sqlite3VdbeCurrentAddr(tls, _1_v)+i32(2))
- _sqlite3HaltConstraint(tls, _pParse, i32(787), i32(2), nil, int8(i32(-2)), uint8(i32(4)))
+ _pParse.XdisableTriggers = uint8(1)
+ _sqlite3DeleteFrom(tls, _pParse, _sqlite3SrcListDup(tls, _db, _pName, int32(0)), nil)
+ _pParse.XdisableTriggers = 0
+ if (_db.Xflags & int32(33554432)) == int32(0) {
+ _sqlite3VdbeAddOp2(tls, _1_v, int32(45), int32(0), _sqlite3VdbeCurrentAddr(tls, _1_v)+int32(2))
+ _sqlite3HaltConstraint(tls, _pParse, int32(787), int32(2), nil, int8(-2), uint8(4))
}
if _1_iSkip != 0 {
_sqlite3VdbeResolveLabel(tls, _1_v, _1_iSkip)
@@ -95874,30 +97009,36 @@ _2:
var _sqlite3FkDropTableØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FkDropTableØ00__func__Ø000[0], str(115006), 19)
-}
-
-// This function returns a linked list of FKey objects (connected by
-// FKey.pNextTo) holding all children of table pTab. For example,
-// given the following schema:
-//
-// CREATE TABLE t1(a PRIMARY KEY);
-// CREATE TABLE t2(b REFERENCES t1(a);
-//
-// Calling this function with table "t1" as an argument returns a pointer
-// to the FKey structure representing the foreign key constraint on table
-// "t2". Calling this function with "t2" as the argument would return a
-// NULL pointer (as there are no FK constraints for which t2 is the parent
-// table).
+ crt.Xstrncpy(nil, &_sqlite3FkDropTableØ00__func__Ø000[0], str(115034), 19)
+}
+
+// C comment
+// /*
+// ** This function returns a linked list of FKey objects (connected by
+// ** FKey.pNextTo) holding all children of table pTab. For example,
+// ** given the following schema:
+// **
+// ** CREATE TABLE t1(a PRIMARY KEY);
+// ** CREATE TABLE t2(b REFERENCES t1(a);
+// **
+// ** Calling this function with table "t1" as an argument returns a pointer
+// ** to the FKey structure representing the foreign key constraint on table
+// ** "t2". Calling this function with "t2" as the argument would return a
+// ** NULL pointer (as there are no FK constraints for which t2 is the parent
+// ** table).
+// */
func _sqlite3FkReferences(tls *crt.TLS, _pTab *XTable) (r0 *XFKey) {
- return (*XFKey)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&((*XSchema)(_pTab.X20).X5))), _pTab.X0))
+ return (*XFKey)(_sqlite3HashFind(tls, &((*XSchema)(_pTab.XpSchema).XfkeyHash), _pTab.XzName))
}
-// Generate code for a DELETE FROM statement.
-//
-// DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL;
-// \________/ \________________/
-// pTabList pWhere
+// C comment
+// /*
+// ** Generate code for a DELETE FROM statement.
+// **
+// ** DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL;
+// ** \________/ \________________/
+// ** pTabList pWhere
+// */
func _sqlite3DeleteFrom(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pWhere *XExpr) {
var _nPk, _nKey int16
var _i, _iTabCur, _iDataCur, _iIdxCur, _nIdx, _iDb, _memCnt, _rcauth, _eOnePass, _iPk, _iKey, _iEphCur, _iRowSet, _addrBypass, _addrLoop, _addrEphOpen, _bComplex, _isView, _28_iAddrOnce, _36_count int32
@@ -95913,25 +97054,25 @@ func _sqlite3DeleteFrom(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pWh
var _sNC XNameContext
var _sContext XAuthContext
var _pWInfo *XWhereInfo
- _iDataCur = i32(0)
- _iIdxCur = i32(0)
- _memCnt = i32(-1)
+ _iDataCur = int32(0)
+ _iIdxCur = int32(0)
+ _memCnt = int32(-1)
_aToOpen = nil
- _iPk = i32(0)
- _nPk = i16(1)
- _iEphCur = i32(0)
- _iRowSet = i32(0)
- _addrBypass = i32(0)
- _addrLoop = i32(0)
- _addrEphOpen = i32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_sContext), i32(0), u32(8))
- _db = (*Xsqlite3)(_pParse.X0)
- if (_pParse.X16) != 0 || ((_db.X17) != 0) {
+ _iPk = int32(0)
+ _nPk = int16(1)
+ _iEphCur = int32(0)
+ _iRowSet = int32(0)
+ _addrBypass = int32(0)
+ _addrLoop = int32(0)
+ _addrEphOpen = int32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_sContext), int32(0), uint32(8))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pParse.XnErr != 0 || (_db.XmallocFailed != 0) {
goto _delete_from_cleanup
}
func() {
- if (_pTabList.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104887), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115025)))
+ if _pTabList.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104887), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115053)))
crt.X__builtin_abort(tls)
}
}()
@@ -95939,216 +97080,211 @@ func _sqlite3DeleteFrom(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pWh
if _pTab == nil {
goto _delete_from_cleanup
}
- _pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, i32(109), nil, nil)
- _isView = bool2int((*XSelect)(_pTab.X3) != nil)
- _bComplex = bool2int((_pTrigger != nil) || _sqlite3FkRequired(tls, _pParse, _pTab, nil, i32(0)) != 0)
+ _pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, int32(109), nil, nil)
+ _isView = bool2int((*XSelect)(_pTab.XpSelect) != nil)
+ _bComplex = bool2int((_pTrigger != nil) || _sqlite3FkRequired(tls, _pParse, _pTab, nil, int32(0)) != 0)
if _sqlite3ViewGetColumnNames(tls, _pParse, _pTab) != 0 {
goto _delete_from_cleanup
}
if _sqlite3IsReadOnly(tls, _pParse, _pTab, func() int32 {
if _pTrigger != nil {
- return i32(1)
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}()) != 0 {
goto _delete_from_cleanup
}
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
func() {
- if _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104923), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(54328)))
+ if _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104923), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(54304)))
crt.X__builtin_abort(tls)
}
}()
- _rcauth = _sqlite3AuthCheck(tls, _pParse, i32(9), _pTab.X0, nil, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0)
+ _rcauth = _sqlite3AuthCheck(tls, _pParse, int32(9), _pTab.XzName, nil, elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName)
func() {
- if _rcauth != i32(0) && _rcauth != i32(1) && _rcauth != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104926), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115043)))
+ if _rcauth != int32(0) && _rcauth != int32(1) && _rcauth != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104926), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115071)))
crt.X__builtin_abort(tls)
}
}()
- if _rcauth == i32(1) {
+ if _rcauth == int32(1) {
goto _delete_from_cleanup
}
func() {
if _isView != 0 && _pTrigger == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104930), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115109)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104930), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115137)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pTabList.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104934), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115025)))
+ if _pTabList.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104934), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115053)))
crt.X__builtin_abort(tls)
}
}()
- _iTabCur = store1((*int32)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(i32(0)))).X11))), postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1)))
- *func() **XIndex { _nIdx = i32(0); return &_pIdx }() = (*XIndex)(_pTab.X2)
+ _iTabCur = store2(&(elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), 0).XiCursor), postInc2(&_pParse.XnTab, 1))
+ *func() **XIndex { _nIdx = int32(0); return &_pIdx }() = (*XIndex)(_pTab.XpIndex)
_22:
if _pIdx == nil {
goto _25
}
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) += 1
- *func() *int32 { _pIdx = (*XIndex)(_pIdx.X5); return &_nIdx }() += 1
+ _pParse.XnTab += 1
+ *func() *int32 { _pIdx = (*XIndex)(_pIdx.XpNext); return &_nIdx }() += 1
goto _22
_25:
if _isView != 0 {
- _sqlite3AuthContextPush(tls, _pParse, &_sContext, _pTab.X0)
+ _sqlite3AuthContextPush(tls, _pParse, &_sContext, _pTab.XzName)
}
_v = _sqlite3GetVdbe(tls, _pParse)
if _v == nil {
goto _delete_from_cleanup
}
- if int32(_pParse.X6) == i32(0) {
+ if int32(_pParse.Xnested) == int32(0) {
_sqlite3VdbeCountChanges(tls, _v)
}
- _sqlite3BeginWriteOperation(tls, _pParse, i32(1), _iDb)
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(1), _iDb)
if _isView != 0 {
_sqlite3MaterializeView(tls, _pParse, _pTab, _pWhere, _iTabCur)
- _iDataCur = store1(&_iIdxCur, _iTabCur)
+ _iDataCur = store2(&_iIdxCur, _iTabCur)
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_sNC), i32(0), u32(32))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X0))))) = _pParse
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X1))))) = _pTabList
+ crt.Xmemset(tls, unsafe.Pointer(&_sNC), int32(0), uint32(32))
+ *(**XParse)(unsafe.Pointer(&_sNC.XpParse)) = _pParse
+ *(**XSrcList)(unsafe.Pointer(&_sNC.XpSrcList)) = _pTabList
if _sqlite3ResolveExprNames(tls, &_sNC, _pWhere) != 0 {
goto _delete_from_cleanup
}
- if ((_db.X6) & i32(128)) != 0 {
- _memCnt = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _memCnt)
+ if (_db.Xflags & int32(128)) != 0 {
+ _memCnt = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _memCnt)
}
- if _rcauth != i32(0) || _pWhere != nil || _bComplex != 0 || (_pTab.X16) != 0 {
+ if _rcauth != int32(0) || _pWhere != nil || _bComplex != 0 || _pTab.XnModuleArg != 0 {
goto _35
}
func() {
if _isView != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105002), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115129)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105002), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115157)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3TableLock(tls, _pParse, _iDb, _pTab.X7, uint8(i32(1)), _pTab.X0)
- if ((_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
- _sqlite3VdbeAddOp4(tls, _v, i32(134), _pTab.X7, _iDb, _memCnt, _pTab.X0, i32(-2))
+ _sqlite3TableLock(tls, _pParse, _iDb, _pTab.Xtnum, uint8(1), _pTab.XzName)
+ if (_pTab.XtabFlags & uint32(32)) == (0) {
+ _sqlite3VdbeAddOp4(tls, _v, int32(134), _pTab.Xtnum, _iDb, _memCnt, _pTab.XzName, int32(-2))
}
- _pIdx = (*XIndex)(_pTab.X2)
+ _pIdx = (*XIndex)(_pTab.XpIndex)
_39:
if _pIdx == nil {
goto _42
}
func() {
- if (*XSchema)(_pIdx.X6) != (*XSchema)(_pTab.X20) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105009), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115137)))
+ if (*XSchema)(_pIdx.XpSchema) != (*XSchema)(_pTab.XpSchema) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105009), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115165)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp2(tls, _v, i32(134), _pIdx.X11, _iDb)
- _pIdx = (*XIndex)(_pIdx.X5)
+ _sqlite3VdbeAddOp2(tls, _v, int32(134), _pIdx.Xtnum, _iDb)
+ _pIdx = (*XIndex)(_pIdx.XpNext)
goto _39
_42:
goto _45
_35:
- _14_wcf = u16(1044)
- if (int32(_sNC.X7) & i32(64)) != 0 {
- _bComplex = i32(1)
+ _14_wcf = uint16(1044)
+ if (int32(_sNC.XncFlags) & int32(64)) != 0 {
+ _bComplex = int32(1)
}
{
p := &_14_wcf
*p = uint16(int32(*p) | func() int32 {
if _bComplex != 0 {
- return i32(0)
+ return int32(0)
}
- return i32(8)
+ return int32(8)
}())
- sink14(*p)
}
- if ((_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
+ if (_pTab.XtabFlags & uint32(32)) == (0) {
_pPk = nil
- _nPk = int16(i32(1))
- _iRowSet = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _iRowSet)
+ _nPk = int16(1)
+ _iRowSet = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _iRowSet)
goto _50
}
_pPk = _sqlite3PrimaryKeyIndex(tls, _pTab)
func() {
if _pPk == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105028), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(41994)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105028), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(41949)))
crt.X__builtin_abort(tls)
}
}()
- _nPk = int16(_pPk.X13)
- _iPk = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + int32(_nPk)
- sink1(*p)
- }
- _iEphCur = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _addrEphOpen = _sqlite3VdbeAddOp2(tls, _v, i32(110), _iEphCur, int32(_nPk))
+ _nPk = int16(_pPk.XnKeyCol)
+ _iPk = _pParse.XnMem + int32(1)
+ _pParse.XnMem += int32(_nPk)
+ _iEphCur = postInc2(&_pParse.XnTab, 1)
+ _addrEphOpen = _sqlite3VdbeAddOp2(tls, _v, int32(110), _iEphCur, int32(_nPk))
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _pPk)
_50:
- _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pTabList, _pWhere, nil, nil, _14_wcf, _iTabCur+i32(1))
+ _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pTabList, _pWhere, nil, nil, _14_wcf, _iTabCur+int32(1))
if _pWInfo == nil {
goto _delete_from_cleanup
}
_eOnePass = _sqlite3WhereOkOnePass(tls, _pWInfo, (*int32)(unsafe.Pointer(&_aiCurOnePass)))
func() {
- if (_pTab.X16) != i32(0) && _eOnePass == i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105048), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115166)))
+ if _pTab.XnModuleArg != int32(0) && _eOnePass == int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105048), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115194)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pTab.X16) == 0 && _bComplex == 0 && _eOnePass == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105049), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115212)))
+ if _pTab.XnModuleArg == 0 && _bComplex == 0 && _eOnePass == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105049), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115240)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(128)) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(73), _memCnt, i32(1))
+ if (_db.Xflags & int32(128)) != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(73), _memCnt, int32(1))
}
if _pPk == nil {
goto _62
}
- _i = i32(0)
+ _i = int32(0)
_63:
if _i >= int32(_nPk) {
goto _66
}
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i)))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105059), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115265)))
+ if int32(*elem50(_pPk.XaiColumn, uintptr(_i))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105059), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115293)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ExprCodeGetColumnOfTable(tls, _v, _pTab, _iTabCur, int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i)))), _iPk+_i)
+ _sqlite3ExprCodeGetColumnOfTable(tls, _v, _pTab, _iTabCur, int32(*elem50(_pPk.XaiColumn, uintptr(_i))), _iPk+_i)
_i += 1
goto _63
_66:
_iKey = _iPk
goto _69
_62:
- _iKey = (_pParse.X18) + i32(1)
- _iKey = _sqlite3ExprCodeGetColumn(tls, _pParse, _pTab, i32(-1), _iTabCur, _iKey, uint8(i32(0)))
- if _iKey > (_pParse.X18) {
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = _iKey
+ _iKey = _pParse.XnMem + int32(1)
+ _iKey = _sqlite3ExprCodeGetColumn(tls, _pParse, _pTab, int32(-1), _iTabCur, _iKey, 0)
+ if _iKey > _pParse.XnMem {
+ _pParse.XnMem = _iKey
}
_69:
- if _eOnePass == i32(0) {
+ if _eOnePass == int32(0) {
goto _71
}
_nKey = _nPk
- _aToOpen = (*uint8)(_sqlite3DbMallocRawNN(tls, _db, uint64(_nIdx+i32(2))))
+ _aToOpen = (*uint8)(_sqlite3DbMallocRawNN(tls, _db, uint64(_nIdx+int32(2))))
if _aToOpen == nil {
_sqlite3WhereEnd(tls, _pWInfo)
goto _delete_from_cleanup
}
- crt.Xmemset(tls, (unsafe.Pointer)(_aToOpen), i32(1), uint32(_nIdx+i32(1)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr(_nIdx+i32(1)))) = uint8(i32(0))
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(0))))) >= i32(0) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(0)))))-_iTabCur))) = uint8(i32(0))
+ crt.Xmemset(tls, unsafe.Pointer(_aToOpen), int32(1), uint32(_nIdx+int32(1)))
+ *elem15(_aToOpen, uintptr(_nIdx+int32(1))) = 0
+ if (*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), 0)) >= int32(0) {
+ *elem15(_aToOpen, uintptr((*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), 0))-_iTabCur)) = 0
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(1))))) >= i32(0) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(1)))))-_iTabCur))) = uint8(i32(0))
+ if (*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), uintptr(1))) >= int32(0) {
+ *elem15(_aToOpen, uintptr((*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), uintptr(1)))-_iTabCur)) = 0
}
if _addrEphOpen != 0 {
_sqlite3VdbeChangeToNoop(tls, _v, _addrEphOpen)
@@ -96156,17 +97292,17 @@ _69:
goto _76
_71:
if _pPk != nil {
- _iKey = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _nKey = int16(i32(0))
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _iPk, int32(_nPk), _iKey, _sqlite3IndexAffinityStr(tls, (*Xsqlite3)(_pParse.X0), _pPk), int32(_nPk))
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _iEphCur, _iKey, _iPk, int32(_nPk))
+ _iKey = preInc2(&_pParse.XnMem, 1)
+ _nKey = 0
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _iPk, int32(_nPk), _iKey, _sqlite3IndexAffinityStr(tls, (*Xsqlite3)(_pParse.Xdb), _pPk), int32(_nPk))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _iEphCur, _iKey, _iPk, int32(_nPk))
goto _78
}
- _nKey = int16(i32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(145), _iRowSet, _iKey)
+ _nKey = int16(1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(145), _iRowSet, _iKey)
_78:
_76:
- if _eOnePass != i32(0) {
+ if _eOnePass != int32(0) {
_addrBypass = _sqlite3VdbeMakeLabel(tls, _v)
goto _80
}
@@ -96175,95 +97311,95 @@ _80:
if _isView != 0 {
goto _81
}
- _28_iAddrOnce = i32(0)
- if _eOnePass == i32(2) {
- _28_iAddrOnce = _sqlite3VdbeAddOp0(tls, _v, i32(20))
+ _28_iAddrOnce = int32(0)
+ if _eOnePass == int32(2) {
+ _28_iAddrOnce = _sqlite3VdbeAddOp0(tls, _v, int32(20))
}
- _sqlite3OpenTableAndIndices(tls, _pParse, _pTab, i32(107), uint8(i32(8)), _iTabCur, _aToOpen, &_iDataCur, &_iIdxCur)
+ _sqlite3OpenTableAndIndices(tls, _pParse, _pTab, int32(107), uint8(8), _iTabCur, _aToOpen, &_iDataCur, &_iIdxCur)
func() {
- if _pPk == nil && (_pTab.X16) == 0 && _iDataCur != _iTabCur {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105121), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115285)))
+ if _pPk == nil && _pTab.XnModuleArg == 0 && _iDataCur != _iTabCur {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105121), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115313)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pPk == nil && (_pTab.X16) == 0 && _iIdxCur != (_iDataCur+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105122), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115329)))
+ if _pPk == nil && _pTab.XnModuleArg == 0 && _iIdxCur != (_iDataCur+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105122), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115357)))
crt.X__builtin_abort(tls)
}
}()
- if _eOnePass == i32(2) {
+ if _eOnePass == int32(2) {
_sqlite3VdbeJumpHere(tls, _v, _28_iAddrOnce)
}
_81:
- if _eOnePass == i32(0) {
+ if _eOnePass == int32(0) {
goto _92
}
func() {
if int32(_nKey) != int32(_nPk) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105130), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115375)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105130), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115403)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pTab.X16) == 0) && ((*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr(_iDataCur-_iTabCur)))) != 0) {
+ if (_pTab.XnModuleArg == 0) && ((*elem15(_aToOpen, uintptr(_iDataCur-_iTabCur))) != 0) {
func() {
- if _pPk == nil && (*XSelect)(_pTab.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105132), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115385)))
+ if _pPk == nil && (*XSelect)(_pTab.XpSelect) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105132), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115413)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4Int(tls, _v, i32(29), _iDataCur, _addrBypass, _iKey, int32(_nKey))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(29), _iDataCur, _addrBypass, _iKey, int32(_nKey))
}
goto _104
_92:
if _pPk != nil {
- _addrLoop = _sqlite3VdbeAddOp1(tls, _v, i32(37), _iEphCur)
- _sqlite3VdbeAddOp2(tls, _v, i32(124), _iEphCur, _iKey)
+ _addrLoop = _sqlite3VdbeAddOp1(tls, _v, int32(37), _iEphCur)
+ _sqlite3VdbeAddOp2(tls, _v, int32(124), _iEphCur, _iKey)
func() {
- if int32(_nKey) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105139), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115412)))
+ if int32(_nKey) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105139), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115440)))
crt.X__builtin_abort(tls)
}
}()
goto _104
}
- _addrLoop = _sqlite3VdbeAddOp3(tls, _v, i32(42), _iRowSet, i32(0), _iKey)
+ _addrLoop = _sqlite3VdbeAddOp3(tls, _v, int32(42), _iRowSet, int32(0), _iKey)
func() {
- if int32(_nKey) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105143), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115420)))
+ if int32(_nKey) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105143), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115448)))
crt.X__builtin_abort(tls)
}
}()
_104:
- if (_pTab.X16) == 0 {
+ if _pTab.XnModuleArg == 0 {
goto _107
}
_34_pVTab = (*int8)(unsafe.Pointer(_sqlite3GetVTable(tls, _db, _pTab)))
_sqlite3VtabMakeWritable(tls, _pParse, _pTab)
- _sqlite3VdbeAddOp4(tls, _v, i32(12), i32(0), i32(1), _iKey, _34_pVTab, i32(-8))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(2)))
+ _sqlite3VdbeAddOp4(tls, _v, int32(12), int32(0), int32(1), _iKey, _34_pVTab, int32(-8))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(2))
func() {
- if _eOnePass != i32(0) && _eOnePass != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105153), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000))), unsafe.Pointer(str(115428)))
+ if _eOnePass != int32(0) && _eOnePass != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105153), unsafe.Pointer(&_sqlite3DeleteFromØ00__func__Ø000), unsafe.Pointer(str(115456)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3MayAbort(tls, _pParse)
- if (_eOnePass == i32(1)) && ((*XParse)(_pParse.X39) == nil) {
- *(*uint8)(unsafe.Pointer(&(_pParse.X8))) = uint8(i32(0))
+ if (_eOnePass == int32(1)) && ((*XParse)(_pParse.XpToplevel) == nil) {
+ _pParse.XisMultiWrite = 0
}
goto _113
_107:
- _36_count = bool2int(int32(_pParse.X6) == i32(0))
- _sqlite3GenerateRowDelete(tls, _pParse, _pTab, _pTrigger, _iDataCur, _iIdxCur, _iKey, _nKey, uint8(_36_count), uint8(i32(10)), uint8(_eOnePass), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(1)))))
+ _36_count = bool2int(int32(_pParse.Xnested) == int32(0))
+ _sqlite3GenerateRowDelete(tls, _pParse, _pTab, _pTrigger, _iDataCur, _iIdxCur, _iKey, _nKey, uint8(_36_count), uint8(10), uint8(_eOnePass), *elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), uintptr(1)))
_113:
- if _eOnePass != i32(0) {
+ if _eOnePass != int32(0) {
_sqlite3VdbeResolveLabel(tls, _v, _addrBypass)
_sqlite3WhereEnd(tls, _pWInfo)
goto _117
}
if _pPk != nil {
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _iEphCur, _addrLoop+i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _iEphCur, _addrLoop+int32(1))
_sqlite3VdbeJumpHere(tls, _v, _addrLoop)
goto _117
}
@@ -96271,45 +97407,46 @@ _113:
_sqlite3VdbeJumpHere(tls, _v, _addrLoop)
_117:
_45:
- if (int32(_pParse.X6) == i32(0)) && ((*XTable)(_pParse.X40) == nil) {
+ if (int32(_pParse.Xnested) == int32(0)) && ((*XTable)(_pParse.XpTriggerTab) == nil) {
_sqlite3AutoincrementEnd(tls, _pParse)
}
- if (((_db.X6)&i32(128)) != 0 && ((_pParse.X6) == 0)) && ((*XTable)(_pParse.X40) == nil) {
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _memCnt, i32(1))
- _sqlite3VdbeSetNumCols(tls, _v, i32(1))
- _sqlite3VdbeSetColName(tls, _v, i32(0), i32(0), str(115478), nil)
+ if ((_db.Xflags&int32(128)) != 0 && (_pParse.Xnested == 0)) && (_pParse.XpTriggerTab == nil) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _memCnt, int32(1))
+ _sqlite3VdbeSetNumCols(tls, _v, int32(1))
+ _sqlite3VdbeSetColName(tls, _v, int32(0), int32(0), str(115506), nil)
}
_delete_from_cleanup:
_sqlite3AuthContextPop(tls, &_sContext)
_sqlite3SrcListDelete(tls, _db, _pTabList)
_sqlite3ExprDelete(tls, _db, _pWhere)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_aToOpen))
- _ = _sContext
- _ = _sNC
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_aToOpen))
_ = _aiCurOnePass
}
var _sqlite3DeleteFromØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DeleteFromØ00__func__Ø000[0], str(115491), 18)
+ crt.Xstrncpy(nil, &_sqlite3DeleteFromØ00__func__Ø000[0], str(115519), 18)
}
-// Return a list of all triggers on table pTab if there exists at least
-// one trigger that must be fired when an operation of type 'op' is
-// performed on the table, and, if that operation is an UPDATE, if at
-// least one of the columns in pChanges is being modified.
+// C comment
+// /*
+// ** Return a list of all triggers on table pTab if there exists at least
+// ** one trigger that must be fired when an operation of type 'op' is
+// ** performed on the table, and, if that operation is an UPDATE, if at
+// ** least one of the columns in pChanges is being modified.
+// */
func _sqlite3TriggersExist(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _op int32, _pChanges *XExprList, _pMask *int32) (r0 *XTrigger) {
var _mask int32
var _pList, _p *XTrigger
- _mask = i32(0)
+ _mask = int32(0)
_pList = nil
- if (((*Xsqlite3)(_pParse.X0).X6) & i32(16777216)) != i32(0) {
+ if (((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(16777216)) != int32(0) {
_pList = _sqlite3TriggerList(tls, _pParse, _pTab)
}
func() {
- if _pList != nil && (_pTab.X16) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123273), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TriggersExistØ00__func__Ø000))), unsafe.Pointer(str(115509)))
+ if _pList != nil && _pTab.XnModuleArg != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123273), unsafe.Pointer(&_sqlite3TriggersExistØ00__func__Ø000), unsafe.Pointer(str(115537)))
crt.X__builtin_abort(tls)
}
}()
@@ -96318,14 +97455,10 @@ _4:
if _p == nil {
goto _7
}
- if (int32(_p.X2) == _op) && _checkColumnOverlap(tls, (*XIdList)(_p.X5), _pChanges) != 0 {
- {
- p := &_mask
- *p = (*p) | int32(_p.X3)
- sink1(*p)
- }
+ if (int32(_p.Xop) == _op) && _checkColumnOverlap(tls, (*XIdList)(_p.XpColumns), _pChanges) != 0 {
+ _mask |= int32(_p.Xtr_tm)
}
- _p = (*XTrigger)(_p.X9)
+ _p = (*XTrigger)(_p.XpNext)
goto _4
_7:
if _pMask != nil {
@@ -96339,52 +97472,55 @@ _7:
}()
}
-// Given table pTab, return a list of all the triggers attached to
-// the table. The list is connected by Trigger.pNext pointers.
-//
-// All of the triggers on pTab that are in the same database as pTab
-// are already attached to pTab->pTrigger. But there might be additional
-// triggers on pTab in the TEMP schema. This routine prepends all
-// TEMP triggers on pTab to the beginning of the pTab->pTrigger list
-// and returns the combined list.
-//
-// To state it another way: This routine returns a list of all triggers
-// that fire off of pTab. The list will include any TEMP triggers on
-// pTab as well as the triggers lised in pTab->pTrigger.
+// C comment
+// /*
+// ** Given table pTab, return a list of all the triggers attached to
+// ** the table. The list is connected by Trigger.pNext pointers.
+// **
+// ** All of the triggers on pTab that are in the same database as pTab
+// ** are already attached to pTab->pTrigger. But there might be additional
+// ** triggers on pTab in the TEMP schema. This routine prepends all
+// ** TEMP triggers on pTab to the beginning of the pTab->pTrigger list
+// ** and returns the combined list.
+// **
+// ** To state it another way: This routine returns a list of all triggers
+// ** that fire off of pTab. The list will include any TEMP triggers on
+// ** pTab as well as the triggers lised in pTab->pTrigger.
+// */
func _sqlite3TriggerList(tls *crt.TLS, _pParse *XParse, _pTab *XTable) (r0 *XTrigger) {
var _pTmpSchema *XSchema
var _2_p *XHashElem
var _pList, _3_pTrig *XTrigger
- _pTmpSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_pParse.X0).X4) + 16*uintptr(i32(1)))).X4)
+ _pTmpSchema = (*XSchema)(elem27((*XDb)((*Xsqlite3)(_pParse.Xdb).XaDb), uintptr(1)).XpSchema)
_pList = nil
- if (_pParse.X47) != 0 {
+ if _pParse.XdisableTriggers != 0 {
return nil
}
- if _pTmpSchema == (*XSchema)(_pTab.X20) {
+ if _pTmpSchema == (*XSchema)(_pTab.XpSchema) {
goto _1
}
func() {
- if _sqlite3SchemaMutexHeld(tls, (*Xsqlite3)(_pParse.X0), i32(0), _pTmpSchema) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122701), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TriggerListØ00__func__Ø000))), unsafe.Pointer(str(115540)))
+ if _sqlite3SchemaMutexHeld(tls, (*Xsqlite3)(_pParse.Xdb), int32(0), _pTmpSchema) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122701), unsafe.Pointer(&_sqlite3TriggerListØ00__func__Ø000), unsafe.Pointer(str(115568)))
crt.X__builtin_abort(tls)
}
}()
- _2_p = (*XHashElem)((*XHash)(unsafe.Pointer(&(_pTmpSchema.X4))).X2)
+ _2_p = (*XHashElem)(_pTmpSchema.XtrigHash.Xfirst)
_4:
if _2_p == nil {
goto _7
}
- _3_pTrig = (*XTrigger)(_2_p.X2)
- if ((*XSchema)(_3_pTrig.X7) == (*XSchema)(_pTab.X20)) && (i32(0) == _sqlite3StrICmp(tls, _3_pTrig.X1, _pTab.X0)) {
- *(**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_pTrig.X9))))) = func() *XTrigger {
+ _3_pTrig = (*XTrigger)(_2_p.Xdata)
+ if ((*XSchema)(_3_pTrig.XpTabSchema) == (*XSchema)(_pTab.XpSchema)) && (int32(0) == _sqlite3StrICmp(tls, _3_pTrig.Xtable, _pTab.XzName)) {
+ *(**XTrigger)(unsafe.Pointer(&_3_pTrig.XpNext)) = func() *XTrigger {
if _pList != nil {
return _pList
}
- return (*XTrigger)(_pTab.X19)
+ return (*XTrigger)(_pTab.XpTrigger)
}()
_pList = _3_pTrig
}
- _2_p = (*XHashElem)(_2_p.X0)
+ _2_p = (*XHashElem)(_2_p.Xnext)
goto _4
_7:
_1:
@@ -96392,106 +97528,112 @@ _1:
if _pList != nil {
return _pList
}
- return (*XTrigger)(_pTab.X19)
+ return (*XTrigger)(_pTab.XpTrigger)
}()
}
var _sqlite3TriggerListØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TriggerListØ00__func__Ø000[0], str(115590), 19)
+ crt.Xstrncpy(nil, &_sqlite3TriggerListØ00__func__Ø000[0], str(115618), 19)
}
var _sqlite3TriggersExistØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TriggersExistØ00__func__Ø000[0], str(115609), 21)
+ crt.Xstrncpy(nil, &_sqlite3TriggersExistØ00__func__Ø000[0], str(115637), 21)
}
-// pEList is the SET clause of an UPDATE statement. Each entry
-// in pEList is of the format <id>=<expr>. If any of the entries
-// in pEList have an <id> which matches an identifier in pIdList,
-// then return TRUE. If pIdList==NULL, then it is considered a
-// wildcard that matches anything. Likewise if pEList==NULL then
-// it matches anything so always return true. Return false only
-// if there is no match.
+// C comment
+// /*
+// ** pEList is the SET clause of an UPDATE statement. Each entry
+// ** in pEList is of the format <id>=<expr>. If any of the entries
+// ** in pEList have an <id> which matches an identifier in pIdList,
+// ** then return TRUE. If pIdList==NULL, then it is considered a
+// ** wildcard that matches anything. Likewise if pEList==NULL then
+// ** it matches anything so always return true. Return false only
+// ** if there is no match.
+// */
func _checkColumnOverlap(tls *crt.TLS, _pIdList *XIdList, _pEList *XExprList) (r0 int32) {
var _e int32
if (_pIdList == nil) || func() int32 {
if _pEList == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123246), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkColumnOverlapØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123246), unsafe.Pointer(&_checkColumnOverlapØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
- return i32(1)
+ return int32(1)
}
- _e = i32(0)
+ _e = int32(0)
_4:
- if _e >= (_pEList.X0) {
+ if _e >= _pEList.XnExpr {
goto _7
}
- if _sqlite3IdListIndex(tls, _pIdList, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))+20*uintptr(_e))).X1) >= i32(0) {
- return i32(1)
+ if _sqlite3IdListIndex(tls, _pIdList, elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), uintptr(_e)).XzName) >= int32(0) {
+ return int32(1)
}
_e += 1
goto _4
_7:
- return i32(0)
+ return int32(0)
}
var _checkColumnOverlapØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_checkColumnOverlapØ00__func__Ø000[0], str(115630), 19)
-}
-
-// This function is called before generating code to update or delete a
-// row contained in table pTab. If the operation is a DELETE, then
-// parameter aChange is passed a NULL value. For an UPDATE, aChange points
-// to an array of size N, where N is the number of columns in table pTab.
-// If the i'th column is not modified by the UPDATE, then the corresponding
-// entry in the aChange[] array is set to -1. If the column is modified,
-// the value is 0 or greater. Parameter chngRowid is set to true if the
-// UPDATE statement modifies the rowid fields of the table.
-//
-// If any foreign key processing will be required, this function returns
-// non-zero. If there is no foreign key related processing, this function
-// returns zero.
-//
-// For an UPDATE, this function returns 2 if:
-//
-// * There are any FKs for which pTab is the child and the parent table, or
-// * the UPDATE modifies one or more parent keys for which the action is
-// not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL).
-//
-// Or, assuming some other foreign key processing is required, 1.
+ crt.Xstrncpy(nil, &_checkColumnOverlapØ00__func__Ø000[0], str(115658), 19)
+}
+
+// C comment
+// /*
+// ** This function is called before generating code to update or delete a
+// ** row contained in table pTab. If the operation is a DELETE, then
+// ** parameter aChange is passed a NULL value. For an UPDATE, aChange points
+// ** to an array of size N, where N is the number of columns in table pTab.
+// ** If the i'th column is not modified by the UPDATE, then the corresponding
+// ** entry in the aChange[] array is set to -1. If the column is modified,
+// ** the value is 0 or greater. Parameter chngRowid is set to true if the
+// ** UPDATE statement modifies the rowid fields of the table.
+// **
+// ** If any foreign key processing will be required, this function returns
+// ** non-zero. If there is no foreign key related processing, this function
+// ** returns zero.
+// **
+// ** For an UPDATE, this function returns 2 if:
+// **
+// ** * There are any FKs for which pTab is the child and the parent table, or
+// ** * the UPDATE modifies one or more parent keys for which the action is
+// ** not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL).
+// **
+// ** Or, assuming some other foreign key processing is required, 1.
+// */
func _sqlite3FkRequired(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _aChange *int32, _chngRowid int32) (r0 int32) {
var _eRet int32
var _3_p *XFKey
- _eRet = i32(0)
- if (((*Xsqlite3)(_pParse.X0).X6) & i32(524288)) == 0 {
+ _eRet = int32(0)
+ if (((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(524288)) == 0 {
goto _0
}
if _aChange == nil {
- _eRet = bool2int((_sqlite3FkReferences(tls, _pTab) != nil) || ((*XFKey)(_pTab.X4) != nil))
+ _eRet = bool2int((_sqlite3FkReferences(tls, _pTab) != nil) || (_pTab.XpFKey != nil))
goto _3
}
- _3_p = (*XFKey)(_pTab.X4)
+ _3_p = (*XFKey)(_pTab.XpFKey)
_4:
if _3_p == nil {
goto _7
}
- if i32(0) == Xsqlite3_stricmp(tls, _pTab.X0, _3_p.X2) {
- return i32(2)
+ if int32(0) == Xsqlite3_stricmp(tls, _pTab.XzName, _3_p.XzTo) {
+ return int32(2)
}
if _fkChildIsModified(tls, _pTab, _3_p, _aChange, _chngRowid) != 0 {
- _eRet = i32(1)
+ _eRet = int32(1)
}
- _3_p = (*XFKey)(_3_p.X1)
+ _3_p = (*XFKey)(_3_p.XpNextFrom)
goto _4
_7:
_3_p = _sqlite3FkReferences(tls, _pTab)
@@ -96502,12 +97644,12 @@ _10:
if _fkParentIsModified(tls, _pTab, _3_p, _aChange, _chngRowid) == 0 {
goto _14
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint8)(unsafe.Pointer(&(_3_p.X7))))) + 1*uintptr(i32(1))))) != i32(0) {
- return i32(2)
+ if int32(*elem15((*uint8)(unsafe.Pointer(&_3_p.XaAction)), uintptr(1))) != int32(0) {
+ return int32(2)
}
- _eRet = i32(1)
+ _eRet = int32(1)
_14:
- _3_p = (*XFKey)(_3_p.X3)
+ _3_p = (*XFKey)(_3_p.XpNextTo)
goto _10
_13:
_3:
@@ -96515,81 +97657,81 @@ _0:
return _eRet
}
-// The second argument points to an FKey object representing a foreign key
-// for which pTab is the child table. An UPDATE statement against pTab
-// is currently being processed. For each column of the table that is
-// actually updated, the corresponding element in the aChange[] array
-// is zero or greater (if a column is unmodified the corresponding element
-// is set to -1). If the rowid column is modified by the UPDATE statement
-// the bChngRowid argument is non-zero.
-//
-// This function returns true if any of the columns that are part of the
-// child key for FK constraint *p are modified.
+// C comment
+// /*
+// ** The second argument points to an FKey object representing a foreign key
+// ** for which pTab is the child table. An UPDATE statement against pTab
+// ** is currently being processed. For each column of the table that is
+// ** actually updated, the corresponding element in the aChange[] array
+// ** is zero or greater (if a column is unmodified the corresponding element
+// ** is set to -1). If the rowid column is modified by the UPDATE statement
+// ** the bChngRowid argument is non-zero.
+// **
+// ** This function returns true if any of the columns that are part of the
+// ** child key for FK constraint *p are modified.
+// */
func _fkChildIsModified(tls *crt.TLS, _pTab *XTable, _p *XFKey, _aChange *int32, _bChngRowid int32) (r0 int32) {
var _i, _1_iChildKey int32
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= (_p.X5) {
+ if _i >= _p.XnCol {
goto _3
}
- _1_iChildKey = (*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_p.X9))))) + 8*uintptr(_i))).X0
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aChange)) + 4*uintptr(_1_iChildKey)))) >= i32(0) {
- return i32(1)
+ _1_iChildKey = elem116((*t117)(unsafe.Pointer(&_p.XaCol)), uintptr(_i)).XiFrom
+ if (*elem8(_aChange, uintptr(_1_iChildKey))) >= int32(0) {
+ return int32(1)
}
- if (_1_iChildKey == int32(_pTab.X10)) && _bChngRowid != 0 {
- return i32(1)
+ if (_1_iChildKey == int32(_pTab.XiPKey)) && _bChngRowid != 0 {
+ return int32(1)
}
_i += 1
goto _0
_3:
- return i32(0)
-}
-
-// The second argument points to an FKey object representing a foreign key
-// for which pTab is the parent table. An UPDATE statement against pTab
-// is currently being processed. For each column of the table that is
-// actually updated, the corresponding element in the aChange[] array
-// is zero or greater (if a column is unmodified the corresponding element
-// is set to -1). If the rowid column is modified by the UPDATE statement
-// the bChngRowid argument is non-zero.
-//
-// This function returns true if any of the columns that are part of the
-// parent key for FK constraint *p are modified.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** The second argument points to an FKey object representing a foreign key
+// ** for which pTab is the parent table. An UPDATE statement against pTab
+// ** is currently being processed. For each column of the table that is
+// ** actually updated, the corresponding element in the aChange[] array
+// ** is zero or greater (if a column is unmodified the corresponding element
+// ** is set to -1). If the rowid column is modified by the UPDATE statement
+// ** the bChngRowid argument is non-zero.
+// **
+// ** This function returns true if any of the columns that are part of the
+// ** parent key for FK constraint *p are modified.
+// */
func _fkParentIsModified(tls *crt.TLS, _pTab *XTable, _p *XFKey, _aChange *int32, _bChngRowid int32) (r0 int32) {
var _i, _1_iKey int32
var _1_zKey *int8
var _3_pCol *XColumn
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= (_p.X5) {
+ if _i >= _p.XnCol {
goto _3
}
- _1_zKey = (*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_p.X9))))) + 8*uintptr(_i))).X1
- _1_iKey = i32(0)
+ _1_zKey = elem116((*t117)(unsafe.Pointer(&_p.XaCol)), uintptr(_i)).XzCol
+ _1_iKey = int32(0)
_4:
- if _1_iKey >= int32(_pTab.X11) {
+ if _1_iKey >= int32(_pTab.XnCol) {
goto _7
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aChange)) + 4*uintptr(_1_iKey)))) < i32(0) && (_1_iKey != int32(_pTab.X10) || _bChngRowid == 0) {
+ if (*elem8(_aChange, uintptr(_1_iKey))) < int32(0) && (_1_iKey != int32(_pTab.XiPKey) || _bChngRowid == 0) {
goto _10
}
- _3_pCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_1_iKey)))
+ _3_pCol = elem41((*XColumn)(_pTab.XaCol), uintptr(_1_iKey))
if _1_zKey == nil {
goto _11
}
- if i32(0) == _sqlite3StrICmp(tls, _3_pCol.X0, _1_zKey) {
- return i32(1)
+ if int32(0) == _sqlite3StrICmp(tls, _3_pCol.XzName, _1_zKey) {
+ return int32(1)
}
goto _14
_11:
- if (int32(_3_pCol.X6) & i32(1)) != 0 {
- return i32(1)
+ if (int32(_3_pCol.XcolFlags) & int32(1)) != 0 {
+ return int32(1)
}
_14:
_10:
@@ -96599,166 +97741,177 @@ _7:
_i += 1
goto _0
_3:
- return i32(0)
+ return int32(0)
}
-// Check to make sure the given table is writable. If it is not
-// writable, generate an error message and return 1. If it is
-// writable return 0;
+// C comment
+// /*
+// ** Check to make sure the given table is writable. If it is not
+// ** writable, generate an error message and return 1. If it is
+// ** writable return 0;
+// */
func _sqlite3IsReadOnly(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _viewOk int32) (r0 int32) {
- if ((_pTab.X16) != 0 && (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32
- }{(*(*func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer, *int64) int32
- }{((*Xsqlite3_module)((*XModule)(_sqlite3GetVTable(tls, (*Xsqlite3)(_pParse.X0), _pTab).X1).X0).X13)})))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32
- }{nil})))) || (((((_pTab.X9) & uint32(i32(1))) != uint32(i32(0))) && ((((*Xsqlite3)(_pParse.X0).X6) & i32(2048)) == i32(0))) && (int32(_pParse.X6) == i32(0))) {
- _sqlite3ErrorMsg(tls, _pParse, str(115649), unsafe.Pointer(_pTab.X0))
- return i32(1)
- }
- if (_viewOk == 0) && ((*XSelect)(_pTab.X3) != nil) {
- _sqlite3ErrorMsg(tls, _pParse, str(115678), unsafe.Pointer(_pTab.X0))
- return i32(1)
- }
- return i32(0)
-}
-
-// Push an authorization context. After this routine is called, the
-// zArg3 argument to authorization callbacks will be zContext until
-// popped. Or if pParse==0, this routine is a no-op.
+ if (_pTab.XnModuleArg != 0 && (func() func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32 {
+ v := (*Xsqlite3_module)((*XModule)(_sqlite3GetVTable(tls, (*Xsqlite3)(_pParse.Xdb), _pTab).XpMod).XpModule).XxUpdate
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, int32, **XMem, *int64) int32)(unsafe.Pointer(&v))
+ }() == nil)) || ((((_pTab.XtabFlags & uint32(1)) != (0)) && ((((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(2048)) == int32(0))) && (int32(_pParse.Xnested) == int32(0))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(115677), unsafe.Pointer(_pTab.XzName))
+ return int32(1)
+ }
+ if (_viewOk == 0) && (_pTab.XpSelect != nil) {
+ _sqlite3ErrorMsg(tls, _pParse, str(115706), unsafe.Pointer(_pTab.XzName))
+ return int32(1)
+ }
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Push an authorization context. After this routine is called, the
+// ** zArg3 argument to authorization callbacks will be zContext until
+// ** popped. Or if pParse==0, this routine is a no-op.
+// */
func _sqlite3AuthContextPush(tls *crt.TLS, _pParse *XParse, _pContext *XAuthContext, _zContext *int8) {
func() {
if _pParse == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99676), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AuthContextPushØ00__func__Ø000))), unsafe.Pointer(str(115716)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99676), unsafe.Pointer(&_sqlite3AuthContextPushØ00__func__Ø000), unsafe.Pointer(str(115744)))
crt.X__builtin_abort(tls)
}
}()
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pContext.X1))))) = _pParse
- *(**int8)(unsafe.Pointer(&(_pContext.X0))) = _pParse.X65
- *(**int8)(unsafe.Pointer(&(_pParse.X65))) = _zContext
+ *(**XParse)(unsafe.Pointer(&_pContext.XpParse)) = _pParse
+ _pContext.XzAuthContext = _pParse.XzAuthContext
+ _pParse.XzAuthContext = _zContext
}
var _sqlite3AuthContextPushØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AuthContextPushØ00__func__Ø000[0], str(115723), 23)
+ crt.Xstrncpy(nil, &_sqlite3AuthContextPushØ00__func__Ø000[0], str(115751), 23)
}
-// Set a flag in the vdbe to update the change counter when it is finalised
-// or reset.
+// C comment
+// /*
+// ** Set a flag in the vdbe to update the change counter when it is finalised
+// ** or reset.
+// */
func _sqlite3VdbeCountChanges(tls *crt.TLS, _v *TVdbe) {
- storebits18((*int16)(unsafe.Pointer(&(_v.X32))), int16(i32(1)), 16, 4)
+ storebits26(&_v.Xexpired, int16(1), 16, 4)
}
-// Evaluate a view and store its result in an ephemeral table. The
-// pWhere argument is an optional WHERE clause that restricts the
-// set of rows in the view that are to be added to the ephemeral table.
+// C comment
+// /*
+// ** Evaluate a view and store its result in an ephemeral table. The
+// ** pWhere argument is an optional WHERE clause that restricts the
+// ** set of rows in the view that are to be added to the ephemeral table.
+// */
func _sqlite3MaterializeView(tls *crt.TLS, _pParse *XParse, _pView *XTable, _pWhere *XExpr, _iCur int32) {
var _iDb int32
var _db *Xsqlite3
var _pFrom *XSrcList
var _pSel *XSelect
var _dest XSelectDest
- _db = (*Xsqlite3)(_pParse.X0)
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pView.X20))
- _pWhere = _sqlite3ExprDup(tls, _db, _pWhere, i32(0))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pView.XpSchema))
+ _pWhere = _sqlite3ExprDup(tls, _db, _pWhere, int32(0))
_pFrom = _sqlite3SrcListAppend(tls, _db, nil, nil, nil)
if _pFrom != nil {
func() {
- if (_pFrom.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104736), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MaterializeViewØ00__func__Ø000))), unsafe.Pointer(str(115746)))
+ if _pFrom.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104736), unsafe.Pointer(&_sqlite3MaterializeViewØ00__func__Ø000), unsafe.Pointer(str(115774)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pFrom.X2))))) + 68*uintptr(i32(0)))).X2))) = _sqlite3DbStrDup(tls, _db, _pView.X0)
- *(**int8)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pFrom.X2))))) + 68*uintptr(i32(0)))).X1))) = _sqlite3DbStrDup(tls, _db, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0)
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pFrom.Xa)), 0).XzName = _sqlite3DbStrDup(tls, _db, _pView.XzName)
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pFrom.Xa)), 0).XzDatabase = _sqlite3DbStrDup(tls, _db, elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName)
func() {
- if (*XExpr)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pFrom.X2)))))+68*uintptr(i32(0)))).X12) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104739), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MaterializeViewØ00__func__Ø000))), unsafe.Pointer(str(115761)))
+ if (*XExpr)(elem6((*TSrcList_item)(unsafe.Pointer(&_pFrom.Xa)), 0).XpOn) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104739), unsafe.Pointer(&_sqlite3MaterializeViewØ00__func__Ø000), unsafe.Pointer(str(115789)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XIdList)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pFrom.X2)))))+68*uintptr(i32(0)))).X13) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104740), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3MaterializeViewØ00__func__Ø000))), unsafe.Pointer(str(115780)))
+ if (*XIdList)(elem6((*TSrcList_item)(unsafe.Pointer(&_pFrom.Xa)), 0).XpUsing) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104740), unsafe.Pointer(&_sqlite3MaterializeViewØ00__func__Ø000), unsafe.Pointer(str(115808)))
crt.X__builtin_abort(tls)
}
}()
}
- _pSel = _sqlite3SelectNew(tls, _pParse, nil, _pFrom, _pWhere, nil, nil, nil, uint32(i32(131072)), nil, nil)
- _sqlite3SelectDestInit(tls, &_dest, i32(12), _iCur)
+ _pSel = _sqlite3SelectNew(tls, _pParse, nil, _pFrom, _pWhere, nil, nil, nil, uint32(131072), nil, nil)
+ _sqlite3SelectDestInit(tls, &_dest, int32(12), _iCur)
_sqlite3Select(tls, _pParse, _pSel, &_dest)
_sqlite3SelectDelete(tls, _db, _pSel)
- _ = _dest
}
var _sqlite3MaterializeViewØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3MaterializeViewØ00__func__Ø000[0], str(115802), 23)
+ crt.Xstrncpy(nil, &_sqlite3MaterializeViewØ00__func__Ø000[0], str(115830), 23)
}
-// Allocate a new Select structure and return a pointer to that
-// structure.
+// C comment
+// /*
+// ** Allocate a new Select structure and return a pointer to that
+// ** structure.
+// */
func _sqlite3SelectNew(tls *crt.TLS, _pParse *XParse, _pEList *XExprList, _pSrc *XSrcList, _pWhere *XExpr, _pGroupBy *XExprList, _pHaving *XExpr, _pOrderBy *XExprList, _selFlags uint32, _pLimit *XExpr, _pOffset *XExpr) (r0 *XSelect) {
var _standin XSelect
var _pNew *XSelect
- _pNew = (*XSelect)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.X0), uint64(u32(80))))
+ _pNew = (*XSelect)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.Xdb), uint64(80)))
if _pNew == nil {
func() {
- if ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116638), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectNewØ00__func__Ø000))), unsafe.Pointer(str(42486)))
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116638), unsafe.Pointer(&_sqlite3SelectNewØ00__func__Ø000), unsafe.Pointer(str(42441)))
crt.X__builtin_abort(tls)
}
}()
_pNew = &_standin
}
if _pEList == nil {
- _pEList = _sqlite3ExprListAppend(tls, _pParse, nil, _sqlite3Expr(tls, (*Xsqlite3)(_pParse.X0), i32(161), nil))
- }
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X0))))) = _pEList
- *(*uint8)(unsafe.Pointer(&(_pNew.X1))) = uint8(i32(119))
- *(*uint32)(unsafe.Pointer(&(_pNew.X3))) = _selFlags
- *(*int32)(unsafe.Pointer(&(_pNew.X4))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_pNew.X5))) = i32(0)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int8)(unsafe.Pointer(&(_pNew.X6))))) + 1*uintptr(i32(0)))) = int8(i32(0))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_pNew.X7))))) + 4*uintptr(i32(0)))) = i32(-1)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_pNew.X7))))) + 4*uintptr(i32(1)))) = i32(-1)
- *(*int16)(unsafe.Pointer(&(_pNew.X2))) = int16(i32(0))
+ _pEList = _sqlite3ExprListAppend(tls, _pParse, nil, _sqlite3Expr(tls, (*Xsqlite3)(_pParse.Xdb), int32(161), nil))
+ }
+ *(**XExprList)(unsafe.Pointer(&_pNew.XpEList)) = _pEList
+ _pNew.Xop = uint8(119)
+ _pNew.XselFlags = _selFlags
+ _pNew.XiLimit = int32(0)
+ _pNew.XiOffset = int32(0)
+ *elem1((*int8)(unsafe.Pointer(&_pNew.XzSelName)), 0) = 0
+ *elem8((*int32)(unsafe.Pointer(&_pNew.XaddrOpenEphm)), 0) = int32(-1)
+ *elem8((*int32)(unsafe.Pointer(&_pNew.XaddrOpenEphm)), uintptr(1)) = int32(-1)
+ _pNew.XnSelectRow = 0
if _pSrc == nil {
- _pSrc = (*XSrcList)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.X0), uint64(u32(76))))
+ _pSrc = (*XSrcList)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pParse.Xdb), uint64(76)))
}
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X8))))) = _pSrc
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X9))))) = _pWhere
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X10))))) = _pGroupBy
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X11))))) = _pHaving
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X12))))) = _pOrderBy
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X13))))) = nil
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X14))))) = nil
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X15))))) = _pLimit
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X16))))) = _pOffset
- *(**XWith)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X17))))) = nil
+ *(**XSrcList)(unsafe.Pointer(&_pNew.XpSrc)) = _pSrc
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpWhere)) = _pWhere
+ *(**XExprList)(unsafe.Pointer(&_pNew.XpGroupBy)) = _pGroupBy
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpHaving)) = _pHaving
+ *(**XExprList)(unsafe.Pointer(&_pNew.XpOrderBy)) = _pOrderBy
+ *(**XSelect)(unsafe.Pointer(&_pNew.XpPrior)) = nil
+ *(**XSelect)(unsafe.Pointer(&_pNew.XpNext)) = nil
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpLimit)) = _pLimit
+ *(**XExpr)(unsafe.Pointer(&_pNew.XpOffset)) = _pOffset
+ *(**XWith)(unsafe.Pointer(&_pNew.XpWith)) = nil
func() {
- if _pOffset != nil && _pLimit == nil && (_pParse.X16) <= i32(0) && int32((*Xsqlite3)(_pParse.X0).X17) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116666), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectNewØ00__func__Ø000))), unsafe.Pointer(str(115825)))
+ if _pOffset != nil && _pLimit == nil && _pParse.XnErr <= int32(0) && int32((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116666), unsafe.Pointer(&_sqlite3SelectNewØ00__func__Ø000), unsafe.Pointer(str(115853)))
crt.X__builtin_abort(tls)
}
}()
- if ((*Xsqlite3)(_pParse.X0).X17) != 0 {
- _clearSelect(tls, (*Xsqlite3)(_pParse.X0), _pNew, bool2int(_pNew != &_standin))
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) != 0 {
+ _clearSelect(tls, (*Xsqlite3)(_pParse.Xdb), _pNew, bool2int(_pNew != &_standin))
_pNew = nil
goto _11
}
func() {
- if (*XSrcList)(_pNew.X8) == nil && (_pParse.X16) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116671), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectNewØ00__func__Ø000))), unsafe.Pointer(str(115898)))
+ if (*XSrcList)(_pNew.XpSrc) == nil && _pParse.XnErr <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116671), unsafe.Pointer(&_sqlite3SelectNewØ00__func__Ø000), unsafe.Pointer(str(115926)))
crt.X__builtin_abort(tls)
}
}()
_11:
func() {
if _pNew == &_standin {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116673), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SelectNewØ00__func__Ø000))), unsafe.Pointer(str(115930)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116673), unsafe.Pointer(&_sqlite3SelectNewØ00__func__Ø000), unsafe.Pointer(str(115958)))
crt.X__builtin_abort(tls)
}
}()
@@ -96771,122 +97924,128 @@ _11:
var _sqlite3SelectNewØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SelectNewØ00__func__Ø000[0], str(115945), 17)
-}
-
-// Return ONEPASS_OFF (0) if an UPDATE or DELETE statement is unable to
-// operate directly on the rowis returned by a WHERE clause. Return
-// ONEPASS_SINGLE (1) if the statement can operation directly because only
-// a single row is to be changed. Return ONEPASS_MULTI (2) if the one-pass
-// optimization can be used on multiple
-//
-// If the ONEPASS optimization is used (if this routine returns true)
-// then also write the indices of open cursors used by ONEPASS
-// into aiCur[0] and aiCur[1]. iaCur[0] gets the cursor of the data
-// table and iaCur[1] gets the cursor used by an auxiliary index.
-// Either value may be -1, indicating that cursor is not used.
-// Any cursors returned will have been opened for writing.
-//
-// aiCur[0] and aiCur[1] both get -1 if the where-clause logic is
-// unable to use the ONEPASS optimization.
+ crt.Xstrncpy(nil, &_sqlite3SelectNewØ00__func__Ø000[0], str(115973), 17)
+}
+
+// C comment
+// /*
+// ** Return ONEPASS_OFF (0) if an UPDATE or DELETE statement is unable to
+// ** operate directly on the rowis returned by a WHERE clause. Return
+// ** ONEPASS_SINGLE (1) if the statement can operation directly because only
+// ** a single row is to be changed. Return ONEPASS_MULTI (2) if the one-pass
+// ** optimization can be used on multiple
+// **
+// ** If the ONEPASS optimization is used (if this routine returns true)
+// ** then also write the indices of open cursors used by ONEPASS
+// ** into aiCur[0] and aiCur[1]. iaCur[0] gets the cursor of the data
+// ** table and iaCur[1] gets the cursor used by an auxiliary index.
+// ** Either value may be -1, indicating that cursor is not used.
+// ** Any cursors returned will have been opened for writing.
+// **
+// ** aiCur[0] and aiCur[1] both get -1 if the where-clause logic is
+// ** unable to use the ONEPASS optimization.
+// */
func _sqlite3WhereOkOnePass(tls *crt.TLS, _pWInfo *XWhereInfo, _aiCur *int32) (r0 int32) {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_aiCur), (unsafe.Pointer)((*[2]int32)(unsafe.Pointer(&(_pWInfo.X6)))), u32(8))
- return int32(_pWInfo.X14)
-}
-
-// Allocate cursors for the pTab table and all its indices and generate
-// code to open and initialized those cursors.
-//
-// The cursor for the object that contains the complete data (normally
-// the table itself, but the PRIMARY KEY index in the case of a WITHOUT
-// ROWID table) is returned in *piDataCur. The first index cursor is
-// returned in *piIdxCur. The number of indices is returned.
-//
-// Use iBase as the first cursor (either the *piDataCur for rowid tables
-// or the first index for WITHOUT ROWID tables) if it is non-negative.
-// If iBase is negative, then allocate the next available cursor.
-//
-// For a rowid table, *piDataCur will be exactly one less than *piIdxCur.
-// For a WITHOUT ROWID table, *piDataCur will be somewhere in the range
-// of *piIdxCurs, depending on where the PRIMARY KEY index appears on the
-// pTab->pIndex list.
-//
-// If pTab is a virtual table, then this routine is a no-op and the
-// *piDataCur and *piIdxCur values are left uninitialized.
+ crt.Xmemcpy(tls, unsafe.Pointer(_aiCur), unsafe.Pointer(&_pWInfo.XaiCurOnePass), uint32(8))
+ return int32(_pWInfo.XeOnePass)
+}
+
+// C comment
+// /*
+// ** Allocate cursors for the pTab table and all its indices and generate
+// ** code to open and initialized those cursors.
+// **
+// ** The cursor for the object that contains the complete data (normally
+// ** the table itself, but the PRIMARY KEY index in the case of a WITHOUT
+// ** ROWID table) is returned in *piDataCur. The first index cursor is
+// ** returned in *piIdxCur. The number of indices is returned.
+// **
+// ** Use iBase as the first cursor (either the *piDataCur for rowid tables
+// ** or the first index for WITHOUT ROWID tables) if it is non-negative.
+// ** If iBase is negative, then allocate the next available cursor.
+// **
+// ** For a rowid table, *piDataCur will be exactly one less than *piIdxCur.
+// ** For a WITHOUT ROWID table, *piDataCur will be somewhere in the range
+// ** of *piIdxCurs, depending on where the PRIMARY KEY index appears on the
+// ** pTab->pIndex list.
+// **
+// ** If pTab is a virtual table, then this routine is a no-op and the
+// ** *piDataCur and *piIdxCur values are left uninitialized.
+// */
func _sqlite3OpenTableAndIndices(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _op int32, _p5 uint8, _iBase int32, _aToOpen *uint8, _piDataCur *int32, _piIdxCur *int32) (r0 int32) {
var _i, _iDb, _iDataCur, _4_iIdxCur int32
var _v *TVdbe
var _pIdx *XIndex
func() {
- if _op != i32(106) && _op != i32(107) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110658), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OpenTableAndIndicesØ00__func__Ø000))), unsafe.Pointer(str(115962)))
+ if _op != int32(106) && _op != int32(107) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110658), unsafe.Pointer(&_sqlite3OpenTableAndIndicesØ00__func__Ø000), unsafe.Pointer(str(115990)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op != i32(107) && int32(_p5) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110659), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OpenTableAndIndicesØ00__func__Ø000))), unsafe.Pointer(str(115998)))
+ if _op != int32(107) && int32(_p5) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110659), unsafe.Pointer(&_sqlite3OpenTableAndIndicesØ00__func__Ø000), unsafe.Pointer(str(116026)))
crt.X__builtin_abort(tls)
}
}()
- if (_pTab.X16) != 0 {
- return i32(0)
+ if _pTab.XnModuleArg != 0 {
+ return int32(0)
}
- _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTab.X20))
+ _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTab.XpSchema))
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110668), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OpenTableAndIndicesØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110668), unsafe.Pointer(&_sqlite3OpenTableAndIndicesØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
- if _iBase < i32(0) {
- _iBase = _pParse.X17
+ if _iBase < int32(0) {
+ _iBase = _pParse.XnTab
}
- _iDataCur = postInc1(&_iBase, int32(1))
+ _iDataCur = postInc2(&_iBase, 1)
if _piDataCur != nil {
*_piDataCur = _iDataCur
}
- if (((_pTab.X9) & uint32(i32(32))) == uint32(i32(0))) && ((_aToOpen == nil) || ((*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr(i32(0))))) != 0)) {
+ if ((_pTab.XtabFlags & uint32(32)) == (0)) && ((_aToOpen == nil) || ((*elem15(_aToOpen, 0)) != 0)) {
_sqlite3OpenTable(tls, _pParse, _iDataCur, _iDb, _pTab, _op)
goto _14
}
- _sqlite3TableLock(tls, _pParse, _iDb, _pTab.X7, uint8(bool2int(_op == i32(107))), _pTab.X0)
+ _sqlite3TableLock(tls, _pParse, _iDb, _pTab.Xtnum, uint8(bool2int(_op == int32(107))), _pTab.XzName)
_14:
if _piIdxCur != nil {
*_piIdxCur = _iBase
}
- *func() **XIndex { _i = i32(0); return &_pIdx }() = (*XIndex)(_pTab.X2)
+ *func() **XIndex { _i = int32(0); return &_pIdx }() = (*XIndex)(_pTab.XpIndex)
_16:
if _pIdx == nil {
goto _19
}
- _4_iIdxCur = postInc1(&_iBase, int32(1))
+ _4_iIdxCur = postInc2(&_iBase, 1)
func() {
- if (*XSchema)(_pIdx.X6) != (*XSchema)(_pTab.X20) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110680), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3OpenTableAndIndicesØ00__func__Ø000))), unsafe.Pointer(str(115137)))
+ if (*XSchema)(_pIdx.XpSchema) != (*XSchema)(_pTab.XpSchema) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110680), unsafe.Pointer(&_sqlite3OpenTableAndIndicesØ00__func__Ø000), unsafe.Pointer(str(115165)))
crt.X__builtin_abort(tls)
}
}()
- if int32((uint32(_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) != i32(2) || ((_pTab.X9)&uint32(i32(32))) == uint32(i32(0)) {
+ if int32((uint32(_pIdx.XidxType)<<30)>>30) != int32(2) || (_pTab.XtabFlags&uint32(32)) == (0) {
goto _23
}
if _piDataCur != nil {
*_piDataCur = _4_iIdxCur
}
- _p5 = uint8(i32(0))
+ _p5 = 0
_23:
- if (_aToOpen == nil) || ((*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr(_i+i32(1))))) != 0) {
- _sqlite3VdbeAddOp3(tls, _v, _op, _4_iIdxCur, _pIdx.X11, _iDb)
+ if (_aToOpen == nil) || ((*elem15(_aToOpen, uintptr(_i+int32(1)))) != 0) {
+ _sqlite3VdbeAddOp3(tls, _v, _op, _4_iIdxCur, _pIdx.Xtnum, _iDb)
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _pIdx)
_sqlite3VdbeChangeP5(tls, _v, uint16(_p5))
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_pIdx.X0))
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_pIdx.XzName))
}
- *func() *int32 { _pIdx = (*XIndex)(_pIdx.X5); return &_i }() += 1
+ *func() *int32 { _pIdx = (*XIndex)(_pIdx.XpNext); return &_i }() += 1
goto _16
_19:
- if _iBase > (_pParse.X17) {
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) = _iBase
+ if _iBase > _pParse.XnTab {
+ _pParse.XnTab = _iBase
}
return _i
}
@@ -96894,217 +98053,217 @@ _19:
var _sqlite3OpenTableAndIndicesØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3OpenTableAndIndicesØ00__func__Ø000[0], str(116024), 27)
+ crt.Xstrncpy(nil, &_sqlite3OpenTableAndIndicesØ00__func__Ø000[0], str(116052), 27)
}
-// Make sure virtual table pTab is contained in the pParse->apVirtualLock[]
-// array so that an OP_VBegin will get generated for it. Add pTab to the
-// array if it is missing. If pTab is already in the array, this routine
-// is a no-op.
+// C comment
+// /*
+// ** Make sure virtual table pTab is contained in the pParse->apVirtualLock[]
+// ** array so that an OP_VBegin will get generated for it. Add pTab to the
+// ** array if it is missing. If pTab is already in the array, this routine
+// ** is a no-op.
+// */
func _sqlite3VtabMakeWritable(tls *crt.TLS, _pParse *XParse, _pTab *XTable) {
var _i, _n int32
var _pToplevel *XParse
var _apVtabLock **XTable
_pToplevel = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
func() {
- if (_pTab.X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126093), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabMakeWritableØ00__func__Ø000))), unsafe.Pointer(str(24529)))
+ if _pTab.XnModuleArg == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126093), unsafe.Pointer(&_sqlite3VtabMakeWritableØ00__func__Ø000), unsafe.Pointer(str(24484)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_4:
- if _i >= (_pToplevel.X56) {
+ if _i >= _pToplevel.XnVtabLock {
goto _7
}
- if _pTab == (*(**XTable)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pToplevel.X67)) + 4*uintptr(_i)))) {
+ if _pTab == (*elem59((**XTable)(unsafe.Pointer(_pToplevel.XapVtabLock)), uintptr(_i))) {
return
}
_i += 1
goto _4
_7:
- _n = int32(uint32((_pToplevel.X56)+i32(1)) * u32(4))
- _apVtabLock = (**XTable)(Xsqlite3_realloc64(tls, (unsafe.Pointer)(_pToplevel.X67), uint64(_n)))
+ _n = int32(uint32(_pToplevel.XnVtabLock+int32(1)) * uint32(4))
+ _apVtabLock = (**XTable)(Xsqlite3_realloc64(tls, unsafe.Pointer(_pToplevel.XapVtabLock), uint64(_n)))
if _apVtabLock != nil {
- *(***XTable)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_pToplevel.X67))))) = _apVtabLock
- *(**XTable)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pToplevel.X67)) + 4*uintptr(postInc1((*int32)(unsafe.Pointer(&(_pToplevel.X56))), int32(1))))) = _pTab
+ *(***XTable)(unsafe.Pointer(&_pToplevel.XapVtabLock)) = _apVtabLock
+ *elem59((**XTable)(unsafe.Pointer(_pToplevel.XapVtabLock)), uintptr(postInc2(&_pToplevel.XnVtabLock, 1))) = _pTab
goto _10
}
- _sqlite3OomFault(tls, (*Xsqlite3)(_pToplevel.X0))
+ _sqlite3OomFault(tls, (*Xsqlite3)(_pToplevel.Xdb))
_10:
}
var _sqlite3VtabMakeWritableØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabMakeWritableØ00__func__Ø000[0], str(116051), 24)
-}
-
-// This routine generates VDBE code that causes a single row of a
-// single table to be deleted. Both the original table entry and
-// all indices are removed.
-//
-// Preconditions:
-//
-// 1. iDataCur is an open cursor on the btree that is the canonical data
-// store for the table. (This will be either the table itself,
-// in the case of a rowid table, or the PRIMARY KEY index in the case
-// of a WITHOUT ROWID table.)
-//
-// 2. Read/write cursors for all indices of pTab must be open as
-// cursor number iIdxCur+i for the i-th index.
-//
-// 3. The primary key for the row to be deleted must be stored in a
-// sequence of nPk memory cells starting at iPk. If nPk==0 that means
-// that a search record formed from OP_MakeRecord is contained in the
-// single memory location iPk.
-//
-// eMode:
-// Parameter eMode may be passed either ONEPASS_OFF (0), ONEPASS_SINGLE, or
-// ONEPASS_MULTI. If eMode is not ONEPASS_OFF, then the cursor
-// iDataCur already points to the row to delete. If eMode is ONEPASS_OFF
-// then this function must seek iDataCur to the entry identified by iPk
-// and nPk before reading from it.
-//
-// If eMode is ONEPASS_MULTI, then this call is being made as part
-// of a ONEPASS delete that affects multiple rows. In this case, if
-// iIdxNoSeek is a valid cursor number (>=0) and is not the same as
-// iDataCur, then its position should be preserved following the delete
-// operation. Or, if iIdxNoSeek is not a valid cursor number, the
-// position of iDataCur should be preserved instead.
-//
-// iIdxNoSeek:
-// If iIdxNoSeek is a valid cursor number (>=0) not equal to iDataCur,
-// then it identifies an index cursor (from within array of cursors
-// starting at iIdxCur) that already points to the index entry to be deleted.
-// Except, this optimization is disabled if there are BEFORE triggers since
-// the trigger body might have moved the cursor.
+ crt.Xstrncpy(nil, &_sqlite3VtabMakeWritableØ00__func__Ø000[0], str(116079), 24)
+}
+
+// C comment
+// /*
+// ** This routine generates VDBE code that causes a single row of a
+// ** single table to be deleted. Both the original table entry and
+// ** all indices are removed.
+// **
+// ** Preconditions:
+// **
+// ** 1. iDataCur is an open cursor on the btree that is the canonical data
+// ** store for the table. (This will be either the table itself,
+// ** in the case of a rowid table, or the PRIMARY KEY index in the case
+// ** of a WITHOUT ROWID table.)
+// **
+// ** 2. Read/write cursors for all indices of pTab must be open as
+// ** cursor number iIdxCur+i for the i-th index.
+// **
+// ** 3. The primary key for the row to be deleted must be stored in a
+// ** sequence of nPk memory cells starting at iPk. If nPk==0 that means
+// ** that a search record formed from OP_MakeRecord is contained in the
+// ** single memory location iPk.
+// **
+// ** eMode:
+// ** Parameter eMode may be passed either ONEPASS_OFF (0), ONEPASS_SINGLE, or
+// ** ONEPASS_MULTI. If eMode is not ONEPASS_OFF, then the cursor
+// ** iDataCur already points to the row to delete. If eMode is ONEPASS_OFF
+// ** then this function must seek iDataCur to the entry identified by iPk
+// ** and nPk before reading from it.
+// **
+// ** If eMode is ONEPASS_MULTI, then this call is being made as part
+// ** of a ONEPASS delete that affects multiple rows. In this case, if
+// ** iIdxNoSeek is a valid cursor number (>=0) and is not the same as
+// ** iDataCur, then its position should be preserved following the delete
+// ** operation. Or, if iIdxNoSeek is not a valid cursor number, the
+// ** position of iDataCur should be preserved instead.
+// **
+// ** iIdxNoSeek:
+// ** If iIdxNoSeek is a valid cursor number (>=0) not equal to iDataCur,
+// ** then it identifies an index cursor (from within array of cursors
+// ** starting at iIdxCur) that already points to the index entry to be deleted.
+// ** Except, this optimization is disabled if there are BEFORE triggers since
+// ** the trigger body might have moved the cursor.
+// */
func _sqlite3GenerateRowDelete(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pTrigger *XTrigger, _iDataCur int32, _iIdxCur int32, _iPk int32, _nPk int16, _count uint8, _onconf uint8, _eMode uint8, _iIdxNoSeek int32) {
var _iOld, _iLabel, _2_iCol, _2_addrStart int32
var _2_mask uint32
var _opSeek, _6_p5 uint8
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
- _iOld = i32(0)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _iOld = int32(0)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105274), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateRowDeleteØ00__func__Ø000))), unsafe.Pointer(str(41861)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105274), unsafe.Pointer(&_sqlite3GenerateRowDeleteØ00__func__Ø000), unsafe.Pointer(str(41816)))
crt.X__builtin_abort(tls)
}
}()
_iLabel = _sqlite3VdbeMakeLabel(tls, _v)
_opSeek = uint8(func() int32 {
- if ((_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
- return i32(32)
+ if (_pTab.XtabFlags & uint32(32)) == (0) {
+ return int32(32)
}
- return i32(29)
+ return int32(29)
}())
- if int32(_eMode) == i32(0) {
+ if int32(_eMode) == int32(0) {
_sqlite3VdbeAddOp4Int(tls, _v, int32(_opSeek), _iDataCur, _iLabel, _iPk, int32(_nPk))
}
- if _sqlite3FkRequired(tls, _pParse, _pTab, nil, i32(0)) == 0 && _pTrigger == nil {
+ if _sqlite3FkRequired(tls, _pParse, _pTab, nil, int32(0)) == 0 && _pTrigger == nil {
goto _6
}
- _2_mask = _sqlite3TriggerColmask(tls, _pParse, _pTrigger, nil, i32(0), i32(3), _pTab, int32(_onconf))
- {
- p := &_2_mask
- *p = (*p) | _sqlite3FkOldmask(tls, _pParse, _pTab)
- sink5(*p)
- }
- _iOld = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + (i32(1) + int32(_pTab.X11))
- sink1(*p)
- }
- _sqlite3VdbeAddOp2(tls, _v, i32(64), _iPk, _iOld)
- _2_iCol = i32(0)
+ _2_mask = _sqlite3TriggerColmask(tls, _pParse, _pTrigger, nil, int32(0), int32(3), _pTab, int32(_onconf))
+ _2_mask |= _sqlite3FkOldmask(tls, _pParse, _pTab)
+ _iOld = _pParse.XnMem + int32(1)
+ _pParse.XnMem += int32(1) + int32(_pTab.XnCol)
+ _sqlite3VdbeAddOp2(tls, _v, int32(64), _iPk, _iOld)
+ _2_iCol = int32(0)
_7:
- if _2_iCol >= int32(_pTab.X11) {
+ if _2_iCol >= int32(_pTab.XnCol) {
goto _10
}
- if (_2_mask == u32(4294967295)) || ((_2_iCol <= i32(31)) && ((_2_mask & (u32(1) << uint(_2_iCol))) != uint32(i32(0)))) {
- _sqlite3ExprCodeGetColumnOfTable(tls, _v, _pTab, _iDataCur, _2_iCol, (_iOld+_2_iCol)+i32(1))
+ if (_2_mask == uint32(4294967295)) || ((_2_iCol <= int32(31)) && ((_2_mask & (uint32(1) << uint(_2_iCol))) != (0))) {
+ _sqlite3ExprCodeGetColumnOfTable(tls, _v, _pTab, _iDataCur, _2_iCol, (_iOld+_2_iCol)+int32(1))
}
_2_iCol += 1
goto _7
_10:
_2_addrStart = _sqlite3VdbeCurrentAddr(tls, _v)
- _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, i32(109), nil, i32(1), _pTab, _iOld, int32(_onconf), _iLabel)
+ _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, int32(109), nil, int32(1), _pTab, _iOld, int32(_onconf), _iLabel)
if _2_addrStart < _sqlite3VdbeCurrentAddr(tls, _v) {
_sqlite3VdbeAddOp4Int(tls, _v, int32(_opSeek), _iDataCur, _iLabel, _iPk, int32(_nPk))
- _iIdxNoSeek = i32(-1)
+ _iIdxNoSeek = int32(-1)
}
- _sqlite3FkCheck(tls, _pParse, _pTab, _iOld, i32(0), nil, i32(0))
+ _sqlite3FkCheck(tls, _pParse, _pTab, _iOld, int32(0), nil, int32(0))
_6:
- if (*XSelect)(_pTab.X3) != nil {
+ if (*XSelect)(_pTab.XpSelect) != nil {
goto _15
}
- _6_p5 = u8(0)
+ _6_p5 = uint8(0)
_sqlite3GenerateRowIndexDelete(tls, _pParse, _pTab, _iDataCur, _iIdxCur, nil, _iIdxNoSeek)
- _sqlite3VdbeAddOp2(tls, _v, i32(120), _iDataCur, func() int32 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(120), _iDataCur, func() int32 {
if _count != 0 {
- return i32(1)
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
- if int32(_pParse.X6) == i32(0) {
- _sqlite3VdbeAppendP4(tls, _v, (unsafe.Pointer)(_pTab), i32(-15))
+ if int32(_pParse.Xnested) == int32(0) {
+ _sqlite3VdbeAppendP4(tls, _v, unsafe.Pointer(_pTab), int32(-15))
}
- if int32(_eMode) != i32(0) {
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(4)))
+ if int32(_eMode) != int32(0) {
+ _sqlite3VdbeChangeP5(tls, _v, uint16(4))
}
- if (_iIdxNoSeek >= i32(0)) && (_iIdxNoSeek != _iDataCur) {
- _sqlite3VdbeAddOp1(tls, _v, i32(120), _iIdxNoSeek)
+ if (_iIdxNoSeek >= int32(0)) && (_iIdxNoSeek != _iDataCur) {
+ _sqlite3VdbeAddOp1(tls, _v, int32(120), _iIdxNoSeek)
}
- if int32(_eMode) == i32(2) {
+ if int32(_eMode) == int32(2) {
{
p := &_6_p5
- *p = uint8(int32(*p) | i32(2))
- sink2(*p)
+ *p = uint8(int32(*p) | int32(2))
}
}
_sqlite3VdbeChangeP5(tls, _v, uint16(_6_p5))
_15:
- _sqlite3FkActions(tls, _pParse, _pTab, nil, _iOld, nil, i32(0))
- _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, i32(109), nil, i32(2), _pTab, _iOld, int32(_onconf), _iLabel)
+ _sqlite3FkActions(tls, _pParse, _pTab, nil, _iOld, nil, int32(0))
+ _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, int32(109), nil, int32(2), _pTab, _iOld, int32(_onconf), _iLabel)
_sqlite3VdbeResolveLabel(tls, _v, _iLabel)
}
var _sqlite3GenerateRowDeleteØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3GenerateRowDeleteØ00__func__Ø000[0], str(116075), 25)
-}
-
-// Triggers may access values stored in the old.* or new.* pseudo-table.
-// This function returns a 32-bit bitmask indicating which columns of the
-// old.* or new.* tables actually are used by triggers. This information
-// may be used by the caller, for example, to avoid having to load the entire
-// old.* record into memory when executing an UPDATE or DELETE command.
-//
-// Bit 0 of the returned mask is set if the left-most column of the
-// table may be accessed using an [old|new].<col> reference. Bit 1 is set if
-// the second leftmost column value is required, and so on. If there
-// are more than 32 columns in the table, and at least one of the columns
-// with an index greater than 32 may be accessed, 0xffffffff is returned.
-//
-// It is not possible to determine if the old.rowid or new.rowid column is
-// accessed by triggers. The caller must always assume that it is.
-//
-// Parameter isNew must be either 1 or 0. If it is 0, then the mask returned
-// applies to the old.* table. If 1, the new.* table.
-//
-// Parameter tr_tm must be a mask with one or both of the TRIGGER_BEFORE
-// and TRIGGER_AFTER bits set. Values accessed by BEFORE triggers are only
-// included in the returned mask if the TRIGGER_BEFORE bit is set in the
-// tr_tm parameter. Similarly, values accessed by AFTER triggers are only
-// included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm.
+ crt.Xstrncpy(nil, &_sqlite3GenerateRowDeleteØ00__func__Ø000[0], str(116103), 25)
+}
+
+// C comment
+// /*
+// ** Triggers may access values stored in the old.* or new.* pseudo-table.
+// ** This function returns a 32-bit bitmask indicating which columns of the
+// ** old.* or new.* tables actually are used by triggers. This information
+// ** may be used by the caller, for example, to avoid having to load the entire
+// ** old.* record into memory when executing an UPDATE or DELETE command.
+// **
+// ** Bit 0 of the returned mask is set if the left-most column of the
+// ** table may be accessed using an [old|new].<col> reference. Bit 1 is set if
+// ** the second leftmost column value is required, and so on. If there
+// ** are more than 32 columns in the table, and at least one of the columns
+// ** with an index greater than 32 may be accessed, 0xffffffff is returned.
+// **
+// ** It is not possible to determine if the old.rowid or new.rowid column is
+// ** accessed by triggers. The caller must always assume that it is.
+// **
+// ** Parameter isNew must be either 1 or 0. If it is 0, then the mask returned
+// ** applies to the old.* table. If 1, the new.* table.
+// **
+// ** Parameter tr_tm must be a mask with one or both of the TRIGGER_BEFORE
+// ** and TRIGGER_AFTER bits set. Values accessed by BEFORE triggers are only
+// ** included in the returned mask if the TRIGGER_BEFORE bit is set in the
+// ** tr_tm parameter. Similarly, values accessed by AFTER triggers are only
+// ** included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm.
+// */
func _sqlite3TriggerColmask(tls *crt.TLS, _pParse *XParse, _pTrigger *XTrigger, _pChanges *XExprList, _isNew int32, _tr_tm int32, _pTab *XTable, _orconf int32) (r0 uint32) {
var _op int32
var _mask uint32
@@ -97112,14 +98271,14 @@ func _sqlite3TriggerColmask(tls *crt.TLS, _pParse *XParse, _pTrigger *XTrigger,
var _2_pPrg *XTriggerPrg
_op = func() int32 {
if _pChanges != nil {
- return i32(110)
+ return int32(110)
}
- return i32(109)
+ return int32(109)
}()
- _mask = u32(0)
+ _mask = uint32(0)
func() {
- if _isNew != i32(1) && _isNew != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123727), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TriggerColmaskØ00__func__Ø000))), unsafe.Pointer(str(116100)))
+ if _isNew != int32(1) && _isNew != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123727), unsafe.Pointer(&_sqlite3TriggerColmaskØ00__func__Ø000), unsafe.Pointer(str(116128)))
crt.X__builtin_abort(tls)
}
}()
@@ -97128,19 +98287,15 @@ _5:
if _p == nil {
goto _8
}
- if int32(_p.X2) != _op || (_tr_tm&int32(_p.X3)) == 0 || _checkColumnOverlap(tls, (*XIdList)(_p.X5), _pChanges) == 0 {
+ if int32(_p.Xop) != _op || (_tr_tm&int32(_p.Xtr_tm)) == 0 || _checkColumnOverlap(tls, (*XIdList)(_p.XpColumns), _pChanges) == 0 {
goto _11
}
_2_pPrg = _getRowTrigger(tls, _pParse, _p, _pTab, _orconf)
if _2_pPrg != nil {
- {
- p := &_mask
- *p = (*p) | (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_2_pPrg.X4))))) + 4*uintptr(_isNew))))
- sink5(*p)
- }
+ _mask |= *elem7((*uint32)(unsafe.Pointer(&_2_pPrg.XaColmask)), uintptr(_isNew))
}
_11:
- _p = (*XTrigger)(_p.X9)
+ _p = (*XTrigger)(_p.XpNext)
goto _5
_8:
return _mask
@@ -97149,34 +98304,37 @@ _8:
var _sqlite3TriggerColmaskØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TriggerColmaskØ00__func__Ø000[0], str(116121), 22)
+ crt.Xstrncpy(nil, &_sqlite3TriggerColmaskØ00__func__Ø000[0], str(116149), 22)
}
-// Return a pointer to a TriggerPrg object containing the sub-program for
-// trigger pTrigger with default ON CONFLICT algorithm orconf. If no such
-// TriggerPrg object exists, a new object is allocated and populated before
-// being returned.
+// C comment
+// /*
+// ** Return a pointer to a TriggerPrg object containing the sub-program for
+// ** trigger pTrigger with default ON CONFLICT algorithm orconf. If no such
+// ** TriggerPrg object exists, a new object is allocated and populated before
+// ** being returned.
+// */
func _getRowTrigger(tls *crt.TLS, _pParse *XParse, _pTrigger *XTrigger, _pTab *XTable, _orconf int32) (r0 *XTriggerPrg) {
var _pRoot *XParse
var _pPrg *XTriggerPrg
_pRoot = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
func() {
- if (_pTrigger.X0) != nil && _pTab != _tableOfTrigger(tls, _pTrigger) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123555), unsafe.Pointer((*int8)(unsafe.Pointer(&_getRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(116143)))
+ if _pTrigger.XzName != nil && _pTab != _tableOfTrigger(tls, _pTrigger) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123555), unsafe.Pointer(&_getRowTriggerØ00__func__Ø000), unsafe.Pointer(str(116171)))
crt.X__builtin_abort(tls)
}
}()
- _pPrg = (*XTriggerPrg)(_pRoot.X69)
+ _pPrg = (*XTriggerPrg)(_pRoot.XpTriggerPrg)
_5:
- if _pPrg == nil || (*XTrigger)(_pPrg.X0) == _pTrigger && (_pPrg.X3) == _orconf {
+ if _pPrg == nil || (*XTrigger)(_pPrg.XpTrigger) == _pTrigger && _pPrg.Xorconf == _orconf {
goto _10
}
- _pPrg = (*XTriggerPrg)(_pPrg.X1)
+ _pPrg = (*XTriggerPrg)(_pPrg.XpNext)
goto _5
_10:
if _pPrg == nil {
@@ -97188,11 +98346,14 @@ _10:
var _getRowTriggerØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_getRowTriggerØ00__func__Ø000[0], str(116196), 14)
+ crt.Xstrncpy(nil, &_getRowTriggerØ00__func__Ø000[0], str(116224), 14)
}
-// Create and populate a new TriggerPrg object with a sub-program
-// implementing trigger pTrigger with ON CONFLICT policy orconf.
+// C comment
+// /*
+// ** Create and populate a new TriggerPrg object with a sub-program
+// ** implementing trigger pTrigger with ON CONFLICT policy orconf.
+// */
func _codeRowTrigger(tls *crt.TLS, _pParse *XParse, _pTrigger *XTrigger, _pTab *XTable, _orconf int32) (r0 *XTriggerPrg) {
var _iEndTrigger int32
var _db *Xsqlite3
@@ -97203,208 +98364,214 @@ func _codeRowTrigger(tls *crt.TLS, _pParse *XParse, _pTrigger *XTrigger, _pTab *
var _sNC XNameContext
var _pPrg *XTriggerPrg
_pTop = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pWhen = nil
_pProgram = nil
- _iEndTrigger = i32(0)
+ _iEndTrigger = int32(0)
func() {
- if (_pTrigger.X0) != nil && _pTab != _tableOfTrigger(tls, _pTrigger) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123449), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(116143)))
+ if _pTrigger.XzName != nil && _pTab != _tableOfTrigger(tls, _pTrigger) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123449), unsafe.Pointer(&_codeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(116171)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*TVdbe)(_pTop.X2) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123450), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(116210)))
+ if _pTop.XpVdbe == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123450), unsafe.Pointer(&_codeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(116238)))
crt.X__builtin_abort(tls)
}
}()
- _pPrg = (*XTriggerPrg)(_sqlite3DbMallocZero(tls, _db, uint64(u32(24))))
+ _pPrg = (*XTriggerPrg)(_sqlite3DbMallocZero(tls, _db, uint64(24)))
if _pPrg == nil {
return nil
}
- *(**XTriggerPrg)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPrg.X1))))) = (*XTriggerPrg)(_pTop.X69)
- *(**XTriggerPrg)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTop.X69))))) = _pPrg
- *(**XSubProgram)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPrg.X2))))) = store75(&_pProgram, (*XSubProgram)(_sqlite3DbMallocZero(tls, _db, uint64(u32(28)))))
+ *(**XTriggerPrg)(unsafe.Pointer(&_pPrg.XpNext)) = (*XTriggerPrg)(_pTop.XpTriggerPrg)
+ *(**XTriggerPrg)(unsafe.Pointer(&_pTop.XpTriggerPrg)) = _pPrg
+ *(**XSubProgram)(unsafe.Pointer(&_pPrg.XpProgram)) = store119(&_pProgram, (*XSubProgram)(_sqlite3DbMallocZero(tls, _db, uint64(28))))
if _pProgram == nil {
return nil
}
- _sqlite3VdbeLinkSubProgram(tls, (*TVdbe)(_pTop.X2), _pProgram)
- *(**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pPrg.X0))))) = _pTrigger
- *(*int32)(unsafe.Pointer(&(_pPrg.X3))) = _orconf
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_pPrg.X4))))) + 4*uintptr(i32(0)))) = u32(4294967295)
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_pPrg.X4))))) + 4*uintptr(i32(1)))) = u32(4294967295)
- _pSubParse = (*XParse)(_sqlite3DbMallocZero(tls, _db, uint64(u32(484))))
+ _sqlite3VdbeLinkSubProgram(tls, (*TVdbe)(_pTop.XpVdbe), _pProgram)
+ *(**XTrigger)(unsafe.Pointer(&_pPrg.XpTrigger)) = _pTrigger
+ _pPrg.Xorconf = _orconf
+ *elem7((*uint32)(unsafe.Pointer(&_pPrg.XaColmask)), 0) = uint32(4294967295)
+ *elem7((*uint32)(unsafe.Pointer(&_pPrg.XaColmask)), uintptr(1)) = uint32(4294967295)
+ _pSubParse = (*XParse)(_sqlite3DbMallocZero(tls, _db, uint64(484)))
if _pSubParse == nil {
return nil
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_sNC), i32(0), u32(32))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X0))))) = _pSubParse
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSubParse.X0))))) = _db
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSubParse.X40))))) = _pTab
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSubParse.X39))))) = _pTop
- *(**int8)(unsafe.Pointer(&(_pSubParse.X65))) = _pTrigger.X0
- *(*uint8)(unsafe.Pointer(&(_pSubParse.X45))) = _pTrigger.X2
- *(*uint32)(unsafe.Pointer(&(_pSubParse.X42))) = _pParse.X42
+ crt.Xmemset(tls, unsafe.Pointer(&_sNC), int32(0), uint32(32))
+ *(**XParse)(unsafe.Pointer(&_sNC.XpParse)) = _pSubParse
+ *(**Xsqlite3)(unsafe.Pointer(&_pSubParse.Xdb)) = _db
+ *(**XTable)(unsafe.Pointer(&_pSubParse.XpTriggerTab)) = _pTab
+ *(**XParse)(unsafe.Pointer(&_pSubParse.XpToplevel)) = _pTop
+ _pSubParse.XzAuthContext = _pTrigger.XzName
+ _pSubParse.XeTriggerOp = _pTrigger.Xop
+ _pSubParse.XnQueryLoop = _pParse.XnQueryLoop
_v = _sqlite3GetVdbe(tls, _pSubParse)
if _v == nil {
goto _10
}
- _sqlite3VdbeComment(tls, _v, str(116222), unsafe.Pointer(_pTrigger.X0), unsafe.Pointer(_onErrorText(tls, _orconf)), unsafe.Pointer(func() *int8 {
- if int32(_pTrigger.X3) == i32(1) {
- return str(25167)
+ _sqlite3VdbeComment(tls, _v, str(116250), unsafe.Pointer(_pTrigger.XzName), unsafe.Pointer(_onErrorText(tls, _orconf)), unsafe.Pointer(func() *int8 {
+ if int32(_pTrigger.Xtr_tm) == int32(1) {
+ return str(25122)
}
- return str(25142)
+ return str(25097)
}()), unsafe.Pointer(func() *int8 {
- if int32(_pTrigger.X2) == i32(110) {
- return str(25640)
+ if int32(_pTrigger.Xop) == int32(110) {
+ return str(25595)
}
- return str(0)
+ return str(284)
}()), unsafe.Pointer(func() *int8 {
- if int32(_pTrigger.X2) == i32(108) {
- return str(25626)
+ if int32(_pTrigger.Xop) == int32(108) {
+ return str(25581)
}
- return str(0)
+ return str(284)
}()), unsafe.Pointer(func() *int8 {
- if int32(_pTrigger.X2) == i32(109) {
- return str(25633)
+ if int32(_pTrigger.Xop) == int32(109) {
+ return str(25588)
}
- return str(0)
- }()), unsafe.Pointer(_pTab.X0))
- _sqlite3VdbeChangeP4(tls, _v, i32(-1), _sqlite3MPrintf(tls, _db, str(116253), unsafe.Pointer(_pTrigger.X0)), i32(-1))
- if (*XExpr)(_pTrigger.X4) == nil {
+ return str(284)
+ }()), unsafe.Pointer(_pTab.XzName))
+ _sqlite3VdbeChangeP4(tls, _v, int32(-1), _sqlite3MPrintf(tls, _db, str(116281), unsafe.Pointer(_pTrigger.XzName)), int32(-1))
+ if _pTrigger.XpWhen == nil {
goto _19
}
- _pWhen = _sqlite3ExprDup(tls, _db, (*XExpr)(_pTrigger.X4), i32(0))
- if (i32(0) == _sqlite3ResolveExprNames(tls, &_sNC, _pWhen)) && (int32(_db.X17) == i32(0)) {
+ _pWhen = _sqlite3ExprDup(tls, _db, (*XExpr)(_pTrigger.XpWhen), int32(0))
+ if (int32(0) == _sqlite3ResolveExprNames(tls, &_sNC, _pWhen)) && (int32(_db.XmallocFailed) == int32(0)) {
_iEndTrigger = _sqlite3VdbeMakeLabel(tls, _v)
- _sqlite3ExprIfFalse(tls, _pSubParse, _pWhen, _iEndTrigger, i32(16))
+ _sqlite3ExprIfFalse(tls, _pSubParse, _pWhen, _iEndTrigger, int32(16))
}
_sqlite3ExprDelete(tls, _db, _pWhen)
_19:
- _codeTriggerProgram(tls, _pSubParse, (*XTriggerStep)(_pTrigger.X8), _orconf)
+ _codeTriggerProgram(tls, _pSubParse, (*XTriggerStep)(_pTrigger.Xstep_list), _orconf)
if _iEndTrigger != 0 {
_sqlite3VdbeResolveLabel(tls, _v, _iEndTrigger)
}
- _sqlite3VdbeAddOp0(tls, _v, i32(55))
- _sqlite3VdbeComment(tls, _v, str(116267), unsafe.Pointer(_pTrigger.X0), unsafe.Pointer(_onErrorText(tls, _orconf)))
+ _sqlite3VdbeAddOp0(tls, _v, int32(55))
+ _sqlite3VdbeComment(tls, _v, str(116295), unsafe.Pointer(_pTrigger.XzName), unsafe.Pointer(_onErrorText(tls, _orconf)))
_transferParseError(tls, _pParse, _pSubParse)
- if int32(_db.X17) == i32(0) {
- *(**XVdbeOp)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pProgram.X0))))) = _sqlite3VdbeTakeOpArray(tls, _v, (*int32)(unsafe.Pointer(&(_pProgram.X1))), (*int32)(unsafe.Pointer(&(_pTop.X33))))
- }
- *(*int32)(unsafe.Pointer(&(_pProgram.X2))) = _pSubParse.X18
- *(*int32)(unsafe.Pointer(&(_pProgram.X3))) = _pSubParse.X17
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pProgram.X5))) = (unsafe.Pointer)(_pTrigger)
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_pPrg.X4))))) + 4*uintptr(i32(0)))) = _pSubParse.X43
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_pPrg.X4))))) + 4*uintptr(i32(1)))) = _pSubParse.X44
+ if int32(_db.XmallocFailed) == int32(0) {
+ *(**XVdbeOp)(unsafe.Pointer(&_pProgram.XaOp)) = _sqlite3VdbeTakeOpArray(tls, _v, &_pProgram.XnOp, &_pTop.XnMaxArg)
+ }
+ _pProgram.XnMem = _pSubParse.XnMem
+ _pProgram.XnCsr = _pSubParse.XnTab
+ _pProgram.Xtoken = unsafe.Pointer(_pTrigger)
+ *elem7((*uint32)(unsafe.Pointer(&_pPrg.XaColmask)), 0) = _pSubParse.Xoldmask
+ *elem7((*uint32)(unsafe.Pointer(&_pPrg.XaColmask)), uintptr(1)) = _pSubParse.Xnewmask
_sqlite3VdbeDelete(tls, _v)
_10:
func() {
- if (*TAggInfo_func)(_pSubParse.X38) != nil || (*XTable)(_pSubParse.X68) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123532), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(116278)))
+ if _pSubParse.XpAinc != nil || _pSubParse.XpZombieTab != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123532), unsafe.Pointer(&_codeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(116306)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XTriggerPrg)(_pSubParse.X69) != nil || (_pSubParse.X33) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123533), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(116322)))
+ if _pSubParse.XpTriggerPrg != nil || _pSubParse.XnMaxArg != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123533), unsafe.Pointer(&_codeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(116350)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3ParserReset(tls, _pSubParse)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pSubParse))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pSubParse))
return _pPrg
-
- _ = _sNC
- panic(0)
}
var _codeRowTriggerØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_codeRowTriggerØ00__func__Ø000[0], str(116369), 15)
+ crt.Xstrncpy(nil, &_codeRowTriggerØ00__func__Ø000[0], str(116397), 15)
}
-// Link the SubProgram object passed as the second argument into the linked
-// list at Vdbe.pSubProgram. This list is used to delete all sub-program
-// objects when the VM is no longer required.
+// C comment
+// /*
+// ** Link the SubProgram object passed as the second argument into the linked
+// ** list at Vdbe.pSubProgram. This list is used to delete all sub-program
+// ** objects when the VM is no longer required.
+// */
func _sqlite3VdbeLinkSubProgram(tls *crt.TLS, _pVdbe *TVdbe, _p *XSubProgram) {
- *(**XSubProgram)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X6))))) = (*XSubProgram)(_pVdbe.X42)
- *(**XSubProgram)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pVdbe.X42))))) = _p
+ *(**XSubProgram)(unsafe.Pointer(&_p.XpNext)) = (*XSubProgram)(_pVdbe.XpProgram)
+ *(**XSubProgram)(unsafe.Pointer(&_pVdbe.XpProgram)) = _p
}
-// This function is used to add VdbeComment() annotations to a VDBE
-// program. It is not used in production code, only for debugging.
+// C comment
+// /*
+// ** This function is used to add VdbeComment() annotations to a VDBE
+// ** program. It is not used in production code, only for debugging.
+// */
func _onErrorText(tls *crt.TLS, _onError int32) (r0 *int8) {
switch _onError {
- case i32(1):
+ case int32(1):
goto _2
- case i32(2):
+ case int32(2):
goto _1
- case i32(3):
+ case int32(3):
goto _3
- case i32(4):
+ case int32(4):
goto _5
- case i32(5):
+ case int32(5):
goto _4
- case i32(10):
+ case int32(10):
goto _6
default:
goto _7
}
_1:
- return str(47531)
+ return str(47486)
_2:
- return str(47522)
+ return str(47477)
_3:
- return str(47537)
+ return str(47492)
_4:
- return str(7904)
+ return str(7805)
_5:
- return str(47542)
+ return str(47497)
_6:
- return str(116384)
+ return str(116412)
_7:
- return str(116392)
+ return str(116420)
}
-// Generate VDBE code for the statements inside the body of a single
-// trigger.
+// C comment
+// /*
+// ** Generate VDBE code for the statements inside the body of a single
+// ** trigger.
+// */
func _codeTriggerProgram(tls *crt.TLS, _pParse *XParse, _pStepList *XTriggerStep, _orconf int32) (r0 int32) {
var _db *Xsqlite3
var _v *TVdbe
var _6_pSelect *XSelect
var _6_sDest XSelectDest
var _pStep *XTriggerStep
- _v = (*TVdbe)(_pParse.X2)
- _db = (*Xsqlite3)(_pParse.X0)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
- if (*XTable)(_pParse.X40) == nil || (*XParse)(_pParse.X39) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123331), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000))), unsafe.Pointer(str(116396)))
+ if _pParse.XpTriggerTab == nil || _pParse.XpToplevel == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123331), unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000), unsafe.Pointer(str(116424)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pStepList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123332), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000))), unsafe.Pointer(str(116437)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123332), unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000), unsafe.Pointer(str(116465)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123333), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123333), unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
@@ -97413,74 +98580,74 @@ _7:
if _pStep == nil {
goto _10
}
- *(*uint8)(unsafe.Pointer(&(_pParse.X46))) = func() uint8 {
- if _orconf == i32(10) {
- return (_pStep.X1)
+ _pParse.XeOrconf = func() uint8 {
+ if _orconf == int32(10) {
+ return _pStep.Xorconf
}
return uint8(_orconf)
}()
func() {
- if int32(_pParse.X11) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123349), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000))), unsafe.Pointer(str(116447)))
+ if int32(_pParse.XokConstFactor) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123349), unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000), unsafe.Pointer(str(116475)))
crt.X__builtin_abort(tls)
}
}()
- switch int32(_pStep.X0) {
- case i32(108):
+ switch int32(_pStep.Xop) {
+ case int32(108):
goto _17
- case i32(109):
+ case int32(109):
goto _18
- case i32(110):
+ case int32(110):
goto _16
default:
goto _19
}
_16:
- _sqlite3Update(tls, _pParse, _targetSrcList(tls, _pParse, _pStep), _sqlite3ExprListDup(tls, _db, (*XExprList)(_pStep.X6), i32(0)), _sqlite3ExprDup(tls, _db, (*XExpr)(_pStep.X5), i32(0)), int32(_pParse.X46))
+ _sqlite3Update(tls, _pParse, _targetSrcList(tls, _pParse, _pStep), _sqlite3ExprListDup(tls, _db, (*XExprList)(_pStep.XpExprList), int32(0)), _sqlite3ExprDup(tls, _db, (*XExpr)(_pStep.XpWhere), int32(0)), int32(_pParse.XeOrconf))
goto _20
_17:
- _sqlite3Insert(tls, _pParse, _targetSrcList(tls, _pParse, _pStep), _sqlite3SelectDup(tls, _db, (*XSelect)(_pStep.X3), i32(0)), _sqlite3IdListDup(tls, _db, (*XIdList)(_pStep.X7)), int32(_pParse.X46))
+ _sqlite3Insert(tls, _pParse, _targetSrcList(tls, _pParse, _pStep), _sqlite3SelectDup(tls, _db, (*XSelect)(_pStep.XpSelect), int32(0)), _sqlite3IdListDup(tls, _db, (*XIdList)(_pStep.XpIdList)), int32(_pParse.XeOrconf))
goto _20
_18:
- _sqlite3DeleteFrom(tls, _pParse, _targetSrcList(tls, _pParse, _pStep), _sqlite3ExprDup(tls, _db, (*XExpr)(_pStep.X5), i32(0)))
+ _sqlite3DeleteFrom(tls, _pParse, _targetSrcList(tls, _pParse, _pStep), _sqlite3ExprDup(tls, _db, (*XExpr)(_pStep.XpWhere), int32(0)))
goto _20
_19:
func() {
- if int32(_pStep.X0) != i32(119) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123377), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000))), unsafe.Pointer(str(116472)))
+ if int32(_pStep.Xop) != int32(119) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123377), unsafe.Pointer(&_codeTriggerProgramØ00__func__Ø000), unsafe.Pointer(str(116500)))
crt.X__builtin_abort(tls)
}
}()
- _6_pSelect = _sqlite3SelectDup(tls, _db, (*XSelect)(_pStep.X3), i32(0))
- _sqlite3SelectDestInit(tls, &_6_sDest, i32(4), i32(0))
+ _6_pSelect = _sqlite3SelectDup(tls, _db, (*XSelect)(_pStep.XpSelect), int32(0))
+ _sqlite3SelectDestInit(tls, &_6_sDest, int32(4), int32(0))
_sqlite3Select(tls, _pParse, _6_pSelect, &_6_sDest)
_sqlite3SelectDelete(tls, _db, _6_pSelect)
goto _20
_20:
- if int32(_pStep.X0) != i32(119) {
- _sqlite3VdbeAddOp0(tls, _v, i32(121))
+ if int32(_pStep.Xop) != int32(119) {
+ _sqlite3VdbeAddOp0(tls, _v, int32(121))
}
- _pStep = (*XTriggerStep)(_pStep.X8)
+ _pStep = (*XTriggerStep)(_pStep.XpNext)
goto _7
_10:
- return i32(0)
-
- _ = _6_sDest
- panic(0)
+ return int32(0)
}
var _codeTriggerProgramØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_codeTriggerProgramØ00__func__Ø000[0], str(116493), 19)
+ crt.Xstrncpy(nil, &_codeTriggerProgramØ00__func__Ø000[0], str(116521), 19)
}
-// Process an UPDATE statement.
-//
-// UPDATE OR IGNORE table_wxyz SET a=b, c=d WHERE e<5 AND f NOT NULL;
-// \_______/ \________/ \______/ \________________/
-// * onError pTabList pChanges pWhere
+// C comment
+// /*
+// ** Process an UPDATE statement.
+// **
+// ** UPDATE OR IGNORE table_wxyz SET a=b, c=d WHERE e<5 AND f NOT NULL;
+// ** \_______/ \________/ \______/ \________________/
+// * onError pTabList pChanges pWhere
+// */
func _sqlite3Update(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pChanges *XExprList, _pWhere *XExpr, _onError int32) {
var _nPk, _21_iIdxCol int16
var _i, _j, _addrTop, _nIdx, _iBaseCur, _iDataCur, _iIdxCur, _iDb, _eOnePass, _hasFK, _labelBreak, _labelContinue, _flags, _isView, _tmask, _newmask, _iEph, _nKey, _addrOpen, _iPk, _bReplace, _regRowCount, _regOldRowid, _regNewRowid, _regNew, _regOld, _regRowSet, _regKey, _15_rc, _18_reg, _36_iCur, _45_addrOnce, _71_addr1 int32
@@ -97498,31 +98665,31 @@ func _sqlite3Update(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pChange
var _sNC XNameContext
var _sContext XAuthContext
var _pWInfo *XWhereInfo
- _addrTop = i32(0)
+ _addrTop = int32(0)
_aRegIdx = nil
_aXRef = nil
_pRowidExpr = nil
- _iEph = i32(0)
- _nKey = i32(0)
- _addrOpen = i32(0)
- _iPk = i32(0)
- _nPk = i16(0)
- _bReplace = i32(0)
- _regRowCount = i32(0)
- _regOldRowid = i32(0)
- _regNewRowid = i32(0)
- _regNew = i32(0)
- _regOld = i32(0)
- _regRowSet = i32(0)
- _regKey = i32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_sContext), i32(0), u32(8))
- _db = (*Xsqlite3)(_pParse.X0)
- if (_pParse.X16) != 0 || ((_db.X17) != 0) {
+ _iEph = int32(0)
+ _nKey = int32(0)
+ _addrOpen = int32(0)
+ _iPk = int32(0)
+ _nPk = int16(0)
+ _bReplace = int32(0)
+ _regRowCount = int32(0)
+ _regOldRowid = int32(0)
+ _regNewRowid = int32(0)
+ _regNew = int32(0)
+ _regOld = int32(0)
+ _regRowSet = int32(0)
+ _regKey = int32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_sContext), int32(0), uint32(8))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pParse.XnErr != 0 || (_db.XmallocFailed != 0) {
goto _update_cleanup
}
func() {
- if (_pTabList.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123900), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(115025)))
+ if _pTabList.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123900), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(115053)))
crt.X__builtin_abort(tls)
}
}()
@@ -97530,12 +98697,12 @@ func _sqlite3Update(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pChange
if _pTab == nil {
goto _update_cleanup
}
- _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTab.X20))
- _pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, i32(110), _pChanges, &_tmask)
- _isView = bool2int((*XSelect)(_pTab.X3) != nil)
+ _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTab.XpSchema))
+ _pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, int32(110), _pChanges, &_tmask)
+ _isView = bool2int((*XSelect)(_pTab.XpSelect) != nil)
func() {
- if _pTrigger == nil && _tmask != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123914), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(116512)))
+ if _pTrigger == nil && _tmask != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123914), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(116540)))
crt.X__builtin_abort(tls)
}
}()
@@ -97545,166 +98712,158 @@ func _sqlite3Update(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pChange
if _sqlite3IsReadOnly(tls, _pParse, _pTab, _tmask) != 0 {
goto _update_cleanup
}
- *(*int32)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(i32(0)))).X11))) = store1(&_iBaseCur, store1(&_iDataCur, postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))))
- _iIdxCur = _iDataCur + i32(1)
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), 0).XiCursor = store2(&_iBaseCur, store2(&_iDataCur, postInc2(&_pParse.XnTab, 1)))
+ _iIdxCur = _iDataCur + int32(1)
_pPk = func() *XIndex {
- if ((_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
+ if (_pTab.XtabFlags & uint32(32)) == (0) {
return nil
}
return _sqlite3PrimaryKeyIndex(tls, _pTab)
}()
- *func() **XIndex { _nIdx = i32(0); return &_pIdx }() = (*XIndex)(_pTab.X2)
+ *func() **XIndex { _nIdx = int32(0); return &_pIdx }() = (*XIndex)(_pTab.XpIndex)
_12:
if _pIdx == nil {
goto _15
}
- if (int32((uint32(_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(2)) && (_pPk != nil) {
- _iDataCur = _pParse.X17
- *(*int32)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(i32(0)))).X11))) = _iDataCur
+ if (int32((uint32(_pIdx.XidxType)<<30)>>30) == int32(2)) && (_pPk != nil) {
+ _iDataCur = _pParse.XnTab
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), 0).XiCursor = _iDataCur
}
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) += 1
- *func() *int32 { _pIdx = (*XIndex)(_pIdx.X5); return &_nIdx }() += 1
+ _pParse.XnTab += 1
+ *func() *int32 { _pIdx = (*XIndex)(_pIdx.XpNext); return &_nIdx }() += 1
goto _12
_15:
- _aXRef = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(((u32(4)*uint32(int32(_pTab.X11)+_nIdx))+uint32(_nIdx))+uint32(i32(2)))))
+ _aXRef = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(((uint32(4)*uint32(int32(_pTab.XnCol)+_nIdx))+uint32(_nIdx))+uint32(2))))
if _aXRef == nil {
goto _update_cleanup
}
- _aRegIdx = (*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(_aXRef)) + uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(_pTab.X11)))))*uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(4)))))))))))
- _aToOpen = (*uint8)(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(_aRegIdx)) + uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(_nIdx)))))*uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(4)))))))))))))
- crt.Xmemset(tls, (unsafe.Pointer)(_aToOpen), i32(1), uint32(_nIdx+i32(1)))
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr(_nIdx+i32(1)))) = uint8(i32(0))
- _i = i32(0)
+ _aRegIdx = (*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(_aXRef)) + uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(_pTab.XnCol)*uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(4)))))))))))
+ _aToOpen = (*uint8)(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(_aRegIdx)) + uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(_nIdx)*uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr(4)))))))))))))
+ crt.Xmemset(tls, unsafe.Pointer(_aToOpen), int32(1), uint32(_nIdx+int32(1)))
+ *elem15(_aToOpen, uintptr(_nIdx+int32(1))) = 0
+ _i = int32(0)
_19:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _22
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aXRef)) + 4*uintptr(_i))) = i32(-1)
+ *elem8(_aXRef, uintptr(_i)) = int32(-1)
_i += 1
goto _19
_22:
- crt.Xmemset(tls, (unsafe.Pointer)(&_sNC), i32(0), u32(32))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X0))))) = _pParse
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNC.X1))))) = _pTabList
- _chngRowid = store2(&_chngPk, uint8(i32(0)))
- _i = i32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_sNC), int32(0), uint32(32))
+ *(**XParse)(unsafe.Pointer(&_sNC.XpParse)) = _pParse
+ *(**XSrcList)(unsafe.Pointer(&_sNC.XpSrcList)) = _pTabList
+ _chngRowid = store3(&_chngPk, 0)
+ _i = int32(0)
_23:
- if _i >= (_pChanges.X0) {
+ if _i >= _pChanges.XnExpr {
goto _26
}
- if _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pChanges.X2)))))+20*uintptr(_i))).X0)) != 0 {
+ if _sqlite3ResolveExprNames(tls, &_sNC, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pChanges.Xa)), uintptr(_i)).XpExpr)) != 0 {
goto _update_cleanup
}
- _j = i32(0)
+ _j = int32(0)
_28:
- if _j >= int32(_pTab.X11) {
+ if _j >= int32(_pTab.XnCol) {
goto _31
}
- if _sqlite3StrICmp(tls, (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_j))).X0, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pChanges.X2)))))+20*uintptr(_i))).X1) != i32(0) {
+ if _sqlite3StrICmp(tls, elem41((*XColumn)(_pTab.XaCol), uintptr(_j)).XzName, elem57((*TExprList_item)(unsafe.Pointer(&_pChanges.Xa)), uintptr(_i)).XzName) != int32(0) {
goto _32
}
- if _j == int32(_pTab.X10) {
- _chngRowid = uint8(i32(1))
- _pRowidExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pChanges.X2))))) + 20*uintptr(_i))).X0)
+ if _j == int32(_pTab.XiPKey) {
+ _chngRowid = uint8(1)
+ _pRowidExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pChanges.Xa)), uintptr(_i)).XpExpr)
goto _36
}
- if (_pPk != nil) && ((int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_j))).X6) & i32(1)) != i32(0)) {
- _chngPk = uint8(i32(1))
+ if (_pPk != nil) && ((int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_j)).XcolFlags) & int32(1)) != int32(0)) {
+ _chngPk = uint8(1)
}
_36:
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aXRef)) + 4*uintptr(_j))) = _i
+ *elem8(_aXRef, uintptr(_j)) = _i
goto _31
_32:
_j += 1
goto _28
_31:
- if _j < int32(_pTab.X11) {
+ if _j < int32(_pTab.XnCol) {
goto _37
}
- if (_pPk == nil) && _sqlite3IsRowid(tls, (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pChanges.X2)))))+20*uintptr(_i))).X1) != 0 {
- _j = i32(-1)
- _chngRowid = uint8(i32(1))
- _pRowidExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pChanges.X2))))) + 20*uintptr(_i))).X0)
+ if (_pPk == nil) && _sqlite3IsRowid(tls, elem57((*TExprList_item)(unsafe.Pointer(&_pChanges.Xa)), uintptr(_i)).XzName) != 0 {
+ _j = int32(-1)
+ _chngRowid = uint8(1)
+ _pRowidExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pChanges.Xa)), uintptr(_i)).XpExpr)
goto _40
}
- _sqlite3ErrorMsg(tls, _pParse, str(116533), unsafe.Pointer((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pChanges.X2)))))+20*uintptr(_i))).X1))
- *(*uint8)(unsafe.Pointer(&(_pParse.X5))) = uint8(i32(1))
+ _sqlite3ErrorMsg(tls, _pParse, str(116561), unsafe.Pointer(elem57((*TExprList_item)(unsafe.Pointer(&_pChanges.Xa)), uintptr(_i)).XzName))
+ _pParse.XcheckSchema = uint8(1)
goto _update_cleanup
_40:
_37:
- _15_rc = _sqlite3AuthCheck(tls, _pParse, i32(23), _pTab.X0, func() *int8 {
- if _j < i32(0) {
- return str(96456)
+ _15_rc = _sqlite3AuthCheck(tls, _pParse, int32(23), _pTab.XzName, func() *int8 {
+ if _j < int32(0) {
+ return str(96484)
}
- return ((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_j))).X0)
- }(), (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0)
- if _15_rc == i32(1) {
+ return (elem41((*XColumn)(_pTab.XaCol), uintptr(_j)).XzName)
+ }(), elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName)
+ if _15_rc == int32(1) {
goto _update_cleanup
}
- if _15_rc == i32(2) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aXRef)) + 4*uintptr(_j))) = i32(-1)
+ if _15_rc == int32(2) {
+ *elem8(_aXRef, uintptr(_j)) = int32(-1)
}
_i += 1
goto _23
_26:
func() {
- if (int32(_chngRowid) & int32(_chngPk)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124012), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(116552)))
+ if (int32(_chngRowid) & int32(_chngPk)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124012), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(116580)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_chngRowid) != i32(0) && int32(_chngRowid) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124013), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(116576)))
+ if int32(_chngRowid) != int32(0) && int32(_chngRowid) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124013), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(116604)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_chngPk) != i32(0) && int32(_chngPk) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124014), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(116605)))
+ if int32(_chngPk) != int32(0) && int32(_chngPk) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124014), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(116633)))
crt.X__builtin_abort(tls)
}
}()
_chngKey = uint8(int32(_chngRowid) + int32(_chngPk))
- *(*uint64)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(i32(0)))).X14))) = func() uint64 {
- if (_pTab.X16) != 0 {
- return u64(18446744073709551615)
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), 0).XcolUsed = func() uint64 {
+ if _pTab.XnModuleArg != 0 {
+ return uint64(18446744073709551615)
}
- return uint64(i32(0))
+ return (0)
}()
_hasFK = _sqlite3FkRequired(tls, _pParse, _pTab, _aXRef, int32(_chngKey))
- *func() **XIndex { _j = i32(0); return &_pIdx }() = (*XIndex)(_pTab.X2)
+ *func() **XIndex { _j = int32(0); return &_pIdx }() = (*XIndex)(_pTab.XpIndex)
_56:
if _pIdx == nil {
goto _59
}
- if (((_chngKey != 0) || (_hasFK > i32(1))) || ((*XExpr)(_pIdx.X9) != nil)) || (_pIdx == _pPk) {
- _18_reg = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + int32(_pIdx.X14)
- sink1(*p)
- }
+ if (((_chngKey != 0) || (_hasFK > int32(1))) || (_pIdx.XpPartIdxWhere != nil)) || (_pIdx == _pPk) {
+ _18_reg = preInc2(&_pParse.XnMem, 1)
+ _pParse.XnMem += int32(_pIdx.XnColumn)
goto _64
}
- _18_reg = i32(0)
- _i = i32(0)
+ _18_reg = int32(0)
+ _i = int32(0)
_65:
- if _i >= int32(_pIdx.X13) {
+ if _i >= int32(_pIdx.XnKeyCol) {
goto _68
}
- _21_iIdxCol = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i)))
- if int32(_21_iIdxCol) >= i32(0) && (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aXRef)) + 4*uintptr(_21_iIdxCol)))) < i32(0) {
+ _21_iIdxCol = *elem50(_pIdx.XaiColumn, uintptr(_i))
+ if int32(_21_iIdxCol) >= int32(0) && (*elem8(_aXRef, uintptr(_21_iIdxCol))) < int32(0) {
goto _70
}
- _18_reg = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + int32(_pIdx.X14)
- sink1(*p)
- }
- if (_onError == i32(5)) || ((_onError == i32(10)) && (int32(_pIdx.X15) == i32(5))) {
- _bReplace = i32(1)
+ _18_reg = preInc2(&_pParse.XnMem, 1)
+ _pParse.XnMem += int32(_pIdx.XnColumn)
+ if (_onError == int32(5)) || ((_onError == int32(10)) && (int32(_pIdx.XonError) == int32(5))) {
+ _bReplace = int32(1)
}
goto _68
_70:
@@ -97712,49 +98871,41 @@ _70:
goto _65
_68:
_64:
- if _18_reg == i32(0) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr(_j+i32(1)))) = uint8(i32(0))
+ if _18_reg == int32(0) {
+ *elem15(_aToOpen, uintptr(_j+int32(1))) = 0
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_j))) = _18_reg
- *func() *int32 { _pIdx = (*XIndex)(_pIdx.X5); return &_j }() += 1
+ *elem8(_aRegIdx, uintptr(_j)) = _18_reg
+ *func() *int32 { _pIdx = (*XIndex)(_pIdx.XpNext); return &_j }() += 1
goto _56
_59:
if _bReplace != 0 {
- crt.Xmemset(tls, (unsafe.Pointer)(_aToOpen), i32(1), uint32(_nIdx+i32(1)))
+ crt.Xmemset(tls, unsafe.Pointer(_aToOpen), int32(1), uint32(_nIdx+int32(1)))
}
_v = _sqlite3GetVdbe(tls, _pParse)
if _v == nil {
goto _update_cleanup
}
- if int32(_pParse.X6) == i32(0) {
+ if int32(_pParse.Xnested) == int32(0) {
_sqlite3VdbeCountChanges(tls, _v)
}
- _sqlite3BeginWriteOperation(tls, _pParse, i32(1), _iDb)
- if (_pTab.X16) != 0 {
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(1), _iDb)
+ if _pTab.XnModuleArg != 0 {
goto _78
}
- _regRowSet = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _regOldRowid = store1(&_regNewRowid, preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1))
+ _regRowSet = preInc2(&_pParse.XnMem, 1)
+ _regOldRowid = store2(&_regNewRowid, preInc2(&_pParse.XnMem, 1))
if ((_chngPk != 0) || (_pTrigger != nil)) || _hasFK != 0 {
- _regOld = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + int32(_pTab.X11)
- sink1(*p)
- }
+ _regOld = _pParse.XnMem + int32(1)
+ _pParse.XnMem += int32(_pTab.XnCol)
}
if ((_chngKey != 0) || (_pTrigger != nil)) || _hasFK != 0 {
- _regNewRowid = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- }
- _regNew = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + int32(_pTab.X11)
- sink1(*p)
+ _regNewRowid = preInc2(&_pParse.XnMem, 1)
}
+ _regNew = _pParse.XnMem + int32(1)
+ _pParse.XnMem += int32(_pTab.XnCol)
_78:
if _isView != 0 {
- _sqlite3AuthContextPush(tls, _pParse, &_sContext, _pTab.X0)
+ _sqlite3AuthContextPush(tls, _pParse, &_sContext, _pTab.XzName)
}
if _isView != 0 {
_sqlite3MaterializeView(tls, _pParse, _pTab, _pWhere, _iDataCur)
@@ -97762,85 +98913,77 @@ _78:
if _sqlite3ResolveExprNames(tls, &_sNC, _pWhere) != 0 {
goto _update_cleanup
}
- if (_pTab.X16) != 0 {
+ if _pTab.XnModuleArg != 0 {
_updateVirtualTable(tls, _pParse, _pTabList, _pTab, _pChanges, _pRowidExpr, _aXRef, _pWhere, _onError)
goto _update_cleanup
}
- if ((_db.X6)&i32(128)) != 0 && ((*XTable)(_pParse.X40) == nil) {
- _regRowCount = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _regRowCount)
+ if (_db.Xflags&int32(128)) != 0 && (_pParse.XpTriggerTab == nil) {
+ _regRowCount = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _regRowCount)
}
- if ((_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
- _sqlite3VdbeAddOp3(tls, _v, i32(59), i32(0), _regRowSet, _regOldRowid)
+ if (_pTab.XtabFlags & uint32(32)) == (0) {
+ _sqlite3VdbeAddOp3(tls, _v, int32(59), int32(0), _regRowSet, _regOldRowid)
goto _92
}
func() {
if _pPk == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124122), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(41994)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124122), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(41949)))
crt.X__builtin_abort(tls)
}
}()
- _nPk = int16(_pPk.X13)
- _iPk = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + int32(_nPk)
- sink1(*p)
- }
- _regKey = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _iEph = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _iPk)
- _addrOpen = _sqlite3VdbeAddOp2(tls, _v, i32(110), _iEph, int32(_nPk))
+ _nPk = int16(_pPk.XnKeyCol)
+ _iPk = _pParse.XnMem + int32(1)
+ _pParse.XnMem += int32(_nPk)
+ _regKey = preInc2(&_pParse.XnMem, 1)
+ _iEph = postInc2(&_pParse.XnTab, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _iPk)
+ _addrOpen = _sqlite3VdbeAddOp2(tls, _v, int32(110), _iEph, int32(_nPk))
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _pPk)
_92:
- _flags = i32(4100)
- if (((((_pParse.X6) == 0) && (_pTrigger == nil)) && (_hasFK == 0)) && (_chngKey == 0)) && (_bReplace == 0) {
- {
- p := &_flags
- *p = (*p) | i32(8)
- sink1(*p)
- }
+ _flags = int32(4100)
+ if ((((_pParse.Xnested == 0) && (_pTrigger == nil)) && (_hasFK == 0)) && (_chngKey == 0)) && (_bReplace == 0) {
+ _flags |= int32(8)
}
_pWInfo = _sqlite3WhereBegin(tls, _pParse, _pTabList, _pWhere, nil, nil, uint16(_flags), _iIdxCur)
if _pWInfo == nil {
goto _update_cleanup
}
_eOnePass = _sqlite3WhereOkOnePass(tls, _pWInfo, (*int32)(unsafe.Pointer(&_aiCurOnePass)))
- if _eOnePass != i32(2) {
+ if _eOnePass != int32(2) {
goto _101
}
- _36_iCur = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(1))))
- if ((_36_iCur >= i32(0)) && (_36_iCur != _iDataCur)) && ((*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr(_36_iCur-_iBaseCur)))) != 0) {
- _eOnePass = i32(0)
+ _36_iCur = *elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), uintptr(1))
+ if ((_36_iCur >= int32(0)) && (_36_iCur != _iDataCur)) && ((*elem15(_aToOpen, uintptr(_36_iCur-_iBaseCur))) != 0) {
+ _eOnePass = int32(0)
}
func() {
- if _36_iCur == _iDataCur && ((_pTab.X9)&uint32(i32(32))) == uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124164), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(116628)))
+ if _36_iCur == _iDataCur && (_pTab.XtabFlags&uint32(32)) == (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124164), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(116656)))
crt.X__builtin_abort(tls)
}
}()
_101:
- if ((_pTab.X9) & uint32(i32(32))) != uint32(i32(0)) {
+ if (_pTab.XtabFlags & uint32(32)) != (0) {
goto _108
}
- _sqlite3VdbeAddOp2(tls, _v, i32(125), _iDataCur, _regOldRowid)
- if _eOnePass == i32(0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(145), _regRowSet, _regOldRowid)
+ _sqlite3VdbeAddOp2(tls, _v, int32(125), _iDataCur, _regOldRowid)
+ if _eOnePass == int32(0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(145), _regRowSet, _regOldRowid)
}
goto _110
_108:
- _i = i32(0)
+ _i = int32(0)
_111:
if _i >= int32(_nPk) {
goto _114
}
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i)))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124182), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(115265)))
+ if int32(*elem50(_pPk.XaiColumn, uintptr(_i))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124182), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(115293)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ExprCodeGetColumnOfTable(tls, _v, _pTab, _iDataCur, int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i)))), _iPk+_i)
+ _sqlite3ExprCodeGetColumnOfTable(tls, _v, _pTab, _iDataCur, int32(*elem50(_pPk.XaiColumn, uintptr(_i))), _iPk+_i)
_i += 1
goto _111
_114:
@@ -97850,55 +98993,55 @@ _114:
_regKey = _iPk
goto _118
}
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _iPk, int32(_nPk), _regKey, _sqlite3IndexAffinityStr(tls, _db, _pPk), int32(_nPk))
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _iEph, _regKey, _iPk, int32(_nPk))
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _iPk, int32(_nPk), _regKey, _sqlite3IndexAffinityStr(tls, _db, _pPk), int32(_nPk))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _iEph, _regKey, _iPk, int32(_nPk))
_118:
_110:
- if _eOnePass != i32(2) {
+ if _eOnePass != int32(2) {
_sqlite3WhereEnd(tls, _pWInfo)
}
_labelBreak = _sqlite3VdbeMakeLabel(tls, _v)
if _isView != 0 {
goto _120
}
- _45_addrOnce = i32(0)
- if _eOnePass == i32(0) {
+ _45_addrOnce = int32(0)
+ if _eOnePass == int32(0) {
goto _121
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(0))))) >= i32(0) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(0)))))-_iBaseCur))) = uint8(i32(0))
+ if (*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), 0)) >= int32(0) {
+ *elem15(_aToOpen, uintptr((*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), 0))-_iBaseCur)) = 0
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(1))))) >= i32(0) {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aToOpen)) + 1*uintptr((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(1)))))-_iBaseCur))) = uint8(i32(0))
+ if (*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), uintptr(1))) >= int32(0) {
+ *elem15(_aToOpen, uintptr((*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), uintptr(1)))-_iBaseCur)) = 0
}
_121:
- if (_eOnePass == i32(2)) && ((_nIdx - bool2int((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(1))))) >= i32(0))) > i32(0)) {
- _45_addrOnce = _sqlite3VdbeAddOp0(tls, _v, i32(20))
+ if (_eOnePass == int32(2)) && ((_nIdx - bool2int((*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), uintptr(1))) >= int32(0))) > int32(0)) {
+ _45_addrOnce = _sqlite3VdbeAddOp0(tls, _v, int32(20))
}
- _sqlite3OpenTableAndIndices(tls, _pParse, _pTab, i32(107), uint8(i32(0)), _iBaseCur, _aToOpen, nil, nil)
+ _sqlite3OpenTableAndIndices(tls, _pParse, _pTab, int32(107), 0, _iBaseCur, _aToOpen, nil, nil)
if _45_addrOnce != 0 {
_sqlite3VdbeJumpHere(tls, _v, _45_addrOnce)
}
_120:
- if _eOnePass == i32(0) {
+ if _eOnePass == int32(0) {
goto _127
}
- if ((_isView == 0) && ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(0))))) != _iDataCur)) && ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aiCurOnePass)) + 4*uintptr(i32(1))))) != _iDataCur) {
+ if ((_isView == 0) && ((*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), 0)) != _iDataCur)) && ((*elem8((*int32)(unsafe.Pointer(&_aiCurOnePass)), uintptr(1))) != _iDataCur) {
func() {
if _pPk == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124221), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(116662)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124221), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(116690)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4Int(tls, _v, i32(29), _iDataCur, _labelBreak, _regKey, _nKey)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(29), _iDataCur, _labelBreak, _regKey, _nKey)
}
- if _eOnePass == i32(1) {
+ if _eOnePass == int32(1) {
_labelContinue = _labelBreak
goto _134
}
_labelContinue = _sqlite3VdbeMakeLabel(tls, _v)
_134:
- _sqlite3VdbeAddOp2(tls, _v, i32(75), func() int32 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), func() int32 {
if _pPk != nil {
return _regKey
}
@@ -97908,23 +99051,23 @@ _134:
_127:
if _pPk != nil {
_labelContinue = _sqlite3VdbeMakeLabel(tls, _v)
- _sqlite3VdbeAddOp2(tls, _v, i32(37), _iEph, _labelBreak)
- _addrTop = _sqlite3VdbeAddOp2(tls, _v, i32(124), _iEph, _regKey)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(29), _iDataCur, _labelContinue, _regKey, i32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(37), _iEph, _labelBreak)
+ _addrTop = _sqlite3VdbeAddOp2(tls, _v, int32(124), _iEph, _regKey)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(29), _iDataCur, _labelContinue, _regKey, int32(0))
goto _139
}
- _labelContinue = _sqlite3VdbeAddOp3(tls, _v, i32(42), _regRowSet, _labelBreak, _regOldRowid)
- _sqlite3VdbeAddOp3(tls, _v, i32(32), _iDataCur, _labelContinue, _regOldRowid)
+ _labelContinue = _sqlite3VdbeAddOp3(tls, _v, int32(42), _regRowSet, _labelBreak, _regOldRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(32), _iDataCur, _labelContinue, _regOldRowid)
_139:
func() {
if _chngKey == 0 && _pTrigger == nil && _hasFK == 0 && _regOldRowid != _regNewRowid {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124251), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(116666)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124251), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(116694)))
crt.X__builtin_abort(tls)
}
}()
if _chngRowid != 0 {
_sqlite3ExprCode(tls, _pParse, _pRowidExpr, _regNewRowid)
- _sqlite3VdbeAddOp1(tls, _v, i32(17), _regNewRowid)
+ _sqlite3VdbeAddOp1(tls, _v, int32(17), _regNewRowid)
}
if _chngPk == 0 && _hasFK == 0 && _pTrigger == nil {
goto _148
@@ -97933,73 +99076,69 @@ _139:
if _hasFK != 0 {
return _sqlite3FkOldmask(tls, _pParse, _pTab)
}
- return uint32(i32(0))
+ return (0)
}()
- {
- p := &_55_oldmask
- *p = (*p) | _sqlite3TriggerColmask(tls, _pParse, _pTrigger, _pChanges, i32(0), i32(3), _pTab, _onError)
- sink5(*p)
- }
- _i = i32(0)
+ _55_oldmask |= _sqlite3TriggerColmask(tls, _pParse, _pTrigger, _pChanges, int32(0), int32(3), _pTab, _onError)
+ _i = int32(0)
_151:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _154
}
- if ((_55_oldmask == u32(4294967295)) || ((_i < i32(32)) && ((_55_oldmask & (u32(1) << uint(_i))) != uint32(i32(0))))) || ((int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X6) & i32(1)) != i32(0)) {
+ if ((_55_oldmask == uint32(4294967295)) || ((_i < int32(32)) && ((_55_oldmask & (uint32(1) << uint(_i))) != (0)))) || ((int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XcolFlags) & int32(1)) != int32(0)) {
_sqlite3ExprCodeGetColumnOfTable(tls, _v, _pTab, _iDataCur, _i, _regOld+_i)
goto _159
}
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _regOld+_i)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _regOld+_i)
_159:
_i += 1
goto _151
_154:
- if (int32(_chngRowid) == i32(0)) && (_pPk == nil) {
- _sqlite3VdbeAddOp2(tls, _v, i32(64), _regOldRowid, _regNewRowid)
+ if (int32(_chngRowid) == int32(0)) && (_pPk == nil) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(64), _regOldRowid, _regNewRowid)
}
_148:
- _newmask = int32(_sqlite3TriggerColmask(tls, _pParse, _pTrigger, _pChanges, i32(1), i32(1), _pTab, _onError))
- _i = i32(0)
+ _newmask = int32(_sqlite3TriggerColmask(tls, _pParse, _pTrigger, _pChanges, int32(1), int32(1), _pTab, _onError))
+ _i = int32(0)
_162:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _165
}
- if _i == int32(_pTab.X10) {
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _regNew+_i)
+ if _i == int32(_pTab.XiPKey) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _regNew+_i)
goto _167
}
- _j = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aXRef)) + 4*uintptr(_i)))
- if _j >= i32(0) {
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pChanges.X2)))))+20*uintptr(_j))).X0), _regNew+_i)
+ _j = *elem8(_aXRef, uintptr(_i))
+ if _j >= int32(0) {
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pChanges.Xa)), uintptr(_j)).XpExpr), _regNew+_i)
goto _173
}
- if ((i32(0) == (_tmask & i32(1))) || (_i > i32(31))) || ((uint32(_newmask) & (u32(1) << uint(_i))) != 0) {
+ if ((int32(0) == (_tmask & int32(1))) || (_i > int32(31))) || ((uint32(_newmask) & (uint32(1) << uint(_i))) != 0) {
_sqlite3ExprCodeGetColumnToReg(tls, _pParse, _pTab, _i, _iDataCur, _regNew+_i)
goto _173
}
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _regNew+_i)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _regNew+_i)
_173:
_167:
_i += 1
goto _162
_165:
- if (_tmask & i32(1)) == 0 {
+ if (_tmask & int32(1)) == 0 {
goto _174
}
_sqlite3TableAffinity(tls, _v, _pTab, _regNew)
- _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, i32(110), _pChanges, i32(1), _pTab, _regOldRowid, _onError, _labelContinue)
+ _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, int32(110), _pChanges, int32(1), _pTab, _regOldRowid, _onError, _labelContinue)
if _pPk != nil {
- _sqlite3VdbeAddOp4Int(tls, _v, i32(29), _iDataCur, _labelContinue, _regKey, _nKey)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(29), _iDataCur, _labelContinue, _regKey, _nKey)
goto _176
}
- _sqlite3VdbeAddOp3(tls, _v, i32(32), _iDataCur, _labelContinue, _regOldRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(32), _iDataCur, _labelContinue, _regOldRowid)
_176:
- _i = i32(0)
+ _i = int32(0)
_177:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _180
}
- if ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aXRef)) + 4*uintptr(_i)))) < i32(0)) && (_i != int32(_pTab.X10)) {
+ if ((*elem8(_aXRef, uintptr(_i))) < int32(0)) && (_i != int32(_pTab.XiPKey)) {
_sqlite3ExprCodeGetColumnOfTable(tls, _v, _pTab, _iDataCur, _i, _regNew+_i)
}
_i += 1
@@ -98009,117 +99148,118 @@ _174:
if _isView != 0 {
goto _183
}
- _71_addr1 = i32(0)
+ _71_addr1 = int32(0)
func() {
- if _regOldRowid <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124356), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(116723)))
+ if _regOldRowid <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124356), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(116751)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3GenerateConstraintChecks(tls, _pParse, _pTab, _aRegIdx, _iDataCur, _iIdxCur, _regNewRowid, _regOldRowid, _chngKey, uint8(_onError), _labelContinue, &_bReplace, _aXRef)
if _hasFK != 0 {
- _sqlite3FkCheck(tls, _pParse, _pTab, _regOldRowid, i32(0), _aXRef, int32(_chngKey))
+ _sqlite3FkCheck(tls, _pParse, _pTab, _regOldRowid, int32(0), _aXRef, int32(_chngKey))
}
if _bReplace == 0 && _chngKey == 0 {
goto _188
}
if _pPk != nil {
- _71_addr1 = _sqlite3VdbeAddOp4Int(tls, _v, i32(29), _iDataCur, i32(0), _regKey, _nKey)
+ _71_addr1 = _sqlite3VdbeAddOp4Int(tls, _v, int32(29), _iDataCur, int32(0), _regKey, _nKey)
goto _190
}
- _71_addr1 = _sqlite3VdbeAddOp3(tls, _v, i32(32), _iDataCur, i32(0), _regOldRowid)
+ _71_addr1 = _sqlite3VdbeAddOp3(tls, _v, int32(32), _iDataCur, int32(0), _regOldRowid)
_190:
_188:
- _sqlite3GenerateRowIndexDelete(tls, _pParse, _pTab, _iDataCur, _iIdxCur, _aRegIdx, i32(-1))
+ _sqlite3GenerateRowIndexDelete(tls, _pParse, _pTab, _iDataCur, _iIdxCur, _aRegIdx, int32(-1))
func() {
- if _regNew != (_regNewRowid + i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124386), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000))), unsafe.Pointer(str(116737)))
+ if _regNew != (_regNewRowid + int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124386), unsafe.Pointer(&_sqlite3UpdateØ00__func__Ø000), unsafe.Pointer(str(116765)))
crt.X__builtin_abort(tls)
}
}()
- if (_hasFK > i32(1)) || (_chngKey != 0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(120), _iDataCur, i32(0))
+ if (_hasFK > int32(1)) || (_chngKey != 0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(120), _iDataCur, int32(0))
}
if _bReplace != 0 || (_chngKey != 0) {
_sqlite3VdbeJumpHere(tls, _v, _71_addr1)
}
if _hasFK != 0 {
- _sqlite3FkCheck(tls, _pParse, _pTab, i32(0), _regNewRowid, _aXRef, int32(_chngKey))
+ _sqlite3FkCheck(tls, _pParse, _pTab, int32(0), _regNewRowid, _aXRef, int32(_chngKey))
}
- _sqlite3CompleteInsertion(tls, _pParse, _pTab, _iDataCur, _iIdxCur, _regNewRowid, _aRegIdx, i32(4)|func() int32 {
- if _eOnePass == i32(2) {
- return i32(2)
+ _sqlite3CompleteInsertion(tls, _pParse, _pTab, _iDataCur, _iIdxCur, _regNewRowid, _aRegIdx, int32(4)|func() int32 {
+ if _eOnePass == int32(2) {
+ return int32(2)
}
- return i32(0)
- }(), i32(0), i32(0))
+ return int32(0)
+ }(), int32(0), int32(0))
if _hasFK != 0 {
_sqlite3FkActions(tls, _pParse, _pTab, _pChanges, _regOldRowid, _aXRef, int32(_chngKey))
}
_183:
- if ((_db.X6)&i32(128)) != 0 && ((*XTable)(_pParse.X40) == nil) {
- _sqlite3VdbeAddOp2(tls, _v, i32(73), _regRowCount, i32(1))
+ if (_db.Xflags&int32(128)) != 0 && (_pParse.XpTriggerTab == nil) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(73), _regRowCount, int32(1))
}
- _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, i32(110), _pChanges, i32(2), _pTab, _regOldRowid, _onError, _labelContinue)
- if _eOnePass == i32(1) {
+ _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, int32(110), _pChanges, int32(2), _pTab, _regOldRowid, _onError, _labelContinue)
+ if _eOnePass == int32(1) {
goto _208
}
- if _eOnePass == i32(2) {
+ if _eOnePass == int32(2) {
_sqlite3VdbeResolveLabel(tls, _v, _labelContinue)
_sqlite3WhereEnd(tls, _pWInfo)
goto _208
}
if _pPk != nil {
_sqlite3VdbeResolveLabel(tls, _v, _labelContinue)
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _iEph, _addrTop)
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _iEph, _addrTop)
goto _208
}
_sqlite3VdbeGoto(tls, _v, _labelContinue)
_208:
_sqlite3VdbeResolveLabel(tls, _v, _labelBreak)
- if (int32(_pParse.X6) == i32(0)) && ((*XTable)(_pParse.X40) == nil) {
+ if (int32(_pParse.Xnested) == int32(0)) && ((*XTable)(_pParse.XpTriggerTab) == nil) {
_sqlite3AutoincrementEnd(tls, _pParse)
}
- if (((_db.X6)&i32(128)) != 0 && ((*XTable)(_pParse.X40) == nil)) && ((_pParse.X6) == 0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _regRowCount, i32(1))
- _sqlite3VdbeSetNumCols(tls, _v, i32(1))
- _sqlite3VdbeSetColName(tls, _v, i32(0), i32(0), str(116759), nil)
+ if ((_db.Xflags&int32(128)) != 0 && (_pParse.XpTriggerTab == nil)) && (_pParse.Xnested == 0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _regRowCount, int32(1))
+ _sqlite3VdbeSetNumCols(tls, _v, int32(1))
+ _sqlite3VdbeSetColName(tls, _v, int32(0), int32(0), str(116787), nil)
}
_update_cleanup:
_sqlite3AuthContextPop(tls, &_sContext)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_aXRef))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_aXRef))
_sqlite3SrcListDelete(tls, _db, _pTabList)
_sqlite3ExprListDelete(tls, _db, _pChanges)
_sqlite3ExprDelete(tls, _db, _pWhere)
- _ = _sContext
- _ = _sNC
_ = _aiCurOnePass
}
var _sqlite3UpdateØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3UpdateØ00__func__Ø000[0], str(116772), 14)
-}
-
-// Generate code for an UPDATE of a virtual table.
-//
-// There are two possible strategies - the default and the special
-// "onepass" strategy. Onepass is only used if the virtual table
-// implementation indicates that pWhere may match at most one row.
-//
-// The default strategy is to create an ephemeral table that contains
-// for each row to be changed:
-//
-// (A) The original rowid of that row.
-// (B) The revised rowid for the row.
-// (C) The content of every column in the row.
-//
-// Then loop through the contents of this ephemeral table executing a
-// VUpdate for each row. When finished, drop the ephemeral table.
-//
-// The "onepass" strategy does not use an ephemeral table. Instead, it
-// stores the same values (A, B and C above) in a register array and
-// makes a single invocation of VUpdate.
+ crt.Xstrncpy(nil, &_sqlite3UpdateØ00__func__Ø000[0], str(116800), 14)
+}
+
+// C comment
+// /*
+// ** Generate code for an UPDATE of a virtual table.
+// **
+// ** There are two possible strategies - the default and the special
+// ** "onepass" strategy. Onepass is only used if the virtual table
+// ** implementation indicates that pWhere may match at most one row.
+// **
+// ** The default strategy is to create an ephemeral table that contains
+// ** for each row to be changed:
+// **
+// ** (A) The original rowid of that row.
+// ** (B) The revised rowid for the row.
+// ** (C) The content of every column in the row.
+// **
+// ** Then loop through the contents of this ephemeral table executing a
+// ** VUpdate for each row. When finished, drop the ephemeral table.
+// **
+// ** The "onepass" strategy does not use an ephemeral table. Instead, it
+// ** stores the same values (A, B and C above) in a register array and
+// ** makes a single invocation of VUpdate.
+// */
func _updateVirtualTable(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList, _pTab *XTable, _pChanges *XExprList, _pRowid *XExpr, _aXRef *int32, _pWhere *XExpr, _onError int32) {
var _ephemTab, _i, _nArg, _regArg, _regRec, _regRowid, _iCsr, _bOnePass, _addr int32
var _pVTab *int8
@@ -98127,48 +99267,44 @@ func _updateVirtualTable(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList, _pTab *
var _v *TVdbe
var _aDummy [2]int32
var _pWInfo *XWhereInfo
- _v = (*TVdbe)(_pParse.X2)
- _db = (*Xsqlite3)(_pParse.X0)
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pVTab = (*int8)(unsafe.Pointer(_sqlite3GetVTable(tls, _db, _pTab)))
- _nArg = i32(2) + int32(_pTab.X11)
- _iCsr = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr(i32(0)))).X11
+ _nArg = int32(2) + int32(_pTab.XnCol)
+ _iCsr = elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), 0).XiCursor
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(124539), unsafe.Pointer((*int8)(unsafe.Pointer(&_updateVirtualTableØ00__func__Ø000))), unsafe.Pointer(str(41861)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(124539), unsafe.Pointer(&_updateVirtualTableØ00__func__Ø000), unsafe.Pointer(str(41816)))
crt.X__builtin_abort(tls)
}
}()
- _ephemTab = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _addr = _sqlite3VdbeAddOp2(tls, _v, i32(110), _ephemTab, _nArg)
- _regArg = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + _nArg
- sink1(*p)
- }
- _regRec = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _regRowid = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pSrc, _pWhere, nil, nil, uint16(i32(4)), i32(0))
+ _ephemTab = postInc2(&_pParse.XnTab, 1)
+ _addr = _sqlite3VdbeAddOp2(tls, _v, int32(110), _ephemTab, _nArg)
+ _regArg = _pParse.XnMem + int32(1)
+ _pParse.XnMem += _nArg
+ _regRec = preInc2(&_pParse.XnMem, 1)
+ _regRowid = preInc2(&_pParse.XnMem, 1)
+ _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pSrc, _pWhere, nil, nil, uint16(4), int32(0))
if _pWInfo == nil {
return
}
- _sqlite3VdbeAddOp2(tls, _v, i32(125), _iCsr, _regArg)
+ _sqlite3VdbeAddOp2(tls, _v, int32(125), _iCsr, _regArg)
if _pRowid != nil {
- _sqlite3ExprCode(tls, _pParse, _pRowid, _regArg+i32(1))
+ _sqlite3ExprCode(tls, _pParse, _pRowid, _regArg+int32(1))
goto _4
}
- _sqlite3VdbeAddOp2(tls, _v, i32(125), _iCsr, _regArg+i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(125), _iCsr, _regArg+int32(1))
_4:
- _i = i32(0)
+ _i = int32(0)
_5:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _8
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aXRef)) + 4*uintptr(_i)))) >= i32(0) {
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pChanges.X2)))))+20*uintptr(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aXRef)) + 4*uintptr(_i)))))).X0), (_regArg+i32(2))+_i)
+ if (*elem8(_aXRef, uintptr(_i))) >= int32(0) {
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pChanges.Xa)), uintptr(*elem8(_aXRef, uintptr(_i)))).XpExpr), (_regArg+int32(2))+_i)
goto _10
}
- _sqlite3VdbeAddOp3(tls, _v, i32(159), _iCsr, _i, (_regArg+i32(2))+_i)
+ _sqlite3VdbeAddOp3(tls, _v, int32(159), _iCsr, _i, (_regArg+int32(2))+_i)
_10:
_i += 1
goto _5
@@ -98178,43 +99314,43 @@ _8:
goto _11
}
_sqlite3VdbeChangeToNoop(tls, _v, _addr)
- if (*XParse)(_pParse.X39) == nil {
- *(*uint8)(unsafe.Pointer(&(_pParse.X8))) = uint8(i32(0))
+ if (*XParse)(_pParse.XpToplevel) == nil {
+ _pParse.XisMultiWrite = 0
}
goto _13
_11:
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _regArg, _nArg, _regRec)
- _sqlite3VdbeAddOp2(tls, _v, i32(117), _ephemTab, _regRowid)
- _sqlite3VdbeAddOp3(tls, _v, i32(118), _ephemTab, _regRec, _regRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _regArg, _nArg, _regRec)
+ _sqlite3VdbeAddOp2(tls, _v, int32(117), _ephemTab, _regRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), _ephemTab, _regRec, _regRowid)
_13:
- if _bOnePass != i32(0) {
+ if _bOnePass != int32(0) {
goto _14
}
_sqlite3WhereEnd(tls, _pWInfo)
- _addr = _sqlite3VdbeAddOp1(tls, _v, i32(37), _ephemTab)
- _i = i32(0)
+ _addr = _sqlite3VdbeAddOp1(tls, _v, int32(37), _ephemTab)
+ _i = int32(0)
_15:
if _i >= _nArg {
goto _18
}
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _ephemTab, _i, _regArg+_i)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _ephemTab, _i, _regArg+_i)
_i += 1
goto _15
_18:
_14:
_sqlite3VtabMakeWritable(tls, _pParse, _pTab)
- _sqlite3VdbeAddOp4(tls, _v, i32(12), i32(0), _nArg, _regArg, _pVTab, i32(-8))
+ _sqlite3VdbeAddOp4(tls, _v, int32(12), int32(0), _nArg, _regArg, _pVTab, int32(-8))
_sqlite3VdbeChangeP5(tls, _v, uint16(func() int32 {
- if _onError == i32(10) {
- return i32(2)
+ if _onError == int32(10) {
+ return int32(2)
}
return _onError
}()))
_sqlite3MayAbort(tls, _pParse)
- if _bOnePass == i32(0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _ephemTab, _addr+i32(1))
+ if _bOnePass == int32(0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _ephemTab, _addr+int32(1))
_sqlite3VdbeJumpHere(tls, _v, _addr)
- _sqlite3VdbeAddOp2(tls, _v, i32(114), _ephemTab, i32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(114), _ephemTab, int32(0))
goto _22
}
_sqlite3WhereEnd(tls, _pWInfo)
@@ -98225,50 +99361,43 @@ _22:
var _updateVirtualTableØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_updateVirtualTableØ00__func__Ø000[0], str(116786), 19)
+ crt.Xstrncpy(nil, &_updateVirtualTableØ00__func__Ø000[0], str(116814), 19)
}
-// This function is called before generating code to update or delete a
-// row contained in table pTab.
+// C comment
+// /*
+// ** This function is called before generating code to update or delete a
+// ** row contained in table pTab.
+// */
func _sqlite3FkOldmask(tls *crt.TLS, _pParse *XParse, _pTab *XTable) (r0 uint32) {
var _1_i int32
var _mask uint32
var _3_pIdx *XIndex
var _1_p *XFKey
- _mask = u32(0)
- if (((*Xsqlite3)(_pParse.X0).X6) & i32(524288)) == 0 {
+ _mask = uint32(0)
+ if (((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(524288)) == 0 {
goto _0
}
- _1_p = (*XFKey)(_pTab.X4)
+ _1_p = (*XFKey)(_pTab.XpFKey)
_1:
if _1_p == nil {
goto _4
}
- _1_i = i32(0)
+ _1_i = int32(0)
_5:
- if _1_i >= (_1_p.X5) {
+ if _1_i >= _1_p.XnCol {
goto _8
}
- {
- p := &_mask
- *p = (*p) | func() uint32 {
- if ((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_1_p.X9))))) + 8*uintptr(_1_i))).X0) > i32(31) {
- return u32(4294967295)
- }
- return (u32(1) << uint((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_1_p.X9)))))+8*uintptr(_1_i))).X0))
- }()
- sink5(*p)
- }
+ _mask |= func() uint32 {
+ if (elem116((*t117)(unsafe.Pointer(&_1_p.XaCol)), uintptr(_1_i)).XiFrom) > int32(31) {
+ return uint32(4294967295)
+ }
+ return (uint32(1) << uint(elem116((*t117)(unsafe.Pointer(&_1_p.XaCol)), uintptr(_1_i)).XiFrom))
+ }()
_1_i += 1
goto _5
_8:
- _1_p = (*XFKey)(_1_p.X1)
+ _1_p = (*XFKey)(_1_p.XpNextFrom)
goto _1
_4:
_1_p = _sqlite3FkReferences(tls, _pTab)
@@ -98281,76 +99410,75 @@ _11:
if _3_pIdx == nil {
goto _15
}
- _1_i = i32(0)
+ _1_i = int32(0)
_16:
- if _1_i >= int32(_3_pIdx.X13) {
+ if _1_i >= int32(_3_pIdx.XnKeyCol) {
goto _19
}
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pIdx.X1)) + 2*uintptr(_1_i)))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108482), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkOldmaskØ00__func__Ø000))), unsafe.Pointer(str(116805)))
+ if int32(*elem50(_3_pIdx.XaiColumn, uintptr(_1_i))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108482), unsafe.Pointer(&_sqlite3FkOldmaskØ00__func__Ø000), unsafe.Pointer(str(116833)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_mask
- *p = (*p) | func() uint32 {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pIdx.X1)) + 2*uintptr(_1_i)))) > i32(31) {
- return u32(4294967295)
- }
- return (u32(1) << uint(int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_3_pIdx.X1)) + 2*uintptr(_1_i))))))
- }()
- sink5(*p)
- }
+ _mask |= func() uint32 {
+ if int32(*elem50(_3_pIdx.XaiColumn, uintptr(_1_i))) > int32(31) {
+ return uint32(4294967295)
+ }
+ return (uint32(1) << uint(int32(*elem50(_3_pIdx.XaiColumn, uintptr(_1_i)))))
+ }()
_1_i += 1
goto _16
_19:
_15:
- _1_p = (*XFKey)(_1_p.X3)
+ _1_p = (*XFKey)(_1_p.XpNextTo)
goto _11
_14:
_0:
return _mask
}
-// A foreign key constraint requires that the key columns in the parent
-// table are collectively subject to a UNIQUE or PRIMARY KEY constraint.
-// Given that pParent is the parent table for foreign key constraint pFKey,
-// search the schema for a unique index on the parent key columns.
-//
-// If successful, zero is returned. If the parent key is an INTEGER PRIMARY
-// KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx
-// is set to point to the unique index.
-//
-// If the parent key consists of a single column (the foreign key constraint
-// is not a composite foreign key), output variable *paiCol is set to NULL.
-// Otherwise, it is set to point to an allocated array of size N, where
-// N is the number of columns in the parent key. The first element of the
-// array is the index of the child table column that is mapped by the FK
-// constraint to the parent table column stored in the left-most column
-// of index *ppIdx. The second element of the array is the index of the
-// child table column that corresponds to the second left-most column of
-// *ppIdx, and so on.
-//
-// If the required index cannot be found, either because:
-//
-// 1) The named parent key columns do not exist, or
-//
-// 2) The named parent key columns do exist, but are not subject to a
-// UNIQUE or PRIMARY KEY constraint, or
-//
-// 3) No parent key columns were provided explicitly as part of the
-// foreign key definition, and the parent table does not have a
-// PRIMARY KEY, or
-//
-// 4) No parent key columns were provided explicitly as part of the
-// foreign key definition, and the PRIMARY KEY of the parent table
-// consists of a different number of columns to the child key in
-// the child table.
-//
-// then non-zero is returned, and a "foreign key mismatch" error loaded
-// into pParse. If an OOM error occurs, non-zero is returned and the
-// pParse->db->mallocFailed flag is set.
+// C comment
+// /*
+// ** A foreign key constraint requires that the key columns in the parent
+// ** table are collectively subject to a UNIQUE or PRIMARY KEY constraint.
+// ** Given that pParent is the parent table for foreign key constraint pFKey,
+// ** search the schema for a unique index on the parent key columns.
+// **
+// ** If successful, zero is returned. If the parent key is an INTEGER PRIMARY
+// ** KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx
+// ** is set to point to the unique index.
+// **
+// ** If the parent key consists of a single column (the foreign key constraint
+// ** is not a composite foreign key), output variable *paiCol is set to NULL.
+// ** Otherwise, it is set to point to an allocated array of size N, where
+// ** N is the number of columns in the parent key. The first element of the
+// ** array is the index of the child table column that is mapped by the FK
+// ** constraint to the parent table column stored in the left-most column
+// ** of index *ppIdx. The second element of the array is the index of the
+// ** child table column that corresponds to the second left-most column of
+// ** *ppIdx, and so on.
+// **
+// ** If the required index cannot be found, either because:
+// **
+// ** 1) The named parent key columns do not exist, or
+// **
+// ** 2) The named parent key columns do exist, but are not subject to a
+// ** UNIQUE or PRIMARY KEY constraint, or
+// **
+// ** 3) No parent key columns were provided explicitly as part of the
+// ** foreign key definition, and the parent table does not have a
+// ** PRIMARY KEY, or
+// **
+// ** 4) No parent key columns were provided explicitly as part of the
+// ** foreign key definition, and the PRIMARY KEY of the parent table
+// ** consists of a different number of columns to the child key in
+// ** the child table.
+// **
+// ** then non-zero is returned, and a "foreign key mismatch" error loaded
+// ** into pParse. If an OOM error occurs, non-zero is returned and the
+// ** pParse->db->mallocFailed flag is set.
+// */
func _sqlite3FkLocateIndex(tls *crt.TLS, _pParse *XParse, _pParent *XTable, _pFKey *XFKey, _ppIdx **XIndex, _paiCol **int32) (r0 int32) {
var _10_iCol int16
var _nCol, _8_i, _9_i, _9_j int32
@@ -98359,40 +99487,37 @@ func _sqlite3FkLocateIndex(tls *crt.TLS, _pParse *XParse, _pParent *XTable, _pFK
var _pIdx *XIndex
_pIdx = nil
_aiCol = nil
- _nCol = _pFKey.X5
- _zKey = (*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(i32(0)))).X1
+ _nCol = _pFKey.XnCol
+ _zKey = elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), 0).XzCol
func() {
if _ppIdx == nil || (*_ppIdx) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107609), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkLocateIndexØ00__func__Ø000))), unsafe.Pointer(str(116826)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107609), unsafe.Pointer(&_sqlite3FkLocateIndexØ00__func__Ø000), unsafe.Pointer(str(116854)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _paiCol != nil && (*_paiCol) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107610), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkLocateIndexØ00__func__Ø000))), unsafe.Pointer(str(116845)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107610), unsafe.Pointer(&_sqlite3FkLocateIndexØ00__func__Ø000), unsafe.Pointer(str(116873)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pParse == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107611), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkLocateIndexØ00__func__Ø000))), unsafe.Pointer(str(115716)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107611), unsafe.Pointer(&_sqlite3FkLocateIndexØ00__func__Ø000), unsafe.Pointer(str(115744)))
crt.X__builtin_abort(tls)
}
}()
- if _nCol != i32(1) {
+ if _nCol != int32(1) {
goto _8
}
- if int32(_pParent.X10) < i32(0) {
+ if int32(_pParent.XiPKey) < int32(0) {
goto _9
}
if _zKey == nil {
- return i32(0)
+ return int32(0)
}
- if _sqlite3StrICmp(tls, (*XColumn)(unsafe.Pointer(uintptr(_pParent.X1)+16*uintptr(_pParent.X10))).X0, _zKey) == 0 {
- return i32(0)
+ if _sqlite3StrICmp(tls, elem41((*XColumn)(_pParent.XaCol), uintptr(_pParent.XiPKey)).XzName, _zKey) == 0 {
+ return int32(0)
}
_9:
goto _13
@@ -98401,43 +99526,40 @@ _8:
goto _13
}
func() {
- if _nCol <= i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107634), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkLocateIndexØ00__func__Ø000))), unsafe.Pointer(str(116867)))
+ if _nCol <= int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107634), unsafe.Pointer(&_sqlite3FkLocateIndexØ00__func__Ø000), unsafe.Pointer(str(116895)))
crt.X__builtin_abort(tls)
}
}()
- _aiCol = (*int32)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.X0), uint64(uint32(_nCol)*u32(4))))
+ _aiCol = (*int32)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.Xdb), uint64(uint32(_nCol)*uint32(4))))
if _aiCol == nil {
- return i32(1)
+ return int32(1)
}
*_paiCol = _aiCol
_13:
- _pIdx = (*XIndex)(_pParent.X2)
+ _pIdx = (*XIndex)(_pParent.XpIndex)
_17:
if _pIdx == nil {
goto _20
}
- if int32(_pIdx.X13) != _nCol || int32(_pIdx.X15) == i32(0) || (*XExpr)(_pIdx.X9) != nil {
+ if int32(_pIdx.XnKeyCol) != _nCol || int32(_pIdx.XonError) == int32(0) || (*XExpr)(_pIdx.XpPartIdxWhere) != nil {
goto _23
}
if _zKey != nil {
goto _24
}
- if int32((uint32(_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) != i32(2) {
+ if int32((uint32(_pIdx.XidxType)<<30)>>30) != int32(2) {
goto _25
}
if _aiCol == nil {
goto _26
}
- _8_i = i32(0)
+ _8_i = int32(0)
_27:
if _8_i >= _nCol {
goto _30
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCol)) + 4*uintptr(_8_i))) = (*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(_8_i))).X0
+ *elem8(_aiCol, uintptr(_8_i)) = elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), uintptr(_8_i)).XiFrom
_8_i += 1
goto _27
_30:
@@ -98446,39 +99568,33 @@ _26:
_25:
goto _31
_24:
- _9_i = i32(0)
+ _9_i = int32(0)
_32:
if _9_i >= _nCol {
goto _35
}
- _10_iCol = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_9_i)))
- if int32(_10_iCol) < i32(0) {
+ _10_iCol = *elem50(_pIdx.XaiColumn, uintptr(_9_i))
+ if int32(_10_iCol) < int32(0) {
goto _35
}
- _10_zDfltColl = (*XColumn)(unsafe.Pointer(uintptr(_pParent.X1) + 16*uintptr(_10_iCol))).X2
+ _10_zDfltColl = elem41((*XColumn)(_pParent.XaCol), uintptr(_10_iCol)).XzColl
if _10_zDfltColl == nil {
_10_zDfltColl = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
}
- if _sqlite3StrICmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_9_i))), _10_zDfltColl) != 0 {
+ if _sqlite3StrICmp(tls, *elem0(_pIdx.XazColl, uintptr(_9_i)), _10_zDfltColl) != 0 {
goto _35
}
- _10_zIdxCol = (*XColumn)(unsafe.Pointer(uintptr(_pParent.X1) + 16*uintptr(_10_iCol))).X0
- _9_j = i32(0)
+ _10_zIdxCol = elem41((*XColumn)(_pParent.XaCol), uintptr(_10_iCol)).XzName
+ _9_j = int32(0)
_39:
if _9_j >= _nCol {
goto _42
}
- if _sqlite3StrICmp(tls, (*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9)))))+8*uintptr(_9_j))).X1, _10_zIdxCol) != i32(0) {
+ if _sqlite3StrICmp(tls, elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), uintptr(_9_j)).XzCol, _10_zIdxCol) != int32(0) {
goto _43
}
if _aiCol != nil {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCol)) + 4*uintptr(_9_i))) = (*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(_9_j))).X0
+ *elem8(_aiCol, uintptr(_9_i)) = elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), uintptr(_9_j)).XiFrom
}
goto _42
_43:
@@ -98496,90 +99612,93 @@ _35:
}
_31:
_23:
- _pIdx = (*XIndex)(_pIdx.X5)
+ _pIdx = (*XIndex)(_pIdx.XpNext)
goto _17
_20:
if _pIdx != nil {
goto _47
}
- if (_pParse.X47) == 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(116874), unsafe.Pointer((*XTable)(_pFKey.X0).X0), unsafe.Pointer(_pFKey.X2))
+ if _pParse.XdisableTriggers == 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(116902), unsafe.Pointer((*XTable)(_pFKey.XpFrom).XzName), unsafe.Pointer(_pFKey.XzTo))
}
- _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_aiCol))
- return i32(1)
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_aiCol))
+ return int32(1)
_47:
*_ppIdx = _pIdx
- return i32(0)
+ return int32(0)
}
var _sqlite3FkLocateIndexØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FkLocateIndexØ00__func__Ø000[0], str(116919), 21)
+ crt.Xstrncpy(nil, &_sqlite3FkLocateIndexØ00__func__Ø000[0], str(116947), 21)
}
var _sqlite3FkOldmaskØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FkOldmaskØ00__func__Ø000[0], str(116940), 17)
-}
-
-// This is called to code the required FOR EACH ROW triggers for an operation
-// on table pTab. The operation to code triggers for (INSERT, UPDATE or DELETE)
-// is given by the op parameter. The tr_tm parameter determines whether the
-// BEFORE or AFTER triggers are coded. If the operation is an UPDATE, then
-// parameter pChanges is passed the list of columns being modified.
-//
-// If there are no triggers that fire at the specified time for the specified
-// operation on pTab, this function is a no-op.
-//
-// The reg argument is the address of the first in an array of registers
-// that contain the values substituted for the new.* and old.* references
-// in the trigger program. If N is the number of columns in table pTab
-// (a copy of pTab->nCol), then registers are populated as follows:
-//
-// Register Contains
-// ------------------------------------------------------
-// reg+0 OLD.rowid
-// reg+1 OLD.* value of left-most column of pTab
-// ... ...
-// reg+N OLD.* value of right-most column of pTab
-// reg+N+1 NEW.rowid
-// reg+N+2 OLD.* value of left-most column of pTab
-// ... ...
-// reg+N+N+1 NEW.* value of right-most column of pTab
-//
-// For ON DELETE triggers, the registers containing the NEW.* values will
-// never be accessed by the trigger program, so they are not allocated or
-// populated by the caller (there is no data to populate them with anyway).
-// Similarly, for ON INSERT triggers the values stored in the OLD.* registers
-// are never accessed, and so are not allocated by the caller. So, for an
-// ON INSERT trigger, the value passed to this function as parameter reg
-// is not a readable register, although registers (reg+N) through
-// (reg+N+N+1) are.
-//
-// Parameter orconf is the default conflict resolution algorithm for the
-// trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump
-// is the instruction that control should jump to if a trigger program
-// raises an IGNORE exception.
+ crt.Xstrncpy(nil, &_sqlite3FkOldmaskØ00__func__Ø000[0], str(116968), 17)
+}
+
+// C comment
+// /*
+// ** This is called to code the required FOR EACH ROW triggers for an operation
+// ** on table pTab. The operation to code triggers for (INSERT, UPDATE or DELETE)
+// ** is given by the op parameter. The tr_tm parameter determines whether the
+// ** BEFORE or AFTER triggers are coded. If the operation is an UPDATE, then
+// ** parameter pChanges is passed the list of columns being modified.
+// **
+// ** If there are no triggers that fire at the specified time for the specified
+// ** operation on pTab, this function is a no-op.
+// **
+// ** The reg argument is the address of the first in an array of registers
+// ** that contain the values substituted for the new.* and old.* references
+// ** in the trigger program. If N is the number of columns in table pTab
+// ** (a copy of pTab->nCol), then registers are populated as follows:
+// **
+// ** Register Contains
+// ** ------------------------------------------------------
+// ** reg+0 OLD.rowid
+// ** reg+1 OLD.* value of left-most column of pTab
+// ** ... ...
+// ** reg+N OLD.* value of right-most column of pTab
+// ** reg+N+1 NEW.rowid
+// ** reg+N+2 OLD.* value of left-most column of pTab
+// ** ... ...
+// ** reg+N+N+1 NEW.* value of right-most column of pTab
+// **
+// ** For ON DELETE triggers, the registers containing the NEW.* values will
+// ** never be accessed by the trigger program, so they are not allocated or
+// ** populated by the caller (there is no data to populate them with anyway).
+// ** Similarly, for ON INSERT triggers the values stored in the OLD.* registers
+// ** are never accessed, and so are not allocated by the caller. So, for an
+// ** ON INSERT trigger, the value passed to this function as parameter reg
+// ** is not a readable register, although registers (reg+N) through
+// ** (reg+N+N+1) are.
+// **
+// ** Parameter orconf is the default conflict resolution algorithm for the
+// ** trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump
+// ** is the instruction that control should jump to if a trigger program
+// ** raises an IGNORE exception.
+// */
func _sqlite3CodeRowTrigger(tls *crt.TLS, _pParse *XParse, _pTrigger *XTrigger, _op int32, _pChanges *XExprList, _tr_tm int32, _pTab *XTable, _reg int32, _orconf int32, _ignoreJump int32) {
var _p *XTrigger
func() {
- if _op != i32(110) && _op != i32(108) && _op != i32(109) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123665), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(116957)))
+ if _op != int32(110) && _op != int32(108) && _op != int32(109) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123665), unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(116985)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _tr_tm != i32(1) && _tr_tm != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123666), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(117005)))
+ if _tr_tm != int32(1) && _tr_tm != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123666), unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(117033)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_op == i32(110)) != (_pChanges != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123667), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(117051)))
+ if (_op == int32(110)) != (_pChanges != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123667), unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(117079)))
crt.X__builtin_abort(tls)
}
}()
@@ -98589,27 +99708,27 @@ _9:
goto _12
}
func() {
- if (*XSchema)(_p.X6) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123674), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(117082)))
+ if (*XSchema)(_p.XpSchema) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123674), unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(117110)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSchema)(_p.X7) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123675), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(117096)))
+ if (*XSchema)(_p.XpTabSchema) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123675), unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(117124)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSchema)(_p.X6) != (*XSchema)(_p.X7) && (*XSchema)(_p.X6) != (*XSchema)((*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_pParse.X0).X4)+16*uintptr(i32(1)))).X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123676), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000))), unsafe.Pointer(str(117113)))
+ if (*XSchema)(_p.XpSchema) != (*XSchema)(_p.XpTabSchema) && (*XSchema)(_p.XpSchema) != (*XSchema)(elem27((*XDb)((*Xsqlite3)(_pParse.Xdb).XaDb), uintptr(1)).XpSchema) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123676), unsafe.Pointer(&_sqlite3CodeRowTriggerØ00__func__Ø000), unsafe.Pointer(str(117141)))
crt.X__builtin_abort(tls)
}
}()
- if ((int32(_p.X2) == _op) && (int32(_p.X3) == _tr_tm)) && _checkColumnOverlap(tls, (*XIdList)(_p.X5), _pChanges) != 0 {
+ if ((int32(_p.Xop) == _op) && (int32(_p.Xtr_tm) == _tr_tm)) && _checkColumnOverlap(tls, (*XIdList)(_p.XpColumns), _pChanges) != 0 {
_sqlite3CodeRowTriggerDirect(tls, _pParse, _p, _pTab, _reg, _orconf, _ignoreJump)
}
- _p = (*XTrigger)(_p.X9)
+ _p = (*XTrigger)(_p.XpNext)
goto _9
_12:
}
@@ -98617,13 +99736,16 @@ _12:
var _sqlite3CodeRowTriggerØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CodeRowTriggerØ00__func__Ø000[0], str(117181), 22)
+ crt.Xstrncpy(nil, &_sqlite3CodeRowTriggerØ00__func__Ø000[0], str(117209), 22)
}
-// Generate code for the trigger program associated with trigger p on
-// table pTab. The reg, orconf and ignoreJump parameters passed to this
-// function are the same as those described in the header function for
-// sqlite3CodeRowTrigger()
+// C comment
+// /*
+// ** Generate code for the trigger program associated with trigger p on
+// ** table pTab. The reg, orconf and ignoreJump parameters passed to this
+// ** function are the same as those described in the header function for
+// ** sqlite3CodeRowTrigger()
+// */
func _sqlite3CodeRowTriggerDirect(tls *crt.TLS, _pParse *XParse, _p *XTrigger, _pTab *XTable, _reg int32, _orconf int32, _ignoreJump int32) {
var _1_bRecursive int32
var _v *TVdbe
@@ -98631,19 +99753,19 @@ func _sqlite3CodeRowTriggerDirect(tls *crt.TLS, _pParse *XParse, _p *XTrigger, _
_v = _sqlite3GetVdbe(tls, _pParse)
_pPrg = _getRowTrigger(tls, _pParse, _p, _pTab, _orconf)
func() {
- if _pPrg == nil && (_pParse.X16) == 0 && ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123591), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeRowTriggerDirectØ00__func__Ø000))), unsafe.Pointer(str(117203)))
+ if _pPrg == nil && _pParse.XnErr == 0 && ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123591), unsafe.Pointer(&_sqlite3CodeRowTriggerDirectØ00__func__Ø000), unsafe.Pointer(str(117231)))
crt.X__builtin_abort(tls)
}
}()
if _pPrg != nil {
- _1_bRecursive = bool2int(((_p.X0) != nil) && (i32(0) == (((*Xsqlite3)(_pParse.X0).X6) & i32(262144))))
- _sqlite3VdbeAddOp4(tls, _v, i32(44), _reg, _ignoreJump, preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1), (*int8)(unsafe.Pointer((*XSubProgram)(_pPrg.X2))), i32(-13))
- _sqlite3VdbeComment(tls, _v, str(117252), unsafe.Pointer(func() *int8 {
- if (_p.X0) != nil {
- return (_p.X0)
+ _1_bRecursive = bool2int((_p.XzName != nil) && (int32(0) == (((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(262144))))
+ _sqlite3VdbeAddOp4(tls, _v, int32(44), _reg, _ignoreJump, preInc2(&_pParse.XnMem, 1), (*int8)(unsafe.Pointer((*XSubProgram)(_pPrg.XpProgram))), int32(-13))
+ _sqlite3VdbeComment(tls, _v, str(117280), unsafe.Pointer(func() *int8 {
+ if _p.XzName != nil {
+ return _p.XzName
}
- return str(117264)
+ return str(117292)
}()), unsafe.Pointer(_onErrorText(tls, _orconf)))
_sqlite3VdbeChangeP5(tls, _v, uint16(uint8(_1_bRecursive)))
}
@@ -98652,90 +99774,93 @@ func _sqlite3CodeRowTriggerDirect(tls *crt.TLS, _pParse *XParse, _p *XTrigger, _
var _sqlite3CodeRowTriggerDirectØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CodeRowTriggerDirectØ00__func__Ø000[0], str(117269), 28)
-}
-
-// Generate code to do constraint checks prior to an INSERT or an UPDATE
-// on table pTab.
-//
-// The regNewData parameter is the first register in a range that contains
-// the data to be inserted or the data after the update. There will be
-// pTab->nCol+1 registers in this range. The first register (the one
-// that regNewData points to) will contain the new rowid, or NULL in the
-// case of a WITHOUT ROWID table. The second register in the range will
-// contain the content of the first table column. The third register will
-// contain the content of the second table column. And so forth.
-//
-// The regOldData parameter is similar to regNewData except that it contains
-// the data prior to an UPDATE rather than afterwards. regOldData is zero
-// for an INSERT. This routine can distinguish between UPDATE and INSERT by
-// checking regOldData for zero.
-//
-// For an UPDATE, the pkChng boolean is true if the true primary key (the
-// rowid for a normal table or the PRIMARY KEY for a WITHOUT ROWID table)
-// might be modified by the UPDATE. If pkChng is false, then the key of
-// the iDataCur content table is guaranteed to be unchanged by the UPDATE.
-//
-// For an INSERT, the pkChng boolean indicates whether or not the rowid
-// was explicitly specified as part of the INSERT statement. If pkChng
-// is zero, it means that the either rowid is computed automatically or
-// that the table is a WITHOUT ROWID table and has no rowid. On an INSERT,
-// pkChng will only be true if the INSERT statement provides an integer
-// value for either the rowid column or its INTEGER PRIMARY KEY alias.
-//
-// The code generated by this routine will store new index entries into
-// registers identified by aRegIdx[]. No index entry is created for
-// indices where aRegIdx[i]==0. The order of indices in aRegIdx[] is
-// the same as the order of indices on the linked list of indices
-// at pTab->pIndex.
-//
-// The caller must have already opened writeable cursors on the main
-// table and all applicable indices (that is to say, all indices for which
-// aRegIdx[] is not zero). iDataCur is the cursor for the main table when
-// inserting or updating a rowid table, or the cursor for the PRIMARY KEY
-// index when operating on a WITHOUT ROWID table. iIdxCur is the cursor
-// for the first index in the pTab->pIndex list. Cursors for other indices
-// are at iIdxCur+N for the N-th element of the pTab->pIndex list.
-//
-// This routine also generates code to check constraints. NOT NULL,
-// CHECK, and UNIQUE constraints are all checked. If a constraint fails,
-// then the appropriate action is performed. There are five possible
-// actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
-//
-// Constraint type Action What Happens
-// --------------- ---------- ----------------------------------------
-// any ROLLBACK The current transaction is rolled back and
-// sqlite3_step() returns immediately with a
-// return code of SQLITE_CONSTRAINT.
-//
-// any ABORT Back out changes from the current command
-// only (do not do a complete rollback) then
-// cause sqlite3_step() to return immediately
-// with SQLITE_CONSTRAINT.
-//
-// any FAIL Sqlite3_step() returns immediately with a
-// return code of SQLITE_CONSTRAINT. The
-// transaction is not rolled back and any
-// changes to prior rows are retained.
-//
-// any IGNORE The attempt in insert or update the current
-// row is skipped, without throwing an error.
-// Processing continues with the next row.
-// (There is an immediate jump to ignoreDest.)
-//
-// NOT NULL REPLACE The NULL value is replace by the default
-// value for that column. If the default value
-// is NULL, the action is the same as ABORT.
-//
-// UNIQUE REPLACE The other row that conflicts with the row
-// being inserted is removed.
-//
-// CHECK REPLACE Illegal. The results in an exception.
-//
-// Which action to take is determined by the overrideError parameter.
-// Or if overrideError==OE_Default, then the pParse->onError parameter
-// is used. Or if pParse->onError==OE_Default then the onError value
-// for the constraint is used.
+ crt.Xstrncpy(nil, &_sqlite3CodeRowTriggerDirectØ00__func__Ø000[0], str(117297), 28)
+}
+
+// C comment
+// /*
+// ** Generate code to do constraint checks prior to an INSERT or an UPDATE
+// ** on table pTab.
+// **
+// ** The regNewData parameter is the first register in a range that contains
+// ** the data to be inserted or the data after the update. There will be
+// ** pTab->nCol+1 registers in this range. The first register (the one
+// ** that regNewData points to) will contain the new rowid, or NULL in the
+// ** case of a WITHOUT ROWID table. The second register in the range will
+// ** contain the content of the first table column. The third register will
+// ** contain the content of the second table column. And so forth.
+// **
+// ** The regOldData parameter is similar to regNewData except that it contains
+// ** the data prior to an UPDATE rather than afterwards. regOldData is zero
+// ** for an INSERT. This routine can distinguish between UPDATE and INSERT by
+// ** checking regOldData for zero.
+// **
+// ** For an UPDATE, the pkChng boolean is true if the true primary key (the
+// ** rowid for a normal table or the PRIMARY KEY for a WITHOUT ROWID table)
+// ** might be modified by the UPDATE. If pkChng is false, then the key of
+// ** the iDataCur content table is guaranteed to be unchanged by the UPDATE.
+// **
+// ** For an INSERT, the pkChng boolean indicates whether or not the rowid
+// ** was explicitly specified as part of the INSERT statement. If pkChng
+// ** is zero, it means that the either rowid is computed automatically or
+// ** that the table is a WITHOUT ROWID table and has no rowid. On an INSERT,
+// ** pkChng will only be true if the INSERT statement provides an integer
+// ** value for either the rowid column or its INTEGER PRIMARY KEY alias.
+// **
+// ** The code generated by this routine will store new index entries into
+// ** registers identified by aRegIdx[]. No index entry is created for
+// ** indices where aRegIdx[i]==0. The order of indices in aRegIdx[] is
+// ** the same as the order of indices on the linked list of indices
+// ** at pTab->pIndex.
+// **
+// ** The caller must have already opened writeable cursors on the main
+// ** table and all applicable indices (that is to say, all indices for which
+// ** aRegIdx[] is not zero). iDataCur is the cursor for the main table when
+// ** inserting or updating a rowid table, or the cursor for the PRIMARY KEY
+// ** index when operating on a WITHOUT ROWID table. iIdxCur is the cursor
+// ** for the first index in the pTab->pIndex list. Cursors for other indices
+// ** are at iIdxCur+N for the N-th element of the pTab->pIndex list.
+// **
+// ** This routine also generates code to check constraints. NOT NULL,
+// ** CHECK, and UNIQUE constraints are all checked. If a constraint fails,
+// ** then the appropriate action is performed. There are five possible
+// ** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
+// **
+// ** Constraint type Action What Happens
+// ** --------------- ---------- ----------------------------------------
+// ** any ROLLBACK The current transaction is rolled back and
+// ** sqlite3_step() returns immediately with a
+// ** return code of SQLITE_CONSTRAINT.
+// **
+// ** any ABORT Back out changes from the current command
+// ** only (do not do a complete rollback) then
+// ** cause sqlite3_step() to return immediately
+// ** with SQLITE_CONSTRAINT.
+// **
+// ** any FAIL Sqlite3_step() returns immediately with a
+// ** return code of SQLITE_CONSTRAINT. The
+// ** transaction is not rolled back and any
+// ** changes to prior rows are retained.
+// **
+// ** any IGNORE The attempt in insert or update the current
+// ** row is skipped, without throwing an error.
+// ** Processing continues with the next row.
+// ** (There is an immediate jump to ignoreDest.)
+// **
+// ** NOT NULL REPLACE The NULL value is replace by the default
+// ** value for that column. If the default value
+// ** is NULL, the action is the same as ABORT.
+// **
+// ** UNIQUE REPLACE The other row that conflicts with the row
+// ** being inserted is removed.
+// **
+// ** CHECK REPLACE Illegal. The results in an exception.
+// **
+// ** Which action to take is determined by the overrideError parameter.
+// ** Or if overrideError==OE_Default, then the pParse->onError parameter
+// ** is used. Or if pParse->onError==OE_Default then the onError value
+// ** for the constraint is used.
+// */
func _sqlite3GenerateConstraintChecks(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _aRegIdx *int32, _iDataCur int32, _iIdxCur int32, _regNewData int32, _regOldData int32, _pkChng uint8, _overrideError uint8, _ignoreDest int32, _pbMayReplace *int32, _aiChng *int32) {
var _i, _ix, _nCol, _onError, _addr1, _seenReplace, _nPkField, _ipkTop, _ipkBottom, _14_allOk, _17_addrRowidOk, _34_regIdx, _34_regR, _34_iThisCur, _34_addrUniqueOk, _37_iField, _37_x, _50_x, _53_addrJump, _53_op, _53_regCmp int32
var _10_zMsg, _16_zName, _54_p4 *int8
@@ -98747,74 +99872,74 @@ func _sqlite3GenerateConstraintChecks(tls *crt.TLS, _pParse *XParse, _pTab *XTab
var _14_pExpr *XExpr
var _pIdx, _pPk *XIndex
_pPk = nil
- _seenReplace = i32(0)
- _ipkTop = i32(0)
- _ipkBottom = i32(0)
- _bAffinityDone = u8(0)
- _isUpdate = uint8(bool2int(_regOldData != i32(0)))
- _db = (*Xsqlite3)(_pParse.X0)
+ _seenReplace = int32(0)
+ _ipkTop = int32(0)
+ _ipkBottom = int32(0)
+ _bAffinityDone = uint8(0)
+ _isUpdate = uint8(bool2int(_regOldData != int32(0)))
+ _db = (*Xsqlite3)(_pParse.Xdb)
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110093), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110093), unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(_pTab.X3) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110094), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000))), unsafe.Pointer(str(102268)))
+ if (*XSelect)(_pTab.XpSelect) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110094), unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000), unsafe.Pointer(str(102296)))
crt.X__builtin_abort(tls)
}
}()
- _nCol = int32(_pTab.X11)
- if ((_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
+ _nCol = int32(_pTab.XnCol)
+ if (_pTab.XtabFlags & uint32(32)) == (0) {
_pPk = nil
- _nPkField = i32(1)
+ _nPkField = int32(1)
goto _5
}
_pPk = _sqlite3PrimaryKeyIndex(tls, _pTab)
- _nPkField = int32(_pPk.X13)
+ _nPkField = int32(_pPk.XnKeyCol)
_5:
- _i = i32(0)
+ _i = int32(0)
_6:
if _i >= _nCol {
goto _9
}
- if _i == int32(_pTab.X10) {
+ if _i == int32(_pTab.XiPKey) {
goto _7
}
- if (_aiChng != nil) && ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiChng)) + 4*uintptr(_i)))) < i32(0)) {
+ if (_aiChng != nil) && ((*elem8(_aiChng, uintptr(_i))) < int32(0)) {
goto _7
}
- _onError = int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_i))).X3)
- if _onError == i32(0) {
+ _onError = int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XnotNull)
+ if _onError == int32(0) {
goto _7
}
- if int32(_overrideError) != i32(10) {
+ if int32(_overrideError) != int32(10) {
_onError = int32(_overrideError)
goto _16
}
- if _onError == i32(10) {
- _onError = i32(2)
+ if _onError == int32(10) {
+ _onError = int32(2)
}
_16:
- if (_onError == i32(5)) && ((*XExpr)((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X1) == nil) {
- _onError = i32(2)
+ if (_onError == int32(5)) && ((*XExpr)(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XpDflt) == nil) {
+ _onError = int32(2)
}
func() {
- if _onError != i32(1) && _onError != i32(2) && _onError != i32(3) && _onError != i32(4) && _onError != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110133), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000))), unsafe.Pointer(str(117297)))
+ if _onError != int32(1) && _onError != int32(2) && _onError != int32(3) && _onError != int32(4) && _onError != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110133), unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000), unsafe.Pointer(str(117325)))
crt.X__builtin_abort(tls)
}
}()
switch _onError {
- case i32(1):
+ case int32(1):
goto _27
- case i32(2):
+ case int32(2):
goto _26
- case i32(3):
+ case int32(3):
goto _27
- case i32(4):
+ case int32(4):
goto _29
default:
goto _30
@@ -98823,23 +99948,23 @@ _16:
_26:
_sqlite3MayAbort(tls, _pParse)
_27:
- _10_zMsg = _sqlite3MPrintf(tls, _db, str(8018), unsafe.Pointer(_pTab.X0), unsafe.Pointer((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X0))
- _sqlite3VdbeAddOp3(tls, _v, i32(54), i32(1299), _onError, (_regNewData+i32(1))+_i)
- _sqlite3VdbeAppendP4(tls, _v, (unsafe.Pointer)(_10_zMsg), i32(-1))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(1)))
+ _10_zMsg = _sqlite3MPrintf(tls, _db, str(7919), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XzName))
+ _sqlite3VdbeAddOp3(tls, _v, int32(54), int32(1299), _onError, (_regNewData+int32(1))+_i)
+ _sqlite3VdbeAppendP4(tls, _v, unsafe.Pointer(_10_zMsg), int32(-1))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(1))
goto _31
_29:
- _sqlite3VdbeAddOp2(tls, _v, i32(75), (_regNewData+i32(1))+_i, _ignoreDest)
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), (_regNewData+int32(1))+_i, _ignoreDest)
goto _31
_30:
func() {
- if _onError != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110156), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000))), unsafe.Pointer(str(117404)))
+ if _onError != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110156), unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000), unsafe.Pointer(str(117432)))
crt.X__builtin_abort(tls)
}
}()
- _addr1 = _sqlite3VdbeAddOp1(tls, _v, i32(76), (_regNewData+i32(1))+_i)
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X1), (_regNewData+i32(1))+_i)
+ _addr1 = _sqlite3VdbeAddOp1(tls, _v, int32(76), (_regNewData+int32(1))+_i)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XpDflt), (_regNewData+int32(1))+_i)
_sqlite3VdbeJumpHere(tls, _v, _addr1)
goto _31
_31:
@@ -98847,40 +99972,40 @@ _7:
_i += 1
goto _6
_9:
- if (*XExprList)(_pTab.X6) == nil || ((_db.X6)&i32(8192)) != i32(0) {
+ if _pTab.XpCheck == nil || (_db.Xflags&int32(8192)) != int32(0) {
goto _35
}
- _13_pCheck = (*XExprList)(_pTab.X6)
- *(*int32)(unsafe.Pointer(&(_pParse.X21))) = _regNewData + i32(1)
+ _13_pCheck = (*XExprList)(_pTab.XpCheck)
+ _pParse.XckBase = _regNewData + int32(1)
_onError = func() int32 {
- if int32(_overrideError) != i32(10) {
+ if int32(_overrideError) != int32(10) {
return int32(_overrideError)
}
- return i32(2)
+ return int32(2)
}()
- _i = i32(0)
+ _i = int32(0)
_38:
- if _i >= (_13_pCheck.X0) {
+ if _i >= _13_pCheck.XnExpr {
goto _41
}
- _14_pExpr = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_13_pCheck.X2))))) + 20*uintptr(_i))).X0)
+ _14_pExpr = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_13_pCheck.Xa)), uintptr(_i)).XpExpr)
if (_aiChng != nil) && _checkConstraintUnchanged(tls, _14_pExpr, _aiChng, int32(_pkChng)) != 0 {
goto _39
}
_14_allOk = _sqlite3VdbeMakeLabel(tls, _v)
- _sqlite3ExprIfTrue(tls, _pParse, _14_pExpr, _14_allOk, i32(16))
- if _onError == i32(4) {
+ _sqlite3ExprIfTrue(tls, _pParse, _14_pExpr, _14_allOk, int32(16))
+ if _onError == int32(4) {
_sqlite3VdbeGoto(tls, _v, _ignoreDest)
goto _45
}
- _16_zName = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_13_pCheck.X2))))) + 20*uintptr(_i))).X1
+ _16_zName = elem57((*TExprList_item)(unsafe.Pointer(&_13_pCheck.Xa)), uintptr(_i)).XzName
if _16_zName == nil {
- _16_zName = _pTab.X0
+ _16_zName = _pTab.XzName
}
- if _onError == i32(5) {
- _onError = i32(2)
+ if _onError == int32(5) {
+ _onError = int32(2)
}
- _sqlite3HaltConstraint(tls, _pParse, i32(275), _onError, _16_zName, int8(i32(0)), uint8(i32(3)))
+ _sqlite3HaltConstraint(tls, _pParse, int32(275), _onError, _16_zName, 0, uint8(3))
_45:
_sqlite3VdbeResolveLabel(tls, _v, _14_allOk)
_39:
@@ -98892,72 +100017,72 @@ _35:
goto _49
}
_17_addrRowidOk = _sqlite3VdbeMakeLabel(tls, _v)
- _onError = int32(_pTab.X14)
- if int32(_overrideError) != i32(10) {
+ _onError = int32(_pTab.XkeyConf)
+ if int32(_overrideError) != int32(10) {
_onError = int32(_overrideError)
goto _52
}
- if _onError == i32(10) {
- _onError = i32(2)
+ if _onError == int32(10) {
+ _onError = int32(2)
}
_52:
if _isUpdate != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(78), _regNewData, _17_addrRowidOk, _regOldData)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(144)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(78), _regNewData, _17_addrRowidOk, _regOldData)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(144))
}
- if _onError != i32(5) || int32(_overrideError) == i32(5) {
+ if _onError != int32(5) || int32(_overrideError) == int32(5) {
goto _55
}
- _pIdx = (*XIndex)(_pTab.X2)
+ _pIdx = (*XIndex)(_pTab.XpIndex)
_56:
if _pIdx == nil {
goto _59
}
- if (int32(_pIdx.X15) == i32(4)) || (int32(_pIdx.X15) == i32(3)) {
- _ipkTop = _sqlite3VdbeAddOp0(tls, _v, i32(13))
+ if (int32(_pIdx.XonError) == int32(4)) || (int32(_pIdx.XonError) == int32(3)) {
+ _ipkTop = _sqlite3VdbeAddOp0(tls, _v, int32(13))
goto _59
}
- _pIdx = (*XIndex)(_pIdx.X5)
+ _pIdx = (*XIndex)(_pIdx.XpNext)
goto _56
_59:
_55:
- _sqlite3VdbeAddOp3(tls, _v, i32(32), _iDataCur, _17_addrRowidOk, _regNewData)
+ _sqlite3VdbeAddOp3(tls, _v, int32(32), _iDataCur, _17_addrRowidOk, _regNewData)
switch _onError {
- case i32(1):
+ case int32(1):
goto _64
- case i32(2):
+ case int32(2):
goto _64
- case i32(3):
+ case int32(3):
goto _64
- case i32(4):
+ case int32(4):
goto _68
- case i32(5):
+ case int32(5):
goto _67
default:
goto _63
}
_63:
- _onError = i32(2)
+ _onError = int32(2)
_64:
_sqlite3RowidConstraint(tls, _pParse, _onError, _pTab)
goto _69
_67:
_27_pTrigger = nil
- if ((_db.X6) & i32(262144)) != 0 {
- _27_pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, i32(109), nil, nil)
+ if (_db.Xflags & int32(262144)) != 0 {
+ _27_pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, int32(109), nil, nil)
}
- if (_27_pTrigger != nil) || _sqlite3FkRequired(tls, _pParse, _pTab, nil, i32(0)) != 0 {
+ if (_27_pTrigger != nil) || _sqlite3FkRequired(tls, _pParse, _pTab, nil, int32(0)) != 0 {
_sqlite3MultiWrite(tls, _pParse)
- _sqlite3GenerateRowDelete(tls, _pParse, _pTab, _27_pTrigger, _iDataCur, _iIdxCur, _regNewData, int16(i32(1)), uint8(i32(0)), uint8(i32(5)), uint8(i32(1)), i32(-1))
+ _sqlite3GenerateRowDelete(tls, _pParse, _pTab, _27_pTrigger, _iDataCur, _iIdxCur, _regNewData, int16(1), 0, uint8(5), uint8(1), int32(-1))
goto _73
}
- if (*XIndex)(_pTab.X2) != nil {
+ if _pTab.XpIndex != nil {
_sqlite3MultiWrite(tls, _pParse)
- _sqlite3GenerateRowIndexDelete(tls, _pParse, _pTab, _iDataCur, _iIdxCur, nil, i32(-1))
+ _sqlite3GenerateRowIndexDelete(tls, _pParse, _pTab, _iDataCur, _iIdxCur, nil, int32(-1))
}
_73:
- _seenReplace = i32(1)
+ _seenReplace = int32(1)
goto _69
_68:
_sqlite3VdbeGoto(tls, _v, _ignoreDest)
@@ -98965,126 +100090,126 @@ _68:
_69:
_sqlite3VdbeResolveLabel(tls, _v, _17_addrRowidOk)
if _ipkTop != 0 {
- _ipkBottom = _sqlite3VdbeAddOp0(tls, _v, i32(13))
+ _ipkBottom = _sqlite3VdbeAddOp0(tls, _v, int32(13))
_sqlite3VdbeJumpHere(tls, _v, _ipkTop)
}
_49:
- *func() **XIndex { _ix = i32(0); return &_pIdx }() = (*XIndex)(_pTab.X2)
+ *func() **XIndex { _ix = int32(0); return &_pIdx }() = (*XIndex)(_pTab.XpIndex)
_76:
if _pIdx == nil {
goto _79
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_ix)))) == i32(0) {
+ if (*elem8(_aRegIdx, uintptr(_ix))) == int32(0) {
goto _77
}
- if int32(_bAffinityDone) == i32(0) {
- _sqlite3TableAffinity(tls, _v, _pTab, _regNewData+i32(1))
- _bAffinityDone = uint8(i32(1))
+ if int32(_bAffinityDone) == int32(0) {
+ _sqlite3TableAffinity(tls, _v, _pTab, _regNewData+int32(1))
+ _bAffinityDone = uint8(1)
}
_34_iThisCur = _iIdxCur + _ix
_34_addrUniqueOk = _sqlite3VdbeMakeLabel(tls, _v)
- if (*XExpr)(_pIdx.X9) != nil {
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_ix))))
- *(*int32)(unsafe.Pointer(&(_pParse.X21))) = _regNewData + i32(1)
- _sqlite3ExprIfFalseDup(tls, _pParse, (*XExpr)(_pIdx.X9), _34_addrUniqueOk, i32(16))
- *(*int32)(unsafe.Pointer(&(_pParse.X21))) = i32(0)
- }
- _34_regIdx = (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_ix)))) + i32(1)
- _i = i32(0)
+ if _pIdx.XpPartIdxWhere != nil {
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), *elem8(_aRegIdx, uintptr(_ix)))
+ _pParse.XckBase = _regNewData + int32(1)
+ _sqlite3ExprIfFalseDup(tls, _pParse, (*XExpr)(_pIdx.XpPartIdxWhere), _34_addrUniqueOk, int32(16))
+ _pParse.XckBase = int32(0)
+ }
+ _34_regIdx = (*elem8(_aRegIdx, uintptr(_ix))) + int32(1)
+ _i = int32(0)
_83:
- if _i >= int32(_pIdx.X14) {
+ if _i >= int32(_pIdx.XnColumn) {
goto _86
}
- _37_iField = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i))))
- if _37_iField == i32(-2) {
- *(*int32)(unsafe.Pointer(&(_pParse.X21))) = _regNewData + i32(1)
- _sqlite3ExprCodeCopy(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.X10).X2)))))+20*uintptr(_i))).X0), _34_regIdx+_i)
- *(*int32)(unsafe.Pointer(&(_pParse.X21))) = i32(0)
- _sqlite3VdbeComment(tls, _v, str(117424), unsafe.Pointer(_pIdx.X0), _i)
+ _37_iField = int32(*elem50(_pIdx.XaiColumn, uintptr(_i)))
+ if _37_iField == int32(-2) {
+ _pParse.XckBase = _regNewData + int32(1)
+ _sqlite3ExprCodeCopy(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pIdx.XaColExpr).Xa))), uintptr(_i)).XpExpr), _34_regIdx+_i)
+ _pParse.XckBase = int32(0)
+ _sqlite3VdbeComment(tls, _v, str(117452), unsafe.Pointer(_pIdx.XzName), _i)
goto _88
}
- if (_37_iField == i32(-1)) || (_37_iField == int32(_pTab.X10)) {
+ if (_37_iField == int32(-1)) || (_37_iField == int32(_pTab.XiPKey)) {
_37_x = _regNewData
goto _91
}
- _37_x = (_37_iField + _regNewData) + i32(1)
+ _37_x = (_37_iField + _regNewData) + int32(1)
_91:
_sqlite3VdbeAddOp2(tls, _v, func() int32 {
- if _37_iField < i32(0) {
- return i32(66)
+ if _37_iField < int32(0) {
+ return int32(66)
}
- return i32(65)
+ return int32(65)
}(), _37_x, _34_regIdx+_i)
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(func() *int8 {
- if _37_iField < i32(0) {
- return str(27227)
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(func() *int8 {
+ if _37_iField < int32(0) {
+ return str(27182)
}
- return ((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_37_iField))).X0)
+ return (elem41((*XColumn)(_pTab.XaCol), uintptr(_37_iField)).XzName)
}()))
_88:
_i += 1
goto _83
_86:
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _34_regIdx, int32(_pIdx.X14), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_ix))))
- _sqlite3VdbeComment(tls, _v, str(107188), unsafe.Pointer(_pIdx.X0))
- if ((_isUpdate != 0) && (_pPk == _pIdx)) && (int32(_pkChng) == i32(0)) {
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _34_regIdx, int32(_pIdx.XnColumn), *elem8(_aRegIdx, uintptr(_ix)))
+ _sqlite3VdbeComment(tls, _v, str(107216), unsafe.Pointer(_pIdx.XzName))
+ if ((_isUpdate != 0) && (_pPk == _pIdx)) && (int32(_pkChng) == int32(0)) {
_sqlite3VdbeResolveLabel(tls, _v, _34_addrUniqueOk)
goto _77
}
- _onError = int32(_pIdx.X15)
- if _onError == i32(0) {
+ _onError = int32(_pIdx.XonError)
+ if _onError == int32(0) {
_sqlite3VdbeResolveLabel(tls, _v, _34_addrUniqueOk)
goto _77
}
- if int32(_overrideError) != i32(10) {
+ if int32(_overrideError) != int32(10) {
_onError = int32(_overrideError)
goto _102
}
- if _onError == i32(10) {
- _onError = i32(2)
+ if _onError == int32(10) {
+ _onError = int32(2)
}
_102:
- if (((((_ix == i32(0)) && ((*XIndex)(_pIdx.X5) == nil)) && (_pPk == _pIdx)) && (_onError == i32(5))) && ((i32(0) == ((_db.X6) & i32(262144))) || (nil == _sqlite3TriggersExist(tls, _pParse, _pTab, i32(109), nil, nil)))) && ((i32(0) == ((_db.X6) & i32(524288))) || ((nil == (*XFKey)(_pTab.X4)) && (nil == _sqlite3FkReferences(tls, _pTab)))) {
+ if (((((_ix == int32(0)) && ((*XIndex)(_pIdx.XpNext) == nil)) && (_pPk == _pIdx)) && (_onError == int32(5))) && ((int32(0) == (_db.Xflags & int32(262144))) || (nil == _sqlite3TriggersExist(tls, _pParse, _pTab, int32(109), nil, nil)))) && ((int32(0) == (_db.Xflags & int32(524288))) || ((nil == (*XFKey)(_pTab.XpFKey)) && (nil == _sqlite3FkReferences(tls, _pTab)))) {
_sqlite3VdbeResolveLabel(tls, _v, _34_addrUniqueOk)
goto _77
}
- _sqlite3VdbeAddOp4Int(tls, _v, i32(28), _34_iThisCur, _34_addrUniqueOk, _34_regIdx, int32(_pIdx.X13))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(28), _34_iThisCur, _34_addrUniqueOk, _34_regIdx, int32(_pIdx.XnKeyCol))
_34_regR = func() int32 {
if _pIdx == _pPk {
return _34_regIdx
}
return _sqlite3GetTempRange(tls, _pParse, _nPkField)
}()
- if _isUpdate == 0 && _onError != i32(5) {
+ if _isUpdate == 0 && _onError != int32(5) {
goto _115
}
- if ((_pTab.X9) & uint32(i32(32))) != uint32(i32(0)) {
+ if (_pTab.XtabFlags & uint32(32)) != (0) {
goto _116
}
- _sqlite3VdbeAddOp2(tls, _v, i32(131), _34_iThisCur, _34_regR)
+ _sqlite3VdbeAddOp2(tls, _v, int32(131), _34_iThisCur, _34_regR)
if _isUpdate != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(78), _34_regR, _34_addrUniqueOk, _regOldData)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(144)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(78), _34_regR, _34_addrUniqueOk, _regOldData)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(144))
}
goto _118
_116:
if _pIdx == _pPk {
goto _119
}
- _i = i32(0)
+ _i = int32(0)
_120:
- if _i >= int32(_pPk.X13) {
+ if _i >= int32(_pPk.XnKeyCol) {
goto _123
}
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i)))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110431), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000))), unsafe.Pointer(str(115265)))
+ if int32(*elem50(_pPk.XaiColumn, uintptr(_i))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110431), unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000), unsafe.Pointer(str(115293)))
crt.X__builtin_abort(tls)
}
}()
- _50_x = int32(_sqlite3ColumnOfIndex(tls, _pIdx, *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i)))))
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _34_iThisCur, _50_x, _34_regR+_i)
- _sqlite3VdbeComment(tls, _v, str(8018), unsafe.Pointer(_pTab.X0), unsafe.Pointer((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i)))))).X0))
+ _50_x = int32(_sqlite3ColumnOfIndex(tls, _pIdx, *elem50(_pPk.XaiColumn, uintptr(_i))))
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _34_iThisCur, _50_x, _34_regR+_i)
+ _sqlite3VdbeComment(tls, _v, str(7919), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(elem41((*XColumn)(_pTab.XaCol), uintptr(*elem50(_pPk.XaiColumn, uintptr(_i)))).XzName))
_i += 1
goto _120
_123:
@@ -99092,33 +100217,33 @@ _119:
if _isUpdate == 0 {
goto _126
}
- _53_addrJump = _sqlite3VdbeCurrentAddr(tls, _v) + int32(_pPk.X13)
- _53_op = i32(77)
+ _53_addrJump = _sqlite3VdbeCurrentAddr(tls, _v) + int32(_pPk.XnKeyCol)
+ _53_op = int32(77)
_53_regCmp = func() int32 {
- if int32((uint32(_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(2) {
+ if int32((uint32(_pIdx.XidxType)<<30)>>30) == int32(2) {
return _34_regIdx
}
return _34_regR
}()
- _i = i32(0)
+ _i = int32(0)
_129:
- if _i >= int32(_pPk.X13) {
+ if _i >= int32(_pPk.XnKeyCol) {
goto _132
}
- _54_p4 = (*int8)(unsafe.Pointer(_sqlite3LocateCollSeq(tls, _pParse, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X8)) + 4*uintptr(_i))))))
- _50_x = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPk.X1)) + 2*uintptr(_i))))
+ _54_p4 = (*int8)(unsafe.Pointer(_sqlite3LocateCollSeq(tls, _pParse, *elem0(_pPk.XazColl, uintptr(_i)))))
+ _50_x = int32(*elem50(_pPk.XaiColumn, uintptr(_i)))
func() {
- if _50_x < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110453), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000))), unsafe.Pointer(str(109743)))
+ if _50_x < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110453), unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000), unsafe.Pointer(str(109771)))
crt.X__builtin_abort(tls)
}
}()
- if _i == (int32(_pPk.X13) - i32(1)) {
+ if _i == (int32(_pPk.XnKeyCol) - int32(1)) {
_53_addrJump = _34_addrUniqueOk
- _53_op = i32(78)
+ _53_op = int32(78)
}
- _sqlite3VdbeAddOp4(tls, _v, _53_op, (_regOldData+i32(1))+_50_x, _53_addrJump, _53_regCmp+_i, _54_p4, i32(-3))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(144)))
+ _sqlite3VdbeAddOp4(tls, _v, _53_op, (_regOldData+int32(1))+_50_x, _53_addrJump, _53_regCmp+_i, _54_p4, int32(-3))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(144))
_i += 1
goto _129
_132:
@@ -99126,19 +100251,19 @@ _126:
_118:
_115:
func() {
- if _onError != i32(1) && _onError != i32(2) && _onError != i32(3) && _onError != i32(4) && _onError != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110470), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000))), unsafe.Pointer(str(117297)))
+ if _onError != int32(1) && _onError != int32(2) && _onError != int32(3) && _onError != int32(4) && _onError != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110470), unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000), unsafe.Pointer(str(117325)))
crt.X__builtin_abort(tls)
}
}()
switch _onError {
- case i32(1):
+ case int32(1):
goto _143
- case i32(2):
+ case int32(2):
goto _143
- case i32(3):
+ case int32(3):
goto _143
- case i32(4):
+ case int32(4):
goto _146
default:
goto _147
@@ -99153,22 +100278,22 @@ _146:
_147:
_59_pTrigger = nil
func() {
- if _onError != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110485), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000))), unsafe.Pointer(str(117404)))
+ if _onError != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110485), unsafe.Pointer(&_sqlite3GenerateConstraintChecksØ00__func__Ø000), unsafe.Pointer(str(117432)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3MultiWrite(tls, _pParse)
- if ((_db.X6) & i32(262144)) != 0 {
- _59_pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, i32(109), nil, nil)
+ if (_db.Xflags & int32(262144)) != 0 {
+ _59_pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, int32(109), nil, nil)
}
- _sqlite3GenerateRowDelete(tls, _pParse, _pTab, _59_pTrigger, _iDataCur, _iIdxCur, _34_regR, int16(_nPkField), uint8(i32(0)), uint8(i32(5)), uint8(func() int32 {
+ _sqlite3GenerateRowDelete(tls, _pParse, _pTab, _59_pTrigger, _iDataCur, _iIdxCur, _34_regR, int16(_nPkField), 0, uint8(5), uint8(func() int32 {
if _pIdx == _pPk {
- return i32(1)
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}()), _34_iThisCur)
- _seenReplace = i32(1)
+ _seenReplace = int32(1)
goto _148
_148:
_sqlite3VdbeResolveLabel(tls, _v, _34_addrUniqueOk)
@@ -99176,11 +100301,11 @@ _148:
_sqlite3ReleaseTempRange(tls, _pParse, _34_regR, _nPkField)
}
_77:
- *func() *int32 { _pIdx = (*XIndex)(_pIdx.X5); return &_ix }() += 1
+ *func() *int32 { _pIdx = (*XIndex)(_pIdx.XpNext); return &_ix }() += 1
goto _76
_79:
if _ipkTop != 0 {
- _sqlite3VdbeGoto(tls, _v, _ipkTop+i32(1))
+ _sqlite3VdbeGoto(tls, _v, _ipkTop+int32(1))
_sqlite3VdbeJumpHere(tls, _v, _ipkBottom)
}
*_pbMayReplace = _seenReplace
@@ -99189,151 +100314,159 @@ _79:
var _sqlite3GenerateConstraintChecksØ00__func__Ø000 [32]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3GenerateConstraintChecksØ00__func__Ø000[0], str(117437), 32)
+ crt.Xstrncpy(nil, &_sqlite3GenerateConstraintChecksØ00__func__Ø000[0], str(117465), 32)
}
-// pExpr is a CHECK constraint on a row that is being UPDATE-ed. The
-// only columns that are modified by the UPDATE are those for which
-// aiChng[i]>=0, and also the ROWID is modified if chngRowid is true.
-//
-// Return true if CHECK constraint pExpr does not use any of the
-// changing columns (or the rowid if it is changing). In other words,
-// return true if this CHECK constraint can be skipped when validating
-// the new row in the UPDATE statement.
+// C comment
+// /*
+// ** pExpr is a CHECK constraint on a row that is being UPDATE-ed. The
+// ** only columns that are modified by the UPDATE are those for which
+// ** aiChng[i]>=0, and also the ROWID is modified if chngRowid is true.
+// **
+// ** Return true if CHECK constraint pExpr does not use any of the
+// ** changing columns (or the rowid if it is changing). In other words,
+// ** return true if this CHECK constraint can be skipped when validating
+// ** the new row in the UPDATE statement.
+// */
func _checkConstraintUnchanged(tls *crt.TLS, _pExpr *XExpr, _aiChng *int32, _chngRowid int32) (r0 int32) {
var _w XWalker
- crt.Xmemset(tls, (unsafe.Pointer)(&_w), i32(0), u32(28))
- *(*uint8)(unsafe.Pointer(&(_w.X5))) = uint8(i32(0))
- *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_w.X1))))) = _checkConstraintExprNode
- *(**int32)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_w.X6))))) = _aiChng
+ crt.Xmemset(tls, unsafe.Pointer(&_w), int32(0), uint32(28))
+ _w.XeCode = 0
+ *(*func(*crt.TLS, *XWalker, *XExpr) int32)(unsafe.Pointer(&_w.XxExprCallback)) = _checkConstraintExprNode
+ *(**int32)(unsafe.Pointer(&_w.Xu)) = _aiChng
_sqlite3WalkExpr(tls, &_w, _pExpr)
if _chngRowid == 0 {
{
- p := (*uint8)(unsafe.Pointer(&(_w.X5)))
- *p = uint8(int32(*p) & i32(-3))
- sink2(*p)
+ p := &_w.XeCode
+ *p = uint8(int32(*p) & int32(-3))
}
}
- return bool2int((_w.X5) == 0)
-
- _ = _w
- panic(0)
+ return bool2int(_w.XeCode == 0)
}
-// This is the Walker callback from checkConstraintUnchanged(). Set
-// bit 0x01 of pWalker->eCode if
-// pWalker->eCode to 0 if this expression node references any of the
-// columns that are being modifed by an UPDATE statement.
+// C comment
+// /* This is the Walker callback from checkConstraintUnchanged(). Set
+// ** bit 0x01 of pWalker->eCode if
+// ** pWalker->eCode to 0 if this expression node references any of the
+// ** columns that are being modifed by an UPDATE statement.
+// */
func _checkConstraintExprNode(tls *crt.TLS, _pWalker *XWalker, _pExpr *XExpr) (r0 int32) {
- if int32(_pExpr.X0) != i32(152) {
+ if int32(_pExpr.Xop) != int32(152) {
goto _0
}
func() {
- if int32(_pExpr.X9) < i32(0) && int32(_pExpr.X9) != i32(-1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109937), unsafe.Pointer((*int8)(unsafe.Pointer(&_checkConstraintExprNodeØ00__func__Ø000))), unsafe.Pointer(str(117469)))
+ if int32(_pExpr.XiColumn) < int32(0) && int32(_pExpr.XiColumn) != int32(-1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109937), unsafe.Pointer(&_checkConstraintExprNodeØ00__func__Ø000), unsafe.Pointer(str(117497)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pExpr.X9) < i32(0) {
+ if int32(_pExpr.XiColumn) < int32(0) {
goto _4
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int32)(unsafe.Pointer((*t58)(unsafe.Pointer(&(_pWalker.X6))))))) + 4*uintptr(_pExpr.X9)))) >= i32(0) {
+ if (*elem8(*(**int32)(unsafe.Pointer(&_pWalker.Xu)), uintptr(_pExpr.XiColumn))) >= int32(0) {
{
- p := (*uint8)(unsafe.Pointer(&(_pWalker.X5)))
- *p = uint8(int32(*p) | i32(1))
- sink2(*p)
+ p := &_pWalker.XeCode
+ *p = uint8(int32(*p) | int32(1))
}
}
goto _6
_4:
{
- p := (*uint8)(unsafe.Pointer(&(_pWalker.X5)))
- *p = uint8(int32(*p) | i32(2))
- sink2(*p)
+ p := &_pWalker.XeCode
+ *p = uint8(int32(*p) | int32(2))
}
_6:
_0:
- return i32(0)
+ return int32(0)
}
var _checkConstraintExprNodeØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_checkConstraintExprNodeØ00__func__Ø000[0], str(117509), 24)
+ crt.Xstrncpy(nil, &_checkConstraintExprNodeØ00__func__Ø000[0], str(117537), 24)
}
-// Code an OP_Halt due to non-unique rowid.
+// C comment
+// /*
+// ** Code an OP_Halt due to non-unique rowid.
+// */
func _sqlite3RowidConstraint(tls *crt.TLS, _pParse *XParse, _onError int32, _pTab *XTable) {
var _rc int32
var _zMsg *int8
- if int32(_pTab.X10) >= i32(0) {
- _zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.X0), str(8018), unsafe.Pointer(_pTab.X0), unsafe.Pointer((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_pTab.X10))).X0))
- _rc = i32(1555)
+ if int32(_pTab.XiPKey) >= int32(0) {
+ _zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.Xdb), str(7919), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(elem41((*XColumn)(_pTab.XaCol), uintptr(_pTab.XiPKey)).XzName))
+ _rc = int32(1555)
goto _1
}
- _zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.X0), str(117533), unsafe.Pointer(_pTab.X0))
- _rc = i32(2579)
+ _zMsg = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.Xdb), str(117561), unsafe.Pointer(_pTab.XzName))
+ _rc = int32(2579)
_1:
- _sqlite3HaltConstraint(tls, _pParse, _rc, _onError, _zMsg, int8(i32(-1)), uint8(i32(2)))
+ _sqlite3HaltConstraint(tls, _pParse, _rc, _onError, _zMsg, int8(-1), uint8(2))
}
-// Indicate that the statement currently under construction might write
-// more than one entry (example: deleting one row then inserting another,
-// inserting multiple rows in a table, or inserting a row and index entries.)
-// If an abort occurs after some of these writes have completed, then it will
-// be necessary to undo the completed writes.
+// C comment
+// /*
+// ** Indicate that the statement currently under construction might write
+// ** more than one entry (example: deleting one row then inserting another,
+// ** inserting multiple rows in a table, or inserting a row and index entries.)
+// ** If an abort occurs after some of these writes have completed, then it will
+// ** be necessary to undo the completed writes.
+// */
func _sqlite3MultiWrite(tls *crt.TLS, _pParse *XParse) {
var _pToplevel *XParse
_pToplevel = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
- *(*uint8)(unsafe.Pointer(&(_pToplevel.X8))) = uint8(i32(1))
-}
-
-// This routine generates VDBE code that causes the deletion of all
-// index entries associated with a single row of a single table, pTab
-//
-// Preconditions:
-//
-// 1. A read/write cursor "iDataCur" must be open on the canonical storage
-// btree for the table pTab. (This will be either the table itself
-// for rowid tables or to the primary key index for WITHOUT ROWID
-// tables.)
-//
-// 2. Read/write cursors for all indices of pTab must be open as
-// cursor number iIdxCur+i for the i-th index. (The pTab->pIndex
-// index is the 0-th index.)
-//
-// 3. The "iDataCur" cursor must be already be positioned on the row
-// that is to be deleted.
+ _pToplevel.XisMultiWrite = uint8(1)
+}
+
+// C comment
+// /*
+// ** This routine generates VDBE code that causes the deletion of all
+// ** index entries associated with a single row of a single table, pTab
+// **
+// ** Preconditions:
+// **
+// ** 1. A read/write cursor "iDataCur" must be open on the canonical storage
+// ** btree for the table pTab. (This will be either the table itself
+// ** for rowid tables or to the primary key index for WITHOUT ROWID
+// ** tables.)
+// **
+// ** 2. Read/write cursors for all indices of pTab must be open as
+// ** cursor number iIdxCur+i for the i-th index. (The pTab->pIndex
+// ** index is the 0-th index.)
+// **
+// ** 3. The "iDataCur" cursor must be already be positioned on the row
+// ** that is to be deleted.
+// */
func _sqlite3GenerateRowIndexDelete(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _iDataCur int32, _iIdxCur int32, _aRegIdx *int32, _iIdxNoSeek int32) {
var _i, _r1, _iPartIdxLabel int32
var _v *TVdbe
var _pIdx, _pPrior, _pPk *XIndex
- _r1 = i32(-1)
+ _r1 = int32(-1)
_pPrior = nil
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
_pPk = func() *XIndex {
- if ((_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
+ if (_pTab.XtabFlags & uint32(32)) == (0) {
return nil
}
return _sqlite3PrimaryKeyIndex(tls, _pTab)
}()
- *func() **XIndex { _i = i32(0); return &_pIdx }() = (*XIndex)(_pTab.X2)
+ *func() **XIndex { _i = int32(0); return &_pIdx }() = (*XIndex)(_pTab.XpIndex)
_2:
if _pIdx == nil {
goto _5
}
func() {
if (_iIdxCur+_i) == _iDataCur && _pPk != _pIdx {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105425), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GenerateRowIndexDeleteØ00__func__Ø000))), unsafe.Pointer(str(117542)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105425), unsafe.Pointer(&_sqlite3GenerateRowIndexDeleteØ00__func__Ø000), unsafe.Pointer(str(117570)))
crt.X__builtin_abort(tls)
}
}()
- if (_aRegIdx != nil) && ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_i)))) == i32(0)) {
+ if (_aRegIdx != nil) && ((*elem8(_aRegIdx, uintptr(_i))) == int32(0)) {
goto _3
}
if _pIdx == _pPk {
@@ -99342,17 +100475,17 @@ _2:
if (_iIdxCur + _i) == _iIdxNoSeek {
goto _3
}
- _r1 = _sqlite3GenerateIndexKey(tls, _pParse, _pIdx, _iDataCur, i32(0), i32(1), &_iPartIdxLabel, _pPrior, _r1)
- _sqlite3VdbeAddOp3(tls, _v, i32(129), _iIdxCur+_i, _r1, int32(func() uint16 {
- if ((uint32((_pIdx.X16)>>uint(i32(3))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- return (_pIdx.X13)
+ _r1 = _sqlite3GenerateIndexKey(tls, _pParse, _pIdx, _iDataCur, int32(0), int32(1), &_iPartIdxLabel, _pPrior, _r1)
+ _sqlite3VdbeAddOp3(tls, _v, int32(129), _iIdxCur+_i, _r1, int32(func() uint16 {
+ if ((uint32(_pIdx.XidxType>>3) << 31) >> 31) != 0 {
+ return _pIdx.XnKeyCol
}
- return (_pIdx.X14)
+ return _pIdx.XnColumn
}()))
_sqlite3ResolvePartIdxLabel(tls, _pParse, _iPartIdxLabel)
_pPrior = _pIdx
_3:
- *func() **XIndex { _i += 1; return &_pIdx }() = (*XIndex)(_pIdx.X5)
+ *func() **XIndex { _i += 1; return &_pIdx }() = (*XIndex)(_pIdx.XpNext)
goto _2
_5:
}
@@ -99360,27 +100493,30 @@ _5:
var _sqlite3GenerateRowIndexDeleteØ00__func__Ø000 [30]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3GenerateRowIndexDeleteØ00__func__Ø000[0], str(117575), 30)
-}
-
-// This function is called when inserting, deleting or updating a row of
-// table pTab to generate VDBE code to perform foreign key constraint
-// processing for the operation.
-//
-// For a DELETE operation, parameter regOld is passed the index of the
-// first register in an array of (pTab->nCol+1) registers containing the
-// rowid of the row being deleted, followed by each of the column values
-// of the row being deleted, from left to right. Parameter regNew is passed
-// zero in this case.
-//
-// For an INSERT operation, regOld is passed zero and regNew is passed the
-// first register of an array of (pTab->nCol+1) registers containing the new
-// row data.
-//
-// For an UPDATE operation, this function is called twice. Once before
-// the original record is deleted from the table using the calling convention
-// described for DELETE. Then again after the original record is deleted
-// but before the new record is inserted using the INSERT convention.
+ crt.Xstrncpy(nil, &_sqlite3GenerateRowIndexDeleteØ00__func__Ø000[0], str(117603), 30)
+}
+
+// C comment
+// /*
+// ** This function is called when inserting, deleting or updating a row of
+// ** table pTab to generate VDBE code to perform foreign key constraint
+// ** processing for the operation.
+// **
+// ** For a DELETE operation, parameter regOld is passed the index of the
+// ** first register in an array of (pTab->nCol+1) registers containing the
+// ** rowid of the row being deleted, followed by each of the column values
+// ** of the row being deleted, from left to right. Parameter regNew is passed
+// ** zero in this case.
+// **
+// ** For an INSERT operation, regOld is passed zero and regNew is passed the
+// ** first register of an array of (pTab->nCol+1) registers containing the new
+// ** row data.
+// **
+// ** For an UPDATE operation, this function is called twice. Once before
+// ** the original record is deleted from the table using the calling convention
+// ** described for DELETE. Then again after the original record is deleted
+// ** but before the new record is inserted using the INSERT convention.
+// */
func _sqlite3FkCheck(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _regOld int32, _regNew int32, _aChange *int32, _bChngRowid int32) {
var _iDb, _isIgnoreErrors, _1_iCol, _1_i, _1_bIgnore, _6_iJump, _7_iReg, _12_rcauth, _21_eAction int32
var _1_aiFree, _1_aiCol, _15_aiCol *int32
@@ -99392,73 +100528,70 @@ func _sqlite3FkCheck(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _regOld int32
var _19_pItem *TSrcList_item
var _1_pIdx, _15_pIdx *XIndex
var _pFKey *XFKey
- _db = (*Xsqlite3)(_pParse.X0)
- _isIgnoreErrors = int32(_pParse.X47)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _isIgnoreErrors = int32(_pParse.XdisableTriggers)
func() {
- if (_regOld == i32(0)) == (_regNew == i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108281), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000))), unsafe.Pointer(str(117605)))
+ if (_regOld == int32(0)) == (_regNew == int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108281), unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000), unsafe.Pointer(str(117633)))
crt.X__builtin_abort(tls)
}
}()
- if ((_db.X6) & i32(524288)) == i32(0) {
+ if (_db.Xflags & int32(524288)) == int32(0) {
return
}
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
- _zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- _pFKey = (*XFKey)(_pTab.X4)
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
+ _zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ _pFKey = (*XFKey)(_pTab.XpFKey)
_3:
if _pFKey == nil {
goto _6
}
_1_pIdx = nil
_1_aiFree = nil
- _1_bIgnore = i32(0)
- if ((_aChange != nil) && (Xsqlite3_stricmp(tls, _pTab.X0, _pFKey.X2) != i32(0))) && (_fkChildIsModified(tls, _pTab, _pFKey, _aChange, _bChngRowid) == i32(0)) {
+ _1_bIgnore = int32(0)
+ if ((_aChange != nil) && (Xsqlite3_stricmp(tls, _pTab.XzName, _pFKey.XzTo) != int32(0))) && (_fkChildIsModified(tls, _pTab, _pFKey, _aChange, _bChngRowid) == int32(0)) {
goto _4
}
- if (_pParse.X47) != 0 {
- _1_pTo = _sqlite3FindTable(tls, _db, _pFKey.X2, _zDb)
+ if _pParse.XdisableTriggers != 0 {
+ _1_pTo = _sqlite3FindTable(tls, _db, _pFKey.XzTo, _zDb)
goto _11
}
- _1_pTo = _sqlite3LocateTable(tls, _pParse, uint32(i32(0)), _pFKey.X2, _zDb)
+ _1_pTo = _sqlite3LocateTable(tls, _pParse, 0, _pFKey.XzTo, _zDb)
_11:
if _1_pTo != nil && _sqlite3FkLocateIndex(tls, _pParse, _1_pTo, _pFKey, &_1_pIdx, &_1_aiFree) == 0 {
goto _13
}
func() {
- if _isIgnoreErrors != i32(0) && (_regOld == i32(0) || _regNew != i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108317), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000))), unsafe.Pointer(str(117630)))
+ if _isIgnoreErrors != int32(0) && (_regOld == int32(0) || _regNew != int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108317), unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000), unsafe.Pointer(str(117658)))
crt.X__builtin_abort(tls)
}
}()
- if (_isIgnoreErrors == 0) || ((_db.X17) != 0) {
+ if (_isIgnoreErrors == 0) || (_db.XmallocFailed != 0) {
return
}
if _1_pTo != nil {
goto _20
}
_6_v = _sqlite3GetVdbe(tls, _pParse)
- _6_iJump = (_sqlite3VdbeCurrentAddr(tls, _6_v) + (_pFKey.X5)) + i32(1)
- _1_i = i32(0)
+ _6_iJump = (_sqlite3VdbeCurrentAddr(tls, _6_v) + _pFKey.XnCol) + int32(1)
+ _1_i = int32(0)
_21:
- if _1_i >= (_pFKey.X5) {
+ if _1_i >= _pFKey.XnCol {
goto _24
}
- _7_iReg = (((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(_1_i))).X0) + _regOld) + i32(1)
- _sqlite3VdbeAddOp2(tls, _6_v, i32(75), _7_iReg, _6_iJump)
+ _7_iReg = ((elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), uintptr(_1_i)).XiFrom) + _regOld) + int32(1)
+ _sqlite3VdbeAddOp2(tls, _6_v, int32(75), _7_iReg, _6_iJump)
_1_i += 1
goto _21
_24:
- _sqlite3VdbeAddOp2(tls, _6_v, i32(147), int32(_pFKey.X6), i32(-1))
+ _sqlite3VdbeAddOp2(tls, _6_v, int32(147), int32(_pFKey.XisDeferred), int32(-1))
_20:
goto _4
_13:
func() {
- if (_pFKey.X5) != i32(1) && (_1_aiFree == nil || _1_pIdx == nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108337), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000))), unsafe.Pointer(str(117676)))
+ if _pFKey.XnCol != int32(1) && (_1_aiFree == nil || _1_pIdx == nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108337), unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000), unsafe.Pointer(str(117704)))
crt.X__builtin_abort(tls)
}
}()
@@ -99466,50 +100599,47 @@ _13:
_1_aiCol = _1_aiFree
goto _30
}
- _1_iCol = (*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(i32(0)))).X0
+ _1_iCol = elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), 0).XiFrom
_1_aiCol = &_1_iCol
_30:
- _1_i = i32(0)
+ _1_i = int32(0)
_31:
- if _1_i >= (_pFKey.X5) {
+ if _1_i >= _pFKey.XnCol {
goto _34
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aiCol)) + 4*uintptr(_1_i)))) == int32(_pTab.X10) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aiCol)) + 4*uintptr(_1_i))) = i32(-1)
+ if (*elem8(_1_aiCol, uintptr(_1_i))) == int32(_pTab.XiPKey) {
+ *elem8(_1_aiCol, uintptr(_1_i)) = int32(-1)
}
func() {
- if _1_pIdx != nil && int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pIdx.X1)) + 2*uintptr(_1_i)))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108349), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000))), unsafe.Pointer(str(117711)))
+ if _1_pIdx != nil && int32(*elem50(_1_pIdx.XaiColumn, uintptr(_1_i))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108349), unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000), unsafe.Pointer(str(117739)))
crt.X__builtin_abort(tls)
}
}()
- if (_db.X59) != nil {
- _12_zCol = (*XColumn)(unsafe.Pointer(uintptr(_1_pTo.X1) + 16*uintptr(func() int16 {
+ if _db.XxAuth != nil {
+ _12_zCol = elem41((*XColumn)(_1_pTo.XaCol), uintptr(func() int16 {
if _1_pIdx != nil {
- return (*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pIdx.X1)) + 2*uintptr(_1_i))))
+ return (*elem50(_1_pIdx.XaiColumn, uintptr(_1_i)))
}
- return (_1_pTo.X10)
- }()))).X0
- _12_rcauth = _sqlite3AuthReadCol(tls, _pParse, _1_pTo.X0, _12_zCol, _iDb)
- _1_bIgnore = bool2int(_12_rcauth == i32(2))
+ return _1_pTo.XiPKey
+ }())).XzName
+ _12_rcauth = _sqlite3AuthReadCol(tls, _pParse, _1_pTo.XzName, _12_zCol, _iDb)
+ _1_bIgnore = bool2int(_12_rcauth == int32(2))
}
_1_i += 1
goto _31
_34:
- _sqlite3TableLock(tls, _pParse, _iDb, _1_pTo.X7, uint8(i32(0)), _1_pTo.X0)
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) += 1
- if _regOld != i32(0) {
- _fkLookupParent(tls, _pParse, _iDb, _1_pTo, _1_pIdx, _pFKey, _1_aiCol, _regOld, i32(-1), _1_bIgnore)
+ _sqlite3TableLock(tls, _pParse, _iDb, _1_pTo.Xtnum, 0, _1_pTo.XzName)
+ _pParse.XnTab += 1
+ if _regOld != int32(0) {
+ _fkLookupParent(tls, _pParse, _iDb, _1_pTo, _1_pIdx, _pFKey, _1_aiCol, _regOld, int32(-1), _1_bIgnore)
}
- if (_regNew != i32(0)) && (_isSetNullAction(tls, _pParse, _pFKey) == 0) {
- _fkLookupParent(tls, _pParse, _iDb, _1_pTo, _1_pIdx, _pFKey, _1_aiCol, _regNew, i32(1), _1_bIgnore)
+ if (_regNew != int32(0)) && (_isSetNullAction(tls, _pParse, _pFKey) == 0) {
+ _fkLookupParent(tls, _pParse, _iDb, _1_pTo, _1_pIdx, _pFKey, _1_aiCol, _regNew, int32(1), _1_bIgnore)
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_aiFree))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_aiFree))
_4:
- _pFKey = (*XFKey)(_pFKey.X1)
+ _pFKey = (*XFKey)(_pFKey.XpNextFrom)
goto _3
_6:
_pFKey = _sqlite3FkReferences(tls, _pTab)
@@ -99519,13 +100649,13 @@ _45:
}
_15_pIdx = nil
_15_aiCol = nil
- if (_aChange != nil) && (_fkParentIsModified(tls, _pTab, _pFKey, _aChange, _bChngRowid) == i32(0)) {
+ if (_aChange != nil) && (_fkParentIsModified(tls, _pTab, _pFKey, _aChange, _bChngRowid) == int32(0)) {
goto _46
}
- if ((((_pFKey.X6) == 0) && (((_db.X6) & i32(33554432)) == 0)) && ((*XParse)(_pParse.X39) == nil)) && ((_pParse.X8) == 0) {
+ if (((_pFKey.XisDeferred == 0) && ((_db.Xflags & int32(33554432)) == 0)) && (_pParse.XpToplevel == nil)) && (_pParse.XisMultiWrite == 0) {
func() {
- if _regOld != i32(0) || _regNew == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108404), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000))), unsafe.Pointer(str(117743)))
+ if _regOld != int32(0) || _regNew == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108404), unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000), unsafe.Pointer(str(117771)))
crt.X__builtin_abort(tls)
}
}()
@@ -99534,14 +100664,14 @@ _45:
if _sqlite3FkLocateIndex(tls, _pParse, _pTab, _pFKey, &_15_pIdx, &_15_aiCol) == 0 {
goto _58
}
- if (_isIgnoreErrors == 0) || ((_db.X17) != 0) {
+ if (_isIgnoreErrors == 0) || (_db.XmallocFailed != 0) {
return
}
goto _46
_58:
func() {
- if _15_aiCol == nil && (_pFKey.X5) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108414), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000))), unsafe.Pointer(str(117766)))
+ if _15_aiCol == nil && _pFKey.XnCol != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108414), unsafe.Pointer(&_sqlite3FkCheckØ00__func__Ø000), unsafe.Pointer(str(117794)))
crt.X__builtin_abort(tls)
}
}()
@@ -99549,29 +100679,29 @@ _58:
if _15_pSrc == nil {
goto _64
}
- _19_pItem = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&(_15_pSrc.X2)))))
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_19_pItem.X4))))) = (*XTable)(_pFKey.X0)
- *(**int8)(unsafe.Pointer(&(_19_pItem.X2))) = (*XTable)(_pFKey.X0).X0
- *(*uint32)(unsafe.Pointer(&((*XTable)(_19_pItem.X4).X8))) += 1
- *(*int32)(unsafe.Pointer(&(_19_pItem.X11))) = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- if _regNew != i32(0) {
- _fkScanChildren(tls, _pParse, _15_pSrc, _pTab, _15_pIdx, _pFKey, _15_aiCol, _regNew, i32(-1))
+ _19_pItem = (*TSrcList_item)(unsafe.Pointer(&_15_pSrc.Xa))
+ *(**XTable)(unsafe.Pointer(&_19_pItem.XpTab)) = (*XTable)(_pFKey.XpFrom)
+ _19_pItem.XzName = (*XTable)(_pFKey.XpFrom).XzName
+ (*XTable)(_19_pItem.XpTab).XnTabRef += 1
+ _19_pItem.XiCursor = postInc2(&_pParse.XnTab, 1)
+ if _regNew != int32(0) {
+ _fkScanChildren(tls, _pParse, _15_pSrc, _pTab, _15_pIdx, _pFKey, _15_aiCol, _regNew, int32(-1))
}
- if _regOld == i32(0) {
+ if _regOld == int32(0) {
goto _66
}
- _21_eAction = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint8)(unsafe.Pointer(&(_pFKey.X7))))) + 1*uintptr(bool2int(_aChange != nil)))))
- _fkScanChildren(tls, _pParse, _15_pSrc, _pTab, _15_pIdx, _pFKey, _15_aiCol, _regOld, i32(1))
- if (((_pFKey.X6) == 0) && (_21_eAction != i32(9))) && (_21_eAction != i32(7)) {
+ _21_eAction = int32(*elem15((*uint8)(unsafe.Pointer(&_pFKey.XaAction)), uintptr(bool2int(_aChange != nil))))
+ _fkScanChildren(tls, _pParse, _15_pSrc, _pTab, _15_pIdx, _pFKey, _15_aiCol, _regOld, int32(1))
+ if ((_pFKey.XisDeferred == 0) && (_21_eAction != int32(9))) && (_21_eAction != int32(7)) {
_sqlite3MayAbort(tls, _pParse)
}
_66:
- *(**int8)(unsafe.Pointer(&(_19_pItem.X2))) = nil
+ _19_pItem.XzName = nil
_sqlite3SrcListDelete(tls, _db, _15_pSrc)
_64:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_15_aiCol))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_15_aiCol))
_46:
- _pFKey = (*XFKey)(_pFKey.X3)
+ _pFKey = (*XFKey)(_pFKey.XpNextTo)
goto _45
_48:
_ = _1_iCol
@@ -99580,204 +100710,213 @@ _48:
var _sqlite3FkCheckØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FkCheckØ00__func__Ø000[0], str(117790), 15)
-}
-
-// This function is called when a row is inserted into or deleted from the
-// child table of foreign key constraint pFKey. If an SQL UPDATE is executed
-// on the child table of pFKey, this function is invoked twice for each row
-// affected - once to "delete" the old row, and then again to "insert" the
-// new row.
-//
-// Each time it is called, this function generates VDBE code to locate the
-// row in the parent table that corresponds to the row being inserted into
-// or deleted from the child table. If the parent row can be found, no
-// special action is taken. Otherwise, if the parent row can *not* be
-// found in the parent table:
-//
-// Operation | FK type | Action taken
-// --------------------------------------------------------------------------
-// INSERT immediate Increment the "immediate constraint counter".
-//
-// DELETE immediate Decrement the "immediate constraint counter".
-//
-// INSERT deferred Increment the "deferred constraint counter".
-//
-// DELETE deferred Decrement the "deferred constraint counter".
-//
-// These operations are identified in the comment at the top of this file
-// (fkey.c) as "I.1" and "D.1".
+ crt.Xstrncpy(nil, &_sqlite3FkCheckØ00__func__Ø000[0], str(117818), 15)
+}
+
+// C comment
+// /*
+// ** This function is called when a row is inserted into or deleted from the
+// ** child table of foreign key constraint pFKey. If an SQL UPDATE is executed
+// ** on the child table of pFKey, this function is invoked twice for each row
+// ** affected - once to "delete" the old row, and then again to "insert" the
+// ** new row.
+// **
+// ** Each time it is called, this function generates VDBE code to locate the
+// ** row in the parent table that corresponds to the row being inserted into
+// ** or deleted from the child table. If the parent row can be found, no
+// ** special action is taken. Otherwise, if the parent row can *not* be
+// ** found in the parent table:
+// **
+// ** Operation | FK type | Action taken
+// ** --------------------------------------------------------------------------
+// ** INSERT immediate Increment the "immediate constraint counter".
+// **
+// ** DELETE immediate Decrement the "immediate constraint counter".
+// **
+// ** INSERT deferred Increment the "deferred constraint counter".
+// **
+// ** DELETE deferred Decrement the "deferred constraint counter".
+// **
+// ** These operations are identified in the comment at the top of this file
+// ** (fkey.c) as "I.1" and "D.1".
+// */
func _fkLookupParent(tls *crt.TLS, _pParse *XParse, _iDb int32, _pTab *XTable, _pIdx *XIndex, _pFKey *XFKey, _aiCol *int32, _regData int32, _nIncr int32, _isIgnore int32) {
var _i, _iCur, _iOk, _2_iReg, _4_iMustBeInt, _4_regTemp, _6_nCol, _6_regTemp, _6_regRec, _8_iJump, _9_iChild, _9_iParent int32
var _v *TVdbe
_v = _sqlite3GetVdbe(tls, _pParse)
- _iCur = (_pParse.X17) - i32(1)
+ _iCur = _pParse.XnTab - int32(1)
_iOk = _sqlite3VdbeMakeLabel(tls, _v)
- if _nIncr < i32(0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(45), int32(_pFKey.X6), _iOk)
+ if _nIncr < int32(0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(45), int32(_pFKey.XisDeferred), _iOk)
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_pFKey.X5) {
+ if _i >= _pFKey.XnCol {
goto _4
}
- _2_iReg = ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCol)) + 4*uintptr(_i)))) + _regData) + i32(1)
- _sqlite3VdbeAddOp2(tls, _v, i32(75), _2_iReg, _iOk)
+ _2_iReg = ((*elem8(_aiCol, uintptr(_i))) + _regData) + int32(1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), _2_iReg, _iOk)
_i += 1
goto _1
_4:
- if _isIgnore != i32(0) {
+ if _isIgnore != int32(0) {
goto _5
}
if _pIdx != nil {
goto _6
}
_4_regTemp = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp2(tls, _v, i32(65), ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCol)) + 4*uintptr(i32(0)))))+i32(1))+_regData, _4_regTemp)
- _4_iMustBeInt = _sqlite3VdbeAddOp2(tls, _v, i32(17), _4_regTemp, i32(0))
- if (_pTab == (*XTable)(_pFKey.X0)) && (_nIncr == i32(1)) {
- _sqlite3VdbeAddOp3(tls, _v, i32(78), _regData, _iOk, _4_regTemp)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(144)))
- }
- _sqlite3OpenTable(tls, _pParse, _iCur, _iDb, _pTab, i32(106))
- _sqlite3VdbeAddOp3(tls, _v, i32(32), _iCur, i32(0), _4_regTemp)
+ _sqlite3VdbeAddOp2(tls, _v, int32(65), ((*elem8(_aiCol, 0))+int32(1))+_regData, _4_regTemp)
+ _4_iMustBeInt = _sqlite3VdbeAddOp2(tls, _v, int32(17), _4_regTemp, int32(0))
+ if (_pTab == (*XTable)(_pFKey.XpFrom)) && (_nIncr == int32(1)) {
+ _sqlite3VdbeAddOp3(tls, _v, int32(78), _regData, _iOk, _4_regTemp)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(144))
+ }
+ _sqlite3OpenTable(tls, _pParse, _iCur, _iDb, _pTab, int32(106))
+ _sqlite3VdbeAddOp3(tls, _v, int32(32), _iCur, int32(0), _4_regTemp)
_sqlite3VdbeGoto(tls, _v, _iOk)
- _sqlite3VdbeJumpHere(tls, _v, _sqlite3VdbeCurrentAddr(tls, _v)-i32(2))
+ _sqlite3VdbeJumpHere(tls, _v, _sqlite3VdbeCurrentAddr(tls, _v)-int32(2))
_sqlite3VdbeJumpHere(tls, _v, _4_iMustBeInt)
_sqlite3ReleaseTempReg(tls, _pParse, _4_regTemp)
goto _9
_6:
- _6_nCol = _pFKey.X5
+ _6_nCol = _pFKey.XnCol
_6_regTemp = _sqlite3GetTempRange(tls, _pParse, _6_nCol)
_6_regRec = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp3(tls, _v, i32(106), _iCur, _pIdx.X11, _iDb)
+ _sqlite3VdbeAddOp3(tls, _v, int32(106), _iCur, _pIdx.Xtnum, _iDb)
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _pIdx)
- _i = i32(0)
+ _i = int32(0)
_10:
if _i >= _6_nCol {
goto _13
}
- _sqlite3VdbeAddOp2(tls, _v, i32(64), ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCol)) + 4*uintptr(_i))))+i32(1))+_regData, _6_regTemp+_i)
+ _sqlite3VdbeAddOp2(tls, _v, int32(64), ((*elem8(_aiCol, uintptr(_i)))+int32(1))+_regData, _6_regTemp+_i)
_i += 1
goto _10
_13:
- if _pTab != (*XTable)(_pFKey.X0) || _nIncr != i32(1) {
+ if _pTab != (*XTable)(_pFKey.XpFrom) || _nIncr != int32(1) {
goto _15
}
- _8_iJump = (_sqlite3VdbeCurrentAddr(tls, _v) + _6_nCol) + i32(1)
- _i = i32(0)
+ _8_iJump = (_sqlite3VdbeCurrentAddr(tls, _v) + _6_nCol) + int32(1)
+ _i = int32(0)
_16:
if _i >= _6_nCol {
goto _19
}
- _9_iChild = ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCol)) + 4*uintptr(_i)))) + i32(1)) + _regData
- _9_iParent = (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i)))) + i32(1)) + _regData
+ _9_iChild = ((*elem8(_aiCol, uintptr(_i))) + int32(1)) + _regData
+ _9_iParent = (int32(*elem50(_pIdx.XaiColumn, uintptr(_i))) + int32(1)) + _regData
func() {
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i)))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107820), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkLookupParentØ00__func__Ø000))), unsafe.Pointer(str(116805)))
+ if int32(*elem50(_pIdx.XaiColumn, uintptr(_i))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107820), unsafe.Pointer(&_fkLookupParentØ00__func__Ø000), unsafe.Pointer(str(116833)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCol)) + 4*uintptr(_i)))) == int32(_pTab.X10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107821), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkLookupParentØ00__func__Ø000))), unsafe.Pointer(str(117805)))
+ if (*elem8(_aiCol, uintptr(_i))) == int32(_pTab.XiPKey) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107821), unsafe.Pointer(&_fkLookupParentØ00__func__Ø000), unsafe.Pointer(str(117833)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i)))) == int32(_pTab.X10) {
+ if int32(*elem50(_pIdx.XaiColumn, uintptr(_i))) == int32(_pTab.XiPKey) {
_9_iParent = _regData
}
- _sqlite3VdbeAddOp3(tls, _v, i32(77), _9_iChild, _8_iJump, _9_iParent)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(16)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(77), _9_iChild, _8_iJump, _9_iParent)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(16))
_i += 1
goto _16
_19:
_sqlite3VdbeGoto(tls, _v, _iOk)
_15:
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _6_regTemp, _6_nCol, _6_regRec, _sqlite3IndexAffinityStr(tls, (*Xsqlite3)(_pParse.X0), _pIdx), _6_nCol)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(30), _iCur, _iOk, _6_regRec, i32(0))
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _6_regTemp, _6_nCol, _6_regRec, _sqlite3IndexAffinityStr(tls, (*Xsqlite3)(_pParse.Xdb), _pIdx), _6_nCol)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(30), _iCur, _iOk, _6_regRec, int32(0))
_sqlite3ReleaseTempReg(tls, _pParse, _6_regRec)
_sqlite3ReleaseTempRange(tls, _pParse, _6_regTemp, _6_nCol)
_9:
_5:
- if ((((_pFKey.X6) == 0) && ((((*Xsqlite3)(_pParse.X0).X6) & i32(33554432)) == 0)) && ((*XParse)(_pParse.X39) == nil)) && ((_pParse.X8) == 0) {
+ if (((_pFKey.XisDeferred == 0) && ((((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(33554432)) == 0)) && (_pParse.XpToplevel == nil)) && (_pParse.XisMultiWrite == 0) {
func() {
- if _nIncr != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107849), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkLookupParentØ00__func__Ø000))), unsafe.Pointer(str(117827)))
+ if _nIncr != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107849), unsafe.Pointer(&_fkLookupParentØ00__func__Ø000), unsafe.Pointer(str(117855)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3HaltConstraint(tls, _pParse, i32(787), i32(2), nil, int8(i32(-2)), uint8(i32(4)))
+ _sqlite3HaltConstraint(tls, _pParse, int32(787), int32(2), nil, int8(-2), uint8(4))
goto _31
}
- if (_nIncr > i32(0)) && (int32(_pFKey.X6) == i32(0)) {
+ if (_nIncr > int32(0)) && (int32(_pFKey.XisDeferred) == int32(0)) {
_sqlite3MayAbort(tls, _pParse)
}
- _sqlite3VdbeAddOp2(tls, _v, i32(147), int32(_pFKey.X6), _nIncr)
+ _sqlite3VdbeAddOp2(tls, _v, int32(147), int32(_pFKey.XisDeferred), _nIncr)
_31:
_sqlite3VdbeResolveLabel(tls, _v, _iOk)
- _sqlite3VdbeAddOp1(tls, _v, i32(114), _iCur)
+ _sqlite3VdbeAddOp1(tls, _v, int32(114), _iCur)
}
var _fkLookupParentØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_fkLookupParentØ00__func__Ø000[0], str(117836), 15)
+ crt.Xstrncpy(nil, &_fkLookupParentØ00__func__Ø000[0], str(117864), 15)
}
-// Return true if the parser passed as the first argument is being
-// used to code a trigger that is really a "SET NULL" action belonging
-// to trigger pFKey.
+// C comment
+// /*
+// ** Return true if the parser passed as the first argument is being
+// ** used to code a trigger that is really a "SET NULL" action belonging
+// ** to trigger pFKey.
+// */
func _isSetNullAction(tls *crt.TLS, _pParse *XParse, _pFKey *XFKey) (r0 int32) {
var _1_p *XTrigger
var _pTop *XParse
_pTop = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
- if (*XTriggerPrg)(_pTop.X69) == nil {
+ if _pTop.XpTriggerPrg == nil {
goto _2
}
- _1_p = (*XTrigger)((*XTriggerPrg)(_pTop.X69).X0)
- if ((_1_p == (*(**XTrigger)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]unsafe.Pointer)(unsafe.Pointer(&(_pFKey.X8))))) + 4*uintptr(i32(0)))))) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint8)(unsafe.Pointer(&(_pFKey.X7))))) + 1*uintptr(i32(0))))) == i32(7))) || ((_1_p == (*(**XTrigger)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]unsafe.Pointer)(unsafe.Pointer(&(_pFKey.X8))))) + 4*uintptr(i32(1)))))) && (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint8)(unsafe.Pointer(&(_pFKey.X7))))) + 1*uintptr(i32(1))))) == i32(7))) {
- return i32(1)
+ _1_p = (*XTrigger)((*XTriggerPrg)(_pTop.XpTriggerPrg).XpTrigger)
+ if ((_1_p == (*elem40((**XTrigger)(unsafe.Pointer(&_pFKey.XapTrigger)), 0))) && (int32(*elem15((*uint8)(unsafe.Pointer(&_pFKey.XaAction)), 0)) == int32(7))) || ((_1_p == (*elem40((**XTrigger)(unsafe.Pointer(&_pFKey.XapTrigger)), uintptr(1)))) && (int32(*elem15((*uint8)(unsafe.Pointer(&_pFKey.XaAction)), uintptr(1))) == int32(7))) {
+ return int32(1)
}
_2:
- return i32(0)
-}
-
-// This function is called to generate code executed when a row is deleted
-// from the parent table of foreign key constraint pFKey and, if pFKey is
-// deferred, when a row is inserted into the same table. When generating
-// code for an SQL UPDATE operation, this function may be called twice -
-// once to "delete" the old row and once to "insert" the new row.
-//
-// Parameter nIncr is passed -1 when inserting a row (as this may decrease
-// the number of FK violations in the db) or +1 when deleting one (as this
-// may increase the number of FK constraint problems).
-//
-// The code generated by this function scans through the rows in the child
-// table that correspond to the parent table row being deleted or inserted.
-// For each child row found, one of the following actions is taken:
-//
-// Operation | FK type | Action taken
-// --------------------------------------------------------------------------
-// DELETE immediate Increment the "immediate constraint counter".
-// Or, if the ON (UPDATE|DELETE) action is RESTRICT,
-// throw a "FOREIGN KEY constraint failed" exception.
-//
-// INSERT immediate Decrement the "immediate constraint counter".
-//
-// DELETE deferred Increment the "deferred constraint counter".
-// Or, if the ON (UPDATE|DELETE) action is RESTRICT,
-// throw a "FOREIGN KEY constraint failed" exception.
-//
-// INSERT deferred Decrement the "deferred constraint counter".
-//
-// These operations are identified in the comment at the top of this file
-// (fkey.c) as "I.2" and "D.2".
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** This function is called to generate code executed when a row is deleted
+// ** from the parent table of foreign key constraint pFKey and, if pFKey is
+// ** deferred, when a row is inserted into the same table. When generating
+// ** code for an SQL UPDATE operation, this function may be called twice -
+// ** once to "delete" the old row and once to "insert" the new row.
+// **
+// ** Parameter nIncr is passed -1 when inserting a row (as this may decrease
+// ** the number of FK violations in the db) or +1 when deleting one (as this
+// ** may increase the number of FK constraint problems).
+// **
+// ** The code generated by this function scans through the rows in the child
+// ** table that correspond to the parent table row being deleted or inserted.
+// ** For each child row found, one of the following actions is taken:
+// **
+// ** Operation | FK type | Action taken
+// ** --------------------------------------------------------------------------
+// ** DELETE immediate Increment the "immediate constraint counter".
+// ** Or, if the ON (UPDATE|DELETE) action is RESTRICT,
+// ** throw a "FOREIGN KEY constraint failed" exception.
+// **
+// ** INSERT immediate Decrement the "immediate constraint counter".
+// **
+// ** DELETE deferred Increment the "deferred constraint counter".
+// ** Or, if the ON (UPDATE|DELETE) action is RESTRICT,
+// ** throw a "FOREIGN KEY constraint failed" exception.
+// **
+// ** INSERT deferred Decrement the "deferred constraint counter".
+// **
+// ** These operations are identified in the comment at the top of this file
+// ** (fkey.c) as "I.2" and "D.2".
+// */
func _fkScanChildren(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList, _pTab *XTable, _pIdx *XIndex, _pFKey *XFKey, _aiCol *int32, _regData int32, _nIncr int32) {
var _2_iCol, _6_iCol int16
var _i, _iFkIfZero int32
@@ -99788,117 +100927,114 @@ func _fkScanChildren(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList, _pTab *XTab
var _5_pPk *XIndex
var _sNameContext XNameContext
var _pWInfo *XWhereInfo
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pWhere = nil
- _iFkIfZero = i32(0)
+ _iFkIfZero = int32(0)
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
- if _pIdx != nil && (*XTable)(_pIdx.X3) != _pTab {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107969), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000))), unsafe.Pointer(str(117851)))
+ if _pIdx != nil && (*XTable)(_pIdx.XpTable) != _pTab {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107969), unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000), unsafe.Pointer(str(117879)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pIdx != nil && int32(_pIdx.X13) != (_pFKey.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107970), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000))), unsafe.Pointer(str(117881)))
+ if _pIdx != nil && int32(_pIdx.XnKeyCol) != _pFKey.XnCol {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107970), unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000), unsafe.Pointer(str(117909)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pIdx == nil && (_pFKey.X5) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107971), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000))), unsafe.Pointer(str(117919)))
+ if _pIdx == nil && _pFKey.XnCol != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107971), unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000), unsafe.Pointer(str(117947)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _pIdx == nil && ((_pTab.X9)&uint32(i32(32))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107972), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000))), unsafe.Pointer(str(117945)))
+ if _pIdx == nil && (_pTab.XtabFlags&uint32(32)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107972), unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000), unsafe.Pointer(str(117973)))
crt.X__builtin_abort(tls)
}
}()
- if _nIncr < i32(0) {
- _iFkIfZero = _sqlite3VdbeAddOp2(tls, _v, i32(45), int32(_pFKey.X6), i32(0))
+ if _nIncr < int32(0) {
+ _iFkIfZero = _sqlite3VdbeAddOp2(tls, _v, int32(45), int32(_pFKey.XisDeferred), int32(0))
}
- _i = i32(0)
+ _i = int32(0)
_13:
- if _i >= (_pFKey.X5) {
+ if _i >= _pFKey.XnCol {
goto _16
}
_2_iCol = int16(func() int32 {
if _pIdx != nil {
- return int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i))))
+ return int32(*elem50(_pIdx.XaiColumn, uintptr(_i)))
}
- return i32(-1)
+ return int32(-1)
}())
_2_pLeft = _exprTableRegister(tls, _pParse, _pTab, _regData, _2_iCol)
_2_iCol = int16(func() int32 {
if _aiCol != nil {
- return (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aiCol)) + 4*uintptr(_i))))
+ return (*elem8(_aiCol, uintptr(_i)))
}
- return ((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(i32(0)))).X0)
+ return (elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), 0).XiFrom)
}())
func() {
- if int32(_2_iCol) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107997), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000))), unsafe.Pointer(str(99182)))
+ if int32(_2_iCol) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107997), unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000), unsafe.Pointer(str(99210)))
crt.X__builtin_abort(tls)
}
}()
- _2_zCol = (*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pFKey.X0).X1) + 16*uintptr(_2_iCol))).X0
- _2_pRight = _sqlite3Expr(tls, _db, i32(27), _2_zCol)
- _2_pEq = _sqlite3PExpr(tls, _pParse, i32(78), _2_pLeft, _2_pRight)
+ _2_zCol = elem41((*XColumn)((*XTable)(_pFKey.XpFrom).XaCol), uintptr(_2_iCol)).XzName
+ _2_pRight = _sqlite3Expr(tls, _db, int32(27), _2_zCol)
+ _2_pEq = _sqlite3PExpr(tls, _pParse, int32(78), _2_pLeft, _2_pRight)
_pWhere = _sqlite3ExprAnd(tls, _db, _pWhere, _2_pEq)
_i += 1
goto _13
_16:
- if _pTab != (*XTable)(_pFKey.X0) || _nIncr <= i32(0) {
+ if _pTab != (*XTable)(_pFKey.XpFrom) || _nIncr <= int32(0) {
goto _24
}
- if ((_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
- _3_pLeft = _exprTableRegister(tls, _pParse, _pTab, _regData, int16(i32(-1)))
- _3_pRight = _exprTableColumn(tls, _db, _pTab, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(i32(0)))).X11, int16(i32(-1)))
- _3_pNe = _sqlite3PExpr(tls, _pParse, i32(77), _3_pLeft, _3_pRight)
+ if (_pTab.XtabFlags & uint32(32)) == (0) {
+ _3_pLeft = _exprTableRegister(tls, _pParse, _pTab, _regData, int16(-1))
+ _3_pRight = _exprTableColumn(tls, _db, _pTab, elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), 0).XiCursor, int16(-1))
+ _3_pNe = _sqlite3PExpr(tls, _pParse, int32(77), _3_pLeft, _3_pRight)
goto _26
}
_5_pAll = nil
_5_pPk = _sqlite3PrimaryKeyIndex(tls, _pTab)
func() {
if _pIdx == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108026), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000))), unsafe.Pointer(str(42069)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108026), unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000), unsafe.Pointer(str(42024)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_29:
- if _i >= int32(_5_pPk.X13) {
+ if _i >= int32(_5_pPk.XnKeyCol) {
goto _32
}
- _6_iCol = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X1)) + 2*uintptr(_i)))
+ _6_iCol = *elem50(_pIdx.XaiColumn, uintptr(_i))
func() {
- if int32(_6_iCol) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108029), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000))), unsafe.Pointer(str(99182)))
+ if int32(_6_iCol) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108029), unsafe.Pointer(&_fkScanChildrenØ00__func__Ø000), unsafe.Pointer(str(99210)))
crt.X__builtin_abort(tls)
}
}()
_3_pLeft = _exprTableRegister(tls, _pParse, _pTab, _regData, _6_iCol)
- _3_pRight = _exprTableColumn(tls, _db, _pTab, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(i32(0)))).X11, _6_iCol)
- _5_pEq = _sqlite3PExpr(tls, _pParse, i32(78), _3_pLeft, _3_pRight)
+ _3_pRight = _exprTableColumn(tls, _db, _pTab, elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), 0).XiCursor, _6_iCol)
+ _5_pEq = _sqlite3PExpr(tls, _pParse, int32(78), _3_pLeft, _3_pRight)
_5_pAll = _sqlite3ExprAnd(tls, _db, _5_pAll, _5_pEq)
_i += 1
goto _29
_32:
- _3_pNe = _sqlite3PExpr(tls, _pParse, i32(19), _5_pAll, nil)
+ _3_pNe = _sqlite3PExpr(tls, _pParse, int32(19), _5_pAll, nil)
_26:
_pWhere = _sqlite3ExprAnd(tls, _db, _pWhere, _3_pNe)
_24:
- crt.Xmemset(tls, (unsafe.Pointer)(&_sNameContext), i32(0), u32(32))
- *(**XSrcList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNameContext.X1))))) = _pSrc
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sNameContext.X0))))) = _pParse
+ crt.Xmemset(tls, unsafe.Pointer(&_sNameContext), int32(0), uint32(32))
+ *(**XSrcList)(unsafe.Pointer(&_sNameContext.XpSrcList)) = _pSrc
+ *(**XParse)(unsafe.Pointer(&_sNameContext.XpParse)) = _pParse
_sqlite3ResolveExprNames(tls, &_sNameContext, _pWhere)
- _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pSrc, _pWhere, nil, nil, uint16(i32(0)), i32(0))
- _sqlite3VdbeAddOp2(tls, _v, i32(147), int32(_pFKey.X6), _nIncr)
+ _pWInfo = _sqlite3WhereBegin(tls, _pParse, _pSrc, _pWhere, nil, nil, 0, int32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(147), int32(_pFKey.XisDeferred), _nIncr)
if _pWInfo != nil {
_sqlite3WhereEnd(tls, _pWInfo)
}
@@ -99906,186 +101042,189 @@ _24:
if _iFkIfZero != 0 {
_sqlite3VdbeJumpHere(tls, _v, _iFkIfZero)
}
- _ = _sNameContext
}
var _fkScanChildrenØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_fkScanChildrenØ00__func__Ø000[0], str(117971), 15)
+ crt.Xstrncpy(nil, &_fkScanChildrenØ00__func__Ø000[0], str(117999), 15)
}
-// Return an Expr object that refers to a memory register corresponding
-// to column iCol of table pTab.
-//
-// regBase is the first of an array of register that contains the data
-// for pTab. regBase itself holds the rowid. regBase+1 holds the first
-// column. regBase+2 holds the second column, and so forth.
+// C comment
+// /*
+// ** Return an Expr object that refers to a memory register corresponding
+// ** to column iCol of table pTab.
+// **
+// ** regBase is the first of an array of register that contains the data
+// ** for pTab. regBase itself holds the rowid. regBase+1 holds the first
+// ** column. regBase+2 holds the second column, and so forth.
+// */
func _exprTableRegister(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _regBase int32, _iCol int16) (r0 *XExpr) {
var _zColl *int8
var _db *Xsqlite3
var _pExpr *XExpr
var _pCol *XColumn
- _db = (*Xsqlite3)(_pParse.X0)
- _pExpr = _sqlite3Expr(tls, _db, i32(157), nil)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pExpr = _sqlite3Expr(tls, _db, int32(157), nil)
if _pExpr == nil {
goto _0
}
- if int32(_iCol) < i32(0) || int32(_iCol) == int32(_pTab.X10) {
+ if int32(_iCol) < int32(0) || int32(_iCol) == int32(_pTab.XiPKey) {
goto _2
}
- _pCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_iCol)))
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = (_regBase + int32(_iCol)) + i32(1)
- *(*int8)(unsafe.Pointer(&(_pExpr.X1))) = _pCol.X4
- _zColl = _pCol.X2
+ _pCol = elem41((*XColumn)(_pTab.XaCol), uintptr(_iCol))
+ _pExpr.XiTable = (_regBase + int32(_iCol)) + int32(1)
+ _pExpr.Xaffinity = _pCol.Xaffinity
+ _zColl = _pCol.XzColl
if _zColl == nil {
- _zColl = (*XCollSeq)(_db.X2).X0
+ _zColl = (*XCollSeq)(_db.XpDfltColl).XzName
}
_pExpr = _sqlite3ExprAddCollateString(tls, _pParse, _pExpr, _zColl)
goto _4
_2:
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = _regBase
- *(*int8)(unsafe.Pointer(&(_pExpr.X1))) = int8(i32(68))
+ _pExpr.XiTable = _regBase
+ _pExpr.Xaffinity = int8(68)
_4:
_0:
return _pExpr
}
-// Return an Expr object that refers to column iCol of table pTab which
-// has cursor iCur.
+// C comment
+// /*
+// ** Return an Expr object that refers to column iCol of table pTab which
+// ** has cursor iCur.
+// */
func _exprTableColumn(tls *crt.TLS, _db *Xsqlite3, _pTab *XTable, _iCursor int32, _iCol int16) (r0 *XExpr) {
var _pExpr *XExpr
- _pExpr = _sqlite3Expr(tls, _db, i32(152), nil)
+ _pExpr = _sqlite3Expr(tls, _db, int32(152), nil)
if _pExpr != nil {
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pExpr.X14))))) = _pTab
- *(*int32)(unsafe.Pointer(&(_pExpr.X8))) = _iCursor
- *(*int16)(unsafe.Pointer(&(_pExpr.X9))) = _iCol
+ *(**XTable)(unsafe.Pointer(&_pExpr.XpTab)) = _pTab
+ _pExpr.XiTable = _iCursor
+ _pExpr.XiColumn = _iCol
}
return _pExpr
}
-// This routine generates code to finish the INSERT or UPDATE operation
-// that was started by a prior call to sqlite3GenerateConstraintChecks.
-// A consecutive range of registers starting at regNewData contains the
-// rowid and the content to be inserted.
-//
-// The arguments to this routine should be the same as the first six
-// arguments to sqlite3GenerateConstraintChecks.
+// C comment
+// /*
+// ** This routine generates code to finish the INSERT or UPDATE operation
+// ** that was started by a prior call to sqlite3GenerateConstraintChecks.
+// ** A consecutive range of registers starting at regNewData contains the
+// ** rowid and the content to be inserted.
+// **
+// ** The arguments to this routine should be the same as the first six
+// ** arguments to sqlite3GenerateConstraintChecks.
+// */
func _sqlite3CompleteInsertion(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _iDataCur int32, _iIdxCur int32, _regNewData int32, _aRegIdx *int32, _update_flags int32, _appendBias int32, _useSeekResult int32) {
var _regData, _regRec, _i int32
var _pik_flags, _bAffinityDone uint8
var _v *TVdbe
var _pIdx *XIndex
- _bAffinityDone = u8(0)
+ _bAffinityDone = uint8(0)
func() {
- if _update_flags != i32(0) && _update_flags != i32(4) && _update_flags != i32(6) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110559), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CompleteInsertionØ00__func__Ø000))), unsafe.Pointer(str(117986)))
+ if _update_flags != int32(0) && _update_flags != int32(4) && _update_flags != int32(6) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110559), unsafe.Pointer(&_sqlite3CompleteInsertionØ00__func__Ø000), unsafe.Pointer(str(118014)))
crt.X__builtin_abort(tls)
}
}()
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110565), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CompleteInsertionØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110565), unsafe.Pointer(&_sqlite3CompleteInsertionØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSelect)(_pTab.X3) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110566), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CompleteInsertionØ00__func__Ø000))), unsafe.Pointer(str(102268)))
+ if (*XSelect)(_pTab.XpSelect) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110566), unsafe.Pointer(&_sqlite3CompleteInsertionØ00__func__Ø000), unsafe.Pointer(str(102296)))
crt.X__builtin_abort(tls)
}
}()
- *func() **XIndex { _i = i32(0); return &_pIdx }() = (*XIndex)(_pTab.X2)
+ *func() **XIndex { _i = int32(0); return &_pIdx }() = (*XIndex)(_pTab.XpIndex)
_8:
if _pIdx == nil {
goto _11
}
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_i)))) == i32(0) {
+ if (*elem8(_aRegIdx, uintptr(_i))) == int32(0) {
goto _9
}
- _bAffinityDone = uint8(i32(1))
- if (*XExpr)(_pIdx.X9) != nil {
- _sqlite3VdbeAddOp2(tls, _v, i32(75), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_i))), _sqlite3VdbeCurrentAddr(tls, _v)+i32(2))
+ _bAffinityDone = uint8(1)
+ if _pIdx.XpPartIdxWhere != nil {
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), *elem8(_aRegIdx, uintptr(_i)), _sqlite3VdbeCurrentAddr(tls, _v)+int32(2))
}
_pik_flags = uint8(func() int32 {
if _useSeekResult != 0 {
- return i32(16)
+ return int32(16)
}
- return i32(0)
+ return int32(0)
}())
- if (int32((uint32(_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(2)) && (((_pTab.X9) & uint32(i32(32))) != uint32(i32(0))) {
+ if (int32((uint32(_pIdx.XidxType)<<30)>>30) == int32(2)) && ((_pTab.XtabFlags & uint32(32)) != (0)) {
func() {
- if int32(_pParse.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110576), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CompleteInsertionØ00__func__Ø000))), unsafe.Pointer(str(118090)))
+ if int32(_pParse.Xnested) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110576), unsafe.Pointer(&_sqlite3CompleteInsertionØ00__func__Ø000), unsafe.Pointer(str(118118)))
crt.X__builtin_abort(tls)
}
}()
{
p := &_pik_flags
- *p = uint8(int32(*p) | i32(1))
- sink2(*p)
+ *p = uint8(int32(*p) | int32(1))
}
{
p := &_pik_flags
- *p = uint8(int32(*p) | (_update_flags & i32(2)))
- sink2(*p)
+ *p = uint8(int32(*p) | (_update_flags & int32(2)))
}
}
- _sqlite3VdbeAddOp4Int(tls, _v, i32(128), _iIdxCur+_i, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_i))), (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_i))))+i32(1), int32(func() uint16 {
- if ((uint32((_pIdx.X16)>>uint(i32(3))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- return (_pIdx.X13)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(128), _iIdxCur+_i, *elem8(_aRegIdx, uintptr(_i)), (*elem8(_aRegIdx, uintptr(_i)))+int32(1), int32(func() uint16 {
+ if ((uint32(_pIdx.XidxType>>3) << 31) >> 31) != 0 {
+ return _pIdx.XnKeyCol
}
- return (_pIdx.X14)
+ return _pIdx.XnColumn
}()))
_sqlite3VdbeChangeP5(tls, _v, uint16(_pik_flags))
_9:
- *func() *int32 { _pIdx = (*XIndex)(_pIdx.X5); return &_i }() += 1
+ *func() *int32 { _pIdx = (*XIndex)(_pIdx.XpNext); return &_i }() += 1
goto _8
_11:
- if ((_pTab.X9) & uint32(i32(32))) != uint32(i32(0)) {
+ if (_pTab.XtabFlags & uint32(32)) != (0) {
return
}
- _regData = _regNewData + i32(1)
+ _regData = _regNewData + int32(1)
_regRec = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _regData, int32(_pTab.X11), _regRec)
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _regData, int32(_pTab.XnCol), _regRec)
if _bAffinityDone == 0 {
- _sqlite3TableAffinity(tls, _v, _pTab, i32(0))
- _sqlite3ExprCacheAffinityChange(tls, _pParse, _regData, int32(_pTab.X11))
+ _sqlite3TableAffinity(tls, _v, _pTab, int32(0))
+ _sqlite3ExprCacheAffinityChange(tls, _pParse, _regData, int32(_pTab.XnCol))
}
- if (_pParse.X6) != 0 {
- _pik_flags = uint8(i32(0))
+ if _pParse.Xnested != 0 {
+ _pik_flags = 0
goto _25
}
- _pik_flags = uint8(i32(1))
+ _pik_flags = uint8(1)
{
p := &_pik_flags
*p = uint8(int32(*p) | func() int32 {
if _update_flags != 0 {
return _update_flags
}
- return i32(32)
+ return int32(32)
}())
- sink2(*p)
}
_25:
if _appendBias != 0 {
{
p := &_pik_flags
- *p = uint8(int32(*p) | i32(8))
- sink2(*p)
+ *p = uint8(int32(*p) | int32(8))
}
}
if _useSeekResult != 0 {
{
p := &_pik_flags
- *p = uint8(int32(*p) | i32(16))
- sink2(*p)
+ *p = uint8(int32(*p) | int32(16))
}
}
- _sqlite3VdbeAddOp3(tls, _v, i32(118), _iDataCur, _regRec, _regNewData)
- if (_pParse.X6) == 0 {
- _sqlite3VdbeAppendP4(tls, _v, (unsafe.Pointer)(_pTab), i32(-15))
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), _iDataCur, _regRec, _regNewData)
+ if _pParse.Xnested == 0 {
+ _sqlite3VdbeAppendP4(tls, _v, unsafe.Pointer(_pTab), int32(-15))
}
_sqlite3VdbeChangeP5(tls, _v, uint16(_pik_flags))
}
@@ -100093,15 +101232,18 @@ _25:
var _sqlite3CompleteInsertionØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CompleteInsertionØ00__func__Ø000[0], str(118108), 25)
+ crt.Xstrncpy(nil, &_sqlite3CompleteInsertionØ00__func__Ø000[0], str(118136), 25)
}
-// This function is called when deleting or updating a row to implement
-// any required CASCADE, SET NULL or SET DEFAULT actions.
+// C comment
+// /*
+// ** This function is called when deleting or updating a row to implement
+// ** any required CASCADE, SET NULL or SET DEFAULT actions.
+// */
func _sqlite3FkActions(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pChanges *XExprList, _regOld int32, _aChange *int32, _bChngRowid int32) {
var _3_pAct *XTrigger
var _1_pFKey *XFKey
- if (((*Xsqlite3)(_pParse.X0).X6) & i32(524288)) == 0 {
+ if (((*Xsqlite3)(_pParse.Xdb).Xflags) & int32(524288)) == 0 {
goto _0
}
_1_pFKey = _sqlite3FkReferences(tls, _pTab)
@@ -100114,42 +101256,45 @@ _1:
}
_3_pAct = _fkActionTrigger(tls, _pParse, _pTab, _1_pFKey, _pChanges)
if _3_pAct != nil {
- _sqlite3CodeRowTriggerDirect(tls, _pParse, _3_pAct, _pTab, _regOld, i32(2), i32(0))
+ _sqlite3CodeRowTriggerDirect(tls, _pParse, _3_pAct, _pTab, _regOld, int32(2), int32(0))
}
_6:
- _1_pFKey = (*XFKey)(_1_pFKey.X3)
+ _1_pFKey = (*XFKey)(_1_pFKey.XpNextTo)
goto _1
_4:
_0:
}
-// This function is called when an UPDATE or DELETE operation is being
-// compiled on table pTab, which is the parent table of foreign-key pFKey.
-// If the current operation is an UPDATE, then the pChanges parameter is
-// passed a pointer to the list of columns being modified. If it is a
-// DELETE, pChanges is passed a NULL pointer.
-//
-// It returns a pointer to a Trigger structure containing a trigger
-// equivalent to the ON UPDATE or ON DELETE action specified by pFKey.
-// If the action is "NO ACTION" or "RESTRICT", then a NULL pointer is
-// returned (these actions require no special handling by the triggers
-// sub-system, code for them is created by fkScanChildren()).
-//
-// For example, if pFKey is the foreign key and pTab is table "p" in
-// the following schema:
-//
-// CREATE TABLE p(pk PRIMARY KEY);
-// CREATE TABLE c(ck REFERENCES p ON DELETE CASCADE);
-//
-// then the returned trigger structure is equivalent to:
-//
-// CREATE TRIGGER ... DELETE ON p BEGIN
-// DELETE FROM c WHERE ck = old.pk;
-// END;
-//
-// The returned pointer is cached as part of the foreign key object. It
-// is eventually freed along with the rest of the foreign key object by
-// sqlite3FkDelete().
+// C comment
+// /*
+// ** This function is called when an UPDATE or DELETE operation is being
+// ** compiled on table pTab, which is the parent table of foreign-key pFKey.
+// ** If the current operation is an UPDATE, then the pChanges parameter is
+// ** passed a pointer to the list of columns being modified. If it is a
+// ** DELETE, pChanges is passed a NULL pointer.
+// **
+// ** It returns a pointer to a Trigger structure containing a trigger
+// ** equivalent to the ON UPDATE or ON DELETE action specified by pFKey.
+// ** If the action is "NO ACTION" or "RESTRICT", then a NULL pointer is
+// ** returned (these actions require no special handling by the triggers
+// ** sub-system, code for them is created by fkScanChildren()).
+// **
+// ** For example, if pFKey is the foreign key and pTab is table "p" in
+// ** the following schema:
+// **
+// ** CREATE TABLE p(pk PRIMARY KEY);
+// ** CREATE TABLE c(ck REFERENCES p ON DELETE CASCADE);
+// **
+// ** then the returned trigger structure is equivalent to:
+// **
+// ** CREATE TRIGGER ... DELETE ON p BEGIN
+// ** DELETE FROM c WHERE ck = old.pk;
+// ** END;
+// **
+// ** The returned pointer is cached as part of the foreign key object. It
+// ** is eventually freed along with the rest of the foreign key object by
+// ** sqlite3FkDelete().
+// */
func _fkActionTrigger(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pFKey *XFKey, _pChanges *XExprList) (r0 *XTrigger) {
var _action, _iAction, _2_nFrom, _2_i, _3_iFromCol int32
var _2_aiCol *int32
@@ -100162,14 +101307,14 @@ func _fkActionTrigger(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pFKey *XFKe
var _2_pWhere, _2_pWhen, _3_pEq, _5_pNew, _7_pDflt, _11_pRaise *XExpr
var _2_pIdx *XIndex
var _2_pStep *XTriggerStep
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_iAction = bool2int(_pChanges != nil)
- _action = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint8)(unsafe.Pointer(&(_pFKey.X7))))) + 1*uintptr(_iAction))))
- if (_action == i32(6)) && ((_db.X6)&i32(33554432)) != 0 {
+ _action = int32(*elem15((*uint8)(unsafe.Pointer(&_pFKey.XaAction)), uintptr(_iAction)))
+ if (_action == int32(6)) && (_db.Xflags&int32(33554432)) != 0 {
return nil
}
- _pTrigger = *(**XTrigger)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]unsafe.Pointer)(unsafe.Pointer(&(_pFKey.X8))))) + 4*uintptr(_iAction)))
- if _action == i32(0) || _pTrigger != nil {
+ _pTrigger = *elem40((**XTrigger)(unsafe.Pointer(&_pFKey.XapTrigger)), uintptr(_iAction))
+ if _action == int32(0) || _pTrigger != nil {
goto _3
}
_2_pIdx = nil
@@ -100183,236 +101328,229 @@ func _fkActionTrigger(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pFKey *XFKe
return nil
}
func() {
- if _2_aiCol == nil && (_pFKey.X5) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108611), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000))), unsafe.Pointer(str(117766)))
+ if _2_aiCol == nil && _pFKey.XnCol != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108611), unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000), unsafe.Pointer(str(117794)))
crt.X__builtin_abort(tls)
}
}()
- _2_i = i32(0)
+ _2_i = int32(0)
_8:
- if _2_i >= (_pFKey.X5) {
+ if _2_i >= _pFKey.XnCol {
goto _11
}
_3_tOld = XToken{}
- *(**int8)(unsafe.Pointer(&(_3_tOld.X0))) = str(43177)
- *(*uint32)(unsafe.Pointer(&(_3_tOld.X1))) = uint32(i32(3))
+ _3_tOld.Xz = str(43132)
+ _3_tOld.Xn = uint32(3)
_3_tNew = XToken{}
- *(**int8)(unsafe.Pointer(&(_3_tNew.X0))) = str(43173)
- *(*uint32)(unsafe.Pointer(&(_3_tNew.X1))) = uint32(i32(3))
+ _3_tNew.Xz = str(43128)
+ _3_tNew.Xn = uint32(3)
_3_iFromCol = func() int32 {
if _2_aiCol != nil {
- return (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_aiCol)) + 4*uintptr(_2_i))))
+ return (*elem8(_2_aiCol, uintptr(_2_i)))
}
- return ((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_pFKey.X9))))) + 8*uintptr(i32(0)))).X0)
+ return (elem116((*t117)(unsafe.Pointer(&_pFKey.XaCol)), 0).XiFrom)
}()
func() {
- if _3_iFromCol < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108622), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000))), unsafe.Pointer(str(118133)))
+ if _3_iFromCol < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108622), unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000), unsafe.Pointer(str(118161)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _2_pIdx == nil && (int32(_pTab.X10) < i32(0) || int32(_pTab.X10) >= int32(_pTab.X11)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108623), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000))), unsafe.Pointer(str(118145)))
+ if _2_pIdx == nil && (int32(_pTab.XiPKey) < int32(0) || int32(_pTab.XiPKey) >= int32(_pTab.XnCol)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108623), unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000), unsafe.Pointer(str(118173)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _2_pIdx != nil && int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_pIdx.X1)) + 2*uintptr(_2_i)))) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108624), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000))), unsafe.Pointer(str(117711)))
+ if _2_pIdx != nil && int32(*elem50(_2_pIdx.XaiColumn, uintptr(_2_i))) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108624), unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000), unsafe.Pointer(str(117739)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3TokenInit(tls, &_3_tToCol, (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(func() int16 {
+ _sqlite3TokenInit(tls, &_3_tToCol, elem41((*XColumn)(_pTab.XaCol), uintptr(func() int16 {
if _2_pIdx != nil {
- return (*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_pIdx.X1)) + 2*uintptr(_2_i))))
+ return (*elem50(_2_pIdx.XaiColumn, uintptr(_2_i)))
}
- return (_pTab.X10)
- }()))).X0)
- _sqlite3TokenInit(tls, &_3_tFromCol, (*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pFKey.X0).X1)+16*uintptr(_3_iFromCol))).X0)
- _3_pEq = _sqlite3PExpr(tls, _pParse, i32(78), _sqlite3PExpr(tls, _pParse, i32(122), _sqlite3ExprAlloc(tls, _db, i32(27), &_3_tOld, i32(0)), _sqlite3ExprAlloc(tls, _db, i32(27), &_3_tToCol, i32(0))), _sqlite3ExprAlloc(tls, _db, i32(27), &_3_tFromCol, i32(0)))
+ return _pTab.XiPKey
+ }())).XzName)
+ _sqlite3TokenInit(tls, &_3_tFromCol, elem41((*XColumn)((*XTable)(_pFKey.XpFrom).XaCol), uintptr(_3_iFromCol)).XzName)
+ _3_pEq = _sqlite3PExpr(tls, _pParse, int32(78), _sqlite3PExpr(tls, _pParse, int32(122), _sqlite3ExprAlloc(tls, _db, int32(27), &_3_tOld, int32(0)), _sqlite3ExprAlloc(tls, _db, int32(27), &_3_tToCol, int32(0))), _sqlite3ExprAlloc(tls, _db, int32(27), &_3_tFromCol, int32(0)))
_2_pWhere = _sqlite3ExprAnd(tls, _db, _2_pWhere, _3_pEq)
if _pChanges != nil {
- _3_pEq = _sqlite3PExpr(tls, _pParse, i32(72), _sqlite3PExpr(tls, _pParse, i32(122), _sqlite3ExprAlloc(tls, _db, i32(27), &_3_tOld, i32(0)), _sqlite3ExprAlloc(tls, _db, i32(27), &_3_tToCol, i32(0))), _sqlite3PExpr(tls, _pParse, i32(122), _sqlite3ExprAlloc(tls, _db, i32(27), &_3_tNew, i32(0)), _sqlite3ExprAlloc(tls, _db, i32(27), &_3_tToCol, i32(0))))
+ _3_pEq = _sqlite3PExpr(tls, _pParse, int32(72), _sqlite3PExpr(tls, _pParse, int32(122), _sqlite3ExprAlloc(tls, _db, int32(27), &_3_tOld, int32(0)), _sqlite3ExprAlloc(tls, _db, int32(27), &_3_tToCol, int32(0))), _sqlite3PExpr(tls, _pParse, int32(122), _sqlite3ExprAlloc(tls, _db, int32(27), &_3_tNew, int32(0)), _sqlite3ExprAlloc(tls, _db, int32(27), &_3_tToCol, int32(0))))
_2_pWhen = _sqlite3ExprAnd(tls, _db, _2_pWhen, _3_pEq)
}
- if _action == i32(6) || _action == i32(9) && _pChanges == nil {
+ if _action == int32(6) || _action == int32(9) && _pChanges == nil {
goto _28
}
- if _action == i32(9) {
- _5_pNew = _sqlite3PExpr(tls, _pParse, i32(122), _sqlite3ExprAlloc(tls, _db, i32(27), &_3_tNew, i32(0)), _sqlite3ExprAlloc(tls, _db, i32(27), &_3_tToCol, i32(0)))
+ if _action == int32(9) {
+ _5_pNew = _sqlite3PExpr(tls, _pParse, int32(122), _sqlite3ExprAlloc(tls, _db, int32(27), &_3_tNew, int32(0)), _sqlite3ExprAlloc(tls, _db, int32(27), &_3_tToCol, int32(0)))
goto _34
}
- if _action != i32(8) {
+ if _action != int32(8) {
goto _31
}
- _7_pDflt = (*XExpr)((*XColumn)(unsafe.Pointer(uintptr((*XTable)(_pFKey.X0).X1) + 16*uintptr(_3_iFromCol))).X1)
+ _7_pDflt = (*XExpr)(elem41((*XColumn)((*XTable)(_pFKey.XpFrom).XaCol), uintptr(_3_iFromCol)).XpDflt)
if _7_pDflt != nil {
- _5_pNew = _sqlite3ExprDup(tls, _db, _7_pDflt, i32(0))
+ _5_pNew = _sqlite3ExprDup(tls, _db, _7_pDflt, int32(0))
goto _33
}
- _5_pNew = _sqlite3ExprAlloc(tls, _db, i32(101), nil, i32(0))
+ _5_pNew = _sqlite3ExprAlloc(tls, _db, int32(101), nil, int32(0))
_33:
goto _34
_31:
- _5_pNew = _sqlite3ExprAlloc(tls, _db, i32(101), nil, i32(0))
+ _5_pNew = _sqlite3ExprAlloc(tls, _db, int32(101), nil, int32(0))
_34:
_2_pList = _sqlite3ExprListAppend(tls, _pParse, _2_pList, _5_pNew)
- _sqlite3ExprListSetName(tls, _pParse, _2_pList, &_3_tFromCol, i32(0))
+ _sqlite3ExprListSetName(tls, _pParse, _2_pList, &_3_tFromCol, int32(0))
_28:
_2_i += 1
goto _8
_11:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_2_aiCol))
- _2_zFrom = (*XTable)(_pFKey.X0).X0
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_2_aiCol))
+ _2_zFrom = (*XTable)(_pFKey.XpFrom).XzName
_2_nFrom = _sqlite3Strlen30(tls, _2_zFrom)
- if _action != i32(6) {
+ if _action != int32(6) {
goto _35
}
- *(**int8)(unsafe.Pointer(&(_11_tFrom.X0))) = _2_zFrom
- *(*uint32)(unsafe.Pointer(&(_11_tFrom.X1))) = uint32(_2_nFrom)
- _11_pRaise = _sqlite3Expr(tls, _db, i32(56), str(58234))
+ _11_tFrom.Xz = _2_zFrom
+ _11_tFrom.Xn = uint32(_2_nFrom)
+ _11_pRaise = _sqlite3Expr(tls, _db, int32(56), str(58210))
if _11_pRaise != nil {
- *(*int8)(unsafe.Pointer(&(_11_pRaise.X1))) = int8(i32(2))
+ _11_pRaise.Xaffinity = int8(2)
}
- _2_pSelect = _sqlite3SelectNew(tls, _pParse, _sqlite3ExprListAppend(tls, _pParse, nil, _11_pRaise), _sqlite3SrcListAppend(tls, _db, nil, &_11_tFrom, nil), _2_pWhere, nil, nil, nil, uint32(i32(0)), nil, nil)
+ _2_pSelect = _sqlite3SelectNew(tls, _pParse, _sqlite3ExprListAppend(tls, _pParse, nil, _11_pRaise), _sqlite3SrcListAppend(tls, _db, nil, &_11_tFrom, nil), _2_pWhere, nil, nil, nil, 0, nil, nil)
_2_pWhere = nil
_35:
- *(*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X0))) += 1
- _pTrigger = (*XTrigger)(_sqlite3DbMallocZero(tls, _db, uint64((u32(72)+uint32(_2_nFrom))+uint32(i32(1)))))
+ _db.Xlookaside.XbDisable += 1
+ _pTrigger = (*XTrigger)(_sqlite3DbMallocZero(tls, _db, uint64((uint32(72)+uint32(_2_nFrom))+uint32(1))))
if _pTrigger == nil {
goto _37
}
- _2_pStep = store76((**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTrigger.X8))))), (*XTriggerStep)(unsafe.Pointer((*XTrigger)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTrigger))+36*uintptr(i32(1)))))))
- *(**int8)(unsafe.Pointer(&(_2_pStep.X4))) = (*int8)(unsafe.Pointer((*XTriggerStep)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_pStep)) + 36*uintptr(i32(1))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_2_pStep.X4), (unsafe.Pointer)(_2_zFrom), uint32(_2_nFrom))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pStep.X5))))) = _sqlite3ExprDup(tls, _db, _2_pWhere, i32(1))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pStep.X6))))) = _sqlite3ExprListDup(tls, _db, _2_pList, i32(1))
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pStep.X3))))) = _sqlite3SelectDup(tls, _db, _2_pSelect, i32(1))
+ _2_pStep = store120((**XTriggerStep)(unsafe.Pointer(&_pTrigger.Xstep_list)), (*XTriggerStep)(unsafe.Pointer(elem121(_pTrigger, uintptr(1)))))
+ _2_pStep.XzTarget = (*int8)(unsafe.Pointer(elem120(_2_pStep, uintptr(1))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_2_pStep.XzTarget), unsafe.Pointer(_2_zFrom), uint32(_2_nFrom))
+ *(**XExpr)(unsafe.Pointer(&_2_pStep.XpWhere)) = _sqlite3ExprDup(tls, _db, _2_pWhere, int32(1))
+ *(**XExprList)(unsafe.Pointer(&_2_pStep.XpExprList)) = _sqlite3ExprListDup(tls, _db, _2_pList, int32(1))
+ *(**XSelect)(unsafe.Pointer(&_2_pStep.XpSelect)) = _sqlite3SelectDup(tls, _db, _2_pSelect, int32(1))
if _2_pWhen != nil {
- _2_pWhen = _sqlite3PExpr(tls, _pParse, i32(19), _2_pWhen, nil)
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTrigger.X4))))) = _sqlite3ExprDup(tls, _db, _2_pWhen, i32(1))
+ _2_pWhen = _sqlite3PExpr(tls, _pParse, int32(19), _2_pWhen, nil)
+ *(**XExpr)(unsafe.Pointer(&_pTrigger.XpWhen)) = _sqlite3ExprDup(tls, _db, _2_pWhen, int32(1))
}
_37:
- *(*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X0))) -= 1
+ _db.Xlookaside.XbDisable -= 1
_sqlite3ExprDelete(tls, _db, _2_pWhere)
_sqlite3ExprDelete(tls, _db, _2_pWhen)
_sqlite3ExprListDelete(tls, _db, _2_pList)
_sqlite3SelectDelete(tls, _db, _2_pSelect)
- if int32(_db.X17) == i32(1) {
+ if int32(_db.XmallocFailed) == int32(1) {
_fkTriggerDelete(tls, _db, _pTrigger)
return nil
}
func() {
if _2_pStep == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(108735), unsafe.Pointer((*int8)(unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000))), unsafe.Pointer(str(118199)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(108735), unsafe.Pointer(&_fkActionTriggerØ00__func__Ø000), unsafe.Pointer(str(118227)))
crt.X__builtin_abort(tls)
}
}()
switch _action {
- case i32(6):
+ case int32(6):
goto _43
- case i32(9):
+ case int32(9):
goto _44
default:
goto _47
}
_43:
- *(*uint8)(unsafe.Pointer(&(_2_pStep.X0))) = uint8(i32(119))
+ _2_pStep.Xop = uint8(119)
goto _46
_44:
if _pChanges == nil {
- *(*uint8)(unsafe.Pointer(&(_2_pStep.X0))) = uint8(i32(109))
+ _2_pStep.Xop = uint8(109)
goto _46
}
_47:
- *(*uint8)(unsafe.Pointer(&(_2_pStep.X0))) = uint8(i32(110))
+ _2_pStep.Xop = uint8(110)
_46:
- *(**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_2_pStep.X2))))) = _pTrigger
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTrigger.X6))))) = (*XSchema)(_pTab.X20)
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTrigger.X7))))) = (*XSchema)(_pTab.X20)
- *(**XTrigger)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]unsafe.Pointer)(unsafe.Pointer(&(_pFKey.X8))))) + 4*uintptr(_iAction))) = _pTrigger
- *(*uint8)(unsafe.Pointer(&(_pTrigger.X2))) = uint8(func() int32 {
+ *(**XTrigger)(unsafe.Pointer(&_2_pStep.XpTrig)) = _pTrigger
+ *(**XSchema)(unsafe.Pointer(&_pTrigger.XpSchema)) = (*XSchema)(_pTab.XpSchema)
+ *(**XSchema)(unsafe.Pointer(&_pTrigger.XpTabSchema)) = (*XSchema)(_pTab.XpSchema)
+ *elem40((**XTrigger)(unsafe.Pointer(&_pFKey.XapTrigger)), uintptr(_iAction)) = _pTrigger
+ _pTrigger.Xop = uint8(func() int32 {
if _pChanges != nil {
- return i32(110)
+ return int32(110)
}
- return i32(109)
+ return int32(109)
}())
_3:
return _pTrigger
-
- _ = _3_tOld
- _ = _3_tNew
- _ = _3_tFromCol
- _ = _3_tToCol
- _ = _11_tFrom
- panic(0)
}
var _fkActionTriggerØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_fkActionTriggerØ00__func__Ø000[0], str(118208), 16)
+ crt.Xstrncpy(nil, &_fkActionTriggerØ00__func__Ø000[0], str(118236), 16)
}
func _sqlite3AutoincrementEnd(tls *crt.TLS, _pParse *XParse) {
- if (*TAggInfo_func)(_pParse.X38) != nil {
+ if _pParse.XpAinc != nil {
_autoIncrementEnd(tls, _pParse)
}
}
-// This routine generates the code needed to write autoincrement
-// maximum rowid values back into the sqlite_sequence register.
-// Every statement that might do an INSERT into an autoincrement
-// table (either directly or through triggers) needs to call this
-// routine just before the "exit" code.
+// C comment
+// /*
+// ** This routine generates the code needed to write autoincrement
+// ** maximum rowid values back into the sqlite_sequence register.
+// ** Every statement that might do an INSERT into an autoincrement
+// ** table (either directly or through triggers) needs to call this
+// ** routine just before the "exit" code.
+// */
func _autoIncrementEnd(tls *crt.TLS, _pParse *XParse) {
var _1_iRec, _1_memId int32
var _db *Xsqlite3
var _1_pDb *XDb
var _v *TVdbe
var _1_aOp *XVdbeOp
- var _p *TAggInfo_func
- _v = (*TVdbe)(_pParse.X2)
- _db = (*Xsqlite3)(_pParse.X0)
+ var _p *XAutoincInfo
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109164), unsafe.Pointer((*int8)(unsafe.Pointer(&_autoIncrementEndØ00__func__Ø000))), unsafe.Pointer(str(41861)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109164), unsafe.Pointer(&_autoIncrementEndØ00__func__Ø000), unsafe.Pointer(str(41816)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*TAggInfo_func)(_pParse.X38)
+ _p = (*XAutoincInfo)(_pParse.XpAinc)
_2:
if _p == nil {
goto _5
}
- _1_pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_p.X2)))
- _1_memId = _p.X3
+ _1_pDb = elem27((*XDb)(_db.XaDb), uintptr(_p.XiDb))
+ _1_memId = _p.XregCtr
_1_iRec = _sqlite3GetTempReg(tls, _pParse)
func() {
- if _sqlite3SchemaMutexHeld(tls, _db, i32(0), (*XSchema)(_1_pDb.X4)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109180), unsafe.Pointer((*int8)(unsafe.Pointer(&_autoIncrementEndØ00__func__Ø000))), unsafe.Pointer(str(41863)))
+ if _sqlite3SchemaMutexHeld(tls, _db, int32(0), (*XSchema)(_1_pDb.XpSchema)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109180), unsafe.Pointer(&_autoIncrementEndØ00__func__Ø000), unsafe.Pointer(str(41818)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3OpenTable(tls, _pParse, i32(0), _p.X2, (*XTable)((*XSchema)(_1_pDb.X4).X6), i32(107))
- _1_aOp = _sqlite3VdbeAddOpList(tls, _v, i32(5), (*XVdbeOpList)(unsafe.Pointer(&_autoIncrementEndØ00autoIncEndØ002)), _autoIncrementEndØ00iLnØ001)
+ _sqlite3OpenTable(tls, _pParse, int32(0), _p.XiDb, (*XTable)((*XSchema)(_1_pDb.XpSchema).XpSeqTab), int32(107))
+ _1_aOp = _sqlite3VdbeAddOpList(tls, _v, int32(5), (*XVdbeOpList)(unsafe.Pointer(&_autoIncrementEndØ00autoIncEndØ002)), _autoIncrementEndØ00iLnØ001)
if _1_aOp == nil {
goto _5
}
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(0)))).X3))) = _1_memId + i32(1)
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(1)))).X4))) = _1_memId + i32(1)
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(2)))).X3))) = _1_memId - i32(1)
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(2)))).X5))) = _1_iRec
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(3)))).X4))) = _1_iRec
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(3)))).X5))) = _1_memId + i32(1)
- *(*uint16)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_aOp)) + 24*uintptr(i32(3)))).X2))) = uint16(i32(8))
+ elem61(_1_aOp, 0).Xp1 = _1_memId + int32(1)
+ elem61(_1_aOp, uintptr(1)).Xp2 = _1_memId + int32(1)
+ elem61(_1_aOp, uintptr(2)).Xp1 = _1_memId - int32(1)
+ elem61(_1_aOp, uintptr(2)).Xp3 = _1_iRec
+ elem61(_1_aOp, uintptr(3)).Xp2 = _1_iRec
+ elem61(_1_aOp, uintptr(3)).Xp3 = _1_memId + int32(1)
+ elem61(_1_aOp, uintptr(3)).Xp5 = uint16(8)
_sqlite3ReleaseTempReg(tls, _pParse, _1_iRec)
- _p = (*TAggInfo_func)(_p.X0)
+ _p = (*XAutoincInfo)(_p.XpNext)
goto _2
_5:
}
@@ -100420,61 +101558,67 @@ _5:
var _autoIncrementEndØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_autoIncrementEndØ00__func__Ø000[0], str(118224), 17)
+ crt.Xstrncpy(nil, &_autoIncrementEndØ00__func__Ø000[0], str(118252), 17)
}
var _autoIncrementEndØ00autoIncEndØ002 [5]XVdbeOpList
func init() {
- _autoIncrementEndØ00autoIncEndØ002 = [5]XVdbeOpList{XVdbeOpList{X0: u8(76), X1: i8(0), X2: i8(2), X3: i8(0)}, XVdbeOpList{X0: u8(117), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(101), X1: i8(0), X2: i8(2), X3: i8(0)}, XVdbeOpList{X0: u8(118), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(114), X1: i8(0), X2: i8(0), X3: i8(0)}}
+ _autoIncrementEndØ00autoIncEndØ002 = [5]XVdbeOpList{XVdbeOpList{Xopcode: uint8(76), Xp2: int8(2)}, XVdbeOpList{Xopcode: uint8(117)}, XVdbeOpList{Xopcode: uint8(101), Xp2: int8(2)}, XVdbeOpList{Xopcode: uint8(118)}, XVdbeOpList{Xopcode: uint8(114)}}
}
var _autoIncrementEndØ00iLnØ001 int32
-// Pop an authorization context that was previously pushed
-// by sqlite3AuthContextPush
+// C comment
+// /*
+// ** Pop an authorization context that was previously pushed
+// ** by sqlite3AuthContextPush
+// */
func _sqlite3AuthContextPop(tls *crt.TLS, _pContext *XAuthContext) {
- if (*XParse)(_pContext.X1) != nil {
- *(**int8)(unsafe.Pointer(&((*XParse)(_pContext.X1).X65))) = _pContext.X0
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pContext.X1))))) = nil
- }
-}
-
-// Convert the pStep->zTarget string into a SrcList and return a pointer
-// to that SrcList.
-//
-// This routine adds a specific database name, if needed, to the target when
-// forming the SrcList. This prevents a trigger in one database from
-// referring to a target in another database. An exception is when the
-// trigger is in TEMP in which case it can refer to any other database it
-// wants.
+ if _pContext.XpParse != nil {
+ (*XParse)(_pContext.XpParse).XzAuthContext = _pContext.XzAuthContext
+ *(**XParse)(unsafe.Pointer(&_pContext.XpParse)) = nil
+ }
+}
+
+// C comment
+// /*
+// ** Convert the pStep->zTarget string into a SrcList and return a pointer
+// ** to that SrcList.
+// **
+// ** This routine adds a specific database name, if needed, to the target when
+// ** forming the SrcList. This prevents a trigger in one database from
+// ** referring to a target in another database. An exception is when the
+// ** trigger is in TEMP in which case it can refer to any other database it
+// ** wants.
+// */
func _targetSrcList(tls *crt.TLS, _pParse *XParse, _pStep *XTriggerStep) (r0 *XSrcList) {
var _iDb int32
var _2_zDb *int8
var _db *Xsqlite3
var _pSrc *XSrcList
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_pSrc = _sqlite3SrcListAppend(tls, _db, nil, nil, nil)
if _pSrc == nil {
goto _0
}
func() {
- if (_pSrc.X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123305), unsafe.Pointer((*int8)(unsafe.Pointer(&_targetSrcListØ00__func__Ø000))), unsafe.Pointer(str(118241)))
+ if _pSrc.XnSrc <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123305), unsafe.Pointer(&_targetSrcListØ00__func__Ø000), unsafe.Pointer(str(118269)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr((_pSrc.X0)-i32(1)))).X2))) = _sqlite3DbStrDup(tls, _db, _pStep.X4)
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)((*XTrigger)(_pStep.X2).X6))
- if (_iDb == i32(0)) || (_iDb >= i32(2)) {
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_pSrc.XnSrc-int32(1))).XzName = _sqlite3DbStrDup(tls, _db, _pStep.XzTarget)
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)((*XTrigger)(_pStep.XpTrig).XpSchema))
+ if (_iDb == int32(0)) || (_iDb >= int32(2)) {
func() {
- if _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123310), unsafe.Pointer((*int8)(unsafe.Pointer(&_targetSrcListØ00__func__Ø000))), unsafe.Pointer(str(54328)))
+ if _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123310), unsafe.Pointer(&_targetSrcListØ00__func__Ø000), unsafe.Pointer(str(54304)))
crt.X__builtin_abort(tls)
}
}()
- _2_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- *(**int8)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2))))) + 68*uintptr((_pSrc.X0)-i32(1)))).X1))) = _sqlite3DbStrDup(tls, _db, _2_zDb)
+ _2_zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), uintptr(_pSrc.XnSrc-int32(1))).XzDatabase = _sqlite3DbStrDup(tls, _db, _2_zDb)
}
_0:
return _pSrc
@@ -100483,104 +101627,107 @@ _0:
var _targetSrcListØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_targetSrcListØ00__func__Ø000[0], str(118254), 14)
-}
-
-// This routine is called to handle SQL of the following forms:
-//
-// insert into TABLE (IDLIST) values(EXPRLIST),(EXPRLIST),...
-// insert into TABLE (IDLIST) select
-// insert into TABLE (IDLIST) default values
-//
-// The IDLIST following the table name is always optional. If omitted,
-// then a list of all (non-hidden) columns for the table is substituted.
-// The IDLIST appears in the pColumn parameter. pColumn is NULL if IDLIST
-// is omitted.
-//
-// For the pSelect parameter holds the values to be inserted for the
-// first two forms shown above. A VALUES clause is really just short-hand
-// for a SELECT statement that omits the FROM clause and everything else
-// that follows. If the pSelect parameter is NULL, that means that the
-// DEFAULT VALUES form of the INSERT statement is intended.
-//
-// The code generated follows one of four templates. For a simple
-// insert with data coming from a single-row VALUES clause, the code executes
-// once straight down through. Pseudo-code follows (we call this
-// the "1st template"):
-//
-// open write cursor to <table> and its indices
-// put VALUES clause expressions into registers
-// write the resulting record into <table>
-// cleanup
-//
-// The three remaining templates assume the statement is of the form
-//
-// INSERT INTO <table> SELECT ...
-//
-// If the SELECT clause is of the restricted form "SELECT * FROM <table2>" -
-// in other words if the SELECT pulls all columns from a single table
-// and there is no WHERE or LIMIT or GROUP BY or ORDER BY clauses, and
-// if <table2> and <table1> are distinct tables but have identical
-// schemas, including all the same indices, then a special optimization
-// is invoked that copies raw records from <table2> over to <table1>.
-// See the xferOptimization() function for the implementation of this
-// template. This is the 2nd template.
-//
-// open a write cursor to <table>
-// open read cursor on <table2>
-// transfer all records in <table2> over to <table>
-// close cursors
-// foreach index on <table>
-// open a write cursor on the <table> index
-// open a read cursor on the corresponding <table2> index
-// transfer all records from the read to the write cursors
-// close cursors
-// end foreach
-//
-// The 3rd template is for when the second template does not apply
-// and the SELECT clause does not read from <table> at any time.
-// The generated code follows this template:
-//
-// X <- A
-// goto B
-// A: setup for the SELECT
-// loop over the rows in the SELECT
-// load values into registers R..R+n
-// yield X
-// end loop
-// cleanup after the SELECT
-// end-coroutine X
-// B: open write cursor to <table> and its indices
-// C: yield X, at EOF goto D
-// insert the select result into <table> from R..R+n
-// goto C
-// D: cleanup
-//
-// The 4th template is used if the insert statement takes its
-// values from a SELECT but the data is being inserted into a table
-// that is also read as part of the SELECT. In the third form,
-// we have to use an intermediate table to store the results of
-// the select. The template is like this:
-//
-// X <- A
-// goto B
-// A: setup for the SELECT
-// loop over the tables in the SELECT
-// load value into register R..R+n
-// yield X
-// end loop
-// cleanup after the SELECT
-// end co-routine R
-// B: open temp table
-// L: yield X, at EOF goto M
-// insert row from R..R+n into temp table
-// goto L
-// M: open write cursor to <table> and its indices
-// rewind temp table
-// C: loop over rows of intermediate table
-// transfer values form intermediate table into <table>
-// end loop
-// D: cleanup
+ crt.Xstrncpy(nil, &_targetSrcListØ00__func__Ø000[0], str(118282), 14)
+}
+
+// C comment
+// /*
+// ** This routine is called to handle SQL of the following forms:
+// **
+// ** insert into TABLE (IDLIST) values(EXPRLIST),(EXPRLIST),...
+// ** insert into TABLE (IDLIST) select
+// ** insert into TABLE (IDLIST) default values
+// **
+// ** The IDLIST following the table name is always optional. If omitted,
+// ** then a list of all (non-hidden) columns for the table is substituted.
+// ** The IDLIST appears in the pColumn parameter. pColumn is NULL if IDLIST
+// ** is omitted.
+// **
+// ** For the pSelect parameter holds the values to be inserted for the
+// ** first two forms shown above. A VALUES clause is really just short-hand
+// ** for a SELECT statement that omits the FROM clause and everything else
+// ** that follows. If the pSelect parameter is NULL, that means that the
+// ** DEFAULT VALUES form of the INSERT statement is intended.
+// **
+// ** The code generated follows one of four templates. For a simple
+// ** insert with data coming from a single-row VALUES clause, the code executes
+// ** once straight down through. Pseudo-code follows (we call this
+// ** the "1st template"):
+// **
+// ** open write cursor to <table> and its indices
+// ** put VALUES clause expressions into registers
+// ** write the resulting record into <table>
+// ** cleanup
+// **
+// ** The three remaining templates assume the statement is of the form
+// **
+// ** INSERT INTO <table> SELECT ...
+// **
+// ** If the SELECT clause is of the restricted form "SELECT * FROM <table2>" -
+// ** in other words if the SELECT pulls all columns from a single table
+// ** and there is no WHERE or LIMIT or GROUP BY or ORDER BY clauses, and
+// ** if <table2> and <table1> are distinct tables but have identical
+// ** schemas, including all the same indices, then a special optimization
+// ** is invoked that copies raw records from <table2> over to <table1>.
+// ** See the xferOptimization() function for the implementation of this
+// ** template. This is the 2nd template.
+// **
+// ** open a write cursor to <table>
+// ** open read cursor on <table2>
+// ** transfer all records in <table2> over to <table>
+// ** close cursors
+// ** foreach index on <table>
+// ** open a write cursor on the <table> index
+// ** open a read cursor on the corresponding <table2> index
+// ** transfer all records from the read to the write cursors
+// ** close cursors
+// ** end foreach
+// **
+// ** The 3rd template is for when the second template does not apply
+// ** and the SELECT clause does not read from <table> at any time.
+// ** The generated code follows this template:
+// **
+// ** X <- A
+// ** goto B
+// ** A: setup for the SELECT
+// ** loop over the rows in the SELECT
+// ** load values into registers R..R+n
+// ** yield X
+// ** end loop
+// ** cleanup after the SELECT
+// ** end-coroutine X
+// ** B: open write cursor to <table> and its indices
+// ** C: yield X, at EOF goto D
+// ** insert the select result into <table> from R..R+n
+// ** goto C
+// ** D: cleanup
+// **
+// ** The 4th template is used if the insert statement takes its
+// ** values from a SELECT but the data is being inserted into a table
+// ** that is also read as part of the SELECT. In the third form,
+// ** we have to use an intermediate table to store the results of
+// ** the select. The template is like this:
+// **
+// ** X <- A
+// ** goto B
+// ** A: setup for the SELECT
+// ** loop over the tables in the SELECT
+// ** load value into register R..R+n
+// ** yield X
+// ** end loop
+// ** cleanup after the SELECT
+// ** end co-routine R
+// ** B: open temp table
+// ** L: yield X, at EOF goto M
+// ** insert row from R..R+n into temp table
+// ** goto L
+// ** M: open write cursor to <table> and its indices
+// ** rewind temp table
+// ** C: loop over rows of intermediate table
+// ** transfer values form intermediate table into <table>
+// ** end loop
+// ** D: cleanup
+// */
func _sqlite3Insert(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pSelect *XSelect, _pColumn *XIdList, _onError int32) {
var _i, _j, _nColumn, _nHidden, _iDataCur, _iIdxCur, _ipkColumn, _endOfLoop, _srcTab, _addrInsTop, _addrCont, _iDb, _regFromSelect, _regAutoinc, _regRowCount, _regIns, _regRowid, _regData, _isView, _tmask, _18_regYield, _18_addrTop, _18_rc, _20_regRec, _20_regTempRowid, _20_addrL, _30_nIdx, _35_regCols, _37_addr1, _54_addr1, _59_iRegStore, _72_isReplace, _72_bUseSeek int32
var _aRegIdx *int32
@@ -100595,47 +101742,47 @@ func _sqlite3Insert(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pSelect
var _52_pOp *XVdbeOp
var _21_sNC XNameContext
var _dest XSelectDest
- _nHidden = i32(0)
- _iDataCur = i32(0)
- _iIdxCur = i32(0)
- _ipkColumn = i32(-1)
- _srcTab = i32(0)
- _addrInsTop = i32(0)
- _addrCont = i32(0)
- _useTempTable = u8(0)
- _appendFlag = u8(0)
+ _nHidden = int32(0)
+ _iDataCur = int32(0)
+ _iIdxCur = int32(0)
+ _ipkColumn = int32(-1)
+ _srcTab = int32(0)
+ _addrInsTop = int32(0)
+ _addrCont = int32(0)
+ _useTempTable = uint8(0)
+ _appendFlag = uint8(0)
_pList = nil
- _regFromSelect = i32(0)
- _regAutoinc = i32(0)
- _regRowCount = i32(0)
+ _regFromSelect = int32(0)
+ _regAutoinc = int32(0)
+ _regRowCount = int32(0)
_aRegIdx = nil
- _db = (*Xsqlite3)(_pParse.X0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_dest), i32(0), u32(24))
- if (_pParse.X16) != 0 || ((_db.X17) != 0) {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ crt.Xmemset(tls, unsafe.Pointer(&_dest), int32(0), uint32(24))
+ if _pParse.XnErr != 0 || (_db.XmallocFailed != 0) {
goto _insert_cleanup
}
- if ((_pSelect != nil) && (((_pSelect.X3) & uint32(i32(512))) != uint32(i32(0)))) && ((*XSelect)(_pSelect.X13) == nil) {
- _pList = (*XExprList)(_pSelect.X0)
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSelect.X0))))) = nil
+ if ((_pSelect != nil) && ((_pSelect.XselFlags & uint32(512)) != (0))) && ((*XSelect)(_pSelect.XpPrior) == nil) {
+ _pList = (*XExprList)(_pSelect.XpEList)
+ *(**XExprList)(unsafe.Pointer(&_pSelect.XpEList)) = nil
_sqlite3SelectDelete(tls, _db, _pSelect)
_pSelect = nil
}
func() {
- if (_pTabList.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109377), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(115025)))
+ if _pTabList.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109377), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(115053)))
crt.X__builtin_abort(tls)
}
}()
- _zTab = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTabList.X2))))) + 68*uintptr(i32(0)))).X2
+ _zTab = elem6((*TSrcList_item)(unsafe.Pointer(&_pTabList.Xa)), 0).XzName
if func() int32 {
if _zTab == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109379), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109379), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _insert_cleanup
}
@@ -100643,22 +101790,22 @@ func _sqlite3Insert(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pSelect
if _pTab == nil {
goto _insert_cleanup
}
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
func() {
- if _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109385), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(54328)))
+ if _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109385), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(54304)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3AuthCheck(tls, _pParse, i32(18), _pTab.X0, nil, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(18), _pTab.XzName, nil, elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName) != 0 {
goto _insert_cleanup
}
- _withoutRowid = uint8(bool2int(((_pTab.X9) & uint32(i32(32))) != uint32(i32(0))))
- _pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, i32(108), nil, &_tmask)
- _isView = bool2int((*XSelect)(_pTab.X3) != nil)
+ _withoutRowid = uint8(bool2int((_pTab.XtabFlags & uint32(32)) != (0)))
+ _pTrigger = _sqlite3TriggersExist(tls, _pParse, _pTab, int32(108), nil, &_tmask)
+ _isView = bool2int((*XSelect)(_pTab.XpSelect) != nil)
func() {
- if (_pTrigger == nil || _tmask == 0) && (_pTrigger != nil || _tmask != i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109407), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118268)))
+ if (_pTrigger == nil || _tmask == 0) && (_pTrigger != nil || _tmask != int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109407), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118296)))
crt.X__builtin_abort(tls)
}
}()
@@ -100672,72 +101819,68 @@ func _sqlite3Insert(tls *crt.TLS, _pParse *XParse, _pTabList *XSrcList, _pSelect
if _v == nil {
goto _insert_cleanup
}
- if int32(_pParse.X6) == i32(0) {
+ if int32(_pParse.Xnested) == int32(0) {
_sqlite3VdbeCountChanges(tls, _v)
}
_sqlite3BeginWriteOperation(tls, _pParse, bool2int((_pSelect != nil) || (_pTrigger != nil)), _iDb)
if (_pColumn == nil) && _xferOptimization(tls, _pParse, _pTab, _pSelect, _onError, _iDb) != 0 {
func() {
if _pTrigger != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109440), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118317)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109440), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118345)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pList != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109441), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118327)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109441), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118355)))
crt.X__builtin_abort(tls)
}
}()
goto _insert_end
}
_regAutoinc = _autoIncBegin(tls, _pParse, _iDb, _pTab)
- _regRowid = store1(&_regIns, (_pParse.X18)+i32(1))
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + (int32(_pTab.X11) + i32(1))
- sink1(*p)
- }
- if (_pTab.X16) != 0 {
+ _regRowid = store2(&_regIns, _pParse.XnMem+int32(1))
+ _pParse.XnMem += int32(_pTab.XnCol) + int32(1)
+ if _pTab.XnModuleArg != 0 {
_regRowid += 1
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) += 1
+ _pParse.XnMem += 1
}
- _regData = _regRowid + i32(1)
- _bIdListInOrder = uint8(bool2int(((_pTab.X9) & uint32(i32(128))) == uint32(i32(0))))
+ _regData = _regRowid + int32(1)
+ _bIdListInOrder = uint8(bool2int((_pTab.XtabFlags & uint32(128)) == (0)))
if _pColumn == nil {
goto _31
}
- _i = i32(0)
+ _i = int32(0)
_32:
- if _i >= (_pColumn.X1) {
+ if _i >= _pColumn.XnId {
goto _35
}
- *(*int32)(unsafe.Pointer(&((*TIdList_item)(unsafe.Pointer(uintptr(_pColumn.X0) + 8*uintptr(_i))).X1))) = i32(-1)
+ elem42((*TIdList_item)(_pColumn.Xa), uintptr(_i)).Xidx = int32(-1)
_i += 1
goto _32
_35:
- _i = i32(0)
+ _i = int32(0)
_36:
- if _i >= (_pColumn.X1) {
+ if _i >= _pColumn.XnId {
goto _39
}
- _j = i32(0)
+ _j = int32(0)
_40:
- if _j >= int32(_pTab.X11) {
+ if _j >= int32(_pTab.XnCol) {
goto _43
}
- if _sqlite3StrICmp(tls, (*TIdList_item)(unsafe.Pointer(uintptr(_pColumn.X0)+8*uintptr(_i))).X0, (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_j))).X0) != i32(0) {
+ if _sqlite3StrICmp(tls, elem42((*TIdList_item)(_pColumn.Xa), uintptr(_i)).XzName, elem41((*XColumn)(_pTab.XaCol), uintptr(_j)).XzName) != int32(0) {
goto _44
}
- *(*int32)(unsafe.Pointer(&((*TIdList_item)(unsafe.Pointer(uintptr(_pColumn.X0) + 8*uintptr(_i))).X1))) = _j
+ elem42((*TIdList_item)(_pColumn.Xa), uintptr(_i)).Xidx = _j
if _i != _j {
- _bIdListInOrder = uint8(i32(0))
+ _bIdListInOrder = 0
}
- if _j == int32(_pTab.X10) {
+ if _j == int32(_pTab.XiPKey) {
_ipkColumn = _i
func() {
if _withoutRowid != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109484), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118336)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109484), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118364)))
crt.X__builtin_abort(tls)
}
}()
@@ -100747,16 +101890,16 @@ _44:
_j += 1
goto _40
_43:
- if _j < int32(_pTab.X11) {
+ if _j < int32(_pTab.XnCol) {
goto _49
}
- if _sqlite3IsRowid(tls, (*TIdList_item)(unsafe.Pointer(uintptr(_pColumn.X0)+8*uintptr(_i))).X0) != 0 && (_withoutRowid == 0) {
+ if _sqlite3IsRowid(tls, elem42((*TIdList_item)(_pColumn.Xa), uintptr(_i)).XzName) != 0 && (_withoutRowid == 0) {
_ipkColumn = _i
- _bIdListInOrder = uint8(i32(0))
+ _bIdListInOrder = 0
goto _52
}
- _sqlite3ErrorMsg(tls, _pParse, str(118350), unsafe.Pointer(_pTabList), i32(0), unsafe.Pointer((*TIdList_item)(unsafe.Pointer(uintptr(_pColumn.X0)+8*uintptr(_i))).X0))
- *(*uint8)(unsafe.Pointer(&(_pParse.X5))) = uint8(i32(1))
+ _sqlite3ErrorMsg(tls, _pParse, str(118378), unsafe.Pointer(_pTabList), int32(0), unsafe.Pointer(elem42((*TIdList_item)(_pColumn.Xa), uintptr(_i)).XzName))
+ _pParse.XcheckSchema = uint8(1)
goto _insert_cleanup
_52:
_49:
@@ -100767,43 +101910,43 @@ _31:
if _pSelect == nil {
goto _53
}
- _18_regYield = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _18_addrTop = _sqlite3VdbeCurrentAddr(tls, _v) + i32(1)
- _sqlite3VdbeAddOp3(tls, _v, i32(15), _18_regYield, i32(0), _18_addrTop)
- _sqlite3SelectDestInit(tls, &_dest, i32(13), _18_regYield)
- *(*int32)(unsafe.Pointer(&(_dest.X3))) = func() int32 {
+ _18_regYield = preInc2(&_pParse.XnMem, 1)
+ _18_addrTop = _sqlite3VdbeCurrentAddr(tls, _v) + int32(1)
+ _sqlite3VdbeAddOp3(tls, _v, int32(15), _18_regYield, int32(0), _18_addrTop)
+ _sqlite3SelectDestInit(tls, &_dest, int32(13), _18_regYield)
+ _dest.XiSdst = func() int32 {
if _bIdListInOrder != 0 {
return _regData
}
- return i32(0)
+ return int32(0)
}()
- *(*int32)(unsafe.Pointer(&(_dest.X4))) = int32(_pTab.X11)
+ _dest.XnSdst = int32(_pTab.XnCol)
_18_rc = _sqlite3Select(tls, _pParse, _pSelect, &_dest)
- _regFromSelect = _dest.X3
- if (_18_rc != 0 || ((_db.X17) != 0)) || (_pParse.X16) != 0 {
+ _regFromSelect = _dest.XiSdst
+ if (_18_rc != 0 || (_db.XmallocFailed != 0)) || _pParse.XnErr != 0 {
goto _insert_cleanup
}
_sqlite3VdbeEndCoroutine(tls, _v, _18_regYield)
- _sqlite3VdbeJumpHere(tls, _v, _18_addrTop-i32(1))
+ _sqlite3VdbeJumpHere(tls, _v, _18_addrTop-int32(1))
func() {
- if (*XExprList)(_pSelect.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109526), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118382)))
+ if _pSelect.XpEList == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109526), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118410)))
crt.X__builtin_abort(tls)
}
}()
- _nColumn = (*XExprList)(_pSelect.X0).X0
+ _nColumn = (*XExprList)(_pSelect.XpEList).XnExpr
if (_pTrigger != nil) || _readsTable(tls, _pParse, _iDb, _pTab) != 0 {
- _useTempTable = uint8(i32(1))
+ _useTempTable = uint8(1)
}
if _useTempTable != 0 {
- _srcTab = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ _srcTab = postInc2(&_pParse.XnTab, 1)
_20_regRec = _sqlite3GetTempReg(tls, _pParse)
_20_regTempRowid = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp2(tls, _v, i32(110), _srcTab, _nColumn)
- _20_addrL = _sqlite3VdbeAddOp1(tls, _v, i32(16), _dest.X2)
- _sqlite3VdbeAddOp3(tls, _v, i32(101), _regFromSelect, _nColumn, _20_regRec)
- _sqlite3VdbeAddOp2(tls, _v, i32(117), _srcTab, _20_regTempRowid)
- _sqlite3VdbeAddOp3(tls, _v, i32(118), _srcTab, _20_regRec, _20_regTempRowid)
+ _sqlite3VdbeAddOp2(tls, _v, int32(110), _srcTab, _nColumn)
+ _20_addrL = _sqlite3VdbeAddOp1(tls, _v, int32(16), _dest.XiSDParm)
+ _sqlite3VdbeAddOp3(tls, _v, int32(101), _regFromSelect, _nColumn, _20_regRec)
+ _sqlite3VdbeAddOp2(tls, _v, int32(117), _srcTab, _20_regTempRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), _srcTab, _20_regRec, _20_regTempRowid)
_sqlite3VdbeGoto(tls, _v, _20_addrL)
_sqlite3VdbeJumpHere(tls, _v, _20_addrL)
_sqlite3ReleaseTempReg(tls, _pParse, _20_regRec)
@@ -100811,260 +101954,252 @@ _31:
}
goto _64
_53:
- crt.Xmemset(tls, (unsafe.Pointer)(&_21_sNC), i32(0), u32(32))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_21_sNC.X0))))) = _pParse
- _srcTab = i32(-1)
+ crt.Xmemset(tls, unsafe.Pointer(&_21_sNC), int32(0), uint32(32))
+ *(**XParse)(unsafe.Pointer(&_21_sNC.XpParse)) = _pParse
+ _srcTab = int32(-1)
func() {
- if int32(_useTempTable) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109578), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118398)))
+ if int32(_useTempTable) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109578), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118426)))
crt.X__builtin_abort(tls)
}
}()
if _pList == nil {
goto _67
}
- _nColumn = _pList.X0
+ _nColumn = _pList.XnExpr
if _sqlite3ResolveExprListNames(tls, &_21_sNC, _pList) != 0 {
goto _insert_cleanup
}
goto _69
_67:
- _nColumn = i32(0)
+ _nColumn = int32(0)
_69:
_64:
- if (_pColumn == nil) && (_nColumn > i32(0)) {
- _ipkColumn = int32(_pTab.X10)
+ if (_pColumn == nil) && (_nColumn > int32(0)) {
+ _ipkColumn = int32(_pTab.XiPKey)
}
- _i = i32(0)
+ _i = int32(0)
_72:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _75
}
- {
- p := &_nHidden
- *p = (*p) + func() int32 {
- if (int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X6) & i32(2)) != i32(0) {
- return i32(1)
- }
- return i32(0)
- }()
- sink1(*p)
- }
+ _nHidden += func() int32 {
+ if (int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XcolFlags) & int32(2)) != int32(0) {
+ return int32(1)
+ }
+ return int32(0)
+ }()
_i += 1
goto _72
_75:
- if ((_pColumn == nil) && _nColumn != 0) && (_nColumn != (int32(_pTab.X11) - _nHidden)) {
- _sqlite3ErrorMsg(tls, _pParse, str(118414), unsafe.Pointer(_pTabList), i32(0), int32(_pTab.X11)-_nHidden, _nColumn)
+ if ((_pColumn == nil) && _nColumn != 0) && (_nColumn != (int32(_pTab.XnCol) - _nHidden)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(118442), unsafe.Pointer(_pTabList), int32(0), int32(_pTab.XnCol)-_nHidden, _nColumn)
goto _insert_cleanup
}
- if (_pColumn != nil) && (_nColumn != (_pColumn.X1)) {
- _sqlite3ErrorMsg(tls, _pParse, str(118466), _nColumn, _pColumn.X1)
+ if (_pColumn != nil) && (_nColumn != _pColumn.XnId) {
+ _sqlite3ErrorMsg(tls, _pParse, str(118494), _nColumn, _pColumn.XnId)
goto _insert_cleanup
}
- if ((_db.X6) & i32(128)) != 0 {
- _regRowCount = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _regRowCount)
+ if (_db.Xflags & int32(128)) != 0 {
+ _regRowCount = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _regRowCount)
}
if _isView != 0 {
goto _84
}
- _30_nIdx = _sqlite3OpenTableAndIndices(tls, _pParse, _pTab, i32(107), uint8(i32(0)), i32(-1), nil, &_iDataCur, &_iIdxCur)
- _aRegIdx = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(4)*uint32(_30_nIdx+i32(1)))))
+ _30_nIdx = _sqlite3OpenTableAndIndices(tls, _pParse, _pTab, int32(107), 0, int32(-1), nil, &_iDataCur, &_iIdxCur)
+ _aRegIdx = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(4)*uint32(_30_nIdx+int32(1)))))
if _aRegIdx == nil {
goto _insert_cleanup
}
- *func() **XIndex { _i = i32(0); return &_pIdx }() = (*XIndex)(_pTab.X2)
+ *func() **XIndex { _i = int32(0); return &_pIdx }() = (*XIndex)(_pTab.XpIndex)
_86:
if _i >= _30_nIdx {
goto _89
}
func() {
if _pIdx == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109631), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118491)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109631), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118519)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aRegIdx)) + 4*uintptr(_i))) = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + int32(_pIdx.X14)
- sink1(*p)
- }
- *func() *int32 { _pIdx = (*XIndex)(_pIdx.X5); return &_i }() += 1
+ *elem8(_aRegIdx, uintptr(_i)) = preInc2(&_pParse.XnMem, 1)
+ _pParse.XnMem += int32(_pIdx.XnColumn)
+ *func() *int32 { _pIdx = (*XIndex)(_pIdx.XpNext); return &_i }() += 1
goto _86
_89:
_84:
if _useTempTable != 0 {
- _addrInsTop = _sqlite3VdbeAddOp1(tls, _v, i32(37), _srcTab)
+ _addrInsTop = _sqlite3VdbeAddOp1(tls, _v, int32(37), _srcTab)
_addrCont = _sqlite3VdbeCurrentAddr(tls, _v)
goto _94
}
if _pSelect != nil {
- _addrInsTop = store1(&_addrCont, _sqlite3VdbeAddOp1(tls, _v, i32(16), _dest.X2))
+ _addrInsTop = store2(&_addrCont, _sqlite3VdbeAddOp1(tls, _v, int32(16), _dest.XiSDParm))
}
_94:
_endOfLoop = _sqlite3VdbeMakeLabel(tls, _v)
- if (_tmask & i32(1)) == 0 {
+ if (_tmask & int32(1)) == 0 {
goto _95
}
- _35_regCols = _sqlite3GetTempRange(tls, _pParse, int32(_pTab.X11)+i32(1))
- if _ipkColumn < i32(0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(-1), _35_regCols)
+ _35_regCols = _sqlite3GetTempRange(tls, _pParse, int32(_pTab.XnCol)+int32(1))
+ if _ipkColumn < int32(0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(-1), _35_regCols)
goto _97
}
func() {
if _withoutRowid != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109679), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118336)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109679), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118364)))
crt.X__builtin_abort(tls)
}
}()
if _useTempTable != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _srcTab, _ipkColumn, _35_regCols)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _srcTab, _ipkColumn, _35_regCols)
goto _101
}
func() {
if _pSelect != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109683), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118496)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109683), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118524)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_ipkColumn))).X0), _35_regCols)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_ipkColumn)).XpExpr), _35_regCols)
_101:
- _37_addr1 = _sqlite3VdbeAddOp1(tls, _v, i32(76), _35_regCols)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(-1), _35_regCols)
+ _37_addr1 = _sqlite3VdbeAddOp1(tls, _v, int32(76), _35_regCols)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(-1), _35_regCols)
_sqlite3VdbeJumpHere(tls, _v, _37_addr1)
- _sqlite3VdbeAddOp1(tls, _v, i32(17), _35_regCols)
+ _sqlite3VdbeAddOp1(tls, _v, int32(17), _35_regCols)
_97:
func() {
- if (_pTab.X16) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109695), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(41933)))
+ if _pTab.XnModuleArg != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109695), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(41888)))
crt.X__builtin_abort(tls)
}
}()
- _i = store1(&_j, i32(0))
+ _i = store2(&_j, int32(0))
_106:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _109
}
if _pColumn == nil {
goto _110
}
- _j = i32(0)
+ _j = int32(0)
_111:
- if _j >= (_pColumn.X1) {
+ if _j >= _pColumn.XnId {
goto _114
}
- if ((*TIdList_item)(unsafe.Pointer(uintptr(_pColumn.X0) + 8*uintptr(_j))).X1) == _i {
+ if (elem42((*TIdList_item)(_pColumn.Xa), uintptr(_j)).Xidx) == _i {
goto _114
}
_j += 1
goto _111
_114:
_110:
- if (((_useTempTable == 0) && (_pList == nil)) || ((_pColumn != nil) && (_j >= (_pColumn.X1)))) || ((_pColumn == nil) && i32(0) != 0) {
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X1), (_35_regCols+_i)+i32(1))
+ if (((_useTempTable == 0) && (_pList == nil)) || ((_pColumn != nil) && (_j >= _pColumn.XnId))) || ((_pColumn == nil) && int32(0) != 0) {
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XpDflt), (_35_regCols+_i)+int32(1))
goto _124
}
if _useTempTable != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _srcTab, _j, (_35_regCols+_i)+i32(1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _srcTab, _j, (_35_regCols+_i)+int32(1))
goto _124
}
func() {
if _pSelect != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109711), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(118496)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109711), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(118524)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ExprCodeAndCache(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_j))).X0), (_35_regCols+_i)+i32(1))
+ _sqlite3ExprCodeAndCache(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_j)).XpExpr), (_35_regCols+_i)+int32(1))
_124:
- if (_pColumn == nil) && i32(1) != 0 {
+ if (_pColumn == nil) && int32(1) != 0 {
_j += 1
}
_i += 1
goto _106
_109:
if _isView == 0 {
- _sqlite3TableAffinity(tls, _v, _pTab, _35_regCols+i32(1))
+ _sqlite3TableAffinity(tls, _v, _pTab, _35_regCols+int32(1))
}
- _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, i32(108), nil, i32(1), _pTab, (_35_regCols-int32(_pTab.X11))-i32(1), _onError, _endOfLoop)
- _sqlite3ReleaseTempRange(tls, _pParse, _35_regCols, int32(_pTab.X11)+i32(1))
+ _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, int32(108), nil, int32(1), _pTab, (_35_regCols-int32(_pTab.XnCol))-int32(1), _onError, _endOfLoop)
+ _sqlite3ReleaseTempRange(tls, _pParse, _35_regCols, int32(_pTab.XnCol)+int32(1))
_95:
if _isView != 0 {
goto _130
}
- if (_pTab.X16) != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _regIns)
+ if _pTab.XnModuleArg != 0 {
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _regIns)
}
- if _ipkColumn < i32(0) {
+ if _ipkColumn < int32(0) {
goto _132
}
if _useTempTable != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _srcTab, _ipkColumn, _regRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _srcTab, _ipkColumn, _regRowid)
goto _136
}
if _pSelect != nil {
- _sqlite3VdbeAddOp2(tls, _v, i32(64), _regFromSelect+_ipkColumn, _regRowid)
+ _sqlite3VdbeAddOp2(tls, _v, int32(64), _regFromSelect+_ipkColumn, _regRowid)
goto _136
}
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_ipkColumn))).X0), _regRowid)
- _52_pOp = _sqlite3VdbeGetOp(tls, _v, i32(-1))
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_ipkColumn)).XpExpr), _regRowid)
+ _52_pOp = _sqlite3VdbeGetOp(tls, _v, int32(-1))
if (func() int32 {
if _52_pOp != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109750), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109750), unsafe.Pointer(&_sqlite3InsertØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() != 0 && (int32(_52_pOp.X0) == i32(59))) && ((_pTab.X16) == 0) {
- _appendFlag = uint8(i32(1))
- *(*uint8)(unsafe.Pointer(&(_52_pOp.X0))) = uint8(i32(117))
- *(*int32)(unsafe.Pointer(&(_52_pOp.X3))) = _iDataCur
- *(*int32)(unsafe.Pointer(&(_52_pOp.X4))) = _regRowid
- *(*int32)(unsafe.Pointer(&(_52_pOp.X5))) = _regAutoinc
+ }() != 0 && (int32(_52_pOp.Xopcode) == int32(59))) && (_pTab.XnModuleArg == 0) {
+ _appendFlag = uint8(1)
+ _52_pOp.Xopcode = uint8(117)
+ _52_pOp.Xp1 = _iDataCur
+ _52_pOp.Xp2 = _regRowid
+ _52_pOp.Xp3 = _regAutoinc
}
_136:
if _appendFlag != 0 {
goto _142
}
- if (_pTab.X16) == 0 {
- _54_addr1 = _sqlite3VdbeAddOp1(tls, _v, i32(76), _regRowid)
- _sqlite3VdbeAddOp3(tls, _v, i32(117), _iDataCur, _regRowid, _regAutoinc)
+ if _pTab.XnModuleArg == 0 {
+ _54_addr1 = _sqlite3VdbeAddOp1(tls, _v, int32(76), _regRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(117), _iDataCur, _regRowid, _regAutoinc)
_sqlite3VdbeJumpHere(tls, _v, _54_addr1)
goto _144
}
_54_addr1 = _sqlite3VdbeCurrentAddr(tls, _v)
- _sqlite3VdbeAddOp2(tls, _v, i32(75), _regRowid, _54_addr1+i32(2))
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), _regRowid, _54_addr1+int32(2))
_144:
- _sqlite3VdbeAddOp1(tls, _v, i32(17), _regRowid)
+ _sqlite3VdbeAddOp1(tls, _v, int32(17), _regRowid)
_142:
goto _148
_132:
- if (_pTab.X16) != 0 || (_withoutRowid != 0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _regRowid)
+ if _pTab.XnModuleArg != 0 || (_withoutRowid != 0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _regRowid)
goto _148
}
- _sqlite3VdbeAddOp3(tls, _v, i32(117), _iDataCur, _regRowid, _regAutoinc)
- _appendFlag = uint8(i32(1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(117), _iDataCur, _regRowid, _regAutoinc)
+ _appendFlag = uint8(1)
_148:
_autoIncStep(tls, _pParse, _regAutoinc, _regRowid)
- _nHidden = i32(0)
- _i = i32(0)
+ _nHidden = int32(0)
+ _i = int32(0)
_149:
- if _i >= int32(_pTab.X11) {
+ if _i >= int32(_pTab.XnCol) {
goto _152
}
- _59_iRegStore = (_regRowid + i32(1)) + _i
- if _i == int32(_pTab.X10) {
- _sqlite3VdbeAddOp1(tls, _v, i32(60), _59_iRegStore)
+ _59_iRegStore = (_regRowid + int32(1)) + _i
+ if _i == int32(_pTab.XiPKey) {
+ _sqlite3VdbeAddOp1(tls, _v, int32(60), _59_iRegStore)
goto _150
}
if _pColumn != nil {
goto _154
}
- if (int32((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X6) & i32(2)) != i32(0) {
- _j = i32(-1)
+ if (int32(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XcolFlags) & int32(2)) != int32(0) {
+ _j = int32(-1)
_nHidden += 1
goto _156
}
@@ -101072,70 +102207,70 @@ _149:
_156:
goto _157
_154:
- _j = i32(0)
+ _j = int32(0)
_158:
- if _j >= (_pColumn.X1) {
+ if _j >= _pColumn.XnId {
goto _161
}
- if ((*TIdList_item)(unsafe.Pointer(uintptr(_pColumn.X0) + 8*uintptr(_j))).X1) == _i {
+ if (elem42((*TIdList_item)(_pColumn.Xa), uintptr(_j)).Xidx) == _i {
goto _161
}
_j += 1
goto _158
_161:
_157:
- if ((_j < i32(0)) || (_nColumn == i32(0))) || ((_pColumn != nil) && (_j >= (_pColumn.X1))) {
- _sqlite3ExprCodeFactorable(tls, _pParse, (*XExpr)((*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_i))).X1), _59_iRegStore)
+ if ((_j < int32(0)) || (_nColumn == int32(0))) || ((_pColumn != nil) && (_j >= _pColumn.XnId)) {
+ _sqlite3ExprCodeFactorable(tls, _pParse, (*XExpr)(elem41((*XColumn)(_pTab.XaCol), uintptr(_i)).XpDflt), _59_iRegStore)
goto _172
}
if _useTempTable != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _srcTab, _j, _59_iRegStore)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _srcTab, _j, _59_iRegStore)
goto _172
}
if _pSelect == nil {
goto _170
}
if _regFromSelect != _regData {
- _sqlite3VdbeAddOp2(tls, _v, i32(65), _regFromSelect+_j, _59_iRegStore)
+ _sqlite3VdbeAddOp2(tls, _v, int32(65), _regFromSelect+_j, _59_iRegStore)
}
goto _172
_170:
- _sqlite3ExprCode(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2)))))+20*uintptr(_j))).X0), _59_iRegStore)
+ _sqlite3ExprCode(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_j)).XpExpr), _59_iRegStore)
_172:
_150:
_i += 1
goto _149
_152:
- if (_pTab.X16) != 0 {
+ if _pTab.XnModuleArg != 0 {
_71_pVTab = (*int8)(unsafe.Pointer(_sqlite3GetVTable(tls, _db, _pTab)))
_sqlite3VtabMakeWritable(tls, _pParse, _pTab)
- _sqlite3VdbeAddOp4(tls, _v, i32(12), i32(1), int32(_pTab.X11)+i32(2), _regIns, _71_pVTab, i32(-8))
+ _sqlite3VdbeAddOp4(tls, _v, int32(12), int32(1), int32(_pTab.XnCol)+int32(2), _regIns, _71_pVTab, int32(-8))
_sqlite3VdbeChangeP5(tls, _v, uint16(func() int32 {
- if _onError == i32(10) {
- return i32(2)
+ if _onError == int32(10) {
+ return int32(2)
}
return _onError
}()))
_sqlite3MayAbort(tls, _pParse)
goto _176
}
- _sqlite3GenerateConstraintChecks(tls, _pParse, _pTab, _aRegIdx, _iDataCur, _iIdxCur, _regIns, i32(0), uint8(bool2int(_ipkColumn >= i32(0))), uint8(_onError), _endOfLoop, &_72_isReplace, nil)
- _sqlite3FkCheck(tls, _pParse, _pTab, i32(0), _regIns, nil, i32(0))
- _72_bUseSeek = bool2int((_72_isReplace == i32(0)) || ((_pTrigger == nil) && ((((_db.X6) & i32(524288)) == i32(0)) || (_sqlite3FkReferences(tls, _pTab) == nil))))
- _sqlite3CompleteInsertion(tls, _pParse, _pTab, _iDataCur, _iIdxCur, _regIns, _aRegIdx, i32(0), int32(_appendFlag), _72_bUseSeek)
+ _sqlite3GenerateConstraintChecks(tls, _pParse, _pTab, _aRegIdx, _iDataCur, _iIdxCur, _regIns, int32(0), uint8(bool2int(_ipkColumn >= int32(0))), uint8(_onError), _endOfLoop, &_72_isReplace, nil)
+ _sqlite3FkCheck(tls, _pParse, _pTab, int32(0), _regIns, nil, int32(0))
+ _72_bUseSeek = bool2int((_72_isReplace == int32(0)) || ((_pTrigger == nil) && (((_db.Xflags & int32(524288)) == int32(0)) || (_sqlite3FkReferences(tls, _pTab) == nil))))
+ _sqlite3CompleteInsertion(tls, _pParse, _pTab, _iDataCur, _iIdxCur, _regIns, _aRegIdx, int32(0), int32(_appendFlag), _72_bUseSeek)
_176:
_130:
- if ((_db.X6) & i32(128)) != i32(0) {
- _sqlite3VdbeAddOp2(tls, _v, i32(73), _regRowCount, i32(1))
+ if (_db.Xflags & int32(128)) != int32(0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(73), _regRowCount, int32(1))
}
if _pTrigger != nil {
- _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, i32(108), nil, i32(2), _pTab, (_regData-i32(2))-int32(_pTab.X11), _onError, _endOfLoop)
+ _sqlite3CodeRowTrigger(tls, _pParse, _pTrigger, int32(108), nil, int32(2), _pTab, (_regData-int32(2))-int32(_pTab.XnCol), _onError, _endOfLoop)
}
_sqlite3VdbeResolveLabel(tls, _v, _endOfLoop)
if _useTempTable != 0 {
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _srcTab, _addrCont)
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _srcTab, _addrCont)
_sqlite3VdbeJumpHere(tls, _v, _addrInsTop)
- _sqlite3VdbeAddOp1(tls, _v, i32(114), _srcTab)
+ _sqlite3VdbeAddOp1(tls, _v, int32(114), _srcTab)
goto _insert_end
}
if _pSelect != nil {
@@ -101143,53 +102278,54 @@ _130:
_sqlite3VdbeJumpHere(tls, _v, _addrInsTop)
}
_insert_end:
- if (int32(_pParse.X6) == i32(0)) && ((*XTable)(_pParse.X40) == nil) {
+ if (int32(_pParse.Xnested) == int32(0)) && ((*XTable)(_pParse.XpTriggerTab) == nil) {
_sqlite3AutoincrementEnd(tls, _pParse)
}
- if (((_db.X6)&i32(128)) != 0 && ((_pParse.X6) == 0)) && ((*XTable)(_pParse.X40) == nil) {
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _regRowCount, i32(1))
- _sqlite3VdbeSetNumCols(tls, _v, i32(1))
- _sqlite3VdbeSetColName(tls, _v, i32(0), i32(0), str(118507), nil)
+ if ((_db.Xflags&int32(128)) != 0 && (_pParse.Xnested == 0)) && (_pParse.XpTriggerTab == nil) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _regRowCount, int32(1))
+ _sqlite3VdbeSetNumCols(tls, _v, int32(1))
+ _sqlite3VdbeSetColName(tls, _v, int32(0), int32(0), str(118535), nil)
}
_insert_cleanup:
_sqlite3SrcListDelete(tls, _db, _pTabList)
_sqlite3ExprListDelete(tls, _db, _pList)
_sqlite3SelectDelete(tls, _db, _pSelect)
_sqlite3IdListDelete(tls, _db, _pColumn)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_aRegIdx))
- _ = _dest
- _ = _21_sNC
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_aRegIdx))
}
var _sqlite3InsertØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3InsertØ00__func__Ø000[0], str(118521), 14)
-}
-
-// Attempt the transfer optimization on INSERTs of the form
-//
-// INSERT INTO tab1 SELECT * FROM tab2;
-//
-// The xfer optimization transfers raw records from tab2 over to tab1.
-// Columns are not decoded and reassembled, which greatly improves
-// performance. Raw index records are transferred in the same way.
-//
-// The xfer optimization is only attempted if tab1 and tab2 are compatible.
-// There are lots of rules for determining compatibility - see comments
-// embedded in the code for details.
-//
-// This routine returns TRUE if the optimization is guaranteed to be used.
-// Sometimes the xfer optimization will only work if the destination table
-// is empty - a factor that can only be determined at run-time. In that
-// case, this routine generates code for the xfer optimization but also
-// does a test to see if the destination table is empty and jumps over the
-// xfer optimization code if the test fails. In that case, this routine
-// returns FALSE so that the caller will know to go ahead and generate
-// an unoptimized transfer. This routine also returns FALSE if there
-// is no chance that the xfer optimization can be applied.
-//
-// This optimization is particularly useful at making VACUUM run faster.
+ crt.Xstrncpy(nil, &_sqlite3InsertØ00__func__Ø000[0], str(118549), 14)
+}
+
+// C comment
+// /*
+// ** Attempt the transfer optimization on INSERTs of the form
+// **
+// ** INSERT INTO tab1 SELECT * FROM tab2;
+// **
+// ** The xfer optimization transfers raw records from tab2 over to tab1.
+// ** Columns are not decoded and reassembled, which greatly improves
+// ** performance. Raw index records are transferred in the same way.
+// **
+// ** The xfer optimization is only attempted if tab1 and tab2 are compatible.
+// ** There are lots of rules for determining compatibility - see comments
+// ** embedded in the code for details.
+// **
+// ** This routine returns TRUE if the optimization is guaranteed to be used.
+// ** Sometimes the xfer optimization will only work if the destination table
+// ** is empty - a factor that can only be determined at run-time. In that
+// ** case, this routine generates code for the xfer optimization but also
+// ** does a test to see if the destination table is empty and jumps over the
+// ** xfer optimization code if the test fails. In that case, this routine
+// ** returns FALSE so that the caller will know to go ahead and generate
+// ** an unoptimized transfer. This routine also returns FALSE if there
+// ** is no chance that the xfer optimization can be applied.
+// **
+// ** This optimization is particularly useful at making VACUUM run faster.
+// */
func _xferOptimization(tls *crt.TLS, _pParse *XParse, _pDest *XTable, _pSelect *XSelect, _onError int32, _iDbDest int32) (r0 int32) {
var _i, _iDbSrc, _iSrc, _iDest, _addr1, _addr2, _emptyDestTest, _emptySrcTest, _regAutoinc, _destHasUniqueIdx, _regData, _regRowid int32
var _47_zColl *int8
@@ -101201,157 +102337,157 @@ func _xferOptimization(tls *crt.TLS, _pParse *XParse, _pDest *XTable, _pSelect *
var _pEList *XExprList
var _23_pDestCol, _23_pSrcCol *XColumn
var _pSrcIdx, _pDestIdx *XIndex
- _db = (*Xsqlite3)(_pParse.X0)
- _emptyDestTest = i32(0)
- _emptySrcTest = i32(0)
- _destHasUniqueIdx = i32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _emptyDestTest = int32(0)
+ _emptySrcTest = int32(0)
+ _destHasUniqueIdx = int32(0)
if _pSelect == nil {
- return i32(0)
+ return int32(0)
}
- if ((*XWith)(_pParse.X70) != nil) || ((*XWith)(_pSelect.X17) != nil) {
- return i32(0)
+ if (_pParse.XpWith != nil) || (_pSelect.XpWith != nil) {
+ return int32(0)
}
if _sqlite3TriggerList(tls, _pParse, _pDest) != nil {
- return i32(0)
+ return int32(0)
}
- if (_pDest.X16) != 0 {
- return i32(0)
+ if _pDest.XnModuleArg != 0 {
+ return int32(0)
}
- if _onError != i32(10) {
+ if _onError != int32(10) {
goto _5
}
- if int32(_pDest.X10) >= i32(0) {
- _onError = int32(_pDest.X14)
+ if int32(_pDest.XiPKey) >= int32(0) {
+ _onError = int32(_pDest.XkeyConf)
}
- if _onError == i32(10) {
- _onError = i32(2)
+ if _onError == int32(10) {
+ _onError = int32(2)
}
_5:
func() {
- if (*XSrcList)(_pSelect.X8) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110825), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(118535)))
+ if _pSelect.XpSrc == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110825), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(118563)))
crt.X__builtin_abort(tls)
}
}()
- if ((*XSrcList)(_pSelect.X8).X0) != i32(1) {
- return i32(0)
+ if ((*XSrcList)(_pSelect.XpSrc).XnSrc) != int32(1) {
+ return int32(0)
}
- if (*XSelect)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pSelect.X8).X2)))))+68*uintptr(i32(0)))).X5) != nil {
- return i32(0)
+ if (elem6((*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pSelect.XpSrc).Xa))), 0).XpSelect) != nil {
+ return int32(0)
}
- if (*XExpr)(_pSelect.X9) != nil {
- return i32(0)
+ if _pSelect.XpWhere != nil {
+ return int32(0)
}
- if (*XExprList)(_pSelect.X12) != nil {
- return i32(0)
+ if _pSelect.XpOrderBy != nil {
+ return int32(0)
}
- if (*XExprList)(_pSelect.X10) != nil {
- return i32(0)
+ if _pSelect.XpGroupBy != nil {
+ return int32(0)
}
- if (*XExpr)(_pSelect.X15) != nil {
- return i32(0)
+ if _pSelect.XpLimit != nil {
+ return int32(0)
}
func() {
- if (*XExpr)(_pSelect.X16) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110846), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(118549)))
+ if (*XExpr)(_pSelect.XpOffset) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110846), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(118577)))
crt.X__builtin_abort(tls)
}
}()
- if (*XSelect)(_pSelect.X13) != nil {
- return i32(0)
+ if _pSelect.XpPrior != nil {
+ return int32(0)
}
- if ((_pSelect.X3) & uint32(i32(1))) != 0 {
- return i32(0)
+ if (_pSelect.XselFlags & uint32(1)) != 0 {
+ return int32(0)
}
- _pEList = (*XExprList)(_pSelect.X0)
+ _pEList = (*XExprList)(_pSelect.XpEList)
func() {
if _pEList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110854), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(45052)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110854), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(45007)))
crt.X__builtin_abort(tls)
}
}()
- if (_pEList.X0) != i32(1) {
- return i32(0)
+ if _pEList.XnExpr != int32(1) {
+ return int32(0)
}
func() {
- if (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))+20*uintptr(i32(0)))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110858), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(118569)))
+ if (elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), 0).XpExpr) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110858), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(118597)))
crt.X__builtin_abort(tls)
}
}()
- if int32((*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pEList.X2)))))+20*uintptr(i32(0)))).X0).X0) != i32(161) {
- return i32(0)
+ if int32((*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pEList.Xa)), 0).XpExpr).Xop) != int32(161) {
+ return int32(0)
}
- _pItem = (*TSrcList_item)(unsafe.Pointer((*[1]TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pSelect.X8).X2)))))
- _pSrc = _sqlite3LocateTableItem(tls, _pParse, uint32(i32(0)), _pItem)
+ _pItem = (*TSrcList_item)(unsafe.Pointer(&((*XSrcList)(_pSelect.XpSrc).Xa)))
+ _pSrc = _sqlite3LocateTableItem(tls, _pParse, 0, _pItem)
if _pSrc == nil {
- return i32(0)
+ return int32(0)
}
if _pSrc == _pDest {
- return i32(0)
+ return int32(0)
}
- if (((_pDest.X9) & uint32(i32(32))) == uint32(i32(0))) != (((_pSrc.X9) & uint32(i32(32))) == uint32(i32(0))) {
- return i32(0)
+ if ((_pDest.XtabFlags & uint32(32)) == (0)) != ((_pSrc.XtabFlags & uint32(32)) == (0)) {
+ return int32(0)
}
- if (_pSrc.X16) != 0 {
- return i32(0)
+ if _pSrc.XnModuleArg != 0 {
+ return int32(0)
}
- if (*XSelect)(_pSrc.X3) != nil {
- return i32(0)
+ if _pSrc.XpSelect != nil {
+ return int32(0)
}
- if int32(_pDest.X11) != int32(_pSrc.X11) {
- return i32(0)
+ if int32(_pDest.XnCol) != int32(_pSrc.XnCol) {
+ return int32(0)
}
- if int32(_pDest.X10) != int32(_pSrc.X10) {
- return i32(0)
+ if int32(_pDest.XiPKey) != int32(_pSrc.XiPKey) {
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_33:
- if _i >= int32(_pDest.X11) {
+ if _i >= int32(_pDest.XnCol) {
goto _36
}
- _23_pDestCol = (*XColumn)(unsafe.Pointer(uintptr(_pDest.X1) + 16*uintptr(_i)))
- _23_pSrcCol = (*XColumn)(unsafe.Pointer(uintptr(_pSrc.X1) + 16*uintptr(_i)))
- if int32(_23_pDestCol.X4) != int32(_23_pSrcCol.X4) {
- return i32(0)
+ _23_pDestCol = elem41((*XColumn)(_pDest.XaCol), uintptr(_i))
+ _23_pSrcCol = elem41((*XColumn)(_pSrc.XaCol), uintptr(_i))
+ if int32(_23_pDestCol.Xaffinity) != int32(_23_pSrcCol.Xaffinity) {
+ return int32(0)
}
- if Xsqlite3_stricmp(tls, _23_pDestCol.X2, _23_pSrcCol.X2) != i32(0) {
- return i32(0)
+ if Xsqlite3_stricmp(tls, _23_pDestCol.XzColl, _23_pSrcCol.XzColl) != int32(0) {
+ return int32(0)
}
- if ((_23_pDestCol.X3) != 0) && ((_23_pSrcCol.X3) == 0) {
- return i32(0)
+ if (_23_pDestCol.XnotNull != 0) && (_23_pSrcCol.XnotNull == 0) {
+ return int32(0)
}
- if _i <= i32(0) {
+ if _i <= int32(0) {
goto _41
}
func() {
- if (*XExpr)(_23_pDestCol.X1) != nil && int32((*XExpr)(_23_pDestCol.X1).X0) != i32(162) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110913), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(118588)))
+ if (*XExpr)(_23_pDestCol.XpDflt) != nil && int32((*XExpr)(_23_pDestCol.XpDflt).Xop) != int32(162) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110913), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(118616)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XExpr)(_23_pSrcCol.X1) != nil && int32((*XExpr)(_23_pSrcCol.X1).X0) != i32(162) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110914), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(118639)))
+ if (*XExpr)(_23_pSrcCol.XpDflt) != nil && int32((*XExpr)(_23_pSrcCol.XpDflt).Xop) != int32(162) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110914), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(118667)))
crt.X__builtin_abort(tls)
}
}()
- if (((*XExpr)(_23_pDestCol.X1) == nil) != ((*XExpr)(_23_pSrcCol.X1) == nil)) || (((*XExpr)(_23_pDestCol.X1) != nil) && (crt.Xstrcmp(tls, *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&((*XExpr)(_23_pDestCol.X1).X3))))), *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&((*XExpr)(_23_pSrcCol.X1).X3)))))) != i32(0))) {
- return i32(0)
+ if (((*XExpr)(_23_pDestCol.XpDflt) == nil) != ((*XExpr)(_23_pSrcCol.XpDflt) == nil)) || ((_23_pDestCol.XpDflt != nil) && (crt.Xstrcmp(tls, *(**int8)(unsafe.Pointer(&((*XExpr)(_23_pDestCol.XpDflt).Xu))), *(**int8)(unsafe.Pointer(&((*XExpr)(_23_pSrcCol.XpDflt).Xu)))) != int32(0))) {
+ return int32(0)
}
_41:
_i += 1
goto _33
_36:
- _pDestIdx = (*XIndex)(_pDest.X2)
+ _pDestIdx = (*XIndex)(_pDest.XpIndex)
_51:
if _pDestIdx == nil {
goto _54
}
- if int32(_pDestIdx.X15) != i32(0) {
- _destHasUniqueIdx = i32(1)
+ if int32(_pDestIdx.XonError) != int32(0) {
+ _destHasUniqueIdx = int32(1)
}
- _pSrcIdx = (*XIndex)(_pSrc.X2)
+ _pSrcIdx = (*XIndex)(_pSrc.XpIndex)
_56:
if _pSrcIdx == nil {
goto _59
@@ -101359,103 +102495,103 @@ _56:
if _xferCompatibleIndex(tls, _pDestIdx, _pSrcIdx) != 0 {
goto _59
}
- _pSrcIdx = (*XIndex)(_pSrcIdx.X5)
+ _pSrcIdx = (*XIndex)(_pSrcIdx.XpNext)
goto _56
_59:
if _pSrcIdx == nil {
- return i32(0)
+ return int32(0)
}
- _pDestIdx = (*XIndex)(_pDestIdx.X5)
+ _pDestIdx = (*XIndex)(_pDestIdx.XpNext)
goto _51
_54:
- if ((*XExprList)(_pDest.X6) != nil) && _sqlite3ExprListCompare(tls, (*XExprList)(_pSrc.X6), (*XExprList)(_pDest.X6), i32(-1)) != 0 {
- return i32(0)
+ if (_pDest.XpCheck != nil) && _sqlite3ExprListCompare(tls, (*XExprList)(_pSrc.XpCheck), (*XExprList)(_pDest.XpCheck), int32(-1)) != 0 {
+ return int32(0)
}
- if (((_db.X6) & i32(524288)) != i32(0)) && ((*XFKey)(_pDest.X4) != nil) {
- return i32(0)
+ if ((_db.Xflags & int32(524288)) != int32(0)) && ((*XFKey)(_pDest.XpFKey) != nil) {
+ return int32(0)
}
- if ((_db.X6) & i32(128)) != i32(0) {
- return i32(0)
+ if (_db.Xflags & int32(128)) != int32(0) {
+ return int32(0)
}
- _iDbSrc = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pSrc.X20))
+ _iDbSrc = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pSrc.XpSchema))
_v = _sqlite3GetVdbe(tls, _pParse)
_sqlite3CodeVerifySchema(tls, _pParse, _iDbSrc)
- _iSrc = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
- _iDest = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ _iSrc = postInc2(&_pParse.XnTab, 1)
+ _iDest = postInc2(&_pParse.XnTab, 1)
_regAutoinc = _autoIncBegin(tls, _pParse, _iDbDest, _pDest)
_regData = _sqlite3GetTempReg(tls, _pParse)
_regRowid = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3OpenTable(tls, _pParse, _iDest, _iDbDest, _pDest, i32(107))
+ _sqlite3OpenTable(tls, _pParse, _iDest, _iDbDest, _pDest, int32(107))
func() {
- if ((_pDest.X9)&uint32(i32(32))) != uint32(i32(0)) && _destHasUniqueIdx == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110971), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(118688)))
+ if (_pDest.XtabFlags&uint32(32)) != (0) && _destHasUniqueIdx == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110971), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(118716)))
crt.X__builtin_abort(tls)
}
}()
- if (((_db.X6) & i32(268435456)) == i32(0)) && ((((int32(_pDest.X10) < i32(0)) && ((*XIndex)(_pDest.X2) != nil)) || _destHasUniqueIdx != 0) || ((_onError != i32(2)) && (_onError != i32(1)))) {
- _addr1 = _sqlite3VdbeAddOp2(tls, _v, i32(37), _iDest, i32(0))
- _emptyDestTest = _sqlite3VdbeAddOp0(tls, _v, i32(13))
+ if ((_db.Xflags & int32(268435456)) == int32(0)) && ((((int32(_pDest.XiPKey) < int32(0)) && ((*XIndex)(_pDest.XpIndex) != nil)) || _destHasUniqueIdx != 0) || ((_onError != int32(2)) && (_onError != int32(1)))) {
+ _addr1 = _sqlite3VdbeAddOp2(tls, _v, int32(37), _iDest, int32(0))
+ _emptyDestTest = _sqlite3VdbeAddOp0(tls, _v, int32(13))
_sqlite3VdbeJumpHere(tls, _v, _addr1)
}
- if ((_pSrc.X9) & uint32(i32(32))) != uint32(i32(0)) {
+ if (_pSrc.XtabFlags & uint32(32)) != (0) {
goto _76
}
- _sqlite3OpenTable(tls, _pParse, _iSrc, _iDbSrc, _pSrc, i32(106))
- _emptySrcTest = _sqlite3VdbeAddOp2(tls, _v, i32(37), _iSrc, i32(0))
- if int32(_pDest.X10) >= i32(0) {
- _addr1 = _sqlite3VdbeAddOp2(tls, _v, i32(125), _iSrc, _regRowid)
- _addr2 = _sqlite3VdbeAddOp3(tls, _v, i32(32), _iDest, i32(0), _regRowid)
+ _sqlite3OpenTable(tls, _pParse, _iSrc, _iDbSrc, _pSrc, int32(106))
+ _emptySrcTest = _sqlite3VdbeAddOp2(tls, _v, int32(37), _iSrc, int32(0))
+ if int32(_pDest.XiPKey) >= int32(0) {
+ _addr1 = _sqlite3VdbeAddOp2(tls, _v, int32(125), _iSrc, _regRowid)
+ _addr2 = _sqlite3VdbeAddOp3(tls, _v, int32(32), _iDest, int32(0), _regRowid)
_sqlite3RowidConstraint(tls, _pParse, _onError, _pDest)
_sqlite3VdbeJumpHere(tls, _v, _addr2)
_autoIncStep(tls, _pParse, _regAutoinc, _regRowid)
goto _80
}
- if (*XIndex)(_pDest.X2) == nil {
- _addr1 = _sqlite3VdbeAddOp2(tls, _v, i32(117), _iDest, _regRowid)
+ if (*XIndex)(_pDest.XpIndex) == nil {
+ _addr1 = _sqlite3VdbeAddOp2(tls, _v, int32(117), _iDest, _regRowid)
goto _80
}
- _addr1 = _sqlite3VdbeAddOp2(tls, _v, i32(125), _iSrc, _regRowid)
+ _addr1 = _sqlite3VdbeAddOp2(tls, _v, int32(125), _iSrc, _regRowid)
func() {
- if ((_pDest.X9) & uint32(i32(8))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(111013), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(118724)))
+ if (_pDest.XtabFlags & uint32(8)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(111013), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(118752)))
crt.X__builtin_abort(tls)
}
}()
_80:
- _sqlite3VdbeAddOp3(tls, _v, i32(124), _iSrc, _regData, i32(1))
- if ((_db.X6) & i32(268435456)) != 0 {
- _sqlite3VdbeAddOp3(tls, _v, i32(33), _iDest, i32(0), i32(-1))
- _37_insFlags = uint8(i32(57))
+ _sqlite3VdbeAddOp3(tls, _v, int32(124), _iSrc, _regData, int32(1))
+ if (_db.Xflags & int32(268435456)) != 0 {
+ _sqlite3VdbeAddOp3(tls, _v, int32(33), _iDest, int32(0), int32(-1))
+ _37_insFlags = uint8(57)
goto _84
}
- _37_insFlags = uint8(i32(41))
+ _37_insFlags = uint8(41)
_84:
- _sqlite3VdbeAddOp4(tls, _v, i32(118), _iDest, _regData, _regRowid, (*int8)(unsafe.Pointer(_pDest)), i32(-15))
+ _sqlite3VdbeAddOp4(tls, _v, int32(118), _iDest, _regData, _regRowid, (*int8)(unsafe.Pointer(_pDest)), int32(-15))
_sqlite3VdbeChangeP5(tls, _v, uint16(_37_insFlags))
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _iSrc, _addr1)
- _sqlite3VdbeAddOp2(tls, _v, i32(114), _iSrc, i32(0))
- _sqlite3VdbeAddOp2(tls, _v, i32(114), _iDest, i32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _iSrc, _addr1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(114), _iSrc, int32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(114), _iDest, int32(0))
goto _85
_76:
- _sqlite3TableLock(tls, _pParse, _iDbDest, _pDest.X7, uint8(i32(1)), _pDest.X0)
- _sqlite3TableLock(tls, _pParse, _iDbSrc, _pSrc.X7, uint8(i32(0)), _pSrc.X0)
+ _sqlite3TableLock(tls, _pParse, _iDbDest, _pDest.Xtnum, uint8(1), _pDest.XzName)
+ _sqlite3TableLock(tls, _pParse, _iDbSrc, _pSrc.Xtnum, 0, _pSrc.XzName)
_85:
- _pDestIdx = (*XIndex)(_pDest.X2)
+ _pDestIdx = (*XIndex)(_pDest.XpIndex)
_86:
if _pDestIdx == nil {
goto _89
}
- _44_idxInsFlags = uint8(i32(0))
- _pSrcIdx = (*XIndex)(_pSrc.X2)
+ _44_idxInsFlags = 0
+ _pSrcIdx = (*XIndex)(_pSrc.XpIndex)
_90:
if func() int32 {
if _pSrcIdx != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(111035), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(111035), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _95
@@ -101463,58 +102599,57 @@ _90:
if _xferCompatibleIndex(tls, _pDestIdx, _pSrcIdx) != 0 {
goto _95
}
- _pSrcIdx = (*XIndex)(_pSrcIdx.X5)
+ _pSrcIdx = (*XIndex)(_pSrcIdx.XpNext)
goto _90
_95:
func() {
if _pSrcIdx == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(111038), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferOptimizationØ00__func__Ø000))), unsafe.Pointer(str(118764)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(111038), unsafe.Pointer(&_xferOptimizationØ00__func__Ø000), unsafe.Pointer(str(118792)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp3(tls, _v, i32(106), _iSrc, _pSrcIdx.X11, _iDbSrc)
+ _sqlite3VdbeAddOp3(tls, _v, int32(106), _iSrc, _pSrcIdx.Xtnum, _iDbSrc)
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _pSrcIdx)
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_pSrcIdx.X0))
- _sqlite3VdbeAddOp3(tls, _v, i32(107), _iDest, _pDestIdx.X11, _iDbDest)
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_pSrcIdx.XzName))
+ _sqlite3VdbeAddOp3(tls, _v, int32(107), _iDest, _pDestIdx.Xtnum, _iDbDest)
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _pDestIdx)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(1)))
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_pDestIdx.X0))
- _addr1 = _sqlite3VdbeAddOp2(tls, _v, i32(37), _iSrc, i32(0))
- _sqlite3VdbeAddOp3(tls, _v, i32(124), _iSrc, _regData, i32(1))
- if ((_db.X6) & i32(268435456)) == 0 {
+ _sqlite3VdbeChangeP5(tls, _v, uint16(1))
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_pDestIdx.XzName))
+ _addr1 = _sqlite3VdbeAddOp2(tls, _v, int32(37), _iSrc, int32(0))
+ _sqlite3VdbeAddOp3(tls, _v, int32(124), _iSrc, _regData, int32(1))
+ if (_db.Xflags & int32(268435456)) == 0 {
goto _99
}
- _i = i32(0)
+ _i = int32(0)
_100:
- if _i >= int32(_pSrcIdx.X14) {
+ if _i >= int32(_pSrcIdx.XnColumn) {
goto _103
}
- _47_zColl = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pSrcIdx.X8)) + 4*uintptr(_i)))
+ _47_zColl = *elem0(_pSrcIdx.XazColl, uintptr(_i))
if Xsqlite3_stricmp(tls, (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)), _47_zColl) != 0 {
goto _103
}
_i += 1
goto _100
_103:
- if _i == int32(_pSrcIdx.X14) {
- _44_idxInsFlags = uint8(i32(16))
- _sqlite3VdbeAddOp3(tls, _v, i32(33), _iDest, i32(0), i32(-1))
+ if _i == int32(_pSrcIdx.XnColumn) {
+ _44_idxInsFlags = uint8(16)
+ _sqlite3VdbeAddOp3(tls, _v, int32(33), _iDest, int32(0), int32(-1))
}
_99:
- if (((_pSrc.X9) & uint32(i32(32))) != uint32(i32(0))) && (int32((uint32(_pDestIdx.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(2)) {
+ if ((_pSrc.XtabFlags & uint32(32)) != (0)) && (int32((uint32(_pDestIdx.XidxType)<<30)>>30) == int32(2)) {
{
p := &_44_idxInsFlags
- *p = uint8(int32(*p) | i32(1))
- sink2(*p)
+ *p = uint8(int32(*p) | int32(1))
}
}
- _sqlite3VdbeAddOp2(tls, _v, i32(128), _iDest, _regData)
- _sqlite3VdbeChangeP5(tls, _v, uint16(int32(_44_idxInsFlags)|i32(8)))
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _iSrc, _addr1+i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(128), _iDest, _regData)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(int32(_44_idxInsFlags)|int32(8)))
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _iSrc, _addr1+int32(1))
_sqlite3VdbeJumpHere(tls, _v, _addr1)
- _sqlite3VdbeAddOp2(tls, _v, i32(114), _iSrc, i32(0))
- _sqlite3VdbeAddOp2(tls, _v, i32(114), _iDest, i32(0))
- _pDestIdx = (*XIndex)(_pDestIdx.X5)
+ _sqlite3VdbeAddOp2(tls, _v, int32(114), _iSrc, int32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(114), _iDest, int32(0))
+ _pDestIdx = (*XIndex)(_pDestIdx.XpNext)
goto _86
_89:
if _emptySrcTest != 0 {
@@ -101524,167 +102659,179 @@ _89:
_sqlite3ReleaseTempReg(tls, _pParse, _regData)
if _emptyDestTest != 0 {
_sqlite3AutoincrementEnd(tls, _pParse)
- _sqlite3VdbeAddOp2(tls, _v, i32(55), i32(0), i32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(55), int32(0), int32(0))
_sqlite3VdbeJumpHere(tls, _v, _emptyDestTest)
- _sqlite3VdbeAddOp2(tls, _v, i32(114), _iDest, i32(0))
- return i32(0)
+ _sqlite3VdbeAddOp2(tls, _v, int32(114), _iDest, int32(0))
+ return int32(0)
}
- return i32(1)
+ return int32(1)
}
var _xferOptimizationØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_xferOptimizationØ00__func__Ø000[0], str(118772), 17)
+ crt.Xstrncpy(nil, &_xferOptimizationØ00__func__Ø000[0], str(118800), 17)
}
-// Check to see if index pSrc is compatible as a source of data
-// for index pDest in an insert transfer optimization. The rules
-// for a compatible index:
-//
-// * The index is over the same set of columns
-// * The same DESC and ASC markings occurs on all columns
-// * The same onError processing (OE_Abort, OE_Ignore, etc)
-// * The same collating sequence on each column
-// * The index has the exact same WHERE clause
+// C comment
+// /*
+// ** Check to see if index pSrc is compatible as a source of data
+// ** for index pDest in an insert transfer optimization. The rules
+// ** for a compatible index:
+// **
+// ** * The index is over the same set of columns
+// ** * The same DESC and ASC markings occurs on all columns
+// ** * The same onError processing (OE_Abort, OE_Ignore, etc)
+// ** * The same collating sequence on each column
+// ** * The index has the exact same WHERE clause
+// */
func _xferCompatibleIndex(tls *crt.TLS, _pDest *XIndex, _pSrc *XIndex) (r0 int32) {
var _i int32
func() {
if _pDest == nil || _pSrc == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110722), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferCompatibleIndexØ00__func__Ø000))), unsafe.Pointer(str(118789)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110722), unsafe.Pointer(&_xferCompatibleIndexØ00__func__Ø000), unsafe.Pointer(str(118817)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XTable)(_pDest.X3) == (*XTable)(_pSrc.X3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110723), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferCompatibleIndexØ00__func__Ø000))), unsafe.Pointer(str(118803)))
+ if (*XTable)(_pDest.XpTable) == (*XTable)(_pSrc.XpTable) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110723), unsafe.Pointer(&_xferCompatibleIndexØ00__func__Ø000), unsafe.Pointer(str(118831)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pDest.X13) != int32(_pSrc.X13) {
- return i32(0)
+ if int32(_pDest.XnKeyCol) != int32(_pSrc.XnKeyCol) {
+ return int32(0)
}
- if int32(_pDest.X15) != int32(_pSrc.X15) {
- return i32(0)
+ if int32(_pDest.XonError) != int32(_pSrc.XonError) {
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_7:
- if _i >= int32(_pSrc.X13) {
+ if _i >= int32(_pSrc.XnKeyCol) {
goto _10
}
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pSrc.X1)) + 2*uintptr(_i)))) != int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pDest.X1)) + 2*uintptr(_i)))) {
- return i32(0)
+ if int32(*elem50(_pSrc.XaiColumn, uintptr(_i))) != int32(*elem50(_pDest.XaiColumn, uintptr(_i))) {
+ return int32(0)
}
- if int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pSrc.X1)) + 2*uintptr(_i)))) != i32(-2) {
+ if int32(*elem50(_pSrc.XaiColumn, uintptr(_i))) != int32(-2) {
goto _12
}
func() {
- if (*XExprList)(_pSrc.X10) == nil || (*XExprList)(_pDest.X10) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(110735), unsafe.Pointer((*int8)(unsafe.Pointer(&_xferCompatibleIndexØ00__func__Ø000))), unsafe.Pointer(str(118831)))
+ if (*XExprList)(_pSrc.XaColExpr) == nil || (*XExprList)(_pDest.XaColExpr) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(110735), unsafe.Pointer(&_xferCompatibleIndexØ00__func__Ø000), unsafe.Pointer(str(118859)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3ExprCompare(tls, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSrc.X10).X2)))))+20*uintptr(_i))).X0), (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&((*XExprList)(_pDest.X10).X2)))))+20*uintptr(_i))).X0), i32(-1)) != i32(0) {
- return i32(0)
+ if _sqlite3ExprCompare(tls, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pSrc.XaColExpr).Xa))), uintptr(_i)).XpExpr), (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&((*XExprList)(_pDest.XaColExpr).Xa))), uintptr(_i)).XpExpr), int32(-1)) != int32(0) {
+ return int32(0)
}
_12:
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pSrc.X7)) + 1*uintptr(_i)))) != int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pDest.X7)) + 1*uintptr(_i)))) {
- return i32(0)
+ if int32(*elem15(_pSrc.XaSortOrder, uintptr(_i))) != int32(*elem15(_pDest.XaSortOrder, uintptr(_i))) {
+ return int32(0)
}
- if Xsqlite3_stricmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pSrc.X8)) + 4*uintptr(_i))), *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pDest.X8)) + 4*uintptr(_i)))) != i32(0) {
- return i32(0)
+ if Xsqlite3_stricmp(tls, *elem0(_pSrc.XazColl, uintptr(_i)), *elem0(_pDest.XazColl, uintptr(_i))) != int32(0) {
+ return int32(0)
}
_i += 1
goto _7
_10:
- if _sqlite3ExprCompare(tls, (*XExpr)(_pSrc.X9), (*XExpr)(_pDest.X9), i32(-1)) != 0 {
- return i32(0)
+ if _sqlite3ExprCompare(tls, (*XExpr)(_pSrc.XpPartIdxWhere), (*XExpr)(_pDest.XpPartIdxWhere), int32(-1)) != 0 {
+ return int32(0)
}
- return i32(1)
+ return int32(1)
}
var _xferCompatibleIndexØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_xferCompatibleIndexØ00__func__Ø000[0], str(118871), 20)
-}
-
-// Locate or create an AutoincInfo structure associated with table pTab
-// which is in database iDb. Return the register number for the register
-// that holds the maximum rowid. Return zero if pTab is not an AUTOINCREMENT
-// table. (Also return zero when doing a VACUUM since we do not want to
-// update the AUTOINCREMENT counters during a VACUUM.)
-//
-// There is at most one AutoincInfo structure per table even if the
-// same table is autoincremented multiple times due to inserts within
-// triggers. A new AutoincInfo structure is created if this is the
-// first use of table pTab. On 2nd and subsequent uses, the original
-// AutoincInfo structure is used.
-//
-// Three memory locations are allocated:
-//
-// (1) Register to hold the name of the pTab table.
-// (2) Register to hold the maximum ROWID of pTab.
-// (3) Register to hold the rowid in sqlite_sequence of pTab
-//
-// The 2nd register is the one that is returned. That is all the
-// insert routine needs to know about.
+ crt.Xstrncpy(nil, &_xferCompatibleIndexØ00__func__Ø000[0], str(118899), 20)
+}
+
+// C comment
+// /*
+// ** Locate or create an AutoincInfo structure associated with table pTab
+// ** which is in database iDb. Return the register number for the register
+// ** that holds the maximum rowid. Return zero if pTab is not an AUTOINCREMENT
+// ** table. (Also return zero when doing a VACUUM since we do not want to
+// ** update the AUTOINCREMENT counters during a VACUUM.)
+// **
+// ** There is at most one AutoincInfo structure per table even if the
+// ** same table is autoincremented multiple times due to inserts within
+// ** triggers. A new AutoincInfo structure is created if this is the
+// ** first use of table pTab. On 2nd and subsequent uses, the original
+// ** AutoincInfo structure is used.
+// **
+// ** Three memory locations are allocated:
+// **
+// ** (1) Register to hold the name of the pTab table.
+// ** (2) Register to hold the maximum ROWID of pTab.
+// ** (3) Register to hold the rowid in sqlite_sequence of pTab
+// **
+// ** The 2nd register is the one that is returned. That is all the
+// ** insert routine needs to know about.
+// */
func _autoIncBegin(tls *crt.TLS, _pParse *XParse, _iDb int32, _pTab *XTable) (r0 int32) {
var _memId int32
var _1_pToplevel *XParse
- var _1_pInfo *TAggInfo_func
- _memId = i32(0)
- if ((_pTab.X9)&uint32(i32(8))) == uint32(i32(0)) || (((*Xsqlite3)(_pParse.X0).X6)&i32(268435456)) != i32(0) {
+ var _1_pInfo *XAutoincInfo
+ _memId = int32(0)
+ if (_pTab.XtabFlags&uint32(8)) == (0) || (((*Xsqlite3)(_pParse.Xdb).Xflags)&int32(268435456)) != int32(0) {
goto _1
}
_1_pToplevel = func() *XParse {
- if (*XParse)(_pParse.X39) != nil {
- return (*XParse)(_pParse.X39)
+ if _pParse.XpToplevel != nil {
+ return (*XParse)(_pParse.XpToplevel)
}
return _pParse
}()
- _1_pInfo = (*TAggInfo_func)(_1_pToplevel.X38)
+ _1_pInfo = (*XAutoincInfo)(_1_pToplevel.XpAinc)
_4:
- if (_1_pInfo != nil) && ((*XTable)(_1_pInfo.X1) != _pTab) {
- _1_pInfo = (*TAggInfo_func)(_1_pInfo.X0)
+ if (_1_pInfo != nil) && ((*XTable)(_1_pInfo.XpTab) != _pTab) {
+ _1_pInfo = (*XAutoincInfo)(_1_pInfo.XpNext)
goto _4
}
if _1_pInfo != nil {
goto _7
}
- _1_pInfo = (*TAggInfo_func)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.X0), uint64(u32(16))))
+ _1_pInfo = (*XAutoincInfo)(_sqlite3DbMallocRawNN(tls, (*Xsqlite3)(_pParse.Xdb), uint64(16)))
if _1_pInfo == nil {
- return i32(0)
- }
- *(**TAggInfo_func)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pInfo.X0))))) = (*TAggInfo_func)(_1_pToplevel.X38)
- *(**TAggInfo_func)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pToplevel.X38))))) = _1_pInfo
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pInfo.X1))))) = _pTab
- *(*int32)(unsafe.Pointer(&(_1_pInfo.X2))) = _iDb
- *(*int32)(unsafe.Pointer(&(_1_pToplevel.X18))) += 1
- *(*int32)(unsafe.Pointer(&(_1_pInfo.X3))) = preInc1((*int32)(unsafe.Pointer(&(_1_pToplevel.X18))), 1)
- *(*int32)(unsafe.Pointer(&(_1_pToplevel.X18))) += 1
+ return int32(0)
+ }
+ *(**XAutoincInfo)(unsafe.Pointer(&_1_pInfo.XpNext)) = (*XAutoincInfo)(_1_pToplevel.XpAinc)
+ *(**XAutoincInfo)(unsafe.Pointer(&_1_pToplevel.XpAinc)) = _1_pInfo
+ *(**XTable)(unsafe.Pointer(&_1_pInfo.XpTab)) = _pTab
+ _1_pInfo.XiDb = _iDb
+ _1_pToplevel.XnMem += 1
+ _1_pInfo.XregCtr = preInc2(&_1_pToplevel.XnMem, 1)
+ _1_pToplevel.XnMem += 1
_7:
- _memId = _1_pInfo.X3
+ _memId = _1_pInfo.XregCtr
_1:
return _memId
}
-// Update the maximum rowid for an autoincrement calculation.
-//
-// This routine should be called when the regRowid register holds a
-// new rowid that is about to be inserted. If that new rowid is
-// larger than the maximum rowid in the memId memory cell, then the
-// memory cell is updated.
+// C comment
+// /*
+// ** Update the maximum rowid for an autoincrement calculation.
+// **
+// ** This routine should be called when the regRowid register holds a
+// ** new rowid that is about to be inserted. If that new rowid is
+// ** larger than the maximum rowid in the memId memory cell, then the
+// ** memory cell is updated.
+// */
func _autoIncStep(tls *crt.TLS, _pParse *XParse, _memId int32, _regRowid int32) {
- if _memId > i32(0) {
- _sqlite3VdbeAddOp2(tls, (*TVdbe)(_pParse.X2), i32(148), _memId, _regRowid)
+ if _memId > int32(0) {
+ _sqlite3VdbeAddOp2(tls, (*TVdbe)(_pParse.XpVdbe), int32(148), _memId, _regRowid)
}
}
-// Return non-zero if the table pTab in database iDb or any of its indices
-// have been opened at any point in the VDBE program. This is used to see if
-// a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can
-// run without using a temporary table for the results of the SELECT.
+// C comment
+// /*
+// ** Return non-zero if the table pTab in database iDb or any of its indices
+// ** have been opened at any point in the VDBE program. This is used to see if
+// ** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can
+// ** run without using a temporary table for the results of the SELECT.
+// */
func _readsTable(tls *crt.TLS, _p *XParse, _iDb int32, _pTab *XTable) (r0 int32) {
var _i, _iEnd, _2_tnum int32
var _v *TVdbe
@@ -101694,12 +102841,12 @@ func _readsTable(tls *crt.TLS, _p *XParse, _iDb int32, _pTab *XTable) (r0 int32)
_v = _sqlite3GetVdbe(tls, _p)
_iEnd = _sqlite3VdbeCurrentAddr(tls, _v)
_pVTab = func() *XVTable {
- if (_pTab.X16) != 0 {
- return _sqlite3GetVTable(tls, (*Xsqlite3)(_p.X0), _pTab)
+ if _pTab.XnModuleArg != 0 {
+ return _sqlite3GetVTable(tls, (*Xsqlite3)(_p.Xdb), _pTab)
}
return nil
}()
- _i = i32(1)
+ _i = int32(1)
_2:
if _i >= _iEnd {
goto _5
@@ -101707,205 +102854,217 @@ _2:
_1_pOp = _sqlite3VdbeGetOp(tls, _v, _i)
func() {
if _1_pOp == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109010), unsafe.Pointer((*int8)(unsafe.Pointer(&_readsTableØ00__func__Ø000))), unsafe.Pointer(str(109348)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109010), unsafe.Pointer(&_readsTableØ00__func__Ø000), unsafe.Pointer(str(109376)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_1_pOp.X0) != i32(106) || (_1_pOp.X5) != _iDb {
+ if int32(_1_pOp.Xopcode) != int32(106) || _1_pOp.Xp3 != _iDb {
goto _9
}
- _2_tnum = _1_pOp.X4
- if _2_tnum == (_pTab.X7) {
- return i32(1)
+ _2_tnum = _1_pOp.Xp2
+ if _2_tnum == _pTab.Xtnum {
+ return int32(1)
}
- _2_pIndex = (*XIndex)(_pTab.X2)
+ _2_pIndex = (*XIndex)(_pTab.XpIndex)
_11:
if _2_pIndex == nil {
goto _14
}
- if _2_tnum == (_2_pIndex.X11) {
- return i32(1)
+ if _2_tnum == _2_pIndex.Xtnum {
+ return int32(1)
}
- _2_pIndex = (*XIndex)(_2_pIndex.X5)
+ _2_pIndex = (*XIndex)(_2_pIndex.XpNext)
goto _11
_14:
_9:
- if (int32(_1_pOp.X0) == i32(158)) && ((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_1_pOp.X6)))))) == _pVTab) {
+ if (int32(_1_pOp.Xopcode) == int32(158)) && ((*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_1_pOp.Xp4))) == _pVTab) {
func() {
- if (*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_1_pOp.X6)))))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109025), unsafe.Pointer((*int8)(unsafe.Pointer(&_readsTableØ00__func__Ø000))), unsafe.Pointer(str(118891)))
+ if (*XVTable)(*(*unsafe.Pointer)(unsafe.Pointer(&_1_pOp.Xp4))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109025), unsafe.Pointer(&_readsTableØ00__func__Ø000), unsafe.Pointer(str(118919)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_1_pOp.X1) != i32(-8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(109026), unsafe.Pointer((*int8)(unsafe.Pointer(&_readsTableØ00__func__Ø000))), unsafe.Pointer(str(72269)))
+ if int32(_1_pOp.Xp4type) != int32(-8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(109026), unsafe.Pointer(&_readsTableØ00__func__Ø000), unsafe.Pointer(str(70431)))
crt.X__builtin_abort(tls)
}
}()
- return i32(1)
+ return int32(1)
}
_i += 1
goto _2
_5:
- return i32(0)
+ return int32(0)
}
var _readsTableØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_readsTableØ00__func__Ø000[0], str(118908), 11)
+ crt.Xstrncpy(nil, &_readsTableØ00__func__Ø000[0], str(118936), 11)
}
-// Generate code that evaluates the given expression and puts the result
-// in register target.
-//
-// Also make a copy of the expression results into another "cache" register
-// and modify the expression so that the next time it is evaluated,
-// the result is a copy of the cache register.
-//
-// This routine is used for expressions that are used multiple
-// times. They are evaluated once and the results of the expression
-// are reused.
+// C comment
+// /*
+// ** Generate code that evaluates the given expression and puts the result
+// ** in register target.
+// **
+// ** Also make a copy of the expression results into another "cache" register
+// ** and modify the expression so that the next time it is evaluated,
+// ** the result is a copy of the cache register.
+// **
+// ** This routine is used for expressions that are used multiple
+// ** times. They are evaluated once and the results of the expression
+// ** are reused.
+// */
func _sqlite3ExprCodeAndCache(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _target int32) {
var _iMem int32
var _v *TVdbe
- _v = (*TVdbe)(_pParse.X2)
+ _v = (*TVdbe)(_pParse.XpVdbe)
func() {
- if _target <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95114), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeAndCacheØ00__func__Ø000))), unsafe.Pointer(str(99594)))
+ if _target <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95114), unsafe.Pointer(&_sqlite3ExprCodeAndCacheØ00__func__Ø000), unsafe.Pointer(str(99622)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pExpr.X0) == i32(157) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(95115), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprCodeAndCacheØ00__func__Ø000))), unsafe.Pointer(str(118919)))
+ if int32(_pExpr.Xop) == int32(157) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(95115), unsafe.Pointer(&_sqlite3ExprCodeAndCacheØ00__func__Ø000), unsafe.Pointer(str(118947)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3ExprCode(tls, _pParse, _pExpr, _target)
- _iMem = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeAddOp2(tls, _v, i32(64), _target, _iMem)
+ _iMem = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(64), _target, _iMem)
_exprToRegister(tls, _pExpr, _iMem)
}
var _sqlite3ExprCodeAndCacheØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprCodeAndCacheØ00__func__Ø000[0], str(118942), 24)
+ crt.Xstrncpy(nil, &_sqlite3ExprCodeAndCacheØ00__func__Ø000[0], str(118970), 24)
}
-// Parse context structure pFrom has just been used to create a sub-vdbe
-// (trigger program). If an error has occurred, transfer error information
-// from pFrom to pTo.
+// C comment
+// /*
+// ** Parse context structure pFrom has just been used to create a sub-vdbe
+// ** (trigger program). If an error has occurred, transfer error information
+// ** from pFrom to pTo.
+// */
func _transferParseError(tls *crt.TLS, _pTo *XParse, _pFrom *XParse) {
func() {
- if (_pFrom.X1) != nil && (_pFrom.X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123418), unsafe.Pointer((*int8)(unsafe.Pointer(&_transferParseErrorØ00__func__Ø000))), unsafe.Pointer(str(118966)))
+ if _pFrom.XzErrMsg != nil && _pFrom.XnErr == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123418), unsafe.Pointer(&_transferParseErrorØ00__func__Ø000), unsafe.Pointer(str(118994)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pTo.X1) != nil && (_pTo.X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123419), unsafe.Pointer((*int8)(unsafe.Pointer(&_transferParseErrorØ00__func__Ø000))), unsafe.Pointer(str(118999)))
+ if _pTo.XzErrMsg != nil && _pTo.XnErr == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123419), unsafe.Pointer(&_transferParseErrorØ00__func__Ø000), unsafe.Pointer(str(119027)))
crt.X__builtin_abort(tls)
}
}()
- if (_pTo.X16) == i32(0) {
- *(**int8)(unsafe.Pointer(&(_pTo.X1))) = _pFrom.X1
- *(*int32)(unsafe.Pointer(&(_pTo.X16))) = _pFrom.X16
- *(*int32)(unsafe.Pointer(&(_pTo.X3))) = _pFrom.X3
+ if _pTo.XnErr == int32(0) {
+ _pTo.XzErrMsg = _pFrom.XzErrMsg
+ _pTo.XnErr = _pFrom.XnErr
+ _pTo.Xrc = _pFrom.Xrc
goto _7
}
- _sqlite3DbFree(tls, (*Xsqlite3)(_pFrom.X0), (unsafe.Pointer)(_pFrom.X1))
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pFrom.Xdb), unsafe.Pointer(_pFrom.XzErrMsg))
_7:
}
var _transferParseErrorØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_transferParseErrorØ00__func__Ø000[0], str(119028), 19)
+ crt.Xstrncpy(nil, &_transferParseErrorØ00__func__Ø000[0], str(119056), 19)
}
-// This function returns a pointer to the array of opcodes associated with
-// the Vdbe passed as the first argument. It is the callers responsibility
-// to arrange for the returned array to be eventually freed using the
-// vdbeFreeOpArray() function.
-//
-// Before returning, *pnOp is set to the number of entries in the returned
-// array. Also, *pnMaxArg is set to the larger of its current value and
-// the number of entries in the Vdbe.apArg[] array required to execute the
-// returned program.
+// C comment
+// /*
+// ** This function returns a pointer to the array of opcodes associated with
+// ** the Vdbe passed as the first argument. It is the callers responsibility
+// ** to arrange for the returned array to be eventually freed using the
+// ** vdbeFreeOpArray() function.
+// **
+// ** Before returning, *pnOp is set to the number of entries in the returned
+// ** array. Also, *pnMaxArg is set to the larger of its current value and
+// ** the number of entries in the Vdbe.apArg[] array required to execute the
+// ** returned program.
+// */
func _sqlite3VdbeTakeOpArray(tls *crt.TLS, _p *TVdbe, _pnOp *int32, _pnMaxArg *int32) (r0 *XVdbeOp) {
var _aOp *XVdbeOp
- _aOp = (*XVdbeOp)(_p.X17)
+ _aOp = (*XVdbeOp)(_p.XaOp)
func() {
- if _aOp == nil || ((*Xsqlite3)(_p.X0).X17) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72108), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeTakeOpArrayØ00__func__Ø000))), unsafe.Pointer(str(119047)))
+ if _aOp == nil || ((*Xsqlite3)(_p.Xdb).XmallocFailed) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72108), unsafe.Pointer(&_sqlite3VdbeTakeOpArrayØ00__func__Ø000), unsafe.Pointer(str(119075)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_p.X33) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72111), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeTakeOpArrayØ00__func__Ø000))), unsafe.Pointer(str(119075)))
+ if _p.XbtreeMask != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72111), unsafe.Pointer(&_sqlite3VdbeTakeOpArrayØ00__func__Ø000), unsafe.Pointer(str(119103)))
crt.X__builtin_abort(tls)
}
}()
_resolveP2Values(tls, _p, _pnMaxArg)
- *_pnOp = _p.X27
- *(**XVdbeOp)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X17))))) = nil
+ *_pnOp = _p.XnOp
+ *(**XVdbeOp)(unsafe.Pointer(&_p.XaOp)) = nil
return _aOp
}
var _sqlite3VdbeTakeOpArrayØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeTakeOpArrayØ00__func__Ø000[0], str(119103), 23)
+ crt.Xstrncpy(nil, &_sqlite3VdbeTakeOpArrayØ00__func__Ø000[0], str(119131), 23)
}
-// Generate code to drop a table.
+// C comment
+// /*
+// ** Generate code to drop a table.
+// */
func _sqlite3CodeDropTable(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _iDb int32, _isView int32) {
var _db *Xsqlite3
var _pDb *XDb
var _pTrigger *XTrigger
var _v *TVdbe
- _db = (*Xsqlite3)(_pParse.X0)
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb)))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb))
_v = _sqlite3GetVdbe(tls, _pParse)
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102140), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeDropTableØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102140), unsafe.Pointer(&_sqlite3CodeDropTableØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3BeginWriteOperation(tls, _pParse, i32(1), _iDb)
- if (_pTab.X16) != 0 {
- _sqlite3VdbeAddOp0(tls, _v, i32(155))
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(1), _iDb)
+ if _pTab.XnModuleArg != 0 {
+ _sqlite3VdbeAddOp0(tls, _v, int32(155))
}
_pTrigger = _sqlite3TriggerList(tls, _pParse, _pTab)
_3:
if _pTrigger != nil {
func() {
- if (*XSchema)(_pTrigger.X6) != (*XSchema)(_pTab.X20) && (*XSchema)(_pTrigger.X6) != (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102155), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CodeDropTableØ00__func__Ø000))), unsafe.Pointer(str(119126)))
+ if (*XSchema)(_pTrigger.XpSchema) != (*XSchema)(_pTab.XpSchema) && (*XSchema)(_pTrigger.XpSchema) != (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102155), unsafe.Pointer(&_sqlite3CodeDropTableØ00__func__Ø000), unsafe.Pointer(str(119154)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3DropTriggerPtr(tls, _pParse, _pTrigger)
- _pTrigger = (*XTrigger)(_pTrigger.X9)
+ _pTrigger = (*XTrigger)(_pTrigger.XpNext)
goto _3
}
- if ((_pTab.X9) & uint32(i32(8))) != 0 {
- _sqlite3NestedParse(tls, _pParse, str(119200), unsafe.Pointer(_pDb.X0), unsafe.Pointer(_pTab.X0))
+ if (_pTab.XtabFlags & uint32(8)) != 0 {
+ _sqlite3NestedParse(tls, _pParse, str(119228), unsafe.Pointer(_pDb.XzDbSName), unsafe.Pointer(_pTab.XzName))
}
- _sqlite3NestedParse(tls, _pParse, str(119245), unsafe.Pointer(_pDb.X0), unsafe.Pointer(str(50026)), unsafe.Pointer(_pTab.X0))
- if (_isView == 0) && ((_pTab.X16) == 0) {
+ _sqlite3NestedParse(tls, _pParse, str(119273), unsafe.Pointer(_pDb.XzDbSName), unsafe.Pointer(str(49981)), unsafe.Pointer(_pTab.XzName))
+ if (_isView == 0) && (_pTab.XnModuleArg == 0) {
_destroyTable(tls, _pParse, _pTab)
}
- if (_pTab.X16) != 0 {
- _sqlite3VdbeAddOp4(tls, _v, i32(157), _iDb, i32(0), i32(0), _pTab.X0, i32(0))
+ if _pTab.XnModuleArg != 0 {
+ _sqlite3VdbeAddOp4(tls, _v, int32(157), _iDb, int32(0), int32(0), _pTab.XzName, int32(0))
}
- _sqlite3VdbeAddOp4(tls, _v, i32(141), _iDb, i32(0), i32(0), _pTab.X0, i32(0))
+ _sqlite3VdbeAddOp4(tls, _v, int32(141), _iDb, int32(0), int32(0), _pTab.XzName, int32(0))
_sqlite3ChangeCookie(tls, _pParse, _iDb)
_sqliteViewResetAll(tls, _db, _iDb)
}
@@ -101913,109 +103072,115 @@ _3:
var _sqlite3CodeDropTableØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CodeDropTableØ00__func__Ø000[0], str(119301), 21)
+ crt.Xstrncpy(nil, &_sqlite3CodeDropTableØ00__func__Ø000[0], str(119329), 21)
}
-// Drop a trigger given a pointer to that trigger.
+// C comment
+// /*
+// ** Drop a trigger given a pointer to that trigger.
+// */
func _sqlite3DropTriggerPtr(tls *crt.TLS, _pParse *XParse, _pTrigger *XTrigger) {
var _iDb, _1_code int32
var _1_zDb, _1_zTab *int8
var _db *Xsqlite3
var _pTable *XTable
var _v *TVdbe
- _db = (*Xsqlite3)(_pParse.X0)
- _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTrigger.X6))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTrigger.XpSchema))
func() {
- if _iDb < i32(0) || _iDb >= (_db.X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123183), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTriggerPtrØ00__func__Ø000))), unsafe.Pointer(str(21738)))
+ if _iDb < int32(0) || _iDb >= _db.XnDb {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123183), unsafe.Pointer(&_sqlite3DropTriggerPtrØ00__func__Ø000), unsafe.Pointer(str(21693)))
crt.X__builtin_abort(tls)
}
}()
_pTable = _tableOfTrigger(tls, _pTrigger)
func() {
if _pTable == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123185), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTriggerPtrØ00__func__Ø000))), unsafe.Pointer(str(94083)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123185), unsafe.Pointer(&_sqlite3DropTriggerPtrØ00__func__Ø000), unsafe.Pointer(str(94111)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XSchema)(_pTable.X20) != (*XSchema)(_pTrigger.X6) && _iDb != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123186), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTriggerPtrØ00__func__Ø000))), unsafe.Pointer(str(119322)))
+ if (*XSchema)(_pTable.XpSchema) != (*XSchema)(_pTrigger.XpSchema) && _iDb != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123186), unsafe.Pointer(&_sqlite3DropTriggerPtrØ00__func__Ø000), unsafe.Pointer(str(119350)))
crt.X__builtin_abort(tls)
}
}()
- _1_code = i32(16)
- _1_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
+ _1_code = int32(16)
+ _1_zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
_1_zTab = func() *int8 {
- if i32(1) != 0 && (_iDb == i32(1)) {
- return str(50007)
+ if int32(1) != 0 && (_iDb == int32(1)) {
+ return str(49962)
}
- return str(50026)
+ return str(49981)
}()
- if _iDb == i32(1) {
- _1_code = i32(14)
+ if _iDb == int32(1) {
+ _1_code = int32(14)
}
- if _sqlite3AuthCheck(tls, _pParse, _1_code, _pTrigger.X0, _pTable.X0, _1_zDb) != 0 || _sqlite3AuthCheck(tls, _pParse, i32(9), _1_zTab, nil, _1_zDb) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, _1_code, _pTrigger.XzName, _pTable.XzName, _1_zDb) != 0 || _sqlite3AuthCheck(tls, _pParse, int32(9), _1_zTab, nil, _1_zDb) != 0 {
return
}
func() {
if _pTable == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123202), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTriggerPtrØ00__func__Ø000))), unsafe.Pointer(str(21956)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123202), unsafe.Pointer(&_sqlite3DropTriggerPtrØ00__func__Ø000), unsafe.Pointer(str(21911)))
crt.X__builtin_abort(tls)
}
}()
- if store38(&_v, _sqlite3GetVdbe(tls, _pParse)) != nil {
- _sqlite3NestedParse(tls, _pParse, str(119367), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0), unsafe.Pointer(str(50026)), unsafe.Pointer(_pTrigger.X0))
+ if store60(&_v, _sqlite3GetVdbe(tls, _pParse)) != nil {
+ _sqlite3NestedParse(tls, _pParse, str(119395), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName), unsafe.Pointer(str(49981)), unsafe.Pointer(_pTrigger.XzName))
_sqlite3ChangeCookie(tls, _pParse, _iDb)
- _sqlite3VdbeAddOp4(tls, _v, i32(143), _iDb, i32(0), i32(0), _pTrigger.X0, i32(0))
+ _sqlite3VdbeAddOp4(tls, _v, int32(143), _iDb, int32(0), int32(0), _pTrigger.XzName, int32(0))
}
}
var _sqlite3DropTriggerPtrØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DropTriggerPtrØ00__func__Ø000[0], str(119418), 22)
+ crt.Xstrncpy(nil, &_sqlite3DropTriggerPtrØ00__func__Ø000[0], str(119446), 22)
}
-// Write VDBE code to erase table pTab and all associated indices on disk.
-// Code to update the sqlite_master tables and internal schema definitions
-// in case a root-page belonging to another table is moved by the btree layer
-// is also added (this can happen with an auto-vacuum database).
+// C comment
+// /*
+// ** Write VDBE code to erase table pTab and all associated indices on disk.
+// ** Code to update the sqlite_master tables and internal schema definitions
+// ** in case a root-page belonging to another table is moved by the btree layer
+// ** is also added (this can happen with an auto-vacuum database).
+// */
func _destroyTable(tls *crt.TLS, _pParse *XParse, _pTab *XTable) {
var _iTab, _iDestroyed, _1_iLargest, _3_iIdx, _6_iDb int32
var _1_pIdx *XIndex
- _iTab = _pTab.X7
- _iDestroyed = i32(0)
+ _iTab = _pTab.Xtnum
+ _iDestroyed = int32(0)
_0:
- _1_iLargest = i32(0)
- if (_iDestroyed == i32(0)) || (_iTab < _iDestroyed) {
+ _1_iLargest = int32(0)
+ if (_iDestroyed == int32(0)) || (_iTab < _iDestroyed) {
_1_iLargest = _iTab
}
- _1_pIdx = (*XIndex)(_pTab.X2)
+ _1_pIdx = (*XIndex)(_pTab.XpIndex)
_4:
if _1_pIdx == nil {
goto _7
}
- _3_iIdx = _1_pIdx.X11
+ _3_iIdx = _1_pIdx.Xtnum
func() {
- if (*XSchema)(_1_pIdx.X6) != (*XSchema)(_pTab.X20) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102089), unsafe.Pointer((*int8)(unsafe.Pointer(&_destroyTableØ00__func__Ø000))), unsafe.Pointer(str(115137)))
+ if (*XSchema)(_1_pIdx.XpSchema) != (*XSchema)(_pTab.XpSchema) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102089), unsafe.Pointer(&_destroyTableØ00__func__Ø000), unsafe.Pointer(str(115165)))
crt.X__builtin_abort(tls)
}
}()
- if ((_iDestroyed == i32(0)) || (_3_iIdx < _iDestroyed)) && (_3_iIdx > _1_iLargest) {
+ if ((_iDestroyed == int32(0)) || (_3_iIdx < _iDestroyed)) && (_3_iIdx > _1_iLargest) {
_1_iLargest = _3_iIdx
}
- _1_pIdx = (*XIndex)(_1_pIdx.X5)
+ _1_pIdx = (*XIndex)(_1_pIdx.XpNext)
goto _4
_7:
- if _1_iLargest == i32(0) {
+ if _1_iLargest == int32(0) {
return
}
- _6_iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTab.X20))
+ _6_iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTab.XpSchema))
func() {
- if _6_iDb < i32(0) || _6_iDb >= ((*Xsqlite3)(_pParse.X0).X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102098), unsafe.Pointer((*int8)(unsafe.Pointer(&_destroyTableØ00__func__Ø000))), unsafe.Pointer(str(102338)))
+ if _6_iDb < int32(0) || _6_iDb >= ((*Xsqlite3)(_pParse.Xdb).XnDb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102098), unsafe.Pointer(&_destroyTableØ00__func__Ø000), unsafe.Pointer(str(102366)))
crt.X__builtin_abort(tls)
}
}()
@@ -102027,7 +103192,7 @@ _7:
var _destroyTableØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_destroyTableØ00__func__Ø000[0], str(119440), 13)
+ crt.Xstrncpy(nil, &_destroyTableØ00__func__Ø000[0], str(119468), 13)
}
func _destroyRootPage(tls *crt.TLS, _pParse *XParse, _iTable int32, _iDb int32) {
@@ -102036,64 +103201,69 @@ func _destroyRootPage(tls *crt.TLS, _pParse *XParse, _iTable int32, _iDb int32)
_v = _sqlite3GetVdbe(tls, _pParse)
_r1 = _sqlite3GetTempReg(tls, _pParse)
func() {
- if _iTable <= i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(102026), unsafe.Pointer((*int8)(unsafe.Pointer(&_destroyRootPageØ00__func__Ø000))), unsafe.Pointer(str(119453)))
+ if _iTable <= int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(102026), unsafe.Pointer(&_destroyRootPageØ00__func__Ø000), unsafe.Pointer(str(119481)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp3(tls, _v, i32(133), _iTable, _r1, _iDb)
+ _sqlite3VdbeAddOp3(tls, _v, int32(133), _iTable, _r1, _iDb)
_sqlite3MayAbort(tls, _pParse)
- _sqlite3NestedParse(tls, _pParse, str(119462), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_pParse.X0).X4)+16*uintptr(_iDb))).X0), unsafe.Pointer(str(50026)), _iTable, _r1, _r1)
+ _sqlite3NestedParse(tls, _pParse, str(119490), unsafe.Pointer(elem27((*XDb)((*Xsqlite3)(_pParse.Xdb).XaDb), uintptr(_iDb)).XzDbSName), unsafe.Pointer(str(49981)), _iTable, _r1, _r1)
_sqlite3ReleaseTempReg(tls, _pParse, _r1)
}
var _destroyRootPageØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_destroyRootPageØ00__func__Ø000[0], str(119518), 16)
+ crt.Xstrncpy(nil, &_destroyRootPageØ00__func__Ø000[0], str(119546), 16)
}
-// Clear the column names from every VIEW in database idx.
+// C comment
+// /*
+// ** Clear the column names from every VIEW in database idx.
+// */
func _sqliteViewResetAll(tls *crt.TLS, _db *Xsqlite3, _idx int32) {
var _i *XHashElem
var _1_pTab *XTable
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _idx, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101959), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqliteViewResetAllØ00__func__Ø000))), unsafe.Pointer(str(119534)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101959), unsafe.Pointer(&_sqliteViewResetAllØ00__func__Ø000), unsafe.Pointer(str(119562)))
crt.X__builtin_abort(tls)
}
}()
- if (int32((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_idx))).X4).X9) & i32(2)) != i32(2) {
+ if (int32((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_idx)).XpSchema).XschemaFlags) & int32(2)) != int32(2) {
return
}
- _i = (*XHashElem)((*XHash)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_idx))).X4).X2))).X2)
+ _i = (*XHashElem)(((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_idx)).XpSchema).XtblHash).Xfirst)
_3:
if _i == nil {
goto _6
}
- _1_pTab = (*XTable)(_i.X2)
- if (*XSelect)(_1_pTab.X3) != nil {
+ _1_pTab = (*XTable)(_i.Xdata)
+ if _1_pTab.XpSelect != nil {
_sqlite3DeleteColumnNames(tls, _db, _1_pTab)
- *(**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pTab.X1))))) = nil
- *(*int16)(unsafe.Pointer(&(_1_pTab.X11))) = int16(i32(0))
+ *(**XColumn)(unsafe.Pointer(&_1_pTab.XaCol)) = nil
+ _1_pTab.XnCol = 0
}
- _i = (*XHashElem)(_i.X0)
+ _i = (*XHashElem)(_i.Xnext)
goto _3
_6:
{
- p := (*uint16)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_idx))).X4).X9)))
- *p = uint16(int32(*p) & i32(-3))
- sink14(*p)
+ p := &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_idx)).XpSchema).XschemaFlags)
+ *p = uint16(int32(*p) & int32(-3))
}
}
var _sqliteViewResetAllØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqliteViewResetAllØ00__func__Ø000[0], str(119569), 19)
+ crt.Xstrncpy(nil, &_sqliteViewResetAllØ00__func__Ø000[0], str(119597), 19)
}
-// The parser calls this routine in order to create a new VIEW
+// C comment
+// /*
+// ** The parser calls this routine in order to create a new VIEW
+// */
func _sqlite3CreateView(tls *crt.TLS, _pParse *XParse, _pBegin *XToken, _pName1 *XToken, _pName2 *XToken, _pCNames *XExprList, _pSelect *XSelect, _isTemp int32, _noErr int32) {
var _n, _iDb int32
var _z *int8
@@ -102103,98 +103273,88 @@ func _sqlite3CreateView(tls *crt.TLS, _pParse *XParse, _pBegin *XToken, _pName1
var _pName *XToken
var _sFix XDbFixer
_pName = nil
- _db = (*Xsqlite3)(_pParse.X0)
- if int32(_pParse.X52) > i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(119588))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if int32(_pParse.XnVar) > int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(119616))
goto _create_view_fail
}
- _sqlite3StartTable(tls, _pParse, _pName1, _pName2, _isTemp, i32(1), i32(0), _noErr)
- _p = (*XTable)(_pParse.X63)
- if (_p == nil) || (_pParse.X16) != 0 {
+ _sqlite3StartTable(tls, _pParse, _pName1, _pName2, _isTemp, int32(1), int32(0), _noErr)
+ _p = (*XTable)(_pParse.XpNewTable)
+ if (_p == nil) || _pParse.XnErr != 0 {
goto _create_view_fail
}
_sqlite3TwoPartName(tls, _pParse, _pName1, _pName2, &_pName)
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_p.X20))
- _sqlite3FixInit(tls, &_sFix, _pParse, _iDb, str(111821), _pName)
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_p.XpSchema))
+ _sqlite3FixInit(tls, &_sFix, _pParse, _iDb, str(111849), _pName)
if _sqlite3FixSelect(tls, &_sFix, _pSelect) != 0 {
goto _create_view_fail
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3))))) = _sqlite3SelectDup(tls, _db, _pSelect, i32(1))
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X6))))) = _sqlite3ExprListDup(tls, _db, _pCNames, i32(1))
- if (_db.X17) != 0 {
+ *(**XSelect)(unsafe.Pointer(&_p.XpSelect)) = _sqlite3SelectDup(tls, _db, _pSelect, int32(1))
+ *(**XExprList)(unsafe.Pointer(&_p.XpCheck)) = _sqlite3ExprListDup(tls, _db, _pCNames, int32(1))
+ if _db.XmallocFailed != 0 {
goto _create_view_fail
}
- _sEnd = _pParse.X51
+ _sEnd = _pParse.XsLastToken
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_sEnd.X0)) + 1*uintptr(i32(0))))) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101815), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateViewØ00__func__Ø000))), unsafe.Pointer(str(119624)))
+ if int32(*elem1(_sEnd.Xz, 0)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101815), unsafe.Pointer(&_sqlite3CreateViewØ00__func__Ø000), unsafe.Pointer(str(119652)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_sEnd.X0)) + 1*uintptr(i32(0))))) != i32(59) {
- {
- p := (**int8)(unsafe.Pointer(&(_sEnd.X0)))
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sEnd.X1)))
- sink0(*p)
- }
+ if int32(*elem1(_sEnd.Xz, 0)) != int32(59) {
+ *(*uintptr)(unsafe.Pointer(&_sEnd.Xz)) += uintptr(_sEnd.Xn)
}
- *(*uint32)(unsafe.Pointer(&(_sEnd.X1))) = uint32(i32(0))
- _n = int32((uintptr(unsafe.Pointer(_sEnd.X0)) - uintptr(unsafe.Pointer(_pBegin.X0))) / 1)
+ _sEnd.Xn = 0
+ _n = int32(uintptr(unsafe.Pointer(_sEnd.Xz)) - uintptr(unsafe.Pointer(_pBegin.Xz)))
func() {
- if _n <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(101821), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3CreateViewØ00__func__Ø000))), unsafe.Pointer(str(1358)))
+ if _n <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(101821), unsafe.Pointer(&_sqlite3CreateViewØ00__func__Ø000), unsafe.Pointer(str(1376)))
crt.X__builtin_abort(tls)
}
}()
- _z = _pBegin.X0
+ _z = _pBegin.Xz
_10:
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n-i32(1))))))))) & i32(1)) != 0 {
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_z, uintptr(_n-int32(1))))))) & int32(1)) != 0 {
_n -= 1
goto _10
}
- *(**int8)(unsafe.Pointer(&(_sEnd.X0))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n-i32(1))))
- *(*uint32)(unsafe.Pointer(&(_sEnd.X1))) = uint32(i32(1))
- _sqlite3EndTable(tls, _pParse, nil, &_sEnd, uint8(i32(0)), nil)
+ _sEnd.Xz = elem1(_z, uintptr(_n-int32(1)))
+ _sEnd.Xn = uint32(1)
+ _sqlite3EndTable(tls, _pParse, nil, &_sEnd, 0, nil)
_create_view_fail:
_sqlite3SelectDelete(tls, _db, _pSelect)
_sqlite3ExprListDelete(tls, _db, _pCNames)
- _ = _sEnd
- _ = _sFix
}
var _sqlite3CreateViewØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3CreateViewØ00__func__Ø000[0], str(119637), 18)
+ crt.Xstrncpy(nil, &_sqlite3CreateViewØ00__func__Ø000[0], str(119665), 18)
}
func _parserDoubleLinkSelect(tls *crt.TLS, _pParse *XParse, _p *XSelect) {
var _1_mxSelect, _1_cnt int32
var _1_pNext, _1_pLoop *XSelect
- if (*XSelect)(_p.X13) == nil {
+ if _p.XpPrior == nil {
goto _0
}
_1_pNext = nil
- _1_cnt = i32(0)
+ _1_cnt = int32(0)
_1_pLoop = _p
_1:
if _1_pLoop == nil {
goto _4
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pLoop.X14))))) = _1_pNext
- {
- p := (*uint32)(unsafe.Pointer(&(_1_pLoop.X3)))
- *p = (*p) | uint32(i32(256))
- sink5(*p)
- }
+ *(**XSelect)(unsafe.Pointer(&_1_pLoop.XpNext)) = _1_pNext
+ _1_pLoop.XselFlags |= uint32(256)
*func() *int32 {
- *func() **XSelect { _1_pNext = _1_pLoop; return &_1_pLoop }() = (*XSelect)(_1_pLoop.X13)
+ *func() **XSelect { _1_pNext = _1_pLoop; return &_1_pLoop }() = (*XSelect)(_1_pLoop.XpPrior)
return &_1_cnt
}() += 1
goto _1
_4:
- if ((((_p.X3) & uint32(i32(1024))) == uint32(i32(0))) && (store1(&_1_mxSelect, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_pParse.X0).X31))))) + 4*uintptr(i32(4))))) > i32(0))) && (_1_cnt > _1_mxSelect) {
- _sqlite3ErrorMsg(tls, _pParse, str(119655))
+ if (((_p.XselFlags & uint32(1024)) == (0)) && (store2(&_1_mxSelect, *elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_pParse.Xdb).XaLimit))), uintptr(4))) > int32(0))) && (_1_cnt > _1_mxSelect) {
+ _sqlite3ErrorMsg(tls, _pParse, str(119683))
}
_0:
}
@@ -102202,128 +103362,137 @@ _0:
var _yy_reduceØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_yy_reduceØ00__func__Ø000[0], str(119689), 10)
+ crt.Xstrncpy(nil, &_yy_reduceØ00__func__Ø000[0], str(119717), 10)
}
-// Set the ExprList.a[].zSpan element of the most recently added item
-// on the expression list.
-//
-// pList might be NULL following an OOM error. But pSpan should never be
-// NULL. If a memory allocation fails, the pParse->db->mallocFailed flag
-// is set.
+// C comment
+// /*
+// ** Set the ExprList.a[].zSpan element of the most recently added item
+// ** on the expression list.
+// **
+// ** pList might be NULL following an OOM error. But pSpan should never be
+// ** NULL. If a memory allocation fails, the pParse->db->mallocFailed flag
+// ** is set.
+// */
func _sqlite3ExprListSetSpan(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _pSpan *XExprSpan) {
var _db *Xsqlite3
var _1_pItem *TExprList_item
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
- if _pList == nil && int32(_db.X17) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92521), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListSetSpanØ00__func__Ø000))), unsafe.Pointer(str(119699)))
+ if _pList == nil && int32(_db.XmallocFailed) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92521), unsafe.Pointer(&_sqlite3ExprListSetSpanØ00__func__Ø000), unsafe.Pointer(str(119727)))
crt.X__builtin_abort(tls)
}
}()
if _pList != nil {
- _1_pItem = (*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr((_pList.X0)-i32(1))))
+ _1_pItem = elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_pList.XnExpr-int32(1)))
func() {
- if (_pList.X0) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92524), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListSetSpanØ00__func__Ø000))), unsafe.Pointer(str(21335)))
+ if _pList.XnExpr <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92524), unsafe.Pointer(&_sqlite3ExprListSetSpanØ00__func__Ø000), unsafe.Pointer(str(21290)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_db.X17) == 0 && (*XExpr)(_1_pItem.X0) != (*XExpr)(_pSpan.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92525), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListSetSpanØ00__func__Ø000))), unsafe.Pointer(str(119731)))
+ if _db.XmallocFailed == 0 && (*XExpr)(_1_pItem.XpExpr) != (*XExpr)(_pSpan.XpExpr) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92525), unsafe.Pointer(&_sqlite3ExprListSetSpanØ00__func__Ø000), unsafe.Pointer(str(119759)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_pItem.X2))
- *(**int8)(unsafe.Pointer(&(_1_pItem.X2))) = _sqlite3DbStrNDup(tls, _db, _pSpan.X1, uint64(int32((uintptr(unsafe.Pointer(_pSpan.X2))-uintptr(unsafe.Pointer(_pSpan.X1)))/1)))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_pItem.XzSpan))
+ _1_pItem.XzSpan = _sqlite3DbStrNDup(tls, _db, _pSpan.XzStart, uint64(int32(uintptr(unsafe.Pointer(_pSpan.XzEnd))-uintptr(unsafe.Pointer(_pSpan.XzStart)))))
}
}
var _sqlite3ExprListSetSpanØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprListSetSpanØ00__func__Ø000[0], str(119778), 23)
-}
-
-// When building up a FROM clause in the parser, the join operator
-// is initially attached to the left operand. But the code generator
-// expects the join operator to be on the right operand. This routine
-// Shifts all join operators from left to right for an entire FROM
-// clause.
-//
-// Example: Suppose the join is like this:
-//
-// A natural cross join B
-//
-// The operator is "natural cross join". The A and B operands are stored
-// in p->a[0] and p->a[1], respectively. The parser initially stores the
-// operator with A. This routine shifts that operator over to B.
+ crt.Xstrncpy(nil, &_sqlite3ExprListSetSpanØ00__func__Ø000[0], str(119806), 23)
+}
+
+// C comment
+// /*
+// ** When building up a FROM clause in the parser, the join operator
+// ** is initially attached to the left operand. But the code generator
+// ** expects the join operator to be on the right operand. This routine
+// ** Shifts all join operators from left to right for an entire FROM
+// ** clause.
+// **
+// ** Example: Suppose the join is like this:
+// **
+// ** A natural cross join B
+// **
+// ** The operator is "natural cross join". The A and B operands are stored
+// ** in p->a[0] and p->a[1], respectively. The parser initially stores the
+// ** operator with A. This routine shifts that operator over to B.
+// */
func _sqlite3SrcListShiftJoinType(tls *crt.TLS, _p *XSrcList) {
var _1_i int32
if _p == nil {
goto _0
}
- _1_i = (_p.X0) - i32(1)
+ _1_i = _p.XnSrc - int32(1)
_1:
- if _1_i <= i32(0) {
+ if _1_i <= int32(0) {
goto _4
}
- *(*uint8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_p.X2))))) + 68*uintptr(_1_i))).X9))).X0))) = (*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_p.X2))))) + 68*uintptr(_1_i-i32(1)))).X9))).X0
+ (elem6((*TSrcList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_1_i)).Xfg).Xjointype = (elem6((*TSrcList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_1_i-int32(1))).Xfg).Xjointype
_1_i -= 1
goto _1
_4:
- *(*uint8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_p.X2))))) + 68*uintptr(i32(0)))).X9))).X0))) = uint8(i32(0))
+ (elem6((*TSrcList_item)(unsafe.Pointer(&_p.Xa)), 0).Xfg).Xjointype = 0
_0:
}
-// Add an INDEXED BY or NOT INDEXED clause to the most recently added
-// element of the source-list passed as the second argument.
+// C comment
+// /*
+// ** Add an INDEXED BY or NOT INDEXED clause to the most recently added
+// ** element of the source-list passed as the second argument.
+// */
func _sqlite3SrcListIndexedBy(tls *crt.TLS, _pParse *XParse, _p *XSrcList, _pIndexedBy *XToken) {
var _1_pItem *TSrcList_item
func() {
if _pIndexedBy == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103576), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000))), unsafe.Pointer(str(119801)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103576), unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000), unsafe.Pointer(str(119829)))
crt.X__builtin_abort(tls)
}
}()
if _p == nil || func() int32 {
- if (_p.X0) > i32(0) {
- return i32(1)
+ if _p.XnSrc > int32(0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103577), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103577), unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _5
}
- _1_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_p.X2))))) + 68*uintptr((_p.X0)-i32(1))))
+ _1_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_p.XnSrc-int32(1)))
func() {
- if int32((uint32((*t28)(unsafe.Pointer(&(_1_pItem.X9))).X1)<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103579), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000))), unsafe.Pointer(str(119815)))
+ if int32((uint32(_1_pItem.Xfg.XnotIndexed)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103579), unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000), unsafe.Pointer(str(119843)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32(((*t28)(unsafe.Pointer(&(_1_pItem.X9))).X1)>>uint(i32(1)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103580), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000))), unsafe.Pointer(str(119839)))
+ if int32((uint32((_1_pItem.Xfg.XnotIndexed)>>1)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103580), unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000), unsafe.Pointer(str(119867)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32(((*t28)(unsafe.Pointer(&(_1_pItem.X9))).X1)>>uint(i32(2)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103581), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000))), unsafe.Pointer(str(119864)))
+ if int32((uint32((_1_pItem.Xfg.XnotIndexed)>>2)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103581), unsafe.Pointer(&_sqlite3SrcListIndexedByØ00__func__Ø000), unsafe.Pointer(str(119892)))
crt.X__builtin_abort(tls)
}
}()
- if ((_pIndexedBy.X1) == uint32(i32(1))) && ((_pIndexedBy.X0) == nil) {
- storebits3((*int8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&(_1_pItem.X9))).X1))), int8(i32(1)), 1, 0)
+ if (_pIndexedBy.Xn == uint32(1)) && (_pIndexedBy.Xz == nil) {
+ storebits5(&(_1_pItem.Xfg.XnotIndexed), int8(1), 1, 0)
goto _14
}
- *(**int8)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_1_pItem.X15))))) = _sqlite3NameFromToken(tls, (*Xsqlite3)(_pParse.X0), _pIndexedBy)
- storebits3((*int8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&(_1_pItem.X9))).X1))), int8(bool2int((*(**int8)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_1_pItem.X15)))))) != nil)), 2, 1)
+ *(**int8)(unsafe.Pointer(&_1_pItem.Xu1)) = _sqlite3NameFromToken(tls, (*Xsqlite3)(_pParse.Xdb), _pIndexedBy)
+ storebits5(&(_1_pItem.Xfg.XnotIndexed), int8(bool2int((*(**int8)(unsafe.Pointer(&_1_pItem.Xu1))) != nil)), 2, 1)
_14:
_5:
}
@@ -102331,124 +103500,122 @@ _5:
var _sqlite3SrcListIndexedByØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SrcListIndexedByØ00__func__Ø000[0], str(119887), 24)
+ crt.Xstrncpy(nil, &_sqlite3SrcListIndexedByØ00__func__Ø000[0], str(119915), 24)
}
-// Add the list of function arguments to the SrcList entry for a
-// table-valued-function.
+// C comment
+// /*
+// ** Add the list of function arguments to the SrcList entry for a
+// ** table-valued-function.
+// */
func _sqlite3SrcListFuncArgs(tls *crt.TLS, _pParse *XParse, _p *XSrcList, _pList *XExprList) {
var _1_pItem *TSrcList_item
if _p != nil {
- _1_pItem = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_p.X2))))) + 68*uintptr((_p.X0)-i32(1))))
+ _1_pItem = elem6((*TSrcList_item)(unsafe.Pointer(&_p.Xa)), uintptr(_p.XnSrc-int32(1)))
func() {
- if int32((uint32((*t28)(unsafe.Pointer(&(_1_pItem.X9))).X1)<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103600), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListFuncArgsØ00__func__Ø000))), unsafe.Pointer(str(119815)))
+ if int32((uint32(_1_pItem.Xfg.XnotIndexed)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103600), unsafe.Pointer(&_sqlite3SrcListFuncArgsØ00__func__Ø000), unsafe.Pointer(str(119843)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32(((*t28)(unsafe.Pointer(&(_1_pItem.X9))).X1)>>uint(i32(1)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103601), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListFuncArgsØ00__func__Ø000))), unsafe.Pointer(str(119839)))
+ if int32((uint32((_1_pItem.Xfg.XnotIndexed)>>1)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103601), unsafe.Pointer(&_sqlite3SrcListFuncArgsØ00__func__Ø000), unsafe.Pointer(str(119867)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((uint32(((*t28)(unsafe.Pointer(&(_1_pItem.X9))).X1)>>uint(i32(2)))<<uint(i32(31)))>>uint(i32(31))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103602), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3SrcListFuncArgsØ00__func__Ø000))), unsafe.Pointer(str(119864)))
+ if int32((uint32((_1_pItem.Xfg.XnotIndexed)>>2)<<31)>>31) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103602), unsafe.Pointer(&_sqlite3SrcListFuncArgsØ00__func__Ø000), unsafe.Pointer(str(119892)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t29)(unsafe.Pointer(&(_1_pItem.X15))))))) = _pList
- storebits3((*int8)(unsafe.Pointer(&((*t28)(unsafe.Pointer(&(_1_pItem.X9))).X1))), int8(i32(1)), 4, 2)
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_1_pItem.Xu1)))) = _pList
+ storebits5(&(_1_pItem.Xfg.XnotIndexed), int8(1), 4, 2)
goto _7
}
- _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.X0), _pList)
+ _sqlite3ExprListDelete(tls, (*Xsqlite3)(_pParse.Xdb), _pList)
_7:
}
var _sqlite3SrcListFuncArgsØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3SrcListFuncArgsØ00__func__Ø000[0], str(119911), 23)
-}
-
-// Given 1 to 3 identifiers preceding the JOIN keyword, determine the
-// type of join. Return an integer constant that expresses that type
-// in terms of the following bit values:
-//
-// JT_INNER
-// JT_CROSS
-// JT_OUTER
-// JT_NATURAL
-// JT_LEFT
-// JT_RIGHT
-//
-// A full outer join is the combination of JT_LEFT and JT_RIGHT.
-//
-// If an illegal or unsupported join type is seen, then still return
-// a join type, but put an error in the pParse structure.
+ crt.Xstrncpy(nil, &_sqlite3SrcListFuncArgsØ00__func__Ø000[0], str(119939), 23)
+}
+
+// C comment
+// /*
+// ** Given 1 to 3 identifiers preceding the JOIN keyword, determine the
+// ** type of join. Return an integer constant that expresses that type
+// ** in terms of the following bit values:
+// **
+// ** JT_INNER
+// ** JT_CROSS
+// ** JT_OUTER
+// ** JT_NATURAL
+// ** JT_LEFT
+// ** JT_RIGHT
+// **
+// ** A full outer join is the combination of JT_LEFT and JT_RIGHT.
+// **
+// ** If an illegal or unsupported join type is seen, then still return
+// ** a join type, but put an error in the pParse structure.
+// */
func _sqlite3JoinType(tls *crt.TLS, _pParse *XParse, _pA *XToken, _pB *XToken, _pC *XToken) (r0 int32) {
var _jointype, _i, _j int32
var _5_zSp *int8
var _p *XToken
var _apAll [3]*XToken
- _jointype = i32(0)
- *(**XToken)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apAll)) + 4*uintptr(i32(0)))) = _pA
- *(**XToken)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apAll)) + 4*uintptr(i32(1)))) = _pB
- *(**XToken)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apAll)) + 4*uintptr(i32(2)))) = _pC
- _i = i32(0)
+ _jointype = int32(0)
+ *elem122((**XToken)(unsafe.Pointer(&_apAll)), 0) = _pA
+ *elem122((**XToken)(unsafe.Pointer(&_apAll)), uintptr(1)) = _pB
+ *elem122((**XToken)(unsafe.Pointer(&_apAll)), uintptr(2)) = _pC
+ _i = int32(0)
_0:
- if _i >= i32(3) || (*(**XToken)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apAll)) + 4*uintptr(_i)))) == nil {
+ if _i >= int32(3) || (*elem122((**XToken)(unsafe.Pointer(&_apAll)), uintptr(_i))) == nil {
goto _4
}
- _p = *(**XToken)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_apAll)) + 4*uintptr(_i)))
- _j = i32(0)
+ _p = *elem122((**XToken)(unsafe.Pointer(&_apAll)), uintptr(_i))
+ _j = int32(0)
_5:
- if _j >= i32(7) {
+ if _j >= int32(7) {
goto _8
}
- if ((_p.X1) == uint32((*t77)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3JoinTypeØ00aKeywordØ002))+3*uintptr(_j))).X1)) && (Xsqlite3_strnicmp(tls, _p.X0, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3JoinTypeØ00zKeyTextØ001))+1*uintptr((*t77)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3JoinTypeØ00aKeywordØ002))+3*uintptr(_j))).X0))), int32(_p.X1)) == i32(0)) {
- {
- p := &_jointype
- *p = (*p) | int32((*t77)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3JoinTypeØ00aKeywordØ002))+3*uintptr(_j))).X2)
- sink1(*p)
- }
+ if (_p.Xn == uint32(elem123((*t124)(unsafe.Pointer(&_sqlite3JoinTypeØ00aKeywordØ002)), uintptr(_j)).XnChar)) && (Xsqlite3_strnicmp(tls, _p.Xz, elem1((*int8)(unsafe.Pointer(&_sqlite3JoinTypeØ00zKeyTextØ001)), uintptr(elem123((*t124)(unsafe.Pointer(&_sqlite3JoinTypeØ00aKeywordØ002)), uintptr(_j)).Xi)), int32(_p.Xn)) == int32(0)) {
+ _jointype |= int32(elem123((*t124)(unsafe.Pointer(&_sqlite3JoinTypeØ00aKeywordØ002)), uintptr(_j)).Xcode)
goto _8
}
_j += 1
goto _5
_8:
- if _j >= i32(7) {
- {
- p := &_jointype
- *p = (*p) | i32(64)
- sink1(*p)
- }
+ if _j >= int32(7) {
+ _jointype |= int32(64)
goto _4
}
_i += 1
goto _0
_4:
- if (_jointype&i32(33)) != i32(33) && (_jointype&i32(64)) == i32(0) {
+ if (_jointype&int32(33)) != int32(33) && (_jointype&int32(64)) == int32(0) {
goto _13
}
- _5_zSp = str(119934)
+ _5_zSp = str(119962)
func() {
if _pB == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116764), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3JoinTypeØ00__func__Ø000))), unsafe.Pointer(str(119936)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116764), unsafe.Pointer(&_sqlite3JoinTypeØ00__func__Ø000), unsafe.Pointer(str(119964)))
crt.X__builtin_abort(tls)
}
}()
if _pC == nil {
*(*uintptr)(unsafe.Pointer(&_5_zSp)) += uintptr(1)
}
- _sqlite3ErrorMsg(tls, _pParse, str(119942), unsafe.Pointer(_pA), unsafe.Pointer(_pB), unsafe.Pointer(_5_zSp), unsafe.Pointer(_pC))
- _jointype = i32(1)
+ _sqlite3ErrorMsg(tls, _pParse, str(119970), unsafe.Pointer(_pA), unsafe.Pointer(_pB), unsafe.Pointer(_5_zSp), unsafe.Pointer(_pC))
+ _jointype = int32(1)
goto _19
_13:
- if ((_jointype & i32(32)) != i32(0)) && ((_jointype & i32(24)) != i32(8)) {
- _sqlite3ErrorMsg(tls, _pParse, str(119986))
- _jointype = i32(1)
+ if ((_jointype & int32(32)) != int32(0)) && ((_jointype & int32(24)) != int32(8)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(120014))
+ _jointype = int32(1)
}
_19:
return _jointype
@@ -102457,117 +103624,112 @@ _19:
panic(0)
}
-var _sqlite3JoinTypeØ00aKeywordØ002 [7]struct {
- X0 uint8
- X1 uint8
- X2 uint8
-}
+var _sqlite3JoinTypeØ00aKeywordØ002 [7]t124
func init() {
- _sqlite3JoinTypeØ00aKeywordØ002 = [7]struct {
- X0 uint8
- X1 uint8
- X2 uint8
- }{t77{X0: u8(0), X1: u8(7), X2: u8(4)}, t77{X0: u8(6), X1: u8(4), X2: u8(40)}, t77{X0: u8(10), X1: u8(5), X2: u8(32)}, t77{X0: u8(14), X1: u8(5), X2: u8(48)}, t77{X0: u8(19), X1: u8(4), X2: u8(56)}, t77{X0: u8(23), X1: u8(5), X2: u8(1)}, t77{X0: u8(28), X1: u8(5), X2: u8(3)}}
+ _sqlite3JoinTypeØ00aKeywordØ002 = [7]t124{t124{XnChar: uint8(7), Xcode: uint8(4)}, t124{Xi: uint8(6), XnChar: uint8(4), Xcode: uint8(40)}, t124{Xi: uint8(10), XnChar: uint8(5), Xcode: uint8(32)}, t124{Xi: uint8(14), XnChar: uint8(5), Xcode: uint8(48)}, t124{Xi: uint8(19), XnChar: uint8(4), Xcode: uint8(56)}, t124{Xi: uint8(23), XnChar: uint8(5), Xcode: uint8(1)}, t124{Xi: uint8(28), XnChar: uint8(5), Xcode: uint8(3)}}
}
var _sqlite3JoinTypeØ00zKeyTextØ001 [34]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3JoinTypeØ00zKeyTextØ001[0], str(120041), 34)
+ crt.Xstrncpy(nil, &_sqlite3JoinTypeØ00zKeyTextØ001[0], str(120069), 34)
}
var _sqlite3JoinTypeØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3JoinTypeØ00__func__Ø000[0], str(120075), 16)
+ crt.Xstrncpy(nil, &_sqlite3JoinTypeØ00__func__Ø000[0], str(120103), 16)
}
-// pColumns and pExpr form a vector assignment which is part of the SET
-// clause of an UPDATE statement. Like this:
-//
-// (a,b,c) = (expr1,expr2,expr3)
-// Or: (a,b,c) = (SELECT x,y,z FROM ....)
-//
-// For each term of the vector assignment, append new entries to the
-// expression list pList. In the case of a subquery on the RHS, append
-// TK_SELECT_COLUMN expressions.
+// C comment
+// /*
+// ** pColumns and pExpr form a vector assignment which is part of the SET
+// ** clause of an UPDATE statement. Like this:
+// **
+// ** (a,b,c) = (expr1,expr2,expr3)
+// ** Or: (a,b,c) = (SELECT x,y,z FROM ....)
+// **
+// ** For each term of the vector assignment, append new entries to the
+// ** expression list pList. In the case of a subquery on the RHS, append
+// ** TK_SELECT_COLUMN expressions.
+// */
func _sqlite3ExprListAppendVector(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _pColumns *XIdList, _pExpr *XExpr) (r0 *XExprList) {
var _n, _i, _iFirst int32
var _db *Xsqlite3
var _2_pSubExpr, _4_pFirst *XExpr
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_iFirst = func() int32 {
if _pList != nil {
- return (_pList.X0)
+ return _pList.XnExpr
}
- return i32(0)
+ return int32(0)
}()
if func() int32 {
if _pColumns == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92423), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92423), unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _vector_append_error
}
if _pExpr == nil {
goto _vector_append_error
}
- if (int32(_pExpr.X0) != i32(119)) && ((_pColumns.X1) != store1(&_n, _sqlite3ExprVectorSize(tls, _pExpr))) {
- _sqlite3ErrorMsg(tls, _pParse, str(42971), _pColumns.X1, _n)
+ if (int32(_pExpr.Xop) != int32(119)) && (_pColumns.XnId != store2(&_n, _sqlite3ExprVectorSize(tls, _pExpr))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(42926), _pColumns.XnId, _n)
goto _vector_append_error
}
- _i = i32(0)
+ _i = int32(0)
_8:
- if _i >= (_pColumns.X1) {
+ if _i >= _pColumns.XnId {
goto _11
}
_2_pSubExpr = _sqlite3ExprForVectorField(tls, _pParse, _pExpr, _i)
_pList = _sqlite3ExprListAppend(tls, _pParse, _pList, _2_pSubExpr)
if _pList != nil {
func() {
- if (_pList.X0) != ((_iFirst + _i) + i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92441), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000))), unsafe.Pointer(str(120091)))
+ if _pList.XnExpr != ((_iFirst + _i) + int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92441), unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000), unsafe.Pointer(str(120119)))
crt.X__builtin_abort(tls)
}
}()
- *(**int8)(unsafe.Pointer(&((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr((_pList.X0)-i32(1)))).X1))) = (*TIdList_item)(unsafe.Pointer(uintptr(_pColumns.X0) + 8*uintptr(_i))).X0
- *(**int8)(unsafe.Pointer(&((*TIdList_item)(unsafe.Pointer(uintptr(_pColumns.X0) + 8*uintptr(_i))).X0))) = nil
+ elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_pList.XnExpr-int32(1))).XzName = elem42((*TIdList_item)(_pColumns.Xa), uintptr(_i)).XzName
+ elem42((*TIdList_item)(_pColumns.Xa), uintptr(_i)).XzName = nil
}
_i += 1
goto _8
_11:
- if (((_db.X17) == 0) && (int32(_pExpr.X0) == i32(119))) && func() int32 {
+ if ((_db.XmallocFailed == 0) && (int32(_pExpr.Xop) == int32(119))) && func() int32 {
if _pList != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92447), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92447), unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
- _4_pFirst = (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_pList.X2))))) + 20*uintptr(_iFirst))).X0)
+ _4_pFirst = (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_pList.Xa)), uintptr(_iFirst)).XpExpr)
func() {
if _4_pFirst == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92449), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000))), unsafe.Pointer(str(120116)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92449), unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000), unsafe.Pointer(str(120144)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_4_pFirst.X0) != i32(159) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(92450), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000))), unsafe.Pointer(str(120126)))
+ if int32(_4_pFirst.Xop) != int32(159) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(92450), unsafe.Pointer(&_sqlite3ExprListAppendVectorØ00__func__Ø000), unsafe.Pointer(str(120154)))
crt.X__builtin_abort(tls)
}
}()
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_4_pFirst.X5))))) = _pExpr
+ *(**XExpr)(unsafe.Pointer(&_4_pFirst.XpRight)) = _pExpr
_pExpr = nil
- *(*int32)(unsafe.Pointer(&(_4_pFirst.X8))) = _pColumns.X1
+ _4_pFirst.XiTable = _pColumns.XnId
}
_vector_append_error:
_sqlite3ExprDelete(tls, _db, _pExpr)
@@ -102578,252 +103740,264 @@ _vector_append_error:
var _sqlite3ExprListAppendVectorØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprListAppendVectorØ00__func__Ø000[0], str(120155), 28)
+ crt.Xstrncpy(nil, &_sqlite3ExprListAppendVectorØ00__func__Ø000[0], str(120183), 28)
}
-// Append a new element to the given IdList. Create a new IdList if
-// need be.
-//
-// A new IdList is returned, or NULL if malloc() fails.
+// C comment
+// /*
+// ** Append a new element to the given IdList. Create a new IdList if
+// ** need be.
+// **
+// ** A new IdList is returned, or NULL if malloc() fails.
+// */
func _sqlite3IdListAppend(tls *crt.TLS, _db *Xsqlite3, _pList *XIdList, _pToken *XToken) (r0 *XIdList) {
var _i int32
if _pList != nil {
goto _0
}
- _pList = (*XIdList)(_sqlite3DbMallocZero(tls, _db, uint64(u32(8))))
+ _pList = (*XIdList)(_sqlite3DbMallocZero(tls, _db, uint64(8)))
if _pList == nil {
return nil
}
_0:
- *(**TIdList_item)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pList.X0))))) = (*TIdList_item)(_sqlite3ArrayAllocate(tls, _db, _pList.X0, int32(u32(8)), (*int32)(unsafe.Pointer(&(_pList.X1))), &_i))
- if _i < i32(0) {
+ *(**TIdList_item)(unsafe.Pointer(&_pList.Xa)) = (*TIdList_item)(_sqlite3ArrayAllocate(tls, _db, _pList.Xa, int32(8), &_pList.XnId, &_i))
+ if _i < int32(0) {
_sqlite3IdListDelete(tls, _db, _pList)
return nil
}
- *(**int8)(unsafe.Pointer(&((*TIdList_item)(unsafe.Pointer(uintptr(_pList.X0) + 8*uintptr(_i))).X0))) = _sqlite3NameFromToken(tls, _db, _pToken)
+ elem42((*TIdList_item)(_pList.Xa), uintptr(_i)).XzName = _sqlite3NameFromToken(tls, _db, _pToken)
return _pList
}
func _spanSet(tls *crt.TLS, _pOut *XExprSpan, _pStart *XToken, _pEnd *XToken) {
- *(**int8)(unsafe.Pointer(&(_pOut.X1))) = _pStart.X0
- *(**int8)(unsafe.Pointer(&(_pOut.X2))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pEnd.X0)) + 1*uintptr(_pEnd.X1)))
-}
-
-// Assign a variable number to an expression that encodes a wildcard
-// in the original SQL statement.
-//
-// Wildcards consisting of a single "?" are assigned the next sequential
-// variable number.
-//
-// Wildcards of the form "?nnn" are assigned the number "nnn". We make
-// sure "nnn" is not too big to avoid a denial of service attack when
-// the SQL statement comes from an external source.
-//
-// Wildcards of the form ":aaa", "@aaa", or "$aaa" are assigned the same number
-// as the previous instance of the same wildcard. Or if this is the first
-// instance of the wildcard, the next sequential variable number is
-// assigned.
+ _pOut.XzStart = _pStart.Xz
+ _pOut.XzEnd = elem1(_pEnd.Xz, uintptr(_pEnd.Xn))
+}
+
+// C comment
+// /*
+// ** Assign a variable number to an expression that encodes a wildcard
+// ** in the original SQL statement.
+// **
+// ** Wildcards consisting of a single "?" are assigned the next sequential
+// ** variable number.
+// **
+// ** Wildcards of the form "?nnn" are assigned the number "nnn". We make
+// ** sure "nnn" is not too big to avoid a denial of service attack when
+// ** the SQL statement comes from an external source.
+// **
+// ** Wildcards of the form ":aaa", "@aaa", or "$aaa" are assigned the same number
+// ** as the previous instance of the same wildcard. Or if this is the first
+// ** instance of the wildcard, the next sequential variable number is
+// ** assigned.
+// */
func _sqlite3ExprAssignVarNumber(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _n uint32) {
var _x int16
var _2_doAdd, _3_bOk int32
var _3_i int64
var _z *int8
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
if _pExpr == nil {
return
}
func() {
- if ((_pExpr.X2) & uint32(i32(25600))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91849), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000))), unsafe.Pointer(str(120183)))
+ if (_pExpr.Xflags & uint32(25600)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91849), unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000), unsafe.Pointer(str(120211)))
crt.X__builtin_abort(tls)
}
}()
- _z = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pExpr.X3)))))
+ _z = *(**int8)(unsafe.Pointer(&_pExpr.Xu))
func() {
if _z == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91851), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000))), unsafe.Pointer(str(44451)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91851), unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000), unsafe.Pointer(str(44406)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91852), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000))), unsafe.Pointer(str(120244)))
+ if int32(*elem1(_z, 0)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91852), unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000), unsafe.Pointer(str(120272)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _n != uint32(_sqlite3Strlen30(tls, _z)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91853), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000))), unsafe.Pointer(str(120252)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91853), unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000), unsafe.Pointer(str(120280)))
crt.X__builtin_abort(tls)
}
}()
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) == i32(0) {
+ if int32(*elem1(_z, uintptr(1))) == int32(0) {
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(63) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91856), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000))), unsafe.Pointer(str(120279)))
+ if int32(*elem1(_z, 0)) != int32(63) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91856), unsafe.Pointer(&_sqlite3ExprAssignVarNumberØ00__func__Ø000), unsafe.Pointer(str(120307)))
crt.X__builtin_abort(tls)
}
}()
- _x = preInc18((*int16)(unsafe.Pointer(&(_pParse.X52))), 1)
+ _x = preInc26(&_pParse.XnVar, 1)
goto _12
}
- _2_doAdd = i32(0)
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(63) {
+ _2_doAdd = int32(0)
+ if int32(*elem1(_z, 0)) != int32(63) {
goto _13
}
- if _n == uint32(i32(2)) {
- _3_i = int64(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) - i32(48))
- _3_bOk = i32(1)
+ if _n == uint32(2) {
+ _3_i = int64(int32(*elem1(_z, uintptr(1))) - int32(48))
+ _3_bOk = int32(1)
goto _15
}
- _3_bOk = bool2int(i32(0) == _sqlite3Atoi64(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(i32(1)))), &_3_i, int32(_n-uint32(i32(1))), uint8(i32(1))))
+ _3_bOk = bool2int(int32(0) == _sqlite3Atoi64(tls, elem1(_z, uintptr(1)), &_3_i, int32(_n-uint32(1)), uint8(1)))
_15:
- if ((_3_bOk == i32(0)) || (_3_i < int64(i32(1)))) || (_3_i > int64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(9)))))) {
- _sqlite3ErrorMsg(tls, _pParse, str(120289), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(9)))))
+ if ((_3_bOk == int32(0)) || (_3_i < int64(1))) || (_3_i > int64(*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(9)))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(120317), *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(9)))
return
}
_x = int16(_3_i)
- if int32(_x) > int32(_pParse.X52) {
- *(*int16)(unsafe.Pointer(&(_pParse.X52))) = int16(int32(_x))
- _2_doAdd = i32(1)
+ if int32(_x) > int32(_pParse.XnVar) {
+ _pParse.XnVar = int16(int32(_x))
+ _2_doAdd = int32(1)
goto _21
}
- if _sqlite3VListNumToName(tls, _pParse.X60, int32(_x)) == nil {
- _2_doAdd = i32(1)
+ if _sqlite3VListNumToName(tls, _pParse.XpVList, int32(_x)) == nil {
+ _2_doAdd = int32(1)
}
_21:
goto _22
_13:
- _x = int16(_sqlite3VListNameToNum(tls, _pParse.X60, _z, int32(_n)))
- if int32(_x) == i32(0) {
- _x = preInc18((*int16)(unsafe.Pointer(&(_pParse.X52))), 1)
- _2_doAdd = i32(1)
+ _x = int16(_sqlite3VListNameToNum(tls, _pParse.XpVList, _z, int32(_n)))
+ if int32(_x) == int32(0) {
+ _x = preInc26(&_pParse.XnVar, 1)
+ _2_doAdd = int32(1)
}
_22:
if _2_doAdd != 0 {
- *(**int32)(unsafe.Pointer(&(_pParse.X60))) = _sqlite3VListAdd(tls, _db, _pParse.X60, _z, int32(_n), int32(_x))
+ _pParse.XpVList = _sqlite3VListAdd(tls, _db, _pParse.XpVList, _z, int32(_n), int32(_x))
}
_12:
- *(*int16)(unsafe.Pointer(&(_pExpr.X9))) = _x
- if int32(_x) > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(9))))) {
- _sqlite3ErrorMsg(tls, _pParse, str(120332))
+ _pExpr.XiColumn = _x
+ if int32(_x) > (*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(9))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(120360))
}
}
var _sqlite3ExprAssignVarNumberØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprAssignVarNumberØ00__func__Ø000[0], str(120355), 27)
-}
-
-// Add a new name/number pair to a VList. This might require that the
-// VList object be reallocated, so return the new VList. If an OOM
-// error occurs, the original VList returned and the
-// db->mallocFailed flag is set.
-//
-// A VList is really just an array of integers. To destroy a VList,
-// simply pass it to sqlite3DbFree().
-//
-// The first integer is the number of integers allocated for the whole
-// VList. The second integer is the number of integers actually used.
-// Each name/number pair is encoded by subsequent groups of 3 or more
-// integers.
-//
-// Each name/number pair starts with two integers which are the numeric
-// value for the pair and the size of the name/number pair, respectively.
-// The text name overlays one or more following integers. The text name
-// is always zero-terminated.
-//
-// Conceptually:
-//
-// struct VList {
-// int nAlloc; // Number of allocated slots
-// int nUsed; // Number of used slots
-// struct VListEntry {
-// int iValue; // Value for this entry
-// int nSlot; // Slots used by this entry
-// // ... variable name goes here
-// } a[0];
-// }
-//
-// During code generation, pointers to the variable names within the
-// VList are taken. When that happens, nAlloc is set to zero as an
-// indication that the VList may never again be enlarged, since the
-// accompanying realloc() would invalidate the pointers.
+ crt.Xstrncpy(nil, &_sqlite3ExprAssignVarNumberØ00__func__Ø000[0], str(120383), 27)
+}
+
+// C comment
+// /*
+// ** Add a new name/number pair to a VList. This might require that the
+// ** VList object be reallocated, so return the new VList. If an OOM
+// ** error occurs, the original VList returned and the
+// ** db->mallocFailed flag is set.
+// **
+// ** A VList is really just an array of integers. To destroy a VList,
+// ** simply pass it to sqlite3DbFree().
+// **
+// ** The first integer is the number of integers allocated for the whole
+// ** VList. The second integer is the number of integers actually used.
+// ** Each name/number pair is encoded by subsequent groups of 3 or more
+// ** integers.
+// **
+// ** Each name/number pair starts with two integers which are the numeric
+// ** value for the pair and the size of the name/number pair, respectively.
+// ** The text name overlays one or more following integers. The text name
+// ** is always zero-terminated.
+// **
+// ** Conceptually:
+// **
+// ** struct VList {
+// ** int nAlloc; // Number of allocated slots
+// ** int nUsed; // Number of used slots
+// ** struct VListEntry {
+// ** int iValue; // Value for this entry
+// ** int nSlot; // Slots used by this entry
+// ** // ... variable name goes here
+// ** } a[0];
+// ** }
+// **
+// ** During code generation, pointers to the variable names within the
+// ** VList are taken. When that happens, nAlloc is set to zero as an
+// ** indication that the VList may never again be enlarged, since the
+// ** accompanying realloc() would invalidate the pointers.
+// */
func _sqlite3VListAdd(tls *crt.TLS, _db *Xsqlite3, _pIn *int32, _zName *int8, _nName int32, _iVal int32) (r0 *int32) {
var _nInt, _i, _1_nAlloc int32
var _1_pOut *int32
var _z *int8
- _nInt = (_nName / i32(4)) + i32(3)
+ _nInt = (_nName / int32(4)) + int32(3)
func() {
- if _pIn != nil && (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(0))))) < i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29170), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VListAddØ00__func__Ø000))), unsafe.Pointer(str(120382)))
+ if _pIn != nil && (*elem8(_pIn, 0)) < int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29170), unsafe.Pointer(&_sqlite3VListAddØ00__func__Ø000), unsafe.Pointer(str(120410)))
crt.X__builtin_abort(tls)
}
}()
- if _pIn != nil && ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(1)))))+_nInt) <= (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(0))))) {
+ if _pIn != nil && ((*elem8(_pIn, uintptr(1)))+_nInt) <= (*elem8(_pIn, 0)) {
goto _4
}
_1_nAlloc = func() int32 {
if _pIn != nil {
- return ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(0))))) * i32(2))
+ return ((*elem8(_pIn, 0)) * int32(2))
}
- return i32(10)
+ return int32(10)
}() + _nInt
- _1_pOut = (*int32)(_sqlite3DbRealloc(tls, _db, (unsafe.Pointer)(_pIn), uint64(uint32(_1_nAlloc)*u32(4))))
+ _1_pOut = (*int32)(_sqlite3DbRealloc(tls, _db, unsafe.Pointer(_pIn), uint64(uint32(_1_nAlloc)*uint32(4))))
if _1_pOut == nil {
return _pIn
}
if _pIn == nil {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_pOut)) + 4*uintptr(i32(1)))) = i32(2)
+ *elem8(_1_pOut, uintptr(1)) = int32(2)
}
_pIn = _1_pOut
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(0)))) = _1_nAlloc
+ *elem8(_pIn, 0) = _1_nAlloc
_4:
- _i = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(1))))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(_i))) = _iVal
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(_i+i32(1)))) = _nInt
- _z = (*int8)(unsafe.Pointer((*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(_i+i32(2))))))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(1)))) = _i + _nInt
+ _i = *elem8(_pIn, uintptr(1))
+ *elem8(_pIn, uintptr(_i)) = _iVal
+ *elem8(_pIn, uintptr(_i+int32(1))) = _nInt
+ _z = (*int8)(unsafe.Pointer(elem8(_pIn, uintptr(_i+int32(2)))))
+ *elem8(_pIn, uintptr(1)) = _i + _nInt
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(1))))) > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIn)) + 4*uintptr(i32(0))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(29185), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VListAddØ00__func__Ø000))), unsafe.Pointer(str(120402)))
+ if (*elem8(_pIn, uintptr(1))) > (*elem8(_pIn, 0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(29185), unsafe.Pointer(&_sqlite3VListAddØ00__func__Ø000), unsafe.Pointer(str(120430)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)(_z), (unsafe.Pointer)(_zName), uint32(_nName))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_nName))) = int8(i32(0))
+ crt.Xmemcpy(tls, unsafe.Pointer(_z), unsafe.Pointer(_zName), uint32(_nName))
+ *elem1(_z, uintptr(_nName)) = 0
return _pIn
}
var _sqlite3VListAddØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VListAddØ00__func__Ø000[0], str(120417), 16)
+ crt.Xstrncpy(nil, &_sqlite3VListAddØ00__func__Ø000[0], str(120445), 16)
}
-// Construct a new expression node for a function with multiple
-// arguments.
+// C comment
+// /*
+// ** Construct a new expression node for a function with multiple
+// ** arguments.
+// */
func _sqlite3ExprFunction(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _pToken *XToken) (r0 *XExpr) {
var _db *Xsqlite3
var _pNew *XExpr
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _pToken == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91815), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprFunctionØ00__func__Ø000))), unsafe.Pointer(str(120433)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91815), unsafe.Pointer(&_sqlite3ExprFunctionØ00__func__Ø000), unsafe.Pointer(str(120461)))
crt.X__builtin_abort(tls)
}
}()
- _pNew = _sqlite3ExprAlloc(tls, _db, i32(151), _pToken, i32(1))
+ _pNew = _sqlite3ExprAlloc(tls, _db, int32(151), _pToken, int32(1))
if _pNew == nil {
_sqlite3ExprListDelete(tls, _db, _pList)
return nil
}
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pNew.X6))))))) = _pList
+ *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pNew.Xx)))) = _pList
func() {
- if ((_pNew.X2) & uint32(i32(2048))) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91822), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ExprFunctionØ00__func__Ø000))), unsafe.Pointer(str(103875)))
+ if (_pNew.Xflags & uint32(2048)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91822), unsafe.Pointer(&_sqlite3ExprFunctionØ00__func__Ø000), unsafe.Pointer(str(103903)))
crt.X__builtin_abort(tls)
}
}()
@@ -102834,96 +104008,101 @@ func _sqlite3ExprFunction(tls *crt.TLS, _pParse *XParse, _pList *XExprList, _pTo
var _sqlite3ExprFunctionØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ExprFunctionØ00__func__Ø000[0], str(120440), 20)
+ crt.Xstrncpy(nil, &_sqlite3ExprFunctionØ00__func__Ø000[0], str(120468), 20)
}
-// Set the Expr.nHeight variable using the exprSetHeight() function. If
-// the height is greater than the maximum allowed expression depth,
-// leave an error in pParse.
-//
-// Also propagate all EP_Propagate flags from the Expr.x.pList into
-// Expr.flags.
+// C comment
+// /*
+// ** Set the Expr.nHeight variable using the exprSetHeight() function. If
+// ** the height is greater than the maximum allowed expression depth,
+// ** leave an error in pParse.
+// **
+// ** Also propagate all EP_Propagate flags from the Expr.x.pList into
+// ** Expr.flags.
+// */
func _sqlite3ExprSetHeightAndFlags(tls *crt.TLS, _pParse *XParse, _p *XExpr) {
- if (_pParse.X16) != 0 {
+ if _pParse.XnErr != 0 {
return
}
_exprSetHeight(tls, _p)
- _sqlite3ExprCheckHeight(tls, _pParse, _p.X7)
+ _sqlite3ExprCheckHeight(tls, _pParse, _p.XnHeight)
}
func _spanBinaryExpr(tls *crt.TLS, _pParse *XParse, _op int32, _pLeft *XExprSpan, _pRight *XExprSpan) {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pLeft.X0))))) = _sqlite3PExpr(tls, _pParse, _op, (*XExpr)(_pLeft.X0), (*XExpr)(_pRight.X0))
- *(**int8)(unsafe.Pointer(&(_pLeft.X2))) = _pRight.X2
+ *(**XExpr)(unsafe.Pointer(&_pLeft.XpExpr)) = _sqlite3PExpr(tls, _pParse, _op, (*XExpr)(_pLeft.XpExpr), (*XExpr)(_pRight.XpExpr))
+ _pLeft.XzEnd = _pRight.XzEnd
}
func _exprNot(tls *crt.TLS, _pParse *XParse, _doNot int32, _pSpan *XExprSpan) {
if _doNot != 0 {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pSpan.X0))))) = _sqlite3PExpr(tls, _pParse, i32(19), (*XExpr)(_pSpan.X0), nil)
+ *(**XExpr)(unsafe.Pointer(&_pSpan.XpExpr)) = _sqlite3PExpr(tls, _pParse, int32(19), (*XExpr)(_pSpan.XpExpr), nil)
}
}
func _spanUnaryPostfix(tls *crt.TLS, _pParse *XParse, _op int32, _pOperand *XExprSpan, _pPostOp *XToken) {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pOperand.X0))))) = _sqlite3PExpr(tls, _pParse, _op, (*XExpr)(_pOperand.X0), nil)
- *(**int8)(unsafe.Pointer(&(_pOperand.X2))) = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pPostOp.X0)) + 1*uintptr(_pPostOp.X1)))
+ *(**XExpr)(unsafe.Pointer(&_pOperand.XpExpr)) = _sqlite3PExpr(tls, _pParse, _op, (*XExpr)(_pOperand.XpExpr), nil)
+ _pOperand.XzEnd = elem1(_pPostOp.Xz, uintptr(_pPostOp.Xn))
}
func _binaryToUnaryIfNull(tls *crt.TLS, _pParse *XParse, _pY *XExpr, _pA *XExpr, _op int32) {
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pParse.X0)
- if ((_pA != nil) && (_pY != nil)) && (int32(_pY.X0) == i32(101)) {
- *(*uint8)(unsafe.Pointer(&(_pA.X0))) = uint8(_op)
- _sqlite3ExprDelete(tls, _db, (*XExpr)(_pA.X5))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pA.X5))))) = nil
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if ((_pA != nil) && (_pY != nil)) && (int32(_pY.Xop) == int32(101)) {
+ _pA.Xop = uint8(_op)
+ _sqlite3ExprDelete(tls, _db, (*XExpr)(_pA.XpRight))
+ *(**XExpr)(unsafe.Pointer(&_pA.XpRight)) = nil
}
}
func _spanUnaryPrefix(tls *crt.TLS, _pOut *XExprSpan, _pParse *XParse, _op int32, _pOperand *XExprSpan, _pPreOp *XToken) {
- *(**int8)(unsafe.Pointer(&(_pOut.X1))) = _pPreOp.X0
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pOut.X0))))) = _sqlite3PExpr(tls, _pParse, _op, (*XExpr)(_pOperand.X0), nil)
- *(**int8)(unsafe.Pointer(&(_pOut.X2))) = _pOperand.X2
+ _pOut.XzStart = _pPreOp.Xz
+ *(**XExpr)(unsafe.Pointer(&_pOut.XpExpr)) = _sqlite3PExpr(tls, _pParse, _op, (*XExpr)(_pOperand.XpExpr), nil)
+ _pOut.XzEnd = _pOperand.XzEnd
}
-// Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due
-// do a memory allocation failure) then delete the pSelect object.
+// C comment
+// /*
+// ** Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due
+// ** do a memory allocation failure) then delete the pSelect object.
+// */
func _sqlite3PExprAddSelect(tls *crt.TLS, _pParse *XParse, _pExpr *XExpr, _pSelect *XSelect) {
if _pExpr != nil {
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer((*t12)(unsafe.Pointer(&(_pExpr.X6))))))) = _pSelect
- {
- p := (*uint32)(unsafe.Pointer(&(_pExpr.X2)))
- *p = (*p) | uint32(i32(2099200))
- sink5(*p)
- }
+ *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&_pExpr.Xx)))) = _pSelect
+ _pExpr.Xflags |= uint32(2099200)
_sqlite3ExprSetHeightAndFlags(tls, _pParse, _pExpr)
goto _1
}
func() {
- if ((*Xsqlite3)(_pParse.X0).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(91751), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PExprAddSelectØ00__func__Ø000))), unsafe.Pointer(str(42486)))
+ if ((*Xsqlite3)(_pParse.Xdb).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(91751), unsafe.Pointer(&_sqlite3PExprAddSelectØ00__func__Ø000), unsafe.Pointer(str(42441)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.X0), _pSelect)
+ _sqlite3SelectDelete(tls, (*Xsqlite3)(_pParse.Xdb), _pSelect)
_1:
}
var _sqlite3PExprAddSelectØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PExprAddSelectØ00__func__Ø000[0], str(120460), 22)
+ crt.Xstrncpy(nil, &_sqlite3PExprAddSelectØ00__func__Ø000[0], str(120488), 22)
}
func _parserAddExprIdListTerm(tls *crt.TLS, _pParse *XParse, _pPrior *XExprList, _pIdToken *XToken, _hasCollate int32, _sortOrder int32) (r0 *XExprList) {
var _p *XExprList
_p = _sqlite3ExprListAppend(tls, _pParse, _pPrior, nil)
- if (_hasCollate != 0 || (_sortOrder != i32(-1))) && (int32((*t21)(unsafe.Pointer(&((*Xsqlite3)(_pParse.X0).X33))).X2) == i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(120482), _pIdToken.X1, unsafe.Pointer(_pIdToken.X0))
+ if (_hasCollate != 0 || (_sortOrder != int32(-1))) && (int32(((*Xsqlite3)(_pParse.Xdb).Xinit).Xbusy) == int32(0)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(120510), _pIdToken.Xn, unsafe.Pointer(_pIdToken.Xz))
}
- _sqlite3ExprListSetName(tls, _pParse, _p, _pIdToken, i32(1))
+ _sqlite3ExprListSetName(tls, _pParse, _p, _pIdToken, int32(1))
return _p
}
-// This routine will drop an existing named index. This routine
-// implements the DROP INDEX statement.
+// C comment
+// /*
+// ** This routine will drop an existing named index. This routine
+// ** implements the DROP INDEX statement.
+// */
func _sqlite3DropIndex(tls *crt.TLS, _pParse *XParse, _pName *XSrcList, _ifExists int32) {
var _iDb, _7_code int32
var _7_zDb, _7_zTab *int8
@@ -102931,69 +104110,69 @@ func _sqlite3DropIndex(tls *crt.TLS, _pParse *XParse, _pName *XSrcList, _ifExist
var _7_pTab *XTable
var _v *TVdbe
var _pIndex *XIndex
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
- if (_pParse.X16) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103185), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropIndexØ00__func__Ø000))), unsafe.Pointer(str(112366)))
+ if _pParse.XnErr != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103185), unsafe.Pointer(&_sqlite3DropIndexØ00__func__Ø000), unsafe.Pointer(str(112394)))
crt.X__builtin_abort(tls)
}
}()
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
goto _exit_drop_index
}
func() {
- if (_pName.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103189), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropIndexØ00__func__Ø000))), unsafe.Pointer(str(114791)))
+ if _pName.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103189), unsafe.Pointer(&_sqlite3DropIndexØ00__func__Ø000), unsafe.Pointer(str(114819)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) != _sqlite3ReadSchema(tls, _pParse) {
+ if int32(0) != _sqlite3ReadSchema(tls, _pParse) {
goto _exit_drop_index
}
- _pIndex = _sqlite3FindIndex(tls, _db, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pName.X2)))))+68*uintptr(i32(0)))).X2, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pName.X2)))))+68*uintptr(i32(0)))).X1)
+ _pIndex = _sqlite3FindIndex(tls, _db, elem6((*TSrcList_item)(unsafe.Pointer(&_pName.Xa)), 0).XzName, elem6((*TSrcList_item)(unsafe.Pointer(&_pName.Xa)), 0).XzDatabase)
if _pIndex != nil {
goto _6
}
if _ifExists == 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(120520), unsafe.Pointer(_pName), i32(0))
+ _sqlite3ErrorMsg(tls, _pParse, str(120548), unsafe.Pointer(_pName), int32(0))
goto _8
}
- _sqlite3CodeVerifyNamedSchema(tls, _pParse, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pName.X2)))))+68*uintptr(i32(0)))).X1)
+ _sqlite3CodeVerifyNamedSchema(tls, _pParse, elem6((*TSrcList_item)(unsafe.Pointer(&_pName.Xa)), 0).XzDatabase)
_8:
- *(*uint8)(unsafe.Pointer(&(_pParse.X5))) = uint8(i32(1))
+ _pParse.XcheckSchema = uint8(1)
goto _exit_drop_index
_6:
- if int32((uint32(_pIndex.X16)<<uint(i32(30)))>>uint(i32(30))) != i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(120538), i32(0))
+ if int32((uint32(_pIndex.XidxType)<<30)>>30) != int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(120566), int32(0))
goto _exit_drop_index
}
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pIndex.X6))
- _7_code = i32(10)
- _7_pTab = (*XTable)(_pIndex.X3)
- _7_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pIndex.XpSchema))
+ _7_code = int32(10)
+ _7_pTab = (*XTable)(_pIndex.XpTable)
+ _7_zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
_7_zTab = func() *int8 {
- if i32(1) != 0 && (_iDb == i32(1)) {
- return str(50007)
+ if int32(1) != 0 && (_iDb == int32(1)) {
+ return str(49962)
}
- return str(50026)
+ return str(49981)
}()
- if _sqlite3AuthCheck(tls, _pParse, i32(9), _7_zTab, nil, _7_zDb) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(9), _7_zTab, nil, _7_zDb) != 0 {
goto _exit_drop_index
}
- if i32(1) != 0 && _iDb != 0 {
- _7_code = i32(12)
+ if int32(1) != 0 && _iDb != 0 {
+ _7_code = int32(12)
}
- if _sqlite3AuthCheck(tls, _pParse, _7_code, _pIndex.X0, _7_pTab.X0, _7_zDb) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, _7_code, _pIndex.XzName, _7_pTab.XzName, _7_zDb) != 0 {
goto _exit_drop_index
}
_v = _sqlite3GetVdbe(tls, _pParse)
if _v != nil {
- _sqlite3BeginWriteOperation(tls, _pParse, i32(1), _iDb)
- _sqlite3NestedParse(tls, _pParse, str(120611), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0), unsafe.Pointer(str(50026)), unsafe.Pointer(_pIndex.X0))
- _sqlite3ClearStatTables(tls, _pParse, _iDb, str(61657), _pIndex.X0)
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(1), _iDb)
+ _sqlite3NestedParse(tls, _pParse, str(120639), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName), unsafe.Pointer(str(49981)), unsafe.Pointer(_pIndex.XzName))
+ _sqlite3ClearStatTables(tls, _pParse, _iDb, str(93743), _pIndex.XzName)
_sqlite3ChangeCookie(tls, _pParse, _iDb)
- _destroyRootPage(tls, _pParse, _pIndex.X11, _iDb)
- _sqlite3VdbeAddOp4(tls, _v, i32(142), _iDb, i32(0), i32(0), _pIndex.X0, i32(0))
+ _destroyRootPage(tls, _pParse, _pIndex.Xtnum, _iDb)
+ _sqlite3VdbeAddOp4(tls, _v, int32(142), _iDb, int32(0), int32(0), _pIndex.XzName, int32(0))
}
_exit_drop_index:
_sqlite3SrcListDelete(tls, _db, _pName)
@@ -103002,42 +104181,45 @@ _exit_drop_index:
var _sqlite3DropIndexØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DropIndexØ00__func__Ø000[0], str(120660), 17)
-}
-
-// The VACUUM command is used to clean up the database,
-// collapse free space, etc. It is modelled after the VACUUM command
-// in PostgreSQL. The VACUUM command works as follows:
-//
-// (1) Create a new transient database file
-// (2) Copy all content from the database being vacuumed into
-// the new transient database file
-// (3) Copy content from the transient database back into the
-// original database.
-//
-// The transient database requires temporary disk space approximately
-// equal to the size of the original database. The copy operation of
-// step (3) requires additional temporary disk space approximately equal
-// to the size of the original database for the rollback journal.
-// Hence, temporary disk space that is approximately 2x the size of the
-// original database is required. Every page of the database is written
-// approximately 3 times: Once for step (2) and twice for step (3).
-// Two writes per page are required in step (3) because the original
-// database content must be written into the rollback journal prior to
-// overwriting the database with the vacuumed content.
-//
-// Only 1x temporary space and only 1x writes would be required if
-// the copy of step (3) were replaced by deleting the original database
-// and renaming the transient database as the original. But that will
-// not work if other processes are attached to the original database.
-// And a power loss in between deleting the original and renaming the
-// transient would cause the database file to appear to be deleted
-// following reboot.
+ crt.Xstrncpy(nil, &_sqlite3DropIndexØ00__func__Ø000[0], str(120688), 17)
+}
+
+// C comment
+// /*
+// ** The VACUUM command is used to clean up the database,
+// ** collapse free space, etc. It is modelled after the VACUUM command
+// ** in PostgreSQL. The VACUUM command works as follows:
+// **
+// ** (1) Create a new transient database file
+// ** (2) Copy all content from the database being vacuumed into
+// ** the new transient database file
+// ** (3) Copy content from the transient database back into the
+// ** original database.
+// **
+// ** The transient database requires temporary disk space approximately
+// ** equal to the size of the original database. The copy operation of
+// ** step (3) requires additional temporary disk space approximately equal
+// ** to the size of the original database for the rollback journal.
+// ** Hence, temporary disk space that is approximately 2x the size of the
+// ** original database is required. Every page of the database is written
+// ** approximately 3 times: Once for step (2) and twice for step (3).
+// ** Two writes per page are required in step (3) because the original
+// ** database content must be written into the rollback journal prior to
+// ** overwriting the database with the vacuumed content.
+// **
+// ** Only 1x temporary space and only 1x writes would be required if
+// ** the copy of step (3) were replaced by deleting the original database
+// ** and renaming the transient database as the original. But that will
+// ** not work if other processes are attached to the original database.
+// ** And a power loss in between deleting the original and renaming the
+// ** transient would cause the database file to appear to be deleted
+// ** following reboot.
+// */
func _sqlite3Vacuum(tls *crt.TLS, _pParse *XParse, _pNm *XToken) {
var _iDb int32
var _v *TVdbe
_v = _sqlite3GetVdbe(tls, _pParse)
- _iDb = i32(0)
+ _iDb = int32(0)
if _v == nil {
return
}
@@ -103045,29 +104227,32 @@ func _sqlite3Vacuum(tls *crt.TLS, _pParse *XParse, _pNm *XToken) {
goto _1
}
_iDb = _sqlite3TwoPartName(tls, _pParse, _pNm, _pNm, &_pNm)
- if _iDb < i32(0) {
+ if _iDb < int32(0) {
return
}
_1:
- if _iDb != i32(1) {
- _sqlite3VdbeAddOp1(tls, _v, i32(10), _iDb)
+ if _iDb != int32(1) {
+ _sqlite3VdbeAddOp1(tls, _v, int32(10), _iDb)
_sqlite3VdbeUsesBtree(tls, _v, _iDb)
}
}
-// Process a pragma statement.
-//
-// Pragmas are of this form:
-//
-// PRAGMA [schema.]id [= value]
-//
-// The identifier might also be a string. The value is a string, and
-// identifier, or a number. If minusFlag is true, then the value is
-// a number that was preceded by a minus sign.
-//
-// If the left side is "database.id" then pId1 is the database name
-// and pId2 is the id. If the left side is just "id" then pId1 is the
-// id and pId2 is any empty string.
+// C comment
+// /*
+// ** Process a pragma statement.
+// **
+// ** Pragmas are of this form:
+// **
+// ** PRAGMA [schema.]id [= value]
+// **
+// ** The identifier might also be a string. The value is a string, and
+// ** identifier, or a number. If minusFlag is true, then the value is
+// ** a number that was preceded by a minus sign.
+// **
+// ** If the left side is "database.id" then pId1 is the database name
+// ** and pId2 is the id. If the left side is just "id" then pId1 is the
+// ** id and pId2 is any empty string.
+// */
func _sqlite3Pragma(tls *crt.TLS, _pParse *XParse, _pId1 *XToken, _pId2 *XToken, _pValue *XToken, _minusFlag int32) {
var _99_cnum, _177_szThreshold int16
var _iDb, _rc, _13_size, _15_size, _18_b, _20_ii, _22_iReg, _25_eMode, _28_ii, _31_eMode, _31_ii, _33_n, _43_eAuto, _44_iAddr, _45_iLimit, _45_addr, _49_size, _52_size, _57_ii, _68_res, _77_iLevel, _80_mask, _85_i, _85_k, _85_nHidden, _96_i, _96_mx, _101_i, _104_i, _106_i, _110_i, _111_j, _113_i, _113_j, _113_x, _113_regResult, _113_regKey, _113_regRow, _113_addrTop, _113_addrOk, _124_iCol, _126_jmp, _135_i, _135_j, _135_addr, _135_mxErr, _135_isQuick, _138_cnt, _138_mxIdx, _138_nIdx, _143_loopTop, _143_iDataCur, _143_iIdxCur, _143_r1, _146_jmp2, _148_addrCkFault, _148_addrCkOk, _148_k, _150_jmp2, _150_jmp3, _150_jmp4, _150_jmp5, _150_ckUniq, _151_uniqOk, _151_jmp6, _151_kk, _152_iCol, _164_iCookie, _167_i, _169_iBt, _169_eMode, _177_iDbLast, _177_iTabCur, _185_r1, _193_i, _194_j int32
@@ -103098,19 +104283,19 @@ func _sqlite3Pragma(tls *crt.TLS, _pParse *XParse, _pId1 *XToken, _pId2 *XToken,
_zLeft = nil
_zRight = nil
_zDb = nil
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_v = _sqlite3GetVdbe(tls, _pParse)
if _v == nil {
return
}
_sqlite3VdbeRunOnlyOnce(tls, _v)
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(2)
+ _pParse.XnMem = int32(2)
_iDb = _sqlite3TwoPartName(tls, _pParse, _pId1, _pId2, &_pId)
- if _iDb < i32(0) {
+ if _iDb < int32(0) {
return
}
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb)))
- if (_iDb == i32(1)) && _sqlite3OpenTempDatabase(tls, _pParse) != 0 {
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb))
+ if (_iDb == int32(1)) && _sqlite3OpenTempDatabase(tls, _pParse) != 0 {
return
}
_zLeft = _sqlite3NameFromToken(tls, _db, _pId)
@@ -103118,138 +104303,138 @@ func _sqlite3Pragma(tls *crt.TLS, _pParse *XParse, _pId1 *XToken, _pId2 *XToken,
return
}
if _minusFlag != 0 {
- _zRight = _sqlite3MPrintf(tls, _db, str(120677), unsafe.Pointer(_pValue))
+ _zRight = _sqlite3MPrintf(tls, _db, str(120705), unsafe.Pointer(_pValue))
goto _6
}
_zRight = _sqlite3NameFromToken(tls, _db, _pValue)
_6:
func() {
if _pId2 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113600), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120681)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113600), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(120709)))
crt.X__builtin_abort(tls)
}
}()
_zDb = func() *int8 {
- if (_pId2.X1) > uint32(i32(0)) {
- return (_pDb.X0)
+ if _pId2.Xn > (0) {
+ return _pDb.XzDbSName
}
return nil
}()
- if _sqlite3AuthCheck(tls, _pParse, i32(19), _zLeft, _zRight, _zDb) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(19), _zLeft, _zRight, _zDb) != 0 {
goto _pragma_out
}
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(0)))) = nil
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(1)))) = _zLeft
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(2)))) = _zRight
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(3)))) = nil
- *(*int32)(unsafe.Pointer(&((*t19)(unsafe.Pointer(&(_db.X71))).X2))) = i32(0)
- _rc = Xsqlite3_file_control(tls, _db, _zDb, i32(14), (unsafe.Pointer)(&_aFcntl))
- if _rc == i32(0) {
- _sqlite3VdbeSetNumCols(tls, _v, i32(1))
- _sqlite3VdbeSetColName(tls, _v, i32(0), i32(0), *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(0)))), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
- _returnSingleText(tls, _v, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(0)))))
- Xsqlite3_free(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(0))))))
+ *elem0((**int8)(unsafe.Pointer(&_aFcntl)), 0) = nil
+ *elem0((**int8)(unsafe.Pointer(&_aFcntl)), uintptr(1)) = _zLeft
+ *elem0((**int8)(unsafe.Pointer(&_aFcntl)), uintptr(2)) = _zRight
+ *elem0((**int8)(unsafe.Pointer(&_aFcntl)), uintptr(3)) = nil
+ _db.XbusyHandler.XnBusy = int32(0)
+ _rc = Xsqlite3_file_control(tls, _db, _zDb, int32(14), unsafe.Pointer(&_aFcntl))
+ if _rc == int32(0) {
+ _sqlite3VdbeSetNumCols(tls, _v, int32(1))
+ _sqlite3VdbeSetColName(tls, _v, int32(0), int32(0), *elem0((**int8)(unsafe.Pointer(&_aFcntl)), 0), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ _returnSingleText(tls, _v, *elem0((**int8)(unsafe.Pointer(&_aFcntl)), 0))
+ Xsqlite3_free(tls, unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_aFcntl)), 0)))
goto _pragma_out
}
- if _rc == i32(12) {
+ if _rc == int32(12) {
goto _13
}
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(0))))) != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(24576), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(0))))))
- Xsqlite3_free(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aFcntl)) + 4*uintptr(i32(0))))))
+ if (*elem0((**int8)(unsafe.Pointer(&_aFcntl)), 0)) != nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(24531), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_aFcntl)), 0)))
+ Xsqlite3_free(tls, unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_aFcntl)), 0)))
}
- *(*int32)(unsafe.Pointer(&(_pParse.X16))) += 1
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = _rc
+ _pParse.XnErr += 1
+ _pParse.Xrc = _rc
goto _pragma_out
_13:
_pPragma = _pragmaLocate(tls, _zLeft)
if _pPragma == nil {
goto _pragma_out
}
- if (int32(_pPragma.X2) & i32(1)) == i32(0) {
+ if (int32(_pPragma.XmPragFlg) & int32(1)) == int32(0) {
goto _16
}
if _sqlite3ReadSchema(tls, _pParse) != 0 {
goto _pragma_out
}
_16:
- if ((int32(_pPragma.X2) & i32(2)) == i32(0)) && (((int32(_pPragma.X2) & i32(4)) == i32(0)) || (_zRight == nil)) {
+ if ((int32(_pPragma.XmPragFlg) & int32(2)) == int32(0)) && (((int32(_pPragma.XmPragFlg) & int32(4)) == int32(0)) || (_zRight == nil)) {
_setPragmaResultColumnNames(tls, _v, _pPragma)
}
- switch int32(_pPragma.X1) {
- case i32(0):
+ switch int32(_pPragma.XePragTyp) {
+ case int32(0):
goto _50
- case i32(1):
+ case int32(1):
goto _29
- case i32(2):
+ case int32(2):
goto _37
- case i32(4):
+ case int32(4):
goto _31
- case i32(5):
+ case int32(5):
goto _32
- case i32(6):
+ case int32(6):
goto _47
- case i32(7):
+ case int32(7):
goto _43
- case i32(8):
+ case int32(8):
goto _51
- case i32(10):
+ case int32(10):
goto _42
- case i32(11):
+ case int32(11):
goto _22
- case i32(12):
+ case int32(12):
goto _49
- case i32(13):
+ case int32(13):
goto _45
- case i32(14):
+ case int32(14):
goto _44
- case i32(15):
+ case int32(15):
goto _30
- case i32(16):
+ case int32(16):
goto _40
- case i32(17):
+ case int32(17):
goto _41
- case i32(18):
+ case int32(18):
goto _48
- case i32(19):
+ case int32(19):
goto _27
- case i32(20):
+ case int32(20):
goto _28
- case i32(22):
+ case int32(22):
goto _26
- case i32(23):
+ case int32(23):
goto _25
- case i32(24):
+ case int32(24):
goto _33
- case i32(25):
+ case int32(25):
goto _55
- case i32(26):
+ case int32(26):
goto _23
- case i32(27):
+ case int32(27):
goto _24
- case i32(28):
+ case int32(28):
goto _54
- case i32(29):
+ case int32(29):
goto _57
- case i32(30):
+ case int32(30):
goto _36
- case i32(31):
+ case int32(31):
goto _38
- case i32(32):
+ case int32(32):
goto _34
- case i32(33):
+ case int32(33):
goto _35
- case i32(34):
+ case int32(34):
goto _58
- case i32(35):
+ case int32(35):
goto _53
- case i32(36):
+ case int32(36):
goto _52
- case i32(41):
+ case int32(41):
goto _59
- case i32(42):
+ case int32(42):
goto _46
- case i32(43):
+ case int32(43):
goto _39
default:
goto _56
@@ -103260,48 +104445,44 @@ _22:
if _zRight != nil {
goto _60
}
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + i32(2)
- sink1(*p)
- }
- _sqlite3VdbeVerifyNoMallocRequired(tls, _v, i32(9))
- _11_aOp = _sqlite3VdbeAddOpList(tls, _v, i32(9), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00getCacheSizeØ002)), _sqlite3PragmaØ00iLnØ001)
+ _pParse.XnMem += int32(2)
+ _sqlite3VdbeVerifyNoMallocRequired(tls, _v, int32(9))
+ _11_aOp = _sqlite3VdbeAddOpList(tls, _v, int32(9), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00getCacheSizeØ002)), _sqlite3PragmaØ00iLnØ001)
if func() int32 {
if _11_aOp == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113699), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113699), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _64
}
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_aOp)) + 24*uintptr(i32(0)))).X3))) = _iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_aOp)) + 24*uintptr(i32(1)))).X3))) = _iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_11_aOp)) + 24*uintptr(i32(6)))).X3))) = i32(-2000)
+ elem61(_11_aOp, 0).Xp1 = _iDb
+ elem61(_11_aOp, uintptr(1)).Xp1 = _iDb
+ elem61(_11_aOp, uintptr(6)).Xp1 = int32(-2000)
goto _65
_60:
_13_size = _sqlite3AbsInt32(tls, _sqlite3Atoi(tls, _zRight))
- _sqlite3BeginWriteOperation(tls, _pParse, i32(0), _iDb)
- _sqlite3VdbeAddOp3(tls, _v, i32(104), _iDb, i32(3), _13_size)
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(0), _iDb)
+ _sqlite3VdbeAddOp3(tls, _v, int32(104), _iDb, int32(3), _13_size)
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113707), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113707), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X10))) = _13_size
- _sqlite3BtreeSetCacheSize(tls, (*XBtree)(_pDb.X1), (*XSchema)(_pDb.X4).X10)
+ (*XSchema)(_pDb.XpSchema).Xcache_size = _13_size
+ _sqlite3BtreeSetCacheSize(tls, (*XBtree)(_pDb.XpBt), (*XSchema)(_pDb.XpSchema).Xcache_size)
_65:
goto _64
_23:
- _14_pBt = (*XBtree)(_pDb.X1)
+ _14_pBt = (*XBtree)(_pDb.XpBt)
func() {
if _14_pBt == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113727), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120686)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113727), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(120714)))
crt.X__builtin_abort(tls)
}
}()
@@ -103309,48 +104490,48 @@ _23:
_15_size = func() int32 {
if func() int32 {
if _14_pBt != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113729), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113729), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
return _sqlite3BtreeGetPageSize(tls, _14_pBt)
}
- return i32(0)
+ return int32(0)
}()
_returnSingleInt(tls, _v, int64(_15_size))
goto _75
}
- *(*int32)(unsafe.Pointer(&(_db.X27))) = _sqlite3Atoi(tls, _zRight)
- if i32(7) == _sqlite3BtreeSetPageSize(tls, _14_pBt, _db.X27, i32(-1), i32(0)) {
+ _db.XnextPagesize = _sqlite3Atoi(tls, _zRight)
+ if int32(7) == _sqlite3BtreeSetPageSize(tls, _14_pBt, _db.XnextPagesize, int32(-1), int32(0)) {
_sqlite3OomFault(tls, _db)
}
_75:
goto _64
_24:
- _18_pBt = (*XBtree)(_pDb.X1)
- _18_b = i32(-1)
+ _18_pBt = (*XBtree)(_pDb.XpBt)
+ _18_b = int32(-1)
func() {
if _18_pBt == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113754), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120686)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113754), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(120714)))
crt.X__builtin_abort(tls)
}
}()
if _zRight != nil {
- _18_b = int32(_sqlite3GetBoolean(tls, _zRight, uint8(i32(0))))
+ _18_b = int32(_sqlite3GetBoolean(tls, _zRight, 0))
}
- if (_pId2.X1) != uint32(i32(0)) || _18_b < i32(0) {
+ if _pId2.Xn != (0) || _18_b < int32(0) {
goto _81
}
- _20_ii = i32(0)
+ _20_ii = int32(0)
_82:
- if _20_ii >= (_db.X5) {
+ if _20_ii >= _db.XnDb {
goto _85
}
- _sqlite3BtreeSecureDelete(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_20_ii))).X1), _18_b)
+ _sqlite3BtreeSecureDelete(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_20_ii)).XpBt), _18_b)
_20_ii += 1
goto _82
_85:
@@ -103360,115 +104541,115 @@ _81:
goto _64
_25:
_sqlite3CodeVerifySchema(tls, _pParse, _iDb)
- _22_iReg = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zLeft)) + 1*uintptr(i32(0))))))))) == i32(112) {
- _sqlite3VdbeAddOp2(tls, _v, i32(161), _iDb, _22_iReg)
+ _22_iReg = preInc2(&_pParse.XnMem, 1)
+ if int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(*elem1(_zLeft, 0))))) == int32(112) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(161), _iDb, _22_iReg)
goto _87
}
- _sqlite3VdbeAddOp3(tls, _v, i32(162), _iDb, _22_iReg, _sqlite3AbsInt32(tls, _sqlite3Atoi(tls, _zRight)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(162), _iDb, _22_iReg, _sqlite3AbsInt32(tls, _sqlite3Atoi(tls, _zRight)))
_87:
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _22_iReg, i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _22_iReg, int32(1))
goto _64
_26:
- _25_zRet = str(91148)
+ _25_zRet = str(89670)
_25_eMode = _getLockingMode(tls, _zRight)
- if ((_pId2.X1) == uint32(i32(0))) && (_25_eMode == i32(-1)) {
- _25_eMode = int32(_db.X19)
+ if (_pId2.Xn == (0)) && (_25_eMode == int32(-1)) {
+ _25_eMode = int32(_db.XdfltLockMode)
goto _90
}
- if (_pId2.X1) != uint32(i32(0)) {
+ if _pId2.Xn != (0) {
goto _91
}
func() {
- if _pDb != (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113826), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120693)))
+ if _pDb != elem27((*XDb)(_db.XaDb), 0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113826), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(120721)))
crt.X__builtin_abort(tls)
}
}()
- _28_ii = i32(2)
+ _28_ii = int32(2)
_94:
- if _28_ii >= (_db.X5) {
+ if _28_ii >= _db.XnDb {
goto _97
}
- _27_pPager = _sqlite3BtreePager(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_28_ii))).X1))
+ _27_pPager = _sqlite3BtreePager(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_28_ii)).XpBt))
_sqlite3PagerLockingMode(tls, _27_pPager, _25_eMode)
_28_ii += 1
goto _94
_97:
- *(*uint8)(unsafe.Pointer(&(_db.X19))) = uint8(_25_eMode)
+ _db.XdfltLockMode = uint8(_25_eMode)
_91:
- _27_pPager = _sqlite3BtreePager(tls, (*XBtree)(_pDb.X1))
+ _27_pPager = _sqlite3BtreePager(tls, (*XBtree)(_pDb.XpBt))
_25_eMode = _sqlite3PagerLockingMode(tls, _27_pPager, _25_eMode)
_90:
func() {
- if _25_eMode != i32(0) && _25_eMode != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113837), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120710)))
+ if _25_eMode != int32(0) && _25_eMode != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113837), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(120738)))
crt.X__builtin_abort(tls)
}
}()
- if _25_eMode == i32(1) {
- _25_zRet = str(91138)
+ if _25_eMode == int32(1) {
+ _25_zRet = str(89660)
}
_returnSingleText(tls, _v, _25_zRet)
goto _64
_27:
if _zRight == nil {
- _31_eMode = i32(-1)
+ _31_eMode = int32(-1)
goto _103
}
_33_n = _sqlite3Strlen30(tls, _zRight)
- _31_eMode = i32(0)
+ _31_eMode = int32(0)
_104:
- if store0(&_33_zMode, _sqlite3JournalModename(tls, _31_eMode)) == nil {
+ if store1(&_33_zMode, _sqlite3JournalModename(tls, _31_eMode)) == nil {
goto _107
}
- if Xsqlite3_strnicmp(tls, _zRight, _33_zMode, _33_n) == i32(0) {
+ if Xsqlite3_strnicmp(tls, _zRight, _33_zMode, _33_n) == int32(0) {
goto _107
}
_31_eMode += 1
goto _104
_107:
if _33_zMode == nil {
- _31_eMode = i32(-1)
+ _31_eMode = int32(-1)
}
_103:
- if (_31_eMode == i32(-1)) && ((_pId2.X1) == uint32(i32(0))) {
- _iDb = i32(0)
- *(*uint32)(unsafe.Pointer(&(_pId2.X1))) = uint32(i32(1))
+ if (_31_eMode == int32(-1)) && (_pId2.Xn == (0)) {
+ _iDb = int32(0)
+ _pId2.Xn = uint32(1)
}
- _31_ii = (_db.X5) - i32(1)
+ _31_ii = _db.XnDb - int32(1)
_112:
- if _31_ii < i32(0) {
+ if _31_ii < int32(0) {
goto _115
}
- if ((*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_31_ii))).X1) != nil) && ((_31_ii == _iDb) || ((_pId2.X1) == uint32(i32(0)))) {
+ if ((elem27((*XDb)(_db.XaDb), uintptr(_31_ii)).XpBt) != nil) && ((_31_ii == _iDb) || (_pId2.Xn == (0))) {
_sqlite3VdbeUsesBtree(tls, _v, _31_ii)
- _sqlite3VdbeAddOp3(tls, _v, i32(9), _31_ii, i32(1), _31_eMode)
+ _sqlite3VdbeAddOp3(tls, _v, int32(9), _31_ii, int32(1), _31_eMode)
}
_31_ii -= 1
goto _112
_115:
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(1))
goto _64
_28:
- _39_pPager = _sqlite3BtreePager(tls, (*XBtree)(_pDb.X1))
- _39_iLimit = i64(-2)
+ _39_pPager = _sqlite3BtreePager(tls, (*XBtree)(_pDb.XpBt))
+ _39_iLimit = int64(-2)
if _zRight == nil {
goto _119
}
_sqlite3DecOrHexToI64(tls, _zRight, &_39_iLimit)
- if _39_iLimit < int64(i32(-1)) {
- _39_iLimit = int64(i32(-1))
+ if _39_iLimit < int64(-1) {
+ _39_iLimit = int64(-1)
}
_119:
_39_iLimit = _sqlite3PagerJournalSizeLimit(tls, _39_pPager, _39_iLimit)
_returnSingleInt(tls, _v, _39_iLimit)
goto _64
_29:
- _41_pBt = (*XBtree)(_pDb.X1)
+ _41_pBt = (*XBtree)(_pDb.XpBt)
func() {
if _41_pBt == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113916), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120686)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113916), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(120714)))
crt.X__builtin_abort(tls)
}
}()
@@ -103478,101 +104659,93 @@ _29:
}
_43_eAuto = _getAutoVacuum(tls, _zRight)
func() {
- if _43_eAuto < i32(0) || _43_eAuto > i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113921), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120780)))
+ if _43_eAuto < int32(0) || _43_eAuto > int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113921), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(120808)))
crt.X__builtin_abort(tls)
}
}()
- *(*int8)(unsafe.Pointer(&(_db.X20))) = int8(uint8(_43_eAuto))
+ _db.XnextAutovac = int8(uint8(_43_eAuto))
_rc = _sqlite3BtreeSetAutoVacuum(tls, _41_pBt, _43_eAuto)
- if _rc != i32(0) || _43_eAuto != i32(1) && _43_eAuto != i32(2) {
+ if _rc != int32(0) || _43_eAuto != int32(1) && _43_eAuto != int32(2) {
goto _130
}
_44_iAddr = _sqlite3VdbeCurrentAddr(tls, _v)
- _sqlite3VdbeVerifyNoMallocRequired(tls, _v, i32(5))
- _44_aOp = _sqlite3VdbeAddOpList(tls, _v, i32(5), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00setMeta6Ø004)), _sqlite3PragmaØ00iLnØ003)
+ _sqlite3VdbeVerifyNoMallocRequired(tls, _v, int32(5))
+ _44_aOp = _sqlite3VdbeAddOpList(tls, _v, int32(5), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00setMeta6Ø004)), _sqlite3PragmaØ00iLnØ003)
if func() int32 {
if _44_aOp == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113947), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113947), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _64
}
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_44_aOp)) + 24*uintptr(i32(0)))).X3))) = _iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_44_aOp)) + 24*uintptr(i32(1)))).X3))) = _iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_44_aOp)) + 24*uintptr(i32(2)))).X4))) = _44_iAddr + i32(4)
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_44_aOp)) + 24*uintptr(i32(4)))).X3))) = _iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_44_aOp)) + 24*uintptr(i32(4)))).X5))) = _43_eAuto - i32(1)
+ elem61(_44_aOp, 0).Xp1 = _iDb
+ elem61(_44_aOp, uintptr(1)).Xp1 = _iDb
+ elem61(_44_aOp, uintptr(2)).Xp2 = _44_iAddr + int32(4)
+ elem61(_44_aOp, uintptr(4)).Xp1 = _iDb
+ elem61(_44_aOp, uintptr(4)).Xp3 = _43_eAuto - int32(1)
_sqlite3VdbeUsesBtree(tls, _v, _iDb)
_130:
_124:
goto _64
_30:
- if ((_zRight == nil) || (_sqlite3GetInt32(tls, _zRight, &_45_iLimit) == 0)) || (_45_iLimit <= i32(0)) {
- _45_iLimit = i32(2147483647)
- }
- _sqlite3BeginWriteOperation(tls, _pParse, i32(0), _iDb)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), _45_iLimit, i32(1))
- _45_addr = _sqlite3VdbeAddOp1(tls, _v, i32(49), _iDb)
- _sqlite3VdbeAddOp1(tls, _v, i32(67), i32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(73), i32(1), i32(-1))
- _sqlite3VdbeAddOp2(tls, _v, i32(46), i32(1), _45_addr)
+ if ((_zRight == nil) || (_sqlite3GetInt32(tls, _zRight, &_45_iLimit) == 0)) || (_45_iLimit <= int32(0)) {
+ _45_iLimit = int32(2147483647)
+ }
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(0), _iDb)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), _45_iLimit, int32(1))
+ _45_addr = _sqlite3VdbeAddOp1(tls, _v, int32(49), _iDb)
+ _sqlite3VdbeAddOp1(tls, _v, int32(67), int32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(73), int32(1), int32(-1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(46), int32(1), _45_addr)
_sqlite3VdbeJumpHere(tls, _v, _45_addr)
goto _64
_31:
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113995), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113995), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
if _zRight == nil {
- _returnSingleInt(tls, _v, int64((*XSchema)(_pDb.X4).X10))
+ _returnSingleInt(tls, _v, int64((*XSchema)(_pDb.XpSchema).Xcache_size))
goto _140
}
_49_size = _sqlite3Atoi(tls, _zRight)
- *(*int32)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X10))) = _49_size
- _sqlite3BtreeSetCacheSize(tls, (*XBtree)(_pDb.X1), (*XSchema)(_pDb.X4).X10)
+ (*XSchema)(_pDb.XpSchema).Xcache_size = _49_size
+ _sqlite3BtreeSetCacheSize(tls, (*XBtree)(_pDb.XpBt), (*XSchema)(_pDb.XpSchema).Xcache_size)
_140:
goto _64
_32:
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114029), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114029), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
if _zRight == nil {
_returnSingleInt(tls, _v, int64(func() int32 {
- if ((_db.X6) & i32(32)) == i32(0) {
- return i32(0)
+ if (_db.Xflags & int32(32)) == int32(0) {
+ return int32(0)
}
- return _sqlite3BtreeSetSpillSize(tls, (*XBtree)(_pDb.X1), i32(0))
+ return _sqlite3BtreeSetSpillSize(tls, (*XBtree)(_pDb.XpBt), int32(0))
}()))
goto _146
}
- _52_size = i32(1)
+ _52_size = int32(1)
if _sqlite3GetInt32(tls, _zRight, &_52_size) != 0 {
- _sqlite3BtreeSetSpillSize(tls, (*XBtree)(_pDb.X1), _52_size)
+ _sqlite3BtreeSetSpillSize(tls, (*XBtree)(_pDb.XpBt), _52_size)
}
- if _sqlite3GetBoolean(tls, _zRight, uint8(bool2int(_52_size != i32(0)))) != 0 {
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(32)
- sink1(*p)
- }
+ if _sqlite3GetBoolean(tls, _zRight, uint8(bool2int(_52_size != int32(0)))) != 0 {
+ _db.Xflags |= int32(32)
goto _149
}
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-33)
- sink1(*p)
- }
+ _db.Xflags &= int32(-33)
_149:
_setAllPagerFlags(tls, _db)
_146:
@@ -103580,7 +104753,7 @@ _146:
_33:
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114066), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114066), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
@@ -103588,39 +104761,39 @@ _33:
goto _152
}
_sqlite3DecOrHexToI64(tls, _zRight, &_56_sz)
- if _56_sz < int64(i32(0)) {
- _56_sz = _sqlite3Config.X17
+ if _56_sz < (0) {
+ _56_sz = _sqlite3Config.XszMmap
}
- if (_pId2.X1) == uint32(i32(0)) {
- *(*int64)(unsafe.Pointer(&(_db.X8))) = _56_sz
+ if _pId2.Xn == (0) {
+ _db.XszMmap = _56_sz
}
- _57_ii = (_db.X5) - i32(1)
+ _57_ii = _db.XnDb - int32(1)
_155:
- if _57_ii < i32(0) {
+ if _57_ii < int32(0) {
goto _158
}
- if ((*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_57_ii))).X1) != nil) && ((_57_ii == _iDb) || ((_pId2.X1) == uint32(i32(0)))) {
- _sqlite3BtreeSetMmapLimit(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_57_ii))).X1), _56_sz)
+ if ((elem27((*XDb)(_db.XaDb), uintptr(_57_ii)).XpBt) != nil) && ((_57_ii == _iDb) || (_pId2.Xn == (0))) {
+ _sqlite3BtreeSetMmapLimit(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_57_ii)).XpBt), _56_sz)
}
_57_ii -= 1
goto _155
_158:
_152:
- _56_sz = int64(i32(-1))
- _rc = Xsqlite3_file_control(tls, _db, _zDb, i32(18), (unsafe.Pointer)(&_56_sz))
- if _rc == i32(0) {
+ _56_sz = int64(-1)
+ _rc = Xsqlite3_file_control(tls, _db, _zDb, int32(18), unsafe.Pointer(&_56_sz))
+ if _rc == int32(0) {
_returnSingleInt(tls, _v, _56_sz)
goto _164
}
- if _rc != i32(12) {
- *(*int32)(unsafe.Pointer(&(_pParse.X16))) += 1
- *(*int32)(unsafe.Pointer(&(_pParse.X3))) = _rc
+ if _rc != int32(12) {
+ _pParse.XnErr += 1
+ _pParse.Xrc = _rc
}
_164:
goto _64
_34:
if _zRight == nil {
- _returnSingleInt(tls, _v, int64(_db.X16))
+ _returnSingleInt(tls, _v, int64(_db.Xtemp_store))
goto _166
}
_changeTempStorage(tls, _pParse, _zRight)
@@ -103631,21 +104804,21 @@ _35:
_returnSingleText(tls, _v, Xsqlite3_temp_directory)
goto _168
}
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRight)) + 1*uintptr(i32(0))))) == 0 {
+ if (*elem1(_zRight, 0)) == 0 {
goto _169
}
- _rc = _sqlite3OsAccess(tls, (*Xsqlite3_vfs)(_db.X0), _zRight, i32(1), &_68_res)
- if (_rc != i32(0)) || (_68_res == i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(120801))
+ _rc = _sqlite3OsAccess(tls, (*Xsqlite3_vfs)(_db.XpVfs), _zRight, int32(1), &_68_res)
+ if (_rc != int32(0)) || (_68_res == int32(0)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(120829))
goto _pragma_out
}
_169:
- if (i32(0) != 0 || (i32(1) != 0 && (int32(_db.X16) <= i32(1)))) || i32(0) != 0 {
+ if (int32(0) != 0 || (int32(1) != 0 && (int32(_db.Xtemp_store) <= int32(1)))) || int32(0) != 0 {
_invalidateTempStorage(tls, _pParse)
}
- Xsqlite3_free(tls, (unsafe.Pointer)(Xsqlite3_temp_directory))
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zRight)) + 1*uintptr(i32(0))))) != 0 {
- Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, str(24576), unsafe.Pointer(_zRight))
+ Xsqlite3_free(tls, unsafe.Pointer(Xsqlite3_temp_directory))
+ if (*elem1(_zRight, 0)) != 0 {
+ Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, str(24531), unsafe.Pointer(_zRight))
bug20530(Xsqlite3_temp_directory)
goto _177
}
@@ -103656,22 +104829,22 @@ _168:
goto _64
_36:
if _zRight == nil {
- _returnSingleInt(tls, _v, int64(int32(_pDb.X2)-i32(1)))
+ _returnSingleInt(tls, _v, int64(int32(_pDb.Xsafety_level)-int32(1)))
goto _179
}
- if (_db.X15) == 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(120826))
+ if _db.XautoCommit == 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(120854))
goto _182
}
- if _iDb == i32(1) {
+ if _iDb == int32(1) {
goto _182
}
- _77_iLevel = (int32(_getSafetyLevel(tls, _zRight, i32(0), uint8(i32(1)))) + i32(1)) & i32(7)
- if _77_iLevel == i32(0) {
- _77_iLevel = i32(1)
+ _77_iLevel = (int32(_getSafetyLevel(tls, _zRight, int32(0), uint8(1))) + int32(1)) & int32(7)
+ if _77_iLevel == int32(0) {
+ _77_iLevel = int32(1)
}
- *(*uint8)(unsafe.Pointer(&(_pDb.X2))) = uint8(_77_iLevel)
- *(*uint8)(unsafe.Pointer(&(_pDb.X3))) = uint8(i32(1))
+ _pDb.Xsafety_level = uint8(_77_iLevel)
+ _pDb.XbSyncSet = uint8(1)
_setAllPagerFlags(tls, _db)
_182:
_179:
@@ -103679,35 +104852,23 @@ _179:
_37:
if _zRight == nil {
_setPragmaResultColumnNames(tls, _v, _pPragma)
- _returnSingleInt(tls, _v, int64(bool2int((uint32(_db.X6)&(_pPragma.X5)) != uint32(i32(0)))))
+ _returnSingleInt(tls, _v, int64(bool2int((uint32(_db.Xflags)&_pPragma.XiArg) != (0))))
goto _185
}
- _80_mask = int32(_pPragma.X5)
- if int32(_db.X15) == i32(0) {
- {
- p := &_80_mask
- *p = (*p) & i32(-524289)
- sink1(*p)
- }
+ _80_mask = int32(_pPragma.XiArg)
+ if int32(_db.XautoCommit) == int32(0) {
+ _80_mask &= int32(-524289)
}
- if _sqlite3GetBoolean(tls, _zRight, uint8(i32(0))) != 0 {
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | _80_mask
- sink1(*p)
- }
+ if _sqlite3GetBoolean(tls, _zRight, 0) != 0 {
+ _db.Xflags |= _80_mask
goto _188
}
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & (^_80_mask)
- sink1(*p)
- }
- if _80_mask == i32(33554432) {
- *(*int64)(unsafe.Pointer(&(_db.X78))) = int64(i32(0))
+ _db.Xflags &= ^_80_mask
+ if _80_mask == int32(33554432) {
+ _db.XnDeferredImmCons = 0
}
_188:
- _sqlite3VdbeAddOp0(tls, _v, i32(153))
+ _sqlite3VdbeAddOp0(tls, _v, int32(153))
_setAllPagerFlags(tls, _db)
_185:
goto _64
@@ -103715,35 +104876,35 @@ _38:
if _zRight == nil {
goto _190
}
- _84_pTab = _sqlite3LocateTable(tls, _pParse, uint32(i32(2)), _zRight, _zDb)
+ _84_pTab = _sqlite3LocateTable(tls, _pParse, uint32(2), _zRight, _zDb)
if _84_pTab == nil {
goto _191
}
- _85_nHidden = i32(0)
+ _85_nHidden = int32(0)
_85_pPk = _sqlite3PrimaryKeyIndex(tls, _84_pTab)
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(6)
+ _pParse.XnMem = int32(6)
_sqlite3CodeVerifySchema(tls, _pParse, _iDb)
_sqlite3ViewGetColumnNames(tls, _pParse, _84_pTab)
- *func() **XColumn { _85_i = i32(0); return &_85_pCol }() = (*XColumn)(_84_pTab.X1)
+ *func() **XColumn { _85_i = int32(0); return &_85_pCol }() = (*XColumn)(_84_pTab.XaCol)
_192:
- if _85_i >= int32(_84_pTab.X11) {
+ if _85_i >= int32(_84_pTab.XnCol) {
goto _195
}
- if (int32(_85_pCol.X6) & i32(2)) != i32(0) {
+ if (int32(_85_pCol.XcolFlags) & int32(2)) != int32(0) {
_85_nHidden += 1
goto _193
}
- if (int32(_85_pCol.X6) & i32(1)) == i32(0) {
- _85_k = i32(0)
+ if (int32(_85_pCol.XcolFlags) & int32(1)) == int32(0) {
+ _85_k = int32(0)
goto _200
}
if _85_pPk == nil {
- _85_k = i32(1)
+ _85_k = int32(1)
goto _200
}
- _85_k = i32(1)
+ _85_k = int32(1)
_201:
- if _85_k > int32(_84_pTab.X11) || int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_85_pPk.X1)) + 2*uintptr(_85_k-i32(1))))) == _85_i {
+ if _85_k > int32(_84_pTab.XnCol) || int32(*elem50(_85_pPk.XaiColumn, uintptr(_85_k-int32(1)))) == _85_i {
goto _205
}
_85_k += 1
@@ -103751,23 +104912,23 @@ _201:
_205:
_200:
func() {
- if (*XExpr)(_85_pCol.X1) != nil && int32((*XExpr)(_85_pCol.X1).X0) != i32(162) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114330), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120879)))
+ if (*XExpr)(_85_pCol.XpDflt) != nil && int32((*XExpr)(_85_pCol.XpDflt).Xop) != int32(162) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114330), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(120907)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMultiLoad(tls, _v, i32(1), str(120922), _85_i-_85_nHidden, unsafe.Pointer(_85_pCol.X0), unsafe.Pointer(_sqlite3ColumnType(tls, _85_pCol, str(0))), func() int32 {
- if (_85_pCol.X3) != 0 {
- return i32(1)
+ _sqlite3VdbeMultiLoad(tls, _v, int32(1), str(120950), _85_i-_85_nHidden, unsafe.Pointer(_85_pCol.XzName), unsafe.Pointer(_sqlite3ColumnType(tls, _85_pCol, str(284))), func() int32 {
+ if _85_pCol.XnotNull != 0 {
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}(), unsafe.Pointer(func() *int8 {
- if (*XExpr)(_85_pCol.X1) != nil {
- return (*(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&((*XExpr)(_85_pCol.X1).X3))))))
+ if _85_pCol.XpDflt != nil {
+ return (*(**int8)(unsafe.Pointer(&((*XExpr)(_85_pCol.XpDflt).Xu))))
}
return nil
}()), _85_k)
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(6))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(6))
_193:
*(*uintptr)(unsafe.Pointer(func() **XColumn { _85_i += 1; return &_85_pCol }())) += uintptr(16)
goto _192
@@ -103776,27 +104937,27 @@ _191:
_190:
goto _64
_39:
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(5)
+ _pParse.XnMem = int32(5)
_sqlite3CodeVerifySchema(tls, _pParse, _iDb)
- _92_i = (*XHashElem)((*XHash)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X2))).X2)
+ _92_i = (*XHashElem)(((*XSchema)(_pDb.XpSchema).XtblHash).Xfirst)
_213:
if _92_i == nil {
goto _216
}
- _93_pTab = (*XTable)(_92_i.X2)
- _sqlite3VdbeMultiLoad(tls, _v, i32(1), str(120929), unsafe.Pointer(_93_pTab.X0), i32(0), int32(_93_pTab.X13), int32(_93_pTab.X12), _93_pTab.X9)
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(5))
- _92_pIdx = (*XIndex)(_93_pTab.X2)
+ _93_pTab = (*XTable)(_92_i.Xdata)
+ _sqlite3VdbeMultiLoad(tls, _v, int32(1), str(120957), unsafe.Pointer(_93_pTab.XzName), int32(0), int32(_93_pTab.XszTabRow), int32(_93_pTab.XnRowLogEst), _93_pTab.XtabFlags)
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(5))
+ _92_pIdx = (*XIndex)(_93_pTab.XpIndex)
_217:
if _92_pIdx == nil {
goto _220
}
- _sqlite3VdbeMultiLoad(tls, _v, i32(2), str(120935), unsafe.Pointer(_92_pIdx.X0), int32(_92_pIdx.X12), int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_92_pIdx.X2)) + 2*uintptr(i32(0))))), (uint32((_92_pIdx.X16)>>uint(i32(7)))<<uint(i32(31)))>>uint(i32(31)))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(5))
- _92_pIdx = (*XIndex)(_92_pIdx.X5)
+ _sqlite3VdbeMultiLoad(tls, _v, int32(2), str(120963), unsafe.Pointer(_92_pIdx.XzName), int32(_92_pIdx.XszIdxRow), int32(*elem50(_92_pIdx.XaiRowLogEst, 0)), (uint32(_92_pIdx.XidxType>>7)<<31)>>31)
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(5))
+ _92_pIdx = (*XIndex)(_92_pIdx.XpNext)
goto _217
_220:
- _92_i = (*XHashElem)(_92_i.X0)
+ _92_i = (*XHashElem)(_92_i.Xnext)
goto _213
_216:
goto _64
@@ -103808,38 +104969,38 @@ _40:
if _95_pIdx == nil {
goto _222
}
- if (_pPragma.X5) != 0 {
- _96_mx = int32(_95_pIdx.X14)
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(6)
+ if _pPragma.XiArg != 0 {
+ _96_mx = int32(_95_pIdx.XnColumn)
+ _pParse.XnMem = int32(6)
goto _224
}
- _96_mx = int32(_95_pIdx.X13)
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(3)
+ _96_mx = int32(_95_pIdx.XnKeyCol)
+ _pParse.XnMem = int32(3)
_224:
- _95_pTab = (*XTable)(_95_pIdx.X3)
+ _95_pTab = (*XTable)(_95_pIdx.XpTable)
_sqlite3CodeVerifySchema(tls, _pParse, _iDb)
func() {
- if (_pParse.X18) > int32(_pPragma.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114390), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120940)))
+ if _pParse.XnMem > int32(_pPragma.XnPragCName) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114390), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(120968)))
crt.X__builtin_abort(tls)
}
}()
- _96_i = i32(0)
+ _96_i = int32(0)
_227:
if _96_i >= _96_mx {
goto _230
}
- _99_cnum = *(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_95_pIdx.X1)) + 2*uintptr(_96_i)))
- _sqlite3VdbeMultiLoad(tls, _v, i32(1), str(120974), _96_i, int32(_99_cnum), unsafe.Pointer(func() *int8 {
- if int32(_99_cnum) < i32(0) {
+ _99_cnum = *elem50(_95_pIdx.XaiColumn, uintptr(_96_i))
+ _sqlite3VdbeMultiLoad(tls, _v, int32(1), str(121002), _96_i, int32(_99_cnum), unsafe.Pointer(func() *int8 {
+ if int32(_99_cnum) < int32(0) {
return nil
}
- return ((*XColumn)(unsafe.Pointer(uintptr(_95_pTab.X1) + 16*uintptr(_99_cnum))).X0)
+ return (elem41((*XColumn)(_95_pTab.XaCol), uintptr(_99_cnum)).XzName)
}()))
- if (_pPragma.X5) != 0 {
- _sqlite3VdbeMultiLoad(tls, _v, i32(4), str(120978), int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_95_pIdx.X7)) + 1*uintptr(_96_i)))), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_95_pIdx.X8)) + 4*uintptr(_96_i)))), bool2int(_96_i < int32(_95_pIdx.X13)))
+ if _pPragma.XiArg != 0 {
+ _sqlite3VdbeMultiLoad(tls, _v, int32(4), str(121006), int32(*elem15(_95_pIdx.XaSortOrder, uintptr(_96_i))), unsafe.Pointer(*elem0(_95_pIdx.XazColl, uintptr(_96_i))), bool2int(_96_i < int32(_95_pIdx.XnKeyCol)))
}
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), _pParse.X18)
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), _pParse.XnMem)
_96_i += 1
goto _227
_230:
@@ -103854,60 +105015,60 @@ _41:
if _101_pTab == nil {
goto _235
}
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(5)
+ _pParse.XnMem = int32(5)
_sqlite3CodeVerifySchema(tls, _pParse, _iDb)
- *func() *int32 { _101_pIdx = (*XIndex)(_101_pTab.X2); return &_101_i }() = i32(0)
+ *func() *int32 { _101_pIdx = (*XIndex)(_101_pTab.XpIndex); return &_101_i }() = int32(0)
_236:
if _101_pIdx == nil {
goto _239
}
_103_azOrigin = [3]*int8{}
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_103_azOrigin)) + 4*uintptr(i32(0)))) = str(120982)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_103_azOrigin)) + 4*uintptr(i32(1)))) = str(120984)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_103_azOrigin)) + 4*uintptr(i32(2)))) = str(61650)
- _sqlite3VdbeMultiLoad(tls, _v, i32(1), str(120986), _101_i, unsafe.Pointer(_101_pIdx.X0), bool2int(int32(_101_pIdx.X15) != i32(0)), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_103_azOrigin)) + 4*uintptr((uint32(_101_pIdx.X16)<<uint(i32(30)))>>uint(i32(30)))))), bool2int((*XExpr)(_101_pIdx.X9) != nil))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(5))
- *func() *int32 { _101_pIdx = (*XIndex)(_101_pIdx.X5); return &_101_i }() += 1
+ *elem0((**int8)(unsafe.Pointer(&_103_azOrigin)), 0) = str(121010)
+ *elem0((**int8)(unsafe.Pointer(&_103_azOrigin)), uintptr(1)) = str(121012)
+ *elem0((**int8)(unsafe.Pointer(&_103_azOrigin)), uintptr(2)) = str(93736)
+ _sqlite3VdbeMultiLoad(tls, _v, int32(1), str(121014), _101_i, unsafe.Pointer(_101_pIdx.XzName), bool2int(int32(_101_pIdx.XonError) != int32(0)), unsafe.Pointer(*elem0((**int8)(unsafe.Pointer(&_103_azOrigin)), uintptr((uint32(_101_pIdx.XidxType)<<30)>>30))), bool2int((*XExpr)(_101_pIdx.XpPartIdxWhere) != nil))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(5))
+ *func() *int32 { _101_pIdx = (*XIndex)(_101_pIdx.XpNext); return &_101_i }() += 1
goto _236
_239:
_235:
_234:
goto _64
_42:
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(3)
- _104_i = i32(0)
+ _pParse.XnMem = int32(3)
+ _104_i = int32(0)
_240:
- if _104_i >= (_db.X5) {
+ if _104_i >= _db.XnDb {
goto _243
}
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_104_i))).X1) == nil {
+ if (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_104_i)).XpBt) == nil {
goto _241
}
func() {
- if ((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_104_i))).X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114434), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(120992)))
+ if (elem27((*XDb)(_db.XaDb), uintptr(_104_i)).XzDbSName) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114434), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121020)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMultiLoad(tls, _v, i32(1), str(121015), _104_i, unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_104_i))).X0), unsafe.Pointer(_sqlite3BtreeGetFilename(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_104_i))).X1))))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(3))
+ _sqlite3VdbeMultiLoad(tls, _v, int32(1), str(121043), _104_i, unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_104_i)).XzDbSName), unsafe.Pointer(_sqlite3BtreeGetFilename(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_104_i)).XpBt))))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(3))
_241:
_104_i += 1
goto _240
_243:
goto _64
_43:
- _106_i = i32(0)
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(2)
- _106_p = (*XHashElem)((*XHash)(unsafe.Pointer(&(_db.X70))).X2)
+ _106_i = int32(0)
+ _pParse.XnMem = int32(2)
+ _106_p = (*XHashElem)(_db.XaCollSeq.Xfirst)
_247:
if _106_p == nil {
goto _250
}
- _107_pColl = (*XCollSeq)(_106_p.X2)
- _sqlite3VdbeMultiLoad(tls, _v, i32(1), str(121019), postInc1(&_106_i, int32(1)), unsafe.Pointer(_107_pColl.X0))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(2))
- _106_p = (*XHashElem)(_106_p.X0)
+ _107_pColl = (*XCollSeq)(_106_p.Xdata)
+ _sqlite3VdbeMultiLoad(tls, _v, int32(1), str(121047), postInc2(&_106_i, 1), unsafe.Pointer(_107_pColl.XzName))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(2))
+ _106_p = (*XHashElem)(_106_p.Xnext)
goto _247
_250:
goto _64
@@ -103919,35 +105080,29 @@ _44:
if _108_pTab == nil {
goto _252
}
- _108_pFK = (*XFKey)(_108_pTab.X4)
+ _108_pFK = (*XFKey)(_108_pTab.XpFKey)
if _108_pFK == nil {
goto _253
}
- _110_i = i32(0)
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(8)
+ _110_i = int32(0)
+ _pParse.XnMem = int32(8)
_sqlite3CodeVerifySchema(tls, _pParse, _iDb)
_254:
if _108_pFK == nil {
goto _255
}
- _111_j = i32(0)
+ _111_j = int32(0)
_256:
- if _111_j >= (_108_pFK.X5) {
+ if _111_j >= _108_pFK.XnCol {
goto _259
}
- _sqlite3VdbeMultiLoad(tls, _v, i32(1), str(121022), _110_i, _111_j, unsafe.Pointer(_108_pFK.X2), unsafe.Pointer((*XColumn)(unsafe.Pointer(uintptr(_108_pTab.X1)+16*uintptr((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_108_pFK.X9)))))+8*uintptr(_111_j))).X0))).X0), unsafe.Pointer((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_108_pFK.X9)))))+8*uintptr(_111_j))).X1), unsafe.Pointer(_actionName(tls, *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint8)(unsafe.Pointer(&(_108_pFK.X7))))) + 1*uintptr(i32(1)))))), unsafe.Pointer(_actionName(tls, *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint8)(unsafe.Pointer(&(_108_pFK.X7))))) + 1*uintptr(i32(0)))))), unsafe.Pointer(str(121031)))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(8))
+ _sqlite3VdbeMultiLoad(tls, _v, int32(1), str(121050), _110_i, _111_j, unsafe.Pointer(_108_pFK.XzTo), unsafe.Pointer(elem41((*XColumn)(_108_pTab.XaCol), uintptr(elem116((*t117)(unsafe.Pointer(&_108_pFK.XaCol)), uintptr(_111_j)).XiFrom)).XzName), unsafe.Pointer(elem116((*t117)(unsafe.Pointer(&_108_pFK.XaCol)), uintptr(_111_j)).XzCol), unsafe.Pointer(_actionName(tls, *elem15((*uint8)(unsafe.Pointer(&_108_pFK.XaAction)), uintptr(1)))), unsafe.Pointer(_actionName(tls, *elem15((*uint8)(unsafe.Pointer(&_108_pFK.XaAction)), 0))), unsafe.Pointer(str(121059)))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(8))
_111_j += 1
goto _256
_259:
_110_i += 1
- _108_pFK = (*XFKey)(_108_pFK.X1)
+ _108_pFK = (*XFKey)(_108_pFK.XpNextFrom)
goto _254
_255:
_253:
@@ -103955,57 +105110,53 @@ _252:
_251:
goto _64
_45:
- _113_regResult = (_pParse.X18) + i32(1)
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X18)))
- *p = (*p) + i32(4)
- sink1(*p)
- }
- _113_regKey = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _113_regRow = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ _113_regResult = _pParse.XnMem + int32(1)
+ _pParse.XnMem += int32(4)
+ _113_regKey = preInc2(&_pParse.XnMem, 1)
+ _113_regRow = preInc2(&_pParse.XnMem, 1)
_sqlite3CodeVerifySchema(tls, _pParse, _iDb)
- _113_k = (*XHashElem)((*XHash)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4).X2))).X2)
+ _113_k = (*XHashElem)(((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).XtblHash).Xfirst)
_260:
if _113_k == nil {
goto _261
}
if _zRight != nil {
- _113_pTab = _sqlite3LocateTable(tls, _pParse, uint32(i32(0)), _zRight, _zDb)
+ _113_pTab = _sqlite3LocateTable(tls, _pParse, 0, _zRight, _zDb)
_113_k = nil
goto _263
}
- _113_pTab = (*XTable)(_113_k.X2)
- _113_k = (*XHashElem)(_113_k.X0)
+ _113_pTab = (*XTable)(_113_k.Xdata)
+ _113_k = (*XHashElem)(_113_k.Xnext)
_263:
- if (_113_pTab == nil) || ((*XFKey)(_113_pTab.X4) == nil) {
+ if (_113_pTab == nil) || ((*XFKey)(_113_pTab.XpFKey) == nil) {
goto _260
}
- _sqlite3TableLock(tls, _pParse, _iDb, _113_pTab.X7, uint8(i32(0)), _113_pTab.X0)
- if (int32(_113_pTab.X11) + _113_regRow) > (_pParse.X18) {
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = int32(_113_pTab.X11) + _113_regRow
+ _sqlite3TableLock(tls, _pParse, _iDb, _113_pTab.Xtnum, 0, _113_pTab.XzName)
+ if (int32(_113_pTab.XnCol) + _113_regRow) > _pParse.XnMem {
+ _pParse.XnMem = int32(_113_pTab.XnCol) + _113_regRow
}
- _sqlite3OpenTable(tls, _pParse, i32(0), _iDb, _113_pTab, i32(106))
- _sqlite3VdbeLoadString(tls, _v, _113_regResult, _113_pTab.X0)
- *func() **XFKey { _113_i = i32(1); return &_113_pFK }() = (*XFKey)(_113_pTab.X4)
+ _sqlite3OpenTable(tls, _pParse, int32(0), _iDb, _113_pTab, int32(106))
+ _sqlite3VdbeLoadString(tls, _v, _113_regResult, _113_pTab.XzName)
+ *func() **XFKey { _113_i = int32(1); return &_113_pFK }() = (*XFKey)(_113_pTab.XpFKey)
_267:
if _113_pFK == nil {
goto _270
}
- _113_pParent = _sqlite3FindTable(tls, _db, _113_pFK.X2, _zDb)
+ _113_pParent = _sqlite3FindTable(tls, _db, _113_pFK.XzTo, _zDb)
if _113_pParent == nil {
goto _268
}
_113_pIdx = nil
- _sqlite3TableLock(tls, _pParse, _iDb, _113_pParent.X7, uint8(i32(0)), _113_pParent.X0)
+ _sqlite3TableLock(tls, _pParse, _iDb, _113_pParent.Xtnum, 0, _113_pParent.XzName)
_113_x = _sqlite3FkLocateIndex(tls, _pParse, _113_pParent, _113_pFK, &_113_pIdx, nil)
- if _113_x != i32(0) {
+ if _113_x != int32(0) {
goto _272
}
if _113_pIdx == nil {
- _sqlite3OpenTable(tls, _pParse, _113_i, _iDb, _113_pParent, i32(106))
+ _sqlite3OpenTable(tls, _pParse, _113_i, _iDb, _113_pParent, int32(106))
goto _274
}
- _sqlite3VdbeAddOp3(tls, _v, i32(106), _113_i, _113_pIdx.X11, _iDb)
+ _sqlite3VdbeAddOp3(tls, _v, int32(106), _113_i, _113_pIdx.Xtnum, _iDb)
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _113_pIdx)
_274:
goto _275
@@ -104014,90 +105165,87 @@ _272:
goto _270
_275:
_268:
- *func() **XFKey { _113_i += 1; return &_113_pFK }() = (*XFKey)(_113_pFK.X1)
+ *func() **XFKey { _113_i += 1; return &_113_pFK }() = (*XFKey)(_113_pFK.XpNextFrom)
goto _267
_270:
func() {
- if (_pParse.X16) <= i32(0) && _113_pFK != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114546), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121036)))
+ if _pParse.XnErr <= int32(0) && _113_pFK != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114546), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121064)))
crt.X__builtin_abort(tls)
}
}()
if _113_pFK != nil {
goto _261
}
- if (_pParse.X17) < _113_i {
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) = _113_i
+ if _pParse.XnTab < _113_i {
+ _pParse.XnTab = _113_i
}
- _113_addrTop = _sqlite3VdbeAddOp1(tls, _v, i32(37), i32(0))
- *func() **XFKey { _113_i = i32(1); return &_113_pFK }() = (*XFKey)(_113_pTab.X4)
+ _113_addrTop = _sqlite3VdbeAddOp1(tls, _v, int32(37), int32(0))
+ *func() **XFKey { _113_i = int32(1); return &_113_pFK }() = (*XFKey)(_113_pTab.XpFKey)
_281:
if _113_pFK == nil {
goto _284
}
- _113_pParent = _sqlite3FindTable(tls, _db, _113_pFK.X2, _zDb)
+ _113_pParent = _sqlite3FindTable(tls, _db, _113_pFK.XzTo, _zDb)
_113_pIdx = nil
_113_aiCols = nil
if _113_pParent != nil {
_113_x = _sqlite3FkLocateIndex(tls, _pParse, _113_pParent, _113_pFK, &_113_pIdx, &_113_aiCols)
func() {
- if _113_x != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114556), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121061)))
+ if _113_x != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114556), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121089)))
crt.X__builtin_abort(tls)
}
}()
}
_113_addrOk = _sqlite3VdbeMakeLabel(tls, _v)
- _113_j = i32(0)
+ _113_j = int32(0)
_288:
- if _113_j >= (_113_pFK.X5) {
+ if _113_j >= _113_pFK.XnCol {
goto _291
}
_124_iCol = func() int32 {
if _113_aiCols != nil {
- return (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_113_aiCols)) + 4*uintptr(_113_j))))
+ return (*elem8(_113_aiCols, uintptr(_113_j)))
}
- return ((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_113_pFK.X9))))) + 8*uintptr(_113_j))).X0)
+ return (elem116((*t117)(unsafe.Pointer(&_113_pFK.XaCol)), uintptr(_113_j)).XiFrom)
}()
- _sqlite3ExprCodeGetColumnOfTable(tls, _v, _113_pTab, i32(0), _124_iCol, _113_regRow+_113_j)
- _sqlite3VdbeAddOp2(tls, _v, i32(75), _113_regRow+_113_j, _113_addrOk)
+ _sqlite3ExprCodeGetColumnOfTable(tls, _v, _113_pTab, int32(0), _124_iCol, _113_regRow+_113_j)
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), _113_regRow+_113_j, _113_addrOk)
_113_j += 1
goto _288
_291:
if _113_pIdx != nil {
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _113_regRow, _113_pFK.X5, _113_regKey, _sqlite3IndexAffinityStr(tls, _db, _113_pIdx), _113_pFK.X5)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(30), _113_i, _113_addrOk, _113_regKey, i32(0))
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _113_regRow, _113_pFK.XnCol, _113_regKey, _sqlite3IndexAffinityStr(tls, _db, _113_pIdx), _113_pFK.XnCol)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(30), _113_i, _113_addrOk, _113_regKey, int32(0))
goto _296
}
if _113_pParent != nil {
- _126_jmp = _sqlite3VdbeCurrentAddr(tls, _v) + i32(2)
- _sqlite3VdbeAddOp3(tls, _v, i32(31), _113_i, _126_jmp, _113_regRow)
+ _126_jmp = _sqlite3VdbeCurrentAddr(tls, _v) + int32(2)
+ _sqlite3VdbeAddOp3(tls, _v, int32(31), _113_i, _126_jmp, _113_regRow)
_sqlite3VdbeGoto(tls, _v, _113_addrOk)
func() {
- if (_113_pFK.X5) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114581), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121066)))
+ if _113_pFK.XnCol != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114581), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121094)))
crt.X__builtin_abort(tls)
}
}()
}
_296:
- if ((_113_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
- _sqlite3VdbeAddOp2(tls, _v, i32(125), i32(0), _113_regResult+i32(1))
+ if (_113_pTab.XtabFlags & uint32(32)) == (0) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(125), int32(0), _113_regResult+int32(1))
goto _300
}
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _113_regResult+i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _113_regResult+int32(1))
_300:
- _sqlite3VdbeMultiLoad(tls, _v, _113_regResult+i32(2), str(121079), unsafe.Pointer(_113_pFK.X2), _113_i-i32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _113_regResult, i32(4))
+ _sqlite3VdbeMultiLoad(tls, _v, _113_regResult+int32(2), str(121107), unsafe.Pointer(_113_pFK.XzTo), _113_i-int32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _113_regResult, int32(4))
_sqlite3VdbeResolveLabel(tls, _v, _113_addrOk)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_113_aiCols))
- *func() **XFKey { _113_i += 1; return &_113_pFK }() = (*XFKey)(_113_pFK.X1)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_113_aiCols))
+ *func() **XFKey { _113_i += 1; return &_113_pFK }() = (*XFKey)(_113_pFK.XpNextFrom)
goto _281
_284:
- _sqlite3VdbeAddOp2(tls, _v, i32(7), i32(0), _113_addrTop+i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), int32(0), _113_addrTop+int32(1))
_sqlite3VdbeJumpHere(tls, _v, _113_addrTop)
goto _260
_261:
@@ -104106,8 +105254,8 @@ _46:
if _zRight == nil {
goto _301
}
- if _sqlite3GetBoolean(tls, _zRight, uint8(i32(0))) != 0 {
- _sqlite3ParserTrace(tls, (*crt.XFILE)(Xstdout), str(121082))
+ if _sqlite3GetBoolean(tls, _zRight, 0) != 0 {
+ _sqlite3ParserTrace(tls, (*crt.XFILE)(Xstdout), str(121110))
goto _303
}
_sqlite3ParserTrace(tls, nil, nil)
@@ -104116,220 +105264,220 @@ _301:
goto _64
_47:
if _zRight != nil {
- _sqlite3RegisterLikeFunctions(tls, _db, int32(_sqlite3GetBoolean(tls, _zRight, uint8(i32(0)))))
+ _sqlite3RegisterLikeFunctions(tls, _db, int32(_sqlite3GetBoolean(tls, _zRight, 0)))
}
goto _64
_48:
- _135_isQuick = bool2int(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zLeft)) + 1*uintptr(i32(0))))))))) == i32(113))
+ _135_isQuick = bool2int(int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(*elem1(_zLeft, 0))))) == int32(113))
func() {
- if _iDb < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114657), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(42040)))
+ if _iDb < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114657), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(41995)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iDb != i32(0) && (_pId2.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114658), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121091)))
+ if _iDb != int32(0) && _pId2.Xz == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114658), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121119)))
crt.X__builtin_abort(tls)
}
}()
- if (_pId2.X0) == nil {
- _iDb = i32(-1)
+ if _pId2.Xz == nil {
+ _iDb = int32(-1)
}
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(6)
- _135_mxErr = i32(100)
+ _pParse.XnMem = int32(6)
+ _135_mxErr = int32(100)
if _zRight == nil {
goto _311
}
_sqlite3GetInt32(tls, _zRight, &_135_mxErr)
- if _135_mxErr <= i32(0) {
- _135_mxErr = i32(100)
+ if _135_mxErr <= int32(0) {
+ _135_mxErr = int32(100)
}
_311:
- _sqlite3VdbeAddOp2(tls, _v, i32(56), _135_mxErr-i32(1), i32(1))
- _135_i = i32(0)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), _135_mxErr-int32(1), int32(1))
+ _135_i = int32(0)
_313:
- if _135_i >= (_db.X5) {
+ if _135_i >= _db.XnDb {
goto _316
}
- _138_cnt = i32(0)
- _138_mxIdx = i32(0)
+ _138_cnt = int32(0)
+ _138_mxIdx = int32(0)
goto _317
_317:
- if (_iDb >= i32(0)) && (_135_i != _iDb) {
+ if (_iDb >= int32(0)) && (_135_i != _iDb) {
goto _314
}
_sqlite3CodeVerifySchema(tls, _pParse, _135_i)
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _135_i, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114693), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121109)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114693), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121137)))
crt.X__builtin_abort(tls)
}
}()
- _138_pTbls = (*XHash)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_135_i))).X4).X2)))
- *func() **XHashElem { _138_cnt = i32(0); return &_138_x }() = (*XHashElem)(_138_pTbls.X2)
+ _138_pTbls = &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_135_i)).XpSchema).XtblHash)
+ *func() **XHashElem { _138_cnt = int32(0); return &_138_x }() = (*XHashElem)(_138_pTbls.Xfirst)
_322:
if _138_x == nil {
goto _325
}
- _139_pTab = (*XTable)(_138_x.X2)
- if ((_139_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
+ _139_pTab = (*XTable)(_138_x.Xdata)
+ if (_139_pTab.XtabFlags & uint32(32)) == (0) {
_138_cnt += 1
}
- *func() **XIndex { _138_nIdx = i32(0); return &_139_pIdx }() = (*XIndex)(_139_pTab.X2)
+ *func() **XIndex { _138_nIdx = int32(0); return &_139_pIdx }() = (*XIndex)(_139_pTab.XpIndex)
_327:
if _139_pIdx == nil {
goto _330
}
_138_cnt += 1
- *func() *int32 { _139_pIdx = (*XIndex)(_139_pIdx.X5); return &_138_nIdx }() += 1
+ *func() *int32 { _139_pIdx = (*XIndex)(_139_pIdx.XpNext); return &_138_nIdx }() += 1
goto _327
_330:
if _138_nIdx > _138_mxIdx {
_138_mxIdx = _138_nIdx
}
- _138_x = (*XHashElem)(_138_x.X0)
+ _138_x = (*XHashElem)(_138_x.Xnext)
goto _322
_325:
- _138_aRoot = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(4)*uint32(_138_cnt+i32(1)))))
+ _138_aRoot = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(4)*uint32(_138_cnt+int32(1)))))
if _138_aRoot == nil {
goto _316
}
- *func() **XHashElem { _138_cnt = i32(0); return &_138_x }() = (*XHashElem)(_138_pTbls.X2)
+ *func() **XHashElem { _138_cnt = int32(0); return &_138_x }() = (*XHashElem)(_138_pTbls.Xfirst)
_333:
if _138_x == nil {
goto _336
}
- _141_pTab = (*XTable)(_138_x.X2)
- if ((_141_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_138_aRoot)) + 4*uintptr(postInc1(&_138_cnt, int32(1))))) = _141_pTab.X7
+ _141_pTab = (*XTable)(_138_x.Xdata)
+ if (_141_pTab.XtabFlags & uint32(32)) == (0) {
+ *elem8(_138_aRoot, uintptr(postInc2(&_138_cnt, 1))) = _141_pTab.Xtnum
}
- _141_pIdx = (*XIndex)(_141_pTab.X2)
+ _141_pIdx = (*XIndex)(_141_pTab.XpIndex)
_338:
if _141_pIdx == nil {
goto _341
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_138_aRoot)) + 4*uintptr(postInc1(&_138_cnt, int32(1))))) = _141_pIdx.X11
- _141_pIdx = (*XIndex)(_141_pIdx.X5)
+ *elem8(_138_aRoot, uintptr(postInc2(&_138_cnt, 1))) = _141_pIdx.Xtnum
+ _141_pIdx = (*XIndex)(_141_pIdx.XpNext)
goto _338
_341:
- _138_x = (*XHashElem)(_138_x.X0)
+ _138_x = (*XHashElem)(_138_x.Xnext)
goto _333
_336:
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_138_aRoot)) + 4*uintptr(_138_cnt))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = func() int32 {
- if (_pParse.X18) > (i32(8) + _138_mxIdx) {
- return (_pParse.X18)
+ *elem8(_138_aRoot, uintptr(_138_cnt)) = int32(0)
+ _pParse.XnMem = func() int32 {
+ if _pParse.XnMem > (int32(8) + _138_mxIdx) {
+ return _pParse.XnMem
}
- return (i32(8) + _138_mxIdx)
+ return (int32(8) + _138_mxIdx)
}()
- _sqlite3VdbeAddOp4(tls, _v, i32(144), i32(2), _138_cnt, i32(1), (*int8)(unsafe.Pointer(_138_aRoot)), i32(-12))
+ _sqlite3VdbeAddOp4(tls, _v, int32(144), int32(2), _138_cnt, int32(1), (*int8)(unsafe.Pointer(_138_aRoot)), int32(-12))
_sqlite3VdbeChangeP5(tls, _v, uint16(uint8(_135_i)))
- _135_addr = _sqlite3VdbeAddOp1(tls, _v, i32(75), i32(2))
- _sqlite3VdbeAddOp4(tls, _v, i32(97), i32(0), i32(3), i32(0), _sqlite3MPrintf(tls, _db, str(121142), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_135_i))).X0)), i32(-1))
- _sqlite3VdbeAddOp3(tls, _v, i32(63), i32(2), i32(4), i32(1))
- _sqlite3VdbeAddOp3(tls, _v, i32(93), i32(4), i32(3), i32(2))
- _integrityCheckResultRow(tls, _v, i32(2))
+ _135_addr = _sqlite3VdbeAddOp1(tls, _v, int32(75), int32(2))
+ _sqlite3VdbeAddOp4(tls, _v, int32(97), int32(0), int32(3), int32(0), _sqlite3MPrintf(tls, _db, str(121170), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_135_i)).XzDbSName)), int32(-1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(63), int32(2), int32(4), int32(1))
+ _sqlite3VdbeAddOp3(tls, _v, int32(93), int32(4), int32(3), int32(2))
+ _integrityCheckResultRow(tls, _v, int32(2))
_sqlite3VdbeJumpHere(tls, _v, _135_addr)
- _138_x = (*XHashElem)(_138_pTbls.X2)
+ _138_x = (*XHashElem)(_138_pTbls.Xfirst)
_344:
if _138_x == nil {
goto _347
}
- _143_pTab = (*XTable)(_138_x.X2)
+ _143_pTab = (*XTable)(_138_x.Xdata)
_143_pPrior = nil
- _143_r1 = i32(-1)
- if (_143_pTab.X7) < i32(1) {
+ _143_r1 = int32(-1)
+ if _143_pTab.Xtnum < int32(1) {
goto _345
}
- if (((*XExprList)(_143_pTab.X6) == nil) && (((_143_pTab.X9) & uint32(i32(512))) == uint32(i32(0)))) && (((*XIndex)(_143_pTab.X2) == nil) || _135_isQuick != 0) {
+ if (((*XExprList)(_143_pTab.XpCheck) == nil) && ((_143_pTab.XtabFlags & uint32(512)) == (0))) && (((*XIndex)(_143_pTab.XpIndex) == nil) || _135_isQuick != 0) {
goto _345
}
_143_pPk = func() *XIndex {
- if ((_143_pTab.X9) & uint32(i32(32))) == uint32(i32(0)) {
+ if (_143_pTab.XtabFlags & uint32(32)) == (0) {
return nil
}
return _sqlite3PrimaryKeyIndex(tls, _143_pTab)
}()
_sqlite3ExprCacheClear(tls, _pParse)
- _sqlite3OpenTableAndIndices(tls, _pParse, _143_pTab, i32(106), uint8(i32(0)), i32(1), nil, &_143_iDataCur, &_143_iIdxCur)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), i32(7))
- *func() **XIndex { _135_j = i32(0); return &_143_pIdx }() = (*XIndex)(_143_pTab.X2)
+ _sqlite3OpenTableAndIndices(tls, _pParse, _143_pTab, int32(106), 0, int32(1), nil, &_143_iDataCur, &_143_iIdxCur)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), int32(7))
+ *func() **XIndex { _135_j = int32(0); return &_143_pIdx }() = (*XIndex)(_143_pTab.XpIndex)
_355:
if _143_pIdx == nil {
goto _358
}
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), i32(8)+_135_j)
- *func() *int32 { _143_pIdx = (*XIndex)(_143_pIdx.X5); return &_135_j }() += 1
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), int32(8)+_135_j)
+ *func() *int32 { _143_pIdx = (*XIndex)(_143_pIdx.XpNext); return &_135_j }() += 1
goto _355
_358:
func() {
- if (_pParse.X18) < (i32(8) + _135_j) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114754), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121166)))
+ if _pParse.XnMem < (int32(8) + _135_j) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114754), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121194)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3NoTempsInRange(tls, _pParse, i32(1), i32(7)+_135_j) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114755), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121184)))
+ if _sqlite3NoTempsInRange(tls, _pParse, int32(1), int32(7)+_135_j) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114755), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121212)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp2(tls, _v, i32(37), _143_iDataCur, i32(0))
- _143_loopTop = _sqlite3VdbeAddOp2(tls, _v, i32(73), i32(7), i32(1))
- _135_j = i32(0)
+ _sqlite3VdbeAddOp2(tls, _v, int32(37), _143_iDataCur, int32(0))
+ _143_loopTop = _sqlite3VdbeAddOp2(tls, _v, int32(73), int32(7), int32(1))
+ _135_j = int32(0)
_363:
- if _135_j >= int32(_143_pTab.X11) {
+ if _135_j >= int32(_143_pTab.XnCol) {
goto _366
}
- if _135_j == int32(_143_pTab.X10) {
+ if _135_j == int32(_143_pTab.XiPKey) {
goto _364
}
- if int32((*XColumn)(unsafe.Pointer(uintptr(_143_pTab.X1)+16*uintptr(_135_j))).X3) == i32(0) {
+ if int32(elem41((*XColumn)(_143_pTab.XaCol), uintptr(_135_j)).XnotNull) == int32(0) {
goto _364
}
- _sqlite3ExprCodeGetColumnOfTable(tls, _v, _143_pTab, _143_iDataCur, _135_j, i32(3))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(128)))
- _146_jmp2 = _sqlite3VdbeAddOp1(tls, _v, i32(76), i32(3))
- _146_zErr = _sqlite3MPrintf(tls, _db, str(121220), unsafe.Pointer(_143_pTab.X0), unsafe.Pointer((*XColumn)(unsafe.Pointer(uintptr(_143_pTab.X1)+16*uintptr(_135_j))).X0))
- _sqlite3VdbeAddOp4(tls, _v, i32(97), i32(0), i32(3), i32(0), _146_zErr, i32(-1))
- _integrityCheckResultRow(tls, _v, i32(3))
+ _sqlite3ExprCodeGetColumnOfTable(tls, _v, _143_pTab, _143_iDataCur, _135_j, int32(3))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(128))
+ _146_jmp2 = _sqlite3VdbeAddOp1(tls, _v, int32(76), int32(3))
+ _146_zErr = _sqlite3MPrintf(tls, _db, str(121248), unsafe.Pointer(_143_pTab.XzName), unsafe.Pointer(elem41((*XColumn)(_143_pTab.XaCol), uintptr(_135_j)).XzName))
+ _sqlite3VdbeAddOp4(tls, _v, int32(97), int32(0), int32(3), int32(0), _146_zErr, int32(-1))
+ _integrityCheckResultRow(tls, _v, int32(3))
_sqlite3VdbeJumpHere(tls, _v, _146_jmp2)
_364:
_135_j += 1
goto _363
_366:
- if (*XExprList)(_143_pTab.X6) == nil || ((_db.X6)&i32(8192)) != i32(0) {
+ if _143_pTab.XpCheck == nil || (_db.Xflags&int32(8192)) != int32(0) {
goto _370
}
- _147_pCheck = _sqlite3ExprListDup(tls, _db, (*XExprList)(_143_pTab.X6), i32(0))
- if int32(_db.X17) != i32(0) {
+ _147_pCheck = _sqlite3ExprListDup(tls, _db, (*XExprList)(_143_pTab.XpCheck), int32(0))
+ if int32(_db.XmallocFailed) != int32(0) {
goto _371
}
_148_addrCkFault = _sqlite3VdbeMakeLabel(tls, _v)
_148_addrCkOk = _sqlite3VdbeMakeLabel(tls, _v)
- *(*int32)(unsafe.Pointer(&(_pParse.X22))) = _143_iDataCur
+ _pParse.XiSelfTab = _143_iDataCur
_sqlite3ExprCachePush(tls, _pParse)
- _148_k = (_147_pCheck.X0) - i32(1)
+ _148_k = _147_pCheck.XnExpr - int32(1)
_372:
- if _148_k <= i32(0) {
+ if _148_k <= int32(0) {
goto _375
}
- _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_147_pCheck.X2)))))+20*uintptr(_148_k))).X0), _148_addrCkFault, i32(0))
+ _sqlite3ExprIfFalse(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_147_pCheck.Xa)), uintptr(_148_k)).XpExpr), _148_addrCkFault, int32(0))
_148_k -= 1
goto _372
_375:
- _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)((*TExprList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TExprList_item)(unsafe.Pointer(&(_147_pCheck.X2)))))+20*uintptr(i32(0)))).X0), _148_addrCkOk, i32(16))
+ _sqlite3ExprIfTrue(tls, _pParse, (*XExpr)(elem57((*TExprList_item)(unsafe.Pointer(&_147_pCheck.Xa)), 0).XpExpr), _148_addrCkOk, int32(16))
_sqlite3VdbeResolveLabel(tls, _v, _148_addrCkFault)
- _148_zErr = _sqlite3MPrintf(tls, _db, str(121240), unsafe.Pointer(_143_pTab.X0))
- _sqlite3VdbeAddOp4(tls, _v, i32(97), i32(0), i32(3), i32(0), _148_zErr, i32(-1))
- _integrityCheckResultRow(tls, _v, i32(3))
+ _148_zErr = _sqlite3MPrintf(tls, _db, str(121268), unsafe.Pointer(_143_pTab.XzName))
+ _sqlite3VdbeAddOp4(tls, _v, int32(97), int32(0), int32(3), int32(0), _148_zErr, int32(-1))
+ _integrityCheckResultRow(tls, _v, int32(3))
_sqlite3VdbeResolveLabel(tls, _v, _148_addrCkOk)
_sqlite3ExprCachePop(tls, _pParse)
_371:
_sqlite3ExprListDelete(tls, _db, _147_pCheck)
_370:
- *func() **XIndex { _135_j = i32(0); return &_143_pIdx }() = (*XIndex)(_143_pTab.X2)
+ *func() **XIndex { _135_j = int32(0); return &_143_pIdx }() = (*XIndex)(_143_pTab.XpIndex)
_376:
if _143_pIdx == nil || _135_isQuick != 0 {
goto _380
@@ -104338,63 +105486,63 @@ _376:
if _143_pPk == _143_pIdx {
goto _377
}
- _143_r1 = _sqlite3GenerateIndexKey(tls, _pParse, _143_pIdx, _143_iDataCur, i32(0), i32(0), &_150_jmp3, _143_pPrior, _143_r1)
+ _143_r1 = _sqlite3GenerateIndexKey(tls, _pParse, _143_pIdx, _143_iDataCur, int32(0), int32(0), &_150_jmp3, _143_pPrior, _143_r1)
_143_pPrior = _143_pIdx
- _sqlite3VdbeAddOp2(tls, _v, i32(73), i32(8)+_135_j, i32(1))
- _150_jmp2 = _sqlite3VdbeAddOp4Int(tls, _v, i32(30), _143_iIdxCur+_135_j, _150_ckUniq, _143_r1, int32(_143_pIdx.X14))
- _sqlite3VdbeLoadString(tls, _v, i32(3), str(121270))
- _sqlite3VdbeAddOp3(tls, _v, i32(93), i32(7), i32(3), i32(3))
- _sqlite3VdbeLoadString(tls, _v, i32(4), str(121275))
- _sqlite3VdbeAddOp3(tls, _v, i32(93), i32(4), i32(3), i32(3))
- _150_jmp5 = _sqlite3VdbeLoadString(tls, _v, i32(4), _143_pIdx.X0)
- _sqlite3VdbeAddOp3(tls, _v, i32(93), i32(4), i32(3), i32(3))
- _150_jmp4 = _integrityCheckResultRow(tls, _v, i32(3))
+ _sqlite3VdbeAddOp2(tls, _v, int32(73), int32(8)+_135_j, int32(1))
+ _150_jmp2 = _sqlite3VdbeAddOp4Int(tls, _v, int32(30), _143_iIdxCur+_135_j, _150_ckUniq, _143_r1, int32(_143_pIdx.XnColumn))
+ _sqlite3VdbeLoadString(tls, _v, int32(3), str(121298))
+ _sqlite3VdbeAddOp3(tls, _v, int32(93), int32(7), int32(3), int32(3))
+ _sqlite3VdbeLoadString(tls, _v, int32(4), str(121303))
+ _sqlite3VdbeAddOp3(tls, _v, int32(93), int32(4), int32(3), int32(3))
+ _150_jmp5 = _sqlite3VdbeLoadString(tls, _v, int32(4), _143_pIdx.XzName)
+ _sqlite3VdbeAddOp3(tls, _v, int32(93), int32(4), int32(3), int32(3))
+ _150_jmp4 = _integrityCheckResultRow(tls, _v, int32(3))
_sqlite3VdbeJumpHere(tls, _v, _150_jmp2)
- if int32(_143_pIdx.X15) == i32(0) {
+ if int32(_143_pIdx.XonError) == int32(0) {
goto _382
}
_151_uniqOk = _sqlite3VdbeMakeLabel(tls, _v)
- _151_kk = i32(0)
+ _151_kk = int32(0)
_383:
- if _151_kk >= int32(_143_pIdx.X13) {
+ if _151_kk >= int32(_143_pIdx.XnKeyCol) {
goto _386
}
- _152_iCol = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_143_pIdx.X1)) + 2*uintptr(_151_kk))))
+ _152_iCol = int32(*elem50(_143_pIdx.XaiColumn, uintptr(_151_kk)))
func() {
- if _152_iCol == i32(-1) || _152_iCol >= int32(_143_pTab.X11) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114827), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121296)))
+ if _152_iCol == int32(-1) || _152_iCol >= int32(_143_pTab.XnCol) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114827), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121324)))
crt.X__builtin_abort(tls)
}
}()
- if (_152_iCol >= i32(0)) && (((*XColumn)(unsafe.Pointer(uintptr(_143_pTab.X1) + 16*uintptr(_152_iCol))).X3) != 0) {
+ if (_152_iCol >= int32(0)) && ((elem41((*XColumn)(_143_pTab.XaCol), uintptr(_152_iCol)).XnotNull) != 0) {
goto _384
}
- _sqlite3VdbeAddOp2(tls, _v, i32(75), _143_r1+_151_kk, _151_uniqOk)
+ _sqlite3VdbeAddOp2(tls, _v, int32(75), _143_r1+_151_kk, _151_uniqOk)
_384:
_151_kk += 1
goto _383
_386:
- _151_jmp6 = _sqlite3VdbeAddOp1(tls, _v, i32(7), _143_iIdxCur+_135_j)
+ _151_jmp6 = _sqlite3VdbeAddOp1(tls, _v, int32(7), _143_iIdxCur+_135_j)
_sqlite3VdbeGoto(tls, _v, _151_uniqOk)
_sqlite3VdbeJumpHere(tls, _v, _151_jmp6)
- _sqlite3VdbeAddOp4Int(tls, _v, i32(39), _143_iIdxCur+_135_j, _151_uniqOk, _143_r1, int32(_143_pIdx.X13))
- _sqlite3VdbeLoadString(tls, _v, i32(3), str(121330))
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(39), _143_iIdxCur+_135_j, _151_uniqOk, _143_r1, int32(_143_pIdx.XnKeyCol))
+ _sqlite3VdbeLoadString(tls, _v, int32(3), str(121358))
_sqlite3VdbeGoto(tls, _v, _150_jmp5)
_sqlite3VdbeResolveLabel(tls, _v, _151_uniqOk)
_382:
_sqlite3VdbeJumpHere(tls, _v, _150_jmp4)
_sqlite3ResolvePartIdxLabel(tls, _pParse, _150_jmp3)
_377:
- *func() *int32 { _143_pIdx = (*XIndex)(_143_pIdx.X5); return &_135_j }() += 1
+ *func() *int32 { _143_pIdx = (*XIndex)(_143_pIdx.XpNext); return &_135_j }() += 1
goto _376
_380:
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _143_iDataCur, _143_loopTop)
- _sqlite3VdbeJumpHere(tls, _v, _143_loopTop-i32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _143_iDataCur, _143_loopTop)
+ _sqlite3VdbeJumpHere(tls, _v, _143_loopTop-int32(1))
if _135_isQuick != 0 {
goto _392
}
- _sqlite3VdbeLoadString(tls, _v, i32(2), str(121357))
- *func() **XIndex { _135_j = i32(0); return &_143_pIdx }() = (*XIndex)(_143_pTab.X2)
+ _sqlite3VdbeLoadString(tls, _v, int32(2), str(121385))
+ *func() **XIndex { _135_j = int32(0); return &_143_pIdx }() = (*XIndex)(_143_pTab.XpIndex)
_393:
if _143_pIdx == nil {
goto _396
@@ -104402,31 +105550,31 @@ _393:
if _143_pPk == _143_pIdx {
goto _394
}
- _sqlite3VdbeAddOp2(tls, _v, i32(102), _143_iIdxCur+_135_j, i32(3))
- _135_addr = _sqlite3VdbeAddOp3(tls, _v, i32(78), i32(8)+_135_j, i32(0), i32(3))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(144)))
- _sqlite3VdbeLoadString(tls, _v, i32(3), _143_pIdx.X0)
- _sqlite3VdbeAddOp3(tls, _v, i32(93), i32(3), i32(2), i32(7))
- _integrityCheckResultRow(tls, _v, i32(7))
+ _sqlite3VdbeAddOp2(tls, _v, int32(102), _143_iIdxCur+_135_j, int32(3))
+ _135_addr = _sqlite3VdbeAddOp3(tls, _v, int32(78), int32(8)+_135_j, int32(0), int32(3))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(144))
+ _sqlite3VdbeLoadString(tls, _v, int32(3), _143_pIdx.XzName)
+ _sqlite3VdbeAddOp3(tls, _v, int32(93), int32(3), int32(2), int32(7))
+ _integrityCheckResultRow(tls, _v, int32(7))
_sqlite3VdbeJumpHere(tls, _v, _135_addr)
_394:
- *func() *int32 { _143_pIdx = (*XIndex)(_143_pIdx.X5); return &_135_j }() += 1
+ *func() *int32 { _143_pIdx = (*XIndex)(_143_pIdx.XpNext); return &_135_j }() += 1
goto _393
_396:
_392:
_345:
- _138_x = (*XHashElem)(_138_x.X0)
+ _138_x = (*XHashElem)(_138_x.Xnext)
goto _344
_347:
_314:
_135_i += 1
goto _313
_316:
- _155_aOp = _sqlite3VdbeAddOpList(tls, _v, i32(4), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00endCodeØ006)), _sqlite3PragmaØ00iLnØ005)
+ _155_aOp = _sqlite3VdbeAddOpList(tls, _v, int32(4), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00endCodeØ006)), _sqlite3PragmaØ00iLnØ005)
if _155_aOp != nil {
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_155_aOp)) + 24*uintptr(i32(0)))).X4))) = i32(1) - _135_mxErr
- *(*int8)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_155_aOp)) + 24*uintptr(i32(2)))).X1))) = int8(i32(-2))
- *(**int8)(unsafe.Pointer((*t39)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_155_aOp)) + 24*uintptr(i32(2)))).X6))))) = str(121386)
+ elem61(_155_aOp, 0).Xp2 = int32(1) - _135_mxErr
+ elem61(_155_aOp, uintptr(2)).Xp4type = int8(-2)
+ *(**int8)(unsafe.Pointer(&(elem61(_155_aOp, uintptr(2)).Xp4))) = str(121414)
}
goto _64
_49:
@@ -104437,152 +105585,153 @@ _49:
goto _pragma_out
}
func() {
- if int32((*TEncName)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3PragmaØ00encnamesØ007))+8*uintptr(i32(1)))).X1) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114925), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121389)))
+ if int32(elem125((*TEncName)(unsafe.Pointer(&_sqlite3PragmaØ00encnamesØ007)), uintptr(1)).Xenc) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114925), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121417)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*TEncName)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3PragmaØ00encnamesØ007))+8*uintptr(i32(2)))).X1) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114926), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121428)))
+ if int32(elem125((*TEncName)(unsafe.Pointer(&_sqlite3PragmaØ00encnamesØ007)), uintptr(2)).Xenc) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114926), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121456)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32((*TEncName)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3PragmaØ00encnamesØ007))+8*uintptr(i32(3)))).X1) != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(114927), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121473)))
+ if int32(elem125((*TEncName)(unsafe.Pointer(&_sqlite3PragmaØ00encnamesØ007)), uintptr(3)).Xenc) != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(114927), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121501)))
crt.X__builtin_abort(tls)
}
}()
- _returnSingleText(tls, _v, (*TEncName)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3PragmaØ00encnamesØ007))+8*uintptr((*Xsqlite3)(_pParse.X0).X14))).X0)
+ _returnSingleText(tls, _v, elem125((*TEncName)(unsafe.Pointer(&_sqlite3PragmaØ00encnamesØ007)), uintptr((*Xsqlite3)(_pParse.Xdb).Xenc)).XzName)
goto _407
_399:
- if (int32((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X4).X9)&i32(1)) == i32(1) && (int32((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X4).X9)&i32(4)) != i32(4) {
+ if (int32((*XSchema)(elem27((*XDb)(_db.XaDb), 0).XpSchema).XschemaFlags)&int32(1)) == int32(1) && (int32((*XSchema)(elem27((*XDb)(_db.XaDb), 0).XpSchema).XschemaFlags)&int32(4)) != int32(4) {
goto _409
}
- _157_pEnc = (*TEncName)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3PragmaØ00encnamesØ007)) + 8*uintptr(i32(0))))
+ _157_pEnc = elem125((*TEncName)(unsafe.Pointer(&_sqlite3PragmaØ00encnamesØ007)), 0)
_410:
- if (_157_pEnc.X0) == nil {
+ if _157_pEnc.XzName == nil {
goto _413
}
- if i32(0) == _sqlite3StrICmp(tls, _zRight, _157_pEnc.X0) {
- *(*uint8)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X4).X8))) = store2((*uint8)(unsafe.Pointer(&(_db.X14))), uint8(func() int32 {
- if (_157_pEnc.X1) != 0 {
- return int32(_157_pEnc.X1)
+ if int32(0) == _sqlite3StrICmp(tls, _zRight, _157_pEnc.XzName) {
+ (*XSchema)(elem27((*XDb)(_db.XaDb), 0).XpSchema).Xenc = store3(&_db.Xenc, uint8(func() int32 {
+ if _157_pEnc.Xenc != 0 {
+ return int32(_157_pEnc.Xenc)
}
- return i32(2)
+ return int32(2)
}()))
goto _413
}
*(*uintptr)(unsafe.Pointer(&_157_pEnc)) += uintptr(8)
goto _410
_413:
- if (_157_pEnc.X0) == nil {
- _sqlite3ErrorMsg(tls, _pParse, str(121518), unsafe.Pointer(_zRight))
+ if _157_pEnc.XzName == nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(121546), unsafe.Pointer(_zRight))
}
_409:
_407:
goto _64
_50:
- _164_iCookie = int32(_pPragma.X5)
+ _164_iCookie = int32(_pPragma.XiArg)
_sqlite3VdbeUsesBtree(tls, _v, _iDb)
- if _zRight == nil || (int32(_pPragma.X2)&i32(8)) != i32(0) {
+ if _zRight == nil || (int32(_pPragma.XmPragFlg)&int32(8)) != int32(0) {
goto _419
}
- _sqlite3VdbeVerifyNoMallocRequired(tls, _v, i32(2))
- _165_aOp = _sqlite3VdbeAddOpList(tls, _v, i32(2), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00setCookieØ008)), i32(0))
+ _sqlite3VdbeVerifyNoMallocRequired(tls, _v, int32(2))
+ _165_aOp = _sqlite3VdbeAddOpList(tls, _v, int32(2), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00setCookieØ008)), int32(0))
if func() int32 {
if _165_aOp == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115000), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115000), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _64
}
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_165_aOp)) + 24*uintptr(i32(0)))).X3))) = _iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_165_aOp)) + 24*uintptr(i32(1)))).X3))) = _iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_165_aOp)) + 24*uintptr(i32(1)))).X4))) = _164_iCookie
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_165_aOp)) + 24*uintptr(i32(1)))).X5))) = _sqlite3Atoi(tls, _zRight)
+ elem61(_165_aOp, 0).Xp1 = _iDb
+ elem61(_165_aOp, uintptr(1)).Xp1 = _iDb
+ elem61(_165_aOp, uintptr(1)).Xp2 = _164_iCookie
+ elem61(_165_aOp, uintptr(1)).Xp3 = _sqlite3Atoi(tls, _zRight)
goto _423
_419:
- _sqlite3VdbeVerifyNoMallocRequired(tls, _v, i32(3))
- _166_aOp = _sqlite3VdbeAddOpList(tls, _v, i32(3), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00readCookieØ009)), i32(0))
+ _sqlite3VdbeVerifyNoMallocRequired(tls, _v, int32(3))
+ _166_aOp = _sqlite3VdbeAddOpList(tls, _v, int32(3), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3PragmaØ00readCookieØ009)), int32(0))
if func() int32 {
if _166_aOp == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115015), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115015), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _64
}
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_166_aOp)) + 24*uintptr(i32(0)))).X3))) = _iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_166_aOp)) + 24*uintptr(i32(1)))).X3))) = _iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_166_aOp)) + 24*uintptr(i32(1)))).X5))) = _164_iCookie
+ elem61(_166_aOp, 0).Xp1 = _iDb
+ elem61(_166_aOp, uintptr(1)).Xp1 = _iDb
+ elem61(_166_aOp, uintptr(1)).Xp3 = _164_iCookie
_sqlite3VdbeReusable(tls, _v)
_423:
goto _64
_51:
- _167_i = i32(0)
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(1)
+ _167_i = int32(0)
+ _pParse.XnMem = int32(1)
_427:
- if store0(&_167_zOpt, Xsqlite3_compileoption_get(tls, postInc1(&_167_i, int32(1)))) != nil {
- _sqlite3VdbeLoadString(tls, _v, i32(1), _167_zOpt)
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(1))
+ if store1(&_167_zOpt, Xsqlite3_compileoption_get(tls, postInc2(&_167_i, 1))) != nil {
+ _sqlite3VdbeLoadString(tls, _v, int32(1), _167_zOpt)
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(1))
goto _427
}
_sqlite3VdbeReusable(tls, _v)
goto _64
_52:
_169_iBt = func() int32 {
- if (_pId2.X0) != nil {
+ if _pId2.Xz != nil {
return _iDb
}
- return i32(10)
+ return int32(10)
}()
- _169_eMode = i32(0)
+ _169_eMode = int32(0)
if _zRight == nil {
goto _431
}
- if _sqlite3StrICmp(tls, _zRight, str(121543)) == i32(0) {
- _169_eMode = i32(1)
+ if _sqlite3StrICmp(tls, _zRight, str(121571)) == int32(0) {
+ _169_eMode = int32(1)
goto _436
}
- if _sqlite3StrICmp(tls, _zRight, str(121548)) == i32(0) {
- _169_eMode = i32(2)
+ if _sqlite3StrICmp(tls, _zRight, str(121576)) == int32(0) {
+ _169_eMode = int32(2)
goto _436
}
- if _sqlite3StrICmp(tls, _zRight, str(91181)) == i32(0) {
- _169_eMode = i32(3)
+ if _sqlite3StrICmp(tls, _zRight, str(89703)) == int32(0) {
+ _169_eMode = int32(3)
}
_436:
_431:
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(3)
- _sqlite3VdbeAddOp3(tls, _v, i32(8), _169_iBt, _169_eMode, i32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(3))
+ _pParse.XnMem = int32(3)
+ _sqlite3VdbeAddOp3(tls, _v, int32(8), _169_iBt, _169_eMode, int32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(3))
goto _64
_53:
if _zRight != nil {
Xsqlite3_wal_autocheckpoint(tls, _db, _sqlite3Atoi(tls, _zRight))
}
_returnSingleInt(tls, _v, int64(func() int32 {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32
- }{(*(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32
- }{(_db.X51)})))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{func() func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32 {
+ v := _db.XxWalCallback
+ return *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32
}{_sqlite3WalDefaultHook})) {
- return int32(uintptr(_db.X52))
+ return int32(crt.P2U(_db.XpWalArg))
}
- return i32(0)
+ return int32(0)
}()))
goto _64
_54:
@@ -104593,171 +105742,177 @@ _55:
goto _440
}
_177_opMask = uint32(_sqlite3Atoi(tls, _zRight))
- if (_177_opMask & uint32(i32(2))) == uint32(i32(0)) {
+ if (_177_opMask & uint32(2)) == (0) {
goto _64
}
goto _442
_440:
- _177_opMask = uint32(i32(65534))
+ _177_opMask = uint32(65534)
_442:
- _177_iTabCur = postInc1((*int32)(unsafe.Pointer(&(_pParse.X17))), int32(1))
+ _177_iTabCur = postInc2(&_pParse.XnTab, 1)
_177_iDbLast = func() int32 {
if _zDb != nil {
return _iDb
}
- return ((_db.X5) - i32(1))
+ return (_db.XnDb - int32(1))
}()
_445:
if _iDb > _177_iDbLast {
goto _448
}
- if _iDb == i32(1) {
+ if _iDb == int32(1) {
goto _446
}
_sqlite3CodeVerifySchema(tls, _pParse, _iDb)
- _177_pSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4)
- _177_k = (*XHashElem)((*XHash)(unsafe.Pointer(&(_177_pSchema.X2))).X2)
+ _177_pSchema = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema)
+ _177_k = (*XHashElem)(_177_pSchema.XtblHash.Xfirst)
_450:
if _177_k == nil {
goto _453
}
- _177_pTab = (*XTable)(_177_k.X2)
- if ((_177_pTab.X9) & uint32(i32(256))) == uint32(i32(0)) {
+ _177_pTab = (*XTable)(_177_k.Xdata)
+ if (_177_pTab.XtabFlags & uint32(256)) == (0) {
goto _451
}
- _177_szThreshold = int16(int32(_177_pTab.X12) + i32(46))
+ _177_szThreshold = int16(int32(_177_pTab.XnRowLogEst) + int32(46))
func() {
- if int32(_sqlite3LogEst(tls, uint64(i32(25)))) != i32(46) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115184), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121556)))
+ if int32(_sqlite3LogEst(tls, uint64(25))) != int32(46) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115184), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121584)))
crt.X__builtin_abort(tls)
}
}()
- _177_pIdx = (*XIndex)(_177_pTab.X2)
+ _177_pIdx = (*XIndex)(_177_pTab.XpIndex)
_457:
if _177_pIdx == nil {
goto _460
}
- if ((uint32((_177_pIdx.X16)>>uint(i32(7))) << uint(i32(31))) >> uint(i32(31))) == 0 {
- _177_szThreshold = int16(i32(0))
+ if ((uint32(_177_pIdx.XidxType>>7) << 31) >> 31) == 0 {
+ _177_szThreshold = 0
goto _460
}
- _177_pIdx = (*XIndex)(_177_pIdx.X5)
+ _177_pIdx = (*XIndex)(_177_pIdx.XpNext)
goto _457
_460:
if _177_szThreshold != 0 {
- _sqlite3OpenTable(tls, _pParse, _177_iTabCur, _iDb, _177_pTab, i32(106))
- _sqlite3VdbeAddOp3(tls, _v, i32(34), _177_iTabCur, int32(uint32(_sqlite3VdbeCurrentAddr(tls, _v)+i32(2))+(_177_opMask&uint32(i32(1)))), int32(_177_szThreshold))
+ _sqlite3OpenTable(tls, _pParse, _177_iTabCur, _iDb, _177_pTab, int32(106))
+ _sqlite3VdbeAddOp3(tls, _v, int32(34), _177_iTabCur, int32(uint32(_sqlite3VdbeCurrentAddr(tls, _v)+int32(2))+(_177_opMask&uint32(1))), int32(_177_szThreshold))
}
- _177_zSubSql = _sqlite3MPrintf(tls, _db, str(121578), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0), unsafe.Pointer(_177_pTab.X0))
- if (_177_opMask & uint32(i32(1))) != 0 {
+ _177_zSubSql = _sqlite3MPrintf(tls, _db, str(121606), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName), unsafe.Pointer(_177_pTab.XzName))
+ if (_177_opMask & uint32(1)) != 0 {
_185_r1 = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp4(tls, _v, i32(97), i32(0), _185_r1, i32(0), _177_zSubSql, i32(-1))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _185_r1, i32(1))
+ _sqlite3VdbeAddOp4(tls, _v, int32(97), int32(0), _185_r1, int32(0), _177_zSubSql, int32(-1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _185_r1, int32(1))
goto _464
}
- _sqlite3VdbeAddOp4(tls, _v, i32(138), i32(0), i32(0), i32(0), _177_zSubSql, i32(-1))
+ _sqlite3VdbeAddOp4(tls, _v, int32(138), int32(0), int32(0), int32(0), _177_zSubSql, int32(-1))
_464:
_451:
- _177_k = (*XHashElem)(_177_k.X0)
+ _177_k = (*XHashElem)(_177_k.Xnext)
goto _450
_453:
_446:
_iDb += 1
goto _445
_448:
- _sqlite3VdbeAddOp0(tls, _v, i32(153))
+ _sqlite3VdbeAddOp0(tls, _v, int32(153))
goto _64
_56:
func() {
- if int32(_pPragma.X1) != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(115222), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000))), unsafe.Pointer(str(121596)))
+ if int32(_pPragma.XePragTyp) != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(115222), unsafe.Pointer(&_sqlite3PragmaØ00__func__Ø000), unsafe.Pointer(str(121624)))
crt.X__builtin_abort(tls)
}
}()
if _zRight != nil {
Xsqlite3_busy_timeout(tls, _db, _sqlite3Atoi(tls, _zRight))
}
- _returnSingleInt(tls, _v, int64(_db.X74))
+ _returnSingleInt(tls, _v, int64(_db.XbusyTimeout))
goto _64
_57:
- if (_zRight != nil) && (_sqlite3DecOrHexToI64(tls, _zRight, &_189_N) == i32(0)) {
+ if (_zRight != nil) && (_sqlite3DecOrHexToI64(tls, _zRight, &_189_N) == int32(0)) {
Xsqlite3_soft_heap_limit64(tls, _189_N)
}
- _returnSingleInt(tls, _v, Xsqlite3_soft_heap_limit64(tls, int64(i32(-1))))
+ _returnSingleInt(tls, _v, Xsqlite3_soft_heap_limit64(tls, int64(-1)))
goto _64
_58:
- if ((_zRight != nil) && (_sqlite3DecOrHexToI64(tls, _zRight, &_191_N) == i32(0))) && (_191_N >= int64(i32(0))) {
- Xsqlite3_limit(tls, _db, i32(11), int32(_191_N&int64(i32(2147483647))))
+ if ((_zRight != nil) && (_sqlite3DecOrHexToI64(tls, _zRight, &_191_N) == int32(0))) && (_191_N >= (0)) {
+ Xsqlite3_limit(tls, _db, int32(11), int32(_191_N&int64(2147483647)))
}
- _returnSingleInt(tls, _v, int64(Xsqlite3_limit(tls, _db, i32(11), i32(-1))))
+ _returnSingleInt(tls, _v, int64(Xsqlite3_limit(tls, _db, int32(11), int32(-1))))
goto _64
_59:
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(2)
- _193_i = i32(0)
+ _pParse.XnMem = int32(2)
+ _193_i = int32(0)
_473:
- if _193_i >= (_db.X5) {
+ if _193_i >= _db.XnDb {
goto _476
}
- _194_zState = str(121636)
- if ((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_193_i))).X0) == nil {
+ _194_zState = str(121664)
+ if (elem27((*XDb)(_db.XaDb), uintptr(_193_i)).XzDbSName) == nil {
goto _474
}
- _194_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_193_i))).X1)
+ _194_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_193_i)).XpBt)
if (_194_pBt == nil) || (_sqlite3BtreePager(tls, _194_pBt) == nil) {
- _194_zState = str(121644)
+ _194_zState = str(121672)
goto _483
}
if Xsqlite3_file_control(tls, _db, func() *int8 {
if _193_i != 0 {
- return ((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_193_i))).X0)
+ return (elem27((*XDb)(_db.XaDb), uintptr(_193_i)).XzDbSName)
}
return nil
- }(), i32(1), (unsafe.Pointer)(&_194_j)) == i32(0) {
- _194_zState = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3PragmaØ00azLockNameØ0010)) + 4*uintptr(_194_j)))
+ }(), int32(1), unsafe.Pointer(&_194_j)) == int32(0) {
+ _194_zState = *elem0((**int8)(unsafe.Pointer(&_sqlite3PragmaØ00azLockNameØ0010)), uintptr(_194_j))
}
_483:
- _sqlite3VdbeMultiLoad(tls, _v, i32(1), str(121651), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_193_i))).X0), unsafe.Pointer(_194_zState))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(2))
+ _sqlite3VdbeMultiLoad(tls, _v, int32(1), str(121679), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_193_i)).XzDbSName), unsafe.Pointer(_194_zState))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(2))
_474:
_193_i += 1
goto _473
_476:
goto _64
_64:
- if (int32(_pPragma.X2)&i32(4)) != 0 && (_zRight != nil) {
+ if (int32(_pPragma.XmPragFlg)&int32(4)) != 0 && (_zRight != nil) {
_sqlite3VdbeVerifyNoResultRow(tls, _v)
}
_pragma_out:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zLeft))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zRight))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zLeft))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zRight))
_ = _aFcntl
_ = _103_azOrigin
_ = _106_i
_ = _167_i
}
-// Mark the VDBE as one that can only be run one time.
+// C comment
+// /*
+// ** Mark the VDBE as one that can only be run one time.
+// */
func _sqlite3VdbeRunOnlyOnce(tls *crt.TLS, _p *TVdbe) {
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 32, 5)
+ storebits26(&_p.Xexpired, int16(1), 32, 5)
}
var _sqlite3PragmaØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PragmaØ00__func__Ø000[0], str(121654), 14)
+ crt.Xstrncpy(nil, &_sqlite3PragmaØ00__func__Ø000[0], str(121682), 14)
}
-// Invoke the xFileControl method on a particular database.
+// C comment
+// /*
+// ** Invoke the xFileControl method on a particular database.
+// */
func Xsqlite3_file_control(tls *crt.TLS, _db *Xsqlite3, _zDbName *int8, _op int32, _pArg unsafe.Pointer) (r0 int32) {
var _rc int32
var _pBtree *XBtree
var _1_pPager *XPager
var _1_fd *Xsqlite3_file
- _rc = i32(1)
+ _rc = int32(1)
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(143986))
+ return _sqlite3MisuseError(tls, int32(143986))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
_pBtree = _sqlite3DbNameToBtree(tls, _db, _zDbName)
if _pBtree == nil {
goto _1
@@ -104766,112 +105921,126 @@ func Xsqlite3_file_control(tls *crt.TLS, _db *Xsqlite3, _zDbName *int8, _op int3
_1_pPager = _sqlite3BtreePager(tls, _pBtree)
func() {
if _1_pPager == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143995), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_file_controlØ00__func__Ø000))), unsafe.Pointer(str(15864)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143995), unsafe.Pointer(&_sqlite3_file_controlØ00__func__Ø000), unsafe.Pointer(str(15819)))
crt.X__builtin_abort(tls)
}
}()
_1_fd = _sqlite3PagerFile(tls, _1_pPager)
func() {
if _1_fd == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143997), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_file_controlØ00__func__Ø000))), unsafe.Pointer(str(121668)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143997), unsafe.Pointer(&_sqlite3_file_controlØ00__func__Ø000), unsafe.Pointer(str(121696)))
crt.X__builtin_abort(tls)
}
}()
- if _op == i32(7) {
+ if _op == int32(7) {
*(**Xsqlite3_file)(_pArg) = _1_fd
- _rc = i32(0)
+ _rc = int32(0)
goto _13
}
- if _op == i32(27) {
+ if _op == int32(27) {
*(**Xsqlite3_vfs)(_pArg) = _sqlite3PagerVfs(tls, _1_pPager)
- _rc = i32(0)
+ _rc = int32(0)
goto _13
}
- if _op == i32(28) {
+ if _op == int32(28) {
*(**Xsqlite3_file)(_pArg) = _sqlite3PagerJrnlFile(tls, _1_pPager)
- _rc = i32(0)
+ _rc = int32(0)
goto _13
}
- if (*Xsqlite3_io_methods)(_1_fd.X0) != nil {
+ if _1_fd.XpMethods != nil {
_rc = _sqlite3OsFileControl(tls, _1_fd, _op, _pArg)
goto _13
}
- _rc = i32(12)
+ _rc = int32(12)
_13:
_sqlite3BtreeLeave(tls, _pBtree)
_1:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
-// Return the Btree pointer identified by zDbName. Return NULL if not found.
+// C comment
+// /*
+// ** Return the Btree pointer identified by zDbName. Return NULL if not found.
+// */
func _sqlite3DbNameToBtree(tls *crt.TLS, _db *Xsqlite3, _zDbName *int8) (r0 *XBtree) {
var _iDb int32
_iDb = func() int32 {
if _zDbName != nil {
return _sqlite3FindDbName(tls, _db, _zDbName)
}
- return i32(0)
+ return int32(0)
}()
return func() *XBtree {
- if _iDb < i32(0) {
+ if _iDb < int32(0) {
return nil
}
- return (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X1)
+ return (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpBt)
}()
}
var _sqlite3_file_controlØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_file_controlØ00__func__Ø000[0], str(121674), 21)
+ crt.Xstrncpy(nil, &_sqlite3_file_controlØ00__func__Ø000[0], str(121702), 21)
}
-// Return the file handle for the journal file (if it exists).
-// This will be either the rollback journal or the WAL file.
+// C comment
+// /*
+// ** Return the file handle for the journal file (if it exists).
+// ** This will be either the rollback journal or the WAL file.
+// */
func _sqlite3PagerJrnlFile(tls *crt.TLS, _pPager *XPager) (r0 *Xsqlite3_file) {
return func() *Xsqlite3_file {
- if (*XWal)(_pPager.X60) != nil {
- return _sqlite3WalFile(tls, (*XWal)(_pPager.X60))
+ if _pPager.XpWal != nil {
+ return _sqlite3WalFile(tls, (*XWal)(_pPager.XpWal))
}
- return (*Xsqlite3_file)(_pPager.X32)
+ return (*Xsqlite3_file)(_pPager.Xjfd)
}()
}
-// Return the sqlite3_file object for the WAL file
+// C comment
+// /* Return the sqlite3_file object for the WAL file
+// */
func _sqlite3WalFile(tls *crt.TLS, _pWal *XWal) (r0 *Xsqlite3_file) {
- return (*Xsqlite3_file)(_pWal.X2)
+ return (*Xsqlite3_file)(_pWal.XpWalFd)
}
-// Generate code to return a single text value.
+// C comment
+// /*
+// ** Generate code to return a single text value.
+// */
func _returnSingleText(tls *crt.TLS, _v *TVdbe, _zValue *int8) {
if _zValue != nil {
- _sqlite3VdbeLoadString(tls, _v, i32(1), _zValue)
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(1))
+ _sqlite3VdbeLoadString(tls, _v, int32(1), _zValue)
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(1))
}
}
-// Set result column names for a pragma.
+// C comment
+// /*
+// ** Set result column names for a pragma.
+// */
func _setPragmaResultColumnNames(tls *crt.TLS, _v *TVdbe, _pPragma *XPragmaName) {
var _2_i, _2_j int32
var _n uint8
- _n = _pPragma.X4
+ _n = _pPragma.XnPragCName
_sqlite3VdbeSetNumCols(tls, _v, func() int32 {
- if int32(_n) == i32(0) {
- return i32(1)
+ if int32(_n) == int32(0) {
+ return int32(1)
}
return int32(_n)
}())
- if int32(_n) == i32(0) {
- _sqlite3VdbeSetColName(tls, _v, i32(0), i32(0), _pPragma.X0, nil)
+ if int32(_n) == int32(0) {
+ _sqlite3VdbeSetColName(tls, _v, int32(0), int32(0), _pPragma.XzName, nil)
goto _3
}
- *func() *int32 { _2_i = i32(0); return &_2_j }() = int32(_pPragma.X3)
+ *func() *int32 { _2_i = int32(0); return &_2_j }() = int32(_pPragma.XiPragCName)
_4:
if _2_i >= int32(_n) {
goto _7
}
- _sqlite3VdbeSetColName(tls, _v, _2_i, i32(0), *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_pragCName)) + 4*uintptr(_2_j))), nil)
+ _sqlite3VdbeSetColName(tls, _v, _2_i, int32(0), *elem0((**int8)(unsafe.Pointer(&_pragCName)), uintptr(_2_j)), nil)
*func() *int32 { _2_i += 1; return &_2_j }() += 1
goto _4
_7:
@@ -104880,8 +106049,8 @@ _3:
func _sqlite3VdbeVerifyNoMallocRequired(tls *crt.TLS, _p *TVdbe, _N int32) {
func() {
- if ((_p.X27) + _N) > ((*XParse)(_p.X3).X19) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72075), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeVerifyNoMallocRequiredØ00__func__Ø000))), unsafe.Pointer(str(121695)))
+ if (_p.XnOp + _N) > ((*XParse)(_p.XpParse).XnOpAlloc) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72075), unsafe.Pointer(&_sqlite3VdbeVerifyNoMallocRequiredØ00__func__Ø000), unsafe.Pointer(str(121723)))
crt.X__builtin_abort(tls)
}
}()
@@ -104890,157 +106059,178 @@ func _sqlite3VdbeVerifyNoMallocRequired(tls *crt.TLS, _p *TVdbe, _N int32) {
var _sqlite3VdbeVerifyNoMallocRequiredØ00__func__Ø000 [34]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeVerifyNoMallocRequiredØ00__func__Ø000[0], str(121729), 34)
+ crt.Xstrncpy(nil, &_sqlite3VdbeVerifyNoMallocRequiredØ00__func__Ø000[0], str(121757), 34)
}
var _sqlite3PragmaØ00getCacheSizeØ002 [9]XVdbeOpList
func init() {
- _sqlite3PragmaØ00getCacheSizeØ002 = [9]XVdbeOpList{XVdbeOpList{X0: u8(2), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(103), X1: i8(0), X2: i8(1), X3: i8(3)}, XVdbeOpList{X0: u8(46), X1: i8(1), X2: i8(8), X3: i8(0)}, XVdbeOpList{X0: u8(56), X1: i8(0), X2: i8(2), X3: i8(0)}, XVdbeOpList{X0: u8(89), X1: i8(1), X2: i8(2), X3: i8(1)}, XVdbeOpList{X0: u8(46), X1: i8(1), X2: i8(8), X3: i8(0)}, XVdbeOpList{X0: u8(56), X1: i8(0), X2: i8(1), X3: i8(0)}, XVdbeOpList{X0: u8(164), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(67), X1: i8(1), X2: i8(1), X3: i8(0)}}
+ _sqlite3PragmaØ00getCacheSizeØ002 = [9]XVdbeOpList{XVdbeOpList{Xopcode: uint8(2)}, XVdbeOpList{Xopcode: uint8(103), Xp2: int8(1), Xp3: int8(3)}, XVdbeOpList{Xopcode: uint8(46), Xp1: int8(1), Xp2: int8(8)}, XVdbeOpList{Xopcode: uint8(56), Xp2: int8(2)}, XVdbeOpList{Xopcode: uint8(89), Xp1: int8(1), Xp2: int8(2), Xp3: int8(1)}, XVdbeOpList{Xopcode: uint8(46), Xp1: int8(1), Xp2: int8(8)}, XVdbeOpList{Xopcode: uint8(56), Xp2: int8(1)}, XVdbeOpList{Xopcode: uint8(164)}, XVdbeOpList{Xopcode: uint8(67), Xp1: int8(1), Xp2: int8(1)}}
}
var _sqlite3PragmaØ00iLnØ001 int32
-// Generate code to return a single integer value.
+// C comment
+// /*
+// ** Generate code to return a single integer value.
+// */
func _returnSingleInt(tls *crt.TLS, _v *TVdbe, _value int64) {
- _sqlite3VdbeAddOp4Dup8(tls, _v, i32(57), i32(0), i32(1), i32(0), (*uint8)(unsafe.Pointer(&_value)), i32(-10))
- _sqlite3VdbeAddOp2(tls, _v, i32(67), i32(1), i32(1))
+ _sqlite3VdbeAddOp4Dup8(tls, _v, int32(57), int32(0), int32(1), int32(0), (*uint8)(unsafe.Pointer(&_value)), int32(-10))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), int32(1), int32(1))
}
-// Set the BTS_SECURE_DELETE flag if newFlag is 0 or 1. If newFlag is -1,
-// then make no changes. Always return the value of the BTS_SECURE_DELETE
-// setting after the change.
+// C comment
+// /*
+// ** Set the BTS_SECURE_DELETE flag if newFlag is 0 or 1. If newFlag is -1,
+// ** then make no changes. Always return the value of the BTS_SECURE_DELETE
+// ** setting after the change.
+// */
func _sqlite3BtreeSecureDelete(tls *crt.TLS, _p *XBtree, _newFlag int32) (r0 int32) {
var _b int32
if _p == nil {
- return i32(0)
+ return int32(0)
}
_sqlite3BtreeEnter(tls, _p)
- if _newFlag < i32(0) {
+ if _newFlag < int32(0) {
goto _1
}
{
- p := (*uint16)(unsafe.Pointer(&((*XBtShared)(_p.X1).X10)))
- *p = uint16(int32(*p) & i32(-5))
- sink14(*p)
+ p := &((*XBtShared)(_p.XpBt).XbtsFlags)
+ *p = uint16(int32(*p) & int32(-5))
}
if _newFlag != 0 {
{
- p := (*uint16)(unsafe.Pointer(&((*XBtShared)(_p.X1).X10)))
- *p = uint16(int32(*p) | i32(4))
- sink14(*p)
+ p := &((*XBtShared)(_p.XpBt).XbtsFlags)
+ *p = uint16(int32(*p) | int32(4))
}
}
_1:
- _b = bool2int((int32((*XBtShared)(_p.X1).X10) & i32(4)) != i32(0))
+ _b = bool2int((int32((*XBtShared)(_p.XpBt).XbtsFlags) & int32(4)) != int32(0))
_sqlite3BtreeLeave(tls, _p)
return _b
}
-// Interpret the given string as a locking mode value.
+// C comment
+// /*
+// ** Interpret the given string as a locking mode value.
+// */
func _getLockingMode(tls *crt.TLS, _z *int8) (r0 int32) {
if _z == nil {
goto _0
}
- if i32(0) == _sqlite3StrICmp(tls, _z, str(91138)) {
- return i32(1)
+ if int32(0) == _sqlite3StrICmp(tls, _z, str(89660)) {
+ return int32(1)
}
- if i32(0) == _sqlite3StrICmp(tls, _z, str(91148)) {
- return i32(0)
+ if int32(0) == _sqlite3StrICmp(tls, _z, str(89670)) {
+ return int32(0)
}
_0:
- return i32(-1)
-}
-
-// Get/set the locking-mode for this pager. Parameter eMode must be one
-// of PAGER_LOCKINGMODE_QUERY, PAGER_LOCKINGMODE_NORMAL or
-// PAGER_LOCKINGMODE_EXCLUSIVE. If the parameter is not _QUERY, then
-// the locking-mode is set to the value specified.
-//
-// The returned value is either PAGER_LOCKINGMODE_NORMAL or
-// PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated)
-// locking-mode.
+ return int32(-1)
+}
+
+// C comment
+// /*
+// ** Get/set the locking-mode for this pager. Parameter eMode must be one
+// ** of PAGER_LOCKINGMODE_QUERY, PAGER_LOCKINGMODE_NORMAL or
+// ** PAGER_LOCKINGMODE_EXCLUSIVE. If the parameter is not _QUERY, then
+// ** the locking-mode is set to the value specified.
+// **
+// ** The returned value is either PAGER_LOCKINGMODE_NORMAL or
+// ** PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated)
+// ** locking-mode.
+// */
func _sqlite3PagerLockingMode(tls *crt.TLS, _pPager *XPager, _eMode int32) (r0 int32) {
func() {
- if _eMode != i32(-1) && _eMode != i32(0) && _eMode != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54047), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerLockingModeØ00__func__Ø000))), unsafe.Pointer(str(121763)))
+ if _eMode != int32(-1) && _eMode != int32(0) && _eMode != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54047), unsafe.Pointer(&_sqlite3PagerLockingModeØ00__func__Ø000), unsafe.Pointer(str(121791)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- i32(0)
+
func() {
- if (_pPager.X1) == 0 && i32(0) != _sqlite3WalHeapMemory(tls, (*XWal)(_pPager.X60)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(54052), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerLockingModeØ00__func__Ø000))), unsafe.Pointer(str(121867)))
+ if _pPager.XexclusiveMode == 0 && int32(0) != _sqlite3WalHeapMemory(tls, (*XWal)(_pPager.XpWal)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(54052), unsafe.Pointer(&_sqlite3PagerLockingModeØ00__func__Ø000), unsafe.Pointer(str(121895)))
crt.X__builtin_abort(tls)
}
}()
- if ((_eMode >= i32(0)) && ((_pPager.X10) == 0)) && (_sqlite3WalHeapMemory(tls, (*XWal)(_pPager.X60)) == 0) {
- *(*uint8)(unsafe.Pointer(&(_pPager.X1))) = uint8(_eMode)
+ if ((_eMode >= int32(0)) && (_pPager.XtempFile == 0)) && (_sqlite3WalHeapMemory(tls, (*XWal)(_pPager.XpWal)) == 0) {
+ _pPager.XexclusiveMode = uint8(_eMode)
}
- return int32(_pPager.X1)
+ return int32(_pPager.XexclusiveMode)
}
var _sqlite3PagerLockingModeØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerLockingModeØ00__func__Ø000[0], str(121930), 24)
+ crt.Xstrncpy(nil, &_sqlite3PagerLockingModeØ00__func__Ø000[0], str(121958), 24)
}
-// Return true if the argument is non-NULL and the WAL module is using
-// heap-memory for the wal-index. Otherwise, if the argument is NULL or the
-// WAL module is using shared-memory, return false.
+// C comment
+// /*
+// ** Return true if the argument is non-NULL and the WAL module is using
+// ** heap-memory for the wal-index. Otherwise, if the argument is NULL or the
+// ** WAL module is using shared-memory, return false.
+// */
func _sqlite3WalHeapMemory(tls *crt.TLS, _pWal *XWal) (r0 int32) {
- return bool2int((_pWal != nil) && (int32(_pWal.X11) == i32(2)))
+ return bool2int((_pWal != nil) && (int32(_pWal.XexclusiveMode) == int32(2)))
}
-// Get/set the size-limit used for persistent journal files.
-//
-// Setting the size limit to -1 means no limit is enforced.
-// An attempt to set a limit smaller than -1 is a no-op.
+// C comment
+// /*
+// ** Get/set the size-limit used for persistent journal files.
+// **
+// ** Setting the size limit to -1 means no limit is enforced.
+// ** An attempt to set a limit smaller than -1 is a no-op.
+// */
func _sqlite3PagerJournalSizeLimit(tls *crt.TLS, _pPager *XPager, _iLimit int64) (r0 int64) {
- if _iLimit >= int64(i32(-1)) {
- *(*int64)(unsafe.Pointer(&(_pPager.X50))) = _iLimit
- _sqlite3WalLimit(tls, (*XWal)(_pPager.X60), _iLimit)
+ if _iLimit >= int64(-1) {
+ _pPager.XjournalSizeLimit = _iLimit
+ _sqlite3WalLimit(tls, (*XWal)(_pPager.XpWal), _iLimit)
}
- return _pPager.X50
+ return _pPager.XjournalSizeLimit
}
-// Change the size to which the WAL file is trucated on each reset.
+// C comment
+// /*
+// ** Change the size to which the WAL file is trucated on each reset.
+// */
func _sqlite3WalLimit(tls *crt.TLS, _pWal *XWal, _iLimit int64) {
if _pWal != nil {
- *(*int64)(unsafe.Pointer(&(_pWal.X4))) = _iLimit
+ _pWal.XmxWalSize = _iLimit
}
}
-// Interpret the given string as an auto-vacuum mode value.
-//
-// The following strings, "none", "full" and "incremental" are
-// acceptable, as are their numeric equivalents: 0, 1 and 2 respectively.
+// C comment
+// /*
+// ** Interpret the given string as an auto-vacuum mode value.
+// **
+// ** The following strings, "none", "full" and "incremental" are
+// ** acceptable, as are their numeric equivalents: 0, 1 and 2 respectively.
+// */
func _getAutoVacuum(tls *crt.TLS, _z *int8) (r0 int32) {
var _i int32
- if i32(0) == _sqlite3StrICmp(tls, _z, str(42897)) {
- return i32(0)
+ if int32(0) == _sqlite3StrICmp(tls, _z, str(42852)) {
+ return int32(0)
}
- if i32(0) == _sqlite3StrICmp(tls, _z, str(121543)) {
- return i32(1)
+ if int32(0) == _sqlite3StrICmp(tls, _z, str(121571)) {
+ return int32(1)
}
- if i32(0) == _sqlite3StrICmp(tls, _z, str(121954)) {
- return i32(2)
+ if int32(0) == _sqlite3StrICmp(tls, _z, str(121982)) {
+ return int32(2)
}
_i = _sqlite3Atoi(tls, _z)
return int32(uint8(func() int32 {
- if (_i >= i32(0)) && (_i <= i32(2)) {
+ if (_i >= int32(0)) && (_i <= int32(2)) {
return _i
}
- return i32(0)
+ return int32(0)
}()))
}
var _sqlite3PragmaØ00setMeta6Ø004 [5]XVdbeOpList
func init() {
- _sqlite3PragmaØ00setMeta6Ø004 = [5]XVdbeOpList{XVdbeOpList{X0: u8(2), X1: i8(0), X2: i8(1), X3: i8(0)}, XVdbeOpList{X0: u8(103), X1: i8(0), X2: i8(1), X3: i8(4)}, XVdbeOpList{X0: u8(21), X1: i8(1), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(55), X1: i8(0), X2: i8(2), X3: i8(0)}, XVdbeOpList{X0: u8(104), X1: i8(0), X2: i8(7), X3: i8(0)}}
+ _sqlite3PragmaØ00setMeta6Ø004 = [5]XVdbeOpList{XVdbeOpList{Xopcode: uint8(2), Xp2: int8(1)}, XVdbeOpList{Xopcode: uint8(103), Xp2: int8(1), Xp3: int8(4)}, XVdbeOpList{Xopcode: uint8(21), Xp1: int8(1)}, XVdbeOpList{Xopcode: uint8(55), Xp2: int8(2)}, XVdbeOpList{Xopcode: uint8(104), Xp2: int8(7)}}
}
var _sqlite3PragmaØ00iLnØ003 int32
@@ -105048,27 +106238,24 @@ var _sqlite3PragmaØ00iLnØ003 int32
func _setAllPagerFlags(tls *crt.TLS, _db *Xsqlite3) {
var _1_n int32
var _1_pDb *XDb
- if (_db.X15) == 0 {
+ if _db.XautoCommit == 0 {
goto _0
}
- _1_pDb = (*XDb)(_db.X4)
- _1_n = _db.X5
- i32(0)
- i32(0)
- i32(0)
- i32(0)
+ _1_pDb = (*XDb)(_db.XaDb)
+ _1_n = _db.XnDb
+
func() {
- if (int32(_1_pDb.X2) & i32(7)) != int32(_1_pDb.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113447), unsafe.Pointer((*int8)(unsafe.Pointer(&_setAllPagerFlagsØ00__func__Ø000))), unsafe.Pointer(str(121966)))
+ if (int32(_1_pDb.Xsafety_level) & int32(7)) != int32(_1_pDb.Xsafety_level) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113447), unsafe.Pointer(&_setAllPagerFlagsØ00__func__Ø000), unsafe.Pointer(str(121994)))
crt.X__builtin_abort(tls)
}
}()
_3:
- if postInc1(&_1_n, int32(-1)) <= i32(0) {
+ if postInc2(&_1_n, -1) <= int32(0) {
goto _4
}
- if (*XBtree)(_1_pDb.X1) != nil {
- _sqlite3BtreeSetPagerFlags(tls, (*XBtree)(_1_pDb.X1), uint32(int32(_1_pDb.X2)|((_db.X6)&i32(56))))
+ if _1_pDb.XpBt != nil {
+ _sqlite3BtreeSetPagerFlags(tls, (*XBtree)(_1_pDb.XpBt), uint32(int32(_1_pDb.Xsafety_level)|(_db.Xflags&int32(56))))
}
*(*uintptr)(unsafe.Pointer(&_1_pDb)) += uintptr(16)
goto _3
@@ -105080,121 +106267,193 @@ _0:
var _setAllPagerFlagsØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_setAllPagerFlagsØ00__func__Ø000[0], str(122030), 17)
+ crt.Xstrncpy(nil, &_setAllPagerFlagsØ00__func__Ø000[0], str(122058), 17)
}
-// Change the limit on the amount of the database file that may be
-// memory mapped.
+// C comment
+// /*
+// ** Change the limit on the amount of the database file that may be
+// ** memory mapped.
+// */
func _sqlite3BtreeSetMmapLimit(tls *crt.TLS, _p *XBtree, _szMmap int64) (r0 int32) {
var _pBt *XBtShared
- _pBt = (*XBtShared)(_p.X1)
+ _pBt = (*XBtShared)(_p.XpBt)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(61696), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreeSetMmapLimitØ00__func__Ø000))), unsafe.Pointer(str(8984)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(61696), unsafe.Pointer(&_sqlite3BtreeSetMmapLimitØ00__func__Ø000), unsafe.Pointer(str(8939)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3BtreeEnter(tls, _p)
- _sqlite3PagerSetMmapLimit(tls, (*XPager)(_pBt.X0), _szMmap)
+ _sqlite3PagerSetMmapLimit(tls, (*XPager)(_pBt.XpPager), _szMmap)
_sqlite3BtreeLeave(tls, _p)
- return i32(0)
+ return int32(0)
}
var _sqlite3BtreeSetMmapLimitØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreeSetMmapLimitØ00__func__Ø000[0], str(122047), 25)
+ crt.Xstrncpy(nil, &_sqlite3BtreeSetMmapLimitØ00__func__Ø000[0], str(122075), 25)
}
-// If the TEMP database is open, close it and mark the database schema
-// as needing reloading. This must be done when using the SQLITE_TEMP_STORE
-// or DEFAULT_TEMP_STORE pragmas.
+// C comment
+// /*
+// ** If the TEMP database is open, close it and mark the database schema
+// ** as needing reloading. This must be done when using the SQLITE_TEMP_STORE
+// ** or DEFAULT_TEMP_STORE pragmas.
+// */
func _changeTempStorage(tls *crt.TLS, _pParse *XParse, _zStorageType *int8) (r0 int32) {
var _ts int32
var _db *Xsqlite3
_ts = _getTempStore(tls, _zStorageType)
- _db = (*Xsqlite3)(_pParse.X0)
- if int32(_db.X16) == _ts {
- return i32(0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if int32(_db.Xtemp_store) == _ts {
+ return int32(0)
}
- if _invalidateTempStorage(tls, _pParse) != i32(0) {
- return i32(1)
+ if _invalidateTempStorage(tls, _pParse) != int32(0) {
+ return int32(1)
}
- *(*uint8)(unsafe.Pointer(&(_db.X16))) = uint8(_ts)
- return i32(0)
+ _db.Xtemp_store = uint8(_ts)
+ return int32(0)
}
-// Interpret the given string as a temp db location. Return 1 for file
-// backed temporary databases, 2 for the Red-Black tree in memory database
-// and 0 to use the compile-time default.
+// C comment
+// /*
+// ** Interpret the given string as a temp db location. Return 1 for file
+// ** backed temporary databases, 2 for the Red-Black tree in memory database
+// ** and 0 to use the compile-time default.
+// */
func _getTempStore(tls *crt.TLS, _z *int8) (r0 int32) {
- if (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) >= i32(48)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) <= i32(50)) {
- return int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) - i32(48)
+ if (int32(*elem1(_z, 0)) >= int32(48)) && (int32(*elem1(_z, 0)) <= int32(50)) {
+ return int32(*elem1(_z, 0)) - int32(48)
}
- if _sqlite3StrICmp(tls, _z, str(61722)) == i32(0) {
- return i32(1)
+ if _sqlite3StrICmp(tls, _z, str(93808)) == int32(0) {
+ return int32(1)
}
- if _sqlite3StrICmp(tls, _z, str(91155)) == i32(0) {
- return i32(2)
+ if _sqlite3StrICmp(tls, _z, str(89677)) == int32(0) {
+ return int32(2)
}
- return i32(0)
+ return int32(0)
}
-// Invalidate temp storage, either when the temp storage is changed
-// from default, or when 'file' and the temp_store_directory has changed
+// C comment
+// /*
+// ** Invalidate temp storage, either when the temp storage is changed
+// ** from default, or when 'file' and the temp_store_directory has changed
+// */
func _invalidateTempStorage(tls *crt.TLS, _pParse *XParse) (r0 int32) {
var _db *Xsqlite3
- _db = (*Xsqlite3)(_pParse.X0)
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X1) == nil {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(1)).XpBt) == nil {
goto _0
}
- if ((_db.X15) == 0) || _sqlite3BtreeIsInReadTrans(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X1)) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(122072))
- return i32(1)
+ if (_db.XautoCommit == 0) || _sqlite3BtreeIsInReadTrans(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(1)).XpBt)) != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(122100))
+ return int32(1)
}
- _sqlite3BtreeClose(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X1))
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(1)))).X1))))) = nil
+ _sqlite3BtreeClose(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(1)).XpBt))
+ *(**XBtree)(unsafe.Pointer(&(elem27((*XDb)(_db.XaDb), uintptr(1)).XpBt))) = nil
_sqlite3ResetAllSchemasOfConnection(tls, _db)
_0:
- return i32(0)
-}
-
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** CAPI3REF: Name Of The Folder Holding Temporary Files
+// **
+// ** ^(If this global variable is made to point to a string which is
+// ** the name of a folder (a.k.a. directory), then all temporary files
+// ** created by SQLite when using a built-in [sqlite3_vfs | VFS]
+// ** will be placed in that directory.)^ ^If this variable
+// ** is a NULL pointer, then SQLite performs a search for an appropriate
+// ** temporary file directory.
+// **
+// ** Applications are strongly discouraged from using this global variable.
+// ** It is required to set a temporary folder on Windows Runtime (WinRT).
+// ** But for all other platforms, it is highly recommended that applications
+// ** neither read nor write this variable. This global variable is a relic
+// ** that exists for backwards compatibility of legacy applications and should
+// ** be avoided in new projects.
+// **
+// ** It is not safe to read or modify this variable in more than one
+// ** thread at a time. It is not safe to read or modify this variable
+// ** if a [database connection] is being used at the same time in a separate
+// ** thread.
+// ** It is intended that this variable be set once
+// ** as part of process initialization and before any SQLite interface
+// ** routines have been called and that this variable remain unchanged
+// ** thereafter.
+// **
+// ** ^The [temp_store_directory pragma] may modify this variable and cause
+// ** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore,
+// ** the [temp_store_directory pragma] always assumes that any string
+// ** that this variable points to is held in memory obtained from
+// ** [sqlite3_malloc] and the pragma may attempt to free that memory
+// ** using [sqlite3_free].
+// ** Hence, if this variable is modified directly, either it should be
+// ** made NULL or made to point to memory obtained from [sqlite3_malloc]
+// ** or else the use of the [temp_store_directory pragma] should be avoided.
+// ** Except when requested by the [temp_store_directory pragma], SQLite
+// ** does not free the memory that sqlite3_temp_directory points to. If
+// ** the application wants that memory to be freed, it must do
+// ** so itself, taking care to only do so after all [database connection]
+// ** objects have been destroyed.
+// **
+// ** <b>Note to Windows Runtime users:</b> The temporary directory must be set
+// ** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various
+// ** features that require the use of temporary files may fail. Here is an
+// ** example of how to do this using C++ with the Windows Runtime:
+// **
+// ** <blockquote><pre>
+// ** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
+// ** &nbsp; TemporaryFolder->Path->Data();
+// ** char zPathBuf&#91;MAX_PATH + 1&#93;;
+// ** memset(zPathBuf, 0, sizeof(zPathBuf));
+// ** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
+// ** &nbsp; NULL, NULL);
+// ** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
+// ** </pre></blockquote>
+// */
var Xsqlite3_temp_directory *int8
-// Generate code that initializes multiple registers to string or integer
-// constants. The registers begin with iDest and increase consecutively.
-// One register is initialized for each characgter in zTypes[]. For each
-// "s" character in zTypes[], the register is a string if the argument is
-// not NULL, or OP_Null if the value is a null pointer. For each "i" character
-// in zTypes[], the register is initialized to an integer.
+// C comment
+// /*
+// ** Generate code that initializes multiple registers to string or integer
+// ** constants. The registers begin with iDest and increase consecutively.
+// ** One register is initialized for each characgter in zTypes[]. For each
+// ** "s" character in zTypes[], the register is a string if the argument is
+// ** not NULL, or OP_Null if the value is a null pointer. For each "i" character
+// ** in zTypes[], the register is initialized to an integer.
+// */
func _sqlite3VdbeMultiLoad(tls *crt.TLS, _p *TVdbe, _iDest int32, _zTypes *int8, args ...interface{}) {
var _i int32
var _c int8
var _2_z *int8
var _ap []interface{}
_ap = args
- _i = i32(0)
+ _i = int32(0)
_0:
- if int32(store3(&_c, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zTypes)) + 1*uintptr(_i))))) == i32(0) {
+ if int32(store5(&_c, *elem1(_zTypes, uintptr(_i)))) == int32(0) {
goto _3
}
- if int32(_c) == i32(115) {
+ if int32(_c) == int32(115) {
_2_z = (*int8)(crt.VAPointer(&_ap))
_sqlite3VdbeAddOp4(tls, _p, func() int32 {
if _2_z == nil {
- return i32(59)
+ return int32(59)
}
- return i32(97)
- }(), i32(0), postInc1(&_iDest, int32(1)), i32(0), _2_z, i32(0))
+ return int32(97)
+ }(), int32(0), postInc2(&_iDest, 1), int32(0), _2_z, int32(0))
goto _7
}
func() {
- if int32(_c) != i32(105) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(71676), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeMultiLoadØ00__func__Ø000))), unsafe.Pointer(str(122134)))
+ if int32(_c) != int32(105) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(71676), unsafe.Pointer(&_sqlite3VdbeMultiLoadØ00__func__Ø000), unsafe.Pointer(str(122162)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp2(tls, _p, i32(56), crt.VAInt32(&_ap), postInc1(&_iDest, int32(1)))
+ _sqlite3VdbeAddOp2(tls, _p, int32(56), crt.VAInt32(&_ap), postInc2(&_iDest, 1))
_7:
_i += 1
goto _0
@@ -105205,41 +106464,41 @@ _3:
var _sqlite3VdbeMultiLoadØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeMultiLoadØ00__func__Ø000[0], str(122141), 21)
+ crt.Xstrncpy(nil, &_sqlite3VdbeMultiLoadØ00__func__Ø000[0], str(122169), 21)
}
func _actionName(tls *crt.TLS, _action uint8) (r0 *int8) {
var _zName *int8
switch int32(_action) {
- case i32(6):
+ case int32(6):
goto _4
- case i32(7):
+ case int32(7):
goto _1
- case i32(8):
+ case int32(8):
goto _2
- case i32(9):
+ case int32(9):
goto _3
default:
goto _5
}
_1:
- _zName = str(122162)
+ _zName = str(122190)
goto _6
_2:
- _zName = str(122171)
+ _zName = str(122199)
goto _6
_3:
- _zName = str(25177)
+ _zName = str(25132)
goto _6
_4:
- _zName = str(25330)
+ _zName = str(25285)
goto _6
_5:
- _zName = str(122183)
+ _zName = str(122211)
func() {
- if int32(_action) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(113474), unsafe.Pointer((*int8)(unsafe.Pointer(&_actionNameØ00__func__Ø000))), unsafe.Pointer(str(122193)))
+ if int32(_action) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(113474), unsafe.Pointer(&_actionNameØ00__func__Ø000), unsafe.Pointer(str(122221)))
crt.X__builtin_abort(tls)
}
}()
@@ -105251,24 +106510,27 @@ _6:
var _actionNameØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_actionNameØ00__func__Ø000[0], str(122209), 11)
-}
-
-// Turn parser tracing on by giving a stream to which to write the trace
-// and a prompt to preface each trace message. Tracing is turned off
-// by making either argument NULL
-//
-// Inputs:
-// <ul>
-// <li> A FILE* to which trace output should be written.
-// If NULL, then tracing is turned off.
-// <li> A prefix string written at the beginning of every
-// line of trace output. If NULL, then tracing is
-// turned off.
-// </ul>
-//
-// Outputs:
-// None.
+ crt.Xstrncpy(nil, &_actionNameØ00__func__Ø000[0], str(122237), 11)
+}
+
+// C comment
+// /*
+// ** Turn parser tracing on by giving a stream to which to write the trace
+// ** and a prompt to preface each trace message. Tracing is turned off
+// ** by making either argument NULL
+// **
+// ** Inputs:
+// ** <ul>
+// ** <li> A FILE* to which trace output should be written.
+// ** If NULL, then tracing is turned off.
+// ** <li> A prefix string written at the beginning of every
+// ** line of trace output. If NULL, then tracing is
+// ** turned off.
+// ** </ul>
+// **
+// ** Outputs:
+// ** None.
+// */
func _sqlite3ParserTrace(tls *crt.TLS, _TraceFILE *crt.XFILE, _zTracePrompt *int8) {
_yyTraceFILE = _TraceFILE
bug20530(_yyTraceFILE)
@@ -105286,9 +106548,12 @@ func _sqlite3ParserTrace(tls *crt.TLS, _TraceFILE *crt.XFILE, _zTracePrompt *int
_2:
}
-// Register the built-in LIKE and GLOB functions. The caseSensitive
-// parameter determines whether or not the LIKE operator is case
-// sensitive. GLOB is always case sensitive.
+// C comment
+// /*
+// ** Register the built-in LIKE and GLOB functions. The caseSensitive
+// ** parameter determines whether or not the LIKE operator is case
+// ** sensitive. GLOB is always case sensitive.
+// */
func _sqlite3RegisterLikeFunctions(tls *crt.TLS, _db *Xsqlite3, _caseSensitive int32) {
var _pInfo *TcompareInfo
if _caseSensitive != 0 {
@@ -105297,28 +106562,31 @@ func _sqlite3RegisterLikeFunctions(tls *crt.TLS, _db *Xsqlite3, _caseSensitive i
}
_pInfo = &_likeInfoNorm
_1:
- _sqlite3CreateFunc(tls, _db, str(7966), i32(2), i32(1), (unsafe.Pointer)(_pInfo), _likeFunc, nil, nil, nil)
- _sqlite3CreateFunc(tls, _db, str(7966), i32(3), i32(1), (unsafe.Pointer)(_pInfo), _likeFunc, nil, nil, nil)
- _sqlite3CreateFunc(tls, _db, str(7961), i32(2), i32(1), (unsafe.Pointer)(&_globInfo), _likeFunc, nil, nil, nil)
- _setLikeOptFlag(tls, _db, str(7961), uint8(i32(12)))
- _setLikeOptFlag(tls, _db, str(7966), uint8(func() int32 {
+ _sqlite3CreateFunc(tls, _db, str(7867), int32(2), int32(1), unsafe.Pointer(_pInfo), _likeFunc, nil, nil, nil)
+ _sqlite3CreateFunc(tls, _db, str(7867), int32(3), int32(1), unsafe.Pointer(_pInfo), _likeFunc, nil, nil, nil)
+ _sqlite3CreateFunc(tls, _db, str(7862), int32(2), int32(1), unsafe.Pointer(&_globInfo), _likeFunc, nil, nil, nil)
+ _setLikeOptFlag(tls, _db, str(7862), uint8(12))
+ _setLikeOptFlag(tls, _db, str(7867), uint8(func() int32 {
if _caseSensitive != 0 {
- return i32(12)
+ return int32(12)
}
- return i32(4)
+ return int32(4)
}()))
}
-// Implementation of the like() SQL function. This function implements
-// the build-in LIKE operator. The first argument to the function is the
-// pattern and the second argument is the string. So, the SQL statements:
-//
-// A LIKE B
-//
-// is implemented as like(B,A).
-//
-// This same function (with a different compareInfo structure) computes
-// the GLOB operator.
+// C comment
+// /*
+// ** Implementation of the like() SQL function. This function implements
+// ** the build-in LIKE operator. The first argument to the function is the
+// ** pattern and the second argument is the string. So, the SQL statements:
+// **
+// ** A LIKE B
+// **
+// ** is implemented as like(B,A).
+// **
+// ** This same function (with a different compareInfo structure) computes
+// ** the GLOB operator.
+// */
func _likeFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _nPat int32
var _escape uint32
@@ -105327,98 +106595,103 @@ func _likeFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XM
var _pInfo *TcompareInfo
_db = Xsqlite3_context_db_handle(tls, _context)
_pInfo = (*TcompareInfo)(Xsqlite3_user_data(tls, _context))
- _zB = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- _zA = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
- _nPat = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- if _nPat > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(8))))) {
- Xsqlite3_result_error(tls, _context, str(122220), i32(-1))
+ _zB = Xsqlite3_value_text(tls, *elem19(_argv, 0))
+ _zA = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))
+ _nPat = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
+ if _nPat > (*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(8))) {
+ Xsqlite3_result_error(tls, _context, str(122248), int32(-1))
return
}
func() {
- if _zB != Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106383), unsafe.Pointer((*int8)(unsafe.Pointer(&_likeFuncØ00__func__Ø000))), unsafe.Pointer(str(122253)))
+ if _zB != Xsqlite3_value_text(tls, *elem19(_argv, 0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106383), unsafe.Pointer(&_likeFuncØ00__func__Ø000), unsafe.Pointer(str(122281)))
crt.X__builtin_abort(tls)
}
}()
- if _argc != i32(3) {
+ if _argc != int32(3) {
goto _3
}
- _2_zEsc = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2)))))
+ _2_zEsc = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(2)))
if _2_zEsc == nil {
return
}
- if _sqlite3Utf8CharLen(tls, (*int8)(unsafe.Pointer(_2_zEsc)), i32(-1)) != i32(1) {
- Xsqlite3_result_error(tls, _context, str(122285), i32(-1))
+ if _sqlite3Utf8CharLen(tls, (*int8)(unsafe.Pointer(_2_zEsc)), int32(-1)) != int32(1) {
+ Xsqlite3_result_error(tls, _context, str(122313), int32(-1))
return
}
_escape = _sqlite3Utf8Read(tls, &_2_zEsc)
goto _6
_3:
- _escape = uint32(_pInfo.X2)
+ _escape = uint32(_pInfo.XmatchSet)
_6:
if (_zA != nil) && (_zB != nil) {
- Xsqlite3_result_int(tls, _context, bool2int(_patternCompare(tls, _zB, _zA, _pInfo, _escape) == i32(0)))
+ Xsqlite3_result_int(tls, _context, bool2int(_patternCompare(tls, _zB, _zA, _pInfo, _escape) == int32(0)))
}
}
-// Extract the user data from a sqlite3_context structure and return a
-// pointer to it.
+// C comment
+// /*
+// ** Extract the user data from a sqlite3_context structure and return a
+// ** pointer to it.
+// */
func Xsqlite3_user_data(tls *crt.TLS, _p *Xsqlite3_context) (r0 unsafe.Pointer) {
func() {
- if _p == nil || (*XFuncDef)(_p.X1) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76799), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_user_dataØ00__func__Ø000))), unsafe.Pointer(str(122330)))
+ if _p == nil || _p.XpFunc == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76799), unsafe.Pointer(&_sqlite3_user_dataØ00__func__Ø000), unsafe.Pointer(str(122358)))
crt.X__builtin_abort(tls)
}
}()
- return (*XFuncDef)(_p.X1).X2
+ return (*XFuncDef)(_p.XpFunc).XpUserData
}
var _sqlite3_user_dataØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_user_dataØ00__func__Ø000[0], str(122344), 18)
+ crt.Xstrncpy(nil, &_sqlite3_user_dataØ00__func__Ø000[0], str(122372), 18)
}
var _likeFuncØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_likeFuncØ00__func__Ø000[0], str(122362), 9)
+ crt.Xstrncpy(nil, &_likeFuncØ00__func__Ø000[0], str(122390), 9)
}
func Xsqlite3_result_int(tls *crt.TLS, _pCtx *Xsqlite3_context, _iVal int32) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76465), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_intØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76465), unsafe.Pointer(&_sqlite3_result_intØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemSetInt64(tls, (*XMem)(_pCtx.X0), int64(_iVal))
+ _sqlite3VdbeMemSetInt64(tls, (*XMem)(_pCtx.XpOut), int64(_iVal))
}
var _sqlite3_result_intØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_intØ00__func__Ø000[0], str(122371), 19)
+ crt.Xstrncpy(nil, &_sqlite3_result_intØ00__func__Ø000[0], str(122399), 19)
}
-// Set the LIKEOPT flag on the 2-argument function with the given name.
+// C comment
+// /*
+// ** Set the LIKEOPT flag on the 2-argument function with the given name.
+// */
func _setLikeOptFlag(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _flagVal uint8) {
var _pDef *XFuncDef
- _pDef = _sqlite3FindFunction(tls, _db, _zName, i32(2), uint8(i32(1)), uint8(i32(0)))
+ _pDef = _sqlite3FindFunction(tls, _db, _zName, int32(2), uint8(1), 0)
if func() int32 {
if _pDef != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107216), unsafe.Pointer((*int8)(unsafe.Pointer(&_setLikeOptFlagØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107216), unsafe.Pointer(&_setLikeOptFlagØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_pDef.X1)))
+ p := &_pDef.XfuncFlags
*p = uint16(int32(*p) | int32(_flagVal))
- sink14(*p)
}
}
}
@@ -105426,45 +106699,48 @@ func _setLikeOptFlag(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _flagVal uint8)
var _setLikeOptFlagØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_setLikeOptFlagØ00__func__Ø000[0], str(122390), 15)
+ crt.Xstrncpy(nil, &_setLikeOptFlagØ00__func__Ø000[0], str(122418), 15)
}
-// Helper subroutine for PRAGMA integrity_check:
-//
-// Generate code to output a single-column result row with the result
-// held in register regResult. Decrement the result count and halt if
-// the maximum number of result rows have been issued.
+// C comment
+// /*
+// ** Helper subroutine for PRAGMA integrity_check:
+// **
+// ** Generate code to output a single-column result row with the result
+// ** held in register regResult. Decrement the result count and halt if
+// ** the maximum number of result rows have been issued.
+// */
func _integrityCheckResultRow(tls *crt.TLS, _v *TVdbe, _regResult int32) (r0 int32) {
var _addr int32
- _sqlite3VdbeAddOp2(tls, _v, i32(67), _regResult, i32(1))
- _addr = _sqlite3VdbeAddOp3(tls, _v, i32(46), i32(1), _sqlite3VdbeCurrentAddr(tls, _v)+i32(2), i32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(55), i32(0), i32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(67), _regResult, int32(1))
+ _addr = _sqlite3VdbeAddOp3(tls, _v, int32(46), int32(1), _sqlite3VdbeCurrentAddr(tls, _v)+int32(2), int32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(55), int32(0), int32(0))
return _addr
}
func _sqlite3NoTempsInRange(tls *crt.TLS, _pParse *XParse, _iFirst int32, _iLast int32) (r0 int32) {
var _i int32
- if (((_pParse.X14) > i32(0)) && (((_pParse.X15) + (_pParse.X14)) < _iLast)) && ((_pParse.X15) >= _iFirst) {
- return i32(0)
+ if ((_pParse.XnRangeReg > int32(0)) && ((_pParse.XiRangeReg + _pParse.XnRangeReg) < _iLast)) && (_pParse.XiRangeReg >= _iFirst) {
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_3:
- if _i >= int32(_pParse.X7) {
+ if _i >= int32(_pParse.XnTempReg) {
goto _6
}
- if ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[8]int32)(unsafe.Pointer(&(_pParse.X49))))) + 4*uintptr(_i)))) >= _iFirst) && ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[8]int32)(unsafe.Pointer(&(_pParse.X49))))) + 4*uintptr(_i)))) <= _iLast) {
- return i32(0)
+ if ((*elem8((*int32)(unsafe.Pointer(&_pParse.XaTempReg)), uintptr(_i))) >= _iFirst) && ((*elem8((*int32)(unsafe.Pointer(&_pParse.XaTempReg)), uintptr(_i))) <= _iLast) {
+ return int32(0)
}
_i += 1
goto _3
_6:
- return i32(1)
+ return int32(1)
}
var _sqlite3PragmaØ00endCodeØ006 [4]XVdbeOpList
func init() {
- _sqlite3PragmaØ00endCodeØ006 = [4]XVdbeOpList{XVdbeOpList{X0: u8(73), X1: i8(1), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(47), X1: i8(1), X2: i8(4), X3: i8(0)}, XVdbeOpList{X0: u8(97), X1: i8(0), X2: i8(3), X3: i8(0)}, XVdbeOpList{X0: u8(67), X1: i8(3), X2: i8(1), X3: i8(0)}}
+ _sqlite3PragmaØ00endCodeØ006 = [4]XVdbeOpList{XVdbeOpList{Xopcode: uint8(73), Xp1: int8(1)}, XVdbeOpList{Xopcode: uint8(47), Xp1: int8(1), Xp2: int8(4)}, XVdbeOpList{Xopcode: uint8(97), Xp2: int8(3)}, XVdbeOpList{Xopcode: uint8(67), Xp1: int8(3), Xp2: int8(1)}}
}
var _sqlite3PragmaØ00iLnØ005 int32
@@ -105472,153 +106748,180 @@ var _sqlite3PragmaØ00iLnØ005 int32
var _sqlite3PragmaØ00encnamesØ007 [9]TEncName
func init() {
- _sqlite3PragmaØ00encnamesØ007 = [9]TEncName{TEncName{X0: str(122405), X1: u8(1)}, TEncName{X0: str(122410), X1: u8(1)}, TEncName{X0: str(122416), X1: u8(2)}, TEncName{X0: str(122425), X1: u8(3)}, TEncName{X0: str(122434), X1: u8(2)}, TEncName{X0: str(122442), X1: u8(3)}, TEncName{X0: str(122450), X1: u8(0)}, TEncName{X0: str(122457), X1: u8(0)}, TEncName{}}
+ _sqlite3PragmaØ00encnamesØ007 = [9]TEncName{TEncName{XzName: str(122433), Xenc: uint8(1)}, TEncName{XzName: str(122438), Xenc: uint8(1)}, TEncName{XzName: str(122444), Xenc: uint8(2)}, TEncName{XzName: str(122453), Xenc: uint8(3)}, TEncName{XzName: str(122462), Xenc: uint8(2)}, TEncName{XzName: str(122470), Xenc: uint8(3)}, TEncName{XzName: str(122478)}, TEncName{XzName: str(122485)}, TEncName{}}
}
var _sqlite3PragmaØ00setCookieØ008 [2]XVdbeOpList
func init() {
- _sqlite3PragmaØ00setCookieØ008 = [2]XVdbeOpList{XVdbeOpList{X0: u8(2), X1: i8(0), X2: i8(1), X3: i8(0)}, XVdbeOpList{X0: u8(104), X1: i8(0), X2: i8(0), X3: i8(0)}}
+ _sqlite3PragmaØ00setCookieØ008 = [2]XVdbeOpList{XVdbeOpList{Xopcode: uint8(2), Xp2: int8(1)}, XVdbeOpList{Xopcode: uint8(104)}}
}
var _sqlite3PragmaØ00readCookieØ009 [3]XVdbeOpList
func init() {
- _sqlite3PragmaØ00readCookieØ009 = [3]XVdbeOpList{XVdbeOpList{X0: u8(2), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(103), X1: i8(0), X2: i8(1), X3: i8(0)}, XVdbeOpList{X0: u8(67), X1: i8(1), X2: i8(1), X3: i8(0)}}
+ _sqlite3PragmaØ00readCookieØ009 = [3]XVdbeOpList{XVdbeOpList{Xopcode: uint8(2)}, XVdbeOpList{Xopcode: uint8(103), Xp2: int8(1)}, XVdbeOpList{Xopcode: uint8(67), Xp1: int8(1), Xp2: int8(1)}}
}
-// Mark the VDBE as one that can only be run multiple times.
+// C comment
+// /*
+// ** Mark the VDBE as one that can only be run multiple times.
+// */
func _sqlite3VdbeReusable(tls *crt.TLS, _p *TVdbe) {
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(0)), 32, 5)
+ storebits26(&_p.Xexpired, 0, 32, 5)
}
-// Return the N-th compile-time option string. If N is out of range,
-// return a NULL pointer.
+// C comment
+// /*
+// ** Return the N-th compile-time option string. If N is out of range,
+// ** return a NULL pointer.
+// */
func Xsqlite3_compileoption_get(tls *crt.TLS, _N int32) (r0 *int8) {
- if (_N >= i32(0)) && (_N < i32(6)) {
- return *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azCompileOpt)) + 4*uintptr(_N)))
+ if (_N >= int32(0)) && (_N < int32(6)) {
+ return *elem0((**int8)(unsafe.Pointer(&_azCompileOpt)), uintptr(_N))
}
return nil
}
+// C comment
+// /*
+// ** An array of names of all compile-time options. This array should
+// ** be sorted A-Z.
+// **
+// ** This array looks large, but in a typical installation actually uses
+// ** only a handful of compile-time options, so most times this array is usually
+// ** rather short and uses little memory space.
+// */
var _azCompileOpt [6]*int8
func init() {
- _azCompileOpt = [6]*int8{str(122463), str(122469), str(122491), str(122517), str(122534), str(122548)}
+ _azCompileOpt = [6]*int8{str(122491), str(122497), str(122519), str(122545), str(122562), str(122576)}
}
-// Configure an sqlite3_wal_hook() callback to automatically checkpoint
-// a database after committing a transaction if there are nFrame or
-// more frames in the log file. Passing zero or a negative value as the
-// nFrame parameter disables automatic checkpoints entirely.
-//
-// The callback registered by this function replaces any existing callback
-// registered using sqlite3_wal_hook(). Likewise, registering a callback
-// using sqlite3_wal_hook() disables the automatic checkpoint mechanism
-// configured by this function.
+// C comment
+// /*
+// ** Configure an sqlite3_wal_hook() callback to automatically checkpoint
+// ** a database after committing a transaction if there are nFrame or
+// ** more frames in the log file. Passing zero or a negative value as the
+// ** nFrame parameter disables automatic checkpoints entirely.
+// **
+// ** The callback registered by this function replaces any existing callback
+// ** registered using sqlite3_wal_hook(). Likewise, registering a callback
+// ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism
+// ** configured by this function.
+// */
func Xsqlite3_wal_autocheckpoint(tls *crt.TLS, _db *Xsqlite3, _nFrame int32) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(142507))
+ return _sqlite3MisuseError(tls, int32(142507))
}
- if _nFrame > i32(0) {
- Xsqlite3_wal_hook(tls, _db, _sqlite3WalDefaultHook, (unsafe.Pointer)(uintptr(_nFrame)))
+ if _nFrame > int32(0) {
+ Xsqlite3_wal_hook(tls, _db, _sqlite3WalDefaultHook, crt.U2P(uintptr(_nFrame)))
goto _2
}
Xsqlite3_wal_hook(tls, _db, nil, nil)
_2:
- return i32(0)
+ return int32(0)
}
-// Register a callback to be invoked each time a transaction is written
-// into the write-ahead-log by this database connection.
+// C comment
+// /*
+// ** Register a callback to be invoked each time a transaction is written
+// ** into the write-ahead-log by this database connection.
+// */
func Xsqlite3_wal_hook(tls *crt.TLS, _db *Xsqlite3, _xCallback func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32, _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
var _pRet unsafe.Pointer
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(142531))
+ _sqlite3MisuseError(tls, int32(142531))
return nil
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _pRet = _db.X52
- *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&(_db.X51))))) = _xCallback
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X52))) = _pArg
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _pRet = _db.XpWalArg
+ *(*func(*crt.TLS, unsafe.Pointer, *Xsqlite3, *int8, int32) int32)(unsafe.Pointer(&_db.XxWalCallback)) = _xCallback
+ _db.XpWalArg = _pArg
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _pRet
}
func _sqlite3WalDefaultHook(tls *crt.TLS, _pClientData unsafe.Pointer, _db *Xsqlite3, _zDb *int8, _nFrame int32) (r0 int32) {
- if _nFrame >= int32(uintptr(_pClientData)) {
+ if _nFrame >= int32(crt.P2U(_pClientData)) {
_sqlite3BeginBenignMalloc(tls)
Xsqlite3_wal_checkpoint(tls, _db, _zDb)
_sqlite3EndBenignMalloc(tls)
}
- return i32(0)
+ return int32(0)
}
-// Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
-// to contains a zero-length string, all attached databases are
-// checkpointed.
+// C comment
+// /*
+// ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
+// ** to contains a zero-length string, all attached databases are
+// ** checkpointed.
+// */
func Xsqlite3_wal_checkpoint(tls *crt.TLS, _db *Xsqlite3, _zDb *int8) (r0 int32) {
- return Xsqlite3_wal_checkpoint_v2(tls, _db, _zDb, i32(0), nil, nil)
+ return Xsqlite3_wal_checkpoint_v2(tls, _db, _zDb, int32(0), nil, nil)
}
-// Checkpoint database zDb.
+// C comment
+// /*
+// ** Checkpoint database zDb.
+// */
func Xsqlite3_wal_checkpoint_v2(tls *crt.TLS, _db *Xsqlite3, _zDb *int8, _eMode int32, _pnLog *int32, _pnCkpt *int32) (r0 int32) {
var _rc, _iDb int32
- _iDb = i32(10)
+ _iDb = int32(10)
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(142563))
+ return _sqlite3MisuseError(tls, int32(142563))
}
if _pnLog != nil {
- *_pnLog = i32(-1)
+ *_pnLog = int32(-1)
}
if _pnCkpt != nil {
- *_pnCkpt = i32(-1)
+ *_pnCkpt = int32(-1)
}
- i32(0)
- i32(0)
- i32(0)
- i32(0)
- if (_eMode < i32(0)) || (_eMode > i32(3)) {
- return i32(21)
+
+ if (_eMode < int32(0)) || (_eMode > int32(3)) {
+ return int32(21)
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- if (_zDb != nil) && ((*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zDb)) + 1*uintptr(i32(0))))) != 0) {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ if (_zDb != nil) && ((*elem1(_zDb, 0)) != 0) {
_iDb = _sqlite3FindDbName(tls, _db, _zDb)
}
- if _iDb < i32(0) {
- _rc = i32(1)
- _sqlite3ErrorWithMsg(tls, _db, i32(1), str(122561), unsafe.Pointer(_zDb))
+ if _iDb < int32(0) {
+ _rc = int32(1)
+ _sqlite3ErrorWithMsg(tls, _db, int32(1), str(122589), unsafe.Pointer(_zDb))
goto _8
}
- *(*int32)(unsafe.Pointer(&((*t19)(unsafe.Pointer(&(_db.X71))).X2))) = i32(0)
+ _db.XbusyHandler.XnBusy = int32(0)
_rc = _sqlite3Checkpoint(tls, _db, _iDb, _eMode, _pnLog, _pnCkpt)
_sqlite3Error(tls, _db, _rc)
_8:
_rc = _sqlite3ApiExit(tls, _db, _rc)
- if (_db.X34) == i32(0) {
- *(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57))))) = i32(0)
+ if _db.XnVdbeActive == int32(0) {
+ *(*int32)(unsafe.Pointer(&_db.Xu1)) = int32(0)
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
-// Free up as much memory as we can from the given database
-// connection.
+// C comment
+// /*
+// ** Free up as much memory as we can from the given database
+// ** connection.
+// */
func Xsqlite3_db_release_memory(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
var _i int32
var _1_pBt *XBtree
var _2_pPager *XPager
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(141206))
+ return _sqlite3MisuseError(tls, int32(141206))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
_sqlite3BtreeEnterAll(tls, _db)
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _4
}
- _1_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _1_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _1_pBt != nil {
_2_pPager = _sqlite3BtreePager(tls, _1_pBt)
_sqlite3PagerShrink(tls, _2_pPager)
@@ -105627,223 +106930,244 @@ _1:
goto _1
_4:
_sqlite3BtreeLeaveAll(tls, _db)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return i32(0)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return int32(0)
}
-// Free as much memory as possible from the pager.
+// C comment
+// /*
+// ** Free as much memory as possible from the pager.
+// */
func _sqlite3PagerShrink(tls *crt.TLS, _pPager *XPager) {
- _sqlite3PcacheShrink(tls, (*XPCache)(_pPager.X59))
+ _sqlite3PcacheShrink(tls, (*XPCache)(_pPager.XpPCache))
}
-// Free up as much memory as possible from the page cache.
+// C comment
+// /*
+// ** Free up as much memory as possible from the page cache.
+// */
func _sqlite3PcacheShrink(tls *crt.TLS, _pCache *XPCache) {
func() {
- if (_pCache.X12) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(44968), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PcacheShrinkØ00__func__Ø000))), unsafe.Pointer(str(15958)))
+ if _pCache.XpCache == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(44968), unsafe.Pointer(&_sqlite3PcacheShrinkØ00__func__Ø000), unsafe.Pointer(str(15913)))
crt.X__builtin_abort(tls)
}
}()
- ((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X12)(tls, _pCache.X12)
+ (_sqlite3Config.Xpcache2.XxShrink)(tls, _pCache.XpCache)
}
var _sqlite3PcacheShrinkØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PcacheShrinkØ00__func__Ø000[0], str(122582), 20)
+ crt.Xstrncpy(nil, &_sqlite3PcacheShrinkØ00__func__Ø000[0], str(122610), 20)
}
-// Set the soft heap-size limit for the library. Passing a zero or
-// negative value indicates no limit.
+// C comment
+// /*
+// ** Set the soft heap-size limit for the library. Passing a zero or
+// ** negative value indicates no limit.
+// */
func Xsqlite3_soft_heap_limit64(tls *crt.TLS, _n int64) (r0 int64) {
var _rc int32
var _priorLimit, _excess, _nUsed int64
_rc = Xsqlite3_initialize(tls)
if _rc != 0 {
- return int64(i32(-1))
+ return int64(-1)
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.X0))
- _priorLimit = _mem0.X1
- if _n < int64(i32(0)) {
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
+ _priorLimit = _mem0.XalarmThreshold
+ if _n < (0) {
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
return _priorLimit
}
- *(*int64)(unsafe.Pointer(&(_mem0.X1))) = _n
- _nUsed = _sqlite3StatusValue(tls, i32(0))
- *(*int32)(unsafe.Pointer(&(_mem0.X5))) = bool2int((_n > int64(i32(0))) && (_n <= _nUsed))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.X0))
+ _mem0.XalarmThreshold = _n
+ _nUsed = _sqlite3StatusValue(tls, int32(0))
+ _mem0.XnearlyFull = bool2int((_n > (0)) && (_n <= _nUsed))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_mem0.Xmutex))
_excess = Xsqlite3_memory_used(tls) - _n
- if _excess > int64(i32(0)) {
- Xsqlite3_release_memory(tls, int32(_excess&int64(i32(2147483647))))
+ if _excess > (0) {
+ Xsqlite3_release_memory(tls, int32(_excess&int64(2147483647)))
}
return _priorLimit
}
-// Return the amount of memory currently checked out.
+// C comment
+// /*
+// ** Return the amount of memory currently checked out.
+// */
func Xsqlite3_memory_used(tls *crt.TLS) (r0 int64) {
var _res, _mx int64
- Xsqlite3_status64(tls, i32(0), &_res, &_mx, i32(0))
+ Xsqlite3_status64(tls, int32(0), &_res, &_mx, int32(0))
return _res
-
- _ = _mx
- panic(0)
}
-// Query status information.
+// C comment
+// /*
+// ** Query status information.
+// */
func Xsqlite3_status64(tls *crt.TLS, _op int32, _pCurrent *int64, _pHighwater *int64, _resetFlag int32) (r0 int32) {
var _pMutex *Xsqlite3_mutex
- if (_op < i32(0)) || (_op >= i32(10)) {
- return _sqlite3MisuseError(tls, i32(18616))
+ if (_op < int32(0)) || (_op >= int32(10)) {
+ return _sqlite3MisuseError(tls, int32(18616))
}
if (_pCurrent == nil) || (_pHighwater == nil) {
- return _sqlite3MisuseError(tls, i32(18619))
+ return _sqlite3MisuseError(tls, int32(18619))
}
_pMutex = func() *Xsqlite3_mutex {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_statMutex)) + 1*uintptr(_op)))) != 0 {
+ if (*elem1((*int8)(unsafe.Pointer(&_statMutex)), uintptr(_op))) != 0 {
return _sqlite3Pcache1Mutex(tls)
}
return _sqlite3MallocMutex(tls)
}()
Xsqlite3_mutex_enter(tls, _pMutex)
- *_pCurrent = int64(*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X0))))) + 4*uintptr(_op))))
- *_pHighwater = int64(*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X1))))) + 4*uintptr(_op))))
+ *_pCurrent = int64(*elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XnowValue)), uintptr(_op)))
+ *_pHighwater = int64(*elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XmxValue)), uintptr(_op)))
if _resetFlag != 0 {
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X1))))) + 4*uintptr(_op))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[10]uint32)(unsafe.Pointer(&(_sqlite3Stat.X0))))) + 4*uintptr(_op)))
+ *elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XmxValue)), uintptr(_op)) = *elem7((*uint32)(unsafe.Pointer(&_sqlite3Stat.XnowValue)), uintptr(_op))
}
Xsqlite3_mutex_leave(tls, _pMutex)
- return i32(0)
-}
-
-// Change the value of a limit. Report the old value.
-// If an invalid limit index is supplied, report -1.
-// Make no changes but still report the old value if the
-// new limit is negative.
-//
-// A new lower limit does not shrink existing constructs.
-// It merely prevents new constructs that exceed the limit
-// from forming.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Change the value of a limit. Report the old value.
+// ** If an invalid limit index is supplied, report -1.
+// ** Make no changes but still report the old value if the
+// ** new limit is negative.
+// **
+// ** A new lower limit does not shrink existing constructs.
+// ** It merely prevents new constructs that exceed the limit
+// ** from forming.
+// */
func Xsqlite3_limit(tls *crt.TLS, _db *Xsqlite3, _limitId int32, _newLimit int32) (r0 int32) {
var _oldLimit int32
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(142955))
- return i32(-1)
+ _sqlite3MisuseError(tls, int32(142955))
+ return int32(-1)
}
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(0))))) != i32(1000000000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142965), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(122602)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), 0)) != int32(1000000000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142965), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(122630)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(1))))) != i32(1000000000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142966), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(122653)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(1))) != int32(1000000000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142966), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(122681)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(2))))) != i32(2000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142967), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(122712)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(2))) != int32(2000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142967), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(122740)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(3))))) != i32(1000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142968), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(122763)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(3))) != int32(1000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142968), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(122791)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(4))))) != i32(500) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142969), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(122822)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(4))) != int32(500) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142969), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(122850)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(5))))) != i32(250000000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142970), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(122891)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(5))) != int32(250000000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142970), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(122919)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(6))))) != i32(127) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142971), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(122944)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(6))) != int32(127) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142971), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(122972)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(7))))) != i32(10) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142972), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(123007)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(7))) != int32(10) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142972), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(123035)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(8))))) != i32(50000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142973), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(123062)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(8))) != int32(50000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142973), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(123090)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(9))))) != i32(999) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142975), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(123140)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(9))) != int32(999) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142975), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(123168)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(10))))) != i32(1000) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142976), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(123209)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(10))) != int32(1000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142976), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(123237)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(i32(11))))) != i32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(142977), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000))), unsafe.Pointer(str(123274)))
+ if (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(11))) != int32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(142977), unsafe.Pointer(&_sqlite3_limitØ00__func__Ø000), unsafe.Pointer(str(123302)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- if (_limitId < i32(0)) || (_limitId >= i32(12)) {
- return i32(-1)
+
+ if (_limitId < int32(0)) || (_limitId >= int32(12)) {
+ return int32(-1)
}
- _oldLimit = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(_limitId)))
- if _newLimit < i32(0) {
+ _oldLimit = *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(_limitId))
+ if _newLimit < int32(0) {
goto _27
}
- if _newLimit > (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(_limitId)))) {
- _newLimit = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aHardLimit)) + 4*uintptr(_limitId)))
+ if _newLimit > (*elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(_limitId))) {
+ _newLimit = *elem8((*int32)(unsafe.Pointer(&_aHardLimit)), uintptr(_limitId))
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(_limitId))) = _newLimit
+ *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(_limitId)) = _newLimit
_27:
return _oldLimit
}
+// C comment
+// /*
+// ** This array defines hard upper bounds on limit values. The
+// ** initializer must be kept in sync with the SQLITE_LIMIT_*
+// ** #defines in sqlite3.h.
+// */
var _aHardLimit [12]int32
func init() {
- _aHardLimit = [12]int32{i32(1000000000), i32(1000000000), i32(2000), i32(1000), i32(500), i32(250000000), i32(127), i32(10), i32(50000), i32(999), i32(1000), i32(8)}
+ _aHardLimit = [12]int32{int32(1000000000), int32(1000000000), int32(2000), int32(1000), int32(500), int32(250000000), int32(127), int32(10), int32(50000), int32(999), int32(1000), int32(8)}
}
var _sqlite3_limitØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_limitØ00__func__Ø000[0], str(123341), 14)
+ crt.Xstrncpy(nil, &_sqlite3_limitØ00__func__Ø000[0], str(123369), 14)
}
var _sqlite3PragmaØ00azLockNameØ0010 [5]*int8
func init() {
- _sqlite3PragmaØ00azLockNameØ0010 = [5]*int8{str(123355), str(123364), str(123371), str(123380), str(91138)}
+ _sqlite3PragmaØ00azLockNameØ0010 = [5]*int8{str(123383), str(123392), str(123399), str(123408), str(89660)}
}
func _sqlite3VdbeVerifyNoResultRow(tls *crt.TLS, _p *TVdbe) {
var _i int32
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= (_p.X27) {
+ if _i >= _p.XnOp {
goto _3
}
func() {
- if int32((*XVdbeOp)(unsafe.Pointer(uintptr(_p.X17)+24*uintptr(_i))).X0) == i32(67) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(72090), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VdbeVerifyNoResultRowØ00__func__Ø000))), unsafe.Pointer(str(123388)))
+ if int32(elem61((*XVdbeOp)(_p.XaOp), uintptr(_i)).Xopcode) == int32(67) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(72090), unsafe.Pointer(&_sqlite3VdbeVerifyNoResultRowØ00__func__Ø000), unsafe.Pointer(str(123416)))
crt.X__builtin_abort(tls)
}
}()
@@ -105855,11 +107179,14 @@ _3:
var _sqlite3VdbeVerifyNoResultRowØ00__func__Ø000 [29]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VdbeVerifyNoResultRowØ00__func__Ø000[0], str(123419), 29)
+ crt.Xstrncpy(nil, &_sqlite3VdbeVerifyNoResultRowØ00__func__Ø000[0], str(123447), 29)
}
-// This routine is called after all of the trigger actions have been parsed
-// in order to complete the process of building the trigger.
+// C comment
+// /*
+// ** This routine is called after all of the trigger actions have been parsed
+// ** in order to complete the process of building the trigger.
+// */
func _sqlite3FinishTrigger(tls *crt.TLS, _pParse *XParse, _pStepList *XTriggerStep, _pAll *XToken) {
var _iDb int32
var _zName, _3_z *int8
@@ -105870,94 +107197,92 @@ func _sqlite3FinishTrigger(tls *crt.TLS, _pParse *XParse, _pStepList *XTriggerSt
var _6_pTab *XTable
var _3_v *TVdbe
var _sFix XDbFixer
- _pTrig = (*XTrigger)(_pParse.X64)
- _db = (*Xsqlite3)(_pParse.X0)
- *(**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X64))))) = nil
+ _pTrig = (*XTrigger)(_pParse.XpNewTrigger)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ *(**XTrigger)(unsafe.Pointer(&_pParse.XpNewTrigger)) = nil
if func() int32 {
- if (_pParse.X16) != 0 {
+ if _pParse.XnErr != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122925), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FinishTriggerØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122925), unsafe.Pointer(&_sqlite3FinishTriggerØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 || (_pTrig == nil) {
goto _triggerfinish_cleanup
}
- _zName = _pTrig.X0
- _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTrig.X6))
- *(**XTriggerStep)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTrig.X8))))) = _pStepList
+ _zName = _pTrig.XzName
+ _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTrig.XpSchema))
+ *(**XTriggerStep)(unsafe.Pointer(&_pTrig.Xstep_list)) = _pStepList
_4:
if _pStepList != nil {
- *(**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pStepList.X2))))) = _pTrig
- _pStepList = (*XTriggerStep)(_pStepList.X8)
+ *(**XTrigger)(unsafe.Pointer(&_pStepList.XpTrig)) = _pTrig
+ _pStepList = (*XTriggerStep)(_pStepList.XpNext)
goto _4
}
- _sqlite3TokenInit(tls, &_nameToken, _pTrig.X0)
- _sqlite3FixInit(tls, &_sFix, _pParse, _iDb, str(23834), &_nameToken)
- if _sqlite3FixTriggerStep(tls, &_sFix, (*XTriggerStep)(_pTrig.X8)) != 0 || _sqlite3FixExpr(tls, &_sFix, (*XExpr)(_pTrig.X4)) != 0 {
+ _sqlite3TokenInit(tls, &_nameToken, _pTrig.XzName)
+ _sqlite3FixInit(tls, &_sFix, _pParse, _iDb, str(23789), &_nameToken)
+ if _sqlite3FixTriggerStep(tls, &_sFix, (*XTriggerStep)(_pTrig.Xstep_list)) != 0 || _sqlite3FixExpr(tls, &_sFix, (*XExpr)(_pTrig.XpWhen)) != 0 {
goto _triggerfinish_cleanup
}
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 {
+ if (_db.Xinit.Xbusy) != 0 {
goto _8
}
_3_v = _sqlite3GetVdbe(tls, _pParse)
if _3_v == nil {
goto _triggerfinish_cleanup
}
- _sqlite3BeginWriteOperation(tls, _pParse, i32(0), _iDb)
- _3_z = _sqlite3DbStrNDup(tls, _db, _pAll.X0, uint64(_pAll.X1))
- _sqlite3NestedParse(tls, _pParse, str(123448), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0), unsafe.Pointer(str(50026)), unsafe.Pointer(_zName), unsafe.Pointer(_pTrig.X1), unsafe.Pointer(_3_z))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_3_z))
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(0), _iDb)
+ _3_z = _sqlite3DbStrNDup(tls, _db, _pAll.Xz, uint64(_pAll.Xn))
+ _sqlite3NestedParse(tls, _pParse, str(123476), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName), unsafe.Pointer(str(49981)), unsafe.Pointer(_zName), unsafe.Pointer(_pTrig.Xtable), unsafe.Pointer(_3_z))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_3_z))
_sqlite3ChangeCookie(tls, _pParse, _iDb)
- _sqlite3VdbeAddParseSchemaOp(tls, _3_v, _iDb, _sqlite3MPrintf(tls, _db, str(123512), unsafe.Pointer(_zName)))
+ _sqlite3VdbeAddParseSchemaOp(tls, _3_v, _iDb, _sqlite3MPrintf(tls, _db, str(123540), unsafe.Pointer(_zName)))
_8:
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) == 0 {
+ if (_db.Xinit.Xbusy) == 0 {
goto _triggerfinish_cleanup
}
_4_pLink = _pTrig
- _4_pHash = (*XHash)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4).X4)))
+ _4_pHash = &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).XtrigHash)
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122966), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FinishTriggerØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122966), unsafe.Pointer(&_sqlite3FinishTriggerØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- _pTrig = (*XTrigger)(_sqlite3HashInsert(tls, _4_pHash, _zName, (unsafe.Pointer)(_pTrig)))
+ _pTrig = (*XTrigger)(_sqlite3HashInsert(tls, _4_pHash, _zName, unsafe.Pointer(_pTrig)))
if _pTrig != nil {
_sqlite3OomFault(tls, _db)
goto _15
}
- if (*XSchema)(_4_pLink.X6) == (*XSchema)(_4_pLink.X7) {
- _6_pTab = (*XTable)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&((*XSchema)(_4_pLink.X7).X2))), _4_pLink.X1))
+ if (*XSchema)(_4_pLink.XpSchema) == (*XSchema)(_4_pLink.XpTabSchema) {
+ _6_pTab = (*XTable)(_sqlite3HashFind(tls, &((*XSchema)(_4_pLink.XpTabSchema).XtblHash), _4_pLink.Xtable))
func() {
if _6_pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122973), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FinishTriggerØ00__func__Ø000))), unsafe.Pointer(str(43594)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122973), unsafe.Pointer(&_sqlite3FinishTriggerØ00__func__Ø000), unsafe.Pointer(str(43549)))
crt.X__builtin_abort(tls)
}
}()
- *(**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_4_pLink.X9))))) = (*XTrigger)(_6_pTab.X19)
- *(**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_6_pTab.X19))))) = _4_pLink
+ *(**XTrigger)(unsafe.Pointer(&_4_pLink.XpNext)) = (*XTrigger)(_6_pTab.XpTrigger)
+ *(**XTrigger)(unsafe.Pointer(&_6_pTab.XpTrigger)) = _4_pLink
}
_15:
_triggerfinish_cleanup:
_sqlite3DeleteTrigger(tls, _db, _pTrig)
func() {
- if (*XTrigger)(_pParse.X64) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122981), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3FinishTriggerØ00__func__Ø000))), unsafe.Pointer(str(123541)))
+ if _pParse.XpNewTrigger != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122981), unsafe.Pointer(&_sqlite3FinishTriggerØ00__func__Ø000), unsafe.Pointer(str(123569)))
crt.X__builtin_abort(tls)
}
}()
_sqlite3DeleteTriggerStep(tls, _db, _pStepList)
- _ = _sFix
- _ = _nameToken
}
var _sqlite3FinishTriggerØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3FinishTriggerØ00__func__Ø000[0], str(123562), 21)
+ crt.Xstrncpy(nil, &_sqlite3FinishTriggerØ00__func__Ø000[0], str(123590), 21)
}
func _sqlite3FixTriggerStep(tls *crt.TLS, _pFix *XDbFixer, _pStep *XTriggerStep) (r0 int32) {
@@ -105965,27 +107290,30 @@ _0:
if _pStep == nil {
goto _1
}
- if _sqlite3FixSelect(tls, _pFix, (*XSelect)(_pStep.X3)) != 0 {
- return i32(1)
+ if _sqlite3FixSelect(tls, _pFix, (*XSelect)(_pStep.XpSelect)) != 0 {
+ return int32(1)
}
- if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pStep.X5)) != 0 {
- return i32(1)
+ if _sqlite3FixExpr(tls, _pFix, (*XExpr)(_pStep.XpWhere)) != 0 {
+ return int32(1)
}
- if _sqlite3FixExprList(tls, _pFix, (*XExprList)(_pStep.X6)) != 0 {
- return i32(1)
+ if _sqlite3FixExprList(tls, _pFix, (*XExprList)(_pStep.XpExprList)) != 0 {
+ return int32(1)
}
- _pStep = (*XTriggerStep)(_pStep.X8)
+ _pStep = (*XTriggerStep)(_pStep.XpNext)
goto _0
_1:
- return i32(0)
-}
-
-// This is called by the parser when it sees a CREATE TRIGGER statement
-// up to the point of the BEGIN before the trigger actions. A Trigger
-// structure is generated based on the information available and stored
-// in pParse->pNewTrigger. After the trigger actions have been parsed, the
-// sqlite3FinishTrigger() function is called to complete the trigger
-// construction process.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** This is called by the parser when it sees a CREATE TRIGGER statement
+// ** up to the point of the BEGIN before the trigger actions. A Trigger
+// ** structure is generated based on the information available and stored
+// ** in pParse->pNewTrigger. After the trigger actions have been parsed, the
+// ** sqlite3FinishTrigger() function is called to complete the trigger
+// ** construction process.
+// */
func _sqlite3BeginTrigger(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2 *XToken, _tr_tm int32, _op int32, _pColumns *XIdList, _pTableName *XSrcList, _pWhen *XExpr, _isTemp int32, _noErr int32) {
var _iDb, _19_iTabDb, _19_code int32
var _zName, _19_zDb, _19_zDbTrig *int8
@@ -105996,68 +107324,68 @@ func _sqlite3BeginTrigger(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName
var _sFix XDbFixer
_pTrigger = nil
_zName = nil
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _pName1 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122744), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000))), unsafe.Pointer(str(123583)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122744), unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000), unsafe.Pointer(str(123611)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pName2 == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122745), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000))), unsafe.Pointer(str(111511)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122745), unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000), unsafe.Pointer(str(111539)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op != i32(108) && _op != i32(110) && _op != i32(109) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122746), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000))), unsafe.Pointer(str(123593)))
+ if _op != int32(108) && _op != int32(110) && _op != int32(109) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122746), unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000), unsafe.Pointer(str(123621)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _op <= i32(0) || _op >= i32(255) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122747), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000))), unsafe.Pointer(str(123641)))
+ if _op <= int32(0) || _op >= int32(255) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122747), unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000), unsafe.Pointer(str(123669)))
crt.X__builtin_abort(tls)
}
}()
if _isTemp == 0 {
goto _11
}
- if (_pName2.X1) > uint32(i32(0)) {
- _sqlite3ErrorMsg(tls, _pParse, str(123657))
+ if _pName2.Xn > (0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(123685))
goto _trigger_cleanup
}
- _iDb = i32(1)
+ _iDb = int32(1)
_pName = _pName1
goto _13
_11:
_iDb = _sqlite3TwoPartName(tls, _pParse, _pName1, _pName2, &_pName)
- if _iDb < i32(0) {
+ if _iDb < int32(0) {
goto _trigger_cleanup
}
_13:
- if (_pTableName == nil) || ((_db.X17) != 0) {
+ if (_pTableName == nil) || (_db.XmallocFailed != 0) {
goto _trigger_cleanup
}
- if (((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0) && (_iDb != i32(1)) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTableName.X2)))))+68*uintptr(i32(0)))).X1))
- *(**int8)(unsafe.Pointer(&((*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTableName.X2))))) + 68*uintptr(i32(0)))).X1))) = nil
+ if ((_db.Xinit.Xbusy) != 0) && (_iDb != int32(1)) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(elem6((*TSrcList_item)(unsafe.Pointer(&_pTableName.Xa)), 0).XzDatabase))
+ elem6((*TSrcList_item)(unsafe.Pointer(&_pTableName.Xa)), 0).XzDatabase = nil
}
_pTab = _sqlite3SrcListLookup(tls, _pParse, _pTableName)
- if (((int32((*t21)(unsafe.Pointer(&(_db.X33))).X2) == i32(0)) && ((_pName2.X1) == uint32(i32(0)))) && (_pTab != nil)) && ((*XSchema)(_pTab.X20) == (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(1)))).X4)) {
- _iDb = i32(1)
+ if (((int32(_db.Xinit.Xbusy) == int32(0)) && (_pName2.Xn == (0))) && (_pTab != nil)) && ((*XSchema)(_pTab.XpSchema) == (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema)) {
+ _iDb = int32(1)
}
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
goto _trigger_cleanup
}
func() {
- if (_pTableName.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122793), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000))), unsafe.Pointer(str(123703)))
+ if _pTableName.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122793), unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000), unsafe.Pointer(str(123731)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3FixInit(tls, &_sFix, _pParse, _iDb, str(23834), _pName)
+ _sqlite3FixInit(tls, &_sFix, _pParse, _iDb, str(23789), _pName)
if _sqlite3FixSrcList(tls, &_sFix, _pTableName) != 0 {
goto _trigger_cleanup
}
@@ -106065,35 +107393,35 @@ _13:
if _pTab != nil {
goto _27
}
- if int32((*t21)(unsafe.Pointer(&(_db.X33))).X1) == i32(1) {
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_db.X33))).X3))) = uint8(i32(1))
+ if int32(_db.Xinit.XiDb) == int32(1) {
+ _db.Xinit.XorphanTrigger = uint8(1)
}
goto _trigger_cleanup
_27:
- if (_pTab.X16) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(123723))
+ if _pTab.XnModuleArg != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(123751))
goto _trigger_cleanup
}
_zName = _sqlite3NameFromToken(tls, _db, _pName)
- if (_zName == nil) || (i32(0) != _sqlite3CheckObjectName(tls, _pParse, _zName)) {
+ if (_zName == nil) || (int32(0) != _sqlite3CheckObjectName(tls, _pParse, _zName)) {
goto _trigger_cleanup
}
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122825), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122825), unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X4).X4))), _zName) == nil {
+ if _sqlite3HashFind(tls, &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema).XtrigHash), _zName) == nil {
goto _34
}
if _noErr == 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(123764), unsafe.Pointer(_pName))
+ _sqlite3ErrorMsg(tls, _pParse, str(123792), unsafe.Pointer(_pName))
goto _36
}
func() {
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122830), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000))), unsafe.Pointer(str(112549)))
+ if (_db.Xinit.Xbusy) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122830), unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000), unsafe.Pointer(str(112577)))
crt.X__builtin_abort(tls)
}
}()
@@ -106101,151 +107429,159 @@ _27:
_36:
goto _trigger_cleanup
_34:
- if Xsqlite3_strnicmp(tls, _pTab.X0, str(111644), i32(7)) == i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(123790))
+ if Xsqlite3_strnicmp(tls, _pTab.XzName, str(111672), int32(7)) == int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(123818))
goto _trigger_cleanup
}
- if ((*XSelect)(_pTab.X3) != nil) && (_tr_tm != i32(48)) {
- _sqlite3ErrorMsg(tls, _pParse, str(123828), unsafe.Pointer(func() *int8 {
- if _tr_tm == i32(34) {
- return str(25167)
+ if (_pTab.XpSelect != nil) && (_tr_tm != int32(48)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(123856), unsafe.Pointer(func() *int8 {
+ if _tr_tm == int32(34) {
+ return str(25122)
}
- return str(25142)
- }()), unsafe.Pointer(_pTableName), i32(0))
+ return str(25097)
+ }()), unsafe.Pointer(_pTableName), int32(0))
goto _trigger_cleanup
}
- if ((*XSelect)(_pTab.X3) == nil) && (_tr_tm == i32(48)) {
- _sqlite3ErrorMsg(tls, _pParse, str(123865), unsafe.Pointer(_pTableName), i32(0))
+ if (_pTab.XpSelect == nil) && (_tr_tm == int32(48)) {
+ _sqlite3ErrorMsg(tls, _pParse, str(123893), unsafe.Pointer(_pTableName), int32(0))
goto _trigger_cleanup
}
- _19_iTabDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
- _19_code = i32(7)
- _19_zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_19_iTabDb))).X0
+ _19_iTabDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
+ _19_code = int32(7)
+ _19_zDb = elem27((*XDb)(_db.XaDb), uintptr(_19_iTabDb)).XzDbSName
_19_zDbTrig = func() *int8 {
if _isTemp != 0 {
- return ((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(1)))).X0)
+ return (elem27((*XDb)(_db.XaDb), uintptr(1)).XzDbSName)
}
return _19_zDb
}()
- if (_19_iTabDb == i32(1)) || _isTemp != 0 {
- _19_code = i32(5)
+ if (_19_iTabDb == int32(1)) || _isTemp != 0 {
+ _19_code = int32(5)
}
- if _sqlite3AuthCheck(tls, _pParse, _19_code, _zName, _pTab.X0, _19_zDbTrig) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, _19_code, _zName, _pTab.XzName, _19_zDbTrig) != 0 {
goto _trigger_cleanup
}
- if _sqlite3AuthCheck(tls, _pParse, i32(18), func() *int8 {
- if i32(1) != 0 && (_19_iTabDb == i32(1)) {
- return str(50007)
+ if _sqlite3AuthCheck(tls, _pParse, int32(18), func() *int8 {
+ if int32(1) != 0 && (_19_iTabDb == int32(1)) {
+ return str(49962)
}
- return str(50026)
+ return str(49981)
}(), nil, _19_zDb) != 0 {
goto _trigger_cleanup
}
- if _tr_tm == i32(48) {
- _tr_tm = i32(34)
+ if _tr_tm == int32(48) {
+ _tr_tm = int32(34)
}
- _pTrigger = (*XTrigger)(_sqlite3DbMallocZero(tls, _db, uint64(u32(36))))
+ _pTrigger = (*XTrigger)(_sqlite3DbMallocZero(tls, _db, uint64(36)))
if _pTrigger == nil {
goto _trigger_cleanup
}
- *(**int8)(unsafe.Pointer(&(_pTrigger.X0))) = _zName
+ _pTrigger.XzName = _zName
_zName = nil
- *(**int8)(unsafe.Pointer(&(_pTrigger.X1))) = _sqlite3DbStrDup(tls, _db, (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pTableName.X2)))))+68*uintptr(i32(0)))).X2)
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTrigger.X6))))) = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4)
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTrigger.X7))))) = (*XSchema)(_pTab.X20)
- *(*uint8)(unsafe.Pointer(&(_pTrigger.X2))) = uint8(_op)
- *(*uint8)(unsafe.Pointer(&(_pTrigger.X3))) = uint8(func() int32 {
- if _tr_tm == i32(34) {
- return i32(1)
- }
- return i32(2)
+ _pTrigger.Xtable = _sqlite3DbStrDup(tls, _db, elem6((*TSrcList_item)(unsafe.Pointer(&_pTableName.Xa)), 0).XzName)
+ *(**XSchema)(unsafe.Pointer(&_pTrigger.XpSchema)) = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema)
+ *(**XSchema)(unsafe.Pointer(&_pTrigger.XpTabSchema)) = (*XSchema)(_pTab.XpSchema)
+ _pTrigger.Xop = uint8(_op)
+ _pTrigger.Xtr_tm = uint8(func() int32 {
+ if _tr_tm == int32(34) {
+ return int32(1)
+ }
+ return int32(2)
}())
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTrigger.X4))))) = _sqlite3ExprDup(tls, _db, _pWhen, i32(1))
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTrigger.X5))))) = _sqlite3IdListDup(tls, _db, _pColumns)
+ *(**XExpr)(unsafe.Pointer(&_pTrigger.XpWhen)) = _sqlite3ExprDup(tls, _db, _pWhen, int32(1))
+ *(**XIdList)(unsafe.Pointer(&_pTrigger.XpColumns)) = _sqlite3IdListDup(tls, _db, _pColumns)
func() {
- if (*XTrigger)(_pParse.X64) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122893), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000))), unsafe.Pointer(str(24655)))
+ if (*XTrigger)(_pParse.XpNewTrigger) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122893), unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000), unsafe.Pointer(str(24610)))
crt.X__builtin_abort(tls)
}
}()
- *(**XTrigger)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X64))))) = _pTrigger
+ *(**XTrigger)(unsafe.Pointer(&_pParse.XpNewTrigger)) = _pTrigger
_trigger_cleanup:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zName))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zName))
_sqlite3SrcListDelete(tls, _db, _pTableName)
_sqlite3IdListDelete(tls, _db, _pColumns)
_sqlite3ExprDelete(tls, _db, _pWhen)
- if (*XTrigger)(_pParse.X64) == nil {
+ if _pParse.XpNewTrigger == nil {
_sqlite3DeleteTrigger(tls, _db, _pTrigger)
goto _62
}
func() {
- if (*XTrigger)(_pParse.X64) != _pTrigger {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122904), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000))), unsafe.Pointer(str(123911)))
+ if (*XTrigger)(_pParse.XpNewTrigger) != _pTrigger {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122904), unsafe.Pointer(&_sqlite3BeginTriggerØ00__func__Ø000), unsafe.Pointer(str(123939)))
crt.X__builtin_abort(tls)
}
}()
_62:
- _ = _sFix
}
var _sqlite3BeginTriggerØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BeginTriggerØ00__func__Ø000[0], str(123941), 20)
+ crt.Xstrncpy(nil, &_sqlite3BeginTriggerØ00__func__Ø000[0], str(123969), 20)
}
-// Construct a trigger step that implements an UPDATE statement and return
-// a pointer to that trigger step. The parser calls this routine when it
-// sees an UPDATE statement inside the body of a CREATE TRIGGER.
+// C comment
+// /*
+// ** Construct a trigger step that implements an UPDATE statement and return
+// ** a pointer to that trigger step. The parser calls this routine when it
+// ** sees an UPDATE statement inside the body of a CREATE TRIGGER.
+// */
func _sqlite3TriggerUpdateStep(tls *crt.TLS, _db *Xsqlite3, _pTableName *XToken, _pEList *XExprList, _pWhere *XExpr, _orconf uint8) (r0 *XTriggerStep) {
var _pTriggerStep *XTriggerStep
- _pTriggerStep = _triggerStepAllocate(tls, _db, uint8(i32(110)), _pTableName)
+ _pTriggerStep = _triggerStepAllocate(tls, _db, uint8(110), _pTableName)
if _pTriggerStep != nil {
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTriggerStep.X6))))) = _sqlite3ExprListDup(tls, _db, _pEList, i32(1))
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTriggerStep.X5))))) = _sqlite3ExprDup(tls, _db, _pWhere, i32(1))
- *(*uint8)(unsafe.Pointer(&(_pTriggerStep.X1))) = _orconf
+ *(**XExprList)(unsafe.Pointer(&_pTriggerStep.XpExprList)) = _sqlite3ExprListDup(tls, _db, _pEList, int32(1))
+ *(**XExpr)(unsafe.Pointer(&_pTriggerStep.XpWhere)) = _sqlite3ExprDup(tls, _db, _pWhere, int32(1))
+ _pTriggerStep.Xorconf = _orconf
}
_sqlite3ExprListDelete(tls, _db, _pEList)
_sqlite3ExprDelete(tls, _db, _pWhere)
return _pTriggerStep
}
-// Allocate space to hold a new trigger step. The allocated space
-// holds both the TriggerStep object and the TriggerStep.target.z string.
-//
-// If an OOM error occurs, NULL is returned and db->mallocFailed is set.
+// C comment
+// /*
+// ** Allocate space to hold a new trigger step. The allocated space
+// ** holds both the TriggerStep object and the TriggerStep.target.z string.
+// **
+// ** If an OOM error occurs, NULL is returned and db->mallocFailed is set.
+// */
func _triggerStepAllocate(tls *crt.TLS, _db *Xsqlite3, _op uint8, _pName *XToken) (r0 *XTriggerStep) {
var _1_z *int8
var _pTriggerStep *XTriggerStep
- _pTriggerStep = (*XTriggerStep)(_sqlite3DbMallocZero(tls, _db, uint64((u32(36)+(_pName.X1))+uint32(i32(1)))))
+ _pTriggerStep = (*XTriggerStep)(_sqlite3DbMallocZero(tls, _db, uint64((uint32(36)+_pName.Xn)+uint32(1))))
if _pTriggerStep != nil {
- _1_z = (*int8)(unsafe.Pointer((*XTriggerStep)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTriggerStep)) + 36*uintptr(i32(1))))))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_1_z), (unsafe.Pointer)(_pName.X0), _pName.X1)
+ _1_z = (*int8)(unsafe.Pointer(elem120(_pTriggerStep, uintptr(1))))
+ crt.Xmemcpy(tls, unsafe.Pointer(_1_z), unsafe.Pointer(_pName.Xz), _pName.Xn)
_sqlite3Dequote(tls, _1_z)
- *(**int8)(unsafe.Pointer(&(_pTriggerStep.X4))) = _1_z
- *(*uint8)(unsafe.Pointer(&(_pTriggerStep.X0))) = _op
+ _pTriggerStep.XzTarget = _1_z
+ _pTriggerStep.Xop = _op
}
return _pTriggerStep
}
-// Build a trigger step out of an INSERT statement. Return a pointer
-// to the new trigger step.
-//
-// The parser calls this routine when it sees an INSERT inside the
-// body of a trigger.
+// C comment
+// /*
+// ** Build a trigger step out of an INSERT statement. Return a pointer
+// ** to the new trigger step.
+// **
+// ** The parser calls this routine when it sees an INSERT inside the
+// ** body of a trigger.
+// */
func _sqlite3TriggerInsertStep(tls *crt.TLS, _db *Xsqlite3, _pTableName *XToken, _pColumn *XIdList, _pSelect *XSelect, _orconf uint8) (r0 *XTriggerStep) {
var _pTriggerStep *XTriggerStep
func() {
- if _pSelect == nil && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123044), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3TriggerInsertStepØ00__func__Ø000))), unsafe.Pointer(str(123961)))
+ if _pSelect == nil && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123044), unsafe.Pointer(&_sqlite3TriggerInsertStepØ00__func__Ø000), unsafe.Pointer(str(123989)))
crt.X__builtin_abort(tls)
}
}()
- _pTriggerStep = _triggerStepAllocate(tls, _db, uint8(i32(108)), _pTableName)
+ _pTriggerStep = _triggerStepAllocate(tls, _db, uint8(108), _pTableName)
if _pTriggerStep != nil {
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTriggerStep.X3))))) = _sqlite3SelectDup(tls, _db, _pSelect, i32(1))
- *(**XIdList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTriggerStep.X7))))) = _pColumn
- *(*uint8)(unsafe.Pointer(&(_pTriggerStep.X1))) = _orconf
+ *(**XSelect)(unsafe.Pointer(&_pTriggerStep.XpSelect)) = _sqlite3SelectDup(tls, _db, _pSelect, int32(1))
+ *(**XIdList)(unsafe.Pointer(&_pTriggerStep.XpIdList)) = _pColumn
+ _pTriggerStep.Xorconf = _orconf
goto _4
}
_sqlite3IdListDelete(tls, _db, _pColumn)
@@ -106257,96 +107593,104 @@ _4:
var _sqlite3TriggerInsertStepØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3TriggerInsertStepØ00__func__Ø000[0], str(123994), 25)
+ crt.Xstrncpy(nil, &_sqlite3TriggerInsertStepØ00__func__Ø000[0], str(124022), 25)
}
-// Construct a trigger step that implements a DELETE statement and return
-// a pointer to that trigger step. The parser calls this routine when it
-// sees a DELETE statement inside the body of a CREATE TRIGGER.
+// C comment
+// /*
+// ** Construct a trigger step that implements a DELETE statement and return
+// ** a pointer to that trigger step. The parser calls this routine when it
+// ** sees a DELETE statement inside the body of a CREATE TRIGGER.
+// */
func _sqlite3TriggerDeleteStep(tls *crt.TLS, _db *Xsqlite3, _pTableName *XToken, _pWhere *XExpr) (r0 *XTriggerStep) {
var _pTriggerStep *XTriggerStep
- _pTriggerStep = _triggerStepAllocate(tls, _db, uint8(i32(109)), _pTableName)
+ _pTriggerStep = _triggerStepAllocate(tls, _db, uint8(109), _pTableName)
if _pTriggerStep != nil {
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTriggerStep.X5))))) = _sqlite3ExprDup(tls, _db, _pWhere, i32(1))
- *(*uint8)(unsafe.Pointer(&(_pTriggerStep.X1))) = uint8(i32(10))
+ *(**XExpr)(unsafe.Pointer(&_pTriggerStep.XpWhere)) = _sqlite3ExprDup(tls, _db, _pWhere, int32(1))
+ _pTriggerStep.Xorconf = uint8(10)
}
_sqlite3ExprDelete(tls, _db, _pWhere)
return _pTriggerStep
}
-// Turn a SELECT statement (that the pSelect parameter points to) into
-// a trigger step. Return a pointer to a TriggerStep structure.
-//
-// The parser calls this routine when it finds a SELECT statement in
-// body of a TRIGGER.
+// C comment
+// /*
+// ** Turn a SELECT statement (that the pSelect parameter points to) into
+// ** a trigger step. Return a pointer to a TriggerStep structure.
+// **
+// ** The parser calls this routine when it finds a SELECT statement in
+// ** body of a TRIGGER.
+// */
func _sqlite3TriggerSelectStep(tls *crt.TLS, _db *Xsqlite3, _pSelect *XSelect) (r0 *XTriggerStep) {
var _pTriggerStep *XTriggerStep
- _pTriggerStep = (*XTriggerStep)(_sqlite3DbMallocZero(tls, _db, uint64(u32(36))))
+ _pTriggerStep = (*XTriggerStep)(_sqlite3DbMallocZero(tls, _db, uint64(36)))
if _pTriggerStep == nil {
_sqlite3SelectDelete(tls, _db, _pSelect)
return nil
}
- *(*uint8)(unsafe.Pointer(&(_pTriggerStep.X0))) = uint8(i32(119))
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pTriggerStep.X3))))) = _pSelect
- *(*uint8)(unsafe.Pointer(&(_pTriggerStep.X1))) = uint8(i32(10))
+ _pTriggerStep.Xop = uint8(119)
+ *(**XSelect)(unsafe.Pointer(&_pTriggerStep.XpSelect)) = _pSelect
+ _pTriggerStep.Xorconf = uint8(10)
return _pTriggerStep
}
-// This function is called to drop a trigger from the database schema.
-//
-// This may be called directly from the parser and therefore identifies
-// the trigger by name. The sqlite3DropTriggerPtr() routine does the
-// same job as this routine except it takes a pointer to the trigger
-// instead of the trigger name.
-// *
+// C comment
+// /*
+// ** This function is called to drop a trigger from the database schema.
+// **
+// ** This may be called directly from the parser and therefore identifies
+// ** the trigger by name. The sqlite3DropTriggerPtr() routine does the
+// ** same job as this routine except it takes a pointer to the trigger
+// ** instead of the trigger name.
+// **/
func _sqlite3DropTrigger(tls *crt.TLS, _pParse *XParse, _pName *XSrcList, _noErr int32) {
var _i, _2_j int32
var _zDb, _zName *int8
var _db *Xsqlite3
var _pTrigger *XTrigger
_pTrigger = nil
- _db = (*Xsqlite3)(_pParse.X0)
- if (_db.X17) != 0 {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _db.XmallocFailed != 0 {
goto _drop_trigger_cleanup
}
- if i32(0) != _sqlite3ReadSchema(tls, _pParse) {
+ if int32(0) != _sqlite3ReadSchema(tls, _pParse) {
goto _drop_trigger_cleanup
}
func() {
- if (_pName.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123138), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTriggerØ00__func__Ø000))), unsafe.Pointer(str(114791)))
+ if _pName.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123138), unsafe.Pointer(&_sqlite3DropTriggerØ00__func__Ø000), unsafe.Pointer(str(114819)))
crt.X__builtin_abort(tls)
}
}()
- _zDb = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pName.X2))))) + 68*uintptr(i32(0)))).X1
- _zName = (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pName.X2))))) + 68*uintptr(i32(0)))).X2
+ _zDb = elem6((*TSrcList_item)(unsafe.Pointer(&_pName.Xa)), 0).XzDatabase
+ _zName = elem6((*TSrcList_item)(unsafe.Pointer(&_pName.Xa)), 0).XzName
func() {
if _zDb == nil && _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123141), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTriggerØ00__func__Ø000))), unsafe.Pointer(str(59917)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123141), unsafe.Pointer(&_sqlite3DropTriggerØ00__func__Ø000), unsafe.Pointer(str(59893)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_7:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _10
}
_2_j = func() int32 {
- if _i < i32(2) {
- return (_i ^ i32(1))
+ if _i < int32(2) {
+ return (_i ^ int32(1))
}
return _i
}()
- if (_zDb != nil) && _sqlite3StrICmp(tls, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_2_j))).X0, _zDb) != 0 {
+ if (_zDb != nil) && _sqlite3StrICmp(tls, elem27((*XDb)(_db.XaDb), uintptr(_2_j)).XzDbSName, _zDb) != 0 {
goto _8
}
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _2_j, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(123145), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3DropTriggerØ00__func__Ø000))), unsafe.Pointer(str(59967)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(123145), unsafe.Pointer(&_sqlite3DropTriggerØ00__func__Ø000), unsafe.Pointer(str(59943)))
crt.X__builtin_abort(tls)
}
}()
- _pTrigger = (*XTrigger)(_sqlite3HashFind(tls, (*XHash)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_2_j))).X4).X4))), _zName))
+ _pTrigger = (*XTrigger)(_sqlite3HashFind(tls, &((*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_2_j)).XpSchema).XtrigHash), _zName))
if _pTrigger != nil {
goto _10
}
@@ -106358,12 +107702,12 @@ _10:
goto _18
}
if _noErr == 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(124019), unsafe.Pointer(_pName), i32(0))
+ _sqlite3ErrorMsg(tls, _pParse, str(124047), unsafe.Pointer(_pName), int32(0))
goto _20
}
_sqlite3CodeVerifyNamedSchema(tls, _pParse, _zDb)
_20:
- *(*uint8)(unsafe.Pointer(&(_pParse.X5))) = uint8(i32(1))
+ _pParse.XcheckSchema = uint8(1)
goto _drop_trigger_cleanup
_18:
_sqlite3DropTriggerPtr(tls, _pParse, _pTrigger)
@@ -106374,103 +107718,111 @@ _drop_trigger_cleanup:
var _sqlite3DropTriggerØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3DropTriggerØ00__func__Ø000[0], str(124039), 19)
+ crt.Xstrncpy(nil, &_sqlite3DropTriggerØ00__func__Ø000[0], str(124067), 19)
}
-// Called by the parser to compile an ATTACH statement.
-//
-// ATTACH p AS pDbname KEY pKey
+// C comment
+// /*
+// ** Called by the parser to compile an ATTACH statement.
+// **
+// ** ATTACH p AS pDbname KEY pKey
+// */
func _sqlite3Attach(tls *crt.TLS, _pParse *XParse, _p *XExpr, _pDbname *XExpr, _pKey *XExpr) {
- _codeAttach(tls, _pParse, i32(24), &_sqlite3AttachØ00attach_funcØ001, _p, _p, _pDbname, _pKey)
+ _codeAttach(tls, _pParse, int32(24), &_sqlite3AttachØ00attach_funcØ001, _p, _p, _pDbname, _pKey)
}
-// This procedure generates VDBE code for a single invocation of either the
-// sqlite_detach() or sqlite_attach() SQL user functions.
+// C comment
+// /*
+// ** This procedure generates VDBE code for a single invocation of either the
+// ** sqlite_detach() or sqlite_attach() SQL user functions.
+// */
func _codeAttach(tls *crt.TLS, _pParse *XParse, _type int32, _pFunc *XFuncDef, _pAuthArg *XExpr, _pFilename *XExpr, _pDbname *XExpr, _pKey *XExpr) {
var _rc, _regArgs int32
var _2_zAuthArg *int8
var _db *Xsqlite3
var _v *TVdbe
var _sName XNameContext
- _db = (*Xsqlite3)(_pParse.X0)
- if (_pParse.X16) != 0 {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pParse.XnErr != 0 {
goto _attach_end
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_sName), i32(0), u32(32))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_sName.X0))))) = _pParse
- if ((i32(0) != store1(&_rc, _resolveAttachExpr(tls, &_sName, _pFilename))) || (i32(0) != store1(&_rc, _resolveAttachExpr(tls, &_sName, _pDbname)))) || (i32(0) != store1(&_rc, _resolveAttachExpr(tls, &_sName, _pKey))) {
+ crt.Xmemset(tls, unsafe.Pointer(&_sName), int32(0), uint32(32))
+ *(**XParse)(unsafe.Pointer(&_sName.XpParse)) = _pParse
+ if ((int32(0) != store2(&_rc, _resolveAttachExpr(tls, &_sName, _pFilename))) || (int32(0) != store2(&_rc, _resolveAttachExpr(tls, &_sName, _pDbname)))) || (int32(0) != store2(&_rc, _resolveAttachExpr(tls, &_sName, _pKey))) {
goto _attach_end
}
if _pAuthArg == nil {
goto _4
}
- if int32(_pAuthArg.X0) == i32(97) {
- _2_zAuthArg = *(**int8)(unsafe.Pointer((*t27)(unsafe.Pointer(&(_pAuthArg.X3)))))
+ if int32(_pAuthArg.Xop) == int32(97) {
+ _2_zAuthArg = *(**int8)(unsafe.Pointer(&_pAuthArg.Xu))
goto _6
}
_2_zAuthArg = nil
_6:
_rc = _sqlite3AuthCheck(tls, _pParse, _type, _2_zAuthArg, nil, nil)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _attach_end
}
_4:
_v = _sqlite3GetVdbe(tls, _pParse)
- _regArgs = _sqlite3GetTempRange(tls, _pParse, i32(4))
+ _regArgs = _sqlite3GetTempRange(tls, _pParse, int32(4))
_sqlite3ExprCode(tls, _pParse, _pFilename, _regArgs)
- _sqlite3ExprCode(tls, _pParse, _pDbname, _regArgs+i32(1))
- _sqlite3ExprCode(tls, _pParse, _pKey, _regArgs+i32(2))
+ _sqlite3ExprCode(tls, _pParse, _pDbname, _regArgs+int32(1))
+ _sqlite3ExprCode(tls, _pParse, _pKey, _regArgs+int32(2))
func() {
- if _v == nil && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99197), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeAttachØ00__func__Ø000))), unsafe.Pointer(str(124058)))
+ if _v == nil && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99197), unsafe.Pointer(&_codeAttachØ00__func__Ø000), unsafe.Pointer(str(124086)))
crt.X__builtin_abort(tls)
}
}()
if _v != nil {
- _sqlite3VdbeAddOp4(tls, _v, i32(69), i32(0), (_regArgs+i32(3))-int32(_pFunc.X0), _regArgs+i32(3), (*int8)(unsafe.Pointer(_pFunc)), i32(-4))
+ _sqlite3VdbeAddOp4(tls, _v, int32(69), int32(0), (_regArgs+int32(3))-int32(_pFunc.XnArg), _regArgs+int32(3), (*int8)(unsafe.Pointer(_pFunc)), int32(-4))
func() {
- if int32(_pFunc.X0) != i32(-1) && (int32(_pFunc.X0)&i32(255)) != int32(_pFunc.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99201), unsafe.Pointer((*int8)(unsafe.Pointer(&_codeAttachØ00__func__Ø000))), unsafe.Pointer(str(124080)))
+ if int32(_pFunc.XnArg) != int32(-1) && (int32(_pFunc.XnArg)&int32(255)) != int32(_pFunc.XnArg) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99201), unsafe.Pointer(&_codeAttachØ00__func__Ø000), unsafe.Pointer(str(124108)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeChangeP5(tls, _v, uint16(uint8(_pFunc.X0)))
- _sqlite3VdbeAddOp1(tls, _v, i32(153), bool2int(_type == i32(24)))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(uint8(_pFunc.XnArg)))
+ _sqlite3VdbeAddOp1(tls, _v, int32(153), bool2int(_type == int32(24)))
}
_attach_end:
_sqlite3ExprDelete(tls, _db, _pFilename)
_sqlite3ExprDelete(tls, _db, _pDbname)
_sqlite3ExprDelete(tls, _db, _pKey)
- _ = _sName
-}
-
-// Resolve an expression that was part of an ATTACH or DETACH statement. This
-// is slightly different from resolving a normal SQL expression, because simple
-// identifiers are treated as strings, not possible column names or aliases.
-//
-// i.e. if the parser sees:
-//
-// ATTACH DATABASE abc AS def
-//
-// it treats the two expressions as literal strings 'abc' and 'def' instead of
-// looking for columns of the same name.
-//
-// This only applies to the root node of pExpr, so the statement:
-//
-// ATTACH DATABASE abc||def AS 'db2'
-//
-// will fail because neither abc or def can be resolved.
+}
+
+// C comment
+// /*
+// ** Resolve an expression that was part of an ATTACH or DETACH statement. This
+// ** is slightly different from resolving a normal SQL expression, because simple
+// ** identifiers are treated as strings, not possible column names or aliases.
+// **
+// ** i.e. if the parser sees:
+// **
+// ** ATTACH DATABASE abc AS def
+// **
+// ** it treats the two expressions as literal strings 'abc' and 'def' instead of
+// ** looking for columns of the same name.
+// **
+// ** This only applies to the root node of pExpr, so the statement:
+// **
+// ** ATTACH DATABASE abc||def AS 'db2'
+// **
+// ** will fail because neither abc or def can be resolved.
+// */
func _resolveAttachExpr(tls *crt.TLS, _pName *XNameContext, _pExpr *XExpr) (r0 int32) {
var _rc int32
- _rc = i32(0)
+ _rc = int32(0)
if _pExpr == nil {
goto _0
}
- if int32(_pExpr.X0) != i32(27) {
+ if int32(_pExpr.Xop) != int32(27) {
_rc = _sqlite3ResolveExprNames(tls, _pName, _pExpr)
goto _2
}
- *(*uint8)(unsafe.Pointer(&(_pExpr.X0))) = uint8(i32(97))
+ _pExpr.Xop = uint8(97)
_2:
_0:
return _rc
@@ -106479,26 +107831,29 @@ _0:
var _codeAttachØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_codeAttachØ00__func__Ø000[0], str(124131), 11)
+ crt.Xstrncpy(nil, &_codeAttachØ00__func__Ø000[0], str(124159), 11)
}
var _sqlite3AttachØ00attach_funcØ001 XFuncDef
func init() {
- _sqlite3AttachØ00attach_funcØ001 = XFuncDef{X0: i8(3), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ _sqlite3AttachØ00attach_funcØ001 = XFuncDef{XnArg: int8(3), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_attachFunc})), X5: nil, X6: str(124142), X7: t12{}}
-}
-
-// An SQL user-function registered to do the work of an ATTACH statement. The
-// three arguments to the function come directly from an attach statement:
-//
-// ATTACH DATABASE x AS y KEY z
-//
-// SELECT sqlite_attach(x, y, z)
-//
-// If the optional "KEY z" syntax is omitted, an SQL NULL is passed as the
-// third argument.
+ }{_attachFunc})), XzName: str(124170)}
+}
+
+// C comment
+// /*
+// ** An SQL user-function registered to do the work of an ATTACH statement. The
+// ** three arguments to the function come directly from an attach statement:
+// **
+// ** ATTACH DATABASE x AS y KEY z
+// **
+// ** SELECT sqlite_attach(x, y, z)
+// **
+// ** If the optional "KEY z" syntax is omitted, an SQL NULL is passed as the
+// ** third argument.
+// */
func _attachFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _argv **XMem) {
var _i, _rc, _14_iDb int32
var _flags uint32
@@ -106507,123 +107862,119 @@ func _attachFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _argv
var _aNew *XDb
var _9_pPager *XPager
var _pVfs *Xsqlite3_vfs
- _rc = i32(0)
+ _rc = int32(0)
_db = Xsqlite3_context_db_handle(tls, _context)
_zPath = nil
_zErr = nil
_zErrDyn = nil
- _zFile = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))))
- _zName = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))))
+ _zFile = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0))))
+ _zName = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))))
if _zFile == nil {
- _zFile = str(0)
+ _zFile = str(284)
}
if _zName == nil {
- _zName = str(0)
+ _zName = str(284)
}
- if (_db.X5) >= ((*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(7))))) + i32(2)) {
- _zErrDyn = _sqlite3MPrintf(tls, _db, str(124156), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(7)))))
+ if _db.XnDb >= ((*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(7))) + int32(2)) {
+ _zErrDyn = _sqlite3MPrintf(tls, _db, str(124184), *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(7)))
goto _attach_error
}
- if (_db.X15) == 0 {
- _zErrDyn = _sqlite3MPrintf(tls, _db, str(124193))
+ if _db.XautoCommit == 0 {
+ _zErrDyn = _sqlite3MPrintf(tls, _db, str(124221))
goto _attach_error
}
- _i = i32(0)
+ _i = int32(0)
_4:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _7
}
- _3_z = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X0
+ _3_z = elem27((*XDb)(_db.XaDb), uintptr(_i)).XzDbSName
func() {
if _3_z == nil || _zName == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98935), unsafe.Pointer((*int8)(unsafe.Pointer(&_attachFuncØ00__func__Ø000))), unsafe.Pointer(str(124235)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98935), unsafe.Pointer(&_attachFuncØ00__func__Ø000), unsafe.Pointer(str(124263)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3StrICmp(tls, _3_z, _zName) == i32(0) {
- _zErrDyn = _sqlite3MPrintf(tls, _db, str(124246), unsafe.Pointer(_zName))
+ if _sqlite3StrICmp(tls, _3_z, _zName) == int32(0) {
+ _zErrDyn = _sqlite3MPrintf(tls, _db, str(124274), unsafe.Pointer(_zName))
goto _attach_error
}
_i += 1
goto _4
_7:
- if (*XDb)(_db.X4) != (*XDb)(unsafe.Pointer((*[2]XDb)(unsafe.Pointer(&(_db.X72))))) {
+ if (*XDb)(_db.XaDb) != (*XDb)(unsafe.Pointer(&_db.XaDbStatic)) {
goto _12
}
- _aNew = (*XDb)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(48))))
+ _aNew = (*XDb)(_sqlite3DbMallocRawNN(tls, _db, uint64(48)))
if _aNew == nil {
return
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_aNew), _db.X4, u32(32))
+ crt.Xmemcpy(tls, unsafe.Pointer(_aNew), _db.XaDb, uint32(32))
goto _14
_12:
- _aNew = (*XDb)(_sqlite3DbRealloc(tls, _db, _db.X4, uint64(u32(16)*uint32((_db.X5)+i32(1)))))
+ _aNew = (*XDb)(_sqlite3DbRealloc(tls, _db, _db.XaDb, uint64(uint32(16)*uint32(_db.XnDb+int32(1)))))
if _aNew == nil {
return
}
_14:
- *(**XDb)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X4))))) = _aNew
- _aNew = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_db.X5)))
- crt.Xmemset(tls, (unsafe.Pointer)(_aNew), i32(0), u32(16))
- _flags = _db.X9
- _rc = _sqlite3ParseUri(tls, (*Xsqlite3_vfs)(_db.X0).X4, _zFile, &_flags, &_pVfs, &_zPath, &_zErr)
- if _rc == i32(0) {
+ *(**XDb)(unsafe.Pointer(&_db.XaDb)) = _aNew
+ _aNew = elem27((*XDb)(_db.XaDb), uintptr(_db.XnDb))
+ crt.Xmemset(tls, unsafe.Pointer(_aNew), int32(0), uint32(16))
+ _flags = _db.XopenFlags
+ _rc = _sqlite3ParseUri(tls, (*Xsqlite3_vfs)(_db.XpVfs).XzName, _zFile, &_flags, &_pVfs, &_zPath, &_zErr)
+ if _rc == int32(0) {
goto _16
}
- if _rc == i32(7) {
+ if _rc == int32(7) {
_sqlite3OomFault(tls, _db)
}
- Xsqlite3_result_error(tls, _context, _zErr, i32(-1))
- Xsqlite3_free(tls, (unsafe.Pointer)(_zErr))
+ Xsqlite3_result_error(tls, _context, _zErr, int32(-1))
+ Xsqlite3_free(tls, unsafe.Pointer(_zErr))
return
_16:
func() {
if _pVfs == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98969), unsafe.Pointer((*int8)(unsafe.Pointer(&_attachFuncØ00__func__Ø000))), unsafe.Pointer(str(124276)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98969), unsafe.Pointer(&_attachFuncØ00__func__Ø000), unsafe.Pointer(str(124304)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_flags
- *p = (*p) | uint32(i32(256))
- sink5(*p)
- }
- _rc = _sqlite3BtreeOpen(tls, _pVfs, _zPath, _db, (**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_aNew.X1))))), i32(0), int32(_flags))
- Xsqlite3_free(tls, (unsafe.Pointer)(_zPath))
- *(*int32)(unsafe.Pointer(&(_db.X5))) += 1
- *(*uint8)(unsafe.Pointer(&(_db.X25))) = uint8(i32(0))
- if _rc == i32(19) {
- _rc = i32(1)
- _zErrDyn = _sqlite3MPrintf(tls, _db, str(124281))
+ _flags |= uint32(256)
+ _rc = _sqlite3BtreeOpen(tls, _pVfs, _zPath, _db, (**XBtree)(unsafe.Pointer(&_aNew.XpBt)), int32(0), int32(_flags))
+ Xsqlite3_free(tls, unsafe.Pointer(_zPath))
+ _db.XnDb += 1
+ _db.XskipBtreeMutex = 0
+ if _rc == int32(19) {
+ _rc = int32(1)
+ _zErrDyn = _sqlite3MPrintf(tls, _db, str(124309))
goto _22
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _22
}
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_aNew.X4))))) = _sqlite3SchemaGet(tls, _db, (*XBtree)(_aNew.X1))
- if (*XSchema)(_aNew.X4) == nil {
- _rc = _sqlite3NomemError(tls, i32(98982))
+ *(**XSchema)(unsafe.Pointer(&_aNew.XpSchema)) = _sqlite3SchemaGet(tls, _db, (*XBtree)(_aNew.XpBt))
+ if _aNew.XpSchema == nil {
+ _rc = _sqlite3NomemError(tls, int32(98982))
goto _26
}
- if (((*XSchema)(_aNew.X4).X7) != 0) && (int32((*XSchema)(_aNew.X4).X8) != int32(_db.X14)) {
- _zErrDyn = _sqlite3MPrintf(tls, _db, str(50118))
- _rc = i32(1)
+ if (((*XSchema)(_aNew.XpSchema).Xfile_format) != 0) && (int32((*XSchema)(_aNew.XpSchema).Xenc) != int32(_db.Xenc)) {
+ _zErrDyn = _sqlite3MPrintf(tls, _db, str(50073))
+ _rc = int32(1)
}
_26:
- _sqlite3BtreeEnter(tls, (*XBtree)(_aNew.X1))
- _9_pPager = _sqlite3BtreePager(tls, (*XBtree)(_aNew.X1))
- _sqlite3PagerLockingMode(tls, _9_pPager, int32(_db.X19))
- _sqlite3BtreeSecureDelete(tls, (*XBtree)(_aNew.X1), _sqlite3BtreeSecureDelete(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X1), i32(-1)))
- _sqlite3BtreeSetPagerFlags(tls, (*XBtree)(_aNew.X1), uint32(i32(3)|((_db.X6)&i32(56))))
- _sqlite3BtreeLeave(tls, (*XBtree)(_aNew.X1))
+ _sqlite3BtreeEnter(tls, (*XBtree)(_aNew.XpBt))
+ _9_pPager = _sqlite3BtreePager(tls, (*XBtree)(_aNew.XpBt))
+ _sqlite3PagerLockingMode(tls, _9_pPager, int32(_db.XdfltLockMode))
+ _sqlite3BtreeSecureDelete(tls, (*XBtree)(_aNew.XpBt), _sqlite3BtreeSecureDelete(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), 0).XpBt), int32(-1)))
+ _sqlite3BtreeSetPagerFlags(tls, (*XBtree)(_aNew.XpBt), uint32(int32(3)|(_db.Xflags&int32(56))))
+ _sqlite3BtreeLeave(tls, (*XBtree)(_aNew.XpBt))
_22:
- *(*uint8)(unsafe.Pointer(&(_aNew.X2))) = uint8(i32(3))
- *(**int8)(unsafe.Pointer(&(_aNew.X0))) = _sqlite3DbStrDup(tls, _db, _zName)
- if (_rc == i32(0)) && ((_aNew.X0) == nil) {
- _rc = _sqlite3NomemError(tls, i32(99002))
+ _aNew.Xsafety_level = uint8(3)
+ _aNew.XzDbSName = _sqlite3DbStrDup(tls, _db, _zName)
+ if (_rc == int32(0)) && (_aNew.XzDbSName == nil) {
+ _rc = _sqlite3NomemError(tls, int32(99002))
}
- if _rc == i32(0) {
+ if _rc == int32(0) {
_sqlite3BtreeEnterAll(tls, _db)
_rc = _sqlite3Init(tls, _db, &_zErrDyn)
_sqlite3BtreeLeaveAll(tls, _db)
@@ -106631,28 +107982,28 @@ _22:
if _rc == 0 {
goto _30
}
- _14_iDb = (_db.X5) - i32(1)
+ _14_iDb = _db.XnDb - int32(1)
func() {
- if _14_iDb < i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(99059), unsafe.Pointer((*int8)(unsafe.Pointer(&_attachFuncØ00__func__Ø000))), unsafe.Pointer(str(124310)))
+ if _14_iDb < int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(99059), unsafe.Pointer(&_attachFuncØ00__func__Ø000), unsafe.Pointer(str(124338)))
crt.X__builtin_abort(tls)
}
}()
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_14_iDb))).X1) != nil {
- _sqlite3BtreeClose(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_14_iDb))).X1))
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_14_iDb))).X1))))) = nil
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_14_iDb))).X4))))) = nil
+ if (elem27((*XDb)(_db.XaDb), uintptr(_14_iDb)).XpBt) != nil {
+ _sqlite3BtreeClose(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_14_iDb)).XpBt))
+ *(**XBtree)(unsafe.Pointer(&(elem27((*XDb)(_db.XaDb), uintptr(_14_iDb)).XpBt))) = nil
+ *(**XSchema)(unsafe.Pointer(&(elem27((*XDb)(_db.XaDb), uintptr(_14_iDb)).XpSchema))) = nil
}
_sqlite3ResetAllSchemasOfConnection(tls, _db)
- *(*int32)(unsafe.Pointer(&(_db.X5))) = _14_iDb
- if (_rc == i32(7)) || (_rc == i32(3082)) {
+ _db.XnDb = _14_iDb
+ if (_rc == int32(7)) || (_rc == int32(3082)) {
_sqlite3OomFault(tls, _db)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErrDyn))
- _zErrDyn = _sqlite3MPrintf(tls, _db, str(59419))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErrDyn))
+ _zErrDyn = _sqlite3MPrintf(tls, _db, str(59395))
goto _37
}
if _zErrDyn == nil {
- _zErrDyn = _sqlite3MPrintf(tls, _db, str(124317), unsafe.Pointer(_zFile))
+ _zErrDyn = _sqlite3MPrintf(tls, _db, str(124345), unsafe.Pointer(_zFile))
}
_37:
goto _attach_error
@@ -106660,8 +108011,8 @@ _30:
return
_attach_error:
if _zErrDyn != nil {
- Xsqlite3_result_error(tls, _context, _zErrDyn, i32(-1))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErrDyn))
+ Xsqlite3_result_error(tls, _context, _zErrDyn, int32(-1))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErrDyn))
}
if _rc != 0 {
Xsqlite3_result_error_code(tls, _context, _rc)
@@ -106671,117 +108022,108 @@ _attach_error:
var _attachFuncØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_attachFuncØ00__func__Ø000[0], str(124345), 11)
-}
-
-// This function is used to parse both URIs and non-URI filenames passed by the
-// user to API functions sqlite3_open() or sqlite3_open_v2(), and for database
-// URIs specified as part of ATTACH statements.
-//
-// The first argument to this function is the name of the VFS to use (or
-// a NULL to signify the default VFS) if the URI does not contain a "vfs=xxx"
-// query parameter. The second argument contains the URI (or non-URI filename)
-// itself. When this function is called the *pFlags variable should contain
-// the default flags to open the database handle with. The value stored in
-// *pFlags may be updated before returning if the URI filename contains
-// "cache=xxx" or "mode=xxx" query parameters.
-//
-// If successful, SQLITE_OK is returned. In this case *ppVfs is set to point to
-// the VFS that should be used to open the database file. *pzFile is set to
-// point to a buffer containing the name of the file to open. It is the
-// responsibility of the caller to eventually call sqlite3_free() to release
-// this buffer.
-//
-// If an error occurs, then an SQLite error code is returned and *pzErrMsg
-// may be set to point to a buffer containing an English language error
-// message. It is the responsibility of the caller to eventually release
-// this buffer by calling sqlite3_free().
+ crt.Xstrncpy(nil, &_attachFuncØ00__func__Ø000[0], str(124373), 11)
+}
+
+// C comment
+// /*
+// ** This function is used to parse both URIs and non-URI filenames passed by the
+// ** user to API functions sqlite3_open() or sqlite3_open_v2(), and for database
+// ** URIs specified as part of ATTACH statements.
+// **
+// ** The first argument to this function is the name of the VFS to use (or
+// ** a NULL to signify the default VFS) if the URI does not contain a "vfs=xxx"
+// ** query parameter. The second argument contains the URI (or non-URI filename)
+// ** itself. When this function is called the *pFlags variable should contain
+// ** the default flags to open the database handle with. The value stored in
+// ** *pFlags may be updated before returning if the URI filename contains
+// ** "cache=xxx" or "mode=xxx" query parameters.
+// **
+// ** If successful, SQLITE_OK is returned. In this case *ppVfs is set to point to
+// ** the VFS that should be used to open the database file. *pzFile is set to
+// ** point to a buffer containing the name of the file to open. It is the
+// ** responsibility of the caller to eventually call sqlite3_free() to release
+// ** this buffer.
+// **
+// ** If an error occurs, then an SQLite error code is returned and *pzErrMsg
+// ** may be set to point to a buffer containing an English language error
+// ** message. It is the responsibility of the caller to eventually release
+// ** this buffer by calling sqlite3_free().
+// */
func _sqlite3ParseUri(tls *crt.TLS, _zDefaultVfs *int8, _zUri *int8, _pFlags *uint32, _ppVfs **Xsqlite3_vfs, _pzFile **int8, _pzErrMsg **int8) (r0 int32) {
var _rc, _nUri, _1_eState, _1_iIn, _1_iOut, _5_octet, _13_nOpt, _13_nVal, _15_mask, _15_limit, _18_i, _18_mode int32
var _c int8
var _flags uint32
var _1_nByte uint64
var _zVfs, _zFile, _1_zOpt, _13_zVal, _15_zModeType, _19_z *int8
- var _15_aMode *TIdList_item
- _rc = i32(0)
+ var _15_aMode *TOpenMode
+ _rc = int32(0)
_flags = *_pFlags
_zVfs = _zDefaultVfs
_nUri = _sqlite3Strlen30(tls, _zUri)
func() {
if (*_pzErrMsg) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143033), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ParseUriØ00__func__Ø000))), unsafe.Pointer(str(124356)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143033), unsafe.Pointer(&_sqlite3ParseUriØ00__func__Ø000), unsafe.Pointer(str(124384)))
crt.X__builtin_abort(tls)
}
}()
- if (_flags&uint32(i32(64))) == 0 && (_sqlite3Config.X3) == 0 || _nUri < i32(5) || crt.Xmemcmp(tls, (unsafe.Pointer)(_zUri), (unsafe.Pointer)(str(124369)), uint32(i32(5))) != i32(0) {
+ if (_flags&uint32(64)) == 0 && _sqlite3Config.XbOpenUri == 0 || _nUri < int32(5) || crt.Xmemcmp(tls, unsafe.Pointer(_zUri), unsafe.Pointer(str(124397)), uint32(5)) != int32(0) {
goto _5
}
- _1_iOut = i32(0)
- _1_nByte = uint64(_nUri + i32(2))
- {
- p := &_flags
- *p = (*p) | uint32(i32(64))
- sink5(*p)
- }
- _1_iIn = i32(0)
+ _1_iOut = int32(0)
+ _1_nByte = uint64(_nUri + int32(2))
+ _flags |= uint32(64)
+ _1_iIn = int32(0)
_6:
if _1_iIn >= _nUri {
goto _9
}
- {
- p := &_1_nByte
- *p = (*p) + uint64(bool2int(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn)))) == i32(38)))
- sink17(*p)
- }
+ _1_nByte += uint64(bool2int(int32(*elem1(_zUri, uintptr(_1_iIn))) == int32(38)))
_1_iIn += 1
goto _6
_9:
_zFile = (*int8)(Xsqlite3_malloc64(tls, _1_nByte))
if _zFile == nil {
- return _sqlite3NomemError(tls, i32(143051))
+ return _sqlite3NomemError(tls, int32(143051))
}
- _1_iIn = i32(5)
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(i32(5))))) != i32(47) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(i32(6))))) != i32(47) {
+ _1_iIn = int32(5)
+ if int32(*elem1(_zUri, uintptr(5))) != int32(47) || int32(*elem1(_zUri, uintptr(6))) != int32(47) {
goto _12
}
- _1_iIn = i32(7)
+ _1_iIn = int32(7)
_13:
- if ((*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn)))) != 0) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn)))) != i32(47)) {
+ if ((*elem1(_zUri, uintptr(_1_iIn))) != 0) && (int32(*elem1(_zUri, uintptr(_1_iIn))) != int32(47)) {
_1_iIn += 1
goto _13
}
- if (_1_iIn != i32(7)) && ((_1_iIn != i32(16)) || crt.Xmemcmp(tls, (unsafe.Pointer)(str(124375)), (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri))+1*uintptr(i32(7))))), uint32(i32(9))) != 0) {
- *_pzErrMsg = Xsqlite3_mprintf(tls, str(124385), _1_iIn-i32(7), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri))+1*uintptr(i32(7))))))
- _rc = i32(1)
+ if (_1_iIn != int32(7)) && ((_1_iIn != int32(16)) || crt.Xmemcmp(tls, unsafe.Pointer(str(124403)), unsafe.Pointer(elem1(_zUri, uintptr(7))), uint32(9)) != 0) {
+ *_pzErrMsg = Xsqlite3_mprintf(tls, str(124413), _1_iIn-int32(7), unsafe.Pointer(elem1(_zUri, uintptr(7))))
+ _rc = int32(1)
goto _parse_uri_out
}
_12:
- _1_eState = i32(0)
+ _1_eState = int32(0)
_19:
- if int32(store3(&_c, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn))))) == i32(0) || int32(_c) == i32(35) {
+ if int32(store5(&_c, *elem1(_zUri, uintptr(_1_iIn)))) == int32(0) || int32(_c) == int32(35) {
goto _20
}
_1_iIn += 1
- if int32(_c) != i32(37) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn))))))))&i32(8)) == 0 || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn+i32(1)))))))))&i32(8)) == 0 {
+ if int32(_c) != int32(37) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zUri, uintptr(_1_iIn))))))&int32(8)) == 0 || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zUri, uintptr(_1_iIn+int32(1)))))))&int32(8)) == 0 {
goto _24
}
- _5_octet = int32(_sqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(postInc1(&_1_iIn, int32(1)))))))) << uint(i32(4))
- {
- p := &_5_octet
- *p = (*p) + int32(_sqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(postInc1(&_1_iIn, int32(1))))))))
- sink1(*p)
- }
+ _5_octet = int32(_sqlite3HexToInt(tls, int32(*elem1(_zUri, uintptr(postInc2(&_1_iIn, 1)))))) << 4
+ _5_octet += int32(_sqlite3HexToInt(tls, int32(*elem1(_zUri, uintptr(postInc2(&_1_iIn, 1))))))
func() {
- if _5_octet < i32(0) || _5_octet >= i32(256) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143100), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ParseUriØ00__func__Ø000))), unsafe.Pointer(str(124413)))
+ if _5_octet < int32(0) || _5_octet >= int32(256) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143100), unsafe.Pointer(&_sqlite3ParseUriØ00__func__Ø000), unsafe.Pointer(str(124441)))
crt.X__builtin_abort(tls)
}
}()
- if _5_octet != i32(0) {
+ if _5_octet != int32(0) {
goto _28
}
_29:
- if ((((int32(store3(&_c, *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn))))) != i32(0)) && (int32(_c) != i32(35))) && ((_1_eState != i32(0)) || (int32(_c) != i32(63)))) && ((_1_eState != i32(1)) || ((int32(_c) != i32(61)) && (int32(_c) != i32(38))))) && ((_1_eState != i32(2)) || (int32(_c) != i32(38))) {
+ if ((((int32(store5(&_c, *elem1(_zUri, uintptr(_1_iIn)))) != int32(0)) && (int32(_c) != int32(35))) && ((_1_eState != int32(0)) || (int32(_c) != int32(63)))) && ((_1_eState != int32(1)) || ((int32(_c) != int32(61)) && (int32(_c) != int32(38))))) && ((_1_eState != int32(2)) || (int32(_c) != int32(38))) {
_1_iIn += 1
goto _29
}
@@ -106790,127 +108132,123 @@ _28:
_c = int8(_5_octet)
goto _54
_24:
- if _1_eState != i32(1) || int32(_c) != i32(38) && int32(_c) != i32(61) {
+ if _1_eState != int32(1) || int32(_c) != int32(38) && int32(_c) != int32(61) {
goto _42
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(_1_iOut-i32(1))))) != i32(0) {
+ if int32(*elem1(_zFile, uintptr(_1_iOut-int32(1)))) != int32(0) {
goto _43
}
_44:
- if (((*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn)))) != 0) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn)))) != i32(35))) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zUri)) + 1*uintptr(_1_iIn-i32(1))))) != i32(38)) {
+ if (((*elem1(_zUri, uintptr(_1_iIn))) != 0) && (int32(*elem1(_zUri, uintptr(_1_iIn))) != int32(35))) && (int32(*elem1(_zUri, uintptr(_1_iIn-int32(1)))) != int32(38)) {
_1_iIn += 1
goto _44
}
goto _19
_43:
- if int32(_c) == i32(38) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(postInc1(&_1_iOut, int32(1))))) = int8(i32(0))
+ if int32(_c) == int32(38) {
+ *elem1(_zFile, uintptr(postInc2(&_1_iOut, 1))) = 0
goto _49
}
- _1_eState = i32(2)
+ _1_eState = int32(2)
_49:
- _c = int8(i32(0))
+ _c = 0
goto _54
_42:
- if ((_1_eState == i32(0)) && (int32(_c) == i32(63))) || ((_1_eState == i32(2)) && (int32(_c) == i32(38))) {
- _c = int8(i32(0))
- _1_eState = i32(1)
+ if ((_1_eState == int32(0)) && (int32(_c) == int32(63))) || ((_1_eState == int32(2)) && (int32(_c) == int32(38))) {
+ _c = 0
+ _1_eState = int32(1)
}
_54:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(postInc1(&_1_iOut, int32(1))))) = _c
+ *elem1(_zFile, uintptr(postInc2(&_1_iOut, 1))) = _c
goto _19
_20:
- if _1_eState == i32(1) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(postInc1(&_1_iOut, int32(1))))) = int8(i32(0))
+ if _1_eState == int32(1) {
+ *elem1(_zFile, uintptr(postInc2(&_1_iOut, 1))) = 0
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(postInc1(&_1_iOut, int32(1))))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(postInc1(&_1_iOut, int32(1))))) = int8(i32(0))
- _1_zOpt = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(_sqlite3Strlen30(tls, _zFile)+i32(1))))
+ *elem1(_zFile, uintptr(postInc2(&_1_iOut, 1))) = 0
+ *elem1(_zFile, uintptr(postInc2(&_1_iOut, 1))) = 0
+ _1_zOpt = elem1(_zFile, uintptr(_sqlite3Strlen30(tls, _zFile)+int32(1)))
_56:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_zOpt)) + 1*uintptr(i32(0))))) == 0 {
+ if (*elem1(_1_zOpt, 0)) == 0 {
goto _57
}
_13_nOpt = _sqlite3Strlen30(tls, _1_zOpt)
- _13_zVal = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_zOpt)) + 1*uintptr(_13_nOpt+i32(1))))
+ _13_zVal = elem1(_1_zOpt, uintptr(_13_nOpt+int32(1)))
_13_nVal = _sqlite3Strlen30(tls, _13_zVal)
- if (_13_nOpt == i32(3)) && (crt.Xmemcmp(tls, (unsafe.Pointer)(str(124435)), (unsafe.Pointer)(_1_zOpt), uint32(i32(3))) == i32(0)) {
+ if (_13_nOpt == int32(3)) && (crt.Xmemcmp(tls, unsafe.Pointer(str(124463)), unsafe.Pointer(_1_zOpt), uint32(3)) == int32(0)) {
_zVfs = _13_zVal
goto _60
}
_15_aMode = nil
_15_zModeType = nil
- _15_mask = i32(0)
- _15_limit = i32(0)
- if (_13_nOpt == i32(5)) && (crt.Xmemcmp(tls, (unsafe.Pointer)(str(124439)), (unsafe.Pointer)(_1_zOpt), uint32(i32(5))) == i32(0)) {
- _15_mask = i32(393216)
- _15_aMode = (*TIdList_item)(unsafe.Pointer(&_sqlite3ParseUriØ00aCacheModeØ001))
+ _15_mask = int32(0)
+ _15_limit = int32(0)
+ if (_13_nOpt == int32(5)) && (crt.Xmemcmp(tls, unsafe.Pointer(str(124467)), unsafe.Pointer(_1_zOpt), uint32(5)) == int32(0)) {
+ _15_mask = int32(393216)
+ _15_aMode = (*TOpenMode)(unsafe.Pointer(&_sqlite3ParseUriØ00aCacheModeØ001))
_15_limit = _15_mask
- _15_zModeType = str(124439)
+ _15_zModeType = str(124467)
}
- if (_13_nOpt == i32(4)) && (crt.Xmemcmp(tls, (unsafe.Pointer)(str(124445)), (unsafe.Pointer)(_1_zOpt), uint32(i32(4))) == i32(0)) {
- _15_mask = i32(135)
- _15_aMode = (*TIdList_item)(unsafe.Pointer(&_sqlite3ParseUriØ00aOpenModeØ002))
+ if (_13_nOpt == int32(4)) && (crt.Xmemcmp(tls, unsafe.Pointer(str(124473)), unsafe.Pointer(_1_zOpt), uint32(4)) == int32(0)) {
+ _15_mask = int32(135)
+ _15_aMode = (*TOpenMode)(unsafe.Pointer(&_sqlite3ParseUriØ00aOpenModeØ002))
_15_limit = int32(uint32(_15_mask) & _flags)
- _15_zModeType = str(124450)
+ _15_zModeType = str(124478)
}
if _15_aMode == nil {
goto _65
}
- _18_mode = i32(0)
- _18_i = i32(0)
+ _18_mode = int32(0)
+ _18_i = int32(0)
_66:
- if ((*TIdList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_aMode)) + 8*uintptr(_18_i))).X0) == nil {
+ if (elem126(_15_aMode, uintptr(_18_i)).Xz) == nil {
goto _69
}
- _19_z = (*TIdList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_aMode)) + 8*uintptr(_18_i))).X0
- if (_13_nVal == _sqlite3Strlen30(tls, _19_z)) && (i32(0) == crt.Xmemcmp(tls, (unsafe.Pointer)(_13_zVal), (unsafe.Pointer)(_19_z), uint32(_13_nVal))) {
- _18_mode = (*TIdList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_aMode)) + 8*uintptr(_18_i))).X1
+ _19_z = elem126(_15_aMode, uintptr(_18_i)).Xz
+ if (_13_nVal == _sqlite3Strlen30(tls, _19_z)) && (int32(0) == crt.Xmemcmp(tls, unsafe.Pointer(_13_zVal), unsafe.Pointer(_19_z), uint32(_13_nVal))) {
+ _18_mode = elem126(_15_aMode, uintptr(_18_i)).Xmode
goto _69
}
_18_i += 1
goto _66
_69:
- if _18_mode == i32(0) {
- *_pzErrMsg = Xsqlite3_mprintf(tls, str(124457), unsafe.Pointer(_15_zModeType), unsafe.Pointer(_13_zVal))
- _rc = i32(1)
+ if _18_mode == int32(0) {
+ *_pzErrMsg = Xsqlite3_mprintf(tls, str(124485), unsafe.Pointer(_15_zModeType), unsafe.Pointer(_13_zVal))
+ _rc = int32(1)
goto _parse_uri_out
}
- if (_18_mode & i32(-129)) > _15_limit {
- *_pzErrMsg = Xsqlite3_mprintf(tls, str(124477), unsafe.Pointer(_15_zModeType), unsafe.Pointer(_13_zVal))
- _rc = i32(3)
+ if (_18_mode & int32(-129)) > _15_limit {
+ *_pzErrMsg = Xsqlite3_mprintf(tls, str(124505), unsafe.Pointer(_15_zModeType), unsafe.Pointer(_13_zVal))
+ _rc = int32(3)
goto _parse_uri_out
}
_flags = (_flags & uint32(^_15_mask)) | uint32(_18_mode)
_65:
_60:
- _1_zOpt = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_13_zVal)) + 1*uintptr(_13_nVal+i32(1))))
+ _1_zOpt = elem1(_13_zVal, uintptr(_13_nVal+int32(1)))
goto _56
_57:
goto _74
_5:
- _zFile = (*int8)(Xsqlite3_malloc64(tls, uint64(_nUri+i32(2))))
+ _zFile = (*int8)(Xsqlite3_malloc64(tls, uint64(_nUri+int32(2))))
if _zFile == nil {
- return _sqlite3NomemError(tls, i32(143224))
+ return _sqlite3NomemError(tls, int32(143224))
}
if _nUri != 0 {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zFile), (unsafe.Pointer)(_zUri), uint32(_nUri))
- }
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(_nUri))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(_nUri+i32(1)))) = int8(i32(0))
- {
- p := &_flags
- *p = (*p) & uint32(i32(-65))
- sink5(*p)
+ crt.Xmemcpy(tls, unsafe.Pointer(_zFile), unsafe.Pointer(_zUri), uint32(_nUri))
}
+ *elem1(_zFile, uintptr(_nUri)) = 0
+ *elem1(_zFile, uintptr(_nUri+int32(1))) = 0
+ _flags &= uint32(4294967231)
_74:
*_ppVfs = Xsqlite3_vfs_find(tls, _zVfs)
if (*_ppVfs) == nil {
- *_pzErrMsg = Xsqlite3_mprintf(tls, str(124501), unsafe.Pointer(_zVfs))
- _rc = i32(1)
+ *_pzErrMsg = Xsqlite3_mprintf(tls, str(124529), unsafe.Pointer(_zVfs))
+ _rc = int32(1)
}
_parse_uri_out:
- if _rc != i32(0) {
- Xsqlite3_free(tls, (unsafe.Pointer)(_zFile))
+ if _rc != int32(0) {
+ Xsqlite3_free(tls, unsafe.Pointer(_zFile))
_zFile = nil
}
*_pFlags = _flags
@@ -106921,130 +108259,139 @@ _parse_uri_out:
var _sqlite3ParseUriØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ParseUriØ00__func__Ø000[0], str(124517), 16)
+ crt.Xstrncpy(nil, &_sqlite3ParseUriØ00__func__Ø000[0], str(124545), 16)
}
-var _sqlite3ParseUriØ00aCacheModeØ001 [3]TIdList_item
+var _sqlite3ParseUriØ00aCacheModeØ001 [3]TOpenMode
func init() {
- _sqlite3ParseUriØ00aCacheModeØ001 = [3]TIdList_item{TIdList_item{X0: str(123364), X1: i32(131072)}, TIdList_item{X0: str(124533), X1: i32(262144)}, TIdList_item{}}
+ _sqlite3ParseUriØ00aCacheModeØ001 = [3]TOpenMode{TOpenMode{Xz: str(123392), Xmode: int32(131072)}, TOpenMode{Xz: str(124561), Xmode: int32(262144)}, TOpenMode{}}
}
-var _sqlite3ParseUriØ00aOpenModeØ002 [5]TIdList_item
+var _sqlite3ParseUriØ00aOpenModeØ002 [5]TOpenMode
func init() {
- _sqlite3ParseUriØ00aOpenModeØ002 = [5]TIdList_item{TIdList_item{X0: str(124541), X1: i32(1)}, TIdList_item{X0: str(124544), X1: i32(2)}, TIdList_item{X0: str(124547), X1: i32(6)}, TIdList_item{X0: str(91155), X1: i32(128)}, TIdList_item{}}
+ _sqlite3ParseUriØ00aOpenModeØ002 = [5]TOpenMode{TOpenMode{Xz: str(124569), Xmode: int32(1)}, TOpenMode{Xz: str(124572), Xmode: int32(2)}, TOpenMode{Xz: str(124575), Xmode: int32(6)}, TOpenMode{Xz: str(89677), Xmode: int32(128)}, TOpenMode{}}
}
-// Find and return the schema associated with a BTree. Create
-// a new one if necessary.
+// C comment
+// /*
+// ** Find and return the schema associated with a BTree. Create
+// ** a new one if necessary.
+// */
func _sqlite3SchemaGet(tls *crt.TLS, _db *Xsqlite3, _pBt *XBtree) (r0 *XSchema) {
var _p *XSchema
if _pBt != nil {
- _p = (*XSchema)(_sqlite3BtreeSchema(tls, _pBt, int32(u32(84)), _sqlite3SchemaClear))
+ _p = (*XSchema)(_sqlite3BtreeSchema(tls, _pBt, int32(84), _sqlite3SchemaClear))
goto _1
}
- _p = (*XSchema)(_sqlite3DbMallocZero(tls, nil, uint64(u32(84))))
+ _p = (*XSchema)(_sqlite3DbMallocZero(tls, nil, uint64(84)))
_1:
if _p == nil {
_sqlite3OomFault(tls, _db)
goto _4
}
- if i32(0) == int32(_p.X7) {
- _sqlite3HashInit(tls, (*XHash)(unsafe.Pointer(&(_p.X2))))
- _sqlite3HashInit(tls, (*XHash)(unsafe.Pointer(&(_p.X3))))
- _sqlite3HashInit(tls, (*XHash)(unsafe.Pointer(&(_p.X4))))
- _sqlite3HashInit(tls, (*XHash)(unsafe.Pointer(&(_p.X5))))
- *(*uint8)(unsafe.Pointer(&(_p.X8))) = uint8(i32(1))
+ if int32(0) == int32(_p.Xfile_format) {
+ _sqlite3HashInit(tls, &_p.XtblHash)
+ _sqlite3HashInit(tls, &_p.XidxHash)
+ _sqlite3HashInit(tls, &_p.XtrigHash)
+ _sqlite3HashInit(tls, &_p.XfkeyHash)
+ _p.Xenc = uint8(1)
}
_4:
return _p
}
func Xsqlite3_result_error_code(tls *crt.TLS, _pCtx *Xsqlite3_context, _errCode int32) {
- *(*int32)(unsafe.Pointer(&(_pCtx.X5))) = _errCode
- *(*uint8)(unsafe.Pointer(&(_pCtx.X7))) = uint8(i32(1))
- if (*TVdbe)(_pCtx.X3) != nil {
- *(*int32)(unsafe.Pointer(&((*TVdbe)(_pCtx.X3).X28))) = _errCode
+ _pCtx.XisError = _errCode
+ _pCtx.XfErrorOrAux = uint8(1)
+ if _pCtx.XpVdbe != nil {
+ (*TVdbe)(_pCtx.XpVdbe).XrcApp = _errCode
}
- if (int32((*XMem)(_pCtx.X0).X1) & i32(1)) != 0 {
- _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.X0), _sqlite3ErrStr(tls, _errCode), i32(-1), uint8(i32(1)), nil)
+ if (int32((*XMem)(_pCtx.XpOut).Xflags) & int32(1)) != 0 {
+ _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.XpOut), _sqlite3ErrStr(tls, _errCode), int32(-1), uint8(1), nil)
}
}
-// Called by the parser to compile a DETACH statement.
-//
-// DETACH pDbname
+// C comment
+// /*
+// ** Called by the parser to compile a DETACH statement.
+// **
+// ** DETACH pDbname
+// */
func _sqlite3Detach(tls *crt.TLS, _pParse *XParse, _pDbname *XExpr) {
- _codeAttach(tls, _pParse, i32(25), &_sqlite3DetachØ00detach_funcØ001, _pDbname, nil, nil, _pDbname)
+ _codeAttach(tls, _pParse, int32(25), &_sqlite3DetachØ00detach_funcØ001, _pDbname, nil, nil, _pDbname)
}
var _sqlite3DetachØ00detach_funcØ001 XFuncDef
func init() {
- _sqlite3DetachØ00detach_funcØ001 = XFuncDef{X0: i8(1), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ _sqlite3DetachØ00detach_funcØ001 = XFuncDef{XnArg: int8(1), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_detachFunc})), X5: nil, X6: str(124551), X7: t12{}}
-}
-
-// An SQL user-function registered to do the work of an DETACH statement. The
-// three arguments to the function come directly from a detach statement:
-//
-// DETACH DATABASE x
-//
-// SELECT sqlite_detach(x)
+ }{_detachFunc})), XzName: str(124579)}
+}
+
+// C comment
+// /*
+// ** An SQL user-function registered to do the work of an DETACH statement. The
+// ** three arguments to the function come directly from a detach statement:
+// **
+// ** DETACH DATABASE x
+// **
+// ** SELECT sqlite_detach(x)
+// */
func _detachFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _argv **XMem) {
var _i int32
var _zName *int8
var _db *Xsqlite3
var _pDb *XDb
var _zErr [128]int8
- _zName = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))))
+ _zName = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0))))
_db = Xsqlite3_context_db_handle(tls, _context)
_pDb = nil
if _zName == nil {
- _zName = str(0)
+ _zName = str(284)
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _4
}
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i)))
- if (*XBtree)(_pDb.X1) == nil {
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_i))
+ if (*XBtree)(_pDb.XpBt) == nil {
goto _2
}
- if _sqlite3StrICmp(tls, _pDb.X0, _zName) == i32(0) {
+ if _sqlite3StrICmp(tls, _pDb.XzDbSName, _zName) == int32(0) {
goto _4
}
_2:
_i += 1
goto _1
_4:
- if _i >= (_db.X5) {
- Xsqlite3_snprintf(tls, int32(u32(128)), (*int8)(unsafe.Pointer(&_zErr)), str(124565), unsafe.Pointer(_zName))
+ if _i >= _db.XnDb {
+ Xsqlite3_snprintf(tls, int32(128), (*int8)(unsafe.Pointer(&_zErr)), str(124593), unsafe.Pointer(_zName))
goto _detach_error
}
- if _i < i32(2) {
- Xsqlite3_snprintf(tls, int32(u32(128)), (*int8)(unsafe.Pointer(&_zErr)), str(124586), unsafe.Pointer(_zName))
+ if _i < int32(2) {
+ Xsqlite3_snprintf(tls, int32(128), (*int8)(unsafe.Pointer(&_zErr)), str(124614), unsafe.Pointer(_zName))
goto _detach_error
}
- if (_db.X15) == 0 {
- Xsqlite3_snprintf(tls, int32(u32(128)), (*int8)(unsafe.Pointer(&_zErr)), str(124612))
+ if _db.XautoCommit == 0 {
+ Xsqlite3_snprintf(tls, int32(128), (*int8)(unsafe.Pointer(&_zErr)), str(124640))
goto _detach_error
}
- if _sqlite3BtreeIsInReadTrans(tls, (*XBtree)(_pDb.X1)) != 0 || _sqlite3BtreeIsInBackup(tls, (*XBtree)(_pDb.X1)) != 0 {
- Xsqlite3_snprintf(tls, int32(u32(128)), (*int8)(unsafe.Pointer(&_zErr)), str(124654), unsafe.Pointer(_zName))
+ if _sqlite3BtreeIsInReadTrans(tls, (*XBtree)(_pDb.XpBt)) != 0 || _sqlite3BtreeIsInBackup(tls, (*XBtree)(_pDb.XpBt)) != 0 {
+ Xsqlite3_snprintf(tls, int32(128), (*int8)(unsafe.Pointer(&_zErr)), str(124682), unsafe.Pointer(_zName))
goto _detach_error
}
- _sqlite3BtreeClose(tls, (*XBtree)(_pDb.X1))
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pDb.X1))))) = nil
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pDb.X4))))) = nil
+ _sqlite3BtreeClose(tls, (*XBtree)(_pDb.XpBt))
+ *(**XBtree)(unsafe.Pointer(&_pDb.XpBt)) = nil
+ *(**XSchema)(unsafe.Pointer(&_pDb.XpSchema)) = nil
_sqlite3CollapseDatabaseArray(tls, _db)
return
_detach_error:
- Xsqlite3_result_error(tls, _context, (*int8)(unsafe.Pointer(&_zErr)), i32(-1))
+ Xsqlite3_result_error(tls, _context, (*int8)(unsafe.Pointer(&_zErr)), int32(-1))
_ = _zErr
}
@@ -107056,8 +108403,8 @@ func _sqlite3Reindex(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2 *XT
var _pObjName *XToken
var _pIndex *XIndex
var _pColl *XCollSeq
- _db = (*Xsqlite3)(_pParse.X0)
- if i32(0) != _sqlite3ReadSchema(tls, _pParse) {
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if int32(0) != _sqlite3ReadSchema(tls, _pParse) {
return
}
if _pName1 == nil {
@@ -107067,56 +108414,56 @@ func _sqlite3Reindex(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2 *XT
if func() int32 {
if _pName2 == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104007), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ReindexØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104007), unsafe.Pointer(&_sqlite3ReindexØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
- }() == 0 && (_pName2.X0) != nil {
+ return int32(0)
+ }() == 0 && _pName2.Xz != nil {
goto _6
}
func() {
- if (_pName1.X0) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104009), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3ReindexØ00__func__Ø000))), unsafe.Pointer(str(124676)))
+ if _pName1.Xz == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104009), unsafe.Pointer(&_sqlite3ReindexØ00__func__Ø000), unsafe.Pointer(str(124704)))
crt.X__builtin_abort(tls)
}
}()
- _3_zColl = _sqlite3NameFromToken(tls, (*Xsqlite3)(_pParse.X0), _pName1)
+ _3_zColl = _sqlite3NameFromToken(tls, (*Xsqlite3)(_pParse.Xdb), _pName1)
if _3_zColl == nil {
return
}
- _pColl = _sqlite3FindCollSeq(tls, _db, _db.X14, _3_zColl, i32(0))
+ _pColl = _sqlite3FindCollSeq(tls, _db, _db.Xenc, _3_zColl, int32(0))
if _pColl != nil {
_reindexDatabases(tls, _pParse, _3_zColl)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_3_zColl))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_3_zColl))
return
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_3_zColl))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_3_zColl))
_6:
_iDb = _sqlite3TwoPartName(tls, _pParse, _pName1, _pName2, &_pObjName)
- if _iDb < i32(0) {
+ if _iDb < int32(0) {
return
}
_z = _sqlite3NameFromToken(tls, _db, _pObjName)
if _z == nil {
return
}
- _zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
+ _zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
_pTab = _sqlite3FindTable(tls, _db, _z, _zDb)
if _pTab != nil {
_reindexTable(tls, _pParse, _pTab, nil)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_z))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_z))
return
}
_pIndex = _sqlite3FindIndex(tls, _db, _z, _zDb)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_z))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_z))
if _pIndex != nil {
- _sqlite3BeginWriteOperation(tls, _pParse, i32(0), _iDb)
- _sqlite3RefillIndex(tls, _pParse, _pIndex, i32(-1))
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(0), _iDb)
+ _sqlite3RefillIndex(tls, _pParse, _pIndex, int32(-1))
return
}
- _sqlite3ErrorMsg(tls, _pParse, str(124686))
+ _sqlite3ErrorMsg(tls, _pParse, str(124714))
}
func _reindexDatabases(tls *crt.TLS, _pParse *XParse, _zColl *int8) {
@@ -107125,32 +108472,32 @@ func _reindexDatabases(tls *crt.TLS, _pParse *XParse, _zColl *int8) {
var _pDb *XDb
var _k *XHashElem
var _pTab *XTable
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
if _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103963), unsafe.Pointer((*int8)(unsafe.Pointer(&_reindexDatabasesØ00__func__Ø000))), unsafe.Pointer(str(9421)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103963), unsafe.Pointer(&_reindexDatabasesØ00__func__Ø000), unsafe.Pointer(str(9376)))
crt.X__builtin_abort(tls)
}
}()
- *func() **XDb { _iDb = i32(0); return &_pDb }() = (*XDb)(_db.X4)
+ *func() **XDb { _iDb = int32(0); return &_pDb }() = (*XDb)(_db.XaDb)
_2:
- if _iDb >= (_db.X5) {
+ if _iDb >= _db.XnDb {
goto _5
}
func() {
if _pDb == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103965), unsafe.Pointer((*int8)(unsafe.Pointer(&_reindexDatabasesØ00__func__Ø000))), unsafe.Pointer(str(124732)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103965), unsafe.Pointer(&_reindexDatabasesØ00__func__Ø000), unsafe.Pointer(str(124760)))
crt.X__builtin_abort(tls)
}
}()
- _k = (*XHashElem)((*XHash)(unsafe.Pointer(&((*XSchema)(_pDb.X4).X2))).X2)
+ _k = (*XHashElem)(((*XSchema)(_pDb.XpSchema).XtblHash).Xfirst)
_8:
if _k == nil {
goto _11
}
- _pTab = (*XTable)(_k.X2)
+ _pTab = (*XTable)(_k.Xdata)
_reindexTable(tls, _pParse, _pTab, _zColl)
- _k = (*XHashElem)(_k.X0)
+ _k = (*XHashElem)(_k.Xnext)
goto _8
_11:
*(*uintptr)(unsafe.Pointer(func() **XDb { _iDb += 1; return &_pDb }())) += uintptr(16)
@@ -107161,23 +108508,23 @@ _5:
var _reindexDatabasesØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_reindexDatabasesØ00__func__Ø000[0], str(124739), 17)
+ crt.Xstrncpy(nil, &_reindexDatabasesØ00__func__Ø000[0], str(124767), 17)
}
func _reindexTable(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _zColl *int8) {
var _2_iDb int32
var _pIndex *XIndex
- _pIndex = (*XIndex)(_pTab.X2)
+ _pIndex = (*XIndex)(_pTab.XpIndex)
_0:
if _pIndex == nil {
goto _3
}
if (_zColl == nil) || _collationMatch(tls, _zColl, _pIndex) != 0 {
- _2_iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTab.X20))
- _sqlite3BeginWriteOperation(tls, _pParse, i32(0), _2_iDb)
- _sqlite3RefillIndex(tls, _pParse, _pIndex, i32(-1))
+ _2_iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTab.XpSchema))
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(0), _2_iDb)
+ _sqlite3RefillIndex(tls, _pParse, _pIndex, int32(-1))
}
- _pIndex = (*XIndex)(_pIndex.X5)
+ _pIndex = (*XIndex)(_pIndex.XpNext)
goto _0
_3:
}
@@ -107187,53 +108534,56 @@ func _collationMatch(tls *crt.TLS, _zColl *int8, _pIndex *XIndex) (r0 int32) {
var _1_z *int8
func() {
if _zColl == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103920), unsafe.Pointer((*int8)(unsafe.Pointer(&_collationMatchØ00__func__Ø000))), unsafe.Pointer(str(124756)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103920), unsafe.Pointer(&_collationMatchØ00__func__Ø000), unsafe.Pointer(str(124784)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_2:
- if _i >= int32(_pIndex.X14) {
+ if _i >= int32(_pIndex.XnColumn) {
goto _5
}
- _1_z = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X8)) + 4*uintptr(_i)))
+ _1_z = *elem0(_pIndex.XazColl, uintptr(_i))
func() {
- if _1_z == nil && int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_i)))) >= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(103923), unsafe.Pointer((*int8)(unsafe.Pointer(&_collationMatchØ00__func__Ø000))), unsafe.Pointer(str(124765)))
+ if _1_z == nil && int32(*elem50(_pIndex.XaiColumn, uintptr(_i))) >= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(103923), unsafe.Pointer(&_collationMatchØ00__func__Ø000), unsafe.Pointer(str(124793)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIndex.X1)) + 2*uintptr(_i)))) >= i32(0)) && (i32(0) == _sqlite3StrICmp(tls, _1_z, _zColl)) {
- return i32(1)
+ if (int32(*elem50(_pIndex.XaiColumn, uintptr(_i))) >= int32(0)) && (int32(0) == _sqlite3StrICmp(tls, _1_z, _zColl)) {
+ return int32(1)
}
_i += 1
goto _2
_5:
- return i32(0)
+ return int32(0)
}
var _collationMatchØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_collationMatchØ00__func__Ø000[0], str(124795), 15)
+ crt.Xstrncpy(nil, &_collationMatchØ00__func__Ø000[0], str(124823), 15)
}
var _sqlite3ReindexØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3ReindexØ00__func__Ø000[0], str(124810), 15)
+ crt.Xstrncpy(nil, &_sqlite3ReindexØ00__func__Ø000[0], str(124838), 15)
}
-// Generate code for the ANALYZE command. The parser calls this routine
-// when it recognizes an ANALYZE command.
-//
-// ANALYZE -- 1
-// ANALYZE <database> -- 2
-// ANALYZE ?<database>.?<tablename> -- 3
-//
-// Form 1 causes all indices in all attached databases to be analyzed.
-// Form 2 analyzes all indices the single database named.
-// Form 3 analyzes all indices associated with the named table.
+// C comment
+// /*
+// ** Generate code for the ANALYZE command. The parser calls this routine
+// ** when it recognizes an ANALYZE command.
+// **
+// ** ANALYZE -- 1
+// ** ANALYZE <database> -- 2
+// ** ANALYZE ?<database>.?<tablename> -- 3
+// **
+// ** Form 1 causes all indices in all attached databases to be analyzed.
+// ** Form 2 analyzes all indices the single database named.
+// ** Form 3 analyzes all indices associated with the named table.
+// */
func _sqlite3Analyze(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2 *XToken) {
var _iDb, _i int32
var _z, _zDb *int8
@@ -107242,31 +108592,31 @@ func _sqlite3Analyze(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2 *XT
var _v *TVdbe
var _pTableName *XToken
var _pIdx *XIndex
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
- if _sqlite3BtreeHoldsAllMutexes(tls, (*Xsqlite3)(_pParse.X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98299), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AnalyzeØ00__func__Ø000))), unsafe.Pointer(str(124825)))
+ if _sqlite3BtreeHoldsAllMutexes(tls, (*Xsqlite3)(_pParse.Xdb)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98299), unsafe.Pointer(&_sqlite3AnalyzeØ00__func__Ø000), unsafe.Pointer(str(124853)))
crt.X__builtin_abort(tls)
}
}()
- if i32(0) != _sqlite3ReadSchema(tls, _pParse) {
+ if int32(0) != _sqlite3ReadSchema(tls, _pParse) {
return
}
func() {
if _pName2 == nil && _pName1 != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98304), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AnalyzeØ00__func__Ø000))), unsafe.Pointer(str(124865)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98304), unsafe.Pointer(&_sqlite3AnalyzeØ00__func__Ø000), unsafe.Pointer(str(124893)))
crt.X__builtin_abort(tls)
}
}()
if _pName1 != nil {
goto _6
}
- _i = i32(0)
+ _i = int32(0)
_7:
- if _i >= (_db.X5) {
+ if _i >= _db.XnDb {
goto _10
}
- if _i == i32(1) {
+ if _i == int32(1) {
goto _8
}
_analyzeDatabase(tls, _pParse, _i)
@@ -107276,17 +108626,17 @@ _8:
_10:
goto _15
_6:
- if ((_pName2.X1) == uint32(i32(0))) && (store1(&_iDb, _sqlite3FindDb(tls, _db, _pName1)) >= i32(0)) {
+ if (_pName2.Xn == (0)) && (store2(&_iDb, _sqlite3FindDb(tls, _db, _pName1)) >= int32(0)) {
_analyzeDatabase(tls, _pParse, _iDb)
goto _15
}
_iDb = _sqlite3TwoPartName(tls, _pParse, _pName1, _pName2, &_pTableName)
- if _iDb < i32(0) {
+ if _iDb < int32(0) {
goto _16
}
_zDb = func() *int8 {
- if (_pName2.X1) != 0 {
- return ((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0)
+ if _pName2.Xn != 0 {
+ return (elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName)
}
return nil
}()
@@ -107294,78 +108644,80 @@ _6:
if _z == nil {
goto _19
}
- if store69(&_pIdx, _sqlite3FindIndex(tls, _db, _z, _zDb)) != nil {
- _analyzeTable(tls, _pParse, (*XTable)(_pIdx.X3), _pIdx)
+ if store113(&_pIdx, _sqlite3FindIndex(tls, _db, _z, _zDb)) != nil {
+ _analyzeTable(tls, _pParse, (*XTable)(_pIdx.XpTable), _pIdx)
goto _22
}
- if store44(&_pTab, _sqlite3LocateTable(tls, _pParse, uint32(i32(0)), _z, _zDb)) != nil {
+ if store72(&_pTab, _sqlite3LocateTable(tls, _pParse, 0, _z, _zDb)) != nil {
_analyzeTable(tls, _pParse, _pTab, nil)
}
_22:
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_z))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_z))
_19:
_16:
_15:
- if (int32(_db.X26) == i32(0)) && (store38(&_v, _sqlite3GetVdbe(tls, _pParse)) != nil) {
- _sqlite3VdbeAddOp0(tls, _v, i32(153))
+ if (int32(_db.XnSqlExec) == int32(0)) && (store60(&_v, _sqlite3GetVdbe(tls, _pParse)) != nil) {
+ _sqlite3VdbeAddOp0(tls, _v, int32(153))
}
}
var _sqlite3AnalyzeØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AnalyzeØ00__func__Ø000[0], str(124888), 15)
+ crt.Xstrncpy(nil, &_sqlite3AnalyzeØ00__func__Ø000[0], str(124916), 15)
}
-// Generate code that will do an analysis of an entire database
+// C comment
+// /*
+// ** Generate code that will do an analysis of an entire database
+// */
func _analyzeDatabase(tls *crt.TLS, _pParse *XParse, _iDb int32) {
var _iStatCur, _iMem, _iTab int32
var _db *Xsqlite3
var _pSchema *XSchema
var _k *XHashElem
var _1_pTab *XTable
- _db = (*Xsqlite3)(_pParse.X0)
- _pSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4)
- _sqlite3BeginWriteOperation(tls, _pParse, i32(0), _iDb)
- _iStatCur = _pParse.X17
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X17)))
- *p = (*p) + i32(3)
- sink1(*p)
- }
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _pSchema = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema)
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(0), _iDb)
+ _iStatCur = _pParse.XnTab
+ _pParse.XnTab += int32(3)
_openStatTable(tls, _pParse, _iDb, _iStatCur, nil, nil)
- _iMem = (_pParse.X18) + i32(1)
- _iTab = _pParse.X17
+ _iMem = _pParse.XnMem + int32(1)
+ _iTab = _pParse.XnTab
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98243), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeDatabaseØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98243), unsafe.Pointer(&_analyzeDatabaseØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- _k = (*XHashElem)((*XHash)(unsafe.Pointer(&(_pSchema.X2))).X2)
+ _k = (*XHashElem)(_pSchema.XtblHash.Xfirst)
_2:
if _k == nil {
goto _5
}
- _1_pTab = (*XTable)(_k.X2)
+ _1_pTab = (*XTable)(_k.Xdata)
_analyzeOneTable(tls, _pParse, _1_pTab, nil, _iStatCur, _iMem, _iTab)
- _k = (*XHashElem)(_k.X0)
+ _k = (*XHashElem)(_k.Xnext)
goto _2
_5:
_loadAnalysis(tls, _pParse, _iDb)
}
-// This routine generates code that opens the sqlite_statN tables.
-// The sqlite_stat1 table is always relevant. sqlite_stat2 is now
-// obsolete. sqlite_stat3 and sqlite_stat4 are only opened when
-// appropriate compile-time options are provided.
-//
-// If the sqlite_statN tables do not previously exist, it is created.
-//
-// Argument zWhere may be a pointer to a buffer containing a table name,
-// or it may be a NULL pointer. If it is not NULL, then all entries in
-// the sqlite_statN tables associated with the named table are deleted.
-// If zWhere==0, then code is generated to delete all stat table entries.
+// C comment
+// /*
+// ** This routine generates code that opens the sqlite_statN tables.
+// ** The sqlite_stat1 table is always relevant. sqlite_stat2 is now
+// ** obsolete. sqlite_stat3 and sqlite_stat4 are only opened when
+// ** appropriate compile-time options are provided.
+// **
+// ** If the sqlite_statN tables do not previously exist, it is created.
+// **
+// ** Argument zWhere may be a pointer to a buffer containing a table name,
+// ** or it may be a NULL pointer. If it is not NULL, then all entries in
+// ** the sqlite_statN tables associated with the named table are deleted.
+// ** If zWhere==0, then code is generated to delete all stat table entries.
+// */
func _openStatTable(tls *crt.TLS, _pParse *XParse, _iDb int32, _iStatCur int32, _zWhere *int8, _zWhereType *int8) {
var _i int32
var _1_zTab *int8
@@ -107375,67 +108727,67 @@ func _openStatTable(tls *crt.TLS, _pParse *XParse, _iDb int32, _iStatCur int32,
var _1_pStat *XTable
var _v *TVdbe
var _aCreateTbl [3]uint8
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_v = _sqlite3GetVdbe(tls, _pParse)
if _v == nil {
return
}
func() {
if _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97123), unsafe.Pointer((*int8)(unsafe.Pointer(&_openStatTableØ00__func__Ø000))), unsafe.Pointer(str(9421)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97123), unsafe.Pointer(&_openStatTableØ00__func__Ø000), unsafe.Pointer(str(9376)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3VdbeDb(tls, _v) != _db {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97124), unsafe.Pointer((*int8)(unsafe.Pointer(&_openStatTableØ00__func__Ø000))), unsafe.Pointer(str(124903)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97124), unsafe.Pointer(&_openStatTableØ00__func__Ø000), unsafe.Pointer(str(124931)))
crt.X__builtin_abort(tls)
}
}()
- _pDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb)))
- _i = i32(0)
+ _pDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb))
+ _i = int32(0)
_5:
- if _i >= i32(3) {
+ if _i >= int32(3) {
goto _8
}
- _1_zTab = (*t78)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_openStatTableØ00aTableØ001)) + 8*uintptr(_i))).X0
- if store44(&_1_pStat, _sqlite3FindTable(tls, _db, _1_zTab, _pDb.X0)) != nil {
+ _1_zTab = elem127((*t128)(unsafe.Pointer(&_openStatTableØ00aTableØ001)), uintptr(_i)).XzName
+ if store72(&_1_pStat, _sqlite3FindTable(tls, _db, _1_zTab, _pDb.XzDbSName)) != nil {
goto _9
}
- if ((*t78)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_openStatTableØ00aTableØ001)) + 8*uintptr(_i))).X1) != nil {
- _sqlite3NestedParse(tls, _pParse, str(124924), unsafe.Pointer(_pDb.X0), unsafe.Pointer(_1_zTab), unsafe.Pointer((*t78)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_openStatTableØ00aTableØ001))+8*uintptr(_i))).X1))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aRoot)) + 4*uintptr(_i))) = _pParse.X32
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aCreateTbl)) + 1*uintptr(_i))) = uint8(i32(16))
+ if (elem127((*t128)(unsafe.Pointer(&_openStatTableØ00aTableØ001)), uintptr(_i)).XzCols) != nil {
+ _sqlite3NestedParse(tls, _pParse, str(124952), unsafe.Pointer(_pDb.XzDbSName), unsafe.Pointer(_1_zTab), unsafe.Pointer(elem127((*t128)(unsafe.Pointer(&_openStatTableØ00aTableØ001)), uintptr(_i)).XzCols))
+ *elem8((*int32)(unsafe.Pointer(&_aRoot)), uintptr(_i)) = _pParse.XregRoot
+ *elem15((*uint8)(unsafe.Pointer(&_aCreateTbl)), uintptr(_i)) = uint8(16)
}
goto _11
_9:
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aRoot)) + 4*uintptr(_i))) = _1_pStat.X7
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aCreateTbl)) + 1*uintptr(_i))) = uint8(i32(0))
- _sqlite3TableLock(tls, _pParse, _iDb, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aRoot)) + 4*uintptr(_i))), uint8(i32(1)), _1_zTab)
+ *elem8((*int32)(unsafe.Pointer(&_aRoot)), uintptr(_i)) = _1_pStat.Xtnum
+ *elem15((*uint8)(unsafe.Pointer(&_aCreateTbl)), uintptr(_i)) = 0
+ _sqlite3TableLock(tls, _pParse, _iDb, *elem8((*int32)(unsafe.Pointer(&_aRoot)), uintptr(_i)), uint8(1), _1_zTab)
if _zWhere != nil {
- _sqlite3NestedParse(tls, _pParse, str(114976), unsafe.Pointer(_pDb.X0), unsafe.Pointer(_1_zTab), unsafe.Pointer(_zWhereType), unsafe.Pointer(_zWhere))
+ _sqlite3NestedParse(tls, _pParse, str(115004), unsafe.Pointer(_pDb.XzDbSName), unsafe.Pointer(_1_zTab), unsafe.Pointer(_zWhereType), unsafe.Pointer(_zWhere))
goto _13
}
- _sqlite3VdbeAddOp2(tls, _v, i32(134), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aRoot)) + 4*uintptr(_i))), _iDb)
+ _sqlite3VdbeAddOp2(tls, _v, int32(134), *elem8((*int32)(unsafe.Pointer(&_aRoot)), uintptr(_i)), _iDb)
_13:
_11:
_i += 1
goto _5
_8:
- _i = i32(0)
+ _i = int32(0)
_14:
- if ((*t78)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_openStatTableØ00aTableØ001)) + 8*uintptr(_i))).X1) == nil {
+ if (elem127((*t128)(unsafe.Pointer(&_openStatTableØ00aTableØ001)), uintptr(_i)).XzCols) == nil {
goto _17
}
func() {
- if _i >= i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97166), unsafe.Pointer((*int8)(unsafe.Pointer(&_openStatTableØ00__func__Ø000))), unsafe.Pointer(str(124947)))
+ if _i >= int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97166), unsafe.Pointer(&_openStatTableØ00__func__Ø000), unsafe.Pointer(str(124975)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4Int(tls, _v, i32(107), _iStatCur+_i, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aRoot)) + 4*uintptr(_i))), _iDb, i32(3))
- _sqlite3VdbeChangeP5(tls, _v, uint16(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aCreateTbl)) + 1*uintptr(_i)))))
- _sqlite3VdbeComment(tls, _v, (*t78)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_openStatTableØ00aTableØ001))+8*uintptr(_i))).X0)
+ _sqlite3VdbeAddOp4Int(tls, _v, int32(107), _iStatCur+_i, *elem8((*int32)(unsafe.Pointer(&_aRoot)), uintptr(_i)), _iDb, int32(3))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(*elem15((*uint8)(unsafe.Pointer(&_aCreateTbl)), uintptr(_i))))
+ _sqlite3VdbeComment(tls, _v, elem127((*t128)(unsafe.Pointer(&_openStatTableØ00aTableØ001)), uintptr(_i)).XzName)
_i += 1
goto _14
_17:
@@ -107446,29 +108798,26 @@ _17:
var _openStatTableØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_openStatTableØ00__func__Ø000[0], str(124967), 14)
+ crt.Xstrncpy(nil, &_openStatTableØ00__func__Ø000[0], str(124995), 14)
}
-var _openStatTableØ00aTableØ001 [3]struct {
- X0 *int8
- X1 *int8
-}
+var _openStatTableØ00aTableØ001 [3]t128
func init() {
- _openStatTableØ00aTableØ001 = [3]struct {
- X0 *int8
- X1 *int8
- }{t78{X0: str(60088), X1: str(124981)}, t78{X0: str(124994), X1: nil}, t78{X0: str(125007), X1: nil}}
+ _openStatTableØ00aTableØ001 = [3]t128{t128{XzName: str(86613), XzCols: str(125009)}, t128{XzName: str(125022)}, t128{XzName: str(125035)}}
}
var _analyzeDatabaseØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_analyzeDatabaseØ00__func__Ø000[0], str(125020), 16)
+ crt.Xstrncpy(nil, &_analyzeDatabaseØ00__func__Ø000[0], str(125048), 16)
}
-// Generate code to do an analysis of all indices associated with
-// a single table.
+// C comment
+// /*
+// ** Generate code to do an analysis of all indices associated with
+// ** a single table.
+// */
func _analyzeOneTable(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pOnlyIdx *XIndex, _iStatCur int32, _iMem int32, _iTab int32) {
var _iIdxCur, _iTabCur, _i, _jZeroRows, _iDb, _regNewRowid, _regStat4, _regChng, _regTemp, _regTabname, _regIdxname, _regStat1, _regPrev, _5_nCol, _5_addrRewind, _5_addrNextRow, _5_nColTest, _8_endDistinctTest int32
var _8_aGotoChng *int32
@@ -107477,20 +108826,20 @@ func _analyzeOneTable(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pOnlyIdx *X
var _db *Xsqlite3
var _v *TVdbe
var _pIdx *XIndex
- _db = (*Xsqlite3)(_pParse.X0)
- _jZeroRows = i32(-1)
- _needTableCnt = u8(1)
- _regNewRowid = postInc1(&_iMem, int32(1))
- _regStat4 = postInc1(&_iMem, int32(1))
- _regChng = postInc1(&_iMem, int32(1))
- _regTemp = postInc1(&_iMem, int32(1))
- _regTabname = postInc1(&_iMem, int32(1))
- _regIdxname = postInc1(&_iMem, int32(1))
- _regStat1 = postInc1(&_iMem, int32(1))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _jZeroRows = int32(-1)
+ _needTableCnt = uint8(1)
+ _regNewRowid = postInc2(&_iMem, 1)
+ _regStat4 = postInc2(&_iMem, 1)
+ _regChng = postInc2(&_iMem, 1)
+ _regTemp = postInc2(&_iMem, 1)
+ _regTabname = postInc2(&_iMem, 1)
+ _regIdxname = postInc2(&_iMem, 1)
+ _regStat1 = postInc2(&_iMem, 1)
_regPrev = _iMem
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = func() int32 {
- if (_pParse.X18) > _iMem {
- return (_pParse.X18)
+ _pParse.XnMem = func() int32 {
+ if _pParse.XnMem > _iMem {
+ return _pParse.XnMem
}
return _iMem
}()
@@ -107498,55 +108847,55 @@ func _analyzeOneTable(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pOnlyIdx *X
if (_v == nil) || func() int32 {
if _pTab == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97924), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97924), unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
- if (_pTab.X7) == i32(0) {
+ if _pTab.Xtnum == int32(0) {
return
}
- if Xsqlite3_strlike(tls, str(125036), _pTab.X0, uint32(i32(0))) == i32(0) {
+ if Xsqlite3_strlike(tls, str(125064), _pTab.XzName, 0) == int32(0) {
return
}
func() {
if _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97935), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000))), unsafe.Pointer(str(9421)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97935), unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000), unsafe.Pointer(str(9376)))
crt.X__builtin_abort(tls)
}
}()
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
func() {
- if _iDb < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97937), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000))), unsafe.Pointer(str(42040)))
+ if _iDb < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97937), unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000), unsafe.Pointer(str(41995)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3SchemaMutexHeld(tls, _db, _iDb, nil) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97938), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000))), unsafe.Pointer(str(51150)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97938), unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000), unsafe.Pointer(str(51126)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3AuthCheck(tls, _pParse, i32(28), _pTab.X0, nil, (*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_iDb))).X0) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(28), _pTab.XzName, nil, elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName) != 0 {
return
}
- _sqlite3TableLock(tls, _pParse, _iDb, _pTab.X7, uint8(i32(0)), _pTab.X0)
- _iTabCur = postInc1(&_iTab, int32(1))
- _iIdxCur = postInc1(&_iTab, int32(1))
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) = func() int32 {
- if (_pParse.X17) > _iTab {
- return (_pParse.X17)
+ _sqlite3TableLock(tls, _pParse, _iDb, _pTab.Xtnum, 0, _pTab.XzName)
+ _iTabCur = postInc2(&_iTab, 1)
+ _iIdxCur = postInc2(&_iTab, 1)
+ _pParse.XnTab = func() int32 {
+ if _pParse.XnTab > _iTab {
+ return _pParse.XnTab
}
return _iTab
}()
- _sqlite3OpenTable(tls, _pParse, _iTabCur, _iDb, _pTab, i32(106))
- _sqlite3VdbeLoadString(tls, _v, _regTabname, _pTab.X0)
- _pIdx = (*XIndex)(_pTab.X2)
+ _sqlite3OpenTable(tls, _pParse, _iTabCur, _iDb, _pTab, int32(106))
+ _sqlite3VdbeLoadString(tls, _v, _regTabname, _pTab.XzName)
+ _pIdx = (*XIndex)(_pTab.XpIndex)
_17:
if _pIdx == nil {
goto _20
@@ -107554,130 +108903,130 @@ _17:
if (_pOnlyIdx != nil) && (_pOnlyIdx != _pIdx) {
goto _18
}
- if (*XExpr)(_pIdx.X9) == nil {
- _needTableCnt = uint8(i32(0))
+ if (*XExpr)(_pIdx.XpPartIdxWhere) == nil {
+ _needTableCnt = 0
}
- if (((_pTab.X9) & uint32(i32(32))) != uint32(i32(0))) && (int32((uint32(_pIdx.X16)<<uint(i32(30)))>>uint(i32(30))) == i32(2)) {
- _5_nCol = int32(_pIdx.X13)
- _5_zIdxName = _pTab.X0
- _5_nColTest = _5_nCol - i32(1)
+ if ((_pTab.XtabFlags & uint32(32)) != (0)) && (int32((uint32(_pIdx.XidxType)<<30)>>30) == int32(2)) {
+ _5_nCol = int32(_pIdx.XnKeyCol)
+ _5_zIdxName = _pTab.XzName
+ _5_nColTest = _5_nCol - int32(1)
goto _26
}
- _5_nCol = int32(_pIdx.X14)
- _5_zIdxName = _pIdx.X0
+ _5_nCol = int32(_pIdx.XnColumn)
+ _5_zIdxName = _pIdx.XzName
_5_nColTest = func() int32 {
- if ((uint32((_pIdx.X16)>>uint(i32(3))) << uint(i32(31))) >> uint(i32(31))) != 0 {
- return (int32(_pIdx.X13) - i32(1))
+ if ((uint32(_pIdx.XidxType>>3) << 31) >> 31) != 0 {
+ return (int32(_pIdx.XnKeyCol) - int32(1))
}
- return (_5_nCol - i32(1))
+ return (_5_nCol - int32(1))
}()
_26:
_sqlite3VdbeLoadString(tls, _v, _regIdxname, _5_zIdxName)
- _sqlite3VdbeComment(tls, _v, str(125045), unsafe.Pointer(_pTab.X0), unsafe.Pointer(_5_zIdxName))
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = func() int32 {
- if (_pParse.X18) > (_regPrev + _5_nColTest) {
- return (_pParse.X18)
+ _sqlite3VdbeComment(tls, _v, str(125073), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(_5_zIdxName))
+ _pParse.XnMem = func() int32 {
+ if _pParse.XnMem > (_regPrev + _5_nColTest) {
+ return _pParse.XnMem
}
return (_regPrev + _5_nColTest)
}()
func() {
- if _iDb != _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pIdx.X6)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98019), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000))), unsafe.Pointer(str(125064)))
+ if _iDb != _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pIdx.XpSchema)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98019), unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000), unsafe.Pointer(str(125092)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp3(tls, _v, i32(106), _iIdxCur, _pIdx.X11, _iDb)
+ _sqlite3VdbeAddOp3(tls, _v, int32(106), _iIdxCur, _pIdx.Xtnum, _iDb)
_sqlite3VdbeSetP4KeyInfo(tls, _pParse, _pIdx)
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_pIdx.X0))
- _sqlite3VdbeAddOp2(tls, _v, i32(56), _5_nCol, _regStat4+i32(1))
- _sqlite3VdbeAddOp2(tls, _v, i32(56), int32(_pIdx.X13), _regStat4+i32(2))
- _sqlite3VdbeAddOp4(tls, _v, i32(69), i32(0), _regStat4+i32(1), _regStat4, (*int8)(unsafe.Pointer(&_statInitFuncdef)), i32(-4))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(2)))
- _5_addrRewind = _sqlite3VdbeAddOp1(tls, _v, i32(37), _iIdxCur)
- _sqlite3VdbeAddOp2(tls, _v, i32(56), i32(0), _regChng)
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_pIdx.XzName))
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), _5_nCol, _regStat4+int32(1))
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(_pIdx.XnKeyCol), _regStat4+int32(2))
+ _sqlite3VdbeAddOp4(tls, _v, int32(69), int32(0), _regStat4+int32(1), _regStat4, (*int8)(unsafe.Pointer(&_statInitFuncdef)), int32(-4))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(2))
+ _5_addrRewind = _sqlite3VdbeAddOp1(tls, _v, int32(37), _iIdxCur)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), int32(0), _regChng)
_5_addrNextRow = _sqlite3VdbeCurrentAddr(tls, _v)
- if _5_nColTest <= i32(0) {
+ if _5_nColTest <= int32(0) {
goto _33
}
_8_endDistinctTest = _sqlite3VdbeMakeLabel(tls, _v)
- _8_aGotoChng = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(u32(4)*uint32(_5_nColTest))))
+ _8_aGotoChng = (*int32)(_sqlite3DbMallocRawNN(tls, _db, uint64(uint32(4)*uint32(_5_nColTest))))
if _8_aGotoChng == nil {
goto _18
}
- _sqlite3VdbeAddOp0(tls, _v, i32(13))
+ _sqlite3VdbeAddOp0(tls, _v, int32(13))
_5_addrNextRow = _sqlite3VdbeCurrentAddr(tls, _v)
- if ((_5_nColTest == i32(1)) && (int32(_pIdx.X13) == i32(1))) && (int32(_pIdx.X15) != i32(0)) {
- _sqlite3VdbeAddOp2(tls, _v, i32(76), _regPrev, _8_endDistinctTest)
+ if ((_5_nColTest == int32(1)) && (int32(_pIdx.XnKeyCol) == int32(1))) && (int32(_pIdx.XonError) != int32(0)) {
+ _sqlite3VdbeAddOp2(tls, _v, int32(76), _regPrev, _8_endDistinctTest)
}
- _i = i32(0)
+ _i = int32(0)
_38:
if _i >= _5_nColTest {
goto _41
}
- _10_pColl = (*int8)(unsafe.Pointer(_sqlite3LocateCollSeq(tls, _pParse, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pIdx.X8)) + 4*uintptr(_i))))))
- _sqlite3VdbeAddOp2(tls, _v, i32(56), _i, _regChng)
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _iIdxCur, _i, _regTemp)
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_aGotoChng)) + 4*uintptr(_i))) = _sqlite3VdbeAddOp4(tls, _v, i32(77), _regTemp, i32(0), _regPrev+_i, _10_pColl, i32(-3))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(128)))
+ _10_pColl = (*int8)(unsafe.Pointer(_sqlite3LocateCollSeq(tls, _pParse, *elem0(_pIdx.XazColl, uintptr(_i)))))
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), _i, _regChng)
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _iIdxCur, _i, _regTemp)
+ *elem8(_8_aGotoChng, uintptr(_i)) = _sqlite3VdbeAddOp4(tls, _v, int32(77), _regTemp, int32(0), _regPrev+_i, _10_pColl, int32(-3))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(128))
_i += 1
goto _38
_41:
- _sqlite3VdbeAddOp2(tls, _v, i32(56), _5_nColTest, _regChng)
+ _sqlite3VdbeAddOp2(tls, _v, int32(56), _5_nColTest, _regChng)
_sqlite3VdbeGoto(tls, _v, _8_endDistinctTest)
- _sqlite3VdbeJumpHere(tls, _v, _5_addrNextRow-i32(1))
- _i = i32(0)
+ _sqlite3VdbeJumpHere(tls, _v, _5_addrNextRow-int32(1))
+ _i = int32(0)
_42:
if _i >= _5_nColTest {
goto _45
}
- _sqlite3VdbeJumpHere(tls, _v, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_aGotoChng)) + 4*uintptr(_i))))
- _sqlite3VdbeAddOp3(tls, _v, i32(99), _iIdxCur, _i, _regPrev+_i)
+ _sqlite3VdbeJumpHere(tls, _v, *elem8(_8_aGotoChng, uintptr(_i)))
+ _sqlite3VdbeAddOp3(tls, _v, int32(99), _iIdxCur, _i, _regPrev+_i)
_i += 1
goto _42
_45:
_sqlite3VdbeResolveLabel(tls, _v, _8_endDistinctTest)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_8_aGotoChng))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_8_aGotoChng))
_33:
func() {
- if _regChng != (_regStat4 + i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98135), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000))), unsafe.Pointer(str(125109)))
+ if _regChng != (_regStat4 + int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98135), unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000), unsafe.Pointer(str(125137)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4(tls, _v, i32(69), i32(1), _regStat4, _regTemp, (*int8)(unsafe.Pointer(&_statPushFuncdef)), i32(-4))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(2)))
- _sqlite3VdbeAddOp2(tls, _v, i32(7), _iIdxCur, _5_addrNextRow)
- _callStatGet(tls, _v, _regStat4, i32(0), _regStat1)
+ _sqlite3VdbeAddOp4(tls, _v, int32(69), int32(1), _regStat4, _regTemp, (*int8)(unsafe.Pointer(&_statPushFuncdef)), int32(-4))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(2))
+ _sqlite3VdbeAddOp2(tls, _v, int32(7), _iIdxCur, _5_addrNextRow)
+ _callStatGet(tls, _v, _regStat4, int32(0), _regStat1)
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(str(125131))) + 1*uintptr(i32(0))))) != i32(66) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98143), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000))), unsafe.Pointer(str(125135)))
+ if int32(*elem1(str(125159), 0)) != int32(66) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98143), unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000), unsafe.Pointer(str(125163)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _regTabname, i32(3), _regTemp, str(125131), i32(0))
- _sqlite3VdbeAddOp2(tls, _v, i32(117), _iStatCur, _regNewRowid)
- _sqlite3VdbeAddOp3(tls, _v, i32(118), _iStatCur, _regTemp, _regNewRowid)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(8)))
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _regTabname, int32(3), _regTemp, str(125159), int32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(117), _iStatCur, _regNewRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), _iStatCur, _regTemp, _regNewRowid)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(8))
_sqlite3VdbeJumpHere(tls, _v, _5_addrRewind)
_18:
- _pIdx = (*XIndex)(_pIdx.X5)
+ _pIdx = (*XIndex)(_pIdx.XpNext)
goto _17
_20:
if (_pOnlyIdx == nil) && (_needTableCnt != 0) {
- _sqlite3VdbeComment(tls, _v, str(24576), unsafe.Pointer(_pTab.X0))
- _sqlite3VdbeAddOp2(tls, _v, i32(102), _iTabCur, _regStat1)
- _jZeroRows = _sqlite3VdbeAddOp1(tls, _v, i32(22), _regStat1)
- _sqlite3VdbeAddOp2(tls, _v, i32(59), i32(0), _regIdxname)
+ _sqlite3VdbeComment(tls, _v, str(24531), unsafe.Pointer(_pTab.XzName))
+ _sqlite3VdbeAddOp2(tls, _v, int32(102), _iTabCur, _regStat1)
+ _jZeroRows = _sqlite3VdbeAddOp1(tls, _v, int32(22), _regStat1)
+ _sqlite3VdbeAddOp2(tls, _v, int32(59), int32(0), _regIdxname)
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(str(125131))) + 1*uintptr(i32(0))))) != i32(66) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98205), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000))), unsafe.Pointer(str(125135)))
+ if int32(*elem1(str(125159), 0)) != int32(66) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98205), unsafe.Pointer(&_analyzeOneTableØ00__func__Ø000), unsafe.Pointer(str(125163)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4(tls, _v, i32(101), _regTabname, i32(3), _regTemp, str(125131), i32(0))
- _sqlite3VdbeAddOp2(tls, _v, i32(117), _iStatCur, _regNewRowid)
- _sqlite3VdbeAddOp3(tls, _v, i32(118), _iStatCur, _regTemp, _regNewRowid)
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(8)))
+ _sqlite3VdbeAddOp4(tls, _v, int32(101), _regTabname, int32(3), _regTemp, str(125159), int32(0))
+ _sqlite3VdbeAddOp2(tls, _v, int32(117), _iStatCur, _regNewRowid)
+ _sqlite3VdbeAddOp3(tls, _v, int32(118), _iStatCur, _regTemp, _regNewRowid)
+ _sqlite3VdbeChangeP5(tls, _v, uint16(8))
_sqlite3VdbeJumpHere(tls, _v, _jZeroRows)
}
}
@@ -107685,289 +109034,416 @@ _20:
var _analyzeOneTableØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_analyzeOneTableØ00__func__Ø000[0], str(125161), 16)
+ crt.Xstrncpy(nil, &_analyzeOneTableØ00__func__Ø000[0], str(125189), 16)
}
var _statInitFuncdef XFuncDef
func init() {
- _statInitFuncdef = XFuncDef{X0: i8(2), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ _statInitFuncdef = XFuncDef{XnArg: int8(2), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_statInit})), X5: nil, X6: str(125177), X7: t12{}}
-}
-
-// Implementation of the stat_init(N,K,C) SQL function. The three parameters
-// are:
-// N: The number of columns in the index including the rowid/pk (note 1)
-// K: The number of columns in the index excluding the rowid/pk.
-// C: The number of rows in the index (note 2)
-//
-// Note 1: In the special case of the covering index that implements a
-// WITHOUT ROWID table, N is the number of PRIMARY KEY columns, not the
-// total number of columns in the table.
-//
-// Note 2: C is only used for STAT3 and STAT4.
-//
-// For indexes on ordinary rowid tables, N==K+1. But for indexes on
-// WITHOUT ROWID tables, N=K+P where P is the number of columns in the
-// PRIMARY KEY of the table. The covering index that implements the
-// original WITHOUT ROWID table as N==K as a special case.
-//
-// This routine allocates the Stat4Accum object in heap memory. The return
-// value is a pointer to the Stat4Accum object. The datatype of the
-// return value is BLOB, but it is really just a pointer to the Stat4Accum
-// object.
+ }{_statInit})), XzName: str(125205)}
+}
+
+// C comment
+// /*
+// ** Implementation of the stat_init(N,K,C) SQL function. The three parameters
+// ** are:
+// ** N: The number of columns in the index including the rowid/pk (note 1)
+// ** K: The number of columns in the index excluding the rowid/pk.
+// ** C: The number of rows in the index (note 2)
+// **
+// ** Note 1: In the special case of the covering index that implements a
+// ** WITHOUT ROWID table, N is the number of PRIMARY KEY columns, not the
+// ** total number of columns in the table.
+// **
+// ** Note 2: C is only used for STAT3 and STAT4.
+// **
+// ** For indexes on ordinary rowid tables, N==K+1. But for indexes on
+// ** WITHOUT ROWID tables, N=K+P where P is the number of columns in the
+// ** PRIMARY KEY of the table. The covering index that implements the
+// ** original WITHOUT ROWID table as N==K as a special case.
+// **
+// ** This routine allocates the Stat4Accum object in heap memory. The return
+// ** value is a pointer to the Stat4Accum object. The datatype of the
+// ** return value is BLOB, but it is really just a pointer to the Stat4Accum
+// ** object.
+// */
func _statInit(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _nCol, _nKeyCol, _nColUp, _n int32
var _db *Xsqlite3
var _p *XStat4Accum
- _nCol = Xsqlite3_value_int(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _nCol = Xsqlite3_value_int(tls, *elem19(_argv, 0))
func() {
- if _nCol <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97333), unsafe.Pointer((*int8)(unsafe.Pointer(&_statInitØ00__func__Ø000))), unsafe.Pointer(str(125187)))
+ if _nCol <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97333), unsafe.Pointer(&_statInitØ00__func__Ø000), unsafe.Pointer(str(125215)))
crt.X__builtin_abort(tls)
}
}()
- _nColUp = (_nCol + i32(1)) & i32(-2)
- _nKeyCol = Xsqlite3_value_int(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
+ _nColUp = (_nCol + int32(1)) & int32(-2)
+ _nKeyCol = Xsqlite3_value_int(tls, *elem19(_argv, uintptr(1)))
func() {
if _nKeyCol > _nCol {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97336), unsafe.Pointer((*int8)(unsafe.Pointer(&_statInitØ00__func__Ø000))), unsafe.Pointer(str(125194)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97336), unsafe.Pointer(&_statInitØ00__func__Ø000), unsafe.Pointer(str(125222)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nKeyCol <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97337), unsafe.Pointer((*int8)(unsafe.Pointer(&_statInitØ00__func__Ø000))), unsafe.Pointer(str(107110)))
+ if _nKeyCol <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97337), unsafe.Pointer(&_statInitØ00__func__Ø000), unsafe.Pointer(str(107138)))
crt.X__builtin_abort(tls)
}
}()
- _n = int32((u32(60) + (u32(4) * uint32(_nColUp))) + (u32(4) * uint32(_nColUp)))
+ _n = int32((uint32(60) + (uint32(4) * uint32(_nColUp))) + (uint32(4) * uint32(_nColUp)))
_db = Xsqlite3_context_db_handle(tls, _context)
_p = (*XStat4Accum)(_sqlite3DbMallocZero(tls, _db, uint64(_n)))
if _p == nil {
Xsqlite3_result_error_nomem(tls, _context)
return
}
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X13))))) = _db
- *(*uint32)(unsafe.Pointer(&(_p.X0))) = uint32(i32(0))
- *(*int32)(unsafe.Pointer(&(_p.X2))) = _nCol
- *(*int32)(unsafe.Pointer(&(_p.X3))) = _nKeyCol
- *(**uint32)(unsafe.Pointer(&((*t79)(unsafe.Pointer(&(_p.X5))).X1))) = (*uint32)(unsafe.Pointer((*XStat4Accum)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p)) + 60*uintptr(i32(1))))))
- *(**uint32)(unsafe.Pointer(&((*t79)(unsafe.Pointer(&(_p.X5))).X0))) = (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*t79)(unsafe.Pointer(&(_p.X5))).X1)) + 4*uintptr(_nColUp)))
- Xsqlite3_result_blob(tls, _context, (unsafe.Pointer)(_p), int32(u32(60)), _stat4Destructor)
+ *(**Xsqlite3)(unsafe.Pointer(&_p.Xdb)) = _db
+ _p.XnRow = 0
+ _p.XnCol = _nCol
+ _p.XnKeyCol = _nKeyCol
+ _p.Xcurrent.XanDLt = (*uint32)(unsafe.Pointer(elem129(_p, uintptr(1))))
+ _p.Xcurrent.XanEq = elem7(_p.Xcurrent.XanDLt, uintptr(_nColUp))
+ Xsqlite3_result_blob(tls, _context, unsafe.Pointer(_p), int32(60), _stat4Destructor)
}
var _statInitØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_statInitØ00__func__Ø000[0], str(125208), 9)
-}
-
+ crt.Xstrncpy(nil, &_statInitØ00__func__Ø000[0], str(125236), 9)
+}
+
+// C comment
+// /*
+// ** CAPI3REF: Setting The Result Of An SQL Function
+// ** METHOD: sqlite3_context
+// **
+// ** These routines are used by the xFunc or xFinal callbacks that
+// ** implement SQL functions and aggregates. See
+// ** [sqlite3_create_function()] and [sqlite3_create_function16()]
+// ** for additional information.
+// **
+// ** These functions work very much like the [parameter binding] family of
+// ** functions used to bind values to host parameters in prepared statements.
+// ** Refer to the [SQL parameter] documentation for additional information.
+// **
+// ** ^The sqlite3_result_blob() interface sets the result from
+// ** an application-defined function to be the BLOB whose content is pointed
+// ** to by the second parameter and which is N bytes long where N is the
+// ** third parameter.
+// **
+// ** ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N)
+// ** interfaces set the result of the application-defined function to be
+// ** a BLOB containing all zero bytes and N bytes in size.
+// **
+// ** ^The sqlite3_result_double() interface sets the result from
+// ** an application-defined function to be a floating point value specified
+// ** by its 2nd argument.
+// **
+// ** ^The sqlite3_result_error() and sqlite3_result_error16() functions
+// ** cause the implemented SQL function to throw an exception.
+// ** ^SQLite uses the string pointed to by the
+// ** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()
+// ** as the text of an error message. ^SQLite interprets the error
+// ** message string from sqlite3_result_error() as UTF-8. ^SQLite
+// ** interprets the string from sqlite3_result_error16() as UTF-16 in native
+// ** byte order. ^If the third parameter to sqlite3_result_error()
+// ** or sqlite3_result_error16() is negative then SQLite takes as the error
+// ** message all text up through the first zero character.
+// ** ^If the third parameter to sqlite3_result_error() or
+// ** sqlite3_result_error16() is non-negative then SQLite takes that many
+// ** bytes (not characters) from the 2nd parameter as the error message.
+// ** ^The sqlite3_result_error() and sqlite3_result_error16()
+// ** routines make a private copy of the error message text before
+// ** they return. Hence, the calling function can deallocate or
+// ** modify the text after they return without harm.
+// ** ^The sqlite3_result_error_code() function changes the error code
+// ** returned by SQLite as a result of an error in a function. ^By default,
+// ** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error()
+// ** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
+// **
+// ** ^The sqlite3_result_error_toobig() interface causes SQLite to throw an
+// ** error indicating that a string or BLOB is too long to represent.
+// **
+// ** ^The sqlite3_result_error_nomem() interface causes SQLite to throw an
+// ** error indicating that a memory allocation failed.
+// **
+// ** ^The sqlite3_result_int() interface sets the return value
+// ** of the application-defined function to be the 32-bit signed integer
+// ** value given in the 2nd argument.
+// ** ^The sqlite3_result_int64() interface sets the return value
+// ** of the application-defined function to be the 64-bit signed integer
+// ** value given in the 2nd argument.
+// **
+// ** ^The sqlite3_result_null() interface sets the return value
+// ** of the application-defined function to be NULL.
+// **
+// ** ^The sqlite3_result_text(), sqlite3_result_text16(),
+// ** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces
+// ** set the return value of the application-defined function to be
+// ** a text string which is represented as UTF-8, UTF-16 native byte order,
+// ** UTF-16 little endian, or UTF-16 big endian, respectively.
+// ** ^The sqlite3_result_text64() interface sets the return value of an
+// ** application-defined function to be a text string in an encoding
+// ** specified by the fifth (and last) parameter, which must be one
+// ** of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE].
+// ** ^SQLite takes the text result from the application from
+// ** the 2nd parameter of the sqlite3_result_text* interfaces.
+// ** ^If the 3rd parameter to the sqlite3_result_text* interfaces
+// ** is negative, then SQLite takes result text from the 2nd parameter
+// ** through the first zero character.
+// ** ^If the 3rd parameter to the sqlite3_result_text* interfaces
+// ** is non-negative, then as many bytes (not characters) of the text
+// ** pointed to by the 2nd parameter are taken as the application-defined
+// ** function result. If the 3rd parameter is non-negative, then it
+// ** must be the byte offset into the string where the NUL terminator would
+// ** appear if the string where NUL terminated. If any NUL characters occur
+// ** in the string at a byte offset that is less than the value of the 3rd
+// ** parameter, then the resulting string will contain embedded NULs and the
+// ** result of expressions operating on strings with embedded NULs is undefined.
+// ** ^If the 4th parameter to the sqlite3_result_text* interfaces
+// ** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that
+// ** function as the destructor on the text or BLOB result when it has
+// ** finished using that result.
+// ** ^If the 4th parameter to the sqlite3_result_text* interfaces or to
+// ** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite
+// ** assumes that the text or BLOB result is in constant space and does not
+// ** copy the content of the parameter nor call a destructor on the content
+// ** when it has finished using that result.
+// ** ^If the 4th parameter to the sqlite3_result_text* interfaces
+// ** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
+// ** then SQLite makes a copy of the result into space obtained from
+// ** from [sqlite3_malloc()] before it returns.
+// **
+// ** ^The sqlite3_result_value() interface sets the result of
+// ** the application-defined function to be a copy of the
+// ** [unprotected sqlite3_value] object specified by the 2nd parameter. ^The
+// ** sqlite3_result_value() interface makes a copy of the [sqlite3_value]
+// ** so that the [sqlite3_value] specified in the parameter may change or
+// ** be deallocated after sqlite3_result_value() returns without harm.
+// ** ^A [protected sqlite3_value] object may always be used where an
+// ** [unprotected sqlite3_value] object is required, so either
+// ** kind of [sqlite3_value] object can be used with this interface.
+// **
+// ** If these routines are called from within the different thread
+// ** than the one containing the application-defined function that received
+// ** the [sqlite3_context] pointer, the results are undefined.
+// */
func Xsqlite3_result_blob(tls *crt.TLS, _pCtx *Xsqlite3_context, _z unsafe.Pointer, _n int32, _xDel func(*crt.TLS, unsafe.Pointer)) {
func() {
- if _n < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76428), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_blobØ00__func__Ø000))), unsafe.Pointer(str(125217)))
+ if _n < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76428), unsafe.Pointer(&_sqlite3_result_blobØ00__func__Ø000), unsafe.Pointer(str(125245)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76429), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_blobØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76429), unsafe.Pointer(&_sqlite3_result_blobØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _setResultStrOrError(tls, _pCtx, (*int8)(_z), _n, uint8(i32(0)), _xDel)
+ _setResultStrOrError(tls, _pCtx, (*int8)(_z), _n, 0, _xDel)
}
var _sqlite3_result_blobØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_blobØ00__func__Ø000[0], str(125222), 20)
+ crt.Xstrncpy(nil, &_sqlite3_result_blobØ00__func__Ø000[0], str(125250), 20)
}
-// Reclaim all memory of a Stat4Accum structure.
+// C comment
+// /*
+// ** Reclaim all memory of a Stat4Accum structure.
+// */
func _stat4Destructor(tls *crt.TLS, _pOld unsafe.Pointer) {
var _p *XStat4Accum
_p = (*XStat4Accum)(_pOld)
- _sqlite3DbFree(tls, (*Xsqlite3)(_p.X13), (unsafe.Pointer)(_p))
+ _sqlite3DbFree(tls, (*Xsqlite3)(_p.Xdb), unsafe.Pointer(_p))
}
var _statPushFuncdef XFuncDef
func init() {
- _statPushFuncdef = XFuncDef{X0: i8(2), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ _statPushFuncdef = XFuncDef{XnArg: int8(2), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_statPush})), X5: nil, X6: str(125242), X7: t12{}}
-}
-
-// Implementation of the stat_push SQL function: stat_push(P,C,R)
-// Arguments:
-//
-// P Pointer to the Stat4Accum object created by stat_init()
-// C Index of left-most column to differ from previous row
-// R Rowid for the current row. Might be a key record for
-// WITHOUT ROWID tables.
-//
-// This SQL function always returns NULL. It's purpose it to accumulate
-// statistical data and/or samples in the Stat4Accum object about the
-// index being analyzed. The stat_get() SQL function will later be used to
-// extract relevant information for constructing the sqlite_statN tables.
-//
-// The R parameter is only used for STAT3 and STAT4
+ }{_statPush})), XzName: str(125270)}
+}
+
+// C comment
+// /*
+// ** Implementation of the stat_push SQL function: stat_push(P,C,R)
+// ** Arguments:
+// **
+// ** P Pointer to the Stat4Accum object created by stat_init()
+// ** C Index of left-most column to differ from previous row
+// ** R Rowid for the current row. Might be a key record for
+// ** WITHOUT ROWID tables.
+// **
+// ** This SQL function always returns NULL. It's purpose it to accumulate
+// ** statistical data and/or samples in the Stat4Accum object about the
+// ** index being analyzed. The stat_get() SQL function will later be used to
+// ** extract relevant information for constructing the sqlite_statN tables.
+// **
+// ** The R parameter is only used for STAT3 and STAT4
+// */
func _statPush(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _i, _iChng int32
var _p *XStat4Accum
- _p = (*XStat4Accum)(Xsqlite3_value_blob(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
- _iChng = Xsqlite3_value_int(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
+ _p = (*XStat4Accum)(Xsqlite3_value_blob(tls, *elem19(_argv, 0)))
+ _iChng = Xsqlite3_value_int(tls, *elem19(_argv, uintptr(1)))
func() {
- if (_p.X2) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97657), unsafe.Pointer((*int8)(unsafe.Pointer(&_statPushØ00__func__Ø000))), unsafe.Pointer(str(125252)))
+ if _p.XnCol <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97657), unsafe.Pointer(&_statPushØ00__func__Ø000), unsafe.Pointer(str(125280)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iChng >= (_p.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97658), unsafe.Pointer((*int8)(unsafe.Pointer(&_statPushØ00__func__Ø000))), unsafe.Pointer(str(125262)))
+ if _iChng >= _p.XnCol {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97658), unsafe.Pointer(&_statPushØ00__func__Ø000), unsafe.Pointer(str(125290)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X0) != uint32(i32(0)) {
+ if _p.XnRow != (0) {
goto _4
}
- _i = i32(0)
+ _i = int32(0)
_5:
- if _i >= (_p.X2) {
+ if _i >= _p.XnCol {
goto _8
}
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*t79)(unsafe.Pointer(&(_p.X5))).X0)) + 4*uintptr(_i))) = uint32(i32(1))
+ *elem7(_p.Xcurrent.XanEq, uintptr(_i)) = uint32(1)
_i += 1
goto _5
_8:
goto _9
_4:
_samplePushPrevious(tls, _p, _iChng)
- _i = i32(0)
+ _i = int32(0)
_10:
if _i >= _iChng {
goto _13
}
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*t79)(unsafe.Pointer(&(_p.X5))).X0)) + 4*uintptr(_i))) += 1
+ *elem7(_p.Xcurrent.XanEq, uintptr(_i)) += 1
_i += 1
goto _10
_13:
_i = _iChng
_14:
- if _i >= (_p.X2) {
+ if _i >= _p.XnCol {
goto _17
}
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*t79)(unsafe.Pointer(&(_p.X5))).X1)) + 4*uintptr(_i))) += 1
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*t79)(unsafe.Pointer(&(_p.X5))).X0)) + 4*uintptr(_i))) = uint32(i32(1))
+ *elem7(_p.Xcurrent.XanDLt, uintptr(_i)) += 1
+ *elem7(_p.Xcurrent.XanEq, uintptr(_i)) = uint32(1)
_i += 1
goto _14
_17:
_9:
- *(*uint32)(unsafe.Pointer(&(_p.X0))) += 1
+ _p.XnRow += 1
}
var _statPushØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_statPushØ00__func__Ø000[0], str(125276), 9)
+ crt.Xstrncpy(nil, &_statPushØ00__func__Ø000[0], str(125304), 9)
}
-// Field iChng of the index being scanned has changed. So at this point
-// p->current contains a sample that reflects the previous row of the
-// index. The value of anEq[iChng] and subsequent anEq[] elements are
-// correct at this point.
+// C comment
+// /*
+// ** Field iChng of the index being scanned has changed. So at this point
+// ** p->current contains a sample that reflects the previous row of the
+// ** index. The value of anEq[iChng] and subsequent anEq[] elements are
+// ** correct at this point.
+// */
func _samplePushPrevious(tls *crt.TLS, _p *XStat4Accum, _iChng int32) {
}
func _callStatGet(tls *crt.TLS, _v *TVdbe, _regStat4 int32, _iParam int32, _regOut int32) {
func() {
- if _regOut == _regStat4 || _regOut == (_regStat4+i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97876), unsafe.Pointer((*int8)(unsafe.Pointer(&_callStatGetØ00__func__Ø000))), unsafe.Pointer(str(125285)))
+ if _regOut == _regStat4 || _regOut == (_regStat4+int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97876), unsafe.Pointer(&_callStatGetØ00__func__Ø000), unsafe.Pointer(str(125313)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _iParam != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97880), unsafe.Pointer((*int8)(unsafe.Pointer(&_callStatGetØ00__func__Ø000))), unsafe.Pointer(str(125324)))
+ if _iParam != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97880), unsafe.Pointer(&_callStatGetØ00__func__Ø000), unsafe.Pointer(str(125352)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4(tls, _v, i32(69), i32(0), _regStat4, _regOut, (*int8)(unsafe.Pointer(&_statGetFuncdef)), i32(-4))
- _sqlite3VdbeChangeP5(tls, _v, uint16(i32(1)))
+ _sqlite3VdbeAddOp4(tls, _v, int32(69), int32(0), _regStat4, _regOut, (*int8)(unsafe.Pointer(&_statGetFuncdef)), int32(-4))
+ _sqlite3VdbeChangeP5(tls, _v, uint16(1))
}
var _callStatGetØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_callStatGetØ00__func__Ø000[0], str(125347), 12)
+ crt.Xstrncpy(nil, &_callStatGetØ00__func__Ø000[0], str(125375), 12)
}
var _statGetFuncdef XFuncDef
func init() {
- _statGetFuncdef = XFuncDef{X0: i8(1), X1: u16(1), X2: nil, X3: nil, X4: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
+ _statGetFuncdef = XFuncDef{XnArg: int8(1), XfuncFlags: uint16(1), XxSFunc: *(*func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_context, int32, **XMem)
- }{_statGet})), X5: nil, X6: str(125359), X7: t12{}}
-}
-
-// Implementation of the stat_get(P,J) SQL function. This routine is
-// used to query statistical information that has been gathered into
-// the Stat4Accum object by prior calls to stat_push(). The P parameter
-// has type BLOB but it is really just a pointer to the Stat4Accum object.
-// The content to returned is determined by the parameter J
-// which is one of the STAT_GET_xxxx values defined above.
-//
-// The stat_get(P,J) function is not available to generic SQL. It is
-// inserted as part of a manually constructed bytecode program. (See
-// the callStatGet() routine below.) It is guaranteed that the P
-// parameter will always be a poiner to a Stat4Accum object, never a
-// NULL.
-//
-// If neither STAT3 nor STAT4 are enabled, then J is always
-// STAT_GET_STAT1 and is hence omitted and this routine becomes
-// a one-parameter function, stat_get(P), that always returns the
-// stat1 table entry information.
+ }{_statGet})), XzName: str(125387)}
+}
+
+// C comment
+// /*
+// ** Implementation of the stat_get(P,J) SQL function. This routine is
+// ** used to query statistical information that has been gathered into
+// ** the Stat4Accum object by prior calls to stat_push(). The P parameter
+// ** has type BLOB but it is really just a pointer to the Stat4Accum object.
+// ** The content to returned is determined by the parameter J
+// ** which is one of the STAT_GET_xxxx values defined above.
+// **
+// ** The stat_get(P,J) function is not available to generic SQL. It is
+// ** inserted as part of a manually constructed bytecode program. (See
+// ** the callStatGet() routine below.) It is guaranteed that the P
+// ** parameter will always be a poiner to a Stat4Accum object, never a
+// ** NULL.
+// **
+// ** If neither STAT3 nor STAT4 are enabled, then J is always
+// ** STAT_GET_STAT1 and is hence omitted and this routine becomes
+// ** a one-parameter function, stat_get(P), that always returns the
+// ** stat1 table entry information.
+// */
func _statGet(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _1_i int32
var _3_nDistinct, _3_iVal uint64
var _1_z, _1_zRet *int8
var _p *XStat4Accum
- _p = (*XStat4Accum)(Xsqlite3_value_blob(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
+ _p = (*XStat4Accum)(Xsqlite3_value_blob(tls, *elem19(_argv, 0)))
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97765), unsafe.Pointer((*int8)(unsafe.Pointer(&_statGetØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97765), unsafe.Pointer(&_statGetØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- _1_zRet = (*int8)(_sqlite3MallocZero(tls, uint64(((_p.X3)+i32(1))*i32(25))))
+ _1_zRet = (*int8)(_sqlite3MallocZero(tls, uint64((_p.XnKeyCol+int32(1))*int32(25))))
if _1_zRet == nil {
Xsqlite3_result_error_nomem(tls, _context)
return
}
- Xsqlite3_snprintf(tls, i32(24), _1_zRet, str(125376), uint64(_p.X0))
- _1_z = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_1_zRet)) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_sqlite3Strlen30(tls, _1_zRet))))))))
- _1_i = i32(0)
+ Xsqlite3_snprintf(tls, int32(24), _1_zRet, str(125404), uint64(_p.XnRow))
+ _1_z = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_1_zRet)) + uintptr(_sqlite3Strlen30(tls, _1_zRet))))
+ _1_i = int32(0)
_3:
- if _1_i >= (_p.X3) {
+ if _1_i >= _p.XnKeyCol {
goto _6
}
- _3_nDistinct = uint64((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*t79)(unsafe.Pointer(&(_p.X5))).X1)) + 4*uintptr(_1_i)))) + uint32(i32(1)))
- _3_iVal = ((uint64(_p.X0) + _3_nDistinct) - uint64(i32(1))) / _3_nDistinct
- Xsqlite3_snprintf(tls, i32(24), _1_z, str(125381), _3_iVal)
- {
- p := &_1_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_sqlite3Strlen30(tls, _1_z))))
- sink0(*p)
- }
+ _3_nDistinct = uint64((*elem7(_p.Xcurrent.XanDLt, uintptr(_1_i))) + uint32(1))
+ _3_iVal = ((uint64(_p.XnRow) + _3_nDistinct) - uint64(1)) / _3_nDistinct
+ Xsqlite3_snprintf(tls, int32(24), _1_z, str(125409), _3_iVal)
+ *(*uintptr)(unsafe.Pointer(&_1_z)) += uintptr(_sqlite3Strlen30(tls, _1_z))
func() {
- if (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*t79)(unsafe.Pointer(&(_p.X5))).X0)) + 4*uintptr(_1_i)))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97805), unsafe.Pointer((*int8)(unsafe.Pointer(&_statGetØ00__func__Ø000))), unsafe.Pointer(str(125387)))
+ if (*elem7(_p.Xcurrent.XanEq, uintptr(_1_i))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97805), unsafe.Pointer(&_statGetØ00__func__Ø000), unsafe.Pointer(str(125415)))
crt.X__builtin_abort(tls)
}
}()
@@ -107975,73 +109451,78 @@ _3:
goto _3
_6:
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(i32(0))))) != i32(0) || uintptr(unsafe.Pointer(_1_z)) <= uintptr(unsafe.Pointer(_1_zRet)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(97807), unsafe.Pointer((*int8)(unsafe.Pointer(&_statGetØ00__func__Ø000))), unsafe.Pointer(str(125406)))
+ if int32(*elem1(_1_z, 0)) != int32(0) || crt.P2U(unsafe.Pointer(_1_z)) <= crt.P2U(unsafe.Pointer(_1_zRet)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(97807), unsafe.Pointer(&_statGetØ00__func__Ø000), unsafe.Pointer(str(125434)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_result_text(tls, _context, _1_zRet, i32(-1), Xsqlite3_free)
+ Xsqlite3_result_text(tls, _context, _1_zRet, int32(-1), Xsqlite3_free)
}
var _statGetØ00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_statGetØ00__func__Ø000[0], str(125427), 8)
+ crt.Xstrncpy(nil, &_statGetØ00__func__Ø000[0], str(125455), 8)
}
-// Generate code that will cause the most recent index analysis to
-// be loaded into internal hash tables where is can be used.
+// C comment
+// /*
+// ** Generate code that will cause the most recent index analysis to
+// ** be loaded into internal hash tables where is can be used.
+// */
func _loadAnalysis(tls *crt.TLS, _pParse *XParse, _iDb int32) {
var _v *TVdbe
_v = _sqlite3GetVdbe(tls, _pParse)
if _v != nil {
- _sqlite3VdbeAddOp1(tls, _v, i32(140), _iDb)
+ _sqlite3VdbeAddOp1(tls, _v, int32(140), _iDb)
}
}
-// Generate code that will do an analysis of a single table in
-// a database. If pOnlyIdx is not NULL then it is a single index
-// in pTab that should be analyzed.
+// C comment
+// /*
+// ** Generate code that will do an analysis of a single table in
+// ** a database. If pOnlyIdx is not NULL then it is a single index
+// ** in pTab that should be analyzed.
+// */
func _analyzeTable(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _pOnlyIdx *XIndex) {
var _iDb, _iStatCur int32
func() {
if _pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98260), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeTableØ00__func__Ø000))), unsafe.Pointer(str(43594)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98260), unsafe.Pointer(&_analyzeTableØ00__func__Ø000), unsafe.Pointer(str(43549)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3BtreeHoldsAllMutexes(tls, (*Xsqlite3)(_pParse.X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(98261), unsafe.Pointer((*int8)(unsafe.Pointer(&_analyzeTableØ00__func__Ø000))), unsafe.Pointer(str(124825)))
+ if _sqlite3BtreeHoldsAllMutexes(tls, (*Xsqlite3)(_pParse.Xdb)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(98261), unsafe.Pointer(&_analyzeTableØ00__func__Ø000), unsafe.Pointer(str(124853)))
crt.X__builtin_abort(tls)
}
}()
- _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTab.X20))
- _sqlite3BeginWriteOperation(tls, _pParse, i32(0), _iDb)
- _iStatCur = _pParse.X17
- {
- p := (*int32)(unsafe.Pointer(&(_pParse.X17)))
- *p = (*p) + i32(3)
- sink1(*p)
- }
+ _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTab.XpSchema))
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(0), _iDb)
+ _iStatCur = _pParse.XnTab
+ _pParse.XnTab += int32(3)
if _pOnlyIdx != nil {
- _openStatTable(tls, _pParse, _iDb, _iStatCur, _pOnlyIdx.X0, str(61657))
+ _openStatTable(tls, _pParse, _iDb, _iStatCur, _pOnlyIdx.XzName, str(93743))
goto _5
}
- _openStatTable(tls, _pParse, _iDb, _iStatCur, _pTab.X0, str(61653))
+ _openStatTable(tls, _pParse, _iDb, _iStatCur, _pTab.XzName, str(93739))
_5:
- _analyzeOneTable(tls, _pParse, _pTab, _pOnlyIdx, _iStatCur, (_pParse.X18)+i32(1), _pParse.X17)
+ _analyzeOneTable(tls, _pParse, _pTab, _pOnlyIdx, _iStatCur, _pParse.XnMem+int32(1), _pParse.XnTab)
_loadAnalysis(tls, _pParse, _iDb)
}
var _analyzeTableØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_analyzeTableØ00__func__Ø000[0], str(125435), 13)
+ crt.Xstrncpy(nil, &_analyzeTableØ00__func__Ø000[0], str(125463), 13)
}
-// Generate code to implement the "ALTER TABLE xxx RENAME TO yyy"
-// command.
+// C comment
+// /*
+// ** Generate code to implement the "ALTER TABLE xxx RENAME TO yyy"
+// ** command.
+// */
func _sqlite3AlterRenameTable(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList, _pName *XToken) {
var _iDb, _nTabName, _savedDbFlags, _10_i int32
var _zDb, _zName, _zTabName, _zWhere *int8
@@ -108051,80 +109532,73 @@ func _sqlite3AlterRenameTable(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList, _p
var _pVTab *XVTable
var _15_p *XFKey
_zName = nil
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
_zWhere = nil
_pVTab = nil
- _savedDbFlags = _db.X6
+ _savedDbFlags = _db.Xflags
if func() int32 {
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96518), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterRenameTableØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96518), unsafe.Pointer(&_sqlite3AlterRenameTableØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
goto _exit_rename_table
}
func() {
- if (_pSrc.X0) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96519), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterRenameTableØ00__func__Ø000))), unsafe.Pointer(str(125448)))
+ if _pSrc.XnSrc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96519), unsafe.Pointer(&_sqlite3AlterRenameTableØ00__func__Ø000), unsafe.Pointer(str(125476)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _sqlite3BtreeHoldsAllMutexes(tls, (*Xsqlite3)(_pParse.X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96520), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterRenameTableØ00__func__Ø000))), unsafe.Pointer(str(124825)))
+ if _sqlite3BtreeHoldsAllMutexes(tls, (*Xsqlite3)(_pParse.Xdb)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96520), unsafe.Pointer(&_sqlite3AlterRenameTableØ00__func__Ø000), unsafe.Pointer(str(124853)))
crt.X__builtin_abort(tls)
}
}()
- _pTab = _sqlite3LocateTableItem(tls, _pParse, uint32(i32(0)), (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(i32(0)))))
+ _pTab = _sqlite3LocateTableItem(tls, _pParse, 0, elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), 0))
if _pTab == nil {
goto _exit_rename_table
}
- _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTab.X20))
- _zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(2097152)
- sink1(*p)
- }
+ _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTab.XpSchema))
+ _zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ _db.Xflags |= int32(2097152)
_zName = _sqlite3NameFromToken(tls, _db, _pName)
if _zName == nil {
goto _exit_rename_table
}
if (_sqlite3FindTable(tls, _db, _zName, _zDb) != nil) || (_sqlite3FindIndex(tls, _db, _zName, _zDb) != nil) {
- _sqlite3ErrorMsg(tls, _pParse, str(125462), unsafe.Pointer(_zName))
+ _sqlite3ErrorMsg(tls, _pParse, str(125490), unsafe.Pointer(_zName))
goto _exit_rename_table
}
- if i32(0) != _isSystemTable(tls, _pParse, _pTab.X0) {
+ if int32(0) != _isSystemTable(tls, _pParse, _pTab.XzName) {
goto _exit_rename_table
}
- if i32(0) != _sqlite3CheckObjectName(tls, _pParse, _zName) {
+ if int32(0) != _sqlite3CheckObjectName(tls, _pParse, _zName) {
goto _exit_rename_table
}
- if (*XSelect)(_pTab.X3) != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(125521), unsafe.Pointer(_pTab.X0))
+ if _pTab.XpSelect != nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(125549), unsafe.Pointer(_pTab.XzName))
goto _exit_rename_table
}
- if _sqlite3AuthCheck(tls, _pParse, i32(26), _zDb, _pTab.X0, nil) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(26), _zDb, _pTab.XzName, nil) != 0 {
goto _exit_rename_table
}
if _sqlite3ViewGetColumnNames(tls, _pParse, _pTab) != 0 {
goto _exit_rename_table
}
- if (_pTab.X16) == 0 {
+ if _pTab.XnModuleArg == 0 {
goto _16
}
_pVTab = _sqlite3GetVTable(tls, _db, _pTab)
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, *int8) int32
- }{(*(*func(*crt.TLS, *Xsqlite3_vtab, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8) int32
- }{((*Xsqlite3_module)((*Xsqlite3_vtab)(_pVTab.X2).X0).X19)})))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *Xsqlite3_vtab, *int8) int32
- }{nil})) {
+ if func() func(*crt.TLS, *Xsqlite3_vtab, *int8) int32 {
+ v := (*Xsqlite3_module)((*Xsqlite3_vtab)(_pVTab.XpVtab).XpModule).XxRename
+ return *(*func(*crt.TLS, *Xsqlite3_vtab, *int8) int32)(unsafe.Pointer(&v))
+ }() == nil {
_pVTab = nil
}
_16:
@@ -108135,30 +109609,30 @@ _16:
_sqlite3BeginWriteOperation(tls, _pParse, bool2int(_pVTab != nil), _iDb)
_sqlite3ChangeCookie(tls, _pParse, _iDb)
if _pVTab != nil {
- _10_i = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
+ _10_i = preInc2(&_pParse.XnMem, 1)
_sqlite3VdbeLoadString(tls, _v, _10_i, _zName)
- _sqlite3VdbeAddOp4(tls, _v, i32(160), _10_i, i32(0), i32(0), (*int8)(unsafe.Pointer(_pVTab)), i32(-8))
+ _sqlite3VdbeAddOp4(tls, _v, int32(160), _10_i, int32(0), int32(0), (*int8)(unsafe.Pointer(_pVTab)), int32(-8))
_sqlite3MayAbort(tls, _pParse)
}
- _zTabName = _pTab.X0
- _nTabName = _sqlite3Utf8CharLen(tls, _zTabName, i32(-1))
- if ((_db.X6) & i32(524288)) == 0 {
+ _zTabName = _pTab.XzName
+ _nTabName = _sqlite3Utf8CharLen(tls, _zTabName, int32(-1))
+ if (_db.Xflags & int32(524288)) == 0 {
goto _20
}
- if store0(&_zWhere, _whereForeignKeys(tls, _pParse, _pTab)) != nil {
- _sqlite3NestedParse(tls, _pParse, str(125548), unsafe.Pointer(_zDb), unsafe.Pointer(str(50026)), unsafe.Pointer(_zTabName), unsafe.Pointer(_zName), unsafe.Pointer(_zWhere))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zWhere))
+ if store1(&_zWhere, _whereForeignKeys(tls, _pParse, _pTab)) != nil {
+ _sqlite3NestedParse(tls, _pParse, str(125576), unsafe.Pointer(_zDb), unsafe.Pointer(str(49981)), unsafe.Pointer(_zTabName), unsafe.Pointer(_zName), unsafe.Pointer(_zWhere))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zWhere))
}
_20:
- _sqlite3NestedParse(tls, _pParse, str(125617), unsafe.Pointer(_zDb), unsafe.Pointer(str(50026)), unsafe.Pointer(_zName), unsafe.Pointer(_zName), unsafe.Pointer(_zName), unsafe.Pointer(_zName), unsafe.Pointer(_zName), _nTabName, unsafe.Pointer(_zTabName))
- if _sqlite3FindTable(tls, _db, str(111495), _zDb) != nil {
- _sqlite3NestedParse(tls, _pParse, str(126001), unsafe.Pointer(_zDb), unsafe.Pointer(_zName), unsafe.Pointer(_pTab.X0))
+ _sqlite3NestedParse(tls, _pParse, str(125645), unsafe.Pointer(_zDb), unsafe.Pointer(str(49981)), unsafe.Pointer(_zName), unsafe.Pointer(_zName), unsafe.Pointer(_zName), unsafe.Pointer(_zName), unsafe.Pointer(_zName), _nTabName, unsafe.Pointer(_zTabName))
+ if _sqlite3FindTable(tls, _db, str(111523), _zDb) != nil {
+ _sqlite3NestedParse(tls, _pParse, str(126029), unsafe.Pointer(_zDb), unsafe.Pointer(_zName), unsafe.Pointer(_pTab.XzName))
}
- if store0(&_zWhere, _whereTempTriggers(tls, _pParse, _pTab)) != nil {
- _sqlite3NestedParse(tls, _pParse, str(126059), unsafe.Pointer(_zName), unsafe.Pointer(_zName), unsafe.Pointer(_zWhere))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zWhere))
+ if store1(&_zWhere, _whereTempTriggers(tls, _pParse, _pTab)) != nil {
+ _sqlite3NestedParse(tls, _pParse, str(126087), unsafe.Pointer(_zName), unsafe.Pointer(_zName), unsafe.Pointer(_zWhere))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zWhere))
}
- if ((_db.X6) & i32(524288)) == 0 {
+ if (_db.Xflags & int32(524288)) == 0 {
goto _24
}
_15_p = _sqlite3FkReferences(tls, _pTab)
@@ -108166,45 +109640,51 @@ _25:
if _15_p == nil {
goto _28
}
- _16_pFrom = (*XTable)(_15_p.X0)
+ _16_pFrom = (*XTable)(_15_p.XpFrom)
if _16_pFrom != _pTab {
- _reloadTableSchema(tls, _pParse, (*XTable)(_15_p.X0), _16_pFrom.X0)
+ _reloadTableSchema(tls, _pParse, (*XTable)(_15_p.XpFrom), _16_pFrom.XzName)
}
- _15_p = (*XFKey)(_15_p.X3)
+ _15_p = (*XFKey)(_15_p.XpNextTo)
goto _25
_28:
_24:
_reloadTableSchema(tls, _pParse, _pTab, _zName)
_exit_rename_table:
_sqlite3SrcListDelete(tls, _db, _pSrc)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zName))
- *(*int32)(unsafe.Pointer(&(_db.X6))) = _savedDbFlags
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zName))
+ _db.Xflags = _savedDbFlags
}
var _sqlite3AlterRenameTableØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AlterRenameTableØ00__func__Ø000[0], str(126151), 24)
+ crt.Xstrncpy(nil, &_sqlite3AlterRenameTableØ00__func__Ø000[0], str(126179), 24)
}
-// Parameter zName is the name of a table that is about to be altered
-// (either with ALTER TABLE ... RENAME TO or ALTER TABLE ... ADD COLUMN).
-// If the table is a system table, this function leaves an error message
-// in pParse->zErr (system tables may not be altered) and returns non-zero.
-//
-// Or, if zName is not a system table, zero is returned.
+// C comment
+// /*
+// ** Parameter zName is the name of a table that is about to be altered
+// ** (either with ALTER TABLE ... RENAME TO or ALTER TABLE ... ADD COLUMN).
+// ** If the table is a system table, this function leaves an error message
+// ** in pParse->zErr (system tables may not be altered) and returns non-zero.
+// **
+// ** Or, if zName is not a system table, zero is returned.
+// */
func _isSystemTable(tls *crt.TLS, _pParse *XParse, _zName *int8) (r0 int32) {
- if (_sqlite3Strlen30(tls, _zName) > i32(6)) && (i32(0) == Xsqlite3_strnicmp(tls, _zName, str(111644), i32(7))) {
- _sqlite3ErrorMsg(tls, _pParse, str(126175), unsafe.Pointer(_zName))
- return i32(1)
+ if (_sqlite3Strlen30(tls, _zName) > int32(6)) && (int32(0) == Xsqlite3_strnicmp(tls, _zName, str(111672), int32(7))) {
+ _sqlite3ErrorMsg(tls, _pParse, str(126203), unsafe.Pointer(_zName))
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}
-// Generate the text of a WHERE expression which can be used to select all
-// tables that have foreign key constraints that refer to table pTab (i.e.
-// constraints for which pTab is the parent table) from the sqlite_master
-// table.
+// C comment
+// /*
+// ** Generate the text of a WHERE expression which can be used to select all
+// ** tables that have foreign key constraints that refer to table pTab (i.e.
+// ** constraints for which pTab is the parent table) from the sqlite_master
+// ** table.
+// */
func _whereForeignKeys(tls *crt.TLS, _pParse *XParse, _pTab *XTable) (r0 *int8) {
var _zWhere *int8
var _p *XFKey
@@ -108214,80 +109694,89 @@ _0:
if _p == nil {
goto _3
}
- _zWhere = _whereOrName(tls, (*Xsqlite3)(_pParse.X0), _zWhere, (*XTable)(_p.X0).X0)
- _p = (*XFKey)(_p.X3)
+ _zWhere = _whereOrName(tls, (*Xsqlite3)(_pParse.Xdb), _zWhere, (*XTable)(_p.XpFrom).XzName)
+ _p = (*XFKey)(_p.XpNextTo)
goto _0
_3:
return _zWhere
}
-// This function is used to create the text of expressions of the form:
-//
-// name=<constant1> OR name=<constant2> OR ...
-//
-// If argument zWhere is NULL, then a pointer string containing the text
-// "name=<constant>" is returned, where <constant> is the quoted version
-// of the string passed as argument zConstant. The returned buffer is
-// allocated using sqlite3DbMalloc(). It is the responsibility of the
-// caller to ensure that it is eventually freed.
-//
-// If argument zWhere is not NULL, then the string returned is
-// "<where> OR name=<constant>", where <where> is the contents of zWhere.
-// In this case zWhere is passed to sqlite3DbFree() before returning.
-//
+// C comment
+// /*
+// ** This function is used to create the text of expressions of the form:
+// **
+// ** name=<constant1> OR name=<constant2> OR ...
+// **
+// ** If argument zWhere is NULL, then a pointer string containing the text
+// ** "name=<constant>" is returned, where <constant> is the quoted version
+// ** of the string passed as argument zConstant. The returned buffer is
+// ** allocated using sqlite3DbMalloc(). It is the responsibility of the
+// ** caller to ensure that it is eventually freed.
+// **
+// ** If argument zWhere is not NULL, then the string returned is
+// ** "<where> OR name=<constant>", where <where> is the contents of zWhere.
+// ** In this case zWhere is passed to sqlite3DbFree() before returning.
+// **
+// */
func _whereOrName(tls *crt.TLS, _db *Xsqlite3, _zWhere *int8, _zConstant *int8) (r0 *int8) {
var _zNew *int8
if _zWhere == nil {
- _zNew = _sqlite3MPrintf(tls, _db, str(126203), unsafe.Pointer(_zConstant))
+ _zNew = _sqlite3MPrintf(tls, _db, str(126231), unsafe.Pointer(_zConstant))
goto _1
}
- _zNew = _sqlite3MPrintf(tls, _db, str(126211), unsafe.Pointer(_zWhere), unsafe.Pointer(_zConstant))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zWhere))
+ _zNew = _sqlite3MPrintf(tls, _db, str(126239), unsafe.Pointer(_zWhere), unsafe.Pointer(_zConstant))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zWhere))
_1:
return _zNew
}
-// Generate the text of a WHERE expression which can be used to select all
-// temporary triggers on table pTab from the sqlite_temp_master table. If
-// table pTab has no temporary triggers, or is itself stored in the
-// temporary database, NULL is returned.
+// C comment
+// /*
+// ** Generate the text of a WHERE expression which can be used to select all
+// ** temporary triggers on table pTab from the sqlite_temp_master table. If
+// ** table pTab has no temporary triggers, or is itself stored in the
+// ** temporary database, NULL is returned.
+// */
func _whereTempTriggers(tls *crt.TLS, _pParse *XParse, _pTab *XTable) (r0 *int8) {
var _zWhere, _4_zNew *int8
var _1_db *Xsqlite3
var _pTempSchema *XSchema
var _pTrig *XTrigger
_zWhere = nil
- _pTempSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_pParse.X0).X4) + 16*uintptr(i32(1)))).X4)
- if (*XSchema)(_pTab.X20) == _pTempSchema {
+ _pTempSchema = (*XSchema)(elem27((*XDb)((*Xsqlite3)(_pParse.Xdb).XaDb), uintptr(1)).XpSchema)
+ if (*XSchema)(_pTab.XpSchema) == _pTempSchema {
goto _0
}
- _1_db = (*Xsqlite3)(_pParse.X0)
+ _1_db = (*Xsqlite3)(_pParse.Xdb)
_pTrig = _sqlite3TriggerList(tls, _pParse, _pTab)
_1:
if _pTrig == nil {
goto _4
}
- if (*XSchema)(_pTrig.X6) == _pTempSchema {
- _zWhere = _whereOrName(tls, _1_db, _zWhere, _pTrig.X0)
+ if (*XSchema)(_pTrig.XpSchema) == _pTempSchema {
+ _zWhere = _whereOrName(tls, _1_db, _zWhere, _pTrig.XzName)
}
- _pTrig = (*XTrigger)(_pTrig.X9)
+ _pTrig = (*XTrigger)(_pTrig.XpNext)
goto _1
_4:
_0:
if _zWhere != nil {
- _4_zNew = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.X0), str(126225), unsafe.Pointer(_zWhere))
- _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.X0), (unsafe.Pointer)(_zWhere))
+ _4_zNew = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.Xdb), str(126253), unsafe.Pointer(_zWhere))
+ _sqlite3DbFree(tls, (*Xsqlite3)(_pParse.Xdb), unsafe.Pointer(_zWhere))
_zWhere = _4_zNew
}
return _zWhere
}
-// Generate code to drop and reload the internal representation of table
-// pTab from the database, including triggers and temporary triggers.
-// Argument zName is the name of the table in the database schema at
-// the time the generated code is executed. This can be different from
-// pTab->zName if this function is being called to code part of an
-// "ALTER TABLE RENAME TO" statement.
+// C comment
+// /*
+// ** Generate code to drop and reload the internal representation of table
+// ** pTab from the database, including triggers and temporary triggers.
+// ** Argument zName is the name of the table in the database schema at
+// ** the time the generated code is executed. This can be different from
+// ** pTab->zName if this function is being called to code part of an
+// ** "ALTER TABLE RENAME TO" statement.
+// */
func _reloadTableSchema(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _zName *int8) {
var _iDb, _1_iTrigDb int32
var _zWhere *int8
@@ -108297,25 +109786,25 @@ func _reloadTableSchema(tls *crt.TLS, _pParse *XParse, _pTab *XTable, _zName *in
if func() int32 {
if _v == nil {
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96446), unsafe.Pointer((*int8)(unsafe.Pointer(&_reloadTableSchemaØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96446), unsafe.Pointer(&_reloadTableSchemaØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(1)
+ return int32(1)
}()
}
- return i32(0)
+ return int32(0)
}() != 0 {
return
}
func() {
- if _sqlite3BtreeHoldsAllMutexes(tls, (*Xsqlite3)(_pParse.X0)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96447), unsafe.Pointer((*int8)(unsafe.Pointer(&_reloadTableSchemaØ00__func__Ø000))), unsafe.Pointer(str(124825)))
+ if _sqlite3BtreeHoldsAllMutexes(tls, (*Xsqlite3)(_pParse.Xdb)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96447), unsafe.Pointer(&_reloadTableSchemaØ00__func__Ø000), unsafe.Pointer(str(124853)))
crt.X__builtin_abort(tls)
}
}()
- _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTab.X20))
+ _iDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTab.XpSchema))
func() {
- if _iDb < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96449), unsafe.Pointer((*int8)(unsafe.Pointer(&_reloadTableSchemaØ00__func__Ø000))), unsafe.Pointer(str(42040)))
+ if _iDb < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96449), unsafe.Pointer(&_reloadTableSchemaØ00__func__Ø000), unsafe.Pointer(str(41995)))
crt.X__builtin_abort(tls)
}
}()
@@ -108324,40 +109813,43 @@ _7:
if _pTrig == nil {
goto _10
}
- _1_iTrigDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.X0), (*XSchema)(_pTrig.X6))
+ _1_iTrigDb = _sqlite3SchemaToIndex(tls, (*Xsqlite3)(_pParse.Xdb), (*XSchema)(_pTrig.XpSchema))
func() {
- if _1_iTrigDb != _iDb && _1_iTrigDb != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96455), unsafe.Pointer((*int8)(unsafe.Pointer(&_reloadTableSchemaØ00__func__Ø000))), unsafe.Pointer(str(126249)))
+ if _1_iTrigDb != _iDb && _1_iTrigDb != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96455), unsafe.Pointer(&_reloadTableSchemaØ00__func__Ø000), unsafe.Pointer(str(126277)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeAddOp4(tls, _v, i32(143), _1_iTrigDb, i32(0), i32(0), _pTrig.X0, i32(0))
- _pTrig = (*XTrigger)(_pTrig.X9)
+ _sqlite3VdbeAddOp4(tls, _v, int32(143), _1_iTrigDb, int32(0), int32(0), _pTrig.XzName, int32(0))
+ _pTrig = (*XTrigger)(_pTrig.XpNext)
goto _7
_10:
- _sqlite3VdbeAddOp4(tls, _v, i32(141), _iDb, i32(0), i32(0), _pTab.X0, i32(0))
- _zWhere = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.X0), str(126276), unsafe.Pointer(_zName))
+ _sqlite3VdbeAddOp4(tls, _v, int32(141), _iDb, int32(0), int32(0), _pTab.XzName, int32(0))
+ _zWhere = _sqlite3MPrintf(tls, (*Xsqlite3)(_pParse.Xdb), str(126304), unsafe.Pointer(_zName))
if _zWhere == nil {
return
}
_sqlite3VdbeAddParseSchemaOp(tls, _v, _iDb, _zWhere)
- if store0(&_zWhere, _whereTempTriggers(tls, _pParse, _pTab)) != nil {
- _sqlite3VdbeAddParseSchemaOp(tls, _v, i32(1), _zWhere)
+ if store1(&_zWhere, _whereTempTriggers(tls, _pParse, _pTab)) != nil {
+ _sqlite3VdbeAddParseSchemaOp(tls, _v, int32(1), _zWhere)
}
}
var _reloadTableSchemaØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_reloadTableSchemaØ00__func__Ø000[0], str(126288), 18)
+ crt.Xstrncpy(nil, &_reloadTableSchemaØ00__func__Ø000[0], str(126316), 18)
}
-// This function is called after an "ALTER TABLE ... ADD" statement
-// has been parsed. Argument pColDef contains the text of the new
-// column definition.
-//
-// The Table structure pParse->pNewTable was extended to include
-// the new column during parsing.
+// C comment
+// /*
+// ** This function is called after an "ALTER TABLE ... ADD" statement
+// ** has been parsed. Argument pColDef contains the text of the new
+// ** column definition.
+// **
+// ** The Table structure pParse->pNewTable was extended to include
+// ** the new column during parsing.
+// */
func _sqlite3AlterFinishAddColumn(tls *crt.TLS, _pParse *XParse, _pColDef *XToken) {
var _iDb, _r1, _7_rc, _10_savedDbFlags int32
var _zDb, _zTab, _zCol, _10_zEnd *int8
@@ -108367,237 +109859,236 @@ func _sqlite3AlterFinishAddColumn(tls *crt.TLS, _pParse *XParse, _pColDef *XToke
var _7_pVal *XMem
var _pDflt *XExpr
var _pCol *XColumn
- _v = (*TVdbe)(_pParse.X2)
- _db = (*Xsqlite3)(_pParse.X0)
- if (_pParse.X16) != 0 || ((_db.X17) != 0) {
+ _v = (*TVdbe)(_pParse.XpVdbe)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ if _pParse.XnErr != 0 || (_db.XmallocFailed != 0) {
return
}
func() {
if _v == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96717), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000))), unsafe.Pointer(str(42064)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96717), unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000), unsafe.Pointer(str(42019)))
crt.X__builtin_abort(tls)
}
}()
- _pNew = (*XTable)(_pParse.X63)
+ _pNew = (*XTable)(_pParse.XpNewTable)
func() {
if _pNew == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96719), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000))), unsafe.Pointer(str(126306)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96719), unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000), unsafe.Pointer(str(126334)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96721), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000))), unsafe.Pointer(str(9421)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96721), unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000), unsafe.Pointer(str(9376)))
crt.X__builtin_abort(tls)
}
}()
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pNew.X20))
- _zDb = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X0
- _zTab = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pNew.X0)) + 1*uintptr(i32(16))))
- _pCol = (*XColumn)(unsafe.Pointer(uintptr(_pNew.X1) + 16*uintptr(int32(_pNew.X11)-i32(1))))
- _pDflt = (*XExpr)(_pCol.X1)
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pNew.XpSchema))
+ _zDb = elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XzDbSName
+ _zTab = elem1(_pNew.XzName, uintptr(16))
+ _pCol = elem41((*XColumn)(_pNew.XaCol), uintptr(int32(_pNew.XnCol)-int32(1)))
+ _pDflt = (*XExpr)(_pCol.XpDflt)
_pTab = _sqlite3FindTable(tls, _db, _zTab, _zDb)
func() {
if _pTab == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96728), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000))), unsafe.Pointer(str(94241)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96728), unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000), unsafe.Pointer(str(94269)))
crt.X__builtin_abort(tls)
}
}()
- if _sqlite3AuthCheck(tls, _pParse, i32(26), _zDb, _pTab.X0, nil) != 0 {
+ if _sqlite3AuthCheck(tls, _pParse, int32(26), _zDb, _pTab.XzName, nil) != 0 {
return
}
func() {
- if _pDflt != nil && int32(_pDflt.X0) != i32(162) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96741), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000))), unsafe.Pointer(str(126311)))
+ if _pDflt != nil && int32(_pDflt.Xop) != int32(162) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96741), unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000), unsafe.Pointer(str(126339)))
crt.X__builtin_abort(tls)
}
}()
- if (_pDflt != nil) && (int32((*XExpr)(_pDflt.X4).X0) == i32(101)) {
+ if (_pDflt != nil) && (int32((*XExpr)(_pDflt.XpLeft).Xop) == int32(101)) {
_pDflt = nil
}
- if (int32(_pCol.X6) & i32(1)) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(126342))
+ if (int32(_pCol.XcolFlags) & int32(1)) != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(126370))
return
}
- if (*XIndex)(_pNew.X2) != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(126374))
+ if _pNew.XpIndex != nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(126402))
return
}
- if (((_db.X6)&i32(524288)) != 0 && ((*XFKey)(_pNew.X4) != nil)) && (_pDflt != nil) {
- _sqlite3ErrorMsg(tls, _pParse, str(126401))
+ if ((_db.Xflags&int32(524288)) != 0 && (_pNew.XpFKey != nil)) && (_pDflt != nil) {
+ _sqlite3ErrorMsg(tls, _pParse, str(126429))
return
}
- if ((_pCol.X3) != 0) && (_pDflt == nil) {
- _sqlite3ErrorMsg(tls, _pParse, str(126460))
+ if (_pCol.XnotNull != 0) && (_pDflt == nil) {
+ _sqlite3ErrorMsg(tls, _pParse, str(126488))
return
}
if _pDflt == nil {
goto _23
}
_7_pVal = nil
- _7_rc = _sqlite3ValueFromExpr(tls, _db, _pDflt, uint8(i32(1)), uint8(i32(65)), &_7_pVal)
+ _7_rc = _sqlite3ValueFromExpr(tls, _db, _pDflt, uint8(1), uint8(65), &_7_pVal)
func() {
- if _7_rc != i32(0) && _7_rc != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96776), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000))), unsafe.Pointer(str(5805)))
+ if _7_rc != int32(0) && _7_rc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96776), unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000), unsafe.Pointer(str(5706)))
crt.X__builtin_abort(tls)
}
}()
- if _7_rc != i32(0) {
+ if _7_rc != int32(0) {
func() {
- if int32(_db.X17) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96778), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000))), unsafe.Pointer(str(126513)))
+ if int32(_db.XmallocFailed) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96778), unsafe.Pointer(&_sqlite3AlterFinishAddColumnØ00__func__Ø000), unsafe.Pointer(str(126541)))
crt.X__builtin_abort(tls)
}
}()
return
}
if _7_pVal == nil {
- _sqlite3ErrorMsg(tls, _pParse, str(126535))
+ _sqlite3ErrorMsg(tls, _pParse, str(126563))
return
}
_sqlite3ValueFree(tls, _7_pVal)
_23:
- _zCol = _sqlite3DbStrNDup(tls, _db, _pColDef.X0, uint64(_pColDef.X1))
+ _zCol = _sqlite3DbStrNDup(tls, _db, _pColDef.Xz, uint64(_pColDef.Xn))
if _zCol == nil {
goto _31
}
- _10_zEnd = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zCol)) + 1*uintptr((_pColDef.X1)-uint32(i32(1)))))
- _10_savedDbFlags = _db.X6
+ _10_zEnd = elem1(_zCol, uintptr(_pColDef.Xn-uint32(1)))
+ _10_savedDbFlags = _db.Xflags
_32:
- if (uintptr(unsafe.Pointer(_10_zEnd)) > uintptr(unsafe.Pointer(_zCol))) && ((int32(*_10_zEnd) == i32(59)) || (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*_10_zEnd)))))&i32(1)) != 0) {
- *postInc0(&_10_zEnd, -1) = int8(i32(0))
+ if (crt.P2U(unsafe.Pointer(_10_zEnd)) > crt.P2U(unsafe.Pointer(_zCol))) && ((int32(*_10_zEnd) == int32(59)) || (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*_10_zEnd))))&int32(1)) != 0) {
+ *postInc1(&_10_zEnd, -1) = 0
goto _32
}
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(2097152)
- sink1(*p)
- }
- _sqlite3NestedParse(tls, _pParse, str(126581), unsafe.Pointer(_zDb), unsafe.Pointer(str(50026)), _pNew.X15, unsafe.Pointer(_zCol), (_pNew.X15)+i32(1), unsafe.Pointer(_zTab))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zCol))
- *(*int32)(unsafe.Pointer(&(_db.X6))) = _10_savedDbFlags
+ _db.Xflags |= int32(2097152)
+ _sqlite3NestedParse(tls, _pParse, str(126609), unsafe.Pointer(_zDb), unsafe.Pointer(str(49981)), _pNew.XaddColOffset, unsafe.Pointer(_zCol), _pNew.XaddColOffset+int32(1), unsafe.Pointer(_zTab))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zCol))
+ _db.Xflags = _10_savedDbFlags
_31:
_r1 = _sqlite3GetTempReg(tls, _pParse)
- _sqlite3VdbeAddOp3(tls, _v, i32(103), _iDb, _r1, i32(2))
+ _sqlite3VdbeAddOp3(tls, _v, int32(103), _iDb, _r1, int32(2))
_sqlite3VdbeUsesBtree(tls, _v, _iDb)
- _sqlite3VdbeAddOp2(tls, _v, i32(73), _r1, i32(-2))
- _sqlite3VdbeAddOp2(tls, _v, i32(46), _r1, _sqlite3VdbeCurrentAddr(tls, _v)+i32(2))
- _sqlite3VdbeAddOp3(tls, _v, i32(104), _iDb, i32(2), i32(3))
+ _sqlite3VdbeAddOp2(tls, _v, int32(73), _r1, int32(-2))
+ _sqlite3VdbeAddOp2(tls, _v, int32(46), _r1, _sqlite3VdbeCurrentAddr(tls, _v)+int32(2))
+ _sqlite3VdbeAddOp3(tls, _v, int32(104), _iDb, int32(2), int32(3))
_sqlite3ReleaseTempReg(tls, _pParse, _r1)
- _reloadTableSchema(tls, _pParse, _pTab, _pTab.X0)
+ _reloadTableSchema(tls, _pParse, _pTab, _pTab.XzName)
}
var _sqlite3AlterFinishAddColumnØ00__func__Ø000 [28]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AlterFinishAddColumnØ00__func__Ø000[0], str(126690), 28)
-}
-
-// This function is called by the parser after the table-name in
-// an "ALTER TABLE <table-name> ADD" statement is parsed. Argument
-// pSrc is the full-name of the table being altered.
-//
-// This routine makes a (partial) copy of the Table structure
-// for the table being altered and sets Parse.pNewTable to point
-// to it. Routines called by the parser as the column definition
-// is parsed (i.e. sqlite3AddColumn()) add the new Column data to
-// the copy. The copy of the Table structure is deleted by tokenize.c
-// after parsing is finished.
-//
-// Routine sqlite3AlterFinishAddColumn() will be called to complete
-// coding the "ALTER TABLE ... ADD" statement.
+ crt.Xstrncpy(nil, &_sqlite3AlterFinishAddColumnØ00__func__Ø000[0], str(126718), 28)
+}
+
+// C comment
+// /*
+// ** This function is called by the parser after the table-name in
+// ** an "ALTER TABLE <table-name> ADD" statement is parsed. Argument
+// ** pSrc is the full-name of the table being altered.
+// **
+// ** This routine makes a (partial) copy of the Table structure
+// ** for the table being altered and sets Parse.pNewTable to point
+// ** to it. Routines called by the parser as the column definition
+// ** is parsed (i.e. sqlite3AddColumn()) add the new Column data to
+// ** the copy. The copy of the Table structure is deleted by tokenize.c
+// ** after parsing is finished.
+// **
+// ** Routine sqlite3AlterFinishAddColumn() will be called to complete
+// ** coding the "ALTER TABLE ... ADD" statement.
+// */
func _sqlite3AlterBeginAddColumn(tls *crt.TLS, _pParse *XParse, _pSrc *XSrcList) {
var _iDb, _i, _nAlloc int32
var _db *Xsqlite3
var _pNew, _pTab *XTable
var _v *TVdbe
var _5_pCol *XColumn
- _db = (*Xsqlite3)(_pParse.X0)
+ _db = (*Xsqlite3)(_pParse.Xdb)
func() {
- if (*XTable)(_pParse.X63) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96850), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000))), unsafe.Pointer(str(24634)))
+ if (*XTable)(_pParse.XpNewTable) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96850), unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000), unsafe.Pointer(str(24589)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _sqlite3BtreeHoldsAllMutexes(tls, _db) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96851), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000))), unsafe.Pointer(str(9421)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96851), unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000), unsafe.Pointer(str(9376)))
crt.X__builtin_abort(tls)
}
}()
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
goto _exit_begin_add_column
}
- _pTab = _sqlite3LocateTableItem(tls, _pParse, uint32(i32(0)), (*TSrcList_item)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TSrcList_item)(unsafe.Pointer(&(_pSrc.X2)))))+68*uintptr(i32(0)))))
+ _pTab = _sqlite3LocateTableItem(tls, _pParse, 0, elem6((*TSrcList_item)(unsafe.Pointer(&_pSrc.Xa)), 0))
if _pTab == nil {
goto _exit_begin_add_column
}
- if (_pTab.X16) != 0 {
- _sqlite3ErrorMsg(tls, _pParse, str(126718))
+ if _pTab.XnModuleArg != 0 {
+ _sqlite3ErrorMsg(tls, _pParse, str(126746))
goto _exit_begin_add_column
}
- if (*XSelect)(_pTab.X3) != nil {
- _sqlite3ErrorMsg(tls, _pParse, str(126752))
+ if _pTab.XpSelect != nil {
+ _sqlite3ErrorMsg(tls, _pParse, str(126780))
goto _exit_begin_add_column
}
- if i32(0) != _isSystemTable(tls, _pParse, _pTab.X0) {
+ if int32(0) != _isSystemTable(tls, _pParse, _pTab.XzName) {
goto _exit_begin_add_column
}
func() {
- if (_pTab.X15) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96872), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000))), unsafe.Pointer(str(126782)))
+ if _pTab.XaddColOffset <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96872), unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000), unsafe.Pointer(str(126810)))
crt.X__builtin_abort(tls)
}
}()
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
- _pNew = (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(u32(80))))
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
+ _pNew = (*XTable)(_sqlite3DbMallocZero(tls, _db, uint64(80)))
if _pNew == nil {
goto _exit_begin_add_column
}
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X63))))) = _pNew
- *(*uint32)(unsafe.Pointer(&(_pNew.X8))) = uint32(i32(1))
- *(*int16)(unsafe.Pointer(&(_pNew.X11))) = _pTab.X11
+ *(**XTable)(unsafe.Pointer(&_pParse.XpNewTable)) = _pNew
+ _pNew.XnTabRef = uint32(1)
+ _pNew.XnCol = _pTab.XnCol
func() {
- if int32(_pNew.X11) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96887), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000))), unsafe.Pointer(str(126803)))
+ if int32(_pNew.XnCol) <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96887), unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000), unsafe.Pointer(str(126831)))
crt.X__builtin_abort(tls)
}
}()
- _nAlloc = (((int32(_pNew.X11) - i32(1)) / i32(8)) * i32(8)) + i32(8)
+ _nAlloc = (((int32(_pNew.XnCol) - int32(1)) / int32(8)) * int32(8)) + int32(8)
func() {
- if _nAlloc < int32(_pNew.X11) || (_nAlloc%i32(8)) != i32(0) || (_nAlloc-int32(_pNew.X11)) >= i32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96889), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000))), unsafe.Pointer(str(126816)))
+ if _nAlloc < int32(_pNew.XnCol) || (_nAlloc%int32(8)) != int32(0) || (_nAlloc-int32(_pNew.XnCol)) >= int32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96889), unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000), unsafe.Pointer(str(126844)))
crt.X__builtin_abort(tls)
}
}()
- *(**XColumn)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X1))))) = (*XColumn)(_sqlite3DbMallocZero(tls, _db, uint64(u32(16)*uint32(_nAlloc))))
- *(**int8)(unsafe.Pointer(&(_pNew.X0))) = _sqlite3MPrintf(tls, _db, str(126873), unsafe.Pointer(_pTab.X0))
- if ((*XColumn)(_pNew.X1) == nil) || ((_pNew.X0) == nil) {
+ *(**XColumn)(unsafe.Pointer(&_pNew.XaCol)) = (*XColumn)(_sqlite3DbMallocZero(tls, _db, uint64(uint32(16)*uint32(_nAlloc))))
+ _pNew.XzName = _sqlite3MPrintf(tls, _db, str(126901), unsafe.Pointer(_pTab.XzName))
+ if (_pNew.XaCol == nil) || (_pNew.XzName == nil) {
func() {
- if (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(96893), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000))), unsafe.Pointer(str(47848)))
+ if _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(96893), unsafe.Pointer(&_sqlite3AlterBeginAddColumnØ00__func__Ø000), unsafe.Pointer(str(47803)))
crt.X__builtin_abort(tls)
}
}()
goto _exit_begin_add_column
}
- crt.Xmemcpy(tls, _pNew.X1, _pTab.X1, u32(16)*uint32(_pNew.X11))
- _i = i32(0)
+ crt.Xmemcpy(tls, _pNew.XaCol, _pTab.XaCol, uint32(16)*uint32(_pNew.XnCol))
+ _i = int32(0)
_22:
- if _i >= int32(_pNew.X11) {
+ if _i >= int32(_pNew.XnCol) {
goto _25
}
- _5_pCol = (*XColumn)(unsafe.Pointer(uintptr(_pNew.X1) + 16*uintptr(_i)))
- *(**int8)(unsafe.Pointer(&(_5_pCol.X0))) = _sqlite3DbStrDup(tls, _db, _5_pCol.X0)
- *(**int8)(unsafe.Pointer(&(_5_pCol.X2))) = nil
- *(**XExpr)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_5_pCol.X1))))) = nil
+ _5_pCol = elem41((*XColumn)(_pNew.XaCol), uintptr(_i))
+ _5_pCol.XzName = _sqlite3DbStrDup(tls, _db, _5_pCol.XzName)
+ _5_pCol.XzColl = nil
+ *(**XExpr)(unsafe.Pointer(&_5_pCol.XpDflt)) = nil
_i += 1
goto _22
_25:
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X20))))) = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_iDb))).X4)
- *(*int32)(unsafe.Pointer(&(_pNew.X15))) = _pTab.X15
- *(*uint32)(unsafe.Pointer(&(_pNew.X8))) = uint32(i32(1))
- _sqlite3BeginWriteOperation(tls, _pParse, i32(0), _iDb)
+ *(**XSchema)(unsafe.Pointer(&_pNew.XpSchema)) = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_iDb)).XpSchema)
+ _pNew.XaddColOffset = _pTab.XaddColOffset
+ _pNew.XnTabRef = uint32(1)
+ _sqlite3BeginWriteOperation(tls, _pParse, int32(0), _iDb)
_v = _sqlite3GetVdbe(tls, _pParse)
if _v == nil {
goto _exit_begin_add_column
@@ -108610,11 +110101,14 @@ _exit_begin_add_column:
var _sqlite3AlterBeginAddColumnØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AlterBeginAddColumnØ00__func__Ø000[0], str(126892), 27)
+ crt.Xstrncpy(nil, &_sqlite3AlterBeginAddColumnØ00__func__Ø000[0], str(126920), 27)
}
-// The parser calls this routine after the CREATE VIRTUAL TABLE statement
-// has been completely parsed.
+// C comment
+// /*
+// ** The parser calls this routine after the CREATE VIRTUAL TABLE statement
+// ** has been completely parsed.
+// */
func _sqlite3VtabFinishParse(tls *crt.TLS, _pParse *XParse, _pEnd *XToken) {
var _1_iDb, _1_iReg int32
var _1_zStmt, _1_zWhere, _3_zName *int8
@@ -108622,216 +110116,231 @@ func _sqlite3VtabFinishParse(tls *crt.TLS, _pParse *XParse, _pEnd *XToken) {
var _3_pSchema *XSchema
var _pTab, _3_pOld *XTable
var _1_v *TVdbe
- _pTab = (*XTable)(_pParse.X63)
- _db = (*Xsqlite3)(_pParse.X0)
+ _pTab = (*XTable)(_pParse.XpNewTable)
+ _db = (*Xsqlite3)(_pParse.Xdb)
if _pTab == nil {
return
}
_addArgumentToVtab(tls, _pParse)
- *(**int8)(unsafe.Pointer(&((*XToken)(unsafe.Pointer(&(_pParse.X66))).X0))) = nil
- if (_pTab.X16) < i32(1) {
+ _pParse.XsArg.Xz = nil
+ if _pTab.XnModuleArg < int32(1) {
return
}
- if ((*t21)(unsafe.Pointer(&(_db.X33))).X2) != 0 {
+ if (_db.Xinit.Xbusy) != 0 {
goto _2
}
if _pEnd != nil {
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer(&(_pParse.X50))).X1))) = uint32(int32((uintptr(unsafe.Pointer(_pEnd.X0))-uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(_pParse.X50))).X0)))/1)) + (_pEnd.X1)
+ _pParse.XsNameToken.Xn = uint32(int32(uintptr(unsafe.Pointer(_pEnd.Xz))-uintptr(unsafe.Pointer(_pParse.XsNameToken.Xz)))) + _pEnd.Xn
}
- _1_zStmt = _sqlite3MPrintf(tls, _db, str(126919), unsafe.Pointer((*XToken)(unsafe.Pointer(&(_pParse.X50)))))
- _1_iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
- _sqlite3NestedParse(tls, _pParse, str(126943), unsafe.Pointer((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_1_iDb))).X0), unsafe.Pointer(str(50026)), unsafe.Pointer(_pTab.X0), unsafe.Pointer(_pTab.X0), unsafe.Pointer(_1_zStmt), _pParse.X31)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_1_zStmt))
+ _1_zStmt = _sqlite3MPrintf(tls, _db, str(126947), unsafe.Pointer(&_pParse.XsNameToken))
+ _1_iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
+ _sqlite3NestedParse(tls, _pParse, str(126971), unsafe.Pointer(elem27((*XDb)(_db.XaDb), uintptr(_1_iDb)).XzDbSName), unsafe.Pointer(str(49981)), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(_pTab.XzName), unsafe.Pointer(_1_zStmt), _pParse.XregRowid)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_1_zStmt))
_1_v = _sqlite3GetVdbe(tls, _pParse)
_sqlite3ChangeCookie(tls, _pParse, _1_iDb)
- _sqlite3VdbeAddOp0(tls, _1_v, i32(153))
- _1_zWhere = _sqlite3MPrintf(tls, _db, str(127031), unsafe.Pointer(_pTab.X0))
+ _sqlite3VdbeAddOp0(tls, _1_v, int32(153))
+ _1_zWhere = _sqlite3MPrintf(tls, _db, str(127059), unsafe.Pointer(_pTab.XzName))
_sqlite3VdbeAddParseSchemaOp(tls, _1_v, _1_iDb, _1_zWhere)
- _1_iReg = preInc1((*int32)(unsafe.Pointer(&(_pParse.X18))), 1)
- _sqlite3VdbeLoadString(tls, _1_v, _1_iReg, _pTab.X0)
- _sqlite3VdbeAddOp2(tls, _1_v, i32(156), _1_iDb, _1_iReg)
+ _1_iReg = preInc2(&_pParse.XnMem, 1)
+ _sqlite3VdbeLoadString(tls, _1_v, _1_iReg, _pTab.XzName)
+ _sqlite3VdbeAddOp2(tls, _1_v, int32(156), _1_iDb, _1_iReg)
goto _4
_2:
- _3_pSchema = (*XSchema)(_pTab.X20)
- _3_zName = _pTab.X0
+ _3_pSchema = (*XSchema)(_pTab.XpSchema)
+ _3_zName = _pTab.XzName
func() {
- if _sqlite3SchemaMutexHeld(tls, _db, i32(0), _3_pSchema) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125440), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabFinishParseØ00__func__Ø000))), unsafe.Pointer(str(127058)))
+ if _sqlite3SchemaMutexHeld(tls, _db, int32(0), _3_pSchema) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125440), unsafe.Pointer(&_sqlite3VtabFinishParseØ00__func__Ø000), unsafe.Pointer(str(127086)))
crt.X__builtin_abort(tls)
}
}()
- _3_pOld = (*XTable)(_sqlite3HashInsert(tls, (*XHash)(unsafe.Pointer(&(_3_pSchema.X2))), _3_zName, (unsafe.Pointer)(_pTab)))
+ _3_pOld = (*XTable)(_sqlite3HashInsert(tls, &_3_pSchema.XtblHash, _3_zName, unsafe.Pointer(_pTab)))
if _3_pOld != nil {
_sqlite3OomFault(tls, _db)
func() {
if _pTab != _3_pOld {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125444), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabFinishParseØ00__func__Ø000))), unsafe.Pointer(str(127097)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125444), unsafe.Pointer(&_sqlite3VtabFinishParseØ00__func__Ø000), unsafe.Pointer(str(127125)))
crt.X__builtin_abort(tls)
}
}()
return
}
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X63))))) = nil
+ *(**XTable)(unsafe.Pointer(&_pParse.XpNewTable)) = nil
_4:
}
-// This routine takes the module argument that has been accumulating
-// in pParse->zArg[] and appends it to the list of arguments on the
-// virtual table currently under construction in pParse->pTable.
+// C comment
+// /*
+// ** This routine takes the module argument that has been accumulating
+// ** in pParse->zArg[] and appends it to the list of arguments on the
+// ** virtual table currently under construction in pParse->pTable.
+// */
func _addArgumentToVtab(tls *crt.TLS, _pParse *XParse) {
var _1_n int32
var _1_z *int8
var _1_db *Xsqlite3
- if (((*XToken)(unsafe.Pointer(&(_pParse.X66))).X0) != nil) && ((*XTable)(_pParse.X63) != nil) {
- _1_z = (*XToken)(unsafe.Pointer(&(_pParse.X66))).X0
- _1_n = int32((*XToken)(unsafe.Pointer(&(_pParse.X66))).X1)
- _1_db = (*Xsqlite3)(_pParse.X0)
- _addModuleArgument(tls, _1_db, (*XTable)(_pParse.X63), _sqlite3DbStrNDup(tls, _1_db, _1_z, uint64(_1_n)))
+ if ((_pParse.XsArg.Xz) != nil) && (_pParse.XpNewTable != nil) {
+ _1_z = _pParse.XsArg.Xz
+ _1_n = int32(_pParse.XsArg.Xn)
+ _1_db = (*Xsqlite3)(_pParse.Xdb)
+ _addModuleArgument(tls, _1_db, (*XTable)(_pParse.XpNewTable), _sqlite3DbStrNDup(tls, _1_db, _1_z, uint64(_1_n)))
}
}
var _sqlite3VtabFinishParseØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabFinishParseØ00__func__Ø000[0], str(127108), 23)
+ crt.Xstrncpy(nil, &_sqlite3VtabFinishParseØ00__func__Ø000[0], str(127136), 23)
}
-// The parser calls this routine when it first sees a CREATE VIRTUAL TABLE
-// statement. The module name has been parsed, but the optional list
-// of parameters that follow the module name are still pending.
+// C comment
+// /*
+// ** The parser calls this routine when it first sees a CREATE VIRTUAL TABLE
+// ** statement. The module name has been parsed, but the optional list
+// ** of parameters that follow the module name are still pending.
+// */
func _sqlite3VtabBeginParse(tls *crt.TLS, _pParse *XParse, _pName1 *XToken, _pName2 *XToken, _pModuleName *XToken, _ifNotExists int32) {
var _iDb int32
var _db *Xsqlite3
var _pTable *XTable
- _sqlite3StartTable(tls, _pParse, _pName1, _pName2, i32(0), i32(0), i32(1), _ifNotExists)
- _pTable = (*XTable)(_pParse.X63)
+ _sqlite3StartTable(tls, _pParse, _pName1, _pName2, int32(0), int32(0), int32(1), _ifNotExists)
+ _pTable = (*XTable)(_pParse.XpNewTable)
if _pTable == nil {
return
}
func() {
- if nil != (*XIndex)(_pTable.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125323), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabBeginParseØ00__func__Ø000))), unsafe.Pointer(str(127131)))
+ if nil != (*XIndex)(_pTable.XpIndex) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125323), unsafe.Pointer(&_sqlite3VtabBeginParseØ00__func__Ø000), unsafe.Pointer(str(127159)))
crt.X__builtin_abort(tls)
}
}()
- _db = (*Xsqlite3)(_pParse.X0)
- _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTable.X20))
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTable.XpSchema))
func() {
- if _iDb < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125327), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabBeginParseØ00__func__Ø000))), unsafe.Pointer(str(42040)))
+ if _iDb < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125327), unsafe.Pointer(&_sqlite3VtabBeginParseØ00__func__Ø000), unsafe.Pointer(str(41995)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pTable.X16) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125329), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabBeginParseØ00__func__Ø000))), unsafe.Pointer(str(127149)))
+ if _pTable.XnModuleArg != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125329), unsafe.Pointer(&_sqlite3VtabBeginParseØ00__func__Ø000), unsafe.Pointer(str(127177)))
crt.X__builtin_abort(tls)
}
}()
_addModuleArgument(tls, _db, _pTable, _sqlite3NameFromToken(tls, _db, _pModuleName))
_addModuleArgument(tls, _db, _pTable, nil)
- _addModuleArgument(tls, _db, _pTable, _sqlite3DbStrDup(tls, _db, _pTable.X0))
+ _addModuleArgument(tls, _db, _pTable, _sqlite3DbStrDup(tls, _db, _pTable.XzName))
func() {
- if (((*XToken)(unsafe.Pointer(&(_pParse.X50))).X0) != (_pName2.X0) || (_pName2.X0) == nil) && (((*XToken)(unsafe.Pointer(&(_pParse.X50))).X0) != (_pName1.X0) || (_pName2.X0) != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125333), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabBeginParseØ00__func__Ø000))), unsafe.Pointer(str(127171)))
+ if ((_pParse.XsNameToken.Xz) != _pName2.Xz || _pName2.Xz == nil) && ((_pParse.XsNameToken.Xz) != _pName1.Xz || _pName2.Xz != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125333), unsafe.Pointer(&_sqlite3VtabBeginParseØ00__func__Ø000), unsafe.Pointer(str(127199)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer(&(_pParse.X50))).X1))) = uint32(int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pModuleName.X0))+1*uintptr(_pModuleName.X1))))) - uintptr(unsafe.Pointer((*XToken)(unsafe.Pointer(&(_pParse.X50))).X0))) / 1))
- if (_pTable.X17) != nil {
- _sqlite3AuthCheck(tls, _pParse, i32(29), _pTable.X0, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pTable.X17)) + 4*uintptr(i32(0)))), (*XDb)(unsafe.Pointer(uintptr((*Xsqlite3)(_pParse.X0).X4)+16*uintptr(_iDb))).X0)
+ _pParse.XsNameToken.Xn = uint32(int32(uintptr(unsafe.Pointer(elem1(_pModuleName.Xz, uintptr(_pModuleName.Xn)))) - uintptr(unsafe.Pointer(_pParse.XsNameToken.Xz))))
+ if _pTable.XazModuleArg != nil {
+ _sqlite3AuthCheck(tls, _pParse, int32(29), _pTable.XzName, *elem0(_pTable.XazModuleArg, 0), elem27((*XDb)((*Xsqlite3)(_pParse.Xdb).XaDb), uintptr(_iDb)).XzDbSName)
}
}
var _sqlite3VtabBeginParseØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabBeginParseØ00__func__Ø000[0], str(127274), 22)
+ crt.Xstrncpy(nil, &_sqlite3VtabBeginParseØ00__func__Ø000[0], str(127302), 22)
}
-// The parser calls this routine when it sees the first token
-// of an argument to the module name in a CREATE VIRTUAL TABLE statement.
+// C comment
+// /*
+// ** The parser calls this routine when it sees the first token
+// ** of an argument to the module name in a CREATE VIRTUAL TABLE statement.
+// */
func _sqlite3VtabArgInit(tls *crt.TLS, _pParse *XParse) {
_addArgumentToVtab(tls, _pParse)
- *(**int8)(unsafe.Pointer(&((*XToken)(unsafe.Pointer(&(_pParse.X66))).X0))) = nil
- *(*uint32)(unsafe.Pointer(&((*XToken)(unsafe.Pointer(&(_pParse.X66))).X1))) = uint32(i32(0))
+ _pParse.XsArg.Xz = nil
+ _pParse.XsArg.Xn = 0
}
-// The parser calls this routine for each token after the first token
-// in an argument to the module name in a CREATE VIRTUAL TABLE statement.
+// C comment
+// /*
+// ** The parser calls this routine for each token after the first token
+// ** in an argument to the module name in a CREATE VIRTUAL TABLE statement.
+// */
func _sqlite3VtabArgExtend(tls *crt.TLS, _pParse *XParse, _p *XToken) {
var _pArg *XToken
- _pArg = (*XToken)(unsafe.Pointer(&(_pParse.X66)))
- if (_pArg.X0) == nil {
- *(**int8)(unsafe.Pointer(&(_pArg.X0))) = _p.X0
- *(*uint32)(unsafe.Pointer(&(_pArg.X1))) = _p.X1
+ _pArg = &_pParse.XsArg
+ if _pArg.Xz == nil {
+ _pArg.Xz = _p.Xz
+ _pArg.Xn = _p.Xn
goto _1
}
func() {
- if uintptr(unsafe.Pointer(_pArg.X0)) > uintptr(unsafe.Pointer(_p.X0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(125471), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3VtabArgExtendØ00__func__Ø000))), unsafe.Pointer(str(127296)))
+ if crt.P2U(unsafe.Pointer(_pArg.Xz)) > crt.P2U(unsafe.Pointer(_p.Xz)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(125471), unsafe.Pointer(&_sqlite3VtabArgExtendØ00__func__Ø000), unsafe.Pointer(str(127324)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_pArg.X1))) = uint32(int32((uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X0))+1*uintptr(_p.X1))))) - uintptr(unsafe.Pointer(_pArg.X0))) / 1))
+ _pArg.Xn = uint32(int32(uintptr(unsafe.Pointer(elem1(_p.Xz, uintptr(_p.Xn)))) - uintptr(unsafe.Pointer(_pArg.Xz))))
_1:
}
var _sqlite3VtabArgExtendØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VtabArgExtendØ00__func__Ø000[0], str(127312), 21)
+ crt.Xstrncpy(nil, &_sqlite3VtabArgExtendØ00__func__Ø000[0], str(127340), 21)
}
-// This routine is invoked once per CTE by the parser while parsing a
-// WITH clause.
+// C comment
+// /*
+// ** This routine is invoked once per CTE by the parser while parsing a
+// ** WITH clause.
+// */
func _sqlite3WithAdd(tls *crt.TLS, _pParse *XParse, _pWith *XWith, _pName *XToken, _pArglist *XExprList, _pQuery *XSelect) (r0 *XWith) {
var _1_i, _4_nByte int32
var _zName *int8
var _db *Xsqlite3
var _pNew *XWith
- _db = (*Xsqlite3)(_pParse.X0)
- _zName = _sqlite3NameFromToken(tls, (*Xsqlite3)(_pParse.X0), _pName)
+ _db = (*Xsqlite3)(_pParse.Xdb)
+ _zName = _sqlite3NameFromToken(tls, (*Xsqlite3)(_pParse.Xdb), _pName)
if _zName == nil || _pWith == nil {
goto _1
}
- _1_i = i32(0)
+ _1_i = int32(0)
_2:
- if _1_i >= (_pWith.X0) {
+ if _1_i >= _pWith.XnCte {
goto _5
}
- if _sqlite3StrICmp(tls, _zName, (*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pWith.X2)))))+16*uintptr(_1_i))).X0) == i32(0) {
- _sqlite3ErrorMsg(tls, _pParse, str(127333), unsafe.Pointer(_zName))
+ if _sqlite3StrICmp(tls, _zName, elem43((*TCte)(unsafe.Pointer(&_pWith.Xa)), uintptr(_1_i)).XzName) == int32(0) {
+ _sqlite3ErrorMsg(tls, _pParse, str(127361), unsafe.Pointer(_zName))
}
_1_i += 1
goto _2
_5:
_1:
if _pWith != nil {
- _4_nByte = int32(u32(24) + (u32(16) * uint32(_pWith.X0)))
- _pNew = (*XWith)(_sqlite3DbRealloc(tls, _db, (unsafe.Pointer)(_pWith), uint64(_4_nByte)))
+ _4_nByte = int32(uint32(24) + (uint32(16) * uint32(_pWith.XnCte)))
+ _pNew = (*XWith)(_sqlite3DbRealloc(tls, _db, unsafe.Pointer(_pWith), uint64(_4_nByte)))
goto _8
}
- _pNew = (*XWith)(_sqlite3DbMallocZero(tls, _db, uint64(u32(24))))
+ _pNew = (*XWith)(_sqlite3DbMallocZero(tls, _db, uint64(24)))
_8:
func() {
- if (_pNew == nil || _zName == nil) && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(104109), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3WithAddØ00__func__Ø000))), unsafe.Pointer(str(127363)))
+ if (_pNew == nil || _zName == nil) && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(104109), unsafe.Pointer(&_sqlite3WithAddØ00__func__Ø000), unsafe.Pointer(str(127391)))
crt.X__builtin_abort(tls)
}
}()
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
_sqlite3ExprListDelete(tls, _db, _pArglist)
_sqlite3SelectDelete(tls, _db, _pQuery)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zName))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zName))
_pNew = _pWith
goto _14
}
- *(**XSelect)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pNew.X2))))) + 16*uintptr(_pNew.X0))).X2))))) = _pQuery
- *(**XExprList)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pNew.X2))))) + 16*uintptr(_pNew.X0))).X1))))) = _pArglist
- *(**int8)(unsafe.Pointer(&((*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pNew.X2))))) + 16*uintptr(_pNew.X0))).X0))) = _zName
- *(**int8)(unsafe.Pointer(&((*TCte)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]TCte)(unsafe.Pointer(&(_pNew.X2))))) + 16*uintptr(_pNew.X0))).X3))) = nil
- *(*int32)(unsafe.Pointer(&(_pNew.X0))) += 1
+ *(**XSelect)(unsafe.Pointer(&(elem43((*TCte)(unsafe.Pointer(&_pNew.Xa)), uintptr(_pNew.XnCte)).XpSelect))) = _pQuery
+ *(**XExprList)(unsafe.Pointer(&(elem43((*TCte)(unsafe.Pointer(&_pNew.Xa)), uintptr(_pNew.XnCte)).XpCols))) = _pArglist
+ elem43((*TCte)(unsafe.Pointer(&_pNew.Xa)), uintptr(_pNew.XnCte)).XzName = _zName
+ elem43((*TCte)(unsafe.Pointer(&_pNew.Xa)), uintptr(_pNew.XnCte)).XzCteErr = nil
+ _pNew.XnCte += 1
_14:
return _pNew
}
@@ -108839,191 +110348,214 @@ _14:
var _sqlite3WithAddØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3WithAddØ00__func__Ø000[0], str(127405), 15)
+ crt.Xstrncpy(nil, &_sqlite3WithAddØ00__func__Ø000[0], str(127433), 15)
}
-// Find the appropriate action for a parser given the non-terminal
-// look-ahead token iLookAhead.
+// C comment
+// /*
+// ** Find the appropriate action for a parser given the non-terminal
+// ** look-ahead token iLookAhead.
+// */
func _yy_find_reduce_action(tls *crt.TLS, _stateno int32, _iLookAhead uint8) (r0 int32) {
var _i int32
func() {
- if _stateno > i32(324) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137186), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000))), unsafe.Pointer(str(127420)))
+ if _stateno > int32(324) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137186), unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000), unsafe.Pointer(str(127448)))
crt.X__builtin_abort(tls)
}
}()
- _i = int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yy_reduce_ofst)) + 2*uintptr(_stateno))))
+ _i = int32(*elem50((*int16)(unsafe.Pointer(&_yy_reduce_ofst)), uintptr(_stateno)))
func() {
- if _i == i32(-174) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137189), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000))), unsafe.Pointer(str(127445)))
+ if _i == int32(-174) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137189), unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000), unsafe.Pointer(str(127473)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_iLookAhead) == i32(252) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137190), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000))), unsafe.Pointer(str(26915)))
+ if int32(_iLookAhead) == int32(252) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137190), unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000), unsafe.Pointer(str(26870)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_i
- *p = (*p) + int32(_iLookAhead)
- sink1(*p)
- }
+ _i += int32(_iLookAhead)
func() {
- if _i < i32(0) || _i >= i32(1566) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137197), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000))), unsafe.Pointer(str(127467)))
+ if _i < int32(0) || _i >= int32(1566) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137197), unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000), unsafe.Pointer(str(127495)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yy_lookahead)) + 1*uintptr(_i)))) != int32(_iLookAhead) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(137198), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000))), unsafe.Pointer(str(127493)))
+ if int32(*elem15((*uint8)(unsafe.Pointer(&_yy_lookahead)), uintptr(_i))) != int32(_iLookAhead) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(137198), unsafe.Pointer(&_yy_find_reduce_actionØ00__func__Ø000), unsafe.Pointer(str(127521)))
crt.X__builtin_abort(tls)
}
}()
- return int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_yy_action)) + 2*uintptr(_i))))
+ return int32(*elem20((*uint16)(unsafe.Pointer(&_yy_action)), uintptr(_i)))
}
var _yy_find_reduce_actionØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_yy_find_reduce_actionØ00__func__Ø000[0], str(127521), 22)
+ crt.Xstrncpy(nil, &_yy_find_reduce_actionØ00__func__Ø000[0], str(127549), 22)
}
var _yy_reduce_ofst [325]int16
func init() {
- _yy_reduce_ofst = [325]int16{i16(-119), i16(1014), i16(131), i16(1031), i16(-12), i16(225), i16(228), i16(300), i16(-40), i16(-45), i16(243), i16(256), i16(293), i16(129), i16(218), i16(418), i16(79), i16(376), i16(433), i16(298), i16(16), i16(137), i16(367), i16(323), i16(-38), i16(391), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(374), i16(437), i16(443), i16(508), i16(513), i16(522), i16(532), i16(582), i16(584), i16(620), i16(633), i16(635), i16(637), i16(644), i16(646), i16(648), i16(650), i16(652), i16(659), i16(661), i16(696), i16(709), i16(711), i16(714), i16(720), i16(722), i16(724), i16(726), i16(728), i16(733), i16(772), i16(784), i16(786), i16(822), i16(834), i16(836), i16(884), i16(886), i16(922), i16(934), i16(936), i16(986), i16(989), i16(1008), i16(1016), i16(1018), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(-173), i16(544), i16(-37), i16(274), i16(299), i16(501), i16(161), i16(-173), i16(193), i16(-173), i16(-173), i16(-173), i16(-173), i16(22), i16(22), i16(22), i16(64), i16(141), i16(212), i16(342), i16(208), i16(504), i16(504), i16(132), i16(494), i16(606), i16(677), i16(678), i16(750), i16(794), i16(796), i16(-58), i16(32), i16(383), i16(660), i16(737), i16(386), i16(787), i16(800), i16(441), i16(872), i16(224), i16(850), i16(803), i16(949), i16(624), i16(830), i16(669), i16(961), i16(979), i16(983), i16(1011), i16(1013), i16(1032), i16(753), i16(789), i16(321), i16(94), i16(116), i16(304), i16(375), i16(210), i16(388), i16(392), i16(478), i16(545), i16(649), i16(721), i16(727), i16(736), i16(752), i16(795), i16(853), i16(952), i16(958), i16(1004), i16(1040), i16(1046), i16(1049), i16(1050), i16(1056), i16(1059), i16(1067), i16(559), i16(774), i16(811), i16(1068), i16(1080), i16(938), i16(1082), i16(1083), i16(1088), i16(962), i16(1089), i16(1090), i16(1052), i16(1093), i16(1094), i16(1095), i16(388), i16(1096), i16(1103), i16(1104), i16(1105), i16(1106), i16(1107), i16(965), i16(998), i16(1055), i16(1057), i16(1058), i16(938), i16(1069), i16(1071), i16(1120), i16(1073), i16(1061), i16(1062), i16(1033), i16(1076), i16(1039), i16(1108), i16(1087), i16(1099), i16(1111), i16(1066), i16(1054), i16(1112), i16(1113), i16(1091), i16(1084), i16(1135), i16(1060), i16(1133), i16(1138), i16(1064), i16(1081), i16(1139), i16(1100), i16(1119), i16(1109), i16(1124), i16(1127), i16(1140), i16(1142), i16(1168), i16(1173), i16(1132), i16(1115), i16(1147), i16(1148), i16(1137), i16(1180), i16(1182), i16(1110), i16(1121), i16(1188), i16(1189), i16(1197), i16(1181), i16(1200), i16(1202), i16(1205), i16(1203), i16(1191), i16(1192), i16(1199), i16(1206), i16(1207), i16(1209), i16(1210), i16(1211), i16(1214), i16(1212), i16(1218), i16(1219), i16(1175), i16(1183), i16(1185), i16(1184), i16(1186), i16(1190), i16(1187), i16(1196), i16(1237), i16(1193), i16(1253), i16(1194), i16(1236), i16(1195), i16(1198), i16(1238), i16(1213), i16(1221), i16(1220), i16(1227), i16(1229), i16(1271), i16(1275), i16(1284), i16(1285), i16(1289), i16(1290), i16(1292), i16(1293), i16(1201), i16(1208), i16(1216), i16(1280), i16(1281), i16(1264), i16(1269), i16(1283)}
+ _yy_reduce_ofst = [325]int16{int16(-119), int16(1014), int16(131), int16(1031), int16(-12), int16(225), int16(228), int16(300), int16(-40), int16(-45), int16(243), int16(256), int16(293), int16(129), int16(218), int16(418), int16(79), int16(376), int16(433), int16(298), int16(16), int16(137), int16(367), int16(323), int16(-38), int16(391), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(374), int16(437), int16(443), int16(508), int16(513), int16(522), int16(532), int16(582), int16(584), int16(620), int16(633), int16(635), int16(637), int16(644), int16(646), int16(648), int16(650), int16(652), int16(659), int16(661), int16(696), int16(709), int16(711), int16(714), int16(720), int16(722), int16(724), int16(726), int16(728), int16(733), int16(772), int16(784), int16(786), int16(822), int16(834), int16(836), int16(884), int16(886), int16(922), int16(934), int16(936), int16(986), int16(989), int16(1008), int16(1016), int16(1018), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(-173), int16(544), int16(-37), int16(274), int16(299), int16(501), int16(161), int16(-173), int16(193), int16(-173), int16(-173), int16(-173), int16(-173), int16(22), int16(22), int16(22), int16(64), int16(141), int16(212), int16(342), int16(208), int16(504), int16(504), int16(132), int16(494), int16(606), int16(677), int16(678), int16(750), int16(794), int16(796), int16(-58), int16(32), int16(383), int16(660), int16(737), int16(386), int16(787), int16(800), int16(441), int16(872), int16(224), int16(850), int16(803), int16(949), int16(624), int16(830), int16(669), int16(961), int16(979), int16(983), int16(1011), int16(1013), int16(1032), int16(753), int16(789), int16(321), int16(94), int16(116), int16(304), int16(375), int16(210), int16(388), int16(392), int16(478), int16(545), int16(649), int16(721), int16(727), int16(736), int16(752), int16(795), int16(853), int16(952), int16(958), int16(1004), int16(1040), int16(1046), int16(1049), int16(1050), int16(1056), int16(1059), int16(1067), int16(559), int16(774), int16(811), int16(1068), int16(1080), int16(938), int16(1082), int16(1083), int16(1088), int16(962), int16(1089), int16(1090), int16(1052), int16(1093), int16(1094), int16(1095), int16(388), int16(1096), int16(1103), int16(1104), int16(1105), int16(1106), int16(1107), int16(965), int16(998), int16(1055), int16(1057), int16(1058), int16(938), int16(1069), int16(1071), int16(1120), int16(1073), int16(1061), int16(1062), int16(1033), int16(1076), int16(1039), int16(1108), int16(1087), int16(1099), int16(1111), int16(1066), int16(1054), int16(1112), int16(1113), int16(1091), int16(1084), int16(1135), int16(1060), int16(1133), int16(1138), int16(1064), int16(1081), int16(1139), int16(1100), int16(1119), int16(1109), int16(1124), int16(1127), int16(1140), int16(1142), int16(1168), int16(1173), int16(1132), int16(1115), int16(1147), int16(1148), int16(1137), int16(1180), int16(1182), int16(1110), int16(1121), int16(1188), int16(1189), int16(1197), int16(1181), int16(1200), int16(1202), int16(1205), int16(1203), int16(1191), int16(1192), int16(1199), int16(1206), int16(1207), int16(1209), int16(1210), int16(1211), int16(1214), int16(1212), int16(1218), int16(1219), int16(1175), int16(1183), int16(1185), int16(1184), int16(1186), int16(1190), int16(1187), int16(1196), int16(1237), int16(1193), int16(1253), int16(1194), int16(1236), int16(1195), int16(1198), int16(1238), int16(1213), int16(1221), int16(1220), int16(1227), int16(1229), int16(1271), int16(1275), int16(1284), int16(1285), int16(1289), int16(1290), int16(1292), int16(1293), int16(1201), int16(1208), int16(1216), int16(1280), int16(1281), int16(1264), int16(1269), int16(1283)}
}
-// The following is executed when the parser accepts
+// C comment
+// /*
+// ** The following is executed when the parser accepts
+// */
func _yy_accept(tls *crt.TLS, _yypParser *XyyParser) {
var _pParse *XParse
- _pParse = (*XParse)(_yypParser.X1)
+ _pParse = (*XParse)(_yypParser.XpParse)
if _yyTraceFILE != nil {
- crt.Xfprintf(tls, _yyTraceFILE, str(127543), unsafe.Pointer(_yyTracePrompt))
+ crt.Xfprintf(tls, _yyTraceFILE, str(127571), unsafe.Pointer(_yyTracePrompt))
}
func() {
- if (*XyyStackEntry)(_yypParser.X0) != (*XyyStackEntry)(unsafe.Pointer((*[100]XyyStackEntry)(unsafe.Pointer(&(_yypParser.X2))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138991), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_acceptØ00__func__Ø000))), unsafe.Pointer(str(127554)))
+ if (*XyyStackEntry)(_yypParser.Xyytos) != (*XyyStackEntry)(unsafe.Pointer(&_yypParser.Xyystack)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138991), unsafe.Pointer(&_yy_acceptØ00__func__Ø000), unsafe.Pointer(str(127582)))
crt.X__builtin_abort(tls)
}
}()
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_yypParser.X1))))) = _pParse
+ *(**XParse)(unsafe.Pointer(&_yypParser.XpParse)) = _pParse
}
var _yy_acceptØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_yy_acceptØ00__func__Ø000[0], str(127591), 10)
+ crt.Xstrncpy(nil, &_yy_acceptØ00__func__Ø000[0], str(127619), 10)
}
-// The following code executes when a syntax error first occurs.
+// C comment
+// /*
+// ** The following code executes when a syntax error first occurs.
+// */
func _yy_syntax_error(tls *crt.TLS, _yypParser *XyyParser, _yymajor int32, _yyminor XToken) {
var _pParse *XParse
- _pParse = (*XParse)(_yypParser.X1)
+ _pParse = (*XParse)(_yypParser.XpParse)
func() {
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_yyminor.X0)) + 1*uintptr(i32(0))))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(138970), unsafe.Pointer((*int8)(unsafe.Pointer(&_yy_syntax_errorØ00__func__Ø000))), unsafe.Pointer(str(127601)))
+ if (*elem1(_yyminor.Xz, 0)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(138970), unsafe.Pointer(&_yy_syntax_errorØ00__func__Ø000), unsafe.Pointer(str(127629)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3ErrorMsg(tls, _pParse, str(27285), unsafe.Pointer(&_yyminor))
- *(**XParse)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_yypParser.X1))))) = _pParse
+ _sqlite3ErrorMsg(tls, _pParse, str(27240), unsafe.Pointer(&_yyminor))
+ *(**XParse)(unsafe.Pointer(&_yypParser.XpParse)) = _pParse
}
var _yy_syntax_errorØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_yy_syntax_errorØ00__func__Ø000[0], str(127612), 16)
+ crt.Xstrncpy(nil, &_yy_syntax_errorØ00__func__Ø000[0], str(127640), 16)
}
-// Clear all secondary memory allocations from the parser
+// C comment
+// /*
+// ** Clear all secondary memory allocations from the parser
+// */
func _sqlite3ParserFinalize(tls *crt.TLS, _p unsafe.Pointer) {
var _pParser *XyyParser
_pParser = (*XyyParser)(_p)
_0:
- if uintptr(unsafe.Pointer((*XyyStackEntry)(_pParser.X0))) > uintptr(unsafe.Pointer((*XyyStackEntry)(unsafe.Pointer((*[100]XyyStackEntry)(unsafe.Pointer(&(_pParser.X2))))))) {
+ if crt.P2U(_pParser.Xyytos) > crt.P2U(unsafe.Pointer(&_pParser.Xyystack)) {
_yy_pop_parser_stack(tls, _pParser)
goto _0
}
}
-// Enable or disable the shared pager and schema features.
-//
-// This routine has no effect on existing database connections.
-// The shared cache setting effects only future calls to
-// sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
+// C comment
+// /*
+// ** Enable or disable the shared pager and schema features.
+// **
+// ** This routine has no effect on existing database connections.
+// ** The shared cache setting effects only future calls to
+// ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
+// */
func Xsqlite3_enable_shared_cache(tls *crt.TLS, _enable int32) (r0 int32) {
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X26))) = _enable
- return i32(0)
+ _sqlite3Config.XsharedCacheEnabled = _enable
+ return int32(0)
}
-// Return the most recent error code generated by an SQLite routine. If NULL is
-// passed to this function, we assume a malloc() failed during sqlite3_open().
+// C comment
+// /*
+// ** Return the most recent error code generated by an SQLite routine. If NULL is
+// ** passed to this function, we assume a malloc() failed during sqlite3_open().
+// */
func Xsqlite3_errcode(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
if (_db != nil) && (_sqlite3SafetyCheckSickOrOk(tls, _db) == 0) {
- return _sqlite3MisuseError(tls, i32(142777))
+ return _sqlite3MisuseError(tls, int32(142777))
}
- if (_db == nil) || ((_db.X17) != 0) {
- return _sqlite3NomemError(tls, i32(142780))
+ if (_db == nil) || (_db.XmallocFailed != 0) {
+ return _sqlite3NomemError(tls, int32(142780))
}
- return (_db.X10) & (_db.X11)
+ return _db.XerrCode & _db.XerrMask
}
-// Return UTF-16 encoded English language explanation of the most recent
-// error.
+// C comment
+// /*
+// ** Return UTF-16 encoded English language explanation of the most recent
+// ** error.
+// */
func Xsqlite3_errmsg16(tls *crt.TLS, _db *Xsqlite3) (r0 unsafe.Pointer) {
var _z unsafe.Pointer
if _db == nil {
- return (unsafe.Pointer)(&_sqlite3_errmsg16Ø00outOfMemØ001)
+ return unsafe.Pointer(&_sqlite3_errmsg16Ø00outOfMemØ001)
}
if _sqlite3SafetyCheckSickOrOk(tls, _db) == 0 {
- return (unsafe.Pointer)(&_sqlite3_errmsg16Ø00misuseØ002)
+ return unsafe.Pointer(&_sqlite3_errmsg16Ø00misuseØ002)
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- if (_db.X17) != 0 {
- _z = (unsafe.Pointer)(&_sqlite3_errmsg16Ø00outOfMemØ001)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ if _db.XmallocFailed != 0 {
+ _z = unsafe.Pointer(&_sqlite3_errmsg16Ø00outOfMemØ001)
goto _3
}
- _z = Xsqlite3_value_text16(tls, (*XMem)(_db.X56))
+ _z = Xsqlite3_value_text16(tls, (*XMem)(_db.XpErr))
if _z == nil {
- _sqlite3ErrorWithMsg(tls, _db, _db.X10, _sqlite3ErrStr(tls, _db.X10))
- _z = Xsqlite3_value_text16(tls, (*XMem)(_db.X56))
+ _sqlite3ErrorWithMsg(tls, _db, _db.XerrCode, _sqlite3ErrStr(tls, _db.XerrCode))
+ _z = Xsqlite3_value_text16(tls, (*XMem)(_db.XpErr))
}
_sqlite3OomClear(tls, _db)
_3:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _z
}
var _sqlite3_errmsg16Ø00outOfMemØ001 [14]uint16
func init() {
- _sqlite3_errmsg16Ø00outOfMemØ001 = [14]uint16{u16(111), u16(117), u16(116), u16(32), u16(111), u16(102), u16(32), u16(109), u16(101), u16(109), u16(111), u16(114), u16(121), u16(0)}
+ _sqlite3_errmsg16Ø00outOfMemØ001 = [14]uint16{uint16(111), uint16(117), uint16(116), uint16(32), uint16(111), uint16(102), uint16(32), uint16(109), uint16(101), uint16(109), uint16(111), uint16(114), uint16(121), uint16(0)}
}
var _sqlite3_errmsg16Ø00misuseØ002 [39]uint16
func init() {
- _sqlite3_errmsg16Ø00misuseØ002 = [39]uint16{u16(108), u16(105), u16(98), u16(114), u16(97), u16(114), u16(121), u16(32), u16(114), u16(111), u16(117), u16(116), u16(105), u16(110), u16(101), u16(32), u16(99), u16(97), u16(108), u16(108), u16(101), u16(100), u16(32), u16(111), u16(117), u16(116), u16(32), u16(111), u16(102), u16(32), u16(115), u16(101), u16(113), u16(117), u16(101), u16(110), u16(99), u16(101), u16(0)}
+ _sqlite3_errmsg16Ø00misuseØ002 = [39]uint16{uint16(108), uint16(105), uint16(98), uint16(114), uint16(97), uint16(114), uint16(121), uint16(32), uint16(114), uint16(111), uint16(117), uint16(116), uint16(105), uint16(110), uint16(101), uint16(32), uint16(99), uint16(97), uint16(108), uint16(108), uint16(101), uint16(100), uint16(32), uint16(111), uint16(117), uint16(116), uint16(32), uint16(111), uint16(102), uint16(32), uint16(115), uint16(101), uint16(113), uint16(117), uint16(101), uint16(110), uint16(99), uint16(101), uint16(0)}
}
-// Return TRUE (non-zero) of the statement supplied as an argument needs
-// to be recompiled. A statement needs to be recompiled whenever the
-// execution environment changes in a way that would alter the program
-// that sqlite3_prepare() generates. For example, if new functions or
-// collating sequences are registered or if an authorizer function is
-// added or changed.
+// C comment
+// /*
+// ** Return TRUE (non-zero) of the statement supplied as an argument needs
+// ** to be recompiled. A statement needs to be recompiled whenever the
+// ** execution environment changes in a way that would alter the program
+// ** that sqlite3_prepare() generates. For example, if new functions or
+// ** collating sequences are registered or if an authorizer function is
+// ** added or changed.
+// */
func Xsqlite3_expired(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
- return bool2int((_p == nil) || (((uint32(_p.X32) << uint(i32(31))) >> uint(i32(31))) != 0))
+ return bool2int((_p == nil) || (((uint32(_p.Xexpired) << 31) >> 31) != 0))
}
-// This routine frees the space the sqlite3_get_table() malloced.
+// C comment
+// /*
+// ** This routine frees the space the sqlite3_get_table() malloced.
+// */
func Xsqlite3_free_table(tls *crt.TLS, _azResult **int8) {
var _1_i, _1_n int32
if _azResult == nil {
@@ -109032,75 +110564,81 @@ func Xsqlite3_free_table(tls *crt.TLS, _azResult **int8) {
*(*uintptr)(unsafe.Pointer(&_azResult)) += uintptr(4294967292)
func() {
if _azResult == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(122634), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_free_tableØ00__func__Ø000))), unsafe.Pointer(str(127628)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(122634), unsafe.Pointer(&_sqlite3_free_tableØ00__func__Ø000), unsafe.Pointer(str(127656)))
crt.X__builtin_abort(tls)
}
}()
- _1_n = int32(uintptr(unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azResult)) + 4*uintptr(i32(0)))))))
- _1_i = i32(1)
+ _1_n = int32(crt.P2U(unsafe.Pointer(*elem0(_azResult, 0))))
+ _1_i = int32(1)
_3:
if _1_i >= _1_n {
goto _6
}
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azResult)) + 4*uintptr(_1_i)))) != nil {
- Xsqlite3_free(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azResult)) + 4*uintptr(_1_i)))))
+ if (*elem0(_azResult, uintptr(_1_i))) != nil {
+ Xsqlite3_free(tls, unsafe.Pointer(*elem0(_azResult, uintptr(_1_i))))
}
_1_i += 1
goto _3
_6:
- Xsqlite3_free(tls, (unsafe.Pointer)(_azResult))
+ Xsqlite3_free(tls, unsafe.Pointer(_azResult))
_0:
}
var _sqlite3_free_tableØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_free_tableØ00__func__Ø000[0], str(127640), 19)
+ crt.Xstrncpy(nil, &_sqlite3_free_tableØ00__func__Ø000[0], str(127668), 19)
}
-// Test to see whether or not the database connection is in autocommit
-// mode. Return TRUE if it is and FALSE if not. Autocommit mode is on
-// by default. Autocommit is disabled by a BEGIN statement and reenabled
-// by the next COMMIT or ROLLBACK.
+// C comment
+// /*
+// ** Test to see whether or not the database connection is in autocommit
+// ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on
+// ** by default. Autocommit is disabled by a BEGIN statement and reenabled
+// ** by the next COMMIT or ROLLBACK.
+// */
func Xsqlite3_get_autocommit(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(143772))
- return i32(0)
- }
- return int32(_db.X15)
-}
-
-// Return the auxiliary data pointer, if any, for the iArg'th argument to
-// the user-function defined by pCtx.
-//
-// The left-most argument is 0.
-//
-// Undocumented behavior: If iArg is negative then access a cache of
-// auxiliary data pointers that is available to all functions within a
-// single prepared statement. The iArg values must match.
+ _sqlite3MisuseError(tls, int32(143772))
+ return int32(0)
+ }
+ return int32(_db.XautoCommit)
+}
+
+// C comment
+// /*
+// ** Return the auxiliary data pointer, if any, for the iArg'th argument to
+// ** the user-function defined by pCtx.
+// **
+// ** The left-most argument is 0.
+// **
+// ** Undocumented behavior: If iArg is negative then access a cache of
+// ** auxiliary data pointers that is available to all functions within a
+// ** single prepared statement. The iArg values must match.
+// */
func Xsqlite3_get_auxdata(tls *crt.TLS, _pCtx *Xsqlite3_context, _iArg int32) (r0 unsafe.Pointer) {
var _pAuxData *XAuxData
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76913), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_get_auxdataØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76913), unsafe.Pointer(&_sqlite3_get_auxdataØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*TVdbe)(_pCtx.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76917), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_get_auxdataØ00__func__Ø000))), unsafe.Pointer(str(127659)))
+ if (*TVdbe)(_pCtx.XpVdbe) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76917), unsafe.Pointer(&_sqlite3_get_auxdataØ00__func__Ø000), unsafe.Pointer(str(127687)))
crt.X__builtin_abort(tls)
}
}()
- _pAuxData = (*XAuxData)((*TVdbe)(_pCtx.X3).X43)
+ _pAuxData = (*XAuxData)((*TVdbe)(_pCtx.XpVdbe).XpAuxData)
_4:
if _pAuxData == nil {
goto _7
}
- if ((_pAuxData.X1) == _iArg) && (((_pAuxData.X0) == (_pCtx.X4)) || (_iArg < i32(0))) {
- return _pAuxData.X2
+ if (_pAuxData.XiAuxArg == _iArg) && ((_pAuxData.XiAuxOp == _pCtx.XiOp) || (_iArg < int32(0))) {
+ return _pAuxData.XpAux
}
- _pAuxData = (*XAuxData)(_pAuxData.X4)
+ _pAuxData = (*XAuxData)(_pAuxData.XpNextAux)
goto _4
_7:
return nil
@@ -109109,222 +110647,219 @@ _7:
var _sqlite3_get_auxdataØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_get_auxdataØ00__func__Ø000[0], str(127674), 20)
+ crt.Xstrncpy(nil, &_sqlite3_get_auxdataØ00__func__Ø000[0], str(127702), 20)
}
-// Query the database. But instead of invoking a callback for each row,
-// malloc() for space to hold the result and return the entire results
-// at the conclusion of the call.
-//
-// The result that is written to ***pazResult is held in memory obtained
-// from malloc(). But the caller cannot free this memory directly.
-// Instead, the entire table should be passed to sqlite3_free_table() when
-// the calling procedure is finished using it.
+// C comment
+// /*
+// ** Query the database. But instead of invoking a callback for each row,
+// ** malloc() for space to hold the result and return the entire results
+// ** at the conclusion of the call.
+// **
+// ** The result that is written to ***pazResult is held in memory obtained
+// ** from malloc(). But the caller cannot free this memory directly.
+// ** Instead, the entire table should be passed to sqlite3_free_table() when
+// ** the calling procedure is finished using it.
+// */
func Xsqlite3_get_table(tls *crt.TLS, _db *Xsqlite3, _zSql *int8, _pazResult ***int8, _pnRow *int32, _pnColumn *int32, _pzErrMsg **int8) (r0 int32) {
var _rc int32
var _6_azNew **int8
var _res XTabResult
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_pazResult == nil) {
- return _sqlite3MisuseError(tls, i32(122571))
+ return _sqlite3MisuseError(tls, int32(122571))
}
*_pazResult = nil
if _pnColumn != nil {
- *_pnColumn = i32(0)
+ *_pnColumn = int32(0)
}
if _pnRow != nil {
- *_pnRow = i32(0)
+ *_pnRow = int32(0)
}
if _pzErrMsg != nil {
*_pzErrMsg = nil
}
- *(**int8)(unsafe.Pointer(&(_res.X1))) = nil
- *(*uint32)(unsafe.Pointer(&(_res.X3))) = uint32(i32(0))
- *(*uint32)(unsafe.Pointer(&(_res.X4))) = uint32(i32(0))
- *(*uint32)(unsafe.Pointer(&(_res.X5))) = uint32(i32(1))
- *(*uint32)(unsafe.Pointer(&(_res.X2))) = uint32(i32(20))
- *(*int32)(unsafe.Pointer(&(_res.X6))) = i32(0)
- *(***int8)(unsafe.Pointer(&(_res.X0))) = (**int8)(Xsqlite3_malloc64(tls, uint64(u32(4)*(_res.X2))))
- if (_res.X0) == nil {
- *(*int32)(unsafe.Pointer(&(_db.X10))) = i32(7)
- return _sqlite3NomemError(tls, i32(122586))
- }
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_res.X0)) + 4*uintptr(i32(0)))) = nil
- _rc = Xsqlite3_exec(tls, _db, _zSql, _sqlite3_get_table_cb, (unsafe.Pointer)(&_res), _pzErrMsg)
- i32(0)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_res.X0)) + 4*uintptr(i32(0)))) = (*int8)((unsafe.Pointer)(uintptr(int32(_res.X5))))
- if (_rc & i32(255)) != i32(4) {
+ _res.XzErrMsg = nil
+ _res.XnRow = 0
+ _res.XnColumn = 0
+ _res.XnData = uint32(1)
+ _res.XnAlloc = uint32(20)
+ _res.Xrc = int32(0)
+ _res.XazResult = (**int8)(Xsqlite3_malloc64(tls, uint64(uint32(4)*_res.XnAlloc)))
+ if _res.XazResult == nil {
+ _db.XerrCode = int32(7)
+ return _sqlite3NomemError(tls, int32(122586))
+ }
+ *elem0(_res.XazResult, 0) = nil
+ _rc = Xsqlite3_exec(tls, _db, _zSql, _sqlite3_get_table_cb, unsafe.Pointer(&_res), _pzErrMsg)
+
+ *elem0(_res.XazResult, 0) = (*int8)(crt.U2P(uintptr(int32(_res.XnData))))
+ if (_rc & int32(255)) != int32(4) {
goto _6
}
- Xsqlite3_free_table(tls, (**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_res.X0))+4*uintptr(i32(1)))))
- if (_res.X1) == nil {
+ Xsqlite3_free_table(tls, elem0(_res.XazResult, uintptr(1)))
+ if _res.XzErrMsg == nil {
goto _7
}
if _pzErrMsg != nil {
- Xsqlite3_free(tls, (unsafe.Pointer)(*_pzErrMsg))
- *_pzErrMsg = Xsqlite3_mprintf(tls, str(24576), unsafe.Pointer(_res.X1))
+ Xsqlite3_free(tls, unsafe.Pointer(*_pzErrMsg))
+ *_pzErrMsg = Xsqlite3_mprintf(tls, str(24531), unsafe.Pointer(_res.XzErrMsg))
}
- Xsqlite3_free(tls, (unsafe.Pointer)(_res.X1))
+ Xsqlite3_free(tls, unsafe.Pointer(_res.XzErrMsg))
_7:
- *(*int32)(unsafe.Pointer(&(_db.X10))) = _res.X6
- return _res.X6
+ _db.XerrCode = _res.Xrc
+ return _res.Xrc
_6:
- Xsqlite3_free(tls, (unsafe.Pointer)(_res.X1))
- if _rc != i32(0) {
- Xsqlite3_free_table(tls, (**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_res.X0))+4*uintptr(i32(1)))))
+ Xsqlite3_free(tls, unsafe.Pointer(_res.XzErrMsg))
+ if _rc != int32(0) {
+ Xsqlite3_free_table(tls, elem0(_res.XazResult, uintptr(1)))
return _rc
}
- if (_res.X2) <= (_res.X5) {
+ if _res.XnAlloc <= _res.XnData {
goto _10
}
- _6_azNew = (**int8)(Xsqlite3_realloc64(tls, (unsafe.Pointer)(_res.X0), uint64(u32(4)*(_res.X5))))
+ _6_azNew = (**int8)(Xsqlite3_realloc64(tls, unsafe.Pointer(_res.XazResult), uint64(uint32(4)*_res.XnData)))
if _6_azNew == nil {
- Xsqlite3_free_table(tls, (**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_res.X0))+4*uintptr(i32(1)))))
- *(*int32)(unsafe.Pointer(&(_db.X10))) = i32(7)
- return _sqlite3NomemError(tls, i32(122615))
+ Xsqlite3_free_table(tls, elem0(_res.XazResult, uintptr(1)))
+ _db.XerrCode = int32(7)
+ return _sqlite3NomemError(tls, int32(122615))
}
- *(***int8)(unsafe.Pointer(&(_res.X0))) = _6_azNew
+ _res.XazResult = _6_azNew
_10:
- *_pazResult = (**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_res.X0)) + 4*uintptr(i32(1))))
+ *_pazResult = elem0(_res.XazResult, uintptr(1))
if _pnColumn != nil {
- *_pnColumn = int32(_res.X4)
+ *_pnColumn = int32(_res.XnColumn)
}
if _pnRow != nil {
- *_pnRow = int32(_res.X3)
+ *_pnRow = int32(_res.XnRow)
}
return _rc
-
- _ = _res
- panic(0)
}
-// This routine is called once for each row in the result table. Its job
-// is to fill in the TabResult structure appropriately, allocating new
-// memory as necessary.
+// C comment
+// /*
+// ** This routine is called once for each row in the result table. Its job
+// ** is to fill in the TabResult structure appropriately, allocating new
+// ** memory as necessary.
+// */
func _sqlite3_get_table_cb(tls *crt.TLS, _pArg unsafe.Pointer, _nCol int32, _argv **int8, _colv **int8) (r0 int32) {
var _need, _i, _10_n int32
var _z *int8
var _3_azNew **int8
var _p *XTabResult
_p = (*XTabResult)(_pArg)
- if ((_p.X3) == uint32(i32(0))) && (_argv != nil) {
- _need = _nCol * i32(2)
+ if (_p.XnRow == (0)) && (_argv != nil) {
+ _need = _nCol * int32(2)
goto _2
}
_need = _nCol
_2:
- if ((_p.X5) + uint32(_need)) <= (_p.X2) {
+ if (_p.XnData + uint32(_need)) <= _p.XnAlloc {
goto _3
}
- *(*uint32)(unsafe.Pointer(&(_p.X2))) = ((_p.X2) * uint32(i32(2))) + uint32(_need)
- _3_azNew = (**int8)(Xsqlite3_realloc64(tls, (unsafe.Pointer)(_p.X0), uint64(u32(4)*(_p.X2))))
+ _p.XnAlloc = (_p.XnAlloc * uint32(2)) + uint32(_need)
+ _3_azNew = (**int8)(Xsqlite3_realloc64(tls, unsafe.Pointer(_p.XazResult), uint64(uint32(4)*_p.XnAlloc)))
if _3_azNew == nil {
goto _malloc_failed
}
- *(***int8)(unsafe.Pointer(&(_p.X0))) = _3_azNew
+ _p.XazResult = _3_azNew
_3:
- if (_p.X3) != uint32(i32(0)) {
+ if _p.XnRow != (0) {
goto _5
}
- *(*uint32)(unsafe.Pointer(&(_p.X4))) = uint32(_nCol)
- _i = i32(0)
+ _p.XnColumn = uint32(_nCol)
+ _i = int32(0)
_6:
if _i >= _nCol {
goto _9
}
- _z = Xsqlite3_mprintf(tls, str(24576), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_colv)) + 4*uintptr(_i)))))
+ _z = Xsqlite3_mprintf(tls, str(24531), unsafe.Pointer(*elem0(_colv, uintptr(_i))))
if _z == nil {
goto _malloc_failed
}
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X0)) + 4*uintptr(postInc5((*uint32)(unsafe.Pointer(&(_p.X5))), uint32(1))))) = _z
+ *elem0(_p.XazResult, uintptr(postInc23(&_p.XnData, uint32(1)))) = _z
_i += 1
goto _6
_9:
goto _12
_5:
- if int32(_p.X4) != _nCol {
- Xsqlite3_free(tls, (unsafe.Pointer)(_p.X1))
- *(**int8)(unsafe.Pointer(&(_p.X1))) = Xsqlite3_mprintf(tls, str(127694))
- *(*int32)(unsafe.Pointer(&(_p.X6))) = i32(1)
- return i32(1)
+ if int32(_p.XnColumn) != _nCol {
+ Xsqlite3_free(tls, unsafe.Pointer(_p.XzErrMsg))
+ _p.XzErrMsg = Xsqlite3_mprintf(tls, str(127722))
+ _p.Xrc = int32(1)
+ return int32(1)
}
_12:
if _argv == nil {
goto _13
}
- _i = i32(0)
+ _i = int32(0)
_14:
if _i >= _nCol {
goto _17
}
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))) == nil {
+ if (*elem0(_argv, uintptr(_i))) == nil {
_z = nil
goto _19
}
- _10_n = _sqlite3Strlen30(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))) + i32(1)
+ _10_n = _sqlite3Strlen30(tls, *elem0(_argv, uintptr(_i))) + int32(1)
_z = (*int8)(Xsqlite3_malloc64(tls, uint64(_10_n)))
if _z == nil {
goto _malloc_failed
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_z), (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))), uint32(_10_n))
+ crt.Xmemcpy(tls, unsafe.Pointer(_z), unsafe.Pointer(*elem0(_argv, uintptr(_i))), uint32(_10_n))
_19:
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X0)) + 4*uintptr(postInc5((*uint32)(unsafe.Pointer(&(_p.X5))), uint32(1))))) = _z
+ *elem0(_p.XazResult, uintptr(postInc23(&_p.XnData, uint32(1)))) = _z
_i += 1
goto _14
_17:
- *(*uint32)(unsafe.Pointer(&(_p.X3))) += 1
+ _p.XnRow += 1
_13:
- return i32(0)
+ return int32(0)
_malloc_failed:
- *(*int32)(unsafe.Pointer(&(_p.X6))) = _sqlite3NomemError(tls, i32(122545))
- return i32(1)
+ _p.Xrc = _sqlite3NomemError(tls, int32(122545))
+ return int32(1)
}
-// Cause any pending operation to stop at its earliest opportunity.
+// C comment
+// /*
+// ** Cause any pending operation to stop at its earliest opportunity.
+// */
func Xsqlite3_interrupt(tls *crt.TLS, _db *Xsqlite3) {
- if (_sqlite3SafetyCheckOk(tls, _db) == 0) && ((_db == nil) || ((_db.X28) != uint32(i32(1691352191)))) {
- _sqlite3MisuseError(tls, i32(142055))
+ if (_sqlite3SafetyCheckOk(tls, _db) == 0) && ((_db == nil) || (_db.Xmagic != uint32(1691352191))) {
+ _sqlite3MisuseError(tls, int32(142055))
return
}
- *(*int32)(unsafe.Pointer((*t9)(unsafe.Pointer(&(_db.X57))))) = i32(1)
+ *(*int32)(unsafe.Pointer(&_db.Xu1)) = int32(1)
}
-// Return the ROWID of the most recent insert
+// C comment
+// /*
+// ** Return the ROWID of the most recent insert
+// */
func Xsqlite3_last_insert_rowid(tls *crt.TLS, _db *Xsqlite3) (r0 int64) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(141385))
- return int64(i32(0))
+ _sqlite3MisuseError(tls, int32(141385))
+ return 0
}
- return _db.X7
-}
-
-// IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
-// a pointer to the to the sqlite3_version[] string constant.
-func Xsqlite3_libversion(tls *crt.TLS) (r0 *int8) {
- return (*int8)(unsafe.Pointer(&Xsqlite3_version))
-}
-
-var Xsqlite3_version [7]int8
-
-func init() {
- crt.Xstrncpy(nil, &Xsqlite3_version[0], str(127759), 7)
+ return _db.XlastRowid
}
-// IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
-// returns an integer equal to SQLITE_VERSION_NUMBER.
-func Xsqlite3_libversion_number(tls *crt.TLS) (r0 int32) {
- return i32(3019003)
-}
-
-// Open a new database handle.
+// C comment
+// /*
+// ** Open a new database handle.
+// */
func Xsqlite3_open(tls *crt.TLS, _zFilename *int8, _ppDb **Xsqlite3) (r0 int32) {
- return _openDatabase(tls, _zFilename, _ppDb, uint32(i32(6)), nil)
+ return _openDatabase(tls, _zFilename, _ppDb, uint32(6), nil)
}
-// This routine does the work of opening a database on behalf of
-// sqlite3_open() and sqlite3_open16(). The database filename "zFilename"
-// is UTF-8 encoded.
+// C comment
+// /*
+// ** This routine does the work of opening a database on behalf of
+// ** sqlite3_open() and sqlite3_open16(). The database filename "zFilename"
+// ** is UTF-8 encoded.
+// */
func _openDatabase(tls *crt.TLS, _zFilename *int8, _ppDb **Xsqlite3, _flags uint32, _zVfs *int8) (r0 int32) {
var _rc, _isThreadsafe int32
var _zOpen, _zErrMsg *int8
@@ -109332,198 +110867,183 @@ func _openDatabase(tls *crt.TLS, _zFilename *int8, _ppDb **Xsqlite3, _flags uint
_zOpen = nil
_zErrMsg = nil
if _ppDb == nil {
- return _sqlite3MisuseError(tls, i32(143267))
+ return _sqlite3MisuseError(tls, int32(143267))
}
*_ppDb = nil
_rc = Xsqlite3_initialize(tls)
if _rc != 0 {
return _rc
}
- i32(0)
- i32(0)
- i32(0)
- if ((i32(1) << uint(int32(_flags&uint32(i32(7))))) & i32(70)) == i32(0) {
- return _sqlite3MisuseError(tls, i32(143292))
+
+ if ((int32(1) << uint(int32(_flags&uint32(7)))) & int32(70)) == int32(0) {
+ return _sqlite3MisuseError(tls, int32(143292))
}
- if (_sqlite3Config.X1) == i32(0) {
- _isThreadsafe = i32(0)
+ if _sqlite3Config.XbCoreMutex == int32(0) {
+ _isThreadsafe = int32(0)
goto _8
}
- if (_flags & uint32(i32(32768))) != 0 {
- _isThreadsafe = i32(0)
+ if (_flags & uint32(32768)) != 0 {
+ _isThreadsafe = int32(0)
goto _8
}
- if (_flags & uint32(i32(65536))) != 0 {
- _isThreadsafe = i32(1)
+ if (_flags & uint32(65536)) != 0 {
+ _isThreadsafe = int32(1)
goto _8
}
- _isThreadsafe = _sqlite3Config.X2
+ _isThreadsafe = _sqlite3Config.XbFullMutex
_8:
- if (_flags & uint32(i32(262144))) != 0 {
- {
- p := &_flags
- *p = (*p) & uint32(i32(-131073))
- sink5(*p)
- }
+ if (_flags & uint32(262144)) != 0 {
+ _flags &= uint32(4294836223)
goto _11
}
- if (_sqlite3Config.X26) != 0 {
- {
- p := &_flags
- *p = (*p) | uint32(i32(131072))
- sink5(*p)
- }
+ if _sqlite3Config.XsharedCacheEnabled != 0 {
+ _flags |= uint32(131072)
}
_11:
- {
- p := &_flags
- *p = (*p) & uint32(i32(-655129))
- sink5(*p)
- }
- _db = (*Xsqlite3)(_sqlite3MallocZero(tls, uint64(u32(456))))
+ _flags &= uint32(4294312167)
+ _db = (*Xsqlite3)(_sqlite3MallocZero(tls, uint64(456)))
if _db == nil {
goto _opendb_out
}
if _isThreadsafe == 0 {
goto _13
}
- *(**Xsqlite3_mutex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X3))))) = _sqlite3MutexAlloc(tls, i32(1))
- if (*Xsqlite3_mutex)(_db.X3) == nil {
- Xsqlite3_free(tls, (unsafe.Pointer)(_db))
+ *(**Xsqlite3_mutex)(unsafe.Pointer(&_db.Xmutex)) = _sqlite3MutexAlloc(tls, int32(1))
+ if (*Xsqlite3_mutex)(_db.Xmutex) == nil {
+ Xsqlite3_free(tls, unsafe.Pointer(_db))
_db = nil
goto _opendb_out
}
_13:
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- *(*int32)(unsafe.Pointer(&(_db.X11))) = i32(255)
- *(*int32)(unsafe.Pointer(&(_db.X5))) = i32(2)
- *(*uint32)(unsafe.Pointer(&(_db.X28))) = u32(4030429446)
- *(**XDb)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X4))))) = (*XDb)(unsafe.Pointer((*[2]XDb)(unsafe.Pointer(&(_db.X72)))))
- i32(0)
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31)))), (unsafe.Pointer)(&_aHardLimit), u32(48))
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(11)))) = i32(0)
- *(*uint8)(unsafe.Pointer(&(_db.X15))) = uint8(i32(1))
- *(*int8)(unsafe.Pointer(&(_db.X20))) = int8(i32(-1))
- *(*int64)(unsafe.Pointer(&(_db.X8))) = _sqlite3Config.X17
- *(*int32)(unsafe.Pointer(&(_db.X27))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_db.X32))) = i32(2147483647)
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(17825888)
- sink1(*p)
- }
- _sqlite3HashInit(tls, (*XHash)(unsafe.Pointer(&(_db.X70))))
- _sqlite3HashInit(tls, (*XHash)(unsafe.Pointer(&(_db.X65))))
- _createCollation(tls, _db, (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(i32(1)), nil, _binCollFunc, nil)
- _createCollation(tls, _db, (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(i32(3)), nil, _binCollFunc, nil)
- _createCollation(tls, _db, (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(i32(2)), nil, _binCollFunc, nil)
- _createCollation(tls, _db, str(103035), uint8(i32(1)), nil, _nocaseCollatingFunc, nil)
- _createCollation(tls, _db, str(127766), uint8(i32(1)), (unsafe.Pointer)(uintptr(u32(1))), _binCollFunc, nil)
- if (_db.X17) != 0 {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _db.XerrMask = int32(255)
+ _db.XnDb = int32(2)
+ _db.Xmagic = uint32(4030429446)
+ *(**XDb)(unsafe.Pointer(&_db.XaDb)) = (*XDb)(unsafe.Pointer(&_db.XaDbStatic))
+
+ crt.Xmemcpy(tls, unsafe.Pointer(&_db.XaLimit), unsafe.Pointer(&_aHardLimit), uint32(48))
+ *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), uintptr(11)) = int32(0)
+ _db.XautoCommit = uint8(1)
+ _db.XnextAutovac = int8(-1)
+ _db.XszMmap = _sqlite3Config.XszMmap
+ _db.XnextPagesize = int32(0)
+ _db.XnMaxSorterMmap = int32(2147483647)
+ _db.Xflags |= int32(17825888)
+ _sqlite3HashInit(tls, &_db.XaCollSeq)
+ _sqlite3HashInit(tls, &_db.XaModule)
+ _createCollation(tls, _db, (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(1), nil, _binCollFunc, nil)
+ _createCollation(tls, _db, (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(3), nil, _binCollFunc, nil)
+ _createCollation(tls, _db, (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(2), nil, _binCollFunc, nil)
+ _createCollation(tls, _db, str(103063), uint8(1), nil, _nocaseCollatingFunc, nil)
+ _createCollation(tls, _db, str(127787), uint8(1), crt.U2P(uintptr(uint32(1))), _binCollFunc, nil)
+ if _db.XmallocFailed != 0 {
goto _opendb_out
}
- *(**XCollSeq)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X2))))) = _sqlite3FindCollSeq(tls, _db, uint8(i32(1)), (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)), i32(0))
+ *(**XCollSeq)(unsafe.Pointer(&_db.XpDfltColl)) = _sqlite3FindCollSeq(tls, _db, uint8(1), (*int8)(unsafe.Pointer(&_sqlite3StrBINARY)), int32(0))
func() {
- if (*XCollSeq)(_db.X2) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143411), unsafe.Pointer((*int8)(unsafe.Pointer(&_openDatabaseØ00__func__Ø000))), unsafe.Pointer(str(127772)))
+ if (*XCollSeq)(_db.XpDfltColl) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143411), unsafe.Pointer(&_openDatabaseØ00__func__Ø000), unsafe.Pointer(str(127793)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint32)(unsafe.Pointer(&(_db.X9))) = _flags
- _rc = _sqlite3ParseUri(tls, _zVfs, _zFilename, &_flags, (**Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_db.X0))))), &_zOpen, &_zErrMsg)
- if _rc == i32(0) {
+ _db.XopenFlags = _flags
+ _rc = _sqlite3ParseUri(tls, _zVfs, _zFilename, &_flags, (**Xsqlite3_vfs)(unsafe.Pointer(&_db.XpVfs)), &_zOpen, &_zErrMsg)
+ if _rc == int32(0) {
goto _18
}
- if _rc == i32(7) {
+ if _rc == int32(7) {
_sqlite3OomFault(tls, _db)
}
_sqlite3ErrorWithMsg(tls, _db, _rc, func() *int8 {
if _zErrMsg != nil {
- return str(24576)
+ return str(24531)
}
return nil
}(), unsafe.Pointer(_zErrMsg))
- Xsqlite3_free(tls, (unsafe.Pointer)(_zErrMsg))
+ Xsqlite3_free(tls, unsafe.Pointer(_zErrMsg))
goto _opendb_out
_18:
- _rc = _sqlite3BtreeOpen(tls, (*Xsqlite3_vfs)(_db.X0), _zOpen, _db, (**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X1))))), i32(0), int32(_flags|uint32(i32(256))))
- if _rc == i32(0) {
+ _rc = _sqlite3BtreeOpen(tls, (*Xsqlite3_vfs)(_db.XpVfs), _zOpen, _db, (**XBtree)(unsafe.Pointer(&(elem27((*XDb)(_db.XaDb), 0).XpBt))), int32(0), int32(_flags|uint32(256)))
+ if _rc == int32(0) {
goto _22
}
- if _rc == i32(3082) {
- _rc = _sqlite3NomemError(tls, i32(143428))
+ if _rc == int32(3082) {
+ _rc = _sqlite3NomemError(tls, int32(143428))
}
_sqlite3Error(tls, _db, _rc)
goto _opendb_out
_22:
- _sqlite3BtreeEnter(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X1))
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X4))))) = _sqlite3SchemaGet(tls, _db, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X1))
- if (_db.X17) == 0 {
- *(*uint8)(unsafe.Pointer(&(_db.X14))) = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X4).X8
- }
- _sqlite3BtreeLeave(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(i32(0)))).X1))
- *(**XSchema)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(1)))).X4))))) = _sqlite3SchemaGet(tls, _db, nil)
- *(**int8)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X0))) = str(60448)
- *(*uint8)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X2))) = uint8(i32(3))
- *(**int8)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(1)))).X0))) = str(23842)
- *(*uint8)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(1)))).X2))) = uint8(i32(1))
- *(*uint32)(unsafe.Pointer(&(_db.X28))) = u32(2687084183)
- if (_db.X17) != 0 {
+ _sqlite3BtreeEnter(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), 0).XpBt))
+ *(**XSchema)(unsafe.Pointer(&(elem27((*XDb)(_db.XaDb), 0).XpSchema))) = _sqlite3SchemaGet(tls, _db, (*XBtree)(elem27((*XDb)(_db.XaDb), 0).XpBt))
+ if _db.XmallocFailed == 0 {
+ _db.Xenc = (*XSchema)(elem27((*XDb)(_db.XaDb), 0).XpSchema).Xenc
+ }
+ _sqlite3BtreeLeave(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), 0).XpBt))
+ *(**XSchema)(unsafe.Pointer(&(elem27((*XDb)(_db.XaDb), uintptr(1)).XpSchema))) = _sqlite3SchemaGet(tls, _db, nil)
+ elem27((*XDb)(_db.XaDb), 0).XzDbSName = str(92534)
+ elem27((*XDb)(_db.XaDb), 0).Xsafety_level = uint8(3)
+ elem27((*XDb)(_db.XaDb), uintptr(1)).XzDbSName = str(23797)
+ elem27((*XDb)(_db.XaDb), uintptr(1)).Xsafety_level = uint8(1)
+ _db.Xmagic = uint32(2687084183)
+ if _db.XmallocFailed != 0 {
goto _opendb_out
}
- _sqlite3Error(tls, _db, i32(0))
+ _sqlite3Error(tls, _db, int32(0))
_sqlite3RegisterPerConnectionBuiltinFunctions(tls, _db)
_rc = Xsqlite3_errcode(tls, _db)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _26
}
_sqlite3AutoLoadExtensions(tls, _db)
_rc = Xsqlite3_errcode(tls, _db)
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _opendb_out
}
_26:
if _rc != 0 {
_sqlite3Error(tls, _db, _rc)
}
- _setupLookaside(tls, _db, nil, _sqlite3Config.X7, _sqlite3Config.X8)
- Xsqlite3_wal_autocheckpoint(tls, _db, i32(1000))
+ _setupLookaside(tls, _db, nil, _sqlite3Config.XszLookaside, _sqlite3Config.XnLookaside)
+ Xsqlite3_wal_autocheckpoint(tls, _db, int32(1000))
_opendb_out:
if _db != nil {
func() {
- if (*Xsqlite3_mutex)(_db.X3) == nil && _isThreadsafe != i32(0) && (_sqlite3Config.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143544), unsafe.Pointer((*int8)(unsafe.Pointer(&_openDatabaseØ00__func__Ø000))), unsafe.Pointer(str(127789)))
+ if (*Xsqlite3_mutex)(_db.Xmutex) == nil && _isThreadsafe != int32(0) && _sqlite3Config.XbFullMutex != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143544), unsafe.Pointer(&_openDatabaseØ00__func__Ø000), unsafe.Pointer(str(127810)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
}
_rc = Xsqlite3_errcode(tls, _db)
func() {
- if _db == nil && _rc != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143549), unsafe.Pointer((*int8)(unsafe.Pointer(&_openDatabaseØ00__func__Ø000))), unsafe.Pointer(str(127858)))
+ if _db == nil && _rc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143549), unsafe.Pointer(&_openDatabaseØ00__func__Ø000), unsafe.Pointer(str(127879)))
crt.X__builtin_abort(tls)
}
}()
- if _rc == i32(7) {
+ if _rc == int32(7) {
Xsqlite3_close(tls, _db)
_db = nil
goto _39
}
- if _rc != i32(0) {
- *(*uint32)(unsafe.Pointer(&(_db.X28))) = uint32(i32(1266094736))
+ if _rc != int32(0) {
+ _db.Xmagic = uint32(1266094736)
}
_39:
*_ppDb = _db
- Xsqlite3_free(tls, (unsafe.Pointer)(_zOpen))
- return _rc & i32(255)
-}
-
-// This is the default collating function named "BINARY" which is always
-// available.
-//
-// If the padFlag argument is not NULL then space padding at the end
-// of strings is ignored. This implements the RTRIM collation.
+ Xsqlite3_free(tls, unsafe.Pointer(_zOpen))
+ return _rc & int32(255)
+}
+
+// C comment
+// /*
+// ** This is the default collating function named "BINARY" which is always
+// ** available.
+// **
+// ** If the padFlag argument is not NULL then space padding at the end
+// ** of strings is ignored. This implements the RTRIM collation.
+// */
func _binCollFunc(tls *crt.TLS, _padFlag unsafe.Pointer, _nKey1 int32, _pKey1 unsafe.Pointer, _nKey2 int32, _pKey2 unsafe.Pointer) (r0 int32) {
var _rc, _n int32
_n = func() int32 {
@@ -109533,10 +111053,10 @@ func _binCollFunc(tls *crt.TLS, _padFlag unsafe.Pointer, _nKey1 int32, _pKey1 un
return _nKey2
}()
_rc = crt.Xmemcmp(tls, _pKey1, _pKey2, uint32(_n))
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _2
}
- if ((_padFlag != nil) && _allSpaces(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(_pKey1)))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n))))))), _nKey1-_n) != 0) && _allSpaces(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(_pKey2)))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n))))))), _nKey2-_n) != 0 {
+ if ((_padFlag != nil) && _allSpaces(tls, (*int8)(unsafe.Pointer(uintptr(_pKey1)+uintptr(_n))), _nKey1-_n) != 0) && _allSpaces(tls, (*int8)(unsafe.Pointer(uintptr(_pKey2)+uintptr(_n))), _nKey2-_n) != 0 {
goto _6
}
_rc = _nKey1 - _nKey2
@@ -109545,23 +111065,29 @@ _2:
return _rc
}
-// Return true if the buffer z[0..n-1] contains all spaces.
+// C comment
+// /*
+// ** Return true if the buffer z[0..n-1] contains all spaces.
+// */
func _allSpaces(tls *crt.TLS, _z *int8, _n int32) (r0 int32) {
_0:
- if (_n > i32(0)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n-i32(1))))) == i32(32)) {
+ if (_n > int32(0)) && (int32(*elem1(_z, uintptr(_n-int32(1)))) == int32(32)) {
_n -= 1
goto _0
}
- return bool2int(_n == i32(0))
+ return bool2int(_n == int32(0))
}
-// Another built-in collating sequence: NOCASE.
-//
-// This collating sequence is intended to be used for "case independent
-// comparison". SQLite's knowledge of upper and lower case equivalents
-// extends only to the 26 characters used in the English language.
-//
-// At the moment there is only a UTF-8 implementation.
+// C comment
+// /*
+// ** Another built-in collating sequence: NOCASE.
+// **
+// ** This collating sequence is intended to be used for "case independent
+// ** comparison". SQLite's knowledge of upper and lower case equivalents
+// ** extends only to the 26 characters used in the English language.
+// **
+// ** At the moment there is only a UTF-8 implementation.
+// */
func _nocaseCollatingFunc(tls *crt.TLS, _NotUsed unsafe.Pointer, _nKey1 int32, _pKey1 unsafe.Pointer, _nKey2 int32, _pKey2 unsafe.Pointer) (r0 int32) {
var _r int32
_r = Xsqlite3_strnicmp(tls, (*int8)(_pKey1), (*int8)(_pKey2), func() int32 {
@@ -109571,7 +111097,7 @@ func _nocaseCollatingFunc(tls *crt.TLS, _NotUsed unsafe.Pointer, _nKey1 int32, _
return _nKey2
}())
- if i32(0) == _r {
+ if int32(0) == _r {
_r = _nKey1 - _nKey2
}
return _r
@@ -109580,76 +111106,88 @@ func _nocaseCollatingFunc(tls *crt.TLS, _NotUsed unsafe.Pointer, _nKey1 int32, _
var _openDatabaseØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_openDatabaseØ00__func__Ø000[0], str(127884), 13)
+ crt.Xstrncpy(nil, &_openDatabaseØ00__func__Ø000[0], str(127905), 13)
}
-// This routine does per-connection function registration. Most
-// of the built-in functions above are part of the global function set.
-// This routine only deals with those that are not global.
+// C comment
+// /*
+// ** This routine does per-connection function registration. Most
+// ** of the built-in functions above are part of the global function set.
+// ** This routine only deals with those that are not global.
+// */
func _sqlite3RegisterPerConnectionBuiltinFunctions(tls *crt.TLS, _db *Xsqlite3) {
var _rc int32
- _rc = Xsqlite3_overload_function(tls, _db, str(25276), i32(2))
+ _rc = Xsqlite3_overload_function(tls, _db, str(25231), int32(2))
func() {
- if _rc != i32(7) && _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107204), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3RegisterPerConnectionBuiltinFunctionsØ00__func__Ø000))), unsafe.Pointer(str(127897)))
+ if _rc != int32(7) && _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107204), unsafe.Pointer(&_sqlite3RegisterPerConnectionBuiltinFunctionsØ00__func__Ø000), unsafe.Pointer(str(127918)))
crt.X__builtin_abort(tls)
}
}()
- if _rc == i32(7) {
+ if _rc == int32(7) {
_sqlite3OomFault(tls, _db)
}
}
-// Declare that a function has been overloaded by a virtual table.
-//
-// If the function already exists as a regular global function, then
-// this routine is a no-op. If the function does not exist, then create
-// a new one that always throws a run-time error.
-//
-// When virtual tables intend to provide an overloaded function, they
-// should call this routine to make sure the global function exists.
-// A global function must exist in order for name resolution to work
-// properly.
+// C comment
+// /*
+// ** Declare that a function has been overloaded by a virtual table.
+// **
+// ** If the function already exists as a regular global function, then
+// ** this routine is a no-op. If the function does not exist, then create
+// ** a new one that always throws a run-time error.
+// **
+// ** When virtual tables intend to provide an overloaded function, they
+// ** should call this routine to make sure the global function exists.
+// ** A global function must exist in order for name resolution to work
+// ** properly.
+// */
func Xsqlite3_overload_function(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _nArg int32) (r0 int32) {
var _rc int32
- _rc = i32(0)
- if ((_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zName == nil)) || (_nArg < i32(-2)) {
- return _sqlite3MisuseError(tls, i32(142274))
+ _rc = int32(0)
+ if ((_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zName == nil)) || (_nArg < int32(-2)) {
+ return _sqlite3MisuseError(tls, int32(142274))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- if _sqlite3FindFunction(tls, _db, _zName, _nArg, uint8(i32(1)), uint8(i32(0))) == nil {
- _rc = _sqlite3CreateFunc(tls, _db, _zName, _nArg, i32(1), nil, _sqlite3InvalidFunction, nil, nil, nil)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ if _sqlite3FindFunction(tls, _db, _zName, _nArg, uint8(1), 0) == nil {
+ _rc = _sqlite3CreateFunc(tls, _db, _zName, _nArg, int32(1), nil, _sqlite3InvalidFunction, nil, nil, nil)
}
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
-// The following is the implementation of an SQL function that always
-// fails with an error message stating that the function is used in the
-// wrong context. The sqlite3_overload_function() API might construct
-// SQL function that use this routine so that the functions will exist
-// for name resolution but are actually overloaded by the xFindFunction
-// method of virtual tables.
+// C comment
+// /*
+// ** The following is the implementation of an SQL function that always
+// ** fails with an error message stating that the function is used in the
+// ** wrong context. The sqlite3_overload_function() API might construct
+// ** SQL function that use this routine so that the functions will exist
+// ** for name resolution but are actually overloaded by the xFindFunction
+// ** method of virtual tables.
+// */
func _sqlite3InvalidFunction(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
var _zName, _zErr *int8
- _zName = (*XFuncDef)(_context.X1).X6
+ _zName = (*XFuncDef)(_context.XpFunc).XzName
_ = _NotUsed2
- _zErr = Xsqlite3_mprintf(tls, str(127931), unsafe.Pointer(_zName))
- Xsqlite3_result_error(tls, _context, _zErr, i32(-1))
- Xsqlite3_free(tls, (unsafe.Pointer)(_zErr))
+ _zErr = Xsqlite3_mprintf(tls, str(127952), unsafe.Pointer(_zName))
+ Xsqlite3_result_error(tls, _context, _zErr, int32(-1))
+ Xsqlite3_free(tls, unsafe.Pointer(_zErr))
}
var _sqlite3RegisterPerConnectionBuiltinFunctionsØ00__func__Ø000 [45]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3RegisterPerConnectionBuiltinFunctionsØ00__func__Ø000[0], str(127982), 45)
+ crt.Xstrncpy(nil, &_sqlite3RegisterPerConnectionBuiltinFunctionsØ00__func__Ø000[0], str(128003), 45)
}
-// Load all automatic extensions.
-//
-// If anything goes wrong, set an error in the database connection.
+// C comment
+// /*
+// ** Load all automatic extensions.
+// **
+// ** If anything goes wrong, set an error in the database connection.
+// */
func _sqlite3AutoLoadExtensions(tls *crt.TLS, _db *Xsqlite3) {
var _go, _rc int32
var _i uint32
@@ -109657,32 +111195,35 @@ func _sqlite3AutoLoadExtensions(tls *crt.TLS, _db *Xsqlite3) {
var _2_mutex *Xsqlite3_mutex
var _xInit func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32
var _2_pThunk *Xsqlite3_api_routines
- _go = i32(1)
- if (_sqlite3Autoext.X0) == uint32(i32(0)) {
+ _go = int32(1)
+ if _sqlite3Autoext.XnExt == (0) {
return
}
- _i = uint32(i32(0))
+ _i = 0
_1:
if _go == 0 {
goto _4
}
- _2_mutex = _sqlite3MutexAlloc(tls, i32(2))
+ _2_mutex = _sqlite3MutexAlloc(tls, int32(2))
_2_pThunk = &_sqlite3Apis
Xsqlite3_mutex_enter(tls, _2_mutex)
- if _i >= (_sqlite3Autoext.X0) {
+ if _i >= _sqlite3Autoext.XnExt {
_xInit = nil
- _go = i32(0)
+ _go = int32(0)
goto _6
}
- _xInit = *(*func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{(*(*func(*crt.TLS))(unsafe.Pointer(uintptr((unsafe.Pointer)(_sqlite3Autoext.X1)) + 4*uintptr(_i))))}))
+ _xInit = func() func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32 {
+ v := *elem130(_sqlite3Autoext.XaExt, uintptr(_i))
+ return *(*func(*crt.TLS, *Xsqlite3, **int8, *Xsqlite3_api_routines) int32)(unsafe.Pointer(&v))
+ }()
_6:
Xsqlite3_mutex_leave(tls, _2_mutex)
_2_zErrmsg = nil
- if (_xInit != nil) && (store1(&_rc, _xInit(tls, _db, &_2_zErrmsg, _2_pThunk)) != i32(0)) {
- _sqlite3ErrorWithMsg(tls, _db, _rc, str(128027), unsafe.Pointer(_2_zErrmsg))
- _go = i32(0)
+ if (_xInit != nil) && (store2(&_rc, _xInit(tls, _db, &_2_zErrmsg, _2_pThunk)) != int32(0)) {
+ _sqlite3ErrorWithMsg(tls, _db, _rc, str(128048), unsafe.Pointer(_2_zErrmsg))
+ _go = int32(0)
}
- Xsqlite3_free(tls, (unsafe.Pointer)(_2_zErrmsg))
+ Xsqlite3_free(tls, unsafe.Pointer(_2_zErrmsg))
_i += 1
goto _1
_4:
@@ -109690,34 +111231,37 @@ _4:
var _sqlite3Autoext Tsqlite3AutoExtList
-// Set up the lookaside buffers for a database connection.
-// Return SQLITE_OK on success.
-// If lookaside is already active, return SQLITE_BUSY.
-//
-// The sz parameter is the number of bytes in each lookaside slot.
-// The cnt parameter is the number of slots. If pStart is NULL the
-// space for the lookaside memory is obtained from sqlite3_malloc().
-// If pStart is not NULL then it is sz*cnt bytes of memory to use for
-// the lookaside memory.
+// C comment
+// /*
+// ** Set up the lookaside buffers for a database connection.
+// ** Return SQLITE_OK on success.
+// ** If lookaside is already active, return SQLITE_BUSY.
+// **
+// ** The sz parameter is the number of bytes in each lookaside slot.
+// ** The cnt parameter is the number of slots. If pStart is NULL the
+// ** space for the lookaside memory is obtained from sqlite3_malloc().
+// ** If pStart is not NULL then it is sz*cnt bytes of memory to use for
+// ** the lookaside memory.
+// */
func _setupLookaside(tls *crt.TLS, _db *Xsqlite3, _pBuf unsafe.Pointer, _sz int32, _cnt int32) (r0 int32) {
var _6_i int32
var _pStart unsafe.Pointer
- var _6_p *Xsqlite3_file
- if ((*t7)(unsafe.Pointer(&(_db.X58))).X3) != 0 {
- return i32(5)
+ var _6_p *XScratchFreeslot
+ if (_db.Xlookaside.XnOut) != 0 {
+ return int32(5)
}
- if ((*t7)(unsafe.Pointer(&(_db.X58))).X2) != 0 {
- Xsqlite3_free(tls, (*t7)(unsafe.Pointer(&(_db.X58))).X7)
+ if (_db.Xlookaside.XbMalloced) != 0 {
+ Xsqlite3_free(tls, _db.Xlookaside.XpStart)
}
- _sz = _sz & i32(-8)
- if _sz <= i32(4) {
- _sz = i32(0)
+ _sz = _sz & int32(-8)
+ if _sz <= int32(4) {
+ _sz = int32(0)
}
- if _cnt < i32(0) {
- _cnt = i32(0)
+ if _cnt < int32(0) {
+ _cnt = int32(0)
}
- if (_sz == i32(0)) || (_cnt == i32(0)) {
- _sz = i32(0)
+ if (_sz == int32(0)) || (_cnt == int32(0)) {
+ _sz = int32(0)
_pStart = nil
goto _9
}
@@ -109734,61 +111278,64 @@ func _setupLookaside(tls *crt.TLS, _db *Xsqlite3, _pBuf unsafe.Pointer, _sz int3
_7:
_pStart = _pBuf
_9:
- *(*unsafe.Pointer)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X7))) = _pStart
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X6))))) = nil
- *(*uint16)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X1))) = uint16(_sz)
+ _db.Xlookaside.XpStart = _pStart
+ *(**XScratchFreeslot)(unsafe.Pointer(&(_db.Xlookaside.XpFree))) = nil
+ _db.Xlookaside.Xsz = uint16(_sz)
if _pStart == nil {
goto _10
}
func() {
- if _sz <= i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(141165), unsafe.Pointer((*int8)(unsafe.Pointer(&_setupLookasideØ00__func__Ø000))), unsafe.Pointer(str(128066)))
+ if _sz <= int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(141165), unsafe.Pointer(&_setupLookasideØ00__func__Ø000), unsafe.Pointer(str(128087)))
crt.X__builtin_abort(tls)
}
}()
- _6_p = (*Xsqlite3_file)(_pStart)
- _6_i = _cnt - i32(1)
+ _6_p = (*XScratchFreeslot)(_pStart)
+ _6_i = _cnt - int32(1)
_13:
- if _6_i < i32(0) {
+ if _6_i < int32(0) {
goto _16
}
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_6_p.X0))))) = (*Xsqlite3_file)((*t7)(unsafe.Pointer(&(_db.X58))).X6)
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X6))))) = _6_p
- _6_p = (*Xsqlite3_file)(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_p)) + 1*uintptr(_sz)))))
+ *(**XScratchFreeslot)(unsafe.Pointer(&_6_p.XpNext)) = (*XScratchFreeslot)(_db.Xlookaside.XpFree)
+ *(**XScratchFreeslot)(unsafe.Pointer(&(_db.Xlookaside.XpFree))) = _6_p
+ _6_p = (*XScratchFreeslot)(unsafe.Pointer(elem15((*uint8)(unsafe.Pointer(_6_p)), uintptr(_sz))))
_6_i -= 1
goto _13
_16:
- *(*unsafe.Pointer)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X8))) = (unsafe.Pointer)(_6_p)
- *(*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X0))) = uint32(i32(0))
- *(*uint8)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X2))) = uint8(func() int32 {
+ _db.Xlookaside.XpEnd = unsafe.Pointer(_6_p)
+ _db.Xlookaside.XbDisable = 0
+ _db.Xlookaside.XbMalloced = uint8(func() int32 {
if _pBuf == nil {
- return i32(1)
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}())
goto _19
_10:
- *(*unsafe.Pointer)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X7))) = (unsafe.Pointer)(_db)
- *(*unsafe.Pointer)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X8))) = (unsafe.Pointer)(_db)
- *(*uint32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X0))) = uint32(i32(1))
- *(*uint8)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X2))) = uint8(i32(0))
+ _db.Xlookaside.XpStart = unsafe.Pointer(_db)
+ _db.Xlookaside.XpEnd = unsafe.Pointer(_db)
+ _db.Xlookaside.XbDisable = uint32(1)
+ _db.Xlookaside.XbMalloced = 0
_19:
- return i32(0)
+ return int32(0)
}
var _setupLookasideØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_setupLookasideØ00__func__Ø000[0], str(128099), 15)
+ crt.Xstrncpy(nil, &_setupLookasideØ00__func__Ø000[0], str(128120), 15)
}
-// Open a new database handle.
+// C comment
+// /*
+// ** Open a new database handle.
+// */
func Xsqlite3_open16(tls *crt.TLS, _zFilename unsafe.Pointer, _ppDb **Xsqlite3) (r0 int32) {
var _rc int32
var _zFilename8 *int8
var _pVal *XMem
if _ppDb == nil {
- return _sqlite3MisuseError(tls, i32(143617))
+ return _sqlite3MisuseError(tls, int32(143617))
}
*_ppDb = nil
_rc = Xsqlite3_initialize(tls)
@@ -109796,135 +111343,132 @@ func Xsqlite3_open16(tls *crt.TLS, _zFilename unsafe.Pointer, _ppDb **Xsqlite3)
return _rc
}
if _zFilename == nil {
- _zFilename = (unsafe.Pointer)(str(128114))
+ _zFilename = unsafe.Pointer(str(128135))
}
_pVal = _sqlite3ValueNew(tls, nil)
- _sqlite3ValueSetStr(tls, _pVal, i32(-1), _zFilename, uint8(i32(2)), nil)
- _zFilename8 = (*int8)(_sqlite3ValueText(tls, _pVal, uint8(i32(1))))
+ _sqlite3ValueSetStr(tls, _pVal, int32(-1), _zFilename, uint8(2), nil)
+ _zFilename8 = (*int8)(_sqlite3ValueText(tls, _pVal, uint8(1)))
if _zFilename8 == nil {
goto _3
}
- _rc = _openDatabase(tls, _zFilename8, _ppDb, uint32(i32(6)), nil)
+ _rc = _openDatabase(tls, _zFilename8, _ppDb, uint32(6), nil)
func() {
- if (*_ppDb) == nil && _rc != i32(7) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(143631), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_open16Ø00__func__Ø000))), unsafe.Pointer(str(128117)))
+ if (*_ppDb) == nil && _rc != int32(7) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(143631), unsafe.Pointer(&_sqlite3_open16Ø00__func__Ø000), unsafe.Pointer(str(128138)))
crt.X__builtin_abort(tls)
}
}()
- if (_rc == i32(0)) && ((int32((*XSchema)((*XDb)(unsafe.Pointer(uintptr((*_ppDb).X4)+16*uintptr(i32(0)))).X4).X9) & i32(1)) != i32(1)) {
- *(*uint8)(unsafe.Pointer(&((*XSchema)((*XDb)(unsafe.Pointer(uintptr((*_ppDb).X4) + 16*uintptr(i32(0)))).X4).X8))) = store2((*uint8)(unsafe.Pointer(&((*_ppDb).X14))), uint8(i32(2)))
+ if (_rc == int32(0)) && ((int32((*XSchema)(elem27((*XDb)((*_ppDb).XaDb), 0).XpSchema).XschemaFlags) & int32(1)) != int32(1)) {
+ (*XSchema)(elem27((*XDb)((*_ppDb).XaDb), 0).XpSchema).Xenc = store3(&((*_ppDb).Xenc), uint8(2))
}
goto _9
_3:
- _rc = _sqlite3NomemError(tls, i32(143636))
+ _rc = _sqlite3NomemError(tls, int32(143636))
_9:
_sqlite3ValueFree(tls, _pVal)
- return _rc & i32(255)
+ return _rc & int32(255)
}
var _sqlite3_open16Ø00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_open16Ø00__func__Ø000[0], str(128143), 15)
+ crt.Xstrncpy(nil, &_sqlite3_open16Ø00__func__Ø000[0], str(128164), 15)
}
-// Two versions of the official API. Legacy and new use. In the legacy
-// version, the original SQL text is not saved in the prepared statement
-// and so if a schema change occurs, SQLITE_SCHEMA is returned by
-// sqlite3_step(). In the new version, the original SQL text is retained
-// and the statement is automatically recompiled if an schema change
-// occurs.
+// C comment
+// /*
+// ** Two versions of the official API. Legacy and new use. In the legacy
+// ** version, the original SQL text is not saved in the prepared statement
+// ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
+// ** sqlite3_step(). In the new version, the original SQL text is retained
+// ** and the statement is automatically recompiled if an schema change
+// ** occurs.
+// */
func Xsqlite3_prepare16(tls *crt.TLS, _db *Xsqlite3, _zSql unsafe.Pointer, _nBytes int32, _ppStmt *unsafe.Pointer, _pzTail *unsafe.Pointer) (r0 int32) {
var _rc int32
- _rc = _sqlite3Prepare16(tls, _db, _zSql, _nBytes, i32(0), _ppStmt, _pzTail)
+ _rc = _sqlite3Prepare16(tls, _db, _zSql, _nBytes, int32(0), _ppStmt, _pzTail)
func() {
- if _rc != i32(0) && _ppStmt != nil && *_ppStmt != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116502), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_prepare16Ø00__func__Ø000))), unsafe.Pointer(str(50464)))
+ if _rc != int32(0) && _ppStmt != nil && (*_ppStmt) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116502), unsafe.Pointer(&_sqlite3_prepare16Ø00__func__Ø000), unsafe.Pointer(str(50419)))
crt.X__builtin_abort(tls)
}
}()
return _rc
}
-// Compile the UTF-16 encoded SQL statement zSql into a statement handle.
+// C comment
+// /*
+// ** Compile the UTF-16 encoded SQL statement zSql into a statement handle.
+// */
func _sqlite3Prepare16(tls *crt.TLS, _db *Xsqlite3, _zSql unsafe.Pointer, _nBytes int32, _saveSqlFlag int32, _ppStmt *unsafe.Pointer, _pzTail *unsafe.Pointer) (r0 int32) {
var _rc, _2_sz, _5_chars_parsed int32
var _zSql8, _zTail8, _2_z *int8
_zTail8 = nil
- _rc = i32(0)
+ _rc = int32(0)
if _ppStmt == nil {
- return _sqlite3MisuseError(tls, i32(116452))
+ return _sqlite3MisuseError(tls, int32(116452))
}
*_ppStmt = nil
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zSql == nil) {
- return _sqlite3MisuseError(tls, i32(116456))
+ return _sqlite3MisuseError(tls, int32(116456))
}
- if _nBytes < i32(0) {
+ if _nBytes < int32(0) {
goto _3
}
_2_z = (*int8)(_zSql)
- _2_sz = i32(0)
+ _2_sz = int32(0)
_4:
- if _2_sz >= _nBytes || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_z)) + 1*uintptr(_2_sz)))) == i32(0) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_z)) + 1*uintptr(_2_sz+i32(1))))) == i32(0) {
+ if _2_sz >= _nBytes || int32(*elem1(_2_z, uintptr(_2_sz))) == int32(0) && int32(*elem1(_2_z, uintptr(_2_sz+int32(1)))) == int32(0) {
goto _9
}
- {
- p := &_2_sz
- *p = (*p) + i32(2)
- sink1(*p)
- }
+ _2_sz += int32(2)
goto _4
_9:
_nBytes = _2_sz
_3:
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _zSql8 = _sqlite3Utf16to8(tls, _db, _zSql, _nBytes, uint8(i32(2)))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _zSql8 = _sqlite3Utf16to8(tls, _db, _zSql, _nBytes, uint8(2))
if _zSql8 != nil {
- _rc = _sqlite3LockAndPrepare(tls, _db, _zSql8, i32(-1), _saveSqlFlag, nil, _ppStmt, &_zTail8)
+ _rc = _sqlite3LockAndPrepare(tls, _db, _zSql8, int32(-1), _saveSqlFlag, nil, _ppStmt, &_zTail8)
}
if (_zTail8 != nil) && (_pzTail != nil) {
- _5_chars_parsed = _sqlite3Utf8CharLen(tls, _zSql8, int32((uintptr(unsafe.Pointer(_zTail8))-uintptr(unsafe.Pointer(_zSql8)))/1))
- *_pzTail = (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(_zSql))) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_sqlite3Utf16ByteLen(tls, _zSql, _5_chars_parsed)))))))))
+ _5_chars_parsed = _sqlite3Utf8CharLen(tls, _zSql8, int32(uintptr(unsafe.Pointer(_zTail8))-uintptr(unsafe.Pointer(_zSql8))))
+ *_pzTail = unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_zSql) + uintptr(_sqlite3Utf16ByteLen(tls, _zSql, _5_chars_parsed)))))
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zSql8))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zSql8))
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
-// zIn is a UTF-16 encoded unicode string at least nChar characters long.
-// Return the number of bytes in the first nChar unicode characters
-// in pZ. nChar must be non-negative.
+// C comment
+// /*
+// ** zIn is a UTF-16 encoded unicode string at least nChar characters long.
+// ** Return the number of bytes in the first nChar unicode characters
+// ** in pZ. nChar must be non-negative.
+// */
func _sqlite3Utf16ByteLen(tls *crt.TLS, _zIn unsafe.Pointer, _nChar int32) (r0 int32) {
var _c, _n, _4_c2, _8_c2 int32
var _z *uint8
_z = (*uint8)(_zIn)
- _n = i32(0)
+ _n = int32(0)
goto _0
_0:
_7:
if _n >= _nChar {
goto _8
}
- _c = int32(*postInc13(&_z, 1))
- {
- p := &_c
- *p = (*p) + (int32(*postInc13(&_z, 1)) << uint(i32(8)))
- sink1(*p)
- }
- if ((_c >= i32(55296)) && (_c < i32(57344))) && i32(1) != 0 {
- _8_c2 = int32(*postInc13(&_z, 1))
- {
- p := &_8_c2
- *p = (*p) + (int32(*postInc13(&_z, 1)) << uint(i32(8)))
- sink1(*p)
- }
- _c = ((_8_c2 & i32(1023)) + ((_c & i32(63)) << uint(i32(10)))) + (((_c & i32(960)) + i32(64)) << uint(i32(10)))
+ _c = int32(*postInc15(&_z, 1))
+ _c += int32(*postInc15(&_z, 1)) << 8
+ if ((_c >= int32(55296)) && (_c < int32(57344))) && int32(1) != 0 {
+ _8_c2 = int32(*postInc15(&_z, 1))
+ _8_c2 += int32(*postInc15(&_z, 1)) << 8
+ _c = ((_8_c2 & int32(1023)) + ((_c & int32(63)) << 10)) + (((_c & int32(960)) + int32(64)) << 10)
}
_n += 1
goto _7
_8:
- return int32((uintptr(unsafe.Pointer(_z)) - uintptr(unsafe.Pointer((*uint8)(_zIn)))) / 1)
+ return int32(uintptr(unsafe.Pointer(_z)) - uintptr(_zIn))
_ = _4_c2
panic(0)
@@ -109933,291 +111477,309 @@ _8:
var _sqlite3_prepare16Ø00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_prepare16Ø00__func__Ø000[0], str(128158), 18)
+ crt.Xstrncpy(nil, &_sqlite3_prepare16Ø00__func__Ø000[0], str(128179), 18)
}
-// Register a profile function. The pArg from the previously registered
-// profile function is returned.
-//
-// A NULL profile function means that no profiling is executes. A non-NULL
-// profile is a pointer to a function that is invoked at the conclusion of
-// each SQL statement that is run.
+// C comment
+// /*
+// ** Register a profile function. The pArg from the previously registered
+// ** profile function is returned.
+// **
+// ** A NULL profile function means that no profiling is executes. A non-NULL
+// ** profile is a pointer to a function that is invoked at the conclusion of
+// ** each SQL statement that is run.
+// */
func Xsqlite3_profile(tls *crt.TLS, _db *Xsqlite3, _xProfile func(*crt.TLS, unsafe.Pointer, *int8, uint64), _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
var _pOld unsafe.Pointer
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(142357))
+ _sqlite3MisuseError(tls, int32(142357))
return nil
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _pOld = _db.X44
- *(*func(*crt.TLS, unsafe.Pointer, *int8, uint64))(unsafe.Pointer(&(_db.X43))) = _xProfile
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X44))) = _pArg
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _pOld = _db.XpProfileArg
+ _db.XxProfile = _xProfile
+ _db.XpProfileArg = _pArg
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _pOld
}
-// This routine sets the progress callback for an Sqlite database to the
-// given callback function with the given argument. The progress callback will
-// be invoked every nOps opcodes.
+// C comment
+// /*
+// ** This routine sets the progress callback for an Sqlite database to the
+// ** given callback function with the given argument. The progress callback will
+// ** be invoked every nOps opcodes.
+// */
func Xsqlite3_progress_handler(tls *crt.TLS, _db *Xsqlite3, _nOps int32, _xProgress func(*crt.TLS, unsafe.Pointer) int32, _pArg unsafe.Pointer) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(142013))
+ _sqlite3MisuseError(tls, int32(142013))
return
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- if _nOps > i32(0) {
- *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&(_db.X61))) = _xProgress
- *(*uint32)(unsafe.Pointer(&(_db.X63))) = uint32(_nOps)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X62))) = _pArg
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ if _nOps > int32(0) {
+ _db.XxProgress = _xProgress
+ _db.XnProgressOps = uint32(_nOps)
+ _db.XpProgressArg = _pArg
goto _2
}
- *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&(_db.X61))) = nil
- *(*uint32)(unsafe.Pointer(&(_db.X63))) = uint32(i32(0))
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X62))) = nil
+ _db.XxProgress = nil
+ _db.XnProgressOps = 0
+ _db.XpProgressArg = nil
_2:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
}
-// The public interface to sqlite3Realloc. Make sure that the memory
-// subsystem is initialized prior to invoking sqliteRealloc.
+// C comment
+// /*
+// ** The public interface to sqlite3Realloc. Make sure that the memory
+// ** subsystem is initialized prior to invoking sqliteRealloc.
+// */
func Xsqlite3_realloc(tls *crt.TLS, _pOld unsafe.Pointer, _n int32) (r0 unsafe.Pointer) {
if Xsqlite3_initialize(tls) != 0 {
return nil
}
- if _n < i32(0) {
- _n = i32(0)
+ if _n < int32(0) {
+ _n = int32(0)
}
return _sqlite3Realloc(tls, _pOld, uint64(_n))
}
func Xsqlite3_result_error16(tls *crt.TLS, _pCtx *Xsqlite3_context, _z unsafe.Pointer, _n int32) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76458), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_error16Ø00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76458), unsafe.Pointer(&_sqlite3_result_error16Ø00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pCtx.X5))) = i32(1)
- *(*uint8)(unsafe.Pointer(&(_pCtx.X7))) = uint8(i32(1))
- _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.X0), (*int8)(_z), _n, uint8(i32(2)), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ _pCtx.XisError = int32(1)
+ _pCtx.XfErrorOrAux = uint8(1)
+ _sqlite3VdbeMemSetStr(tls, (*XMem)(_pCtx.XpOut), (*int8)(_z), _n, uint8(2), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
}
var _sqlite3_result_error16Ø00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_error16Ø00__func__Ø000[0], str(128176), 23)
+ crt.Xstrncpy(nil, &_sqlite3_result_error16Ø00__func__Ø000[0], str(128197), 23)
}
func Xsqlite3_result_int64(tls *crt.TLS, _pCtx *Xsqlite3_context, _iVal int64) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76469), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_int64Ø00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76469), unsafe.Pointer(&_sqlite3_result_int64Ø00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemSetInt64(tls, (*XMem)(_pCtx.X0), _iVal)
+ _sqlite3VdbeMemSetInt64(tls, (*XMem)(_pCtx.XpOut), _iVal)
}
var _sqlite3_result_int64Ø00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_int64Ø00__func__Ø000[0], str(128199), 21)
+ crt.Xstrncpy(nil, &_sqlite3_result_int64Ø00__func__Ø000[0], str(128220), 21)
}
func Xsqlite3_result_null(tls *crt.TLS, _pCtx *Xsqlite3_context) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76473), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_nullØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76473), unsafe.Pointer(&_sqlite3_result_nullØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemSetNull(tls, (*XMem)(_pCtx.X0))
+ _sqlite3VdbeMemSetNull(tls, (*XMem)(_pCtx.XpOut))
}
var _sqlite3_result_nullØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_nullØ00__func__Ø000[0], str(128220), 20)
+ crt.Xstrncpy(nil, &_sqlite3_result_nullØ00__func__Ø000[0], str(128241), 20)
}
func Xsqlite3_result_text16(tls *crt.TLS, _pCtx *Xsqlite3_context, _z unsafe.Pointer, _n int32, _xDel func(*crt.TLS, unsafe.Pointer)) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76514), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_text16Ø00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76514), unsafe.Pointer(&_sqlite3_result_text16Ø00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _setResultStrOrError(tls, _pCtx, (*int8)(_z), _n, uint8(i32(2)), _xDel)
+ _setResultStrOrError(tls, _pCtx, (*int8)(_z), _n, uint8(2), _xDel)
}
var _sqlite3_result_text16Ø00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_text16Ø00__func__Ø000[0], str(128240), 22)
+ crt.Xstrncpy(nil, &_sqlite3_result_text16Ø00__func__Ø000[0], str(128261), 22)
}
func Xsqlite3_result_text16be(tls *crt.TLS, _pCtx *Xsqlite3_context, _z unsafe.Pointer, _n int32, _xDel func(*crt.TLS, unsafe.Pointer)) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76523), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_text16beØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76523), unsafe.Pointer(&_sqlite3_result_text16beØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _setResultStrOrError(tls, _pCtx, (*int8)(_z), _n, uint8(i32(3)), _xDel)
+ _setResultStrOrError(tls, _pCtx, (*int8)(_z), _n, uint8(3), _xDel)
}
var _sqlite3_result_text16beØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_text16beØ00__func__Ø000[0], str(128262), 24)
+ crt.Xstrncpy(nil, &_sqlite3_result_text16beØ00__func__Ø000[0], str(128283), 24)
}
func Xsqlite3_result_text16le(tls *crt.TLS, _pCtx *Xsqlite3_context, _z unsafe.Pointer, _n int32, _xDel func(*crt.TLS, unsafe.Pointer)) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76532), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_text16leØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76532), unsafe.Pointer(&_sqlite3_result_text16leØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _setResultStrOrError(tls, _pCtx, (*int8)(_z), _n, uint8(i32(2)), _xDel)
+ _setResultStrOrError(tls, _pCtx, (*int8)(_z), _n, uint8(2), _xDel)
}
var _sqlite3_result_text16leØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_text16leØ00__func__Ø000[0], str(128286), 24)
+ crt.Xstrncpy(nil, &_sqlite3_result_text16leØ00__func__Ø000[0], str(128307), 24)
}
-// Register a callback to be invoked each time a transaction is rolled
-// back by this database connection.
+// C comment
+// /*
+// ** Register a callback to be invoked each time a transaction is rolled
+// ** back by this database connection.
+// */
func Xsqlite3_rollback_hook(tls *crt.TLS, _db *Xsqlite3, _xCallback func(*crt.TLS, unsafe.Pointer), _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
var _pRet unsafe.Pointer
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(142435))
+ _sqlite3MisuseError(tls, int32(142435))
return nil
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _pRet = _db.X47
- *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_db.X48))) = _xCallback
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X47))) = _pArg
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _pRet = _db.XpRollbackArg
+ _db.XxRollbackCallback = _xCallback
+ _db.XpRollbackArg = _pArg
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _pRet
}
-// Set or clear the access authorization function.
-//
-// The access authorization function is be called during the compilation
-// phase to verify that the user has read and/or write access permission on
-// various fields of the database. The first argument to the auth function
-// is a copy of the 3rd argument to this routine. The second argument
-// to the auth function is one of these constants:
-//
-// SQLITE_CREATE_INDEX
-// SQLITE_CREATE_TABLE
-// SQLITE_CREATE_TEMP_INDEX
-// SQLITE_CREATE_TEMP_TABLE
-// SQLITE_CREATE_TEMP_TRIGGER
-// SQLITE_CREATE_TEMP_VIEW
-// SQLITE_CREATE_TRIGGER
-// SQLITE_CREATE_VIEW
-// SQLITE_DELETE
-// SQLITE_DROP_INDEX
-// SQLITE_DROP_TABLE
-// SQLITE_DROP_TEMP_INDEX
-// SQLITE_DROP_TEMP_TABLE
-// SQLITE_DROP_TEMP_TRIGGER
-// SQLITE_DROP_TEMP_VIEW
-// SQLITE_DROP_TRIGGER
-// SQLITE_DROP_VIEW
-// SQLITE_INSERT
-// SQLITE_PRAGMA
-// SQLITE_READ
-// SQLITE_SELECT
-// SQLITE_TRANSACTION
-// SQLITE_UPDATE
-//
-// The third and fourth arguments to the auth function are the name of
-// the table and the column that are being accessed. The auth function
-// should return either SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE. If
-// SQLITE_OK is returned, it means that access is allowed. SQLITE_DENY
-// means that the SQL statement will never-run - the sqlite3_exec() call
-// will return with an error. SQLITE_IGNORE means that the SQL statement
-// should run but attempts to read the specified column will return NULL
-// and attempts to write the column will be ignored.
-//
-// Setting the auth function to NULL disables this hook. The default
-// setting of the auth function is NULL.
+// C comment
+// /*
+// ** Set or clear the access authorization function.
+// **
+// ** The access authorization function is be called during the compilation
+// ** phase to verify that the user has read and/or write access permission on
+// ** various fields of the database. The first argument to the auth function
+// ** is a copy of the 3rd argument to this routine. The second argument
+// ** to the auth function is one of these constants:
+// **
+// ** SQLITE_CREATE_INDEX
+// ** SQLITE_CREATE_TABLE
+// ** SQLITE_CREATE_TEMP_INDEX
+// ** SQLITE_CREATE_TEMP_TABLE
+// ** SQLITE_CREATE_TEMP_TRIGGER
+// ** SQLITE_CREATE_TEMP_VIEW
+// ** SQLITE_CREATE_TRIGGER
+// ** SQLITE_CREATE_VIEW
+// ** SQLITE_DELETE
+// ** SQLITE_DROP_INDEX
+// ** SQLITE_DROP_TABLE
+// ** SQLITE_DROP_TEMP_INDEX
+// ** SQLITE_DROP_TEMP_TABLE
+// ** SQLITE_DROP_TEMP_TRIGGER
+// ** SQLITE_DROP_TEMP_VIEW
+// ** SQLITE_DROP_TRIGGER
+// ** SQLITE_DROP_VIEW
+// ** SQLITE_INSERT
+// ** SQLITE_PRAGMA
+// ** SQLITE_READ
+// ** SQLITE_SELECT
+// ** SQLITE_TRANSACTION
+// ** SQLITE_UPDATE
+// **
+// ** The third and fourth arguments to the auth function are the name of
+// ** the table and the column that are being accessed. The auth function
+// ** should return either SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE. If
+// ** SQLITE_OK is returned, it means that access is allowed. SQLITE_DENY
+// ** means that the SQL statement will never-run - the sqlite3_exec() call
+// ** will return with an error. SQLITE_IGNORE means that the SQL statement
+// ** should run but attempts to read the specified column will return NULL
+// ** and attempts to write the column will be ignored.
+// **
+// ** Setting the auth function to NULL disables this hook. The default
+// ** setting of the auth function is NULL.
+// */
func Xsqlite3_set_authorizer(tls *crt.TLS, _db *Xsqlite3, _xAuth func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32, _pArg unsafe.Pointer) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(99496))
+ return _sqlite3MisuseError(tls, int32(99496))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- *(*func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32)(unsafe.Pointer(&(_db.X59))) = _xAuth
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X60))) = _pArg
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _db.XxAuth = _xAuth
+ _db.XpAuthArg = _pArg
_sqlite3ExpirePreparedStatements(tls, _db)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return i32(0)
-}
-
-// Set the auxiliary data pointer and delete function, for the iArg'th
-// argument to the user-function defined by pCtx. Any previous value is
-// deleted by calling the delete function specified when it was set.
-//
-// The left-most argument is 0.
-//
-// Undocumented behavior: If iArg is negative then make the data available
-// to all functions within the current prepared statement using iArg as an
-// access code.
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Set the auxiliary data pointer and delete function, for the iArg'th
+// ** argument to the user-function defined by pCtx. Any previous value is
+// ** deleted by calling the delete function specified when it was set.
+// **
+// ** The left-most argument is 0.
+// **
+// ** Undocumented behavior: If iArg is negative then make the data available
+// ** to all functions within the current prepared statement using iArg as an
+// ** access code.
+// */
func Xsqlite3_set_auxdata(tls *crt.TLS, _pCtx *Xsqlite3_context, _iArg int32, _pAux unsafe.Pointer, _xDelete func(*crt.TLS, unsafe.Pointer)) {
var _pVdbe *TVdbe
var _pAuxData *XAuxData
- _pVdbe = (*TVdbe)(_pCtx.X3)
+ _pVdbe = (*TVdbe)(_pCtx.XpVdbe)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76947), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_set_auxdataØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76947), unsafe.Pointer(&_sqlite3_set_auxdataØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pVdbe == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76951), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_set_auxdataØ00__func__Ø000))), unsafe.Pointer(str(41788)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76951), unsafe.Pointer(&_sqlite3_set_auxdataØ00__func__Ø000), unsafe.Pointer(str(41743)))
crt.X__builtin_abort(tls)
}
}()
- _pAuxData = (*XAuxData)(_pVdbe.X43)
+ _pAuxData = (*XAuxData)(_pVdbe.XpAuxData)
_4:
if _pAuxData == nil {
goto _7
}
- if ((_pAuxData.X1) == _iArg) && (((_pAuxData.X0) == (_pCtx.X4)) || (_iArg < i32(0))) {
+ if (_pAuxData.XiAuxArg == _iArg) && ((_pAuxData.XiAuxOp == _pCtx.XiOp) || (_iArg < int32(0))) {
goto _7
}
- _pAuxData = (*XAuxData)(_pAuxData.X4)
+ _pAuxData = (*XAuxData)(_pAuxData.XpNextAux)
goto _4
_7:
if _pAuxData != nil {
goto _11
}
- _pAuxData = (*XAuxData)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pVdbe.X0), uint64(u32(20))))
+ _pAuxData = (*XAuxData)(_sqlite3DbMallocZero(tls, (*Xsqlite3)(_pVdbe.Xdb), uint64(20)))
if _pAuxData == nil {
goto _failed
}
- *(*int32)(unsafe.Pointer(&(_pAuxData.X0))) = _pCtx.X4
- *(*int32)(unsafe.Pointer(&(_pAuxData.X1))) = _iArg
- *(**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pAuxData.X4))))) = (*XAuxData)(_pVdbe.X43)
- *(**XAuxData)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pVdbe.X43))))) = _pAuxData
- if int32(_pCtx.X7) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_pCtx.X5))) = i32(0)
- *(*uint8)(unsafe.Pointer(&(_pCtx.X7))) = uint8(i32(1))
+ _pAuxData.XiAuxOp = _pCtx.XiOp
+ _pAuxData.XiAuxArg = _iArg
+ *(**XAuxData)(unsafe.Pointer(&_pAuxData.XpNextAux)) = (*XAuxData)(_pVdbe.XpAuxData)
+ *(**XAuxData)(unsafe.Pointer(&_pVdbe.XpAuxData)) = _pAuxData
+ if int32(_pCtx.XfErrorOrAux) == int32(0) {
+ _pCtx.XisError = int32(0)
+ _pCtx.XfErrorOrAux = uint8(1)
}
goto _15
_11:
- if (_pAuxData.X3) != nil {
- (_pAuxData.X3)(tls, _pAuxData.X2)
+ if _pAuxData.XxDeleteAux != nil {
+ _pAuxData.XxDeleteAux(tls, _pAuxData.XpAux)
}
_15:
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pAuxData.X2))) = _pAux
- *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&(_pAuxData.X3))) = _xDelete
+ _pAuxData.XpAux = _pAux
+ _pAuxData.XxDeleteAux = _xDelete
return
_failed:
if _xDelete != nil {
@@ -110228,11 +111790,14 @@ _failed:
var _sqlite3_set_auxdataØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_set_auxdataØ00__func__Ø000[0], str(128310), 20)
+ crt.Xstrncpy(nil, &_sqlite3_set_auxdataØ00__func__Ø000[0], str(128331), 20)
}
-// Return meta information about a specific column of a database table.
-// See comment in sqlite3.h (sqlite.h.in) for details.
+// C comment
+// /*
+// ** Return meta information about a specific column of a database table.
+// ** See comment in sqlite3.h (sqlite.h.in) for details.
+// */
func Xsqlite3_table_column_metadata(tls *crt.TLS, _db *Xsqlite3, _zDbName *int8, _zTableName *int8, _zColumnName *int8, _pzDataType **int8, _pzCollSeq **int8, _pNotNull *int32, _pPrimaryKey *int32, _pAutoinc *int32) (r0 int32) {
var _rc, _iCol, _notnull, _primarykey, _autoinc int32
var _zErrMsg, _zDataType, _zCollSeq *int8
@@ -110241,49 +111806,49 @@ func Xsqlite3_table_column_metadata(tls *crt.TLS, _db *Xsqlite3, _zDbName *int8,
_zErrMsg = nil
_pTab = nil
_pCol = nil
- _iCol = i32(0)
+ _iCol = int32(0)
_zDataType = nil
_zCollSeq = nil
- _notnull = i32(0)
- _primarykey = i32(0)
- _autoinc = i32(0)
+ _notnull = int32(0)
+ _primarykey = int32(0)
+ _autoinc = int32(0)
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zTableName == nil) {
- return _sqlite3MisuseError(tls, i32(143859))
+ return _sqlite3MisuseError(tls, int32(143859))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
_sqlite3BtreeEnterAll(tls, _db)
_rc = _sqlite3Init(tls, _db, &_zErrMsg)
- if i32(0) != _rc {
+ if int32(0) != _rc {
goto _error_out
}
_pTab = _sqlite3FindTable(tls, _db, _zTableName, _zDbName)
- if (_pTab == nil) || ((*XSelect)(_pTab.X3) != nil) {
+ if (_pTab == nil) || (_pTab.XpSelect != nil) {
_pTab = nil
goto _error_out
}
if _zColumnName == nil {
goto _6
}
- _iCol = i32(0)
+ _iCol = int32(0)
_7:
- if _iCol >= int32(_pTab.X11) {
+ if _iCol >= int32(_pTab.XnCol) {
goto _10
}
- _pCol = (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_iCol)))
- if i32(0) == _sqlite3StrICmp(tls, _pCol.X0, _zColumnName) {
+ _pCol = elem41((*XColumn)(_pTab.XaCol), uintptr(_iCol))
+ if int32(0) == _sqlite3StrICmp(tls, _pCol.XzName, _zColumnName) {
goto _10
}
_iCol += 1
goto _7
_10:
- if _iCol != int32(_pTab.X11) {
+ if _iCol != int32(_pTab.XnCol) {
goto _12
}
- if (((_pTab.X9) & uint32(i32(32))) == uint32(i32(0))) && _sqlite3IsRowid(tls, _zColumnName) != 0 {
- _iCol = int32(_pTab.X10)
+ if ((_pTab.XtabFlags & uint32(32)) == (0)) && _sqlite3IsRowid(tls, _zColumnName) != 0 {
+ _iCol = int32(_pTab.XiPKey)
_pCol = func() *XColumn {
- if _iCol >= i32(0) {
- return (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1) + 16*uintptr(_iCol)))
+ if _iCol >= int32(0) {
+ return elem41((*XColumn)(_pTab.XaCol), uintptr(_iCol))
}
return nil
}()
@@ -110296,14 +111861,14 @@ _12:
_6:
if _pCol != nil {
_zDataType = _sqlite3ColumnType(tls, _pCol, nil)
- _zCollSeq = _pCol.X2
- _notnull = bool2int(int32(_pCol.X3) != i32(0))
- _primarykey = bool2int((int32(_pCol.X6) & i32(1)) != i32(0))
- _autoinc = bool2int((int32(_pTab.X10) == _iCol) && (((_pTab.X9) & uint32(i32(8))) != uint32(i32(0))))
+ _zCollSeq = _pCol.XzColl
+ _notnull = bool2int(int32(_pCol.XnotNull) != int32(0))
+ _primarykey = bool2int((int32(_pCol.XcolFlags) & int32(1)) != int32(0))
+ _autoinc = bool2int((int32(_pTab.XiPKey) == _iCol) && ((_pTab.XtabFlags & uint32(8)) != (0)))
goto _20
}
- _zDataType = str(25792)
- _primarykey = i32(1)
+ _zDataType = str(25747)
+ _primarykey = int32(1)
_20:
if _zCollSeq == nil {
_zCollSeq = (*int8)(unsafe.Pointer(&_sqlite3StrBINARY))
@@ -110325,96 +111890,106 @@ _error_out:
if _pAutoinc != nil {
*_pAutoinc = _autoinc
}
- if (i32(0) == _rc) && (_pTab == nil) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErrMsg))
- _zErrMsg = _sqlite3MPrintf(tls, _db, str(128330), unsafe.Pointer(_zTableName), unsafe.Pointer(_zColumnName))
- _rc = i32(1)
+ if (int32(0) == _rc) && (_pTab == nil) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErrMsg))
+ _zErrMsg = _sqlite3MPrintf(tls, _db, str(128351), unsafe.Pointer(_zTableName), unsafe.Pointer(_zColumnName))
+ _rc = int32(1)
}
_sqlite3ErrorWithMsg(tls, _db, _rc, func() *int8 {
if _zErrMsg != nil {
- return str(24576)
+ return str(24531)
}
return nil
}(), unsafe.Pointer(_zErrMsg))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErrMsg))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErrMsg))
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
-// This is a convenience routine that makes sure that all thread-specific
-// data for this thread has been deallocated.
-//
-// SQLite no longer uses thread-specific data so this routine is now a
-// no-op. It is retained for historical compatibility.
+// C comment
+// /*
+// ** This is a convenience routine that makes sure that all thread-specific
+// ** data for this thread has been deallocated.
+// **
+// ** SQLite no longer uses thread-specific data so this routine is now a
+// ** no-op. It is retained for historical compatibility.
+// */
func Xsqlite3_thread_cleanup(tls *crt.TLS) {
}
-// Return the number of changes since the database handle was opened.
+// C comment
+// /*
+// ** Return the number of changes since the database handle was opened.
+// */
func Xsqlite3_total_changes(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(141426))
- return i32(0)
+ _sqlite3MisuseError(tls, int32(141426))
+ return int32(0)
}
- return _db.X30
+ return _db.XnTotalChange
}
func Xsqlite3_trace(tls *crt.TLS, _db *Xsqlite3, _xTrace func(*crt.TLS, unsafe.Pointer, *int8), _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
var _pOld unsafe.Pointer
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(142302))
+ _sqlite3MisuseError(tls, int32(142302))
return nil
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _pOld = _db.X42
- *(*uint8)(unsafe.Pointer(&(_db.X24))) = uint8(func() int32 {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _pOld = _db.XpTraceArg
+ _db.XmTrace = uint8(func() int32 {
if _xTrace != nil {
- return i32(128)
+ return int32(128)
}
- return i32(0)
+ return int32(0)
}())
- *(*func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_db.X41))) = *(*func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8)
- }{_xTrace}))
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X42))) = _pArg
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ _db.XxTrace = func() func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32 {
+ v := _xTrace
+ return *(*func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()
+ _db.XpTraceArg = _pArg
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _pOld
}
-// Deprecated external interface. Internal/core SQLite code
-// should call sqlite3TransferBindings.
-//
-// It is misuse to call this routine with statements from different
-// database connections. But as this is a deprecated interface, we
-// will not bother to check for that condition.
-//
-// If the two statements contain a different number of bindings, then
-// an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
-// SQLITE_OK is returned.
+// C comment
+// /*
+// ** Deprecated external interface. Internal/core SQLite code
+// ** should call sqlite3TransferBindings.
+// **
+// ** It is misuse to call this routine with statements from different
+// ** database connections. But as this is a deprecated interface, we
+// ** will not bother to check for that condition.
+// **
+// ** If the two statements contain a different number of bindings, then
+// ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
+// ** SQLITE_OK is returned.
+// */
func Xsqlite3_transfer_bindings(tls *crt.TLS, _pFromStmt unsafe.Pointer, _pToStmt unsafe.Pointer) (r0 int32) {
var _pFrom, _pTo *TVdbe
_pFrom = (*TVdbe)(_pFromStmt)
_pTo = (*TVdbe)(_pToStmt)
- if int32(_pFrom.X4) != int32(_pTo.X4) {
- return i32(1)
+ if int32(_pFrom.XnVar) != int32(_pTo.XnVar) {
+ return int32(1)
}
func() {
- if ((uint32((_pTo.X32)>>uint(i32(9)))<<uint(i32(31)))>>uint(i32(31))) == 0 && (_pTo.X41) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77636), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_transfer_bindingsØ00__func__Ø000))), unsafe.Pointer(str(128358)))
+ if ((uint32(_pTo.Xexpired>>9)<<31)>>31) == 0 && _pTo.Xexpmask != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77636), unsafe.Pointer(&_sqlite3_transfer_bindingsØ00__func__Ø000), unsafe.Pointer(str(128379)))
crt.X__builtin_abort(tls)
}
}()
- if (_pTo.X41) != 0 {
- storebits18((*int16)(unsafe.Pointer(&(_pTo.X32))), int16(i32(1)), 1, 0)
+ if _pTo.Xexpmask != 0 {
+ storebits26(&_pTo.Xexpired, int16(1), 1, 0)
}
func() {
- if ((uint32((_pFrom.X32)>>uint(i32(9)))<<uint(i32(31)))>>uint(i32(31))) == 0 && (_pFrom.X41) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77640), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_transfer_bindingsØ00__func__Ø000))), unsafe.Pointer(str(128394)))
+ if ((uint32(_pFrom.Xexpired>>9)<<31)>>31) == 0 && _pFrom.Xexpmask != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77640), unsafe.Pointer(&_sqlite3_transfer_bindingsØ00__func__Ø000), unsafe.Pointer(str(128415)))
crt.X__builtin_abort(tls)
}
}()
- if (_pFrom.X41) != 0 {
- storebits18((*int16)(unsafe.Pointer(&(_pFrom.X32))), int16(i32(1)), 1, 0)
+ if _pFrom.Xexpmask != 0 {
+ storebits26(&_pFrom.Xexpired, int16(1), 1, 0)
}
return _sqlite3TransferBindings(tls, _pFromStmt, _pToStmt)
}
@@ -110422,55 +111997,61 @@ func Xsqlite3_transfer_bindings(tls *crt.TLS, _pFromStmt unsafe.Pointer, _pToStm
var _sqlite3_transfer_bindingsØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_transfer_bindingsØ00__func__Ø000[0], str(128434), 26)
+ crt.Xstrncpy(nil, &_sqlite3_transfer_bindingsØ00__func__Ø000[0], str(128455), 26)
}
-// Register a callback to be invoked each time a row is updated,
-// inserted or deleted using this database connection.
+// C comment
+// /*
+// ** Register a callback to be invoked each time a row is updated,
+// ** inserted or deleted using this database connection.
+// */
func Xsqlite3_update_hook(tls *crt.TLS, _db *Xsqlite3, _xCallback func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64), _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
var _pRet unsafe.Pointer
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(142410))
+ _sqlite3MisuseError(tls, int32(142410))
return nil
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _pRet = _db.X49
- *(*func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64))(unsafe.Pointer(&(_db.X50))) = _xCallback
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X49))) = _pArg
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _pRet = _db.XpUpdateArg
+ _db.XxUpdateCallback = _xCallback
+ _db.XpUpdateArg = _pArg
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _pRet
}
-// Try to convert the type of a function argument or a result column
-// into a numeric representation. Use either INTEGER or REAL whichever
-// is appropriate. But only do the conversion if it is possible without
-// loss of information and return the revised type of the argument.
+// C comment
+// /*
+// ** Try to convert the type of a function argument or a result column
+// ** into a numeric representation. Use either INTEGER or REAL whichever
+// ** is appropriate. But only do the conversion if it is possible without
+// ** loss of information and return the revised type of the argument.
+// */
func Xsqlite3_value_numeric_type(tls *crt.TLS, _pVal *XMem) (r0 int32) {
var _eType int32
var _1_pMem *XMem
_eType = Xsqlite3_value_type(tls, _pVal)
- if _eType == i32(3) {
+ if _eType == int32(3) {
_1_pMem = _pVal
- _applyNumericAffinity(tls, _1_pMem, i32(0))
+ _applyNumericAffinity(tls, _1_pMem, int32(0))
_eType = Xsqlite3_value_type(tls, _pVal)
}
return _eType
}
func Xsqlite3_value_text16be(tls *crt.TLS, _pVal *XMem) (r0 unsafe.Pointer) {
- return _sqlite3ValueText(tls, _pVal, uint8(i32(3)))
+ return _sqlite3ValueText(tls, _pVal, uint8(3))
}
func Xsqlite3_value_text16le(tls *crt.TLS, _pVal *XMem) (r0 unsafe.Pointer) {
- return _sqlite3ValueText(tls, _pVal, uint8(i32(2)))
+ return _sqlite3ValueText(tls, _pVal, uint8(2))
}
func Xsqlite3_prepare16_v2(tls *crt.TLS, _db *Xsqlite3, _zSql unsafe.Pointer, _nBytes int32, _ppStmt *unsafe.Pointer, _pzTail *unsafe.Pointer) (r0 int32) {
var _rc int32
- _rc = _sqlite3Prepare16(tls, _db, _zSql, _nBytes, i32(1), _ppStmt, _pzTail)
+ _rc = _sqlite3Prepare16(tls, _db, _zSql, _nBytes, int32(1), _ppStmt, _pzTail)
func() {
- if _rc != i32(0) && _ppStmt != nil && *_ppStmt != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(116514), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_prepare16_v2Ø00__func__Ø000))), unsafe.Pointer(str(50464)))
+ if _rc != int32(0) && _ppStmt != nil && (*_ppStmt) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(116514), unsafe.Pointer(&_sqlite3_prepare16_v2Ø00__func__Ø000), unsafe.Pointer(str(50419)))
crt.X__builtin_abort(tls)
}
}()
@@ -110480,36 +112061,39 @@ func Xsqlite3_prepare16_v2(tls *crt.TLS, _db *Xsqlite3, _zSql unsafe.Pointer, _n
var _sqlite3_prepare16_v2Ø00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_prepare16_v2Ø00__func__Ø000[0], str(128460), 21)
+ crt.Xstrncpy(nil, &_sqlite3_prepare16_v2Ø00__func__Ø000[0], str(128481), 21)
}
-// Set all the parameters in the compiled SQL statement to NULL.
+// C comment
+// /*
+// ** Set all the parameters in the compiled SQL statement to NULL.
+// */
func Xsqlite3_clear_bindings(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
var _i, _rc int32
var _mutex *Xsqlite3_mutex
var _p *TVdbe
- _rc = i32(0)
+ _rc = int32(0)
_p = (*TVdbe)(_pStmt)
- _mutex = (*Xsqlite3_mutex)((*Xsqlite3)((*TVdbe)(_pStmt).X0).X3)
+ _mutex = (*Xsqlite3_mutex)((*Xsqlite3)((*TVdbe)(_pStmt).Xdb).Xmutex)
Xsqlite3_mutex_enter(tls, _mutex)
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= int32(_p.X4) {
+ if _i >= int32(_p.XnVar) {
goto _3
}
- _sqlite3VdbeMemRelease(tls, (*XMem)(unsafe.Pointer(uintptr(_p.X24)+48*uintptr(_i))))
- *(*uint16)(unsafe.Pointer(&((*XMem)(unsafe.Pointer(uintptr(_p.X24) + 48*uintptr(_i))).X1))) = uint16(i32(1))
+ _sqlite3VdbeMemRelease(tls, elem25((*XMem)(_p.XaVar), uintptr(_i)))
+ elem25((*XMem)(_p.XaVar), uintptr(_i)).Xflags = uint16(1)
_i += 1
goto _0
_3:
func() {
- if ((uint32((_p.X32)>>uint(i32(9)))<<uint(i32(31)))>>uint(i32(31))) == 0 && (_p.X41) != uint32(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76253), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_clear_bindingsØ00__func__Ø000))), unsafe.Pointer(str(8414)))
+ if ((uint32(_p.Xexpired>>9)<<31)>>31) == 0 && _p.Xexpmask != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76253), unsafe.Pointer(&_sqlite3_clear_bindingsØ00__func__Ø000), unsafe.Pointer(str(8315)))
crt.X__builtin_abort(tls)
}
}()
- if (_p.X41) != 0 {
- storebits18((*int16)(unsafe.Pointer(&(_p.X32))), int16(i32(1)), 1, 0)
+ if _p.Xexpmask != 0 {
+ storebits26(&_p.Xexpired, int16(1), 1, 0)
}
Xsqlite3_mutex_leave(tls, _mutex)
return _rc
@@ -110518,53 +112102,65 @@ _3:
var _sqlite3_clear_bindingsØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_clear_bindingsØ00__func__Ø000[0], str(128481), 23)
+ crt.Xstrncpy(nil, &_sqlite3_clear_bindingsØ00__func__Ø000[0], str(128502), 23)
}
-// External API function used to create a new virtual-table module.
+// C comment
+// /*
+// ** External API function used to create a new virtual-table module.
+// */
func Xsqlite3_create_module_v2(tls *crt.TLS, _db *Xsqlite3, _zName *int8, _pModule *Xsqlite3_module, _pAux unsafe.Pointer, _xDestroy func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zName == nil) {
- return _sqlite3MisuseError(tls, i32(125106))
+ return _sqlite3MisuseError(tls, int32(125106))
}
return _createModule(tls, _db, _zName, _pModule, _pAux, _xDestroy)
}
-// Query a blob handle for the size of the data.
-//
-// The Incrblob.nByte field is fixed for the lifetime of the Incrblob
-// so no mutex is required for access.
+// C comment
+// /*
+// ** Query a blob handle for the size of the data.
+// **
+// ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
+// ** so no mutex is required for access.
+// */
func Xsqlite3_blob_bytes(tls *crt.TLS, _pBlob unsafe.Pointer) (r0 int32) {
var _p *XIncrblob
_p = (*XIncrblob)(_pBlob)
return func() int32 {
- if (_p != nil) && ((_p.X4) != nil) {
- return (_p.X0)
+ if (_p != nil) && (_p.XpStmt != nil) {
+ return _p.XnByte
}
- return i32(0)
+ return int32(0)
}()
}
-// Close a blob handle that was previously created using
-// sqlite3_blob_open().
+// C comment
+// /*
+// ** Close a blob handle that was previously created using
+// ** sqlite3_blob_open().
+// */
func Xsqlite3_blob_close(tls *crt.TLS, _pBlob unsafe.Pointer) (r0 int32) {
var _rc int32
var _db *Xsqlite3
var _p *XIncrblob
_p = (*XIncrblob)(_pBlob)
if _p != nil {
- _db = (*Xsqlite3)(_p.X5)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _rc = Xsqlite3_finalize(tls, _p.X4)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_p))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ _db = (*Xsqlite3)(_p.Xdb)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _rc = Xsqlite3_finalize(tls, _p.XpStmt)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_p))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
goto _1
}
- _rc = i32(0)
+ _rc = int32(0)
_1:
return _rc
}
-// Open a blob handle.
+// C comment
+// /*
+// ** Open a blob handle.
+// */
func Xsqlite3_blob_open(tls *crt.TLS, _db *Xsqlite3, _zDb *int8, _zTable *int8, _zColumn *int8, _iRow int64, _wrFlag int32, _ppBlob *unsafe.Pointer) (r0 int32) {
var _nAttempt, _iCol, _rc, _14_j, _17_j, _21_iDb int32
var _zErr, _12_zFault *int8
@@ -110575,76 +112171,76 @@ func Xsqlite3_blob_open(tls *crt.TLS, _db *Xsqlite3, _zDb *int8, _zTable *int8,
var _21_aOp *XVdbeOp
var _pBlob *XIncrblob
var _13_pFKey *XFKey
- _nAttempt = i32(0)
- _rc = i32(0)
+ _nAttempt = int32(0)
+ _rc = int32(0)
_zErr = nil
_pParse = nil
_pBlob = nil
if _ppBlob == nil {
- return _sqlite3MisuseError(tls, i32(85639))
+ return _sqlite3MisuseError(tls, int32(85639))
}
*_ppBlob = nil
if (_sqlite3SafetyCheckOk(tls, _db) == 0) || (_zTable == nil) {
- return _sqlite3MisuseError(tls, i32(85645))
+ return _sqlite3MisuseError(tls, int32(85645))
}
_wrFlag = bool2int(_wrFlag != 0)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _pBlob = (*XIncrblob)(_sqlite3DbMallocZero(tls, _db, uint64(u32(32))))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _pBlob = (*XIncrblob)(_sqlite3DbMallocZero(tls, _db, uint64(32)))
if _pBlob == nil {
goto _blob_open_out
}
- _pParse = (*XParse)(_sqlite3DbMallocRaw(tls, _db, uint64(u32(484))))
+ _pParse = (*XParse)(_sqlite3DbMallocRaw(tls, _db, uint64(484)))
if _pParse == nil {
goto _blob_open_out
}
_4:
- crt.Xmemset(tls, (unsafe.Pointer)(_pParse), i32(0), u32(484))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pParse.X0))))) = _db
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErr))
+ crt.Xmemset(tls, unsafe.Pointer(_pParse), int32(0), uint32(484))
+ *(**Xsqlite3)(unsafe.Pointer(&_pParse.Xdb)) = _db
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErr))
_zErr = nil
_sqlite3BtreeEnterAll(tls, _db)
- _pTab = _sqlite3LocateTable(tls, _pParse, uint32(i32(0)), _zTable, _zDb)
- if (_pTab != nil) && (_pTab.X16) != 0 {
+ _pTab = _sqlite3LocateTable(tls, _pParse, 0, _zTable, _zDb)
+ if (_pTab != nil) && _pTab.XnModuleArg != 0 {
_pTab = nil
- _sqlite3ErrorMsg(tls, _pParse, str(128504), unsafe.Pointer(_zTable))
+ _sqlite3ErrorMsg(tls, _pParse, str(128525), unsafe.Pointer(_zTable))
}
- if (_pTab != nil) && (((_pTab.X9) & uint32(i32(32))) != uint32(i32(0))) {
+ if (_pTab != nil) && ((_pTab.XtabFlags & uint32(32)) != (0)) {
_pTab = nil
- _sqlite3ErrorMsg(tls, _pParse, str(128534), unsafe.Pointer(_zTable))
+ _sqlite3ErrorMsg(tls, _pParse, str(128555), unsafe.Pointer(_zTable))
}
- if (_pTab != nil) && ((*XSelect)(_pTab.X3) != nil) {
+ if (_pTab != nil) && (_pTab.XpSelect != nil) {
_pTab = nil
- _sqlite3ErrorMsg(tls, _pParse, str(128570), unsafe.Pointer(_zTable))
+ _sqlite3ErrorMsg(tls, _pParse, str(128591), unsafe.Pointer(_zTable))
}
if _pTab != nil {
goto _12
}
- if (_pParse.X1) != nil {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErr))
- _zErr = _pParse.X1
- *(**int8)(unsafe.Pointer(&(_pParse.X1))) = nil
+ if _pParse.XzErrMsg != nil {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErr))
+ _zErr = _pParse.XzErrMsg
+ _pParse.XzErrMsg = nil
}
- _rc = i32(1)
+ _rc = int32(1)
_sqlite3BtreeLeaveAll(tls, _db)
goto _blob_open_out
_12:
- *(**XTable)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBlob.X7))))) = _pTab
- *(**int8)(unsafe.Pointer(&(_pBlob.X6))) = (*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))))).X0
- _iCol = i32(0)
+ *(**XTable)(unsafe.Pointer(&_pBlob.XpTab)) = _pTab
+ _pBlob.XzDb = elem27((*XDb)(_db.XaDb), uintptr(_sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema)))).XzDbSName
+ _iCol = int32(0)
_14:
- if _iCol >= int32(_pTab.X11) {
+ if _iCol >= int32(_pTab.XnCol) {
goto _17
}
- if _sqlite3StrICmp(tls, (*XColumn)(unsafe.Pointer(uintptr(_pTab.X1)+16*uintptr(_iCol))).X0, _zColumn) == i32(0) {
+ if _sqlite3StrICmp(tls, elem41((*XColumn)(_pTab.XaCol), uintptr(_iCol)).XzName, _zColumn) == int32(0) {
goto _17
}
_iCol += 1
goto _14
_17:
- if _iCol == int32(_pTab.X11) {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErr))
- _zErr = _sqlite3MPrintf(tls, _db, str(128591), unsafe.Pointer(_zColumn))
- _rc = i32(1)
+ if _iCol == int32(_pTab.XnCol) {
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErr))
+ _zErr = _sqlite3MPrintf(tls, _db, str(128612), unsafe.Pointer(_zColumn))
+ _rc = int32(1)
_sqlite3BtreeLeaveAll(tls, _db)
goto _blob_open_out
}
@@ -110652,135 +112248,132 @@ _17:
goto _20
}
_12_zFault = nil
- if ((_db.X6) & i32(524288)) == 0 {
+ if (_db.Xflags & int32(524288)) == 0 {
goto _21
}
- _13_pFKey = (*XFKey)(_pTab.X4)
+ _13_pFKey = (*XFKey)(_pTab.XpFKey)
_22:
if _13_pFKey == nil {
goto _25
}
- _14_j = i32(0)
+ _14_j = int32(0)
_26:
- if _14_j >= (_13_pFKey.X5) {
+ if _14_j >= _13_pFKey.XnCol {
goto _29
}
- if ((*t73)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]struct {
- X0 int32
- X1 *int8
- })(unsafe.Pointer(&(_13_pFKey.X9))))) + 8*uintptr(_14_j))).X0) == _iCol {
- _12_zFault = str(128612)
+ if (elem116((*t117)(unsafe.Pointer(&_13_pFKey.XaCol)), uintptr(_14_j)).XiFrom) == _iCol {
+ _12_zFault = str(128633)
}
_14_j += 1
goto _26
_29:
- _13_pFKey = (*XFKey)(_13_pFKey.X1)
+ _13_pFKey = (*XFKey)(_13_pFKey.XpNextFrom)
goto _22
_25:
_21:
- _12_pIdx = (*XIndex)(_pTab.X2)
+ _12_pIdx = (*XIndex)(_pTab.XpIndex)
_31:
if _12_pIdx == nil {
goto _34
}
- _17_j = i32(0)
+ _17_j = int32(0)
_35:
- if _17_j >= int32(_12_pIdx.X13) {
+ if _17_j >= int32(_12_pIdx.XnKeyCol) {
goto _38
}
- if (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pIdx.X1)) + 2*uintptr(_17_j)))) == _iCol) || (int32(*(*int16)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_pIdx.X1)) + 2*uintptr(_17_j)))) == i32(-2)) {
- _12_zFault = str(128624)
+ if (int32(*elem50(_12_pIdx.XaiColumn, uintptr(_17_j))) == _iCol) || (int32(*elem50(_12_pIdx.XaiColumn, uintptr(_17_j))) == int32(-2)) {
+ _12_zFault = str(128645)
}
_17_j += 1
goto _35
_38:
- _12_pIdx = (*XIndex)(_12_pIdx.X5)
+ _12_pIdx = (*XIndex)(_12_pIdx.XpNext)
goto _31
_34:
if _12_zFault != nil {
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErr))
- _zErr = _sqlite3MPrintf(tls, _db, str(128632), unsafe.Pointer(_12_zFault))
- _rc = i32(1)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErr))
+ _zErr = _sqlite3MPrintf(tls, _db, str(128653), unsafe.Pointer(_12_zFault))
+ _rc = int32(1)
_sqlite3BtreeLeaveAll(tls, _db)
goto _blob_open_out
}
_20:
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pBlob.X4))) = (unsafe.Pointer)(_sqlite3VdbeCreate(tls, _pParse))
+ _pBlob.XpStmt = unsafe.Pointer(_sqlite3VdbeCreate(tls, _pParse))
func() {
- if (_pBlob.X4) == nil && (_db.X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85748), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_blob_openØ00__func__Ø000))), unsafe.Pointer(str(128666)))
+ if _pBlob.XpStmt == nil && _db.XmallocFailed == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85748), unsafe.Pointer(&_sqlite3_blob_openØ00__func__Ø000), unsafe.Pointer(str(128687)))
crt.X__builtin_abort(tls)
}
}()
- if (_pBlob.X4) == nil {
+ if _pBlob.XpStmt == nil {
goto _45
}
- _21_v = (*TVdbe)(_pBlob.X4)
- _21_iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.X20))
- _sqlite3VdbeAddOp4Int(tls, _21_v, i32(2), _21_iDb, _wrFlag, (*XSchema)(_pTab.X20).X0, (*XSchema)(_pTab.X20).X1)
- _sqlite3VdbeChangeP5(tls, _21_v, uint16(i32(1)))
- _21_aOp = _sqlite3VdbeAddOpList(tls, _21_v, i32(6), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3_blob_openØ00openBlobØ002)), _sqlite3_blob_openØ00iLnØ001)
+ _21_v = (*TVdbe)(_pBlob.XpStmt)
+ _21_iDb = _sqlite3SchemaToIndex(tls, _db, (*XSchema)(_pTab.XpSchema))
+ _sqlite3VdbeAddOp4Int(tls, _21_v, int32(2), _21_iDb, _wrFlag, (*XSchema)(_pTab.XpSchema).Xschema_cookie, (*XSchema)(_pTab.XpSchema).XiGeneration)
+ _sqlite3VdbeChangeP5(tls, _21_v, uint16(1))
+ _21_aOp = _sqlite3VdbeAddOpList(tls, _21_v, int32(6), (*XVdbeOpList)(unsafe.Pointer(&_sqlite3_blob_openØ00openBlobØ002)), _sqlite3_blob_openØ00iLnØ001)
_sqlite3VdbeUsesBtree(tls, _21_v, _21_iDb)
- if int32(_db.X17) == i32(0) {
+ if int32(_db.XmallocFailed) == int32(0) {
func() {
if _21_aOp == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85790), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_blob_openØ00__func__Ø000))), unsafe.Pointer(str(128699)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85790), unsafe.Pointer(&_sqlite3_blob_openØ00__func__Ø000), unsafe.Pointer(str(128720)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_aOp)) + 24*uintptr(i32(0)))).X3))) = _21_iDb
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_aOp)) + 24*uintptr(i32(0)))).X4))) = _pTab.X7
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_aOp)) + 24*uintptr(i32(0)))).X5))) = _wrFlag
- _sqlite3VdbeChangeP4(tls, _21_v, i32(1), _pTab.X0, i32(0))
+ elem61(_21_aOp, 0).Xp1 = _21_iDb
+ elem61(_21_aOp, 0).Xp2 = _pTab.Xtnum
+ elem61(_21_aOp, 0).Xp3 = _wrFlag
+ _sqlite3VdbeChangeP4(tls, _21_v, int32(1), _pTab.XzName, int32(0))
}
- if int32(_db.X17) != i32(0) {
+ if int32(_db.XmallocFailed) != int32(0) {
goto _49
}
if _wrFlag != 0 {
- *(*uint8)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_aOp)) + 24*uintptr(i32(1)))).X0))) = uint8(i32(107))
- }
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_aOp)) + 24*uintptr(i32(1)))).X4))) = _pTab.X7
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_aOp)) + 24*uintptr(i32(1)))).X5))) = _21_iDb
- *(*int8)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_aOp)) + 24*uintptr(i32(1)))).X1))) = int8(i32(-11))
- *(*int32)(unsafe.Pointer((*t39)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_aOp)) + 24*uintptr(i32(1)))).X6))))) = int32(_pTab.X11) + i32(1)
- *(*int32)(unsafe.Pointer(&((*XVdbeOp)(unsafe.Pointer(uintptr((unsafe.Pointer)(_21_aOp)) + 24*uintptr(i32(3)))).X4))) = int32(_pTab.X11)
- *(*int16)(unsafe.Pointer(&(_pParse.X52))) = int16(i32(0))
- *(*int32)(unsafe.Pointer(&(_pParse.X18))) = i32(1)
- *(*int32)(unsafe.Pointer(&(_pParse.X17))) = i32(1)
+ elem61(_21_aOp, uintptr(1)).Xopcode = uint8(107)
+ }
+ elem61(_21_aOp, uintptr(1)).Xp2 = _pTab.Xtnum
+ elem61(_21_aOp, uintptr(1)).Xp3 = _21_iDb
+ elem61(_21_aOp, uintptr(1)).Xp4type = int8(-11)
+ *(*int32)(unsafe.Pointer(&(elem61(_21_aOp, uintptr(1)).Xp4))) = int32(_pTab.XnCol) + int32(1)
+ elem61(_21_aOp, uintptr(3)).Xp2 = int32(_pTab.XnCol)
+ _pParse.XnVar = 0
+ _pParse.XnMem = int32(1)
+ _pParse.XnTab = int32(1)
_sqlite3VdbeMakeReady(tls, _21_v, _pParse)
_49:
_45:
- *(*uint16)(unsafe.Pointer(&(_pBlob.X2))) = uint16(_iCol)
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBlob.X5))))) = _db
+ _pBlob.XiCol = uint16(_iCol)
+ *(**Xsqlite3)(unsafe.Pointer(&_pBlob.Xdb)) = _db
_sqlite3BtreeLeaveAll(tls, _db)
- if (_db.X17) != 0 {
+ if _db.XmallocFailed != 0 {
goto _blob_open_out
}
_rc = _blobSeekToRow(tls, _pBlob, _iRow, &_zErr)
- if (preInc1(&_nAttempt, 1) < i32(50)) && (_rc == i32(17)) {
+ if (preInc2(&_nAttempt, 1) < int32(50)) && (_rc == int32(17)) {
goto _4
}
_blob_open_out:
- if (_rc == i32(0)) && (int32(_db.X17) == i32(0)) {
- *_ppBlob = (unsafe.Pointer)(_pBlob)
+ if (_rc == int32(0)) && (int32(_db.XmallocFailed) == int32(0)) {
+ *_ppBlob = unsafe.Pointer(_pBlob)
goto _55
}
- if (_pBlob != nil) && ((_pBlob.X4) != nil) {
- _sqlite3VdbeFinalize(tls, (*TVdbe)(_pBlob.X4))
+ if (_pBlob != nil) && (_pBlob.XpStmt != nil) {
+ _sqlite3VdbeFinalize(tls, (*TVdbe)(_pBlob.XpStmt))
}
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pBlob))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pBlob))
_55:
_sqlite3ErrorWithMsg(tls, _db, _rc, func() *int8 {
if _zErr != nil {
- return str(24576)
+ return str(24531)
}
return nil
}(), unsafe.Pointer(_zErr))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_zErr))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_zErr))
_sqlite3ParserReset(tls, _pParse)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_pParse))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_pParse))
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
_ = _nAttempt
@@ -110790,32 +112383,35 @@ _55:
var _sqlite3_blob_openØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_blob_openØ00__func__Ø000[0], str(128706), 18)
+ crt.Xstrncpy(nil, &_sqlite3_blob_openØ00__func__Ø000[0], str(128727), 18)
}
var _sqlite3_blob_openØ00openBlobØ002 [6]XVdbeOpList
func init() {
- _sqlite3_blob_openØ00openBlobØ002 = [6]XVdbeOpList{XVdbeOpList{X0: u8(154), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(106), X1: i8(0), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(32), X1: i8(0), X2: i8(5), X3: i8(1)}, XVdbeOpList{X0: u8(99), X1: i8(0), X2: i8(0), X3: i8(1)}, XVdbeOpList{X0: u8(67), X1: i8(1), X2: i8(0), X3: i8(0)}, XVdbeOpList{X0: u8(55), X1: i8(0), X2: i8(0), X3: i8(0)}}
+ _sqlite3_blob_openØ00openBlobØ002 = [6]XVdbeOpList{XVdbeOpList{Xopcode: uint8(154)}, XVdbeOpList{Xopcode: uint8(106)}, XVdbeOpList{Xopcode: uint8(32), Xp2: int8(5), Xp3: int8(1)}, XVdbeOpList{Xopcode: uint8(99), Xp3: int8(1)}, XVdbeOpList{Xopcode: uint8(67), Xp1: int8(1)}, XVdbeOpList{Xopcode: uint8(55)}}
}
var _sqlite3_blob_openØ00iLnØ001 int32
-// This function is used by both blob_open() and blob_reopen(). It seeks
-// the b-tree cursor associated with blob handle p to point to row iRow.
-// If successful, SQLITE_OK is returned and subsequent calls to
-// sqlite3_blob_read() or sqlite3_blob_write() access the specified row.
-//
-// If an error occurs, or if the specified row does not exist or does not
-// contain a value of type TEXT or BLOB in the column nominated when the
-// blob handle was opened, then an error code is returned and *pzErr may
-// be set to point to a buffer containing an error message. It is the
-// responsibility of the caller to free the error message buffer using
-// sqlite3DbFree().
-//
-// If an error does occur, then the b-tree cursor is closed. All subsequent
-// calls to sqlite3_blob_read(), blob_write() or blob_reopen() will
-// immediately return SQLITE_ABORT.
+// C comment
+// /*
+// ** This function is used by both blob_open() and blob_reopen(). It seeks
+// ** the b-tree cursor associated with blob handle p to point to row iRow.
+// ** If successful, SQLITE_OK is returned and subsequent calls to
+// ** sqlite3_blob_read() or sqlite3_blob_write() access the specified row.
+// **
+// ** If an error occurs, or if the specified row does not exist or does not
+// ** contain a value of type TEXT or BLOB in the column nominated when the
+// ** blob handle was opened, then an error code is returned and *pzErr may
+// ** be set to point to a buffer containing an error message. It is the
+// ** responsibility of the caller to free the error message buffer using
+// ** sqlite3DbFree().
+// **
+// ** If an error does occur, then the b-tree cursor is closed. All subsequent
+// ** calls to sqlite3_blob_read(), blob_write() or blob_reopen() will
+// ** immediately return SQLITE_ABORT.
+// */
func _blobSeekToRow(tls *crt.TLS, _p *XIncrblob, _iRow int64, _pzErr **int8) (r0 int32) {
var _rc int32
var _3_type uint32
@@ -110823,75 +112419,75 @@ func _blobSeekToRow(tls *crt.TLS, _p *XIncrblob, _iRow int64, _pzErr **int8) (r0
var _v *TVdbe
var _3_pC *XVdbeCursor
_zErr = nil
- _v = (*TVdbe)(_p.X4)
- *(*uint16)(unsafe.Pointer(&((*XMem)(unsafe.Pointer(uintptr(_v.X18) + 48*uintptr(i32(1)))).X1))) = uint16(i32(4))
- *(*int64)(unsafe.Pointer((*t15)(unsafe.Pointer(&((*XMem)(unsafe.Pointer(uintptr(_v.X18) + 48*uintptr(i32(1)))).X0))))) = _iRow
- if (_v.X9) > i32(3) {
- *(*int32)(unsafe.Pointer(&(_v.X9))) = i32(3)
+ _v = (*TVdbe)(_p.XpStmt)
+ elem25((*XMem)(_v.XaMem), uintptr(1)).Xflags = uint16(4)
+ *(*int64)(unsafe.Pointer(&(elem25((*XMem)(_v.XaMem), uintptr(1)).Xu))) = _iRow
+ if _v.Xpc > int32(3) {
+ _v.Xpc = int32(3)
_rc = _sqlite3VdbeExec(tls, _v)
goto _1
}
- _rc = Xsqlite3_step(tls, _p.X4)
+ _rc = Xsqlite3_step(tls, _p.XpStmt)
_1:
- if _rc != i32(100) {
+ if _rc != int32(100) {
goto _2
}
- _3_pC = *(**XVdbeCursor)(unsafe.Pointer(uintptr((unsafe.Pointer)(_v.X23)) + 4*uintptr(i32(0))))
+ _3_pC = *elem77((**XVdbeCursor)(unsafe.Pointer(_v.XapCsr)), 0)
_3_type = func() uint32 {
- if int32(_3_pC.X19) > int32(_p.X2) {
- return (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]uint32)(unsafe.Pointer(&(_3_pC.X25))))) + 4*uintptr(_p.X2))))
+ if int32(_3_pC.XnHdrParsed) > int32(_p.XiCol) {
+ return (*elem7((*uint32)(unsafe.Pointer(&_3_pC.XaType)), uintptr(_p.XiCol)))
}
- return uint32(i32(0))
+ return (0)
}()
- if _3_type < uint32(i32(12)) {
- _zErr = _sqlite3MPrintf(tls, (*Xsqlite3)(_p.X5), str(128724), unsafe.Pointer(func() *int8 {
- if _3_type == uint32(i32(0)) {
- return str(128753)
+ if _3_type < uint32(12) {
+ _zErr = _sqlite3MPrintf(tls, (*Xsqlite3)(_p.Xdb), str(128745), unsafe.Pointer(func() *int8 {
+ if _3_type == (0) {
+ return str(128774)
}
return func() *int8 {
- if _3_type == uint32(i32(7)) {
- return str(42883)
+ if _3_type == uint32(7) {
+ return str(42838)
}
- return str(42875)
+ return str(42830)
}()
}()))
- _rc = i32(1)
- Xsqlite3_finalize(tls, _p.X4)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))) = nil
+ _rc = int32(1)
+ Xsqlite3_finalize(tls, _p.XpStmt)
+ _p.XpStmt = nil
goto _10
}
- *(*int32)(unsafe.Pointer(&(_p.X1))) = int32(*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[1]uint32)(unsafe.Pointer(&(_3_pC.X25))))) + 4*uintptr(int32(_p.X2)+int32(_3_pC.X18)))))
- *(*int32)(unsafe.Pointer(&(_p.X0))) = int32(_sqlite3VdbeSerialTypeLen(tls, _3_type))
- *(**XBtCursor)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X3))))) = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer((*t46)(unsafe.Pointer(&(_3_pC.X14))))))
- _sqlite3BtreeIncrblobCursor(tls, (*XBtCursor)(_p.X3))
+ _p.XiOffset = int32(*elem7((*uint32)(unsafe.Pointer(&_3_pC.XaType)), uintptr(int32(_p.XiCol)+int32(_3_pC.XnField))))
+ _p.XnByte = int32(_sqlite3VdbeSerialTypeLen(tls, _3_type))
+ *(**XBtCursor)(unsafe.Pointer(&_p.XpCsr)) = (*XBtCursor)(*(*unsafe.Pointer)(unsafe.Pointer(&_3_pC.Xuc)))
+ _sqlite3BtreeIncrblobCursor(tls, (*XBtCursor)(_p.XpCsr))
_10:
_2:
- if _rc == i32(100) {
- _rc = i32(0)
+ if _rc == int32(100) {
+ _rc = int32(0)
goto _13
}
- if (_p.X4) == nil {
+ if _p.XpStmt == nil {
goto _13
}
- _rc = Xsqlite3_finalize(tls, _p.X4)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))) = nil
- if _rc == i32(0) {
- _zErr = _sqlite3MPrintf(tls, (*Xsqlite3)(_p.X5), str(128758), _iRow)
- _rc = i32(1)
+ _rc = Xsqlite3_finalize(tls, _p.XpStmt)
+ _p.XpStmt = nil
+ if _rc == int32(0) {
+ _zErr = _sqlite3MPrintf(tls, (*Xsqlite3)(_p.Xdb), str(128779), _iRow)
+ _rc = int32(1)
goto _15
}
- _zErr = _sqlite3MPrintf(tls, (*Xsqlite3)(_p.X5), str(24576), unsafe.Pointer(Xsqlite3_errmsg(tls, (*Xsqlite3)(_p.X5))))
+ _zErr = _sqlite3MPrintf(tls, (*Xsqlite3)(_p.Xdb), str(24531), unsafe.Pointer(Xsqlite3_errmsg(tls, (*Xsqlite3)(_p.Xdb))))
_15:
_13:
func() {
- if _rc == i32(0) && _zErr != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85610), unsafe.Pointer((*int8)(unsafe.Pointer(&_blobSeekToRowØ00__func__Ø000))), unsafe.Pointer(str(128778)))
+ if _rc == int32(0) && _zErr != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85610), unsafe.Pointer(&_blobSeekToRowØ00__func__Ø000), unsafe.Pointer(str(128799)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc == i32(100) || _rc == i32(101) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85611), unsafe.Pointer((*int8)(unsafe.Pointer(&_blobSeekToRowØ00__func__Ø000))), unsafe.Pointer(str(128803)))
+ if _rc == int32(100) || _rc == int32(101) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85611), unsafe.Pointer(&_blobSeekToRowØ00__func__Ø000), unsafe.Pointer(str(128824)))
crt.X__builtin_abort(tls)
}
}()
@@ -110899,28 +112495,36 @@ _13:
return _rc
}
-// Mark this cursor as an incremental blob cursor.
+// C comment
+// /*
+// ** Mark this cursor as an incremental blob cursor.
+// */
func _sqlite3BtreeIncrblobCursor(tls *crt.TLS, _pCur *XBtCursor) {
{
- p := (*uint8)(unsafe.Pointer(&(_pCur.X10)))
- *p = uint8(int32(*p) | i32(16))
- sink2(*p)
+ p := &_pCur.XcurFlags
+ *p = uint8(int32(*p) | int32(16))
}
- *(*uint8)(unsafe.Pointer(&((*XBtree)(_pCur.X0).X5))) = uint8(i32(1))
+ (*XBtree)(_pCur.XpBtree).XhasIncrblobCur = uint8(1)
}
var _blobSeekToRowØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_blobSeekToRowØ00__func__Ø000[0], str(128837), 14)
+ crt.Xstrncpy(nil, &_blobSeekToRowØ00__func__Ø000[0], str(128858), 14)
}
-// Read data from a blob handle.
+// C comment
+// /*
+// ** Read data from a blob handle.
+// */
func Xsqlite3_blob_read(tls *crt.TLS, _pBlob unsafe.Pointer, _z unsafe.Pointer, _n int32, _iOffset int32) (r0 int32) {
return _blobReadWrite(tls, _pBlob, _z, _n, _iOffset, _sqlite3BtreePayloadChecked)
}
-// Perform a read or write operation on a blob
+// C comment
+// /*
+// ** Perform a read or write operation on a blob
+// */
func _blobReadWrite(tls *crt.TLS, _pBlob unsafe.Pointer, _z unsafe.Pointer, _n int32, _iOffset int32, _xCall func(*crt.TLS, *XBtCursor, uint32, uint32, unsafe.Pointer) int32) (r0 int32) {
var _rc int32
var _db *Xsqlite3
@@ -110928,70 +112532,73 @@ func _blobReadWrite(tls *crt.TLS, _pBlob unsafe.Pointer, _z unsafe.Pointer, _n i
var _p *XIncrblob
_p = (*XIncrblob)(_pBlob)
if _p == nil {
- return _sqlite3MisuseError(tls, i32(85888))
+ return _sqlite3MisuseError(tls, int32(85888))
}
- _db = (*Xsqlite3)(_p.X5)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- _v = (*TVdbe)(_p.X4)
- if ((_n < i32(0)) || (_iOffset < i32(0))) || ((int64(_iOffset) + int64(_n)) > int64(_p.X0)) {
- _rc = i32(1)
+ _db = (*Xsqlite3)(_p.Xdb)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _v = (*TVdbe)(_p.XpStmt)
+ if ((_n < int32(0)) || (_iOffset < int32(0))) || ((int64(_iOffset) + int64(_n)) > int64(_p.XnByte)) {
+ _rc = int32(1)
goto _6
}
if _v == nil {
- _rc = i32(4)
+ _rc = int32(4)
goto _6
}
func() {
- if _db != (*Xsqlite3)(_v.X0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(85905), unsafe.Pointer((*int8)(unsafe.Pointer(&_blobReadWriteØ00__func__Ø000))), unsafe.Pointer(str(128851)))
+ if _db != (*Xsqlite3)(_v.Xdb) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(85905), unsafe.Pointer(&_blobReadWriteØ00__func__Ø000), unsafe.Pointer(str(128872)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3BtreeEnterCursor(tls, (*XBtCursor)(_p.X3))
- _rc = _xCall(tls, (*XBtCursor)(_p.X3), uint32(_iOffset+(_p.X1)), uint32(_n), _z)
- _sqlite3BtreeLeaveCursor(tls, (*XBtCursor)(_p.X3))
- if _rc == i32(4) {
+ _sqlite3BtreeEnterCursor(tls, (*XBtCursor)(_p.XpCsr))
+ _rc = _xCall(tls, (*XBtCursor)(_p.XpCsr), uint32(_iOffset+_p.XiOffset), uint32(_n), _z)
+ _sqlite3BtreeLeaveCursor(tls, (*XBtCursor)(_p.XpCsr))
+ if _rc == int32(4) {
_sqlite3VdbeFinalize(tls, _v)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))) = nil
+ _p.XpStmt = nil
goto _10
}
- *(*int32)(unsafe.Pointer(&(_v.X10))) = _rc
+ _v.Xrc = _rc
_10:
_6:
_sqlite3Error(tls, _db, _rc)
_rc = _sqlite3ApiExit(tls, _db, _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
var _blobReadWriteØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_blobReadWriteØ00__func__Ø000[0], str(128863), 14)
+ crt.Xstrncpy(nil, &_blobReadWriteØ00__func__Ø000[0], str(128884), 14)
}
-// Enter a mutex on a Btree given a cursor owned by that Btree.
-//
-// These entry points are used by incremental I/O only. Enter() is required
-// any time OMIT_SHARED_CACHE is not defined, regardless of whether or not
-// the build is threadsafe. Leave() is only required by threadsafe builds.
+// C comment
+// /*
+// ** Enter a mutex on a Btree given a cursor owned by that Btree.
+// **
+// ** These entry points are used by incremental I/O only. Enter() is required
+// ** any time OMIT_SHARED_CACHE is not defined, regardless of whether or not
+// ** the build is threadsafe. Leave() is only required by threadsafe builds.
+// */
func _sqlite3BtreeEnterCursor(tls *crt.TLS, _pCur *XBtCursor) {
- _sqlite3BtreeEnter(tls, (*XBtree)(_pCur.X0))
+ _sqlite3BtreeEnter(tls, (*XBtree)(_pCur.XpBtree))
}
func _sqlite3BtreeLeaveCursor(tls *crt.TLS, _pCur *XBtCursor) {
- _sqlite3BtreeLeave(tls, (*XBtree)(_pCur.X0))
+ _sqlite3BtreeLeave(tls, (*XBtree)(_pCur.XpBtree))
}
func _sqlite3BtreePayloadChecked(tls *crt.TLS, _pCur *XBtCursor, _offset uint32, _amt uint32, _pBuf unsafe.Pointer) (r0 int32) {
- if int32(_pCur.X12) == i32(1) {
+ if int32(_pCur.XeState) == int32(1) {
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63784), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePayloadCheckedØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63784), unsafe.Pointer(&_sqlite3BtreePayloadCheckedØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
- return _accessPayload(tls, _pCur, _offset, _amt, (*uint8)(_pBuf), i32(0))
+ return _accessPayload(tls, _pCur, _offset, _amt, (*uint8)(_pBuf), int32(0))
}
return _accessPayloadChecked(tls, _pCur, _offset, _amt, _pBuf)
}
@@ -110999,17 +112606,17 @@ func _sqlite3BtreePayloadChecked(tls *crt.TLS, _pCur *XBtCursor, _offset uint32,
var _sqlite3BtreePayloadCheckedØ00__func__Ø000 [27]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreePayloadCheckedØ00__func__Ø000[0], str(128877), 27)
+ crt.Xstrncpy(nil, &_sqlite3BtreePayloadCheckedØ00__func__Ø000[0], str(128898), 27)
}
func _accessPayloadChecked(tls *crt.TLS, _pCur *XBtCursor, _offset uint32, _amt uint32, _pBuf unsafe.Pointer) (r0 int32) {
var _rc int32
- if int32(_pCur.X12) == i32(0) {
- return i32(4)
+ if int32(_pCur.XeState) == int32(0) {
+ return int32(4)
}
func() {
if _cursorOwnsBtShared(tls, _pCur) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(63778), unsafe.Pointer((*int8)(unsafe.Pointer(&_accessPayloadCheckedØ00__func__Ø000))), unsafe.Pointer(str(73824)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(63778), unsafe.Pointer(&_accessPayloadCheckedØ00__func__Ø000), unsafe.Pointer(str(71986)))
crt.X__builtin_abort(tls)
}
}()
@@ -111018,175 +112625,199 @@ func _accessPayloadChecked(tls *crt.TLS, _pCur *XBtCursor, _offset uint32, _amt
if _rc != 0 {
return _rc
}
- return _accessPayload(tls, _pCur, _offset, _amt, (*uint8)(_pBuf), i32(0))
+ return _accessPayload(tls, _pCur, _offset, _amt, (*uint8)(_pBuf), int32(0))
}()
}
var _accessPayloadCheckedØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_accessPayloadCheckedØ00__func__Ø000[0], str(128904), 21)
+ crt.Xstrncpy(nil, &_accessPayloadCheckedØ00__func__Ø000[0], str(128925), 21)
}
-// Write data to a blob handle.
+// C comment
+// /*
+// ** Write data to a blob handle.
+// */
func Xsqlite3_blob_write(tls *crt.TLS, _pBlob unsafe.Pointer, _z unsafe.Pointer, _n int32, _iOffset int32) (r0 int32) {
return _blobReadWrite(tls, _pBlob, _z, _n, _iOffset, _sqlite3BtreePutData)
}
-// Argument pCsr must be a cursor opened for writing on an
-// INTKEY table currently pointing at a valid table entry.
-// This function modifies the data stored as part of that entry.
-//
-// Only the data content may only be modified, it is not possible to
-// change the length of the data stored. If this function is called with
-// parameters that attempt to write past the end of the existing data,
-// no modifications are made and SQLITE_CORRUPT is returned.
+// C comment
+// /*
+// ** Argument pCsr must be a cursor opened for writing on an
+// ** INTKEY table currently pointing at a valid table entry.
+// ** This function modifies the data stored as part of that entry.
+// **
+// ** Only the data content may only be modified, it is not possible to
+// ** change the length of the data stored. If this function is called with
+// ** parameters that attempt to write past the end of the existing data,
+// ** no modifications are made and SQLITE_CORRUPT is returned.
+// */
func _sqlite3BtreePutData(tls *crt.TLS, _pCsr *XBtCursor, _offset uint32, _amt uint32, _z unsafe.Pointer) (r0 int32) {
var _rc int32
func() {
if _cursorOwnsBtShared(tls, _pCsr) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68770), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000))), unsafe.Pointer(str(128925)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68770), unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000), unsafe.Pointer(str(128946)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCsr.X0).X0).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68771), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000))), unsafe.Pointer(str(128950)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XBtree)(_pCsr.XpBtree).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68771), unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000), unsafe.Pointer(str(128971)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(_pCsr.X10) & i32(16)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68772), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000))), unsafe.Pointer(str(128994)))
+ if (int32(_pCsr.XcurFlags) & int32(16)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68772), unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000), unsafe.Pointer(str(129015)))
crt.X__builtin_abort(tls)
}
}()
_rc = func() int32 {
- if int32(_pCsr.X12) >= i32(3) {
+ if int32(_pCsr.XeState) >= int32(3) {
return _btreeRestoreCursorPosition(tls, _pCsr)
}
- return i32(0)
+ return int32(0)
}()
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
func() {
- if int32(_pCsr.X12) == i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68778), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000))), unsafe.Pointer(str(129025)))
+ if int32(_pCsr.XeState) == int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68778), unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000), unsafe.Pointer(str(129046)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pCsr.X12) != i32(1) {
- return i32(4)
+ if int32(_pCsr.XeState) != int32(1) {
+ return int32(4)
}
- _rc = _saveAllCursors(tls, (*XBtShared)(_pCsr.X1), _pCsr.X7, _pCsr)
+ _rc = _saveAllCursors(tls, (*XBtShared)(_pCsr.XpBt), _pCsr.XpgnoRoot, _pCsr)
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68792), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68792), unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pCsr.X10) & i32(1)) == i32(0) {
- return i32(8)
+ if (int32(_pCsr.XcurFlags) & int32(1)) == int32(0) {
+ return int32(8)
}
func() {
- if (int32((*XBtShared)(_pCsr.X1).X10)&i32(1)) != i32(0) || int32((*XBtShared)(_pCsr.X1).X8) != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68804), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000))), unsafe.Pointer(str(129058)))
+ if (int32((*XBtShared)(_pCsr.XpBt).XbtsFlags)&int32(1)) != int32(0) || int32((*XBtShared)(_pCsr.XpBt).XinTransaction) != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68804), unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000), unsafe.Pointer(str(129079)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _hasSharedCacheTableLock(tls, (*XBtree)(_pCsr.X0), _pCsr.X7, i32(0), i32(2)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68806), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000))), unsafe.Pointer(str(129140)))
+ if _hasSharedCacheTableLock(tls, (*XBtree)(_pCsr.XpBtree), _pCsr.XpgnoRoot, int32(0), int32(2)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68806), unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000), unsafe.Pointer(str(129161)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _hasReadConflicts(tls, (*XBtree)(_pCsr.X0), _pCsr.X7) != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68807), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000))), unsafe.Pointer(str(129200)))
+ if _hasReadConflicts(tls, (*XBtree)(_pCsr.XpBtree), _pCsr.XpgnoRoot) != 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68807), unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000), unsafe.Pointer(str(129221)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((*(**XMemPage)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[20]unsafe.Pointer)(unsafe.Pointer(&(_pCsr.X19))))) + 4*uintptr(_pCsr.X14)))).X2) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(68808), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000))), unsafe.Pointer(str(129248)))
+ if ((*elem30((**XMemPage)(unsafe.Pointer(&_pCsr.XapPage)), uintptr(_pCsr.XiPage))).XintKey) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(68808), unsafe.Pointer(&_sqlite3BtreePutDataØ00__func__Ø000), unsafe.Pointer(str(129269)))
crt.X__builtin_abort(tls)
}
}()
- return _accessPayload(tls, _pCsr, _offset, _amt, (*uint8)(_z), i32(1))
+ return _accessPayload(tls, _pCsr, _offset, _amt, (*uint8)(_z), int32(1))
}
var _sqlite3BtreePutDataØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3BtreePutDataØ00__func__Ø000[0], str(129282), 20)
+ crt.Xstrncpy(nil, &_sqlite3BtreePutDataØ00__func__Ø000[0], str(129303), 20)
}
-// Return the maximum amount of memory that has ever been
-// checked out since either the beginning of this process
-// or since the most recent reset.
+// C comment
+// /*
+// ** Return the maximum amount of memory that has ever been
+// ** checked out since either the beginning of this process
+// ** or since the most recent reset.
+// */
func Xsqlite3_memory_highwater(tls *crt.TLS, _resetFlag int32) (r0 int64) {
var _res, _mx int64
- Xsqlite3_status64(tls, i32(0), &_res, &_mx, _resetFlag)
+ Xsqlite3_status64(tls, int32(0), &_res, &_mx, _resetFlag)
return _mx
-
- _ = _res
- panic(0)
}
-// Retrieve a pointer to a static mutex or allocate a new dynamic one.
+// C comment
+// /*
+// ** Retrieve a pointer to a static mutex or allocate a new dynamic one.
+// */
func Xsqlite3_mutex_alloc(tls *crt.TLS, _id int32) (r0 *Xsqlite3_mutex) {
- if (_id <= i32(1)) && Xsqlite3_initialize(tls) != 0 {
+ if (_id <= int32(1)) && Xsqlite3_initialize(tls) != 0 {
return nil
}
- if (_id > i32(1)) && _sqlite3MutexInit(tls) != 0 {
+ if (_id > int32(1)) && _sqlite3MutexInit(tls) != 0 {
return nil
}
func() {
- if (*(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X2)}))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(22836), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_mutex_allocØ00__func__Ø000))), unsafe.Pointer(str(2292)))
+ if (_sqlite3Config.Xmutex.XxMutexAlloc) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(22836), unsafe.Pointer(&_sqlite3_mutex_allocØ00__func__Ø000), unsafe.Pointer(str(2193)))
crt.X__builtin_abort(tls)
}
}()
- return (*(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&struct {
- f func(*crt.TLS, int32) unsafe.Pointer
- }{((*Xsqlite3_mutex_methods)(unsafe.Pointer(&(_sqlite3Config.X11))).X2)})))(tls, _id)
+ return func() func(*crt.TLS, int32) *Xsqlite3_mutex {
+ v := _sqlite3Config.Xmutex.XxMutexAlloc
+ return *(*func(*crt.TLS, int32) *Xsqlite3_mutex)(unsafe.Pointer(&v))
+ }()(tls, _id)
}
var _sqlite3_mutex_allocØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_mutex_allocØ00__func__Ø000[0], str(129302), 20)
+ crt.Xstrncpy(nil, &_sqlite3_mutex_allocØ00__func__Ø000[0], str(129323), 20)
}
func Xsqlite3_open_v2(tls *crt.TLS, _filename *int8, _ppDb **Xsqlite3, _flags int32, _zVfs *int8) (r0 int32) {
return _openDatabase(tls, _filename, _ppDb, uint32(_flags), _zVfs)
}
-// Sleep for a little while. Return the amount of time slept.
+// C comment
+// /*
+// ** Sleep for a little while. Return the amount of time slept.
+// */
func Xsqlite3_sleep(tls *crt.TLS, _ms int32) (r0 int32) {
var _rc int32
var _pVfs *Xsqlite3_vfs
_pVfs = Xsqlite3_vfs_find(tls, nil)
if _pVfs == nil {
- return i32(0)
+ return int32(0)
}
- _rc = _sqlite3OsSleep(tls, _pVfs, i32(1000)*_ms) / i32(1000)
+ _rc = _sqlite3OsSleep(tls, _pVfs, int32(1000)*_ms) / int32(1000)
return _rc
}
+// C comment
+// /*
+// ** CAPI3REF: Deprecated Soft Heap Limit Interface
+// ** DEPRECATED
+// **
+// ** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
+// ** interface. This routine is provided for historical compatibility
+// ** only. All new applications should use the
+// ** [sqlite3_soft_heap_limit64()] interface rather than this one.
+// */
func Xsqlite3_soft_heap_limit(tls *crt.TLS, _n int32) {
- if _n < i32(0) {
- _n = i32(0)
+ if _n < int32(0) {
+ _n = int32(0)
}
Xsqlite3_soft_heap_limit64(tls, int64(_n))
}
-// Register a VFS with the system. It is harmless to register the same
-// VFS multiple times. The new VFS becomes the default if makeDflt is
-// true.
+// C comment
+// /*
+// ** Register a VFS with the system. It is harmless to register the same
+// ** VFS multiple times. The new VFS becomes the default if makeDflt is
+// ** true.
+// */
func Xsqlite3_vfs_register(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _makeDflt int32) (r0 int32) {
var _rc int32
var _mutex *Xsqlite3_mutex
@@ -111195,36 +112826,39 @@ func Xsqlite3_vfs_register(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _makeDflt int32) (
return _rc
}
if _pVfs == nil {
- return _sqlite3MisuseError(tls, i32(20464))
+ return _sqlite3MisuseError(tls, int32(20464))
}
- _mutex = _sqlite3MutexAlloc(tls, i32(2))
+ _mutex = _sqlite3MutexAlloc(tls, int32(2))
Xsqlite3_mutex_enter(tls, _mutex)
_vfsUnlink(tls, _pVfs)
if _makeDflt != 0 || (_vfsList == nil) {
- *(**Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pVfs.X3))))) = _vfsList
+ *(**Xsqlite3_vfs)(unsafe.Pointer(&_pVfs.XpNext)) = _vfsList
_vfsList = _pVfs
bug20530(_vfsList)
goto _4
}
- *(**Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pVfs.X3))))) = (*Xsqlite3_vfs)(_vfsList.X3)
- *(**Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_vfsList.X3))))) = _pVfs
+ *(**Xsqlite3_vfs)(unsafe.Pointer(&_pVfs.XpNext)) = (*Xsqlite3_vfs)(_vfsList.XpNext)
+ *(**Xsqlite3_vfs)(unsafe.Pointer(&_vfsList.XpNext)) = _pVfs
_4:
func() {
if _vfsList == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(20477), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_vfs_registerØ00__func__Ø000))), unsafe.Pointer(str(129322)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(20477), unsafe.Pointer(&_sqlite3_vfs_registerØ00__func__Ø000), unsafe.Pointer(str(129343)))
crt.X__builtin_abort(tls)
}
}()
Xsqlite3_mutex_leave(tls, _mutex)
- return i32(0)
+ return int32(0)
}
-// Unlink a VFS from the linked list
+// C comment
+// /*
+// ** Unlink a VFS from the linked list
+// */
func _vfsUnlink(tls *crt.TLS, _pVfs *Xsqlite3_vfs) {
var _3_p *Xsqlite3_vfs
func() {
- if Xsqlite3_mutex_held(tls, _sqlite3MutexAlloc(tls, i32(2))) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(20436), unsafe.Pointer((*int8)(unsafe.Pointer(&_vfsUnlinkØ00__func__Ø000))), unsafe.Pointer(str(129330)))
+ if Xsqlite3_mutex_held(tls, _sqlite3MutexAlloc(tls, int32(2))) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(20436), unsafe.Pointer(&_vfsUnlinkØ00__func__Ø000), unsafe.Pointer(str(129351)))
crt.X__builtin_abort(tls)
}
}()
@@ -111232,7 +112866,7 @@ func _vfsUnlink(tls *crt.TLS, _pVfs *Xsqlite3_vfs) {
goto _6
}
if _vfsList == _pVfs {
- _vfsList = (*Xsqlite3_vfs)(_pVfs.X3)
+ _vfsList = (*Xsqlite3_vfs)(_pVfs.XpNext)
bug20530(_vfsList)
goto _6
}
@@ -111241,12 +112875,12 @@ func _vfsUnlink(tls *crt.TLS, _pVfs *Xsqlite3_vfs) {
}
_3_p = _vfsList
_7:
- if ((*Xsqlite3_vfs)(_3_p.X3) != nil) && ((*Xsqlite3_vfs)(_3_p.X3) != _pVfs) {
- _3_p = (*Xsqlite3_vfs)(_3_p.X3)
+ if (_3_p.XpNext != nil) && ((*Xsqlite3_vfs)(_3_p.XpNext) != _pVfs) {
+ _3_p = (*Xsqlite3_vfs)(_3_p.XpNext)
goto _7
}
- if (*Xsqlite3_vfs)(_3_p.X3) == _pVfs {
- *(**Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_3_p.X3))))) = (*Xsqlite3_vfs)(_pVfs.X3)
+ if (*Xsqlite3_vfs)(_3_p.XpNext) == _pVfs {
+ *(**Xsqlite3_vfs)(unsafe.Pointer(&_3_p.XpNext)) = (*Xsqlite3_vfs)(_pVfs.XpNext)
}
_6:
}
@@ -111254,49 +112888,57 @@ _6:
var _vfsUnlinkØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_vfsUnlinkØ00__func__Ø000[0], str(129396), 10)
+ crt.Xstrncpy(nil, &_vfsUnlinkØ00__func__Ø000[0], str(129417), 10)
}
var _sqlite3_vfs_registerØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_vfs_registerØ00__func__Ø000[0], str(129406), 21)
+ crt.Xstrncpy(nil, &_sqlite3_vfs_registerØ00__func__Ø000[0], str(129427), 21)
}
-// Unregister a VFS so that it is no longer accessible.
+// C comment
+// /*
+// ** Unregister a VFS so that it is no longer accessible.
+// */
func Xsqlite3_vfs_unregister(tls *crt.TLS, _pVfs *Xsqlite3_vfs) (r0 int32) {
var _mutex *Xsqlite3_mutex
- _mutex = _sqlite3MutexAlloc(tls, i32(2))
+ _mutex = _sqlite3MutexAlloc(tls, int32(2))
Xsqlite3_mutex_enter(tls, _mutex)
_vfsUnlink(tls, _pVfs)
Xsqlite3_mutex_leave(tls, _mutex)
- return i32(0)
+ return int32(0)
}
-// IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
-// zero if and only if SQLite was compiled with mutexing code omitted due to
-// the SQLITE_THREADSAFE compile-time option being set to 0.
+// C comment
+// /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
+// ** zero if and only if SQLite was compiled with mutexing code omitted due to
+// ** the SQLITE_THREADSAFE compile-time option being set to 0.
+// */
func Xsqlite3_threadsafe(tls *crt.TLS) (r0 int32) {
- return i32(1)
+ return int32(1)
}
func Xsqlite3_result_zeroblob(tls *crt.TLS, _pCtx *Xsqlite3_context, _n int32) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76541), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_zeroblobØ00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76541), unsafe.Pointer(&_sqlite3_result_zeroblobØ00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
- _sqlite3VdbeMemSetZeroBlob(tls, (*XMem)(_pCtx.X0), _n)
+ _sqlite3VdbeMemSetZeroBlob(tls, (*XMem)(_pCtx.XpOut), _n)
}
var _sqlite3_result_zeroblobØ00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_zeroblobØ00__func__Ø000[0], str(129427), 24)
+ crt.Xstrncpy(nil, &_sqlite3_result_zeroblobØ00__func__Ø000[0], str(129448), 24)
}
-// Interface to the testing logic.
+// C comment
+// /*
+// ** Interface to the testing logic.
+// */
func Xsqlite3_test_control(tls *crt.TLS, _op int32, args ...interface{}) (r0 int32) {
var _rc, _5_sz, _10_x, _11_x, _13_x, _15_n, _16_sz int32
var _9_newVal uint32
@@ -111307,50 +112949,50 @@ func Xsqlite3_test_control(tls *crt.TLS, _op int32, args ...interface{}) (r0 int
var _ap []interface{}
var _7_xBenignBegin, _7_xBenignEnd func(*crt.TLS)
var _13_db, _14_db, _21_db, _23_db *Xsqlite3
- _rc = i32(0)
+ _rc = int32(0)
_ap = args
switch _op {
- case i32(5):
+ case int32(5):
goto _1
- case i32(6):
+ case int32(6):
goto _2
- case i32(7):
+ case int32(7):
goto _3
- case i32(8):
+ case int32(8):
goto _4
- case i32(9):
+ case int32(9):
goto _5
- case i32(10):
+ case int32(10):
goto _6
- case i32(11):
+ case int32(11):
goto _7
- case i32(12):
+ case int32(12):
goto _8
- case i32(13):
+ case int32(13):
goto _9
- case i32(14):
+ case int32(14):
goto _11
- case i32(15):
+ case int32(15):
goto _12
- case i32(16):
+ case int32(16):
goto _13
- case i32(17):
+ case int32(17):
goto _14
- case i32(18):
+ case int32(18):
goto _15
- case i32(19):
+ case int32(19):
goto _17
- case i32(20):
+ case int32(20):
goto _16
- case i32(21):
+ case int32(21):
goto _18
- case i32(22):
+ case int32(22):
goto _10
- case i32(23):
+ case int32(23):
goto _20
- case i32(24):
+ case int32(24):
goto _19
- case i32(25):
+ case int32(25):
goto _21
default:
goto _22
@@ -111363,7 +113005,7 @@ _2:
_sqlite3PrngRestoreState(tls)
goto _22
_3:
- Xsqlite3_randomness(tls, i32(0), nil)
+ Xsqlite3_randomness(tls, int32(0), nil)
goto _22
_4:
_5_sz = crt.VAInt32(&_ap)
@@ -111371,8 +113013,8 @@ _4:
_rc = _sqlite3BitvecBuiltinTest(tls, _5_sz, _5_aProg)
goto _22
_5:
- *(*func(*crt.TLS, int32) int32)(unsafe.Pointer(&(_sqlite3Config.X37))) = crt.VAOther(&_ap).(func(*crt.TLS, int32) int32)
- _rc = _sqlite3FaultSim(tls, i32(0))
+ _sqlite3Config.XxTestCallback = crt.VAOther(&_ap).(func(*crt.TLS, int32) int32)
+ _rc = _sqlite3FaultSim(tls, int32(0))
goto _22
_6:
_7_xBenignBegin = crt.VAOther(&_ap).(func(*crt.TLS))
@@ -111388,10 +113030,10 @@ _7:
}
goto _22
_8:
- _10_x = i32(0)
+ _10_x = int32(0)
func() {
- if store1(&_10_x, crt.VAInt32(&_ap)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(144147), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_test_controlØ00__func__Ø000))), unsafe.Pointer(str(129451)))
+ if store2(&_10_x, crt.VAInt32(&_ap)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(144147), unsafe.Pointer(&_sqlite3_test_controlØ00__func__Ø000), unsafe.Pointer(str(129472)))
crt.X__builtin_abort(tls)
}
}()
@@ -111401,37 +113043,37 @@ _9:
_11_x = crt.VAInt32(&_ap)
_rc = func() int32 {
if _11_x != 0 {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(144182), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_test_controlØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(144182), unsafe.Pointer(&_sqlite3_test_controlØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}()
goto _22
_10:
- _rc = i32(123410)
+ _rc = int32(123410)
goto _22
_11:
_13_db = (*Xsqlite3)(crt.VAPointer(&_ap))
_13_x = crt.VAInt32(&_ap)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_13_db.X3))
- _sqlite3BtreeSetPageSize(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_13_db.X4)+16*uintptr(i32(0)))).X1), i32(0), _13_x, i32(0))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_13_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_13_db.Xmutex))
+ _sqlite3BtreeSetPageSize(tls, (*XBtree)(elem27((*XDb)(_13_db.XaDb), 0).XpBt), int32(0), _13_x, int32(0))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_13_db.Xmutex))
goto _22
_12:
_14_db = (*Xsqlite3)(crt.VAPointer(&_ap))
- *(*uint16)(unsafe.Pointer(&(_14_db.X13))) = uint16(crt.VAInt32(&_ap) & i32(65535))
+ _14_db.XdbOptFlags = uint16(crt.VAInt32(&_ap) & int32(65535))
goto _22
_13:
_15_zWord = (*int8)(crt.VAPointer(&_ap))
_15_n = _sqlite3Strlen30(tls, _15_zWord)
_rc = func() int32 {
- if _sqlite3KeywordCode(tls, (*uint8)(unsafe.Pointer(_15_zWord)), _15_n) != i32(27) {
- return i32(124)
+ if _sqlite3KeywordCode(tls, (*uint8)(unsafe.Pointer(_15_zWord)), _15_n) != int32(27) {
+ return int32(124)
}
- return i32(0)
+ return int32(0)
}()
goto _22
_14:
@@ -111444,35 +113086,35 @@ _14:
_sqlite3ScratchFree(tls, _16_pFree)
goto _22
_15:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X38))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XbLocaltimeFault = crt.VAInt32(&_ap)
goto _22
_16:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X6))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XneverCorrupt = crt.VAInt32(&_ap)
goto _22
_17:
- *(*int32)(unsafe.Pointer(&(_sqlite3Config.X39))) = crt.VAInt32(&_ap)
+ _sqlite3Config.XiOnceResetThreshold = crt.VAInt32(&_ap)
goto _22
_18:
goto _22
_19:
_21_db = (*Xsqlite3)(crt.VAPointer(&_ap))
- *(*int32)(unsafe.Pointer(&(_21_db.X32))) = crt.VAInt32(&_ap)
+ _21_db.XnMaxSorterMmap = crt.VAInt32(&_ap)
goto _22
_20:
- if (_sqlite3Config.X28) == i32(0) {
- _rc = i32(1)
+ if _sqlite3Config.XisInit == int32(0) {
+ _rc = int32(1)
}
goto _22
_21:
_23_db = (*Xsqlite3)(crt.VAPointer(&_ap))
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_23_db.X3))
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_23_db.X33))).X1))) = uint8(_sqlite3FindDbName(tls, _23_db, (*int8)(crt.VAPointer(&_ap))))
- *(*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_23_db.X33))).X2))) = store2((*uint8)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_23_db.X33))).X4))), uint8(crt.VAInt32(&_ap)))
- *(*int32)(unsafe.Pointer(&((*t21)(unsafe.Pointer(&(_23_db.X33))).X0))) = crt.VAInt32(&_ap)
- if (int32((*t21)(unsafe.Pointer(&(_23_db.X33))).X2) == i32(0)) && (((*t21)(unsafe.Pointer(&(_23_db.X33))).X0) > i32(0)) {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_23_db.Xmutex))
+ _23_db.Xinit.XiDb = uint8(_sqlite3FindDbName(tls, _23_db, (*int8)(crt.VAPointer(&_ap))))
+ _23_db.Xinit.Xbusy = store3(&(_23_db.Xinit.XimposterTable), uint8(crt.VAInt32(&_ap)))
+ _23_db.Xinit.XnewTnum = crt.VAInt32(&_ap)
+ if (int32(_23_db.Xinit.Xbusy) == int32(0)) && ((_23_db.Xinit.XnewTnum) > int32(0)) {
_sqlite3ResetAllSchemasOfConnection(tls, _23_db)
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_23_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_23_db.Xmutex))
goto _22
_22:
_ap = nil
@@ -111480,43 +113122,56 @@ _22:
}
func _sqlite3PrngSaveState(tls *crt.TLS) {
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_sqlite3SavedPrng), (unsafe.Pointer)(&_sqlite3Prng), u32(259))
-}
-
+ crt.Xmemcpy(tls, unsafe.Pointer(&_sqlite3SavedPrng), unsafe.Pointer(&_sqlite3Prng), uint32(259))
+}
+
+// C comment
+// /*
+// ** For testing purposes, we sometimes want to preserve the state of
+// ** PRNG and restore the PRNG to its saved state at a later time, or
+// ** to reset the PRNG to its initial state. These routines accomplish
+// ** those tasks.
+// **
+// ** The sqlite3_test_control() interface calls these routines to
+// ** control the PRNG.
+// */
var _sqlite3SavedPrng Tsqlite3PrngType
func _sqlite3PrngRestoreState(tls *crt.TLS) {
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_sqlite3Prng), (unsafe.Pointer)(&_sqlite3SavedPrng), u32(259))
-}
-
-// This routine runs an extensive test of the Bitvec code.
-//
-// The input is an array of integers that acts as a program
-// to test the Bitvec. The integers are opcodes followed
-// by 0, 1, or 3 operands, depending on the opcode. Another
-// opcode follows immediately after the last operand.
-//
-// There are 6 opcodes numbered from 0 through 5. 0 is the
-// "halt" opcode and causes the test to end.
-//
-// 0 Halt and return the number of errors
-// 1 N S X Set N bits beginning with S and incrementing by X
-// 2 N S X Clear N bits beginning with S and incrementing by X
-// 3 N Set N randomly chosen bits
-// 4 N Clear N randomly chosen bits
-// 5 N S X Set N bits from S increment X in array only, not in bitvec
-//
-// The opcodes 1 through 4 perform set and clear operations are performed
-// on both a Bitvec object and on a linear array of bits obtained from malloc.
-// Opcode 5 works on the linear array only, not on the Bitvec.
-// Opcode 5 is used to deliberately induce a fault in order to
-// confirm that error detection works.
-//
-// At the conclusion of the test the linear array is compared
-// against the Bitvec object. If there are any differences,
-// an error is returned. If they are the same, zero is returned.
-//
-// If a memory allocation error occurs, return -1.
+ crt.Xmemcpy(tls, unsafe.Pointer(&_sqlite3Prng), unsafe.Pointer(&_sqlite3SavedPrng), uint32(259))
+}
+
+// C comment
+// /*
+// ** This routine runs an extensive test of the Bitvec code.
+// **
+// ** The input is an array of integers that acts as a program
+// ** to test the Bitvec. The integers are opcodes followed
+// ** by 0, 1, or 3 operands, depending on the opcode. Another
+// ** opcode follows immediately after the last operand.
+// **
+// ** There are 6 opcodes numbered from 0 through 5. 0 is the
+// ** "halt" opcode and causes the test to end.
+// **
+// ** 0 Halt and return the number of errors
+// ** 1 N S X Set N bits beginning with S and incrementing by X
+// ** 2 N S X Clear N bits beginning with S and incrementing by X
+// ** 3 N Set N randomly chosen bits
+// ** 4 N Clear N randomly chosen bits
+// ** 5 N S X Set N bits from S increment X in array only, not in bitvec
+// **
+// ** The opcodes 1 through 4 perform set and clear operations are performed
+// ** on both a Bitvec object and on a linear array of bits obtained from malloc.
+// ** Opcode 5 works on the linear array only, not on the Bitvec.
+// ** Opcode 5 is used to deliberately induce a fault in order to
+// ** confirm that error detection works.
+// **
+// ** At the conclusion of the test the linear array is compared
+// ** against the Bitvec object. If there are any differences,
+// ** an error is returned. If they are the same, zero is returned.
+// **
+// ** If a memory allocation error occurs, return -1.
+// */
func _sqlite3BitvecBuiltinTest(tls *crt.TLS, _sz int32, _aOp *int32) (r0 int32) {
var _rc, _i, _nx, _pc, _op int32
var _pTmpSpace unsafe.Pointer
@@ -111524,91 +113179,81 @@ func _sqlite3BitvecBuiltinTest(tls *crt.TLS, _sz int32, _aOp *int32) (r0 int32)
var _pBitvec *XBitvec
_pBitvec = nil
_pV = nil
- _rc = i32(-1)
+ _rc = int32(-1)
_pBitvec = _sqlite3BitvecCreate(tls, uint32(_sz))
- _pV = (*uint8)(_sqlite3MallocZero(tls, uint64(((_sz+i32(7))/i32(8))+i32(1))))
- _pTmpSpace = Xsqlite3_malloc64(tls, uint64(i32(512)))
+ _pV = (*uint8)(_sqlite3MallocZero(tls, uint64(((_sz+int32(7))/int32(8))+int32(1))))
+ _pTmpSpace = Xsqlite3_malloc64(tls, uint64(512))
if ((_pBitvec == nil) || (_pV == nil)) || (_pTmpSpace == nil) {
goto _bitvec_end
}
- _sqlite3BitvecSet(tls, nil, uint32(i32(1)))
- _sqlite3BitvecClear(tls, nil, uint32(i32(1)), _pTmpSpace)
- _pc = i32(0)
+ _sqlite3BitvecSet(tls, nil, uint32(1))
+ _sqlite3BitvecClear(tls, nil, uint32(1), _pTmpSpace)
+ _pc = int32(0)
_3:
- if store1(&_op, *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 4*uintptr(_pc)))) == i32(0) {
+ if store2(&_op, *elem8(_aOp, uintptr(_pc))) == int32(0) {
goto _4
}
switch _op {
- case i32(1):
+ case int32(1):
goto _6
- case i32(2):
+ case int32(2):
goto _6
- case i32(3):
+ case int32(3):
goto _9
- case i32(4):
+ case int32(4):
goto _9
- case i32(5):
+ case int32(5):
goto _6
default:
goto _9
}
_6:
- _nx = i32(4)
- _i = (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 4*uintptr(_pc+i32(2))))) - i32(1)
- {
- p := (*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 4*uintptr(_pc+i32(2))))
- *p = (*p) + (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp)) + 4*uintptr(_pc+i32(3)))))
- sink1(*p)
- }
+ _nx = int32(4)
+ _i = (*elem8(_aOp, uintptr(_pc+int32(2)))) - int32(1)
+ *elem8(_aOp, uintptr(_pc+int32(2))) += *elem8(_aOp, uintptr(_pc+int32(3)))
goto _12
_9:
- _nx = i32(2)
- Xsqlite3_randomness(tls, int32(u32(4)), (unsafe.Pointer)(&_i))
+ _nx = int32(2)
+ Xsqlite3_randomness(tls, int32(4), unsafe.Pointer(&_i))
goto _12
_12:
- if preInc1((*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aOp))+4*uintptr(_pc+i32(1)))), -1) > i32(0) {
- _nx = i32(0)
+ if preInc2(elem8(_aOp, uintptr(_pc+int32(1))), -1) > int32(0) {
+ _nx = int32(0)
}
- {
- p := &_pc
- *p = (*p) + _nx
- sink1(*p)
- }
- _i = (_i & i32(2147483647)) % _sz
- if (_op & i32(1)) == i32(0) {
+ _pc += _nx
+ _i = (_i & int32(2147483647)) % _sz
+ if (_op & int32(1)) == int32(0) {
goto _14
}
{
- p := (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pV)) + 1*uintptr((_i+i32(1))>>uint(i32(3)))))
- *p = uint8(int32(*p) | (i32(1) << uint((_i+i32(1))&i32(7))))
- sink2(*p)
+ p := elem15(_pV, uintptr((_i+int32(1))>>3))
+ *p = uint8(int32(*p) | (int32(1) << uint((_i+int32(1))&int32(7))))
}
- if _op == i32(5) {
+ if _op == int32(5) {
goto _15
}
- if _sqlite3BitvecSet(tls, _pBitvec, uint32(_i+i32(1))) != 0 {
+ if _sqlite3BitvecSet(tls, _pBitvec, uint32(_i+int32(1))) != 0 {
goto _bitvec_end
}
_15:
goto _17
_14:
{
- p := (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pV)) + 1*uintptr((_i+i32(1))>>uint(i32(3)))))
- *p = uint8(int32(*p) & (^(i32(1) << uint((_i+i32(1))&i32(7)))))
- sink2(*p)
+ p := elem15(_pV, uintptr((_i+int32(1))>>3))
+ *p = uint8(int32(*p) & (^(int32(1) << uint((_i+int32(1))&int32(7)))))
}
- _sqlite3BitvecClear(tls, _pBitvec, uint32(_i+i32(1)), _pTmpSpace)
+ _sqlite3BitvecClear(tls, _pBitvec, uint32(_i+int32(1)), _pTmpSpace)
_17:
goto _3
_4:
- _rc = int32(uint32((_sqlite3BitvecTest(tls, nil, uint32(i32(0)))+_sqlite3BitvecTest(tls, _pBitvec, uint32(_sz+i32(1))))+_sqlite3BitvecTest(tls, _pBitvec, uint32(i32(0)))) + (_sqlite3BitvecSize(tls, _pBitvec) - uint32(_sz)))
- _i = i32(1)
+ _rc = int32(uint32((_sqlite3BitvecTest(tls, nil, 0)+_sqlite3BitvecTest(tls, _pBitvec, uint32(_sz+int32(1))))+_sqlite3BitvecTest(tls, _pBitvec, 0)) + (_sqlite3BitvecSize(tls, _pBitvec) - uint32(_sz)))
+ _i = int32(1)
_18:
if _i > _sz {
goto _bitvec_end
}
- if bool2int((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pV)) + 1*uintptr(_i>>uint(i32(3))))))&(i32(1)<<uint(_i&i32(7)))) != i32(0)) != _sqlite3BitvecTest(tls, _pBitvec, uint32(_i)) {
+ if bool2int((int32(*elem15(_pV, uintptr(_i>>3)))&(int32(1)<<uint(_i&int32(7)))) != int32(0)) != _sqlite3BitvecTest(tls, _pBitvec, uint32(_i)) {
_rc = _i
goto _bitvec_end
}
@@ -111616,230 +113261,244 @@ _18:
goto _18
_bitvec_end:
Xsqlite3_free(tls, _pTmpSpace)
- Xsqlite3_free(tls, (unsafe.Pointer)(_pV))
+ Xsqlite3_free(tls, unsafe.Pointer(_pV))
_sqlite3BitvecDestroy(tls, _pBitvec)
return _rc
}
-// Register hooks to call when sqlite3BeginBenignMalloc() and
-// sqlite3EndBenignMalloc() are called, respectively.
+// C comment
+// /*
+// ** Register hooks to call when sqlite3BeginBenignMalloc() and
+// ** sqlite3EndBenignMalloc() are called, respectively.
+// */
func _sqlite3BenignMallocHooks(tls *crt.TLS, _xBenignBegin func(*crt.TLS), _xBenignEnd func(*crt.TLS)) {
- *(*func(*crt.TLS))(unsafe.Pointer(&(_sqlite3Hooks.X0))) = _xBenignBegin
- *(*func(*crt.TLS))(unsafe.Pointer(&(_sqlite3Hooks.X1))) = _xBenignEnd
+ _sqlite3Hooks.XxBenignBegin = _xBenignBegin
+ _sqlite3Hooks.XxBenignEnd = _xBenignEnd
}
var _sqlite3_test_controlØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_test_controlØ00__func__Ø000[0], str(129475), 21)
+ crt.Xstrncpy(nil, &_sqlite3_test_controlØ00__func__Ø000[0], str(129496), 21)
}
-// Enable or disable the extended result codes.
+// C comment
+// /*
+// ** Enable or disable the extended result codes.
+// */
func Xsqlite3_extended_result_codes(tls *crt.TLS, _db *Xsqlite3, _onoff int32) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(143970))
+ return _sqlite3MisuseError(tls, int32(143970))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- *(*int32)(unsafe.Pointer(&(_db.X11))) = int32(func() uint32 {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _db.XerrMask = int32(func() uint32 {
if _onoff != 0 {
- return u32(4294967295)
+ return uint32(4294967295)
}
- return uint32(i32(255))
+ return uint32(255)
}())
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return i32(0)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return int32(0)
}
-// Return a pointer to the next prepared statement after pStmt associated
-// with database connection pDb. If pStmt is NULL, return the first
-// prepared statement for the database connection. Return NULL if there
-// are no more.
+// C comment
+// /*
+// ** Return a pointer to the next prepared statement after pStmt associated
+// ** with database connection pDb. If pStmt is NULL, return the first
+// ** prepared statement for the database connection. Return NULL if there
+// ** are no more.
+// */
func Xsqlite3_next_stmt(tls *crt.TLS, _pDb *Xsqlite3, _pStmt unsafe.Pointer) (r0 unsafe.Pointer) {
var _pNext unsafe.Pointer
if _sqlite3SafetyCheckOk(tls, _pDb) == 0 {
- _sqlite3MisuseError(tls, i32(77684))
+ _sqlite3MisuseError(tls, int32(77684))
return nil
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pDb.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pDb.Xmutex))
if _pStmt == nil {
- _pNext = _pDb.X1
+ _pNext = _pDb.XpVdbe
goto _2
}
- _pNext = (*TVdbe)(_pStmt).X2
+ _pNext = (*TVdbe)(_pStmt).XpNext
_2:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pDb.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pDb.Xmutex))
return _pNext
}
+// C comment
+// /*
+// ** CAPI3REF: SQLite Runtime Status
+// **
+// ** ^These interfaces are used to retrieve runtime status information
+// ** about the performance of SQLite, and optionally to reset various
+// ** highwater marks. ^The first argument is an integer code for
+// ** the specific parameter to measure. ^(Recognized integer codes
+// ** are of the form [status parameters | SQLITE_STATUS_...].)^
+// ** ^The current value of the parameter is returned into *pCurrent.
+// ** ^The highest recorded value is returned in *pHighwater. ^If the
+// ** resetFlag is true, then the highest record value is reset after
+// ** *pHighwater is written. ^(Some parameters do not record the highest
+// ** value. For those parameters
+// ** nothing is written into *pHighwater and the resetFlag is ignored.)^
+// ** ^(Other parameters record only the highwater mark and not the current
+// ** value. For these latter parameters nothing is written into *pCurrent.)^
+// **
+// ** ^The sqlite3_status() and sqlite3_status64() routines return
+// ** SQLITE_OK on success and a non-zero [error code] on failure.
+// **
+// ** If either the current value or the highwater mark is too large to
+// ** be represented by a 32-bit integer, then the values returned by
+// ** sqlite3_status() are undefined.
+// **
+// ** See also: [sqlite3_db_status()]
+// */
func Xsqlite3_status(tls *crt.TLS, _op int32, _pCurrent *int32, _pHighwater *int32, _resetFlag int32) (r0 int32) {
var _rc int32
var _iCur, _iHwtr int64
- _iCur = i64(0)
- _iHwtr = i64(0)
+ _iCur = int64(0)
+ _iHwtr = int64(0)
if (_pCurrent == nil) || (_pHighwater == nil) {
- return _sqlite3MisuseError(tls, i32(18636))
+ return _sqlite3MisuseError(tls, int32(18636))
}
_rc = Xsqlite3_status64(tls, _op, &_iCur, &_iHwtr, _resetFlag)
- if _rc == i32(0) {
+ if _rc == int32(0) {
*_pCurrent = int32(_iCur)
*_pHighwater = int32(_iHwtr)
}
return _rc
}
-// Create an sqlite3_backup process to copy the contents of zSrcDb from
-// connection handle pSrcDb to zDestDb in pDestDb. If successful, return
-// a pointer to the new sqlite3_backup object.
-//
-// If an error occurs, NULL is returned and an error code and error message
-// stored in database handle pDestDb.
+// C comment
+// /*
+// ** Create an sqlite3_backup process to copy the contents of zSrcDb from
+// ** connection handle pSrcDb to zDestDb in pDestDb. If successful, return
+// ** a pointer to the new sqlite3_backup object.
+// **
+// ** If an error occurs, NULL is returned and an error code and error message
+// ** stored in database handle pDestDb.
+// */
func Xsqlite3_backup_init(tls *crt.TLS, _pDestDb *Xsqlite3, _zDestDb *int8, _pSrcDb *Xsqlite3, _zSrcDb *int8) (r0 *Xsqlite3_backup) {
var _p *Xsqlite3_backup
if (_sqlite3SafetyCheckOk(tls, _pSrcDb) == 0) || (_sqlite3SafetyCheckOk(tls, _pDestDb) == 0) {
- _sqlite3MisuseError(tls, i32(69049))
+ _sqlite3MisuseError(tls, int32(69049))
return nil
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pSrcDb.X3))
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pDestDb.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pSrcDb.Xmutex))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pDestDb.Xmutex))
if _pSrcDb == _pDestDb {
- _sqlite3ErrorWithMsg(tls, _pDestDb, i32(1), str(129496))
+ _sqlite3ErrorWithMsg(tls, _pDestDb, int32(1), str(129517))
_p = nil
goto _3
}
- _p = (*Xsqlite3_backup)(_sqlite3MallocZero(tls, uint64(u32(48))))
+ _p = (*Xsqlite3_backup)(_sqlite3MallocZero(tls, uint64(48)))
if _p == nil {
- _sqlite3Error(tls, _pDestDb, _sqlite3NomemError(tls, i32(69077)))
+ _sqlite3Error(tls, _pDestDb, _sqlite3NomemError(tls, int32(69077)))
}
_3:
if _p == nil {
goto _5
}
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X6))))) = _findBtree(tls, _pDestDb, _pSrcDb, _zSrcDb)
- *(**XBtree)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = _findBtree(tls, _pDestDb, _pDestDb, _zDestDb)
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _pDestDb
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X5))))) = _pSrcDb
- *(*uint32)(unsafe.Pointer(&(_p.X4))) = uint32(i32(1))
- *(*int32)(unsafe.Pointer(&(_p.X10))) = i32(0)
- if ((nil == (*XBtree)(_p.X6)) || (nil == (*XBtree)(_p.X1))) || (_checkReadTransaction(tls, _pDestDb, (*XBtree)(_p.X1)) != i32(0)) {
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ *(**XBtree)(unsafe.Pointer(&_p.XpSrc)) = _findBtree(tls, _pDestDb, _pSrcDb, _zSrcDb)
+ *(**XBtree)(unsafe.Pointer(&_p.XpDest)) = _findBtree(tls, _pDestDb, _pDestDb, _zDestDb)
+ *(**Xsqlite3)(unsafe.Pointer(&_p.XpDestDb)) = _pDestDb
+ *(**Xsqlite3)(unsafe.Pointer(&_p.XpSrcDb)) = _pSrcDb
+ _p.XiNext = uint32(1)
+ _p.XisAttached = int32(0)
+ if ((nil == (*XBtree)(_p.XpSrc)) || (nil == (*XBtree)(_p.XpDest))) || (_checkReadTransaction(tls, _pDestDb, (*XBtree)(_p.XpDest)) != int32(0)) {
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
_p = nil
}
_5:
if _p != nil {
- *(*int32)(unsafe.Pointer(&((*XBtree)(_p.X6).X7))) += 1
+ (*XBtree)(_p.XpSrc).XnBackup += 1
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pDestDb.X3))
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pSrcDb.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pDestDb.Xmutex))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pSrcDb.Xmutex))
return _p
}
-// Return a pointer corresponding to database zDb (i.e. "main", "temp")
-// in connection handle pDb. If such a database cannot be found, return
-// a NULL pointer and write an error message to pErrorDb.
-//
-// If the "temp" database is requested, it may need to be opened by this
-// function. If an error occurs while doing so, return 0 and write an
-// error message to pErrorDb.
+// C comment
+// /*
+// ** Return a pointer corresponding to database zDb (i.e. "main", "temp")
+// ** in connection handle pDb. If such a database cannot be found, return
+// ** a NULL pointer and write an error message to pErrorDb.
+// **
+// ** If the "temp" database is requested, it may need to be opened by this
+// ** function. If an error occurs while doing so, return 0 and write an
+// ** error message to pErrorDb.
+// */
func _findBtree(tls *crt.TLS, _pErrorDb *Xsqlite3, _pDb *Xsqlite3, _zDb *int8) (r0 *XBtree) {
var _i, _1_rc int32
var _1_sParse XParse
_i = _sqlite3FindDbName(tls, _pDb, _zDb)
- if _i != i32(1) {
+ if _i != int32(1) {
goto _0
}
- _1_rc = i32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_1_sParse), i32(0), u32(484))
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_sParse.X0))))) = _pDb
+ _1_rc = int32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_1_sParse), int32(0), uint32(484))
+ *(**Xsqlite3)(unsafe.Pointer(&_1_sParse.Xdb)) = _pDb
if _sqlite3OpenTempDatabase(tls, &_1_sParse) != 0 {
- _sqlite3ErrorWithMsg(tls, _pErrorDb, _1_sParse.X3, str(24576), unsafe.Pointer(_1_sParse.X1))
- _1_rc = i32(1)
+ _sqlite3ErrorWithMsg(tls, _pErrorDb, _1_sParse.Xrc, str(24531), unsafe.Pointer(_1_sParse.XzErrMsg))
+ _1_rc = int32(1)
}
- _sqlite3DbFree(tls, _pErrorDb, (unsafe.Pointer)(_1_sParse.X1))
+ _sqlite3DbFree(tls, _pErrorDb, unsafe.Pointer(_1_sParse.XzErrMsg))
_sqlite3ParserReset(tls, &_1_sParse)
if _1_rc != 0 {
return nil
}
_0:
- if _i < i32(0) {
- _sqlite3ErrorWithMsg(tls, _pErrorDb, i32(1), str(129536), unsafe.Pointer(_zDb))
+ if _i < int32(0) {
+ _sqlite3ErrorWithMsg(tls, _pErrorDb, int32(1), str(129557), unsafe.Pointer(_zDb))
return nil
}
- return (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_pDb.X4) + 16*uintptr(_i))).X1)
-
- _ = _1_sParse
- panic(0)
+ return (*XBtree)(elem27((*XDb)(_pDb.XaDb), uintptr(_i)).XpBt)
}
-// Check that there is no open read-transaction on the b-tree passed as the
-// second argument. If there is not, return SQLITE_OK. Otherwise, if there
-// is an open read-transaction, return SQLITE_ERROR and leave an error
-// message in database handle db.
+// C comment
+// /*
+// ** Check that there is no open read-transaction on the b-tree passed as the
+// ** second argument. If there is not, return SQLITE_OK. Otherwise, if there
+// ** is an open read-transaction, return SQLITE_ERROR and leave an error
+// ** message in database handle db.
+// */
func _checkReadTransaction(tls *crt.TLS, _db *Xsqlite3, _p *XBtree) (r0 int32) {
if _sqlite3BtreeIsInReadTrans(tls, _p) != 0 {
- _sqlite3ErrorWithMsg(tls, _db, i32(1), str(129556))
- return i32(1)
+ _sqlite3ErrorWithMsg(tls, _db, int32(1), str(129577))
+ return int32(1)
}
- return i32(0)
+ return int32(0)
}
-// Return the total number of pages in the source database as of the most
-// recent call to sqlite3_backup_step().
+// C comment
+// /*
+// ** Return the total number of pages in the source database as of the most
+// ** recent call to sqlite3_backup_step().
+// */
func Xsqlite3_backup_pagecount(tls *crt.TLS, _p *Xsqlite3_backup) (r0 int32) {
if _p == nil {
- _sqlite3MisuseError(tls, i32(69569))
- return i32(0)
+ _sqlite3MisuseError(tls, int32(69569))
+ return int32(0)
}
- return int32(_p.X9)
+ return int32(_p.XnPagecount)
}
-// Return the number of pages still to be backed up as of the most recent
-// call to sqlite3_backup_step().
+// C comment
+// /*
+// ** Return the number of pages still to be backed up as of the most recent
+// ** call to sqlite3_backup_step().
+// */
func Xsqlite3_backup_remaining(tls *crt.TLS, _p *Xsqlite3_backup) (r0 int32) {
if _p == nil {
- _sqlite3MisuseError(tls, i32(69555))
- return i32(0)
- }
- return int32(_p.X8)
-}
-
-// Given the name of a compile-time option, return true if that option
-// was used and false if not.
-//
-// The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
-// is not required for a match.
-func Xsqlite3_compileoption_used(tls *crt.TLS, _zOptName *int8) (r0 int32) {
- var _i, _n int32
- if _zOptName == nil {
- _sqlite3MisuseError(tls, i32(17883))
- return i32(0)
- }
- if Xsqlite3_strnicmp(tls, _zOptName, str(129587), i32(7)) == i32(0) {
- {
- p := &_zOptName
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(7))))
- sink0(*p)
- }
+ _sqlite3MisuseError(tls, int32(69555))
+ return int32(0)
}
- _n = _sqlite3Strlen30(tls, _zOptName)
- _i = i32(0)
-_2:
- if _i >= i32(6) {
- goto _5
- }
- if (Xsqlite3_strnicmp(tls, _zOptName, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azCompileOpt)) + 4*uintptr(_i))), _n) == i32(0)) && (_sqlite3IsIdChar(tls, uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azCompileOpt)) + 4*uintptr(_i))))) + 1*uintptr(_n))))) == i32(0)) {
- return i32(1)
- }
- _i += 1
- goto _2
-_5:
- return i32(0)
-}
-
-func _sqlite3IsIdChar(tls *crt.TLS, _c uint8) (r0 int32) {
- return bool2int((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(_c)))) & i32(70)) != i32(0))
+ return int32(_p.XnRemaining)
}
-// Configuration settings for an individual database connection
+// C comment
+// /*
+// ** Configuration settings for an individual database connection
+// */
func Xsqlite3_db_config(tls *crt.TLS, _db *Xsqlite3, _op int32, args ...interface{}) (r0 int32) {
var _rc, _3_sz, _3_cnt, _6_onoff, _6_oldFlags int32
var _4_i uint32
@@ -111848,17 +113507,17 @@ func Xsqlite3_db_config(tls *crt.TLS, _db *Xsqlite3, _op int32, args ...interfac
var _ap []interface{}
_ap = args
switch _op {
- case i32(1000):
+ case int32(1000):
goto _1
- case i32(1001):
+ case int32(1001):
goto _2
default:
goto _3
}
_1:
- *(**int8)(unsafe.Pointer(&((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(i32(0)))).X0))) = (*int8)(crt.VAPointer(&_ap))
- _rc = i32(0)
+ elem27((*XDb)(_db.XaDb), 0).XzDbSName = (*int8)(crt.VAPointer(&_ap))
+ _rc = int32(0)
goto _4
_2:
_3_pBuf = crt.VAPointer(&_ap)
@@ -111867,41 +113526,39 @@ _2:
_rc = _setupLookaside(tls, _db, _3_pBuf, _3_sz, _3_cnt)
goto _4
_3:
- _rc = i32(1)
- _4_i = uint32(i32(0))
+ _rc = int32(1)
+ _4_i = 0
_5:
- if _4_i >= uint32(i32(5)) {
+ if _4_i >= uint32(5) {
goto _8
}
- if ((*t80)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3_db_configØ00aFlagOpØ001)) + 8*uintptr(_4_i))).X0) != _op {
+ if (elem131((*t132)(unsafe.Pointer(&_sqlite3_db_configØ00aFlagOpØ001)), uintptr(_4_i)).Xop) != _op {
goto _9
}
_6_onoff = crt.VAInt32(&_ap)
_6_pRes = (*int32)(crt.VAPointer(&_ap))
- _6_oldFlags = _db.X6
- if _6_onoff > i32(0) {
+ _6_oldFlags = _db.Xflags
+ if _6_onoff > int32(0) {
{
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = int32(uint32(*p) | ((*t80)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3_db_configØ00aFlagOpØ001)) + 8*uintptr(_4_i))).X1))
- sink1(*p)
+ p := &_db.Xflags
+ *p = int32(uint32(*p) | (elem131((*t132)(unsafe.Pointer(&_sqlite3_db_configØ00aFlagOpØ001)), uintptr(_4_i)).Xmask))
}
goto _12
}
- if _6_onoff == i32(0) {
+ if _6_onoff == int32(0) {
{
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = int32(uint32(*p) & (^((*t80)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3_db_configØ00aFlagOpØ001)) + 8*uintptr(_4_i))).X1)))
- sink1(*p)
+ p := &_db.Xflags
+ *p = int32(uint32(*p) & (^(elem131((*t132)(unsafe.Pointer(&_sqlite3_db_configØ00aFlagOpØ001)), uintptr(_4_i)).Xmask)))
}
}
_12:
- if _6_oldFlags != (_db.X6) {
+ if _6_oldFlags != _db.Xflags {
_sqlite3ExpirePreparedStatements(tls, _db)
}
if _6_pRes != nil {
- *_6_pRes = bool2int((uint32(_db.X6) & ((*t80)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3_db_configØ00aFlagOpØ001)) + 8*uintptr(_4_i))).X1)) != uint32(i32(0)))
+ *_6_pRes = bool2int((uint32(_db.Xflags) & (elem131((*t132)(unsafe.Pointer(&_sqlite3_db_configØ00aFlagOpØ001)), uintptr(_4_i)).Xmask)) != (0))
}
- _rc = i32(0)
+ _rc = int32(0)
goto _8
_9:
_4_i += 1
@@ -111913,28 +113570,28 @@ _4:
return _rc
}
-var _sqlite3_db_configØ00aFlagOpØ001 [5]struct {
- X0 int32
- X1 uint32
-}
+var _sqlite3_db_configØ00aFlagOpØ001 [5]t132
func init() {
- _sqlite3_db_configØ00aFlagOpØ001 = [5]struct {
- X0 int32
- X1 uint32
- }{t80{X0: i32(1002), X1: u32(524288)}, t80{X0: i32(1003), X1: u32(16777216)}, t80{X0: i32(1004), X1: u32(1073741824)}, t80{X0: i32(1005), X1: u32(4194304)}, t80{X0: i32(1006), X1: u32(2147483648)}}
+ _sqlite3_db_configØ00aFlagOpØ001 = [5]t132{t132{Xop: int32(1002), Xmask: uint32(524288)}, t132{Xop: int32(1003), Xmask: uint32(16777216)}, t132{Xop: int32(1004), Xmask: uint32(1073741824)}, t132{Xop: int32(1005), Xmask: uint32(4194304)}, t132{Xop: int32(1006), Xmask: uint32(2147483648)}}
}
-// Return the mutex associated with a database connection.
+// C comment
+// /*
+// ** Return the mutex associated with a database connection.
+// */
func Xsqlite3_db_mutex(tls *crt.TLS, _db *Xsqlite3) (r0 *Xsqlite3_mutex) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(141191))
+ _sqlite3MisuseError(tls, int32(141191))
return nil
}
- return (*Xsqlite3_mutex)(_db.X3)
+ return (*Xsqlite3_mutex)(_db.Xmutex)
}
-// Query status information for a single database connection
+// C comment
+// /*
+// ** Query status information for a single database connection
+// */
func Xsqlite3_db_status(tls *crt.TLS, _db *Xsqlite3, _op int32, _pCurrent *int32, _pHighwater *int32, _resetFlag int32) (r0 int32) {
var _rc, _7_totalUsed, _7_i, _9_nByte, _11_i, _11_nByte, _16_nByte, _18_i, _18_nRet int32
var _8_pBt *XBtree
@@ -111942,307 +113599,301 @@ func Xsqlite3_db_status(tls *crt.TLS, _db *Xsqlite3, _op int32, _pCurrent *int32
var _12_pSchema *XSchema
var _13_p *XHashElem
var _16_pVdbe *TVdbe
- _rc = i32(0)
+ _rc = int32(0)
if ((_sqlite3SafetyCheckOk(tls, _db) == 0) || (_pCurrent == nil)) || (_pHighwater == nil) {
- return _sqlite3MisuseError(tls, i32(18659))
+ return _sqlite3MisuseError(tls, int32(18659))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
switch _op {
- case i32(0):
+ case int32(0):
goto _4
- case i32(1):
+ case int32(1):
goto _8
- case i32(2):
+ case int32(2):
goto _10
- case i32(3):
+ case int32(3):
goto _11
- case i32(4):
+ case int32(4):
goto _5
- case i32(5):
+ case int32(5):
goto _5
- case i32(6):
+ case int32(6):
goto _5
- case i32(7):
+ case int32(7):
goto _12
- case i32(8):
+ case int32(8):
goto _12
- case i32(9):
+ case int32(9):
goto _12
- case i32(10):
+ case int32(10):
goto _15
- case i32(11):
+ case int32(11):
goto _8
default:
goto _16
}
_4:
- *_pCurrent = (*t7)(unsafe.Pointer(&(_db.X58))).X3
- *_pHighwater = (*t7)(unsafe.Pointer(&(_db.X58))).X4
+ *_pCurrent = _db.Xlookaside.XnOut
+ *_pHighwater = _db.Xlookaside.XmxOut
if _resetFlag != 0 {
- *(*int32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X4))) = (*t7)(unsafe.Pointer(&(_db.X58))).X3
+ _db.Xlookaside.XmxOut = _db.Xlookaside.XnOut
}
goto _18
_5:
func() {
- if (_op - i32(4)) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18679), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_db_statusØ00__func__Ø000))), unsafe.Pointer(str(129595)))
+ if (_op - int32(4)) < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18679), unsafe.Pointer(&_sqlite3_db_statusØ00__func__Ø000), unsafe.Pointer(str(129608)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_op - i32(4)) >= i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18680), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_db_statusØ00__func__Ø000))), unsafe.Pointer(str(129633)))
+ if (_op - int32(4)) >= int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18680), unsafe.Pointer(&_sqlite3_db_statusØ00__func__Ø000), unsafe.Pointer(str(129646)))
crt.X__builtin_abort(tls)
}
}()
- *_pCurrent = i32(0)
- *_pHighwater = *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X5))))) + 4*uintptr(_op-i32(4))))
+ *_pCurrent = int32(0)
+ *_pHighwater = *elem8((*int32)(unsafe.Pointer(&(_db.Xlookaside.XanStat))), uintptr(_op-int32(4)))
if _resetFlag != 0 {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&((*t7)(unsafe.Pointer(&(_db.X58))).X5))))) + 4*uintptr(_op-i32(4)))) = i32(0)
+ *elem8((*int32)(unsafe.Pointer(&(_db.Xlookaside.XanStat))), uintptr(_op-int32(4))) = int32(0)
}
goto _18
_8:
- _7_totalUsed = i32(0)
+ _7_totalUsed = int32(0)
_sqlite3BtreeEnterAll(tls, _db)
- _7_i = i32(0)
+ _7_i = int32(0)
_24:
- if _7_i >= (_db.X5) {
+ if _7_i >= _db.XnDb {
goto _27
}
- _8_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_7_i))).X1)
+ _8_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_7_i)).XpBt)
if _8_pBt == nil {
goto _28
}
_9_pPager = _sqlite3BtreePager(tls, _8_pBt)
_9_nByte = _sqlite3PagerMemUsed(tls, _9_pPager)
- if _op == i32(11) {
+ if _op == int32(11) {
_9_nByte = _9_nByte / _sqlite3BtreeConnectionCount(tls, _8_pBt)
}
- {
- p := &_7_totalUsed
- *p = (*p) + _9_nByte
- sink1(*p)
- }
+ _7_totalUsed += _9_nByte
_28:
_7_i += 1
goto _24
_27:
_sqlite3BtreeLeaveAll(tls, _db)
*_pCurrent = _7_totalUsed
- *_pHighwater = i32(0)
+ *_pHighwater = int32(0)
goto _18
_10:
- _11_nByte = i32(0)
+ _11_nByte = int32(0)
_sqlite3BtreeEnterAll(tls, _db)
- *(**int32)(unsafe.Pointer(&(_db.X79))) = &_11_nByte
- _11_i = i32(0)
+ _db.XpnBytesFreed = &_11_nByte
+ _11_i = int32(0)
_30:
- if _11_i >= (_db.X5) {
+ if _11_i >= _db.XnDb {
goto _33
}
- _12_pSchema = (*XSchema)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_11_i))).X4)
+ _12_pSchema = (*XSchema)(elem27((*XDb)(_db.XaDb), uintptr(_11_i)).XpSchema)
if func() int32 {
if _12_pSchema != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(18729), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_db_statusØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(18729), unsafe.Pointer(&_sqlite3_db_statusØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _36
}
{
p := &_11_nByte
- *p = int32(uint32(*p) + (uint32(((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X4)(tls, int32(u32(16)))) * (((((*XHash)(unsafe.Pointer(&(_12_pSchema.X2))).X1) + ((*XHash)(unsafe.Pointer(&(_12_pSchema.X4))).X1)) + ((*XHash)(unsafe.Pointer(&(_12_pSchema.X3))).X1)) + ((*XHash)(unsafe.Pointer(&(_12_pSchema.X5))).X1))))
- sink1(*p)
+ *p = int32(uint32(*p) + (uint32((_sqlite3Config.Xm.XxRoundup)(tls, int32(16))) * ((((_12_pSchema.XtblHash.Xcount) + (_12_pSchema.XtrigHash.Xcount)) + (_12_pSchema.XidxHash.Xcount)) + (_12_pSchema.XfkeyHash.Xcount))))
}
{
p := &_11_nByte
- *p = int32(uint64(*p) + Xsqlite3_msize(tls, (*XHash)(unsafe.Pointer(&(_12_pSchema.X2))).X3))
- sink1(*p)
+ *p = int32(uint64(*p) + Xsqlite3_msize(tls, _12_pSchema.XtblHash.Xht))
}
{
p := &_11_nByte
- *p = int32(uint64(*p) + Xsqlite3_msize(tls, (*XHash)(unsafe.Pointer(&(_12_pSchema.X4))).X3))
- sink1(*p)
+ *p = int32(uint64(*p) + Xsqlite3_msize(tls, _12_pSchema.XtrigHash.Xht))
}
{
p := &_11_nByte
- *p = int32(uint64(*p) + Xsqlite3_msize(tls, (*XHash)(unsafe.Pointer(&(_12_pSchema.X3))).X3))
- sink1(*p)
+ *p = int32(uint64(*p) + Xsqlite3_msize(tls, _12_pSchema.XidxHash.Xht))
}
{
p := &_11_nByte
- *p = int32(uint64(*p) + Xsqlite3_msize(tls, (*XHash)(unsafe.Pointer(&(_12_pSchema.X5))).X3))
- sink1(*p)
+ *p = int32(uint64(*p) + Xsqlite3_msize(tls, _12_pSchema.XfkeyHash.Xht))
}
- _13_p = (*XHashElem)((*XHash)(unsafe.Pointer(&(_12_pSchema.X4))).X2)
+ _13_p = (*XHashElem)(_12_pSchema.XtrigHash.Xfirst)
_37:
if _13_p == nil {
goto _40
}
- _sqlite3DeleteTrigger(tls, _db, (*XTrigger)(_13_p.X2))
- _13_p = (*XHashElem)(_13_p.X0)
+ _sqlite3DeleteTrigger(tls, _db, (*XTrigger)(_13_p.Xdata))
+ _13_p = (*XHashElem)(_13_p.Xnext)
goto _37
_40:
- _13_p = (*XHashElem)((*XHash)(unsafe.Pointer(&(_12_pSchema.X2))).X2)
+ _13_p = (*XHashElem)(_12_pSchema.XtblHash.Xfirst)
_41:
if _13_p == nil {
goto _44
}
- _sqlite3DeleteTable(tls, _db, (*XTable)(_13_p.X2))
- _13_p = (*XHashElem)(_13_p.X0)
+ _sqlite3DeleteTable(tls, _db, (*XTable)(_13_p.Xdata))
+ _13_p = (*XHashElem)(_13_p.Xnext)
goto _41
_44:
_36:
_11_i += 1
goto _30
_33:
- *(**int32)(unsafe.Pointer(&(_db.X79))) = nil
+ _db.XpnBytesFreed = nil
_sqlite3BtreeLeaveAll(tls, _db)
- *_pHighwater = i32(0)
+ *_pHighwater = int32(0)
*_pCurrent = _11_nByte
goto _18
_11:
- _16_nByte = i32(0)
- *(**int32)(unsafe.Pointer(&(_db.X79))) = &_16_nByte
- _16_pVdbe = (*TVdbe)(_db.X1)
+ _16_nByte = int32(0)
+ _db.XpnBytesFreed = &_16_nByte
+ _16_pVdbe = (*TVdbe)(_db.XpVdbe)
_45:
if _16_pVdbe == nil {
goto _48
}
_sqlite3VdbeClearObject(tls, _db, _16_pVdbe)
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_16_pVdbe))
- _16_pVdbe = (*TVdbe)(_16_pVdbe.X2)
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_16_pVdbe))
+ _16_pVdbe = (*TVdbe)(_16_pVdbe.XpNext)
goto _45
_48:
- *(**int32)(unsafe.Pointer(&(_db.X79))) = nil
- *_pHighwater = i32(0)
+ _db.XpnBytesFreed = nil
+ *_pHighwater = int32(0)
*_pCurrent = _16_nByte
goto _18
_12:
- _18_nRet = i32(0)
- i32(0)
- i32(0)
- _18_i = i32(0)
+ _18_nRet = int32(0)
+
+ _18_i = int32(0)
_49:
- if _18_i >= (_db.X5) {
+ if _18_i >= _db.XnDb {
goto _52
}
- if (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_18_i))).X1) != nil {
- _20_pPager = _sqlite3BtreePager(tls, (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4)+16*uintptr(_18_i))).X1))
+ if (elem27((*XDb)(_db.XaDb), uintptr(_18_i)).XpBt) != nil {
+ _20_pPager = _sqlite3BtreePager(tls, (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_18_i)).XpBt))
_sqlite3PagerCacheStat(tls, _20_pPager, _op, _resetFlag, &_18_nRet)
}
_18_i += 1
goto _49
_52:
- *_pHighwater = i32(0)
+ *_pHighwater = int32(0)
*_pCurrent = _18_nRet
goto _18
_15:
- *_pHighwater = i32(0)
- *_pCurrent = bool2int(((_db.X78) > int64(i32(0))) || ((_db.X77) > int64(i32(0))))
+ *_pHighwater = int32(0)
+ *_pCurrent = bool2int((_db.XnDeferredImmCons > (0)) || (_db.XnDeferredCons > (0)))
goto _18
_16:
- _rc = i32(1)
+ _rc = int32(1)
_18:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
var _sqlite3_db_statusØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_db_statusØ00__func__Ø000[0], str(129670), 18)
+ crt.Xstrncpy(nil, &_sqlite3_db_statusØ00__func__Ø000[0], str(129683), 18)
}
-// Return the approximate number of bytes of memory currently
-// used by the pager and its associated cache.
+// C comment
+// /*
+// ** Return the approximate number of bytes of memory currently
+// ** used by the pager and its associated cache.
+// */
func _sqlite3PagerMemUsed(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _perPageSize int32
- _perPageSize = int32((uint32((_pPager.X48)+int32(_pPager.X44)) + u32(40)) + u32(20))
- return ((_perPageSize * _sqlite3PcachePagecount(tls, (*XPCache)(_pPager.X59))) + _sqlite3MallocSize(tls, (unsafe.Pointer)(_pPager))) + (_pPager.X48)
+ _perPageSize = int32((uint32(_pPager.XpageSize+int32(_pPager.XnExtra)) + uint32(40)) + uint32(20))
+ return ((_perPageSize * _sqlite3PcachePagecount(tls, (*XPCache)(_pPager.XpPCache))) + _sqlite3MallocSize(tls, unsafe.Pointer(_pPager))) + _pPager.XpageSize
}
func Xsqlite3_msize(tls *crt.TLS, _p unsafe.Pointer) (r0 uint64) {
- i32(0)
- i32(0)
return uint64(func() int32 {
if _p != nil {
- return ((*Xsqlite3_mem_methods)(unsafe.Pointer(&(_sqlite3Config.X10))).X3)(tls, _p)
+ return (_sqlite3Config.Xm.XxSize)(tls, _p)
}
- return i32(0)
+ return int32(0)
}())
}
-// Parameter eStat must be either SQLITE_DBSTATUS_CACHE_HIT or
-// SQLITE_DBSTATUS_CACHE_MISS. Before returning, *pnVal is incremented by the
-// current cache hit or miss count, according to the value of eStat. If the
-// reset parameter is non-zero, the cache hit or miss count is zeroed before
-// returning.
+// C comment
+// /*
+// ** Parameter eStat must be either SQLITE_DBSTATUS_CACHE_HIT or
+// ** SQLITE_DBSTATUS_CACHE_MISS. Before returning, *pnVal is incremented by the
+// ** current cache hit or miss count, according to the value of eStat. If the
+// ** reset parameter is non-zero, the cache hit or miss count is zeroed before
+// ** returning.
+// */
func _sqlite3PagerCacheStat(tls *crt.TLS, _pPager *XPager, _eStat int32, _reset int32, _pnVal *int32) {
func() {
- if _eStat != i32(7) && _eStat != i32(8) && _eStat != i32(9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(53576), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerCacheStatØ00__func__Ø000))), unsafe.Pointer(str(129688)))
+ if _eStat != int32(7) && _eStat != int32(8) && _eStat != int32(9) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(53576), unsafe.Pointer(&_sqlite3PagerCacheStatØ00__func__Ø000), unsafe.Pointer(str(129701)))
crt.X__builtin_abort(tls)
}
}()
- i32(0)
- i32(0)
- i32(0)
- {
- p := _pnVal
- *p = (*p) + (*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&(_pPager.X55))))) + 4*uintptr(_eStat-i32(7)))))
- sink1(*p)
- }
+
+ *_pnVal += *elem8((*int32)(unsafe.Pointer(&_pPager.XaStat)), uintptr(_eStat-int32(7)))
if _reset != 0 {
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]int32)(unsafe.Pointer(&(_pPager.X55))))) + 4*uintptr(_eStat-i32(7)))) = i32(0)
+ *elem8((*int32)(unsafe.Pointer(&_pPager.XaStat)), uintptr(_eStat-int32(7))) = int32(0)
}
}
var _sqlite3PagerCacheStatØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerCacheStatØ00__func__Ø000[0], str(129796), 22)
+ crt.Xstrncpy(nil, &_sqlite3PagerCacheStatØ00__func__Ø000[0], str(129809), 22)
}
func Xsqlite3_extended_errcode(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
if (_db != nil) && (_sqlite3SafetyCheckSickOrOk(tls, _db) == 0) {
- return _sqlite3MisuseError(tls, i32(142786))
+ return _sqlite3MisuseError(tls, int32(142786))
}
- if (_db == nil) || ((_db.X17) != 0) {
- return _sqlite3NomemError(tls, i32(142789))
+ if (_db == nil) || (_db.XmallocFailed != 0) {
+ return _sqlite3NomemError(tls, int32(142789))
}
- return _db.X10
+ return _db.XerrCode
}
-// Return the value of a status counter for a prepared statement
+// C comment
+// /*
+// ** Return the value of a status counter for a prepared statement
+// */
func Xsqlite3_stmt_status(tls *crt.TLS, _pStmt unsafe.Pointer, _op int32, _resetFlag int32) (r0 int32) {
var _v uint32
var _pVdbe *TVdbe
_pVdbe = (*TVdbe)(_pStmt)
if _pStmt == nil {
- _sqlite3MisuseError(tls, i32(77706))
- return i32(0)
+ _sqlite3MisuseError(tls, int32(77706))
+ return int32(0)
}
- _v = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pVdbe.X35))))) + 4*uintptr(_op)))
+ _v = *elem7((*uint32)(unsafe.Pointer(&_pVdbe.XaCounter)), uintptr(_op))
if _resetFlag != 0 {
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[5]uint32)(unsafe.Pointer(&(_pVdbe.X35))))) + 4*uintptr(_op))) = uint32(i32(0))
+ *elem7((*uint32)(unsafe.Pointer(&_pVdbe.XaCounter)), uintptr(_op)) = 0
}
return int32(_v)
}
-// Move an existing blob handle to point to a different row of the same
-// database table.
-//
-// If an error occurs, or if the specified row does not exist or does not
-// contain a blob or text value, then an error code is returned and the
-// database handle error code and message set. If this happens, then all
-// subsequent calls to sqlite3_blob_xxx() functions (except blob_close())
-// immediately return SQLITE_ABORT.
+// C comment
+// /*
+// ** Move an existing blob handle to point to a different row of the same
+// ** database table.
+// **
+// ** If an error occurs, or if the specified row does not exist or does not
+// ** contain a blob or text value, then an error code is returned and the
+// ** database handle error code and message set. If this happens, then all
+// ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close())
+// ** immediately return SQLITE_ABORT.
+// */
func Xsqlite3_blob_reopen(tls *crt.TLS, _pBlob unsafe.Pointer, _iRow int64) (r0 int32) {
var _rc int32
var _2_zErr *int8
@@ -112250,125 +113901,130 @@ func Xsqlite3_blob_reopen(tls *crt.TLS, _pBlob unsafe.Pointer, _iRow int64) (r0
var _p *XIncrblob
_p = (*XIncrblob)(_pBlob)
if _p == nil {
- return _sqlite3MisuseError(tls, i32(85986))
+ return _sqlite3MisuseError(tls, int32(85986))
}
- _db = (*Xsqlite3)(_p.X5)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- if _p.X4 == nil {
- _rc = i32(4)
+ _db = (*Xsqlite3)(_p.Xdb)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ if _p.XpStmt == nil {
+ _rc = int32(4)
goto _2
}
_rc = _blobSeekToRow(tls, _p, _iRow, &_2_zErr)
- if _rc != i32(0) {
+ if _rc != int32(0) {
_sqlite3ErrorWithMsg(tls, _db, _rc, func() *int8 {
if _2_zErr != nil {
- return str(24576)
+ return str(24531)
}
return nil
}(), unsafe.Pointer(_2_zErr))
- _sqlite3DbFree(tls, _db, (unsafe.Pointer)(_2_zErr))
+ _sqlite3DbFree(tls, _db, unsafe.Pointer(_2_zErr))
}
func() {
- if _rc == i32(17) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86002), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_blob_reopenØ00__func__Ø000))), unsafe.Pointer(str(129818)))
+ if _rc == int32(17) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86002), unsafe.Pointer(&_sqlite3_blob_reopenØ00__func__Ø000), unsafe.Pointer(str(129831)))
crt.X__builtin_abort(tls)
}
}()
_2:
_rc = _sqlite3ApiExit(tls, _db, _rc)
func() {
- if _rc != i32(0) && _p.X4 != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(86006), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_blob_reopenØ00__func__Ø000))), unsafe.Pointer(str(129836)))
+ if _rc != int32(0) && _p.XpStmt != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(86006), unsafe.Pointer(&_sqlite3_blob_reopenØ00__func__Ø000), unsafe.Pointer(str(129849)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
var _sqlite3_blob_reopenØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_blob_reopenØ00__func__Ø000[0], str(129865), 20)
+ crt.Xstrncpy(nil, &_sqlite3_blob_reopenØ00__func__Ø000[0], str(129878), 20)
}
-// Call from within the xCreate() or xConnect() methods to provide
-// the SQLite core with additional information about the behavior
-// of the virtual table being implemented.
+// C comment
+// /*
+// ** Call from within the xCreate() or xConnect() methods to provide
+// ** the SQLite core with additional information about the behavior
+// ** of the virtual table being implemented.
+// */
func Xsqlite3_vtab_config(tls *crt.TLS, _db *Xsqlite3, _op int32, args ...interface{}) (r0 int32) {
var _rc int32
var _ap []interface{}
var _2_p *XVtabCtx
- _rc = i32(0)
+ _rc = int32(0)
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(126200))
+ return _sqlite3MisuseError(tls, int32(126200))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
_ap = args
switch _op {
- case i32(1):
+ case int32(1):
goto _2
default:
goto _3
}
_2:
- _2_p = (*XVtabCtx)(_db.X66)
+ _2_p = (*XVtabCtx)(_db.XpVtabCtx)
if _2_p == nil {
- _rc = _sqlite3MisuseError(tls, i32(126208))
+ _rc = _sqlite3MisuseError(tls, int32(126208))
goto _5
}
func() {
- if (*XTable)(_2_p.X1) != nil && ((*XTable)(_2_p.X1).X16) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126210), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_vtab_configØ00__func__Ø000))), unsafe.Pointer(str(129885)))
+ if (*XTable)(_2_p.XpTab) != nil && ((*XTable)(_2_p.XpTab).XnModuleArg) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126210), unsafe.Pointer(&_sqlite3_vtab_configØ00__func__Ø000), unsafe.Pointer(str(129898)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&((*XVTable)(_2_p.X0).X4))) = uint8(crt.VAInt32(&_ap))
+ (*XVTable)(_2_p.XpVTable).XbConstraint = uint8(crt.VAInt32(&_ap))
_5:
goto _9
_3:
- _rc = _sqlite3MisuseError(tls, i32(126216))
+ _rc = _sqlite3MisuseError(tls, int32(126216))
goto _9
_9:
_ap = nil
- if _rc != i32(0) {
+ if _rc != int32(0) {
_sqlite3Error(tls, _db, _rc)
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return _rc
}
var _sqlite3_vtab_configØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_vtab_configØ00__func__Ø000[0], str(129918), 20)
+ crt.Xstrncpy(nil, &_sqlite3_vtab_configØ00__func__Ø000[0], str(129931), 20)
}
-// Return the ON CONFLICT resolution mode in effect for the virtual
-// table update operation currently in progress.
-//
-// The results of this routine are undefined unless it is called from
-// within an xUpdate method.
+// C comment
+// /*
+// ** Return the ON CONFLICT resolution mode in effect for the virtual
+// ** table update operation currently in progress.
+// **
+// ** The results of this routine are undefined unless it is called from
+// ** within an xUpdate method.
+// */
func Xsqlite3_vtab_on_conflict(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(126182))
+ return _sqlite3MisuseError(tls, int32(126182))
}
- i32(0)
- i32(0)
+
func() {
- if int32(_db.X22) < i32(1) || int32(_db.X22) > i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(126186), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_vtab_on_conflictØ00__func__Ø000))), unsafe.Pointer(str(129938)))
+ if int32(_db.XvtabOnConflict) < int32(1) || int32(_db.XvtabOnConflict) > int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(126186), unsafe.Pointer(&_sqlite3_vtab_on_conflictØ00__func__Ø000), unsafe.Pointer(str(129951)))
crt.X__builtin_abort(tls)
}
}()
- return int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3_vtab_on_conflictØ00aMapØ001)) + 1*uintptr(int32(_db.X22)-i32(1)))))
+ return int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3_vtab_on_conflictØ00aMapØ001)), uintptr(int32(_db.XvtabOnConflict)-int32(1))))
}
var _sqlite3_vtab_on_conflictØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_vtab_on_conflictØ00__func__Ø000[0], str(129985), 25)
+ crt.Xstrncpy(nil, &_sqlite3_vtab_on_conflictØ00__func__Ø000[0], str(129998), 25)
}
var _sqlite3_vtab_on_conflictØ00aMapØ001 [5]uint8
@@ -112378,15 +114034,18 @@ func init() {
}
func Xsqlite3_close_v2(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
- return _sqlite3Close(tls, _db, i32(1))
+ return _sqlite3Close(tls, _db, int32(1))
}
-// Return the filename of the database associated with a database
-// connection.
+// C comment
+// /*
+// ** Return the filename of the database associated with a database
+// ** connection.
+// */
func Xsqlite3_db_filename(tls *crt.TLS, _db *Xsqlite3, _zDbName *int8) (r0 *int8) {
var _pBt *XBtree
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(144428))
+ _sqlite3MisuseError(tls, int32(144428))
return nil
}
_pBt = _sqlite3DbNameToBtree(tls, _db, _zDbName)
@@ -112398,96 +114057,111 @@ func Xsqlite3_db_filename(tls *crt.TLS, _db *Xsqlite3, _zDbName *int8) (r0 *int8
}()
}
-// Return 1 if database is read-only or 0 if read/write. Return -1 if
-// no such database exists.
+// C comment
+// /*
+// ** Return 1 if database is read-only or 0 if read/write. Return -1 if
+// ** no such database exists.
+// */
func Xsqlite3_db_readonly(tls *crt.TLS, _db *Xsqlite3, _zDbName *int8) (r0 int32) {
var _pBt *XBtree
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(144444))
- return i32(-1)
+ _sqlite3MisuseError(tls, int32(144444))
+ return int32(-1)
}
_pBt = _sqlite3DbNameToBtree(tls, _db, _zDbName)
return func() int32 {
if _pBt != nil {
return _sqlite3BtreeIsReadonly(tls, _pBt)
}
- return i32(-1)
+ return int32(-1)
}()
}
-// Return a string that describes the kind of error specified in the
-// argument. For now, this simply calls the internal sqlite3ErrStr()
-// function.
+// C comment
+// /*
+// ** Return a string that describes the kind of error specified in the
+// ** argument. For now, this simply calls the internal sqlite3ErrStr()
+// ** function.
+// */
func Xsqlite3_errstr(tls *crt.TLS, _rc int32) (r0 *int8) {
return _sqlite3ErrStr(tls, _rc)
}
-// Return true if the prepared statement is guaranteed to not modify the
-// database.
+// C comment
+// /*
+// ** Return true if the prepared statement is guaranteed to not modify the
+// ** database.
+// */
func Xsqlite3_stmt_readonly(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 int32) {
return int32(func() uint32 {
if _pStmt != nil {
- return ((uint32(((*TVdbe)(_pStmt).X32)>>uint(i32(7))) << uint(i32(31))) >> uint(i32(31)))
+ return ((uint32(((*TVdbe)(_pStmt).Xexpired)>>7) << 31) >> 31)
}
- return uint32(i32(1))
+ return uint32(1)
}())
}
-// Return a 64-bit integer value for a query parameter.
+// C comment
+// /*
+// ** Return a 64-bit integer value for a query parameter.
+// */
func Xsqlite3_uri_int64(tls *crt.TLS, _zFilename *int8, _zParam *int8, _bDflt int64) (r0 int64) {
var _v int64
var _z *int8
_z = Xsqlite3_uri_parameter(tls, _zFilename, _zParam)
- if (_z != nil) && (_sqlite3DecOrHexToI64(tls, _z, &_v) == i32(0)) {
+ if (_z != nil) && (_sqlite3DecOrHexToI64(tls, _z, &_v) == int32(0)) {
_bDflt = _v
}
return _bDflt
}
-// Register a statically linked extension that is automatically
-// loaded by every new database connection.
+// C comment
+// /*
+// ** Register a statically linked extension that is automatically
+// ** loaded by every new database connection.
+// */
func Xsqlite3_auto_extension(tls *crt.TLS, _xInit func(*crt.TLS)) (r0 int32) {
var _rc int32
var _2_i uint32
var _4_nByte uint64
var _2_mutex *Xsqlite3_mutex
var _4_aNew *func(*crt.TLS)
- _rc = i32(0)
+ _rc = int32(0)
_rc = Xsqlite3_initialize(tls)
if _rc != 0 {
return _rc
}
- _2_mutex = _sqlite3MutexAlloc(tls, i32(2))
+ _2_mutex = _sqlite3MutexAlloc(tls, int32(2))
Xsqlite3_mutex_enter(tls, _2_mutex)
- _2_i = uint32(i32(0))
+ _2_i = 0
_2:
- if _2_i >= (_sqlite3Autoext.X0) {
+ if _2_i >= _sqlite3Autoext.XnExt {
goto _5
}
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{(*(*func(*crt.TLS))(unsafe.Pointer(uintptr((unsafe.Pointer)(_sqlite3Autoext.X1)) + 4*uintptr(_2_i))))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{_xInit})) {
+ if *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{(*elem130(_sqlite3Autoext.XaExt, uintptr(_2_i)))})) == *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{_xInit})) {
goto _5
}
_2_i += 1
goto _2
_5:
- if _2_i != (_sqlite3Autoext.X0) {
+ if _2_i != _sqlite3Autoext.XnExt {
goto _7
}
- _4_nByte = uint64(((_sqlite3Autoext.X0) + uint32(i32(1))) * u32(4))
- _4_aNew = (*func(*crt.TLS))(Xsqlite3_realloc64(tls, (unsafe.Pointer)(_sqlite3Autoext.X1), _4_nByte))
+ _4_nByte = uint64((_sqlite3Autoext.XnExt + uint32(1)) * uint32(4))
+ _4_aNew = (*func(*crt.TLS))(Xsqlite3_realloc64(tls, unsafe.Pointer(_sqlite3Autoext.XaExt), _4_nByte))
if _4_aNew == nil {
- _rc = _sqlite3NomemError(tls, i32(112498))
+ _rc = _sqlite3NomemError(tls, int32(112498))
goto _9
}
- *(**func(*crt.TLS))(unsafe.Pointer(&(_sqlite3Autoext.X1))) = _4_aNew
- *(*func(*crt.TLS))(unsafe.Pointer(uintptr((unsafe.Pointer)(_sqlite3Autoext.X1)) + 4*uintptr(_sqlite3Autoext.X0))) = _xInit
- *(*uint32)(unsafe.Pointer(&(_sqlite3Autoext.X0))) += 1
+ _sqlite3Autoext.XaExt = _4_aNew
+ *elem130(_sqlite3Autoext.XaExt, uintptr(_sqlite3Autoext.XnExt)) = _xInit
+ _sqlite3Autoext.XnExt += 1
_9:
_7:
Xsqlite3_mutex_leave(tls, _2_mutex)
func() {
- if (_rc & i32(255)) != _rc {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(112506), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_auto_extensionØ00__func__Ø000))), unsafe.Pointer(str(24579)))
+ if (_rc & int32(255)) != _rc {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(112506), unsafe.Pointer(&_sqlite3_auto_extensionØ00__func__Ø000), unsafe.Pointer(str(24534)))
crt.X__builtin_abort(tls)
}
}()
@@ -112497,57 +114171,55 @@ _7:
var _sqlite3_auto_extensionØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_auto_extensionØ00__func__Ø000[0], str(130010), 23)
+ crt.Xstrncpy(nil, &_sqlite3_auto_extensionØ00__func__Ø000[0], str(130023), 23)
}
func Xsqlite3_bind_blob64(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _zData unsafe.Pointer, _nData uint64, _xDel func(*crt.TLS, unsafe.Pointer)) (r0 int32) {
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77435), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_bind_blob64Ø00__func__Ø000))), unsafe.Pointer(str(130033)))
+ }{func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()})) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77435), unsafe.Pointer(&_sqlite3_bind_blob64Ø00__func__Ø000), unsafe.Pointer(str(130046)))
crt.X__builtin_abort(tls)
}
}()
- if _nData > uint64(i32(2147483647)) {
+ if _nData > uint64(2147483647) {
return _invokeValueDestructor(tls, _zData, _xDel, nil)
}
- return _bindText(tls, _pStmt, _i, _zData, int32(_nData), _xDel, uint8(i32(0)))
+ return _bindText(tls, _pStmt, _i, _zData, int32(_nData), _xDel, 0)
}
var _sqlite3_bind_blob64Ø00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_bind_blob64Ø00__func__Ø000[0], str(130054), 20)
+ crt.Xstrncpy(nil, &_sqlite3_bind_blob64Ø00__func__Ø000[0], str(130067), 20)
}
func _invokeValueDestructor(tls *crt.TLS, _p unsafe.Pointer, _xDel func(*crt.TLS, unsafe.Pointer), _pCtx *Xsqlite3_context) (r0 int32) {
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76411), unsafe.Pointer((*int8)(unsafe.Pointer(&_invokeValueDestructorØ00__func__Ø000))), unsafe.Pointer(str(130033)))
+ }{func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()})) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76411), unsafe.Pointer(&_invokeValueDestructorØ00__func__Ø000), unsafe.Pointer(str(130046)))
crt.X__builtin_abort(tls)
}
}()
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{nil})) {
+ if _xDel == nil {
goto _5
}
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
}{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))})) {
goto _5
@@ -112557,64 +114229,68 @@ _5:
if _pCtx != nil {
Xsqlite3_result_error_toobig(tls, _pCtx)
}
- return i32(18)
+ return int32(18)
}
var _invokeValueDestructorØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_invokeValueDestructorØ00__func__Ø000[0], str(130074), 22)
+ crt.Xstrncpy(nil, &_invokeValueDestructorØ00__func__Ø000[0], str(130087), 22)
}
func Xsqlite3_bind_text64(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _zData *int8, _nData uint64, _xDel func(*crt.TLS, unsafe.Pointer), _enc uint8) (r0 int32) {
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77491), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_bind_text64Ø00__func__Ø000))), unsafe.Pointer(str(130033)))
+ }{func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()})) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77491), unsafe.Pointer(&_sqlite3_bind_text64Ø00__func__Ø000), unsafe.Pointer(str(130046)))
crt.X__builtin_abort(tls)
}
}()
- if _nData > uint64(i32(2147483647)) {
- return _invokeValueDestructor(tls, (unsafe.Pointer)(_zData), _xDel, nil)
+ if _nData > uint64(2147483647) {
+ return _invokeValueDestructor(tls, unsafe.Pointer(_zData), _xDel, nil)
}
- if int32(_enc) == i32(4) {
- _enc = uint8(i32(2))
+ if int32(_enc) == int32(4) {
+ _enc = uint8(2)
}
- return _bindText(tls, _pStmt, _i, (unsafe.Pointer)(_zData), int32(_nData), _xDel, _enc)
+ return _bindText(tls, _pStmt, _i, unsafe.Pointer(_zData), int32(_nData), _xDel, _enc)
}
var _sqlite3_bind_text64Ø00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_bind_text64Ø00__func__Ø000[0], str(130096), 20)
+ crt.Xstrncpy(nil, &_sqlite3_bind_text64Ø00__func__Ø000[0], str(130109), 20)
}
-// Cancel a prior call to sqlite3_auto_extension. Remove xInit from the
-// set of routines that is invoked for each new database connection, if it
-// is currently on the list. If xInit is not on the list, then this
-// routine is a no-op.
-//
-// Return 1 if xInit was found on the list and removed. Return 0 if xInit
-// was not on the list.
+// C comment
+// /*
+// ** Cancel a prior call to sqlite3_auto_extension. Remove xInit from the
+// ** set of routines that is invoked for each new database connection, if it
+// ** is currently on the list. If xInit is not on the list, then this
+// ** routine is a no-op.
+// **
+// ** Return 1 if xInit was found on the list and removed. Return 0 if xInit
+// ** was not on the list.
+// */
func Xsqlite3_cancel_auto_extension(tls *crt.TLS, _xInit func(*crt.TLS)) (r0 int32) {
var _i, _n int32
var _mutex *Xsqlite3_mutex
- _mutex = _sqlite3MutexAlloc(tls, i32(2))
- _n = i32(0)
+ _mutex = _sqlite3MutexAlloc(tls, int32(2))
+ _n = int32(0)
Xsqlite3_mutex_enter(tls, _mutex)
- _i = int32(_sqlite3Autoext.X0) - i32(1)
+ _i = int32(_sqlite3Autoext.XnExt) - int32(1)
_0:
- if _i < i32(0) {
+ if _i < int32(0) {
goto _3
}
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{(*(*func(*crt.TLS))(unsafe.Pointer(uintptr((unsafe.Pointer)(_sqlite3Autoext.X1)) + 4*uintptr(_i))))})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{_xInit})) {
- *(*uint32)(unsafe.Pointer(&(_sqlite3Autoext.X0))) -= 1
- *(*func(*crt.TLS))(unsafe.Pointer(uintptr((unsafe.Pointer)(_sqlite3Autoext.X1)) + 4*uintptr(_i))) = *(*func(*crt.TLS))(unsafe.Pointer(uintptr((unsafe.Pointer)(_sqlite3Autoext.X1)) + 4*uintptr(_sqlite3Autoext.X0)))
+ if *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{(*elem130(_sqlite3Autoext.XaExt, uintptr(_i)))})) == *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{_xInit})) {
+ _sqlite3Autoext.XnExt -= 1
+ *elem130(_sqlite3Autoext.XaExt, uintptr(_i)) = *elem130(_sqlite3Autoext.XaExt, uintptr(_sqlite3Autoext.XnExt))
_n += 1
goto _3
}
@@ -112625,76 +114301,81 @@ _3:
return _n
}
-// Reset the automatic extension loading mechanism.
+// C comment
+// /*
+// ** Reset the automatic extension loading mechanism.
+// */
func Xsqlite3_reset_auto_extension(tls *crt.TLS) {
var _1_mutex *Xsqlite3_mutex
- if Xsqlite3_initialize(tls) == i32(0) {
- _1_mutex = _sqlite3MutexAlloc(tls, i32(2))
+ if Xsqlite3_initialize(tls) == int32(0) {
+ _1_mutex = _sqlite3MutexAlloc(tls, int32(2))
Xsqlite3_mutex_enter(tls, _1_mutex)
- Xsqlite3_free(tls, (unsafe.Pointer)(_sqlite3Autoext.X1))
- *(**func(*crt.TLS))(unsafe.Pointer(&(_sqlite3Autoext.X1))) = nil
- *(*uint32)(unsafe.Pointer(&(_sqlite3Autoext.X0))) = uint32(i32(0))
+ Xsqlite3_free(tls, unsafe.Pointer(_sqlite3Autoext.XaExt))
+ _sqlite3Autoext.XaExt = nil
+ _sqlite3Autoext.XnExt = 0
Xsqlite3_mutex_leave(tls, _1_mutex)
}
}
func Xsqlite3_result_blob64(tls *crt.TLS, _pCtx *Xsqlite3_context, _z unsafe.Pointer, _n uint64, _xDel func(*crt.TLS, unsafe.Pointer)) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76438), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_blob64Ø00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76438), unsafe.Pointer(&_sqlite3_result_blob64Ø00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76439), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_blob64Ø00__func__Ø000))), unsafe.Pointer(str(130033)))
+ }{func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()})) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76439), unsafe.Pointer(&_sqlite3_result_blob64Ø00__func__Ø000), unsafe.Pointer(str(130046)))
crt.X__builtin_abort(tls)
}
}()
- if _n > uint64(i32(2147483647)) {
+ if _n > uint64(2147483647) {
_invokeValueDestructor(tls, _z, _xDel, _pCtx)
goto _5
}
- _setResultStrOrError(tls, _pCtx, (*int8)(_z), int32(_n), uint8(i32(0)), _xDel)
+ _setResultStrOrError(tls, _pCtx, (*int8)(_z), int32(_n), 0, _xDel)
_5:
}
var _sqlite3_result_blob64Ø00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_blob64Ø00__func__Ø000[0], str(130116), 22)
+ crt.Xstrncpy(nil, &_sqlite3_result_blob64Ø00__func__Ø000[0], str(130129), 22)
}
func Xsqlite3_result_text64(tls *crt.TLS, _pCtx *Xsqlite3_context, _z *int8, _n uint64, _xDel func(*crt.TLS, unsafe.Pointer), _enc uint8) {
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.X0).X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76498), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_text64Ø00__func__Ø000))), unsafe.Pointer(str(6666)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)((*XMem)(_pCtx.XpOut).Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76498), unsafe.Pointer(&_sqlite3_result_text64Ø00__func__Ø000), unsafe.Pointer(str(6567)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ if *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{_xDel})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_xDel})) == *(*uintptr)(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer)
- }{(*(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))})) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76499), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_text64Ø00__func__Ø000))), unsafe.Pointer(str(130033)))
+ }{func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()})) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76499), unsafe.Pointer(&_sqlite3_result_text64Ø00__func__Ø000), unsafe.Pointer(str(130046)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_enc) == i32(4) {
- _enc = uint8(i32(2))
+ if int32(_enc) == int32(4) {
+ _enc = uint8(2)
}
- if _n > uint64(i32(2147483647)) {
- _invokeValueDestructor(tls, (unsafe.Pointer)(_z), _xDel, _pCtx)
+ if _n > uint64(2147483647) {
+ _invokeValueDestructor(tls, unsafe.Pointer(_z), _xDel, _pCtx)
goto _6
}
_setResultStrOrError(tls, _pCtx, _z, int32(_n), _enc, _xDel)
@@ -112704,41 +114385,40 @@ _6:
var _sqlite3_result_text64Ø00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_text64Ø00__func__Ø000[0], str(130138), 22)
+ crt.Xstrncpy(nil, &_sqlite3_result_text64Ø00__func__Ø000[0], str(130151), 22)
}
-// Make a copy of an sqlite3_value object
+// C comment
+// /* Make a copy of an sqlite3_value object
+// */
func Xsqlite3_value_dup(tls *crt.TLS, _pOrig *XMem) (r0 *XMem) {
var _pNew *XMem
if _pOrig == nil {
return nil
}
- _pNew = (*XMem)(Xsqlite3_malloc(tls, int32(u32(48))))
+ _pNew = (*XMem)(Xsqlite3_malloc(tls, int32(48)))
if _pNew == nil {
return nil
}
- crt.Xmemset(tls, (unsafe.Pointer)(_pNew), i32(0), u32(48))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pNew), (unsafe.Pointer)(_pOrig), u32(20))
+ crt.Xmemset(tls, unsafe.Pointer(_pNew), int32(0), uint32(48))
+ crt.Xmemcpy(tls, unsafe.Pointer(_pNew), unsafe.Pointer(_pOrig), uint32(20))
{
- p := (*uint16)(unsafe.Pointer(&(_pNew.X1)))
- *p = uint16(int32(*p) & i32(-1025))
- sink14(*p)
+ p := &_pNew.Xflags
+ *p = uint16(int32(*p) & int32(-1025))
}
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X9))))) = nil
- if (int32(_pNew.X1) & i32(18)) == 0 {
+ *(**Xsqlite3)(unsafe.Pointer(&_pNew.Xdb)) = nil
+ if (int32(_pNew.Xflags) & int32(18)) == 0 {
goto _2
}
{
- p := (*uint16)(unsafe.Pointer(&(_pNew.X1)))
- *p = uint16(int32(*p) & i32(-3073))
- sink14(*p)
+ p := &_pNew.Xflags
+ *p = uint16(int32(*p) & int32(-3073))
}
{
- p := (*uint16)(unsafe.Pointer(&(_pNew.X1)))
- *p = uint16(int32(*p) | i32(4096))
- sink14(*p)
+ p := &_pNew.Xflags
+ *p = uint16(int32(*p) | int32(4096))
}
- if _sqlite3VdbeMemMakeWriteable(tls, _pNew) != i32(0) {
+ if _sqlite3VdbeMemMakeWriteable(tls, _pNew) != int32(0) {
_sqlite3ValueFree(tls, _pNew)
_pNew = nil
}
@@ -112746,160 +114426,195 @@ _2:
return _pNew
}
-// Destroy an sqlite3_value object previously obtained from
-// sqlite3_value_dup().
+// C comment
+// /* Destroy an sqlite3_value object previously obtained from
+// ** sqlite3_value_dup().
+// */
func Xsqlite3_value_free(tls *crt.TLS, _pOld *XMem) {
_sqlite3ValueFree(tls, _pOld)
}
func Xsqlite3_result_zeroblob64(tls *crt.TLS, _pCtx *Xsqlite3_context, _n uint64) (r0 int32) {
var _pOut *XMem
- _pOut = (*XMem)(_pCtx.X0)
+ _pOut = (*XMem)(_pCtx.XpOut)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pOut.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76546), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_zeroblob64Ø00__func__Ø000))), unsafe.Pointer(str(130160)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pOut.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76546), unsafe.Pointer(&_sqlite3_result_zeroblob64Ø00__func__Ø000), unsafe.Pointer(str(130173)))
crt.X__builtin_abort(tls)
}
}()
- if _n > uint64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_pOut.X9).X31))))) + 4*uintptr(i32(0))))) {
- return i32(18)
+ if _n > uint64(*elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_pOut.Xdb).XaLimit))), 0)) {
+ return int32(18)
}
- _sqlite3VdbeMemSetZeroBlob(tls, (*XMem)(_pCtx.X0), int32(_n))
- return i32(0)
+ _sqlite3VdbeMemSetZeroBlob(tls, (*XMem)(_pCtx.XpOut), int32(_n))
+ return int32(0)
}
var _sqlite3_result_zeroblob64Ø00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_zeroblob64Ø00__func__Ø000[0], str(130196), 26)
+ crt.Xstrncpy(nil, &_sqlite3_result_zeroblob64Ø00__func__Ø000[0], str(130209), 26)
}
func Xsqlite3_bind_zeroblob64(tls *crt.TLS, _pStmt unsafe.Pointer, _i int32, _n uint64) (r0 int32) {
var _rc int32
var _p *TVdbe
_p = (*TVdbe)(_pStmt)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
- if _n > uint64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&((*Xsqlite3)(_p.X0).X31))))) + 4*uintptr(i32(0))))) {
- _rc = i32(18)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
+ if _n > uint64(*elem8((*int32)(unsafe.Pointer(&((*Xsqlite3)(_p.Xdb).XaLimit))), 0)) {
+ _rc = int32(18)
goto _1
}
func() {
- if (_n & uint64(i32(2147483647))) != _n {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(77558), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_bind_zeroblob64Ø00__func__Ø000))), unsafe.Pointer(str(130222)))
+ if (_n & uint64(2147483647)) != _n {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(77558), unsafe.Pointer(&_sqlite3_bind_zeroblob64Ø00__func__Ø000), unsafe.Pointer(str(130235)))
crt.X__builtin_abort(tls)
}
}()
_rc = Xsqlite3_bind_zeroblob(tls, _pStmt, _i, int32(_n))
_1:
- _rc = _sqlite3ApiExit(tls, (*Xsqlite3)(_p.X0), _rc)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.X0).X3))
+ _rc = _sqlite3ApiExit(tls, (*Xsqlite3)(_p.Xdb), _rc)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_p.Xdb).Xmutex))
return _rc
}
var _sqlite3_bind_zeroblob64Ø00__func__Ø000 [24]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_bind_zeroblob64Ø00__func__Ø000[0], str(130242), 24)
-}
-
+ crt.Xstrncpy(nil, &_sqlite3_bind_zeroblob64Ø00__func__Ø000[0], str(130255), 24)
+}
+
+// C comment
+// /*
+// ** CAPI3REF: Finding The Subtype Of SQL Values
+// ** METHOD: sqlite3_value
+// **
+// ** The sqlite3_value_subtype(V) function returns the subtype for
+// ** an [application-defined SQL function] argument V. The subtype
+// ** information can be used to pass a limited amount of context from
+// ** one SQL function to another. Use the [sqlite3_result_subtype()]
+// ** routine to set the subtype for the return value of an SQL function.
+// **
+// ** SQLite makes no use of subtype itself. It merely passes the subtype
+// ** from the result of one [application-defined SQL function] into the
+// ** input of another.
+// */
func Xsqlite3_value_subtype(tls *crt.TLS, _pVal *XMem) (r0 uint32) {
var _pMem *XMem
_pMem = _pVal
return uint32(func() int32 {
- if (int32(_pMem.X1) & i32(32768)) != 0 {
- return int32(_pMem.X3)
+ if (int32(_pMem.Xflags) & int32(32768)) != 0 {
+ return int32(_pMem.XeSubtype)
}
- return i32(0)
+ return int32(0)
}())
}
+// C comment
+// /*
+// ** CAPI3REF: Setting The Subtype Of An SQL Function
+// ** METHOD: sqlite3_context
+// **
+// ** The sqlite3_result_subtype(C,T) function causes the subtype of
+// ** the result from the [application-defined SQL function] with
+// ** [sqlite3_context] C to be the value T. Only the lower 8 bits
+// ** of the subtype T are preserved in current versions of SQLite;
+// ** higher order bits are discarded.
+// ** The number of subtype bytes preserved by SQLite might increase
+// ** in future releases of SQLite.
+// */
func Xsqlite3_result_subtype(tls *crt.TLS, _pCtx *Xsqlite3_context, _eSubtype uint32) {
var _pOut *XMem
- _pOut = (*XMem)(_pCtx.X0)
+ _pOut = (*XMem)(_pCtx.XpOut)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pOut.X9).X3)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(76478), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_result_subtypeØ00__func__Ø000))), unsafe.Pointer(str(130160)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_pOut.Xdb).Xmutex)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(76478), unsafe.Pointer(&_sqlite3_result_subtypeØ00__func__Ø000), unsafe.Pointer(str(130173)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pOut.X3))) = uint8(_eSubtype & uint32(i32(255)))
+ _pOut.XeSubtype = uint8(_eSubtype & uint32(255))
{
- p := (*uint16)(unsafe.Pointer(&(_pOut.X1)))
- *p = uint16(int32(*p) | i32(32768))
- sink14(*p)
+ p := &_pOut.Xflags
+ *p = uint16(int32(*p) | int32(32768))
}
}
var _sqlite3_result_subtypeØ00__func__Ø000 [23]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_result_subtypeØ00__func__Ø000[0], str(130266), 23)
+ crt.Xstrncpy(nil, &_sqlite3_result_subtypeØ00__func__Ø000[0], str(130279), 23)
}
-// Flush any dirty pages in the pager-cache for any attached database
-// to disk.
+// C comment
+// /*
+// ** Flush any dirty pages in the pager-cache for any attached database
+// ** to disk.
+// */
func Xsqlite3_db_cacheflush(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
var _i, _rc, _bSeenBusy int32
var _1_pBt *XBtree
var _2_pPager *XPager
- _rc = i32(0)
- _bSeenBusy = i32(0)
+ _rc = int32(0)
+ _bSeenBusy = int32(0)
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(141232))
+ return _sqlite3MisuseError(tls, int32(141232))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
_sqlite3BtreeEnterAll(tls, _db)
- _i = i32(0)
+ _i = int32(0)
_1:
- if _rc != i32(0) || _i >= (_db.X5) {
+ if _rc != int32(0) || _i >= _db.XnDb {
goto _5
}
- _1_pBt = (*XBtree)((*XDb)(unsafe.Pointer(uintptr(_db.X4) + 16*uintptr(_i))).X1)
+ _1_pBt = (*XBtree)(elem27((*XDb)(_db.XaDb), uintptr(_i)).XpBt)
if _1_pBt == nil || _sqlite3BtreeIsInTrans(tls, _1_pBt) == 0 {
goto _7
}
_2_pPager = _sqlite3BtreePager(tls, _1_pBt)
_rc = _sqlite3PagerFlush(tls, _2_pPager)
- if _rc == i32(5) {
- _bSeenBusy = i32(1)
- _rc = i32(0)
+ if _rc == int32(5) {
+ _bSeenBusy = int32(1)
+ _rc = int32(0)
}
_7:
_i += 1
goto _1
_5:
_sqlite3BtreeLeaveAll(tls, _db)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
return func() int32 {
- if (_rc == i32(0)) && _bSeenBusy != 0 {
- return i32(5)
+ if (_rc == int32(0)) && _bSeenBusy != 0 {
+ return int32(5)
}
return _rc
}()
}
-// Flush all unreferenced dirty pages to disk.
+// C comment
+// /*
+// ** Flush all unreferenced dirty pages to disk.
+// */
func _sqlite3PagerFlush(tls *crt.TLS, _pPager *XPager) (r0 int32) {
var _rc int32
var _1_pList, _2_pNext *XPgHdr
- _rc = _pPager.X26
- if (_pPager.X13) != 0 {
+ _rc = _pPager.XerrCode
+ if _pPager.XmemDb != 0 {
goto _0
}
- _1_pList = _sqlite3PcacheDirtyList(tls, (*XPCache)(_pPager.X59))
+ _1_pList = _sqlite3PcacheDirtyList(tls, (*XPCache)(_pPager.XpPCache))
func() {
if _assert_pager_state(tls, _pPager) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(51520), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3PagerFlushØ00__func__Ø000))), unsafe.Pointer(str(11016)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(51520), unsafe.Pointer(&_sqlite3PagerFlushØ00__func__Ø000), unsafe.Pointer(str(10971)))
crt.X__builtin_abort(tls)
}
}()
_3:
- if _rc != i32(0) || _1_pList == nil {
+ if _rc != int32(0) || _1_pList == nil {
goto _4
}
- _2_pNext = (*XPgHdr)(_1_pList.X3)
- if int32(_1_pList.X7) == i32(0) {
- _rc = _pagerStress(tls, (unsafe.Pointer)(_pPager), _1_pList)
+ _2_pNext = (*XPgHdr)(_1_pList.XpDirty)
+ if int32(_1_pList.XnRef) == int32(0) {
+ _rc = _pagerStress(tls, unsafe.Pointer(_pPager), _1_pList)
}
_1_pList = _2_pNext
goto _3
@@ -112911,48 +114626,60 @@ _0:
var _sqlite3PagerFlushØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3PagerFlushØ00__func__Ø000[0], str(130289), 18)
+ crt.Xstrncpy(nil, &_sqlite3PagerFlushØ00__func__Ø000[0], str(130302), 18)
}
+// C comment
+// /*
+// ** CAPI3REF: Low-level system error code
+// **
+// ** ^Attempt to return the underlying operating system error code or error
+// ** number that caused the most recent I/O error or failure to open a file.
+// ** The return value is OS-dependent. For example, on unix systems, after
+// ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
+// ** called to get back the underlying "errno" that caused the problem, such
+// ** as ENOSPC, EAUTH, EISDIR, and so forth.
+// */
func Xsqlite3_system_errno(tls *crt.TLS, _db *Xsqlite3) (r0 int32) {
return func() int32 {
if _db != nil {
- return (_db.X12)
+ return _db.XiSysErrno
}
- return i32(0)
+ return int32(0)
}()
}
-// Register a trace callback using the version-2 interface.
+// C comment
+// /* Register a trace callback using the version-2 interface.
+// */
func Xsqlite3_trace_v2(tls *crt.TLS, _db *Xsqlite3, _mTrace uint32, _xTrace func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32, _pArg unsafe.Pointer) (r0 int32) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- return _sqlite3MisuseError(tls, i32(142326))
+ return _sqlite3MisuseError(tls, int32(142326))
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- if _mTrace == uint32(i32(0)) {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ if _mTrace == (0) {
_xTrace = nil
}
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32
- }{_xTrace})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32
- }{nil})) {
- _mTrace = uint32(i32(0))
- }
- *(*uint8)(unsafe.Pointer(&(_db.X24))) = uint8(_mTrace)
- *(*func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32)(unsafe.Pointer(&(_db.X41))) = _xTrace
- *(*unsafe.Pointer)(unsafe.Pointer(&(_db.X42))) = _pArg
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return i32(0)
-}
-
-// Return the SQL associated with a prepared statement with
-// bound parameters expanded. Space to hold the returned string is
-// obtained from sqlite3_malloc(). The caller is responsible for
-// freeing the returned string by passing it to sqlite3_free().
-//
-// The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
-// expanded bound parameters.
+ if _xTrace == nil {
+ _mTrace = 0
+ }
+ _db.XmTrace = uint8(_mTrace)
+ _db.XxTrace = _xTrace
+ _db.XpTraceArg = _pArg
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Return the SQL associated with a prepared statement with
+// ** bound parameters expanded. Space to hold the returned string is
+// ** obtained from sqlite3_malloc(). The caller is responsible for
+// ** freeing the returned string by passing it to sqlite3_free().
+// **
+// ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
+// ** expanded bound parameters.
+// */
func Xsqlite3_expanded_sql(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 *int8) {
var _z, _zSql *int8
var _1_p *TVdbe
@@ -112960,34 +114687,37 @@ func Xsqlite3_expanded_sql(tls *crt.TLS, _pStmt unsafe.Pointer) (r0 *int8) {
_zSql = Xsqlite3_sql(tls, _pStmt)
if _zSql != nil {
_1_p = (*TVdbe)(_pStmt)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_1_p.X0).X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_1_p.Xdb).Xmutex))
_z = _sqlite3VdbeExpandSql(tls, _1_p, _zSql)
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_1_p.X0).X3))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)((*Xsqlite3)(_1_p.Xdb).Xmutex))
}
return _z
}
-// Set the value returned by the sqlite3_last_insert_rowid() API function.
+// C comment
+// /*
+// ** Set the value returned by the sqlite3_last_insert_rowid() API function.
+// */
func Xsqlite3_set_last_insert_rowid(tls *crt.TLS, _db *Xsqlite3, _iRowid int64) {
if _sqlite3SafetyCheckOk(tls, _db) == 0 {
- _sqlite3MisuseError(tls, i32(141398))
+ _sqlite3MisuseError(tls, int32(141398))
return
}
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
- *(*int64)(unsafe.Pointer(&(_db.X7))) = _iRowid
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ _db.XlastRowid = _iRowid
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
}
func _compileoptionusedFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _zOptName *int8
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106483), unsafe.Pointer((*int8)(unsafe.Pointer(&_compileoptionusedFuncØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106483), unsafe.Pointer(&_compileoptionusedFuncØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- if store0(&_zOptName, (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))))) != nil {
+ if store1(&_zOptName, (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0))))) != nil {
Xsqlite3_result_int(tls, _context, Xsqlite3_compileoption_used(tls, _zOptName))
}
}
@@ -112995,78 +114725,84 @@ func _compileoptionusedFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int3
var _compileoptionusedFuncØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_compileoptionusedFuncØ00__func__Ø000[0], str(130307), 22)
+ crt.Xstrncpy(nil, &_compileoptionusedFuncØ00__func__Ø000[0], str(130320), 22)
}
func _compileoptiongetFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _n int32
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106507), unsafe.Pointer((*int8)(unsafe.Pointer(&_compileoptiongetFuncØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106507), unsafe.Pointer(&_compileoptiongetFuncØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- _n = Xsqlite3_value_int(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- Xsqlite3_result_text(tls, _context, Xsqlite3_compileoption_get(tls, _n), i32(-1), nil)
+ _n = Xsqlite3_value_int(tls, *elem19(_argv, 0))
+ Xsqlite3_result_text(tls, _context, Xsqlite3_compileoption_get(tls, _n), int32(-1), nil)
}
var _compileoptiongetFuncØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_compileoptiongetFuncØ00__func__Ø000[0], str(130329), 21)
+ crt.Xstrncpy(nil, &_compileoptiongetFuncØ00__func__Ø000[0], str(130342), 21)
}
-// Implementation of the sqlite_version() function. The result is the version
-// of the SQLite library that is running.
+// C comment
+// /*
+// ** Implementation of the sqlite_version() function. The result is the version
+// ** of the SQLite library that is running.
+// */
func _versionFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
_ = _NotUsed2
- Xsqlite3_result_text(tls, _context, Xsqlite3_libversion(tls), i32(-1), nil)
+ Xsqlite3_result_text(tls, _context, Xsqlite3_libversion(tls), int32(-1), nil)
}
-// Implementation of the TRIM(), LTRIM(), and RTRIM() functions.
-// The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both.
+// C comment
+// /*
+// ** Implementation of the TRIM(), LTRIM(), and RTRIM() functions.
+// ** The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both.
+// */
func _trimFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _nIn, _flags, _i, _nChar, _17_len, _20_len int32
var _zIn, _zCharSet, _aLen, _4_z *uint8
var _azChar **uint8
_aLen = nil
_azChar = nil
- if Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) == i32(5) {
+ if Xsqlite3_value_type(tls, *elem19(_argv, 0)) == int32(5) {
return
}
- _zIn = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _zIn = Xsqlite3_value_text(tls, *elem19(_argv, 0))
if _zIn == nil {
return
}
- _nIn = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _nIn = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
func() {
- if _zIn != Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106818), unsafe.Pointer((*int8)(unsafe.Pointer(&_trimFuncØ00__func__Ø000))), unsafe.Pointer(str(130350)))
+ if _zIn != Xsqlite3_value_text(tls, *elem19(_argv, 0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106818), unsafe.Pointer(&_trimFuncØ00__func__Ø000), unsafe.Pointer(str(130363)))
crt.X__builtin_abort(tls)
}
}()
- if _argc == i32(1) {
- _nChar = i32(1)
+ if _argc == int32(1) {
+ _nChar = int32(1)
_aLen = (*uint8)(unsafe.Pointer(&_trimFuncØ00lenOneØ001))
_azChar = (**uint8)(unsafe.Pointer(&_trimFuncØ00azOneØ002))
_zCharSet = nil
goto _7
}
- if store13(&_zCharSet, Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))) == nil {
+ if store15(&_zCharSet, Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))) == nil {
return
}
- *func() *int32 { _4_z = _zCharSet; return &_nChar }() = i32(0)
+ *func() *int32 { _4_z = _zCharSet; return &_nChar }() = int32(0)
_8:
if (*_4_z) == 0 {
goto _11
}
- if int32(*postInc13(&_4_z, 1)) < i32(192) {
+ if int32(*postInc15(&_4_z, 1)) < int32(192) {
goto _12
}
_13:
- if (int32(*_4_z) & i32(192)) == i32(128) {
+ if (int32(*_4_z) & int32(192)) == int32(128) {
*(*uintptr)(unsafe.Pointer(&_4_z)) += uintptr(1)
goto _13
}
@@ -113074,54 +114810,54 @@ _12:
_nChar += 1
goto _8
_11:
- if _nChar <= i32(0) {
+ if _nChar <= int32(0) {
goto _15
}
- _azChar = (**uint8)(_contextMalloc(tls, _context, int64(_nChar)*int64(u32(5))))
+ _azChar = (**uint8)(_contextMalloc(tls, _context, int64(_nChar)*int64(5)))
if _azChar == nil {
return
}
- _aLen = (*uint8)(unsafe.Pointer((**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azChar)) + 4*uintptr(_nChar)))))
- *func() *int32 { _4_z = _zCharSet; return &_nChar }() = i32(0)
+ _aLen = (*uint8)(unsafe.Pointer(elem88(_azChar, uintptr(_nChar))))
+ *func() *int32 { _4_z = _zCharSet; return &_nChar }() = int32(0)
_17:
if (*_4_z) == 0 {
goto _20
}
- *(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azChar)) + 4*uintptr(_nChar))) = _4_z
- if int32(*postInc13(&_4_z, 1)) < i32(192) {
+ *elem88(_azChar, uintptr(_nChar)) = _4_z
+ if int32(*postInc15(&_4_z, 1)) < int32(192) {
goto _21
}
_22:
- if (int32(*_4_z) & i32(192)) == i32(128) {
+ if (int32(*_4_z) & int32(192)) == int32(128) {
*(*uintptr)(unsafe.Pointer(&_4_z)) += uintptr(1)
goto _22
}
_21:
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aLen)) + 1*uintptr(_nChar))) = uint8(int32((uintptr(unsafe.Pointer(_4_z)) - uintptr(unsafe.Pointer(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azChar)) + 4*uintptr(_nChar)))))) / 1))
+ *elem15(_aLen, uintptr(_nChar)) = uint8(int32(uintptr(unsafe.Pointer(_4_z)) - uintptr(unsafe.Pointer(*elem88(_azChar, uintptr(_nChar))))))
_nChar += 1
goto _17
_20:
_15:
_7:
- if _nChar <= i32(0) {
+ if _nChar <= int32(0) {
goto _24
}
- _flags = int32(uintptr(Xsqlite3_user_data(tls, _context)))
- if (_flags & i32(1)) == 0 {
+ _flags = int32(crt.P2U(Xsqlite3_user_data(tls, _context)))
+ if (_flags & int32(1)) == 0 {
goto _25
}
_26:
- if _nIn <= i32(0) {
+ if _nIn <= int32(0) {
goto _27
}
- _17_len = i32(0)
- _i = i32(0)
+ _17_len = int32(0)
+ _i = int32(0)
_28:
if _i >= _nChar {
goto _31
}
- _17_len = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aLen)) + 1*uintptr(_i))))
- if (_17_len <= _nIn) && (crt.Xmemcmp(tls, (unsafe.Pointer)(_zIn), (unsafe.Pointer)(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azChar)) + 4*uintptr(_i)))), uint32(_17_len)) == i32(0)) {
+ _17_len = int32(*elem15(_aLen, uintptr(_i)))
+ if (_17_len <= _nIn) && (crt.Xmemcmp(tls, unsafe.Pointer(_zIn), unsafe.Pointer(*elem88(_azChar, uintptr(_i))), uint32(_17_len)) == int32(0)) {
goto _31
}
_i += 1
@@ -113130,34 +114866,26 @@ _31:
if _i >= _nChar {
goto _27
}
- {
- p := &_zIn
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_17_len)))
- sink13(*p)
- }
- {
- p := &_nIn
- *p = (*p) - _17_len
- sink1(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zIn)) += uintptr(_17_len)
+ _nIn -= _17_len
goto _26
_27:
_25:
- if (_flags & i32(2)) == 0 {
+ if (_flags & int32(2)) == 0 {
goto _35
}
_36:
- if _nIn <= i32(0) {
+ if _nIn <= int32(0) {
goto _37
}
- _20_len = i32(0)
- _i = i32(0)
+ _20_len = int32(0)
+ _i = int32(0)
_38:
if _i >= _nChar {
goto _41
}
- _20_len = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aLen)) + 1*uintptr(_i))))
- if (_20_len <= _nIn) && (crt.Xmemcmp(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIn))+1*uintptr(_nIn-_20_len)))), (unsafe.Pointer)(*(**uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azChar)) + 4*uintptr(_i)))), uint32(_20_len)) == i32(0)) {
+ _20_len = int32(*elem15(_aLen, uintptr(_i)))
+ if (_20_len <= _nIn) && (crt.Xmemcmp(tls, unsafe.Pointer(elem15(_zIn, uintptr(_nIn-_20_len))), unsafe.Pointer(*elem88(_azChar, uintptr(_i))), uint32(_20_len)) == int32(0)) {
goto _41
}
_i += 1
@@ -113166,16 +114894,12 @@ _41:
if _i >= _nChar {
goto _37
}
- {
- p := &_nIn
- *p = (*p) - _20_len
- sink1(*p)
- }
+ _nIn -= _20_len
goto _36
_37:
_35:
if _zCharSet != nil {
- Xsqlite3_free(tls, (unsafe.Pointer)(_azChar))
+ Xsqlite3_free(tls, unsafe.Pointer(_azChar))
}
_24:
Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(_zIn)), _nIn, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
@@ -113184,7 +114908,7 @@ _24:
var _trimFuncØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_trimFuncØ00__func__Ø000[0], str(130383), 9)
+ crt.Xstrncpy(nil, &_trimFuncØ00__func__Ø000[0], str(130396), 9)
}
var _trimFuncØ00lenOneØ001 [1]uint8
@@ -113196,25 +114920,28 @@ func init() {
var _trimFuncØ00azOneØ002 [1]*uint8
func init() {
- _trimFuncØ00azOneØ002 = [1]*uint8{(*byte)(unsafe.Pointer(str(119934)))}
+ _trimFuncØ00azOneØ002 = [1]*uint8{(*byte)(unsafe.Pointer(str(119962)))}
}
-// Allocate nByte bytes of space using sqlite3Malloc(). If the
-// allocation fails, call sqlite3_result_error_nomem() to notify
-// the database handle that malloc() has failed and return NULL.
-// If nByte is larger than the maximum string or blob length, then
-// raise an SQLITE_TOOBIG exception and return NULL.
+// C comment
+// /*
+// ** Allocate nByte bytes of space using sqlite3Malloc(). If the
+// ** allocation fails, call sqlite3_result_error_nomem() to notify
+// ** the database handle that malloc() has failed and return NULL.
+// ** If nByte is larger than the maximum string or blob length, then
+// ** raise an SQLITE_TOOBIG exception and return NULL.
+// */
func _contextMalloc(tls *crt.TLS, _context *Xsqlite3_context, _nByte int64) (r0 unsafe.Pointer) {
var _z *int8
var _db *Xsqlite3
_db = Xsqlite3_context_db_handle(tls, _context)
func() {
- if _nByte <= int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105944), unsafe.Pointer((*int8)(unsafe.Pointer(&_contextMallocØ00__func__Ø000))), unsafe.Pointer(str(130392)))
+ if _nByte <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105944), unsafe.Pointer(&_contextMallocØ00__func__Ø000), unsafe.Pointer(str(130405)))
crt.X__builtin_abort(tls)
}
}()
- if _nByte > int64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0))))) {
+ if _nByte > int64(*elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0)) {
Xsqlite3_result_error_toobig(tls, _context)
_z = nil
goto _3
@@ -113224,128 +114951,137 @@ func _contextMalloc(tls *crt.TLS, _context *Xsqlite3_context, _nByte int64) (r0
Xsqlite3_result_error_nomem(tls, _context)
}
_3:
- return (unsafe.Pointer)(_z)
+ return unsafe.Pointer(_z)
}
var _contextMallocØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_contextMallocØ00__func__Ø000[0], str(130400), 14)
+ crt.Xstrncpy(nil, &_contextMallocØ00__func__Ø000[0], str(130413), 14)
}
-// Implementation of the non-aggregate min() and max() functions
+// C comment
+// /*
+// ** Implementation of the non-aggregate min() and max() functions
+// */
func _minmaxFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _i, _mask, _iBest int32
var _pColl *XCollSeq
func() {
- if _argc <= i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105594), unsafe.Pointer((*int8)(unsafe.Pointer(&_minmaxFuncØ00__func__Ø000))), unsafe.Pointer(str(130414)))
+ if _argc <= int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105594), unsafe.Pointer(&_minmaxFuncØ00__func__Ø000), unsafe.Pointer(str(130427)))
crt.X__builtin_abort(tls)
}
}()
_mask = func() int32 {
if Xsqlite3_user_data(tls, _context) == nil {
- return i32(0)
+ return int32(0)
}
- return i32(-1)
+ return int32(-1)
}()
_pColl = _sqlite3GetFuncCollSeq(tls, _context)
func() {
if _pColl == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105597), unsafe.Pointer((*int8)(unsafe.Pointer(&_minmaxFuncØ00__func__Ø000))), unsafe.Pointer(str(130421)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105597), unsafe.Pointer(&_minmaxFuncØ00__func__Ø000), unsafe.Pointer(str(130434)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _mask != i32(-1) && _mask != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105598), unsafe.Pointer((*int8)(unsafe.Pointer(&_minmaxFuncØ00__func__Ø000))), unsafe.Pointer(str(130427)))
+ if _mask != int32(-1) && _mask != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105598), unsafe.Pointer(&_minmaxFuncØ00__func__Ø000), unsafe.Pointer(str(130440)))
crt.X__builtin_abort(tls)
}
}()
- _iBest = i32(0)
- if Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) == i32(5) {
+ _iBest = int32(0)
+ if Xsqlite3_value_type(tls, *elem19(_argv, 0)) == int32(5) {
return
}
- _i = i32(1)
+ _i = int32(1)
_10:
if _i >= _argc {
goto _13
}
- if Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))) == i32(5) {
+ if Xsqlite3_value_type(tls, *elem19(_argv, uintptr(_i))) == int32(5) {
return
}
- if (_sqlite3MemCompare(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_iBest))), *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i))), _pColl) ^ _mask) >= i32(0) {
+ if (_sqlite3MemCompare(tls, *elem19(_argv, uintptr(_iBest)), *elem19(_argv, uintptr(_i)), _pColl) ^ _mask) >= int32(0) {
_iBest = _i
}
_i += 1
goto _10
_13:
- Xsqlite3_result_value(tls, _context, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_iBest))))
+ Xsqlite3_result_value(tls, _context, *elem19(_argv, uintptr(_iBest)))
}
var _minmaxFuncØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_minmaxFuncØ00__func__Ø000[0], str(130447), 11)
+ crt.Xstrncpy(nil, &_minmaxFuncØ00__func__Ø000[0], str(130460), 11)
}
-// Return the collating function associated with a function.
+// C comment
+// /*
+// ** Return the collating function associated with a function.
+// */
func _sqlite3GetFuncCollSeq(tls *crt.TLS, _context *Xsqlite3_context) (r0 *XCollSeq) {
var _pOp *XVdbeOp
func() {
- if (*TVdbe)(_context.X3) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105566), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GetFuncCollSeqØ00__func__Ø000))), unsafe.Pointer(str(130458)))
+ if (*TVdbe)(_context.XpVdbe) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105566), unsafe.Pointer(&_sqlite3GetFuncCollSeqØ00__func__Ø000), unsafe.Pointer(str(130471)))
crt.X__builtin_abort(tls)
}
}()
- _pOp = (*XVdbeOp)(unsafe.Pointer(uintptr((*TVdbe)(_context.X3).X17) + 24*uintptr((_context.X4)-i32(1))))
+ _pOp = elem61((*XVdbeOp)((*TVdbe)(_context.XpVdbe).XaOp), uintptr(_context.XiOp-int32(1)))
func() {
- if int32(_pOp.X0) != i32(68) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105568), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GetFuncCollSeqØ00__func__Ø000))), unsafe.Pointer(str(130476)))
+ if int32(_pOp.Xopcode) != int32(68) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105568), unsafe.Pointer(&_sqlite3GetFuncCollSeqØ00__func__Ø000), unsafe.Pointer(str(130489)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pOp.X1) != i32(-3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105569), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3GetFuncCollSeqØ00__func__Ø000))), unsafe.Pointer(str(64393)))
+ if int32(_pOp.Xp4type) != int32(-3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105569), unsafe.Pointer(&_sqlite3GetFuncCollSeqØ00__func__Ø000), unsafe.Pointer(str(62535)))
crt.X__builtin_abort(tls)
}
}()
- return (*XCollSeq)(*(*unsafe.Pointer)(unsafe.Pointer((*t39)(unsafe.Pointer(&(_pOp.X6))))))
+ return (*XCollSeq)(*(*unsafe.Pointer)(unsafe.Pointer(&_pOp.Xp4)))
}
var _sqlite3GetFuncCollSeqØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3GetFuncCollSeqØ00__func__Ø000[0], str(130500), 22)
+ crt.Xstrncpy(nil, &_sqlite3GetFuncCollSeqØ00__func__Ø000[0], str(130513), 22)
}
-// Routines to implement min() and max() aggregate functions.
+// C comment
+// /*
+// ** Routines to implement min() and max() aggregate functions.
+// */
func _minmaxStep(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _argv **XMem) {
var _2_max, _2_cmp int32
var _pArg, _pBest *XMem
var _2_pColl *XCollSeq
- _pArg = *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))
+ _pArg = *elem19(_argv, 0)
- _pBest = (*XMem)(Xsqlite3_aggregate_context(tls, _context, int32(u32(48))))
+ _pBest = (*XMem)(Xsqlite3_aggregate_context(tls, _context, int32(48)))
if _pBest == nil {
return
}
- if Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) != i32(5) {
+ if Xsqlite3_value_type(tls, *elem19(_argv, 0)) != int32(5) {
goto _1
}
- if (_pBest.X1) != 0 {
+ if _pBest.Xflags != 0 {
_sqlite3SkipAccumulatorLoad(tls, _context)
}
goto _10
_1:
- if (_pBest.X1) == 0 {
+ if _pBest.Xflags == 0 {
goto _4
}
_2_pColl = _sqlite3GetFuncCollSeq(tls, _context)
_2_max = bool2int(Xsqlite3_user_data(tls, _context) != nil)
_2_cmp = _sqlite3MemCompare(tls, _pBest, _pArg, _2_pColl)
- if (_2_max != 0 && (_2_cmp < i32(0))) || ((_2_max == 0) && (_2_cmp > i32(0))) {
+ if (_2_max != 0 && (_2_cmp < int32(0))) || ((_2_max == 0) && (_2_cmp > int32(0))) {
_sqlite3VdbeMemCopy(tls, _pBest, _pArg)
goto _9
}
@@ -113353,110 +115089,119 @@ _1:
_9:
goto _10
_4:
- *(**Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pBest.X9))))) = Xsqlite3_context_db_handle(tls, _context)
+ *(**Xsqlite3)(unsafe.Pointer(&_pBest.Xdb)) = Xsqlite3_context_db_handle(tls, _context)
_sqlite3VdbeMemCopy(tls, _pBest, _pArg)
_10:
}
-// Indicate that the accumulator load should be skipped on this
-// iteration of the aggregate loop.
+// C comment
+// /*
+// ** Indicate that the accumulator load should be skipped on this
+// ** iteration of the aggregate loop.
+// */
func _sqlite3SkipAccumulatorLoad(tls *crt.TLS, _context *Xsqlite3_context) {
- *(*uint8)(unsafe.Pointer(&(_context.X6))) = uint8(i32(1))
+ _context.XskipFlag = uint8(1)
}
func _minMaxFinalize(tls *crt.TLS, _context *Xsqlite3_context) {
var _pRes *XMem
- _pRes = (*XMem)(Xsqlite3_aggregate_context(tls, _context, i32(0)))
+ _pRes = (*XMem)(Xsqlite3_aggregate_context(tls, _context, int32(0)))
if _pRes == nil {
goto _0
}
- if (_pRes.X1) != 0 {
+ if _pRes.Xflags != 0 {
Xsqlite3_result_value(tls, _context, _pRes)
}
_sqlite3VdbeMemRelease(tls, _pRes)
_0:
}
-// Return the type of the argument.
+// C comment
+// /*
+// ** Return the type of the argument.
+// */
func _typeofFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _argv **XMem) {
var _z *int8
_z = nil
- switch Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) {
- case i32(1):
+ switch Xsqlite3_value_type(tls, *elem19(_argv, 0)) {
+ case int32(1):
goto _1
- case i32(2):
+ case int32(2):
goto _3
- case i32(3):
+ case int32(3):
goto _2
- case i32(4):
+ case int32(4):
goto _4
default:
goto _5
}
_1:
- _z = str(42875)
+ _z = str(42830)
goto _6
_2:
- _z = str(42862)
+ _z = str(42817)
goto _6
_3:
- _z = str(42883)
+ _z = str(42838)
goto _6
_4:
- _z = str(42857)
+ _z = str(42812)
goto _6
_5:
- _z = str(128753)
+ _z = str(128774)
goto _6
_6:
- Xsqlite3_result_text(tls, _context, _z, i32(-1), nil)
+ Xsqlite3_result_text(tls, _context, _z, int32(-1), nil)
}
-// Implementation of the length() function
+// C comment
+// /*
+// ** Implementation of the length() function
+// */
func _lengthFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _len int32
var _3_z *uint8
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105642), unsafe.Pointer((*int8)(unsafe.Pointer(&_lengthFuncØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105642), unsafe.Pointer(&_lengthFuncØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- switch Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) {
- case i32(1):
+ switch Xsqlite3_value_type(tls, *elem19(_argv, 0)) {
+ case int32(1):
goto _3
- case i32(2):
+ case int32(2):
goto _3
- case i32(3):
+ case int32(3):
goto _6
- case i32(4):
+ case int32(4):
goto _3
default:
goto _7
}
_3:
- Xsqlite3_result_int(tls, _context, Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
+ Xsqlite3_result_int(tls, _context, Xsqlite3_value_bytes(tls, *elem19(_argv, 0)))
goto _8
_6:
- _3_z = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _3_z = Xsqlite3_value_text(tls, *elem19(_argv, 0))
if _3_z == nil {
return
}
- _len = i32(0)
+ _len = int32(0)
_10:
if (*_3_z) == 0 {
goto _11
}
_len += 1
- if int32(*postInc13(&_3_z, 1)) < i32(192) {
+ if int32(*postInc15(&_3_z, 1)) < int32(192) {
goto _12
}
_13:
- if (int32(*_3_z) & i32(192)) == i32(128) {
+ if (int32(*_3_z) & int32(192)) == int32(128) {
*(*uintptr)(unsafe.Pointer(&_3_z)) += uintptr(1)
goto _13
}
@@ -113474,67 +115219,73 @@ _8:
var _lengthFuncØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_lengthFuncØ00__func__Ø000[0], str(130522), 11)
+ crt.Xstrncpy(nil, &_lengthFuncØ00__func__Ø000[0], str(130535), 11)
}
-// Implementation of the instr() function.
-//
-// instr(haystack,needle) finds the first occurrence of needle
-// in haystack and returns the number of previous characters plus 1,
-// or 0 if needle does not occur within haystack.
-//
-// If both haystack and needle are BLOBs, then the result is one more than
-// the number of bytes in haystack prior to the first occurrence of needle,
-// or 0 if needle never occurs in haystack.
+// C comment
+// /*
+// ** Implementation of the instr() function.
+// **
+// ** instr(haystack,needle) finds the first occurrence of needle
+// ** in haystack and returns the number of previous characters plus 1,
+// ** or 0 if needle does not occur within haystack.
+// **
+// ** If both haystack and needle are BLOBs, then the result is one more than
+// ** the number of bytes in haystack prior to the first occurrence of needle,
+// ** or 0 if needle never occurs in haystack.
+// */
func _instrFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _nHaystack, _nNeedle, _typeHaystack, _typeNeedle, _N, _isText int32
var _zHaystack, _zNeedle *uint8
- _N = i32(1)
+ _N = int32(1)
- _typeHaystack = Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- _typeNeedle = Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
- if (_typeHaystack == i32(5)) || (_typeNeedle == i32(5)) {
+ _typeHaystack = Xsqlite3_value_type(tls, *elem19(_argv, 0))
+ _typeNeedle = Xsqlite3_value_type(tls, *elem19(_argv, uintptr(1)))
+ if (_typeHaystack == int32(5)) || (_typeNeedle == int32(5)) {
return
}
- _nHaystack = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- _nNeedle = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
- if _nNeedle <= i32(0) {
+ _nHaystack = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
+ _nNeedle = Xsqlite3_value_bytes(tls, *elem19(_argv, uintptr(1)))
+ if _nNeedle <= int32(0) {
goto _2
}
- if (_typeHaystack == i32(4)) && (_typeNeedle == i32(4)) {
- _zHaystack = (*uint8)(Xsqlite3_value_blob(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
- _zNeedle = (*uint8)(Xsqlite3_value_blob(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))))
- _isText = i32(0)
+ if (_typeHaystack == int32(4)) && (_typeNeedle == int32(4)) {
+ _zHaystack = (*uint8)(Xsqlite3_value_blob(tls, *elem19(_argv, 0)))
+ _zNeedle = (*uint8)(Xsqlite3_value_blob(tls, *elem19(_argv, uintptr(1))))
+ _isText = int32(0)
goto _5
}
- _zHaystack = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- _zNeedle = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
- _isText = i32(1)
+ _zHaystack = Xsqlite3_value_text(tls, *elem19(_argv, 0))
+ _zNeedle = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))
+ _isText = int32(1)
_5:
if (_zNeedle == nil) || (_nHaystack != 0 && (_zHaystack == nil)) {
return
}
_8:
- if _nNeedle > _nHaystack || crt.Xmemcmp(tls, (unsafe.Pointer)(_zHaystack), (unsafe.Pointer)(_zNeedle), uint32(_nNeedle)) == i32(0) {
+ if _nNeedle > _nHaystack || crt.Xmemcmp(tls, unsafe.Pointer(_zHaystack), unsafe.Pointer(_zNeedle), uint32(_nNeedle)) == int32(0) {
goto _10
}
_N += 1
_12:
_nHaystack -= 1
*(*uintptr)(unsafe.Pointer(&_zHaystack)) += uintptr(1)
- if _isText != 0 && ((int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zHaystack)) + 1*uintptr(i32(0))))) & i32(192)) == i32(128)) {
+ if _isText != 0 && ((int32(*elem15(_zHaystack, 0)) & int32(192)) == int32(128)) {
goto _12
}
goto _8
_10:
if _nNeedle > _nHaystack {
- _N = i32(0)
+ _N = int32(0)
}
_2:
Xsqlite3_result_int(tls, _context, _N)
}
-// Implementation of the printf() function.
+// C comment
+// /*
+// ** Implementation of the printf() function.
+// */
func _printfFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _n int32
var _zFormat *int8
@@ -113542,112 +115293,120 @@ func _printfFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **
var _str XStrAccum
var _x XPrintfArguments
_db = Xsqlite3_context_db_handle(tls, _context)
- if (_argc >= i32(1)) && (store0(&_zFormat, (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))))) != nil) {
- *(*int32)(unsafe.Pointer(&(_x.X0))) = _argc - i32(1)
- *(*int32)(unsafe.Pointer(&(_x.X1))) = i32(0)
- *(***XMem)(unsafe.Pointer((**unsafe.Pointer)(unsafe.Pointer(&(_x.X2))))) = (**XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv)) + uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(i32(1))))))*uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(4)))))))))))
- _sqlite3StrAccumInit(tls, &_str, _db, nil, i32(0), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_db.X31))))) + 4*uintptr(i32(0)))))
- *(*uint8)(unsafe.Pointer(&(_str.X7))) = uint8(i32(2))
+ if (_argc >= int32(1)) && (store1(&_zFormat, (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0))))) != nil) {
+ _x.XnArg = _argc - int32(1)
+ _x.XnUsed = int32(0)
+ *(***XMem)(unsafe.Pointer(&_x.XapArg)) = (**XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv)) + uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(int32(1))*uintptr(unsafe.Pointer((**XMem)(unsafe.Pointer(uintptr(4)))))))))))
+ _sqlite3StrAccumInit(tls, &_str, _db, nil, int32(0), *elem8((*int32)(unsafe.Pointer(&_db.XaLimit)), 0))
+ _str.XprintfFlags = uint8(2)
_sqlite3XPrintf(tls, &_str, _zFormat, unsafe.Pointer(&_x))
- _n = int32(_str.X3)
- Xsqlite3_result_text(tls, _context, _sqlite3StrAccumFinish(tls, &_str), _n, *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{_sqlite3MallocSize})))
+ _n = int32(_str.XnChar)
+ Xsqlite3_result_text(tls, _context, _sqlite3StrAccumFinish(tls, &_str), _n, func() func(*crt.TLS, unsafe.Pointer) {
+ v := _sqlite3MallocSize
+ return *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&v))
+ }())
}
- _ = _x
- _ = _str
}
-// The unicode() function. Return the integer unicode code-point value
-// for the first character of the input string.
+// C comment
+// /*
+// ** The unicode() function. Return the integer unicode code-point value
+// ** for the first character of the input string.
+// */
func _unicodeFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _z *uint8
- _z = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _z = Xsqlite3_value_text(tls, *elem19(_argv, 0))
- if (_z != nil) && ((*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != 0) {
+ if (_z != nil) && ((*elem15(_z, 0)) != 0) {
Xsqlite3_result_int(tls, _context, int32(_sqlite3Utf8Read(tls, &_z)))
}
}
-// The char() function takes zero or more arguments, each of which is
-// an integer. It constructs a string where each character of the string
-// is the unicode character for the corresponding integer argument.
+// C comment
+// /*
+// ** The char() function takes zero or more arguments, each of which is
+// ** an integer. It constructs a string where each character of the string
+// ** is the unicode character for the corresponding integer argument.
+// */
func _charFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _i int32
var _2_x int64
var _2_c uint32
var _z, _zOut *uint8
- _zOut = store13(&_z, (*uint8)(Xsqlite3_malloc64(tls, uint64((_argc*i32(4))+i32(1)))))
+ _zOut = store15(&_z, (*uint8)(Xsqlite3_malloc64(tls, uint64((_argc*int32(4))+int32(1)))))
if _z == nil {
Xsqlite3_result_error_nomem(tls, _context)
return
}
- _i = i32(0)
+ _i = int32(0)
_1:
if _i >= _argc {
goto _4
}
- _2_x = Xsqlite3_value_int64(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i))))
- if (_2_x < int64(i32(0))) || (_2_x > int64(i32(1114111))) {
- _2_x = int64(i32(65533))
+ _2_x = Xsqlite3_value_int64(tls, *elem19(_argv, uintptr(_i)))
+ if (_2_x < (0)) || (_2_x > int64(1114111)) {
+ _2_x = int64(65533)
}
- _2_c = uint32(_2_x & int64(i32(2097151)))
- if _2_c < uint32(i32(128)) {
- *postInc13(&_zOut, 1) = uint8(_2_c & uint32(i32(255)))
+ _2_c = uint32(_2_x & int64(2097151))
+ if _2_c < uint32(128) {
+ *postInc15(&_zOut, 1) = uint8(_2_c & uint32(255))
goto _12
}
- if _2_c < uint32(i32(2048)) {
- *postInc13(&_zOut, 1) = uint8(i32(192) + int32(uint8((_2_c>>uint(i32(6)))&uint32(i32(31)))))
- *postInc13(&_zOut, 1) = uint8(i32(128) + int32(uint8(_2_c&uint32(i32(63)))))
+ if _2_c < uint32(2048) {
+ *postInc15(&_zOut, 1) = uint8(int32(192) + int32(uint8((_2_c>>6)&uint32(31))))
+ *postInc15(&_zOut, 1) = uint8(int32(128) + int32(uint8(_2_c&uint32(63))))
goto _12
}
- if _2_c < uint32(i32(65536)) {
- *postInc13(&_zOut, 1) = uint8(i32(224) + int32(uint8((_2_c>>uint(i32(12)))&uint32(i32(15)))))
- *postInc13(&_zOut, 1) = uint8(i32(128) + int32(uint8((_2_c>>uint(i32(6)))&uint32(i32(63)))))
- *postInc13(&_zOut, 1) = uint8(i32(128) + int32(uint8(_2_c&uint32(i32(63)))))
+ if _2_c < uint32(65536) {
+ *postInc15(&_zOut, 1) = uint8(int32(224) + int32(uint8((_2_c>>12)&uint32(15))))
+ *postInc15(&_zOut, 1) = uint8(int32(128) + int32(uint8((_2_c>>6)&uint32(63))))
+ *postInc15(&_zOut, 1) = uint8(int32(128) + int32(uint8(_2_c&uint32(63))))
goto _12
}
- *postInc13(&_zOut, 1) = uint8(i32(240) + int32(uint8((_2_c>>uint(i32(18)))&uint32(i32(7)))))
- *postInc13(&_zOut, 1) = uint8(i32(128) + int32(uint8((_2_c>>uint(i32(12)))&uint32(i32(63)))))
- *postInc13(&_zOut, 1) = uint8(i32(128) + int32(uint8((_2_c>>uint(i32(6)))&uint32(i32(63)))))
- *postInc13(&_zOut, 1) = uint8(i32(128) + int32(uint8(_2_c&uint32(i32(63)))))
+ *postInc15(&_zOut, 1) = uint8(int32(240) + int32(uint8((_2_c>>18)&uint32(7))))
+ *postInc15(&_zOut, 1) = uint8(int32(128) + int32(uint8((_2_c>>12)&uint32(63))))
+ *postInc15(&_zOut, 1) = uint8(int32(128) + int32(uint8((_2_c>>6)&uint32(63))))
+ *postInc15(&_zOut, 1) = uint8(int32(128) + int32(uint8(_2_c&uint32(63))))
_12:
_i += 1
goto _1
_4:
- Xsqlite3_result_text64(tls, _context, (*int8)(unsafe.Pointer(_z)), uint64(int32((uintptr(unsafe.Pointer(_zOut))-uintptr(unsafe.Pointer(_z)))/1)), Xsqlite3_free, uint8(i32(1)))
+ Xsqlite3_result_text64(tls, _context, (*int8)(unsafe.Pointer(_z)), uint64(int32(uintptr(unsafe.Pointer(_zOut))-uintptr(unsafe.Pointer(_z)))), Xsqlite3_free, uint8(1))
}
-// Implementation of the abs() function.
-//
-// IMP: R-23979-26855 The abs(X) function returns the absolute value of
-// the numeric argument X.
+// C comment
+// /*
+// ** Implementation of the abs() function.
+// **
+// ** IMP: R-23979-26855 The abs(X) function returns the absolute value of
+// ** the numeric argument X.
+// */
func _absFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _2_iVal int64
var _6_rVal float64
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105676), unsafe.Pointer((*int8)(unsafe.Pointer(&_absFuncØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105676), unsafe.Pointer(&_absFuncØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- switch Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) {
- case i32(1):
+ switch Xsqlite3_value_type(tls, *elem19(_argv, 0)) {
+ case int32(1):
goto _3
- case i32(5):
+ case int32(5):
goto _4
default:
goto _5
}
_3:
- _2_iVal = Xsqlite3_value_int64(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- if _2_iVal >= int64(i32(0)) {
+ _2_iVal = Xsqlite3_value_int64(tls, *elem19(_argv, 0))
+ if _2_iVal >= (0) {
goto _6
}
- if _2_iVal == i64(-9223372036854775808) {
- Xsqlite3_result_error(tls, _context, str(130533), i32(-1))
+ if _2_iVal == int64(-9223372036854775808) {
+ Xsqlite3_result_error(tls, _context, str(130546), int32(-1))
return
}
_2_iVal = -_2_iVal
@@ -113658,8 +115417,8 @@ _4:
Xsqlite3_result_null(tls, _context)
goto _8
_5:
- _6_rVal = Xsqlite3_value_double(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- if _6_rVal < float64(i32(0)) {
+ _6_rVal = Xsqlite3_value_double(tls, *elem19(_argv, 0))
+ if _6_rVal < (0) {
_6_rVal = -_6_rVal
}
Xsqlite3_result_double(tls, _context, _6_rVal)
@@ -113670,53 +115429,53 @@ _8:
var _absFuncØ00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_absFuncØ00__func__Ø000[0], str(130550), 8)
+ crt.Xstrncpy(nil, &_absFuncØ00__func__Ø000[0], str(130563), 8)
}
func _roundFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _n int32
var _zBuf *int8
var _r float64
- _n = i32(0)
+ _n = int32(0)
func() {
- if _argc != i32(1) && _argc != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105904), unsafe.Pointer((*int8)(unsafe.Pointer(&_roundFuncØ00__func__Ø000))), unsafe.Pointer(str(130558)))
+ if _argc != int32(1) && _argc != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105904), unsafe.Pointer(&_roundFuncØ00__func__Ø000), unsafe.Pointer(str(130571)))
crt.X__builtin_abort(tls)
}
}()
- if _argc != i32(2) {
+ if _argc != int32(2) {
goto _3
}
- if i32(5) == Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))) {
+ if int32(5) == Xsqlite3_value_type(tls, *elem19(_argv, uintptr(1))) {
return
}
- _n = Xsqlite3_value_int(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
- if _n > i32(30) {
- _n = i32(30)
+ _n = Xsqlite3_value_int(tls, *elem19(_argv, uintptr(1)))
+ if _n > int32(30) {
+ _n = int32(30)
}
- if _n < i32(0) {
- _n = i32(0)
+ if _n < int32(0) {
+ _n = int32(0)
}
_3:
- if Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) == i32(5) {
+ if Xsqlite3_value_type(tls, *elem19(_argv, 0)) == int32(5) {
return
}
- _r = Xsqlite3_value_double(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- if ((_n == i32(0)) && (_r >= float64(i32(0)))) && (_r < float64(i64(9223372036854775806))) {
+ _r = Xsqlite3_value_double(tls, *elem19(_argv, 0))
+ if ((_n == int32(0)) && (_r >= (0))) && (_r < (9.223372036854776e+18)) {
_r = float64(int64(_r + (0.5)))
goto _15
}
- if ((_n == i32(0)) && (_r < float64(i32(0)))) && ((-_r) < float64(i64(9223372036854775806))) {
+ if ((_n == int32(0)) && (_r < (0))) && ((-_r) < (9.223372036854776e+18)) {
_r = -float64(int64((-_r) + (0.5)))
goto _15
}
- _zBuf = Xsqlite3_mprintf(tls, str(130577), _n, _r)
+ _zBuf = Xsqlite3_mprintf(tls, str(130590), _n, _r)
if _zBuf == nil {
Xsqlite3_result_error_nomem(tls, _context)
return
}
- _sqlite3AtoF(tls, _zBuf, &_r, _sqlite3Strlen30(tls, _zBuf), uint8(i32(1)))
- Xsqlite3_free(tls, (unsafe.Pointer)(_zBuf))
+ _sqlite3AtoF(tls, _zBuf, &_r, _sqlite3Strlen30(tls, _zBuf), uint8(1))
+ Xsqlite3_free(tls, unsafe.Pointer(_zBuf))
_15:
Xsqlite3_result_double(tls, _context, _r)
}
@@ -113724,35 +115483,38 @@ _15:
var _roundFuncØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_roundFuncØ00__func__Ø000[0], str(130582), 10)
+ crt.Xstrncpy(nil, &_roundFuncØ00__func__Ø000[0], str(130595), 10)
}
-// Implementation of the upper() and lower() SQL functions.
+// C comment
+// /*
+// ** Implementation of the upper() and lower() SQL functions.
+// */
func _upperFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _i, _n int32
var _z1, _z2 *int8
- _z2 = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))))
- _n = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _z2 = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0))))
+ _n = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
func() {
- if _z2 != (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105970), unsafe.Pointer((*int8)(unsafe.Pointer(&_upperFuncØ00__func__Ø000))), unsafe.Pointer(str(130592)))
+ if _z2 != (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105970), unsafe.Pointer(&_upperFuncØ00__func__Ø000), unsafe.Pointer(str(130605)))
crt.X__builtin_abort(tls)
}
}()
if _z2 == nil {
goto _2
}
- _z1 = (*int8)(_contextMalloc(tls, _context, int64(_n)+int64(i32(1))))
+ _z1 = (*int8)(_contextMalloc(tls, _context, int64(_n)+int64(1)))
if _z1 == nil {
goto _3
}
- _i = i32(0)
+ _i = int32(0)
_4:
if _i >= _n {
goto _7
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z1)) + 1*uintptr(_i))) = int8(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z2)) + 1*uintptr(_i)))) & (^(int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z2)) + 1*uintptr(_i)))))))) & i32(32))))
+ *elem1(_z1, uintptr(_i)) = int8(int32(*elem1(_z2, uintptr(_i))) & (^(int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_z2, uintptr(_i)))))) & int32(32))))
_i += 1
goto _4
_7:
@@ -113764,34 +115526,34 @@ _2:
var _upperFuncØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_upperFuncØ00__func__Ø000[0], str(130631), 10)
+ crt.Xstrncpy(nil, &_upperFuncØ00__func__Ø000[0], str(130644), 10)
}
func _lowerFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _i, _n int32
var _z1, _z2 *int8
- _z2 = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))))
- _n = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _z2 = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0))))
+ _n = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
func() {
- if _z2 != (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105989), unsafe.Pointer((*int8)(unsafe.Pointer(&_lowerFuncØ00__func__Ø000))), unsafe.Pointer(str(130592)))
+ if _z2 != (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0)))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105989), unsafe.Pointer(&_lowerFuncØ00__func__Ø000), unsafe.Pointer(str(130605)))
crt.X__builtin_abort(tls)
}
}()
if _z2 == nil {
goto _2
}
- _z1 = (*int8)(_contextMalloc(tls, _context, int64(_n)+int64(i32(1))))
+ _z1 = (*int8)(_contextMalloc(tls, _context, int64(_n)+int64(1)))
if _z1 == nil {
goto _3
}
- _i = i32(0)
+ _i = int32(0)
_4:
if _i >= _n {
goto _7
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z1)) + 1*uintptr(_i))) = int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3UpperToLower)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z2)) + 1*uintptr(_i))))))))
+ *elem1(_z1, uintptr(_i)) = int8(*elem15((*uint8)(unsafe.Pointer(&_sqlite3UpperToLower)), uintptr(uint8(*elem1(_z2, uintptr(_i))))))
_i += 1
goto _4
_7:
@@ -113803,137 +115565,161 @@ _2:
var _lowerFuncØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_lowerFuncØ00__func__Ø000[0], str(130641), 10)
+ crt.Xstrncpy(nil, &_lowerFuncØ00__func__Ø000[0], str(130654), 10)
}
-// The hex() function. Interpret the argument as a blob. Return
-// a hexadecimal rendering as text.
+// C comment
+// /*
+// ** The hex() function. Interpret the argument as a blob. Return
+// ** a hexadecimal rendering as text.
+// */
func _hexFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _i, _n int32
var _zHex, _z *int8
var _2_c uint8
var _pBlob *uint8
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106671), unsafe.Pointer((*int8)(unsafe.Pointer(&_hexFuncØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106671), unsafe.Pointer(&_hexFuncØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- _pBlob = (*uint8)(Xsqlite3_value_blob(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
- _n = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _pBlob = (*uint8)(Xsqlite3_value_blob(tls, *elem19(_argv, 0)))
+ _n = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
func() {
- if _pBlob != (*uint8)(Xsqlite3_value_blob(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106675), unsafe.Pointer((*int8)(unsafe.Pointer(&_hexFuncØ00__func__Ø000))), unsafe.Pointer(str(130651)))
+ if _pBlob != (*uint8)(Xsqlite3_value_blob(tls, *elem19(_argv, 0))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106675), unsafe.Pointer(&_hexFuncØ00__func__Ø000), unsafe.Pointer(str(130664)))
crt.X__builtin_abort(tls)
}
}()
- _z = store0(&_zHex, (*int8)(_contextMalloc(tls, _context, (int64(_n)*int64(i32(2)))+int64(i32(1)))))
+ _z = store1(&_zHex, (*int8)(_contextMalloc(tls, _context, (int64(_n)*int64(2))+int64(1))))
if _zHex == nil {
goto _4
}
- _i = i32(0)
+ _i = int32(0)
_5:
if _i >= _n {
goto _8
}
_2_c = *_pBlob
- *postInc0(&_z, 1) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_hexdigits)) + 1*uintptr((int32(_2_c)>>uint(i32(4)))&i32(15))))
- *postInc0(&_z, 1) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_hexdigits)) + 1*uintptr(int32(_2_c)&i32(15))))
+ *postInc1(&_z, 1) = *elem1((*int8)(unsafe.Pointer(&_hexdigits)), uintptr((int32(_2_c)>>4)&int32(15)))
+ *postInc1(&_z, 1) = *elem1((*int8)(unsafe.Pointer(&_hexdigits)), uintptr(int32(_2_c)&int32(15)))
*(*uintptr)(unsafe.Pointer(func() **uint8 { _i += 1; return &_pBlob }())) += uintptr(1)
goto _5
_8:
- *_z = int8(i32(0))
- Xsqlite3_result_text(tls, _context, _zHex, _n*i32(2), Xsqlite3_free)
+ *_z = 0
+ Xsqlite3_result_text(tls, _context, _zHex, _n*int32(2), Xsqlite3_free)
_4:
}
var _hexFuncØ00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_hexFuncØ00__func__Ø000[0], str(130686), 8)
+ crt.Xstrncpy(nil, &_hexFuncØ00__func__Ø000[0], str(130699), 8)
}
+// C comment
+// /* Array for converting from half-bytes (nybbles) into ASCII hex
+// ** digits. */
var _hexdigits [16]int8
func init() {
_hexdigits = [16]int8{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70}
}
-// Implementation of random(). Return a random integer.
+// C comment
+// /*
+// ** Implementation of random(). Return a random integer.
+// */
func _randomFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
var _r int64
_ = _NotUsed2
- Xsqlite3_randomness(tls, int32(u32(8)), (unsafe.Pointer)(&_r))
- if _r < int64(i32(0)) {
- _r = -(_r & i64(9223372036854775807))
+ Xsqlite3_randomness(tls, int32(8), unsafe.Pointer(&_r))
+ if _r < (0) {
+ _r = -(_r & int64(9223372036854775807))
}
Xsqlite3_result_int64(tls, _context, _r)
}
-// Implementation of randomblob(N). Return a random blob
-// that is N bytes long.
+// C comment
+// /*
+// ** Implementation of randomblob(N). Return a random blob
+// ** that is N bytes long.
+// */
func _randomBlob(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _n int32
var _p *uint8
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106047), unsafe.Pointer((*int8)(unsafe.Pointer(&_randomBlobØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106047), unsafe.Pointer(&_randomBlobØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- _n = Xsqlite3_value_int(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- if _n < i32(1) {
- _n = i32(1)
+ _n = Xsqlite3_value_int(tls, *elem19(_argv, 0))
+ if _n < int32(1) {
+ _n = int32(1)
}
_p = (*uint8)(_contextMalloc(tls, _context, int64(_n)))
if _p != nil {
- Xsqlite3_randomness(tls, _n, (unsafe.Pointer)(_p))
- Xsqlite3_result_blob(tls, _context, (unsafe.Pointer)(_p), _n, Xsqlite3_free)
+ Xsqlite3_randomness(tls, _n, unsafe.Pointer(_p))
+ Xsqlite3_result_blob(tls, _context, unsafe.Pointer(_p), _n, Xsqlite3_free)
}
}
var _randomBlobØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_randomBlobØ00__func__Ø000[0], str(130694), 11)
+ crt.Xstrncpy(nil, &_randomBlobØ00__func__Ø000[0], str(130707), 11)
}
-// Implementation of the NULLIF(x,y) function. The result is the first
-// argument if the arguments are different. The result is NULL if the
-// arguments are equal to each other.
+// C comment
+// /*
+// ** Implementation of the NULLIF(x,y) function. The result is the first
+// ** argument if the arguments are different. The result is NULL if the
+// ** arguments are equal to each other.
+// */
func _nullifFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _argv **XMem) {
var _pColl *XCollSeq
_pColl = _sqlite3GetFuncCollSeq(tls, _context)
- if _sqlite3MemCompare(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))), _pColl) != i32(0) {
- Xsqlite3_result_value(tls, _context, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ if _sqlite3MemCompare(tls, *elem19(_argv, 0), *elem19(_argv, uintptr(1)), _pColl) != int32(0) {
+ Xsqlite3_result_value(tls, _context, *elem19(_argv, 0))
}
}
-// Implementation of the sqlite_source_id() function. The result is a string
-// that identifies the particular version of the source code used to build
-// SQLite.
+// C comment
+// /*
+// ** Implementation of the sqlite_source_id() function. The result is a string
+// ** that identifies the particular version of the source code used to build
+// ** SQLite.
+// */
func _sourceidFunc(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
_ = _NotUsed2
- Xsqlite3_result_text(tls, _context, Xsqlite3_sourceid(tls), i32(-1), nil)
+ Xsqlite3_result_text(tls, _context, Xsqlite3_sourceid(tls), int32(-1), nil)
}
-// Implementation of the sqlite_log() function. This is a wrapper around
-// sqlite3_log(). The return value is NULL. The function exists purely for
-// its side-effects.
+// C comment
+// /*
+// ** Implementation of the sqlite_log() function. This is a wrapper around
+// ** sqlite3_log(). The return value is NULL. The function exists purely for
+// ** its side-effects.
+// */
func _errlogFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
- Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))), str(24576), unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))))
+ Xsqlite3_log(tls, Xsqlite3_value_int(tls, *elem19(_argv, 0)), str(24531), unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))))
}
-// Implementation of the QUOTE() function. This function takes a single
-// argument. If the argument is numeric, the return value is the same as
-// the argument. If the argument is NULL, the return value is the string
-// "NULL". Otherwise, the argument is enclosed in single quotes with
-// single-quote escapes.
+// C comment
+// /*
+// ** Implementation of the QUOTE() function. This function takes a single
+// ** argument. If the argument is numeric, the return value is the same as
+// ** the argument. If the argument is NULL, the return value is the string
+// ** "NULL". Otherwise, the argument is enclosed in single quotes with
+// ** single-quote escapes.
+// */
func _quoteFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _5_nBlob, _6_i, _8_i, _8_j int32
var _8_n uint64
@@ -113942,115 +115728,115 @@ func _quoteFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **X
var _8_zArg *uint8
var _2_zBuf [50]int8
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106532), unsafe.Pointer((*int8)(unsafe.Pointer(&_quoteFuncØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106532), unsafe.Pointer(&_quoteFuncØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- switch Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) {
- case i32(1):
+ switch Xsqlite3_value_type(tls, *elem19(_argv, 0)) {
+ case int32(1):
goto _4
- case i32(2):
+ case int32(2):
goto _3
- case i32(3):
+ case int32(3):
goto _6
- case i32(4):
+ case int32(4):
goto _5
default:
goto _7
}
_3:
- _2_r1 = Xsqlite3_value_double(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- Xsqlite3_snprintf(tls, int32(u32(50)), (*int8)(unsafe.Pointer(&_2_zBuf)), str(6367), _2_r1)
- _sqlite3AtoF(tls, (*int8)(unsafe.Pointer(&_2_zBuf)), &_2_r2, i32(20), uint8(i32(1)))
+ _2_r1 = Xsqlite3_value_double(tls, *elem19(_argv, 0))
+ Xsqlite3_snprintf(tls, int32(50), (*int8)(unsafe.Pointer(&_2_zBuf)), str(6268), _2_r1)
+ _sqlite3AtoF(tls, (*int8)(unsafe.Pointer(&_2_zBuf)), &_2_r2, int32(20), uint8(1))
if _2_r1 != _2_r2 {
- Xsqlite3_snprintf(tls, int32(u32(50)), (*int8)(unsafe.Pointer(&_2_zBuf)), str(130705), _2_r1)
+ Xsqlite3_snprintf(tls, int32(50), (*int8)(unsafe.Pointer(&_2_zBuf)), str(130718), _2_r1)
}
- Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(&_2_zBuf)), i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(&_2_zBuf)), int32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
goto _9
_4:
- Xsqlite3_result_value(tls, _context, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ Xsqlite3_result_value(tls, _context, *elem19(_argv, 0))
goto _9
_5:
_5_zText = nil
- _5_zBlob = (*int8)(Xsqlite3_value_blob(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
- _5_nBlob = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _5_zBlob = (*int8)(Xsqlite3_value_blob(tls, *elem19(_argv, 0)))
+ _5_nBlob = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
func() {
- if _5_zBlob != (*int8)(Xsqlite3_value_blob(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106555), unsafe.Pointer((*int8)(unsafe.Pointer(&_quoteFuncØ00__func__Ø000))), unsafe.Pointer(str(130712)))
+ if _5_zBlob != (*int8)(Xsqlite3_value_blob(tls, *elem19(_argv, 0))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106555), unsafe.Pointer(&_quoteFuncØ00__func__Ø000), unsafe.Pointer(str(130725)))
crt.X__builtin_abort(tls)
}
}()
- _5_zText = (*int8)(_contextMalloc(tls, _context, (int64(i32(2))*int64(_5_nBlob))+int64(i32(4))))
+ _5_zText = (*int8)(_contextMalloc(tls, _context, (int64(2)*int64(_5_nBlob))+int64(4)))
if _5_zText == nil {
goto _12
}
- _6_i = i32(0)
+ _6_i = int32(0)
_13:
if _6_i >= _5_nBlob {
goto _16
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_zText)) + 1*uintptr((_6_i*i32(2))+i32(2)))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_hexdigits)) + 1*uintptr((int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_zBlob)) + 1*uintptr(_6_i))))>>uint(i32(4)))&i32(15))))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_zText)) + 1*uintptr((_6_i*i32(2))+i32(3)))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_hexdigits)) + 1*uintptr(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_zBlob)) + 1*uintptr(_6_i))))&i32(15))))
+ *elem1(_5_zText, uintptr((_6_i*int32(2))+int32(2))) = *elem1((*int8)(unsafe.Pointer(&_hexdigits)), uintptr((int32(*elem1(_5_zBlob, uintptr(_6_i)))>>4)&int32(15)))
+ *elem1(_5_zText, uintptr((_6_i*int32(2))+int32(3))) = *elem1((*int8)(unsafe.Pointer(&_hexdigits)), uintptr(int32(*elem1(_5_zBlob, uintptr(_6_i)))&int32(15)))
_6_i += 1
goto _13
_16:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_zText)) + 1*uintptr((_5_nBlob*i32(2))+i32(2)))) = int8(i32(39))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_zText)) + 1*uintptr((_5_nBlob*i32(2))+i32(3)))) = int8(i32(0))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_zText)) + 1*uintptr(i32(0)))) = int8(i32(88))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_5_zText)) + 1*uintptr(i32(1)))) = int8(i32(39))
- Xsqlite3_result_text(tls, _context, _5_zText, i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
- Xsqlite3_free(tls, (unsafe.Pointer)(_5_zText))
+ *elem1(_5_zText, uintptr((_5_nBlob*int32(2))+int32(2))) = int8(39)
+ *elem1(_5_zText, uintptr((_5_nBlob*int32(2))+int32(3))) = 0
+ *elem1(_5_zText, 0) = int8(88)
+ *elem1(_5_zText, uintptr(1)) = int8(39)
+ Xsqlite3_result_text(tls, _context, _5_zText, int32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ Xsqlite3_free(tls, unsafe.Pointer(_5_zText))
_12:
goto _9
_6:
- _8_zArg = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _8_zArg = Xsqlite3_value_text(tls, *elem19(_argv, 0))
if _8_zArg == nil {
return
}
- *func() *uint64 { _8_i = i32(0); return &_8_n }() = uint64(i32(0))
+ *func() *uint64 { _8_i = int32(0); return &_8_n }() = 0
_18:
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_zArg)) + 1*uintptr(_8_i)))) == 0 {
+ if (*elem15(_8_zArg, uintptr(_8_i))) == 0 {
goto _21
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_zArg)) + 1*uintptr(_8_i)))) == i32(39) {
+ if int32(*elem15(_8_zArg, uintptr(_8_i))) == int32(39) {
_8_n += 1
}
_8_i += 1
goto _18
_21:
- _8_z = (*int8)(_contextMalloc(tls, _context, (int64(_8_i)+int64(_8_n))+int64(i32(3))))
+ _8_z = (*int8)(_contextMalloc(tls, _context, (int64(_8_i)+int64(_8_n))+int64(3)))
if _8_z == nil {
goto _23
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_z)) + 1*uintptr(i32(0)))) = int8(i32(39))
- *func() *int32 { _8_i = i32(0); return &_8_j }() = i32(1)
+ *elem1(_8_z, 0) = int8(39)
+ *func() *int32 { _8_i = int32(0); return &_8_j }() = int32(1)
_24:
- if (*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_zArg)) + 1*uintptr(_8_i)))) == 0 {
+ if (*elem15(_8_zArg, uintptr(_8_i))) == 0 {
goto _27
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_z)) + 1*uintptr(postInc1(&_8_j, int32(1))))) = int8(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_zArg)) + 1*uintptr(_8_i))))
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_zArg)) + 1*uintptr(_8_i)))) == i32(39) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_z)) + 1*uintptr(postInc1(&_8_j, int32(1))))) = int8(i32(39))
+ *elem1(_8_z, uintptr(postInc2(&_8_j, 1))) = int8(*elem15(_8_zArg, uintptr(_8_i)))
+ if int32(*elem15(_8_zArg, uintptr(_8_i))) == int32(39) {
+ *elem1(_8_z, uintptr(postInc2(&_8_j, 1))) = int8(39)
}
_8_i += 1
goto _24
_27:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_z)) + 1*uintptr(postInc1(&_8_j, int32(1))))) = int8(i32(39))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_8_z)) + 1*uintptr(_8_j))) = int8(i32(0))
+ *elem1(_8_z, uintptr(postInc2(&_8_j, 1))) = int8(39)
+ *elem1(_8_z, uintptr(_8_j)) = 0
Xsqlite3_result_text(tls, _context, _8_z, _8_j, Xsqlite3_free)
_23:
goto _9
_7:
func() {
- if Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) != i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106596), unsafe.Pointer((*int8)(unsafe.Pointer(&_quoteFuncØ00__func__Ø000))), unsafe.Pointer(str(130747)))
+ if Xsqlite3_value_type(tls, *elem19(_argv, 0)) != int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106596), unsafe.Pointer(&_quoteFuncØ00__func__Ø000), unsafe.Pointer(str(130760)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_result_text(tls, _context, str(155), i32(4), nil)
+ Xsqlite3_result_text(tls, _context, str(285), int32(4), nil)
goto _9
_9:
_ = _2_zBuf
@@ -114059,11 +115845,14 @@ _9:
var _quoteFuncØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_quoteFuncØ00__func__Ø000[0], str(130788), 10)
+ crt.Xstrncpy(nil, &_quoteFuncØ00__func__Ø000[0], str(130801), 10)
}
-// Implementation of the last_insert_rowid() SQL function. The return
-// value is the same as the sqlite3_last_insert_rowid() API function.
+// C comment
+// /*
+// ** Implementation of the last_insert_rowid() SQL function. The return
+// ** value is the same as the sqlite3_last_insert_rowid() API function.
+// */
func _last_insert_rowid(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
var _db *Xsqlite3
_db = Xsqlite3_context_db_handle(tls, _context)
@@ -114072,11 +115861,14 @@ func _last_insert_rowid(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32
Xsqlite3_result_int64(tls, _context, Xsqlite3_last_insert_rowid(tls, _db))
}
-// Implementation of the changes() SQL function.
-//
-// IMP: R-62073-11209 The changes() SQL function is a wrapper
-// around the sqlite3_changes() C/C++ function and hence follows the same
-// rules for counting changes.
+// C comment
+// /*
+// ** Implementation of the changes() SQL function.
+// **
+// ** IMP: R-62073-11209 The changes() SQL function is a wrapper
+// ** around the sqlite3_changes() C/C++ function and hence follows the same
+// ** rules for counting changes.
+// */
func _changes(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
var _db *Xsqlite3
_db = Xsqlite3_context_db_handle(tls, _context)
@@ -114085,8 +115877,11 @@ func _changes(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed
Xsqlite3_result_int(tls, _context, Xsqlite3_changes(tls, _db))
}
-// Implementation of the total_changes() SQL function. The return value is
-// the same as the sqlite3_total_changes() API function.
+// C comment
+// /*
+// ** Implementation of the total_changes() SQL function. The return value is
+// ** the same as the sqlite3_total_changes() API function.
+// */
func _total_changes(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _NotUsed2 **XMem) {
var _db *Xsqlite3
_db = Xsqlite3_context_db_handle(tls, _context)
@@ -114095,75 +115890,78 @@ func _total_changes(tls *crt.TLS, _context *Xsqlite3_context, _NotUsed int32, _N
Xsqlite3_result_int(tls, _context, Xsqlite3_total_changes(tls, _db))
}
-// The replace() function. Three arguments are all strings: call
-// them A, B, and C. The result is also a string which is derived
-// from A by replacing every occurrence of B with C. The match
-// must be exact. Collating sequences are not used.
+// C comment
+// /*
+// ** The replace() function. Three arguments are all strings: call
+// ** them A, B, and C. The result is also a string which is derived
+// ** from A by replacing every occurrence of B with C. The match
+// ** must be exact. Collating sequences are not used.
+// */
func _replaceFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _nStr, _nPattern, _nRep, _loopLimit, _i, _j int32
var _nOut int64
var _zStr, _zPattern, _zRep, _zOut, _6_zOld *uint8
var _6_db *Xsqlite3
func() {
- if _argc != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106730), unsafe.Pointer((*int8)(unsafe.Pointer(&_replaceFuncØ00__func__Ø000))), unsafe.Pointer(str(50294)))
+ if _argc != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106730), unsafe.Pointer(&_replaceFuncØ00__func__Ø000), unsafe.Pointer(str(50249)))
crt.X__builtin_abort(tls)
}
}()
- _zStr = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _zStr = Xsqlite3_value_text(tls, *elem19(_argv, 0))
if _zStr == nil {
return
}
- _nStr = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _nStr = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
func() {
- if _zStr != Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106735), unsafe.Pointer((*int8)(unsafe.Pointer(&_replaceFuncØ00__func__Ø000))), unsafe.Pointer(str(130798)))
+ if _zStr != Xsqlite3_value_text(tls, *elem19(_argv, 0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106735), unsafe.Pointer(&_replaceFuncØ00__func__Ø000), unsafe.Pointer(str(130811)))
crt.X__builtin_abort(tls)
}
}()
- _zPattern = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
+ _zPattern = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))
if _zPattern == nil {
func() {
- if Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))) != i32(5) && (Xsqlite3_context_db_handle(tls, _context).X17) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106738), unsafe.Pointer((*int8)(unsafe.Pointer(&_replaceFuncØ00__func__Ø000))), unsafe.Pointer(str(130832)))
+ if Xsqlite3_value_type(tls, *elem19(_argv, uintptr(1))) != int32(5) && (Xsqlite3_context_db_handle(tls, _context).XmallocFailed) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106738), unsafe.Pointer(&_replaceFuncØ00__func__Ø000), unsafe.Pointer(str(130845)))
crt.X__builtin_abort(tls)
}
}()
return
}
- if int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPattern)) + 1*uintptr(i32(0))))) == i32(0) {
+ if int32(*elem15(_zPattern, 0)) == int32(0) {
func() {
- if Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))) == i32(5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106743), unsafe.Pointer((*int8)(unsafe.Pointer(&_replaceFuncØ00__func__Ø000))), unsafe.Pointer(str(130925)))
+ if Xsqlite3_value_type(tls, *elem19(_argv, uintptr(1))) == int32(5) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106743), unsafe.Pointer(&_replaceFuncØ00__func__Ø000), unsafe.Pointer(str(130938)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_result_value(tls, _context, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ Xsqlite3_result_value(tls, _context, *elem19(_argv, 0))
return
}
- _nPattern = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
+ _nPattern = Xsqlite3_value_bytes(tls, *elem19(_argv, uintptr(1)))
func() {
- if _zPattern != Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106748), unsafe.Pointer((*int8)(unsafe.Pointer(&_replaceFuncØ00__func__Ø000))), unsafe.Pointer(str(130966)))
+ if _zPattern != Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106748), unsafe.Pointer(&_replaceFuncØ00__func__Ø000), unsafe.Pointer(str(130979)))
crt.X__builtin_abort(tls)
}
}()
- _zRep = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2)))))
+ _zRep = Xsqlite3_value_text(tls, *elem19(_argv, uintptr(2)))
if _zRep == nil {
return
}
- _nRep = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2)))))
+ _nRep = Xsqlite3_value_bytes(tls, *elem19(_argv, uintptr(2)))
func() {
- if _zRep != Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106752), unsafe.Pointer((*int8)(unsafe.Pointer(&_replaceFuncØ00__func__Ø000))), unsafe.Pointer(str(131004)))
+ if _zRep != Xsqlite3_value_text(tls, *elem19(_argv, uintptr(2))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106752), unsafe.Pointer(&_replaceFuncØ00__func__Ø000), unsafe.Pointer(str(131017)))
crt.X__builtin_abort(tls)
}
}()
- _nOut = int64(_nStr + i32(1))
+ _nOut = int64(_nStr + int32(1))
func() {
- if _nOut >= int64(i32(1000000000)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106754), unsafe.Pointer((*int8)(unsafe.Pointer(&_replaceFuncØ00__func__Ø000))), unsafe.Pointer(str(131038)))
+ if _nOut >= int64(1000000000) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106754), unsafe.Pointer(&_replaceFuncØ00__func__Ø000), unsafe.Pointer(str(131051)))
crt.X__builtin_abort(tls)
}
}()
@@ -114172,90 +115970,77 @@ func _replaceFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv *
return
}
_loopLimit = _nStr - _nPattern
- _i = store1(&_j, i32(0))
+ _i = store2(&_j, int32(0))
_20:
if _i > _loopLimit {
goto _23
}
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zStr)) + 1*uintptr(_i)))) != int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPattern)) + 1*uintptr(i32(0)))))) || crt.Xmemcmp(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zStr))+1*uintptr(_i)))), (unsafe.Pointer)(_zPattern), uint32(_nPattern)) != 0 {
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(postInc1(&_j, int32(1))))) = *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zStr)) + 1*uintptr(_i)))
+ if (int32(*elem15(_zStr, uintptr(_i))) != int32(*elem15(_zPattern, 0))) || crt.Xmemcmp(tls, unsafe.Pointer(elem15(_zStr, uintptr(_i))), unsafe.Pointer(_zPattern), uint32(_nPattern)) != 0 {
+ *elem15(_zOut, uintptr(postInc2(&_j, 1))) = *elem15(_zStr, uintptr(_i))
goto _26
}
_6_db = Xsqlite3_context_db_handle(tls, _context)
- {
- p := &_nOut
- *p = (*p) + int64(_nRep-_nPattern)
- sink6(*p)
- }
- if (_nOut - int64(i32(1))) > int64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_6_db.X31))))) + 4*uintptr(i32(0))))) {
+ _nOut += int64(_nRep - _nPattern)
+ if (_nOut - int64(1)) > int64(*elem8((*int32)(unsafe.Pointer(&_6_db.XaLimit)), 0)) {
Xsqlite3_result_error_toobig(tls, _context)
- Xsqlite3_free(tls, (unsafe.Pointer)(_zOut))
+ Xsqlite3_free(tls, unsafe.Pointer(_zOut))
return
}
_6_zOld = _zOut
- _zOut = (*uint8)(Xsqlite3_realloc64(tls, (unsafe.Pointer)(_zOut), uint64(int32(_nOut))))
+ _zOut = (*uint8)(Xsqlite3_realloc64(tls, unsafe.Pointer(_zOut), uint64(int32(_nOut))))
if _zOut == nil {
Xsqlite3_result_error_nomem(tls, _context)
- Xsqlite3_free(tls, (unsafe.Pointer)(_6_zOld))
+ Xsqlite3_free(tls, unsafe.Pointer(_6_zOld))
return
}
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut))+1*uintptr(_j)))), (unsafe.Pointer)(_zRep), uint32(_nRep))
- {
- p := &_j
- *p = (*p) + _nRep
- sink1(*p)
- }
- {
- p := &_i
- *p = (*p) + (_nPattern - i32(1))
- sink1(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_zOut, uintptr(_j))), unsafe.Pointer(_zRep), uint32(_nRep))
+ _j += _nRep
+ _i += _nPattern - int32(1)
_26:
_i += 1
goto _20
_23:
func() {
- if int64(((_j+_nStr)-_i)+i32(1)) != _nOut {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106786), unsafe.Pointer((*int8)(unsafe.Pointer(&_replaceFuncØ00__func__Ø000))), unsafe.Pointer(str(131061)))
+ if int64(((_j+_nStr)-_i)+int32(1)) != _nOut {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106786), unsafe.Pointer(&_replaceFuncØ00__func__Ø000), unsafe.Pointer(str(131074)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemcpy(tls, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut))+1*uintptr(_j)))), (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zStr))+1*uintptr(_i)))), uint32(_nStr-_i))
- {
- p := &_j
- *p = (*p) + (_nStr - _i)
- sink1(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer(elem15(_zOut, uintptr(_j))), unsafe.Pointer(elem15(_zStr, uintptr(_i))), uint32(_nStr-_i))
+ _j += _nStr - _i
func() {
if int64(_j) > _nOut {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106789), unsafe.Pointer((*int8)(unsafe.Pointer(&_replaceFuncØ00__func__Ø000))), unsafe.Pointer(str(131078)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106789), unsafe.Pointer(&_replaceFuncØ00__func__Ø000), unsafe.Pointer(str(131091)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(_j))) = uint8(i32(0))
+ *elem15(_zOut, uintptr(_j)) = 0
Xsqlite3_result_text(tls, _context, (*int8)(unsafe.Pointer(_zOut)), _j, Xsqlite3_free)
}
var _replaceFuncØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_replaceFuncØ00__func__Ø000[0], str(131086), 12)
+ crt.Xstrncpy(nil, &_replaceFuncØ00__func__Ø000[0], str(131099), 12)
}
-// The zeroblob(N) function returns a zero-filled blob of size N bytes.
+// C comment
+// /*
+// ** The zeroblob(N) function returns a zero-filled blob of size N bytes.
+// */
func _zeroblobFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _rc int32
var _n int64
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(106698), unsafe.Pointer((*int8)(unsafe.Pointer(&_zeroblobFuncØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(106698), unsafe.Pointer(&_zeroblobFuncØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- _n = Xsqlite3_value_int64(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- if _n < int64(i32(0)) {
- _n = int64(i32(0))
+ _n = Xsqlite3_value_int64(tls, *elem19(_argv, 0))
+ if _n < (0) {
+ _n = 0
}
_rc = Xsqlite3_result_zeroblob64(tls, _context, uint64(_n))
if _rc != 0 {
@@ -114266,57 +116051,60 @@ func _zeroblobFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv
var _zeroblobFuncØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_zeroblobFuncØ00__func__Ø000[0], str(131098), 13)
+ crt.Xstrncpy(nil, &_zeroblobFuncØ00__func__Ø000[0], str(131111), 13)
}
-// Implementation of the substr() function.
-//
-// substr(x,p1,p2) returns p2 characters of x[] beginning with p1.
-// p1 is 1-indexed. So substr(x,1,1) returns the first character
-// of x. If x is text, then we actually count UTF-8 characters.
-// If x is a blob, then we count bytes.
-//
-// If p1 is negative, then we begin abs(p1) from the end of x[].
-//
-// If p2 is negative, return the p2 characters preceding p1.
+// C comment
+// /*
+// ** Implementation of the substr() function.
+// **
+// ** substr(x,p1,p2) returns p2 characters of x[] beginning with p1.
+// ** p1 is 1-indexed. So substr(x,1,1) returns the first character
+// ** of x. If x is text, then we actually count UTF-8 characters.
+// ** If x is a blob, then we count bytes.
+// **
+// ** If p1 is negative, then we begin abs(p1) from the end of x[].
+// **
+// ** If p2 is negative, return the p2 characters preceding p1.
+// */
func _substrFunc(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _len, _p0type, _negP2 int32
var _p1, _p2 int64
var _z, _z2 *uint8
- _negP2 = i32(0)
+ _negP2 = int32(0)
func() {
- if _argc != i32(3) && _argc != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105817), unsafe.Pointer((*int8)(unsafe.Pointer(&_substrFuncØ00__func__Ø000))), unsafe.Pointer(str(131111)))
+ if _argc != int32(3) && _argc != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105817), unsafe.Pointer(&_substrFuncØ00__func__Ø000), unsafe.Pointer(str(131124)))
crt.X__builtin_abort(tls)
}
}()
- if (Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))) == i32(5)) || ((_argc == i32(3)) && (Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2))))) == i32(5))) {
+ if (Xsqlite3_value_type(tls, *elem19(_argv, uintptr(1))) == int32(5)) || ((_argc == int32(3)) && (Xsqlite3_value_type(tls, *elem19(_argv, uintptr(2))) == int32(5))) {
return
}
- _p0type = Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- _p1 = int64(Xsqlite3_value_int(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))))
- if _p0type != i32(4) {
+ _p0type = Xsqlite3_value_type(tls, *elem19(_argv, 0))
+ _p1 = int64(Xsqlite3_value_int(tls, *elem19(_argv, uintptr(1))))
+ if _p0type != int32(4) {
goto _6
}
- _len = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- _z = (*uint8)(Xsqlite3_value_blob(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
+ _len = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
+ _z = (*uint8)(Xsqlite3_value_blob(tls, *elem19(_argv, 0)))
if _z == nil {
return
}
func() {
- if _len != Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105829), unsafe.Pointer((*int8)(unsafe.Pointer(&_substrFuncØ00__func__Ø000))), unsafe.Pointer(str(131130)))
+ if _len != Xsqlite3_value_bytes(tls, *elem19(_argv, 0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105829), unsafe.Pointer(&_substrFuncØ00__func__Ø000), unsafe.Pointer(str(131143)))
crt.X__builtin_abort(tls)
}
}()
goto _10
_6:
- _z = Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _z = Xsqlite3_value_text(tls, *elem19(_argv, 0))
if _z == nil {
return
}
- _len = i32(0)
- if _p1 >= int64(i32(0)) {
+ _len = int32(0)
+ if _p1 >= (0) {
goto _12
}
_z2 = _z
@@ -114324,11 +116112,11 @@ _13:
if (*_z2) == 0 {
goto _16
}
- if int32(*postInc13(&_z2, 1)) < i32(192) {
+ if int32(*postInc15(&_z2, 1)) < int32(192) {
goto _17
}
_18:
- if (int32(*_z2) & i32(192)) == i32(128) {
+ if (int32(*_z2) & int32(192)) == int32(128) {
*(*uintptr)(unsafe.Pointer(&_z2)) += uintptr(1)
goto _18
}
@@ -114338,84 +116126,68 @@ _17:
_16:
_12:
_10:
- if _argc != i32(3) {
+ if _argc != int32(3) {
goto _20
}
- _p2 = int64(Xsqlite3_value_int(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2))))))
- if _p2 < int64(i32(0)) {
+ _p2 = int64(Xsqlite3_value_int(tls, *elem19(_argv, uintptr(2))))
+ if _p2 < (0) {
_p2 = -_p2
- _negP2 = i32(1)
+ _negP2 = int32(1)
}
goto _22
_20:
- _p2 = int64(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(Xsqlite3_context_db_handle(tls, _context).X31))))) + 4*uintptr(i32(0)))))
+ _p2 = int64(*elem8((*int32)(unsafe.Pointer(&(Xsqlite3_context_db_handle(tls, _context).XaLimit))), 0))
_22:
- if _p1 >= int64(i32(0)) {
+ if _p1 >= (0) {
goto _23
}
- {
- p := &_p1
- *p = (*p) + int64(_len)
- sink6(*p)
- }
- if _p1 >= int64(i32(0)) {
+ _p1 += int64(_len)
+ if _p1 >= (0) {
goto _24
}
- {
- p := &_p2
- *p = (*p) + _p1
- sink6(*p)
+ _p2 += _p1
+ if _p2 < (0) {
+ _p2 = 0
}
- if _p2 < int64(i32(0)) {
- _p2 = int64(i32(0))
- }
- _p1 = int64(i32(0))
+ _p1 = 0
_24:
goto _29
_23:
- if _p1 > int64(i32(0)) {
+ if _p1 > (0) {
_p1 -= 1
goto _29
}
- if _p2 > int64(i32(0)) {
+ if _p2 > (0) {
_p2 -= 1
}
_29:
if _negP2 == 0 {
goto _30
}
- {
- p := &_p1
- *p = (*p) - _p2
- sink6(*p)
- }
- if _p1 < int64(i32(0)) {
- {
- p := &_p2
- *p = (*p) + _p1
- sink6(*p)
- }
- _p1 = int64(i32(0))
+ _p1 -= _p2
+ if _p1 < (0) {
+ _p2 += _p1
+ _p1 = 0
}
_30:
func() {
- if _p1 < int64(i32(0)) || _p2 < int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(105876), unsafe.Pointer((*int8)(unsafe.Pointer(&_substrFuncØ00__func__Ø000))), unsafe.Pointer(str(131164)))
+ if _p1 < (0) || _p2 < (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(105876), unsafe.Pointer(&_substrFuncØ00__func__Ø000), unsafe.Pointer(str(131177)))
crt.X__builtin_abort(tls)
}
}()
- if _p0type == i32(4) {
+ if _p0type == int32(4) {
goto _35
}
_36:
if (*_z) == 0 || _p1 == 0 {
goto _37
}
- if int32(*postInc13(&_z, 1)) < i32(192) {
+ if int32(*postInc15(&_z, 1)) < int32(192) {
goto _39
}
_40:
- if (int32(*_z) & i32(192)) == i32(128) {
+ if (int32(*_z) & int32(192)) == int32(128) {
*(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
goto _40
}
@@ -114428,11 +116200,11 @@ _42:
if (*_z2) == 0 || _p2 == 0 {
goto _46
}
- if int32(*postInc13(&_z2, 1)) < i32(192) {
+ if int32(*postInc15(&_z2, 1)) < int32(192) {
goto _47
}
_48:
- if (int32(*_z2) & i32(192)) == i32(128) {
+ if (int32(*_z2) & int32(192)) == int32(128) {
*(*uintptr)(unsafe.Pointer(&_z2)) += uintptr(1)
goto _48
}
@@ -114440,72 +116212,67 @@ _47:
_p2 -= 1
goto _42
_46:
- Xsqlite3_result_text64(tls, _context, (*int8)(unsafe.Pointer(_z)), uint64(int32((uintptr(unsafe.Pointer(_z2))-uintptr(unsafe.Pointer(_z)))/1)), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})), uint8(i32(1)))
+ Xsqlite3_result_text64(tls, _context, (*int8)(unsafe.Pointer(_z)), uint64(int32(uintptr(unsafe.Pointer(_z2))-uintptr(unsafe.Pointer(_z)))), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})), uint8(1))
goto _50
_35:
if (_p1 + _p2) <= int64(_len) {
goto _51
}
_p2 = int64(_len) - _p1
- if _p2 < int64(i32(0)) {
- _p2 = int64(i32(0))
+ if _p2 < (0) {
+ _p2 = 0
}
_51:
- Xsqlite3_result_blob64(tls, _context, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z))+1*uintptr(_p1)))), uint64(_p2), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ Xsqlite3_result_blob64(tls, _context, unsafe.Pointer(elem15(_z, uintptr(_p1))), uint64(_p2), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
_50:
}
var _substrFuncØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_substrFuncØ00__func__Ø000[0], str(131179), 11)
+ crt.Xstrncpy(nil, &_substrFuncØ00__func__Ø000[0], str(131192), 11)
}
-// Routines used to compute the sum, average, and total.
-//
-// The SUM() function follows the (broken) SQL standard which means
-// that it returns NULL if it sums over no inputs. TOTAL returns
-// 0.0 in that case. In addition, TOTAL always returns a float where
-// SUM might return an integer if it never encounters a floating point
-// value. TOTAL never fails, but SUM might through an exception if
-// it overflows an integer.
+// C comment
+// /*
+// ** Routines used to compute the sum, average, and total.
+// **
+// ** The SUM() function follows the (broken) SQL standard which means
+// ** that it returns NULL if it sums over no inputs. TOTAL returns
+// ** 0.0 in that case. In addition, TOTAL always returns a float where
+// ** SUM might return an integer if it never encounters a floating point
+// ** value. TOTAL never fails, but SUM might through an exception if
+// ** it overflows an integer.
+// */
func _sumStep(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _type int32
var _2_v int64
var _p *XSumCtx
func() {
- if _argc != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107016), unsafe.Pointer((*int8)(unsafe.Pointer(&_sumStepØ00__func__Ø000))), unsafe.Pointer(str(125368)))
+ if _argc != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107016), unsafe.Pointer(&_sumStepØ00__func__Ø000), unsafe.Pointer(str(125396)))
crt.X__builtin_abort(tls)
}
}()
- _p = (*XSumCtx)(Xsqlite3_aggregate_context(tls, _context, int32(u32(28))))
- _type = Xsqlite3_value_numeric_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- if _p == nil || _type == i32(5) {
+ _p = (*XSumCtx)(Xsqlite3_aggregate_context(tls, _context, int32(28)))
+ _type = Xsqlite3_value_numeric_type(tls, *elem19(_argv, 0))
+ if _p == nil || _type == int32(5) {
goto _3
}
- *(*int64)(unsafe.Pointer(&(_p.X2))) += 1
- if _type != i32(1) {
+ _p.Xcnt += 1
+ if _type != int32(1) {
goto _4
}
- _2_v = Xsqlite3_value_int64(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- {
- p := (*float64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + float64(_2_v)
- sink4(*p)
- }
- if ((int32(_p.X4) | int32(_p.X3)) == i32(0)) && _sqlite3AddInt64(tls, (*int64)(unsafe.Pointer(&(_p.X1))), _2_v) != 0 {
- *(*uint8)(unsafe.Pointer(&(_p.X3))) = uint8(i32(1))
+ _2_v = Xsqlite3_value_int64(tls, *elem19(_argv, 0))
+ _p.XrSum += float64(_2_v)
+ if ((int32(_p.Xapprox) | int32(_p.Xoverflow)) == int32(0)) && _sqlite3AddInt64(tls, &_p.XiSum, _2_v) != 0 {
+ _p.Xoverflow = uint8(1)
}
goto _7
_4:
- {
- p := (*float64)(unsafe.Pointer(&(_p.X0)))
- *p = (*p) + Xsqlite3_value_double(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- sink4(*p)
- }
- *(*uint8)(unsafe.Pointer(&(_p.X4))) = uint8(i32(1))
+ _p.XrSum += Xsqlite3_value_double(tls, *elem19(_argv, 0))
+ _p.Xapprox = uint8(1)
_7:
_3:
}
@@ -114513,34 +116280,34 @@ _3:
var _sumStepØ00__func__Ø000 [8]int8
func init() {
- crt.Xstrncpy(nil, &_sumStepØ00__func__Ø000[0], str(131190), 8)
+ crt.Xstrncpy(nil, &_sumStepØ00__func__Ø000[0], str(131203), 8)
}
func _sumFinalize(tls *crt.TLS, _context *Xsqlite3_context) {
var _p *XSumCtx
- _p = (*XSumCtx)(Xsqlite3_aggregate_context(tls, _context, i32(0)))
- if _p == nil || (_p.X2) <= int64(i32(0)) {
+ _p = (*XSumCtx)(Xsqlite3_aggregate_context(tls, _context, int32(0)))
+ if _p == nil || _p.Xcnt <= (0) {
goto _1
}
- if (_p.X3) != 0 {
- Xsqlite3_result_error(tls, _context, str(130533), i32(-1))
+ if _p.Xoverflow != 0 {
+ Xsqlite3_result_error(tls, _context, str(130546), int32(-1))
goto _5
}
- if (_p.X4) != 0 {
- Xsqlite3_result_double(tls, _context, _p.X0)
+ if _p.Xapprox != 0 {
+ Xsqlite3_result_double(tls, _context, _p.XrSum)
goto _5
}
- Xsqlite3_result_int64(tls, _context, _p.X1)
+ Xsqlite3_result_int64(tls, _context, _p.XiSum)
_5:
_1:
}
func _totalFinalize(tls *crt.TLS, _context *Xsqlite3_context) {
var _p *XSumCtx
- _p = (*XSumCtx)(Xsqlite3_aggregate_context(tls, _context, i32(0)))
+ _p = (*XSumCtx)(Xsqlite3_aggregate_context(tls, _context, int32(0)))
Xsqlite3_result_double(tls, _context, func() float64 {
if _p != nil {
- return (_p.X0)
+ return _p.XrSum
}
return float64(0)
}())
@@ -114548,22 +116315,25 @@ func _totalFinalize(tls *crt.TLS, _context *Xsqlite3_context) {
func _avgFinalize(tls *crt.TLS, _context *Xsqlite3_context) {
var _p *XSumCtx
- _p = (*XSumCtx)(Xsqlite3_aggregate_context(tls, _context, i32(0)))
- if (_p != nil) && ((_p.X2) > int64(i32(0))) {
- Xsqlite3_result_double(tls, _context, (_p.X0)/float64(_p.X2))
+ _p = (*XSumCtx)(Xsqlite3_aggregate_context(tls, _context, int32(0)))
+ if (_p != nil) && (_p.Xcnt > (0)) {
+ Xsqlite3_result_double(tls, _context, _p.XrSum/float64(_p.Xcnt))
}
}
-// Routines to implement the count() aggregate function.
+// C comment
+// /*
+// ** Routines to implement the count() aggregate function.
+// */
func _countStep(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _p *XCountCtx
- _p = (*XCountCtx)(Xsqlite3_aggregate_context(tls, _context, int32(u32(8))))
- if ((_argc == i32(0)) || (i32(5) != Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))) && (_p != nil) {
- *(*int64)(unsafe.Pointer(&(_p.X0))) += 1
+ _p = (*XCountCtx)(Xsqlite3_aggregate_context(tls, _context, int32(8)))
+ if ((_argc == int32(0)) || (int32(5) != Xsqlite3_value_type(tls, *elem19(_argv, 0)))) && (_p != nil) {
+ _p.Xn += 1
}
func() {
- if _argc != i32(1) && _p != nil && (_p.X0) <= int64(i32(2147483647)) && (_p.X0) != int64(Xsqlite3_aggregate_count(tls, _context)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107085), unsafe.Pointer((*int8)(unsafe.Pointer(&_countStepØ00__func__Ø000))), unsafe.Pointer(str(131198)))
+ if _argc != int32(1) && _p != nil && _p.Xn <= int64(2147483647) && _p.Xn != int64(Xsqlite3_aggregate_count(tls, _context)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107085), unsafe.Pointer(&_countStepØ00__func__Ø000), unsafe.Pointer(str(131211)))
crt.X__builtin_abort(tls)
}
}()
@@ -114572,59 +116342,62 @@ func _countStep(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **X
var _countStepØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_countStepØ00__func__Ø000[0], str(131275), 10)
+ crt.Xstrncpy(nil, &_countStepØ00__func__Ø000[0], str(131288), 10)
}
func _countFinalize(tls *crt.TLS, _context *Xsqlite3_context) {
var _p *XCountCtx
- _p = (*XCountCtx)(Xsqlite3_aggregate_context(tls, _context, i32(0)))
+ _p = (*XCountCtx)(Xsqlite3_aggregate_context(tls, _context, int32(0)))
Xsqlite3_result_int64(tls, _context, func() int64 {
if _p != nil {
- return (_p.X0)
+ return _p.Xn
}
- return int64(i32(0))
+ return (0)
}())
}
-// group_concat(EXPR, ?SEPARATOR?)
+// C comment
+// /*
+// ** group_concat(EXPR, ?SEPARATOR?)
+// */
func _groupConcatStep(tls *crt.TLS, _context *Xsqlite3_context, _argc int32, _argv **XMem) {
var _nVal, _nSep, _1_firstTerm int32
var _zVal, _zSep *int8
var _1_db *Xsqlite3
var _pAccum *XStrAccum
func() {
- if _argc != i32(1) && _argc != i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(107159), unsafe.Pointer((*int8)(unsafe.Pointer(&_groupConcatStepØ00__func__Ø000))), unsafe.Pointer(str(130558)))
+ if _argc != int32(1) && _argc != int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(107159), unsafe.Pointer(&_groupConcatStepØ00__func__Ø000), unsafe.Pointer(str(130571)))
crt.X__builtin_abort(tls)
}
}()
- if Xsqlite3_value_type(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))) == i32(5) {
+ if Xsqlite3_value_type(tls, *elem19(_argv, 0)) == int32(5) {
return
}
- _pAccum = (*XStrAccum)(Xsqlite3_aggregate_context(tls, _context, int32(u32(28))))
+ _pAccum = (*XStrAccum)(Xsqlite3_aggregate_context(tls, _context, int32(28)))
if _pAccum == nil {
goto _4
}
_1_db = Xsqlite3_context_db_handle(tls, _context)
- _1_firstTerm = bool2int((_pAccum.X5) == uint32(i32(0)))
- *(*uint32)(unsafe.Pointer(&(_pAccum.X5))) = uint32(*(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[12]int32)(unsafe.Pointer(&(_1_db.X31))))) + 4*uintptr(i32(0)))))
+ _1_firstTerm = bool2int(_pAccum.XmxAlloc == (0))
+ _pAccum.XmxAlloc = uint32(*elem8((*int32)(unsafe.Pointer(&_1_db.XaLimit)), 0))
if _1_firstTerm != 0 {
goto _5
}
- if _argc == i32(2) {
- _zSep = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))))
- _nSep = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))
+ if _argc == int32(2) {
+ _zSep = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, uintptr(1)))))
+ _nSep = Xsqlite3_value_bytes(tls, *elem19(_argv, uintptr(1)))
goto _7
}
- _zSep = str(107763)
- _nSep = i32(1)
+ _zSep = str(107791)
+ _nSep = int32(1)
_7:
if _zSep != nil {
_sqlite3StrAccumAppend(tls, _pAccum, _zSep, _nSep)
}
_5:
- _zVal = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))))
- _nVal = Xsqlite3_value_bytes(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
+ _zVal = (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19(_argv, 0))))
+ _nVal = Xsqlite3_value_bytes(tls, *elem19(_argv, 0))
if _zVal != nil {
_sqlite3StrAccumAppend(tls, _pAccum, _zVal, _nVal)
}
@@ -114634,297 +116407,319 @@ _4:
var _groupConcatStepØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_groupConcatStepØ00__func__Ø000[0], str(131285), 16)
+ crt.Xstrncpy(nil, &_groupConcatStepØ00__func__Ø000[0], str(131298), 16)
}
func _groupConcatFinalize(tls *crt.TLS, _context *Xsqlite3_context) {
var _pAccum *XStrAccum
- _pAccum = (*XStrAccum)(Xsqlite3_aggregate_context(tls, _context, i32(0)))
+ _pAccum = (*XStrAccum)(Xsqlite3_aggregate_context(tls, _context, int32(0)))
if _pAccum == nil {
goto _0
}
- if int32(_pAccum.X6) == i32(2) {
+ if int32(_pAccum.XaccError) == int32(2) {
Xsqlite3_result_error_toobig(tls, _context)
goto _4
}
- if int32(_pAccum.X6) == i32(1) {
+ if int32(_pAccum.XaccError) == int32(1) {
Xsqlite3_result_error_nomem(tls, _context)
goto _4
}
- Xsqlite3_result_text(tls, _context, _sqlite3StrAccumFinish(tls, _pAccum), i32(-1), Xsqlite3_free)
+ Xsqlite3_result_text(tls, _context, _sqlite3StrAccumFinish(tls, _pAccum), int32(-1), Xsqlite3_free)
_4:
_0:
}
-// ************************************************** General Interfaces ******
-//
-// Initialize and shutdown the page cache subsystem. Neither of these
-// functions are threadsafe.
+// C comment
+// /*************************************************** General Interfaces ******
+// **
+// ** Initialize and shutdown the page cache subsystem. Neither of these
+// ** functions are threadsafe.
+// */
func _sqlite3PcacheInitialize(tls *crt.TLS) (r0 int32) {
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X2)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{nil})) {
+ if (_sqlite3Config.Xpcache2.XxInit) == nil {
_sqlite3PCacheSetDefault(tls)
}
- return ((*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X2)(tls, (*Xsqlite3_pcache_methods2)(unsafe.Pointer(&(_sqlite3Config.X12))).X1)
+ return (_sqlite3Config.Xpcache2.XxInit)(tls, _sqlite3Config.Xpcache2.XpArg)
}
-// This function is a wrapper around the OS specific implementation of
-// sqlite3_os_init(). The purpose of the wrapper is to provide the
-// ability to simulate a malloc failure, so that the handling of an
-// error in sqlite3_os_init() by the upper layers can be tested.
+// C comment
+// /*
+// ** This function is a wrapper around the OS specific implementation of
+// ** sqlite3_os_init(). The purpose of the wrapper is to provide the
+// ** ability to simulate a malloc failure, so that the handling of an
+// ** error in sqlite3_os_init() by the upper layers can be tested.
+// */
func _sqlite3OsInit(tls *crt.TLS) (r0 int32) {
var _p unsafe.Pointer
- _p = Xsqlite3_malloc(tls, i32(10))
+ _p = Xsqlite3_malloc(tls, int32(10))
if _p == nil {
- return _sqlite3NomemError(tls, i32(20396))
+ return _sqlite3NomemError(tls, int32(20396))
}
Xsqlite3_free(tls, _p)
return Xsqlite3_os_init(tls)
}
-// Initialize the operating system interface.
-//
-// This routine registers all VFS implementations for unix-like operating
-// systems. This routine, and the sqlite3_os_end() routine that follows,
-// should be the only routines in this file that are visible from other
-// files.
-//
-// This routine is called once during SQLite initialization and by a
-// single thread. The memory allocation and mutex subsystems have not
-// necessarily been initialized when this routine is called, and so they
-// should not be used.
+// C comment
+// /*
+// ** Initialize the operating system interface.
+// **
+// ** This routine registers all VFS implementations for unix-like operating
+// ** systems. This routine, and the sqlite3_os_end() routine that follows,
+// ** should be the only routines in this file that are visible from other
+// ** files.
+// **
+// ** This routine is called once during SQLite initialization and by a
+// ** single thread. The memory allocation and mutex subsystems have not
+// ** necessarily been initialized when this routine is called, and so they
+// ** should not be used.
+// */
func Xsqlite3_os_init(tls *crt.TLS) (r0 int32) {
var _i uint32
- i32(0)
- _i = uint32(i32(0))
+
+ _i = 0
_0:
- if _i >= u32(4) {
+ if _i >= uint32(4) {
goto _3
}
- Xsqlite3_vfs_register(tls, (*Xsqlite3_vfs)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3_os_initØ00aVfsØ001))+88*uintptr(_i))), bool2int(_i == uint32(i32(0))))
+ Xsqlite3_vfs_register(tls, elem133((*Xsqlite3_vfs)(unsafe.Pointer(&_sqlite3_os_initØ00aVfsØ001)), uintptr(_i)), bool2int(_i == (0)))
_i += 1
goto _0
_3:
- return i32(0)
+ return int32(0)
}
var _sqlite3_os_initØ00aVfsØ001 [4]Xsqlite3_vfs
func init() {
- _sqlite3_os_initØ00aVfsØ001 = [4]Xsqlite3_vfs{Xsqlite3_vfs{X0: i32(3), X1: i32(80), X2: i32(512), X3: nil, X4: str(131301), X5: unsafe.Pointer(&_posixIoFinder), X6: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32)(unsafe.Pointer(&struct {
+ _sqlite3_os_initØ00aVfsØ001 = [4]Xsqlite3_vfs{Xsqlite3_vfs{XiVersion: int32(3), XszOsFile: int32(80), XmxPathname: int32(512), XzName: str(131314), XpAppData: unsafe.Pointer(&_posixIoFinder), XxOpen: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, *Xsqlite3_file, int32, *int32) int32
- }{_unixOpen})), X7: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixOpen})), XxDelete: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32) int32
- }{_unixDelete})), X8: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
+ }{_unixDelete})), XxAccess: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int32) int32
- }{_unixAccess})), X9: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixAccess})), XxFullPathname: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int8) int32
- }{_unixFullPathname})), X10: *(*func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_unixFullPathname})), XxDlOpen: *(*func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) unsafe.Pointer
- }{_unixDlOpen})), X11: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&struct {
+ }{_unixDlOpen})), XxDlError: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8)
- }{_unixDlError})), X12: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_unixDlError})), XxDlSym: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS)
- }{_unixDlSym})), X13: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_unixDlSym})), XxDlClose: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer)
- }{_unixDlClose})), X14: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixDlClose})), XxRandomness: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32
- }{_unixRandomness})), X15: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixRandomness})), XxSleep: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32) int32
- }{_unixSleep})), X16: *(*func(*crt.TLS, unsafe.Pointer, *float64) int32)(unsafe.Pointer(&struct {
+ }{_unixSleep})), XxCurrentTime: *(*func(*crt.TLS, unsafe.Pointer, *float64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *float64) int32
- }{_unixCurrentTime})), X17: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixCurrentTime})), XxGetLastError: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32
- }{_unixGetLastError})), X18: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
+ }{_unixGetLastError})), XxCurrentTimeInt64: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int64) int32
- }{_unixCurrentTimeInt64})), X19: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32)(unsafe.Pointer(&struct {
+ }{_unixCurrentTimeInt64})), XxSetSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, func(*crt.TLS)) int32
- }{_unixSetSystemCall})), X20: *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_unixSetSystemCall})), XxGetSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) func(*crt.TLS)
- }{_unixGetSystemCall})), X21: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
+ }{_unixGetSystemCall})), XxNextSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) *int8
- }{_unixNextSystemCall}))}, Xsqlite3_vfs{X0: i32(3), X1: i32(80), X2: i32(512), X3: nil, X4: str(131306), X5: unsafe.Pointer(&_nolockIoFinder), X6: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32)(unsafe.Pointer(&struct {
+ }{_unixNextSystemCall}))}, Xsqlite3_vfs{XiVersion: int32(3), XszOsFile: int32(80), XmxPathname: int32(512), XzName: str(131319), XpAppData: unsafe.Pointer(&_nolockIoFinder), XxOpen: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, *Xsqlite3_file, int32, *int32) int32
- }{_unixOpen})), X7: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixOpen})), XxDelete: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32) int32
- }{_unixDelete})), X8: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
+ }{_unixDelete})), XxAccess: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int32) int32
- }{_unixAccess})), X9: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixAccess})), XxFullPathname: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int8) int32
- }{_unixFullPathname})), X10: *(*func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_unixFullPathname})), XxDlOpen: *(*func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) unsafe.Pointer
- }{_unixDlOpen})), X11: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&struct {
+ }{_unixDlOpen})), XxDlError: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8)
- }{_unixDlError})), X12: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_unixDlError})), XxDlSym: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS)
- }{_unixDlSym})), X13: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_unixDlSym})), XxDlClose: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer)
- }{_unixDlClose})), X14: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixDlClose})), XxRandomness: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32
- }{_unixRandomness})), X15: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixRandomness})), XxSleep: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32) int32
- }{_unixSleep})), X16: *(*func(*crt.TLS, unsafe.Pointer, *float64) int32)(unsafe.Pointer(&struct {
+ }{_unixSleep})), XxCurrentTime: *(*func(*crt.TLS, unsafe.Pointer, *float64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *float64) int32
- }{_unixCurrentTime})), X17: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixCurrentTime})), XxGetLastError: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32
- }{_unixGetLastError})), X18: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
+ }{_unixGetLastError})), XxCurrentTimeInt64: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int64) int32
- }{_unixCurrentTimeInt64})), X19: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32)(unsafe.Pointer(&struct {
+ }{_unixCurrentTimeInt64})), XxSetSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, func(*crt.TLS)) int32
- }{_unixSetSystemCall})), X20: *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_unixSetSystemCall})), XxGetSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) func(*crt.TLS)
- }{_unixGetSystemCall})), X21: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
+ }{_unixGetSystemCall})), XxNextSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) *int8
- }{_unixNextSystemCall}))}, Xsqlite3_vfs{X0: i32(3), X1: i32(80), X2: i32(512), X3: nil, X4: str(131316), X5: unsafe.Pointer(&_dotlockIoFinder), X6: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32)(unsafe.Pointer(&struct {
+ }{_unixNextSystemCall}))}, Xsqlite3_vfs{XiVersion: int32(3), XszOsFile: int32(80), XmxPathname: int32(512), XzName: str(131329), XpAppData: unsafe.Pointer(&_dotlockIoFinder), XxOpen: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, *Xsqlite3_file, int32, *int32) int32
- }{_unixOpen})), X7: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixOpen})), XxDelete: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32) int32
- }{_unixDelete})), X8: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
+ }{_unixDelete})), XxAccess: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int32) int32
- }{_unixAccess})), X9: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixAccess})), XxFullPathname: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int8) int32
- }{_unixFullPathname})), X10: *(*func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_unixFullPathname})), XxDlOpen: *(*func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) unsafe.Pointer
- }{_unixDlOpen})), X11: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&struct {
+ }{_unixDlOpen})), XxDlError: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8)
- }{_unixDlError})), X12: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_unixDlError})), XxDlSym: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS)
- }{_unixDlSym})), X13: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_unixDlSym})), XxDlClose: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer)
- }{_unixDlClose})), X14: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixDlClose})), XxRandomness: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32
- }{_unixRandomness})), X15: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixRandomness})), XxSleep: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32) int32
- }{_unixSleep})), X16: *(*func(*crt.TLS, unsafe.Pointer, *float64) int32)(unsafe.Pointer(&struct {
+ }{_unixSleep})), XxCurrentTime: *(*func(*crt.TLS, unsafe.Pointer, *float64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *float64) int32
- }{_unixCurrentTime})), X17: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixCurrentTime})), XxGetLastError: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32
- }{_unixGetLastError})), X18: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
+ }{_unixGetLastError})), XxCurrentTimeInt64: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int64) int32
- }{_unixCurrentTimeInt64})), X19: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32)(unsafe.Pointer(&struct {
+ }{_unixCurrentTimeInt64})), XxSetSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, func(*crt.TLS)) int32
- }{_unixSetSystemCall})), X20: *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_unixSetSystemCall})), XxGetSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) func(*crt.TLS)
- }{_unixGetSystemCall})), X21: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
+ }{_unixGetSystemCall})), XxNextSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) *int8
- }{_unixNextSystemCall}))}, Xsqlite3_vfs{X0: i32(3), X1: i32(80), X2: i32(512), X3: nil, X4: str(131329), X5: unsafe.Pointer(&_posixIoFinder), X6: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32)(unsafe.Pointer(&struct {
+ }{_unixNextSystemCall}))}, Xsqlite3_vfs{XiVersion: int32(3), XszOsFile: int32(80), XmxPathname: int32(512), XzName: str(131342), XpAppData: unsafe.Pointer(&_posixIoFinder), XxOpen: *(*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, *Xsqlite3_file, int32, *int32) int32
- }{_unixOpen})), X7: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixOpen})), XxDelete: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32) int32
- }{_unixDelete})), X8: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
+ }{_unixDelete})), XxAccess: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int32) int32
- }{_unixAccess})), X9: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixAccess})), XxFullPathname: *(*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, int32, *int8) int32
- }{_unixFullPathname})), X10: *(*func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
+ }{_unixFullPathname})), XxDlOpen: *(*func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) unsafe.Pointer
- }{_unixDlOpen})), X11: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&struct {
+ }{_unixDlOpen})), XxDlError: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8)
- }{_unixDlError})), X12: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_unixDlError})), XxDlSym: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS)
- }{_unixDlSym})), X13: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_unixDlSym})), XxDlClose: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, unsafe.Pointer)
- }{_unixDlClose})), X14: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixDlClose})), XxRandomness: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32
- }{_unixRandomness})), X15: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixRandomness})), XxSleep: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32) int32
- }{_unixSleep})), X16: *(*func(*crt.TLS, unsafe.Pointer, *float64) int32)(unsafe.Pointer(&struct {
+ }{_unixSleep})), XxCurrentTime: *(*func(*crt.TLS, unsafe.Pointer, *float64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *float64) int32
- }{_unixCurrentTime})), X17: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
+ }{_unixCurrentTime})), XxGetLastError: *(*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, int32, *int8) int32
- }{_unixGetLastError})), X18: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
+ }{_unixGetLastError})), XxCurrentTimeInt64: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int64) int32
- }{_unixCurrentTimeInt64})), X19: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32)(unsafe.Pointer(&struct {
+ }{_unixCurrentTimeInt64})), XxSetSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8, func(*crt.TLS)) int32
- }{_unixSetSystemCall})), X20: *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_unixSetSystemCall})), XxGetSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) func(*crt.TLS)
- }{_unixGetSystemCall})), X21: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
+ }{_unixGetSystemCall})), XxNextSystemCall: *(*func(*crt.TLS, unsafe.Pointer, *int8) *int8)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_vfs, *int8) *int8
}{_unixNextSystemCall}))}}
}
+// C comment
+// /*
+// ** Here are all of the sqlite3_io_methods objects for each of the
+// ** locking strategies. Functions that return pointers to these methods
+// ** are also created.
+// */
var _posixIoFinder func(*crt.TLS, *int8, *XunixFile) *Xsqlite3_io_methods
func init() {
_posixIoFinder = _posixIoFinderImpl
}
-// Here are all of the sqlite3_io_methods objects for each of the
-// locking strategies. Functions that return pointers to these methods
-// are also created.
+// C comment
+// /*
+// ** Here are all of the sqlite3_io_methods objects for each of the
+// ** locking strategies. Functions that return pointers to these methods
+// ** are also created.
+// */
func _posixIoFinderImpl(tls *crt.TLS, _z *int8, _p *XunixFile) (r0 *Xsqlite3_io_methods) {
return &_posixIoMethods
}
+// C comment
+// /*
+// ** Here are all of the sqlite3_io_methods objects for each of the
+// ** locking strategies. Functions that return pointers to these methods
+// ** are also created.
+// */
var _posixIoMethods Xsqlite3_io_methods
func init() {
- _posixIoMethods = Xsqlite3_io_methods{X0: i32(3), X1: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ _posixIoMethods = Xsqlite3_io_methods{XiVersion: int32(3), XxClose: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_unixClose})), X2: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
+ }{_unixClose})), XxRead: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32
- }{_unixRead})), X3: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
+ }{_unixRead})), XxWrite: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32
- }{_unixWrite})), X4: *(*func(*crt.TLS, unsafe.Pointer, int64) int32)(unsafe.Pointer(&struct {
+ }{_unixWrite})), XxTruncate: *(*func(*crt.TLS, unsafe.Pointer, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64) int32
- }{_unixTruncate})), X5: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixTruncate})), XxSync: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_unixSync})), X6: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
+ }{_unixSync})), XxFileSize: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, *int64) int32
- }{_unixFileSize})), X7: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixFileSize})), XxLock: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_unixLock})), X8: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixLock})), XxUnlock: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_unixUnlock})), X9: *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&struct {
+ }{_unixUnlock})), XxCheckReservedLock: *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, *int32) int32
- }{_unixCheckReservedLock})), X10: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixCheckReservedLock})), XxFileControl: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32, unsafe.Pointer) int32
- }{_unixFileControl})), X11: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixFileControl})), XxSectorSize: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_unixSectorSize})), X12: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixSectorSize})), XxDeviceCharacteristics: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_unixDeviceCharacteristics})), X13: *(*func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixDeviceCharacteristics})), XxShmMap: *(*func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32
- }{_unixShmMap})), X14: *(*func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixShmMap})), XxShmLock: *(*func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32, int32, int32) int32
- }{_unixShmLock})), X15: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_unixShmLock})), XxShmBarrier: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file)
- }{_unixShmBarrier})), X16: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixShmBarrier})), XxShmUnmap: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_unixShmUnmap})), X17: *(*func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixShmUnmap})), XxFetch: *(*func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64, int32, *unsafe.Pointer) int32
- }{_unixFetch})), X18: *(*func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixFetch})), XxUnfetch: *(*func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64, unsafe.Pointer) int32
}{_unixUnfetch}))}
}
-// Close a file.
+// C comment
+// /*
+// ** Close a file.
+// */
func _unixClose(tls *crt.TLS, _id *Xsqlite3_file) (r0 int32) {
var _rc int32
var _pFile *XunixFile
- _rc = i32(0)
+ _rc = int32(0)
_pFile = (*XunixFile)(unsafe.Pointer(_id))
_verifyDbFile(tls, _pFile)
- _unixUnlock(tls, _id, i32(0))
+ _unixUnlock(tls, _id, int32(0))
_unixEnterMutex(tls)
func() {
- if ((*XunixInodeInfo)(_pFile.X2).X6) <= i32(0) && int32((*XunixInodeInfo)(_pFile.X2).X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31867), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixCloseØ00__func__Ø000))), unsafe.Pointer(str(131339)))
+ if ((*XunixInodeInfo)(_pFile.XpInode).XnLock) <= int32(0) && int32((*XunixInodeInfo)(_pFile.XpInode).XbProcessLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31867), unsafe.Pointer(&_unixCloseØ00__func__Ø000), unsafe.Pointer(str(131352)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
- if (*XunixInodeInfo)(_pFile.X2) != nil {
- return i32(1)
+ if _pFile.XpInode != nil {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31868), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixCloseØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31868), unsafe.Pointer(&_unixCloseØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
- }() != 0 && ((*XunixInodeInfo)(_pFile.X2).X6) != 0 {
+ }() != 0 && ((*XunixInodeInfo)(_pFile.XpInode).XnLock) != 0 {
_setPendingFd(tls, _pFile)
}
_releaseInodeInfo(tls, _pFile)
@@ -114933,160 +116728,181 @@ func _unixClose(tls *crt.TLS, _id *Xsqlite3_file) (r0 int32) {
return _rc
}
-// Check a unixFile that is a database. Verify the following:
-//
-// (1) There is exactly one hard link on the file
-// (2) The file is not a symbolic link
-// (3) The file has not been renamed or unlinked
-//
-// Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right.
+// C comment
+// /*
+// ** Check a unixFile that is a database. Verify the following:
+// **
+// ** (1) There is exactly one hard link on the file
+// ** (2) The file is not a symbolic link
+// ** (3) The file has not been renamed or unlinked
+// **
+// ** Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right.
+// */
func _verifyDbFile(tls *crt.TLS, _pFile *XunixFile) {
var _rc int32
var _buf crt.Xstruct_stat64
- if (int32(_pFile.X5) & i32(128)) != 0 {
+ if (int32(_pFile.XctrlFlags) & int32(128)) != 0 {
return
}
- _rc = (*(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(5)))).X1)})))(tls, _pFile.X3, &_buf)
- if _rc != i32(0) {
- Xsqlite3_log(tls, i32(28), str(131396), unsafe.Pointer(_pFile.X9))
+ _rc = func() func(*crt.TLS, int32, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(5)).XpCurrent
+ return *(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pFile.Xh, &_buf)
+ if _rc != int32(0) {
+ Xsqlite3_log(tls, int32(28), str(131409), unsafe.Pointer(_pFile.XzPath))
return
}
- if (_buf.X4) == uint32(i32(0)) {
- Xsqlite3_log(tls, i32(28), str(131420), unsafe.Pointer(_pFile.X9))
+ if _buf.Xst_nlink == (0) {
+ Xsqlite3_log(tls, int32(28), str(131433), unsafe.Pointer(_pFile.XzPath))
return
}
- if (_buf.X4) > uint32(i32(1)) {
- Xsqlite3_log(tls, i32(28), str(131449), unsafe.Pointer(_pFile.X9))
+ if _buf.Xst_nlink > uint32(1) {
+ Xsqlite3_log(tls, int32(28), str(131462), unsafe.Pointer(_pFile.XzPath))
return
}
if _fileHasMoved(tls, _pFile) != 0 {
- Xsqlite3_log(tls, i32(28), str(131476), unsafe.Pointer(_pFile.X9))
+ Xsqlite3_log(tls, int32(28), str(131489), unsafe.Pointer(_pFile.XzPath))
return
}
- _ = _buf
}
+// C comment
+// /*
+// ** Many system calls are accessed through pointer-to-functions so that
+// ** they may be overridden at runtime to facilitate fault injection during
+// ** testing and sandboxing. The following array holds the names and pointers
+// ** to all overrideable system calls.
+// */
var _aSyscall [28]Tunix_syscall
func init() {
- _aSyscall = [28]Tunix_syscall{Tunix_syscall{X0: str(131504), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ _aSyscall = [28]Tunix_syscall{Tunix_syscall{XzName: str(131517), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, int32, int32) int32
- }{_posixOpen})), X2: nil}, Tunix_syscall{X0: str(131509), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS, int32) int32 }{crt.Xclose})), X2: nil}, Tunix_syscall{X0: str(124450), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_posixOpen}))}, Tunix_syscall{XzName: str(131522), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS, int32) int32 }{crt.Xclose}))}, Tunix_syscall{XzName: str(124478), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, int32) int32
- }{crt.Xaccess})), X2: nil}, Tunix_syscall{X0: str(131515), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xaccess}))}, Tunix_syscall{XzName: str(131528), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, uint32) *int8
- }{crt.Xgetcwd})), X2: nil}, Tunix_syscall{X0: str(131522), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xgetcwd}))}, Tunix_syscall{XzName: str(131535), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32
- }{crt.Xstat64})), X2: nil}, Tunix_syscall{X0: str(131527), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xstat64}))}, Tunix_syscall{XzName: str(131540), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, int32, *crt.Xstruct_stat64) int32
- }{crt.Xfstat64})), X2: nil}, Tunix_syscall{X0: str(131533), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xfstat64}))}, Tunix_syscall{XzName: str(131546), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, int32, int64) int32
- }{crt.Xftruncate64})), X2: nil}, Tunix_syscall{X0: str(131543), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xftruncate64}))}, Tunix_syscall{XzName: str(131556), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, int32, int32, ...interface{}) int32
- }{crt.Xfcntl})), X2: nil}, Tunix_syscall{X0: str(131549), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xfcntl}))}, Tunix_syscall{XzName: str(131562), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, int32, unsafe.Pointer, uint32) int32
- }{crt.Xread})), X2: nil}, Tunix_syscall{X0: str(131554), X1: nil, X2: nil}, Tunix_syscall{X0: str(131560), X1: nil, X2: nil}, Tunix_syscall{X0: str(131568), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xread}))}, Tunix_syscall{XzName: str(131567)}, Tunix_syscall{XzName: str(131573)}, Tunix_syscall{XzName: str(131581), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, int32, unsafe.Pointer, uint32) int32
- }{crt.Xwrite})), X2: nil}, Tunix_syscall{X0: str(131574), X1: nil, X2: nil}, Tunix_syscall{X0: str(131581), X1: nil, X2: nil}, Tunix_syscall{X0: str(131590), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xwrite}))}, Tunix_syscall{XzName: str(131587)}, Tunix_syscall{XzName: str(131594)}, Tunix_syscall{XzName: str(131603), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, int32, uint32) int32
- }{crt.Xfchmod})), X2: nil}, Tunix_syscall{X0: str(131597), X1: nil, X2: nil}, Tunix_syscall{X0: str(131607), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS, *int8) int32 }{crt.Xunlink})), X2: nil}, Tunix_syscall{X0: str(131614), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xfchmod}))}, Tunix_syscall{XzName: str(131610)}, Tunix_syscall{XzName: str(131620), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS, *int8) int32 }{crt.Xunlink}))}, Tunix_syscall{XzName: str(131627), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, *int32) int32
- }{_openDirectory})), X2: nil}, Tunix_syscall{X0: str(131628), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{_openDirectory}))}, Tunix_syscall{XzName: str(131641), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, uint32) int32
- }{crt.Xmkdir})), X2: nil}, Tunix_syscall{X0: str(131634), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS, *int8) int32 }{crt.Xrmdir})), X2: nil}, Tunix_syscall{X0: str(131640), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xmkdir}))}, Tunix_syscall{XzName: str(131647), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS, *int8) int32 }{crt.Xrmdir}))}, Tunix_syscall{XzName: str(131653), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, int32, uint32, uint32) int32
- }{crt.Xfchown})), X2: nil}, Tunix_syscall{X0: str(131647), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS) uint32 }{crt.Xgeteuid})), X2: nil}, Tunix_syscall{X0: str(131655), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xfchown}))}, Tunix_syscall{XzName: str(131660), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS) uint32 }{crt.Xgeteuid}))}, Tunix_syscall{XzName: str(131668), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer
- }{crt.Xmmap64})), X2: nil}, Tunix_syscall{X0: str(131660), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xmmap64}))}, Tunix_syscall{XzName: str(131673), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, unsafe.Pointer, uint32) int32
- }{crt.Xmunmap})), X2: nil}, Tunix_syscall{X0: str(131667), X1: nil, X2: nil}, Tunix_syscall{X0: str(131674), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS) int32 }{_unixGetpagesize})), X2: nil}, Tunix_syscall{X0: str(131686), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xmunmap}))}, Tunix_syscall{XzName: str(131680)}, Tunix_syscall{XzName: str(131687), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct{ f func(*crt.TLS) int32 }{_unixGetpagesize}))}, Tunix_syscall{XzName: str(131699), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, *int8, uint32) int32
- }{crt.Xreadlink})), X2: nil}, Tunix_syscall{X0: str(131695), X1: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
+ }{crt.Xreadlink}))}, Tunix_syscall{XzName: str(131708), XpCurrent: *(*func(*crt.TLS))(unsafe.Pointer(&struct {
f func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32
- }{crt.Xlstat64})), X2: nil}}
-}
-
-// Different Unix systems declare open() in different ways. Same use
-// open(const char*,int,mode_t). Others use open(const char*,int,...).
-// The difference is important when using a pointer to the function.
-//
-// The safest way to deal with the problem is to always use this wrapper
-// which always has the same well-defined interface.
+ }{crt.Xlstat64}))}}
+}
+
+// C comment
+// /*
+// ** Different Unix systems declare open() in different ways. Same use
+// ** open(const char*,int,mode_t). Others use open(const char*,int,...).
+// ** The difference is important when using a pointer to the function.
+// **
+// ** The safest way to deal with the problem is to always use this wrapper
+// ** which always has the same well-defined interface.
+// */
func _posixOpen(tls *crt.TLS, _zFile *int8, _flags int32, _mode int32) (r0 int32) {
return crt.Xopen64(tls, _zFile, _flags, _mode)
}
-// Open a file descriptor to the directory containing file zFilename.
-// If successful, *pFd is set to the opened file descriptor and
-// SQLITE_OK is returned. If an error occurs, either SQLITE_NOMEM
-// or SQLITE_CANTOPEN is returned and *pFd is set to an undefined
-// value.
-//
-// The directory file descriptor is used for only one thing - to
-// fsync() a directory to make sure file creation and deletion events
-// are flushed to disk. Such fsyncs are not needed on newer
-// journaling filesystems, but are required on older filesystems.
-//
-// This routine can be overridden using the xSetSysCall interface.
-// The ability to override this routine was added in support of the
-// chromium sandbox. Opening a directory is a security risk (we are
-// told) so making it overrideable allows the chromium sandbox to
-// replace this routine with a harmless no-op. To make this routine
-// a no-op, replace it with a stub that returns SQLITE_OK but leaves
-// *pFd set to a negative number.
-//
-// If SQLITE_OK is returned, the caller is responsible for closing
-// the file descriptor *pFd using close().
+// C comment
+// /*
+// ** Open a file descriptor to the directory containing file zFilename.
+// ** If successful, *pFd is set to the opened file descriptor and
+// ** SQLITE_OK is returned. If an error occurs, either SQLITE_NOMEM
+// ** or SQLITE_CANTOPEN is returned and *pFd is set to an undefined
+// ** value.
+// **
+// ** The directory file descriptor is used for only one thing - to
+// ** fsync() a directory to make sure file creation and deletion events
+// ** are flushed to disk. Such fsyncs are not needed on newer
+// ** journaling filesystems, but are required on older filesystems.
+// **
+// ** This routine can be overridden using the xSetSysCall interface.
+// ** The ability to override this routine was added in support of the
+// ** chromium sandbox. Opening a directory is a security risk (we are
+// ** told) so making it overrideable allows the chromium sandbox to
+// ** replace this routine with a harmless no-op. To make this routine
+// ** a no-op, replace it with a stub that returns SQLITE_OK but leaves
+// ** *pFd set to a negative number.
+// **
+// ** If SQLITE_OK is returned, the caller is responsible for closing
+// ** the file descriptor *pFd using close().
+// */
func _openDirectory(tls *crt.TLS, _zFilename *int8, _pFd *int32) (r0 int32) {
var _ii, _fd int32
var _zDirname [513]int8
- _fd = i32(-1)
- Xsqlite3_snprintf(tls, i32(512), (*int8)(unsafe.Pointer(&_zDirname)), str(24576), unsafe.Pointer(_zFilename))
+ _fd = int32(-1)
+ Xsqlite3_snprintf(tls, int32(512), (*int8)(unsafe.Pointer(&_zDirname)), str(24531), unsafe.Pointer(_zFilename))
_ii = int32(crt.Xstrlen(tls, (*int8)(unsafe.Pointer(&_zDirname))))
_0:
- if _ii <= i32(0) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDirname)) + 1*uintptr(_ii)))) == i32(47) {
+ if _ii <= int32(0) || int32(*elem1((*int8)(unsafe.Pointer(&_zDirname)), uintptr(_ii))) == int32(47) {
goto _4
}
_ii -= 1
goto _0
_4:
- if _ii > i32(0) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDirname)) + 1*uintptr(_ii))) = int8(i32(0))
+ if _ii > int32(0) {
+ *elem1((*int8)(unsafe.Pointer(&_zDirname)), uintptr(_ii)) = 0
goto _6
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDirname)) + 1*uintptr(i32(0))))) != i32(47) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDirname)) + 1*uintptr(i32(0)))) = int8(i32(46))
+ if int32(*elem1((*int8)(unsafe.Pointer(&_zDirname)), 0)) != int32(47) {
+ *elem1((*int8)(unsafe.Pointer(&_zDirname)), 0) = int8(46)
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zDirname)) + 1*uintptr(i32(1)))) = int8(i32(0))
+ *elem1((*int8)(unsafe.Pointer(&_zDirname)), uintptr(1)) = 0
_6:
- _fd = _robust_open(tls, (*int8)(unsafe.Pointer(&_zDirname)), i32(0), uint32(i32(0)))
- if _fd >= i32(0) {
+ _fd = _robust_open(tls, (*int8)(unsafe.Pointer(&_zDirname)), int32(0), 0)
+ if _fd >= int32(0) {
}
*_pFd = _fd
- if _fd >= i32(0) {
- return i32(0)
+ if _fd >= int32(0) {
+ return int32(0)
}
- return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, i32(33419)), str(131614), (*int8)(unsafe.Pointer(&_zDirname)), i32(33419))
+ return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(33419)), str(131627), (*int8)(unsafe.Pointer(&_zDirname)), int32(33419))
_ = _zDirname
panic(0)
}
-// Invoke open(). Do so multiple times, until it either succeeds or
-// fails for some reason other than EINTR.
-//
-// If the file creation mode "m" is 0 then set it to the default for
-// SQLite. The default is SQLITE_DEFAULT_FILE_PERMISSIONS (normally
-// 0644) as modified by the system umask. If m is not 0, then
-// make the file creation mode be exactly m ignoring the umask.
-//
-// The m parameter will be non-zero only when creating -wal, -journal,
-// and -shm files. We want those files to have *exactly* the same
-// permissions as their original database, unadulterated by the umask.
-// In that way, if a database file is -rw-rw-rw or -rw-rw-r-, and a
-// transaction crashes and leaves behind hot journals, then any
-// process that is able to write to the database will also be able to
-// recover the hot journals.
+// C comment
+// /*
+// ** Invoke open(). Do so multiple times, until it either succeeds or
+// ** fails for some reason other than EINTR.
+// **
+// ** If the file creation mode "m" is 0 then set it to the default for
+// ** SQLite. The default is SQLITE_DEFAULT_FILE_PERMISSIONS (normally
+// ** 0644) as modified by the system umask. If m is not 0, then
+// ** make the file creation mode be exactly m ignoring the umask.
+// **
+// ** The m parameter will be non-zero only when creating -wal, -journal,
+// ** and -shm files. We want those files to have *exactly* the same
+// ** permissions as their original database, unadulterated by the umask.
+// ** In that way, if a database file is -rw-rw-rw or -rw-rw-r-, and a
+// ** transaction crashes and leaves behind hot journals, then any
+// ** process that is able to write to the database will also be able to
+// ** recover the hot journals.
+// */
func _robust_open(tls *crt.TLS, _z *int8, _f int32, _m uint32) (r0 int32) {
var _fd int32
var _m2 uint32
@@ -115095,370 +116911,415 @@ func _robust_open(tls *crt.TLS, _z *int8, _f int32, _m uint32) (r0 int32) {
if _m != 0 {
return _m
}
- return uint32(i32(420))
+ return uint32(420)
}()
_2:
- _fd = (*(*func(*crt.TLS, *int8, int32, int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(0)))).X1)})))(tls, _z, _f, int32(_m2))
- if _fd >= i32(0) {
+ _fd = func() func(*crt.TLS, *int8, int32, int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), 0).XpCurrent
+ return *(*func(*crt.TLS, *int8, int32, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _z, _f, int32(_m2))
+ if _fd >= int32(0) {
goto _4
}
- if (*crt.X__errno_location(tls)) == i32(4) {
+ if (*crt.X__errno_location(tls)) == int32(4) {
goto _2
}
goto _3
_4:
- if _fd >= i32(3) {
+ if _fd >= int32(3) {
goto _3
}
- (*(*func(*crt.TLS, int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(1)))).X1)})))(tls, _fd)
- Xsqlite3_log(tls, i32(28), str(131701), unsafe.Pointer(_z), _fd)
- _fd = i32(-1)
- if (*(*func(*crt.TLS, *int8, int32, int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(0)))).X1)})))(tls, str(131744), _f, int32(_m)) < i32(0) {
+ func() func(*crt.TLS, int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(1)).XpCurrent
+ return *(*func(*crt.TLS, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _fd)
+ Xsqlite3_log(tls, int32(28), str(131714), unsafe.Pointer(_z), _fd)
+ _fd = int32(-1)
+ if func() func(*crt.TLS, *int8, int32, int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), 0).XpCurrent
+ return *(*func(*crt.TLS, *int8, int32, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, str(131757), _f, int32(_m)) < int32(0) {
goto _3
}
goto _2
_3:
- if _fd < i32(0) {
+ if _fd < int32(0) {
goto _8
}
- if _m == uint32(i32(0)) {
+ if _m == (0) {
goto _9
}
- if (((*(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(5)))).X1)})))(tls, _fd, &_4_statbuf) == i32(0)) && ((_4_statbuf.X9) == int64(i32(0)))) && (((_4_statbuf.X3) & uint32(i32(511))) != _m) {
- (*(*func(*crt.TLS, int32, uint32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(14)))).X1)})))(tls, _fd, _m)
+ if ((func() func(*crt.TLS, int32, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(5)).XpCurrent
+ return *(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _fd, &_4_statbuf) == int32(0)) && (_4_statbuf.Xst_size == (0))) && ((_4_statbuf.Xst_mode & uint32(511)) != _m) {
+ func() func(*crt.TLS, int32, uint32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(14)).XpCurrent
+ return *(*func(*crt.TLS, int32, uint32) int32)(unsafe.Pointer(&v))
+ }()(tls, _fd, _m)
}
_9:
- (*(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(7)))).X1)})))(tls, _fd, i32(2), (*(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(7)))).X1)})))(tls, _fd, i32(1), i32(0))|i32(1))
+ func() func(*crt.TLS, int32, int32, ...interface{}) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(7)).XpCurrent
+ return *(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&v))
+ }()(tls, _fd, int32(2), func() func(*crt.TLS, int32, int32, ...interface{}) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(7)).XpCurrent
+ return *(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&v))
+ }()(tls, _fd, int32(1), int32(0))|int32(1))
_8:
return _fd
-
- _ = _4_statbuf
- panic(0)
}
func _unixLogErrorAtLine(tls *crt.TLS, _errcode int32, _zFunc *int8, _zPath *int8, _iLine int32) (r0 int32) {
var _iErrno int32
var _zErr *int8
_iErrno = *crt.X__errno_location(tls)
- _zErr = str(0)
+ _zErr = str(284)
if _zPath == nil {
- _zPath = str(0)
+ _zPath = str(284)
}
- Xsqlite3_log(tls, _errcode, str(131754), _iLine, _iErrno, unsafe.Pointer(_zFunc), unsafe.Pointer(_zPath), unsafe.Pointer(_zErr))
+ Xsqlite3_log(tls, _errcode, str(131767), _iLine, _iErrno, unsafe.Pointer(_zFunc), unsafe.Pointer(_zPath), unsafe.Pointer(_zErr))
return _errcode
}
-// Return the system page size.
-//
-// This function should not be called directly by other code in this file.
-// Instead, it should be called via macro osGetpagesize().
+// C comment
+// /*
+// ** Return the system page size.
+// **
+// ** This function should not be called directly by other code in this file.
+// ** Instead, it should be called via macro osGetpagesize().
+// */
func _unixGetpagesize(tls *crt.TLS) (r0 int32) {
- return crt.Xsysconf(tls, i32(30))
+ return crt.Xsysconf(tls, int32(30))
}
-// Return TRUE if pFile has been renamed or unlinked since it was first opened.
+// C comment
+// /*
+// ** Return TRUE if pFile has been renamed or unlinked since it was first opened.
+// */
func _fileHasMoved(tls *crt.TLS, _pFile *XunixFile) (r0 int32) {
var _buf crt.Xstruct_stat64
- return bool2int(((*XunixInodeInfo)(_pFile.X2) != nil) && (((*(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(4)))).X1)})))(tls, _pFile.X9, &_buf) != i32(0)) || ((_buf.X18) != ((*TunixFileId)(unsafe.Pointer(&((*XunixInodeInfo)(_pFile.X2).X0))).X1))))
-
- _ = _buf
- panic(0)
-}
-
-// Lower the locking level on file descriptor pFile to eFileLock. eFileLock
-// must be either NO_LOCK or SHARED_LOCK.
-//
-// If the locking level of the file descriptor is already at or below
-// the requested locking level, this routine is a no-op.
+ return bool2int(((*XunixInodeInfo)(_pFile.XpInode) != nil) && ((func() func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(4)).XpCurrent
+ return *(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pFile.XzPath, &_buf) != int32(0)) || (_buf.Xst_ino != (((*XunixInodeInfo)(_pFile.XpInode).XfileId).Xino))))
+}
+
+// C comment
+// /*
+// ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
+// ** must be either NO_LOCK or SHARED_LOCK.
+// **
+// ** If the locking level of the file descriptor is already at or below
+// ** the requested locking level, this routine is a no-op.
+// */
func _unixUnlock(tls *crt.TLS, _id *Xsqlite3_file, _eFileLock int32) (r0 int32) {
func() {
- if _eFileLock != i32(1) && ((*XunixFile)(unsafe.Pointer(_id)).X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31802), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixUnlockØ00__func__Ø000))), unsafe.Pointer(str(131785)))
+ if _eFileLock != int32(1) && ((*XunixFile)(unsafe.Pointer(_id)).XnFetchOut) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31802), unsafe.Pointer(&_unixUnlockØ00__func__Ø000), unsafe.Pointer(str(131798)))
crt.X__builtin_abort(tls)
}
}()
- return _posixUnlock(tls, _id, _eFileLock, i32(0))
+ return _posixUnlock(tls, _id, _eFileLock, int32(0))
}
var _unixUnlockØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_unixUnlockØ00__func__Ø000[0], str(131842), 11)
+ crt.Xstrncpy(nil, &_unixUnlockØ00__func__Ø000[0], str(131855), 11)
}
-// Lower the locking level on file descriptor pFile to eFileLock. eFileLock
-// must be either NO_LOCK or SHARED_LOCK.
-//
-// If the locking level of the file descriptor is already at or below
-// the requested locking level, this routine is a no-op.
-//
-// If handleNFSUnlock is true, then on downgrading an EXCLUSIVE_LOCK to SHARED
-// the byte range is divided into 2 parts and the first part is unlocked then
-// set to a read lock, then the other part is simply unlocked. This works
-// around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to
-// remove the write lock on a region when a read lock is set.
+// C comment
+// /*
+// ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
+// ** must be either NO_LOCK or SHARED_LOCK.
+// **
+// ** If the locking level of the file descriptor is already at or below
+// ** the requested locking level, this routine is a no-op.
+// **
+// ** If handleNFSUnlock is true, then on downgrading an EXCLUSIVE_LOCK to SHARED
+// ** the byte range is divided into 2 parts and the first part is unlocked then
+// ** set to a read lock, then the other part is simply unlocked. This works
+// ** around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to
+// ** remove the write lock on a region when a read lock is set.
+// */
func _posixUnlock(tls *crt.TLS, _id *Xsqlite3_file, _eFileLock int32, _handleNFSUnlock int32) (r0 int32) {
var _rc int32
var _pInode *XunixInodeInfo
var _pFile *XunixFile
var _lock Tflock
_pFile = (*XunixFile)(unsafe.Pointer(_id))
- _rc = i32(0)
+ _rc = int32(0)
func() {
if _pFile == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31646), unsafe.Pointer((*int8)(unsafe.Pointer(&_posixUnlockØ00__func__Ø000))), unsafe.Pointer(str(58046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31646), unsafe.Pointer(&_posixUnlockØ00__func__Ø000), unsafe.Pointer(str(58022)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eFileLock > i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31651), unsafe.Pointer((*int8)(unsafe.Pointer(&_posixUnlockØ00__func__Ø000))), unsafe.Pointer(str(131853)))
+ if _eFileLock > int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31651), unsafe.Pointer(&_posixUnlockØ00__func__Ø000), unsafe.Pointer(str(131866)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pFile.X4) <= _eFileLock {
- return i32(0)
+ if int32(_pFile.XeFileLock) <= _eFileLock {
+ return int32(0)
}
_unixEnterMutex(tls)
- _pInode = (*XunixInodeInfo)(_pFile.X2)
+ _pInode = (*XunixInodeInfo)(_pFile.XpInode)
func() {
- if (_pInode.X1) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31657), unsafe.Pointer((*int8)(unsafe.Pointer(&_posixUnlockØ00__func__Ø000))), unsafe.Pointer(str(131876)))
+ if _pInode.XnShared == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31657), unsafe.Pointer(&_posixUnlockØ00__func__Ø000), unsafe.Pointer(str(131889)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pFile.X4) <= i32(1) {
+ if int32(_pFile.XeFileLock) <= int32(1) {
goto _7
}
func() {
- if int32(_pInode.X2) != int32(_pFile.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31659), unsafe.Pointer((*int8)(unsafe.Pointer(&_posixUnlockØ00__func__Ø000))), unsafe.Pointer(str(131895)))
+ if int32(_pInode.XeFileLock) != int32(_pFile.XeFileLock) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31659), unsafe.Pointer(&_posixUnlockØ00__func__Ø000), unsafe.Pointer(str(131908)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pFile.X19))) = uint8(i32(0))
- if _eFileLock != i32(1) {
+ _pFile.XinNormalWrite = 0
+ if _eFileLock != int32(1) {
goto _10
}
func() {
- if _handleNFSUnlock != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31685), unsafe.Pointer((*int8)(unsafe.Pointer(&_posixUnlockØ00__func__Ø000))), unsafe.Pointer(str(131931)))
+ if _handleNFSUnlock != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31685), unsafe.Pointer(&_posixUnlockØ00__func__Ø000), unsafe.Pointer(str(131944)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_lock.X0))) = int16(i32(0))
- *(*int16)(unsafe.Pointer(&(_lock.X1))) = int16(i32(0))
- *(*int64)(unsafe.Pointer(&(_lock.X2))) = int64(_sqlite3PendingByte + i32(2))
- *(*int64)(unsafe.Pointer(&(_lock.X3))) = int64(i32(510))
+ _lock.Xl_type = 0
+ _lock.Xl_whence = 0
+ _lock.Xl_start = int64(_sqlite3PendingByte + int32(2))
+ _lock.Xl_len = int64(510)
if _unixFileLock(tls, _pFile, &_lock) != 0 {
- _rc = i32(2314)
+ _rc = int32(2314)
_storeLastErrno(tls, _pFile, *crt.X__errno_location(tls))
goto _end_unlock
}
_10:
- *(*int16)(unsafe.Pointer(&(_lock.X0))) = int16(i32(2))
- *(*int16)(unsafe.Pointer(&(_lock.X1))) = int16(i32(0))
- *(*int64)(unsafe.Pointer(&(_lock.X2))) = int64(_sqlite3PendingByte)
- *(*int64)(unsafe.Pointer(&(_lock.X3))) = int64(i32(2))
+ _lock.Xl_type = int16(2)
+ _lock.Xl_whence = 0
+ _lock.Xl_start = int64(_sqlite3PendingByte)
+ _lock.Xl_len = int64(2)
func() {
- if (_sqlite3PendingByte + i32(1)) != (_sqlite3PendingByte + i32(1)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31747), unsafe.Pointer((*int8)(unsafe.Pointer(&_posixUnlockØ00__func__Ø000))), unsafe.Pointer(str(131950)))
+ if (_sqlite3PendingByte + int32(1)) != (_sqlite3PendingByte + int32(1)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31747), unsafe.Pointer(&_posixUnlockØ00__func__Ø000), unsafe.Pointer(str(131963)))
crt.X__builtin_abort(tls)
}
}()
- if _unixFileLock(tls, _pFile, &_lock) == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pInode.X2))) = uint8(i32(1))
+ if _unixFileLock(tls, _pFile, &_lock) == int32(0) {
+ _pInode.XeFileLock = uint8(1)
goto _17
}
- _rc = i32(2058)
+ _rc = int32(2058)
_storeLastErrno(tls, _pFile, *crt.X__errno_location(tls))
goto _end_unlock
_17:
_7:
- if _eFileLock != i32(0) {
+ if _eFileLock != int32(0) {
goto _end_unlock
}
- *(*int32)(unsafe.Pointer(&(_pInode.X1))) -= 1
- if (_pInode.X1) != i32(0) {
+ _pInode.XnShared -= 1
+ if _pInode.XnShared != int32(0) {
goto _19
}
- *(*int16)(unsafe.Pointer(&(_lock.X0))) = int16(i32(2))
- *(*int16)(unsafe.Pointer(&(_lock.X1))) = int16(i32(0))
- *(*int64)(unsafe.Pointer(&(_lock.X2))) = store6((*int64)(unsafe.Pointer(&(_lock.X3))), int64(i32(0)))
- if _unixFileLock(tls, _pFile, &_lock) == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pInode.X2))) = uint8(i32(0))
+ _lock.Xl_type = int16(2)
+ _lock.Xl_whence = 0
+ _lock.Xl_start = store35(&_lock.Xl_len, 0)
+ if _unixFileLock(tls, _pFile, &_lock) == int32(0) {
+ _pInode.XeFileLock = 0
goto _21
}
- _rc = i32(2058)
+ _rc = int32(2058)
_storeLastErrno(tls, _pFile, *crt.X__errno_location(tls))
- *(*uint8)(unsafe.Pointer(&(_pInode.X2))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(i32(0))
+ _pInode.XeFileLock = 0
+ _pFile.XeFileLock = 0
_21:
_19:
- *(*int32)(unsafe.Pointer(&(_pInode.X6))) -= 1
+ _pInode.XnLock -= 1
func() {
- if (_pInode.X6) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31781), unsafe.Pointer((*int8)(unsafe.Pointer(&_posixUnlockØ00__func__Ø000))), unsafe.Pointer(str(131980)))
+ if _pInode.XnLock < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31781), unsafe.Pointer(&_posixUnlockØ00__func__Ø000), unsafe.Pointer(str(131993)))
crt.X__builtin_abort(tls)
}
}()
- if (_pInode.X6) == i32(0) {
+ if _pInode.XnLock == int32(0) {
_closePendingFds(tls, _pFile)
}
_end_unlock:
_unixLeaveMutex(tls)
- if _rc == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(_eFileLock)
+ if _rc == int32(0) {
+ _pFile.XeFileLock = uint8(_eFileLock)
}
return _rc
-
- _ = _lock
- panic(0)
}
var _posixUnlockØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_posixUnlockØ00__func__Ø000[0], str(131997), 12)
-}
-
-// Helper functions to obtain and relinquish the global mutex. The
-// global mutex is used to protect the unixInodeInfo and
-// vxworksFileId objects used by this file, all of which may be
-// shared by multiple threads.
-//
-// Function unixMutexHeld() is used to assert() that the global mutex
-// is held when required. This function is only used as part of assert()
-// statements. e.g.
-//
-// unixEnterMutex()
-// assert( unixMutexHeld() );
-// unixEnterLeave()
+ crt.Xstrncpy(nil, &_posixUnlockØ00__func__Ø000[0], str(132010), 12)
+}
+
+// C comment
+// /*
+// ** Helper functions to obtain and relinquish the global mutex. The
+// ** global mutex is used to protect the unixInodeInfo and
+// ** vxworksFileId objects used by this file, all of which may be
+// ** shared by multiple threads.
+// **
+// ** Function unixMutexHeld() is used to assert() that the global mutex
+// ** is held when required. This function is only used as part of assert()
+// ** statements. e.g.
+// **
+// ** unixEnterMutex()
+// ** assert( unixMutexHeld() );
+// ** unixEnterLeave()
+// */
func _unixEnterMutex(tls *crt.TLS) {
- Xsqlite3_mutex_enter(tls, _sqlite3MutexAlloc(tls, i32(11)))
-}
-
-// Attempt to set a system-lock on the file pFile. The lock is
-// described by pLock.
-//
-// If the pFile was opened read/write from unix-excl, then the only lock
-// ever obtained is an exclusive lock, and it is obtained exactly once
-// the first time any lock is attempted. All subsequent system locking
-// operations become no-ops. Locking operations still happen internally,
-// in order to coordinate access between separate database connections
-// within this process, but all of that is handled in memory and the
-// operating system does not participate.
-//
-// This function is a pass-through to fcntl(F_SETLK) if pFile is using
-// any VFS other than "unix-excl" or if pFile is opened on "unix-excl"
-// and is read-only.
-//
-// Zero is returned if the call completes successfully, or -1 if a call
-// to fcntl() fails. In this case, errno is set appropriately (by fcntl()).
+ Xsqlite3_mutex_enter(tls, _sqlite3MutexAlloc(tls, int32(11)))
+}
+
+// C comment
+// /*
+// ** Attempt to set a system-lock on the file pFile. The lock is
+// ** described by pLock.
+// **
+// ** If the pFile was opened read/write from unix-excl, then the only lock
+// ** ever obtained is an exclusive lock, and it is obtained exactly once
+// ** the first time any lock is attempted. All subsequent system locking
+// ** operations become no-ops. Locking operations still happen internally,
+// ** in order to coordinate access between separate database connections
+// ** within this process, but all of that is handled in memory and the
+// ** operating system does not participate.
+// **
+// ** This function is a pass-through to fcntl(F_SETLK) if pFile is using
+// ** any VFS other than "unix-excl" or if pFile is opened on "unix-excl"
+// ** and is read-only.
+// **
+// ** Zero is returned if the call completes successfully, or -1 if a call
+// ** to fcntl() fails. In this case, errno is set appropriately (by fcntl()).
+// */
func _unixFileLock(tls *crt.TLS, _pFile *XunixFile, _pLock *Tflock) (r0 int32) {
var _rc int32
var _pInode *XunixInodeInfo
var _2_lock Tflock
- _pInode = (*XunixInodeInfo)(_pFile.X2)
+ _pInode = (*XunixInodeInfo)(_pFile.XpInode)
func() {
if _unixMutexHeld(tls) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31344), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixFileLockØ00__func__Ø000))), unsafe.Pointer(str(132009)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31344), unsafe.Pointer(&_unixFileLockØ00__func__Ø000), unsafe.Pointer(str(132022)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pInode == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31345), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixFileLockØ00__func__Ø000))), unsafe.Pointer(str(132025)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31345), unsafe.Pointer(&_unixFileLockØ00__func__Ø000), unsafe.Pointer(str(132038)))
crt.X__builtin_abort(tls)
}
}()
- if (int32(_pFile.X5) & i32(3)) != i32(1) {
+ if (int32(_pFile.XctrlFlags) & int32(3)) != int32(1) {
goto _4
}
- if int32(_pInode.X3) != i32(0) {
+ if int32(_pInode.XbProcessLock) != int32(0) {
goto _5
}
func() {
- if (_pInode.X6) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31349), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixFileLockØ00__func__Ø000))), unsafe.Pointer(str(132035)))
+ if _pInode.XnLock != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31349), unsafe.Pointer(&_unixFileLockØ00__func__Ø000), unsafe.Pointer(str(132048)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_2_lock.X1))) = int16(i32(0))
- *(*int64)(unsafe.Pointer(&(_2_lock.X2))) = int64(_sqlite3PendingByte + i32(2))
- *(*int64)(unsafe.Pointer(&(_2_lock.X3))) = int64(i32(510))
- *(*int16)(unsafe.Pointer(&(_2_lock.X0))) = int16(i32(1))
- _rc = (*(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(7)))).X1)})))(tls, _pFile.X3, i32(13), unsafe.Pointer(&_2_lock))
- if _rc < i32(0) {
+ _2_lock.Xl_whence = 0
+ _2_lock.Xl_start = int64(_sqlite3PendingByte + int32(2))
+ _2_lock.Xl_len = int64(510)
+ _2_lock.Xl_type = int16(1)
+ _rc = func() func(*crt.TLS, int32, int32, ...interface{}) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(7)).XpCurrent
+ return *(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&v))
+ }()(tls, _pFile.Xh, int32(13), unsafe.Pointer(&_2_lock))
+ if _rc < int32(0) {
return _rc
}
- *(*uint8)(unsafe.Pointer(&(_pInode.X3))) = uint8(i32(1))
- *(*int32)(unsafe.Pointer(&(_pInode.X6))) += 1
+ _pInode.XbProcessLock = uint8(1)
+ _pInode.XnLock += 1
goto _9
_5:
- _rc = i32(0)
+ _rc = int32(0)
_9:
goto _10
_4:
- _rc = (*(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(7)))).X1)})))(tls, _pFile.X3, i32(13), unsafe.Pointer(_pLock))
+ _rc = func() func(*crt.TLS, int32, int32, ...interface{}) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(7)).XpCurrent
+ return *(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&v))
+ }()(tls, _pFile.Xh, int32(13), unsafe.Pointer(_pLock))
_10:
return _rc
-
- _ = _2_lock
- panic(0)
}
func _unixMutexHeld(tls *crt.TLS) (r0 int32) {
- return Xsqlite3_mutex_held(tls, _sqlite3MutexAlloc(tls, i32(11)))
+ return Xsqlite3_mutex_held(tls, _sqlite3MutexAlloc(tls, int32(11)))
}
var _unixFileLockØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_unixFileLockØ00__func__Ø000[0], str(132052), 13)
+ crt.Xstrncpy(nil, &_unixFileLockØ00__func__Ø000[0], str(132065), 13)
}
-// Set the pFile->lastErrno. Do this in a subroutine as that provides
-// a convenient place to set a breakpoint.
+// C comment
+// /*
+// ** Set the pFile->lastErrno. Do this in a subroutine as that provides
+// ** a convenient place to set a breakpoint.
+// */
func _storeLastErrno(tls *crt.TLS, _pFile *XunixFile, _error int32) {
- *(*int32)(unsafe.Pointer(&(_pFile.X6))) = _error
+ _pFile.XlastErrno = _error
}
func _closePendingFds(tls *crt.TLS, _pFile *XunixFile) {
var _pInode *XunixInodeInfo
var _p, _pNext *XUnixUnusedFd
- _pInode = (*XunixInodeInfo)(_pFile.X2)
- _p = (*XUnixUnusedFd)(_pInode.X7)
+ _pInode = (*XunixInodeInfo)(_pFile.XpInode)
+ _p = (*XUnixUnusedFd)(_pInode.XpUnused)
_0:
if _p == nil {
goto _3
}
- _pNext = (*XUnixUnusedFd)(_p.X2)
- _robust_close(tls, _pFile, _p.X0, i32(31098))
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ _pNext = (*XUnixUnusedFd)(_p.XpNext)
+ _robust_close(tls, _pFile, _p.Xfd, int32(31098))
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
_p = _pNext
goto _0
_3:
- *(**XUnixUnusedFd)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pInode.X7))))) = nil
-}
-
-// Close a file descriptor.
-//
-// We assume that close() almost always works, since it is only in a
-// very sick application or on a very sick platform that it might fail.
-// If it does fail, simply leak the file descriptor, but do log the
-// error.
-//
-// Note that it is not safe to retry close() after EINTR since the
-// file descriptor might have already been reused by another thread.
-// So we don't even try to recover from an EINTR. Just log the error
-// and move on.
+ *(**XUnixUnusedFd)(unsafe.Pointer(&_pInode.XpUnused)) = nil
+}
+
+// C comment
+// /*
+// ** Close a file descriptor.
+// **
+// ** We assume that close() almost always works, since it is only in a
+// ** very sick application or on a very sick platform that it might fail.
+// ** If it does fail, simply leak the file descriptor, but do log the
+// ** error.
+// **
+// ** Note that it is not safe to retry close() after EINTR since the
+// ** file descriptor might have already been reused by another thread.
+// ** So we don't even try to recover from an EINTR. Just log the error
+// ** and move on.
+// */
func _robust_close(tls *crt.TLS, _pFile *XunixFile, _h int32, _lineno int32) {
- if (*(*func(*crt.TLS, int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(1)))).X1)})))(tls, _h) != 0 {
- _unixLogErrorAtLine(tls, i32(4106), str(131509), func() *int8 {
+ if func() func(*crt.TLS, int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(1)).XpCurrent
+ return *(*func(*crt.TLS, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _h) != 0 {
+ _unixLogErrorAtLine(tls, int32(4106), str(131522), func() *int8 {
if _pFile != nil {
- return (_pFile.X9)
+ return _pFile.XzPath
}
return nil
}(), _lineno)
@@ -115466,93 +117327,99 @@ func _robust_close(tls *crt.TLS, _pFile *XunixFile, _h int32, _lineno int32) {
}
func _unixLeaveMutex(tls *crt.TLS) {
- Xsqlite3_mutex_leave(tls, _sqlite3MutexAlloc(tls, i32(11)))
+ Xsqlite3_mutex_leave(tls, _sqlite3MutexAlloc(tls, int32(11)))
}
var _unixCloseØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_unixCloseØ00__func__Ø000[0], str(132065), 10)
+ crt.Xstrncpy(nil, &_unixCloseØ00__func__Ø000[0], str(132078), 10)
}
-// Add the file descriptor used by file handle pFile to the corresponding
-// pUnused list.
+// C comment
+// /*
+// ** Add the file descriptor used by file handle pFile to the corresponding
+// ** pUnused list.
+// */
func _setPendingFd(tls *crt.TLS, _pFile *XunixFile) {
var _pInode *XunixInodeInfo
var _p *XUnixUnusedFd
- _pInode = (*XunixInodeInfo)(_pFile.X2)
- _p = (*XUnixUnusedFd)(_pFile.X8)
- *(**XUnixUnusedFd)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X2))))) = (*XUnixUnusedFd)(_pInode.X7)
- *(**XUnixUnusedFd)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pInode.X7))))) = _p
- *(*int32)(unsafe.Pointer(&(_pFile.X3))) = i32(-1)
- *(**XUnixUnusedFd)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pFile.X8))))) = nil
-}
-
-// Release a unixInodeInfo structure previously allocated by findInodeInfo().
-//
-// The mutex entered using the unixEnterMutex() function must be held
-// when this function is called.
+ _pInode = (*XunixInodeInfo)(_pFile.XpInode)
+ _p = (*XUnixUnusedFd)(_pFile.XpUnused)
+ *(**XUnixUnusedFd)(unsafe.Pointer(&_p.XpNext)) = (*XUnixUnusedFd)(_pInode.XpUnused)
+ *(**XUnixUnusedFd)(unsafe.Pointer(&_pInode.XpUnused)) = _p
+ _pFile.Xh = int32(-1)
+ *(**XUnixUnusedFd)(unsafe.Pointer(&_pFile.XpUnused)) = nil
+}
+
+// C comment
+// /*
+// ** Release a unixInodeInfo structure previously allocated by findInodeInfo().
+// **
+// ** The mutex entered using the unixEnterMutex() function must be held
+// ** when this function is called.
+// */
func _releaseInodeInfo(tls *crt.TLS, _pFile *XunixFile) {
var _pInode *XunixInodeInfo
- _pInode = (*XunixInodeInfo)(_pFile.X2)
+ _pInode = (*XunixInodeInfo)(_pFile.XpInode)
func() {
if _unixMutexHeld(tls) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31112), unsafe.Pointer((*int8)(unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000))), unsafe.Pointer(str(132009)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31112), unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000), unsafe.Pointer(str(132022)))
crt.X__builtin_abort(tls)
}
}()
if func() int32 {
if _pInode != nil {
- return i32(1)
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31113), unsafe.Pointer((*int8)(unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31113), unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _4
}
- *(*int32)(unsafe.Pointer(&(_pInode.X4))) -= 1
- if (_pInode.X4) != i32(0) {
+ _pInode.XnRef -= 1
+ if _pInode.XnRef != int32(0) {
goto _5
}
func() {
- if (*XunixShmNode)(_pInode.X5) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31116), unsafe.Pointer((*int8)(unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000))), unsafe.Pointer(str(132075)))
+ if (*XunixShmNode)(_pInode.XpShmNode) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31116), unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000), unsafe.Pointer(str(132088)))
crt.X__builtin_abort(tls)
}
}()
_closePendingFds(tls, _pFile)
- if (*XunixInodeInfo)(_pInode.X9) != nil {
+ if _pInode.XpPrev != nil {
func() {
- if (*XunixInodeInfo)((*XunixInodeInfo)(_pInode.X9).X8) != _pInode {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31119), unsafe.Pointer((*int8)(unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000))), unsafe.Pointer(str(132095)))
+ if (*XunixInodeInfo)((*XunixInodeInfo)(_pInode.XpPrev).XpNext) != _pInode {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31119), unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000), unsafe.Pointer(str(132108)))
crt.X__builtin_abort(tls)
}
}()
- *(**XunixInodeInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XunixInodeInfo)(_pInode.X9).X8))))) = (*XunixInodeInfo)(_pInode.X8)
+ *(**XunixInodeInfo)(unsafe.Pointer(&((*XunixInodeInfo)(_pInode.XpPrev).XpNext))) = (*XunixInodeInfo)(_pInode.XpNext)
goto _11
}
func() {
if _inodeList != _pInode {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31122), unsafe.Pointer((*int8)(unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000))), unsafe.Pointer(str(132124)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31122), unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000), unsafe.Pointer(str(132137)))
crt.X__builtin_abort(tls)
}
}()
- _inodeList = (*XunixInodeInfo)(_pInode.X8)
+ _inodeList = (*XunixInodeInfo)(_pInode.XpNext)
bug20530(_inodeList)
_11:
- if (*XunixInodeInfo)(_pInode.X8) != nil {
+ if _pInode.XpNext != nil {
func() {
- if (*XunixInodeInfo)((*XunixInodeInfo)(_pInode.X8).X9) != _pInode {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31126), unsafe.Pointer((*int8)(unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000))), unsafe.Pointer(str(132142)))
+ if (*XunixInodeInfo)((*XunixInodeInfo)(_pInode.XpNext).XpPrev) != _pInode {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31126), unsafe.Pointer(&_releaseInodeInfoØ00__func__Ø000), unsafe.Pointer(str(132155)))
crt.X__builtin_abort(tls)
}
}()
- *(**XunixInodeInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XunixInodeInfo)(_pInode.X8).X9))))) = (*XunixInodeInfo)(_pInode.X9)
+ *(**XunixInodeInfo)(unsafe.Pointer(&((*XunixInodeInfo)(_pInode.XpNext).XpPrev))) = (*XunixInodeInfo)(_pInode.XpPrev)
}
- Xsqlite3_free(tls, (unsafe.Pointer)(_pInode))
+ Xsqlite3_free(tls, unsafe.Pointer(_pInode))
_5:
_4:
}
@@ -115560,185 +117427,187 @@ _4:
var _releaseInodeInfoØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_releaseInodeInfoØ00__func__Ø000[0], str(132171), 17)
+ crt.Xstrncpy(nil, &_releaseInodeInfoØ00__func__Ø000[0], str(132184), 17)
}
+// C comment
+// /*
+// ** A lists of all unixInodeInfo objects.
+// */
var _inodeList *XunixInodeInfo
-// This function performs the parts of the "close file" operation
-// common to all locking schemes. It closes the directory and file
-// handles, if they are valid, and sets all fields of the unixFile
-// structure to 0.
-//
-// It is *not* necessary to hold the mutex when this routine is called,
-// even on VxWorks. A mutex will be acquired on VxWorks by the
-// vxworksReleaseFileId() routine.
+// C comment
+// /*
+// ** This function performs the parts of the "close file" operation
+// ** common to all locking schemes. It closes the directory and file
+// ** handles, if they are valid, and sets all fields of the unixFile
+// ** structure to 0.
+// **
+// ** It is *not* necessary to hold the mutex when this routine is called,
+// ** even on VxWorks. A mutex will be acquired on VxWorks by the
+// ** vxworksReleaseFileId() routine.
+// */
func _closeUnixFile(tls *crt.TLS, _id *Xsqlite3_file) (r0 int32) {
var _pFile *XunixFile
_pFile = (*XunixFile)(unsafe.Pointer(_id))
_unixUnmapfile(tls, _pFile)
- if (_pFile.X3) >= i32(0) {
- _robust_close(tls, _pFile, _pFile.X3, i32(31828))
- *(*int32)(unsafe.Pointer(&(_pFile.X3))) = i32(-1)
+ if _pFile.Xh >= int32(0) {
+ _robust_close(tls, _pFile, _pFile.Xh, int32(31828))
+ _pFile.Xh = int32(-1)
}
- Xsqlite3_free(tls, _pFile.X8)
- crt.Xmemset(tls, (unsafe.Pointer)(_pFile), i32(0), u32(80))
- return i32(0)
+ Xsqlite3_free(tls, _pFile.XpUnused)
+ crt.Xmemset(tls, unsafe.Pointer(_pFile), int32(0), uint32(80))
+ return int32(0)
}
-// If it is currently memory mapped, unmap file pFd.
+// C comment
+// /*
+// ** If it is currently memory mapped, unmap file pFd.
+// */
func _unixUnmapfile(tls *crt.TLS, _pFd *XunixFile) {
func() {
- if (_pFd.X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34596), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixUnmapfileØ00__func__Ø000))), unsafe.Pointer(str(132188)))
+ if _pFd.XnFetchOut != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34596), unsafe.Pointer(&_unixUnmapfileØ00__func__Ø000), unsafe.Pointer(str(132201)))
crt.X__builtin_abort(tls)
}
}()
- if (_pFd.X16) != nil {
- (*(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(23)))).X1)})))(tls, _pFd.X16, uint32(_pFd.X14))
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pFd.X16))) = nil
- *(*int64)(unsafe.Pointer(&(_pFd.X13))) = int64(i32(0))
- *(*int64)(unsafe.Pointer(&(_pFd.X14))) = int64(i32(0))
+ if _pFd.XpMapRegion != nil {
+ func() func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(23)).XpCurrent
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, _pFd.XpMapRegion, uint32(_pFd.XmmapSizeActual))
+ _pFd.XpMapRegion = nil
+ _pFd.XmmapSize = 0
+ _pFd.XmmapSizeActual = 0
}
}
var _unixUnmapfileØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_unixUnmapfileØ00__func__Ø000[0], str(132206), 14)
+ crt.Xstrncpy(nil, &_unixUnmapfileØ00__func__Ø000[0], str(132219), 14)
}
-// Read data from a file into a buffer. Return SQLITE_OK if all
-// bytes were read successfully and SQLITE_IOERR if anything goes
-// wrong.
+// C comment
+// /*
+// ** Read data from a file into a buffer. Return SQLITE_OK if all
+// ** bytes were read successfully and SQLITE_IOERR if anything goes
+// ** wrong.
+// */
func _unixRead(tls *crt.TLS, _id *Xsqlite3_file, _pBuf unsafe.Pointer, _amt int32, _offset int64) (r0 int32) {
var _got, _3_nCopy int32
var _pFile *XunixFile
_pFile = (*XunixFile)(unsafe.Pointer(_id))
func() {
if _id == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33063), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixReadØ00__func__Ø000))), unsafe.Pointer(str(61727)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33063), unsafe.Pointer(&_unixReadØ00__func__Ø000), unsafe.Pointer(str(93813)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _offset < int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33064), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixReadØ00__func__Ø000))), unsafe.Pointer(str(132220)))
+ if _offset < (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33064), unsafe.Pointer(&_unixReadØ00__func__Ø000), unsafe.Pointer(str(132233)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _amt <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33065), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixReadØ00__func__Ø000))), unsafe.Pointer(str(132230)))
+ if _amt <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33065), unsafe.Pointer(&_unixReadØ00__func__Ø000), unsafe.Pointer(str(132243)))
crt.X__builtin_abort(tls)
}
}()
- if _offset >= (_pFile.X13) {
+ if _offset >= _pFile.XmmapSize {
goto _6
}
- if (_offset + int64(_amt)) <= (_pFile.X13) {
- crt.Xmemcpy(tls, _pBuf, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(_pFile.X16)+1*uintptr(_offset)))), uint32(_amt))
- return i32(0)
- }
- _3_nCopy = int32((_pFile.X13) - _offset)
- crt.Xmemcpy(tls, _pBuf, (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(_pFile.X16)+1*uintptr(_offset)))), uint32(_3_nCopy))
- _pBuf = (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(_pBuf) + 1*uintptr(_3_nCopy))))
- {
- p := &_amt
- *p = (*p) - _3_nCopy
- sink1(*p)
- }
- {
- p := &_offset
- *p = (*p) + int64(_3_nCopy)
- sink6(*p)
+ if (_offset + int64(_amt)) <= _pFile.XmmapSize {
+ crt.Xmemcpy(tls, _pBuf, unsafe.Pointer(elem15((*uint8)(_pFile.XpMapRegion), uintptr(_offset))), uint32(_amt))
+ return int32(0)
}
+ _3_nCopy = int32(_pFile.XmmapSize - _offset)
+ crt.Xmemcpy(tls, _pBuf, unsafe.Pointer(elem15((*uint8)(_pFile.XpMapRegion), uintptr(_offset))), uint32(_3_nCopy))
+ _pBuf = unsafe.Pointer(elem15((*uint8)(_pBuf), uintptr(_3_nCopy)))
+ _amt -= _3_nCopy
+ _offset += int64(_3_nCopy)
_6:
_got = _seekAndRead(tls, _pFile, _offset, _pBuf, _amt)
if _got == _amt {
- return i32(0)
+ return int32(0)
}
- if _got < i32(0) {
- return i32(266)
+ if _got < int32(0) {
+ return int32(266)
}
- _storeLastErrno(tls, _pFile, i32(0))
- crt.Xmemset(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(_pBuf)+1*uintptr(_got)))), i32(0), uint32(_amt-_got))
- return i32(522)
+ _storeLastErrno(tls, _pFile, int32(0))
+ crt.Xmemset(tls, unsafe.Pointer(elem1((*int8)(_pBuf), uintptr(_got))), int32(0), uint32(_amt-_got))
+ return int32(522)
}
var _unixReadØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_unixReadØ00__func__Ø000[0], str(132236), 9)
+ crt.Xstrncpy(nil, &_unixReadØ00__func__Ø000[0], str(132249), 9)
}
-// Seek to the offset passed as the second argument, then read cnt
-// bytes into pBuf. Return the number of bytes actually read.
-//
-// NB: If you define USE_PREAD or USE_PREAD64, then it might also
-// be necessary to define _XOPEN_SOURCE to be 500. This varies from
-// one system to another. Since SQLite does not define USE_PREAD
-// in any form by default, we will not attempt to define _XOPEN_SOURCE.
-// See tickets #2741 and #2681.
-//
-// To avoid stomping the errno value on a failed read the lastErrno value
-// is set before returning.
+// C comment
+// /*
+// ** Seek to the offset passed as the second argument, then read cnt
+// ** bytes into pBuf. Return the number of bytes actually read.
+// **
+// ** NB: If you define USE_PREAD or USE_PREAD64, then it might also
+// ** be necessary to define _XOPEN_SOURCE to be 500. This varies from
+// ** one system to another. Since SQLite does not define USE_PREAD
+// ** in any form by default, we will not attempt to define _XOPEN_SOURCE.
+// ** See tickets #2741 and #2681.
+// **
+// ** To avoid stomping the errno value on a failed read the lastErrno value
+// ** is set before returning.
+// */
func _seekAndRead(tls *crt.TLS, _id *XunixFile, _offset int64, _pBuf unsafe.Pointer, _cnt int32) (r0 int32) {
var _got, _prior int32
var _newOffset int64
- _prior = i32(0)
+ _prior = int32(0)
func() {
- if _cnt != (_cnt & i32(131071)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33013), unsafe.Pointer((*int8)(unsafe.Pointer(&_seekAndReadØ00__func__Ø000))), unsafe.Pointer(str(132245)))
+ if _cnt != (_cnt & int32(131071)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33013), unsafe.Pointer(&_seekAndReadØ00__func__Ø000), unsafe.Pointer(str(132258)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_id.X3) <= i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33014), unsafe.Pointer((*int8)(unsafe.Pointer(&_seekAndReadØ00__func__Ø000))), unsafe.Pointer(str(132264)))
+ if _id.Xh <= int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33014), unsafe.Pointer(&_seekAndReadØ00__func__Ø000), unsafe.Pointer(str(132277)))
crt.X__builtin_abort(tls)
}
}()
_4:
- _newOffset = crt.Xlseek64(tls, _id.X3, _offset, i32(0))
- if _newOffset < int64(i32(0)) {
+ _newOffset = crt.Xlseek64(tls, _id.Xh, _offset, int32(0))
+ if _newOffset < (0) {
_storeLastErrno(tls, _id, *crt.X__errno_location(tls))
- return i32(-1)
+ return int32(-1)
}
- _got = (*(*func(*crt.TLS, int32, unsafe.Pointer, uint32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(8)))).X1)})))(tls, _id.X3, _pBuf, uint32(_cnt))
+ _got = func() func(*crt.TLS, int32, unsafe.Pointer, uint32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(8)).XpCurrent
+ return *(*func(*crt.TLS, int32, unsafe.Pointer, uint32) int32)(unsafe.Pointer(&v))
+ }()(tls, _id.Xh, _pBuf, uint32(_cnt))
if _got == _cnt {
goto _7
}
- if _got >= i32(0) {
+ if _got >= int32(0) {
goto _8
}
- if (*crt.X__errno_location(tls)) == i32(4) {
- _got = i32(1)
+ if (*crt.X__errno_location(tls)) == int32(4) {
+ _got = int32(1)
goto _4
}
- _prior = i32(0)
+ _prior = int32(0)
_storeLastErrno(tls, _id, *crt.X__errno_location(tls))
goto _7
_8:
- if _got > i32(0) {
- {
- p := &_cnt
- *p = (*p) - _got
- sink1(*p)
- }
- {
- p := &_offset
- *p = (*p) + int64(_got)
- sink6(*p)
- }
- {
- p := &_prior
- *p = (*p) + _got
- sink1(*p)
- }
- _pBuf = (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_got))))) + uintptr(unsafe.Pointer((*int8)(_pBuf))))))
+ if _got > int32(0) {
+ _cnt -= _got
+ _offset += int64(_got)
+ _prior += _got
+ _pBuf = unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_got) + uintptr(_pBuf))))
}
- if _got > i32(0) {
+ if _got > int32(0) {
goto _4
}
_7:
@@ -115748,67 +117617,62 @@ _7:
var _seekAndReadØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_seekAndReadØ00__func__Ø000[0], str(132272), 12)
+ crt.Xstrncpy(nil, &_seekAndReadØ00__func__Ø000[0], str(132285), 12)
}
-// Write data from a buffer into a file. Return SQLITE_OK on success
-// or some other error code on failure.
+// C comment
+// /*
+// ** Write data from a buffer into a file. Return SQLITE_OK on success
+// ** or some other error code on failure.
+// */
func _unixWrite(tls *crt.TLS, _id *Xsqlite3_file, _pBuf unsafe.Pointer, _amt int32, _offset int64) (r0 int32) {
var _wrote, _2_rc int32
var _2_oldCntr [4]int8
var _pFile *XunixFile
_pFile = (*XunixFile)(unsafe.Pointer(_id))
- _wrote = i32(0)
+ _wrote = int32(0)
func() {
if _id == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33177), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixWriteØ00__func__Ø000))), unsafe.Pointer(str(61727)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33177), unsafe.Pointer(&_unixWriteØ00__func__Ø000), unsafe.Pointer(str(93813)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _amt <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33178), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixWriteØ00__func__Ø000))), unsafe.Pointer(str(132230)))
+ if _amt <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33178), unsafe.Pointer(&_unixWriteØ00__func__Ø000), unsafe.Pointer(str(132243)))
crt.X__builtin_abort(tls)
}
}()
- if (_pFile.X19) == 0 {
+ if _pFile.XinNormalWrite == 0 {
goto _4
}
- *(*uint8)(unsafe.Pointer(&(_pFile.X18))) = uint8(i32(1))
- if _offset > int64(i32(24)) || (_offset+int64(_amt)) < int64(i32(27)) {
+ _pFile.XdbUpdate = uint8(1)
+ if _offset > int64(24) || (_offset+int64(_amt)) < int64(27) {
goto _6
}
- _2_rc = _seekAndRead(tls, _pFile, int64(i32(24)), (unsafe.Pointer)(&_2_oldCntr), i32(4))
- if (_2_rc != i32(4)) || (crt.Xmemcmp(tls, (unsafe.Pointer)(&_2_oldCntr), (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(_pBuf)+1*uintptr(int64(i32(24))-_offset)))), uint32(i32(4))) != i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pFile.X17))) = uint8(i32(1))
+ _2_rc = _seekAndRead(tls, _pFile, int64(24), unsafe.Pointer(&_2_oldCntr), int32(4))
+ if (_2_rc != int32(4)) || (crt.Xmemcmp(tls, unsafe.Pointer(&_2_oldCntr), unsafe.Pointer(elem1((*int8)(_pBuf), uintptr(int64(24)-_offset))), uint32(4)) != int32(0)) {
+ _pFile.XtransCntrChng = uint8(1)
}
_6:
_4:
- if (store1(&_wrote, _seekAndWrite(tls, _pFile, _offset, _pBuf, _amt)) < _amt) && (_wrote > i32(0)) {
- {
- p := &_amt
- *p = (*p) - _wrote
- sink1(*p)
- }
- {
- p := &_offset
- *p = (*p) + int64(_wrote)
- sink6(*p)
- }
- _pBuf = (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(_pBuf) + 1*uintptr(_wrote))))
+ if (store2(&_wrote, _seekAndWrite(tls, _pFile, _offset, _pBuf, _amt)) < _amt) && (_wrote > int32(0)) {
+ _amt -= _wrote
+ _offset += int64(_wrote)
+ _pBuf = unsafe.Pointer(elem1((*int8)(_pBuf), uintptr(_wrote)))
goto _4
}
if _amt <= _wrote {
goto _12
}
- if (_wrote < i32(0)) && ((_pFile.X6) != i32(28)) {
- return i32(778)
+ if (_wrote < int32(0)) && (_pFile.XlastErrno != int32(28)) {
+ return int32(778)
}
- _storeLastErrno(tls, _pFile, i32(0))
- return i32(13)
+ _storeLastErrno(tls, _pFile, int32(0))
+ return int32(13)
_12:
- return i32(0)
+ return int32(0)
_ = _2_oldCntr
panic(0)
@@ -115817,62 +117681,67 @@ _12:
var _unixWriteØ00__func__Ø000 [10]int8
func init() {
- crt.Xstrncpy(nil, &_unixWriteØ00__func__Ø000[0], str(132284), 10)
+ crt.Xstrncpy(nil, &_unixWriteØ00__func__Ø000[0], str(132297), 10)
}
-// Seek to the offset in id->offset then read cnt bytes into pBuf.
-// Return the number of bytes actually read. Update the offset.
-//
-// To avoid stomping the errno value on a failed write the lastErrno value
-// is set before returning.
+// C comment
+// /*
+// ** Seek to the offset in id->offset then read cnt bytes into pBuf.
+// ** Return the number of bytes actually read. Update the offset.
+// **
+// ** To avoid stomping the errno value on a failed write the lastErrno value
+// ** is set before returning.
+// */
func _seekAndWrite(tls *crt.TLS, _id *XunixFile, _offset int64, _pBuf unsafe.Pointer, _cnt int32) (r0 int32) {
- return _seekAndWriteFd(tls, _id.X3, _offset, _pBuf, _cnt, (*int32)(unsafe.Pointer(&(_id.X6))))
+ return _seekAndWriteFd(tls, _id.Xh, _offset, _pBuf, _cnt, &_id.XlastErrno)
}
-// Attempt to seek the file-descriptor passed as the first argument to
-// absolute offset iOff, then attempt to write nBuf bytes of data from
-// pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise,
-// return the actual number of bytes written (which may be less than
-// nBuf).
+// C comment
+// /*
+// ** Attempt to seek the file-descriptor passed as the first argument to
+// ** absolute offset iOff, then attempt to write nBuf bytes of data from
+// ** pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise,
+// ** return the actual number of bytes written (which may be less than
+// ** nBuf).
+// */
func _seekAndWriteFd(tls *crt.TLS, _fd int32, _iOff int64, _pBuf unsafe.Pointer, _nBuf int32, _piErrno *int32) (r0 int32) {
var _rc int32
var _1_iSeek int64
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if _nBuf != (_nBuf & i32(131071)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33123), unsafe.Pointer((*int8)(unsafe.Pointer(&_seekAndWriteFdØ00__func__Ø000))), unsafe.Pointer(str(132294)))
+ if _nBuf != (_nBuf & int32(131071)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33123), unsafe.Pointer(&_seekAndWriteFdØ00__func__Ø000), unsafe.Pointer(str(132307)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _fd <= i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33124), unsafe.Pointer((*int8)(unsafe.Pointer(&_seekAndWriteFdØ00__func__Ø000))), unsafe.Pointer(str(132315)))
+ if _fd <= int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33124), unsafe.Pointer(&_seekAndWriteFdØ00__func__Ø000), unsafe.Pointer(str(132328)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _piErrno == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33125), unsafe.Pointer((*int8)(unsafe.Pointer(&_seekAndWriteFdØ00__func__Ø000))), unsafe.Pointer(str(132320)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33125), unsafe.Pointer(&_seekAndWriteFdØ00__func__Ø000), unsafe.Pointer(str(132333)))
crt.X__builtin_abort(tls)
}
}()
- {
- p := &_nBuf
- *p = (*p) & i32(131071)
- sink1(*p)
- }
+ _nBuf &= int32(131071)
_6:
- _1_iSeek = crt.Xlseek64(tls, _fd, _iOff, i32(0))
- if _1_iSeek < int64(i32(0)) {
- _rc = i32(-1)
+ _1_iSeek = crt.Xlseek64(tls, _fd, _iOff, int32(0))
+ if _1_iSeek < (0) {
+ _rc = int32(-1)
goto _8
}
- _rc = (*(*func(*crt.TLS, int32, unsafe.Pointer, uint32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(11)))).X1)})))(tls, _fd, _pBuf, uint32(_nBuf))
- if (_rc < i32(0)) && ((*crt.X__errno_location(tls)) == i32(4)) {
+ _rc = func() func(*crt.TLS, int32, unsafe.Pointer, uint32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(11)).XpCurrent
+ return *(*func(*crt.TLS, int32, unsafe.Pointer, uint32) int32)(unsafe.Pointer(&v))
+ }()(tls, _fd, _pBuf, uint32(_nBuf))
+ if (_rc < int32(0)) && ((*crt.X__errno_location(tls)) == int32(4)) {
goto _6
}
_8:
- if _rc < i32(0) {
+ if _rc < int32(0) {
*_piErrno = *crt.X__errno_location(tls)
}
return _rc
@@ -115881,115 +117750,129 @@ _8:
var _seekAndWriteFdØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_seekAndWriteFdØ00__func__Ø000[0], str(132331), 15)
+ crt.Xstrncpy(nil, &_seekAndWriteFdØ00__func__Ø000[0], str(132344), 15)
}
-// Truncate an open file to a specified size
+// C comment
+// /*
+// ** Truncate an open file to a specified size
+// */
func _unixTruncate(tls *crt.TLS, _id *Xsqlite3_file, _nByte int64) (r0 int32) {
var _rc int32
var _pFile *XunixFile
_pFile = (*XunixFile)(unsafe.Pointer(_id))
func() {
if _pFile == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33490), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixTruncateØ00__func__Ø000))), unsafe.Pointer(str(58046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33490), unsafe.Pointer(&_unixTruncateØ00__func__Ø000), unsafe.Pointer(str(58022)))
crt.X__builtin_abort(tls)
}
}()
- if (_pFile.X11) > i32(0) {
- _nByte = (((_nByte + int64(_pFile.X11)) - int64(i32(1))) / int64(_pFile.X11)) * int64(_pFile.X11)
+ if _pFile.XszChunk > int32(0) {
+ _nByte = (((_nByte + int64(_pFile.XszChunk)) - int64(1)) / int64(_pFile.XszChunk)) * int64(_pFile.XszChunk)
}
- _rc = _robust_ftruncate(tls, _pFile.X3, _nByte)
+ _rc = _robust_ftruncate(tls, _pFile.Xh, _nByte)
if _rc != 0 {
_storeLastErrno(tls, _pFile, *crt.X__errno_location(tls))
- return _unixLogErrorAtLine(tls, i32(1546), str(131533), _pFile.X9, i32(33505))
+ return _unixLogErrorAtLine(tls, int32(1546), str(131546), _pFile.XzPath, int32(33505))
}
- if ((_pFile.X19) != 0) && (_nByte == int64(i32(0))) {
- *(*uint8)(unsafe.Pointer(&(_pFile.X17))) = uint8(i32(1))
+ if (_pFile.XinNormalWrite != 0) && (_nByte == (0)) {
+ _pFile.XtransCntrChng = uint8(1)
}
- if _nByte < (_pFile.X13) {
- *(*int64)(unsafe.Pointer(&(_pFile.X13))) = _nByte
+ if _nByte < _pFile.XmmapSize {
+ _pFile.XmmapSize = _nByte
}
- return i32(0)
+ return int32(0)
}
var _unixTruncateØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_unixTruncateØ00__func__Ø000[0], str(132346), 13)
+ crt.Xstrncpy(nil, &_unixTruncateØ00__func__Ø000[0], str(132359), 13)
}
-// Retry ftruncate() calls that fail due to EINTR
-//
-// All calls to ftruncate() within this file should be made through
-// this wrapper. On the Android platform, bypassing the logic below
-// could lead to a corrupt database.
+// C comment
+// /*
+// ** Retry ftruncate() calls that fail due to EINTR
+// **
+// ** All calls to ftruncate() within this file should be made through
+// ** this wrapper. On the Android platform, bypassing the logic below
+// ** could lead to a corrupt database.
+// */
func _robust_ftruncate(tls *crt.TLS, _h int32, _sz int64) (r0 int32) {
var _rc int32
_0:
- _rc = (*(*func(*crt.TLS, int32, int64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(6)))).X1)})))(tls, _h, _sz)
- if (_rc < i32(0)) && ((*crt.X__errno_location(tls)) == i32(4)) {
+ _rc = func() func(*crt.TLS, int32, int64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(6)).XpCurrent
+ return *(*func(*crt.TLS, int32, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _h, _sz)
+ if (_rc < int32(0)) && ((*crt.X__errno_location(tls)) == int32(4)) {
goto _0
}
return _rc
}
-// Make sure all writes to a particular file are committed to disk.
-//
-// If dataOnly==0 then both the file itself and its metadata (file
-// size, access time, etc) are synced. If dataOnly!=0 then only the
-// file data is synced.
-//
-// Under Unix, also make sure that the directory entry for the file
-// has been created by fsync-ing the directory that contains the file.
-// If we do not do this and we encounter a power failure, the directory
-// entry for the journal might not exist after we reboot. The next
-// SQLite to access the file will not know that the journal exists (because
-// the directory entry for the journal was never created) and the transaction
-// will not roll back - possibly leading to database corruption.
+// C comment
+// /*
+// ** Make sure all writes to a particular file are committed to disk.
+// **
+// ** If dataOnly==0 then both the file itself and its metadata (file
+// ** size, access time, etc) are synced. If dataOnly!=0 then only the
+// ** file data is synced.
+// **
+// ** Under Unix, also make sure that the directory entry for the file
+// ** has been created by fsync-ing the directory that contains the file.
+// ** If we do not do this and we encounter a power failure, the directory
+// ** entry for the journal might not exist after we reboot. The next
+// ** SQLite to access the file will not know that the journal exists (because
+// ** the directory entry for the journal was never created) and the transaction
+// ** will not roll back - possibly leading to database corruption.
+// */
func _unixSync(tls *crt.TLS, _id *Xsqlite3_file, _flags int32) (r0 int32) {
var _rc, _isDataOnly, _isFullsync, _2_dirfd int32
var _pFile *XunixFile
_pFile = (*XunixFile)(unsafe.Pointer(_id))
- _isDataOnly = _flags & i32(16)
- _isFullsync = bool2int((_flags & i32(15)) == i32(3))
+ _isDataOnly = _flags & int32(16)
+ _isFullsync = bool2int((_flags & int32(15)) == int32(3))
func() {
- if (_flags&i32(15)) != i32(2) && (_flags&i32(15)) != i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33445), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixSyncØ00__func__Ø000))), unsafe.Pointer(str(132359)))
+ if (_flags&int32(15)) != int32(2) && (_flags&int32(15)) != int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33445), unsafe.Pointer(&_unixSyncØ00__func__Ø000), unsafe.Pointer(str(132372)))
crt.X__builtin_abort(tls)
}
}()
func() {
if _pFile == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33454), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixSyncØ00__func__Ø000))), unsafe.Pointer(str(58046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33454), unsafe.Pointer(&_unixSyncØ00__func__Ø000), unsafe.Pointer(str(58022)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _full_fsync(tls, _pFile.X3, _isFullsync, _isDataOnly)
+ _rc = _full_fsync(tls, _pFile.Xh, _isFullsync, _isDataOnly)
if _rc != 0 {
_storeLastErrno(tls, _pFile, *crt.X__errno_location(tls))
- return _unixLogErrorAtLine(tls, i32(1034), str(132426), _pFile.X9, i32(33460))
+ return _unixLogErrorAtLine(tls, int32(1034), str(132439), _pFile.XzPath, int32(33460))
}
- if (int32(_pFile.X5) & i32(8)) == 0 {
+ if (int32(_pFile.XctrlFlags) & int32(8)) == 0 {
goto _6
}
- _rc = (*(*func(*crt.TLS, *int8, *int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(17)))).X1)})))(tls, _pFile.X9, &_2_dirfd)
- if _rc == i32(0) {
- _full_fsync(tls, _2_dirfd, i32(0), i32(0))
- _robust_close(tls, _pFile, _2_dirfd, i32(33474))
+ _rc = func() func(*crt.TLS, *int8, *int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(17)).XpCurrent
+ return *(*func(*crt.TLS, *int8, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pFile.XzPath, &_2_dirfd)
+ if _rc == int32(0) {
+ _full_fsync(tls, _2_dirfd, int32(0), int32(0))
+ _robust_close(tls, _pFile, _2_dirfd, int32(33474))
goto _8
}
func() {
- if _rc != i32(14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33476), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixSyncØ00__func__Ø000))), unsafe.Pointer(str(132437)))
+ if _rc != int32(14) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33476), unsafe.Pointer(&_unixSyncØ00__func__Ø000), unsafe.Pointer(str(132450)))
crt.X__builtin_abort(tls)
}
}()
- _rc = i32(0)
+ _rc = int32(0)
_8:
{
- p := (*uint16)(unsafe.Pointer(&(_pFile.X5)))
- *p = uint16(int32(*p) & i32(-9))
- sink14(*p)
+ p := &_pFile.XctrlFlags
+ *p = uint16(int32(*p) & int32(-9))
}
_6:
return _rc
@@ -115998,31 +117881,34 @@ _6:
var _unixSyncØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_unixSyncØ00__func__Ø000[0], str(132457), 9)
-}
-
-// The fsync() system call does not work as advertised on many
-// unix systems. The following procedure is an attempt to make
-// it work better.
-//
-// The SQLITE_NO_SYNC macro disables all fsync()s. This is useful
-// for testing when we want to run through the test suite quickly.
-// You are strongly advised *not* to deploy with SQLITE_NO_SYNC
-// enabled, however, since with SQLITE_NO_SYNC enabled, an OS crash
-// or power failure will likely corrupt the database file.
-//
-// SQLite sets the dataOnly flag if the size of the file is unchanged.
-// The idea behind dataOnly is that it should only write the file content
-// to disk, not the inode. We only set dataOnly if the file size is
-// unchanged since the file size is part of the inode. However,
-// Ted Ts'o tells us that fdatasync() will also write the inode if the
-// file size has changed. The only real difference between fdatasync()
-// and fsync(), Ted tells us, is that fdatasync() will not flush the
-// inode if the mtime or owner or other inode attributes have changed.
-// We only care about the file size, not the other file attributes, so
-// as far as SQLite is concerned, an fdatasync() is always adequate.
-// So, we always use fdatasync() if it is available, regardless of
-// the value of the dataOnly flag.
+ crt.Xstrncpy(nil, &_unixSyncØ00__func__Ø000[0], str(132470), 9)
+}
+
+// C comment
+// /*
+// ** The fsync() system call does not work as advertised on many
+// ** unix systems. The following procedure is an attempt to make
+// ** it work better.
+// **
+// ** The SQLITE_NO_SYNC macro disables all fsync()s. This is useful
+// ** for testing when we want to run through the test suite quickly.
+// ** You are strongly advised *not* to deploy with SQLITE_NO_SYNC
+// ** enabled, however, since with SQLITE_NO_SYNC enabled, an OS crash
+// ** or power failure will likely corrupt the database file.
+// **
+// ** SQLite sets the dataOnly flag if the size of the file is unchanged.
+// ** The idea behind dataOnly is that it should only write the file content
+// ** to disk, not the inode. We only set dataOnly if the file size is
+// ** unchanged since the file size is part of the inode. However,
+// ** Ted Ts'o tells us that fdatasync() will also write the inode if the
+// ** file size has changed. The only real difference between fdatasync()
+// ** and fsync(), Ted tells us, is that fdatasync() will not flush the
+// ** inode if the mtime or owner or other inode attributes have changed.
+// ** We only care about the file size, not the other file attributes, so
+// ** as far as SQLite is concerned, an fdatasync() is always adequate.
+// ** So, we always use fdatasync() if it is available, regardless of
+// ** the value of the dataOnly flag.
+// */
func _full_fsync(tls *crt.TLS, _fd int32, _fullSync int32, _dataOnly int32) (r0 int32) {
var _rc int32
@@ -116032,296 +117918,302 @@ _0:
return _rc
}
-// Determine the current size of a file in bytes
+// C comment
+// /*
+// ** Determine the current size of a file in bytes
+// */
func _unixFileSize(tls *crt.TLS, _id *Xsqlite3_file, _pSize *int64) (r0 int32) {
var _rc int32
var _buf crt.Xstruct_stat64
func() {
if _id == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33540), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixFileSizeØ00__func__Ø000))), unsafe.Pointer(str(61727)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33540), unsafe.Pointer(&_unixFileSizeØ00__func__Ø000), unsafe.Pointer(str(93813)))
crt.X__builtin_abort(tls)
}
}()
- _rc = (*(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(5)))).X1)})))(tls, (*XunixFile)(unsafe.Pointer(_id)).X3, &_buf)
- if _rc != i32(0) {
+ _rc = func() func(*crt.TLS, int32, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(5)).XpCurrent
+ return *(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, (*XunixFile)(unsafe.Pointer(_id)).Xh, &_buf)
+ if _rc != int32(0) {
_storeLastErrno(tls, (*XunixFile)(unsafe.Pointer(_id)), *crt.X__errno_location(tls))
- return i32(1802)
+ return int32(1802)
}
- *_pSize = _buf.X9
- if (*_pSize) == int64(i32(1)) {
- *_pSize = int64(i32(0))
+ *_pSize = _buf.Xst_size
+ if (*_pSize) == int64(1) {
+ *_pSize = 0
}
- return i32(0)
-
- _ = _buf
- panic(0)
+ return int32(0)
}
var _unixFileSizeØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_unixFileSizeØ00__func__Ø000[0], str(132466), 13)
-}
-
-// Lock the file with the lock specified by parameter eFileLock - one
-// of the following:
-//
-// (1) SHARED_LOCK
-// (2) RESERVED_LOCK
-// (3) PENDING_LOCK
-// (4) EXCLUSIVE_LOCK
-//
-// Sometimes when requesting one lock state, additional lock states
-// are inserted in between. The locking might fail on one of the later
-// transitions leaving the lock state different from what it started but
-// still short of its goal. The following chart shows the allowed
-// transitions and the inserted intermediate states:
-//
-// UNLOCKED -> SHARED
-// SHARED -> RESERVED
-// SHARED -> (PENDING) -> EXCLUSIVE
-// RESERVED -> (PENDING) -> EXCLUSIVE
-// PENDING -> EXCLUSIVE
-//
-// This routine will only increase a lock. Use the sqlite3OsUnlock()
-// routine to lower a locking level.
+ crt.Xstrncpy(nil, &_unixFileSizeØ00__func__Ø000[0], str(132479), 13)
+}
+
+// C comment
+// /*
+// ** Lock the file with the lock specified by parameter eFileLock - one
+// ** of the following:
+// **
+// ** (1) SHARED_LOCK
+// ** (2) RESERVED_LOCK
+// ** (3) PENDING_LOCK
+// ** (4) EXCLUSIVE_LOCK
+// **
+// ** Sometimes when requesting one lock state, additional lock states
+// ** are inserted in between. The locking might fail on one of the later
+// ** transitions leaving the lock state different from what it started but
+// ** still short of its goal. The following chart shows the allowed
+// ** transitions and the inserted intermediate states:
+// **
+// ** UNLOCKED -> SHARED
+// ** SHARED -> RESERVED
+// ** SHARED -> (PENDING) -> EXCLUSIVE
+// ** RESERVED -> (PENDING) -> EXCLUSIVE
+// ** PENDING -> EXCLUSIVE
+// **
+// ** This routine will only increase a lock. Use the sqlite3OsUnlock()
+// ** routine to lower a locking level.
+// */
func _unixLock(tls *crt.TLS, _id *Xsqlite3_file, _eFileLock int32) (r0 int32) {
var _rc, _tErrno int32
var _pInode *XunixInodeInfo
var _pFile *XunixFile
var _lock Tflock
- _rc = i32(0)
+ _rc = int32(0)
_pFile = (*XunixFile)(unsafe.Pointer(_id))
- _tErrno = i32(0)
+ _tErrno = int32(0)
func() {
if _pFile == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31437), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(58046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31437), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(58022)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pFile.X4) >= _eFileLock {
- return i32(0)
+ if int32(_pFile.XeFileLock) >= _eFileLock {
+ return int32(0)
}
func() {
- if int32(_pFile.X4) == i32(0) && _eFileLock != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31458), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132479)))
+ if int32(_pFile.XeFileLock) == int32(0) && _eFileLock != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31458), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132492)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eFileLock == i32(3) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31459), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132531)))
+ if _eFileLock == int32(3) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31459), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132544)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eFileLock == i32(2) && int32(_pFile.X4) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31460), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132555)))
+ if _eFileLock == int32(2) && int32(_pFile.XeFileLock) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31460), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132568)))
crt.X__builtin_abort(tls)
}
}()
_unixEnterMutex(tls)
- _pInode = (*XunixInodeInfo)(_pFile.X2)
- if (int32(_pFile.X4) != int32(_pInode.X2)) && ((int32(_pInode.X2) >= i32(3)) || (_eFileLock > i32(1))) {
- _rc = i32(5)
+ _pInode = (*XunixInodeInfo)(_pFile.XpInode)
+ if (int32(_pFile.XeFileLock) != int32(_pInode.XeFileLock)) && ((int32(_pInode.XeFileLock) >= int32(3)) || (_eFileLock > int32(1))) {
+ _rc = int32(5)
goto _end_lock
}
- if (_eFileLock == i32(1)) && ((int32(_pInode.X2) == i32(1)) || (int32(_pInode.X2) == i32(2))) {
+ if (_eFileLock == int32(1)) && ((int32(_pInode.XeFileLock) == int32(1)) || (int32(_pInode.XeFileLock) == int32(2))) {
func() {
- if _eFileLock != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31483), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132613)))
+ if _eFileLock != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31483), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132626)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pFile.X4) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31484), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132636)))
+ if int32(_pFile.XeFileLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31484), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132649)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pInode.X1) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31485), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132656)))
+ if _pInode.XnShared <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31485), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132669)))
crt.X__builtin_abort(tls)
}
}()
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(i32(1))
- *(*int32)(unsafe.Pointer(&(_pInode.X1))) += 1
- *(*int32)(unsafe.Pointer(&(_pInode.X6))) += 1
+ _pFile.XeFileLock = uint8(1)
+ _pInode.XnShared += 1
+ _pInode.XnLock += 1
goto _end_lock
}
- *(*int64)(unsafe.Pointer(&(_lock.X3))) = int64(i32(1))
- *(*int16)(unsafe.Pointer(&(_lock.X1))) = int16(i32(0))
- if _eFileLock != i32(1) && (_eFileLock != i32(4) || int32(_pFile.X4) >= i32(3)) {
+ _lock.Xl_len = int64(1)
+ _lock.Xl_whence = 0
+ if _eFileLock != int32(1) && (_eFileLock != int32(4) || int32(_pFile.XeFileLock) >= int32(3)) {
goto _25
}
- *(*int16)(unsafe.Pointer(&(_lock.X0))) = int16(func() int32 {
- if _eFileLock == i32(1) {
- return i32(0)
+ _lock.Xl_type = int16(func() int32 {
+ if _eFileLock == int32(1) {
+ return int32(0)
}
- return i32(1)
+ return int32(1)
}())
- *(*int64)(unsafe.Pointer(&(_lock.X2))) = int64(_sqlite3PendingByte)
+ _lock.Xl_start = int64(_sqlite3PendingByte)
if _unixFileLock(tls, _pFile, &_lock) == 0 {
goto _28
}
_tErrno = *crt.X__errno_location(tls)
- _rc = _sqliteErrorFromPosixError(tls, _tErrno, i32(3850))
- if _rc != i32(5) {
+ _rc = _sqliteErrorFromPosixError(tls, _tErrno, int32(3850))
+ if _rc != int32(5) {
_storeLastErrno(tls, _pFile, _tErrno)
}
goto _end_lock
_28:
_25:
- if _eFileLock != i32(1) {
+ if _eFileLock != int32(1) {
goto _30
}
func() {
- if (_pInode.X1) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31519), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132674)))
+ if _pInode.XnShared != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31519), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132687)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pInode.X2) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31520), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132693)))
+ if int32(_pInode.XeFileLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31520), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132706)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _rc != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31521), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(15012)))
+ if _rc != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31521), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(14967)))
crt.X__builtin_abort(tls)
}
}()
- *(*int64)(unsafe.Pointer(&(_lock.X2))) = int64(_sqlite3PendingByte + i32(2))
- *(*int64)(unsafe.Pointer(&(_lock.X3))) = int64(i32(510))
+ _lock.Xl_start = int64(_sqlite3PendingByte + int32(2))
+ _lock.Xl_len = int64(510)
if _unixFileLock(tls, _pFile, &_lock) != 0 {
_tErrno = *crt.X__errno_location(tls)
- _rc = _sqliteErrorFromPosixError(tls, _tErrno, i32(3850))
+ _rc = _sqliteErrorFromPosixError(tls, _tErrno, int32(3850))
}
- *(*int64)(unsafe.Pointer(&(_lock.X2))) = int64(_sqlite3PendingByte)
- *(*int64)(unsafe.Pointer(&(_lock.X3))) = int64(i32(1))
- *(*int16)(unsafe.Pointer(&(_lock.X0))) = int16(i32(2))
- if _unixFileLock(tls, _pFile, &_lock) != 0 && (_rc == i32(0)) {
+ _lock.Xl_start = int64(_sqlite3PendingByte)
+ _lock.Xl_len = int64(1)
+ _lock.Xl_type = int16(2)
+ if _unixFileLock(tls, _pFile, &_lock) != 0 && (_rc == int32(0)) {
_tErrno = *crt.X__errno_location(tls)
- _rc = i32(2058)
+ _rc = int32(2058)
}
if _rc == 0 {
goto _40
}
- if _rc != i32(5) {
+ if _rc != int32(5) {
_storeLastErrno(tls, _pFile, _tErrno)
}
goto _end_lock
_40:
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(i32(1))
- *(*int32)(unsafe.Pointer(&(_pInode.X6))) += 1
- *(*int32)(unsafe.Pointer(&(_pInode.X1))) = i32(1)
+ _pFile.XeFileLock = uint8(1)
+ _pInode.XnLock += 1
+ _pInode.XnShared = int32(1)
goto _46
_30:
- if (_eFileLock == i32(4)) && ((_pInode.X1) > i32(1)) {
- _rc = i32(5)
+ if (_eFileLock == int32(4)) && (_pInode.XnShared > int32(1)) {
+ _rc = int32(5)
goto _46
}
func() {
- if i32(0) == int32(_pFile.X4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31560), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132714)))
+ if int32(0) == int32(_pFile.XeFileLock) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31560), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132727)))
crt.X__builtin_abort(tls)
}
}()
- *(*int16)(unsafe.Pointer(&(_lock.X0))) = int16(i32(1))
+ _lock.Xl_type = int16(1)
func() {
- if _eFileLock != i32(2) && _eFileLock != i32(4) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31563), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixLockØ00__func__Ø000))), unsafe.Pointer(str(132734)))
+ if _eFileLock != int32(2) && _eFileLock != int32(4) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31563), unsafe.Pointer(&_unixLockØ00__func__Ø000), unsafe.Pointer(str(132747)))
crt.X__builtin_abort(tls)
}
}()
- if _eFileLock == i32(2) {
- *(*int64)(unsafe.Pointer(&(_lock.X2))) = int64(_sqlite3PendingByte + i32(1))
- *(*int64)(unsafe.Pointer(&(_lock.X3))) = int64(i32(1))
+ if _eFileLock == int32(2) {
+ _lock.Xl_start = int64(_sqlite3PendingByte + int32(1))
+ _lock.Xl_len = int64(1)
goto _53
}
- *(*int64)(unsafe.Pointer(&(_lock.X2))) = int64(_sqlite3PendingByte + i32(2))
- *(*int64)(unsafe.Pointer(&(_lock.X3))) = int64(i32(510))
+ _lock.Xl_start = int64(_sqlite3PendingByte + int32(2))
+ _lock.Xl_len = int64(510)
_53:
if _unixFileLock(tls, _pFile, &_lock) == 0 {
goto _54
}
_tErrno = *crt.X__errno_location(tls)
- _rc = _sqliteErrorFromPosixError(tls, _tErrno, i32(3850))
- if _rc != i32(5) {
+ _rc = _sqliteErrorFromPosixError(tls, _tErrno, int32(3850))
+ if _rc != int32(5) {
_storeLastErrno(tls, _pFile, _tErrno)
}
_54:
_46:
- if ((_rc == i32(0)) && (int32(_pFile.X4) <= i32(1))) && (_eFileLock == i32(2)) {
- *(*uint8)(unsafe.Pointer(&(_pFile.X17))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pFile.X18))) = uint8(i32(0))
- *(*uint8)(unsafe.Pointer(&(_pFile.X19))) = uint8(i32(1))
- }
- if _rc == i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(_eFileLock)
- *(*uint8)(unsafe.Pointer(&(_pInode.X2))) = uint8(_eFileLock)
+ if ((_rc == int32(0)) && (int32(_pFile.XeFileLock) <= int32(1))) && (_eFileLock == int32(2)) {
+ _pFile.XtransCntrChng = 0
+ _pFile.XdbUpdate = 0
+ _pFile.XinNormalWrite = uint8(1)
+ }
+ if _rc == int32(0) {
+ _pFile.XeFileLock = uint8(_eFileLock)
+ _pInode.XeFileLock = uint8(_eFileLock)
goto _end_lock
}
- if _eFileLock == i32(4) {
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(i32(3))
- *(*uint8)(unsafe.Pointer(&(_pInode.X2))) = uint8(i32(3))
+ if _eFileLock == int32(4) {
+ _pFile.XeFileLock = uint8(3)
+ _pInode.XeFileLock = uint8(3)
}
_end_lock:
_unixLeaveMutex(tls)
return _rc
-
- _ = _lock
- panic(0)
}
var _unixLockØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_unixLockØ00__func__Ø000[0], str(132788), 9)
+ crt.Xstrncpy(nil, &_unixLockØ00__func__Ø000[0], str(132801), 9)
}
-// This routine translates a standard POSIX errno code into something
-// useful to the clients of the sqlite3 functions. Specifically, it is
-// intended to translate a variety of "try again" errors into SQLITE_BUSY
-// and a variety of "please close the file descriptor NOW" errors into
-// SQLITE_IOERR
-//
-// Errors during initialization of locks, or file system support for locks,
-// should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately.
+// C comment
+// /*
+// ** This routine translates a standard POSIX errno code into something
+// ** useful to the clients of the sqlite3 functions. Specifically, it is
+// ** intended to translate a variety of "try again" errors into SQLITE_BUSY
+// ** and a variety of "please close the file descriptor NOW" errors into
+// ** SQLITE_IOERR
+// **
+// ** Errors during initialization of locks, or file system support for locks,
+// ** should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately.
+// */
func _sqliteErrorFromPosixError(tls *crt.TLS, _posixError int32, _sqliteIOErr int32) (r0 int32) {
func() {
- if _sqliteIOErr != i32(3850) && _sqliteIOErr != i32(2058) && _sqliteIOErr != i32(2314) && _sqliteIOErr != i32(3594) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(30686), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqliteErrorFromPosixErrorØ00__func__Ø000))), unsafe.Pointer(str(132797)))
+ if _sqliteIOErr != int32(3850) && _sqliteIOErr != int32(2058) && _sqliteIOErr != int32(2314) && _sqliteIOErr != int32(3594) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(30686), unsafe.Pointer(&_sqliteErrorFromPosixErrorØ00__func__Ø000), unsafe.Pointer(str(132810)))
crt.X__builtin_abort(tls)
}
}()
switch _posixError {
- case i32(1):
+ case int32(1):
goto _12
- case i32(4):
+ case int32(4):
goto _6
- case i32(11):
+ case int32(11):
goto _6
- case i32(13):
+ case int32(13):
goto _6
- case i32(16):
+ case int32(16):
goto _6
- case i32(37):
+ case int32(37):
goto _6
- case i32(110):
+ case int32(110):
goto _6
default:
goto _13
}
_6:
- return i32(5)
+ return int32(5)
_12:
- return i32(3)
+ return int32(3)
_13:
return _sqliteIOErr
@@ -116330,68 +118222,74 @@ _13:
var _sqliteErrorFromPosixErrorØ00__func__Ø000 [26]int8
func init() {
- crt.Xstrncpy(nil, &_sqliteErrorFromPosixErrorØ00__func__Ø000[0], str(132963), 26)
+ crt.Xstrncpy(nil, &_sqliteErrorFromPosixErrorØ00__func__Ø000[0], str(132976), 26)
}
-// This routine checks if there is a RESERVED lock held on the specified
-// file by this or any other process. If such a lock is held, set *pResOut
-// to a non-zero value otherwise *pResOut is set to zero. The return value
-// is set to SQLITE_OK unless an I/O error occurs during lock checking.
+// C comment
+// /*
+// ** This routine checks if there is a RESERVED lock held on the specified
+// ** file by this or any other process. If such a lock is held, set *pResOut
+// ** to a non-zero value otherwise *pResOut is set to zero. The return value
+// ** is set to SQLITE_OK unless an I/O error occurs during lock checking.
+// */
func _unixCheckReservedLock(tls *crt.TLS, _id *Xsqlite3_file, _pResOut *int32) (r0 int32) {
var _rc, _reserved int32
var _pFile *XunixFile
var _2_lock Tflock
- _rc = i32(0)
- _reserved = i32(0)
+ _rc = int32(0)
+ _reserved = int32(0)
_pFile = (*XunixFile)(unsafe.Pointer(_id))
func() {
if _pFile == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31288), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixCheckReservedLockØ00__func__Ø000))), unsafe.Pointer(str(58046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31288), unsafe.Pointer(&_unixCheckReservedLockØ00__func__Ø000), unsafe.Pointer(str(58022)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if int32(_pFile.X4) > i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31289), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixCheckReservedLockØ00__func__Ø000))), unsafe.Pointer(str(132989)))
+ if int32(_pFile.XeFileLock) > int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31289), unsafe.Pointer(&_unixCheckReservedLockØ00__func__Ø000), unsafe.Pointer(str(133002)))
crt.X__builtin_abort(tls)
}
}()
_unixEnterMutex(tls)
- if int32((*XunixInodeInfo)(_pFile.X2).X2) > i32(1) {
- _reserved = i32(1)
+ if int32((*XunixInodeInfo)(_pFile.XpInode).XeFileLock) > int32(1) {
+ _reserved = int32(1)
}
- if _reserved != 0 || ((*XunixInodeInfo)(_pFile.X2).X3) != 0 {
+ if _reserved != 0 || ((*XunixInodeInfo)(_pFile.XpInode).XbProcessLock) != 0 {
goto _6
}
- *(*int16)(unsafe.Pointer(&(_2_lock.X1))) = int16(i32(0))
- *(*int64)(unsafe.Pointer(&(_2_lock.X2))) = int64(_sqlite3PendingByte + i32(1))
- *(*int64)(unsafe.Pointer(&(_2_lock.X3))) = int64(i32(1))
- *(*int16)(unsafe.Pointer(&(_2_lock.X0))) = int16(i32(1))
- if (*(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(7)))).X1)})))(tls, _pFile.X3, i32(12), unsafe.Pointer(&_2_lock)) != 0 {
- _rc = i32(3594)
+ _2_lock.Xl_whence = 0
+ _2_lock.Xl_start = int64(_sqlite3PendingByte + int32(1))
+ _2_lock.Xl_len = int64(1)
+ _2_lock.Xl_type = int16(1)
+ if func() func(*crt.TLS, int32, int32, ...interface{}) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(7)).XpCurrent
+ return *(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&v))
+ }()(tls, _pFile.Xh, int32(12), unsafe.Pointer(&_2_lock)) != 0 {
+ _rc = int32(3594)
_storeLastErrno(tls, _pFile, *crt.X__errno_location(tls))
goto _9
}
- if int32(_2_lock.X0) != i32(2) {
- _reserved = i32(1)
+ if int32(_2_lock.Xl_type) != int32(2) {
+ _reserved = int32(1)
}
_9:
_6:
_unixLeaveMutex(tls)
*_pResOut = _reserved
return _rc
-
- _ = _2_lock
- panic(0)
}
var _unixCheckReservedLockØ00__func__Ø000 [22]int8
func init() {
- crt.Xstrncpy(nil, &_unixCheckReservedLockØ00__func__Ø000[0], str(133019), 22)
+ crt.Xstrncpy(nil, &_unixCheckReservedLockØ00__func__Ø000[0], str(133032), 22)
}
-// Information and control of an open file handle.
+// C comment
+// /*
+// ** Information and control of an open file handle.
+// */
func _unixFileControl(tls *crt.TLS, _id *Xsqlite3_file, _op int32, _pArg unsafe.Pointer) (r0 int32) {
var _5_rc, _12_rc int32
var _12_newLimit int64
@@ -116399,494 +118297,532 @@ func _unixFileControl(tls *crt.TLS, _id *Xsqlite3_file, _op int32, _pArg unsafe.
var _pFile *XunixFile
_pFile = (*XunixFile)(unsafe.Pointer(_id))
switch _op {
- case i32(-905363552):
+ case int32(-905363552):
goto _11
- case i32(1):
+ case int32(1):
goto _1
- case i32(4):
+ case int32(4):
goto _2
- case i32(5):
+ case int32(5):
goto _4
- case i32(6):
+ case int32(6):
goto _3
- case i32(10):
+ case int32(10):
goto _5
- case i32(12):
+ case int32(12):
goto _7
- case i32(13):
+ case int32(13):
goto _6
- case i32(16):
+ case int32(16):
goto _8
- case i32(18):
+ case int32(18):
goto _10
- case i32(20):
+ case int32(20):
goto _9
default:
goto _12
}
_1:
- *(*int32)(_pArg) = int32(_pFile.X4)
- return i32(0)
+ *(*int32)(_pArg) = int32(_pFile.XeFileLock)
+ return int32(0)
_2:
- *(*int32)(_pArg) = _pFile.X6
- return i32(0)
+ *(*int32)(_pArg) = _pFile.XlastErrno
+ return int32(0)
_3:
- *(*int32)(unsafe.Pointer(&(_pFile.X11))) = *(*int32)(_pArg)
- return i32(0)
+ _pFile.XszChunk = *(*int32)(_pArg)
+ return int32(0)
_4:
_5_rc = _fcntlSizeHint(tls, _pFile, *(*int64)(_pArg))
return _5_rc
_5:
- _unixModeBit(tls, _pFile, uint8(i32(4)), (*int32)(_pArg))
- return i32(0)
+ _unixModeBit(tls, _pFile, uint8(4), (*int32)(_pArg))
+ return int32(0)
_6:
- _unixModeBit(tls, _pFile, uint8(i32(16)), (*int32)(_pArg))
- return i32(0)
+ _unixModeBit(tls, _pFile, uint8(16), (*int32)(_pArg))
+ return int32(0)
_7:
- *(**int8)(_pArg) = Xsqlite3_mprintf(tls, str(24576), unsafe.Pointer((*Xsqlite3_vfs)(_pFile.X1).X4))
- return i32(0)
+ *(**int8)(_pArg) = Xsqlite3_mprintf(tls, str(24531), unsafe.Pointer((*Xsqlite3_vfs)(_pFile.XpVfs).XzName))
+ return int32(0)
_8:
- _9_zTFile = (*int8)(Xsqlite3_malloc64(tls, uint64((*Xsqlite3_vfs)(_pFile.X1).X2)))
+ _9_zTFile = (*int8)(Xsqlite3_malloc64(tls, uint64((*Xsqlite3_vfs)(_pFile.XpVfs).XmxPathname)))
if _9_zTFile != nil {
- _unixGetTempname(tls, (*Xsqlite3_vfs)(_pFile.X1).X2, _9_zTFile)
+ _unixGetTempname(tls, (*Xsqlite3_vfs)(_pFile.XpVfs).XmxPathname, _9_zTFile)
*(**int8)(_pArg) = _9_zTFile
}
- return i32(0)
+ return int32(0)
_9:
*(*int32)(_pArg) = _fileHasMoved(tls, _pFile)
- return i32(0)
+ return int32(0)
_10:
_12_newLimit = *(*int64)(_pArg)
- _12_rc = i32(0)
- if _12_newLimit > (_sqlite3Config.X18) {
- _12_newLimit = _sqlite3Config.X18
+ _12_rc = int32(0)
+ if _12_newLimit > _sqlite3Config.XmxMmap {
+ _12_newLimit = _sqlite3Config.XmxMmap
}
- *(*int64)(_pArg) = _pFile.X15
- if _12_newLimit < int64(i32(0)) || _12_newLimit == (_pFile.X15) || (_pFile.X12) != i32(0) {
+ *(*int64)(_pArg) = _pFile.XmmapSizeMax
+ if _12_newLimit < (0) || _12_newLimit == _pFile.XmmapSizeMax || _pFile.XnFetchOut != int32(0) {
goto _17
}
- *(*int64)(unsafe.Pointer(&(_pFile.X15))) = _12_newLimit
- if (_pFile.X13) > int64(i32(0)) {
+ _pFile.XmmapSizeMax = _12_newLimit
+ if _pFile.XmmapSize > (0) {
_unixUnmapfile(tls, _pFile)
- _12_rc = _unixMapfile(tls, _pFile, int64(i32(-1)))
+ _12_rc = _unixMapfile(tls, _pFile, int64(-1))
}
_17:
return _12_rc
_11:
- *(*uint8)(unsafe.Pointer(&((*XunixFile)(unsafe.Pointer(_id)).X18))) = uint8(i32(0))
- return i32(0)
+ (*XunixFile)(unsafe.Pointer(_id)).XdbUpdate = 0
+ return int32(0)
_12:
- return i32(12)
+ return int32(12)
}
-// This function is called to handle the SQLITE_FCNTL_SIZE_HINT
-// file-control operation. Enlarge the database to nBytes in size
-// (rounded up to the next chunk-size). If the database is already
-// nBytes or larger, this routine is a no-op.
+// C comment
+// /*
+// ** This function is called to handle the SQLITE_FCNTL_SIZE_HINT
+// ** file-control operation. Enlarge the database to nBytes in size
+// ** (rounded up to the next chunk-size). If the database is already
+// ** nBytes or larger, this routine is a no-op.
+// */
func _fcntlSizeHint(tls *crt.TLS, _pFile *XunixFile, _nByte int64) (r0 int32) {
var _3_nBlk, _3_nWrite, _5_rc int32
var _1_nSize, _3_iWrite int64
var _1_buf crt.Xstruct_stat64
- if (_pFile.X11) <= i32(0) {
+ if _pFile.XszChunk <= int32(0) {
goto _0
}
- if (*(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(5)))).X1)})))(tls, _pFile.X3, &_1_buf) != 0 {
- return i32(1802)
+ if func() func(*crt.TLS, int32, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(5)).XpCurrent
+ return *(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pFile.Xh, &_1_buf) != 0 {
+ return int32(1802)
}
- _1_nSize = (((_nByte + int64(_pFile.X11)) - int64(i32(1))) / int64(_pFile.X11)) * int64(_pFile.X11)
- if _1_nSize <= (_1_buf.X9) {
+ _1_nSize = (((_nByte + int64(_pFile.XszChunk)) - int64(1)) / int64(_pFile.XszChunk)) * int64(_pFile.XszChunk)
+ if _1_nSize <= _1_buf.Xst_size {
goto _2
}
- _3_nBlk = _1_buf.X10
- _3_nWrite = i32(0)
- _3_iWrite = ((((_1_buf.X9) / int64(_3_nBlk)) * int64(_3_nBlk)) + int64(_3_nBlk)) - int64(i32(1))
+ _3_nBlk = _1_buf.Xst_blksize
+ _3_nWrite = int32(0)
+ _3_iWrite = (((_1_buf.Xst_size / int64(_3_nBlk)) * int64(_3_nBlk)) + int64(_3_nBlk)) - int64(1)
func() {
- if _3_iWrite < (_1_buf.X9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33609), unsafe.Pointer((*int8)(unsafe.Pointer(&_fcntlSizeHintØ00__func__Ø000))), unsafe.Pointer(str(133041)))
+ if _3_iWrite < _1_buf.Xst_size {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33609), unsafe.Pointer(&_fcntlSizeHintØ00__func__Ø000), unsafe.Pointer(str(133054)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if ((_3_iWrite + int64(i32(1))) % int64(_3_nBlk)) != int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33610), unsafe.Pointer((*int8)(unsafe.Pointer(&_fcntlSizeHintØ00__func__Ø000))), unsafe.Pointer(str(133061)))
+ if ((_3_iWrite + int64(1)) % int64(_3_nBlk)) != (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33610), unsafe.Pointer(&_fcntlSizeHintØ00__func__Ø000), unsafe.Pointer(str(133074)))
crt.X__builtin_abort(tls)
}
}()
_7:
- if _3_iWrite >= ((_1_nSize + int64(_3_nBlk)) - int64(i32(1))) {
+ if _3_iWrite >= ((_1_nSize + int64(_3_nBlk)) - int64(1)) {
goto _10
}
if _3_iWrite >= _1_nSize {
- _3_iWrite = _1_nSize - int64(i32(1))
- }
- _3_nWrite = _seekAndWrite(tls, _pFile, _3_iWrite, (unsafe.Pointer)(str(0)), i32(1))
- if _3_nWrite != i32(1) {
- return i32(778)
+ _3_iWrite = _1_nSize - int64(1)
}
- {
- p := &_3_iWrite
- *p = (*p) + int64(_3_nBlk)
- sink6(*p)
+ _3_nWrite = _seekAndWrite(tls, _pFile, _3_iWrite, unsafe.Pointer(str(284)), int32(1))
+ if _3_nWrite != int32(1) {
+ return int32(778)
}
+ _3_iWrite += int64(_3_nBlk)
goto _7
_10:
_2:
_0:
- if (_pFile.X15) <= int64(i32(0)) || _nByte <= (_pFile.X13) {
+ if _pFile.XmmapSizeMax <= (0) || _nByte <= _pFile.XmmapSize {
goto _14
}
- if (_pFile.X11) > i32(0) {
+ if _pFile.XszChunk > int32(0) {
goto _15
}
- if _robust_ftruncate(tls, _pFile.X3, _nByte) != 0 {
+ if _robust_ftruncate(tls, _pFile.Xh, _nByte) != 0 {
_storeLastErrno(tls, _pFile, *crt.X__errno_location(tls))
- return _unixLogErrorAtLine(tls, i32(1546), str(131533), _pFile.X9, i32(33626))
+ return _unixLogErrorAtLine(tls, int32(1546), str(131546), _pFile.XzPath, int32(33626))
}
_15:
_5_rc = _unixMapfile(tls, _pFile, _nByte)
return _5_rc
_14:
- return i32(0)
-
- _ = _1_buf
- panic(0)
+ return int32(0)
}
var _fcntlSizeHintØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_fcntlSizeHintØ00__func__Ø000[0], str(133082), 14)
-}
-
-// Memory map or remap the file opened by file-descriptor pFd (if the file
-// is already mapped, the existing mapping is replaced by the new). Or, if
-// there already exists a mapping for this file, and there are still
-// outstanding xFetch() references to it, this function is a no-op.
-//
-// If parameter nByte is non-negative, then it is the requested size of
-// the mapping to create. Otherwise, if nByte is less than zero, then the
-// requested size is the size of the file on disk. The actual size of the
-// created mapping is either the requested size or the value configured
-// using SQLITE_FCNTL_MMAP_LIMIT, whichever is smaller.
-//
-// SQLITE_OK is returned if no error occurs (even if the mapping is not
-// recreated as a result of outstanding references) or an SQLite error
-// code otherwise.
+ crt.Xstrncpy(nil, &_fcntlSizeHintØ00__func__Ø000[0], str(133095), 14)
+}
+
+// C comment
+// /*
+// ** Memory map or remap the file opened by file-descriptor pFd (if the file
+// ** is already mapped, the existing mapping is replaced by the new). Or, if
+// ** there already exists a mapping for this file, and there are still
+// ** outstanding xFetch() references to it, this function is a no-op.
+// **
+// ** If parameter nByte is non-negative, then it is the requested size of
+// ** the mapping to create. Otherwise, if nByte is less than zero, then the
+// ** requested size is the size of the file on disk. The actual size of the
+// ** created mapping is either the requested size or the value configured
+// ** using SQLITE_FCNTL_MMAP_LIMIT, whichever is smaller.
+// **
+// ** SQLITE_OK is returned if no error occurs (even if the mapping is not
+// ** recreated as a result of outstanding references) or an SQLite error
+// ** code otherwise.
+// */
func _unixMapfile(tls *crt.TLS, _pFd *XunixFile, _nMap int64) (r0 int32) {
var _1_statbuf crt.Xstruct_stat64
func() {
- if _nMap < int64(i32(0)) && (_pFd.X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34713), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixMapfileØ00__func__Ø000))), unsafe.Pointer(str(133096)))
+ if _nMap < (0) && _pFd.XnFetchOut != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34713), unsafe.Pointer(&_unixMapfileØ00__func__Ø000), unsafe.Pointer(str(133109)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nMap <= int64(i32(0)) && ((_pFd.X13) != int64(i32(0)) || _pFd.X16 != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34714), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixMapfileØ00__func__Ø000))), unsafe.Pointer(str(133125)))
+ if _nMap <= (0) && (_pFd.XmmapSize != (0) || _pFd.XpMapRegion != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34714), unsafe.Pointer(&_unixMapfileØ00__func__Ø000), unsafe.Pointer(str(133138)))
crt.X__builtin_abort(tls)
}
}()
- if (_pFd.X12) > i32(0) {
- return i32(0)
+ if _pFd.XnFetchOut > int32(0) {
+ return int32(0)
}
- if _nMap >= int64(i32(0)) {
+ if _nMap >= (0) {
goto _8
}
- if (*(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(5)))).X1)})))(tls, _pFd.X3, &_1_statbuf) != 0 {
- return i32(1802)
+ if func() func(*crt.TLS, int32, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(5)).XpCurrent
+ return *(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pFd.Xh, &_1_statbuf) != 0 {
+ return int32(1802)
}
- _nMap = _1_statbuf.X9
+ _nMap = _1_statbuf.Xst_size
_8:
- if _nMap > (_pFd.X15) {
- _nMap = _pFd.X15
+ if _nMap > _pFd.XmmapSizeMax {
+ _nMap = _pFd.XmmapSizeMax
}
func() {
- if _nMap <= int64(i32(0)) && ((_pFd.X13) != int64(i32(0)) || _pFd.X16 != nil) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34728), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixMapfileØ00__func__Ø000))), unsafe.Pointer(str(133125)))
+ if _nMap <= (0) && (_pFd.XmmapSize != (0) || _pFd.XpMapRegion != nil) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34728), unsafe.Pointer(&_unixMapfileØ00__func__Ø000), unsafe.Pointer(str(133138)))
crt.X__builtin_abort(tls)
}
}()
- if _nMap != (_pFd.X13) {
+ if _nMap != _pFd.XmmapSize {
_unixRemapfile(tls, _pFd, _nMap)
}
- return i32(0)
-
- _ = _1_statbuf
- panic(0)
+ return int32(0)
}
var _unixMapfileØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_unixMapfileØ00__func__Ø000[0], str(133176), 12)
-}
-
-// Attempt to set the size of the memory mapping maintained by file
-// descriptor pFd to nNew bytes. Any existing mapping is discarded.
-//
-// If successful, this function sets the following variables:
-//
-// unixFile.pMapRegion
-// unixFile.mmapSize
-// unixFile.mmapSizeActual
-//
-// If unsuccessful, an error message is logged via sqlite3_log() and
-// the three variables above are zeroed. In this case SQLite should
-// continue accessing the database using the xRead() and xWrite()
-// methods.
+ crt.Xstrncpy(nil, &_unixMapfileØ00__func__Ø000[0], str(133189), 12)
+}
+
+// C comment
+// /*
+// ** Attempt to set the size of the memory mapping maintained by file
+// ** descriptor pFd to nNew bytes. Any existing mapping is discarded.
+// **
+// ** If successful, this function sets the following variables:
+// **
+// ** unixFile.pMapRegion
+// ** unixFile.mmapSize
+// ** unixFile.mmapSizeActual
+// **
+// ** If unsuccessful, an error message is logged via sqlite3_log() and
+// ** the three variables above are zeroed. In this case SQLite should
+// ** continue accessing the database using the xRead() and xWrite()
+// ** methods.
+// */
func _unixRemapfile(tls *crt.TLS, _pFd *XunixFile, _nNew int64) {
var _h, _flags, _1_szSyspage int32
var _nOrig, _1_nReuse int64
var _zErr *int8
var _pOrig, _pNew, _1_pReq *uint8
- _zErr = str(131655)
- _h = _pFd.X3
- _pOrig = (*uint8)(_pFd.X16)
- _nOrig = _pFd.X14
+ _zErr = str(131668)
+ _h = _pFd.Xh
+ _pOrig = (*uint8)(_pFd.XpMapRegion)
+ _nOrig = _pFd.XmmapSizeActual
_pNew = nil
- _flags = i32(1)
+ _flags = int32(1)
func() {
- if (_pFd.X12) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34631), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixRemapfileØ00__func__Ø000))), unsafe.Pointer(str(132188)))
+ if _pFd.XnFetchOut != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34631), unsafe.Pointer(&_unixRemapfileØ00__func__Ø000), unsafe.Pointer(str(132201)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nNew <= (_pFd.X13) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34632), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixRemapfileØ00__func__Ø000))), unsafe.Pointer(str(133188)))
+ if _nNew <= _pFd.XmmapSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34632), unsafe.Pointer(&_unixRemapfileØ00__func__Ø000), unsafe.Pointer(str(133201)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nNew > (_pFd.X15) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34633), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixRemapfileØ00__func__Ø000))), unsafe.Pointer(str(133207)))
+ if _nNew > _pFd.XmmapSizeMax {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34633), unsafe.Pointer(&_unixRemapfileØ00__func__Ø000), unsafe.Pointer(str(133220)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _nNew <= int64(i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34634), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixRemapfileØ00__func__Ø000))), unsafe.Pointer(str(84646)))
+ if _nNew <= (0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34634), unsafe.Pointer(&_unixRemapfileØ00__func__Ø000), unsafe.Pointer(str(82808)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pFd.X14) < (_pFd.X13) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34635), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixRemapfileØ00__func__Ø000))), unsafe.Pointer(str(133230)))
+ if _pFd.XmmapSizeActual < _pFd.XmmapSize {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34635), unsafe.Pointer(&_unixRemapfileØ00__func__Ø000), unsafe.Pointer(str(133243)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (unsafe.Pointer)(uintptr(u32(4294967295))) == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34636), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixRemapfileØ00__func__Ø000))), unsafe.Pointer(str(133265)))
+ if crt.U2P(uintptr(uint32(4294967295))) == nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34636), unsafe.Pointer(&_unixRemapfileØ00__func__Ø000), unsafe.Pointer(str(133278)))
crt.X__builtin_abort(tls)
}
}()
if _pOrig == nil {
goto _12
}
- _1_szSyspage = (*(*func(*crt.TLS) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(25)))).X1)})))(tls)
- _1_nReuse = (_pFd.X13) & int64(^(_1_szSyspage - i32(1)))
- _1_pReq = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pOrig)) + 1*uintptr(_1_nReuse)))
+ _1_szSyspage = func() func(*crt.TLS) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(25)).XpCurrent
+ return *(*func(*crt.TLS) int32)(unsafe.Pointer(&v))
+ }()(tls)
+ _1_nReuse = _pFd.XmmapSize & int64(^(_1_szSyspage - int32(1)))
+ _1_pReq = elem15(_pOrig, uintptr(_1_nReuse))
if _1_nReuse != _nOrig {
- (*(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(23)))).X1)})))(tls, (unsafe.Pointer)(_1_pReq), uint32(_nOrig-_1_nReuse))
- }
- _pNew = (*uint8)((*(*func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(22)))).X1)})))(tls, (unsafe.Pointer)(_1_pReq), uint32(_nNew-_1_nReuse), _flags, i32(1), _h, _1_nReuse))
- if _pNew == (*uint8)(unsafe.Pointer(uintptr(u32(4294967295)))) {
+ func() func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(23)).XpCurrent
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, unsafe.Pointer(_1_pReq), uint32(_nOrig-_1_nReuse))
+ }
+ _pNew = (*uint8)(func() func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(22)).XpCurrent
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, unsafe.Pointer(_1_pReq), uint32(_nNew-_1_nReuse), _flags, int32(1), _h, _1_nReuse))
+ if _pNew == (*uint8)(crt.U2P(uintptr(uint32(4294967295)))) {
goto _14
}
if _pNew != _1_pReq {
- (*(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(23)))).X1)})))(tls, (unsafe.Pointer)(_pNew), uint32(_nNew-_1_nReuse))
+ func() func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(23)).XpCurrent
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, unsafe.Pointer(_pNew), uint32(_nNew-_1_nReuse))
_pNew = nil
goto _16
}
_pNew = _pOrig
_16:
_14:
- if (_pNew == (*uint8)(unsafe.Pointer(uintptr(u32(4294967295))))) || (_pNew == nil) {
- (*(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(23)))).X1)})))(tls, (unsafe.Pointer)(_pOrig), uint32(_1_nReuse))
+ if (_pNew == (*uint8)(crt.U2P(uintptr(uint32(4294967295))))) || (_pNew == nil) {
+ func() func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(23)).XpCurrent
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, unsafe.Pointer(_pOrig), uint32(_1_nReuse))
}
_12:
if _pNew == nil {
- _pNew = (*uint8)((*(*func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(22)))).X1)})))(tls, nil, uint32(_nNew), _flags, i32(1), _h, int64(i32(0))))
+ _pNew = (*uint8)(func() func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(22)).XpCurrent
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, nil, uint32(_nNew), _flags, int32(1), _h, 0))
}
- if _pNew == (*uint8)(unsafe.Pointer(uintptr(u32(4294967295)))) {
+ if _pNew == (*uint8)(crt.U2P(uintptr(uint32(4294967295)))) {
_pNew = nil
- _nNew = int64(i32(0))
- _unixLogErrorAtLine(tls, i32(0), _zErr, _pFd.X9, i32(34685))
- *(*int64)(unsafe.Pointer(&(_pFd.X15))) = int64(i32(0))
+ _nNew = 0
+ _unixLogErrorAtLine(tls, int32(0), _zErr, _pFd.XzPath, int32(34685))
+ _pFd.XmmapSizeMax = 0
}
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pFd.X16))) = (unsafe.Pointer)(_pNew)
- *(*int64)(unsafe.Pointer(&(_pFd.X13))) = store6((*int64)(unsafe.Pointer(&(_pFd.X14))), _nNew)
+ _pFd.XpMapRegion = unsafe.Pointer(_pNew)
+ _pFd.XmmapSize = store35(&_pFd.XmmapSizeActual, _nNew)
}
var _unixRemapfileØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_unixRemapfileØ00__func__Ø000[0], str(133279), 14)
+ crt.Xstrncpy(nil, &_unixRemapfileØ00__func__Ø000[0], str(133292), 14)
}
-// If *pArg is initially negative then this is a query. Set *pArg to
-// 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set.
-//
-// If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags.
+// C comment
+// /*
+// ** If *pArg is initially negative then this is a query. Set *pArg to
+// ** 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set.
+// **
+// ** If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags.
+// */
func _unixModeBit(tls *crt.TLS, _pFile *XunixFile, _mask uint8, _pArg *int32) {
- if (*_pArg) < i32(0) {
- *_pArg = bool2int((int32(_pFile.X5) & int32(_mask)) != i32(0))
+ if (*_pArg) < int32(0) {
+ *_pArg = bool2int((int32(_pFile.XctrlFlags) & int32(_mask)) != int32(0))
goto _3
}
- if (*_pArg) == i32(0) {
+ if (*_pArg) == int32(0) {
{
- p := (*uint16)(unsafe.Pointer(&(_pFile.X5)))
+ p := &_pFile.XctrlFlags
*p = uint16(int32(*p) & (^int32(_mask)))
- sink14(*p)
}
goto _3
}
{
- p := (*uint16)(unsafe.Pointer(&(_pFile.X5)))
+ p := &_pFile.XctrlFlags
*p = uint16(int32(*p) | int32(_mask))
- sink14(*p)
}
_3:
}
-// Create a temporary file name in zBuf. zBuf must be allocated
-// by the calling process and must be big enough to hold at least
-// pVfs->mxPathname bytes.
+// C comment
+// /*
+// ** Create a temporary file name in zBuf. zBuf must be allocated
+// ** by the calling process and must be big enough to hold at least
+// ** pVfs->mxPathname bytes.
+// */
func _unixGetTempname(tls *crt.TLS, _nBuf int32, _zBuf *int8) (r0 int32) {
var _iLimit int32
var _1_r uint64
var _zDir *int8
- _iLimit = i32(0)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(i32(0)))) = int8(i32(0))
+ _iLimit = int32(0)
+ *elem1(_zBuf, 0) = 0
_zDir = _unixTempFileDir(tls)
if _zDir == nil {
- return i32(6410)
+ return int32(6410)
}
_0:
- Xsqlite3_randomness(tls, int32(u32(8)), (unsafe.Pointer)(&_1_r))
+ Xsqlite3_randomness(tls, int32(8), unsafe.Pointer(&_1_r))
func() {
- if _nBuf <= i32(2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35347), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixGetTempnameØ00__func__Ø000))), unsafe.Pointer(str(133293)))
+ if _nBuf <= int32(2) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35347), unsafe.Pointer(&_unixGetTempnameØ00__func__Ø000), unsafe.Pointer(str(133306)))
crt.X__builtin_abort(tls)
}
}()
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(_nBuf-i32(2)))) = int8(i32(0))
- Xsqlite3_snprintf(tls, _nBuf, _zBuf, str(133300), unsafe.Pointer(_zDir), _1_r, i32(0))
- if (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(_nBuf-i32(2))))) != i32(0)) || (postInc1(&_iLimit, int32(1)) > i32(10)) {
- return i32(1)
+ *elem1(_zBuf, uintptr(_nBuf-int32(2))) = 0
+ Xsqlite3_snprintf(tls, _nBuf, _zBuf, str(133313), unsafe.Pointer(_zDir), _1_r, int32(0))
+ if (int32(*elem1(_zBuf, uintptr(_nBuf-int32(2)))) != int32(0)) || (postInc2(&_iLimit, 1) > int32(10)) {
+ return int32(1)
}
- if (*(*func(*crt.TLS, *int8, int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(2)))).X1)})))(tls, _zBuf, i32(0)) == i32(0) {
+ if func() func(*crt.TLS, *int8, int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(2)).XpCurrent
+ return *(*func(*crt.TLS, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _zBuf, int32(0)) == int32(0) {
goto _0
}
- return i32(0)
+ return int32(0)
_ = _iLimit
panic(0)
}
-// Return the name of a directory in which to put temporary files.
-// If no suitable temporary file directory can be found, return NULL.
+// C comment
+// /*
+// ** Return the name of a directory in which to put temporary files.
+// ** If no suitable temporary file directory can be found, return NULL.
+// */
func _unixTempFileDir(tls *crt.TLS) (r0 *int8) {
var _i uint32
var _zDir *int8
var _buf crt.Xstruct_stat64
- _i = u32(0)
+ _i = uint32(0)
_zDir = Xsqlite3_temp_directory
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_unixTempFileDirØ00azDirsØ001)) + 4*uintptr(i32(0))))) == nil {
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_unixTempFileDirØ00azDirsØ001)) + 4*uintptr(i32(0)))) = crt.Xgetenv(tls, str(133317))
+ if (*elem0((**int8)(unsafe.Pointer(&_unixTempFileDirØ00azDirsØ001)), 0)) == nil {
+ *elem0((**int8)(unsafe.Pointer(&_unixTempFileDirØ00azDirsØ001)), 0) = crt.Xgetenv(tls, str(133330))
}
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_unixTempFileDirØ00azDirsØ001)) + 4*uintptr(i32(1))))) == nil {
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_unixTempFileDirØ00azDirsØ001)) + 4*uintptr(i32(1)))) = crt.Xgetenv(tls, str(133331))
+ if (*elem0((**int8)(unsafe.Pointer(&_unixTempFileDirØ00azDirsØ001)), uintptr(1))) == nil {
+ *elem0((**int8)(unsafe.Pointer(&_unixTempFileDirØ00azDirsØ001)), uintptr(1)) = crt.Xgetenv(tls, str(133344))
}
_1:
- if (((_zDir != nil) && ((*(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(4)))).X1)})))(tls, _zDir, &_buf) == i32(0))) && (((_buf.X3) & uint32(i32(61440))) == uint32(i32(16384)))) && ((*(*func(*crt.TLS, *int8, int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(2)))).X1)})))(tls, _zDir, i32(3)) == i32(0)) {
+ if (((_zDir != nil) && (func() func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(4)).XpCurrent
+ return *(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _zDir, &_buf) == int32(0))) && ((_buf.Xst_mode & uint32(61440)) == uint32(16384))) && (func() func(*crt.TLS, *int8, int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(2)).XpCurrent
+ return *(*func(*crt.TLS, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _zDir, int32(3)) == int32(0)) {
return _zDir
}
- if _i >= u32(6) {
+ if _i >= uint32(6) {
goto _3
}
- _zDir = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_unixTempFileDirØ00azDirsØ001)) + 4*uintptr(postInc5(&_i, uint32(1)))))
+ _zDir = *elem0((**int8)(unsafe.Pointer(&_unixTempFileDirØ00azDirsØ001)), uintptr(postInc23(&_i, uint32(1))))
goto _1
_3:
return nil
-
- _ = _buf
- panic(0)
}
var _unixTempFileDirØ00azDirsØ001 [6]*int8
func init() {
- _unixTempFileDirØ00azDirsØ001 = [6]*int8{nil, nil, str(133338), str(133347), str(133356), str(312)}
+ _unixTempFileDirØ00azDirsØ001 = [6]*int8{nil, nil, str(133351), str(133360), str(133369), str(330)}
}
var _unixGetTempnameØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_unixGetTempnameØ00__func__Ø000[0], str(133361), 16)
+ crt.Xstrncpy(nil, &_unixGetTempnameØ00__func__Ø000[0], str(133374), 16)
}
func _unixSectorSize(tls *crt.TLS, _NotUsed *Xsqlite3_file) (r0 int32) {
- return i32(4096)
-}
-
-// Return the device characteristics for the file.
-//
-// This VFS is set up to return SQLITE_IOCAP_POWERSAFE_OVERWRITE by default.
-// However, that choice is controversial since technically the underlying
-// file system does not always provide powersafe overwrites. (In other
-// words, after a power-loss event, parts of the file that were never
-// written might end up being altered.) However, non-PSOW behavior is very,
-// very rare. And asserting PSOW makes a large reduction in the amount
-// of required I/O for journaling, since a lot of padding is eliminated.
-// Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control
-// available to turn it off and URI query parameter available to turn it off.
+ return int32(4096)
+}
+
+// C comment
+// /*
+// ** Return the device characteristics for the file.
+// **
+// ** This VFS is set up to return SQLITE_IOCAP_POWERSAFE_OVERWRITE by default.
+// ** However, that choice is controversial since technically the underlying
+// ** file system does not always provide powersafe overwrites. (In other
+// ** words, after a power-loss event, parts of the file that were never
+// ** written might end up being altered.) However, non-PSOW behavior is very,
+// ** very rare. And asserting PSOW makes a large reduction in the amount
+// ** of required I/O for journaling, since a lot of padding is eliminated.
+// ** Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control
+// ** available to turn it off and URI query parameter available to turn it off.
+// */
func _unixDeviceCharacteristics(tls *crt.TLS, _id *Xsqlite3_file) (r0 int32) {
var _rc int32
var _p *XunixFile
_p = (*XunixFile)(unsafe.Pointer(_id))
- _rc = i32(0)
- if (int32(_p.X5) & i32(16)) != 0 {
- {
- p := &_rc
- *p = (*p) | i32(4096)
- sink1(*p)
- }
+ _rc = int32(0)
+ if (int32(_p.XctrlFlags) & int32(16)) != 0 {
+ _rc |= int32(4096)
}
return _rc
}
-// This function is called to obtain a pointer to region iRegion of the
-// shared-memory associated with the database file fd. Shared-memory regions
-// are numbered starting from zero. Each shared-memory region is szRegion
-// bytes in size.
-//
-// If an error occurs, an error code is returned and *pp is set to NULL.
-//
-// Otherwise, if the bExtend parameter is 0 and the requested shared-memory
-// region has not been allocated (by any client, including one running in a
-// separate process), then *pp is set to NULL and SQLITE_OK returned. If
-// bExtend is non-zero and the requested shared-memory region has not yet
-// been allocated, it is allocated by this function.
-//
-// If the shared-memory region has already been allocated or is allocated by
-// this call as described above, then it is mapped into this processes
-// address space (if it is not already), *pp is set to point to the mapped
-// memory and SQLITE_OK returned.
+// C comment
+// /*
+// ** This function is called to obtain a pointer to region iRegion of the
+// ** shared-memory associated with the database file fd. Shared-memory regions
+// ** are numbered starting from zero. Each shared-memory region is szRegion
+// ** bytes in size.
+// **
+// ** If an error occurs, an error code is returned and *pp is set to NULL.
+// **
+// ** Otherwise, if the bExtend parameter is 0 and the requested shared-memory
+// ** region has not been allocated (by any client, including one running in a
+// ** separate process), then *pp is set to NULL and SQLITE_OK returned. If
+// ** bExtend is non-zero and the requested shared-memory region has not yet
+// ** been allocated, it is allocated by this function.
+// **
+// ** If the shared-memory region has already been allocated or is allocated by
+// ** this call as described above, then it is mapped into this processes
+// ** address space (if it is not already), *pp is set to point to the mapped
+// ** memory and SQLITE_OK returned.
+// */
func _unixShmMap(tls *crt.TLS, _fd *Xsqlite3_file, _iRegion int32, _szRegion int32, _bExtend int32, _pp *unsafe.Pointer) (r0 int32) {
var _rc, _nShmPerMap, _nReqRegion, _2_nByte, _7_iPg, _8_x, _11_nMap, _11_i int32
var _9_zFile *int8
@@ -116897,77 +118833,80 @@ func _unixShmMap(tls *crt.TLS, _fd *Xsqlite3_file, _iRegion int32, _szRegion int
var _pShmNode *XunixShmNode
var _p *TunixShm
_pDbFd = (*XunixFile)(unsafe.Pointer(_fd))
- _rc = i32(0)
+ _rc = int32(0)
_nShmPerMap = _unixShmRegionPerMap(tls)
- if (*TunixShm)(_pDbFd.X10) != nil {
+ if (*TunixShm)(_pDbFd.XpShm) != nil {
goto _0
}
_rc = _unixOpenSharedMemory(tls, _pDbFd)
- if _rc != i32(0) {
+ if _rc != int32(0) {
return _rc
}
_0:
- _p = (*TunixShm)(_pDbFd.X10)
- _pShmNode = (*XunixShmNode)(_p.X0)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pShmNode.X1))
+ _p = (*TunixShm)(_pDbFd.XpShm)
+ _pShmNode = (*XunixShmNode)(_p.XpShmNode)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pShmNode.Xmutex))
func() {
- if _szRegion != (_pShmNode.X4) && int32(_pShmNode.X5) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34296), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmMapØ00__func__Ø000))), unsafe.Pointer(str(133377)))
+ if _szRegion != _pShmNode.XszRegion && int32(_pShmNode.XnRegion) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34296), unsafe.Pointer(&_unixShmMapØ00__func__Ø000), unsafe.Pointer(str(133390)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XunixInodeInfo)(_pShmNode.X0) != (*XunixInodeInfo)(_pDbFd.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34297), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmMapØ00__func__Ø000))), unsafe.Pointer(str(133430)))
+ if (*XunixInodeInfo)(_pShmNode.XpInode) != (*XunixInodeInfo)(_pDbFd.XpInode) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34297), unsafe.Pointer(&_unixShmMapØ00__func__Ø000), unsafe.Pointer(str(133443)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pShmNode.X3) < i32(0) && int32((*XunixInodeInfo)(_pDbFd.X2).X3) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34298), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmMapØ00__func__Ø000))), unsafe.Pointer(str(133462)))
+ if _pShmNode.Xh < int32(0) && int32((*XunixInodeInfo)(_pDbFd.XpInode).XbProcessLock) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34298), unsafe.Pointer(&_unixShmMapØ00__func__Ø000), unsafe.Pointer(str(133475)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pShmNode.X3) >= i32(0) && int32((*XunixInodeInfo)(_pDbFd.X2).X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34299), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmMapØ00__func__Ø000))), unsafe.Pointer(str(133511)))
+ if _pShmNode.Xh >= int32(0) && int32((*XunixInodeInfo)(_pDbFd.XpInode).XbProcessLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34299), unsafe.Pointer(&_unixShmMapØ00__func__Ø000), unsafe.Pointer(str(133524)))
crt.X__builtin_abort(tls)
}
}()
_nReqRegion = ((_iRegion + _nShmPerMap) / _nShmPerMap) * _nShmPerMap
- if int32(_pShmNode.X5) >= _nReqRegion {
+ if int32(_pShmNode.XnRegion) >= _nReqRegion {
goto _shmpage_out
}
_2_nByte = _nReqRegion * _szRegion
- *(*int32)(unsafe.Pointer(&(_pShmNode.X4))) = _szRegion
- if (_pShmNode.X3) < i32(0) {
+ _pShmNode.XszRegion = _szRegion
+ if _pShmNode.Xh < int32(0) {
goto _14
}
- if (*(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(5)))).X1)})))(tls, _pShmNode.X3, &_2_sStat) != 0 {
- _rc = i32(4874)
+ if func() func(*crt.TLS, int32, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(5)).XpCurrent
+ return *(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pShmNode.Xh, &_2_sStat) != 0 {
+ _rc = int32(4874)
goto _shmpage_out
}
- if (_2_sStat.X9) >= int64(_2_nByte) {
+ if _2_sStat.Xst_size >= int64(_2_nByte) {
goto _16
}
if _bExtend == 0 {
goto _shmpage_out
}
func() {
- if (_2_nByte % _unixShmMapØ00pgszØ001) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34341), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmMapØ00__func__Ø000))), unsafe.Pointer(str(133559)))
+ if (_2_nByte % _unixShmMapØ00pgszØ001) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34341), unsafe.Pointer(&_unixShmMapØ00__func__Ø000), unsafe.Pointer(str(133572)))
crt.X__builtin_abort(tls)
}
}()
- _7_iPg = int32((_2_sStat.X9) / int64(_unixShmMapØ00pgszØ001))
+ _7_iPg = int32(_2_sStat.Xst_size / int64(_unixShmMapØ00pgszØ001))
_21:
if _7_iPg >= (_2_nByte / _unixShmMapØ00pgszØ001) {
goto _24
}
- _8_x = i32(0)
- if _seekAndWriteFd(tls, _pShmNode.X3, int64(((_7_iPg*_unixShmMapØ00pgszØ001)+_unixShmMapØ00pgszØ001)-i32(1)), (unsafe.Pointer)(str(0)), i32(1), &_8_x) != i32(1) {
- _9_zFile = _pShmNode.X2
- _rc = _unixLogErrorAtLine(tls, i32(4874), str(131568), _9_zFile, i32(34346))
+ _8_x = int32(0)
+ if _seekAndWriteFd(tls, _pShmNode.Xh, int64(((_7_iPg*_unixShmMapØ00pgszØ001)+_unixShmMapØ00pgszØ001)-int32(1)), unsafe.Pointer(str(284)), int32(1), &_8_x) != int32(1) {
+ _9_zFile = _pShmNode.XzFilename
+ _rc = _unixLogErrorAtLine(tls, int32(4874), str(131581), _9_zFile, int32(34346))
goto _shmpage_out
}
_7_iPg += 1
@@ -116975,92 +118914,96 @@ _21:
_24:
_16:
_14:
- _2_apNew = (**int8)(Xsqlite3_realloc(tls, (unsafe.Pointer)(_pShmNode.X7), int32(uint32(_nReqRegion)*u32(4))))
+ _2_apNew = (**int8)(Xsqlite3_realloc(tls, unsafe.Pointer(_pShmNode.XapRegion), int32(uint32(_nReqRegion)*uint32(4))))
if _2_apNew == nil {
- _rc = _sqlite3IoerrnomemError(tls, i32(34359))
+ _rc = _sqlite3IoerrnomemError(tls, int32(34359))
goto _shmpage_out
}
- *(***int8)(unsafe.Pointer(&(_pShmNode.X7))) = _2_apNew
+ _pShmNode.XapRegion = _2_apNew
_27:
- if int32(_pShmNode.X5) >= _nReqRegion {
+ if int32(_pShmNode.XnRegion) >= _nReqRegion {
goto _28
}
_11_nMap = _szRegion * _nShmPerMap
- if (_pShmNode.X3) < i32(0) {
+ if _pShmNode.Xh < int32(0) {
goto _29
}
- _11_pMem = (*(*func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(22)))).X1)})))(tls, nil, uint32(_11_nMap), func() int32 {
- if (_pShmNode.X6) != 0 {
- return i32(1)
- }
- return i32(3)
- }(), i32(1), _pShmNode.X3, int64(_szRegion)*int64(_pShmNode.X5))
- if _11_pMem == (unsafe.Pointer)(uintptr(u32(4294967295))) {
- _rc = _unixLogErrorAtLine(tls, i32(5386), str(131655), _pShmNode.X2, i32(34373))
+ _11_pMem = func() func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(22)).XpCurrent
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32, int32, int32, int32, int64) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, nil, uint32(_11_nMap), func() int32 {
+ if _pShmNode.XisReadonly != 0 {
+ return int32(1)
+ }
+ return int32(3)
+ }(), int32(1), _pShmNode.Xh, int64(_szRegion)*int64(_pShmNode.XnRegion))
+ if _11_pMem == crt.U2P(uintptr(uint32(4294967295))) {
+ _rc = _unixLogErrorAtLine(tls, int32(5386), str(131668), _pShmNode.XzFilename, int32(34373))
goto _shmpage_out
}
goto _33
_29:
_11_pMem = Xsqlite3_malloc64(tls, uint64(_szRegion))
if _11_pMem == nil {
- _rc = _sqlite3NomemError(tls, i32(34379))
+ _rc = _sqlite3NomemError(tls, int32(34379))
goto _shmpage_out
}
- crt.Xmemset(tls, _11_pMem, i32(0), uint32(_szRegion))
+ crt.Xmemset(tls, _11_pMem, int32(0), uint32(_szRegion))
_33:
- _11_i = i32(0)
+ _11_i = int32(0)
_35:
if _11_i >= _nShmPerMap {
goto _38
}
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pShmNode.X7)) + 4*uintptr(int32(_pShmNode.X5)+_11_i))) = (*int8)(unsafe.Pointer(uintptr(_11_pMem) + 1*uintptr(_szRegion*_11_i)))
+ *elem0(_pShmNode.XapRegion, uintptr(int32(_pShmNode.XnRegion)+_11_i)) = elem1((*int8)(_11_pMem), uintptr(_szRegion*_11_i))
_11_i += 1
goto _35
_38:
{
- p := (*uint16)(unsafe.Pointer(&(_pShmNode.X5)))
+ p := &_pShmNode.XnRegion
*p = uint16(int32(*p) + _nShmPerMap)
- sink14(*p)
}
goto _27
_28:
_shmpage_out:
- if int32(_pShmNode.X5) > _iRegion {
- *_pp = (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pShmNode.X7)) + 4*uintptr(_iRegion))))
+ if int32(_pShmNode.XnRegion) > _iRegion {
+ *_pp = unsafe.Pointer(*elem0(_pShmNode.XapRegion, uintptr(_iRegion)))
goto _40
}
*_pp = nil
_40:
- if ((_pShmNode.X6) != 0) && (_rc == i32(0)) {
- _rc = i32(8)
+ if (_pShmNode.XisReadonly != 0) && (_rc == int32(0)) {
+ _rc = int32(8)
}
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pShmNode.X1))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pShmNode.Xmutex))
return _rc
-
- _ = _2_sStat
- _ = _8_x
- panic(0)
}
-// Return the minimum number of 32KB shm regions that should be mapped at
-// a time, assuming that each mapping must be an integer multiple of the
-// current system page-size.
-//
-// Usually, this is 1. The exception seems to be systems that are configured
-// to use 64KB pages - in this case each mapping must cover at least two
-// shm regions.
+// C comment
+// /*
+// ** Return the minimum number of 32KB shm regions that should be mapped at
+// ** a time, assuming that each mapping must be an integer multiple of the
+// ** current system page-size.
+// **
+// ** Usually, this is 1. The exception seems to be systems that are configured
+// ** to use 64KB pages - in this case each mapping must cover at least two
+// ** shm regions.
+// */
func _unixShmRegionPerMap(tls *crt.TLS) (r0 int32) {
var _shmsz, _pgsz int32
- _shmsz = i32(32768)
- _pgsz = (*(*func(*crt.TLS) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(25)))).X1)})))(tls)
+ _shmsz = int32(32768)
+ _pgsz = func() func(*crt.TLS) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(25)).XpCurrent
+ return *(*func(*crt.TLS) int32)(unsafe.Pointer(&v))
+ }()(tls)
func() {
- if ((_pgsz - i32(1)) & _pgsz) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34053), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmRegionPerMapØ00__func__Ø000))), unsafe.Pointer(str(133577)))
+ if ((_pgsz - int32(1)) & _pgsz) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34053), unsafe.Pointer(&_unixShmRegionPerMapØ00__func__Ø000), unsafe.Pointer(str(133590)))
crt.X__builtin_abort(tls)
}
}()
if _pgsz < _shmsz {
- return i32(1)
+ return int32(1)
}
return _pgsz / _shmsz
}
@@ -117068,42 +119011,45 @@ func _unixShmRegionPerMap(tls *crt.TLS) (r0 int32) {
var _unixShmRegionPerMapØ00__func__Ø000 [20]int8
func init() {
- crt.Xstrncpy(nil, &_unixShmRegionPerMapØ00__func__Ø000[0], str(133596), 20)
-}
-
-// Open a shared-memory area associated with open database file pDbFd.
-// This particular implementation uses mmapped files.
-//
-// The file used to implement shared-memory is in the same directory
-// as the open database file and has the same name as the open database
-// file with the "-shm" suffix added. For example, if the database file
-// is "/home/user1/config.db" then the file that is created and mmapped
-// for shared memory will be called "/home/user1/config.db-shm".
-//
-// Another approach to is to use files in /dev/shm or /dev/tmp or an
-// some other tmpfs mount. But if a file in a different directory
-// from the database file is used, then differing access permissions
-// or a chroot() might cause two different processes on the same
-// database to end up using different files for shared memory -
-// meaning that their memory would not really be shared - resulting
-// in database corruption. Nevertheless, this tmpfs file usage
-// can be enabled at compile-time using -DSQLITE_SHM_DIRECTORY="/dev/shm"
-// or the equivalent. The use of the SQLITE_SHM_DIRECTORY compile-time
-// option results in an incompatible build of SQLite; builds of SQLite
-// that with differing SQLITE_SHM_DIRECTORY settings attempt to use the
-// same database file at the same time, database corruption will likely
-// result. The SQLITE_SHM_DIRECTORY compile-time option is considered
-// "unsupported" and may go away in a future SQLite release.
-//
-// When opening a new shared-memory file, if no other instances of that
-// file are currently open, in this process or in other processes, then
-// the file must be truncated to zero length or have its header cleared.
-//
-// If the original database file (pDbFd) is using the "unix-excl" VFS
-// that means that an exclusive lock is held on the database file and
-// that no other processes are able to read or write the database. In
-// that case, we do not really need shared memory. No shared memory
-// file is created. The shared memory will be simulated with heap memory.
+ crt.Xstrncpy(nil, &_unixShmRegionPerMapØ00__func__Ø000[0], str(133609), 20)
+}
+
+// C comment
+// /*
+// ** Open a shared-memory area associated with open database file pDbFd.
+// ** This particular implementation uses mmapped files.
+// **
+// ** The file used to implement shared-memory is in the same directory
+// ** as the open database file and has the same name as the open database
+// ** file with the "-shm" suffix added. For example, if the database file
+// ** is "/home/user1/config.db" then the file that is created and mmapped
+// ** for shared memory will be called "/home/user1/config.db-shm".
+// **
+// ** Another approach to is to use files in /dev/shm or /dev/tmp or an
+// ** some other tmpfs mount. But if a file in a different directory
+// ** from the database file is used, then differing access permissions
+// ** or a chroot() might cause two different processes on the same
+// ** database to end up using different files for shared memory -
+// ** meaning that their memory would not really be shared - resulting
+// ** in database corruption. Nevertheless, this tmpfs file usage
+// ** can be enabled at compile-time using -DSQLITE_SHM_DIRECTORY="/dev/shm"
+// ** or the equivalent. The use of the SQLITE_SHM_DIRECTORY compile-time
+// ** option results in an incompatible build of SQLite; builds of SQLite
+// ** that with differing SQLITE_SHM_DIRECTORY settings attempt to use the
+// ** same database file at the same time, database corruption will likely
+// ** result. The SQLITE_SHM_DIRECTORY compile-time option is considered
+// ** "unsupported" and may go away in a future SQLite release.
+// **
+// ** When opening a new shared-memory file, if no other instances of that
+// ** file are currently open, in this process or in other processes, then
+// ** the file must be truncated to zero length or have its header cleared.
+// **
+// ** If the original database file (pDbFd) is using the "unix-excl" VFS
+// ** that means that an exclusive lock is held on the database file and
+// ** that no other processes are able to read or write the database. In
+// ** that case, we do not really need shared memory. No shared memory
+// ** file is created. The shared memory will be simulated with heap memory.
+// */
func _unixOpenSharedMemory(tls *crt.TLS, _pDbFd *XunixFile) (r0 int32) {
var _rc, _nShmFilename, _6_openFlags int32
var _zShmFilename, _1_zBasePath *int8
@@ -117112,327 +119058,338 @@ func _unixOpenSharedMemory(tls *crt.TLS, _pDbFd *XunixFile) (r0 int32) {
var _pShmNode *XunixShmNode
var _p *TunixShm
_p = nil
- _p = (*TunixShm)(Xsqlite3_malloc64(tls, uint64(u32(16))))
+ _p = (*TunixShm)(Xsqlite3_malloc64(tls, uint64(16)))
if _p == nil {
- return _sqlite3NomemError(tls, i32(34134))
+ return _sqlite3NomemError(tls, int32(34134))
}
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(16))
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(16))
func() {
- if (*TunixShm)(_pDbFd.X10) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34136), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenSharedMemoryØ00__func__Ø000))), unsafe.Pointer(str(133616)))
+ if (*TunixShm)(_pDbFd.XpShm) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34136), unsafe.Pointer(&_unixOpenSharedMemoryØ00__func__Ø000), unsafe.Pointer(str(133629)))
crt.X__builtin_abort(tls)
}
}()
_unixEnterMutex(tls)
- _pInode = (*XunixInodeInfo)(_pDbFd.X2)
- _pShmNode = (*XunixShmNode)(_pInode.X5)
+ _pInode = (*XunixInodeInfo)(_pDbFd.XpInode)
+ _pShmNode = (*XunixShmNode)(_pInode.XpShmNode)
if _pShmNode != nil {
goto _3
}
- _1_zBasePath = _pDbFd.X9
- if (*(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(5)))).X1)})))(tls, _pDbFd.X3, &_1_sStat) != 0 {
- _rc = i32(1802)
+ _1_zBasePath = _pDbFd.XzPath
+ if func() func(*crt.TLS, int32, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(5)).XpCurrent
+ return *(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pDbFd.Xh, &_1_sStat) != 0 {
+ _rc = int32(1802)
goto _shm_open_err
}
- _nShmFilename = i32(6) + int32(crt.Xstrlen(tls, _1_zBasePath))
- _pShmNode = (*XunixShmNode)(Xsqlite3_malloc64(tls, uint64(u32(40)+uint32(_nShmFilename))))
+ _nShmFilename = int32(6) + int32(crt.Xstrlen(tls, _1_zBasePath))
+ _pShmNode = (*XunixShmNode)(Xsqlite3_malloc64(tls, uint64(uint32(40)+uint32(_nShmFilename))))
if _pShmNode == nil {
- _rc = _sqlite3NomemError(tls, i32(34166))
+ _rc = _sqlite3NomemError(tls, int32(34166))
goto _shm_open_err
}
- crt.Xmemset(tls, (unsafe.Pointer)(_pShmNode), i32(0), u32(40)+uint32(_nShmFilename))
- _zShmFilename = store0((**int8)(unsafe.Pointer(&(_pShmNode.X2))), (*int8)(unsafe.Pointer((*XunixShmNode)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pShmNode))+40*uintptr(i32(1)))))))
- Xsqlite3_snprintf(tls, _nShmFilename, _zShmFilename, str(133631), unsafe.Pointer(_1_zBasePath))
- *(*int32)(unsafe.Pointer(&(_pShmNode.X3))) = i32(-1)
- *(**XunixShmNode)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XunixInodeInfo)(_pDbFd.X2).X5))))) = _pShmNode
- *(**XunixInodeInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pShmNode.X0))))) = (*XunixInodeInfo)(_pDbFd.X2)
- if (_sqlite3Config.X1) == 0 {
+ crt.Xmemset(tls, unsafe.Pointer(_pShmNode), int32(0), uint32(40)+uint32(_nShmFilename))
+ _zShmFilename = store1(&_pShmNode.XzFilename, (*int8)(unsafe.Pointer(elem135(_pShmNode, uintptr(1)))))
+ Xsqlite3_snprintf(tls, _nShmFilename, _zShmFilename, str(133644), unsafe.Pointer(_1_zBasePath))
+ _pShmNode.Xh = int32(-1)
+ *(**XunixShmNode)(unsafe.Pointer(&((*XunixInodeInfo)(_pDbFd.XpInode).XpShmNode))) = _pShmNode
+ *(**XunixInodeInfo)(unsafe.Pointer(&_pShmNode.XpInode)) = (*XunixInodeInfo)(_pDbFd.XpInode)
+ if _sqlite3Config.XbCoreMutex == 0 {
goto _6
}
- *(**Xsqlite3_mutex)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pShmNode.X1))))) = Xsqlite3_mutex_alloc(tls, i32(0))
- if (*Xsqlite3_mutex)(_pShmNode.X1) == nil {
- _rc = _sqlite3NomemError(tls, i32(34185))
+ *(**Xsqlite3_mutex)(unsafe.Pointer(&_pShmNode.Xmutex)) = Xsqlite3_mutex_alloc(tls, int32(0))
+ if (*Xsqlite3_mutex)(_pShmNode.Xmutex) == nil {
+ _rc = _sqlite3NomemError(tls, int32(34185))
goto _shm_open_err
}
_6:
- if int32(_pInode.X3) != i32(0) {
+ if int32(_pInode.XbProcessLock) != int32(0) {
goto _8
}
- _6_openFlags = i32(66)
- if Xsqlite3_uri_boolean(tls, _pDbFd.X9, str(133638), i32(0)) != 0 {
- _6_openFlags = i32(0)
- *(*uint8)(unsafe.Pointer(&(_pShmNode.X6))) = uint8(i32(1))
+ _6_openFlags = int32(66)
+ if Xsqlite3_uri_boolean(tls, _pDbFd.XzPath, str(133651), int32(0)) != 0 {
+ _6_openFlags = int32(0)
+ _pShmNode.XisReadonly = uint8(1)
}
- *(*int32)(unsafe.Pointer(&(_pShmNode.X3))) = _robust_open(tls, _zShmFilename, _6_openFlags, (_1_sStat.X3)&uint32(i32(511)))
- if (_pShmNode.X3) < i32(0) {
- _rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, i32(34198)), str(131504), _zShmFilename, i32(34198))
+ _pShmNode.Xh = _robust_open(tls, _zShmFilename, _6_openFlags, _1_sStat.Xst_mode&uint32(511))
+ if _pShmNode.Xh < int32(0) {
+ _rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(34198)), str(131517), _zShmFilename, int32(34198))
goto _shm_open_err
}
- _robustFchown(tls, _pShmNode.X3, _1_sStat.X5, _1_sStat.X6)
- _rc = i32(0)
- if _unixShmSystemLock(tls, _pDbFd, i32(1), i32(128), i32(1)) != i32(0) {
+ _robustFchown(tls, _pShmNode.Xh, _1_sStat.Xst_uid, _1_sStat.Xst_gid)
+ _rc = int32(0)
+ if _unixShmSystemLock(tls, _pDbFd, int32(1), int32(128), int32(1)) != int32(0) {
goto _11
}
- if _robust_ftruncate(tls, _pShmNode.X3, int64(i32(0))) != 0 {
- _rc = _unixLogErrorAtLine(tls, i32(4618), str(131533), _zShmFilename, i32(34214))
+ if _robust_ftruncate(tls, _pShmNode.Xh, 0) != 0 {
+ _rc = _unixLogErrorAtLine(tls, int32(4618), str(131546), _zShmFilename, int32(34214))
}
_11:
- if _rc == i32(0) {
- _rc = _unixShmSystemLock(tls, _pDbFd, i32(0), i32(128), i32(1))
+ if _rc == int32(0) {
+ _rc = _unixShmSystemLock(tls, _pDbFd, int32(0), int32(128), int32(1))
}
if _rc != 0 {
goto _shm_open_err
}
_8:
_3:
- *(**XunixShmNode)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X0))))) = _pShmNode
- *(*uint8)(unsafe.Pointer(&(_p.X3))) = postInc2((*uint8)(unsafe.Pointer(&(_pShmNode.X12))), uint8(1))
- *(*int32)(unsafe.Pointer(&(_pShmNode.X8))) += 1
- *(**TunixShm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pDbFd.X10))))) = _p
+ *(**XunixShmNode)(unsafe.Pointer(&_p.XpShmNode)) = _pShmNode
+ _p.Xid = postInc3(&_pShmNode.XnextShmId, byte(1))
+ _pShmNode.XnRef += 1
+ *(**TunixShm)(unsafe.Pointer(&_pDbFd.XpShm)) = _p
_unixLeaveMutex(tls)
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pShmNode.X1))
- *(**TunixShm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X1))))) = (*TunixShm)(_pShmNode.X9)
- *(**TunixShm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pShmNode.X9))))) = _p
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pShmNode.X1))
- return i32(0)
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pShmNode.Xmutex))
+ *(**TunixShm)(unsafe.Pointer(&_p.XpNext)) = (*TunixShm)(_pShmNode.XpFirst)
+ *(**TunixShm)(unsafe.Pointer(&_pShmNode.XpFirst)) = _p
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pShmNode.Xmutex))
+ return int32(0)
_shm_open_err:
_unixShmPurge(tls, _pDbFd)
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
_unixLeaveMutex(tls)
return _rc
-
- _ = _1_sStat
- panic(0)
}
var _unixOpenSharedMemoryØ00__func__Ø000 [21]int8
func init() {
- crt.Xstrncpy(nil, &_unixOpenSharedMemoryØ00__func__Ø000[0], str(133651), 21)
+ crt.Xstrncpy(nil, &_unixOpenSharedMemoryØ00__func__Ø000[0], str(133664), 21)
}
-// On some systems, calls to fchown() will trigger a message in a security
-// log if they come from non-root processes. So avoid calling fchown() if
-// we are not running as root.
+// C comment
+// /*
+// ** On some systems, calls to fchown() will trigger a message in a security
+// ** log if they come from non-root processes. So avoid calling fchown() if
+// ** we are not running as root.
+// */
func _robustFchown(tls *crt.TLS, _fd int32, _uid uint32, _gid uint32) (r0 int32) {
return func() int32 {
- if (*(*func(*crt.TLS) uint32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(21)))).X1)})))(tls) != 0 {
- return i32(0)
- }
- return (*(*func(*crt.TLS, int32, uint32, uint32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(20)))).X1)})))(tls, _fd, _uid, _gid)
- }()
-}
-
-// Apply posix advisory locks for all bytes from ofst through ofst+n-1.
-//
-// Locks block if the mask is exactly UNIX_SHM_C and are non-blocking
-// otherwise.
+ if func() func(*crt.TLS) uint32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(21)).XpCurrent
+ return *(*func(*crt.TLS) uint32)(unsafe.Pointer(&v))
+ }()(tls) != 0 {
+ return int32(0)
+ }
+ return func() func(*crt.TLS, int32, uint32, uint32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(20)).XpCurrent
+ return *(*func(*crt.TLS, int32, uint32, uint32) int32)(unsafe.Pointer(&v))
+ }()(tls, _fd, _uid, _gid)
+ }()
+}
+
+// C comment
+// /*
+// ** Apply posix advisory locks for all bytes from ofst through ofst+n-1.
+// **
+// ** Locks block if the mask is exactly UNIX_SHM_C and are non-blocking
+// ** otherwise.
+// */
func _unixShmSystemLock(tls *crt.TLS, _pFile *XunixFile, _lockType int32, _ofst int32, _n int32) (r0 int32) {
var _rc int32
var _2_mask uint16
var _pShmNode *XunixShmNode
var _f Tflock
- _rc = i32(0)
- _pShmNode = (*XunixShmNode)((*XunixInodeInfo)(_pFile.X2).X5)
+ _rc = int32(0)
+ _pShmNode = (*XunixShmNode)((*XunixInodeInfo)(_pFile.XpInode).XpShmNode)
func() {
- if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pShmNode.X1)) == 0 && (_pShmNode.X8) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33983), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000))), unsafe.Pointer(str(133672)))
+ if Xsqlite3_mutex_held(tls, (*Xsqlite3_mutex)(_pShmNode.Xmutex)) == 0 && _pShmNode.XnRef != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33983), unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000), unsafe.Pointer(str(133685)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _n != i32(1) && _lockType == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33986), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000))), unsafe.Pointer(str(133729)))
+ if _n != int32(1) && _lockType == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33986), unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000), unsafe.Pointer(str(133742)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _n < i32(1) || _n > i32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(33989), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000))), unsafe.Pointer(str(133755)))
+ if _n < int32(1) || _n > int32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(33989), unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000), unsafe.Pointer(str(133768)))
crt.X__builtin_abort(tls)
}
}()
- if (_pShmNode.X3) >= i32(0) {
- crt.Xmemset(tls, (unsafe.Pointer)(&_f), i32(0), u32(24))
- *(*int16)(unsafe.Pointer(&(_f.X0))) = int16(_lockType)
- *(*int16)(unsafe.Pointer(&(_f.X1))) = int16(i32(0))
- *(*int64)(unsafe.Pointer(&(_f.X2))) = int64(_ofst)
- *(*int64)(unsafe.Pointer(&(_f.X3))) = int64(_n)
- _rc = (*(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(7)))).X1)})))(tls, _pShmNode.X3, i32(13), unsafe.Pointer(&_f))
+ if _pShmNode.Xh >= int32(0) {
+ crt.Xmemset(tls, unsafe.Pointer(&_f), int32(0), uint32(24))
+ _f.Xl_type = int16(_lockType)
+ _f.Xl_whence = 0
+ _f.Xl_start = int64(_ofst)
+ _f.Xl_len = int64(_n)
+ _rc = func() func(*crt.TLS, int32, int32, ...interface{}) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(7)).XpCurrent
+ return *(*func(*crt.TLS, int32, int32, ...interface{}) int32)(unsafe.Pointer(&v))
+ }()(tls, _pShmNode.Xh, int32(13), unsafe.Pointer(&_f))
_rc = func() int32 {
- if _rc != i32(-1) {
- return i32(0)
+ if _rc != int32(-1) {
+ return int32(0)
}
- return i32(5)
+ return int32(5)
}()
}
_2_mask = uint16(func() int32 {
- if _ofst > i32(31) {
- return i32(65535)
+ if _ofst > int32(31) {
+ return int32(65535)
}
- return ((i32(1) << uint(_ofst+_n)) - (i32(1) << uint(_ofst)))
+ return ((int32(1) << uint(_ofst+_n)) - (int32(1) << uint(_ofst)))
}())
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _14
}
- if _lockType == i32(2) {
+ if _lockType == int32(2) {
{
- p := (*uint8)(unsafe.Pointer(&(_pShmNode.X10)))
+ p := &_pShmNode.XexclMask
*p = uint8(int32(*p) & (^int32(_2_mask)))
- sink2(*p)
}
{
- p := (*uint8)(unsafe.Pointer(&(_pShmNode.X11)))
+ p := &_pShmNode.XsharedMask
*p = uint8(int32(*p) & (^int32(_2_mask)))
- sink2(*p)
}
goto _18
}
- if _lockType == i32(0) {
+ if _lockType == int32(0) {
{
- p := (*uint8)(unsafe.Pointer(&(_pShmNode.X10)))
+ p := &_pShmNode.XexclMask
*p = uint8(int32(*p) & (^int32(_2_mask)))
- sink2(*p)
}
{
- p := (*uint8)(unsafe.Pointer(&(_pShmNode.X11)))
+ p := &_pShmNode.XsharedMask
*p = uint8(int32(*p) | int32(_2_mask))
- sink2(*p)
}
goto _18
}
func() {
- if _lockType != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34018), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000))), unsafe.Pointer(str(133783)))
+ if _lockType != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34018), unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000), unsafe.Pointer(str(133796)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint8)(unsafe.Pointer(&(_pShmNode.X10)))
+ p := &_pShmNode.XexclMask
*p = uint8(int32(*p) | int32(_2_mask))
- sink2(*p)
}
{
- p := (*uint8)(unsafe.Pointer(&(_pShmNode.X11)))
+ p := &_pShmNode.XsharedMask
*p = uint8(int32(*p) & (^int32(_2_mask)))
- sink2(*p)
}
_18:
goto _21
_14:
- if _lockType == i32(2) {
+ if _lockType == int32(2) {
goto _25
}
- if _lockType == i32(0) {
+ if _lockType == int32(0) {
goto _25
}
func() {
- if _lockType != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34029), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000))), unsafe.Pointer(str(133783)))
+ if _lockType != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34029), unsafe.Pointer(&_unixShmSystemLockØ00__func__Ø000), unsafe.Pointer(str(133796)))
crt.X__builtin_abort(tls)
}
}()
_25:
_21:
return _rc
-
- _ = _f
- panic(0)
}
var _unixShmSystemLockØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_unixShmSystemLockØ00__func__Ø000[0], str(133801), 18)
+ crt.Xstrncpy(nil, &_unixShmSystemLockØ00__func__Ø000[0], str(133814), 18)
}
-// Purge the unixShmNodeList list of all entries with unixShmNode.nRef==0.
-//
-// This is not a VFS shared-memory method; it is a utility function called
-// by VFS shared-memory methods.
+// C comment
+// /*
+// ** Purge the unixShmNodeList list of all entries with unixShmNode.nRef==0.
+// **
+// ** This is not a VFS shared-memory method; it is a utility function called
+// ** by VFS shared-memory methods.
+// */
func _unixShmPurge(tls *crt.TLS, _pFd *XunixFile) {
var _1_nShmPerMap, _1_i int32
var _p *XunixShmNode
- _p = (*XunixShmNode)((*XunixInodeInfo)(_pFd.X2).X5)
+ _p = (*XunixShmNode)((*XunixInodeInfo)(_pFd.XpInode).XpShmNode)
func() {
if _unixMutexHeld(tls) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34066), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmPurgeØ00__func__Ø000))), unsafe.Pointer(str(132009)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34066), unsafe.Pointer(&_unixShmPurgeØ00__func__Ø000), unsafe.Pointer(str(132022)))
crt.X__builtin_abort(tls)
}
}()
if _p == nil || func() int32 {
- if (_p.X8) == i32(0) {
- return i32(1)
+ if _p.XnRef == int32(0) {
+ return int32(1)
}
return func() int32 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34067), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmPurgeØ00__func__Ø000))), unsafe.Pointer(str(4908)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34067), unsafe.Pointer(&_unixShmPurgeØ00__func__Ø000), unsafe.Pointer(str(4809)))
crt.X__builtin_abort(tls)
- return i32(0)
+ return int32(0)
}()
}() == 0 {
goto _5
}
_1_nShmPerMap = _unixShmRegionPerMap(tls)
func() {
- if (*XunixInodeInfo)(_p.X0) != (*XunixInodeInfo)(_pFd.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34070), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmPurgeØ00__func__Ø000))), unsafe.Pointer(str(133819)))
+ if (*XunixInodeInfo)(_p.XpInode) != (*XunixInodeInfo)(_pFd.XpInode) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34070), unsafe.Pointer(&_unixShmPurgeØ00__func__Ø000), unsafe.Pointer(str(133832)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_free(tls, (*Xsqlite3_mutex)(_p.X1))
- _1_i = i32(0)
+ Xsqlite3_mutex_free(tls, (*Xsqlite3_mutex)(_p.Xmutex))
+ _1_i = int32(0)
_8:
- if _1_i >= int32(_p.X5) {
+ if _1_i >= int32(_p.XnRegion) {
goto _11
}
- if (_p.X3) >= i32(0) {
- (*(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(23)))).X1)})))(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X7)) + 4*uintptr(_1_i)))), uint32(_p.X4))
+ if _p.Xh >= int32(0) {
+ func() func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(23)).XpCurrent
+ return *(*func(*crt.TLS, unsafe.Pointer, uint32) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, unsafe.Pointer(*elem0(_p.XapRegion, uintptr(_1_i))), uint32(_p.XszRegion))
goto _13
}
- Xsqlite3_free(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X7)) + 4*uintptr(_1_i)))))
+ Xsqlite3_free(tls, unsafe.Pointer(*elem0(_p.XapRegion, uintptr(_1_i))))
_13:
- {
- p := &_1_i
- *p = (*p) + _1_nShmPerMap
- sink1(*p)
- }
+ _1_i += _1_nShmPerMap
goto _8
_11:
- Xsqlite3_free(tls, (unsafe.Pointer)(_p.X7))
- if (_p.X3) >= i32(0) {
- _robust_close(tls, _pFd, _p.X3, i32(34081))
- *(*int32)(unsafe.Pointer(&(_p.X3))) = i32(-1)
+ Xsqlite3_free(tls, unsafe.Pointer(_p.XapRegion))
+ if _p.Xh >= int32(0) {
+ _robust_close(tls, _pFd, _p.Xh, int32(34081))
+ _p.Xh = int32(-1)
}
- *(**XunixShmNode)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XunixInodeInfo)(_p.X0).X5))))) = nil
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ *(**XunixShmNode)(unsafe.Pointer(&((*XunixInodeInfo)(_p.XpInode).XpShmNode))) = nil
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
_5:
}
var _unixShmPurgeØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_unixShmPurgeØ00__func__Ø000[0], str(133842), 13)
+ crt.Xstrncpy(nil, &_unixShmPurgeØ00__func__Ø000[0], str(133855), 13)
}
var _unixShmMapØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_unixShmMapØ00__func__Ø000[0], str(133855), 11)
+ crt.Xstrncpy(nil, &_unixShmMapØ00__func__Ø000[0], str(133868), 11)
}
var _unixShmMapØ00pgszØ001 int32
func init() {
- _unixShmMapØ00pgszØ001 = i32(4096)
+ _unixShmMapØ00pgszØ001 = int32(4096)
}
-// Change the lock state for a shared-memory segment.
-//
-// Note that the relationship between SHAREd and EXCLUSIVE locks is a little
-// different here than in posix. In xShmLock(), one can go from unlocked
-// to shared and back or from unlocked to exclusive and back. But one may
-// not go from shared to exclusive or from exclusive to shared.
+// C comment
+// /*
+// ** Change the lock state for a shared-memory segment.
+// **
+// ** Note that the relationship between SHAREd and EXCLUSIVE locks is a little
+// ** different here than in posix. In xShmLock(), one can go from unlocked
+// ** to shared and back or from unlocked to exclusive and back. But one may
+// ** not go from shared to exclusive or from exclusive to shared.
+// */
func _unixShmLock(tls *crt.TLS, _fd *Xsqlite3_file, _ofst int32, _n int32, _flags int32) (r0 int32) {
var _rc int32
var _mask, _1_allMask, _6_allShared uint16
@@ -117440,70 +119397,70 @@ func _unixShmLock(tls *crt.TLS, _fd *Xsqlite3_file, _ofst int32, _n int32, _flag
var _pShmNode *XunixShmNode
var _p, _pX *TunixShm
_pDbFd = (*XunixFile)(unsafe.Pointer(_fd))
- _p = (*TunixShm)(_pDbFd.X10)
- _pShmNode = (*XunixShmNode)(_p.X0)
- _rc = i32(0)
+ _p = (*TunixShm)(_pDbFd.XpShm)
+ _pShmNode = (*XunixShmNode)(_p.XpShmNode)
+ _rc = int32(0)
func() {
- if _pShmNode != (*XunixShmNode)((*XunixInodeInfo)(_pDbFd.X2).X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34424), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(133866)))
+ if _pShmNode != (*XunixShmNode)((*XunixInodeInfo)(_pDbFd.XpInode).XpShmNode) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34424), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(133879)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XunixInodeInfo)(_pShmNode.X0) != (*XunixInodeInfo)(_pDbFd.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34425), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(133430)))
+ if (*XunixInodeInfo)(_pShmNode.XpInode) != (*XunixInodeInfo)(_pDbFd.XpInode) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34425), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(133443)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _ofst < i32(0) || (_ofst+_n) > i32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34426), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(133900)))
+ if _ofst < int32(0) || (_ofst+_n) > int32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34426), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(133913)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _n < i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34427), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(133936)))
+ if _n < int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34427), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(133949)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _flags != i32(6) && _flags != i32(10) && _flags != i32(5) && _flags != i32(9) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34428), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(133941)))
+ if _flags != int32(6) && _flags != int32(10) && _flags != int32(5) && _flags != int32(9) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34428), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(133954)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _n != i32(1) && (_flags&i32(8)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34432), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(134140)))
+ if _n != int32(1) && (_flags&int32(8)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34432), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(134153)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pShmNode.X3) < i32(0) && int32((*XunixInodeInfo)(_pDbFd.X2).X3) != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34433), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(133462)))
+ if _pShmNode.Xh < int32(0) && int32((*XunixInodeInfo)(_pDbFd.XpInode).XbProcessLock) != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34433), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(133475)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_pShmNode.X3) >= i32(0) && int32((*XunixInodeInfo)(_pDbFd.X2).X3) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34434), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(133511)))
+ if _pShmNode.Xh >= int32(0) && int32((*XunixInodeInfo)(_pDbFd.XpInode).XbProcessLock) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34434), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(133524)))
crt.X__builtin_abort(tls)
}
}()
- _mask = uint16((i32(1) << uint(_ofst+_n)) - (i32(1) << uint(_ofst)))
+ _mask = uint16((int32(1) << uint(_ofst+_n)) - (int32(1) << uint(_ofst)))
func() {
- if _n <= i32(1) && int32(_mask) != (i32(1)<<uint(_ofst)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34437), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(134182)))
+ if _n <= int32(1) && int32(_mask) != (int32(1)<<uint(_ofst)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34437), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(134195)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pShmNode.X1))
- if (_flags & i32(1)) == 0 {
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pShmNode.Xmutex))
+ if (_flags & int32(1)) == 0 {
goto _26
}
- _1_allMask = u16(0)
- _pX = (*TunixShm)(_pShmNode.X9)
+ _1_allMask = uint16(0)
+ _pX = (*TunixShm)(_pShmNode.XpFirst)
_27:
if _pX == nil {
goto _30
@@ -117512,297 +119469,309 @@ _27:
goto _28
}
func() {
- if (int32(_pX.X5) & (int32(_p.X5) | int32(_p.X4))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34445), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(134205)))
+ if (int32(_pX.XexclMask) & (int32(_p.XexclMask) | int32(_p.XsharedMask))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34445), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(134218)))
crt.X__builtin_abort(tls)
}
}()
{
p := &_1_allMask
- *p = uint16(int32(*p) | int32(_pX.X4))
- sink14(*p)
+ *p = uint16(int32(*p) | int32(_pX.XsharedMask))
}
_28:
- _pX = (*TunixShm)(_pX.X1)
+ _pX = (*TunixShm)(_pX.XpNext)
goto _27
_30:
- if (int32(_mask) & int32(_1_allMask)) == i32(0) {
- _rc = _unixShmSystemLock(tls, _pDbFd, i32(2), _ofst+i32(120), _n)
+ if (int32(_mask) & int32(_1_allMask)) == int32(0) {
+ _rc = _unixShmSystemLock(tls, _pDbFd, int32(2), _ofst+int32(120), _n)
goto _35
}
- _rc = i32(0)
+ _rc = int32(0)
_35:
- if _rc == i32(0) {
+ if _rc == int32(0) {
{
- p := (*uint16)(unsafe.Pointer(&(_p.X5)))
+ p := &_p.XexclMask
*p = uint16(int32(*p) & (^int32(_mask)))
- sink14(*p)
}
{
- p := (*uint16)(unsafe.Pointer(&(_p.X4)))
+ p := &_p.XsharedMask
*p = uint16(int32(*p) & (^int32(_mask)))
- sink14(*p)
}
}
goto _48
_26:
- if (_flags & i32(4)) == 0 {
+ if (_flags & int32(4)) == 0 {
goto _38
}
- _6_allShared = u16(0)
- _pX = (*TunixShm)(_pShmNode.X9)
+ _6_allShared = uint16(0)
+ _pX = (*TunixShm)(_pShmNode.XpFirst)
_39:
if _pX == nil {
goto _42
}
- if (int32(_pX.X5) & int32(_mask)) != i32(0) {
- _rc = i32(5)
+ if (int32(_pX.XexclMask) & int32(_mask)) != int32(0) {
+ _rc = int32(5)
goto _42
}
{
p := &_6_allShared
- *p = uint16(int32(*p) | int32(_pX.X4))
- sink14(*p)
+ *p = uint16(int32(*p) | int32(_pX.XsharedMask))
}
- _pX = (*TunixShm)(_pX.X1)
+ _pX = (*TunixShm)(_pX.XpNext)
goto _39
_42:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _44
}
- if (int32(_6_allShared) & int32(_mask)) == i32(0) {
- _rc = _unixShmSystemLock(tls, _pDbFd, i32(0), _ofst+i32(120), _n)
+ if (int32(_6_allShared) & int32(_mask)) == int32(0) {
+ _rc = _unixShmSystemLock(tls, _pDbFd, int32(0), _ofst+int32(120), _n)
goto _46
}
- _rc = i32(0)
+ _rc = int32(0)
_46:
_44:
- if _rc == i32(0) {
+ if _rc == int32(0) {
{
- p := (*uint16)(unsafe.Pointer(&(_p.X4)))
+ p := &_p.XsharedMask
*p = uint16(int32(*p) | int32(_mask))
- sink14(*p)
}
}
goto _48
_38:
- _pX = (*TunixShm)(_pShmNode.X9)
+ _pX = (*TunixShm)(_pShmNode.XpFirst)
_49:
if _pX == nil {
goto _52
}
- if ((int32(_pX.X5) & int32(_mask)) != i32(0)) || ((int32(_pX.X4) & int32(_mask)) != i32(0)) {
- _rc = i32(5)
+ if ((int32(_pX.XexclMask) & int32(_mask)) != int32(0)) || ((int32(_pX.XsharedMask) & int32(_mask)) != int32(0)) {
+ _rc = int32(5)
goto _52
}
- _pX = (*TunixShm)(_pX.X1)
+ _pX = (*TunixShm)(_pX.XpNext)
goto _49
_52:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _55
}
- _rc = _unixShmSystemLock(tls, _pDbFd, i32(1), _ofst+i32(120), _n)
- if _rc == i32(0) {
+ _rc = _unixShmSystemLock(tls, _pDbFd, int32(1), _ofst+int32(120), _n)
+ if _rc == int32(0) {
func() {
- if (int32(_p.X4) & int32(_mask)) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34506), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmLockØ00__func__Ø000))), unsafe.Pointer(str(134253)))
+ if (int32(_p.XsharedMask) & int32(_mask)) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34506), unsafe.Pointer(&_unixShmLockØ00__func__Ø000), unsafe.Pointer(str(134266)))
crt.X__builtin_abort(tls)
}
}()
{
- p := (*uint16)(unsafe.Pointer(&(_p.X5)))
+ p := &_p.XexclMask
*p = uint16(int32(*p) | int32(_mask))
- sink14(*p)
}
}
_55:
_48:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pShmNode.X1))
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pShmNode.Xmutex))
return _rc
}
var _unixShmLockØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_unixShmLockØ00__func__Ø000[0], str(134279), 12)
+ crt.Xstrncpy(nil, &_unixShmLockØ00__func__Ø000[0], str(134292), 12)
}
-// Implement a memory barrier or memory fence on shared memory.
-//
-// All loads and stores begun before the barrier must complete before
-// any load or store begun after the barrier.
+// C comment
+// /*
+// ** Implement a memory barrier or memory fence on shared memory.
+// **
+// ** All loads and stores begun before the barrier must complete before
+// ** any load or store begun after the barrier.
+// */
func _unixShmBarrier(tls *crt.TLS, _fd *Xsqlite3_file) {
_sqlite3MemoryBarrier(tls)
_unixEnterMutex(tls)
_unixLeaveMutex(tls)
}
-// Close a connection to shared-memory. Delete the underlying
-// storage if deleteFlag is true.
-//
-// If there is no shared memory associated with the connection then this
-// routine is a harmless no-op.
+// C comment
+// /*
+// ** Close a connection to shared-memory. Delete the underlying
+// ** storage if deleteFlag is true.
+// **
+// ** If there is no shared memory associated with the connection then this
+// ** routine is a harmless no-op.
+// */
func _unixShmUnmap(tls *crt.TLS, _fd *Xsqlite3_file, _deleteFlag int32) (r0 int32) {
var _pDbFd *XunixFile
var _pShmNode *XunixShmNode
var _p *TunixShm
var _pp **TunixShm
_pDbFd = (*XunixFile)(unsafe.Pointer(_fd))
- _p = (*TunixShm)(_pDbFd.X10)
+ _p = (*TunixShm)(_pDbFd.XpShm)
if _p == nil {
- return i32(0)
+ return int32(0)
}
- _pShmNode = (*XunixShmNode)(_p.X0)
+ _pShmNode = (*XunixShmNode)(_p.XpShmNode)
func() {
- if _pShmNode != (*XunixShmNode)((*XunixInodeInfo)(_pDbFd.X2).X5) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34553), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmUnmapØ00__func__Ø000))), unsafe.Pointer(str(133866)))
+ if _pShmNode != (*XunixShmNode)((*XunixInodeInfo)(_pDbFd.XpInode).XpShmNode) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34553), unsafe.Pointer(&_unixShmUnmapØ00__func__Ø000), unsafe.Pointer(str(133879)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (*XunixInodeInfo)(_pShmNode.X0) != (*XunixInodeInfo)(_pDbFd.X2) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34554), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmUnmapØ00__func__Ø000))), unsafe.Pointer(str(133430)))
+ if (*XunixInodeInfo)(_pShmNode.XpInode) != (*XunixInodeInfo)(_pDbFd.XpInode) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34554), unsafe.Pointer(&_unixShmUnmapØ00__func__Ø000), unsafe.Pointer(str(133443)))
crt.X__builtin_abort(tls)
}
}()
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pShmNode.X1))
- _pp = (**TunixShm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pShmNode.X9)))))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_pShmNode.Xmutex))
+ _pp = (**TunixShm)(unsafe.Pointer(&_pShmNode.XpFirst))
_5:
if (*_pp) == _p {
goto _8
}
- _pp = (**TunixShm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*_pp).X1)))))
+ _pp = (**TunixShm)(unsafe.Pointer(&((*_pp).XpNext)))
goto _5
_8:
- *_pp = (*TunixShm)(_p.X1)
- Xsqlite3_free(tls, (unsafe.Pointer)(_p))
- *(**TunixShm)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pDbFd.X10))))) = nil
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pShmNode.X1))
+ *_pp = (*TunixShm)(_p.XpNext)
+ Xsqlite3_free(tls, unsafe.Pointer(_p))
+ *(**TunixShm)(unsafe.Pointer(&_pDbFd.XpShm)) = nil
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_pShmNode.Xmutex))
_unixEnterMutex(tls)
func() {
- if (_pShmNode.X8) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34570), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixShmUnmapØ00__func__Ø000))), unsafe.Pointer(str(134291)))
+ if _pShmNode.XnRef <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34570), unsafe.Pointer(&_unixShmUnmapØ00__func__Ø000), unsafe.Pointer(str(134304)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pShmNode.X8))) -= 1
- if (_pShmNode.X8) != i32(0) {
+ _pShmNode.XnRef -= 1
+ if _pShmNode.XnRef != int32(0) {
goto _11
}
- if _deleteFlag != 0 && ((_pShmNode.X3) >= i32(0)) {
- (*(*func(*crt.TLS, *int8) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(16)))).X1)})))(tls, _pShmNode.X2)
+ if _deleteFlag != 0 && (_pShmNode.Xh >= int32(0)) {
+ func() func(*crt.TLS, *int8) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(16)).XpCurrent
+ return *(*func(*crt.TLS, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, _pShmNode.XzFilename)
}
_unixShmPurge(tls, _pDbFd)
_11:
_unixLeaveMutex(tls)
- return i32(0)
+ return int32(0)
}
var _unixShmUnmapØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_unixShmUnmapØ00__func__Ø000[0], str(134308), 13)
+ crt.Xstrncpy(nil, &_unixShmUnmapØ00__func__Ø000[0], str(134321), 13)
}
-// If possible, return a pointer to a mapping of file fd starting at offset
-// iOff. The mapping must be valid for at least nAmt bytes.
-//
-// If such a pointer can be obtained, store it in *pp and return SQLITE_OK.
-// Or, if one cannot but no error occurs, set *pp to 0 and return SQLITE_OK.
-// Finally, if an error does occur, return an SQLite error code. The final
-// value of *pp is undefined in this case.
-//
-// If this function does return a pointer, the caller must eventually
-// release the reference by calling unixUnfetch().
+// C comment
+// /*
+// ** If possible, return a pointer to a mapping of file fd starting at offset
+// ** iOff. The mapping must be valid for at least nAmt bytes.
+// **
+// ** If such a pointer can be obtained, store it in *pp and return SQLITE_OK.
+// ** Or, if one cannot but no error occurs, set *pp to 0 and return SQLITE_OK.
+// ** Finally, if an error does occur, return an SQLite error code. The final
+// ** value of *pp is undefined in this case.
+// **
+// ** If this function does return a pointer, the caller must eventually
+// ** release the reference by calling unixUnfetch().
+// */
func _unixFetch(tls *crt.TLS, _fd *Xsqlite3_file, _iOff int64, _nAmt int32, _pp *unsafe.Pointer) (r0 int32) {
var _2_rc int32
var _pFd *XunixFile
_pFd = (*XunixFile)(unsafe.Pointer(_fd))
*_pp = nil
- if (_pFd.X15) <= int64(i32(0)) {
+ if _pFd.XmmapSizeMax <= (0) {
goto _0
}
- if _pFd.X16 != nil {
+ if _pFd.XpMapRegion != nil {
goto _1
}
- _2_rc = _unixMapfile(tls, _pFd, int64(i32(-1)))
- if _2_rc != i32(0) {
+ _2_rc = _unixMapfile(tls, _pFd, int64(-1))
+ if _2_rc != int32(0) {
return _2_rc
}
_1:
- if (_pFd.X13) >= (_iOff + int64(_nAmt)) {
- *_pp = (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(_pFd.X16) + 1*uintptr(_iOff))))
- *(*int32)(unsafe.Pointer(&(_pFd.X12))) += 1
+ if _pFd.XmmapSize >= (_iOff + int64(_nAmt)) {
+ *_pp = unsafe.Pointer(elem15((*uint8)(_pFd.XpMapRegion), uintptr(_iOff)))
+ _pFd.XnFetchOut += 1
}
_0:
- return i32(0)
-}
-
-// If the third argument is non-NULL, then this function releases a
-// reference obtained by an earlier call to unixFetch(). The second
-// argument passed to this function must be the same as the corresponding
-// argument that was passed to the unixFetch() invocation.
-//
-// Or, if the third argument is NULL, then this function is being called
-// to inform the VFS layer that, according to POSIX, any existing mapping
-// may now be invalid and should be unmapped.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** If the third argument is non-NULL, then this function releases a
+// ** reference obtained by an earlier call to unixFetch(). The second
+// ** argument passed to this function must be the same as the corresponding
+// ** argument that was passed to the unixFetch() invocation.
+// **
+// ** Or, if the third argument is NULL, then this function is being called
+// ** to inform the VFS layer that, according to POSIX, any existing mapping
+// ** may now be invalid and should be unmapped.
+// */
func _unixUnfetch(tls *crt.TLS, _fd *Xsqlite3_file, _iOff int64, _p unsafe.Pointer) (r0 int32) {
var _pFd *XunixFile
_pFd = (*XunixFile)(unsafe.Pointer(_fd))
func() {
- if (_p == nil) != ((_pFd.X12) == i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34788), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixUnfetchØ00__func__Ø000))), unsafe.Pointer(str(134321)))
+ if (_p == nil) != (_pFd.XnFetchOut == int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34788), unsafe.Pointer(&_unixUnfetchØ00__func__Ø000), unsafe.Pointer(str(134334)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _p != nil && _p != (unsafe.Pointer)((*uint8)(unsafe.Pointer(uintptr(_pFd.X16)+1*uintptr(_iOff)))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34791), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixUnfetchØ00__func__Ø000))), unsafe.Pointer(str(134349)))
+ if _p != nil && _p != unsafe.Pointer(elem15((*uint8)(_pFd.XpMapRegion), uintptr(_iOff))) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34791), unsafe.Pointer(&_unixUnfetchØ00__func__Ø000), unsafe.Pointer(str(134362)))
crt.X__builtin_abort(tls)
}
}()
if _p != nil {
- *(*int32)(unsafe.Pointer(&(_pFd.X12))) -= 1
+ _pFd.XnFetchOut -= 1
goto _6
}
_unixUnmapfile(tls, _pFd)
_6:
func() {
- if (_pFd.X12) < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(34799), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixUnfetchØ00__func__Ø000))), unsafe.Pointer(str(134391)))
+ if _pFd.XnFetchOut < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(34799), unsafe.Pointer(&_unixUnfetchØ00__func__Ø000), unsafe.Pointer(str(134404)))
crt.X__builtin_abort(tls)
}
}()
- return i32(0)
+ return int32(0)
}
var _unixUnfetchØ00__func__Ø000 [12]int8
func init() {
- crt.Xstrncpy(nil, &_unixUnfetchØ00__func__Ø000[0], str(134409), 12)
-}
-
-// Open the file zPath.
-//
-// Previously, the SQLite OS layer used three functions in place of this
-// one:
-//
-// sqlite3OsOpenReadWrite();
-// sqlite3OsOpenReadOnly();
-// sqlite3OsOpenExclusive();
-//
-// These calls correspond to the following combinations of flags:
-//
-// ReadWrite() -> (READWRITE | CREATE)
-// ReadOnly() -> (READONLY)
-// OpenExclusive() -> (READWRITE | CREATE | EXCLUSIVE)
-//
-// The old OpenExclusive() accepted a boolean argument - "delFlag". If
-// true, the file was configured to be automatically deleted when the
-// file handle closed. To achieve the same effect using this new
-// interface, add the DELETEONCLOSE flag to those specified above for
-// OpenExclusive().
+ crt.Xstrncpy(nil, &_unixUnfetchØ00__func__Ø000[0], str(134422), 12)
+}
+
+// C comment
+// /*
+// ** Open the file zPath.
+// **
+// ** Previously, the SQLite OS layer used three functions in place of this
+// ** one:
+// **
+// ** sqlite3OsOpenReadWrite();
+// ** sqlite3OsOpenReadOnly();
+// ** sqlite3OsOpenExclusive();
+// **
+// ** These calls correspond to the following combinations of flags:
+// **
+// ** ReadWrite() -> (READWRITE | CREATE)
+// ** ReadOnly() -> (READONLY)
+// ** OpenExclusive() -> (READWRITE | CREATE | EXCLUSIVE)
+// **
+// ** The old OpenExclusive() accepted a boolean argument - "delFlag". If
+// ** true, the file was configured to be automatically deleted when the
+// ** file handle closed. To achieve the same effect using this new
+// ** interface, add the DELETEONCLOSE flag to those specified above for
+// ** OpenExclusive().
+// */
func _unixOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zPath *int8, _pFile *Xsqlite3_file, _flags int32, _pOutFlags *int32) (r0 int32) {
var _fd, _openFlags, _eType, _noLock, _rc, _ctrlFlags, _isExclusive, _isDelete, _isCreate, _isReadonly, _isReadWrite, _syncDir int32
var _8_openMode, _8_uid, _8_gid uint32
@@ -117811,95 +119780,95 @@ func _unixOpen(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zPath *int8, _pFile *Xsqlite3
var _2_pUnused *XUnixUnusedFd
var _zTmpname [514]int8
_p = (*XunixFile)(unsafe.Pointer(_pFile))
- _fd = i32(-1)
- _openFlags = i32(0)
- _eType = int32(uint32(_flags) & u32(4294967040))
- _rc = i32(0)
- _ctrlFlags = i32(0)
- _isExclusive = _flags & i32(16)
- _isDelete = _flags & i32(8)
- _isCreate = _flags & i32(4)
- _isReadonly = _flags & i32(1)
- _isReadWrite = _flags & i32(2)
- _syncDir = bool2int(_isCreate != 0 && (((_eType == i32(16384)) || (_eType == i32(2048))) || (_eType == i32(524288))))
+ _fd = int32(-1)
+ _openFlags = int32(0)
+ _eType = int32(uint32(_flags) & uint32(4294967040))
+ _rc = int32(0)
+ _ctrlFlags = int32(0)
+ _isExclusive = _flags & int32(16)
+ _isDelete = _flags & int32(8)
+ _isCreate = _flags & int32(4)
+ _isReadonly = _flags & int32(1)
+ _isReadWrite = _flags & int32(2)
+ _syncDir = bool2int(_isCreate != 0 && (((_eType == int32(16384)) || (_eType == int32(2048))) || (_eType == int32(524288))))
_zName = _zPath
func() {
- if _isReadonly != i32(0) && _isReadWrite != i32(0) || _isReadWrite == 0 && _isReadonly == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35597), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(134421)))
+ if _isReadonly != int32(0) && _isReadWrite != int32(0) || _isReadWrite == 0 && _isReadonly == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35597), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(134434)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _isCreate != i32(0) && _isReadWrite == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35598), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(134486)))
+ if _isCreate != int32(0) && _isReadWrite == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35598), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(134499)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _isExclusive != i32(0) && _isCreate == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35599), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(134513)))
+ if _isExclusive != int32(0) && _isCreate == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35599), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(134526)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _isDelete != i32(0) && _isCreate == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35600), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(134540)))
+ if _isDelete != int32(0) && _isCreate == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35600), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(134553)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_isDelete != 0 || _zName == nil) && _eType == i32(256) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35604), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(134564)))
+ if (_isDelete != 0 || _zName == nil) && _eType == int32(256) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35604), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(134577)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_isDelete != 0 || _zName == nil) && _eType == i32(2048) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35605), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(134615)))
+ if (_isDelete != 0 || _zName == nil) && _eType == int32(2048) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35605), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(134628)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_isDelete != 0 || _zName == nil) && _eType == i32(16384) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35606), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(134671)))
+ if (_isDelete != 0 || _zName == nil) && _eType == int32(16384) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35606), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(134684)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (_isDelete != 0 || _zName == nil) && _eType == i32(524288) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35607), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(134729)))
+ if (_isDelete != 0 || _zName == nil) && _eType == int32(524288) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35607), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(134742)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eType != i32(256) && _eType != i32(512) && _eType != i32(2048) && _eType != i32(4096) && _eType != i32(8192) && _eType != i32(16384) && _eType != i32(1024) && _eType != i32(524288) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35610), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(134776)))
+ if _eType != int32(256) && _eType != int32(512) && _eType != int32(2048) && _eType != int32(4096) && _eType != int32(8192) && _eType != int32(16384) && _eType != int32(1024) && _eType != int32(524288) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35610), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(134789)))
crt.X__builtin_abort(tls)
}
}()
if _randomnessPid != crt.Xgetpid(tls) {
_randomnessPid = crt.Xgetpid(tls)
bug20530(_randomnessPid)
- Xsqlite3_randomness(tls, i32(0), nil)
+ Xsqlite3_randomness(tls, int32(0), nil)
}
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(80))
- if _eType != i32(256) {
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(80))
+ if _eType != int32(256) {
goto _43
}
_2_pUnused = _findReusableFd(tls, _zName, _flags)
if _2_pUnused != nil {
- _fd = _2_pUnused.X0
+ _fd = _2_pUnused.Xfd
goto _45
}
- _2_pUnused = (*XUnixUnusedFd)(Xsqlite3_malloc64(tls, uint64(u32(12))))
+ _2_pUnused = (*XUnixUnusedFd)(Xsqlite3_malloc64(tls, uint64(12)))
if _2_pUnused == nil {
- return _sqlite3NomemError(tls, i32(35636))
+ return _sqlite3NomemError(tls, int32(35636))
}
_45:
- *(**XUnixUnusedFd)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X8))))) = _2_pUnused
+ *(**XUnixUnusedFd)(unsafe.Pointer(&_p.XpUnused)) = _2_pUnused
func() {
- if (_flags&i32(64)) == 0 && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zName)) + 1*uintptr(crt.Xstrlen(tls, _zName)+uint32(i32(1)))))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35644), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(135034)))
+ if (_flags&int32(64)) == 0 && int32(*elem1(_zName, uintptr(crt.Xstrlen(tls, _zName)+uint32(1)))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35644), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(135047)))
crt.X__builtin_abort(tls)
}
}()
@@ -117910,69 +119879,49 @@ _43:
}
func() {
if _isDelete == 0 || _syncDir != 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35648), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(135089)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35648), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(135102)))
crt.X__builtin_abort(tls)
}
}()
- _rc = _unixGetTempname(tls, _pVfs.X2, (*int8)(unsafe.Pointer(&_zTmpname)))
- if _rc != i32(0) {
+ _rc = _unixGetTempname(tls, _pVfs.XmxPathname, (*int8)(unsafe.Pointer(&_zTmpname)))
+ if _rc != int32(0) {
return _rc
}
_zName = (*int8)(unsafe.Pointer(&_zTmpname))
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zName)) + 1*uintptr(crt.Xstrlen(tls, _zName)+uint32(i32(1)))))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35657), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(135110)))
+ if int32(*elem1(_zName, uintptr(crt.Xstrlen(tls, _zName)+uint32(1)))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35657), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(135123)))
crt.X__builtin_abort(tls)
}
}()
_51:
if _isReadonly != 0 {
- {
- p := &_openFlags
- *p = (*p) | i32(0)
- sink1(*p)
- }
+ _openFlags |= int32(0)
}
if _isReadWrite != 0 {
- {
- p := &_openFlags
- *p = (*p) | i32(2)
- sink1(*p)
- }
+ _openFlags |= int32(2)
}
if _isCreate != 0 {
- {
- p := &_openFlags
- *p = (*p) | i32(64)
- sink1(*p)
- }
+ _openFlags |= int32(64)
}
if _isExclusive != 0 {
- {
- p := &_openFlags
- *p = (*p) | i32(128)
- sink1(*p)
- }
+ _openFlags |= int32(128)
}
- {
- p := &_openFlags
- *p = (*p) | i32(32768)
- sink1(*p)
- }
- if _fd >= i32(0) {
+ _openFlags |= int32(32768)
+ if _fd >= int32(0) {
goto _62
}
_rc = _findCreateFileMode(tls, _zName, _flags, &_8_openMode, &_8_uid, &_8_gid)
- if _rc != i32(0) {
+ if _rc != int32(0) {
func() {
- if (*XUnixUnusedFd)(_p.X8) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35676), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(135136)))
+ if _p.XpUnused != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35676), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(135149)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eType != i32(524288) && _eType != i32(2048) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35677), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(135148)))
+ if _eType != int32(524288) && _eType != int32(2048) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35677), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(135161)))
crt.X__builtin_abort(tls)
}
}()
@@ -117980,99 +119929,66 @@ _51:
}
_fd = _robust_open(tls, _zName, _openFlags, _8_openMode)
func() {
- if _isExclusive != 0 && (_openFlags&i32(64)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35682), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(135206)))
+ if _isExclusive != 0 && (_openFlags&int32(64)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35682), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(135219)))
crt.X__builtin_abort(tls)
}
}()
- if ((_fd < i32(0)) && ((*crt.X__errno_location(tls)) != i32(21))) && _isReadWrite != 0 {
- {
- p := &_flags
- *p = (*p) & i32(-7)
- sink1(*p)
- }
- {
- p := &_openFlags
- *p = (*p) & i32(-67)
- sink1(*p)
- }
- {
- p := &_flags
- *p = (*p) | i32(1)
- sink1(*p)
- }
- {
- p := &_openFlags
- *p = (*p) | i32(0)
- sink1(*p)
- }
- _isReadonly = i32(1)
+ if ((_fd < int32(0)) && ((*crt.X__errno_location(tls)) != int32(21))) && _isReadWrite != 0 {
+ _flags &= int32(-7)
+ _openFlags &= int32(-67)
+ _flags |= int32(1)
+ _openFlags |= int32(0)
+ _isReadonly = int32(1)
_fd = _robust_open(tls, _zName, _openFlags, _8_openMode)
}
- if _fd < i32(0) {
- _rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, i32(35693)), str(131504), _zName, i32(35693))
+ if _fd < int32(0) {
+ _rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(35693)), str(131517), _zName, int32(35693))
goto _open_finished
}
- if (_flags & i32(526336)) != 0 {
+ if (_flags & int32(526336)) != 0 {
_robustFchown(tls, _fd, _8_uid, _8_gid)
}
_62:
func() {
- if _fd < i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35705), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixOpenØ00__func__Ø000))), unsafe.Pointer(str(135247)))
+ if _fd < int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35705), unsafe.Pointer(&_unixOpenØ00__func__Ø000), unsafe.Pointer(str(135260)))
crt.X__builtin_abort(tls)
}
}()
if _pOutFlags != nil {
*_pOutFlags = _flags
}
- if (*XUnixUnusedFd)(_p.X8) != nil {
- *(*int32)(unsafe.Pointer(&((*XUnixUnusedFd)(_p.X8).X0))) = _fd
- *(*int32)(unsafe.Pointer(&((*XUnixUnusedFd)(_p.X8).X1))) = _flags
+ if _p.XpUnused != nil {
+ (*XUnixUnusedFd)(_p.XpUnused).Xfd = _fd
+ (*XUnixUnusedFd)(_p.XpUnused).Xflags = _flags
}
if _isDelete != 0 {
- (*(*func(*crt.TLS, *int8) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(16)))).X1)})))(tls, _zName)
+ func() func(*crt.TLS, *int8) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(16)).XpCurrent
+ return *(*func(*crt.TLS, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, _zName)
}
if _isDelete != 0 {
- {
- p := &_ctrlFlags
- *p = (*p) | i32(32)
- sink1(*p)
- }
+ _ctrlFlags |= int32(32)
}
if _isReadonly != 0 {
- {
- p := &_ctrlFlags
- *p = (*p) | i32(2)
- sink1(*p)
- }
+ _ctrlFlags |= int32(2)
}
- _noLock = bool2int(_eType != i32(256))
+ _noLock = bool2int(_eType != int32(256))
if _noLock != 0 {
- {
- p := &_ctrlFlags
- *p = (*p) | i32(128)
- sink1(*p)
- }
+ _ctrlFlags |= int32(128)
}
if _syncDir != 0 {
- {
- p := &_ctrlFlags
- *p = (*p) | i32(8)
- sink1(*p)
- }
+ _ctrlFlags |= int32(8)
}
- if (_flags & i32(64)) != 0 {
- {
- p := &_ctrlFlags
- *p = (*p) | i32(64)
- sink1(*p)
- }
+ if (_flags & int32(64)) != 0 {
+ _ctrlFlags |= int32(64)
}
_rc = _fillInUnixFile(tls, _pVfs, _fd, _pFile, _zPath, _ctrlFlags)
_open_finished:
- if _rc != i32(0) {
- Xsqlite3_free(tls, _p.X8)
+ if _rc != int32(0) {
+ Xsqlite3_free(tls, _p.XpUnused)
}
return _rc
@@ -118083,126 +119999,137 @@ _open_finished:
var _unixOpenØ00__func__Ø000 [9]int8
func init() {
- crt.Xstrncpy(nil, &_unixOpenØ00__func__Ø000[0], str(135253), 9)
+ crt.Xstrncpy(nil, &_unixOpenØ00__func__Ø000[0], str(135266), 9)
}
+// C comment
+// /* This variable holds the process id (pid) from when the xRandomness()
+// ** method was called. If xOpen() is called from a different process id,
+// ** indicating that a fork() has occurred, the PRNG will be reset.
+// */
var _randomnessPid int32
-// Search for an unused file descriptor that was opened on the database
-// file (not a journal or master-journal file) identified by pathname
-// zPath with SQLITE_OPEN_XXX flags matching those passed as the second
-// argument to this function.
-//
-// Such a file descriptor may exist if a database connection was closed
-// but the associated file descriptor could not be closed because some
-// other file descriptor open on the same file is holding a file-lock.
-// Refer to comments in the unixClose() function and the lengthy comment
-// describing "Posix Advisory Locking" at the start of this file for
-// further details. Also, ticket #4018.
-//
-// If a suitable file descriptor is found, then it is returned. If no
-// such file descriptor is located, -1 is returned.
+// C comment
+// /*
+// ** Search for an unused file descriptor that was opened on the database
+// ** file (not a journal or master-journal file) identified by pathname
+// ** zPath with SQLITE_OPEN_XXX flags matching those passed as the second
+// ** argument to this function.
+// **
+// ** Such a file descriptor may exist if a database connection was closed
+// ** but the associated file descriptor could not be closed because some
+// ** other file descriptor open on the same file is holding a file-lock.
+// ** Refer to comments in the unixClose() function and the lengthy comment
+// ** describing "Posix Advisory Locking" at the start of this file for
+// ** further details. Also, ticket #4018.
+// **
+// ** If a suitable file descriptor is found, then it is returned. If no
+// ** such file descriptor is located, -1 is returned.
+// */
func _findReusableFd(tls *crt.TLS, _zPath *int8, _flags int32) (r0 *XUnixUnusedFd) {
var _sStat crt.Xstruct_stat64
var _1_pInode *XunixInodeInfo
var _pUnused *XUnixUnusedFd
var _3_pp **XUnixUnusedFd
_pUnused = nil
- if i32(0) != (*(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(4)))).X1)})))(tls, _zPath, &_sStat) {
+ if int32(0) != func() func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(4)).XpCurrent
+ return *(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _zPath, &_sStat) {
goto _0
}
_unixEnterMutex(tls)
_1_pInode = _inodeList
_1:
- if (_1_pInode != nil) && ((((*TunixFileId)(unsafe.Pointer(&(_1_pInode.X0))).X0) != (_sStat.X0)) || (((*TunixFileId)(unsafe.Pointer(&(_1_pInode.X0))).X1) != (_sStat.X18))) {
- _1_pInode = (*XunixInodeInfo)(_1_pInode.X8)
+ if (_1_pInode != nil) && (((_1_pInode.XfileId.Xdev) != _sStat.Xst_dev) || ((_1_pInode.XfileId.Xino) != _sStat.Xst_ino)) {
+ _1_pInode = (*XunixInodeInfo)(_1_pInode.XpNext)
goto _1
}
if _1_pInode == nil {
goto _5
}
- _3_pp = (**XUnixUnusedFd)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_pInode.X7)))))
+ _3_pp = (**XUnixUnusedFd)(unsafe.Pointer(&_1_pInode.XpUnused))
_6:
- if (*_3_pp) == nil || ((*_3_pp).X1) == _flags {
+ if (*_3_pp) == nil || ((*_3_pp).Xflags) == _flags {
goto _10
}
- _3_pp = (**XUnixUnusedFd)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*_3_pp).X2)))))
+ _3_pp = (**XUnixUnusedFd)(unsafe.Pointer(&((*_3_pp).XpNext)))
goto _6
_10:
_pUnused = *_3_pp
if _pUnused != nil {
- *_3_pp = (*XUnixUnusedFd)(_pUnused.X2)
+ *_3_pp = (*XUnixUnusedFd)(_pUnused.XpNext)
}
_5:
_unixLeaveMutex(tls)
_0:
return _pUnused
-
- _ = _sStat
- panic(0)
}
-// This function is called by unixOpen() to determine the unix permissions
-// to create new files with. If no error occurs, then SQLITE_OK is returned
-// and a value suitable for passing as the third argument to open(2) is
-// written to *pMode. If an IO error occurs, an SQLite error code is
-// returned and the value of *pMode is not modified.
-//
-// In most cases, this routine sets *pMode to 0, which will become
-// an indication to robust_open() to create the file using
-// SQLITE_DEFAULT_FILE_PERMISSIONS adjusted by the umask.
-// But if the file being opened is a WAL or regular journal file, then
-// this function queries the file-system for the permissions on the
-// corresponding database file and sets *pMode to this value. Whenever
-// possible, WAL and journal files are created using the same permissions
-// as the associated database file.
-//
-// If the SQLITE_ENABLE_8_3_NAMES option is enabled, then the
-// original filename is unavailable. But 8_3_NAMES is only used for
-// FAT filesystems and permissions do not matter there, so just use
-// the default permissions.
+// C comment
+// /*
+// ** This function is called by unixOpen() to determine the unix permissions
+// ** to create new files with. If no error occurs, then SQLITE_OK is returned
+// ** and a value suitable for passing as the third argument to open(2) is
+// ** written to *pMode. If an IO error occurs, an SQLite error code is
+// ** returned and the value of *pMode is not modified.
+// **
+// ** In most cases, this routine sets *pMode to 0, which will become
+// ** an indication to robust_open() to create the file using
+// ** SQLITE_DEFAULT_FILE_PERMISSIONS adjusted by the umask.
+// ** But if the file being opened is a WAL or regular journal file, then
+// ** this function queries the file-system for the permissions on the
+// ** corresponding database file and sets *pMode to this value. Whenever
+// ** possible, WAL and journal files are created using the same permissions
+// ** as the associated database file.
+// **
+// ** If the SQLITE_ENABLE_8_3_NAMES option is enabled, then the
+// ** original filename is unavailable. But 8_3_NAMES is only used for
+// ** FAT filesystems and permissions do not matter there, so just use
+// ** the default permissions.
+// */
func _findCreateFileMode(tls *crt.TLS, _zPath *int8, _flags int32, _pMode *uint32, _pUid *uint32, _pGid *uint32) (r0 int32) {
var _rc, _1_nDb int32
var _4_z *int8
var _1_zDb [513]int8
- _rc = i32(0)
- *_pMode = uint32(i32(0))
- *_pUid = uint32(i32(0))
- *_pGid = uint32(i32(0))
- if (_flags & i32(526336)) == 0 {
+ _rc = int32(0)
+ *_pMode = 0
+ *_pUid = 0
+ *_pGid = 0
+ if (_flags & int32(526336)) == 0 {
goto _0
}
- _1_nDb = _sqlite3Strlen30(tls, _zPath) - i32(1)
+ _1_nDb = _sqlite3Strlen30(tls, _zPath) - int32(1)
_1:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPath)) + 1*uintptr(_1_nDb)))) != i32(45) {
+ if int32(*elem1(_zPath, uintptr(_1_nDb))) != int32(45) {
func() {
- if _1_nDb <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35497), unsafe.Pointer((*int8)(unsafe.Pointer(&_findCreateFileModeØ00__func__Ø000))), unsafe.Pointer(str(135262)))
+ if _1_nDb <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35497), unsafe.Pointer(&_findCreateFileModeØ00__func__Ø000), unsafe.Pointer(str(135275)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if (int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_sqlite3CtypeMap)) + 1*uintptr(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPath)) + 1*uintptr(_1_nDb)))))))) & i32(6)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35498), unsafe.Pointer((*int8)(unsafe.Pointer(&_findCreateFileModeØ00__func__Ø000))), unsafe.Pointer(str(135268)))
+ if (int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(uint8(*elem1(_zPath, uintptr(_1_nDb)))))) & int32(6)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35498), unsafe.Pointer(&_findCreateFileModeØ00__func__Ø000), unsafe.Pointer(str(135281)))
crt.X__builtin_abort(tls)
}
}()
_1_nDb -= 1
goto _1
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(&_1_zDb), (unsafe.Pointer)(_zPath), uint32(_1_nDb))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_1_zDb)) + 1*uintptr(_1_nDb))) = int8(i32(0))
+ crt.Xmemcpy(tls, unsafe.Pointer(&_1_zDb), unsafe.Pointer(_zPath), uint32(_1_nDb))
+ *elem1((*int8)(unsafe.Pointer(&_1_zDb)), uintptr(_1_nDb)) = 0
_rc = _getFileMode(tls, (*int8)(unsafe.Pointer(&_1_zDb)), _pMode, _pUid, _pGid)
goto _10
_0:
- if (_flags & i32(8)) != 0 {
- *_pMode = uint32(i32(384))
+ if (_flags & int32(8)) != 0 {
+ *_pMode = uint32(384)
goto _10
}
- if (_flags & i32(64)) == 0 {
+ if (_flags & int32(64)) == 0 {
goto _10
}
- _4_z = Xsqlite3_uri_parameter(tls, _zPath, str(135295))
+ _4_z = Xsqlite3_uri_parameter(tls, _zPath, str(135308))
if _4_z != nil {
_rc = _getFileMode(tls, _4_z, _pMode, _pUid, _pGid)
}
@@ -118216,92 +120143,96 @@ _10:
var _findCreateFileModeØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_findCreateFileModeØ00__func__Ø000[0], str(135302), 19)
+ crt.Xstrncpy(nil, &_findCreateFileModeØ00__func__Ø000[0], str(135315), 19)
}
-// Find the mode, uid and gid of file zFile.
+// C comment
+// /*
+// ** Find the mode, uid and gid of file zFile.
+// */
func _getFileMode(tls *crt.TLS, _zFile *int8, _pMode *uint32, _pUid *uint32, _pGid *uint32) (r0 int32) {
var _rc int32
var _sStat crt.Xstruct_stat64
- _rc = i32(0)
- if i32(0) == (*(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(4)))).X1)})))(tls, _zFile, &_sStat) {
- *_pMode = (_sStat.X3) & uint32(i32(511))
- *_pUid = _sStat.X5
- *_pGid = _sStat.X6
+ _rc = int32(0)
+ if int32(0) == func() func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(4)).XpCurrent
+ return *(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _zFile, &_sStat) {
+ *_pMode = _sStat.Xst_mode & uint32(511)
+ *_pUid = _sStat.Xst_uid
+ *_pGid = _sStat.Xst_gid
goto _1
}
- _rc = i32(1802)
+ _rc = int32(1802)
_1:
return _rc
-
- _ = _sStat
- panic(0)
}
-// Initialize the contents of the unixFile structure pointed to by pId.
+// C comment
+// /*
+// ** Initialize the contents of the unixFile structure pointed to by pId.
+// */
func _fillInUnixFile(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _h int32, _pId *Xsqlite3_file, _zFilename *int8, _ctrlFlags int32) (r0 int32) {
var _rc, _7_nFilename int32
var _7_zLockFile *int8
var _pLockingStyle *Xsqlite3_io_methods
var _pNew *XunixFile
_pNew = (*XunixFile)(unsafe.Pointer(_pId))
- _rc = i32(0)
+ _rc = int32(0)
func() {
- if (*XunixInodeInfo)(_pNew.X2) != nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35121), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInUnixFileØ00__func__Ø000))), unsafe.Pointer(str(135321)))
+ if (*XunixInodeInfo)(_pNew.XpInode) != nil {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35121), unsafe.Pointer(&_fillInUnixFileØ00__func__Ø000), unsafe.Pointer(str(135334)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _zFilename != nil && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFilename)) + 1*uintptr(i32(0))))) != i32(47) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35131), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInUnixFileØ00__func__Ø000))), unsafe.Pointer(str(135340)))
+ if _zFilename != nil && int32(*elem1(_zFilename, 0)) != int32(47) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35131), unsafe.Pointer(&_fillInUnixFileØ00__func__Ø000), unsafe.Pointer(str(135353)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _zFilename == nil && (_ctrlFlags&i32(128)) == i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35135), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInUnixFileØ00__func__Ø000))), unsafe.Pointer(str(135374)))
+ if _zFilename == nil && (_ctrlFlags&int32(128)) == int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35135), unsafe.Pointer(&_fillInUnixFileØ00__func__Ø000), unsafe.Pointer(str(135387)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_pNew.X3))) = _h
- *(**Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X1))))) = _pVfs
- *(**int8)(unsafe.Pointer(&(_pNew.X9))) = _zFilename
- *(*uint16)(unsafe.Pointer(&(_pNew.X5))) = uint16(uint8(_ctrlFlags))
- *(*int64)(unsafe.Pointer(&(_pNew.X15))) = _sqlite3Config.X17
+ _pNew.Xh = _h
+ *(**Xsqlite3_vfs)(unsafe.Pointer(&_pNew.XpVfs)) = _pVfs
+ _pNew.XzPath = _zFilename
+ _pNew.XctrlFlags = uint16(uint8(_ctrlFlags))
+ _pNew.XmmapSizeMax = _sqlite3Config.XszMmap
if Xsqlite3_uri_boolean(tls, func() *int8 {
- if (_ctrlFlags & i32(64)) != 0 {
+ if (_ctrlFlags & int32(64)) != 0 {
return _zFilename
}
return nil
- }(), str(135423), i32(1)) != 0 {
+ }(), str(135436), int32(1)) != 0 {
{
- p := (*uint16)(unsafe.Pointer(&(_pNew.X5)))
- *p = uint16(int32(*p) | i32(16))
- sink14(*p)
+ p := &_pNew.XctrlFlags
+ *p = uint16(int32(*p) | int32(16))
}
}
- if crt.Xstrcmp(tls, _pVfs.X4, str(131329)) == i32(0) {
+ if crt.Xstrcmp(tls, _pVfs.XzName, str(131342)) == int32(0) {
{
- p := (*uint16)(unsafe.Pointer(&(_pNew.X5)))
- *p = uint16(int32(*p) | i32(1))
- sink14(*p)
+ p := &_pNew.XctrlFlags
+ *p = uint16(int32(*p) | int32(1))
}
}
- if (_ctrlFlags & i32(128)) != 0 {
+ if (_ctrlFlags & int32(128)) != 0 {
_pLockingStyle = &_nolockIoMethods
goto _13
}
- _pLockingStyle = (*(*func(*crt.TLS, *int8, *XunixFile) *Xsqlite3_io_methods)(_pVfs.X5))(tls, _zFilename, _pNew)
+ _pLockingStyle = (*(*func(*crt.TLS, *int8, *XunixFile) *Xsqlite3_io_methods)(_pVfs.XpAppData))(tls, _zFilename, _pNew)
_13:
if _pLockingStyle != &_posixIoMethods {
goto _14
}
_unixEnterMutex(tls)
- _rc = _findInodeInfo(tls, _pNew, (**XunixInodeInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X2))))))
- if _rc != i32(0) {
- _robust_close(tls, _pNew, _h, i32(35199))
- _h = i32(-1)
+ _rc = _findInodeInfo(tls, _pNew, (**XunixInodeInfo)(unsafe.Pointer(&_pNew.XpInode)))
+ if _rc != int32(0) {
+ _robust_close(tls, _pNew, _h, int32(35199))
+ _h = int32(-1)
}
_unixLeaveMutex(tls)
goto _17
@@ -118311,30 +120242,30 @@ _14:
}
func() {
if _zFilename == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35239), unsafe.Pointer((*int8)(unsafe.Pointer(&_fillInUnixFileØ00__func__Ø000))), unsafe.Pointer(str(135428)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35239), unsafe.Pointer(&_fillInUnixFileØ00__func__Ø000), unsafe.Pointer(str(135441)))
crt.X__builtin_abort(tls)
}
}()
- _7_nFilename = int32(crt.Xstrlen(tls, _zFilename)) + i32(6)
+ _7_nFilename = int32(crt.Xstrlen(tls, _zFilename)) + int32(6)
_7_zLockFile = (*int8)(Xsqlite3_malloc64(tls, uint64(_7_nFilename)))
if _7_zLockFile == nil {
- _rc = _sqlite3NomemError(tls, i32(35243))
+ _rc = _sqlite3NomemError(tls, int32(35243))
goto _21
}
- Xsqlite3_snprintf(tls, _7_nFilename, _7_zLockFile, str(135441), unsafe.Pointer(_zFilename))
+ Xsqlite3_snprintf(tls, _7_nFilename, _7_zLockFile, str(135454), unsafe.Pointer(_zFilename))
_21:
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X7))) = (unsafe.Pointer)(_7_zLockFile)
+ _pNew.XlockingContext = unsafe.Pointer(_7_zLockFile)
_17:
- _storeLastErrno(tls, _pNew, i32(0))
- if _rc == i32(0) {
+ _storeLastErrno(tls, _pNew, int32(0))
+ if _rc == int32(0) {
goto _22
}
- if _h >= i32(0) {
- _robust_close(tls, _pNew, _h, i32(35284))
+ if _h >= int32(0) {
+ _robust_close(tls, _pNew, _h, int32(35284))
}
goto _24
_22:
- *(**Xsqlite3_io_methods)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pNew.X0))))) = _pLockingStyle
+ *(**Xsqlite3_io_methods)(unsafe.Pointer(&_pNew.XpMethod)) = _pLockingStyle
_verifyDbFile(tls, _pNew)
_24:
return _rc
@@ -118343,77 +120274,83 @@ _24:
var _fillInUnixFileØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_fillInUnixFileØ00__func__Ø000[0], str(135449), 15)
+ crt.Xstrncpy(nil, &_fillInUnixFileØ00__func__Ø000[0], str(135462), 15)
}
var _nolockIoMethods Xsqlite3_io_methods
func init() {
- _nolockIoMethods = Xsqlite3_io_methods{X0: i32(3), X1: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ _nolockIoMethods = Xsqlite3_io_methods{XiVersion: int32(3), XxClose: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_nolockClose})), X2: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
+ }{_nolockClose})), XxRead: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32
- }{_unixRead})), X3: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
+ }{_unixRead})), XxWrite: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32
- }{_unixWrite})), X4: *(*func(*crt.TLS, unsafe.Pointer, int64) int32)(unsafe.Pointer(&struct {
+ }{_unixWrite})), XxTruncate: *(*func(*crt.TLS, unsafe.Pointer, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64) int32
- }{_unixTruncate})), X5: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixTruncate})), XxSync: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_unixSync})), X6: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
+ }{_unixSync})), XxFileSize: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, *int64) int32
- }{_unixFileSize})), X7: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixFileSize})), XxLock: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_nolockLock})), X8: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_nolockLock})), XxUnlock: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_nolockUnlock})), X9: *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&struct {
+ }{_nolockUnlock})), XxCheckReservedLock: *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, *int32) int32
- }{_nolockCheckReservedLock})), X10: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_nolockCheckReservedLock})), XxFileControl: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32, unsafe.Pointer) int32
- }{_unixFileControl})), X11: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixFileControl})), XxSectorSize: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_unixSectorSize})), X12: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixSectorSize})), XxDeviceCharacteristics: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_unixDeviceCharacteristics})), X13: nil, X14: *(*func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixDeviceCharacteristics})), XxShmLock: *(*func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32, int32, int32) int32
- }{_unixShmLock})), X15: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_unixShmLock})), XxShmBarrier: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file)
- }{_unixShmBarrier})), X16: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixShmBarrier})), XxShmUnmap: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_unixShmUnmap})), X17: *(*func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixShmUnmap})), XxFetch: *(*func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64, int32, *unsafe.Pointer) int32
- }{_unixFetch})), X18: *(*func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixFetch})), XxUnfetch: *(*func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64, unsafe.Pointer) int32
}{_unixUnfetch}))}
}
-// Close the file.
+// C comment
+// /*
+// ** Close the file.
+// */
func _nolockClose(tls *crt.TLS, _id *Xsqlite3_file) (r0 int32) {
return _closeUnixFile(tls, _id)
}
func _nolockLock(tls *crt.TLS, _NotUsed *Xsqlite3_file, _NotUsed2 int32) (r0 int32) {
_ = _NotUsed2
- return i32(0)
+ return int32(0)
}
func _nolockUnlock(tls *crt.TLS, _NotUsed *Xsqlite3_file, _NotUsed2 int32) (r0 int32) {
_ = _NotUsed2
- return i32(0)
+ return int32(0)
}
func _nolockCheckReservedLock(tls *crt.TLS, _NotUsed *Xsqlite3_file, _pResOut *int32) (r0 int32) {
- *_pResOut = i32(0)
- return i32(0)
-}
-
-// Given a file descriptor, locate the unixInodeInfo object that
-// describes that file descriptor. Create a new one if necessary. The
-// return value might be uninitialized if an error occurs.
-//
-// The mutex entered using the unixEnterMutex() function must be held
-// when this function is called.
-//
-// Return an appropriate error code.
+ *_pResOut = int32(0)
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Given a file descriptor, locate the unixInodeInfo object that
+// ** describes that file descriptor. Create a new one if necessary. The
+// ** return value might be uninitialized if an error occurs.
+// **
+// ** The mutex entered using the unixEnterMutex() function must be held
+// ** when this function is called.
+// **
+// ** Return an appropriate error code.
+// */
func _findInodeInfo(tls *crt.TLS, _pFile *XunixFile, _ppInode **XunixInodeInfo) (r0 int32) {
var _rc, _fd int32
var _statbuf crt.Xstruct_stat64
@@ -118422,263 +120359,283 @@ func _findInodeInfo(tls *crt.TLS, _pFile *XunixFile, _ppInode **XunixInodeInfo)
_pInode = nil
func() {
if _unixMutexHeld(tls) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31154), unsafe.Pointer((*int8)(unsafe.Pointer(&_findInodeInfoØ00__func__Ø000))), unsafe.Pointer(str(132009)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31154), unsafe.Pointer(&_findInodeInfoØ00__func__Ø000), unsafe.Pointer(str(132022)))
crt.X__builtin_abort(tls)
}
}()
- _fd = _pFile.X3
- _rc = (*(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(5)))).X1)})))(tls, _fd, &_statbuf)
- if _rc != i32(0) {
+ _fd = _pFile.Xh
+ _rc = func() func(*crt.TLS, int32, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(5)).XpCurrent
+ return *(*func(*crt.TLS, int32, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _fd, &_statbuf)
+ if _rc != int32(0) {
_storeLastErrno(tls, _pFile, *crt.X__errno_location(tls))
- return i32(10)
+ return int32(10)
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_fileId), i32(0), u32(16))
- *(*uint64)(unsafe.Pointer(&(_fileId.X0))) = _statbuf.X0
- *(*uint64)(unsafe.Pointer(&(_fileId.X1))) = _statbuf.X18
+ crt.Xmemset(tls, unsafe.Pointer(&_fileId), int32(0), uint32(16))
+ _fileId.Xdev = _statbuf.Xst_dev
+ _fileId.Xino = _statbuf.Xst_ino
_pInode = _inodeList
_3:
- if (_pInode != nil) && crt.Xmemcmp(tls, (unsafe.Pointer)(&_fileId), (unsafe.Pointer)((*TunixFileId)(unsafe.Pointer(&(_pInode.X0)))), u32(16)) != 0 {
- _pInode = (*XunixInodeInfo)(_pInode.X8)
+ if (_pInode != nil) && crt.Xmemcmp(tls, unsafe.Pointer(&_fileId), unsafe.Pointer(&_pInode.XfileId), uint32(16)) != 0 {
+ _pInode = (*XunixInodeInfo)(_pInode.XpNext)
goto _3
}
if _pInode != nil {
goto _6
}
- _pInode = (*XunixInodeInfo)(Xsqlite3_malloc64(tls, uint64(u32(48))))
+ _pInode = (*XunixInodeInfo)(Xsqlite3_malloc64(tls, uint64(48)))
if _pInode == nil {
- return _sqlite3NomemError(tls, i32(31208))
+ return _sqlite3NomemError(tls, int32(31208))
}
- crt.Xmemset(tls, (unsafe.Pointer)(_pInode), i32(0), u32(48))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*TunixFileId)(unsafe.Pointer(&(_pInode.X0)))), (unsafe.Pointer)(&_fileId), u32(16))
- *(*int32)(unsafe.Pointer(&(_pInode.X4))) = i32(1)
- *(**XunixInodeInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pInode.X8))))) = _inodeList
- *(**XunixInodeInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pInode.X9))))) = nil
+ crt.Xmemset(tls, unsafe.Pointer(_pInode), int32(0), uint32(48))
+ crt.Xmemcpy(tls, unsafe.Pointer(&_pInode.XfileId), unsafe.Pointer(&_fileId), uint32(16))
+ _pInode.XnRef = int32(1)
+ *(**XunixInodeInfo)(unsafe.Pointer(&_pInode.XpNext)) = _inodeList
+ *(**XunixInodeInfo)(unsafe.Pointer(&_pInode.XpPrev)) = nil
if _inodeList != nil {
- *(**XunixInodeInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_inodeList.X9))))) = _pInode
+ *(**XunixInodeInfo)(unsafe.Pointer(&_inodeList.XpPrev)) = _pInode
}
_inodeList = _pInode
bug20530(_inodeList)
goto _9
_6:
- *(*int32)(unsafe.Pointer(&(_pInode.X4))) += 1
+ _pInode.XnRef += 1
_9:
*_ppInode = _pInode
- return i32(0)
-
- _ = _fileId
- _ = _statbuf
- panic(0)
+ return int32(0)
}
var _findInodeInfoØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_findInodeInfoØ00__func__Ø000[0], str(135464), 14)
+ crt.Xstrncpy(nil, &_findInodeInfoØ00__func__Ø000[0], str(135477), 14)
}
var _dotlockIoMethods Xsqlite3_io_methods
func init() {
- _dotlockIoMethods = Xsqlite3_io_methods{X0: i32(1), X1: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ _dotlockIoMethods = Xsqlite3_io_methods{XiVersion: int32(1), XxClose: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_dotlockClose})), X2: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
+ }{_dotlockClose})), XxRead: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32
- }{_unixRead})), X3: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
+ }{_unixRead})), XxWrite: *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, unsafe.Pointer, int32, int64) int32
- }{_unixWrite})), X4: *(*func(*crt.TLS, unsafe.Pointer, int64) int32)(unsafe.Pointer(&struct {
+ }{_unixWrite})), XxTruncate: *(*func(*crt.TLS, unsafe.Pointer, int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64) int32
- }{_unixTruncate})), X5: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixTruncate})), XxSync: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_unixSync})), X6: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
+ }{_unixSync})), XxFileSize: *(*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, *int64) int32
- }{_unixFileSize})), X7: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixFileSize})), XxLock: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_dotlockLock})), X8: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_dotlockLock})), XxUnlock: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_dotlockUnlock})), X9: *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&struct {
+ }{_dotlockUnlock})), XxCheckReservedLock: *(*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, *int32) int32
- }{_dotlockCheckReservedLock})), X10: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_dotlockCheckReservedLock})), XxFileControl: *(*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32, unsafe.Pointer) int32
- }{_unixFileControl})), X11: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixFileControl})), XxSectorSize: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_unixSectorSize})), X12: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixSectorSize})), XxDeviceCharacteristics: *(*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file) int32
- }{_unixDeviceCharacteristics})), X13: nil, X14: *(*func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixDeviceCharacteristics})), XxShmLock: *(*func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32, int32, int32) int32
- }{_unixShmLock})), X15: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
+ }{_unixShmLock})), XxShmBarrier: *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file)
- }{_unixShmBarrier})), X16: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
+ }{_unixShmBarrier})), XxShmUnmap: *(*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int32) int32
- }{_unixShmUnmap})), X17: *(*func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixShmUnmap})), XxFetch: *(*func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64, int32, *unsafe.Pointer) int32
- }{_unixFetch})), X18: *(*func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
+ }{_unixFetch})), XxUnfetch: *(*func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
f func(*crt.TLS, *Xsqlite3_file, int64, unsafe.Pointer) int32
}{_unixUnfetch}))}
}
-// Close a file. Make sure the lock has been released before closing.
+// C comment
+// /*
+// ** Close a file. Make sure the lock has been released before closing.
+// */
func _dotlockClose(tls *crt.TLS, _id *Xsqlite3_file) (r0 int32) {
var _pFile *XunixFile
_pFile = (*XunixFile)(unsafe.Pointer(_id))
func() {
if _id == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(32100), unsafe.Pointer((*int8)(unsafe.Pointer(&_dotlockCloseØ00__func__Ø000))), unsafe.Pointer(str(135478)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(32100), unsafe.Pointer(&_dotlockCloseØ00__func__Ø000), unsafe.Pointer(str(135491)))
crt.X__builtin_abort(tls)
}
}()
- _dotlockUnlock(tls, _id, i32(0))
- Xsqlite3_free(tls, _pFile.X7)
+ _dotlockUnlock(tls, _id, int32(0))
+ Xsqlite3_free(tls, _pFile.XlockingContext)
return _closeUnixFile(tls, _id)
}
var _dotlockCloseØ00__func__Ø000 [13]int8
func init() {
- crt.Xstrncpy(nil, &_dotlockCloseØ00__func__Ø000[0], str(135484), 13)
+ crt.Xstrncpy(nil, &_dotlockCloseØ00__func__Ø000[0], str(135497), 13)
}
-// Lower the locking level on file descriptor pFile to eFileLock. eFileLock
-// must be either NO_LOCK or SHARED_LOCK.
-//
-// If the locking level of the file descriptor is already at or below
-// the requested locking level, this routine is a no-op.
-//
-// When the locking level reaches NO_LOCK, delete the lock file.
+// C comment
+// /*
+// ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
+// ** must be either NO_LOCK or SHARED_LOCK.
+// **
+// ** If the locking level of the file descriptor is already at or below
+// ** the requested locking level, this routine is a no-op.
+// **
+// ** When the locking level reaches NO_LOCK, delete the lock file.
+// */
func _dotlockUnlock(tls *crt.TLS, _id *Xsqlite3_file, _eFileLock int32) (r0 int32) {
var _rc, _3_tErrno int32
var _zLockFile *int8
var _pFile *XunixFile
_pFile = (*XunixFile)(unsafe.Pointer(_id))
- _zLockFile = (*int8)(_pFile.X7)
+ _zLockFile = (*int8)(_pFile.XlockingContext)
func() {
if _pFile == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(32060), unsafe.Pointer((*int8)(unsafe.Pointer(&_dotlockUnlockØ00__func__Ø000))), unsafe.Pointer(str(58046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(32060), unsafe.Pointer(&_dotlockUnlockØ00__func__Ø000), unsafe.Pointer(str(58022)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _eFileLock > i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(32063), unsafe.Pointer((*int8)(unsafe.Pointer(&_dotlockUnlockØ00__func__Ø000))), unsafe.Pointer(str(131853)))
+ if _eFileLock > int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(32063), unsafe.Pointer(&_dotlockUnlockØ00__func__Ø000), unsafe.Pointer(str(131866)))
crt.X__builtin_abort(tls)
}
}()
- if int32(_pFile.X4) == _eFileLock {
- return i32(0)
+ if int32(_pFile.XeFileLock) == _eFileLock {
+ return int32(0)
}
- if _eFileLock == i32(1) {
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(i32(1))
- return i32(0)
+ if _eFileLock == int32(1) {
+ _pFile.XeFileLock = uint8(1)
+ return int32(0)
}
func() {
- if _eFileLock != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(32079), unsafe.Pointer((*int8)(unsafe.Pointer(&_dotlockUnlockØ00__func__Ø000))), unsafe.Pointer(str(135497)))
+ if _eFileLock != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(32079), unsafe.Pointer(&_dotlockUnlockØ00__func__Ø000), unsafe.Pointer(str(135510)))
crt.X__builtin_abort(tls)
}
}()
- _rc = (*(*func(*crt.TLS, *int8) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(19)))).X1)})))(tls, _zLockFile)
- if _rc >= i32(0) {
+ _rc = func() func(*crt.TLS, *int8) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(19)).XpCurrent
+ return *(*func(*crt.TLS, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, _zLockFile)
+ if _rc >= int32(0) {
goto _8
}
_3_tErrno = *crt.X__errno_location(tls)
- if _3_tErrno == i32(2) {
- _rc = i32(0)
+ if _3_tErrno == int32(2) {
+ _rc = int32(0)
goto _10
}
- _rc = i32(2058)
+ _rc = int32(2058)
_storeLastErrno(tls, _pFile, _3_tErrno)
_10:
return _rc
_8:
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(i32(0))
- return i32(0)
+ _pFile.XeFileLock = 0
+ return int32(0)
}
var _dotlockUnlockØ00__func__Ø000 [14]int8
func init() {
- crt.Xstrncpy(nil, &_dotlockUnlockØ00__func__Ø000[0], str(135516), 14)
-}
-
-// Lock the file with the lock specified by parameter eFileLock - one
-// of the following:
-//
-// (1) SHARED_LOCK
-// (2) RESERVED_LOCK
-// (3) PENDING_LOCK
-// (4) EXCLUSIVE_LOCK
-//
-// Sometimes when requesting one lock state, additional lock states
-// are inserted in between. The locking might fail on one of the later
-// transitions leaving the lock state different from what it started but
-// still short of its goal. The following chart shows the allowed
-// transitions and the inserted intermediate states:
-//
-// UNLOCKED -> SHARED
-// SHARED -> RESERVED
-// SHARED -> (PENDING) -> EXCLUSIVE
-// RESERVED -> (PENDING) -> EXCLUSIVE
-// PENDING -> EXCLUSIVE
-//
-// This routine will only increase a lock. Use the sqlite3OsUnlock()
-// routine to lower a locking level.
-//
-// With dotfile locking, we really only support state (4): EXCLUSIVE.
-// But we track the other locking levels internally.
+ crt.Xstrncpy(nil, &_dotlockUnlockØ00__func__Ø000[0], str(135529), 14)
+}
+
+// C comment
+// /*
+// ** Lock the file with the lock specified by parameter eFileLock - one
+// ** of the following:
+// **
+// ** (1) SHARED_LOCK
+// ** (2) RESERVED_LOCK
+// ** (3) PENDING_LOCK
+// ** (4) EXCLUSIVE_LOCK
+// **
+// ** Sometimes when requesting one lock state, additional lock states
+// ** are inserted in between. The locking might fail on one of the later
+// ** transitions leaving the lock state different from what it started but
+// ** still short of its goal. The following chart shows the allowed
+// ** transitions and the inserted intermediate states:
+// **
+// ** UNLOCKED -> SHARED
+// ** SHARED -> RESERVED
+// ** SHARED -> (PENDING) -> EXCLUSIVE
+// ** RESERVED -> (PENDING) -> EXCLUSIVE
+// ** PENDING -> EXCLUSIVE
+// **
+// ** This routine will only increase a lock. Use the sqlite3OsUnlock()
+// ** routine to lower a locking level.
+// **
+// ** With dotfile locking, we really only support state (4): EXCLUSIVE.
+// ** But we track the other locking levels internally.
+// */
func _dotlockLock(tls *crt.TLS, _id *Xsqlite3_file, _eFileLock int32) (r0 int32) {
var _rc, _2_tErrno int32
var _zLockFile *int8
var _pFile *XunixFile
_pFile = (*XunixFile)(unsafe.Pointer(_id))
- _zLockFile = (*int8)(_pFile.X7)
- _rc = i32(0)
- if int32(_pFile.X4) > i32(0) {
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(_eFileLock)
- crt.Xutimes(tls, _zLockFile, (*[2]crt.Xstruct_timeval)(unsafe.Pointer(nil)))
- return i32(0)
- }
- _rc = (*(*func(*crt.TLS, *int8, uint32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(18)))).X1)})))(tls, _zLockFile, uint32(i32(511)))
- if _rc >= i32(0) {
+ _zLockFile = (*int8)(_pFile.XlockingContext)
+ _rc = int32(0)
+ if int32(_pFile.XeFileLock) > int32(0) {
+ _pFile.XeFileLock = uint8(_eFileLock)
+ crt.Xutimes(tls, _zLockFile, nil)
+ return int32(0)
+ }
+ _rc = func() func(*crt.TLS, *int8, uint32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(18)).XpCurrent
+ return *(*func(*crt.TLS, *int8, uint32) int32)(unsafe.Pointer(&v))
+ }()(tls, _zLockFile, uint32(511))
+ if _rc >= int32(0) {
goto _1
}
_2_tErrno = *crt.X__errno_location(tls)
- if i32(17) == _2_tErrno {
- _rc = i32(5)
+ if int32(17) == _2_tErrno {
+ _rc = int32(5)
goto _3
}
- _rc = _sqliteErrorFromPosixError(tls, _2_tErrno, i32(3850))
- if _rc != i32(5) {
+ _rc = _sqliteErrorFromPosixError(tls, _2_tErrno, int32(3850))
+ if _rc != int32(5) {
_storeLastErrno(tls, _pFile, _2_tErrno)
}
_3:
return _rc
_1:
- *(*uint8)(unsafe.Pointer(&(_pFile.X4))) = uint8(_eFileLock)
+ _pFile.XeFileLock = uint8(_eFileLock)
return _rc
}
-// This routine checks if there is a RESERVED lock held on the specified
-// file by this or any other process. If such a lock is held, set *pResOut
-// to a non-zero value otherwise *pResOut is set to zero. The return value
-// is set to SQLITE_OK unless an I/O error occurs during lock checking.
-//
-// In dotfile locking, either a lock exists or it does not. So in this
-// variation of CheckReservedLock(), *pResOut is set to true if any lock
-// is held on the file and false if the file is unlocked.
+// C comment
+// /*
+// ** This routine checks if there is a RESERVED lock held on the specified
+// ** file by this or any other process. If such a lock is held, set *pResOut
+// ** to a non-zero value otherwise *pResOut is set to zero. The return value
+// ** is set to SQLITE_OK unless an I/O error occurs during lock checking.
+// **
+// ** In dotfile locking, either a lock exists or it does not. So in this
+// ** variation of CheckReservedLock(), *pResOut is set to true if any lock
+// ** is held on the file and false if the file is unlocked.
+// */
func _dotlockCheckReservedLock(tls *crt.TLS, _id *Xsqlite3_file, _pResOut *int32) (r0 int32) {
var _rc, _reserved int32
var _pFile *XunixFile
- _rc = i32(0)
- _reserved = i32(0)
+ _rc = int32(0)
+ _reserved = int32(0)
_pFile = (*XunixFile)(unsafe.Pointer(_id))
func() {
if _pFile == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(31971), unsafe.Pointer((*int8)(unsafe.Pointer(&_dotlockCheckReservedLockØ00__func__Ø000))), unsafe.Pointer(str(58046)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(31971), unsafe.Pointer(&_dotlockCheckReservedLockØ00__func__Ø000), unsafe.Pointer(str(58022)))
crt.X__builtin_abort(tls)
}
}()
- _reserved = bool2int((*(*func(*crt.TLS, *int8, int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(2)))).X1)})))(tls, (*int8)(_pFile.X7), i32(0)) == i32(0))
+ _reserved = bool2int(func() func(*crt.TLS, *int8, int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(2)).XpCurrent
+ return *(*func(*crt.TLS, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, (*int8)(_pFile.XlockingContext), int32(0)) == int32(0))
*_pResOut = _reserved
return _rc
}
@@ -118686,47 +120643,56 @@ func _dotlockCheckReservedLock(tls *crt.TLS, _id *Xsqlite3_file, _pResOut *int32
var _dotlockCheckReservedLockØ00__func__Ø000 [25]int8
func init() {
- crt.Xstrncpy(nil, &_dotlockCheckReservedLockØ00__func__Ø000[0], str(135530), 25)
+ crt.Xstrncpy(nil, &_dotlockCheckReservedLockØ00__func__Ø000[0], str(135543), 25)
}
-// Delete the file at zPath. If the dirSync argument is true, fsync()
-// the directory after deleting the file.
+// C comment
+// /*
+// ** Delete the file at zPath. If the dirSync argument is true, fsync()
+// ** the directory after deleting the file.
+// */
func _unixDelete(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _zPath *int8, _dirSync int32) (r0 int32) {
var _rc, _4_fd int32
- _rc = i32(0)
+ _rc = int32(0)
- if (*(*func(*crt.TLS, *int8) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(16)))).X1)})))(tls, _zPath) != i32(-1) {
+ if func() func(*crt.TLS, *int8) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(16)).XpCurrent
+ return *(*func(*crt.TLS, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, _zPath) != int32(-1) {
goto _0
}
- if (*crt.X__errno_location(tls)) == i32(2) {
- _rc = i32(5898)
+ if (*crt.X__errno_location(tls)) == int32(2) {
+ _rc = int32(5898)
goto _2
}
- _rc = _unixLogErrorAtLine(tls, i32(2570), str(131607), _zPath, i32(35819))
+ _rc = _unixLogErrorAtLine(tls, int32(2570), str(131620), _zPath, int32(35819))
_2:
return _rc
_0:
- if (_dirSync & i32(1)) == i32(0) {
+ if (_dirSync & int32(1)) == int32(0) {
goto _3
}
- _rc = (*(*func(*crt.TLS, *int8, *int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(17)))).X1)})))(tls, _zPath, &_4_fd)
- if _rc != i32(0) {
+ _rc = func() func(*crt.TLS, *int8, *int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(17)).XpCurrent
+ return *(*func(*crt.TLS, *int8, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _zPath, &_4_fd)
+ if _rc != int32(0) {
goto _4
}
- if _full_fsync(tls, _4_fd, i32(0), i32(0)) != 0 {
- _rc = _unixLogErrorAtLine(tls, i32(1290), str(135555), _zPath, i32(35829))
+ if _full_fsync(tls, _4_fd, int32(0), int32(0)) != 0 {
+ _rc = _unixLogErrorAtLine(tls, int32(1290), str(135568), _zPath, int32(35829))
}
- _robust_close(tls, nil, _4_fd, i32(35831))
+ _robust_close(tls, nil, _4_fd, int32(35831))
goto _6
_4:
func() {
- if _rc != i32(14) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35833), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixDeleteØ00__func__Ø000))), unsafe.Pointer(str(132437)))
+ if _rc != int32(14) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35833), unsafe.Pointer(&_unixDeleteØ00__func__Ø000), unsafe.Pointer(str(132450)))
crt.X__builtin_abort(tls)
}
}()
- _rc = i32(0)
+ _rc = int32(0)
_6:
_3:
return _rc
@@ -118735,83 +120701,95 @@ _3:
var _unixDeleteØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_unixDeleteØ00__func__Ø000[0], str(135561), 11)
+ crt.Xstrncpy(nil, &_unixDeleteØ00__func__Ø000[0], str(135574), 11)
}
-// Test the existence of or access permissions of file zPath. The
-// test performed depends on the value of flags:
-//
-// SQLITE_ACCESS_EXISTS: Return 1 if the file exists
-// SQLITE_ACCESS_READWRITE: Return 1 if the file is read and writable.
-// SQLITE_ACCESS_READONLY: Return 1 if the file is readable.
-//
-// Otherwise return 0.
+// C comment
+// /*
+// ** Test the existence of or access permissions of file zPath. The
+// ** test performed depends on the value of flags:
+// **
+// ** SQLITE_ACCESS_EXISTS: Return 1 if the file exists
+// ** SQLITE_ACCESS_READWRITE: Return 1 if the file is read and writable.
+// ** SQLITE_ACCESS_READONLY: Return 1 if the file is readable.
+// **
+// ** Otherwise return 0.
+// */
func _unixAccess(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _zPath *int8, _flags int32, _pResOut *int32) (r0 int32) {
var _1_buf crt.Xstruct_stat64
func() {
if _pResOut == nil {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35859), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixAccessØ00__func__Ø000))), unsafe.Pointer(str(135572)))
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35859), unsafe.Pointer(&_unixAccessØ00__func__Ø000), unsafe.Pointer(str(135585)))
crt.X__builtin_abort(tls)
}
}()
func() {
- if _flags != i32(0) && _flags != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35863), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixAccessØ00__func__Ø000))), unsafe.Pointer(str(135583)))
+ if _flags != int32(0) && _flags != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35863), unsafe.Pointer(&_unixAccessØ00__func__Ø000), unsafe.Pointer(str(135596)))
crt.X__builtin_abort(tls)
}
}()
- if _flags == i32(0) {
- *_pResOut = bool2int((i32(0) == (*(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(4)))).X1)})))(tls, _zPath, &_1_buf)) && ((_1_buf.X9) > int64(i32(0))))
+ if _flags == int32(0) {
+ *_pResOut = bool2int((int32(0) == func() func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(4)).XpCurrent
+ return *(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _zPath, &_1_buf)) && (_1_buf.Xst_size > (0)))
goto _7
}
- *_pResOut = bool2int((*(*func(*crt.TLS, *int8, int32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(2)))).X1)})))(tls, _zPath, i32(6)) == i32(0))
+ *_pResOut = bool2int(func() func(*crt.TLS, *int8, int32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(2)).XpCurrent
+ return *(*func(*crt.TLS, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _zPath, int32(6)) == int32(0))
_7:
- return i32(0)
-
- _ = _1_buf
- panic(0)
+ return int32(0)
}
var _unixAccessØ00__func__Ø000 [11]int8
func init() {
- crt.Xstrncpy(nil, &_unixAccessØ00__func__Ø000[0], str(135645), 11)
+ crt.Xstrncpy(nil, &_unixAccessØ00__func__Ø000[0], str(135658), 11)
}
-// Turn a relative pathname into a full pathname. The relative path
-// is stored as a nul-terminated string in the buffer pointed to by
-// zPath.
-//
-// zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes
-// (in this case, MAX_PATHNAME bytes). The full-path is written to
-// this buffer before returning.
+// C comment
+// /*
+// ** Turn a relative pathname into a full pathname. The relative path
+// ** is stored as a nul-terminated string in the buffer pointed to by
+// ** zPath.
+// **
+// ** zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes
+// ** (in this case, MAX_PATHNAME bytes). The full-path is written to
+// ** this buffer before returning.
+// */
func _unixFullPathname(tls *crt.TLS, _pVfs *Xsqlite3_vfs, _zPath *int8, _nOut int32, _zOut *int8) (r0 int32) {
var _rc, _nByte, _nLink, _1_bLink, _11_n int32
var _zIn, _zDel *int8
var _1_buf crt.Xstruct_stat64
- _rc = i32(0)
- _nLink = i32(1)
+ _rc = int32(0)
+ _nLink = int32(1)
_zIn = _zPath
_zDel = nil
func() {
- if (_pVfs.X2) != i32(512) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35925), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixFullPathnameØ00__func__Ø000))), unsafe.Pointer(str(135656)))
+ if _pVfs.XmxPathname != int32(512) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35925), unsafe.Pointer(&_unixFullPathnameØ00__func__Ø000), unsafe.Pointer(str(135669)))
crt.X__builtin_abort(tls)
}
}()
_2:
- _1_bLink = i32(0)
- if (*(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(27)))).X1)})))(tls, _zIn, &_1_buf) == i32(0) {
+ _1_bLink = int32(0)
+ if func() func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(27)).XpCurrent
+ return *(*func(*crt.TLS, *int8, *crt.Xstruct_stat64) int32)(unsafe.Pointer(&v))
+ }()(tls, _zIn, &_1_buf) == int32(0) {
goto _3
}
- if (*crt.X__errno_location(tls)) != i32(2) {
- _rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, i32(35943)), str(131695), _zIn, i32(35943))
+ if (*crt.X__errno_location(tls)) != int32(2) {
+ _rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(35943)), str(131708), _zIn, int32(35943))
}
goto _5
_3:
- _1_bLink = bool2int(((_1_buf.X3) & uint32(i32(61440))) == uint32(i32(40960)))
+ _1_bLink = bool2int((_1_buf.Xst_mode & uint32(61440)) == uint32(40960))
_5:
if _1_bLink == 0 {
goto _6
@@ -118821,120 +120799,127 @@ _5:
}
_zDel = (*int8)(Xsqlite3_malloc(tls, _nOut))
if _zDel == nil {
- _rc = _sqlite3NomemError(tls, i32(35952))
+ _rc = _sqlite3NomemError(tls, int32(35952))
}
goto _10
_7:
- if preInc1(&_nLink, 1) > i32(100) {
- _rc = _sqlite3CantopenError(tls, i32(35954))
+ if preInc2(&_nLink, 1) > int32(100) {
+ _rc = _sqlite3CantopenError(tls, int32(35954))
}
_10:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _11
}
- _nByte = (*(*func(*crt.TLS, *int8, *int8, uint32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(26)))).X1)})))(tls, _zIn, _zDel, uint32(_nOut-i32(1)))
- if _nByte < i32(0) {
- _rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, i32(35960)), str(131686), _zIn, i32(35960))
+ _nByte = func() func(*crt.TLS, *int8, *int8, uint32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(26)).XpCurrent
+ return *(*func(*crt.TLS, *int8, *int8, uint32) int32)(unsafe.Pointer(&v))
+ }()(tls, _zIn, _zDel, uint32(_nOut-int32(1)))
+ if _nByte < int32(0) {
+ _rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(35960)), str(131699), _zIn, int32(35960))
goto _13
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zDel)) + 1*uintptr(i32(0))))) == i32(47) {
+ if int32(*elem1(_zDel, 0)) == int32(47) {
goto _14
}
_11_n = _sqlite3Strlen30(tls, _zIn)
_15:
- if _11_n <= i32(0) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIn)) + 1*uintptr(_11_n-i32(1))))) == i32(47) {
+ if _11_n <= int32(0) || int32(*elem1(_zIn, uintptr(_11_n-int32(1)))) == int32(47) {
goto _19
}
_11_n -= 1
goto _15
_19:
- if ((_nByte + _11_n) + i32(1)) > _nOut {
- _rc = _sqlite3CantopenError(tls, i32(35966))
+ if ((_nByte + _11_n) + int32(1)) > _nOut {
+ _rc = _sqlite3CantopenError(tls, int32(35966))
goto _21
}
- crt.Xmemmove(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zDel))+1*uintptr(_11_n)))), (unsafe.Pointer)(_zDel), uint32(_nByte+i32(1)))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zDel), (unsafe.Pointer)(_zIn), uint32(_11_n))
- {
- p := &_nByte
- *p = (*p) + _11_n
- sink1(*p)
- }
+ crt.Xmemmove(tls, unsafe.Pointer(elem1(_zDel, uintptr(_11_n))), unsafe.Pointer(_zDel), uint32(_nByte+int32(1)))
+ crt.Xmemcpy(tls, unsafe.Pointer(_zDel), unsafe.Pointer(_zIn), uint32(_11_n))
+ _nByte += _11_n
_21:
_14:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zDel)) + 1*uintptr(_nByte))) = int8(i32(0))
+ *elem1(_zDel, uintptr(_nByte)) = 0
_13:
_11:
_zIn = _zDel
_6:
func() {
- if _rc == i32(0) && _zIn == _zOut && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIn)) + 1*uintptr(i32(0))))) != i32(47) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(35980), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixFullPathnameØ00__func__Ø000))), unsafe.Pointer(str(135687)))
+ if _rc == int32(0) && _zIn == _zOut && int32(*elem1(_zIn, 0)) != int32(47) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(35980), unsafe.Pointer(&_unixFullPathnameØ00__func__Ø000), unsafe.Pointer(str(135700)))
crt.X__builtin_abort(tls)
}
}()
- if (_rc == i32(0)) && (_zIn != _zOut) {
+ if (_rc == int32(0)) && (_zIn != _zOut) {
_rc = _mkFullPathname(tls, _zIn, _zOut, _nOut)
}
- if _1_bLink == i32(0) {
+ if _1_bLink == int32(0) {
goto _29
}
_zIn = _zOut
- if _rc == i32(0) {
+ if _rc == int32(0) {
goto _2
}
_29:
- Xsqlite3_free(tls, (unsafe.Pointer)(_zDel))
+ Xsqlite3_free(tls, unsafe.Pointer(_zDel))
return _rc
_ = _nLink
- _ = _1_buf
panic(0)
}
var _unixFullPathnameØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_unixFullPathnameØ00__func__Ø000[0], str(135729), 17)
+ crt.Xstrncpy(nil, &_unixFullPathnameØ00__func__Ø000[0], str(135742), 17)
}
-//
+// C comment
+// /*
+// **
+// */
func _mkFullPathname(tls *crt.TLS, _zPath *int8, _zOut *int8, _nOut int32) (r0 int32) {
var _nPath, _iOff int32
_nPath = _sqlite3Strlen30(tls, _zPath)
- _iOff = i32(0)
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zPath)) + 1*uintptr(i32(0))))) == i32(47) {
+ _iOff = int32(0)
+ if int32(*elem1(_zPath, 0)) == int32(47) {
goto _0
}
- if (*(*func(*crt.TLS, *int8, uint32) *int8)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(3)))).X1)})))(tls, _zOut, uint32(_nOut-i32(2))) == nil {
- return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, i32(35886)), str(131515), _zPath, i32(35886))
+ if func() func(*crt.TLS, *int8, uint32) *int8 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(3)).XpCurrent
+ return *(*func(*crt.TLS, *int8, uint32) *int8)(unsafe.Pointer(&v))
+ }()(tls, _zOut, uint32(_nOut-int32(2))) == nil {
+ return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(35886)), str(131528), _zPath, int32(35886))
}
_iOff = _sqlite3Strlen30(tls, _zOut)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(postInc1(&_iOff, int32(1))))) = int8(i32(47))
+ *elem1(_zOut, uintptr(postInc2(&_iOff, 1))) = int8(47)
_0:
- if ((_iOff + _nPath) + i32(1)) > _nOut {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(_iOff))) = int8(i32(0))
- return _sqlite3CantopenError(tls, i32(35895))
+ if ((_iOff + _nPath) + int32(1)) > _nOut {
+ *elem1(_zOut, uintptr(_iOff)) = 0
+ return _sqlite3CantopenError(tls, int32(35895))
}
- Xsqlite3_snprintf(tls, _nOut-_iOff, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut))+1*uintptr(_iOff))), str(24576), unsafe.Pointer(_zPath))
- return i32(0)
+ Xsqlite3_snprintf(tls, _nOut-_iOff, elem1(_zOut, uintptr(_iOff)), str(24531), unsafe.Pointer(_zPath))
+ return int32(0)
}
func _unixDlOpen(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _zFilename *int8) (r0 unsafe.Pointer) {
- return crt.Xdlopen(tls, _zFilename, i32(258))
+ return crt.Xdlopen(tls, _zFilename, int32(258))
}
-// SQLite calls this function immediately after a call to unixDlSym() or
-// unixDlOpen() fails (returns a null pointer). If a more detailed error
-// message is available, it is written to zBufOut. If no error message
-// is available, zBufOut is left unmodified and SQLite uses a default
-// error message.
+// C comment
+// /*
+// ** SQLite calls this function immediately after a call to unixDlSym() or
+// ** unixDlOpen() fails (returns a null pointer). If a more detailed error
+// ** message is available, it is written to zBufOut. If no error message
+// ** is available, zBufOut is left unmodified and SQLite uses a default
+// ** error message.
+// */
func _unixDlError(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _nBuf int32, _zBufOut *int8) {
var _zErr *int8
_unixEnterMutex(tls)
_zErr = crt.Xdlerror(tls)
if _zErr != nil {
- Xsqlite3_snprintf(tls, _nBuf, _zBufOut, str(24576), unsafe.Pointer(_zErr))
+ Xsqlite3_snprintf(tls, _nBuf, _zBufOut, str(24531), unsafe.Pointer(_zErr))
}
_unixLeaveMutex(tls)
}
@@ -118942,9 +120927,10 @@ func _unixDlError(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _nBuf int32, _zBufOut *i
func _unixDlSym(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _p unsafe.Pointer, _zSym *int8) (r0 func(*crt.TLS)) {
var _x func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS)
- _x = *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer
- }{(crt.Xdlsym)}))
+ _x = func() func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS) {
+ v := crt.Xdlsym
+ return *(*func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&v))
+ }()
return _x(tls, _p, _zSym)
}
@@ -118952,152 +120938,167 @@ func _unixDlClose(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _pHandle unsafe.Pointer)
crt.Xdlclose(tls, _pHandle)
}
-// Write nBuf bytes of random data to the supplied buffer zBuf.
+// C comment
+// /*
+// ** Write nBuf bytes of random data to the supplied buffer zBuf.
+// */
func _unixRandomness(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _nBuf int32, _zBuf *int8) (r0 int32) {
var _1_fd, _1_got, _2_t int32
func() {
- if uint32(_nBuf) < u32(8) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(36061), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixRandomnessØ00__func__Ø000))), unsafe.Pointer(str(135746)))
+ if uint32(_nBuf) < uint32(8) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(36061), unsafe.Pointer(&_unixRandomnessØ00__func__Ø000), unsafe.Pointer(str(135759)))
crt.X__builtin_abort(tls)
}
}()
- crt.Xmemset(tls, (unsafe.Pointer)(_zBuf), i32(0), uint32(_nBuf))
+ crt.Xmemset(tls, unsafe.Pointer(_zBuf), int32(0), uint32(_nBuf))
_randomnessPid = crt.Xgetpid(tls)
bug20530(_randomnessPid)
- _1_fd = _robust_open(tls, str(135789), i32(0), uint32(i32(0)))
- if _1_fd < i32(0) {
+ _1_fd = _robust_open(tls, str(135802), int32(0), 0)
+ if _1_fd < int32(0) {
crt.Xtime(tls, &_2_t)
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zBuf), (unsafe.Pointer)(&_2_t), u32(4))
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf))+1*uintptr(u32(4))))), (unsafe.Pointer)(&_randomnessPid), u32(4))
+ crt.Xmemcpy(tls, unsafe.Pointer(_zBuf), unsafe.Pointer(&_2_t), uint32(4))
+ crt.Xmemcpy(tls, unsafe.Pointer(elem1(_zBuf, uintptr(4))), unsafe.Pointer(&_randomnessPid), uint32(4))
func() {
- if u32(8) > uint32(_nBuf) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(36086), unsafe.Pointer((*int8)(unsafe.Pointer(&_unixRandomnessØ00__func__Ø000))), unsafe.Pointer(str(135802)))
+ if uint32(8) > uint32(_nBuf) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(36086), unsafe.Pointer(&_unixRandomnessØ00__func__Ø000), unsafe.Pointer(str(135815)))
crt.X__builtin_abort(tls)
}
}()
- _nBuf = int32(u32(8))
+ _nBuf = int32(8)
goto _5
}
_6:
- _1_got = (*(*func(*crt.TLS, int32, unsafe.Pointer, uint32) int32)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(i32(8)))).X1)})))(tls, _1_fd, (unsafe.Pointer)(_zBuf), uint32(_nBuf))
- if (_1_got < i32(0)) && ((*crt.X__errno_location(tls)) == i32(4)) {
+ _1_got = func() func(*crt.TLS, int32, unsafe.Pointer, uint32) int32 {
+ v := elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(8)).XpCurrent
+ return *(*func(*crt.TLS, int32, unsafe.Pointer, uint32) int32)(unsafe.Pointer(&v))
+ }()(tls, _1_fd, unsafe.Pointer(_zBuf), uint32(_nBuf))
+ if (_1_got < int32(0)) && ((*crt.X__errno_location(tls)) == int32(4)) {
goto _6
}
- _robust_close(tls, nil, _1_fd, i32(36090))
+ _robust_close(tls, nil, _1_fd, int32(36090))
_5:
return _nBuf
-
- _ = _2_t
- panic(0)
}
var _unixRandomnessØ00__func__Ø000 [15]int8
func init() {
- crt.Xstrncpy(nil, &_unixRandomnessØ00__func__Ø000[0], str(135848), 15)
+ crt.Xstrncpy(nil, &_unixRandomnessØ00__func__Ø000[0], str(135861), 15)
}
-// Sleep for a little while. Return the amount of time slept.
-// The argument is the number of microseconds we want to sleep.
-// The return value is the number of microseconds of sleep actually
-// requested from the underlying operating system, a number which
-// might be greater than or equal to the argument, but not less
-// than the argument.
+// C comment
+// /*
+// ** Sleep for a little while. Return the amount of time slept.
+// ** The argument is the number of microseconds we want to sleep.
+// ** The return value is the number of microseconds of sleep actually
+// ** requested from the underlying operating system, a number which
+// ** might be greater than or equal to the argument, but not less
+// ** than the argument.
+// */
func _unixSleep(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _microseconds int32) (r0 int32) {
crt.Xusleep(tls, uint32(_microseconds))
return _microseconds
}
-// Find the current time (in Universal Coordinated Time). Write the
-// current time and date as a Julian Day number into *prNow and
-// return 0. Return 1 if the time and date cannot be found.
+// C comment
+// /*
+// ** Find the current time (in Universal Coordinated Time). Write the
+// ** current time and date as a Julian Day number into *prNow and
+// ** return 0. Return 1 if the time and date cannot be found.
+// */
func _unixCurrentTime(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _prNow *float64) (r0 int32) {
var _rc int32
var _i int64
- _i = i64(0)
+ _i = int64(0)
_rc = _unixCurrentTimeInt64(tls, nil, &_i)
*_prNow = float64(_i) / (8.64e+07)
return _rc
}
-// Find the current time (in Universal Coordinated Time). Write into *piNow
-// the current time and date as a Julian Day number times 86_400_000. In
-// other words, write into *piNow the number of milliseconds since the Julian
-// epoch of noon in Greenwich on November 24, 4714 B.C according to the
-// proleptic Gregorian calendar.
-//
-// On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date
-// cannot be found.
+// C comment
+// /*
+// ** Find the current time (in Universal Coordinated Time). Write into *piNow
+// ** the current time and date as a Julian Day number times 86_400_000. In
+// ** other words, write into *piNow the number of milliseconds since the Julian
+// ** epoch of noon in Greenwich on November 24, 4714 B.C according to the
+// ** proleptic Gregorian calendar.
+// **
+// ** On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date
+// ** cannot be found.
+// */
func _unixCurrentTimeInt64(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _piNow *int64) (r0 int32) {
var _rc int32
var _sNow crt.Xstruct_timeval
- _rc = i32(0)
+ _rc = int32(0)
crt.Xgettimeofday(tls, &_sNow, nil)
- *_piNow = (_unixCurrentTimeInt64Ø00unixEpochØ001 + (int64(i32(1000)) * int64(_sNow.X0))) + int64((_sNow.X1)/i32(1000))
+ *_piNow = (_unixCurrentTimeInt64Ø00unixEpochØ001 + (int64(1000) * int64(_sNow.Xtv_sec))) + int64(_sNow.Xtv_usec/int32(1000))
return _rc
-
- _ = _sNow
- panic(0)
}
var _unixCurrentTimeInt64Ø00unixEpochØ001 int64
func init() {
- _unixCurrentTimeInt64Ø00unixEpochØ001 = i64(210866760000000)
+ _unixCurrentTimeInt64Ø00unixEpochØ001 = int64(210866760000000)
}
-// The xGetLastError() method is designed to return a better
-// low-level error message when operating-system problems come up
-// during SQLite operation. Only the integer return code is currently
-// used.
+// C comment
+// /*
+// ** The xGetLastError() method is designed to return a better
+// ** low-level error message when operating-system problems come up
+// ** during SQLite operation. Only the integer return code is currently
+// ** used.
+// */
func _unixGetLastError(tls *crt.TLS, _NotUsed *Xsqlite3_vfs, _NotUsed2 int32, _NotUsed3 *int8) (r0 int32) {
return *crt.X__errno_location(tls)
}
-// This is the xSetSystemCall() method of sqlite3_vfs for all of the
-// "unix" VFSes. Return SQLITE_OK opon successfully updating the
-// system call pointer, or SQLITE_NOTFOUND if there is no configurable
-// system call named zName.
+// C comment
+// /*
+// ** This is the xSetSystemCall() method of sqlite3_vfs for all of the
+// ** "unix" VFSes. Return SQLITE_OK opon successfully updating the
+// ** system call pointer, or SQLITE_NOTFOUND if there is no configurable
+// ** system call named zName.
+// */
func _unixSetSystemCall(tls *crt.TLS, _pNotUsed *Xsqlite3_vfs, _zName *int8, _pNewFunc func(*crt.TLS)) (r0 int32) {
var _rc int32
var _i uint32
- _rc = i32(12)
+ _rc = int32(12)
if _zName != nil {
goto _0
}
- _rc = i32(0)
- _i = uint32(i32(0))
+ _rc = int32(0)
+ _i = 0
_1:
- if _i >= u32(28) {
+ if _i >= uint32(28) {
goto _4
}
- if ((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X2) != nil {
- *(*func(*crt.TLS))(unsafe.Pointer(&((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X1))) = (*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X2
+ if (elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpDefault) != nil {
+ elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpCurrent = elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpDefault
}
_i += 1
goto _1
_4:
goto _6
_0:
- _i = uint32(i32(0))
+ _i = 0
_7:
- if _i >= u32(28) {
+ if _i >= uint32(28) {
goto _10
}
- if crt.Xstrcmp(tls, _zName, (*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall))+12*uintptr(_i))).X0) != i32(0) {
+ if crt.Xstrcmp(tls, _zName, elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XzName) != int32(0) {
goto _11
}
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X2)})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{nil})) {
- *(*func(*crt.TLS))(unsafe.Pointer(&((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X2))) = (*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X1
+ if (elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpDefault) == nil {
+ elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpDefault = elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpCurrent
}
- _rc = i32(0)
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{_pNewFunc})) == *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{nil})) {
- _pNewFunc = (*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X2
+ _rc = int32(0)
+ if _pNewFunc == nil {
+ _pNewFunc = elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpDefault
}
- *(*func(*crt.TLS))(unsafe.Pointer(&((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X1))) = _pNewFunc
+ elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpCurrent = _pNewFunc
goto _10
_11:
_i += 1
@@ -119107,19 +121108,22 @@ _6:
return _rc
}
-// Return the value of a system call. Return NULL if zName is not a
-// recognized system call name. NULL is also returned if the system call
-// is currently undefined.
+// C comment
+// /*
+// ** Return the value of a system call. Return NULL if zName is not a
+// ** recognized system call name. NULL is also returned if the system call
+// ** is currently undefined.
+// */
func _unixGetSystemCall(tls *crt.TLS, _pNotUsed *Xsqlite3_vfs, _zName *int8) (r0 func(*crt.TLS)) {
var _i uint32
- _i = uint32(i32(0))
+ _i = 0
_0:
- if _i >= u32(28) {
+ if _i >= uint32(28) {
goto _3
}
- if crt.Xstrcmp(tls, _zName, (*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall))+12*uintptr(_i))).X0) == i32(0) {
- return (*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X1
+ if crt.Xstrcmp(tls, _zName, elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XzName) == int32(0) {
+ return elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpCurrent
}
_i += 1
goto _0
@@ -119127,23 +121131,26 @@ _3:
return nil
}
-// Return the name of the first system call after zName. If zName==NULL
-// then return the name of the first system call. Return NULL if zName
-// is the last system call or if zName is not the name of a valid
-// system call.
+// C comment
+// /*
+// ** Return the name of the first system call after zName. If zName==NULL
+// ** then return the name of the first system call. Return NULL if zName
+// ** is the last system call or if zName is not the name of a valid
+// ** system call.
+// */
func _unixNextSystemCall(tls *crt.TLS, _p *Xsqlite3_vfs, _zName *int8) (r0 *int8) {
var _i int32
- _i = i32(-1)
+ _i = int32(-1)
if _zName == nil {
goto _0
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= i32(27) {
+ if _i >= int32(27) {
goto _4
}
- if crt.Xstrcmp(tls, _zName, (*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall))+12*uintptr(_i))).X0) == i32(0) {
+ if crt.Xstrcmp(tls, _zName, elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XzName) == int32(0) {
goto _4
}
_i += 1
@@ -119152,11 +121159,11 @@ _4:
_0:
_i += 1
_6:
- if _i >= i32(28) {
+ if _i >= int32(28) {
goto _9
}
- if *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{((*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X1)})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct{ f func(*crt.TLS) }{nil})) {
- return (*Tunix_syscall)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aSyscall)) + 12*uintptr(_i))).X0
+ if (elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XpCurrent) != nil {
+ return elem134((*Tunix_syscall)(unsafe.Pointer(&_aSyscall)), uintptr(_i)).XzName
}
_i += 1
goto _6
@@ -119184,152 +121191,165 @@ func _dotlockIoFinderImpl(tls *crt.TLS, _z *int8, _p *XunixFile) (r0 *Xsqlite3_i
return &_dotlockIoMethods
}
-// This function is called during initialization if a static buffer is
-// supplied to use for the page-cache by passing the SQLITE_CONFIG_PAGECACHE
-// verb to sqlite3_config(). Parameter pBuf points to an allocation large
-// enough to contain 'n' buffers of 'sz' bytes each.
-//
-// This routine is called from sqlite3_initialize() and so it is guaranteed
-// to be serialized already. There is no need for further mutexing.
+// C comment
+// /*
+// ** This function is called during initialization if a static buffer is
+// ** supplied to use for the page-cache by passing the SQLITE_CONFIG_PAGECACHE
+// ** verb to sqlite3_config(). Parameter pBuf points to an allocation large
+// ** enough to contain 'n' buffers of 'sz' bytes each.
+// **
+// ** This routine is called from sqlite3_initialize() and so it is guaranteed
+// ** to be serialized already. There is no need for further mutexing.
+// */
func _sqlite3PCacheBufferSetup(tls *crt.TLS, _pBuf unsafe.Pointer, _sz int32, _n int32) {
- var _1_p *Xsqlite3_file
- if (_pcache1_g.X1) == 0 {
+ var _1_p *XScratchFreeslot
+ if _pcache1_g.XisInit == 0 {
goto _0
}
if _pBuf == nil {
- _sz = store1(&_n, i32(0))
+ _sz = store2(&_n, int32(0))
}
- _sz = _sz & i32(-8)
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X4))) = _sz
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X5))) = store1((*int32)(unsafe.Pointer(&(_pcache1_g.X11))), _n)
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X6))) = func() int32 {
- if _n > i32(90) {
- return i32(10)
+ _sz = _sz & int32(-8)
+ _pcache1_g.XszSlot = _sz
+ _pcache1_g.XnSlot = store2(&_pcache1_g.XnFreeSlot, _n)
+ _pcache1_g.XnReserve = func() int32 {
+ if _n > int32(90) {
+ return int32(10)
}
- return ((_n / i32(10)) + i32(1))
+ return ((_n / int32(10)) + int32(1))
}()
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pcache1_g.X7))) = _pBuf
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pcache1_g.X10))))) = nil
- *(*int32)(unsafe.Pointer(&(_pcache1_g.X12))) = i32(0)
+ _pcache1_g.XpStart = _pBuf
+ *(**XScratchFreeslot)(unsafe.Pointer(&_pcache1_g.XpFree)) = nil
+ _pcache1_g.XbUnderPressure = int32(0)
_4:
- if postInc1(&_n, int32(-1)) != 0 {
- _1_p = (*Xsqlite3_file)(_pBuf)
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_p.X0))))) = (*Xsqlite3_file)(_pcache1_g.X10)
- *(**Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pcache1_g.X10))))) = _1_p
- _pBuf = (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(_pBuf) + 1*uintptr(_sz))))
+ if postInc2(&_n, -1) != 0 {
+ _1_p = (*XScratchFreeslot)(_pBuf)
+ *(**XScratchFreeslot)(unsafe.Pointer(&_1_p.XpNext)) = (*XScratchFreeslot)(_pcache1_g.XpFree)
+ *(**XScratchFreeslot)(unsafe.Pointer(&_pcache1_g.XpFree)) = _1_p
+ _pBuf = unsafe.Pointer(elem1((*int8)(_pBuf), uintptr(_sz)))
goto _4
}
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pcache1_g.X8))) = _pBuf
+ _pcache1_g.XpEnd = _pBuf
_0:
}
var _sqlite3_initializeØ00__func__Ø000 [19]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3_initializeØ00__func__Ø000[0], str(135863), 19)
+ crt.Xstrncpy(nil, &_sqlite3_initializeØ00__func__Ø000[0], str(135876), 19)
}
var _enlargeAndAppendØ00__func__Ø000 [17]int8
func init() {
- crt.Xstrncpy(nil, &_enlargeAndAppendØ00__func__Ø000[0], str(135882), 17)
+ crt.Xstrncpy(nil, &_enlargeAndAppendØ00__func__Ø000[0], str(135895), 17)
}
-// Extra argument values from a PrintfArguments object
+// C comment
+// /*
+// ** Extra argument values from a PrintfArguments object
+// */
func _getIntArg(tls *crt.TLS, _p *XPrintfArguments) (r0 int64) {
- if (_p.X0) <= (_p.X1) {
- return int64(i32(0))
+ if _p.XnArg <= _p.XnUsed {
+ return 0
}
- return Xsqlite3_value_int64(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2)) + 4*uintptr(postInc1((*int32)(unsafe.Pointer(&(_p.X1))), int32(1))))))
+ return Xsqlite3_value_int64(tls, *elem19((**XMem)(unsafe.Pointer(_p.XapArg)), uintptr(postInc2(&_p.XnUsed, 1))))
}
var _sqlite3VXPrintfØ00__func__Ø000 [16]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VXPrintfØ00__func__Ø000[0], str(135899), 16)
+ crt.Xstrncpy(nil, &_sqlite3VXPrintfØ00__func__Ø000[0], str(135912), 16)
}
var _fmtinfo [23]Xet_info
func init() {
- _fmtinfo = [23]Xet_info{Xet_info{X0: i8(100), X1: u8(10), X2: u8(1), X3: u8(16), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(115), X1: u8(0), X2: u8(4), X3: u8(5), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(103), X1: u8(0), X2: u8(1), X3: u8(3), X4: u8(30), X5: u8(0)}, Xet_info{X0: i8(122), X1: u8(0), X2: u8(4), X3: u8(6), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(113), X1: u8(0), X2: u8(4), X3: u8(9), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(81), X1: u8(0), X2: u8(4), X3: u8(10), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(119), X1: u8(0), X2: u8(4), X3: u8(14), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(99), X1: u8(0), X2: u8(0), X3: u8(8), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(111), X1: u8(8), X2: u8(0), X3: u8(0), X4: u8(0), X5: u8(2)}, Xet_info{X0: i8(117), X1: u8(10), X2: u8(0), X3: u8(16), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(120), X1: u8(16), X2: u8(0), X3: u8(0), X4: u8(16), X5: u8(1)}, Xet_info{X0: i8(88), X1: u8(16), X2: u8(0), X3: u8(0), X4: u8(0), X5: u8(4)}, Xet_info{X0: i8(102), X1: u8(0), X2: u8(1), X3: u8(1), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(101), X1: u8(0), X2: u8(1), X3: u8(2), X4: u8(30), X5: u8(0)}, Xet_info{X0: i8(69), X1: u8(0), X2: u8(1), X3: u8(2), X4: u8(14), X5: u8(0)}, Xet_info{X0: i8(71), X1: u8(0), X2: u8(1), X3: u8(3), X4: u8(14), X5: u8(0)}, Xet_info{X0: i8(105), X1: u8(10), X2: u8(1), X3: u8(16), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(110), X1: u8(0), X2: u8(0), X3: u8(4), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(37), X1: u8(0), X2: u8(0), X3: u8(7), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(112), X1: u8(16), X2: u8(0), X3: u8(13), X4: u8(0), X5: u8(1)}, Xet_info{X0: i8(84), X1: u8(0), X2: u8(0), X3: u8(11), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(83), X1: u8(0), X2: u8(0), X3: u8(12), X4: u8(0), X5: u8(0)}, Xet_info{X0: i8(114), X1: u8(10), X2: u8(1), X3: u8(15), X4: u8(0), X5: u8(0)}}
+ _fmtinfo = [23]Xet_info{Xet_info{Xfmttype: int8(100), Xbase: uint8(10), Xflags: uint8(1), Xtype: uint8(16)}, Xet_info{Xfmttype: int8(115), Xflags: uint8(4), Xtype: uint8(5)}, Xet_info{Xfmttype: int8(103), Xflags: uint8(1), Xtype: uint8(3), Xcharset: uint8(30)}, Xet_info{Xfmttype: int8(122), Xflags: uint8(4), Xtype: uint8(6)}, Xet_info{Xfmttype: int8(113), Xflags: uint8(4), Xtype: uint8(9)}, Xet_info{Xfmttype: int8(81), Xflags: uint8(4), Xtype: uint8(10)}, Xet_info{Xfmttype: int8(119), Xflags: uint8(4), Xtype: uint8(14)}, Xet_info{Xfmttype: int8(99), Xtype: uint8(8)}, Xet_info{Xfmttype: int8(111), Xbase: uint8(8), Xprefix: uint8(2)}, Xet_info{Xfmttype: int8(117), Xbase: uint8(10), Xtype: uint8(16)}, Xet_info{Xfmttype: int8(120), Xbase: uint8(16), Xcharset: uint8(16), Xprefix: uint8(1)}, Xet_info{Xfmttype: int8(88), Xbase: uint8(16), Xprefix: uint8(4)}, Xet_info{Xfmttype: int8(102), Xflags: uint8(1), Xtype: uint8(1)}, Xet_info{Xfmttype: int8(101), Xflags: uint8(1), Xtype: uint8(2), Xcharset: uint8(30)}, Xet_info{Xfmttype: int8(69), Xflags: uint8(1), Xtype: uint8(2), Xcharset: uint8(14)}, Xet_info{Xfmttype: int8(71), Xflags: uint8(1), Xtype: uint8(3), Xcharset: uint8(14)}, Xet_info{Xfmttype: int8(105), Xbase: uint8(10), Xflags: uint8(1), Xtype: uint8(16)}, Xet_info{Xfmttype: int8(110), Xtype: uint8(4)}, Xet_info{Xfmttype: int8(37), Xtype: uint8(7)}, Xet_info{Xfmttype: int8(112), Xbase: uint8(16), Xtype: uint8(13), Xprefix: uint8(1)}, Xet_info{Xfmttype: int8(84), Xtype: uint8(11)}, Xet_info{Xfmttype: int8(83), Xtype: uint8(12)}, Xet_info{Xfmttype: int8(114), Xbase: uint8(10), Xflags: uint8(1), Xtype: uint8(15)}}
}
var _sqlite3VXPrintfØ00zOrdØ001 [9]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3VXPrintfØ00zOrdØ001[0], str(135915), 9)
+ crt.Xstrncpy(nil, &_sqlite3VXPrintfØ00zOrdØ001[0], str(135928), 9)
}
+// C comment
+// /*
+// ** The following table is searched linearly, so it is good to put the
+// ** most frequently used conversion types first.
+// */
var _aDigits [33]int8
func init() {
- crt.Xstrncpy(nil, &_aDigits[0], str(135924), 33)
+ crt.Xstrncpy(nil, &_aDigits[0], str(135937), 33)
}
var _aPrefix [7]int8
func init() {
- crt.Xstrncpy(nil, &_aPrefix[0], str(135957), 7)
+ crt.Xstrncpy(nil, &_aPrefix[0], str(135970), 7)
}
func _getDoubleArg(tls *crt.TLS, _p *XPrintfArguments) (r0 float64) {
- if (_p.X0) <= (_p.X1) {
+ if _p.XnArg <= _p.XnUsed {
return float64(0)
}
- return Xsqlite3_value_double(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2)) + 4*uintptr(postInc1((*int32)(unsafe.Pointer(&(_p.X1))), int32(1))))))
-}
-
-// "*val" is a double such that 0.1 <= *val < 10.0
-// Return the ascii code for the leading digit of *val, then
-// multiply "*val" by 10.0 to renormalize.
-//
-// Example:
-// input: *val = 3.14159
-// output: *val = 1.4159 function return = '3'
-//
-// The counter *cnt is incremented each time. After counter exceeds
-// 16 (the number of significant digits in a 64-bit float) '0' is
-// always returned.
+ return Xsqlite3_value_double(tls, *elem19((**XMem)(unsafe.Pointer(_p.XapArg)), uintptr(postInc2(&_p.XnUsed, 1))))
+}
+
+// C comment
+// /*
+// ** "*val" is a double such that 0.1 <= *val < 10.0
+// ** Return the ascii code for the leading digit of *val, then
+// ** multiply "*val" by 10.0 to renormalize.
+// **
+// ** Example:
+// ** input: *val = 3.14159
+// ** output: *val = 1.4159 function return = '3'
+// **
+// ** The counter *cnt is incremented each time. After counter exceeds
+// ** 16 (the number of significant digits in a 64-bit float) '0' is
+// ** always returned.
+// */
func _et_getdigit(tls *crt.TLS, _val *float64, _cnt *int32) (r0 int8) {
var _digit int32
var _d float64
- if (*_cnt) <= i32(0) {
- return int8(i32(48))
+ if (*_cnt) <= int32(0) {
+ return int8(48)
}
*_cnt -= 1
_digit = int32(*_val)
_d = float64(_digit)
- {
- p := &_digit
- *p = (*p) + i32(48)
- sink1(*p)
- }
+ _digit += int32(48)
*_val = ((*_val) - _d) * float64(10)
return int8(_digit)
}
func _getTextArg(tls *crt.TLS, _p *XPrintfArguments) (r0 *int8) {
- if (_p.X0) <= (_p.X1) {
+ if _p.XnArg <= _p.XnUsed {
return nil
}
- return (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *(**XMem)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2)) + 4*uintptr(postInc1((*int32)(unsafe.Pointer(&(_p.X1))), int32(1))))))))
+ return (*int8)(unsafe.Pointer(Xsqlite3_value_text(tls, *elem19((**XMem)(unsafe.Pointer(_p.XapArg)), uintptr(postInc2(&_p.XnUsed, 1))))))
}
-// Append N copies of character c to the given string buffer.
+// C comment
+// /*
+// ** Append N copies of character c to the given string buffer.
+// */
func _sqlite3AppendChar(tls *crt.TLS, _p *XStrAccum, _N int32, _c int8) {
- if ((int64(_p.X3) + int64(_N)) >= int64(_p.X4)) && (store1(&_N, _sqlite3StrAccumEnlarge(tls, _p, _N)) <= i32(0)) {
+ if ((int64(_p.XnChar) + int64(_N)) >= int64(_p.XnAlloc)) && (store2(&_N, _sqlite3StrAccumEnlarge(tls, _p, _N)) <= int32(0)) {
return
}
func() {
- if ((_p.X2) == (_p.X1)) != ((int32(_p.X7) & i32(4)) == i32(0)) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1), unsafe.Pointer(str(37)), i32(25886), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3AppendCharØ00__func__Ø000))), unsafe.Pointer(str(6554)))
+ if (_p.XzText == _p.XzBase) != ((int32(_p.XprintfFlags) & int32(4)) == int32(0)) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(134), unsafe.Pointer(str(170)), int32(25886), unsafe.Pointer(&_sqlite3AppendCharØ00__func__Ø000), unsafe.Pointer(str(6455)))
crt.X__builtin_abort(tls)
}
}()
_4:
- if postInc1(&_N, int32(-1)) > i32(0) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X2)) + 1*uintptr(postInc5((*uint32)(unsafe.Pointer(&(_p.X3))), uint32(1))))) = _c
+ if postInc2(&_N, -1) > int32(0) {
+ *elem1(_p.XzText, uintptr(postInc23(&_p.XnChar, uint32(1)))) = _c
goto _4
}
}
@@ -119337,37 +121357,168 @@ _4:
var _sqlite3AppendCharØ00__func__Ø000 [18]int8
func init() {
- crt.Xstrncpy(nil, &_sqlite3AppendCharØ00__func__Ø000[0], str(135964), 18)
+ crt.Xstrncpy(nil, &_sqlite3AppendCharØ00__func__Ø000[0], str(135977), 18)
}
-var _sqlite3_execØ00__func__Ø000 [13]int8
+func _sqlite3IsIdChar(tls *crt.TLS, _c uint8) (r0 int32) {
+ return bool2int((int32(*elem15((*uint8)(unsafe.Pointer(&_sqlite3CtypeMap)), uintptr(_c))) & int32(70)) != int32(0))
+}
+
+// C comment
+// /*
+// ** Undo the effects of sqlite3_initialize(). Must not be called while
+// ** there are outstanding database connections or memory allocations or
+// ** while any part of SQLite is otherwise in use in any thread. This
+// ** routine is not threadsafe. But it is safe to invoke this routine
+// ** on when SQLite is already shut down. If SQLite is already shut down
+// ** when this routine is invoked, then this routine is a harmless no-op.
+// */
+func Xsqlite3_shutdown(tls *crt.TLS) (r0 int32) {
+ if _sqlite3Config.XisInit != 0 {
+ Xsqlite3_os_end(tls)
+ Xsqlite3_reset_auto_extension(tls)
+ _sqlite3Config.XisInit = int32(0)
+ }
+ if _sqlite3Config.XisPCacheInit != 0 {
+ _sqlite3PcacheShutdown(tls)
+ _sqlite3Config.XisPCacheInit = int32(0)
+ }
+ if _sqlite3Config.XisMallocInit != 0 {
+ _sqlite3MallocEnd(tls)
+ _sqlite3Config.XisMallocInit = int32(0)
+ Xsqlite3_data_directory = nil
+ bug20530(Xsqlite3_data_directory)
+ Xsqlite3_temp_directory = nil
+ bug20530(Xsqlite3_temp_directory)
+ }
+ if _sqlite3Config.XisMutexInit != 0 {
+ _sqlite3MutexEnd(tls)
+ _sqlite3Config.XisMutexInit = int32(0)
+ }
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Shutdown the operating system interface.
+// **
+// ** Some operating systems might need to do some cleanup in this routine,
+// ** to release dynamically allocated objects. But not on unix.
+// ** This routine is a no-op for unix.
+// */
+func Xsqlite3_os_end(tls *crt.TLS) (r0 int32) {
+ return int32(0)
+}
+
+func _sqlite3PcacheShutdown(tls *crt.TLS) {
+ if (_sqlite3Config.Xpcache2.XxShutdown) != nil {
+ (_sqlite3Config.Xpcache2.XxShutdown)(tls, _sqlite3Config.Xpcache2.XpArg)
+ }
+}
+
+// C comment
+// /*
+// ** Deinitialize the memory allocation subsystem.
+// */
+func _sqlite3MallocEnd(tls *crt.TLS) {
+ if (_sqlite3Config.Xm.XxShutdown) != nil {
+ (_sqlite3Config.Xm.XxShutdown)(tls, _sqlite3Config.Xm.XpAppData)
+ }
+ crt.Xmemset(tls, unsafe.Pointer(&_mem0), int32(0), uint32(28))
+}
+
+// C comment
+// /*
+// ** CAPI3REF: Name Of The Folder Holding Database Files
+// **
+// ** ^(If this global variable is made to point to a string which is
+// ** the name of a folder (a.k.a. directory), then all database files
+// ** specified with a relative pathname and created or accessed by
+// ** SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed
+// ** to be relative to that directory.)^ ^If this variable is a NULL
+// ** pointer, then SQLite assumes that all database files specified
+// ** with a relative pathname are relative to the current directory
+// ** for the process. Only the windows VFS makes use of this global
+// ** variable; it is ignored by the unix VFS.
+// **
+// ** Changing the value of this variable while a database connection is
+// ** open can result in a corrupt database.
+// **
+// ** It is not safe to read or modify this variable in more than one
+// ** thread at a time. It is not safe to read or modify this variable
+// ** if a [database connection] is being used at the same time in a separate
+// ** thread.
+// ** It is intended that this variable be set once
+// ** as part of process initialization and before any SQLite interface
+// ** routines have been called and that this variable remain unchanged
+// ** thereafter.
+// **
+// ** ^The [data_store_directory pragma] may modify this variable and cause
+// ** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore,
+// ** the [data_store_directory pragma] always assumes that any string
+// ** that this variable points to is held in memory obtained from
+// ** [sqlite3_malloc] and the pragma may attempt to free that memory
+// ** using [sqlite3_free].
+// ** Hence, if this variable is modified directly, either it should be
+// ** made NULL or made to point to memory obtained from [sqlite3_malloc]
+// ** or else the use of the [data_store_directory pragma] should be avoided.
+// */
+var Xsqlite3_data_directory *int8
+
+// C comment
+// /*
+// ** Shutdown the mutex system. This call frees resources allocated by
+// ** sqlite3MutexInit().
+// */
+func _sqlite3MutexEnd(tls *crt.TLS) (r0 int32) {
+ var _rc int32
+ _rc = int32(0)
+ if (_sqlite3Config.Xmutex.XxMutexEnd) != nil {
+ _rc = (_sqlite3Config.Xmutex.XxMutexEnd)(tls)
+ }
+ _mutexIsInit = int32(0)
+ bug20530(_mutexIsInit)
+ return _rc
+}
-func init() {
- crt.Xstrncpy(nil, &_sqlite3_execØ00__func__Ø000[0], str(135982), 13)
+// C comment
+// /*
+// ** This function is now an anachronism. It used to be used to recover from a
+// ** malloc() failure, but SQLite now does this automatically.
+// */
+func Xsqlite3_global_recover(tls *crt.TLS) (r0 int32) {
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Deprecated external interface. It used to set an alarm callback
+// ** that was invoked when memory usage grew too large. Now it is a
+// ** no-op.
+// */
+func Xsqlite3_memory_alarm(tls *crt.TLS, _xCallback func(*crt.TLS, unsafe.Pointer, int64, int32), _pArg unsafe.Pointer, _iThreshold int64) (r0 int32) {
+ return int32(0)
}
-// Enable or disable extension loading. Extension loading is disabled by
-// default so as not to open security holes in older applications.
+// C comment
+// /*
+// ** Enable or disable extension loading. Extension loading is disabled by
+// ** default so as not to open security holes in older applications.
+// */
func Xsqlite3_enable_load_extension(tls *crt.TLS, _db *Xsqlite3, _onoff int32) (r0 int32) {
- Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.X3))
+ Xsqlite3_mutex_enter(tls, (*Xsqlite3_mutex)(_db.Xmutex))
if _onoff != 0 {
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) | i32(12582912)
- sink1(*p)
- }
+ _db.Xflags |= int32(12582912)
goto _1
}
- {
- p := (*int32)(unsafe.Pointer(&(_db.X6)))
- *p = (*p) & i32(-12582913)
- sink1(*p)
- }
+ _db.Xflags &= int32(-12582913)
_1:
- Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.X3))
- return i32(0)
+ Xsqlite3_mutex_leave(tls, (*Xsqlite3_mutex)(_db.Xmutex))
+ return int32(0)
}
+var Xsqlite3WhereTrace int32
+
func bool2int(b bool) int32 {
if b {
return 1
@@ -119375,3343 +121526,2946 @@ func bool2int(b bool) int32 {
return 0
}
func bug20530(interface{}) {} //TODO remove when https://github.com/golang/go/issues/20530 is fixed.
-func i16(n int16) int16 { return n }
-func i32(n int32) int32 { return n }
-func i64(n int64) int64 { return n }
-func i8(n int8) int8 { return n }
func init() { nzf32 *= -1; nzf64 *= -1 }
-func u16(n uint16) uint16 { return n }
-func u32(n uint32) uint32 { return n }
-func u64(n uint64) uint64 { return n }
-func u8(n byte) byte { return n }
var inf = math.Inf(1)
-var nzf32 float32 // -0.0
-var nzf64 float64 // -0.0
-func sink68(**XWhereLoop) {} //TODO report GC bug
-func sink0(*int8) {} //TODO report GC bug
-func sink32(*XCollSeq) {} //TODO report GC bug
-func sink71(*TInLoop) {} //TODO report GC bug
-func sink34(*XyyStackEntry) {} //TODO report GC bug
-func sink20(*XMem) {} //TODO report GC bug
-func sink31(*uint32) {} //TODO report GC bug
-func sink13(*uint8) {} //TODO report GC bug
-func sink4(float64) {} //TODO report GC bug
-func sink18(int16) {} //TODO report GC bug
-func sink1(int32) {} //TODO report GC bug
-func sink6(int64) {} //TODO report GC bug
-func sink14(uint16) {} //TODO report GC bug
-func sink5(uint32) {} //TODO report GC bug
-func sink17(uint64) {} //TODO report GC bug
-func sink2(uint8) {} //TODO report GC bug
-func postInc72(p **int16, d int) *int16 {
+var nzf32 float32 // -0.0
+var nzf64 float64 // -0.0
+func elem130(a *func(*crt.TLS), index uintptr) *func(*crt.TLS) {
+ return (*func(*crt.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem0(a **int8, index uintptr) **int8 {
+ return (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem63(a **XSubProgram, index uintptr) **XSubProgram {
+ return (**XSubProgram)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem28(a **XVTable, index uintptr) **XVTable {
+ return (**XVTable)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem77(a **XVdbeCursor, index uintptr) **XVdbeCursor {
+ return (**XVdbeCursor)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem32(a **XBitvec, index uintptr) **XBitvec {
+ return (**XBitvec)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem30(a **XMemPage, index uintptr) **XMemPage {
+ return (**XMemPage)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem18(a **XFuncDef, index uintptr) **XFuncDef {
+ return (**XFuncDef)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem90(a **XSorterRecord, index uintptr) **XSorterRecord {
+ return (**XSorterRecord)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem104(a **XWhereTerm, index uintptr) **XWhereTerm {
+ return (**XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem37(a **XPgHdr, index uintptr) **XPgHdr {
+ return (**XPgHdr)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem14(a **XPgHdr1, index uintptr) **XPgHdr1 {
+ return (**XPgHdr1)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem112(a **XWhereLoop, index uintptr) **XWhereLoop {
+ return (**XWhereLoop)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem19(a **XMem, index uintptr) **XMem {
+ return (**XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem94(a **TRowSetEntry, index uintptr) **TRowSetEntry {
+ return (**TRowSetEntry)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem122(a **XToken, index uintptr) **XToken {
+ return (**XToken)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem59(a **XTable, index uintptr) **XTable {
+ return (**XTable)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem62(a **XCollSeq, index uintptr) **XCollSeq {
+ return (**XCollSeq)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem40(a **XTrigger, index uintptr) **XTrigger {
+ return (**XTrigger)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem24(a *unsafe.Pointer, index uintptr) *unsafe.Pointer {
+ return (*unsafe.Pointer)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem36(a **uint32, index uintptr) **uint32 {
+ return (**uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem88(a **uint8, index uintptr) **uint8 {
+ return (**uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem47(a *[8]uint8, index uintptr) *[8]uint8 {
+ return (*[8]uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem50(a *int16, index uintptr) *int16 {
+ return (*int16)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 2*index))
+}
+func elem8(a *int32, index uintptr) *int32 {
+ return (*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem1(a *int8, index uintptr) *int8 {
+ return (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 1*index))
+}
+func elem96(a *Tsqlite3_index_constraint_usage, index uintptr) *Tsqlite3_index_constraint_usage {
+ return (*Tsqlite3_index_constraint_usage)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem39(a *T_ht, index uintptr) *T_ht {
+ return (*T_ht)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem21(a *t22, index uintptr) *t22 {
+ return (*t22)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 24*index))
+}
+func elem4(a *Xet_info, index uintptr) *Xet_info {
+ return (*Xet_info)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 6*index))
+}
+func elem123(a *t124, index uintptr) *t124 {
+ return (*t124)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 3*index))
+}
+func elem108(a *Tsqlite3_index_orderby, index uintptr) *Tsqlite3_index_orderby {
+ return (*Tsqlite3_index_orderby)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem106(a *Tsqlite3_index_constraint, index uintptr) *Tsqlite3_index_constraint {
+ return (*Tsqlite3_index_constraint)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 12*index))
+}
+func elem115(a *TInLoop, index uintptr) *TInLoop {
+ return (*TInLoop)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 12*index))
+}
+func elem64(a *XTableLock, index uintptr) *XTableLock {
+ return (*XTableLock)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 16*index))
+}
+func elem116(a *t117, index uintptr) *t117 {
+ return (*t117)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem99(a *XWhereLevel, index uintptr) *XWhereLevel {
+ return (*XWhereLevel)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 76*index))
+}
+func elem45(a *TWalSegment, index uintptr) *TWalSegment {
+ return (*TWalSegment)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 20*index))
+}
+func elem31(a *XPagerSavepoint, index uintptr) *XPagerSavepoint {
+ return (*XPagerSavepoint)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 44*index))
+}
+func elem80(a *XPmaReader, index uintptr) *XPmaReader {
+ return (*XPmaReader)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 52*index))
+}
+func elem69(a *TyColCache, index uintptr) *TyColCache {
+ return (*TyColCache)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 20*index))
+}
+func elem133(a *Xsqlite3_vfs, index uintptr) *Xsqlite3_vfs {
+ return (*Xsqlite3_vfs)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 88*index))
+}
+func elem44(a *XWalIndexHdr, index uintptr) *XWalIndexHdr {
+ return (*XWalIndexHdr)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 48*index))
+}
+func elem11(a *Xsqlite3_debug_mutex, index uintptr) *Xsqlite3_debug_mutex {
+ return (*Xsqlite3_debug_mutex)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem52(a *t53, index uintptr) *t53 {
+ return (*t53)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 2*index))
+}
+func elem111(a *XWherePath, index uintptr) *XWherePath {
+ return (*XWherePath)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 28*index))
+}
+func elem10(a *Xsqlite3_mutex, index uintptr) *Xsqlite3_mutex {
+ return (*Xsqlite3_mutex)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 40*index))
+}
+func elem17(a *XFuncDef, index uintptr) *XFuncDef {
+ return (*XFuncDef)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 28*index))
+}
+func elem107(a *Xsqlite3_index_info, index uintptr) *Xsqlite3_index_info {
+ return (*Xsqlite3_index_info)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 64*index))
+}
+func elem46(a *TSublist, index uintptr) *TSublist {
+ return (*TSublist)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem65(a *XKeyInfo, index uintptr) *XKeyInfo {
+ return (*XKeyInfo)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 24*index))
+}
+func elem129(a *XStat4Accum, index uintptr) *XStat4Accum {
+ return (*XStat4Accum)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 60*index))
+}
+func elem92(a *XMergeEngine, index uintptr) *XMergeEngine {
+ return (*XMergeEngine)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 16*index))
+}
+func elem131(a *t132, index uintptr) *t132 {
+ return (*t132)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem58(a *XExpr, index uintptr) *XExpr {
+ return (*XExpr)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 48*index))
+}
+func elem120(a *XTriggerStep, index uintptr) *XTriggerStep {
+ return (*XTriggerStep)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 36*index))
+}
+func elem61(a *XVdbeOp, index uintptr) *XVdbeOp {
+ return (*XVdbeOp)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 24*index))
+}
+func elem67(a *TAggInfo_func, index uintptr) *TAggInfo_func {
+ return (*TAggInfo_func)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 16*index))
+}
+func elem100(a *XWhereTerm, index uintptr) *XWhereTerm {
+ return (*XWhereTerm)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 48*index))
+}
+func elem57(a *TExprList_item, index uintptr) *TExprList_item {
+ return (*TExprList_item)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 20*index))
+}
+func elem79(a *XSorterFile, index uintptr) *XSorterFile {
+ return (*XSorterFile)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 12*index))
+}
+func elem12(a *XPCache1, index uintptr) *XPCache1 {
+ return (*XPCache1)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 60*index))
+}
+func elem135(a *XunixShmNode, index uintptr) *XunixShmNode {
+ return (*XunixShmNode)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 40*index))
+}
+func elem48(a *XModule, index uintptr) *XModule {
+ return (*XModule)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 20*index))
+}
+func elem9(a *XScratchFreeslot, index uintptr) *XScratchFreeslot {
+ return (*XScratchFreeslot)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem34(a *XPgHdr, index uintptr) *XPgHdr {
+ return (*XPgHdr)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 40*index))
+}
+func elem6(a *TSrcList_item, index uintptr) *TSrcList_item {
+ return (*TSrcList_item)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 68*index))
+}
+func elem66(a *TAggInfo_col, index uintptr) *TAggInfo_col {
+ return (*TAggInfo_col)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 24*index))
+}
+func elem78(a *XSortSubtask, index uintptr) *XSortSubtask {
+ return (*XSortSubtask)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 60*index))
+}
+func elem74(a *XWal, index uintptr) *XWal {
+ return (*XWal)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 120*index))
+}
+func elem13(a *XPgHdr1, index uintptr) *XPgHdr1 {
+ return (*XPgHdr1)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 32*index))
+}
+func elem110(a *XWhereOrCost, index uintptr) *XWhereOrCost {
+ return (*XWhereOrCost)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 12*index))
+}
+func elem49(a *XyyStackEntry, index uintptr) *XyyStackEntry {
+ return (*XyyStackEntry)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 16*index))
+}
+func elem25(a *XMem, index uintptr) *XMem {
+ return (*XMem)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 48*index))
+}
+func elem126(a *TOpenMode, index uintptr) *TOpenMode {
+ return (*TOpenMode)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem56(a *XToken, index uintptr) *XToken {
+ return (*XToken)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem27(a *XDb, index uintptr) *XDb {
+ return (*XDb)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 16*index))
+}
+func elem95(a *XPragmaName, index uintptr) *XPragmaName {
+ return (*XPragmaName)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 12*index))
+}
+func elem29(a *XCollSeq, index uintptr) *XCollSeq {
+ return (*XCollSeq)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 20*index))
+}
+func elem125(a *TEncName, index uintptr) *TEncName {
+ return (*TEncName)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem42(a *TIdList_item, index uintptr) *TIdList_item {
+ return (*TIdList_item)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem82(a *XSavepoint, index uintptr) *XSavepoint {
+ return (*XSavepoint)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 24*index))
+}
+func elem43(a *TCte, index uintptr) *TCte {
+ return (*TCte)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 16*index))
+}
+func elem134(a *Tunix_syscall, index uintptr) *Tunix_syscall {
+ return (*Tunix_syscall)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 12*index))
+}
+func elem41(a *XColumn, index uintptr) *XColumn {
+ return (*XColumn)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 16*index))
+}
+func elem121(a *XTrigger, index uintptr) *XTrigger {
+ return (*XTrigger)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 36*index))
+}
+func elem127(a *t128, index uintptr) *t128 {
+ return (*t128)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem103(a *TOp2, index uintptr) *TOp2 {
+ return (*TOp2)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem20(a *uint16, index uintptr) *uint16 {
+ return (*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 2*index))
+}
+func elem7(a *uint32, index uintptr) *uint32 {
+ return (*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem15(a *uint8, index uintptr) *uint8 {
+ return (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 1*index))
+}
+func postInc50(p **int16, d int) *int16 {
q := (*uintptr)(unsafe.Pointer(p))
v := *q
*q += uintptr(d)
return (*int16)(unsafe.Pointer(v))
}
-func postInc0(p **int8, d int) *int8 {
+func postInc1(p **int8, d int) *int8 {
q := (*uintptr)(unsafe.Pointer(p))
v := *q
*q += uintptr(d)
return (*int8)(unsafe.Pointer(v))
}
-func postInc57(p **TRowSetEntry, d int) *TRowSetEntry {
+func postInc49(p **XyyStackEntry, d int) *XyyStackEntry {
q := (*uintptr)(unsafe.Pointer(p))
v := *q
*q += uintptr(d)
- return (*TRowSetEntry)(unsafe.Pointer(v))
+ return (*XyyStackEntry)(unsafe.Pointer(v))
}
-func postInc34(p **XyyStackEntry, d int) *XyyStackEntry {
+func postInc25(p **XMem, d int) *XMem {
q := (*uintptr)(unsafe.Pointer(p))
v := *q
*q += uintptr(d)
- return (*XyyStackEntry)(unsafe.Pointer(v))
+ return (*XMem)(unsafe.Pointer(v))
}
-func postInc20(p **XMem, d int) *XMem {
+func postInc93(p **TRowSetEntry, d int) *TRowSetEntry {
q := (*uintptr)(unsafe.Pointer(p))
v := *q
*q += uintptr(d)
- return (*XMem)(unsafe.Pointer(v))
+ return (*TRowSetEntry)(unsafe.Pointer(v))
}
-func postInc31(p **uint32, d int) *uint32 {
+func postInc7(p **uint32, d int) *uint32 {
q := (*uintptr)(unsafe.Pointer(p))
v := *q
*q += uintptr(d)
return (*uint32)(unsafe.Pointer(v))
}
-func postInc13(p **uint8, d int) *uint8 {
+func postInc15(p **uint8, d int) *uint8 {
q := (*uintptr)(unsafe.Pointer(p))
v := *q
*q += uintptr(d)
return (*uint8)(unsafe.Pointer(v))
}
-func postInc1(p *int32, d int32) int32 { v := *p; *p += d; return v }
-func postInc6(p *int64, d int64) int64 { v := *p; *p += d; return v }
-func postInc3(p *int8, d int8) int8 { v := *p; *p += d; return v }
-func postInc14(p *uint16, d uint16) uint16 { v := *p; *p += d; return v }
-func postInc5(p *uint32, d uint32) uint32 { v := *p; *p += d; return v }
-func postInc2(p *uint8, d uint8) uint8 { v := *p; *p += d; return v }
-func preInc0(p **int8, d int) *int8 {
+func postInc2(p *int32, d int32) int32 { v := *p; *p += d; return v }
+func postInc35(p *int64, d int64) int64 { v := *p; *p += d; return v }
+func postInc5(p *int8, d int8) int8 { v := *p; *p += d; return v }
+func postInc76(p *uint16, d uint16) uint16 { v := *p; *p += d; return v }
+func postInc23(p *uint32, d uint32) uint32 { v := *p; *p += d; return v }
+func postInc3(p *uint8, d uint8) uint8 { v := *p; *p += d; return v }
+func preInc1(p **int8, d int) *int8 {
q := (*uintptr)(unsafe.Pointer(p))
v := *q + uintptr(d)
*q = v
return (*int8)(unsafe.Pointer(v))
}
-func preInc20(p **XMem, d int) *XMem {
+func preInc25(p **XMem, d int) *XMem {
q := (*uintptr)(unsafe.Pointer(p))
v := *q + uintptr(d)
*q = v
return (*XMem)(unsafe.Pointer(v))
}
-func preInc13(p **uint8, d int) *uint8 {
+func preInc15(p **uint8, d int) *uint8 {
q := (*uintptr)(unsafe.Pointer(p))
v := *q + uintptr(d)
*q = v
return (*uint8)(unsafe.Pointer(v))
}
-func preInc18(p *int16, d int16) int16 { v := *p + d; *p = v; return v }
-func preInc1(p *int32, d int32) int32 { v := *p + d; *p = v; return v }
-func preInc14(p *uint16, d uint16) uint16 { v := *p + d; *p = v; return v }
-func preInc5(p *uint32, d uint32) uint32 { v := *p + d; *p = v; return v }
-func preInc2(p *uint8, d uint8) uint8 { v := *p + d; *p = v; return v }
-func storebits18(p *int16, v int16, m uint64, o uint) int16 {
+func preInc26(p *int16, d int16) int16 { v := *p + d; *p = v; return v }
+func preInc2(p *int32, d int32) int32 { v := *p + d; *p = v; return v }
+func preInc76(p *uint16, d uint16) uint16 { v := *p + d; *p = v; return v }
+func preInc23(p *uint32, d uint32) uint32 { v := *p + d; *p = v; return v }
+func preInc3(p *uint8, d uint8) uint8 { v := *p + d; *p = v; return v }
+func storebits26(p *int16, v int16, m uint64, o uint) int16 {
*p = *p&^int16(m) | (v << o & int16(m))
return v
}
-func storebits3(p *int8, v int8, m uint64, o uint) int8 {
+func storebits5(p *int8, v int8, m uint64, o uint) int8 {
*p = *p&^int8(m) | (v << o & int8(m))
return v
}
-func store49(p *func(*crt.TLS, *Xsqlite3_vtab) int32, v func(*crt.TLS, *Xsqlite3_vtab) int32) func(*crt.TLS, *Xsqlite3_vtab) int32 {
+func store81(p *func(*crt.TLS, *Xsqlite3_vtab) int32, v func(*crt.TLS, *Xsqlite3_vtab) int32) func(*crt.TLS, *Xsqlite3_vtab) int32 {
*p = v
return v
}
-func store0(p **int8, v *int8) *int8 { *p = v; return v }
-func store69(p **XIndex, v *XIndex) *XIndex { *p = v; return v }
-func store30(p **XColumn, v *XColumn) *XColumn { *p = v; return v }
-func store44(p **XTable, v *XTable) *XTable { *p = v; return v }
-func store74(p **XFKey, v *XFKey) *XFKey { *p = v; return v }
-func store25(p **XPgHdr, v *XPgHdr) *XPgHdr { *p = v; return v }
-func store38(p **TVdbe, v *TVdbe) *TVdbe { *p = v; return v }
-func store65(p **XWhereTerm, v *XWhereTerm) *XWhereTerm { *p = v; return v }
-func store55(p **XIncrMerger, v *XIncrMerger) *XIncrMerger { *p = v; return v }
-func store51(p **XUnpackedRecord, v *XUnpackedRecord) *XUnpackedRecord { *p = v; return v }
-func store26(p **Xsqlite3_backup, v *Xsqlite3_backup) *Xsqlite3_backup { *p = v; return v }
-func store54(p **XBtree, v *XBtree) *XBtree { *p = v; return v }
-func store24(p **XFileChunk, v *XFileChunk) *XFileChunk { *p = v; return v }
-func store75(p **XSubProgram, v *XSubProgram) *XSubProgram { *p = v; return v }
-func store59(p **XSelect, v *XSelect) *XSelect { *p = v; return v }
-func store8(p **Xsqlite3_file, v *Xsqlite3_file) *Xsqlite3_file { *p = v; return v }
-func store56(p **XMergeEngine, v *XMergeEngine) *XMergeEngine { *p = v; return v }
-func store42(p **XExprList, v *XExprList) *XExprList { *p = v; return v }
-func store60(p **XSrcList, v *XSrcList) *XSrcList { *p = v; return v }
-func store57(p **TRowSetEntry, v *TRowSetEntry) *TRowSetEntry { *p = v; return v }
-func store33(p **XFuncDef, v *XFuncDef) *XFuncDef { *p = v; return v }
-func store64(p **XWhereOrInfo, v *XWhereOrInfo) *XWhereOrInfo { *p = v; return v }
-func store10(p **XPgHdr1, v *XPgHdr1) *XPgHdr1 { *p = v; return v }
-func store50(p **XKeyInfo, v *XKeyInfo) *XKeyInfo { *p = v; return v }
-func store67(p **XWhereLoop, v *XWhereLoop) *XWhereLoop { *p = v; return v }
-func store40(p **XVdbeOp, v *XVdbeOp) *XVdbeOp { *p = v; return v }
-func store36(p **XExpr, v *XExpr) *XExpr { *p = v; return v }
-func store53(p **XVdbeCursor, v *XVdbeCursor) *XVdbeCursor { *p = v; return v }
-func store76(p **XTriggerStep, v *XTriggerStep) *XTriggerStep { *p = v; return v }
-func store52(p **XMemPage, v *XMemPage) *XMemPage { *p = v; return v }
-func store20(p **XMem, v *XMem) *XMem { *p = v; return v }
-func store11(p *unsafe.Pointer, v unsafe.Pointer) unsafe.Pointer { *p = v; return v }
-func store13(p **uint8, v *uint8) *uint8 { *p = v; return v }
-func store1(p *int32, v int32) int32 { *p = v; return v }
-func store6(p *int64, v int64) int64 { *p = v; return v }
-func store3(p *int8, v int8) int8 { *p = v; return v }
-func store14(p *uint16, v uint16) uint16 { *p = v; return v }
-func store5(p *uint32, v uint32) uint32 { *p = v; return v }
-func store17(p *uint64, v uint64) uint64 { *p = v; return v }
-func store2(p *uint8, v uint8) uint8 { *p = v; return v }
-
-type Xva_list struct{ X0 struct{} } // t81 struct{struct{}}
+func store1(p **int8, v *int8) *int8 { *p = v; return v }
+func store119(p **XSubProgram, v *XSubProgram) *XSubProgram { *p = v; return v }
+func store87(p **XBtree, v *XBtree) *XBtree { *p = v; return v }
+func store60(p **TVdbe, v *TVdbe) *TVdbe { *p = v; return v }
+func store86(p **XVdbeCursor, v *XVdbeCursor) *XVdbeCursor { *p = v; return v }
+func store84(p **XMemPage, v *XMemPage) *XMemPage { *p = v; return v }
+func store17(p **XFuncDef, v *XFuncDef) *XFuncDef { *p = v; return v }
+func store70(p **XExprList, v *XExprList) *XExprList { *p = v; return v }
+func store65(p **XKeyInfo, v *XKeyInfo) *XKeyInfo { *p = v; return v }
+func store98(p **XSrcList, v *XSrcList) *XSrcList { *p = v; return v }
+func store92(p **XMergeEngine, v *XMergeEngine) *XMergeEngine { *p = v; return v }
+func store58(p **XExpr, v *XExpr) *XExpr { *p = v; return v }
+func store120(p **XTriggerStep, v *XTriggerStep) *XTriggerStep { *p = v; return v }
+func store61(p **XVdbeOp, v *XVdbeOp) *XVdbeOp { *p = v; return v }
+func store38(p **Xsqlite3_backup, v *Xsqlite3_backup) *Xsqlite3_backup { *p = v; return v }
+func store97(p **XSelect, v *XSelect) *XSelect { *p = v; return v }
+func store100(p **XWhereTerm, v *XWhereTerm) *XWhereTerm { *p = v; return v }
+func store118(p **XFKey, v *XFKey) *XFKey { *p = v; return v }
+func store83(p **XUnpackedRecord, v *XUnpackedRecord) *XUnpackedRecord { *p = v; return v }
+func store33(p **XFileChunk, v *XFileChunk) *XFileChunk { *p = v; return v }
+func store9(p **XScratchFreeslot, v *XScratchFreeslot) *XScratchFreeslot { *p = v; return v }
+func store34(p **XPgHdr, v *XPgHdr) *XPgHdr { *p = v; return v }
+func store91(p **XIncrMerger, v *XIncrMerger) *XIncrMerger { *p = v; return v }
+func store13(p **XPgHdr1, v *XPgHdr1) *XPgHdr1 { *p = v; return v }
+func store109(p **XWhereLoop, v *XWhereLoop) *XWhereLoop { *p = v; return v }
+func store25(p **XMem, v *XMem) *XMem { *p = v; return v }
+func store93(p **TRowSetEntry, v *TRowSetEntry) *TRowSetEntry { *p = v; return v }
+func store102(p **XWhereOrInfo, v *XWhereOrInfo) *XWhereOrInfo { *p = v; return v }
+func store72(p **XTable, v *XTable) *XTable { *p = v; return v }
+func store113(p **XIndex, v *XIndex) *XIndex { *p = v; return v }
+func store41(p **XColumn, v *XColumn) *XColumn { *p = v; return v }
+func store16(p *unsafe.Pointer, v unsafe.Pointer) unsafe.Pointer { *p = v; return v }
+func store15(p **uint8, v *uint8) *uint8 { *p = v; return v }
+func store2(p *int32, v int32) int32 { *p = v; return v }
+func store35(p *int64, v int64) int64 { *p = v; return v }
+func store5(p *int8, v int8) int8 { *p = v; return v }
+func store76(p *uint16, v uint16) uint16 { *p = v; return v }
+func store23(p *uint32, v uint32) uint32 { *p = v; return v }
+func store85(p *uint64, v uint64) uint64 { *p = v; return v }
+func store3(p *uint8, v uint8) uint8 { *p = v; return v }
+
+type Xva_list struct{ X_ t136 } // t137 struct{_ struct{}}
type TSqlite3Config struct {
- X0 int32
- X1 int32
- X2 int32
- X3 int32
- X4 int32
- X5 int32
- X6 int32
- X7 int32
- X8 int32
- X9 int32
- X10 struct {
- X0 func(*crt.TLS, int32) unsafe.Pointer
- X1 func(*crt.TLS, unsafe.Pointer)
- X2 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X3 func(*crt.TLS, unsafe.Pointer) int32
- X4 func(*crt.TLS, int32) int32
- X5 func(*crt.TLS, unsafe.Pointer) int32
- X6 func(*crt.TLS, unsafe.Pointer)
- X7 unsafe.Pointer
- }
- X11 struct {
- X0 func(*crt.TLS) int32
- X1 func(*crt.TLS) int32
- X2 func(*crt.TLS, int32) unsafe.Pointer
- X3 func(*crt.TLS, unsafe.Pointer)
- X4 func(*crt.TLS, unsafe.Pointer)
- X5 func(*crt.TLS, unsafe.Pointer) int32
- X6 func(*crt.TLS, unsafe.Pointer)
- X7 func(*crt.TLS, unsafe.Pointer) int32
- X8 func(*crt.TLS, unsafe.Pointer) int32
- }
- X12 struct {
- X0 int32
- X1 unsafe.Pointer
- X2 func(*crt.TLS, unsafe.Pointer) int32
- X3 func(*crt.TLS, unsafe.Pointer)
- X4 func(*crt.TLS, int32, int32, int32) unsafe.Pointer
- X5 func(*crt.TLS, unsafe.Pointer, int32)
- X6 func(*crt.TLS, unsafe.Pointer) int32
- X7 func(*crt.TLS, unsafe.Pointer, uint32, int32) unsafe.Pointer
- X8 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
- X9 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint32, uint32)
- X10 func(*crt.TLS, unsafe.Pointer, uint32)
- X11 func(*crt.TLS, unsafe.Pointer)
- X12 func(*crt.TLS, unsafe.Pointer)
- }
- X13 unsafe.Pointer
- X14 int32
- X15 int32
- X16 int32
- X17 int64
- X18 int64
- X19 unsafe.Pointer
- X20 int32
- X21 int32
- X22 unsafe.Pointer
- X23 int32
- X24 int32
- X25 int32
- X26 int32
- X27 uint32
- X28 int32
- X29 int32
- X30 int32
- X31 int32
- X32 int32
- X33 int32
- X34 unsafe.Pointer
- X35 func(*crt.TLS, unsafe.Pointer, int32, *int8)
- X36 unsafe.Pointer
- X37 func(*crt.TLS, int32) int32
- X38 int32
- X39 int32
-} // t82 struct{int32,int32,int32,int32,int32,int32,int32,int32,int32,int32,struct{*func(int32)*struct{},*func(*struct{}),*func(*struct{},int32)*struct{},*func(*struct{})int32,*func(int32)int32,*func(*struct{})int32,*func(*struct{}),*struct{}},struct{*func()int32,*func()int32,*func(int32)*struct{},*func(*struct{}),*func(*struct{}),*func(*struct{})int32,*func(*struct{}),*func(*struct{})int32,*func(*struct{})int32},struct{int32,*struct{},*func(*struct{})int32,*func(*struct{}),*func(int32,int32,int32)*struct{},*func(*struct{},int32),*func(*struct{})int32,*func(*struct{},uint32,int32)*struct{},*func(*struct{},*struct{},int32),*func(*struct{},*struct{},uint32,uint32),*func(*struct{},uint32),*func(*struct{}),*func(*struct{})},*struct{},int32,int32,int32,int64,int64,*struct{},int32,int32,*struct{},int32,int32,int32,int32,uint32,int32,int32,int32,int32,int32,int32,*struct{},*func(*struct{},int32,*int8),*struct{},*func(int32)int32,int32,int32}
+ XbMemstat int32
+ XbCoreMutex int32
+ XbFullMutex int32
+ XbOpenUri int32
+ XbUseCis int32
+ XmxStrlen int32
+ XneverCorrupt int32
+ XszLookaside int32
+ XnLookaside int32
+ XnStmtSpill int32
+ Xm Xsqlite3_mem_methods
+ Xmutex Xsqlite3_mutex_methods
+ Xpcache2 Xsqlite3_pcache_methods2
+ XpHeap unsafe.Pointer
+ XnHeap int32
+ XmnReq int32
+ XmxReq int32
+ XszMmap int64
+ XmxMmap int64
+ XpScratch unsafe.Pointer
+ XszScratch int32
+ XnScratch int32
+ XpPage unsafe.Pointer
+ XszPage int32
+ XnPage int32
+ XmxParserStack int32
+ XsharedCacheEnabled int32
+ XszPma uint32
+ XisInit int32
+ XinProgress int32
+ XisMutexInit int32
+ XisMallocInit int32
+ XisPCacheInit int32
+ XnRefInitMutex int32
+ XpInitMutex unsafe.Pointer
+ XxLog func(*crt.TLS, unsafe.Pointer, int32, *int8)
+ XpLogArg unsafe.Pointer
+ XxTestCallback func(*crt.TLS, int32) int32
+ XbLocaltimeFault int32
+ XiOnceResetThreshold int32
+} // t138 struct{bMemstat int32,bCoreMutex int32,bFullMutex int32,bOpenUri int32,bUseCis int32,mxStrlen int32,neverCorrupt int32,szLookaside int32,nLookaside int32,nStmtSpill int32,m struct{xMalloc *func(int32)*struct{},xFree *func(*struct{}),xRealloc *func(*struct{},int32)*struct{},xSize *func(*struct{})int32,xRoundup *func(int32)int32,xInit *func(*struct{})int32,xShutdown *func(*struct{}),pAppData *struct{}},mutex struct{xMutexInit *func()int32,xMutexEnd *func()int32,xMutexAlloc *func(int32)*struct{},xMutexFree *func(*struct{}),xMutexEnter *func(*struct{}),xMutexTry *func(*struct{})int32,xMutexLeave *func(*struct{}),xMutexHeld *func(*struct{})int32,xMutexNotheld *func(*struct{})int32},pcache2 struct{iVersion int32,pArg *struct{},xInit *func(*struct{})int32,xShutdown *func(*struct{}),xCreate *func(int32,int32,int32)*struct{},xCachesize *func(*struct{},int32),xPagecount *func(*struct{})int32,xFetch *func(*struct{},uint32,int32)*struct{},xUnpin *func(*struct{},*struct{},int32),xRekey *func(*struct{},*struct{},uint32,uint32),xTruncate *func(*struct{},uint32),xDestroy *func(*struct{}),xShrink *func(*struct{})},pHeap *struct{},nHeap int32,mnReq int32,mxReq int32,szMmap int64,mxMmap int64,pScratch *struct{},szScratch int32,nScratch int32,pPage *struct{},szPage int32,nPage int32,mxParserStack int32,sharedCacheEnabled int32,szPma uint32,isInit int32,inProgress int32,isMutexInit int32,isMallocInit int32,isPCacheInit int32,nRefInitMutex int32,pInitMutex *struct{},xLog *func(*struct{},int32,*int8),pLogArg *struct{},xTestCallback *func(int32)int32,bLocaltimeFault int32,iOnceResetThreshold int32}
type Xsqlite3_mem_methods struct {
- X0 func(*crt.TLS, int32) unsafe.Pointer
- X1 func(*crt.TLS, unsafe.Pointer)
- X2 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X3 func(*crt.TLS, unsafe.Pointer) int32
- X4 func(*crt.TLS, int32) int32
- X5 func(*crt.TLS, unsafe.Pointer) int32
- X6 func(*crt.TLS, unsafe.Pointer)
- X7 unsafe.Pointer
-} // t83 struct{*func(int32)*struct{},*func(*struct{}),*func(*struct{},int32)*struct{},*func(*struct{})int32,*func(int32)int32,*func(*struct{})int32,*func(*struct{}),*struct{}}
+ XxMalloc func(*crt.TLS, int32) unsafe.Pointer
+ XxFree func(*crt.TLS, unsafe.Pointer)
+ XxRealloc func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ XxSize func(*crt.TLS, unsafe.Pointer) int32
+ XxRoundup func(*crt.TLS, int32) int32
+ XxInit func(*crt.TLS, unsafe.Pointer) int32
+ XxShutdown func(*crt.TLS, unsafe.Pointer)
+ XpAppData unsafe.Pointer
+} // t139 struct{xMalloc *func(int32)*struct{},xFree *func(*struct{}),xRealloc *func(*struct{},int32)*struct{},xSize *func(*struct{})int32,xRoundup *func(int32)int32,xInit *func(*struct{})int32,xShutdown *func(*struct{}),pAppData *struct{}}
type Xsqlite3_mutex_methods struct {
- X0 func(*crt.TLS) int32
- X1 func(*crt.TLS) int32
- X2 func(*crt.TLS, int32) unsafe.Pointer
- X3 func(*crt.TLS, unsafe.Pointer)
- X4 func(*crt.TLS, unsafe.Pointer)
- X5 func(*crt.TLS, unsafe.Pointer) int32
- X6 func(*crt.TLS, unsafe.Pointer)
- X7 func(*crt.TLS, unsafe.Pointer) int32
- X8 func(*crt.TLS, unsafe.Pointer) int32
-} // t84 struct{*func()int32,*func()int32,*func(int32)*struct{},*func(*struct{}),*func(*struct{}),*func(*struct{})int32,*func(*struct{}),*func(*struct{})int32,*func(*struct{})int32}
+ XxMutexInit func(*crt.TLS) int32
+ XxMutexEnd func(*crt.TLS) int32
+ XxMutexAlloc func(*crt.TLS, int32) unsafe.Pointer
+ XxMutexFree func(*crt.TLS, unsafe.Pointer)
+ XxMutexEnter func(*crt.TLS, unsafe.Pointer)
+ XxMutexTry func(*crt.TLS, unsafe.Pointer) int32
+ XxMutexLeave func(*crt.TLS, unsafe.Pointer)
+ XxMutexHeld func(*crt.TLS, unsafe.Pointer) int32
+ XxMutexNotheld func(*crt.TLS, unsafe.Pointer) int32
+} // t140 struct{xMutexInit *func()int32,xMutexEnd *func()int32,xMutexAlloc *func(int32)*struct{},xMutexFree *func(*struct{}),xMutexEnter *func(*struct{}),xMutexTry *func(*struct{})int32,xMutexLeave *func(*struct{}),xMutexHeld *func(*struct{})int32,xMutexNotheld *func(*struct{})int32}
type Xsqlite3_pcache_methods2 struct {
- X0 int32
- X1 unsafe.Pointer
- X2 func(*crt.TLS, unsafe.Pointer) int32
- X3 func(*crt.TLS, unsafe.Pointer)
- X4 func(*crt.TLS, int32, int32, int32) unsafe.Pointer
- X5 func(*crt.TLS, unsafe.Pointer, int32)
- X6 func(*crt.TLS, unsafe.Pointer) int32
- X7 func(*crt.TLS, unsafe.Pointer, uint32, int32) unsafe.Pointer
- X8 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
- X9 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint32, uint32)
- X10 func(*crt.TLS, unsafe.Pointer, uint32)
- X11 func(*crt.TLS, unsafe.Pointer)
- X12 func(*crt.TLS, unsafe.Pointer)
-} // t85 struct{int32,*struct{},*func(*struct{})int32,*func(*struct{}),*func(int32,int32,int32)*struct{},*func(*struct{},int32),*func(*struct{})int32,*func(*struct{},uint32,int32)*struct{},*func(*struct{},*struct{},int32),*func(*struct{},*struct{},uint32,uint32),*func(*struct{},uint32),*func(*struct{}),*func(*struct{})}
-
-type XFuncDefHash struct{ X0 [23]unsafe.Pointer } // t86 struct{[23]*struct{}}
+ XiVersion int32
+ XpArg unsafe.Pointer
+ XxInit func(*crt.TLS, unsafe.Pointer) int32
+ XxShutdown func(*crt.TLS, unsafe.Pointer)
+ XxCreate func(*crt.TLS, int32, int32, int32) unsafe.Pointer
+ XxCachesize func(*crt.TLS, unsafe.Pointer, int32)
+ XxPagecount func(*crt.TLS, unsafe.Pointer) int32
+ XxFetch func(*crt.TLS, unsafe.Pointer, uint32, int32) unsafe.Pointer
+ XxUnpin func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
+ XxRekey func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint32, uint32)
+ XxTruncate func(*crt.TLS, unsafe.Pointer, uint32)
+ XxDestroy func(*crt.TLS, unsafe.Pointer)
+ XxShrink func(*crt.TLS, unsafe.Pointer)
+} // t141 struct{iVersion int32,pArg *struct{},xInit *func(*struct{})int32,xShutdown *func(*struct{}),xCreate *func(int32,int32,int32)*struct{},xCachesize *func(*struct{},int32),xPagecount *func(*struct{})int32,xFetch *func(*struct{},uint32,int32)*struct{},xUnpin *func(*struct{},*struct{},int32),xRekey *func(*struct{},*struct{},uint32,uint32),xTruncate *func(*struct{},uint32),xDestroy *func(*struct{}),xShrink *func(*struct{})}
+
+type XFuncDefHash struct{ Xa [23]unsafe.Pointer } // t142 struct{a [23]*struct{}}
type XToken struct {
- X0 *int8
- X1 uint32
-} // t87 struct{*int8,uint32}
+ Xz *int8
+ Xn uint32
+} // t143 struct{z *int8,n uint32}
type Tsqlite3StatType struct {
- X0 [10]uint32
- X1 [10]uint32
-} // t88 struct{[10]uint32,[10]uint32}
-
-type Xsqlite3_file struct{ X0 unsafe.Pointer } // t89 struct{*struct{}}
+ XnowValue [10]uint32
+ XmxValue [10]uint32
+} // t144 struct{nowValue [10]uint32,mxValue [10]uint32}
type Xsqlite3_mutex struct {
- X0 struct {
- X [0]struct {
- X0 struct {
- X0 int32
- X1 uint32
- X2 int32
- X3 int32
- X4 uint32
- X5 struct {
- X [0]struct {
- X0 struct {
- X0 int16
- X1 int16
- }
- X1 struct{ X0 unsafe.Pointer }
- }
- U [4]byte
- }
- }
- X1 [24]int8
- X2 int32
- }
- U [24]byte
- }
- X1 int32
- X2 int32
- X3 uint32
- X4 int32
-} // t90 struct{union{struct{int32,uint32,int32,int32,uint32,union{struct{int16,int16},struct{*struct{}}}},[24]int8,int32},int32,int32,uint32,int32}
+ Xmutex crt.Xpthread_mutex_t
+ Xid int32
+ XnRef int32
+ Xowner uint32
+ Xtrace int32
+} // t145 struct{mutex union{__data struct{__lock int32,__count uint32,__owner int32,__kind int32,__nusers uint32, union{__elision_data struct{__espins int16,__elision int16},__list struct{__next *struct{}}}},__size [24]int8,__align int32},id int32,nRef int32,owner uint32,trace int32}
type XHash struct {
- X0 uint32
- X1 uint32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
-} // t91 struct{uint32,uint32,*struct{},*struct{}}
+ Xhtsize uint32
+ Xcount uint32
+ Xfirst unsafe.Pointer
+ Xht unsafe.Pointer
+} // t146 struct{htsize uint32,count uint32,first *struct{},ht *struct{}}
type XDb struct {
- X0 *int8
- X1 unsafe.Pointer
- X2 uint8
- X3 uint8
- X4 unsafe.Pointer
-} // t92 struct{*int8,*struct{},uint8,uint8,*struct{}}
+ XzDbSName *int8
+ XpBt unsafe.Pointer
+ Xsafety_level uint8
+ XbSyncSet uint8
+ XpSchema unsafe.Pointer
+} // t147 struct{zDbSName *int8,pBt *struct{},safety_level uint8,bSyncSet uint8,pSchema *struct{}}
type Xsqlite3 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 int32
- X6 int32
- X7 int64
- X8 int64
- X9 uint32
- X10 int32
- X11 int32
- X12 int32
- X13 uint16
- X14 uint8
- X15 uint8
- X16 uint8
- X17 uint8
- X18 uint8
- X19 uint8
- X20 int8
- X21 uint8
- X22 uint8
- X23 uint8
- X24 uint8
- X25 uint8
- X26 uint8
- X27 int32
- X28 uint32
- X29 int32
- X30 int32
- X31 [12]int32
- X32 int32
- X33 struct {
- X0 int32
- X1 uint8
- X2 uint8
- X3 uint8
- X4 uint8
- }
- X34 int32
- X35 int32
- X36 int32
- X37 int32
- X38 int32
- X39 int32
- X40 *unsafe.Pointer
- X41 func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32
- X42 unsafe.Pointer
- X43 func(*crt.TLS, unsafe.Pointer, *int8, uint64)
- X44 unsafe.Pointer
- X45 unsafe.Pointer
- X46 func(*crt.TLS, unsafe.Pointer) int32
- X47 unsafe.Pointer
- X48 func(*crt.TLS, unsafe.Pointer)
- X49 unsafe.Pointer
- X50 func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64)
- X51 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32
- X52 unsafe.Pointer
- X53 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)
- X54 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)
- X55 unsafe.Pointer
- X56 unsafe.Pointer
- X57 struct {
- X [0]struct {
- X0 int32
- X1 float64
- }
- U [8]byte
- }
- X58 struct {
- X0 uint32
- X1 uint16
- X2 uint8
- X3 int32
- X4 int32
- X5 [3]int32
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- }
- X59 func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32
- X60 unsafe.Pointer
- X61 func(*crt.TLS, unsafe.Pointer) int32
- X62 unsafe.Pointer
- X63 uint32
- X64 int32
- X65 struct {
- X0 uint32
- X1 uint32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- }
- X66 unsafe.Pointer
- X67 *unsafe.Pointer
- X68 unsafe.Pointer
- X69 struct {
- X0 uint32
- X1 uint32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- }
- X70 struct {
- X0 uint32
- X1 uint32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- }
- X71 struct {
- X0 func(*crt.TLS, unsafe.Pointer, int32) int32
- X1 unsafe.Pointer
- X2 int32
- }
- X72 [2]struct {
- X0 *int8
- X1 unsafe.Pointer
- X2 uint8
- X3 uint8
- X4 unsafe.Pointer
- }
- X73 unsafe.Pointer
- X74 int32
- X75 int32
- X76 int32
- X77 int64
- X78 int64
- X79 *int32
-} // t93 struct{*struct{},*struct{},*struct{},*struct{},*struct{},int32,int32,int64,int64,uint32,int32,int32,int32,uint16,uint8,uint8,uint8,uint8,uint8,uint8,int8,uint8,uint8,uint8,uint8,uint8,uint8,int32,uint32,int32,int32,[12]int32,int32,struct{int32,uint8,uint8,uint8,uint8},int32,int32,int32,int32,int32,int32,**struct{},*func(uint32,*struct{},*struct{},*struct{})int32,*struct{},*func(*struct{},*int8,uint64),*struct{},*struct{},*func(*struct{})int32,*struct{},*func(*struct{}),*struct{},*func(*struct{},int32,*int8,*int8,int64),*func(*struct{},*struct{},*int8,int32)int32,*struct{},*func(*struct{},*struct{},int32,*int8),*func(*struct{},*struct{},int32,*struct{}),*struct{},*struct{},union{int32,float64},struct{uint32,uint16,uint8,int32,int32,[3]int32,*struct{},*struct{},*struct{}},*func(*struct{},int32,*int8,*int8,*int8,*int8)int32,*struct{},*func(*struct{})int32,*struct{},uint32,int32,struct{uint32,uint32,*struct{},*struct{}},*struct{},**struct{},*struct{},struct{uint32,uint32,*struct{},*struct{}},struct{uint32,uint32,*struct{},*struct{}},struct{*func(*struct{},int32)int32,*struct{},int32},[2]struct{*int8,*struct{},uint8,uint8,*struct{}},*struct{},int32,int32,int32,int64,int64,*int32}
+ XpVfs unsafe.Pointer
+ XpVdbe unsafe.Pointer
+ XpDfltColl unsafe.Pointer
+ Xmutex unsafe.Pointer
+ XaDb unsafe.Pointer
+ XnDb int32
+ Xflags int32
+ XlastRowid int64
+ XszMmap int64
+ XopenFlags uint32
+ XerrCode int32
+ XerrMask int32
+ XiSysErrno int32
+ XdbOptFlags uint16
+ Xenc uint8
+ XautoCommit uint8
+ Xtemp_store uint8
+ XmallocFailed uint8
+ XbBenignMalloc uint8
+ XdfltLockMode uint8
+ XnextAutovac int8
+ XsuppressErr uint8
+ XvtabOnConflict uint8
+ XisTransactionSavepoint uint8
+ XmTrace uint8
+ XskipBtreeMutex uint8
+ XnSqlExec uint8
+ XnextPagesize int32
+ Xmagic uint32
+ XnChange int32
+ XnTotalChange int32
+ XaLimit [12]int32
+ XnMaxSorterMmap int32
+ Xinit t148
+ XnVdbeActive int32
+ XnVdbeRead int32
+ XnVdbeWrite int32
+ XnVdbeExec int32
+ XnVDestroy int32
+ XnExtension int32
+ XaExtension *unsafe.Pointer
+ XxTrace func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32
+ XpTraceArg unsafe.Pointer
+ XxProfile func(*crt.TLS, unsafe.Pointer, *int8, uint64)
+ XpProfileArg unsafe.Pointer
+ XpCommitArg unsafe.Pointer
+ XxCommitCallback func(*crt.TLS, unsafe.Pointer) int32
+ XpRollbackArg unsafe.Pointer
+ XxRollbackCallback func(*crt.TLS, unsafe.Pointer)
+ XpUpdateArg unsafe.Pointer
+ XxUpdateCallback func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64)
+ XxWalCallback func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32
+ XpWalArg unsafe.Pointer
+ XxCollNeeded func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)
+ XxCollNeeded16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)
+ XpCollNeededArg unsafe.Pointer
+ XpErr unsafe.Pointer
+ Xu1 t149
+ Xlookaside t150
+ XxAuth func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32
+ XpAuthArg unsafe.Pointer
+ XxProgress func(*crt.TLS, unsafe.Pointer) int32
+ XpProgressArg unsafe.Pointer
+ XnProgressOps uint32
+ XnVTrans int32
+ XaModule XHash
+ XpVtabCtx unsafe.Pointer
+ XaVTrans *unsafe.Pointer
+ XpDisconnect unsafe.Pointer
+ XaFunc XHash
+ XaCollSeq XHash
+ XbusyHandler t75
+ XaDbStatic [2]XDb
+ XpSavepoint unsafe.Pointer
+ XbusyTimeout int32
+ XnSavepoint int32
+ XnStatement int32
+ XnDeferredCons int64
+ XnDeferredImmCons int64
+ XpnBytesFreed *int32
+} // t151 struct{pVfs *struct{},pVdbe *struct{},pDfltColl *struct{},mutex *struct{},aDb *struct{},nDb int32,flags int32,lastRowid int64,szMmap int64,openFlags uint32,errCode int32,errMask int32,iSysErrno int32,dbOptFlags uint16,enc uint8,autoCommit uint8,temp_store uint8,mallocFailed uint8,bBenignMalloc uint8,dfltLockMode uint8,nextAutovac int8,suppressErr uint8,vtabOnConflict uint8,isTransactionSavepoint uint8,mTrace uint8,skipBtreeMutex uint8,nSqlExec uint8,nextPagesize int32,magic uint32,nChange int32,nTotalChange int32,aLimit [12]int32,nMaxSorterMmap int32,init struct{newTnum int32,iDb uint8,busy uint8,orphanTrigger uint8,imposterTable uint8},nVdbeActive int32,nVdbeRead int32,nVdbeWrite int32,nVdbeExec int32,nVDestroy int32,nExtension int32,aExtension **struct{},xTrace *func(uint32,*struct{},*struct{},*struct{})int32,pTraceArg *struct{},xProfile *func(*struct{},*int8,uint64),pProfileArg *struct{},pCommitArg *struct{},xCommitCallback *func(*struct{})int32,pRollbackArg *struct{},xRollbackCallback *func(*struct{}),pUpdateArg *struct{},xUpdateCallback *func(*struct{},int32,*int8,*int8,int64),xWalCallback *func(*struct{},*struct{},*int8,int32)int32,pWalArg *struct{},xCollNeeded *func(*struct{},*struct{},int32,*int8),xCollNeeded16 *func(*struct{},*struct{},int32,*struct{}),pCollNeededArg *struct{},pErr *struct{},u1 union{isInterrupted int32,notUsed1 float64},lookaside struct{bDisable uint32,sz uint16,bMalloced uint8,nOut int32,mxOut int32,anStat [3]int32,pFree *struct{},pStart *struct{},pEnd *struct{}},xAuth *func(*struct{},int32,*int8,*int8,*int8,*int8)int32,pAuthArg *struct{},xProgress *func(*struct{})int32,pProgressArg *struct{},nProgressOps uint32,nVTrans int32,aModule struct{htsize uint32,count uint32,first *struct{},ht *struct{}},pVtabCtx *struct{},aVTrans **struct{},pDisconnect *struct{},aFunc struct{htsize uint32,count uint32,first *struct{},ht *struct{}},aCollSeq struct{htsize uint32,count uint32,first *struct{},ht *struct{}},busyHandler struct{xFunc *func(*struct{},int32)int32,pArg *struct{},nBusy int32},aDbStatic [2]struct{zDbSName *int8,pBt *struct{},safety_level uint8,bSyncSet uint8,pSchema *struct{}},pSavepoint *struct{},busyTimeout int32,nSavepoint int32,nStatement int32,nDeferredCons int64,nDeferredImmCons int64,pnBytesFreed *int32}
type XBtLock struct {
- X0 unsafe.Pointer
- X1 uint32
- X2 uint8
- X3 unsafe.Pointer
-} // t94 struct{*struct{},uint32,uint8,*struct{}}
+ XpBtree unsafe.Pointer
+ XiTable uint32
+ XeLock uint8
+ XpNext unsafe.Pointer
+} // t152 struct{pBtree *struct{},iTable uint32,eLock uint8,pNext *struct{}}
type XBtree struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 uint8
- X3 uint8
- X4 uint8
- X5 uint8
- X6 int32
- X7 int32
- X8 uint32
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- X11 struct {
- X0 unsafe.Pointer
- X1 uint32
- X2 uint8
- X3 unsafe.Pointer
- }
-} // t95 struct{*struct{},*struct{},uint8,uint8,uint8,uint8,int32,int32,uint32,*struct{},*struct{},struct{*struct{},uint32,uint8,*struct{}}}
+ Xdb unsafe.Pointer
+ XpBt unsafe.Pointer
+ XinTrans uint8
+ Xsharable uint8
+ Xlocked uint8
+ XhasIncrblobCur uint8
+ XwantToLock int32
+ XnBackup int32
+ XiDataVersion uint32
+ XpNext unsafe.Pointer
+ XpPrev unsafe.Pointer
+ Xlock XBtLock
+} // t153 struct{db *struct{},pBt *struct{},inTrans uint8,sharable uint8,locked uint8,hasIncrblobCur uint8,wantToLock int32,nBackup int32,iDataVersion uint32,pNext *struct{},pPrev *struct{},lock struct{pBtree *struct{},iTable uint32,eLock uint8,pNext *struct{}}}
type XPager struct {
- X0 unsafe.Pointer
- X1 uint8
- X2 uint8
- X3 uint8
- X4 uint8
- X5 uint8
- X6 uint8
- X7 uint8
- X8 uint8
- X9 uint8
- X10 uint8
- X11 uint8
- X12 uint8
- X13 uint8
- X14 uint8
- X15 uint8
- X16 uint8
- X17 uint8
- X18 uint8
- X19 uint8
- X20 uint8
- X21 uint8
- X22 uint32
- X23 uint32
- X24 uint32
- X25 uint32
- X26 int32
- X27 int32
- X28 uint32
- X29 uint32
- X30 unsafe.Pointer
- X31 unsafe.Pointer
- X32 unsafe.Pointer
- X33 unsafe.Pointer
- X34 int64
- X35 int64
- X36 unsafe.Pointer
- X37 unsafe.Pointer
- X38 int32
- X39 uint32
- X40 [16]int8
- X41 int32
- X42 int64
- X43 unsafe.Pointer
- X44 uint16
- X45 int16
- X46 uint32
- X47 uint32
- X48 int32
- X49 uint32
- X50 int64
- X51 *int8
- X52 *int8
- X53 func(*crt.TLS, unsafe.Pointer) int32
- X54 unsafe.Pointer
- X55 [3]int32
- X56 func(*crt.TLS, unsafe.Pointer)
- X57 func(*crt.TLS, unsafe.Pointer, uint32, *unsafe.Pointer, int32) int32
- X58 *int8
- X59 unsafe.Pointer
- X60 unsafe.Pointer
- X61 *int8
-} // t96 struct{*struct{},uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint32,uint32,uint32,uint32,int32,int32,uint32,uint32,*struct{},*struct{},*struct{},*struct{},int64,int64,*struct{},*struct{},int32,uint32,[16]int8,int32,int64,*struct{},uint16,int16,uint32,uint32,int32,uint32,int64,*int8,*int8,*func(*struct{})int32,*struct{},[3]int32,*func(*struct{}),*func(*struct{},uint32,**struct{},int32)int32,*int8,*struct{},*struct{},*int8}
+ XpVfs unsafe.Pointer
+ XexclusiveMode uint8
+ XjournalMode uint8
+ XuseJournal uint8
+ XnoSync uint8
+ XfullSync uint8
+ XextraSync uint8
+ XckptSyncFlags uint8
+ XwalSyncFlags uint8
+ XsyncFlags uint8
+ XtempFile uint8
+ XnoLock uint8
+ XreadOnly uint8
+ XmemDb uint8
+ XeState uint8
+ XeLock uint8
+ XchangeCountDone uint8
+ XsetMaster uint8
+ XdoNotSpill uint8
+ XsubjInMemory uint8
+ XbUseFetch uint8
+ XhasHeldSharedLock uint8
+ XdbSize uint32
+ XdbOrigSize uint32
+ XdbFileSize uint32
+ XdbHintSize uint32
+ XerrCode int32
+ XnRec int32
+ XcksumInit uint32
+ XnSubRec uint32
+ XpInJournal unsafe.Pointer
+ Xfd unsafe.Pointer
+ Xjfd unsafe.Pointer
+ Xsjfd unsafe.Pointer
+ XjournalOff int64
+ XjournalHdr int64
+ XpBackup unsafe.Pointer
+ XaSavepoint unsafe.Pointer
+ XnSavepoint int32
+ XiDataVersion uint32
+ XdbFileVers [16]int8
+ XnMmapOut int32
+ XszMmap int64
+ XpMmapFreelist unsafe.Pointer
+ XnExtra uint16
+ XnReserve int16
+ XvfsFlags uint32
+ XsectorSize uint32
+ XpageSize int32
+ XmxPgno uint32
+ XjournalSizeLimit int64
+ XzFilename *int8
+ XzJournal *int8
+ XxBusyHandler func(*crt.TLS, unsafe.Pointer) int32
+ XpBusyHandlerArg unsafe.Pointer
+ XaStat [3]int32
+ XxReiniter func(*crt.TLS, unsafe.Pointer)
+ XxGet func(*crt.TLS, unsafe.Pointer, uint32, *unsafe.Pointer, int32) int32
+ XpTmpSpace *int8
+ XpPCache unsafe.Pointer
+ XpWal unsafe.Pointer
+ XzWal *int8
+} // t154 struct{pVfs *struct{},exclusiveMode uint8,journalMode uint8,useJournal uint8,noSync uint8,fullSync uint8,extraSync uint8,ckptSyncFlags uint8,walSyncFlags uint8,syncFlags uint8,tempFile uint8,noLock uint8,readOnly uint8,memDb uint8,eState uint8,eLock uint8,changeCountDone uint8,setMaster uint8,doNotSpill uint8,subjInMemory uint8,bUseFetch uint8,hasHeldSharedLock uint8,dbSize uint32,dbOrigSize uint32,dbFileSize uint32,dbHintSize uint32,errCode int32,nRec int32,cksumInit uint32,nSubRec uint32,pInJournal *struct{},fd *struct{},jfd *struct{},sjfd *struct{},journalOff int64,journalHdr int64,pBackup *struct{},aSavepoint *struct{},nSavepoint int32,iDataVersion uint32,dbFileVers [16]int8,nMmapOut int32,szMmap int64,pMmapFreelist *struct{},nExtra uint16,nReserve int16,vfsFlags uint32,sectorSize uint32,pageSize int32,mxPgno uint32,journalSizeLimit int64,zFilename *int8,zJournal *int8,xBusyHandler *func(*struct{})int32,pBusyHandlerArg *struct{},aStat [3]int32,xReiniter *func(*struct{}),xGet *func(*struct{},uint32,**struct{},int32)int32,pTmpSpace *int8,pPCache *struct{},pWal *struct{},zWal *int8}
type XSchema struct {
- X0 int32
- X1 int32
- X2 struct {
- X0 uint32
- X1 uint32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- }
- X3 struct {
- X0 uint32
- X1 uint32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- }
- X4 struct {
- X0 uint32
- X1 uint32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- }
- X5 struct {
- X0 uint32
- X1 uint32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- }
- X6 unsafe.Pointer
- X7 uint8
- X8 uint8
- X9 uint16
- X10 int32
-} // t97 struct{int32,int32,struct{uint32,uint32,*struct{},*struct{}},struct{uint32,uint32,*struct{},*struct{}},struct{uint32,uint32,*struct{},*struct{}},struct{uint32,uint32,*struct{},*struct{}},*struct{},uint8,uint8,uint16,int32}
+ Xschema_cookie int32
+ XiGeneration int32
+ XtblHash XHash
+ XidxHash XHash
+ XtrigHash XHash
+ XfkeyHash XHash
+ XpSeqTab unsafe.Pointer
+ Xfile_format uint8
+ Xenc uint8
+ XschemaFlags uint16
+ Xcache_size int32
+} // t155 struct{schema_cookie int32,iGeneration int32,tblHash struct{htsize uint32,count uint32,first *struct{},ht *struct{}},idxHash struct{htsize uint32,count uint32,first *struct{},ht *struct{}},trigHash struct{htsize uint32,count uint32,first *struct{},ht *struct{}},fkeyHash struct{htsize uint32,count uint32,first *struct{},ht *struct{}},pSeqTab *struct{},file_format uint8,enc uint8,schemaFlags uint16,cache_size int32}
type XHashElem struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 *int8
-} // t98 struct{*struct{},*struct{},*struct{},*int8}
+ Xnext unsafe.Pointer
+ Xprev unsafe.Pointer
+ Xdata unsafe.Pointer
+ XpKey *int8
+} // t156 struct{next *struct{},prev *struct{},data *struct{},pKey *int8}
type T_ht struct {
- X0 int32
- X1 unsafe.Pointer
-} // t99 struct{int32,*struct{}}
+ Xcount int32
+ Xchain unsafe.Pointer
+} // t157 struct{count int32,chain *struct{}}
type XTrigger struct {
- X0 *int8
- X1 *int8
- X2 uint8
- X3 uint8
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 unsafe.Pointer
-} // t100 struct{*int8,*int8,uint8,uint8,*struct{},*struct{},*struct{},*struct{},*struct{},*struct{}}
+ XzName *int8
+ Xtable *int8
+ Xop uint8
+ Xtr_tm uint8
+ XpWhen unsafe.Pointer
+ XpColumns unsafe.Pointer
+ XpSchema unsafe.Pointer
+ XpTabSchema unsafe.Pointer
+ Xstep_list unsafe.Pointer
+ XpNext unsafe.Pointer
+} // t158 struct{zName *int8,table *int8,op uint8,tr_tm uint8,pWhen *struct{},pColumns *struct{},pSchema *struct{},pTabSchema *struct{},step_list *struct{},pNext *struct{}}
type XTable struct {
- X0 *int8
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 *int8
- X6 unsafe.Pointer
- X7 int32
- X8 uint32
- X9 uint32
- X10 int16
- X11 int16
- X12 int16
- X13 int16
- X14 uint8
- X15 int32
- X16 int32
- X17 **int8
- X18 unsafe.Pointer
- X19 unsafe.Pointer
- X20 unsafe.Pointer
- X21 unsafe.Pointer
-} // t101 struct{*int8,*struct{},*struct{},*struct{},*struct{},*int8,*struct{},int32,uint32,uint32,int16,int16,int16,int16,uint8,int32,int32,**int8,*struct{},*struct{},*struct{},*struct{}}
+ XzName *int8
+ XaCol unsafe.Pointer
+ XpIndex unsafe.Pointer
+ XpSelect unsafe.Pointer
+ XpFKey unsafe.Pointer
+ XzColAff *int8
+ XpCheck unsafe.Pointer
+ Xtnum int32
+ XnTabRef uint32
+ XtabFlags uint32
+ XiPKey int16
+ XnCol int16
+ XnRowLogEst int16
+ XszTabRow int16
+ XkeyConf uint8
+ XaddColOffset int32
+ XnModuleArg int32
+ XazModuleArg **int8
+ XpVTable unsafe.Pointer
+ XpTrigger unsafe.Pointer
+ XpSchema unsafe.Pointer
+ XpNextZombie unsafe.Pointer
+} // t159 struct{zName *int8,aCol *struct{},pIndex *struct{},pSelect *struct{},pFKey *struct{},zColAff *int8,pCheck *struct{},tnum int32,nTabRef uint32,tabFlags uint32,iPKey int16,nCol int16,nRowLogEst int16,szTabRow int16,keyConf uint8,addColOffset int32,nModuleArg int32,azModuleArg **int8,pVTable *struct{},pTrigger *struct{},pSchema *struct{},pNextZombie *struct{}}
type TVdbe struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 int16
- X5 uint32
- X6 int32
- X7 int32
- X8 uint32
- X9 int32
- X10 int32
- X11 int32
- X12 int32
- X13 int64
- X14 int64
- X15 int64
- X16 int64
- X17 unsafe.Pointer
- X18 unsafe.Pointer
- X19 *unsafe.Pointer
- X20 unsafe.Pointer
- X21 unsafe.Pointer
- X22 *int8
- X23 *unsafe.Pointer
- X24 unsafe.Pointer
- X25 *int32
- X26 int64
- X27 int32
- X28 int32
- X29 uint16
- X30 uint8
- X31 uint8
- X32 int16
- X33 uint32
- X34 uint32
- X35 [5]uint32
- X36 *int8
- X37 unsafe.Pointer
- X38 unsafe.Pointer
- X39 unsafe.Pointer
- X40 int32
- X41 uint32
- X42 unsafe.Pointer
- X43 unsafe.Pointer
-} // t102 struct{*struct{},*struct{},*struct{},*struct{},int16,uint32,int32,int32,uint32,int32,int32,int32,int32,int64,int64,int64,int64,*struct{},*struct{},**struct{},*struct{},*struct{},*int8,**struct{},*struct{},*int32,int64,int32,int32,uint16,uint8,uint8,int16,uint32,uint32,[5]uint32,*int8,*struct{},*struct{},*struct{},int32,uint32,*struct{},*struct{}}
+ Xdb unsafe.Pointer
+ XpPrev unsafe.Pointer
+ XpNext unsafe.Pointer
+ XpParse unsafe.Pointer
+ XnVar int16
+ Xmagic uint32
+ XnMem int32
+ XnCursor int32
+ XcacheCtr uint32
+ Xpc int32
+ Xrc int32
+ XnChange int32
+ XiStatement int32
+ XiCurrentTime int64
+ XnFkConstraint int64
+ XnStmtDefCons int64
+ XnStmtDefImmCons int64
+ XaOp unsafe.Pointer
+ XaMem unsafe.Pointer
+ XapArg *unsafe.Pointer
+ XaColName unsafe.Pointer
+ XpResultSet unsafe.Pointer
+ XzErrMsg *int8
+ XapCsr *unsafe.Pointer
+ XaVar unsafe.Pointer
+ XpVList *int32
+ XstartTime int64
+ XnOp int32
+ XrcApp int32
+ XnResColumn uint16
+ XerrorAction uint8
+ XminWriteFileFormat uint8
+ Xexpired int16
+ XbtreeMask uint32
+ XlockMask uint32
+ XaCounter [5]uint32
+ XzSql *int8
+ XpFree unsafe.Pointer
+ XpFrame unsafe.Pointer
+ XpDelFrame unsafe.Pointer
+ XnFrame int32
+ Xexpmask uint32
+ XpProgram unsafe.Pointer
+ XpAuxData unsafe.Pointer
+} // t160 struct{db *struct{},pPrev *struct{},pNext *struct{},pParse *struct{},nVar int16,magic uint32,nMem int32,nCursor int32,cacheCtr uint32,pc int32,rc int32,nChange int32,iStatement int32,iCurrentTime int64,nFkConstraint int64,nStmtDefCons int64,nStmtDefImmCons int64,aOp *struct{},aMem *struct{},apArg **struct{},aColName *struct{},pResultSet *struct{},zErrMsg *int8,apCsr **struct{},aVar *struct{},pVList *int32,startTime int64,nOp int32,rcApp int32,nResColumn uint16,errorAction uint8,minWriteFileFormat uint8,expired int16,btreeMask uint32,lockMask uint32,aCounter [5]uint32,zSql *int8,pFree *struct{},pFrame *struct{},pDelFrame *struct{},nFrame int32,expmask uint32,pProgram *struct{},pAuxData *struct{}}
type XDateTime struct {
- X0 int64
- X1 int32
- X2 int32
- X3 int32
- X4 int32
- X5 int32
- X6 int32
- X7 float64
- X8 int8
- X9 int8
- X10 int8
- X11 int8
- X12 int8
- X13 int8
- X14 int8
-} // t103 struct{int64,int32,int32,int32,int32,int32,int32,float64,int8,int8,int8,int8,int8,int8,int8}
+ XiJD int64
+ XY int32
+ XM int32
+ XD int32
+ Xh int32
+ Xm int32
+ Xtz int32
+ Xs float64
+ XvalidJD int8
+ XrawS int8
+ XvalidYMD int8
+ XvalidHMS int8
+ XvalidTZ int8
+ XtzSet int8
+ XisError int8
+} // t161 struct{iJD int64,Y int32,M int32,D int32,h int32,m int32,tz int32,s float64,validJD int8,rawS int8,validYMD int8,validHMS int8,validTZ int8,tzSet int8,isError int8}
type Xsqlite3_context struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 int32
- X5 int32
- X6 uint8
- X7 uint8
- X8 uint8
- X9 [1]unsafe.Pointer
-} // t104 struct{*struct{},*struct{},*struct{},*struct{},int32,int32,uint8,uint8,uint8,[1]*struct{}}
+ XpOut unsafe.Pointer
+ XpFunc unsafe.Pointer
+ XpMem unsafe.Pointer
+ XpVdbe unsafe.Pointer
+ XiOp int32
+ XisError int32
+ XskipFlag uint8
+ XfErrorOrAux uint8
+ Xargc uint8
+ Xargv [1]unsafe.Pointer
+} // t162 struct{pOut *struct{},pFunc *struct{},pMem *struct{},pVdbe *struct{},iOp int32,isError int32,skipFlag uint8,fErrorOrAux uint8,argc uint8,argv [1]*struct{}}
type XMem struct {
- X0 struct {
- X [0]struct {
- X0 float64
- X1 int64
- X2 int32
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- }
- U [8]byte
- }
- X1 uint16
- X2 uint8
- X3 uint8
- X4 int32
- X5 *int8
- X6 *int8
- X7 int32
- X8 uint32
- X9 unsafe.Pointer
- X10 func(*crt.TLS, unsafe.Pointer)
- X11 unsafe.Pointer
- X12 unsafe.Pointer
-} // t105 struct{union{float64,int64,int32,*struct{},*struct{},*struct{}},uint16,uint8,uint8,int32,*int8,*int8,int32,uint32,*struct{},*func(*struct{}),*struct{},*struct{}}
+ Xu t163
+ Xflags uint16
+ Xenc uint8
+ XeSubtype uint8
+ Xn int32
+ Xz *int8
+ XzMalloc *int8
+ XszMalloc int32
+ XuTemp uint32
+ Xdb unsafe.Pointer
+ XxDel func(*crt.TLS, unsafe.Pointer)
+ XpScopyFrom unsafe.Pointer
+ XpFiller unsafe.Pointer
+} // t164 struct{u union{r float64,i int64,nZero int32,pDef *struct{},pRowSet *struct{},pFrame *struct{}},flags uint16,enc uint8,eSubtype uint8,n int32,z *int8,zMalloc *int8,szMalloc int32,uTemp uint32,db *struct{},xDel *func(*struct{}),pScopyFrom *struct{},pFiller *struct{}}
type XFuncDef struct {
- X0 int8
- X1 uint16
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- X5 func(*crt.TLS, unsafe.Pointer)
- X6 *int8
- X7 struct {
- X [0]struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- }
- U [4]byte
- }
-} // t106 struct{int8,uint16,*struct{},*struct{},*func(*struct{},int32,**struct{}),*func(*struct{}),*int8,union{*struct{},*struct{}}}
+ XnArg int8
+ XfuncFlags uint16
+ XpUserData unsafe.Pointer
+ XpNext unsafe.Pointer
+ XxSFunc func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
+ XxFinalize func(*crt.TLS, unsafe.Pointer)
+ XzName *int8
+ Xu t165
+} // t166 struct{nArg int8,funcFlags uint16,pUserData *struct{},pNext *struct{},xSFunc *func(*struct{},int32,**struct{}),xFinalize *func(*struct{}),zName *int8,u union{pHash *struct{},pDestructor *struct{}}}
+
+type Xsqlite3_file struct{ XpMethods unsafe.Pointer } // t167 struct{pMethods *struct{}}
type Xsqlite3_io_methods struct {
- X0 int32
- X1 func(*crt.TLS, unsafe.Pointer) int32
- X2 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- X3 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- X4 func(*crt.TLS, unsafe.Pointer, int64) int32
- X5 func(*crt.TLS, unsafe.Pointer, int32) int32
- X6 func(*crt.TLS, unsafe.Pointer, *int64) int32
- X7 func(*crt.TLS, unsafe.Pointer, int32) int32
- X8 func(*crt.TLS, unsafe.Pointer, int32) int32
- X9 func(*crt.TLS, unsafe.Pointer, *int32) int32
- X10 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
- X11 func(*crt.TLS, unsafe.Pointer) int32
- X12 func(*crt.TLS, unsafe.Pointer) int32
- X13 func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32
- X14 func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32
- X15 func(*crt.TLS, unsafe.Pointer)
- X16 func(*crt.TLS, unsafe.Pointer, int32) int32
- X17 func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32
- X18 func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32
-} // t107 struct{int32,*func(*struct{})int32,*func(*struct{},*struct{},int32,int64)int32,*func(*struct{},*struct{},int32,int64)int32,*func(*struct{},int64)int32,*func(*struct{},int32)int32,*func(*struct{},*int64)int32,*func(*struct{},int32)int32,*func(*struct{},int32)int32,*func(*struct{},*int32)int32,*func(*struct{},int32,*struct{})int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},int32,int32,int32,**struct{})int32,*func(*struct{},int32,int32,int32)int32,*func(*struct{}),*func(*struct{},int32)int32,*func(*struct{},int64,int32,**struct{})int32,*func(*struct{},int64,*struct{})int32}
+ XiVersion int32
+ XxClose func(*crt.TLS, unsafe.Pointer) int32
+ XxRead func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
+ XxWrite func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
+ XxTruncate func(*crt.TLS, unsafe.Pointer, int64) int32
+ XxSync func(*crt.TLS, unsafe.Pointer, int32) int32
+ XxFileSize func(*crt.TLS, unsafe.Pointer, *int64) int32
+ XxLock func(*crt.TLS, unsafe.Pointer, int32) int32
+ XxUnlock func(*crt.TLS, unsafe.Pointer, int32) int32
+ XxCheckReservedLock func(*crt.TLS, unsafe.Pointer, *int32) int32
+ XxFileControl func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
+ XxSectorSize func(*crt.TLS, unsafe.Pointer) int32
+ XxDeviceCharacteristics func(*crt.TLS, unsafe.Pointer) int32
+ XxShmMap func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32
+ XxShmLock func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32
+ XxShmBarrier func(*crt.TLS, unsafe.Pointer)
+ XxShmUnmap func(*crt.TLS, unsafe.Pointer, int32) int32
+ XxFetch func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32
+ XxUnfetch func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32
+} // t168 struct{iVersion int32,xClose *func(*struct{})int32,xRead *func(*struct{},*struct{},int32,int64)int32,xWrite *func(*struct{},*struct{},int32,int64)int32,xTruncate *func(*struct{},int64)int32,xSync *func(*struct{},int32)int32,xFileSize *func(*struct{},*int64)int32,xLock *func(*struct{},int32)int32,xUnlock *func(*struct{},int32)int32,xCheckReservedLock *func(*struct{},*int32)int32,xFileControl *func(*struct{},int32,*struct{})int32,xSectorSize *func(*struct{})int32,xDeviceCharacteristics *func(*struct{})int32,xShmMap *func(*struct{},int32,int32,int32,**struct{})int32,xShmLock *func(*struct{},int32,int32,int32)int32,xShmBarrier *func(*struct{}),xShmUnmap *func(*struct{},int32)int32,xFetch *func(*struct{},int64,int32,**struct{})int32,xUnfetch *func(*struct{},int64,*struct{})int32}
type Xsqlite3_vfs struct {
- X0 int32
- X1 int32
- X2 int32
- X3 unsafe.Pointer
- X4 *int8
- X5 unsafe.Pointer
- X6 func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32
- X7 func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
- X8 func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
- X9 func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32
- X10 func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer
- X11 func(*crt.TLS, unsafe.Pointer, int32, *int8)
- X12 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS)
- X13 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
- X14 func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- X15 func(*crt.TLS, unsafe.Pointer, int32) int32
- X16 func(*crt.TLS, unsafe.Pointer, *float64) int32
- X17 func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- X18 func(*crt.TLS, unsafe.Pointer, *int64) int32
- X19 func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32
- X20 func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS)
- X21 func(*crt.TLS, unsafe.Pointer, *int8) *int8
-} // t108 struct{int32,int32,int32,*struct{},*int8,*struct{},*func(*struct{},*int8,*struct{},int32,*int32)int32,*func(*struct{},*int8,int32)int32,*func(*struct{},*int8,int32,*int32)int32,*func(*struct{},*int8,int32,*int8)int32,*func(*struct{},*int8)*struct{},*func(*struct{},int32,*int8),*func(*struct{},*struct{},*int8)*func(),*func(*struct{},*struct{}),*func(*struct{},int32,*int8)int32,*func(*struct{},int32)int32,*func(*struct{},*float64)int32,*func(*struct{},int32,*int8)int32,*func(*struct{},*int64)int32,*func(*struct{},*int8,*func())int32,*func(*struct{},*int8)*func(),*func(*struct{},*int8)*int8}
+ XiVersion int32
+ XszOsFile int32
+ XmxPathname int32
+ XpNext unsafe.Pointer
+ XzName *int8
+ XpAppData unsafe.Pointer
+ XxOpen func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32
+ XxDelete func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
+ XxAccess func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
+ XxFullPathname func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32
+ XxDlOpen func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer
+ XxDlError func(*crt.TLS, unsafe.Pointer, int32, *int8)
+ XxDlSym func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS)
+ XxDlClose func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
+ XxRandomness func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
+ XxSleep func(*crt.TLS, unsafe.Pointer, int32) int32
+ XxCurrentTime func(*crt.TLS, unsafe.Pointer, *float64) int32
+ XxGetLastError func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
+ XxCurrentTimeInt64 func(*crt.TLS, unsafe.Pointer, *int64) int32
+ XxSetSystemCall func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32
+ XxGetSystemCall func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS)
+ XxNextSystemCall func(*crt.TLS, unsafe.Pointer, *int8) *int8
+} // t169 struct{iVersion int32,szOsFile int32,mxPathname int32,pNext *struct{},zName *int8,pAppData *struct{},xOpen *func(*struct{},*int8,*struct{},int32,*int32)int32,xDelete *func(*struct{},*int8,int32)int32,xAccess *func(*struct{},*int8,int32,*int32)int32,xFullPathname *func(*struct{},*int8,int32,*int8)int32,xDlOpen *func(*struct{},*int8)*struct{},xDlError *func(*struct{},int32,*int8),xDlSym *func(*struct{},*struct{},*int8)*func(),xDlClose *func(*struct{},*struct{}),xRandomness *func(*struct{},int32,*int8)int32,xSleep *func(*struct{},int32)int32,xCurrentTime *func(*struct{},*float64)int32,xGetLastError *func(*struct{},int32,*int8)int32,xCurrentTimeInt64 *func(*struct{},*int64)int32,xSetSystemCall *func(*struct{},*int8,*func())int32,xGetSystemCall *func(*struct{},*int8)*func(),xNextSystemCall *func(*struct{},*int8)*int8}
type TBenignMallocHooks struct {
- X0 func(*crt.TLS)
- X1 func(*crt.TLS)
-} // t109 struct{*func(),*func()}
+ XxBenignBegin func(*crt.TLS)
+ XxBenignEnd func(*crt.TLS)
+} // t170 struct{xBenignBegin *func(),xBenignEnd *func()}
+
+type Xsqlite3_debug_mutex struct {
+ Xid int32
+ Xcnt int32
+} // t171 struct{id int32,cnt int32}
type TMem0Global struct {
- X0 unsafe.Pointer
- X1 int64
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 uint32
- X5 int32
-} // t110 struct{*struct{},int64,*struct{},*struct{},uint32,int32}
+ Xmutex unsafe.Pointer
+ XalarmThreshold int64
+ XpScratchEnd unsafe.Pointer
+ XpScratchFree unsafe.Pointer
+ XnScratchFree uint32
+ XnearlyFull int32
+} // t172 struct{mutex *struct{},alarmThreshold int64,pScratchEnd *struct{},pScratchFree *struct{},nScratchFree uint32,nearlyFull int32}
+
+type XScratchFreeslot struct{ XpNext unsafe.Pointer } // t173 struct{pNext *struct{}}
type Xet_info struct {
- X0 int8
- X1 uint8
- X2 uint8
- X3 uint8
- X4 uint8
- X5 uint8
-} // t111 struct{int8,uint8,uint8,uint8,uint8,uint8}
+ Xfmttype int8
+ Xbase uint8
+ Xflags uint8
+ Xtype uint8
+ Xcharset uint8
+ Xprefix uint8
+} // t174 struct{fmttype int8,base uint8,flags uint8,type uint8,charset uint8,prefix uint8}
type XStrAccum struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
- X3 uint32
- X4 uint32
- X5 uint32
- X6 uint8
- X7 uint8
-} // t112 struct{*struct{},*int8,*int8,uint32,uint32,uint32,uint8,uint8}
+ Xdb unsafe.Pointer
+ XzBase *int8
+ XzText *int8
+ XnChar uint32
+ XnAlloc uint32
+ XmxAlloc uint32
+ XaccError uint8
+ XprintfFlags uint8
+} // t175 struct{db *struct{},zBase *int8,zText *int8,nChar uint32,nAlloc uint32,mxAlloc uint32,accError uint8,printfFlags uint8}
type XPrintfArguments struct {
- X0 int32
- X1 int32
- X2 *unsafe.Pointer
-} // t113 struct{int32,int32,**struct{}}
+ XnArg int32
+ XnUsed int32
+ XapArg *unsafe.Pointer
+} // t176 struct{nArg int32,nUsed int32,apArg **struct{}}
type TSrcList_item struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
- X3 *int8
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 int32
- X7 int32
- X8 int32
- X9 struct {
- X0 uint8
- X1 int8
- }
- X10 uint8
- X11 int32
- X12 unsafe.Pointer
- X13 unsafe.Pointer
- X14 uint64
- X15 struct {
- X [0]struct {
- X0 *int8
- X1 unsafe.Pointer
- }
- U [4]byte
- }
- X16 unsafe.Pointer
-} // t114 struct{*struct{},*int8,*int8,*int8,*struct{},*struct{},int32,int32,int32,struct{uint8,int8,},uint8,int32,*struct{},*struct{},uint64,union{*int8,*struct{}},*struct{}}
+ XpSchema unsafe.Pointer
+ XzDatabase *int8
+ XzName *int8
+ XzAlias *int8
+ XpTab unsafe.Pointer
+ XpSelect unsafe.Pointer
+ XaddrFillSub int32
+ XregReturn int32
+ XregResult int32
+ Xfg t177
+ XiSelectId uint8
+ XiCursor int32
+ XpOn unsafe.Pointer
+ XpUsing unsafe.Pointer
+ XcolUsed uint64
+ Xu1 t178
+ XpIBIndex unsafe.Pointer
+} // t179 struct{pSchema *struct{},zDatabase *int8,zName *int8,zAlias *int8,pTab *struct{},pSelect *struct{},addrFillSub int32,regReturn int32,regResult int32,fg struct{jointype uint8,notIndexed int8},iSelectId uint8,iCursor int32,pOn *struct{},pUsing *struct{},colUsed uint64,u1 union{zIndexedBy *int8,pFuncArg *struct{}},pIBIndex *struct{}}
type XSrcList struct {
- X0 int32
- X1 uint32
- X2 [1]struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
- X3 *int8
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 int32
- X7 int32
- X8 int32
- X9 struct {
- X0 uint8
- X1 int8
- }
- X10 uint8
- X11 int32
- X12 unsafe.Pointer
- X13 unsafe.Pointer
- X14 uint64
- X15 struct {
- X [0]struct {
- X0 *int8
- X1 unsafe.Pointer
- }
- U [4]byte
- }
- X16 unsafe.Pointer
- }
-} // t115 struct{int32,uint32,[1]struct{*struct{},*int8,*int8,*int8,*struct{},*struct{},int32,int32,int32,struct{uint8,int8,},uint8,int32,*struct{},*struct{},uint64,union{*int8,*struct{}},*struct{}}}
+ XnSrc int32
+ XnAlloc uint32
+ Xa [1]TSrcList_item
+} // t180 struct{nSrc int32,nAlloc uint32,a [1]struct{pSchema *struct{},zDatabase *int8,zName *int8,zAlias *int8,pTab *struct{},pSelect *struct{},addrFillSub int32,regReturn int32,regResult int32,fg struct{jointype uint8,notIndexed int8},iSelectId uint8,iCursor int32,pOn *struct{},pUsing *struct{},colUsed uint64,u1 union{zIndexedBy *int8,pFuncArg *struct{}},pIBIndex *struct{}}}
type TCte struct {
- X0 *int8
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 *int8
-} // t116 struct{*int8,*struct{},*struct{},*int8}
+ XzName *int8
+ XpCols unsafe.Pointer
+ XpSelect unsafe.Pointer
+ XzCteErr *int8
+} // t181 struct{zName *int8,pCols *struct{},pSelect *struct{},zCteErr *int8}
type XWith struct {
- X0 int32
- X1 unsafe.Pointer
- X2 [1]struct {
- X0 *int8
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 *int8
- }
-} // t117 struct{int32,*struct{},[1]struct{*int8,*struct{},*struct{},*int8}}
+ XnCte int32
+ XpOuter unsafe.Pointer
+ Xa [1]TCte
+} // t182 struct{nCte int32,pOuter *struct{},a [1]struct{zName *int8,pCols *struct{},pSelect *struct{},zCteErr *int8}}
type TExprList_item struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
- X3 uint8
- X4 int8
- X5 struct {
- X [0]struct {
- X0 struct {
- X0 uint16
- X1 uint16
- }
- X1 int32
- }
- U [4]byte
- }
-} // t118 struct{*struct{},*int8,*int8,uint8,int8,union{struct{uint16,uint16},int32}}
+ XpExpr unsafe.Pointer
+ XzName *int8
+ XzSpan *int8
+ XsortOrder uint8
+ Xdone int8
+ Xu t183
+} // t184 struct{pExpr *struct{},zName *int8,zSpan *int8,sortOrder uint8,done int8,u union{x struct{iOrderByCol uint16,iAlias uint16},iConstExprReg int32}}
type XExprList struct {
- X0 int32
- X1 int32
- X2 [1]struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
- X3 uint8
- X4 int8
- X5 struct {
- X [0]struct {
- X0 struct {
- X0 uint16
- X1 uint16
- }
- X1 int32
- }
- U [4]byte
- }
- }
-} // t119 struct{int32,int32,[1]struct{*struct{},*int8,*int8,uint8,int8,union{struct{uint16,uint16},int32}}}
+ XnExpr int32
+ XnAlloc int32
+ Xa [1]TExprList_item
+} // t185 struct{nExpr int32,nAlloc int32,a [1]struct{pExpr *struct{},zName *int8,zSpan *int8,sortOrder uint8,done int8,u union{x struct{iOrderByCol uint16,iAlias uint16},iConstExprReg int32}}}
type XSelect struct {
- X0 unsafe.Pointer
- X1 uint8
- X2 int16
- X3 uint32
- X4 int32
- X5 int32
- X6 [12]int8
- X7 [2]int32
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- X11 unsafe.Pointer
- X12 unsafe.Pointer
- X13 unsafe.Pointer
- X14 unsafe.Pointer
- X15 unsafe.Pointer
- X16 unsafe.Pointer
- X17 unsafe.Pointer
-} // t120 struct{*struct{},uint8,int16,uint32,int32,int32,[12]int8,[2]int32,*struct{},*struct{},*struct{},*struct{},*struct{},*struct{},*struct{},*struct{},*struct{},*struct{}}
+ XpEList unsafe.Pointer
+ Xop uint8
+ XnSelectRow int16
+ XselFlags uint32
+ XiLimit int32
+ XiOffset int32
+ XzSelName [12]int8
+ XaddrOpenEphm [2]int32
+ XpSrc unsafe.Pointer
+ XpWhere unsafe.Pointer
+ XpGroupBy unsafe.Pointer
+ XpHaving unsafe.Pointer
+ XpOrderBy unsafe.Pointer
+ XpPrior unsafe.Pointer
+ XpNext unsafe.Pointer
+ XpLimit unsafe.Pointer
+ XpOffset unsafe.Pointer
+ XpWith unsafe.Pointer
+} // t186 struct{pEList *struct{},op uint8,nSelectRow int16,selFlags uint32,iLimit int32,iOffset int32,zSelName [12]int8,addrOpenEphm [2]int32,pSrc *struct{},pWhere *struct{},pGroupBy *struct{},pHaving *struct{},pOrderBy *struct{},pPrior *struct{},pNext *struct{},pLimit *struct{},pOffset *struct{},pWith *struct{}}
type XExpr struct {
- X0 uint8
- X1 int8
- X2 uint32
- X3 struct {
- X [0]struct {
- X0 *int8
- X1 int32
- }
- U [4]byte
- }
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 struct {
- X [0]struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- }
- U [4]byte
- }
- X7 int32
- X8 int32
- X9 int16
- X10 int16
- X11 int16
- X12 uint8
- X13 unsafe.Pointer
- X14 unsafe.Pointer
-} // t121 struct{uint8,int8,uint32,union{*int8,int32},*struct{},*struct{},union{*struct{},*struct{}},int32,int32,int16,int16,int16,uint8,*struct{},*struct{}}
+ Xop uint8
+ Xaffinity int8
+ Xflags uint32
+ Xu t187
+ XpLeft unsafe.Pointer
+ XpRight unsafe.Pointer
+ Xx t188
+ XnHeight int32
+ XiTable int32
+ XiColumn int16
+ XiAgg int16
+ XiRightJoinTable int16
+ Xop2 uint8
+ XpAggInfo unsafe.Pointer
+ XpTab unsafe.Pointer
+} // t189 struct{op uint8,affinity int8,flags uint32,u union{zToken *int8,iValue int32},pLeft *struct{},pRight *struct{},x union{pList *struct{},pSelect *struct{}},nHeight int32,iTable int32,iColumn int16,iAgg int16,iRightJoinTable int16,op2 uint8,pAggInfo *struct{},pTab *struct{}}
type Tsqlite3PrngType struct {
- X0 uint8
- X1 uint8
- X2 uint8
- X3 [256]uint8
-} // t122 struct{uint8,uint8,uint8,[256]uint8}
+ XisInit uint8
+ Xi uint8
+ Xj uint8
+ Xs [256]uint8
+} // t190 struct{isInit uint8,i uint8,j uint8,s [256]uint8}
type XSQLiteThread struct {
- X0 uint32
- X1 int32
- X2 unsafe.Pointer
- X3 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X4 unsafe.Pointer
-} // t123 struct{uint32,int32,*struct{},*func(*struct{})*struct{},*struct{}}
+ Xtid uint32
+ Xdone int32
+ XpOut unsafe.Pointer
+ XxTask func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ XpIn unsafe.Pointer
+} // t191 struct{tid uint32,done int32,pOut *struct{},xTask *func(*struct{})*struct{},pIn *struct{}}
type XColumn struct {
- X0 *int8
- X1 unsafe.Pointer
- X2 *int8
- X3 uint8
- X4 int8
- X5 uint8
- X6 uint8
-} // t124 struct{*int8,*struct{},*int8,uint8,int8,uint8,uint8}
+ XzName *int8
+ XpDflt unsafe.Pointer
+ XzColl *int8
+ XnotNull uint8
+ Xaffinity int8
+ XszEst uint8
+ XcolFlags uint8
+} // t192 struct{zName *int8,pDflt *struct{},zColl *int8,notNull uint8,affinity int8,szEst uint8,colFlags uint8}
type TyColCache struct {
- X0 int32
- X1 int16
- X2 uint8
- X3 int32
- X4 int32
- X5 int32
-} // t125 struct{int32,int16,uint8,int32,int32,int32}
+ XiTable int32
+ XiColumn int16
+ XtempReg uint8
+ XiLevel int32
+ XiReg int32
+ Xlru int32
+} // t193 struct{iTable int32,iColumn int16,tempReg uint8,iLevel int32,iReg int32,lru int32}
type XParse struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 unsafe.Pointer
- X3 int32
- X4 uint8
- X5 uint8
- X6 uint8
- X7 uint8
- X8 uint8
- X9 uint8
- X10 uint8
- X11 uint8
- X12 uint8
- X13 uint8
- X14 int32
- X15 int32
- X16 int32
- X17 int32
- X18 int32
- X19 int32
- X20 int32
- X21 int32
- X22 int32
- X23 int32
- X24 int32
- X25 int32
- X26 *int32
- X27 unsafe.Pointer
- X28 struct {
- X0 *int8
- X1 uint32
- }
- X29 uint32
- X30 uint32
- X31 int32
- X32 int32
- X33 int32
- X34 int32
- X35 int32
- X36 int32
- X37 unsafe.Pointer
- X38 unsafe.Pointer
- X39 unsafe.Pointer
- X40 unsafe.Pointer
- X41 int32
- X42 uint32
- X43 uint32
- X44 uint32
- X45 uint8
- X46 uint8
- X47 uint8
- X48 [10]struct {
- X0 int32
- X1 int16
- X2 uint8
- X3 int32
- X4 int32
- X5 int32
- }
- X49 [8]int32
- X50 struct {
- X0 *int8
- X1 uint32
- }
- X51 struct {
- X0 *int8
- X1 uint32
- }
- X52 int16
- X53 uint8
- X54 uint8
- X55 uint8
- X56 int32
- X57 int32
- X58 int32
- X59 int32
- X60 *int32
- X61 unsafe.Pointer
- X62 *int8
- X63 unsafe.Pointer
- X64 unsafe.Pointer
- X65 *int8
- X66 struct {
- X0 *int8
- X1 uint32
- }
- X67 *unsafe.Pointer
- X68 unsafe.Pointer
- X69 unsafe.Pointer
- X70 unsafe.Pointer
- X71 unsafe.Pointer
-} // t126 struct{*struct{},*int8,*struct{},int32,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,int32,int32,int32,int32,int32,int32,int32,int32,int32,int32,int32,int32,*int32,*struct{},struct{*int8,uint32},uint32,uint32,int32,int32,int32,int32,int32,int32,*struct{},*struct{},*struct{},*struct{},int32,uint32,uint32,uint32,uint8,uint8,uint8,[10]struct{int32,int16,uint8,int32,int32,int32},[8]int32,struct{*int8,uint32},struct{*int8,uint32},int16,uint8,uint8,uint8,int32,int32,int32,int32,*int32,*struct{},*int8,*struct{},*struct{},*int8,struct{*int8,uint32},**struct{},*struct{},*struct{},*struct{},*struct{}}
+ Xdb unsafe.Pointer
+ XzErrMsg *int8
+ XpVdbe unsafe.Pointer
+ Xrc int32
+ XcolNamesSet uint8
+ XcheckSchema uint8
+ Xnested uint8
+ XnTempReg uint8
+ XisMultiWrite uint8
+ XmayAbort uint8
+ XhasCompound uint8
+ XokConstFactor uint8
+ XdisableLookaside uint8
+ XnColCache uint8
+ XnRangeReg int32
+ XiRangeReg int32
+ XnErr int32
+ XnTab int32
+ XnMem int32
+ XnOpAlloc int32
+ XszOpAlloc int32
+ XckBase int32
+ XiSelfTab int32
+ XiCacheLevel int32
+ XiCacheCnt int32
+ XnLabel int32
+ XaLabel *int32
+ XpConstExpr unsafe.Pointer
+ XconstraintName XToken
+ XwriteMask uint32
+ XcookieMask uint32
+ XregRowid int32
+ XregRoot int32
+ XnMaxArg int32
+ XnSelect int32
+ XnSelectIndent int32
+ XnTableLock int32
+ XaTableLock unsafe.Pointer
+ XpAinc unsafe.Pointer
+ XpToplevel unsafe.Pointer
+ XpTriggerTab unsafe.Pointer
+ XaddrCrTab int32
+ XnQueryLoop uint32
+ Xoldmask uint32
+ Xnewmask uint32
+ XeTriggerOp uint8
+ XeOrconf uint8
+ XdisableTriggers uint8
+ XaColCache [10]TyColCache
+ XaTempReg [8]int32
+ XsNameToken XToken
+ XsLastToken XToken
+ XnVar int16
+ XiPkSortOrder uint8
+ Xexplain uint8
+ XdeclareVtab uint8
+ XnVtabLock int32
+ XnHeight int32
+ XiSelectId int32
+ XiNextSelectId int32
+ XpVList *int32
+ XpReprepare unsafe.Pointer
+ XzTail *int8
+ XpNewTable unsafe.Pointer
+ XpNewTrigger unsafe.Pointer
+ XzAuthContext *int8
+ XsArg XToken
+ XapVtabLock *unsafe.Pointer
+ XpZombieTab unsafe.Pointer
+ XpTriggerPrg unsafe.Pointer
+ XpWith unsafe.Pointer
+ XpWithToFree unsafe.Pointer
+} // t194 struct{db *struct{},zErrMsg *int8,pVdbe *struct{},rc int32,colNamesSet uint8,checkSchema uint8,nested uint8,nTempReg uint8,isMultiWrite uint8,mayAbort uint8,hasCompound uint8,okConstFactor uint8,disableLookaside uint8,nColCache uint8,nRangeReg int32,iRangeReg int32,nErr int32,nTab int32,nMem int32,nOpAlloc int32,szOpAlloc int32,ckBase int32,iSelfTab int32,iCacheLevel int32,iCacheCnt int32,nLabel int32,aLabel *int32,pConstExpr *struct{},constraintName struct{z *int8,n uint32},writeMask uint32,cookieMask uint32,regRowid int32,regRoot int32,nMaxArg int32,nSelect int32,nSelectIndent int32,nTableLock int32,aTableLock *struct{},pAinc *struct{},pToplevel *struct{},pTriggerTab *struct{},addrCrTab int32,nQueryLoop uint32,oldmask uint32,newmask uint32,eTriggerOp uint8,eOrconf uint8,disableTriggers uint8,aColCache [10]struct{iTable int32,iColumn int16,tempReg uint8,iLevel int32,iReg int32,lru int32},aTempReg [8]int32,sNameToken struct{z *int8,n uint32},sLastToken struct{z *int8,n uint32},nVar int16,iPkSortOrder uint8,explain uint8,declareVtab uint8,nVtabLock int32,nHeight int32,iSelectId int32,iNextSelectId int32,pVList *int32,pReprepare *struct{},zTail *int8,pNewTable *struct{},pNewTrigger *struct{},zAuthContext *int8,sArg struct{z *int8,n uint32},apVtabLock **struct{},pZombieTab *struct{},pTriggerPrg *struct{},pWith *struct{},pWithToFree *struct{}}
type Tunix_syscall struct {
- X0 *int8
- X1 func(*crt.TLS)
- X2 func(*crt.TLS)
-} // t127 struct{*int8,*func(),*func()}
+ XzName *int8
+ XpCurrent func(*crt.TLS)
+ XpDefault func(*crt.TLS)
+} // t195 struct{zName *int8,pCurrent *func(),pDefault *func()}
type TunixFileId struct {
- X0 uint64
- X1 uint64
-} // t128 struct{uint64,uint64}
+ Xdev uint64
+ Xino uint64
+} // t196 struct{dev uint64,ino uint64}
type XunixInodeInfo struct {
- X0 struct {
- X0 uint64
- X1 uint64
- }
- X1 int32
- X2 uint8
- X3 uint8
- X4 int32
- X5 unsafe.Pointer
- X6 int32
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 unsafe.Pointer
-} // t129 struct{struct{uint64,uint64},int32,uint8,uint8,int32,*struct{},int32,*struct{},*struct{},*struct{}}
+ XfileId TunixFileId
+ XnShared int32
+ XeFileLock uint8
+ XbProcessLock uint8
+ XnRef int32
+ XpShmNode unsafe.Pointer
+ XnLock int32
+ XpUnused unsafe.Pointer
+ XpNext unsafe.Pointer
+ XpPrev unsafe.Pointer
+} // t197 struct{fileId struct{dev uint64,ino uint64},nShared int32,eFileLock uint8,bProcessLock uint8,nRef int32,pShmNode *struct{},nLock int32,pUnused *struct{},pNext *struct{},pPrev *struct{}}
type XunixFile struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 int32
- X4 uint8
- X5 uint16
- X6 int32
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 *int8
- X10 unsafe.Pointer
- X11 int32
- X12 int32
- X13 int64
- X14 int64
- X15 int64
- X16 unsafe.Pointer
- X17 uint8
- X18 uint8
- X19 uint8
-} // t130 struct{*struct{},*struct{},*struct{},int32,uint8,uint16,int32,*struct{},*struct{},*int8,*struct{},int32,int32,int64,int64,int64,*struct{},uint8,uint8,uint8}
+ XpMethod unsafe.Pointer
+ XpVfs unsafe.Pointer
+ XpInode unsafe.Pointer
+ Xh int32
+ XeFileLock uint8
+ XctrlFlags uint16
+ XlastErrno int32
+ XlockingContext unsafe.Pointer
+ XpUnused unsafe.Pointer
+ XzPath *int8
+ XpShm unsafe.Pointer
+ XszChunk int32
+ XnFetchOut int32
+ XmmapSize int64
+ XmmapSizeActual int64
+ XmmapSizeMax int64
+ XpMapRegion unsafe.Pointer
+ XtransCntrChng uint8
+ XdbUpdate uint8
+ XinNormalWrite uint8
+} // t198 struct{pMethod *struct{},pVfs *struct{},pInode *struct{},h int32,eFileLock uint8,ctrlFlags uint16,lastErrno int32,lockingContext *struct{},pUnused *struct{},zPath *int8,pShm *struct{},szChunk int32,nFetchOut int32,mmapSize int64,mmapSizeActual int64,mmapSizeMax int64,pMapRegion *struct{},transCntrChng uint8,dbUpdate uint8,inNormalWrite uint8}
type XUnixUnusedFd struct {
- X0 int32
- X1 int32
- X2 unsafe.Pointer
-} // t131 struct{int32,int32,*struct{}}
+ Xfd int32
+ Xflags int32
+ XpNext unsafe.Pointer
+} // t199 struct{fd int32,flags int32,pNext *struct{}}
type XunixShmNode struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 *int8
- X3 int32
- X4 int32
- X5 uint16
- X6 uint8
- X7 **int8
- X8 int32
- X9 unsafe.Pointer
- X10 uint8
- X11 uint8
- X12 uint8
-} // t132 struct{*struct{},*struct{},*int8,int32,int32,uint16,uint8,**int8,int32,*struct{},uint8,uint8,uint8}
+ XpInode unsafe.Pointer
+ Xmutex unsafe.Pointer
+ XzFilename *int8
+ Xh int32
+ XszRegion int32
+ XnRegion uint16
+ XisReadonly uint8
+ XapRegion **int8
+ XnRef int32
+ XpFirst unsafe.Pointer
+ XexclMask uint8
+ XsharedMask uint8
+ XnextShmId uint8
+} // t200 struct{pInode *struct{},mutex *struct{},zFilename *int8,h int32,szRegion int32,nRegion uint16,isReadonly uint8,apRegion **int8,nRef int32,pFirst *struct{},exclMask uint8,sharedMask uint8,nextShmId uint8}
type Tflock struct {
- X0 int16
- X1 int16
- X2 int64
- X3 int64
- X4 int32
-} // t133 struct{int16,int16,int64,int64,int32}
+ Xl_type int16
+ Xl_whence int16
+ Xl_start int64
+ Xl_len int64
+ Xl_pid int32
+} // t201 struct{l_type int16,l_whence int16,l_start int64,l_len int64,l_pid int32}
type TunixShm struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 uint8
- X3 uint8
- X4 uint16
- X5 uint16
-} // t134 struct{*struct{},*struct{},uint8,uint8,uint16,uint16}
+ XpShmNode unsafe.Pointer
+ XpNext unsafe.Pointer
+ XhasMutex uint8
+ Xid uint8
+ XsharedMask uint16
+ XexclMask uint16
+} // t202 struct{pShmNode *struct{},pNext *struct{},hasMutex uint8,id uint8,sharedMask uint16,exclMask uint16}
type XBitvec struct {
- X0 uint32
- X1 uint32
- X2 uint32
- X3 struct {
- X [0]struct {
- X0 [500]uint8
- X1 [125]uint32
- X2 [125]unsafe.Pointer
- }
- U [500]byte
- }
-} // t135 struct{uint32,uint32,uint32,union{[500]uint8,[125]uint32,[125]*struct{}}}
+ XiSize uint32
+ XnSet uint32
+ XiDivisor uint32
+ Xu t203
+} // t204 struct{iSize uint32,nSet uint32,iDivisor uint32,u union{aBitmap [500]uint8,aHash [125]uint32,apSub [125]*struct{}}}
type XPgHdr struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 uint32
- X6 uint16
- X7 int16
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
-} // t136 struct{*struct{},*struct{},*struct{},*struct{},*struct{},uint32,uint16,int16,*struct{},*struct{},*struct{}}
+ XpPage unsafe.Pointer
+ XpData unsafe.Pointer
+ XpExtra unsafe.Pointer
+ XpDirty unsafe.Pointer
+ XpPager unsafe.Pointer
+ Xpgno uint32
+ Xflags uint16
+ XnRef int16
+ XpCache unsafe.Pointer
+ XpDirtyNext unsafe.Pointer
+ XpDirtyPrev unsafe.Pointer
+} // t205 struct{pPage *struct{},pData *struct{},pExtra *struct{},pDirty *struct{},pPager *struct{},pgno uint32,flags uint16,nRef int16,pCache *struct{},pDirtyNext *struct{},pDirtyPrev *struct{}}
type XPCache struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 int32
- X4 int32
- X5 int32
- X6 int32
- X7 int32
- X8 uint8
- X9 uint8
- X10 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- X11 unsafe.Pointer
- X12 unsafe.Pointer
-} // t137 struct{*struct{},*struct{},*struct{},int32,int32,int32,int32,int32,uint8,uint8,*func(*struct{},*struct{})int32,*struct{},*struct{}}
+ XpDirty unsafe.Pointer
+ XpDirtyTail unsafe.Pointer
+ XpSynced unsafe.Pointer
+ XnRefSum int32
+ XszCache int32
+ XszSpill int32
+ XszPage int32
+ XszExtra int32
+ XbPurgeable uint8
+ XeCreate uint8
+ XxStress func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
+ XpStress unsafe.Pointer
+ XpCache unsafe.Pointer
+} // t206 struct{pDirty *struct{},pDirtyTail *struct{},pSynced *struct{},nRefSum int32,szCache int32,szSpill int32,szPage int32,szExtra int32,bPurgeable uint8,eCreate uint8,xStress *func(*struct{},*struct{})int32,pStress *struct{},pCache *struct{}}
type Xsqlite3_pcache_page struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
-} // t138 struct{*struct{},*struct{}}
+ XpBuf unsafe.Pointer
+ XpExtra unsafe.Pointer
+} // t207 struct{pBuf *struct{},pExtra *struct{}}
type TPCacheGlobal struct {
- X0 struct {
- X0 unsafe.Pointer
- X1 uint32
- X2 uint32
- X3 uint32
- X4 uint32
- X5 struct {
- X0 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- }
- X1 uint32
- X2 uint8
- X3 uint8
- X4 uint8
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- }
- }
- X1 int32
- X2 int32
- X3 int32
- X4 int32
- X5 int32
- X6 int32
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- X11 int32
- X12 int32
-} // t139 struct{struct{*struct{},uint32,uint32,uint32,uint32,struct{struct{*struct{},*struct{}},uint32,uint8,uint8,uint8,*struct{},*struct{},*struct{},*struct{}}},int32,int32,int32,int32,int32,int32,*struct{},*struct{},*struct{},*struct{},int32,int32}
+ Xgrp XPGroup
+ XisInit int32
+ XseparateCache int32
+ XnInitPage int32
+ XszSlot int32
+ XnSlot int32
+ XnReserve int32
+ XpStart unsafe.Pointer
+ XpEnd unsafe.Pointer
+ Xmutex unsafe.Pointer
+ XpFree unsafe.Pointer
+ XnFreeSlot int32
+ XbUnderPressure int32
+} // t208 struct{grp struct{mutex *struct{},nMaxPage uint32,nMinPage uint32,mxPinned uint32,nCurrentPage uint32,lru struct{page struct{pBuf *struct{},pExtra *struct{}},iKey uint32,isPinned uint8,isBulkLocal uint8,isAnchor uint8,pNext *struct{},pCache *struct{},pLruNext *struct{},pLruPrev *struct{}}},isInit int32,separateCache int32,nInitPage int32,szSlot int32,nSlot int32,nReserve int32,pStart *struct{},pEnd *struct{},mutex *struct{},pFree *struct{},nFreeSlot int32,bUnderPressure int32}
type XPgHdr1 struct {
- X0 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- }
- X1 uint32
- X2 uint8
- X3 uint8
- X4 uint8
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
-} // t140 struct{struct{*struct{},*struct{}},uint32,uint8,uint8,uint8,*struct{},*struct{},*struct{},*struct{}}
+ Xpage Xsqlite3_pcache_page
+ XiKey uint32
+ XisPinned uint8
+ XisBulkLocal uint8
+ XisAnchor uint8
+ XpNext unsafe.Pointer
+ XpCache unsafe.Pointer
+ XpLruNext unsafe.Pointer
+ XpLruPrev unsafe.Pointer
+} // t209 struct{page struct{pBuf *struct{},pExtra *struct{}},iKey uint32,isPinned uint8,isBulkLocal uint8,isAnchor uint8,pNext *struct{},pCache *struct{},pLruNext *struct{},pLruPrev *struct{}}
type XPGroup struct {
- X0 unsafe.Pointer
- X1 uint32
- X2 uint32
- X3 uint32
- X4 uint32
- X5 struct {
- X0 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- }
- X1 uint32
- X2 uint8
- X3 uint8
- X4 uint8
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- }
-} // t141 struct{*struct{},uint32,uint32,uint32,uint32,struct{struct{*struct{},*struct{}},uint32,uint8,uint8,uint8,*struct{},*struct{},*struct{},*struct{}}}
+ Xmutex unsafe.Pointer
+ XnMaxPage uint32
+ XnMinPage uint32
+ XmxPinned uint32
+ XnCurrentPage uint32
+ Xlru XPgHdr1
+} // t210 struct{mutex *struct{},nMaxPage uint32,nMinPage uint32,mxPinned uint32,nCurrentPage uint32,lru struct{page struct{pBuf *struct{},pExtra *struct{}},iKey uint32,isPinned uint8,isBulkLocal uint8,isAnchor uint8,pNext *struct{},pCache *struct{},pLruNext *struct{},pLruPrev *struct{}}}
type XPCache1 struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
- X3 int32
- X4 int32
- X5 uint32
- X6 uint32
- X7 uint32
- X8 uint32
- X9 uint32
- X10 uint32
- X11 uint32
- X12 *unsafe.Pointer
- X13 unsafe.Pointer
- X14 unsafe.Pointer
-} // t142 struct{*struct{},int32,int32,int32,int32,uint32,uint32,uint32,uint32,uint32,uint32,uint32,**struct{},*struct{},*struct{}}
+ XpGroup unsafe.Pointer
+ XszPage int32
+ XszExtra int32
+ XszAlloc int32
+ XbPurgeable int32
+ XnMin uint32
+ XnMax uint32
+ Xn90pct uint32
+ XiMaxKey uint32
+ XnRecyclable uint32
+ XnPage uint32
+ XnHash uint32
+ XapHash *unsafe.Pointer
+ XpFree unsafe.Pointer
+ XpBulk unsafe.Pointer
+} // t211 struct{pGroup *struct{},szPage int32,szExtra int32,szAlloc int32,bPurgeable int32,nMin uint32,nMax uint32,n90pct uint32,iMaxKey uint32,nRecyclable uint32,nPage uint32,nHash uint32,apHash **struct{},pFree *struct{},pBulk *struct{}}
type XRowSet struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 uint16
- X7 uint16
- X8 int32
-} // t143 struct{*struct{},*struct{},*struct{},*struct{},*struct{},*struct{},uint16,uint16,int32}
+ XpChunk unsafe.Pointer
+ Xdb unsafe.Pointer
+ XpEntry unsafe.Pointer
+ XpLast unsafe.Pointer
+ XpFresh unsafe.Pointer
+ XpForest unsafe.Pointer
+ XnFresh uint16
+ XrsFlags uint16
+ XiBatch int32
+} // t212 struct{pChunk *struct{},db *struct{},pEntry *struct{},pLast *struct{},pFresh *struct{},pForest *struct{},nFresh uint16,rsFlags uint16,iBatch int32}
type TRowSetEntry struct {
- X0 int64
- X1 unsafe.Pointer
- X2 unsafe.Pointer
-} // t144 struct{int64,*struct{},*struct{}}
+ Xv int64
+ XpRight unsafe.Pointer
+ XpLeft unsafe.Pointer
+} // t213 struct{v int64,pRight *struct{},pLeft *struct{}}
type TRowSetChunk struct {
- X0 unsafe.Pointer
- X1 [63]struct {
- X0 int64
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- }
-} // t145 struct{*struct{},[63]struct{int64,*struct{},*struct{}}}
+ XpNextChunk unsafe.Pointer
+ XaEntry [63]TRowSetEntry
+} // t214 struct{pNextChunk *struct{},aEntry [63]struct{v int64,pRight *struct{},pLeft *struct{}}}
type XWalIndexHdr struct {
- X0 uint32
- X1 uint32
- X2 uint32
- X3 uint8
- X4 uint8
- X5 uint16
- X6 uint32
- X7 uint32
- X8 [2]uint32
- X9 [2]uint32
- X10 [2]uint32
-} // t146 struct{uint32,uint32,uint32,uint8,uint8,uint16,uint32,uint32,[2]uint32,[2]uint32,[2]uint32}
+ XiVersion uint32
+ Xunused uint32
+ XiChange uint32
+ XisInit uint8
+ XbigEndCksum uint8
+ XszPage uint16
+ XmxFrame uint32
+ XnPage uint32
+ XaFrameCksum [2]uint32
+ XaSalt [2]uint32
+ XaCksum [2]uint32
+} // t215 struct{iVersion uint32,unused uint32,iChange uint32,isInit uint8,bigEndCksum uint8,szPage uint16,mxFrame uint32,nPage uint32,aFrameCksum [2]uint32,aSalt [2]uint32,aCksum [2]uint32}
type XWal struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 uint32
- X4 int64
- X5 int32
- X6 int32
- X7 **uint32
- X8 uint32
- X9 int16
- X10 uint8
- X11 uint8
- X12 uint8
- X13 uint8
- X14 uint8
- X15 uint8
- X16 uint8
- X17 uint8
- X18 struct {
- X0 uint32
- X1 uint32
- X2 uint32
- X3 uint8
- X4 uint8
- X5 uint16
- X6 uint32
- X7 uint32
- X8 [2]uint32
- X9 [2]uint32
- X10 [2]uint32
- }
- X19 uint32
- X20 uint32
- X21 *int8
- X22 uint32
- X23 uint8
-} // t147 struct{*struct{},*struct{},*struct{},uint32,int64,int32,int32,**uint32,uint32,int16,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,struct{uint32,uint32,uint32,uint8,uint8,uint16,uint32,uint32,[2]uint32,[2]uint32,[2]uint32},uint32,uint32,*int8,uint32,uint8}
+ XpVfs unsafe.Pointer
+ XpDbFd unsafe.Pointer
+ XpWalFd unsafe.Pointer
+ XiCallback uint32
+ XmxWalSize int64
+ XnWiData int32
+ XszFirstBlock int32
+ XapWiData **uint32
+ XszPage uint32
+ XreadLock int16
+ XsyncFlags uint8
+ XexclusiveMode uint8
+ XwriteLock uint8
+ XckptLock uint8
+ XreadOnly uint8
+ XtruncateOnCommit uint8
+ XsyncHeader uint8
+ XpadToSectorBoundary uint8
+ Xhdr XWalIndexHdr
+ XminFrame uint32
+ XiReCksum uint32
+ XzWalName *int8
+ XnCkpt uint32
+ XlockError uint8
+} // t216 struct{pVfs *struct{},pDbFd *struct{},pWalFd *struct{},iCallback uint32,mxWalSize int64,nWiData int32,szFirstBlock int32,apWiData **uint32,szPage uint32,readLock int16,syncFlags uint8,exclusiveMode uint8,writeLock uint8,ckptLock uint8,readOnly uint8,truncateOnCommit uint8,syncHeader uint8,padToSectorBoundary uint8,hdr struct{iVersion uint32,unused uint32,iChange uint32,isInit uint8,bigEndCksum uint8,szPage uint16,mxFrame uint32,nPage uint32,aFrameCksum [2]uint32,aSalt [2]uint32,aCksum [2]uint32},minFrame uint32,iReCksum uint32,zWalName *int8,nCkpt uint32,lockError uint8}
type XPagerSavepoint struct {
- X0 int64
- X1 int64
- X2 unsafe.Pointer
- X3 uint32
- X4 uint32
- X5 [4]uint32
-} // t148 struct{int64,int64,*struct{},uint32,uint32,[4]uint32}
+ XiOffset int64
+ XiHdrOffset int64
+ XpInSavepoint unsafe.Pointer
+ XnOrig uint32
+ XiSubRec uint32
+ XaWalData [4]uint32
+} // t217 struct{iOffset int64,iHdrOffset int64,pInSavepoint *struct{},nOrig uint32,iSubRec uint32,aWalData [4]uint32}
type Xsqlite3_backup struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 uint32
- X3 int32
- X4 uint32
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 int32
- X8 uint32
- X9 uint32
- X10 int32
- X11 unsafe.Pointer
-} // t149 struct{*struct{},*struct{},uint32,int32,uint32,*struct{},*struct{},int32,uint32,uint32,int32,*struct{}}
+ XpDestDb unsafe.Pointer
+ XpDest unsafe.Pointer
+ XiDestSchema uint32
+ XbDestLocked int32
+ XiNext uint32
+ XpSrcDb unsafe.Pointer
+ XpSrc unsafe.Pointer
+ Xrc int32
+ XnRemaining uint32
+ XnPagecount uint32
+ XisAttached int32
+ XpNext unsafe.Pointer
+} // t218 struct{pDestDb *struct{},pDest *struct{},iDestSchema uint32,bDestLocked int32,iNext uint32,pSrcDb *struct{},pSrc *struct{},rc int32,nRemaining uint32,nPagecount uint32,isAttached int32,pNext *struct{}}
type XWalCkptInfo struct {
- X0 uint32
- X1 [5]uint32
- X2 [8]uint8
- X3 uint32
- X4 uint32
-} // t150 struct{uint32,[5]uint32,[8]uint8,uint32,uint32}
+ XnBackfill uint32
+ XaReadMark [5]uint32
+ XaLock [8]uint8
+ XnBackfillAttempted uint32
+ XnotUsed0 uint32
+} // t219 struct{nBackfill uint32,aReadMark [5]uint32,aLock [8]uint8,nBackfillAttempted uint32,notUsed0 uint32}
type TWalSegment struct {
- X0 int32
- X1 *uint16
- X2 *uint32
- X3 int32
- X4 int32
-} // t151 struct{int32,*uint16,*uint32,int32,int32}
+ XiNext int32
+ XaIndex *uint16
+ XaPgno *uint32
+ XnEntry int32
+ XiZero int32
+} // t220 struct{iNext int32,aIndex *uint16,aPgno *uint32,nEntry int32,iZero int32}
type XWalIterator struct {
- X0 int32
- X1 int32
- X2 [1]struct {
- X0 int32
- X1 *uint16
- X2 *uint32
- X3 int32
- X4 int32
- }
-} // t152 struct{int32,int32,[1]struct{int32,*uint16,*uint32,int32,int32}}
+ XiPrior int32
+ XnSegment int32
+ XaSegment [1]TWalSegment
+} // t221 struct{iPrior int32,nSegment int32,aSegment [1]struct{iNext int32,aIndex *uint16,aPgno *uint32,nEntry int32,iZero int32}}
type TSublist struct {
- X0 int32
- X1 *uint16
-} // t153 struct{int32,*uint16}
+ XnList int32
+ XaList *uint16
+} // t222 struct{nList int32,aList *uint16}
type XWalWriter struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int64
- X3 int32
- X4 int32
-} // t154 struct{*struct{},*struct{},int64,int32,int32}
+ XpWal unsafe.Pointer
+ XpFd unsafe.Pointer
+ XiSyncPoint int64
+ XsyncFlags int32
+ XszPage int32
+} // t223 struct{pWal *struct{},pFd *struct{},iSyncPoint int64,syncFlags int32,szPage int32}
type XBtShared struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 uint8
- X5 uint8
- X6 uint8
- X7 uint8
- X8 uint8
- X9 uint8
- X10 uint16
- X11 uint16
- X12 uint16
- X13 uint16
- X14 uint16
- X15 uint32
- X16 uint32
- X17 int32
- X18 uint32
- X19 unsafe.Pointer
- X20 func(*crt.TLS, unsafe.Pointer)
- X21 unsafe.Pointer
- X22 unsafe.Pointer
- X23 int32
- X24 unsafe.Pointer
- X25 unsafe.Pointer
- X26 unsafe.Pointer
- X27 *uint8
-} // t155 struct{*struct{},*struct{},*struct{},*struct{},uint8,uint8,uint8,uint8,uint8,uint8,uint16,uint16,uint16,uint16,uint16,uint32,uint32,int32,uint32,*struct{},*func(*struct{}),*struct{},*struct{},int32,*struct{},*struct{},*struct{},*uint8}
+ XpPager unsafe.Pointer
+ Xdb unsafe.Pointer
+ XpCursor unsafe.Pointer
+ XpPage1 unsafe.Pointer
+ XopenFlags uint8
+ XautoVacuum uint8
+ XincrVacuum uint8
+ XbDoTruncate uint8
+ XinTransaction uint8
+ Xmax1bytePayload uint8
+ XbtsFlags uint16
+ XmaxLocal uint16
+ XminLocal uint16
+ XmaxLeaf uint16
+ XminLeaf uint16
+ XpageSize uint32
+ XusableSize uint32
+ XnTransaction int32
+ XnPage uint32
+ XpSchema unsafe.Pointer
+ XxFreeSchema func(*crt.TLS, unsafe.Pointer)
+ Xmutex unsafe.Pointer
+ XpHasContent unsafe.Pointer
+ XnRef int32
+ XpNext unsafe.Pointer
+ XpLock unsafe.Pointer
+ XpWriter unsafe.Pointer
+ XpTmpSpace *uint8
+} // t224 struct{pPager *struct{},db *struct{},pCursor *struct{},pPage1 *struct{},openFlags uint8,autoVacuum uint8,incrVacuum uint8,bDoTruncate uint8,inTransaction uint8,max1bytePayload uint8,btsFlags uint16,maxLocal uint16,minLocal uint16,maxLeaf uint16,minLeaf uint16,pageSize uint32,usableSize uint32,nTransaction int32,nPage uint32,pSchema *struct{},xFreeSchema *func(*struct{}),mutex *struct{},pHasContent *struct{},nRef int32,pNext *struct{},pLock *struct{},pWriter *struct{},pTmpSpace *uint8}
type XCellInfo struct {
- X0 int64
- X1 *uint8
- X2 uint32
- X3 uint16
- X4 uint16
-} // t156 struct{int64,*uint8,uint32,uint16,uint16}
+ XnKey int64
+ XpPayload *uint8
+ XnPayload uint32
+ XnLocal uint16
+ XnSize uint16
+} // t225 struct{nKey int64,pPayload *uint8,nPayload uint32,nLocal uint16,nSize uint16}
type XBtCursor struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 *uint32
- X4 struct {
- X0 int64
- X1 *uint8
- X2 uint32
- X3 uint16
- X4 uint16
- }
- X5 int64
- X6 unsafe.Pointer
- X7 uint32
- X8 int32
- X9 int32
- X10 uint8
- X11 uint8
- X12 uint8
- X13 uint8
- X14 int8
- X15 uint8
- X16 uint16
- X17 [19]uint16
- X18 unsafe.Pointer
- X19 [20]unsafe.Pointer
-} // t157 struct{*struct{},*struct{},*struct{},*uint32,struct{int64,*uint8,uint32,uint16,uint16},int64,*struct{},uint32,int32,int32,uint8,uint8,uint8,uint8,int8,uint8,uint16,[19]uint16,*struct{},[20]*struct{}}
+ XpBtree unsafe.Pointer
+ XpBt unsafe.Pointer
+ XpNext unsafe.Pointer
+ XaOverflow *uint32
+ Xinfo XCellInfo
+ XnKey int64
+ XpKey unsafe.Pointer
+ XpgnoRoot uint32
+ XnOvflAlloc int32
+ XskipNext int32
+ XcurFlags uint8
+ XcurPagerFlags uint8
+ XeState uint8
+ Xhints uint8
+ XiPage int8
+ XcurIntKey uint8
+ Xix uint16
+ XaiIdx [19]uint16
+ XpKeyInfo unsafe.Pointer
+ XapPage [20]unsafe.Pointer
+} // t226 struct{pBtree *struct{},pBt *struct{},pNext *struct{},aOverflow *uint32,info struct{nKey int64,pPayload *uint8,nPayload uint32,nLocal uint16,nSize uint16},nKey int64,pKey *struct{},pgnoRoot uint32,nOvflAlloc int32,skipNext int32,curFlags uint8,curPagerFlags uint8,eState uint8,hints uint8,iPage int8,curIntKey uint8,ix uint16,aiIdx [19]uint16,pKeyInfo *struct{},apPage [20]*struct{}}
type XIndex struct {
- X0 *int8
- X1 *int16
- X2 *int16
- X3 unsafe.Pointer
- X4 *int8
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 *uint8
- X8 **int8
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- X11 int32
- X12 int16
- X13 uint16
- X14 uint16
- X15 uint8
- X16 int8
-} // t158 struct{*int8,*int16,*int16,*struct{},*int8,*struct{},*struct{},*uint8,**int8,*struct{},*struct{},int32,int16,uint16,uint16,uint8,int8,}
+ XzName *int8
+ XaiColumn *int16
+ XaiRowLogEst *int16
+ XpTable unsafe.Pointer
+ XzColAff *int8
+ XpNext unsafe.Pointer
+ XpSchema unsafe.Pointer
+ XaSortOrder *uint8
+ XazColl **int8
+ XpPartIdxWhere unsafe.Pointer
+ XaColExpr unsafe.Pointer
+ Xtnum int32
+ XszIdxRow int16
+ XnKeyCol uint16
+ XnColumn uint16
+ XonError uint8
+ XidxType int8
+} // t227 struct{zName *int8,aiColumn *int16,aiRowLogEst *int16,pTable *struct{},zColAff *int8,pNext *struct{},pSchema *struct{},aSortOrder *uint8,azColl **int8,pPartIdxWhere *struct{},aColExpr *struct{},tnum int32,szIdxRow int16,nKeyCol uint16,nColumn uint16,onError uint8,idxType int8}
type XMemPage struct {
- X0 uint8
- X1 uint8
- X2 uint8
- X3 uint8
- X4 uint32
- X5 uint8
- X6 uint8
- X7 uint8
- X8 uint8
- X9 uint8
- X10 uint16
- X11 uint16
- X12 uint16
- X13 uint16
- X14 uint16
- X15 uint16
- X16 [4]uint16
- X17 [4]*uint8
- X18 unsafe.Pointer
- X19 *uint8
- X20 *uint8
- X21 *uint8
- X22 *uint8
- X23 unsafe.Pointer
- X24 func(*crt.TLS, unsafe.Pointer, *uint8) uint16
- X25 func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
-} // t159 struct{uint8,uint8,uint8,uint8,uint32,uint8,uint8,uint8,uint8,uint8,uint16,uint16,uint16,uint16,uint16,uint16,[4]uint16,[4]*uint8,*struct{},*uint8,*uint8,*uint8,*uint8,*struct{},*func(*struct{},*uint8)uint16,*func(*struct{},*uint8,*struct{})}
+ XisInit uint8
+ XbBusy uint8
+ XintKey uint8
+ XintKeyLeaf uint8
+ Xpgno uint32
+ Xleaf uint8
+ XhdrOffset uint8
+ XchildPtrSize uint8
+ Xmax1bytePayload uint8
+ XnOverflow uint8
+ XmaxLocal uint16
+ XminLocal uint16
+ XcellOffset uint16
+ XnFree uint16
+ XnCell uint16
+ XmaskPage uint16
+ XaiOvfl [4]uint16
+ XapOvfl [4]*uint8
+ XpBt unsafe.Pointer
+ XaData *uint8
+ XaDataEnd *uint8
+ XaCellIdx *uint8
+ XaDataOfst *uint8
+ XpDbPage unsafe.Pointer
+ XxCellSize func(*crt.TLS, unsafe.Pointer, *uint8) uint16
+ XxParseCell func(*crt.TLS, unsafe.Pointer, *uint8, unsafe.Pointer)
+} // t228 struct{isInit uint8,bBusy uint8,intKey uint8,intKeyLeaf uint8,pgno uint32,leaf uint8,hdrOffset uint8,childPtrSize uint8,max1bytePayload uint8,nOverflow uint8,maxLocal uint16,minLocal uint16,cellOffset uint16,nFree uint16,nCell uint16,maskPage uint16,aiOvfl [4]uint16,apOvfl [4]*uint8,pBt *struct{},aData *uint8,aDataEnd *uint8,aCellIdx *uint8,aDataOfst *uint8,pDbPage *struct{},xCellSize *func(*struct{},*uint8)uint16,xParseCell *func(*struct{},*uint8,*struct{})}
type XUnpackedRecord struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 uint16
- X3 int8
- X4 uint8
- X5 int8
- X6 int8
- X7 uint8
-} // t160 struct{*struct{},*struct{},uint16,int8,uint8,int8,int8,uint8}
+ XpKeyInfo unsafe.Pointer
+ XaMem unsafe.Pointer
+ XnField uint16
+ Xdefault_rc int8
+ XerrCode uint8
+ Xr1 int8
+ Xr2 int8
+ XeqSeen uint8
+} // t229 struct{pKeyInfo *struct{},aMem *struct{},nField uint16,default_rc int8,errCode uint8,r1 int8,r2 int8,eqSeen uint8}
type XKeyInfo struct {
- X0 uint32
- X1 uint8
- X2 uint16
- X3 uint16
- X4 unsafe.Pointer
- X5 *uint8
- X6 [1]unsafe.Pointer
-} // t161 struct{uint32,uint8,uint16,uint16,*struct{},*uint8,[1]*struct{}}
+ XnRef uint32
+ Xenc uint8
+ XnField uint16
+ XnXField uint16
+ Xdb unsafe.Pointer
+ XaSortOrder *uint8
+ XaColl [1]unsafe.Pointer
+} // t230 struct{nRef uint32,enc uint8,nField uint16,nXField uint16,db *struct{},aSortOrder *uint8,aColl [1]*struct{}}
type XBtreePayload struct {
- X0 unsafe.Pointer
- X1 int64
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 uint16
- X5 int32
- X6 int32
-} // t162 struct{*struct{},int64,*struct{},*struct{},uint16,int32,int32}
+ XpKey unsafe.Pointer
+ XnKey int64
+ XpData unsafe.Pointer
+ XaMem unsafe.Pointer
+ XnMem uint16
+ XnData int32
+ XnZero int32
+} // t231 struct{pKey *struct{},nKey int64,pData *struct{},aMem *struct{},nMem uint16,nData int32,nZero int32}
type XCellArray struct {
- X0 int32
- X1 unsafe.Pointer
- X2 **uint8
- X3 *uint16
-} // t163 struct{int32,*struct{},**uint8,*uint16}
+ XnCell int32
+ XpRef unsafe.Pointer
+ XapCell **uint8
+ XszCell *uint16
+} // t232 struct{nCell int32,pRef *struct{},apCell **uint8,szCell *uint16}
type XIntegrityCk struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 *uint8
- X3 uint32
- X4 int32
- X5 int32
- X6 int32
- X7 *int8
- X8 int32
- X9 int32
- X10 struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
- X3 uint32
- X4 uint32
- X5 uint32
- X6 uint8
- X7 uint8
- }
- X11 *uint32
-} // t164 struct{*struct{},*struct{},*uint8,uint32,int32,int32,int32,*int8,int32,int32,struct{*struct{},*int8,*int8,uint32,uint32,uint32,uint8,uint8},*uint32}
+ XpBt unsafe.Pointer
+ XpPager unsafe.Pointer
+ XaPgRef *uint8
+ XnPage uint32
+ XmxErr int32
+ XnErr int32
+ XmallocFailed int32
+ XzPfx *int8
+ Xv1 int32
+ Xv2 int32
+ XerrMsg XStrAccum
+ Xheap *uint32
+} // t233 struct{pBt *struct{},pPager *struct{},aPgRef *uint8,nPage uint32,mxErr int32,nErr int32,mallocFailed int32,zPfx *int8,v1 int32,v2 int32,errMsg struct{db *struct{},zBase *int8,zText *int8,nChar uint32,nAlloc uint32,mxAlloc uint32,accError uint8,printfFlags uint8},heap *uint32}
type XVdbeFrame struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 *int64
- X4 unsafe.Pointer
- X5 *unsafe.Pointer
- X6 *uint8
- X7 unsafe.Pointer
- X8 int64
- X9 unsafe.Pointer
- X10 int32
- X11 int32
- X12 int32
- X13 int32
- X14 int32
- X15 int32
- X16 int32
- X17 int32
-} // t165 struct{*struct{},*struct{},*struct{},*int64,*struct{},**struct{},*uint8,*struct{},int64,*struct{},int32,int32,int32,int32,int32,int32,int32,int32}
+ Xv unsafe.Pointer
+ XpParent unsafe.Pointer
+ XaOp unsafe.Pointer
+ XanExec *int64
+ XaMem unsafe.Pointer
+ XapCsr *unsafe.Pointer
+ XaOnce *uint8
+ Xtoken unsafe.Pointer
+ XlastRowid int64
+ XpAuxData unsafe.Pointer
+ XnCursor int32
+ Xpc int32
+ XnOp int32
+ XnMem int32
+ XnChildMem int32
+ XnChildCsr int32
+ XnChange int32
+ XnDbChange int32
+} // t234 struct{v *struct{},pParent *struct{},aOp *struct{},anExec *int64,aMem *struct{},apCsr **struct{},aOnce *uint8,token *struct{},lastRowid int64,pAuxData *struct{},nCursor int32,pc int32,nOp int32,nMem int32,nChildMem int32,nChildCsr int32,nChange int32,nDbChange int32}
type XVdbeOp struct {
- X0 uint8
- X1 int8
- X2 uint16
- X3 int32
- X4 int32
- X5 int32
- X6 struct {
- X [0]struct {
- X0 int32
- X1 unsafe.Pointer
- X2 *int8
- X3 *int64
- X4 *float64
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- X11 *int32
- X12 unsafe.Pointer
- X13 unsafe.Pointer
- X14 func(*crt.TLS, unsafe.Pointer, *int32) int32
- }
- U [4]byte
- }
- X7 *int8
-} // t166 struct{uint8,int8,uint16,int32,int32,int32,union{int32,*struct{},*int8,*int64,*float64,*struct{},*struct{},*struct{},*struct{},*struct{},*struct{},*int32,*struct{},*struct{},*func(*struct{},*int32)int32},*int8}
+ Xopcode uint8
+ Xp4type int8
+ Xp5 uint16
+ Xp1 int32
+ Xp2 int32
+ Xp3 int32
+ Xp4 t235
+ XzComment *int8
+} // t236 struct{opcode uint8,p4type int8,p5 uint16,p1 int32,p2 int32,p3 int32,p4 union{i int32,p *struct{},z *int8,pI64 *int64,pReal *float64,pFunc *struct{},pCtx *struct{},pColl *struct{},pMem *struct{},pVtab *struct{},pKeyInfo *struct{},ai *int32,pProgram *struct{},pTab *struct{},xAdvance *func(*struct{},*int32)int32},zComment *int8}
type XVdbeOpIter struct {
- X0 unsafe.Pointer
- X1 *unsafe.Pointer
- X2 int32
- X3 int32
- X4 int32
-} // t167 struct{*struct{},**struct{},int32,int32,int32}
+ Xv unsafe.Pointer
+ XapSub *unsafe.Pointer
+ XnSub int32
+ XiAddr int32
+ XiSub int32
+} // t237 struct{v *struct{},apSub **struct{},nSub int32,iAddr int32,iSub int32}
type XSubProgram struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
- X3 int32
- X4 *uint8
- X5 unsafe.Pointer
- X6 unsafe.Pointer
-} // t168 struct{*struct{},int32,int32,int32,*uint8,*struct{},*struct{}}
+ XaOp unsafe.Pointer
+ XnOp int32
+ XnMem int32
+ XnCsr int32
+ XaOnce *uint8
+ Xtoken unsafe.Pointer
+ XpNext unsafe.Pointer
+} // t238 struct{aOp *struct{},nOp int32,nMem int32,nCsr int32,aOnce *uint8,token *struct{},pNext *struct{}}
type XVdbeOpList struct {
- X0 uint8
- X1 int8
- X2 int8
- X3 int8
-} // t169 struct{uint8,int8,int8,int8}
+ Xopcode uint8
+ Xp1 int8
+ Xp2 int8
+ Xp3 int8
+} // t239 struct{opcode uint8,p1 int8,p2 int8,p3 int8}
type XVTable struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 int32
- X4 uint8
- X5 int32
- X6 unsafe.Pointer
-} // t170 struct{*struct{},*struct{},*struct{},int32,uint8,int32,*struct{}}
+ Xdb unsafe.Pointer
+ XpMod unsafe.Pointer
+ XpVtab unsafe.Pointer
+ XnRef int32
+ XbConstraint uint8
+ XiSavepoint int32
+ XpNext unsafe.Pointer
+} // t240 struct{db *struct{},pMod *struct{},pVtab *struct{},nRef int32,bConstraint uint8,iSavepoint int32,pNext *struct{}}
type XCollSeq struct {
- X0 *int8
- X1 uint8
- X2 unsafe.Pointer
- X3 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32
- X4 func(*crt.TLS, unsafe.Pointer)
-} // t171 struct{*int8,uint8,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32,*func(*struct{})}
+ XzName *int8
+ Xenc uint8
+ XpUser unsafe.Pointer
+ XxCmp func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32
+ XxDel func(*crt.TLS, unsafe.Pointer)
+} // t241 struct{zName *int8,enc uint8,pUser *struct{},xCmp *func(*struct{},int32,*struct{},int32,*struct{})int32,xDel *func(*struct{})}
type Xsqlite3_vtab struct {
- X0 unsafe.Pointer
- X1 int32
- X2 *int8
-} // t172 struct{*struct{},int32,*int8}
+ XpModule unsafe.Pointer
+ XnRef int32
+ XzErrMsg *int8
+} // t242 struct{pModule *struct{},nRef int32,zErrMsg *int8}
type XVdbeCursor struct {
- X0 uint8
- X1 int8
- X2 uint8
- X3 uint8
- X4 uint8
- X5 uint8
- X6 uint8
- X7 int8
- X8 unsafe.Pointer
- X9 int64
- X10 *int32
- X11 uint32
- X12 int32
- X13 unsafe.Pointer
- X14 struct {
- X [0]struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int32
- X3 unsafe.Pointer
- }
- U [4]byte
- }
- X15 unsafe.Pointer
- X16 uint32
- X17 uint32
- X18 int16
- X19 uint16
- X20 int64
- X21 *uint32
- X22 *uint8
- X23 uint32
- X24 uint32
- X25 [1]uint32
-} // t173 struct{uint8,int8,uint8,uint8,uint8,uint8,uint8,int8,*struct{},int64,*int32,uint32,int32,*struct{},union{*struct{},*struct{},int32,*struct{}},*struct{},uint32,uint32,int16,uint16,int64,*uint32,*uint8,uint32,uint32,[1]uint32}
+ XeCurType uint8
+ XiDb int8
+ XnullRow uint8
+ XdeferredMoveto uint8
+ XisTable uint8
+ XseekOp uint8
+ XwrFlag uint8
+ XisEphemeral int8
+ XpBtx unsafe.Pointer
+ XseqCount int64
+ XaAltMap *int32
+ XcacheStatus uint32
+ XseekResult int32
+ XpAltCursor unsafe.Pointer
+ Xuc t243
+ XpKeyInfo unsafe.Pointer
+ XiHdrOffset uint32
+ XpgnoRoot uint32
+ XnField int16
+ XnHdrParsed uint16
+ XmovetoTarget int64
+ XaOffset *uint32
+ XaRow *uint8
+ XpayloadSize uint32
+ XszRow uint32
+ XaType [1]uint32
+} // t244 struct{eCurType uint8,iDb int8,nullRow uint8,deferredMoveto uint8,isTable uint8,seekOp uint8,wrFlag uint8,isEphemeral int8,pBtx *struct{},seqCount int64,aAltMap *int32,cacheStatus uint32,seekResult int32,pAltCursor *struct{},uc union{pCursor *struct{},pVCur *struct{},pseudoTableReg int32,pSorter *struct{}},pKeyInfo *struct{},iHdrOffset uint32,pgnoRoot uint32,nField int16,nHdrParsed uint16,movetoTarget int64,aOffset *uint32,aRow *uint8,payloadSize uint32,szRow uint32,aType [1]uint32}
type XAuxData struct {
- X0 int32
- X1 int32
- X2 unsafe.Pointer
- X3 func(*crt.TLS, unsafe.Pointer)
- X4 unsafe.Pointer
-} // t174 struct{int32,int32,*struct{},*func(*struct{}),*struct{}}
+ XiAuxOp int32
+ XiAuxArg int32
+ XpAux unsafe.Pointer
+ XxDeleteAux func(*crt.TLS, unsafe.Pointer)
+ XpNextAux unsafe.Pointer
+} // t245 struct{iAuxOp int32,iAuxArg int32,pAux *struct{},xDeleteAux *func(*struct{}),pNextAux *struct{}}
type TReusableSpace struct {
- X0 *uint8
- X1 int32
- X2 int32
-} // t175 struct{*uint8,int32,int32}
+ XpSpace *uint8
+ XnFree int32
+ XnNeeded int32
+} // t246 struct{pSpace *uint8,nFree int32,nNeeded int32}
+
+type Xsqlite3_vtab_cursor struct{ XpVtab unsafe.Pointer } // t247 struct{pVtab *struct{}}
type Xsqlite3_module struct {
- X0 int32
- X1 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
- X2 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
- X3 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- X4 func(*crt.TLS, unsafe.Pointer) int32
- X5 func(*crt.TLS, unsafe.Pointer) int32
- X6 func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32
- X7 func(*crt.TLS, unsafe.Pointer) int32
- X8 func(*crt.TLS, unsafe.Pointer, int32, *int8, int32, *unsafe.Pointer) int32
- X9 func(*crt.TLS, unsafe.Pointer) int32
- X10 func(*crt.TLS, unsafe.Pointer) int32
- X11 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) int32
- X12 func(*crt.TLS, unsafe.Pointer, *int64) int32
- X13 func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer, *int64) int32
- X14 func(*crt.TLS, unsafe.Pointer) int32
- X15 func(*crt.TLS, unsafe.Pointer) int32
- X16 func(*crt.TLS, unsafe.Pointer) int32
- X17 func(*crt.TLS, unsafe.Pointer) int32
- X18 func(*crt.TLS, unsafe.Pointer, int32, *int8, *func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), *unsafe.Pointer) int32
- X19 func(*crt.TLS, unsafe.Pointer, *int8) int32
- X20 func(*crt.TLS, unsafe.Pointer, int32) int32
- X21 func(*crt.TLS, unsafe.Pointer, int32) int32
- X22 func(*crt.TLS, unsafe.Pointer, int32) int32
-} // t176 struct{int32,*func(*struct{},*struct{},int32,**int8,**struct{},**int8)int32,*func(*struct{},*struct{},int32,**int8,**struct{},**int8)int32,*func(*struct{},*struct{})int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},**struct{})int32,*func(*struct{})int32,*func(*struct{},int32,*int8,int32,**struct{})int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},*struct{},int32)int32,*func(*struct{},*int64)int32,*func(*struct{},int32,**struct{},*int64)int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},int32,*int8,**func(*struct{},int32,**struct{}),**struct{})int32,*func(*struct{},*int8)int32,*func(*struct{},int32)int32,*func(*struct{},int32)int32,*func(*struct{},int32)int32}
+ XiVersion int32
+ XxCreate func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
+ XxConnect func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, **int8, *unsafe.Pointer, **int8) int32
+ XxBestIndex func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
+ XxDisconnect func(*crt.TLS, unsafe.Pointer) int32
+ XxDestroy func(*crt.TLS, unsafe.Pointer) int32
+ XxOpen func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32
+ XxClose func(*crt.TLS, unsafe.Pointer) int32
+ XxFilter func(*crt.TLS, unsafe.Pointer, int32, *int8, int32, *unsafe.Pointer) int32
+ XxNext func(*crt.TLS, unsafe.Pointer) int32
+ XxEof func(*crt.TLS, unsafe.Pointer) int32
+ XxColumn func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) int32
+ XxRowid func(*crt.TLS, unsafe.Pointer, *int64) int32
+ XxUpdate func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer, *int64) int32
+ XxBegin func(*crt.TLS, unsafe.Pointer) int32
+ XxSync func(*crt.TLS, unsafe.Pointer) int32
+ XxCommit func(*crt.TLS, unsafe.Pointer) int32
+ XxRollback func(*crt.TLS, unsafe.Pointer) int32
+ XxFindFunction func(*crt.TLS, unsafe.Pointer, int32, *int8, *func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), *unsafe.Pointer) int32
+ XxRename func(*crt.TLS, unsafe.Pointer, *int8) int32
+ XxSavepoint func(*crt.TLS, unsafe.Pointer, int32) int32
+ XxRelease func(*crt.TLS, unsafe.Pointer, int32) int32
+ XxRollbackTo func(*crt.TLS, unsafe.Pointer, int32) int32
+} // t248 struct{iVersion int32,xCreate *func(*struct{},*struct{},int32,**int8,**struct{},**int8)int32,xConnect *func(*struct{},*struct{},int32,**int8,**struct{},**int8)int32,xBestIndex *func(*struct{},*struct{})int32,xDisconnect *func(*struct{})int32,xDestroy *func(*struct{})int32,xOpen *func(*struct{},**struct{})int32,xClose *func(*struct{})int32,xFilter *func(*struct{},int32,*int8,int32,**struct{})int32,xNext *func(*struct{})int32,xEof *func(*struct{})int32,xColumn *func(*struct{},*struct{},int32)int32,xRowid *func(*struct{},*int64)int32,xUpdate *func(*struct{},int32,**struct{},*int64)int32,xBegin *func(*struct{})int32,xSync *func(*struct{})int32,xCommit *func(*struct{})int32,xRollback *func(*struct{})int32,xFindFunction *func(*struct{},int32,*int8,**func(*struct{},int32,**struct{}),**struct{})int32,xRename *func(*struct{},*int8)int32,xSavepoint *func(*struct{},int32)int32,xRelease *func(*struct{},int32)int32,xRollbackTo *func(*struct{},int32)int32}
type XSavepoint struct {
- X0 *int8
- X1 int64
- X2 int64
- X3 unsafe.Pointer
-} // t177 struct{*int8,int64,int64,*struct{}}
+ XzName *int8
+ XnDeferredCons int64
+ XnDeferredImmCons int64
+ XpNext unsafe.Pointer
+} // t249 struct{zName *int8,nDeferredCons int64,nDeferredImmCons int64,pNext *struct{}}
type XSorterFile struct {
- X0 unsafe.Pointer
- X1 int64
-} // t178 struct{*struct{},int64}
+ XpFd unsafe.Pointer
+ XiEof int64
+} // t250 struct{pFd *struct{},iEof int64}
type XSortSubtask struct {
- X0 unsafe.Pointer
- X1 int32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 struct {
- X0 unsafe.Pointer
- X1 *uint8
- X2 int32
- }
- X5 int32
- X6 func(*crt.TLS, unsafe.Pointer, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32
- X7 struct {
- X0 unsafe.Pointer
- X1 int64
- }
- X8 struct {
- X0 unsafe.Pointer
- X1 int64
- }
-} // t179 struct{*struct{},int32,*struct{},*struct{},struct{*struct{},*uint8,int32},int32,*func(*struct{},*int32,*struct{},int32,*struct{},int32)int32,struct{*struct{},int64},struct{*struct{},int64}}
+ XpThread unsafe.Pointer
+ XbDone int32
+ XpSorter unsafe.Pointer
+ XpUnpacked unsafe.Pointer
+ Xlist t89
+ XnPMA int32
+ XxCompare func(*crt.TLS, unsafe.Pointer, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32
+ Xfile XSorterFile
+ Xfile2 XSorterFile
+} // t251 struct{pThread *struct{},bDone int32,pSorter *struct{},pUnpacked *struct{},list struct{pList *struct{},aMemory *uint8,szPMA int32},nPMA int32,xCompare *func(*struct{},*int32,*struct{},int32,*struct{},int32)int32,file struct{pFd *struct{},iEof int64},file2 struct{pFd *struct{},iEof int64}}
type XVdbeSorter struct {
- X0 int32
- X1 int32
- X2 int32
- X3 int32
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 struct {
- X0 unsafe.Pointer
- X1 *uint8
- X2 int32
- }
- X10 int32
- X11 int32
- X12 uint8
- X13 uint8
- X14 uint8
- X15 uint8
- X16 uint8
- X17 [1]struct {
- X0 unsafe.Pointer
- X1 int32
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 struct {
- X0 unsafe.Pointer
- X1 *uint8
- X2 int32
- }
- X5 int32
- X6 func(*crt.TLS, unsafe.Pointer, *int32, unsafe.Pointer, int32, unsafe.Pointer, int32) int32
- X7 struct {
- X0 unsafe.Pointer
- X1 int64
- }
- X8 struct {
- X0 unsafe.Pointer
- X1 int64
- }
- }
-} // t180 struct{int32,int32,int32,int32,*struct{},*struct{},*struct{},*struct{},*struct{},struct{*struct{},*uint8,int32},int32,int32,uint8,uint8,uint8,uint8,uint8,[1]struct{*struct{},int32,*struct{},*struct{},struct{*struct{},*uint8,int32},int32,*func(*struct{},*int32,*struct{},int32,*struct{},int32)int32,struct{*struct{},int64},struct{*struct{},int64}}}
+ XmnPmaSize int32
+ XmxPmaSize int32
+ XmxKeysize int32
+ Xpgsz int32
+ XpReader unsafe.Pointer
+ XpMerger unsafe.Pointer
+ Xdb unsafe.Pointer
+ XpKeyInfo unsafe.Pointer
+ XpUnpacked unsafe.Pointer
+ Xlist t89
+ XiMemory int32
+ XnMemory int32
+ XbUsePMA uint8
+ XbUseThreads uint8
+ XiPrev uint8
+ XnTask uint8
+ XtypeMask uint8
+ XaTask [1]XSortSubtask
+} // t252 struct{mnPmaSize int32,mxPmaSize int32,mxKeysize int32,pgsz int32,pReader *struct{},pMerger *struct{},db *struct{},pKeyInfo *struct{},pUnpacked *struct{},list struct{pList *struct{},aMemory *uint8,szPMA int32},iMemory int32,nMemory int32,bUsePMA uint8,bUseThreads uint8,iPrev uint8,nTask uint8,typeMask uint8,aTask [1]struct{pThread *struct{},bDone int32,pSorter *struct{},pUnpacked *struct{},list struct{pList *struct{},aMemory *uint8,szPMA int32},nPMA int32,xCompare *func(*struct{},*int32,*struct{},int32,*struct{},int32)int32,file struct{pFd *struct{},iEof int64},file2 struct{pFd *struct{},iEof int64}}}
type XInitData struct {
- X0 unsafe.Pointer
- X1 **int8
- X2 int32
- X3 int32
-} // t181 struct{*struct{},**int8,int32,int32}
+ Xdb unsafe.Pointer
+ XpzErrMsg **int8
+ XiDb int32
+ Xrc int32
+} // t253 struct{db *struct{},pzErrMsg **int8,iDb int32,rc int32}
type XIncrblob struct {
- X0 int32
- X1 int32
- X2 uint16
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 *int8
- X7 unsafe.Pointer
-} // t182 struct{int32,int32,uint16,*struct{},*struct{},*struct{},*int8,*struct{}}
+ XnByte int32
+ XiOffset int32
+ XiCol uint16
+ XpCsr unsafe.Pointer
+ XpStmt unsafe.Pointer
+ Xdb unsafe.Pointer
+ XzDb *int8
+ XpTab unsafe.Pointer
+} // t254 struct{nByte int32,iOffset int32,iCol uint16,pCsr *struct{},pStmt *struct{},db *struct{},zDb *int8,pTab *struct{}}
type XFKey struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 *int8
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 int32
- X6 uint8
- X7 [2]uint8
- X8 [2]unsafe.Pointer
- X9 [1]struct {
- X0 int32
- X1 *int8
- }
-} // t183 struct{*struct{},*struct{},*int8,*struct{},*struct{},int32,uint8,[2]uint8,[2]*struct{},[1]struct{int32,*int8}}
+ XpFrom unsafe.Pointer
+ XpNextFrom unsafe.Pointer
+ XzTo *int8
+ XpNextTo unsafe.Pointer
+ XpPrevTo unsafe.Pointer
+ XnCol int32
+ XisDeferred uint8
+ XaAction [2]uint8
+ XapTrigger [2]unsafe.Pointer
+ XaCol [1]t117
+} // t255 struct{pFrom *struct{},pNextFrom *struct{},zTo *int8,pNextTo *struct{},pPrevTo *struct{},nCol int32,isDeferred uint8,aAction [2]uint8,apTrigger [2]*struct{},aCol [1]struct{iFrom int32,zCol *int8}}
type XPmaReader struct {
- X0 int64
- X1 int64
- X2 int32
- X3 int32
- X4 unsafe.Pointer
- X5 *uint8
- X6 *uint8
- X7 *uint8
- X8 int32
- X9 *uint8
- X10 unsafe.Pointer
-} // t184 struct{int64,int64,int32,int32,*struct{},*uint8,*uint8,*uint8,int32,*uint8,*struct{}}
+ XiReadOff int64
+ XiEof int64
+ XnAlloc int32
+ XnKey int32
+ XpFd unsafe.Pointer
+ XaAlloc *uint8
+ XaKey *uint8
+ XaBuffer *uint8
+ XnBuffer int32
+ XaMap *uint8
+ XpIncr unsafe.Pointer
+} // t256 struct{iReadOff int64,iEof int64,nAlloc int32,nKey int32,pFd *struct{},aAlloc *uint8,aKey *uint8,aBuffer *uint8,nBuffer int32,aMap *uint8,pIncr *struct{}}
type XIncrMerger struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int64
- X3 int32
- X4 int32
- X5 int32
- X6 [2]struct {
- X0 unsafe.Pointer
- X1 int64
- }
-} // t185 struct{*struct{},*struct{},int64,int32,int32,int32,[2]struct{*struct{},int64}}
+ XpTask unsafe.Pointer
+ XpMerger unsafe.Pointer
+ XiStartOff int64
+ XmxSz int32
+ XbEof int32
+ XbUseThread int32
+ XaFile [2]XSorterFile
+} // t257 struct{pTask *struct{},pMerger *struct{},iStartOff int64,mxSz int32,bEof int32,bUseThread int32,aFile [2]struct{pFd *struct{},iEof int64}}
type XSorterRecord struct {
- X0 int32
- X1 struct {
- X [0]struct {
- X0 unsafe.Pointer
- X1 int32
- }
- U [4]byte
- }
-} // t186 struct{int32,union{*struct{},int32}}
+ XnVal int32
+ Xu t258
+} // t259 struct{nVal int32,u union{pNext *struct{},iNext int32}}
type XMergeEngine struct {
- X0 int32
- X1 unsafe.Pointer
- X2 *int32
- X3 unsafe.Pointer
-} // t187 struct{int32,*struct{},*int32,*struct{}}
+ XnTree int32
+ XpTask unsafe.Pointer
+ XaTree *int32
+ XaReadr unsafe.Pointer
+} // t260 struct{nTree int32,pTask *struct{},aTree *int32,aReadr *struct{}}
type XPmaWriter struct {
- X0 int32
- X1 *uint8
- X2 int32
- X3 int32
- X4 int32
- X5 int64
- X6 unsafe.Pointer
-} // t188 struct{int32,*uint8,int32,int32,int32,int64,*struct{}}
+ XeFWErr int32
+ XaBuffer *uint8
+ XnBuffer int32
+ XiBufStart int32
+ XiBufEnd int32
+ XiWriteOff int64
+ XpFd unsafe.Pointer
+} // t261 struct{eFWErr int32,aBuffer *uint8,nBuffer int32,iBufStart int32,iBufEnd int32,iWriteOff int64,pFd *struct{}}
type XMemJournal struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
- X3 int32
- X4 unsafe.Pointer
- X5 struct {
- X0 int64
- X1 unsafe.Pointer
- }
- X6 struct {
- X0 int64
- X1 unsafe.Pointer
- }
- X7 int32
- X8 unsafe.Pointer
- X9 *int8
-} // t189 struct{*struct{},int32,int32,int32,*struct{},struct{int64,*struct{}},struct{int64,*struct{}},int32,*struct{},*int8}
+ XpMethod unsafe.Pointer
+ XnChunkSize int32
+ XnSpill int32
+ XnSize int32
+ XpFirst unsafe.Pointer
+ Xendpoint t262
+ Xreadpoint t262
+ Xflags int32
+ XpVfs unsafe.Pointer
+ XzJournal *int8
+} // t263 struct{pMethod *struct{},nChunkSize int32,nSpill int32,nSize int32,pFirst *struct{},endpoint struct{iOffset int64,pChunk *struct{}},readpoint struct{iOffset int64,pChunk *struct{}},flags int32,pVfs *struct{},zJournal *int8}
type XFileChunk struct {
- X0 unsafe.Pointer
- X1 [8]uint8
-} // t190 struct{*struct{},[8]uint8}
+ XpNext unsafe.Pointer
+ XzChunk [8]uint8
+} // t264 struct{pNext *struct{},zChunk [8]uint8}
type XWalker struct {
- X0 unsafe.Pointer
- X1 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- X2 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- X3 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
- X4 int32
- X5 uint8
- X6 struct {
- X [0]struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 *int32
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- }
- U [4]byte
- }
-} // t191 struct{*struct{},*func(*struct{},*struct{})int32,*func(*struct{},*struct{})int32,*func(*struct{},*struct{}),int32,uint8,union{*struct{},int32,int32,*struct{},*struct{},*struct{},*int32,*struct{},*struct{},*struct{},*struct{}}}
+ XpParse unsafe.Pointer
+ XxExprCallback func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
+ XxSelectCallback func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
+ XxSelectCallback2 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
+ XwalkerDepth int32
+ XeCode uint8
+ Xu t265
+} // t266 struct{pParse *struct{},xExprCallback *func(*struct{},*struct{})int32,xSelectCallback *func(*struct{},*struct{})int32,xSelectCallback2 *func(*struct{},*struct{}),walkerDepth int32,eCode uint8,u union{pNC *struct{},n int32,iCur int32,pSrcList *struct{},pSrcCount *struct{},pCCurHint *struct{},aiCol *int32,pIdxCover *struct{},pIdxTrans *struct{},pGroupBy *struct{},pHavingCtx *struct{}}}
type XIdList struct {
- X0 unsafe.Pointer
- X1 int32
-} // t192 struct{*struct{},int32}
+ Xa unsafe.Pointer
+ XnId int32
+} // t267 struct{a *struct{},nId int32}
type TIdList_item struct {
- X0 *int8
- X1 int32
-} // t193 struct{*int8,int32}
+ XzName *int8
+ Xidx int32
+} // t268 struct{zName *int8,idx int32}
type XNameContext struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 int32
- X6 int32
- X7 uint16
-} // t194 struct{*struct{},*struct{},*struct{},*struct{},*struct{},int32,int32,uint16}
+ XpParse unsafe.Pointer
+ XpSrcList unsafe.Pointer
+ XpEList unsafe.Pointer
+ XpAggInfo unsafe.Pointer
+ XpNext unsafe.Pointer
+ XnRef int32
+ XnErr int32
+ XncFlags uint16
+} // t269 struct{pParse *struct{},pSrcList *struct{},pEList *struct{},pAggInfo *struct{},pNext *struct{},nRef int32,nErr int32,ncFlags uint16}
type XExprSpan struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
-} // t195 struct{*struct{},*int8,*int8}
+ XpExpr unsafe.Pointer
+ XzStart *int8
+ XzEnd *int8
+} // t270 struct{pExpr *struct{},zStart *int8,zEnd *int8}
type XSelectDest struct {
- X0 uint8
- X1 *int8
- X2 int32
- X3 int32
- X4 int32
- X5 unsafe.Pointer
-} // t196 struct{uint8,*int8,int32,int32,int32,*struct{}}
+ XeDest uint8
+ XzAffSdst *int8
+ XiSDParm int32
+ XiSdst int32
+ XnSdst int32
+ XpOrderBy unsafe.Pointer
+} // t271 struct{eDest uint8,zAffSdst *int8,iSDParm int32,iSdst int32,nSdst int32,pOrderBy *struct{}}
type XAggInfo struct {
- X0 uint8
- X1 uint8
- X2 int32
- X3 int32
- X4 int32
- X5 int32
- X6 int32
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 int32
- X10 int32
- X11 unsafe.Pointer
- X12 int32
-} // t197 struct{uint8,uint8,int32,int32,int32,int32,int32,*struct{},*struct{},int32,int32,*struct{},int32}
+ XdirectMode uint8
+ XuseSortingIdx uint8
+ XsortingIdx int32
+ XsortingIdxPTab int32
+ XnSortingColumn int32
+ XmnReg int32
+ XmxReg int32
+ XpGroupBy unsafe.Pointer
+ XaCol unsafe.Pointer
+ XnColumn int32
+ XnAccumulator int32
+ XaFunc unsafe.Pointer
+ XnFunc int32
+} // t272 struct{directMode uint8,useSortingIdx uint8,sortingIdx int32,sortingIdxPTab int32,nSortingColumn int32,mnReg int32,mxReg int32,pGroupBy *struct{},aCol *struct{},nColumn int32,nAccumulator int32,aFunc *struct{},nFunc int32}
type TAggInfo_col struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
- X3 int32
- X4 int32
- X5 unsafe.Pointer
-} // t198 struct{*struct{},int32,int32,int32,int32,*struct{}}
+ XpTab unsafe.Pointer
+ XiTable int32
+ XiColumn int32
+ XiSorterColumn int32
+ XiMem int32
+ XpExpr unsafe.Pointer
+} // t273 struct{pTab *struct{},iTable int32,iColumn int32,iSorterColumn int32,iMem int32,pExpr *struct{}}
type TAggInfo_func struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int32
- X3 int32
-} // t199 struct{*struct{},*struct{},int32,int32}
+ XpExpr unsafe.Pointer
+ XpFunc unsafe.Pointer
+ XiMem int32
+ XiDistinct int32
+} // t274 struct{pExpr *struct{},pFunc *struct{},iMem int32,iDistinct int32}
+
+type TIdxCover struct {
+ XpIdx unsafe.Pointer
+ XiCur int32
+} // t275 struct{pIdx *struct{},iCur int32}
type TSrcCount struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
-} // t200 struct{*struct{},int32,int32}
+ XpSrc unsafe.Pointer
+ XnThis int32
+ XnOther int32
+} // t276 struct{pSrc *struct{},nThis int32,nOther int32}
type XStat4Accum struct {
- X0 uint32
- X1 uint32
- X2 int32
- X3 int32
- X4 int32
- X5 struct {
- X0 *uint32
- X1 *uint32
- }
- X6 uint32
- X7 unsafe.Pointer
- X8 int32
- X9 int32
- X10 int32
- X11 int32
- X12 unsafe.Pointer
- X13 unsafe.Pointer
-} // t201 struct{uint32,uint32,int32,int32,int32,struct{*uint32,*uint32},uint32,*struct{},int32,int32,int32,int32,*struct{},*struct{}}
+ XnRow uint32
+ XnPSample uint32
+ XnCol int32
+ XnKeyCol int32
+ XmxSample int32
+ Xcurrent t277
+ XiPrn uint32
+ XaBest unsafe.Pointer
+ XiMin int32
+ XnSample int32
+ XnMaxEqZero int32
+ XiGet int32
+ Xa unsafe.Pointer
+ Xdb unsafe.Pointer
+} // t278 struct{nRow uint32,nPSample uint32,nCol int32,nKeyCol int32,mxSample int32,current struct{anEq *uint32,anDLt *uint32},iPrn uint32,aBest *struct{},iMin int32,nSample int32,nMaxEqZero int32,iGet int32,a *struct{},db *struct{}}
type XanalysisInfo struct {
- X0 unsafe.Pointer
- X1 *int8
-} // t202 struct{*struct{},*int8}
+ Xdb unsafe.Pointer
+ XzDatabase *int8
+} // t279 struct{db *struct{},zDatabase *int8}
type XDbFixer struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int32
- X3 *int8
- X4 *int8
- X5 unsafe.Pointer
-} // t203 struct{*struct{},*struct{},int32,*int8,*int8,*struct{}}
+ XpParse unsafe.Pointer
+ XpSchema unsafe.Pointer
+ XbVarOnly int32
+ XzDb *int8
+ XzType *int8
+ XpName unsafe.Pointer
+} // t280 struct{pParse *struct{},pSchema *struct{},bVarOnly int32,zDb *int8,zType *int8,pName *struct{}}
type XTriggerStep struct {
- X0 uint8
- X1 uint8
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 *int8
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 unsafe.Pointer
-} // t204 struct{uint8,uint8,*struct{},*struct{},*int8,*struct{},*struct{},*struct{},*struct{},*struct{}}
+ Xop uint8
+ Xorconf uint8
+ XpTrig unsafe.Pointer
+ XpSelect unsafe.Pointer
+ XzTarget *int8
+ XpWhere unsafe.Pointer
+ XpExprList unsafe.Pointer
+ XpIdList unsafe.Pointer
+ XpNext unsafe.Pointer
+ XpLast unsafe.Pointer
+} // t281 struct{op uint8,orconf uint8,pTrig *struct{},pSelect *struct{},zTarget *int8,pWhere *struct{},pExprList *struct{},pIdList *struct{},pNext *struct{},pLast *struct{}}
type XAuthContext struct {
- X0 *int8
- X1 unsafe.Pointer
-} // t205 struct{*int8,*struct{}}
+ XzAuthContext *int8
+ XpParse unsafe.Pointer
+} // t282 struct{zAuthContext *int8,pParse *struct{}}
type XTableLock struct {
- X0 int32
- X1 int32
- X2 uint8
- X3 *int8
-} // t206 struct{int32,int32,uint8,*int8}
+ XiDb int32
+ XiTab int32
+ XisWriteLock uint8
+ XzLockName *int8
+} // t283 struct{iDb int32,iTab int32,isWriteLock uint8,zLockName *int8}
+
+type XAutoincInfo struct {
+ XpNext unsafe.Pointer
+ XpTab unsafe.Pointer
+ XiDb int32
+ XregCtr int32
+} // t284 struct{pNext *struct{},pTab *struct{},iDb int32,regCtr int32}
type XModule struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 unsafe.Pointer
- X3 func(*crt.TLS, unsafe.Pointer)
- X4 unsafe.Pointer
-} // t207 struct{*struct{},*int8,*struct{},*func(*struct{}),*struct{}}
+ XpModule unsafe.Pointer
+ XzName *int8
+ XpAux unsafe.Pointer
+ XxDestroy func(*crt.TLS, unsafe.Pointer)
+ XpEpoTab unsafe.Pointer
+} // t285 struct{pModule *struct{},zName *int8,pAux *struct{},xDestroy *func(*struct{}),pEpoTab *struct{}}
type XWhereTerm struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int16
- X3 uint16
- X4 uint16
- X5 uint8
- X6 uint8
- X7 int32
- X8 int32
- X9 int32
- X10 struct {
- X [0]struct {
- X0 int32
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- }
- U [4]byte
- }
- X11 uint64
- X12 uint64
-} // t208 struct{*struct{},*struct{},int16,uint16,uint16,uint8,uint8,int32,int32,int32,union{int32,*struct{},*struct{}},uint64,uint64}
+ XpExpr unsafe.Pointer
+ XpWC unsafe.Pointer
+ XtruthProb int16
+ XwtFlags uint16
+ XeOperator uint16
+ XnChild uint8
+ XeMatchOp uint8
+ XiParent int32
+ XleftCursor int32
+ XiField int32
+ Xu t286
+ XprereqRight uint64
+ XprereqAll uint64
+} // t287 struct{pExpr *struct{},pWC *struct{},truthProb int16,wtFlags uint16,eOperator uint16,nChild uint8,eMatchOp uint8,iParent int32,leftCursor int32,iField int32,u union{leftColumn int32,pOrInfo *struct{},pAndInfo *struct{}},prereqRight uint64,prereqAll uint64}
type XWhereClause struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 uint8
- X3 int32
- X4 int32
- X5 unsafe.Pointer
- X6 [8]struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int16
- X3 uint16
- X4 uint16
- X5 uint8
- X6 uint8
- X7 int32
- X8 int32
- X9 int32
- X10 struct {
- X [0]struct {
- X0 int32
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- }
- U [4]byte
- }
- X11 uint64
- X12 uint64
- }
-} // t209 struct{*struct{},*struct{},uint8,int32,int32,*struct{},[8]struct{*struct{},*struct{},int16,uint16,uint16,uint8,uint8,int32,int32,int32,union{int32,*struct{},*struct{}},uint64,uint64}}
+ XpWInfo unsafe.Pointer
+ XpOuter unsafe.Pointer
+ Xop uint8
+ XnTerm int32
+ XnSlot int32
+ Xa unsafe.Pointer
+ XaStatic [8]XWhereTerm
+} // t288 struct{pWInfo *struct{},pOuter *struct{},op uint8,nTerm int32,nSlot int32,a *struct{},aStatic [8]struct{pExpr *struct{},pWC *struct{},truthProb int16,wtFlags uint16,eOperator uint16,nChild uint8,eMatchOp uint8,iParent int32,leftCursor int32,iField int32,u union{leftColumn int32,pOrInfo *struct{},pAndInfo *struct{}},prereqRight uint64,prereqAll uint64}}
type XWhereMaskSet struct {
- X0 int32
- X1 [64]int32
-} // t210 struct{int32,[64]int32}
+ Xn int32
+ Xix [64]int32
+} // t289 struct{n int32,ix [64]int32}
type XWhereLevel struct {
- X0 int32
- X1 int32
- X2 int32
- X3 int32
- X4 int32
- X5 int32
- X6 int32
- X7 int32
- X8 int32
- X9 uint32
- X10 int32
- X11 uint8
- X12 uint8
- X13 uint8
- X14 uint8
- X15 int32
- X16 int32
- X17 struct {
- X [0]struct {
- X0 struct {
- X0 int32
- X1 unsafe.Pointer
- }
- X1 unsafe.Pointer
- }
- U [8]byte
- }
- X18 unsafe.Pointer
- X19 uint64
-} // t211 struct{int32,int32,int32,int32,int32,int32,int32,int32,int32,uint32,int32,uint8,uint8,uint8,uint8,int32,int32,union{struct{int32,*struct{}},*struct{}},*struct{},uint64}
+ XiLeftJoin int32
+ XiTabCur int32
+ XiIdxCur int32
+ XaddrBrk int32
+ XaddrNxt int32
+ XaddrSkip int32
+ XaddrCont int32
+ XaddrFirst int32
+ XaddrBody int32
+ XiLikeRepCntr uint32
+ XaddrLikeRep int32
+ XiFrom uint8
+ Xop uint8
+ Xp3 uint8
+ Xp5 uint8
+ Xp1 int32
+ Xp2 int32
+ Xu t290
+ XpWLoop unsafe.Pointer
+ XnotReady uint64
+} // t291 struct{iLeftJoin int32,iTabCur int32,iIdxCur int32,addrBrk int32,addrNxt int32,addrSkip int32,addrCont int32,addrFirst int32,addrBody int32,iLikeRepCntr uint32,addrLikeRep int32,iFrom uint8,op uint8,p3 uint8,p5 uint8,p1 int32,p2 int32,u union{in struct{nIn int32,aInLoop *struct{}},pCovidx *struct{}},pWLoop *struct{},notReady uint64}
type XWhereInfo struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 int16
- X6 [2]int32
- X7 int32
- X8 int32
- X9 int32
- X10 uint16
- X11 uint8
- X12 int8
- X13 uint8
- X14 uint8
- X15 uint8
- X16 uint8
- X17 uint8
- X18 int32
- X19 unsafe.Pointer
- X20 uint64
- X21 int16
- X22 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 uint8
- X3 int32
- X4 int32
- X5 unsafe.Pointer
- X6 [8]struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int16
- X3 uint16
- X4 uint16
- X5 uint8
- X6 uint8
- X7 int32
- X8 int32
- X9 int32
- X10 struct {
- X [0]struct {
- X0 int32
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- }
- U [4]byte
- }
- X11 uint64
- X12 uint64
- }
- }
- X23 struct {
- X0 int32
- X1 [64]int32
- }
- X24 [1]struct {
- X0 int32
- X1 int32
- X2 int32
- X3 int32
- X4 int32
- X5 int32
- X6 int32
- X7 int32
- X8 int32
- X9 uint32
- X10 int32
- X11 uint8
- X12 uint8
- X13 uint8
- X14 uint8
- X15 int32
- X16 int32
- X17 struct {
- X [0]struct {
- X0 struct {
- X0 int32
- X1 unsafe.Pointer
- }
- X1 unsafe.Pointer
- }
- U [8]byte
- }
- X18 unsafe.Pointer
- X19 uint64
- }
-} // t212 struct{*struct{},*struct{},*struct{},*struct{},*struct{},int16,[2]int32,int32,int32,int32,uint16,uint8,int8,uint8,uint8,uint8,uint8,uint8,int32,*struct{},uint64,int16,struct{*struct{},*struct{},uint8,int32,int32,*struct{},[8]struct{*struct{},*struct{},int16,uint16,uint16,uint8,uint8,int32,int32,int32,union{int32,*struct{},*struct{}},uint64,uint64}},struct{int32,[64]int32},[1]struct{int32,int32,int32,int32,int32,int32,int32,int32,int32,uint32,int32,uint8,uint8,uint8,uint8,int32,int32,union{struct{int32,*struct{}},*struct{}},*struct{},uint64}}
+ XpParse unsafe.Pointer
+ XpTabList unsafe.Pointer
+ XpOrderBy unsafe.Pointer
+ XpResultSet unsafe.Pointer
+ XpWhere unsafe.Pointer
+ XiLimit int16
+ XaiCurOnePass [2]int32
+ XiContinue int32
+ XiBreak int32
+ XsavedNQueryLoop int32
+ XwctrlFlags uint16
+ XnLevel uint8
+ XnOBSat int8
+ Xsorted uint8
+ XeOnePass uint8
+ XuntestedTerms uint8
+ XeDistinct uint8
+ XbOrderedInnerLoop uint8
+ XiTop int32
+ XpLoops unsafe.Pointer
+ XrevMask uint64
+ XnRowOut int16
+ XsWC XWhereClause
+ XsMaskSet XWhereMaskSet
+ Xa [1]XWhereLevel
+} // t292 struct{pParse *struct{},pTabList *struct{},pOrderBy *struct{},pResultSet *struct{},pWhere *struct{},iLimit int16,aiCurOnePass [2]int32,iContinue int32,iBreak int32,savedNQueryLoop int32,wctrlFlags uint16,nLevel uint8,nOBSat int8,sorted uint8,eOnePass uint8,untestedTerms uint8,eDistinct uint8,bOrderedInnerLoop uint8,iTop int32,pLoops *struct{},revMask uint64,nRowOut int16,sWC struct{pWInfo *struct{},pOuter *struct{},op uint8,nTerm int32,nSlot int32,a *struct{},aStatic [8]struct{pExpr *struct{},pWC *struct{},truthProb int16,wtFlags uint16,eOperator uint16,nChild uint8,eMatchOp uint8,iParent int32,leftCursor int32,iField int32,u union{leftColumn int32,pOrInfo *struct{},pAndInfo *struct{}},prereqRight uint64,prereqAll uint64}},sMaskSet struct{n int32,ix [64]int32},a [1]struct{iLeftJoin int32,iTabCur int32,iIdxCur int32,addrBrk int32,addrNxt int32,addrSkip int32,addrCont int32,addrFirst int32,addrBody int32,iLikeRepCntr uint32,addrLikeRep int32,iFrom uint8,op uint8,p3 uint8,p5 uint8,p1 int32,p2 int32,u union{in struct{nIn int32,aInLoop *struct{}},pCovidx *struct{}},pWLoop *struct{},notReady uint64}}
type TcompareInfo struct {
- X0 uint8
- X1 uint8
- X2 uint8
- X3 uint8
-} // t213 struct{uint8,uint8,uint8,uint8}
+ XmatchAll uint8
+ XmatchOne uint8
+ XmatchSet uint8
+ XnoCase uint8
+} // t293 struct{matchAll uint8,matchOne uint8,matchSet uint8,noCase uint8}
type XSumCtx struct {
- X0 float64
- X1 int64
- X2 int64
- X3 uint8
- X4 uint8
-} // t214 struct{float64,int64,int64,uint8,uint8}
+ XrSum float64
+ XiSum int64
+ Xcnt int64
+ Xoverflow uint8
+ Xapprox uint8
+} // t294 struct{rSum float64,iSum int64,cnt int64,overflow uint8,approx uint8}
-type XCountCtx struct{ X0 int64 } // t215 struct{int64}
+type XCountCtx struct{ Xn int64 } // t295 struct{n int64}
type XFuncDestructor struct {
- X0 int32
- X1 func(*crt.TLS, unsafe.Pointer)
- X2 unsafe.Pointer
-} // t216 struct{int32,*func(*struct{}),*struct{}}
+ XnRef int32
+ XxDestroy func(*crt.TLS, unsafe.Pointer)
+ XpUserData unsafe.Pointer
+} // t296 struct{nRef int32,xDestroy *func(*struct{}),pUserData *struct{}}
type XTriggerPrg struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 int32
- X4 [2]uint32
-} // t217 struct{*struct{},*struct{},*struct{},int32,[2]uint32}
+ XpTrigger unsafe.Pointer
+ XpNext unsafe.Pointer
+ XpProgram unsafe.Pointer
+ Xorconf int32
+ XaColmask [2]uint32
+} // t297 struct{pTrigger *struct{},pNext *struct{},pProgram *struct{},orconf int32,aColmask [2]uint32}
type Xsqlite3_api_routines struct {
- X0 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X1 func(*crt.TLS, unsafe.Pointer) int32
- X2 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)) int32
- X3 func(*crt.TLS, unsafe.Pointer, int32, float64) int32
- X4 func(*crt.TLS, unsafe.Pointer, int32, int32) int32
- X5 func(*crt.TLS, unsafe.Pointer, int32, int64) int32
- X6 func(*crt.TLS, unsafe.Pointer, int32) int32
- X7 func(*crt.TLS, unsafe.Pointer) int32
- X8 func(*crt.TLS, unsafe.Pointer, *int8) int32
- X9 func(*crt.TLS, unsafe.Pointer, int32) *int8
- X10 func(*crt.TLS, unsafe.Pointer, int32, *int8, int32, func(*crt.TLS, unsafe.Pointer)) int32
- X11 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)) int32
- X12 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
- X13 func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32) int32, unsafe.Pointer) int32
- X14 func(*crt.TLS, unsafe.Pointer, int32) int32
- X15 func(*crt.TLS, unsafe.Pointer) int32
- X16 func(*crt.TLS, unsafe.Pointer) int32
- X17 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)) int32
- X18 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)) int32
- X19 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X20 func(*crt.TLS, unsafe.Pointer, int32) int32
- X21 func(*crt.TLS, unsafe.Pointer, int32) int32
- X22 func(*crt.TLS, unsafe.Pointer) int32
- X23 func(*crt.TLS, unsafe.Pointer, int32) *int8
- X24 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X25 func(*crt.TLS, unsafe.Pointer, int32) *int8
- X26 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X27 func(*crt.TLS, unsafe.Pointer, int32) float64
- X28 func(*crt.TLS, unsafe.Pointer, int32) int32
- X29 func(*crt.TLS, unsafe.Pointer, int32) int64
- X30 func(*crt.TLS, unsafe.Pointer, int32) *int8
- X31 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X32 func(*crt.TLS, unsafe.Pointer, int32) *int8
- X33 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X34 func(*crt.TLS, unsafe.Pointer, int32) *int8
- X35 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X36 func(*crt.TLS, unsafe.Pointer, int32) *uint8
- X37 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X38 func(*crt.TLS, unsafe.Pointer, int32) int32
- X39 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X40 func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer) unsafe.Pointer
- X41 func(*crt.TLS, *int8) int32
- X42 func(*crt.TLS, unsafe.Pointer) int32
- X43 func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32
- X44 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32
- X45 func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32
- X46 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32
- X47 func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer) int32
- X48 func(*crt.TLS, unsafe.Pointer) int32
- X49 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X50 func(*crt.TLS, unsafe.Pointer, *int8) int32
- X51 func(*crt.TLS, int32) int32
- X52 func(*crt.TLS, unsafe.Pointer) int32
- X53 func(*crt.TLS, unsafe.Pointer) *int8
- X54 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X55 func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS, unsafe.Pointer, int32, **int8, **int8) int32, unsafe.Pointer, **int8) int32
- X56 func(*crt.TLS, unsafe.Pointer) int32
- X57 func(*crt.TLS, unsafe.Pointer) int32
- X58 func(*crt.TLS, unsafe.Pointer)
- X59 func(*crt.TLS, **int8)
- X60 func(*crt.TLS, unsafe.Pointer) int32
- X61 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X62 func(*crt.TLS, unsafe.Pointer, *int8, ***int8, *int32, *int32, **int8) int32
- X63 func(*crt.TLS) int32
- X64 func(*crt.TLS, unsafe.Pointer)
- X65 func(*crt.TLS, unsafe.Pointer) int64
- X66 func(*crt.TLS) *int8
- X67 func(*crt.TLS) int32
- X68 func(*crt.TLS, int32) unsafe.Pointer
- X69 func(*crt.TLS, *int8, ...interface{}) *int8
- X70 func(*crt.TLS, *int8, *unsafe.Pointer) int32
- X71 func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32
- X72 func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32
- X73 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32
- X74 func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8, uint64), unsafe.Pointer) unsafe.Pointer
- X75 func(*crt.TLS, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer)
- X76 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
- X77 func(*crt.TLS, unsafe.Pointer) int32
- X78 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
- X79 func(*crt.TLS, unsafe.Pointer, float64)
- X80 func(*crt.TLS, unsafe.Pointer, *int8, int32)
- X81 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
- X82 func(*crt.TLS, unsafe.Pointer, int32)
- X83 func(*crt.TLS, unsafe.Pointer, int64)
- X84 func(*crt.TLS, unsafe.Pointer)
- X85 func(*crt.TLS, unsafe.Pointer, *int8, int32, func(*crt.TLS, unsafe.Pointer))
- X86 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
- X87 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
- X88 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
- X89 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
- X90 func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer), unsafe.Pointer) unsafe.Pointer
- X91 func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32, unsafe.Pointer) int32
- X92 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer))
- X93 func(*crt.TLS, int32, *int8, *int8, ...interface{}) *int8
- X94 func(*crt.TLS, unsafe.Pointer) int32
- X95 func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, **int8, **int8, *int32, *int32, *int32) int32
- X96 func(*crt.TLS)
- X97 func(*crt.TLS, unsafe.Pointer) int32
- X98 func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8), unsafe.Pointer) unsafe.Pointer
- X99 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
- X100 func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64), unsafe.Pointer) unsafe.Pointer
- X101 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X102 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X103 func(*crt.TLS, unsafe.Pointer) int32
- X104 func(*crt.TLS, unsafe.Pointer) int32
- X105 func(*crt.TLS, unsafe.Pointer) float64
- X106 func(*crt.TLS, unsafe.Pointer) int32
- X107 func(*crt.TLS, unsafe.Pointer) int64
- X108 func(*crt.TLS, unsafe.Pointer) int32
- X109 func(*crt.TLS, unsafe.Pointer) *uint8
- X110 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X111 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X112 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X113 func(*crt.TLS, unsafe.Pointer) int32
- X114 func(*crt.TLS, *int8, unsafe.Pointer) *int8
- X115 func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
- X116 func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32
- X117 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32
- X118 func(*crt.TLS, unsafe.Pointer) int32
- X119 func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer)) int32
- X120 func(*crt.TLS, unsafe.Pointer, int32, int32) int32
- X121 func(*crt.TLS, unsafe.Pointer) int32
- X122 func(*crt.TLS, unsafe.Pointer) int32
- X123 func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, int64, int32, *unsafe.Pointer) int32
- X124 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32) int32
- X125 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32) int32
- X126 func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32, func(*crt.TLS, unsafe.Pointer)) int32
- X127 func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer) int32
- X128 func(*crt.TLS, int32) int64
- X129 func(*crt.TLS) int64
- X130 func(*crt.TLS, int32) unsafe.Pointer
- X131 func(*crt.TLS, unsafe.Pointer)
- X132 func(*crt.TLS, unsafe.Pointer)
- X133 func(*crt.TLS, unsafe.Pointer)
- X134 func(*crt.TLS, unsafe.Pointer) int32
- X135 func(*crt.TLS, *int8, *unsafe.Pointer, int32, *int8) int32
- X136 func(*crt.TLS, int32) int32
- X137 func(*crt.TLS, unsafe.Pointer)
- X138 func(*crt.TLS, unsafe.Pointer)
- X139 func(*crt.TLS, int32) int32
- X140 func(*crt.TLS, int32)
- X141 func(*crt.TLS, *int8) unsafe.Pointer
- X142 func(*crt.TLS, unsafe.Pointer, int32) int32
- X143 func(*crt.TLS, unsafe.Pointer) int32
- X144 func(*crt.TLS) int32
- X145 func(*crt.TLS, unsafe.Pointer, int32)
- X146 func(*crt.TLS, unsafe.Pointer, int32)
- X147 func(*crt.TLS, int32, ...interface{}) int32
- X148 func(*crt.TLS, int32, unsafe.Pointer)
- X149 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X150 func(*crt.TLS, unsafe.Pointer, int32) int32
- X151 func(*crt.TLS, unsafe.Pointer, int32, int32) int32
- X152 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) unsafe.Pointer
- X153 func(*crt.TLS, unsafe.Pointer) *int8
- X154 func(*crt.TLS, int32, *int32, *int32, int32) int32
- X155 func(*crt.TLS, unsafe.Pointer) int32
- X156 func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, *int8) unsafe.Pointer
- X157 func(*crt.TLS, unsafe.Pointer) int32
- X158 func(*crt.TLS, unsafe.Pointer) int32
- X159 func(*crt.TLS, unsafe.Pointer, int32) int32
- X160 func(*crt.TLS, int32) *int8
- X161 func(*crt.TLS, *int8) int32
- X162 func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32
- X163 func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32
- X164 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X165 func(*crt.TLS, unsafe.Pointer, int32, *int32, *int32, int32) int32
- X166 func(*crt.TLS, unsafe.Pointer) int32
- X167 func(*crt.TLS, int32, *int8, ...interface{})
- X168 func(*crt.TLS, int64) int64
- X169 func(*crt.TLS) *int8
- X170 func(*crt.TLS, unsafe.Pointer, int32, int32) int32
- X171 func(*crt.TLS, *int8, *int8, int32) int32
- X172 func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, *unsafe.Pointer, int32), unsafe.Pointer) int32
- X173 func(*crt.TLS, unsafe.Pointer, int32) int32
- X174 func(*crt.TLS, unsafe.Pointer, *int8) int32
- X175 func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32, unsafe.Pointer) unsafe.Pointer
- X176 func(*crt.TLS, unsafe.Pointer, int64) int32
- X177 func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32
- X178 func(*crt.TLS, unsafe.Pointer) int32
- X179 func(*crt.TLS, unsafe.Pointer) int32
- X180 func(*crt.TLS, unsafe.Pointer, *int8) *int8
- X181 func(*crt.TLS, unsafe.Pointer, *int8) int32
- X182 func(*crt.TLS, unsafe.Pointer) int32
- X183 func(*crt.TLS, int32) *int8
- X184 func(*crt.TLS, unsafe.Pointer) int32
- X185 func(*crt.TLS, unsafe.Pointer) int32
- X186 func(*crt.TLS, *int8, *int8) int32
- X187 func(*crt.TLS, *int8, *int8, int32) int32
- X188 func(*crt.TLS, *int8, *int8, int64) int64
- X189 func(*crt.TLS, *int8, *int8) *int8
- X190 func(*crt.TLS, int32, *int8, *int8, unsafe.Pointer) *int8
- X191 func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32, *int32) int32
- X192 func(*crt.TLS, func(*crt.TLS)) int32
- X193 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, uint64, func(*crt.TLS, unsafe.Pointer)) int32
- X194 func(*crt.TLS, unsafe.Pointer, int32, *int8, uint64, func(*crt.TLS, unsafe.Pointer), uint8) int32
- X195 func(*crt.TLS, func(*crt.TLS)) int32
- X196 func(*crt.TLS, unsafe.Pointer, *int8, *int8, **int8) int32
- X197 func(*crt.TLS, uint64) unsafe.Pointer
- X198 func(*crt.TLS, unsafe.Pointer) uint64
- X199 func(*crt.TLS, unsafe.Pointer, uint64) unsafe.Pointer
- X200 func(*crt.TLS)
- X201 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint64, func(*crt.TLS, unsafe.Pointer))
- X202 func(*crt.TLS, unsafe.Pointer, *int8, uint64, func(*crt.TLS, unsafe.Pointer), uint8)
- X203 func(*crt.TLS, *int8, *int8) int32
- X204 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
- X205 func(*crt.TLS, unsafe.Pointer)
- X206 func(*crt.TLS, unsafe.Pointer, uint64) int32
- X207 func(*crt.TLS, unsafe.Pointer, int32, uint64) int32
- X208 func(*crt.TLS, unsafe.Pointer) uint32
- X209 func(*crt.TLS, unsafe.Pointer, uint32)
- X210 func(*crt.TLS, int32, *int64, *int64, int32) int32
- X211 func(*crt.TLS, *int8, *int8, uint32) int32
- X212 func(*crt.TLS, unsafe.Pointer) int32
- X213 func(*crt.TLS, unsafe.Pointer) int32
- X214 func(*crt.TLS, unsafe.Pointer, uint32, func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32, unsafe.Pointer) int32
- X215 func(*crt.TLS, unsafe.Pointer) *int8
- X216 func(*crt.TLS, unsafe.Pointer, int64)
-} // t218 struct{*func(*struct{},int32)*struct{},*func(*struct{})int32,*func(*struct{},int32,*struct{},int32,*func(*struct{}))int32,*func(*struct{},int32,float64)int32,*func(*struct{},int32,int32)int32,*func(*struct{},int32,int64)int32,*func(*struct{},int32)int32,*func(*struct{})int32,*func(*struct{},*int8)int32,*func(*struct{},int32)*int8,*func(*struct{},int32,*int8,int32,*func(*struct{}))int32,*func(*struct{},int32,*struct{},int32,*func(*struct{}))int32,*func(*struct{},int32,*struct{})int32,*func(*struct{},*func(*struct{},int32)int32,*struct{})int32,*func(*struct{},int32)int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},*struct{},*func(*struct{},*struct{},int32,*int8))int32,*func(*struct{},*struct{},*func(*struct{},*struct{},int32,*struct{}))int32,*func(*struct{},int32)*struct{},*func(*struct{},int32)int32,*func(*struct{},int32)int32,*func(*struct{})int32,*func(*struct{},int32)*int8,*func(*struct{},int32)*struct{},*func(*struct{},int32)*int8,*func(*struct{},int32)*struct{},*func(*struct{},int32)float64,*func(*struct{},int32)int32,*func(*struct{},int32)int64,*func(*struct{},int32)*int8,*func(*struct{},int32)*struct{},*func(*struct{},int32)*int8,*func(*struct{},int32)*struct{},*func(*struct{},int32)*int8,*func(*struct{},int32)*struct{},*func(*struct{},int32)*uint8,*func(*struct{},int32)*struct{},*func(*struct{},int32)int32,*func(*struct{},int32)*struct{},*func(*struct{},*func(*struct{})int32,*struct{})*struct{},*func(*int8)int32,*func(*struct{})int32,*func(*struct{},*int8,int32,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32)int32,*func(*struct{},*struct{},int32,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32)int32,*func(*struct{},*int8,int32,int32,*struct{},*func(*struct{},int32,**struct{}),*func(*struct{},int32,**struct{}),*func(*struct{}))int32,*func(*struct{},*struct{},int32,int32,*struct{},*func(*struct{},int32,**struct{}),*func(*struct{},int32,**struct{}),*func(*struct{}))int32,*func(*struct{},*int8,*struct{},*struct{})int32,*func(*struct{})int32,*func(*struct{})*struct{},*func(*struct{},*int8)int32,*func(int32)int32,*func(*struct{})int32,*func(*struct{})*int8,*func(*struct{})*struct{},*func(*struct{},*int8,*func(*struct{},int32,**int8,**int8)int32,*struct{},**int8)int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{}),*func(**int8),*func(*struct{})int32,*func(*struct{},int32)*struct{},*func(*struct{},*int8,***int8,*int32,*int32,**int8)int32,*func()int32,*func(*struct{}),*func(*struct{})int64,*func()*int8,*func()int32,*func(int32)*struct{},*func(*int8...)*int8,*func(*int8,**struct{})int32,*func(*struct{},**struct{})int32,*func(*struct{},*int8,int32,**struct{},**int8)int32,*func(*struct{},*struct{},int32,**struct{},**struct{})int32,*func(*struct{},*func(*struct{},*int8,uint64),*struct{})*struct{},*func(*struct{},int32,*func(*struct{})int32,*struct{}),*func(*struct{},int32)*struct{},*func(*struct{})int32,*func(*struct{},*struct{},int32,*func(*struct{})),*func(*struct{},float64),*func(*struct{},*int8,int32),*func(*struct{},*struct{},int32),*func(*struct{},int32),*func(*struct{},int64),*func(*struct{}),*func(*struct{},*int8,int32,*func(*struct{})),*func(*struct{},*struct{},int32,*func(*struct{})),*func(*struct{},*struct{},int32,*func(*struct{})),*func(*struct{},*struct{},int32,*func(*struct{})),*func(*struct{},*struct{}),*func(*struct{},*func(*struct{}),*struct{})*struct{},*func(*struct{},*func(*struct{},int32,*int8,*int8,*int8,*int8)int32,*struct{})int32,*func(*struct{},int32,*struct{},*func(*struct{})),*func(int32,*int8,*int8...)*int8,*func(*struct{})int32,*func(*struct{},*int8,*int8,*int8,**int8,**int8,*int32,*int32,*int32)int32,*func(),*func(*struct{})int32,*func(*struct{},*func(*struct{},*int8),*struct{})*struct{},*func(*struct{},*struct{})int32,*func(*struct{},*func(*struct{},int32,*int8,*int8,int64),*struct{})*struct{},*func(*struct{})*struct{},*func(*struct{})*struct{},*func(*struct{})int32,*func(*struct{})int32,*func(*struct{})float64,*func(*struct{})int32,*func(*struct{})int64,*func(*struct{})int32,*func(*struct{})*uint8,*func(*struct{})*struct{},*func(*struct{})*struct{},*func(*struct{})*struct{},*func(*struct{})int32,*func(*int8,*struct{})*int8,*func(*struct{},*int8,int32)int32,*func(*struct{},*int8,int32,**struct{},**int8)int32,*func(*struct{},*struct{},int32,**struct{},**struct{})int32,*func(*struct{})int32,*func(*struct{},*int8,*struct{},*struct{},*func(*struct{}))int32,*func(*struct{},int32,int32)int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},*int8,*int8,*int8,int64,int32,**struct{})int32,*func(*struct{},*struct{},int32,int32)int32,*func(*struct{},*struct{},int32,int32)int32,*func(*struct{},*int8,int32,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32,*func(*struct{}))int32,*func(*struct{},*int8,int32,*struct{})int32,*func(int32)int64,*func()int64,*func(int32)*struct{},*func(*struct{}),*func(*struct{}),*func(*struct{}),*func(*struct{})int32,*func(*int8,**struct{},int32,*int8)int32,*func(int32)int32,*func(*struct{}),*func(*struct{}),*func(int32)int32,*func(int32),*func(*int8)*struct{},*func(*struct{},int32)int32,*func(*struct{})int32,*func()int32,*func(*struct{},int32),*func(*struct{},int32),*func(int32...)int32,*func(int32,*struct{}),*func(*struct{})*struct{},*func(*struct{},int32)int32,*func(*struct{},int32,int32)int32,*func(*struct{},*struct{})*struct{},*func(*struct{})*int8,*func(int32,*int32,*int32,int32)int32,*func(*struct{})int32,*func(*struct{},*int8,*struct{},*int8)*struct{},*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},int32)int32,*func(int32)*int8,*func(*int8)int32,*func(*struct{},*int8,int32,int32,*struct{},*func(*struct{},int32,**struct{}),*func(*struct{},int32,**struct{}),*func(*struct{}),*func(*struct{}))int32,*func(*struct{},int32...)int32,*func(*struct{})*struct{},*func(*struct{},int32,*int32,*int32,int32)int32,*func(*struct{})int32,*func(int32,*int8...),*func(int64)int64,*func()*int8,*func(*struct{},int32,int32)int32,*func(*int8,*int8,int32)int32,*func(*struct{},*func(**struct{},int32),*struct{})int32,*func(*struct{},int32)int32,*func(*struct{},*int8)int32,*func(*struct{},*func(*struct{},*struct{},*int8,int32)int32,*struct{})*struct{},*func(*struct{},int64)int32,*func(*struct{},int32...)int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},*int8)*int8,*func(*struct{},*int8)int32,*func(*struct{})int32,*func(int32)*int8,*func(*struct{})int32,*func(*struct{})int32,*func(*int8,*int8)int32,*func(*int8,*int8,int32)int32,*func(*int8,*int8,int64)int64,*func(*int8,*int8)*int8,*func(int32,*int8,*int8,*struct{})*int8,*func(*struct{},*int8,int32,*int32,*int32)int32,*func(*func())int32,*func(*struct{},int32,*struct{},uint64,*func(*struct{}))int32,*func(*struct{},int32,*int8,uint64,*func(*struct{}),uint8)int32,*func(*func())int32,*func(*struct{},*int8,*int8,**int8)int32,*func(uint64)*struct{},*func(*struct{})uint64,*func(*struct{},uint64)*struct{},*func(),*func(*struct{},*struct{},uint64,*func(*struct{})),*func(*struct{},*int8,uint64,*func(*struct{}),uint8),*func(*int8,*int8)int32,*func(*struct{})*struct{},*func(*struct{}),*func(*struct{},uint64)int32,*func(*struct{},int32,uint64)int32,*func(*struct{})uint32,*func(*struct{},uint32),*func(int32,*int64,*int64,int32)int32,*func(*int8,*int8,uint32)int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},uint32,*func(uint32,*struct{},*struct{},*struct{})int32,*struct{})int32,*func(*struct{})*int8,*func(*struct{},int64)}
+ Xaggregate_context func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xaggregate_count func(*crt.TLS, unsafe.Pointer) int32
+ Xbind_blob func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_double func(*crt.TLS, unsafe.Pointer, int32, float64) int32
+ Xbind_int func(*crt.TLS, unsafe.Pointer, int32, int32) int32
+ Xbind_int64 func(*crt.TLS, unsafe.Pointer, int32, int64) int32
+ Xbind_null func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xbind_parameter_count func(*crt.TLS, unsafe.Pointer) int32
+ Xbind_parameter_index func(*crt.TLS, unsafe.Pointer, *int8) int32
+ Xbind_parameter_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xbind_text func(*crt.TLS, unsafe.Pointer, int32, *int8, int32, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_text16 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_value func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
+ Xbusy_handler func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32) int32, unsafe.Pointer) int32
+ Xbusy_timeout func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xchanges func(*crt.TLS, unsafe.Pointer) int32
+ Xclose func(*crt.TLS, unsafe.Pointer) int32
+ Xcollation_needed func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)) int32
+ Xcollation_needed16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)) int32
+ Xcolumn_blob func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_bytes func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcolumn_bytes16 func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcolumn_count func(*crt.TLS, unsafe.Pointer) int32
+ Xcolumn_database_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_database_name16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_decltype func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_decltype16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_double func(*crt.TLS, unsafe.Pointer, int32) float64
+ Xcolumn_int func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcolumn_int64 func(*crt.TLS, unsafe.Pointer, int32) int64
+ Xcolumn_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_name16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_origin_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_origin_name16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_table_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_table_name16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_text func(*crt.TLS, unsafe.Pointer, int32) *uint8
+ Xcolumn_text16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_type func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcolumn_value func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcommit_hook func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer) unsafe.Pointer
+ Xcomplete func(*crt.TLS, *int8) int32
+ Xcomplete16 func(*crt.TLS, unsafe.Pointer) int32
+ Xcreate_collation func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32
+ Xcreate_collation16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32
+ Xcreate_function func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32
+ Xcreate_function16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32
+ Xcreate_module func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer) int32
+ Xdata_count func(*crt.TLS, unsafe.Pointer) int32
+ Xdb_handle func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xdeclare_vtab func(*crt.TLS, unsafe.Pointer, *int8) int32
+ Xenable_shared_cache func(*crt.TLS, int32) int32
+ Xerrcode func(*crt.TLS, unsafe.Pointer) int32
+ Xerrmsg func(*crt.TLS, unsafe.Pointer) *int8
+ Xerrmsg16 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xexec func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS, unsafe.Pointer, int32, **int8, **int8) int32, unsafe.Pointer, **int8) int32
+ Xexpired func(*crt.TLS, unsafe.Pointer) int32
+ Xfinalize func(*crt.TLS, unsafe.Pointer) int32
+ Xfree func(*crt.TLS, unsafe.Pointer)
+ Xfree_table func(*crt.TLS, **int8)
+ Xget_autocommit func(*crt.TLS, unsafe.Pointer) int32
+ Xget_auxdata func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xget_table func(*crt.TLS, unsafe.Pointer, *int8, ***int8, *int32, *int32, **int8) int32
+ Xglobal_recover func(*crt.TLS) int32
+ Xinterruptx func(*crt.TLS, unsafe.Pointer)
+ Xlast_insert_rowid func(*crt.TLS, unsafe.Pointer) int64
+ Xlibversion func(*crt.TLS) *int8
+ Xlibversion_number func(*crt.TLS) int32
+ Xmalloc func(*crt.TLS, int32) unsafe.Pointer
+ Xmprintf func(*crt.TLS, *int8, ...interface{}) *int8
+ Xopen64 func(*crt.TLS, *int8, *unsafe.Pointer) int32
+ Xopen16 func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32
+ Xprepare func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32
+ Xprepare16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32
+ Xprofile func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8, uint64), unsafe.Pointer) unsafe.Pointer
+ Xprogress_handler func(*crt.TLS, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer)
+ Xrealloc func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xreset func(*crt.TLS, unsafe.Pointer) int32
+ Xresult_blob func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_double func(*crt.TLS, unsafe.Pointer, float64)
+ Xresult_error func(*crt.TLS, unsafe.Pointer, *int8, int32)
+ Xresult_error16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
+ Xresult_int func(*crt.TLS, unsafe.Pointer, int32)
+ Xresult_int64 func(*crt.TLS, unsafe.Pointer, int64)
+ Xresult_null func(*crt.TLS, unsafe.Pointer)
+ Xresult_text func(*crt.TLS, unsafe.Pointer, *int8, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_text16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_text16be func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_text16le func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_value func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
+ Xrollback_hook func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer), unsafe.Pointer) unsafe.Pointer
+ Xset_authorizer func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32, unsafe.Pointer) int32
+ Xset_auxdata func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer))
+ Xsnprintf func(*crt.TLS, int32, *int8, *int8, ...interface{}) *int8
+ Xstep func(*crt.TLS, unsafe.Pointer) int32
+ Xtable_column_metadata func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, **int8, **int8, *int32, *int32, *int32) int32
+ Xthread_cleanup func(*crt.TLS)
+ Xtotal_changes func(*crt.TLS, unsafe.Pointer) int32
+ Xtrace func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8), unsafe.Pointer) unsafe.Pointer
+ Xtransfer_bindings func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
+ Xupdate_hook func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64), unsafe.Pointer) unsafe.Pointer
+ Xuser_data func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_blob func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_bytes func(*crt.TLS, unsafe.Pointer) int32
+ Xvalue_bytes16 func(*crt.TLS, unsafe.Pointer) int32
+ Xvalue_double func(*crt.TLS, unsafe.Pointer) float64
+ Xvalue_int func(*crt.TLS, unsafe.Pointer) int32
+ Xvalue_int64 func(*crt.TLS, unsafe.Pointer) int64
+ Xvalue_numeric_type func(*crt.TLS, unsafe.Pointer) int32
+ Xvalue_text func(*crt.TLS, unsafe.Pointer) *uint8
+ Xvalue_text16 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_text16be func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_text16le func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_type func(*crt.TLS, unsafe.Pointer) int32
+ Xvmprintf func(*crt.TLS, *int8, unsafe.Pointer) *int8
+ Xoverload_function func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
+ Xprepare_v2 func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32
+ Xprepare16_v2 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32
+ Xclear_bindings func(*crt.TLS, unsafe.Pointer) int32
+ Xcreate_module_v2 func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_zeroblob func(*crt.TLS, unsafe.Pointer, int32, int32) int32
+ Xblob_bytes func(*crt.TLS, unsafe.Pointer) int32
+ Xblob_close func(*crt.TLS, unsafe.Pointer) int32
+ Xblob_open func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, int64, int32, *unsafe.Pointer) int32
+ Xblob_read func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32) int32
+ Xblob_write func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32) int32
+ Xcreate_collation_v2 func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32, func(*crt.TLS, unsafe.Pointer)) int32
+ Xfile_control func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer) int32
+ Xmemory_highwater func(*crt.TLS, int32) int64
+ Xmemory_used func(*crt.TLS) int64
+ Xmutex_alloc func(*crt.TLS, int32) unsafe.Pointer
+ Xmutex_enter func(*crt.TLS, unsafe.Pointer)
+ Xmutex_free func(*crt.TLS, unsafe.Pointer)
+ Xmutex_leave func(*crt.TLS, unsafe.Pointer)
+ Xmutex_try func(*crt.TLS, unsafe.Pointer) int32
+ Xopen_v2 func(*crt.TLS, *int8, *unsafe.Pointer, int32, *int8) int32
+ Xrelease_memory func(*crt.TLS, int32) int32
+ Xresult_error_nomem func(*crt.TLS, unsafe.Pointer)
+ Xresult_error_toobig func(*crt.TLS, unsafe.Pointer)
+ Xsleep func(*crt.TLS, int32) int32
+ Xsoft_heap_limit func(*crt.TLS, int32)
+ Xvfs_find func(*crt.TLS, *int8) unsafe.Pointer
+ Xvfs_register func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xvfs_unregister func(*crt.TLS, unsafe.Pointer) int32
+ Xxthreadsafe func(*crt.TLS) int32
+ Xresult_zeroblob func(*crt.TLS, unsafe.Pointer, int32)
+ Xresult_error_code func(*crt.TLS, unsafe.Pointer, int32)
+ Xtest_control func(*crt.TLS, int32, ...interface{}) int32
+ Xrandomness func(*crt.TLS, int32, unsafe.Pointer)
+ Xcontext_db_handle func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xextended_result_codes func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xlimit func(*crt.TLS, unsafe.Pointer, int32, int32) int32
+ Xnext_stmt func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) unsafe.Pointer
+ Xsql func(*crt.TLS, unsafe.Pointer) *int8
+ Xstatus func(*crt.TLS, int32, *int32, *int32, int32) int32
+ Xbackup_finish func(*crt.TLS, unsafe.Pointer) int32
+ Xbackup_init func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, *int8) unsafe.Pointer
+ Xbackup_pagecount func(*crt.TLS, unsafe.Pointer) int32
+ Xbackup_remaining func(*crt.TLS, unsafe.Pointer) int32
+ Xbackup_step func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcompileoption_get func(*crt.TLS, int32) *int8
+ Xcompileoption_used func(*crt.TLS, *int8) int32
+ Xcreate_function_v2 func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32
+ Xdb_config func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32
+ Xdb_mutex func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xdb_status func(*crt.TLS, unsafe.Pointer, int32, *int32, *int32, int32) int32
+ Xextended_errcode func(*crt.TLS, unsafe.Pointer) int32
+ Xlog func(*crt.TLS, int32, *int8, ...interface{})
+ Xsoft_heap_limit64 func(*crt.TLS, int64) int64
+ Xsourceid func(*crt.TLS) *int8
+ Xstmt_status func(*crt.TLS, unsafe.Pointer, int32, int32) int32
+ Xstrnicmp func(*crt.TLS, *int8, *int8, int32) int32
+ Xunlock_notify func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, *unsafe.Pointer, int32), unsafe.Pointer) int32
+ Xwal_autocheckpoint func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xwal_checkpoint func(*crt.TLS, unsafe.Pointer, *int8) int32
+ Xwal_hook func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32, unsafe.Pointer) unsafe.Pointer
+ Xblob_reopen func(*crt.TLS, unsafe.Pointer, int64) int32
+ Xvtab_config func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32
+ Xvtab_on_conflict func(*crt.TLS, unsafe.Pointer) int32
+ Xclose_v2 func(*crt.TLS, unsafe.Pointer) int32
+ Xdb_filename func(*crt.TLS, unsafe.Pointer, *int8) *int8
+ Xdb_readonly func(*crt.TLS, unsafe.Pointer, *int8) int32
+ Xdb_release_memory func(*crt.TLS, unsafe.Pointer) int32
+ Xerrstr func(*crt.TLS, int32) *int8
+ Xstmt_busy func(*crt.TLS, unsafe.Pointer) int32
+ Xstmt_readonly func(*crt.TLS, unsafe.Pointer) int32
+ Xstricmp func(*crt.TLS, *int8, *int8) int32
+ Xuri_boolean func(*crt.TLS, *int8, *int8, int32) int32
+ Xuri_int64 func(*crt.TLS, *int8, *int8, int64) int64
+ Xuri_parameter func(*crt.TLS, *int8, *int8) *int8
+ Xvsnprintf func(*crt.TLS, int32, *int8, *int8, unsafe.Pointer) *int8
+ Xwal_checkpoint_v2 func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32, *int32) int32
+ Xauto_extension func(*crt.TLS, func(*crt.TLS)) int32
+ Xbind_blob64 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, uint64, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_text64 func(*crt.TLS, unsafe.Pointer, int32, *int8, uint64, func(*crt.TLS, unsafe.Pointer), uint8) int32
+ Xcancel_auto_extension func(*crt.TLS, func(*crt.TLS)) int32
+ Xload_extension func(*crt.TLS, unsafe.Pointer, *int8, *int8, **int8) int32
+ Xmalloc64 func(*crt.TLS, uint64) unsafe.Pointer
+ Xmsize func(*crt.TLS, unsafe.Pointer) uint64
+ Xrealloc64 func(*crt.TLS, unsafe.Pointer, uint64) unsafe.Pointer
+ Xreset_auto_extension func(*crt.TLS)
+ Xresult_blob64 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint64, func(*crt.TLS, unsafe.Pointer))
+ Xresult_text64 func(*crt.TLS, unsafe.Pointer, *int8, uint64, func(*crt.TLS, unsafe.Pointer), uint8)
+ Xstrglob func(*crt.TLS, *int8, *int8) int32
+ Xvalue_dup func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_free func(*crt.TLS, unsafe.Pointer)
+ Xresult_zeroblob64 func(*crt.TLS, unsafe.Pointer, uint64) int32
+ Xbind_zeroblob64 func(*crt.TLS, unsafe.Pointer, int32, uint64) int32
+ Xvalue_subtype func(*crt.TLS, unsafe.Pointer) uint32
+ Xresult_subtype func(*crt.TLS, unsafe.Pointer, uint32)
+ Xstatus64 func(*crt.TLS, int32, *int64, *int64, int32) int32
+ Xstrlike func(*crt.TLS, *int8, *int8, uint32) int32
+ Xdb_cacheflush func(*crt.TLS, unsafe.Pointer) int32
+ Xsystem_errno func(*crt.TLS, unsafe.Pointer) int32
+ Xtrace_v2 func(*crt.TLS, unsafe.Pointer, uint32, func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32, unsafe.Pointer) int32
+ Xexpanded_sql func(*crt.TLS, unsafe.Pointer) *int8
+ Xset_last_insert_rowid func(*crt.TLS, unsafe.Pointer, int64)
+} // t298 struct{aggregate_context *func(*struct{},int32)*struct{},aggregate_count *func(*struct{})int32,bind_blob *func(*struct{},int32,*struct{},int32,*func(*struct{}))int32,bind_double *func(*struct{},int32,float64)int32,bind_int *func(*struct{},int32,int32)int32,bind_int64 *func(*struct{},int32,int64)int32,bind_null *func(*struct{},int32)int32,bind_parameter_count *func(*struct{})int32,bind_parameter_index *func(*struct{},*int8)int32,bind_parameter_name *func(*struct{},int32)*int8,bind_text *func(*struct{},int32,*int8,int32,*func(*struct{}))int32,bind_text16 *func(*struct{},int32,*struct{},int32,*func(*struct{}))int32,bind_value *func(*struct{},int32,*struct{})int32,busy_handler *func(*struct{},*func(*struct{},int32)int32,*struct{})int32,busy_timeout *func(*struct{},int32)int32,changes *func(*struct{})int32,close *func(*struct{})int32,collation_needed *func(*struct{},*struct{},*func(*struct{},*struct{},int32,*int8))int32,collation_needed16 *func(*struct{},*struct{},*func(*struct{},*struct{},int32,*struct{}))int32,column_blob *func(*struct{},int32)*struct{},column_bytes *func(*struct{},int32)int32,column_bytes16 *func(*struct{},int32)int32,column_count *func(*struct{})int32,column_database_name *func(*struct{},int32)*int8,column_database_name16 *func(*struct{},int32)*struct{},column_decltype *func(*struct{},int32)*int8,column_decltype16 *func(*struct{},int32)*struct{},column_double *func(*struct{},int32)float64,column_int *func(*struct{},int32)int32,column_int64 *func(*struct{},int32)int64,column_name *func(*struct{},int32)*int8,column_name16 *func(*struct{},int32)*struct{},column_origin_name *func(*struct{},int32)*int8,column_origin_name16 *func(*struct{},int32)*struct{},column_table_name *func(*struct{},int32)*int8,column_table_name16 *func(*struct{},int32)*struct{},column_text *func(*struct{},int32)*uint8,column_text16 *func(*struct{},int32)*struct{},column_type *func(*struct{},int32)int32,column_value *func(*struct{},int32)*struct{},commit_hook *func(*struct{},*func(*struct{})int32,*struct{})*struct{},complete *func(*int8)int32,complete16 *func(*struct{})int32,create_collation *func(*struct{},*int8,int32,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32)int32,create_collation16 *func(*struct{},*struct{},int32,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32)int32,create_function *func(*struct{},*int8,int32,int32,*struct{},*func(*struct{},int32,**struct{}),*func(*struct{},int32,**struct{}),*func(*struct{}))int32,create_function16 *func(*struct{},*struct{},int32,int32,*struct{},*func(*struct{},int32,**struct{}),*func(*struct{},int32,**struct{}),*func(*struct{}))int32,create_module *func(*struct{},*int8,*struct{},*struct{})int32,data_count *func(*struct{})int32,db_handle *func(*struct{})*struct{},declare_vtab *func(*struct{},*int8)int32,enable_shared_cache *func(int32)int32,errcode *func(*struct{})int32,errmsg *func(*struct{})*int8,errmsg16 *func(*struct{})*struct{},exec *func(*struct{},*int8,*func(*struct{},int32,**int8,**int8)int32,*struct{},**int8)int32,expired *func(*struct{})int32,finalize *func(*struct{})int32,free *func(*struct{}),free_table *func(**int8),get_autocommit *func(*struct{})int32,get_auxdata *func(*struct{},int32)*struct{},get_table *func(*struct{},*int8,***int8,*int32,*int32,**int8)int32,global_recover *func()int32,interruptx *func(*struct{}),last_insert_rowid *func(*struct{})int64,libversion *func()*int8,libversion_number *func()int32,malloc *func(int32)*struct{},mprintf *func(*int8...)*int8,open64 *func(*int8,**struct{})int32,open16 *func(*struct{},**struct{})int32,prepare *func(*struct{},*int8,int32,**struct{},**int8)int32,prepare16 *func(*struct{},*struct{},int32,**struct{},**struct{})int32,profile *func(*struct{},*func(*struct{},*int8,uint64),*struct{})*struct{},progress_handler *func(*struct{},int32,*func(*struct{})int32,*struct{}),realloc *func(*struct{},int32)*struct{},reset *func(*struct{})int32,result_blob *func(*struct{},*struct{},int32,*func(*struct{})),result_double *func(*struct{},float64),result_error *func(*struct{},*int8,int32),result_error16 *func(*struct{},*struct{},int32),result_int *func(*struct{},int32),result_int64 *func(*struct{},int64),result_null *func(*struct{}),result_text *func(*struct{},*int8,int32,*func(*struct{})),result_text16 *func(*struct{},*struct{},int32,*func(*struct{})),result_text16be *func(*struct{},*struct{},int32,*func(*struct{})),result_text16le *func(*struct{},*struct{},int32,*func(*struct{})),result_value *func(*struct{},*struct{}),rollback_hook *func(*struct{},*func(*struct{}),*struct{})*struct{},set_authorizer *func(*struct{},*func(*struct{},int32,*int8,*int8,*int8,*int8)int32,*struct{})int32,set_auxdata *func(*struct{},int32,*struct{},*func(*struct{})),snprintf *func(int32,*int8,*int8...)*int8,step *func(*struct{})int32,table_column_metadata *func(*struct{},*int8,*int8,*int8,**int8,**int8,*int32,*int32,*int32)int32,thread_cleanup *func(),total_changes *func(*struct{})int32,trace *func(*struct{},*func(*struct{},*int8),*struct{})*struct{},transfer_bindings *func(*struct{},*struct{})int32,update_hook *func(*struct{},*func(*struct{},int32,*int8,*int8,int64),*struct{})*struct{},user_data *func(*struct{})*struct{},value_blob *func(*struct{})*struct{},value_bytes *func(*struct{})int32,value_bytes16 *func(*struct{})int32,value_double *func(*struct{})float64,value_int *func(*struct{})int32,value_int64 *func(*struct{})int64,value_numeric_type *func(*struct{})int32,value_text *func(*struct{})*uint8,value_text16 *func(*struct{})*struct{},value_text16be *func(*struct{})*struct{},value_text16le *func(*struct{})*struct{},value_type *func(*struct{})int32,vmprintf *func(*int8,*struct{})*int8,overload_function *func(*struct{},*int8,int32)int32,prepare_v2 *func(*struct{},*int8,int32,**struct{},**int8)int32,prepare16_v2 *func(*struct{},*struct{},int32,**struct{},**struct{})int32,clear_bindings *func(*struct{})int32,create_module_v2 *func(*struct{},*int8,*struct{},*struct{},*func(*struct{}))int32,bind_zeroblob *func(*struct{},int32,int32)int32,blob_bytes *func(*struct{})int32,blob_close *func(*struct{})int32,blob_open *func(*struct{},*int8,*int8,*int8,int64,int32,**struct{})int32,blob_read *func(*struct{},*struct{},int32,int32)int32,blob_write *func(*struct{},*struct{},int32,int32)int32,create_collation_v2 *func(*struct{},*int8,int32,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32,*func(*struct{}))int32,file_control *func(*struct{},*int8,int32,*struct{})int32,memory_highwater *func(int32)int64,memory_used *func()int64,mutex_alloc *func(int32)*struct{},mutex_enter *func(*struct{}),mutex_free *func(*struct{}),mutex_leave *func(*struct{}),mutex_try *func(*struct{})int32,open_v2 *func(*int8,**struct{},int32,*int8)int32,release_memory *func(int32)int32,result_error_nomem *func(*struct{}),result_error_toobig *func(*struct{}),sleep *func(int32)int32,soft_heap_limit *func(int32),vfs_find *func(*int8)*struct{},vfs_register *func(*struct{},int32)int32,vfs_unregister *func(*struct{})int32,xthreadsafe *func()int32,result_zeroblob *func(*struct{},int32),result_error_code *func(*struct{},int32),test_control *func(int32...)int32,randomness *func(int32,*struct{}),context_db_handle *func(*struct{})*struct{},extended_result_codes *func(*struct{},int32)int32,limit *func(*struct{},int32,int32)int32,next_stmt *func(*struct{},*struct{})*struct{},sql *func(*struct{})*int8,status *func(int32,*int32,*int32,int32)int32,backup_finish *func(*struct{})int32,backup_init *func(*struct{},*int8,*struct{},*int8)*struct{},backup_pagecount *func(*struct{})int32,backup_remaining *func(*struct{})int32,backup_step *func(*struct{},int32)int32,compileoption_get *func(int32)*int8,compileoption_used *func(*int8)int32,create_function_v2 *func(*struct{},*int8,int32,int32,*struct{},*func(*struct{},int32,**struct{}),*func(*struct{},int32,**struct{}),*func(*struct{}),*func(*struct{}))int32,db_config *func(*struct{},int32...)int32,db_mutex *func(*struct{})*struct{},db_status *func(*struct{},int32,*int32,*int32,int32)int32,extended_errcode *func(*struct{})int32,log *func(int32,*int8...),soft_heap_limit64 *func(int64)int64,sourceid *func()*int8,stmt_status *func(*struct{},int32,int32)int32,strnicmp *func(*int8,*int8,int32)int32,unlock_notify *func(*struct{},*func(**struct{},int32),*struct{})int32,wal_autocheckpoint *func(*struct{},int32)int32,wal_checkpoint *func(*struct{},*int8)int32,wal_hook *func(*struct{},*func(*struct{},*struct{},*int8,int32)int32,*struct{})*struct{},blob_reopen *func(*struct{},int64)int32,vtab_config *func(*struct{},int32...)int32,vtab_on_conflict *func(*struct{})int32,close_v2 *func(*struct{})int32,db_filename *func(*struct{},*int8)*int8,db_readonly *func(*struct{},*int8)int32,db_release_memory *func(*struct{})int32,errstr *func(int32)*int8,stmt_busy *func(*struct{})int32,stmt_readonly *func(*struct{})int32,stricmp *func(*int8,*int8)int32,uri_boolean *func(*int8,*int8,int32)int32,uri_int64 *func(*int8,*int8,int64)int64,uri_parameter *func(*int8,*int8)*int8,vsnprintf *func(int32,*int8,*int8,*struct{})*int8,wal_checkpoint_v2 *func(*struct{},*int8,int32,*int32,*int32)int32,auto_extension *func(*func())int32,bind_blob64 *func(*struct{},int32,*struct{},uint64,*func(*struct{}))int32,bind_text64 *func(*struct{},int32,*int8,uint64,*func(*struct{}),uint8)int32,cancel_auto_extension *func(*func())int32,load_extension *func(*struct{},*int8,*int8,**int8)int32,malloc64 *func(uint64)*struct{},msize *func(*struct{})uint64,realloc64 *func(*struct{},uint64)*struct{},reset_auto_extension *func(),result_blob64 *func(*struct{},*struct{},uint64,*func(*struct{})),result_text64 *func(*struct{},*int8,uint64,*func(*struct{}),uint8),strglob *func(*int8,*int8)int32,value_dup *func(*struct{})*struct{},value_free *func(*struct{}),result_zeroblob64 *func(*struct{},uint64)int32,bind_zeroblob64 *func(*struct{},int32,uint64)int32,value_subtype *func(*struct{})uint32,result_subtype *func(*struct{},uint32),status64 *func(int32,*int64,*int64,int32)int32,strlike *func(*int8,*int8,uint32)int32,db_cacheflush *func(*struct{})int32,system_errno *func(*struct{})int32,trace_v2 *func(*struct{},uint32,*func(uint32,*struct{},*struct{},*struct{})int32,*struct{})int32,expanded_sql *func(*struct{})*int8,set_last_insert_rowid *func(*struct{},int64)}
type Tsqlite3AutoExtList struct {
- X0 uint32
- X1 *func(*crt.TLS)
-} // t219 struct{uint32,**func()}
+ XnExt uint32
+ XaExt *func(*crt.TLS)
+} // t299 struct{nExt uint32,aExt **func()}
type XPragmaName struct {
- X0 *int8
- X1 uint8
- X2 uint8
- X3 uint8
- X4 uint8
- X5 uint32
-} // t220 struct{*int8,uint8,uint8,uint8,uint8,uint32}
+ XzName *int8
+ XePragTyp uint8
+ XmPragFlg uint8
+ XiPragCName uint8
+ XnPragCName uint8
+ XiArg uint32
+} // t300 struct{zName *int8,ePragTyp uint8,mPragFlg uint8,iPragCName uint8,nPragCName uint8,iArg uint32}
type TEncName struct {
- X0 *int8
- X1 uint8
-} // t221 struct{*int8,uint8}
+ XzName *int8
+ Xenc uint8
+} // t301 struct{zName *int8,enc uint8}
type XPragmaVtab struct {
- X0 struct {
- X0 unsafe.Pointer
- X1 int32
- X2 *int8
- }
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 uint8
- X4 uint8
-} // t222 struct{struct{*struct{},int32,*int8},*struct{},*struct{},uint8,uint8}
+ Xbase Xsqlite3_vtab
+ Xdb unsafe.Pointer
+ XpName unsafe.Pointer
+ XnHidden uint8
+ XiHidden uint8
+} // t302 struct{base struct{pModule *struct{},nRef int32,zErrMsg *int8},db *struct{},pName *struct{},nHidden uint8,iHidden uint8}
type Xsqlite3_index_info struct {
- X0 int32
- X1 unsafe.Pointer
- X2 int32
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 int32
- X6 *int8
- X7 int32
- X8 int32
- X9 float64
- X10 int64
- X11 int32
- X12 uint64
-} // t223 struct{int32,*struct{},int32,*struct{},*struct{},int32,*int8,int32,int32,float64,int64,int32,uint64}
+ XnConstraint int32
+ XaConstraint unsafe.Pointer
+ XnOrderBy int32
+ XaOrderBy unsafe.Pointer
+ XaConstraintUsage unsafe.Pointer
+ XidxNum int32
+ XidxStr *int8
+ XneedToFreeIdxStr int32
+ XorderByConsumed int32
+ XestimatedCost float64
+ XestimatedRows int64
+ XidxFlags int32
+ XcolUsed uint64
+} // t303 struct{nConstraint int32,aConstraint *struct{},nOrderBy int32,aOrderBy *struct{},aConstraintUsage *struct{},idxNum int32,idxStr *int8,needToFreeIdxStr int32,orderByConsumed int32,estimatedCost float64,estimatedRows int64,idxFlags int32,colUsed uint64}
type Tsqlite3_index_constraint struct {
- X0 int32
- X1 uint8
- X2 uint8
- X3 int32
-} // t224 struct{int32,uint8,uint8,int32}
+ XiColumn int32
+ Xop uint8
+ Xusable uint8
+ XiTermOffset int32
+} // t304 struct{iColumn int32,op uint8,usable uint8,iTermOffset int32}
-type Tsqlite3_index_orderby struct {
- X0 int32
- X1 uint8
-} // t225 struct{int32,uint8}
+type Tsqlite3_index_constraint_usage struct {
+ XargvIndex int32
+ Xomit uint8
+} // t305 struct{argvIndex int32,omit uint8}
type XPragmaVtabCursor struct {
- X0 struct{ X0 unsafe.Pointer }
- X1 unsafe.Pointer
- X2 int64
- X3 [2]*int8
-} // t226 struct{struct{*struct{}},*struct{},int64,[2]*int8}
+ Xbase Xsqlite3_vtab_cursor
+ XpPragma unsafe.Pointer
+ XiRowid int64
+ XazArg [2]*int8
+} // t306 struct{base struct{pVtab *struct{}},pPragma *struct{},iRowid int64,azArg [2]*int8}
type XSortCtx struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
- X3 int32
- X4 int32
- X5 int32
- X6 int32
- X7 uint8
- X8 uint8
-} // t227 struct{*struct{},int32,int32,int32,int32,int32,int32,uint8,uint8}
+ XpOrderBy unsafe.Pointer
+ XnOBSat int32
+ XiECursor int32
+ XregReturn int32
+ XlabelBkOut int32
+ XaddrSortIndex int32
+ XlabelDone int32
+ XsortFlags uint8
+ XbOrderedInnerLoop uint8
+} // t307 struct{pOrderBy *struct{},nOBSat int32,iECursor int32,regReturn int32,labelBkOut int32,addrSortIndex int32,labelDone int32,sortFlags uint8,bOrderedInnerLoop uint8}
type XDistinctCtx struct {
- X0 uint8
- X1 uint8
- X2 int32
- X3 int32
-} // t228 struct{uint8,uint8,int32,int32}
+ XisTnct uint8
+ XeTnctType uint8
+ XtabTnct int32
+ XaddrTnct int32
+} // t308 struct{isTnct uint8,eTnctType uint8,tabTnct int32,addrTnct int32}
type XSubstContext struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
- X3 int32
- X4 unsafe.Pointer
-} // t229 struct{*struct{},int32,int32,int32,*struct{}}
+ XpParse unsafe.Pointer
+ XiTable int32
+ XiNewTable int32
+ XisLeftJoin int32
+ XpEList unsafe.Pointer
+} // t309 struct{pParse *struct{},iTable int32,iNewTable int32,isLeftJoin int32,pEList *struct{}}
type THavingToWhereCtx struct {
- X0 *unsafe.Pointer
- X1 unsafe.Pointer
-} // t230 struct{**struct{},*struct{}}
+ XppWhere *unsafe.Pointer
+ XpGroupBy unsafe.Pointer
+} // t310 struct{ppWhere **struct{},pGroupBy *struct{}}
type XTabResult struct {
- X0 **int8
- X1 *int8
- X2 uint32
- X3 uint32
- X4 uint32
- X5 uint32
- X6 int32
-} // t231 struct{**int8,*int8,uint32,uint32,uint32,uint32,int32}
+ XazResult **int8
+ XzErrMsg *int8
+ XnAlloc uint32
+ XnRow uint32
+ XnColumn uint32
+ XnData uint32
+ Xrc int32
+} // t311 struct{azResult **int8,zErrMsg *int8,nAlloc uint32,nRow uint32,nColumn uint32,nData uint32,rc int32}
type XVtabCtx struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 int32
-} // t232 struct{*struct{},*struct{},*struct{},int32}
+ XpVTable unsafe.Pointer
+ XpTab unsafe.Pointer
+ XpPrior unsafe.Pointer
+ XbDeclared int32
+} // t312 struct{pVTable *struct{},pTab *struct{},pPrior *struct{},bDeclared int32}
type XWhereLoop struct {
- X0 uint64
- X1 uint64
- X2 int8
- X3 uint8
- X4 uint8
- X5 int16
- X6 int16
- X7 int16
- X8 struct {
- X [0]struct {
- X0 struct {
- X0 uint16
- X1 uint16
- X2 uint16
- X3 uint16
- X4 unsafe.Pointer
- }
- X1 struct {
- X0 int32
- X1 uint8
- X2 int8
- X3 uint16
- X4 *int8
- }
- }
- U [12]byte
- }
- X9 uint32
- X10 uint16
- X11 uint16
- X12 uint16
- X13 *unsafe.Pointer
- X14 unsafe.Pointer
- X15 [3]unsafe.Pointer
-} // t233 struct{uint64,uint64,int8,uint8,uint8,int16,int16,int16,union{struct{uint16,uint16,uint16,uint16,*struct{}},struct{int32,uint8,int8,uint16,*int8}},uint32,uint16,uint16,uint16,**struct{},*struct{},[3]*struct{}}
+ Xprereq uint64
+ XmaskSelf uint64
+ XcId int8
+ XiTab uint8
+ XiSortIdx uint8
+ XrSetup int16
+ XrRun int16
+ XnOut int16
+ Xu t313
+ XwsFlags uint32
+ XnLTerm uint16
+ XnSkip uint16
+ XnLSlot uint16
+ XaLTerm *unsafe.Pointer
+ XpNextLoop unsafe.Pointer
+ XaLTermSpace [3]unsafe.Pointer
+} // t314 struct{prereq uint64,maskSelf uint64,cId int8,iTab uint8,iSortIdx uint8,rSetup int16,rRun int16,nOut int16,u union{btree struct{nEq uint16,nBtm uint16,nTop uint16,nIdxCol uint16,pIndex *struct{}},vtab struct{idxNum int32,needFree uint8,isOrdered int8,omitMask uint16,idxStr *int8}},wsFlags uint32,nLTerm uint16,nSkip uint16,nLSlot uint16,aLTerm **struct{},pNextLoop *struct{},aLTermSpace [3]*struct{}}
type TInLoop struct {
- X0 int32
- X1 int32
- X2 uint8
-} // t234 struct{int32,int32,uint8}
+ XiCur int32
+ XaddrInTop int32
+ XeEndLoopOp uint8
+} // t315 struct{iCur int32,addrInTop int32,eEndLoopOp uint8}
type XIdxExprTrans struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
- X3 int32
-} // t235 struct{*struct{},int32,int32,int32}
+ XpIdxExpr unsafe.Pointer
+ XiTabCur int32
+ XiIdxCur int32
+ XiIdxCol int32
+} // t316 struct{pIdxExpr *struct{},iTabCur int32,iIdxCur int32,iIdxCol int32}
type XWhereOrInfo struct {
- X0 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 uint8
- X3 int32
- X4 int32
- X5 unsafe.Pointer
- X6 [8]struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int16
- X3 uint16
- X4 uint16
- X5 uint8
- X6 uint8
- X7 int32
- X8 int32
- X9 int32
- X10 struct {
- X [0]struct {
- X0 int32
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- }
- U [4]byte
- }
- X11 uint64
- X12 uint64
- }
- }
- X1 uint64
-} // t236 struct{struct{*struct{},*struct{},uint8,int32,int32,*struct{},[8]struct{*struct{},*struct{},int16,uint16,uint16,uint8,uint8,int32,int32,int32,union{int32,*struct{},*struct{}},uint64,uint64}},uint64}
-
-type XWhereAndInfo struct {
- X0 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 uint8
- X3 int32
- X4 int32
- X5 unsafe.Pointer
- X6 [8]struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int16
- X3 uint16
- X4 uint16
- X5 uint8
- X6 uint8
- X7 int32
- X8 int32
- X9 int32
- X10 struct {
- X [0]struct {
- X0 int32
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- }
- U [4]byte
- }
- X11 uint64
- X12 uint64
- }
- }
-} // t237 struct{struct{*struct{},*struct{},uint8,int32,int32,*struct{},[8]struct{*struct{},*struct{},int16,uint16,uint16,uint8,uint8,int32,int32,int32,union{int32,*struct{},*struct{}},uint64,uint64}}}
+ Xwc XWhereClause
+ Xindexable uint64
+} // t317 struct{wc struct{pWInfo *struct{},pOuter *struct{},op uint8,nTerm int32,nSlot int32,a *struct{},aStatic [8]struct{pExpr *struct{},pWC *struct{},truthProb int16,wtFlags uint16,eOperator uint16,nChild uint8,eMatchOp uint8,iParent int32,leftCursor int32,iField int32,u union{leftColumn int32,pOrInfo *struct{},pAndInfo *struct{}},prereqRight uint64,prereqAll uint64}},indexable uint64}
+
+type XWhereAndInfo struct{ Xwc XWhereClause } // t318 struct{wc struct{pWInfo *struct{},pOuter *struct{},op uint8,nTerm int32,nSlot int32,a *struct{},aStatic [8]struct{pExpr *struct{},pWC *struct{},truthProb int16,wtFlags uint16,eOperator uint16,nChild uint8,eMatchOp uint8,iParent int32,leftCursor int32,iField int32,u union{leftColumn int32,pOrInfo *struct{},pAndInfo *struct{}},prereqRight uint64,prereqAll uint64}}}
+
+type TOp2 struct {
+ XzOp *int8
+ XeOp2 uint8
+} // t319 struct{zOp *int8,eOp2 uint8}
type XWhereOrCost struct {
- X0 uint64
- X1 int16
- X2 int16
-} // t238 struct{uint64,int16,int16}
+ Xprereq uint64
+ XrRun int16
+ XnOut int16
+} // t320 struct{prereq uint64,rRun int16,nOut int16}
type XWhereOrSet struct {
- X0 uint16
- X1 [3]struct {
- X0 uint64
- X1 int16
- X2 int16
- }
-} // t239 struct{uint16,[3]struct{uint64,int16,int16}}
+ Xn uint16
+ Xa [3]XWhereOrCost
+} // t321 struct{n uint16,a [3]struct{prereq uint64,rRun int16,nOut int16}}
type XWhereScan struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 *int8
- X3 unsafe.Pointer
- X4 int8
- X5 uint8
- X6 uint8
- X7 uint32
- X8 int32
- X9 [11]int32
- X10 [11]int16
-} // t240 struct{*struct{},*struct{},*int8,*struct{},int8,uint8,uint8,uint32,int32,[11]int32,[11]int16}
+ XpOrigWC unsafe.Pointer
+ XpWC unsafe.Pointer
+ XzCollName *int8
+ XpIdxExpr unsafe.Pointer
+ Xidxaff int8
+ XnEquiv uint8
+ XiEquiv uint8
+ XopMask uint32
+ Xk int32
+ XaiCur [11]int32
+ XaiColumn [11]int16
+} // t322 struct{pOrigWC *struct{},pWC *struct{},zCollName *int8,pIdxExpr *struct{},idxaff int8,nEquiv uint8,iEquiv uint8,opMask uint32,k int32,aiCur [11]int32,aiColumn [11]int16}
+
+type Tsqlite3_index_orderby struct {
+ XiColumn int32
+ Xdesc uint8
+} // t323 struct{iColumn int32,desc uint8}
type XWhereLoopBuilder struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 uint32
-} // t241 struct{*struct{},*struct{},*struct{},*struct{},*struct{},uint32}
+ XpWInfo unsafe.Pointer
+ XpWC unsafe.Pointer
+ XpOrderBy unsafe.Pointer
+ XpNew unsafe.Pointer
+ XpOrSet unsafe.Pointer
+ XbldFlags uint32
+} // t324 struct{pWInfo *struct{},pWC *struct{},pOrderBy *struct{},pNew *struct{},pOrSet *struct{},bldFlags uint32}
type XWherePath struct {
- X0 uint64
- X1 uint64
- X2 int16
- X3 int16
- X4 int16
- X5 int8
- X6 *unsafe.Pointer
-} // t242 struct{uint64,uint64,int16,int16,int16,int8,**struct{}}
+ XmaskLoop uint64
+ XrevLoop uint64
+ XnRow int16
+ XrCost int16
+ XrUnsorted int16
+ XisOrdered int8
+ XaLoop *unsafe.Pointer
+} // t325 struct{maskLoop uint64,revLoop uint64,nRow int16,rCost int16,rUnsorted int16,isOrdered int8,aLoop **struct{}}
type XYYMINORTYPE struct {
X [0]struct {
- X0 int32
- X1 struct {
- X0 *int8
- X1 uint32
- }
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
- }
- X7 int32
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- X11 struct {
- X0 int32
- X1 unsafe.Pointer
- }
- X12 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- }
- X13 struct {
- X0 int32
- X1 int32
- }
+ Xyyinit int32
+ Xyy0 XToken
+ Xyy72 unsafe.Pointer
+ Xyy145 unsafe.Pointer
+ Xyy148 unsafe.Pointer
+ Xyy185 unsafe.Pointer
+ Xyy190 XExprSpan
+ Xyy194 int32
+ Xyy243 unsafe.Pointer
+ Xyy254 unsafe.Pointer
+ Xyy285 unsafe.Pointer
+ Xyy332 t51
+ Xyy354 t55
+ Xyy497 t54
}
U [12]byte
-} // t243 union{int32,struct{*int8,uint32},*struct{},*struct{},*struct{},*struct{},struct{*struct{},*int8,*int8},int32,*struct{},*struct{},*struct{},struct{int32,*struct{}},struct{*struct{},*struct{}},struct{int32,int32}}
+} // t326 union{yyinit int32,yy0 struct{z *int8,n uint32},yy72 *struct{},yy145 *struct{},yy148 *struct{},yy185 *struct{},yy190 struct{pExpr *struct{},zStart *int8,zEnd *int8},yy194 int32,yy243 *struct{},yy254 *struct{},yy285 *struct{},yy332 struct{a int32,b *struct{}},yy354 struct{pLimit *struct{},pOffset *struct{}},yy497 struct{value int32,mask int32}}
type XyyStackEntry struct {
- X0 uint16
- X1 uint8
- X2 struct {
- X [0]struct {
- X0 int32
- X1 struct {
- X0 *int8
- X1 uint32
- }
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
- }
- X7 int32
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- X11 struct {
- X0 int32
- X1 unsafe.Pointer
- }
- X12 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- }
- X13 struct {
- X0 int32
- X1 int32
- }
- }
- U [12]byte
- }
-} // t244 struct{uint16,uint8,union{int32,struct{*int8,uint32},*struct{},*struct{},*struct{},*struct{},struct{*struct{},*int8,*int8},int32,*struct{},*struct{},*struct{},struct{int32,*struct{}},struct{*struct{},*struct{}},struct{int32,int32}}}
+ Xstateno uint16
+ Xmajor uint8
+ Xminor XYYMINORTYPE
+} // t327 struct{stateno uint16,major uint8,minor union{yyinit int32,yy0 struct{z *int8,n uint32},yy72 *struct{},yy145 *struct{},yy148 *struct{},yy185 *struct{},yy190 struct{pExpr *struct{},zStart *int8,zEnd *int8},yy194 int32,yy243 *struct{},yy254 *struct{},yy285 *struct{},yy332 struct{a int32,b *struct{}},yy354 struct{pLimit *struct{},pOffset *struct{}},yy497 struct{value int32,mask int32}}}
type XyyParser struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 [100]struct {
- X0 uint16
- X1 uint8
- X2 struct {
- X [0]struct {
- X0 int32
- X1 struct {
- X0 *int8
- X1 uint32
- }
- X2 unsafe.Pointer
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 struct {
- X0 unsafe.Pointer
- X1 *int8
- X2 *int8
- }
- X7 int32
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- X11 struct {
- X0 int32
- X1 unsafe.Pointer
- }
- X12 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- }
- X13 struct {
- X0 int32
- X1 int32
- }
- }
- U [12]byte
- }
- }
-} // t245 struct{*struct{},*struct{},[100]struct{uint16,uint8,union{int32,struct{*int8,uint32},*struct{},*struct{},*struct{},*struct{},struct{*struct{},*int8,*int8},int32,*struct{},*struct{},*struct{},struct{int32,*struct{}},struct{*struct{},*struct{}},struct{int32,int32}}}}
-
-type t21 struct {
- X0 int32
- X1 uint8
- X2 uint8
- X3 uint8
- X4 uint8
-} // struct{int32,uint8,uint8,uint8,uint8}
-
-type t9 struct {
+ Xyytos unsafe.Pointer
+ XpParse unsafe.Pointer
+ Xyystack [100]XyyStackEntry
+} // t328 struct{yytos *struct{},pParse *struct{},yystack [100]struct{stateno uint16,major uint8,minor union{yyinit int32,yy0 struct{z *int8,n uint32},yy72 *struct{},yy145 *struct{},yy148 *struct{},yy185 *struct{},yy190 struct{pExpr *struct{},zStart *int8,zEnd *int8},yy194 int32,yy243 *struct{},yy254 *struct{},yy285 *struct{},yy332 struct{a int32,b *struct{}},yy354 struct{pLimit *struct{},pOffset *struct{}},yy497 struct{value int32,mask int32}}}}
+
+type TOpenMode struct {
+ Xz *int8
+ Xmode int32
+} // t329 struct{z *int8,mode int32}
+
+type t136 struct{} // struct{}
+
+type t148 struct {
+ XnewTnum int32
+ XiDb uint8
+ Xbusy uint8
+ XorphanTrigger uint8
+ XimposterTable uint8
+} // struct{newTnum int32,iDb uint8,busy uint8,orphanTrigger uint8,imposterTable uint8}
+
+type t149 struct {
X [0]struct {
- X0 int32
- X1 float64
+ XisInterrupted int32
+ XnotUsed1 float64
}
U [8]byte
-} // union{int32,float64}
-
-type t7 struct {
- X0 uint32
- X1 uint16
- X2 uint8
- X3 int32
- X4 int32
- X5 [3]int32
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
-} // struct{uint32,uint16,uint8,int32,int32,[3]int32,*struct{},*struct{},*struct{}}
-
-type t19 struct {
- X0 func(*crt.TLS, unsafe.Pointer, int32) int32
- X1 unsafe.Pointer
- X2 int32
-} // struct{*func(*struct{},int32)int32,*struct{},int32}
-
-type t16 struct {
- X0 uint8
- X1 uint8
- X2 *int8
- X3 float64
- X4 float64
-} // struct{uint8,uint8,*int8,float64,float64}
-
-type t15 struct {
+} // union{isInterrupted int32,notUsed1 float64}
+
+type t150 struct {
+ XbDisable uint32
+ Xsz uint16
+ XbMalloced uint8
+ XnOut int32
+ XmxOut int32
+ XanStat [3]int32
+ XpFree unsafe.Pointer
+ XpStart unsafe.Pointer
+ XpEnd unsafe.Pointer
+} // struct{bDisable uint32,sz uint16,bMalloced uint8,nOut int32,mxOut int32,anStat [3]int32,pFree *struct{},pStart *struct{},pEnd *struct{}}
+
+type t75 struct {
+ XxFunc func(*crt.TLS, unsafe.Pointer, int32) int32
+ XpArg unsafe.Pointer
+ XnBusy int32
+} // struct{xFunc *func(*struct{},int32)int32,pArg *struct{},nBusy int32}
+
+type t22 struct {
+ XeType uint8
+ XnName uint8
+ XzName *int8
+ XrLimit float64
+ XrXform float64
+} // struct{eType uint8,nName uint8,zName *int8,rLimit float64,rXform float64}
+
+type t163 struct {
X [0]struct {
- X0 float64
- X1 int64
- X2 int32
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 unsafe.Pointer
+ Xr float64
+ Xi int64
+ XnZero int32
+ XpDef unsafe.Pointer
+ XpRowSet unsafe.Pointer
+ XpFrame unsafe.Pointer
}
U [8]byte
-} // union{float64,int64,int32,*struct{},*struct{},*struct{}}
+} // union{r float64,i int64,nZero int32,pDef *struct{},pRowSet *struct{},pFrame *struct{}}
-type t12 struct {
+type t165 struct {
X [0]struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
+ XpHash unsafe.Pointer
+ XpDestructor unsafe.Pointer
}
U [4]byte
-} // union{*struct{},*struct{}}
+} // union{pHash *struct{},pDestructor *struct{}}
-type t28 struct {
- X0 uint8
- X1 int8
-} // struct{uint8,int8,}
+type t177 struct {
+ Xjointype uint8
+ XnotIndexed int8
+} // struct{jointype uint8,notIndexed int8}
-type t29 struct {
+type t178 struct {
X [0]struct {
- X0 *int8
- X1 unsafe.Pointer
+ XzIndexedBy *int8
+ XpFuncArg unsafe.Pointer
}
U [4]byte
-} // union{*int8,*struct{}}
+} // union{zIndexedBy *int8,pFuncArg *struct{}}
-type t45 struct {
- X0 int32
- X1 [100]uint8
-} // struct{int32,[100]uint8}
+type t73 struct {
+ XiLevel int32
+ XbLine [100]uint8
+} // struct{iLevel int32,bLine [100]uint8}
-type t43 struct {
- X0 uint16
- X1 uint16
-} // struct{uint16,uint16}
+type t71 struct {
+ XiOrderByCol uint16
+ XiAlias uint16
+} // struct{iOrderByCol uint16,iAlias uint16}
-type t37 struct {
+type t183 struct {
X [0]struct {
- X0 struct {
- X0 uint16
- X1 uint16
- }
- X1 int32
+ Xx t71
+ XiConstExprReg int32
}
U [4]byte
-} // union{struct{uint16,uint16},int32}
+} // union{x struct{iOrderByCol uint16,iAlias uint16},iConstExprReg int32}
-type t27 struct {
+type t187 struct {
X [0]struct {
- X0 *int8
- X1 int32
+ XzToken *int8
+ XiValue int32
}
U [4]byte
-} // union{*int8,int32}
+} // union{zToken *int8,iValue int32}
-type t22 struct {
+type t188 struct {
+ X [0]struct {
+ XpList unsafe.Pointer
+ XpSelect unsafe.Pointer
+ }
+ U [4]byte
+} // union{pList *struct{},pSelect *struct{}}
+
+type t203 struct {
X [0]struct {
- X0 [500]uint8
- X1 [125]uint32
- X2 [125]unsafe.Pointer
+ XaBitmap [500]uint8
+ XaHash [125]uint32
+ XapSub [125]unsafe.Pointer
}
U [500]byte
-} // union{[500]uint8,[125]uint32,[125]*struct{}}
+} // union{aBitmap [500]uint8,aHash [125]uint32,apSub [125]*struct{}}
-type t41 struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 *unsafe.Pointer
- X3 int32
-} // struct{*struct{},*struct{},**struct{},int32}
+type t68 struct {
+ XpParse unsafe.Pointer
+ XpIdx unsafe.Pointer
+ XppRec *unsafe.Pointer
+ XiVal int32
+} // struct{pParse *struct{},pIdx *struct{},ppRec **struct{},iVal int32}
-type t39 struct {
+type t235 struct {
X [0]struct {
- X0 int32
- X1 unsafe.Pointer
- X2 *int8
- X3 *int64
- X4 *float64
- X5 unsafe.Pointer
- X6 unsafe.Pointer
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
- X11 *int32
- X12 unsafe.Pointer
- X13 unsafe.Pointer
- X14 func(*crt.TLS, unsafe.Pointer, *int32) int32
+ Xi int32
+ Xp unsafe.Pointer
+ Xz *int8
+ XpI64 *int64
+ XpReal *float64
+ XpFunc unsafe.Pointer
+ XpCtx unsafe.Pointer
+ XpColl unsafe.Pointer
+ XpMem unsafe.Pointer
+ XpVtab unsafe.Pointer
+ XpKeyInfo unsafe.Pointer
+ Xai *int32
+ XpProgram unsafe.Pointer
+ XpTab unsafe.Pointer
+ XxAdvance func(*crt.TLS, unsafe.Pointer, *int32) int32
}
U [4]byte
-} // union{int32,*struct{},*int8,*int64,*float64,*struct{},*struct{},*struct{},*struct{},*struct{},*struct{},*int32,*struct{},*struct{},*func(*struct{},*int32)int32}
+} // union{i int32,p *struct{},z *int8,pI64 *int64,pReal *float64,pFunc *struct{},pCtx *struct{},pColl *struct{},pMem *struct{},pVtab *struct{},pKeyInfo *struct{},ai *int32,pProgram *struct{},pTab *struct{},xAdvance *func(*struct{},*int32)int32}
-type t46 struct {
+type t243 struct {
X [0]struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int32
- X3 unsafe.Pointer
+ XpCursor unsafe.Pointer
+ XpVCur unsafe.Pointer
+ XpseudoTableReg int32
+ XpSorter unsafe.Pointer
}
U [4]byte
-} // union{*struct{},*struct{},int32,*struct{}}
+} // union{pCursor *struct{},pVCur *struct{},pseudoTableReg int32,pSorter *struct{}}
-type t47 struct {
- X0 unsafe.Pointer
- X1 *uint8
- X2 int32
-} // struct{*struct{},*uint8,int32}
+type t89 struct {
+ XpList unsafe.Pointer
+ XaMemory *uint8
+ XszPMA int32
+} // struct{pList *struct{},aMemory *uint8,szPMA int32}
-type t73 struct {
- X0 int32
- X1 *int8
-} // struct{int32,*int8}
+type t117 struct {
+ XiFrom int32
+ XzCol *int8
+} // struct{iFrom int32,zCol *int8}
-type t48 struct {
+type t258 struct {
X [0]struct {
- X0 unsafe.Pointer
- X1 int32
+ XpNext unsafe.Pointer
+ XiNext int32
}
U [4]byte
-} // union{*struct{},int32}
+} // union{pNext *struct{},iNext int32}
-type t23 struct {
- X0 int64
- X1 unsafe.Pointer
-} // struct{int64,*struct{}}
+type t262 struct {
+ XiOffset int64
+ XpChunk unsafe.Pointer
+} // struct{iOffset int64,pChunk *struct{}}
-type t58 struct {
+type t265 struct {
X [0]struct {
- X0 unsafe.Pointer
- X1 int32
- X2 int32
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 unsafe.Pointer
- X6 *int32
- X7 unsafe.Pointer
- X8 unsafe.Pointer
- X9 unsafe.Pointer
- X10 unsafe.Pointer
+ XpNC unsafe.Pointer
+ Xn int32
+ XiCur int32
+ XpSrcList unsafe.Pointer
+ XpSrcCount unsafe.Pointer
+ XpCCurHint unsafe.Pointer
+ XaiCol *int32
+ XpIdxCover unsafe.Pointer
+ XpIdxTrans unsafe.Pointer
+ XpGroupBy unsafe.Pointer
+ XpHavingCtx unsafe.Pointer
}
U [4]byte
-} // union{*struct{},int32,int32,*struct{},*struct{},*struct{},*int32,*struct{},*struct{},*struct{},*struct{}}
+} // union{pNC *struct{},n int32,iCur int32,pSrcList *struct{},pSrcCount *struct{},pCCurHint *struct{},aiCol *int32,pIdxCover *struct{},pIdxTrans *struct{},pGroupBy *struct{},pHavingCtx *struct{}}
-type t78 struct {
- X0 *int8
- X1 *int8
-} // struct{*int8,*int8}
+type t128 struct {
+ XzName *int8
+ XzCols *int8
+} // struct{zName *int8,zCols *int8}
-type t79 struct {
- X0 *uint32
- X1 *uint32
-} // struct{*uint32,*uint32}
+type t277 struct {
+ XanEq *uint32
+ XanDLt *uint32
+} // struct{anEq *uint32,anDLt *uint32}
-type t63 struct {
+type t286 struct {
X [0]struct {
- X0 int32
- X1 unsafe.Pointer
- X2 unsafe.Pointer
+ XleftColumn int32
+ XpOrInfo unsafe.Pointer
+ XpAndInfo unsafe.Pointer
}
U [4]byte
-} // union{int32,*struct{},*struct{}}
+} // union{leftColumn int32,pOrInfo *struct{},pAndInfo *struct{}}
+
+type t114 struct {
+ XnIn int32
+ XaInLoop unsafe.Pointer
+} // struct{nIn int32,aInLoop *struct{}}
-type t70 struct {
+type t290 struct {
X [0]struct {
- X0 struct {
- X0 int32
- X1 unsafe.Pointer
- }
- X1 unsafe.Pointer
+ Xin t114
+ XpCovidx unsafe.Pointer
}
U [8]byte
-} // union{struct{int32,*struct{}},*struct{}}
-
-type t77 struct {
- X0 uint8
- X1 uint8
- X2 uint8
-} // struct{uint8,uint8,uint8}
-
-type t61 struct {
- X0 uint16
- X1 uint16
- X2 uint16
- X3 uint16
- X4 unsafe.Pointer
-} // struct{uint16,uint16,uint16,uint16,*struct{}}
-
-type t66 struct {
- X0 int32
- X1 uint8
- X2 int8
- X3 uint16
- X4 *int8
-} // struct{int32,uint8,int8,uint16,*int8}
-
-type t62 struct {
+} // union{in struct{nIn int32,aInLoop *struct{}},pCovidx *struct{}}
+
+type t124 struct {
+ Xi uint8
+ XnChar uint8
+ Xcode uint8
+} // struct{i uint8,nChar uint8,code uint8}
+
+type t101 struct {
+ XnEq uint16
+ XnBtm uint16
+ XnTop uint16
+ XnIdxCol uint16
+ XpIndex unsafe.Pointer
+} // struct{nEq uint16,nBtm uint16,nTop uint16,nIdxCol uint16,pIndex *struct{}}
+
+type t105 struct {
+ XidxNum int32
+ XneedFree uint8
+ XisOrdered int8
+ XomitMask uint16
+ XidxStr *int8
+} // struct{idxNum int32,needFree uint8,isOrdered int8,omitMask uint16,idxStr *int8}
+
+type t313 struct {
X [0]struct {
- X0 struct {
- X0 uint16
- X1 uint16
- X2 uint16
- X3 uint16
- X4 unsafe.Pointer
- }
- X1 struct {
- X0 int32
- X1 uint8
- X2 int8
- X3 uint16
- X4 *int8
- }
+ Xbtree t101
+ Xvtab t105
}
U [12]byte
-} // union{struct{uint16,uint16,uint16,uint16,*struct{}},struct{int32,uint8,int8,uint16,*int8}}
-
-type t35 struct {
- X0 uint8
- X1 uint8
-} // struct{uint8,uint8}
-
-type t80 struct {
- X0 int32
- X1 uint32
-} // struct{int32,uint32}
+} // union{btree struct{nEq uint16,nBtm uint16,nTop uint16,nIdxCol uint16,pIndex *struct{}},vtab struct{idxNum int32,needFree uint8,isOrdered int8,omitMask uint16,idxStr *int8}}
+
+type t51 struct {
+ Xa int32
+ Xb unsafe.Pointer
+} // struct{a int32,b *struct{}}
+
+type t55 struct {
+ XpLimit unsafe.Pointer
+ XpOffset unsafe.Pointer
+} // struct{pLimit *struct{},pOffset *struct{}}
+
+type t54 struct {
+ Xvalue int32
+ Xmask int32
+} // struct{value int32,mask int32}
+
+type t53 struct {
+ Xlhs uint8
+ Xnrhs uint8
+} // struct{lhs uint8,nrhs uint8}
+
+type t132 struct {
+ Xop int32
+ Xmask uint32
+} // struct{op int32,mask uint32}
func str(n int) *int8 { return (*int8)(unsafe.Pointer(&strTab[n])) }
func wstr(n int) *int32 { return (*int32)(unsafe.Pointer(&strTab[n])) }
-var strTab = []byte("\x00%s:%i: assertion failure in %s: %s\x0a\x00../../../sqlite.org/sqlite-amalgamation-3190300/sqlite3.c\x00rc==SQLITE_OK || pStmt==0\x00azCols[i]!=0\x00(rc&db->errMask)==rc\x00NULL\x00unopened\x00API call with %s database connection pointer\x00%\x00width>=0\x00precision>=(-1)\x00NaN\x00Inf\x00precision>0\x00bufpt>zOut\x00(NULL)\x00bArgList==0\x00k>=0 && k<pSrc->nSrc\x00.\x00xtype==etINVALID\x00z!=0 || N==0\x00p->zText!=0 || p->nChar==0 || p->accError\x00N>=0\x00p->accError==0 || p->nAlloc==0\x00p->zText\x00sqlite3StrAccumAppend\x00(p->zText==0 || p->zText==p->zBase)==!isMalloced(p)\x00p->nChar+(i64)N >= p->nAlloc\x00p->zText!=0 || p->nChar==0\x00sqlite3StrAccumEnlarge\x00eError==STRACCUM_NOMEM || eError==STRACCUM_TOOBIG\x00setStrAccumError\x00sqlite3StrAccumReset\x00db==0 || sqlite3_mutex_held(db->mutex)\x00p==0 || sqlite3GlobalConfig.mutex.xMutexHeld\x00sqlite3_mutex_held\x00sqlite3DbFree\x00p!=0\x00db!=0 || sqlite3MemdebugNoType(p, MEMTYPE_LOOKASIDE)\x00sqlite3DbFreeNN\x00sqlite3_mutex_held(db->mutex)\x00sqlite3DbMallocSize\x00sqlite3GlobalConfig.mutex.xMutexEnter\x00sqlite3_mutex_enter\x00op>=0 && op<ArraySize(statMutex)\x00sqlite3_mutex_held(statMutex[op] ? sqlite3Pcache1Mutex() : sqlite3MallocMutex())\x00op>=0 && op<ArraySize(wsdStat.nowValue)\x00sqlite3StatusDown\x00sqlite3GlobalConfig.mutex.xMutexLeave\x00sqlite3_mutex_leave\x00db!=0\x00sqlite3DbRealloc\x00db->pnBytesFreed==0\x00db->mallocFailed==0\x00sqlite3DbMallocRawNN\x00dbMallocRawFinish\x00EIGHT_BYTE_ALIGNMENT(p)\x00sqlite3_mutex_held(mem0.mutex)\x00n>0\x00mallocWithAlarm\x00X>=0\x00op==SQLITE_STATUS_MALLOC_SIZE || op==SQLITE_STATUS_PAGECACHE_SIZE || op==SQLITE_STATUS_SCRATCH_SIZE || op==SQLITE_STATUS_PARSER_STACK\x00sqlite3StatusHighwater\x00sqlite3StatusValue\x00sqlite3StatusUp\x00sqlite3Malloc\x00dbReallocFinish\x00sqlite3GlobalConfig.nRefInitMutex==0\x00sqlite3IsNaN(y)\x00sqlite3GlobalConfig.mutex.xMutexInit\x00misuse\x00%s at line %d of [%.10s]\x002017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b\x00p->nRef==0\x00pthreadMutexFree\x00p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p)\x00p->nRef>0 || p->owner==0\x00enter mutex %p (%d) with nRef=%d\x0a\x00pthreadMutexEnter\x00pthreadMutexTry\x00pthreadMutexHeld(p)\x00p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE\x00leave mutex %p (%d) with nRef=%d\x0a\x00pthreadMutexLeave\x00p->cnt==0\x00debugMutexFree\x00p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX)\x00debugMutexEnter\x00debugMutexTry\x00debugMutexHeld(pX)\x00debugMutexLeave\x00sqlite3MutexInit\x00GLOBAL(int, mutexIsInit)\x00sqlite3GlobalConfig.mutex.xMutexAlloc\x00sqlite3MutexAlloc\x00pcache1.isInit==0\x00pcache1Init\x00pcache1.isInit!=0\x00pcache1Shutdown\x00(szPage & (szPage-1))==0 && szPage>=512 && szPage<=65536\x00szExtra < 300\x00(pGroup)->mutex==0\x00pcache1Create\x00sqlite3_mutex_held(p->pGroup->mutex)\x00(p->pGroup)->mutex==0\x00pcache1ResizeHash\x00pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0)\x00pGroup->nMaxPage >= pCache->nMax\x00pGroup->nMinPage >= pCache->nMin\x00pcache1Destroy\x00sqlite3_mutex_held(pCache->pGroup->mutex)\x00pCache->iMaxKey >= iLimit\x00pCache->nHash > 0\x00h<pCache->nHash\x00nPage<0 || pCache->nPage==(unsigned)nPage\x00pcache1TruncateUnsafe\x00pPage!=0\x00pPage->isPinned==0\x00pPage->pLruNext\x00pPage->pLruPrev\x00pPage->isAnchor==0\x00pCache->pGroup->lru.isAnchor==1\x00pcache1PinPage\x00sqlite3_mutex_held(p->pCache->pGroup->mutex)\x00pcache1FreePage\x00pcache1.nFreeSlot<=pcache1.nSlot\x00pcache1Free\x00sqlite3_mutex_held(pGroup->mutex)\x00p->pCache->pGroup==pGroup\x00p->isPinned==0\x00pcache1EnforceMaxPage\x00pcache1RemoveFromHash\x00pcache1Cachesize\x00(pCache->pGroup)->mutex==0\x00pcache1Pagecount\x00pCache->bPurgeable || createFlag!=1\x00pCache->bPurgeable || pCache->nMin==0\x00pCache->bPurgeable==0 || pCache->nMin==10\x00pCache->nMin==0 || pCache->bPurgeable\x00pCache->nHash>0\x00pcache1Fetch\x00pCache->nPage >= pCache->nRecyclable\x00pGroup->mxPinned == pGroup->nMaxPage + 10 - pGroup->nMinPage\x00pCache->n90pct == pCache->nMax*9/10\x00pCache->nHash>0 && pCache->apHash\x00pcache1FetchStage2\x00pcache1AllocPage\x00sqlite3_mutex_notheld(pcache1.grp.mutex)\x00pcache1.nFreeSlot>=0\x00p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld\x00sqlite3_mutex_notheld\x00pcache1Alloc\x00pPage->pCache==pCache\x00pPage->pLruPrev==0 && pPage->pLruNext==0\x00pPage->isPinned==1\x00pcache1Unpin\x00pPage->iKey==iOld\x00pcache1Rekey\x00pcache1Truncate\x00pcache1Shrink\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00pPrior!=0\x00sqlite3MemSize\x00OOM\x00pOther!=&aDef[i] && pOther->pNext!=&aDef[i]\x00sqlite3InsertBuiltinFuncs\x00sqlite_rename_table\x00sqlite_rename_trigger\x00sqlite_rename_parent\x00len>0\x00%.*s\"%w\"%s\x00pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex)\x00(enc&3)==(enc&~SQLITE_UTF16_ALIGNED)\x00(pVal->flags & MEM_RowSet)==0\x00sqlite3ValueText\x00pVal!=0\x00(pVal->flags & (MEM_Null))==0\x00(pVal->flags & (MEM_Ephem|MEM_Static))!=0\x000==(1&SQLITE_PTR_TO_INT(pVal->z))\x00pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0 || pVal->db->mallocFailed\x00valueToText\x00pMem->flags & MEM_Zero\x00pMem->flags&MEM_Blob\x00(pMem->flags&MEM_RowSet)==0\x00pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex)\x00sqlite3VdbeMemExpandBlob\x00sqlite3VdbeCheckMemInvariants(pMem)\x00bPreserve==0 || pMem->flags&(MEM_Blob|MEM_Str)\x00pMem->szMalloc==0 || pMem->szMalloc==sqlite3DbMallocSize(pMem->db, pMem->zMalloc)\x000\x00pMem->xDel!=0 && pMem->xDel!=SQLITE_DYNAMIC\x00(p->flags & MEM_Dyn)==0 || p->xDel!=0\x00(p->flags & MEM_Dyn)==0 || p->szMalloc==0\x00(p->flags & (MEM_Int|MEM_Real))!=(MEM_Int|MEM_Real)\x00(p->flags & MEM_Null)==0 || (p->flags & (MEM_Int|MEM_Real|MEM_Str|MEM_Blob))==0\x00p->szMalloc==0 || p->szMalloc==sqlite3DbMallocSize(p->db,p->zMalloc)\x00((p->szMalloc>0 && p->z==p->zMalloc)? 1 : 0) + ((p->flags&MEM_Dyn)!=0 ? 1 : 0) + ((p->flags&MEM_Ephem)!=0 ? 1 : 0) + ((p->flags&MEM_Static)!=0 ? 1 : 0) == 1\x00sqlite3VdbeCheckMemInvariants\x00sqlite3VdbeMemGrow\x00p->db==0 || sqlite3_mutex_held(p->db->mutex)\x00VdbeMemDynamic(p)\x00(p->flags & MEM_Agg)==0\x00(p->flags&MEM_RowSet)==0\x00p->xDel!=SQLITE_DYNAMIC && p->xDel!=0\x00vdbeMemClearExternAndSetNull\x00(pMem->flags & MEM_Null)!=0 || pFunc==pMem->u.pDef\x00(pMem->flags & MEM_Dyn)==0\x00sqlite3VdbeMemFinalize\x00desiredEnc==SQLITE_UTF8 || desiredEnc==SQLITE_UTF16LE || desiredEnc==SQLITE_UTF16BE\x00rc==SQLITE_OK || rc==SQLITE_NOMEM\x00rc==SQLITE_OK || pMem->enc!=desiredEnc\x00rc==SQLITE_NOMEM || pMem->enc==desiredEnc\x00sqlite3VdbeChangeEncoding\x00pMem->flags&MEM_Str\x00pMem->enc!=desiredEnc\x00pMem->enc!=0\x00pMem->n>=0\x00rc==SQLITE_NOMEM\x00desiredEnc==SQLITE_UTF16BE\x00desiredEnc==SQLITE_UTF8\x00(pMem->n+(desiredEnc==SQLITE_UTF8?1:2))<=len\x00sqlite3VdbeMemTranslate\x00sqlite3VdbeMemMakeWriteable\x00sqlite3VdbeCheckMemInvariants(p)\x00sqlite3VdbeMemRelease\x00sqlite3VdbeMemNulTerminate\x00!(fg&MEM_Zero)\x00!(fg&(MEM_Str|MEM_Blob))\x00fg&(MEM_Int|MEM_Real)\x00EIGHT_BYTE_ALIGNMENT(pMem)\x00%lld\x00fg & MEM_Real\x00%!.15g\x00sqlite3VdbeMemStringify\x00szNew>0\x00(pMem->flags & MEM_Dyn)==0 || pMem->szMalloc==0\x00sqlite3VdbeMemClearAndResize\x00p && p->pOut\x00sqlite3_context_db_handle\x00renameTableFunc\x00sqlite3VMPrintf\x00(p->zText==p->zBase)==!isMalloced(p)\x00sqlite3StrAccumFinish\x00p->mxAlloc>0 && !isMalloced(p)\x00strAccumFinishRealloc\x00sqlite3_mutex_held(pCtx->pOut->db->mutex)\x00sqlite3_result_text\x00(pMem->flags & MEM_RowSet)==0\x00enc!=0\x00sqlite3VdbeMemSetStr\x00sqlite3VdbeMemHandleBom\x00string or blob too big\x00sqlite3_result_error_toobig\x00renameTriggerFunc\x00%s%.*s\"%w\"\x00%s%s\x00(n&0x7fffffff)==n\x00sqlite3DbStrNDup\x00z[i]\x00sqlite3Dequote\x00julianday\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00p->pVdbe!=0\x00sqlite3StmtCurrentTime\x00sqlite3VdbeRealValue\x00enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE\x00e>=342\x00sqlite3AtoF\x00now\x0040f-21a-21d\x00zFormat[2]>='a' && zFormat[2]<='f'\x00getDigits\x0020c:20e\x0020e\x0020b:20e\x00(p->flags & MEM_Null)==0 || (p->flags & (MEM_Str|MEM_Blob))==0\x00sqlite3ValueBytes\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00local time unavailable\x00sqlite3_result_error\x00second\x00minute\x00hour\x00sqlite3_result_double\x00%04d-%02d-%02d\x00%02d:%02d:%02d\x00%04d-%02d-%02d %02d:%02d:%02d\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%04d\x00sqlite3_result_error_nomem\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00affinity\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00length\x00instr\x00printf\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00like\x00coalesce\x00not authorized\x00sqlite3_extension_init\x00%s.%s\x00unable to open shared library [%s]\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00so\x00p && p->pFunc && p->pFunc->xFinalize\x00sqlite3_mutex_held(p->pOut->db->mutex)\x00sqlite3_aggregate_context\x00(pMem->flags & MEM_Agg)==0\x00createAggContext\x00p && p->pMem && p->pFunc && p->pFunc->xFinalize\x00sqlite3_aggregate_count\x00bind on a busy prepared statement: [%s]\x00p->isPrepareV2 || p->expmask==0\x00API called with NULL prepared statement\x00API called with finalized prepared statement\x00sqlite3Error\x00vdbeUnbind\x00sqlite3ApiExit\x00db->lookaside.bDisable>0\x00sqlite3OomClear\x00count>=0\x00sqliteDefaultBusyCallback\x00unable to close due to unfinalized statements or unfinished backups\x00invalid\x00btreeEnterAll\x00p->pNext==0 || p->pNext->pBt>p->pBt\x00p->pPrev==0 || p->pPrev->pBt<p->pBt\x00p->pNext==0 || p->pNext->db==p->db\x00p->pPrev==0 || p->pPrev->db==p->db\x00p->sharable || (p->pNext==0 && p->pPrev==0)\x00!p->locked || p->wantToLock>0\x00p->sharable || p->wantToLock==0\x00sqlite3_mutex_held(p->db->mutex)\x00(p->locked==0 && p->sharable) || p->pBt->db==p->db\x00sqlite3BtreeEnter\x00pLater->sharable\x00pLater->pNext==0 || pLater->pNext->pBt>pLater->pBt\x00!pLater->locked || pLater->wantToLock>0\x00sqlite3GlobalConfig.mutex.xMutexTry\x00sqlite3_mutex_try\x00btreeLockCarefully\x00p->locked==1\x00sqlite3_mutex_held(pBt->mutex)\x00p->db==pBt->db\x00unlockBtreeMutex\x00p->locked==0\x00sqlite3_mutex_notheld(p->pBt->mutex)\x00lockBtreeMutex\x00IsVirtual(p)\x00sqlite3BtreeHoldsAllMutexes(db)\x00sqlite3VtabDisconnect\x00db\x00pVTab->nRef>0\x00db->magic==SQLITE_MAGIC_OPEN || db->magic==SQLITE_MAGIC_ZOMBIE\x00sqlite3VtabUnlock\x00sqlite3VtabUnlockList\x00btreeLeaveAll\x00p->wantToLock>0\x00sqlite3BtreeLeave\x00connectionIsBusy\x00p\x00sqlite3BtreeIsInBackup\x00sqlite3ErrorWithMsg\x00db->nDb<=2\x00db->aDb==db->aDbStatic\x00db->lookaside.nOut==0\x00sqlite3RollbackAll\x00p==0 || sqlite3_mutex_held(p->db->mutex)\x00sqlite3BtreeIsInTrans\x00writeOnly==1 || writeOnly==0\x00tripCode==SQLITE_ABORT_ROLLBACK || tripCode==SQLITE_OK\x00rc==SQLITE_OK || (writeOnly==0 && rc2==SQLITE_OK)\x00p->pBt->inTransaction!=TRANS_NONE || p->pBt->nTransaction==0\x00p->pBt->inTransaction>=p->inTrans\x00TRANS_WRITE==pBt->inTransaction\x00countValidCursors(pBt, 1)==0\x00sqlite3BtreeRollback\x00pExcept==0 || pExcept->pBt==pBt\x00saveAllCursors\x00CURSOR_VALID==pCur->eState || CURSOR_SKIPNEXT==pCur->eState\x000==pCur->pKey\x00cursorHoldsMutex(pCur)\x00saveCursorPosition\x00CURSOR_VALID==pCur->eState\x00!pCur->curIntKey || !pCur->pKey\x00saveCursorKey\x00pCur->eState==CURSOR_VALID\x00pCur->curIntKey\x00sqlite3BtreeIntegerKey\x00CORRUPT_DB || memcmp(&info, &pCur->info, sizeof(info))==0\x00assertCellInfo\x00sqlite3BtreePayloadSize\x00pCur->iPage>=0 && pCur->apPage[pCur->iPage]\x00pCur->ix<pCur->apPage[pCur->iPage]->nCell\x00sqlite3BtreePayload\x00pPage\x00eOp==0 || eOp==1\x00pCur->ix<pPage->nCell\x00offset+amt <= pCur->info.nPayload\x00aPayload > pPage->aData\x00rc==SQLITE_OK && amt>0\x00pCur->aOverflow[iIdx]==0 || pCur->aOverflow[iIdx]==nextPage || CORRUPT_DB\x00pCur->curFlags & BTCF_ValidOvfl\x00pCur->pBtree->db==pBt->db\x00accessPayload\x00database corruption\x00(pPg->flags & PGHDR_MMAP)==0\x00pPager->eState>=PAGER_WRITER_LOCKED\x00assert_pager_state(pPager)\x00pPager->tempFile==0\x00sqlite3PagerWrite\x00p->eState==PAGER_OPEN || p->eState==PAGER_READER || p->eState==PAGER_WRITER_LOCKED || p->eState==PAGER_WRITER_CACHEMOD || p->eState==PAGER_WRITER_DBMOD || p->eState==PAGER_WRITER_FINISHED || p->eState==PAGER_ERROR\x00p->tempFile==0 || p->eLock==EXCLUSIVE_LOCK\x00p->tempFile==0 || pPager->changeCountDone\x00p->journalMode==PAGER_JOURNALMODE_OFF || p->useJournal\x00p->journalMode!=PAGER_JOURNALMODE_OFF || !isOpen(p->jfd)\x00!isOpen(p->fd)\x00p->noSync\x00p->journalMode==PAGER_JOURNALMODE_OFF || p->journalMode==PAGER_JOURNALMODE_MEMORY\x00p->eState!=PAGER_ERROR && p->eState!=PAGER_OPEN\x00pagerUseWal(p)==0\x00pPager->changeCountDone==0 || pPager->eLock>=RESERVED_LOCK\x00p->eLock!=PENDING_LOCK\x00!MEMDB\x00pPager->errCode==SQLITE_OK\x00sqlite3PcacheRefCount(pPager->pPCache)==0 || pPager->tempFile\x00p->eLock!=UNKNOWN_LOCK\x00p->eLock>=SHARED_LOCK\x00p->eLock>=RESERVED_LOCK\x00pPager->dbSize==pPager->dbOrigSize\x00pPager->dbOrigSize==pPager->dbFileSize\x00pPager->dbOrigSize==pPager->dbHintSize\x00pPager->setMaster==0\x00isOpen(p->jfd) || p->journalMode==PAGER_JOURNALMODE_OFF || p->journalMode==PAGER_JOURNALMODE_WAL\x00p->eLock==EXCLUSIVE_LOCK\x00!pagerUseWal(pPager)\x00p->eLock>=EXCLUSIVE_LOCK\x00pPager->dbOrigSize<=pPager->dbHintSize\x00pPager->errCode!=SQLITE_OK\x00sqlite3PcacheRefCount(pPager->pPCache)>0 || pPager->tempFile\x00assert_pager_state\x00sqlite3BitvecTestNotNull\x00pPager->useJournal\x00isOpen(pPager->jfd) || pagerUseWal(pPager)\x00isOpen(pPager->sjfd) || pPager->nSubRec==0\x00pagerUseWal(pPager) || pageInJournal(pPager, pPg) || pPg->pgno>pPager->dbOrigSize\x00pPager->nSavepoint>0\x00subjournalPage\x00MEMJOURNAL_DFLT_FILECHUNKSIZE==fileChunkSize(p->nChunkSize)\x00rc==SQLITE_OK || pFile->pMethods==0\x00sqlite3OsOpen\x00sqlite3JournalOpen\x00(iAmt+iOfst)<=p->endpoint.iOffset\x00p->readpoint.iOffset==0 || p->readpoint.pChunk!=0\x00pChunk!=0\x00memjrnlRead\x00iOfst==p->endpoint.iOffset || iOfst==0\x00iOfst>0 || p->pFirst==0\x00p->pFirst\x00!p->pFirst\x00memjrnlWrite\x00I/O OOM error\x00memjrnlTruncate\x00i>0\x00i<=p->iSize\x00sqlite3BitvecSet\x00addToSavepointBitvecs\x00(pPager->doNotSpill & SPILLFLAG_NOSYNC)==0\x00nPage>0\x00pg1<=pPg->pgno\x00(pg1+nPage)>pPg->pgno\x00(pPager->doNotSpill & SPILLFLAG_NOSYNC)!=0\x00pagerWriteLargeSector\x00pPager->eState==PAGER_WRITER_LOCKED || pPager->eState==PAGER_WRITER_CACHEMOD || pPager->eState==PAGER_WRITER_DBMOD\x00pPager->errCode==0\x00pPager->readOnly==0\x00pPager->eState>=PAGER_WRITER_CACHEMOD\x00(pPager->pInJournal!=0) == isOpen(pPager->jfd)\x00pagerUseWal(pPager)==0\x00pager_write\x00pPager->eState==PAGER_WRITER_LOCKED\x00pPager->pInJournal==0\x00rc!=SQLITE_OK || isOpen(pPager->jfd)\x00pager_open_journal\x00pPager->zFilename && pPager->zFilename[0]\x00databaseIsUnmoved\x00isOpen(pPager->jfd)\x00isOpen(pPager->fd) || pPager->noSync\x00pPager->journalHdr <= pPager->journalOff\x00writeJournalHdr\x00offset%JOURNAL_HDR_SZ(pPager)==0\x00offset>=c\x00(offset-c)<JOURNAL_HDR_SZ(pPager)\x00journalHdrOffset\x00N>0\x00sqlite3_randomness\x00p->nRef>0\x00sqlite3PcachePageSanity(p)\x00(p->flags & (PGHDR_DIRTY|PGHDR_CLEAN))==PGHDR_DIRTY\x00sqlite3PcacheMakeDirty\x00pPg!=0\x00pPg->pgno>0 || pPg->pPager==0\x00pCache!=0\x00(pPg->flags & PGHDR_DIRTY)==0\x00pCache->pDirty!=pPg\x00pCache->pDirtyTail!=pPg\x00pPg->flags & PGHDR_DIRTY\x00sqlite3PcachePageSanity\x00pPage->pDirtyNext || pPage==p->pDirtyTail\x00pPage->pDirtyPrev || pPage==p->pDirty\x00pPage==p->pDirtyTail\x00pPage==p->pDirty\x00p->bPurgeable || p->eCreate==2\x00p->bPurgeable==0 || p->eCreate==1\x00pPage->pDirtyNext==0 && pPage->pDirtyPrev==0 && p->pDirty!=pPage\x00pPage->pDirtyNext->pDirtyPrev==0\x00p->eCreate==2\x00pcacheManageDirtyList\x00pPg->pgno!=PAGER_MJ_PGNO(pPager)\x00pPager->journalHdr<=pPager->journalOff\x00pPager->pInJournal!=0\x00pagerAddPageToRollbackJournal\x00sqlite3PagerUnrefNotNull\x00pPager->fd->pMethods->iVersion>=3\x00pagerReleaseMapPage\x00sqlite3PcacheRelease\x00pPager->eState==PAGER_READER\x00pagerUnlockAndRollback\x00pPager->eState==PAGER_READER || rc!=SQLITE_OK\x00rc==SQLITE_OK || rc==SQLITE_FULL || rc==SQLITE_CORRUPT || rc==SQLITE_NOMEM || (rc&0xFF)==SQLITE_IOERR || rc==SQLITE_CANTOPEN\x00sqlite3PagerRollback\x00op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK\x00iSavepoint>=0 || op==SAVEPOINT_ROLLBACK\x00rc==SQLITE_OK\x00rc!=SQLITE_DONE\x00sqlite3PagerSavepoint\x00pPager->eState!=PAGER_ERROR\x00pagerUseWal(pPager)==0 || szJ==0\x00rc!=SQLITE_OK || pPager->journalOff>=szJ\x00offset==(i64)ii*(4+pPager->pageSize)\x00pagerPlaybackSavepoint\x00walFramePgno(pWal, iFrame)!=1\x00sqlite3WalUndo\x00pWal->nWiData>0 && pWal->apWiData[0]\x00walIndexHdr\x00(iHash==0 || iFrame>HASHTABLE_NPAGE_ONE) && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE) && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)) && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE) && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))\x00walFramePage\x00pWal->writeLock\x00pWal->nWiData>walFramePage(pWal->hdr.mxFrame)\x00pWal->apWiData[walFramePage(pWal->hdr.mxFrame)]\x00iLimit>0\x00walCleanupHash\x00rc==SQLITE_OK || iHash>0\x00iPage==0 || *ppPage || rc!=SQLITE_OK\x00walIndexPage\x00walHashGet\x00pagerUseWal(pPager)\x00pagerUndoCallback\x00pPager!=0\x00pgno!=0\x00pPager->pPCache!=0\x00pPage==0 || pPager->hasHeldSharedLock\x00sqlite3PagerLookup\x00pCache->pCache!=0\x00createFlag==3 || createFlag==0\x00pCache->eCreate==((pCache->bPurgeable && pCache->pDirty) ? 1 : 2)\x00eCreate==0 || eCreate==1 || eCreate==2\x00createFlag==0 || pCache->eCreate==eCreate\x00createFlag==0 || eCreate==1+(!pCache->bPurgeable||!pCache->pDirty)\x00sqlite3PcacheFetch\x00sqlite3PcachePageSanity(pPgHdr)\x00sqlite3PcacheFetchFinish\x00pPgHdr->pPage==0\x00pcacheFetchFinishWithInit\x00p->nRef==1\x00sqlite3PcacheDrop\x00pWal->readLock>=0 || pWal->lockError\x00iFrame>iRead || CORRUPT_DB\x00sqlite3WalFindFrame\x00iPage>0\x00walHash\x00pPager->eState>=PAGER_READER && !MEMDB\x00isOpen(pPager->fd)\x00readDbPage\x00sqlite3_mutex_held(p->pSrc->pBt->mutex)\x00sqlite3BackupRestart\x00pcacheSortDirtyList\x00pA!=0 && pB!=0\x00pcacheMergeDirtyList\x00(isMainJrnl&~1)==0\x00(isSavepnt&~1)==0\x00isMainJrnl || pDone\x00isSavepnt || pDone==0\x00aData\x00pagerUseWal(pPager)==0 || (!isMainJrnl && isSavepnt)\x00pPager->eState>=PAGER_WRITER_CACHEMOD || (pPager->eState==PAGER_OPEN && pPager->eLock==EXCLUSIVE_LOCK)\x00pPager->eState>=PAGER_WRITER_CACHEMOD || isMainJrnl\x00!isSavepnt\x00pPg || !MEMDB\x00pPager->eState!=PAGER_OPEN || pPg==0 || pPager->tempFile\x00isSavepnt\x00(pPager->doNotSpill & SPILLFLAG_ROLLBACK)==0\x00(pPager->doNotSpill & SPILLFLAG_ROLLBACK)!=0\x00pager_playback_one_page\x00p->pDestDb\x00rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED\x00backupUpdate\x00isFatalError\x00sqlite3BtreeGetReserveNoMutex(p->pSrc)>=0\x00p->bDestLocked\x00!isFatalError(p->rc)\x00iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt)\x00zSrcData\x00sqlite3_mutex_held(p->pBt->mutex)\x00sqlite3BtreeGetReserveNoMutex\x00backupOnePage\x00pPg->nRef>0 || pPg->pPager->memDb\x00sqlite3PagerGetData\x00sqlite3BtreeHoldsMutex(p)\x00((p->pBt->nPage)&0x8000000)==0\x00p->sharable==0 || p->locked==0 || p->wantToLock>0\x00p->sharable==0 || p->locked==0 || p->db==p->pBt->db\x00p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->pBt->mutex)\x00p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->db->mutex)\x00sqlite3BtreeHoldsMutex\x00sqlite3BtreeLastPage\x00readJournalHdr\x00pageSize==0 || (pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE)\x00nReserve>=0 && nReserve<1000\x00sqlite3PagerSetPagesize\x00p->pgno>0\x00p->flags&PGHDR_DIRTY\x00sqlite3PcacheTruncate\x00(p->flags & PGHDR_CLEAN)==0\x00sqlite3PcacheMakeClean\x00pCache->nRefSum==0 && pCache->pDirty==0\x00sqlite3PcacheSetPageSize\x00getPageError\x00USEFETCH(pPager)\x00pPager->eState>=PAGER_READER\x00pPager->hasHeldSharedLock==1\x00getPageMMap\x00pPager->nExtra>=8\x00p->pExtra==(void *)&p[1]\x00p->pPage==0\x00p->flags==PGHDR_MMAP\x00p->pPager==pPager\x00pagerAcquireMapPage\x00pPg==(*ppPage)\x00pPg->pgno==pgno\x00pPg->pPager==pPager || pPg->pPager==0\x00pgno<=PAGER_MAX_PGNO && pgno!=PAGER_MJ_PGNO(pPager)\x00!isOpen(pPager->fd) || !MEMDB\x00pPg->pPager==pPager\x00rc!=SQLITE_OK\x00getPageNormal\x00sqlite3PcachePagecount\x00aWalData[3]!=pWal->nCkpt || aWalData[0]<=pWal->hdr.mxFrame\x00sqlite3WalSavepointUndo\x00isOpen(pPager->jfd) || pPager->pInJournal==0\x00sqlite3JournalIsInMemory(pPager->jfd)==0\x00pPager->journalMode==PAGER_JOURNALMODE_DELETE || pPager->journalMode==PAGER_JOURNALMODE_MEMORY || pPager->journalMode==PAGER_JOURNALMODE_WAL\x00rc2==SQLITE_OK\x00pPager->eLock==EXCLUSIVE_LOCK\x00pager_end_transaction\x00!sqlite3JournalIsInMemory(pPager->jfd)\x00zeroJournalHdr\x00dirSync==0 || dirSync==1\x00sqlite3OsDelete\x00pPager->eState!=PAGER_READER\x00pager_truncate\x00pWal->writeLock==0\x00pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE || op==-1\x00pWal->readLock>=0 || (op<=0 && pWal->exclusiveMode==0)\x00pWal->exclusiveMode==0\x00pWal->readLock>=0\x00sqlite3WalExclusiveMode\x00!pPager->exclusiveMode || pPager->eLock==eLock\x00eLock==NO_LOCK || eLock==SHARED_LOCK\x00eLock!=NO_LOCK || pagerUseWal(pPager)==0\x00pPager->eLock>=eLock\x00pagerUnlockDb\x00pPager->journalOff==JOURNAL_HDR_SZ(pPager)\x00recovered %d pages from %s\x00pager_playback\x00sqlite3PagerSync\x00!isOpen(pJournal)\x00pager_delmaster\x00isOpen(pPager->fd) || pPager->tempFile\x00setSectorSize\x00rc==SQLITE_OK || !MEMDB\x00pPager->errCode==SQLITE_FULL || pPager->errCode==SQLITE_OK || (pPager->errCode & 0xff)==SQLITE_IOERR\x00pager_error\x00pPager->eState==PAGER_READER || pPager->eState==PAGER_OPEN || pPager->eState==PAGER_ERROR\x00!isOpen(pPager->jfd)\x00pPager->errCode || pPager->eState!=PAGER_ERROR\x00pPager->errCode==SQLITE_OK || !MEMDB\x00pager_unlock\x00EIGHT_BYTE_ALIGNMENT(pNew)\x00sqlite3Realloc\x00pPgnoNext\x00next==0 || rc==SQLITE_DONE\x00rc==SQLITE_OK || pPage==0\x00getOverflowPage\x00ptrmapPageno\x00offset <= (int)pBt->usableSize-5\x00pEType!=0\x00ptrmapGet\x00flags==0 || flags==PAGER_GET_NOCONTENT || flags==PAGER_GET_READONLY\x00btreeGetPage\x00pPage->aData==sqlite3PagerGetData(pDbPage)\x00btreePageFromDbPage\x00pPage->aData\x00pPage->pBt\x00pPage->pDbPage!=0\x00sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage\x00sqlite3PagerGetData(pPage->pDbPage)==pPage->aData\x00sqlite3_mutex_held(pPage->pBt->mutex)\x00releasePageNotNull\x00(writeOnly==0 || writeOnly==1) && BTCF_WriteFlag==1\x00sqlite3BtreeTripAllCursors\x00sqlite3BtreeClearCursor\x00pPager->eState!=PAGER_WRITER_FINISHED\x00sqlite3PagerPagecount\x00btreeEndTransaction\x00pLock->eLock==READ_LOCK || pLock->pBtree==p\x00downgradeAllSharedCacheTableLocks\x00p->sharable || 0==*ppIter\x00p->inTrans>0\x00(pBt->btsFlags & BTS_EXCLUSIVE)==0 || pBt->pWriter==pLock->pBtree\x00pLock->pBtree->inTrans>=pLock->eLock\x00pLock->iTable!=1 || pLock==&p->lock\x00(pBt->btsFlags & BTS_PENDING)==0 || pBt->pWriter\x00clearAllSharedCacheTableLocks\x00countValidCursors(pBt,0)==0 || pBt->inTransaction>TRANS_NONE\x00pPage1->aData\x00sqlite3PagerRefcount(pBt->pPager)==1\x00unlockBtreeIfUnused\x00pNew!=0\x00sqlite3HashInit\x00pH!=0\x00sqlite3HashClear\x00!ExprHasProperty(p, EP_IntValue) || p->u.iValue>=0\x00p->pLeft==0\x00p->pRight==0\x00p->x.pSelect==0\x00p->x.pList==0 || p->pRight==0\x00sqlite3ExprDeleteNN\x00pList->nExpr>0\x00exprListDeleteNN\x00pIndex->pSchema==pTable->pSchema || (IsVirtual(pTable) && pIndex->idxType!=SQLITE_IDXTYPE_APPDEF)\x00db==0 || sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema)\x00pOld==pIndex || pOld==0\x00nLookaside==0 || nLookaside==db->lookaside.nOut\x00deleteTable\x00pKey!=0\x00pH->htsize>0\x00sqlite3HashInsert\x00elem!=0\x00findElementWithHash\x00pEntry->count>=0\x00pH->first==0\x00pH->count==0\x00removeElementGivenHash\x00iDb>=0 && iDb<db->nDb\x00sqlite3SchemaMutexHeld\x00i>=0 && i<db->nDb\x00sqlite3SchemaToIndex\x00db==0 || IsVirtual(pTab) || sqlite3SchemaMutexHeld(db, 0, pTab->pSchema)\x00pFKey->isDeferred==0 || pFKey->isDeferred==1\x00sqlite3FkDelete\x00pTable!=0\x00sqlite3DeleteColumnNames\x00db==0 || sqlite3SchemaMutexHeld(db, 0, p->pSchema)\x00db2\x00!db || pRet\x00vtabDisconnectAll\x00p->wantToLock==0 && p->locked==0\x00!pBt->pCursor\x00p->wantToLock==0\x00sqlite3BtreeClose\x00pBt->pCursor!=0\x00sqlite3BtreeCloseCursor\x00sqlite3_mutex_notheld(pBt->mutex)\x00removeFromSharingList\x00sqlite3GlobalConfig.mutex.xMutexFree\x00sqlite3_mutex_free\x00db || pagerUseWal(pPager)==0\x00db || pPager->pWal==0\x00!pPager->aSavepoint && !pPager->pInJournal\x00!isOpen(pPager->jfd) && !isOpen(pPager->sjfd)\x00sqlite3PagerClose\x00pWal->ckptLock==0\x00eMode!=SQLITE_CHECKPOINT_PASSIVE || xBusy==0\x00sqlite3WalCheckpoint\x00pChanged\x00page0 || pWal->writeLock==0\x00badHdr==0 || pWal->writeLock==0\x00walIndexReadHdr\x00walIndexTryHdr\x00nByte>=8\x00(nByte&0x00000007)==0\x00walChecksumBytes\x00pWal->ckptLock==1 || pWal->ckptLock==0\x00recovered %d frames from WAL file %s\x00walIndexRecover\x00cannot open file\x00idx <= HASHTABLE_NSLOT/2 + 1\x00!aPgno[idx]\x00walIndexAppend\x00walIndexWriteHdr\x00walCkptInfo\x00pIter\x00y<=pWal->hdr.mxFrame\x00walFramePgno(pWal, iFrame)==iDbpage\x00pInfo->nBackfill==pWal->hdr.mxFrame\x00pWal->ckptLock && pWal->hdr.mxFrame>0\x00walIteratorInit\x00nList<=HASHTABLE_NPAGE && nList>0\x00iSub<ArraySize(aSub)\x00p->aList && p->nList<=(1<<iSub)\x00p->aList==&aList[iList&~((2<<iSub)-1)]\x00p->nList<=(1<<iSub)\x00p->aList==&aList[nList&~((2<<iSub)-1)]\x00aMerge==aList\x00aContent[aList[i]] > aContent[aList[i-1]]\x00walMergesort\x00nLeft>0 && nRight>0\x00iLeft>=nLeft || aContent[aLeft[iLeft]]>dbpage\x00iRight>=nRight || aContent[aRight[iRight]]>dbpage\x00walMerge\x00walCheckpoint\x00iMin<0xffffffff\x00walIteratorNext\x00pInfo->aReadMark[0]==0\x00walRestartHdr\x00cannot limit WAL size: %s\x00sqlite3PcacheClose\x00sqlite3LeaveMutexAndCloseZombie\x00sqlite3CloseExtensions\x00p->flags==MEM_Null && p->z==0\x00sqlite3_value_blob\x00pVm->db\x00columnMem\x00p->db!=0\x00columnMallocFailure\x00columnName\x00pMem->z || pMem->n==0\x00sqlite3VdbeIntValue\x00u<=LARGEST_INT64\x00u-1==LARGEST_INT64\x00sqlite3Atoi64\x00922337203685477580\x00create\x00trigger\x00temp\x00temporary\x00end\x00explain\x00!db->mallocFailed\x00sqlite3_create_collation_v2\x00unable to delete/modify collation sequence due to active statements\x00createCollation\x00enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE\x00pDel==0 || pDel==pColl\x00sqlite3HashFind\x00findCollSeqEntry\x00sqlite3FindCollSeq\x00sqlite3_create_collation16\x00(m.flags & MEM_Term)!=0 || db->mallocFailed\x00(m.flags & MEM_Str)!=0 || db->mallocFailed\x00m.z || db->mallocFailed\x00sqlite3Utf16to8\x00unable to delete/modify user-function due to active statements\x00p || db->mallocFailed\x00sqlite3CreateFunc\x00nArg>=(-2)\x00nArg>=(-1) || createFlag==0\x00sqlite3FindFunction\x00sqlite3_create_function_v2\x00sqlite3_create_function16\x00pDel==0 || pDel==pMod\x00sqlite3VtabCreateModule\x00IsVirtual(pTab)\x00pTab->pIndex==0\x00pIdx->pNext==0\x00%s\x00(rc&0xff)==rc\x00sqlite3_declare_vtab\x00zSql!=0\x00pzErrMsg!=0\x00pParse->pNewTable==0\x00pParse->pNewTrigger==0\x00pParse->nVar==0\x00pParse->pVList==0\x00tokenType==TK_SPACE || tokenType==TK_ILLEGAL\x00unrecognized token: \"%.*s\"\x00nErr==0\x00nErr==0 || pParse->rc!=SQLITE_OK\x00sqlite3RunParser\x00yypParser->yytos!=0\x00%sInput '%s'\x0a\x00yyact == YY_ERROR_ACTION\x00%sSyntax Error!\x0a\x00%sReturn. Stack=\x00%c%s\x00]\x0a\x00sqlite3Parser\x00$\x00SEMI\x00EXPLAIN\x00QUERY\x00PLAN\x00BEGIN\x00TRANSACTION\x00DEFERRED\x00IMMEDIATE\x00EXCLUSIVE\x00COMMIT\x00END\x00ROLLBACK\x00SAVEPOINT\x00RELEASE\x00TO\x00TABLE\x00CREATE\x00IF\x00NOT\x00EXISTS\x00TEMP\x00LP\x00RP\x00AS\x00WITHOUT\x00COMMA\x00ID\x00ABORT\x00ACTION\x00AFTER\x00ANALYZE\x00ASC\x00ATTACH\x00BEFORE\x00BY\x00CASCADE\x00CAST\x00COLUMNKW\x00CONFLICT\x00DATABASE\x00DESC\x00DETACH\x00EACH\x00FAIL\x00FOR\x00IGNORE\x00INITIALLY\x00INSTEAD\x00LIKE_KW\x00MATCH\x00NO\x00KEY\x00OF\x00OFFSET\x00PRAGMA\x00RAISE\x00RECURSIVE\x00REPLACE\x00RESTRICT\x00ROW\x00TRIGGER\x00VACUUM\x00VIEW\x00VIRTUAL\x00WITH\x00REINDEX\x00RENAME\x00CTIME_KW\x00ANY\x00OR\x00AND\x00IS\x00BETWEEN\x00IN\x00ISNULL\x00NOTNULL\x00NE\x00EQ\x00GT\x00LE\x00LT\x00GE\x00ESCAPE\x00BITAND\x00BITOR\x00LSHIFT\x00RSHIFT\x00PLUS\x00MINUS\x00STAR\x00SLASH\x00REM\x00CONCAT\x00COLLATE\x00BITNOT\x00INDEXED\x00STRING\x00JOIN_KW\x00CONSTRAINT\x00DEFAULT\x00PRIMARY\x00UNIQUE\x00CHECK\x00REFERENCES\x00AUTOINCR\x00ON\x00INSERT\x00DELETE\x00UPDATE\x00SET\x00DEFERRABLE\x00FOREIGN\x00DROP\x00UNION\x00ALL\x00EXCEPT\x00INTERSECT\x00SELECT\x00VALUES\x00DISTINCT\x00DOT\x00FROM\x00JOIN\x00USING\x00ORDER\x00GROUP\x00HAVING\x00LIMIT\x00WHERE\x00INTO\x00FLOAT\x00BLOB\x00INTEGER\x00VARIABLE\x00CASE\x00WHEN\x00THEN\x00ELSE\x00INDEX\x00ALTER\x00ADD\x00error\x00input\x00cmdlist\x00ecmd\x00cmdx\x00cmd\x00transtype\x00trans_opt\x00nm\x00savepoint_opt\x00create_table\x00create_table_args\x00createkw\x00ifnotexists\x00dbnm\x00columnlist\x00conslist_opt\x00table_options\x00select\x00columnname\x00carglist\x00typetoken\x00typename\x00signed\x00plus_num\x00minus_num\x00ccons\x00term\x00expr\x00onconf\x00sortorder\x00autoinc\x00eidlist_opt\x00refargs\x00defer_subclause\x00refarg\x00refact\x00init_deferred_pred_opt\x00conslist\x00tconscomma\x00tcons\x00sortlist\x00eidlist\x00defer_subclause_opt\x00orconf\x00resolvetype\x00raisetype\x00ifexists\x00fullname\x00selectnowith\x00oneselect\x00with\x00multiselect_op\x00distinct\x00selcollist\x00from\x00where_opt\x00groupby_opt\x00having_opt\x00orderby_opt\x00limit_opt\x00values\x00nexprlist\x00exprlist\x00sclp\x00as\x00seltablist\x00stl_prefix\x00joinop\x00indexed_opt\x00on_opt\x00using_opt\x00idlist\x00setlist\x00insert_cmd\x00idlist_opt\x00likeop\x00between_op\x00in_op\x00paren_exprlist\x00case_operand\x00case_exprlist\x00case_else\x00uniqueflag\x00collate\x00nmnum\x00trigger_decl\x00trigger_cmd_list\x00trigger_time\x00trigger_event\x00foreach_clause\x00when_clause\x00trigger_cmd\x00trnm\x00tridxby\x00database_kw_opt\x00key_opt\x00add_column_fullname\x00kwcolumn_opt\x00create_vtab\x00vtabarglist\x00vtabarg\x00vtabargtoken\x00lp\x00anylist\x00wqlist\x00stateno <= YY_SHIFT_COUNT\x00iLookAhead!=YYNOCODE\x00%sFALLBACK %s => %s\x0a\x00yyFallback[iFallback]==0\x00%sWILDCARD %s => %s\x0a\x00yy_find_shift_action\x00%sStack Overflow!\x0a\x00parser stack overflow\x00pParser->yytos!=0\x00pParser->yytos > pParser->yystack\x00%sPopping %s\x0a\x00yy_pop_parser_stack\x00%sShift '%s', go to state %d\x0a\x00%sShift '%s'\x0a\x00%sReduce [%s], go to state %d.\x0a\x00rowid\x00unknown table option: %.*s\x00#%d\x00%.*s\x00set list\x00t.n>=2\x00near \"%T\": syntax error\x00too many arguments on function %T\x00yymsp[-2].minor.yy145!=0\x00yymsp[-1].minor.yy145!=0\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00yyruleno!=277\x00yyruleno!=294\x00yyruleno!=295\x00yyruleno!=301\x00yyruleno!=303\x00yyruleno!=304\x00yyruleno!=305\x00yyruleno!=309\x00yyruleno!=312\x00yyruleno!=313\x00yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0])\x00yyact == YY_ACCEPT_ACTION\x00explain ::= EXPLAIN\x00explain ::= EXPLAIN QUERY PLAN\x00cmdx ::= cmd\x00cmd ::= BEGIN transtype trans_opt\x00transtype ::=\x00transtype ::= DEFERRED\x00transtype ::= IMMEDIATE\x00transtype ::= EXCLUSIVE\x00cmd ::= COMMIT trans_opt\x00cmd ::= END trans_opt\x00cmd ::= ROLLBACK trans_opt\x00cmd ::= SAVEPOINT nm\x00cmd ::= RELEASE savepoint_opt nm\x00cmd ::= ROLLBACK trans_opt TO savepoint_opt nm\x00create_table ::= createkw temp TABLE ifnotexists nm dbnm\x00createkw ::= CREATE\x00ifnotexists ::=\x00ifnotexists ::= IF NOT EXISTS\x00temp ::= TEMP\x00temp ::=\x00create_table_args ::= LP columnlist conslist_opt RP table_options\x00create_table_args ::= AS select\x00table_options ::=\x00table_options ::= WITHOUT nm\x00columnname ::= nm typetoken\x00typetoken ::=\x00typetoken ::= typename LP signed RP\x00typetoken ::= typename LP signed COMMA signed RP\x00typename ::= typename ID|STRING\x00ccons ::= CONSTRAINT nm\x00ccons ::= DEFAULT term\x00ccons ::= DEFAULT LP expr RP\x00ccons ::= DEFAULT PLUS term\x00ccons ::= DEFAULT MINUS term\x00ccons ::= DEFAULT ID|INDEXED\x00ccons ::= NOT NULL onconf\x00ccons ::= PRIMARY KEY sortorder onconf autoinc\x00ccons ::= UNIQUE onconf\x00ccons ::= CHECK LP expr RP\x00ccons ::= REFERENCES nm eidlist_opt refargs\x00ccons ::= defer_subclause\x00ccons ::= COLLATE ID|STRING\x00autoinc ::=\x00autoinc ::= AUTOINCR\x00refargs ::=\x00refargs ::= refargs refarg\x00refarg ::= MATCH nm\x00refarg ::= ON INSERT refact\x00refarg ::= ON DELETE refact\x00refarg ::= ON UPDATE refact\x00refact ::= SET NULL\x00refact ::= SET DEFAULT\x00refact ::= CASCADE\x00refact ::= RESTRICT\x00refact ::= NO ACTION\x00defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt\x00defer_subclause ::= DEFERRABLE init_deferred_pred_opt\x00init_deferred_pred_opt ::=\x00init_deferred_pred_opt ::= INITIALLY DEFERRED\x00init_deferred_pred_opt ::= INITIALLY IMMEDIATE\x00conslist_opt ::=\x00tconscomma ::= COMMA\x00tcons ::= CONSTRAINT nm\x00tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf\x00tcons ::= UNIQUE LP sortlist RP onconf\x00tcons ::= CHECK LP expr RP onconf\x00tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt\x00defer_subclause_opt ::=\x00onconf ::=\x00onconf ::= ON CONFLICT resolvetype\x00orconf ::=\x00orconf ::= OR resolvetype\x00resolvetype ::= IGNORE\x00resolvetype ::= REPLACE\x00cmd ::= DROP TABLE ifexists fullname\x00ifexists ::= IF EXISTS\x00ifexists ::=\x00cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select\x00cmd ::= DROP VIEW ifexists fullname\x00cmd ::= select\x00select ::= with selectnowith\x00selectnowith ::= selectnowith multiselect_op oneselect\x00multiselect_op ::= UNION\x00multiselect_op ::= UNION ALL\x00multiselect_op ::= EXCEPT|INTERSECT\x00oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt\x00values ::= VALUES LP nexprlist RP\x00values ::= values COMMA LP exprlist RP\x00distinct ::= DISTINCT\x00distinct ::= ALL\x00distinct ::=\x00sclp ::=\x00selcollist ::= sclp expr as\x00selcollist ::= sclp STAR\x00selcollist ::= sclp nm DOT STAR\x00as ::= AS nm\x00as ::=\x00from ::=\x00from ::= FROM seltablist\x00stl_prefix ::= seltablist joinop\x00stl_prefix ::=\x00seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt\x00seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt\x00seltablist ::= stl_prefix LP select RP as on_opt using_opt\x00seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt\x00dbnm ::=\x00dbnm ::= DOT nm\x00fullname ::= nm dbnm\x00joinop ::= COMMA|JOIN\x00joinop ::= JOIN_KW JOIN\x00joinop ::= JOIN_KW nm JOIN\x00joinop ::= JOIN_KW nm nm JOIN\x00on_opt ::= ON expr\x00on_opt ::=\x00indexed_opt ::=\x00indexed_opt ::= INDEXED BY nm\x00indexed_opt ::= NOT INDEXED\x00using_opt ::= USING LP idlist RP\x00using_opt ::=\x00orderby_opt ::=\x00orderby_opt ::= ORDER BY sortlist\x00sortlist ::= sortlist COMMA expr sortorder\x00sortlist ::= expr sortorder\x00sortorder ::= ASC\x00sortorder ::= DESC\x00sortorder ::=\x00groupby_opt ::=\x00groupby_opt ::= GROUP BY nexprlist\x00having_opt ::=\x00having_opt ::= HAVING expr\x00limit_opt ::=\x00limit_opt ::= LIMIT expr\x00limit_opt ::= LIMIT expr OFFSET expr\x00limit_opt ::= LIMIT expr COMMA expr\x00cmd ::= with DELETE FROM fullname indexed_opt where_opt\x00where_opt ::=\x00where_opt ::= WHERE expr\x00cmd ::= with UPDATE orconf fullname indexed_opt SET setlist where_opt\x00setlist ::= setlist COMMA nm EQ expr\x00setlist ::= setlist COMMA LP idlist RP EQ expr\x00setlist ::= nm EQ expr\x00setlist ::= LP idlist RP EQ expr\x00cmd ::= with insert_cmd INTO fullname idlist_opt select\x00cmd ::= with insert_cmd INTO fullname idlist_opt DEFAULT VALUES\x00insert_cmd ::= INSERT orconf\x00insert_cmd ::= REPLACE\x00idlist_opt ::=\x00idlist_opt ::= LP idlist RP\x00idlist ::= idlist COMMA nm\x00idlist ::= nm\x00expr ::= LP expr RP\x00term ::= NULL\x00expr ::= ID|INDEXED\x00expr ::= JOIN_KW\x00expr ::= nm DOT nm\x00expr ::= nm DOT nm DOT nm\x00term ::= FLOAT|BLOB\x00term ::= STRING\x00term ::= INTEGER\x00expr ::= VARIABLE\x00expr ::= expr COLLATE ID|STRING\x00expr ::= CAST LP expr AS typetoken RP\x00expr ::= ID|INDEXED LP distinct exprlist RP\x00expr ::= ID|INDEXED LP STAR RP\x00term ::= CTIME_KW\x00expr ::= LP nexprlist COMMA expr RP\x00expr ::= expr AND expr\x00expr ::= expr OR expr\x00expr ::= expr LT|GT|GE|LE expr\x00expr ::= expr EQ|NE expr\x00expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr\x00expr ::= expr PLUS|MINUS expr\x00expr ::= expr STAR|SLASH|REM expr\x00expr ::= expr CONCAT expr\x00likeop ::= NOT LIKE_KW|MATCH\x00expr ::= expr likeop expr\x00expr ::= expr likeop expr ESCAPE expr\x00expr ::= expr ISNULL|NOTNULL\x00expr ::= expr NOT NULL\x00expr ::= expr IS expr\x00expr ::= expr IS NOT expr\x00expr ::= NOT expr\x00expr ::= BITNOT expr\x00expr ::= MINUS expr\x00expr ::= PLUS expr\x00between_op ::= BETWEEN\x00between_op ::= NOT BETWEEN\x00expr ::= expr between_op expr AND expr\x00in_op ::= IN\x00in_op ::= NOT IN\x00expr ::= expr in_op LP exprlist RP\x00expr ::= LP select RP\x00expr ::= expr in_op LP select RP\x00expr ::= expr in_op nm dbnm paren_exprlist\x00expr ::= EXISTS LP select RP\x00expr ::= CASE case_operand case_exprlist case_else END\x00case_exprlist ::= case_exprlist WHEN expr THEN expr\x00case_exprlist ::= WHEN expr THEN expr\x00case_else ::= ELSE expr\x00case_else ::=\x00case_operand ::= expr\x00case_operand ::=\x00exprlist ::=\x00nexprlist ::= nexprlist COMMA expr\x00nexprlist ::= expr\x00paren_exprlist ::=\x00paren_exprlist ::= LP exprlist RP\x00cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt\x00uniqueflag ::= UNIQUE\x00uniqueflag ::=\x00eidlist_opt ::=\x00eidlist_opt ::= LP eidlist RP\x00eidlist ::= eidlist COMMA nm collate sortorder\x00eidlist ::= nm collate sortorder\x00collate ::=\x00collate ::= COLLATE ID|STRING\x00cmd ::= DROP INDEX ifexists fullname\x00cmd ::= VACUUM\x00cmd ::= VACUUM nm\x00cmd ::= PRAGMA nm dbnm\x00cmd ::= PRAGMA nm dbnm EQ nmnum\x00cmd ::= PRAGMA nm dbnm LP nmnum RP\x00cmd ::= PRAGMA nm dbnm EQ minus_num\x00cmd ::= PRAGMA nm dbnm LP minus_num RP\x00plus_num ::= PLUS INTEGER|FLOAT\x00minus_num ::= MINUS INTEGER|FLOAT\x00cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END\x00trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause\x00trigger_time ::= BEFORE\x00trigger_time ::= AFTER\x00trigger_time ::= INSTEAD OF\x00trigger_time ::=\x00trigger_event ::= DELETE|INSERT\x00trigger_event ::= UPDATE\x00trigger_event ::= UPDATE OF idlist\x00when_clause ::=\x00when_clause ::= WHEN expr\x00trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI\x00trigger_cmd_list ::= trigger_cmd SEMI\x00trnm ::= nm DOT nm\x00tridxby ::= INDEXED BY nm\x00tridxby ::= NOT INDEXED\x00trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt\x00trigger_cmd ::= insert_cmd INTO trnm idlist_opt select\x00trigger_cmd ::= DELETE FROM trnm tridxby where_opt\x00trigger_cmd ::= select\x00expr ::= RAISE LP IGNORE RP\x00expr ::= RAISE LP raisetype COMMA nm RP\x00raisetype ::= ROLLBACK\x00raisetype ::= ABORT\x00raisetype ::= FAIL\x00cmd ::= DROP TRIGGER ifexists fullname\x00cmd ::= ATTACH database_kw_opt expr AS expr key_opt\x00cmd ::= DETACH database_kw_opt expr\x00key_opt ::=\x00key_opt ::= KEY expr\x00cmd ::= REINDEX\x00cmd ::= REINDEX nm dbnm\x00cmd ::= ANALYZE\x00cmd ::= ANALYZE nm dbnm\x00cmd ::= ALTER TABLE fullname RENAME TO nm\x00cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist\x00add_column_fullname ::= fullname\x00cmd ::= create_vtab\x00cmd ::= create_vtab LP vtabarglist RP\x00create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm\x00vtabarg ::=\x00vtabargtoken ::= ANY\x00vtabargtoken ::= lp anylist RP\x00lp ::= LP\x00with ::=\x00with ::= WITH wqlist\x00with ::= WITH RECURSIVE wqlist\x00wqlist ::= nm eidlist_opt AS LP select RP\x00wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP\x00input ::= cmdlist\x00cmdlist ::= cmdlist ecmd\x00cmdlist ::= ecmd\x00ecmd ::= SEMI\x00ecmd ::= explain cmdx SEMI\x00explain ::=\x00trans_opt ::=\x00trans_opt ::= TRANSACTION\x00trans_opt ::= TRANSACTION nm\x00savepoint_opt ::= SAVEPOINT\x00savepoint_opt ::=\x00cmd ::= create_table create_table_args\x00columnlist ::= columnlist COMMA columnname carglist\x00columnlist ::= columnname carglist\x00nm ::= ID|INDEXED\x00nm ::= STRING\x00nm ::= JOIN_KW\x00typetoken ::= typename\x00typename ::= ID|STRING\x00signed ::= plus_num\x00signed ::= minus_num\x00carglist ::= carglist ccons\x00carglist ::=\x00ccons ::= NULL onconf\x00conslist_opt ::= COMMA conslist\x00conslist ::= conslist tconscomma tcons\x00conslist ::= tcons\x00tconscomma ::=\x00defer_subclause_opt ::= defer_subclause\x00resolvetype ::= raisetype\x00selectnowith ::= oneselect\x00oneselect ::= values\x00sclp ::= selcollist COMMA\x00as ::= ID|STRING\x00expr ::= term\x00likeop ::= LIKE_KW|MATCH\x00exprlist ::= nexprlist\x00nmnum ::= plus_num\x00nmnum ::= nm\x00nmnum ::= ON\x00nmnum ::= DELETE\x00nmnum ::= DEFAULT\x00plus_num ::= INTEGER|FLOAT\x00foreach_clause ::=\x00foreach_clause ::= FOR EACH ROW\x00trnm ::= nm\x00tridxby ::=\x00database_kw_opt ::= DATABASE\x00database_kw_opt ::=\x00kwcolumn_opt ::=\x00kwcolumn_opt ::= COLUMNKW\x00vtabarglist ::= vtabarg\x00vtabarglist ::= vtabarglist COMMA vtabarg\x00vtabarg ::= vtabarg vtabargtoken\x00anylist ::=\x00anylist ::= anylist LP anylist RP\x00anylist ::= anylist ANY\x00pParse->pToplevel==0\x00!pParse->isMultiWrite || sqlite3VdbeAssertMayAbort(v, pParse->mayAbort)\x00sqlite3VdbeGetOp(v, 0)->opcode==OP_Init\x00usesStmtJournal=%d\x00pParse->iCacheLevel==0\x00sqlite3FinishCoding\x00pParse->aLabel==0\x00pParse->nLabel==0\x00pParse->nOpAlloc==0\x00pParse->szOpAlloc==0\x00sqlite3VdbeCreate\x00p->magic==VDBE_MAGIC_INIT\x00op>=0 && op<0xff\x00 r[%d]={%d:%d}\x00\x0a\x00sqlite3VdbeAddOp3\x00p->pParse->nOpAlloc<=p->nOp\x00p->pParse->nOpAlloc>p->nOp\x00growOp3\x00nOp<=(1024/sizeof(Op))\x00nNew>=(p->nOpAlloc+nOp)\x00growOpArray\x00nTemp>=20\x00pKeyInfo->aSortOrder!=0\x00k(%d\x00BINARY\x00B\x00,%s%s\x00-\x00)\x00(%.20s)\x00%s(%d)\x00%d\x00pMem->flags & MEM_Blob\x00(blob)\x00vtab:%p\x00,%d\x00]\x00program\x00zP4!=0\x00displayP4\x00IF \x00r[P2] = (%s)\x00if %s goto P2\x00@P\x00+1\x00..%d\x00..P3\x00; %s\x00Savepoint\x00\x00AutoCommit\x00\x00Transaction\x00\x00SorterNext\x00\x00PrevIfOpen\x00\x00NextIfOpen\x00\x00Prev\x00\x00Next\x00\x00Checkpoint\x00\x00JournalMode\x00\x00Vacuum\x00\x00VFilter\x00iplan=r[P3] zplan='P4'\x00VUpdate\x00data=r[P3@P2]\x00Goto\x00\x00Gosub\x00\x00InitCoroutine\x00\x00Yield\x00\x00MustBeInt\x00\x00Jump\x00\x00Not\x00r[P2]= !r[P1]\x00Once\x00\x00If\x00\x00IfNot\x00\x00IfNullRow\x00if P1.nullRow then r[P3]=NULL, goto P2\x00SeekLT\x00key=r[P3@P4]\x00SeekLE\x00key=r[P3@P4]\x00SeekGE\x00key=r[P3@P4]\x00SeekGT\x00key=r[P3@P4]\x00NoConflict\x00key=r[P3@P4]\x00NotFound\x00key=r[P3@P4]\x00Found\x00key=r[P3@P4]\x00SeekRowid\x00intkey=r[P3]\x00NotExists\x00intkey=r[P3]\x00Last\x00\x00IfSmaller\x00\x00SorterSort\x00\x00Sort\x00\x00Rewind\x00\x00IdxLE\x00key=r[P3@P4]\x00IdxGT\x00key=r[P3@P4]\x00IdxLT\x00key=r[P3@P4]\x00IdxGE\x00key=r[P3@P4]\x00RowSetRead\x00r[P3]=rowset(P1)\x00RowSetTest\x00if r[P3] in rowset(P1) goto P2\x00Program\x00\x00FkIfZero\x00if fkctr[P1]==0 goto P2\x00IfPos\x00if r[P1]>0 then r[P1]-=P3, goto P2\x00IfNotZero\x00if r[P1]!=0 then r[P1]--, goto P2\x00DecrJumpZero\x00if (--r[P1])==0 goto P2\x00IncrVacuum\x00\x00VNext\x00\x00Init\x00Start at P2\x00Return\x00\x00EndCoroutine\x00\x00HaltIfNull\x00if r[P3]=null halt\x00Halt\x00\x00Integer\x00r[P2]=P1\x00Int64\x00r[P2]=P4\x00String\x00r[P2]='P4' (len=P1)\x00Null\x00r[P2..P3]=NULL\x00SoftNull\x00r[P1]=NULL\x00Blob\x00r[P2]=P4 (len=P1)\x00Variable\x00r[P2]=parameter(P1,P4)\x00Move\x00r[P2@P3]=r[P1@P3]\x00Copy\x00r[P2@P3+1]=r[P1@P3+1]\x00SCopy\x00r[P2]=r[P1]\x00IntCopy\x00r[P2]=r[P1]\x00ResultRow\x00output=r[P1@P2]\x00CollSeq\x00\x00Function0\x00r[P3]=func(r[P2@P5])\x00Or\x00r[P3]=(r[P1] || r[P2])\x00And\x00r[P3]=(r[P1] && r[P2])\x00Function\x00r[P3]=func(r[P2@P5])\x00AddImm\x00r[P1]=r[P1]+P2\x00RealAffinity\x00\x00IsNull\x00if r[P1]==NULL goto P2\x00NotNull\x00if r[P1]!=NULL goto P2\x00Ne\x00IF r[P3]!=r[P1]\x00Eq\x00IF r[P3]==r[P1]\x00Gt\x00IF r[P3]>r[P1]\x00Le\x00IF r[P3]<=r[P1]\x00Lt\x00IF r[P3]<r[P1]\x00Ge\x00IF r[P3]>=r[P1]\x00ElseNotEq\x00\x00BitAnd\x00r[P3]=r[P1]&r[P2]\x00BitOr\x00r[P3]=r[P1]|r[P2]\x00ShiftLeft\x00r[P3]=r[P2]<<r[P1]\x00ShiftRight\x00r[P3]=r[P2]>>r[P1]\x00Add\x00r[P3]=r[P1]+r[P2]\x00Subtract\x00r[P3]=r[P2]-r[P1]\x00Multiply\x00r[P3]=r[P1]*r[P2]\x00Divide\x00r[P3]=r[P2]/r[P1]\x00Remainder\x00r[P3]=r[P2]%r[P1]\x00Concat\x00r[P3]=r[P2]+r[P1]\x00Cast\x00affinity(r[P1])\x00BitNot\x00r[P1]= ~r[P1]\x00Permutation\x00\x00String8\x00r[P2]='P4'\x00Compare\x00r[P1@P3] <-> r[P2@P3]\x00Column\x00r[P3]=PX\x00Affinity\x00affinity(r[P1@P2])\x00MakeRecord\x00r[P3]=mkrec(r[P1@P2])\x00Count\x00r[P2]=count()\x00ReadCookie\x00\x00SetCookie\x00\x00ReopenIdx\x00root=P2 iDb=P3\x00OpenRead\x00root=P2 iDb=P3\x00OpenWrite\x00root=P2 iDb=P3\x00OpenDup\x00\x00OpenAutoindex\x00nColumn=P2\x00OpenEphemeral\x00nColumn=P2\x00SorterOpen\x00\x00SequenceTest\x00if( cursor[P1].ctr++ ) pc = P2\x00OpenPseudo\x00P3 columns in r[P2]\x00Close\x00\x00ColumnsUsed\x00\x00Sequence\x00r[P2]=cursor[P1].ctr++\x00NewRowid\x00r[P2]=rowid\x00Insert\x00intkey=r[P3] data=r[P2]\x00InsertInt\x00intkey=P3 data=r[P2]\x00Delete\x00\x00ResetCount\x00\x00SorterCompare\x00if key(P1)!=trim(r[P3],P4) goto P2\x00SorterData\x00r[P2]=data\x00RowData\x00r[P2]=data\x00Rowid\x00r[P2]=rowid\x00NullRow\x00\x00SorterInsert\x00key=r[P2]\x00IdxInsert\x00key=r[P2]\x00IdxDelete\x00key=r[P2@P3]\x00Seek\x00Move P3 to P1.rowid\x00IdxRowid\x00r[P2]=rowid\x00Real\x00r[P2]=P4\x00Destroy\x00\x00Clear\x00\x00ResetSorter\x00\x00CreateIndex\x00r[P2]=root iDb=P1\x00CreateTable\x00r[P2]=root iDb=P1\x00SqlExec\x00\x00ParseSchema\x00\x00LoadAnalysis\x00\x00DropTable\x00\x00DropIndex\x00\x00DropTrigger\x00\x00IntegrityCk\x00\x00RowSetAdd\x00rowset(P1)=r[P2]\x00Param\x00\x00FkCounter\x00fkctr[P1]+=P2\x00MemMax\x00r[P1]=max(r[P1],r[P2])\x00OffsetLimit\x00if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)\x00AggStep0\x00accum=r[P3] step(r[P2@P5])\x00AggStep\x00accum=r[P3] step(r[P2@P5])\x00AggFinal\x00accum=r[P1] N=P2\x00Expire\x00\x00TableLock\x00iDb=P1 root=P2 write=P3\x00VBegin\x00\x00VCreate\x00\x00VDestroy\x00\x00VOpen\x00\x00VColumn\x00r[P3]=vcolumn(P2)\x00VRename\x00\x00Pagecount\x00\x00MaxPgcnt\x00\x00CursorHint\x00\x00Noop\x00\x00Explain\x00\x00%4d %-13s %4d %4d %4d %-13s %.2X %s\x0a\x00p->iAddr<nOp\x00opIterNext\x00(addr>=0 && addr<p->nOp) || p->db->mallocFailed\x00sqlite3VdbeGetOp\x00i>=0 && i<p->db->nDb && i<(int)sizeof(yDbMask)*8\x00i<(int)sizeof(p->btreeMask)*8\x00sqlite3VdbeUsesBtree\x00p->nOp>0 || p->db->mallocFailed\x00sqlite3VdbeChangeP5\x00p->nOp>0 || p->aOp==0\x00p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->db->mallocFailed\x00p->aOp\x00vdbeVComment\x00sqlite3GetVTable\x00p->aOp!=0 || db->mallocFailed\x00p->nOp>0\x00addr<p->nOp\x00n<0\x00sqlite3VdbeChangeP4\x00freeP4\x00sqlite3KeyInfoUnref\x00pVdbe!=0\x00codeTableLocks\x00pParse->pTriggerTab==0\x00sqlite3IsToplevel(pParse)\x00v\x00sqlite3SchemaMutexHeld(db, 0, pDb->pSchema)\x00sqlite3AutoincrementBegin\x00!IsVirtual(pTab)\x00opcode==OP_OpenWrite || opcode==OP_OpenRead\x00pPk!=0\x00pPk->tnum==pTab->tnum\x00sqlite3OpenTable\x00iDb>=0\x00sqlite3TableLock\x00v!=0\x00pIdx!=0\x00sqlite3VdbeSetP4KeyInfo\x00sqlite3KeyInfoIsWriteable(pKey)\x00sqlite3KeyInfoOfIndex\x00!p || p->xCmp\x00no such collation sequence: %s\x00!db->xCollNeeded || !db->xCollNeeded16\x00callCollNeeded\x00sqlite3GetCollSeq\x00n!=P4_INT32 && n!=P4_VTAB\x00n<=0\x00pP4!=0\x00pOp->p4type==P4_NOTUSED\x00sqlite3VdbeAppendP4\x00nOp>0\x00aOp->p2>=0\x00sqlite3VdbeAddOpList\x00target>0 && target<=pParse->nMem\x00pParse->pVdbe!=0 || pParse->db->mallocFailed\x00sqlite3ExprCode\x00pParse->db->mallocFailed\x00pCol->iMem>0\x00!ExprHasProperty(pExpr, EP_IntValue)\x00pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X'\x00pExpr->u.zToken[1]=='\\''\x00z[n]=='\\''\x00pExpr->u.zToken!=0\x00pExpr->u.zToken[0]!=0\x00pExpr->u.zToken[0]=='?' || strcmp(pExpr->u.zToken, z)==0\x00pLeft\x00misuse of aggregate: %s()\x00!ExprHasProperty(pExpr, EP_xIsSelect)\x00unknown function: %s()\x00nFarg>=2\x00nFarg>=1\x00blob\x00text\x00numeric\x00integer\x00real\x00nFarg==1\x00none\x00pFarg->a[0].pExpr!=0\x00pExpr->iTable==0 || pExpr->pLeft->op==TK_SELECT\x00%d columns assigned %d values\x00pExpr->iTable==0 || pExpr->iTable==1\x00pExpr->iColumn>=-1 && pExpr->iColumn<pTab->nCol\x00pTab->iPKey<0 || pExpr->iColumn!=pTab->iPKey\x00p1>=0 && p1<(pTab->nCol*2+2)\x00%s.%s -> $%d\x00new\x00old\x00row value misused\x00op==TK_CASE\x00!ExprHasProperty(pExpr, EP_xIsSelect) && pExpr->x.pList\x00pExpr->x.pList->nExpr > 0\x00pTest!=0\x00pParse->db->mallocFailed || pParse->nErr>0 || pParse->iCacheLevel==iCacheLevel\x00pExpr->affinity==OE_Rollback || pExpr->affinity==OE_Abort || pExpr->affinity==OE_Fail || pExpr->affinity==OE_Ignore\x00RAISE() may only be used within a trigger-program\x00sqlite3ExprCodeTarget\x00sqlite3ExprCodeGetColumn\x00pTab!=0\x00i<pTab->nCol\x00sqlite3ColumnDefault\x00pExpr!=0\x00(pExpr->flags & EP_TokenOnly)==0 || pCtx==0\x00zVal[nVal]=='\\''\x00*ppVal==0\x00pCtx==0\x00valueFromExpr\x00zIn!=0\x00sqlite3AffinityType\x00(h>='0' && h<='9') || (h>='a' && h<='f') || (h>='A' && h<='F')\x00sqlite3HexToInt\x00pMem->flags & MEM_Str || pMem->db->mallocFailed\x00aff==SQLITE_AFF_TEXT\x00affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL || affinity==SQLITE_AFF_NUMERIC\x00applyAffinity\x00(pRec->flags & (MEM_Str|MEM_Int|MEM_Real))==MEM_Str\x00applyNumericAffinity\x00pMem->flags & MEM_Real\x00sqlite3VdbeIntegerAffinity\x00sqlite3VdbeMemCast\x00(pMem->flags & (MEM_Blob|MEM_Str))!=0\x00(pMem->flags & (MEM_Int|MEM_Real|MEM_Null))!=0\x00sqlite3VdbeMemNumerify\x00sqlite3VdbeMemIntegerify\x00sqlite3VdbeMemRealify\x00iReg>0 || pParse->nErr || pParse->db->mallocFailed\x00iCol>=-1 && iCol<32768\x00p->iTable!=iTab || p->iColumn!=iCol\x00sqlite3ExprCacheStore\x00i>=0\x00z!=0\x000x\x00hex literal too big: %s%s\x00codeInteger\x00!sqlite3IsNaN(value)\x00codeReal\x00pExpr->op==TK_EQ || pExpr->op==TK_NE || pExpr->op==TK_IS || pExpr->op==TK_ISNOT || pExpr->op==TK_LT || pExpr->op==TK_GT || pExpr->op==TK_LE || pExpr->op==TK_GE\x00pExpr->op==op || (pExpr->op==TK_IS && op==TK_EQ) || (pExpr->op==TK_ISNOT && op==TK_NE)\x00p5==0 || pExpr->op!=op\x00p5==SQLITE_NULLEQ || pExpr->op==op\x00i>=0 && i<nLeft\x00op==TK_LT || op==TK_GT || op==TK_LE || op==TK_GE\x00v->magic==VDBE_MAGIC_INIT\x00sqlite3VdbeMakeLabel\x00codeVectorCompare\x00EXECUTE %s%s SUBQUERY %d\x00CORRELATED \x00LIST\x00SCALAR\x00!isRowid || nVal==1\x00!isRowid\x00pKeyInfo!=0\x00pEList!=0\x00pEList->nExpr>0\x00sqlite3KeyInfoIsWriteable(pKeyInfo)\x00pExpr->op==TK_EXISTS || pExpr->op==TK_SELECT\x00ExprHasProperty(pExpr, EP_xIsSelect)\x00Init subquery result\x00Init EXISTS result\x00sqlite3CodeSubselect\x00PUSH to %d\x0a\x00pExpr->op==TK_IN\x00exprINAffinity\x00i<sqlite3ExprVectorSize(pVector)\x00pVector->op2==0 || pVector->op==TK_REGISTER\x00sqlite3VectorFieldSubexpr\x00pExpr->flags&EP_xIsSelect\x00pExpr->pLeft->flags&EP_xIsSelect\x00pExpr->x.pList->nExpr>0\x00pExpr->op==TK_FUNCTION\x00pExpr->op==TK_COLLATE\x00sqlite3ExprSkipCollate\x00sqlite3ExprAffinity\x00iCol<pTab->nCol\x00sqlite3TableColumnAffinity\x00aff1==0 || aff2==0\x00sqlite3CompareAffinity\x00%*s%s.%p: \x00begin processing:\x0a\x00p->pOrderBy==0 || pDest->eDest!=SRT_DistFifo\x00p->pOrderBy==0 || pDest->eDest!=SRT_Fifo\x00p->pOrderBy==0 || pDest->eDest!=SRT_DistQueue\x00p->pOrderBy==0 || pDest->eDest!=SRT_Queue\x00pDest->eDest==SRT_Exists || pDest->eDest==SRT_Union || pDest->eDest==SRT_Except || pDest->eDest==SRT_Discard || pDest->eDest==SRT_Queue || pDest->eDest==SRT_DistFifo || pDest->eDest==SRT_DistQueue || pDest->eDest==SRT_Fifo\x00p->pEList!=0\x00after name resolution:\x0a\x00expected %d columns for '%s' but got %d\x00end compound-select processing\x0a\x00After WHERE-clause push-down:\x0a\x00pItem->addrFillSub==0\x00materialize \"%s\"\x00end %s\x00After all FROM-clause analysis:\x0a\x00sDistinct.isTnct\x00Transform DISTINCT into GROUP BY:\x0a\x0066==sqlite3LogEst(100)\x000==sqlite3LogEst(1)\x00pWhere==p->pWhere\x00!ExprHasProperty(sAggInfo.aFunc[i].pExpr, EP_xIsSelect)\x00clear abort flag\x00indicate accumulator empty\x00GROUP BY\x00GROUP BY sort\x00output one row\x00check abort flag\x00reset accumulator\x00indicate data in accumulator\x00output final row\x00set abort flag\x00Groupby result generator entry point\x00end groupby result generator\x00p->pGroupBy==0\x00flag==0\x00flag==0 || (pMinMax!=0 && pMinMax->nExpr==1)\x00db->mallocFailed || pMinMax!=0\x00pMinMax==0 || pMinMax->nExpr==1\x00%s() by index\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00end processing\x0a\x00authorizer malfunction\x00nil-SELECT\x00SELECT%s%s (0x%p) selFlags=0x%x nSelectRow=%d\x00 DISTINCT\x00 agg_flag\x00result-set\x00{%d,*}\x00 %s.%s\x00 %s\x00 tabname=%Q\x00 (AS %s)\x00 LEFT-JOIN\x00func-args:\x00GROUPBY\x00ORDERBY\x00UNION ALL\x00| \x00 \x00|-- \x00'-- \x00acc.nChar>0\x00sqlite3TreeViewLine\x00moreToFollow==0 || moreToFollow==1\x00sqlite3TreeViewPush\x00WITH (0x%p, pOuter=0x%p)\x00WITH (0x%p)\x00 AS\x00%s (empty)\x00iOrderByCol=%d\x00nil\x00 flags=0x%x iRJT=%d\x00 flags=0x%x\x00AGG{%d:%d}%s\x00COLUMN(%d)%s\x00{%d:%d}%s\x00%Q\x00VARIABLE(%s,%d)\x00REGISTER(%d)\x00ID \"%w\"\x00CAST %Q\x00ISNOT\x00MUL\x00SUB\x00DIV\x00UMINUS\x00UPLUS\x00SPAN %Q\x00COLLATE %Q\x00AGG_FUNCTION%d %Q\x00FUNCTION %Q\x00EXISTS-expr\x00SELECT-expr\x00NEW\x00OLD\x00unk\x00rollback\x00abort\x00fail\x00ignore\x00RAISE %s(%Q)\x00MATCH {%d:%d}%s\x00VECTOR\x00SELECT-COLUMN %d\x00IF-NULL-ROW %d\x00op=%d\x00sqlite3Select\x00sqlite3SelectPrep\x00(p->selFlags & SF_Converted)==0\x00pNew->pPrior!=0\x00a JOIN clause is required before %s\x00pAlias!=0\x00p==0\x00pDatabase==0 || pTable!=0\x00sqlite3SrcListAppend\x00iStart>=0\x00nExtra>=1\x00pSrc!=0\x00iStart<=pSrc->nSrc\x00db->mallocFailed\x00sqlite3SrcListEnlarge\x00sqlite3SrcListAppendFromTerm\x00sqlite3ExprListAppend\x00iValue>=0\x00pToken->z!=0 || pToken->n==0\x00sqlite3ExprAlloc\x00convertCompoundSelectToSubquery\x00sqlite3WalkSelectFrom\x00pFrom->fg.isRecursive==0 || pFrom->pTab!=0\x00pFrom->pTab==0\x00pSel!=0\x00sqlite_sq_%p\x00200==sqlite3LogEst(1048576)\x00too many references to \"%s\": max 65535\x00pFrom->pSelect==0\x00pE->op!=TK_DOT || pE->pRight!=0\x00pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID)\x00pE->op!=TK_DOT || pRight!=0\x00pE->pLeft!=0\x00!ExprHasProperty(pE->pLeft, EP_IntValue)\x00*\x00zName\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00selectExpander\x00bFree==0 || (pParse->pWith==0 && pParse->pWithToFree==0)\x00pParse->pWith!=pWith\x00sqlite3WithPush\x00pList || pParse->db->mallocFailed\x00sqlite3SrcListAssignCursors\x00pFrom->pSelect\x00multiple references to recursive table: %s\x00pTab->nTabRef==1 || ((pSel->selFlags&SF_Recursive) && pTab->nTabRef==2 )\x00circular reference: %s\x00pPrior->pWith==0\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00withExpand\x00'%s' is not a function\x00sqlite3SelectDup\x00pNewExpr->iColumn==0 || i>0\x00pOldExpr->pLeft==pOldExpr->pRight\x00pItem[-1].pExpr!=0\x00pNewExpr->iColumn==pItem[-1].pExpr->iColumn+1\x00pPriorSelectCol==pItem[-1].pExpr->pLeft\x00sqlite3ExprListDup\x00flags==0 || flags==EXPRDUP_REDUCE\x00sqlite3ExprDup\x00dupFlags==0 || dupFlags==EXPRDUP_REDUCE\x00pzBuffer==0 || dupFlags==EXPRDUP_REDUCE\x00ExprHasProperty(p, EP_Reduced)==0\x00p->iColumn==0 || p->pRight==0\x00p->pRight==0 || p->pRight==p->pLeft\x00exprDup\x00flags==EXPRDUP_REDUCE || flags==0\x00!ExprHasProperty(p, EP_TokenOnly|EP_Reduced)\x00!ExprHasProperty(p, EP_FromJoin)\x00!ExprHasProperty(p, EP_MemToken)\x00!ExprHasProperty(p, EP_NoReduce)\x00dupedExprStructSize\x00sqlite3SrcListDup\x00sqlite3IdListDup\x00nCol==(i16)nCol\x00pColExpr!=0\x00!ExprHasProperty(pColExpr, EP_IntValue)\x00%.*z:%u\x00sqlite3ColumnsFromExprList\x00p->pSchema==0 || p->zDatabase==0\x00sqlite3LocateTableItem\x00no such view\x00no such table\x00pragma_\x00%s: %s.%s\x00%s: %s\x00sqlite3ReadSchema\x00sqlite3BtreeHoldsMutex(db->aDb[0].pBt)\x00db->init.busy==0\x00db->nDb>1\x00sqlite3Init\x00db->aDb[iDb].pSchema\x00iDb==1 || sqlite3BtreeHoldsMutex(db->aDb[iDb].pBt)\x00sqlite_temp_master\x00sqlite_master\x001\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage integer,sql text)\x00attached databases must use the same text encoding as main database\x00unsupported file format\x00db->init.busy\x00SELECT name, rootpage, sql FROM \"%w\".%s ORDER BY rowid\x00sqlite3InitOne\x00argc==3\x00create \x00(rc&0xFF)==(rcp&0xFF)\x00saved_iDb==0 || (db->flags & SQLITE_Vacuum)!=0\x00iDb==1\x00invalid rootpage\x00sqlite3InitCallback\x00?\x00malformed database schema (%s)\x00%z - %s\x00rc==SQLITE_OK || ppStmt==0 || *ppStmt==0\x00rc==SQLITE_OK || *ppStmt==0\x00ppStmt && *ppStmt==0\x00sqlite3BtreeHoldsMutex(pBt)\x00database schema is locked: %s\x00statement too long\x000==sParse.nQueryLoop\x00!(*ppStmt)\x00sqlite3Prepare\x00rc==SQLITE_OK || rc==SQLITE_LOCKED_SHAREDCACHE\x00sqlite3BtreeSchemaLocked\x00eLock==READ_LOCK || eLock==WRITE_LOCK\x00!(p->db->flags&SQLITE_ReadUncommitted)||eLock==WRITE_LOCK||iTab==1\x00eLock==READ_LOCK || (p==pBt->pWriter && p->inTrans==TRANS_WRITE)\x00eLock==READ_LOCK || pBt->inTransaction==TRANS_WRITE\x00pIter->eLock==READ_LOCK || pIter->eLock==WRITE_LOCK\x00eLock==READ_LOCK || pIter->pBtree==p || pIter->eLock==READ_LOCK\x00p==pBt->pWriter\x00querySharedCacheTableLock\x00pParse->checkSchema\x00sqlite3SchemaMutexHeld(db, iDb, 0)\x00schemaIsValid\x00sqlite3BtreeIsInReadTrans\x00pBt->inTransaction==TRANS_WRITE || IfNotOmitAV(pBt->bDoTruncate)==0\x00p->lock.pBtree==p && p->lock.iTable==1\x00!pBt->pWriter\x00sqlite3BtreeBeginTrans\x00pBt->pPage1==0\x00@ \x00(pageSize & 7)==0\x00pBt->maxLeaf + 23 <= MX_CELL_SIZE(pBt)\x00lockBtree\x00sqlite3PcacheRefCount(pPager->pPCache)==0\x00pPager->eState==PAGER_OPEN || pPager->eState==PAGER_READER\x00pPager->tempFile==0 || pPager->eLock==EXCLUSIVE_LOCK\x00pPager->eLock==NO_LOCK || pPager->eLock==UNKNOWN_LOCK\x00!pPager->tempFile\x00pPager->eState==PAGER_OPEN\x00(pPager->eLock==SHARED_LOCK) || (pPager->exclusiveMode && pPager->eLock>SHARED_LOCK)\x00pPager->pWal==0 || rc==SQLITE_OK\x00sqlite3PagerSharedLock\x00(pPager->eLock>=locktype) || (pPager->eLock==NO_LOCK && locktype==SHARED_LOCK) || (pPager->eLock==RESERVED_LOCK && locktype==EXCLUSIVE_LOCK)\x00pager_wait_on_lock\x00eLock==SHARED_LOCK || eLock==RESERVED_LOCK || eLock==EXCLUSIVE_LOCK\x00pagerLockDb\x00jrnlOpen==0 || ( sqlite3OsDeviceCharacteristics(pPager->jfd) & SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN )\x00hasHotJournal\x00pPager->eLock>=SHARED_LOCK\x00pagerPagecount\x00sqlite3WalDbsize\x00pagerOpenWalIfPresent\x00pPager->eState==PAGER_OPEN || pbOpen\x00pPager->eState==PAGER_READER || !pbOpen\x00pbOpen==0 || *pbOpen==0\x00pbOpen!=0 || (!pPager->tempFile && !pPager->pWal)\x00sqlite3PagerOpenWal\x00pPager->pWal==0 && pPager->tempFile==0\x00pPager->eLock==SHARED_LOCK || pPager->eLock==EXCLUSIVE_LOCK\x00pagerOpenWal\x00pagerExclusiveLock\x00zWalName && zWalName[0]\x00pDbFd\x00sqlite3WalOpen\x00pagerBeginReadTransaction\x00pWal->readLock<0\x00thisMark!=READMARK_NOT_USED\x00rc==SQLITE_BUSY || (pWal->readOnly & WAL_SHM_RDONLY)!=0\x00mxReadMark<=pWal->hdr.mxFrame\x00walTryBeginRead\x00SQLite format 3\x00pPager->eState>=PAGER_READER && pPager->eState<PAGER_ERROR\x00rc==SQLITE_OK || pPager->eState==PAGER_READER\x00rc!=SQLITE_OK || pPager->eState==PAGER_WRITER_LOCKED\x00sqlite3PagerBegin\x00pWal->writeLock==0 && pWal->iReCksum==0\x00sqlite3WalBeginWriteTransaction\x00pP1!=0\x00pBt->usableSize<=pBt->pageSize && pBt->usableSize+255>=pBt->pageSize\x00pBt->autoVacuum==1 || pBt->autoVacuum==0\x00pBt->incrVacuum==1 || pBt->incrVacuum==0\x00newDatabase\x00sqlite3PagerPagenumber(pPage->pDbPage)==pPage->pgno\x00sqlite3PagerGetData(pPage->pDbPage) == data\x00sqlite3PagerIswriteable(pPage->pDbPage)\x00pBt->pageSize>=512 && pBt->pageSize<=65536\x00zeroPage\x00pPage->hdrOffset==(pPage->pgno==1 ? 100 : 0)\x00decodeFlags\x00nSize==debuginfo.nSize || CORRUPT_DB\x00cellSizePtr\x00pPage->leaf==0 || pPage->leaf==1\x00pPage->intKeyLeaf\x00pPage->childPtrSize==0\x00btreeParseCellPtr\x00pPage->childPtrSize==4\x00debuginfo.nSize==(u16)(pIter - pCell) || CORRUPT_DB\x00cellSizePtrNoPayload\x00pPage->leaf==0\x00btreeParseCellPtrNoPayload\x00pPage->intKeyLeaf==0\x00btreeParseCellPtrIndex\x00pBt->db\x00sqlite3_mutex_held(pBt->db->mutex)\x00btreeInvokeBusyHandler\x00sqlite3InvokeBusyHandler\x00sqlite3PagerOpenSavepoint\x00nSavepoint>nCurrent && pPager->useJournal\x00pPager->nSavepoint==nSavepoint\x00pagerOpenSavepoint\x00sqlite3WalSavepoint\x00pPg->flags&PGHDR_DIRTY\x00!subjRequiresPage(pPg) || pPg->pgno<=pPg->pPager->dbSize\x00assertTruncateConstraintCb\x00p->inTrans>TRANS_NONE\x00SQLITE_OK==querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK)\x00pBt->pPage1\x00idx>=0 && idx<=15\x00sqlite3BtreeGetMeta\x00pPager->eState>PAGER_OPEN\x00sqlite3PagerDataVersion\x00iDb<db->nDb\x00pDb->pSchema!=0\x00sqlite3ResetOneSchema\x00pBt->autoVacuum\x00nRef>=sqlite3PagerRefcount(pPager)\x00autoVacuumCommit\x00invalidateAllOverflowCache\x00iLastPg>nFin\x00iFreePg==iLastPg\x00iFreePg<iLastPg\x00incrVacuumStep\x00eMode==BTALLOC_ANY || (nearby>0 && IfNotOmitAV(pBt->autoVacuum))\x00nearby>0\x00pTrunk!=0\x00pTrunk->aData!=0\x00pPrevTrunk==0\x00sqlite3PagerIswriteable(pPage1->pDbPage)\x00pBt->nPage!=PENDING_BYTE_PAGE(pBt)\x00*pPgno!=PENDING_BYTE_PAGE(pBt)\x00rc!=SQLITE_OK || sqlite3PagerPageRefcount((*ppPage)->pDbPage)<=1\x00rc!=SQLITE_OK || (*ppPage)->isInit==0\x00allocateBtreePage\x00eType==PTRMAP_OVERFLOW2 || eType==PTRMAP_OVERFLOW1 || eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE\x00pDbPage->pBt==pBt\x00relocatePage\x00pPg->nRef>0\x00pPager->eState==PAGER_WRITER_CACHEMOD || pPager->eState==PAGER_WRITER_DBMOD\x00pPager->tempFile || !MEMDB\x00pPager->journalMode==PAGER_JOURNALMODE_OFF || pageInJournal(pPager, pPg) || pPg->pgno>pPager->dbOrigSize\x00!pPgOld || pPgOld->nRef==1\x00pPager->pTmpSpace!=0\x00sqlite3PagerMovepage\x00newPgno>0\x00sqlite3PcacheMove\x00sqlite3BitvecClear\x00setChildPtrmaps\x00pPage->pBt!=0\x00pPage->pBt->db!=0\x00pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage)\x00pPage == sqlite3PagerGetExtra(pPage->pDbPage)\x00pPage->aData == sqlite3PagerGetData(pPage->pDbPage)\x00pPage->nCell>0 || top==usableSize || CORRUPT_DB\x00btreeInitPage\x00pCell!=0\x00ptrmapPutOvflPtr\x000==PTRMAP_ISPAGE(pBt, PENDING_BYTE_PAGE(pBt))\x00ptrmapPut\x00modifyPagePointer\x00pPager->dbSize>=nPage\x00sqlite3PagerTruncateImage\x00pPager->eState==PAGER_WRITER_LOCKED || pPager->eState==PAGER_WRITER_CACHEMOD || pPager->eState==PAGER_WRITER_DBMOD || pPager->eState==PAGER_ERROR\x00MEMDB==0 || pPager->tempFile\x00rc!=SQLITE_IOERR_BLOCKED\x00pPager->eState==PAGER_WRITER_DBMOD\x00sqlite3PagerCommitPhaseOne\x00pPager->pWal\x00pList\x00p->pgno < p->pDirty->pgno\x00pList->pDirty==0 || isCommit\x00pagerWalFrames\x00(isCommit!=0)==(nTruncate!=0)\x00(int)pWal->szPage==szPage\x00rc==SQLITE_OK || iWrite==0\x00iOffset==walFrameOffset(iFrame, szPage)\x00sqlite3WalFrames\x00(rc&0xff)!=SQLITE_BUSY\x00walRestartLog\x00p->syncFlags & (SQLITE_SYNC_NORMAL|SQLITE_SYNC_FULL)\x00walWriteToLog\x00pWal->iReCksum>0\x00walRewriteChecksums\x00isDirectMode==0\x00!pPager->tempFile && isOpen(pPager->fd)\x00pPgHdr==0 || rc==SQLITE_OK\x00pager_incr_changecounter\x00writeMasterJournal\x00syncJournal\x00pPager->eState==PAGER_WRITER_CACHEMOD || pPager->eState==PAGER_WRITER_DBMOD || pPager->eState==PAGER_WRITER_LOCKED\x00sqlite3PagerExclusiveLock\x00pPager->tempFile || pPager->eState==PAGER_WRITER_DBMOD\x00isOpen(pPager->fd) || pList->pDirty==0\x00pPager->tempFile && rc==SQLITE_OK\x00rc!=SQLITE_OK || isOpen(pPager->fd)\x00(pList->flags&PGHDR_NEED_SYNC)==0\x00pager_write_pagelist\x00rc!=SQLITE_OK || isOpen(pFile)\x00pagerOpentemp\x00pBt->inTransaction==TRANS_WRITE\x00pBt->nTransaction>0\x00sqlite3BtreeCommitPhaseTwo\x00pPager->eState==PAGER_WRITER_LOCKED || pPager->eState==PAGER_WRITER_FINISHED || (pagerUseWal(pPager) && pPager->eState==PAGER_WRITER_CACHEMOD)\x00pPager->journalOff==JOURNAL_HDR_SZ(pPager) || !pPager->journalOff\x00sqlite3PagerCommitPhaseTwo\x00(&p[1])==pEnd || p[0].db==p[1].db\x00releaseMemArray\x00idx<p->nResColumn\x00var<COLNAME_N\x00!zName || xDel!=SQLITE_DYNAMIC\x00p->aColName!=0\x00rc!=0 || !zName || (pColName->flags&MEM_Term)!=0\x00sqlite3VdbeSetColName\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00selectid\x00order\x00detail\x00isPrepareV2==1 || isPrepareV2==0\x00p->zSql==0\x00sqlite3VdbeSetSql\x00(rc & p->db->errMask)==rc\x00db->nVdbeActive>=db->nVdbeRead\x00db->nVdbeRead>=db->nVdbeWrite\x00db->nVdbeWrite>=0\x00db->nVdbeActive>0 || db->autoCommit==0 || db->nStatement==0\x00p->nFrame==0\x00p->pAuxData==0\x00pCx->pBtx==0 || pCx->eCurType==CURTYPE_BTREE\x00pCx->uc.pCursor!=0\x00pVCur->pVtab->nRef>0\x00sqlite3VdbeFreeCursor\x00pCsr->eCurType==CURTYPE_SORTER\x00sqlite3VdbeSorterClose\x00pSorter->bUseThreads || pSorter->pReader==0\x00pTask->bDone==1\x00ppOut!=0\x00sqlite3ThreadJoin\x00vdbeSorterJoinThread\x00sqlite3VdbeSorterReset\x00pFile\x00sqlite3OsCloseFree\x00pTask->list.aMemory==0\x00vdbeSortSubtaskCleanup\x00closeAllCursors\x00cnt==db->nVdbeActive\x00nWrite==db->nVdbeWrite\x00nRead==db->nVdbeRead\x00checkActiveVdbeCnt\x00sqlite3VdbeEnter\x00FOREIGN KEY constraint failed\x00sqlite3VdbeHalt\x00vdbeLeave\x00i!=1\x00%s-mjXXXXXX9XXz\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00zMaster[sqlite3Strlen30(zMaster)-3]=='9'\x00zFile[0]!=0\x00rc!=SQLITE_BUSY\x00vdbeCommit\x00p->pBt->pPager!=0\x00sqlite3BtreeGetFilename\x00sqlite3BtreeGetJournalname\x00eOp==SAVEPOINT_ROLLBACK || eOp==SAVEPOINT_RELEASE\x00db->nStatement>0\x00p->iStatement==(db->nStatement+db->nSavepoint)\x00vdbeCloseStatement\x00iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK)\x00pBt->nPage>0\x00sqlite3BtreeSavepoint\x00op==SAVEPOINT_RELEASE||op==SAVEPOINT_ROLLBACK||op==SAVEPOINT_BEGIN\x00iSavepoint>=-1\x00sqlite3VtabSavepoint\x00sqlite3VdbeSetChanges\x00p->apCsr[i]==0\x00p->aMem[i].flags==MEM_Undefined\x00Cleanup\x00sqlite3VdbeFinalize\x00db->pVdbe==p\x00sqlite3VdbeDelete\x00p->db==0 || p->db==db\x00sqlite3VdbeClearObject\x00db->lookaside.bDisable >= pParse->disableLookaside\x00sqlite3ParserReset\x00p->startTime>0\x00db->xProfile!=0 || (db->mTrace & SQLITE_TRACE_PROFILE)!=0\x00p->zSql!=0\x00invokeProfileCallback\x00sqlite3LockAndPrepare\x00sqlite3_prepare\x00unknown error\x00abort due to ROLLBACK\x00sqlite3ErrStr\x00not an error\x00SQL logic error or missing database\x00access permission denied\x00callback requested query abort\x00database is locked\x00database table is locked\x00out of memory\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00table contains no data\x00database schema has changed\x00constraint failed\x00datatype mismatch\x00library routine called out of sequence\x00large file support is disabled\x00authorization denied\x00auxiliary database format error\x00bind or column index out of range\x00file is encrypted or is not a database\x00sqlite3_errmsg\x00zDb!=0 || sqlite3BtreeHoldsAllMutexes(db)\x00pSchema\x00sqlite3SchemaMutexHeld(db, j, 0)\x00sqlite3FindIndex\x00sqlite3BtreeSetCacheSize\x00sqlite3PcacheSetCachesize\x00db->aDb[iDb].pBt!=0\x00sqlite_stat1\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00sqlite3AnalysisLoad\x00zDatabase!=0 || sqlite3BtreeHoldsAllMutexes(db)\x00sqlite3FindTable\x00analysisLoader\x00aOut==0\x00aLog!=0\x00pIndex!=0\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00decodeIntArray\x00matchOther<0x80\x00patternCompare\x00!pIdx->hasStat1\x0010==sqlite3LogEst(2)\x0033==sqlite3LogEst(10)\x0023==sqlite3LogEst(5)\x00sqlite3DefaultRowEst\x00main\x00sqlite3_strnicmp(zName, \"pragma_\", 7)==0\x00sqlite3HashFind(&db->aModule, zName)==0\x00sqlite3PragmaVtabRegister\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_size\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_file_format\x00lock_status\x00locking_mode\x00max_page_count\x00mmap_size\x00optimize\x00page_count\x00page_size\x00parser_trace\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00sql_trace\x00stats\x00synchronous\x00table_info\x00temp_store\x00temp_store_directory\x00threads\x00user_version\x00vdbe_addoptrace\x00vdbe_debug\x00vdbe_eqp\x00vdbe_listing\x00vdbe_trace\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00strlen(zBuf) < sizeof(zBuf)-1\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00tbl\x00idx\x00wdth\x00hght\x00flgs\x00seqno\x00desc\x00coll\x00key\x00seq\x00unique\x00origin\x00partial\x00file\x00id\x00table\x00to\x00on_update\x00on_delete\x00match\x00parent\x00fkid\x00busy\x00log\x00checkpointed\x00timeout\x00database\x00status\x00pragmaVtabConnect\x00j < 2\x00pragmaVtabBestIndex\x00j<ArraySize(pCsr->azArg)\x00PRAGMA \x00%Q.\x00=%Q\x00pragmaVtabFilter\x00sqlite3_prepare_v2\x00pCsr->pPragma\x00pragmaVtabNext\x00v->expired==0\x00db->nVdbeWrite>0 || db->autoCommit==0 || (db->nDeferredCons==0 && db->nDeferredImmCons==0)\x00p->startTime==0\x00p->rc==SQLITE_OK\x00rc==SQLITE_ROW || rc==SQLITE_DONE || rc==SQLITE_ERROR || (rc&0xff)==SQLITE_BUSY || rc==SQLITE_MISUSE\x00(p->rc!=SQLITE_ROW && p->rc!=SQLITE_DONE) || p->rc==p->rcApp\x00sqlite3Step\x00(rc & (db->errMask))==rc\x00p->magic==VDBE_MAGIC_INIT || p->magic==VDBE_MAGIC_RESET\x00p->aMem[i].db==p->db\x00sqlite3VdbeRewind\x00sqlite3_reset\x00p->explain\x00p->magic==VDBE_MAGIC_RUN\x00p->rc==SQLITE_OK || p->rc==SQLITE_BUSY || p->rc==SQLITE_NOMEM\x00p->nMem>9\x00pMem->z!=0\x00p->db->mallocFailed\x00%.2x\x00sqlite3VdbeList\x00p->rc==SQLITE_OK || (p->rc&0xff)==SQLITE_BUSY\x00p->bIsReader || p->readOnly!=0\x00p->explain==0\x000 < db->nProgressOps\x00VDBE Program Listing:\x0a\x00VDBE Query Plan:\x0a\x00%s\x0a\x00VDBE Trace:\x0a\x00pOp>=aOp && pOp<&aOp[p->nOp]\x00pOp->p1>0\x00pOp->p1<=(p->nMem+1 - p->nCursor)\x00memIsValid(&aMem[pOp->p1])\x00sqlite3VdbeCheckMemInvariants(&aMem[pOp->p1])\x00pOp->p2>0\x00pOp->p2<=(p->nMem+1 - p->nCursor)\x00memIsValid(&aMem[pOp->p2])\x00sqlite3VdbeCheckMemInvariants(&aMem[pOp->p2])\x00pOp->p3>0\x00pOp->p3<=(p->nMem+1 - p->nCursor)\x00memIsValid(&aMem[pOp->p3])\x00sqlite3VdbeCheckMemInvariants(&aMem[pOp->p3])\x00db->nProgressOps!=0\x00pOp->p1>0 && pOp->p1<=(p->nMem+1 - p->nCursor)\x00VdbeMemDynamic(pIn1)==0\x00pIn1->flags==MEM_Int\x00pOp->p2>=0 && pOp->p2<p->nOp\x00pOp->p3>=0 && pOp->p3<p->nOp\x00!VdbeMemDynamic(pOut)\x00pIn1->u.i>=0 && pIn1->u.i<p->nOp\x00pCaller->opcode==OP_Yield\x00pCaller->p2>=0 && pCaller->p2<p->nOp\x00pOp->p5<=4\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR\x00rc==SQLITE_OK || (p->rc&0xff)==SQLITE_CONSTRAINT\x00rc==SQLITE_OK || db->nDeferredCons>0 || db->nDeferredImmCons>0\x00pOp->p4.pI64!=0\x00!sqlite3IsNaN(*pOp->p4.pReal)\x00pOp->p4.z!=0\x00rc==SQLITE_OK || rc==SQLITE_TOOBIG\x00pOut->szMalloc>0 && pOut->zMalloc==pOut->z\x00VdbeMemDynamic(pOut)==0\x00pIn3->flags & MEM_Int\x00pOp->p1 <= SQLITE_MAX_LENGTH\x00pOp->p1>0 && pOp->p1<=p->nVar\x00pOp->p4.z==0 || pOp->p4.z==sqlite3VListNumToName(p->pVList,pOp->p1)\x00n>0 && p1>0 && p2>0\x00p1+n<=p2 || p2+n<=p1\x00pOut<=&aMem[(p->nMem+1 - p->nCursor)]\x00pIn1<=&aMem[(p->nMem+1 - p->nCursor)]\x00memIsValid(pIn1)\x00pOut!=pIn1\x00(pIn1->flags & MEM_Int)!=0\x00p->nResColumn==pOp->p2\x00pOp->p1+pOp->p2<=(p->nMem+1 - p->nCursor)+1\x00db->flags&SQLITE_CountRows\x00p->usesStmtJournal\x00p->iStatement==0 || db->flags&SQLITE_CountRows\x00memIsValid(&pMem[i])\x00(pMem[i].flags & MEM_Ephem)==0 || (pMem[i].flags & (MEM_Str|MEM_Blob))==0\x00pIn1!=pOut\x00pOp->p4type==P4_COLLSEQ\x00pOp->p4type==P4_FUNCDEF\x00pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor)\x00n==0 || (pOp->p2>0 && pOp->p2+n<=(p->nMem+1 - p->nCursor)+1)\x00pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+n\x00pOp->p4type==P4_FUNCCTX\x00memIsValid(pCtx->argv[i])\x00op==OP_ShiftRight || op==OP_ShiftLeft\x00pOp->p2>=SQLITE_AFF_BLOB && pOp->p2<=SQLITE_AFF_REAL\x00pOp->opcode==OP_Eq || pOp->opcode==OP_Ne\x00(flags1 & MEM_Cleared)==0\x00(pOp->p5 & SQLITE_JUMPIFNULL)==0\x00pIn1!=pIn3\x00pOp->p4type==P4_COLLSEQ || pOp->p4.pColl==0\x00(pIn1->flags & MEM_Dyn) == (flags1 & MEM_Dyn)\x00(pIn3->flags & MEM_Dyn) == (flags3 & MEM_Dyn)\x00pOp->opcode==OP_Ne || pOp->opcode==OP_Eq\x00res2==0 || res2==1\x00pOp>aOp\x00pOp[-1].opcode==OP_Lt || pOp[-1].opcode==OP_Gt\x00pOp[-1].p5 & SQLITE_STOREP2\x00pOp->p4type==P4_INTARRAY\x00pOp->p4.ai\x00pOp[1].opcode==OP_Compare\x00pOp[1].p5 & OPFLAG_PERMUTE\x00pOp[-1].opcode==OP_Permutation\x00pOp[-1].p4type==P4_INTARRAY\x00aPermute!=0\x00p1>0 && p1+mx<=(p->nMem+1 - p->nCursor)+1\x00p2>0 && p2+mx<=(p->nMem+1 - p->nCursor)+1\x00p1>0 && p1+n<=(p->nMem+1 - p->nCursor)+1\x00p2>0 && p2+n<=(p->nMem+1 - p->nCursor)+1\x00memIsValid(&aMem[p1+idx])\x00memIsValid(&aMem[p2+idx])\x00i<pKeyInfo->nField\x00p->aOp[0].opcode==OP_Init\x00pOp->p1>=0 && pOp->p1<p->nCursor\x00p->apCsr[pOp->p1]!=0\x00pC!=0\x00p2<pC->nField\x00pC->eCurType!=CURTYPE_VTAB\x00pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow\x00pC->eCurType!=CURTYPE_SORTER\x00pC->uc.pseudoTableReg>0\x00pReg->flags & MEM_Blob\x00memIsValid(pReg)\x00pC->eCurType==CURTYPE_BTREE\x00pCrsr\x00sqlite3BtreeCursorIsValid(pCrsr)\x00avail<=65536\x00pC->nHdrParsed<=p2\x00p2<pC->nHdrParsed\x00sqlite3VdbeCheckMemInvariants(pDest)\x00t==pC->aType[p2]\x00zAffinity!=0\x00zAffinity[pOp->p2]==0\x00pIn1 <= &p->aMem[(p->nMem+1 - p->nCursor)]\x00nField>0 && pOp->p2>0 && pOp->p2+nField<=(p->nMem+1 - p->nCursor)+1\x00pOp->p3<pOp->p1 || pOp->p3>=pOp->p1+pOp->p2\x00pData0<=pLast\x00zAffinity[0]==0 || pRec<=pLast\x00memIsValid(pRec)\x00i==nHdr\x00j==nByte\x00p->apCsr[pOp->p1]->eCurType==CURTYPE_BTREE\x00db->pSavepoint==0 || db->autoCommit==0\x00p1==SAVEPOINT_BEGIN||p1==SAVEPOINT_RELEASE||p1==SAVEPOINT_ROLLBACK\x00db->pSavepoint || db->isTransactionSavepoint==0\x00checkSavepointCount(db)\x00p->bIsReader\x00cannot open savepoint - SQL statements in progress\x00db->autoCommit==0 || db->nVTrans==0\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00pSavepoint==db->pSavepoint\x00desiredAutoCommit==1 || desiredAutoCommit==0\x00desiredAutoCommit==1 || iRollback==0\x00db->nVdbeActive>0\x00desiredAutoCommit==1\x00cannot commit transaction - SQL statements in progress\x00db->nStatement==0\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00p->readOnly==0 || pOp->p2==0\x00pOp->p1>=0 && pOp->p1<db->nDb\x00DbMaskTest(p->btreeMask, pOp->p1)\x00sqlite3BtreeIsInTrans(pBt)\x00db->nStatement>=0 && db->nSavepoint>=0\x00pOp->p5==0 || pOp->p4type==P4_INT32\x00pOp->p3<SQLITE_N_BTREE_META\x00DbMaskTest(p->btreeMask, iDb)\x00pOp->p2<SQLITE_N_BTREE_META\x00p->readOnly==0\x00pDb->pBt!=0\x00sqlite3SchemaMutexHeld(db, pOp->p1, 0)\x00pOp->p5==0 || pOp->p5==OPFLAG_SEEKEQ\x00pOp->p4type==P4_KEYINFO\x00pCur->iDb==pOp->p3\x00pOp->opcode==OP_OpenWrite || pOp->p5==0 || pOp->p5==OPFLAG_SEEKEQ\x00pOp->opcode==OP_OpenRead || pOp->opcode==OP_ReopenIdx || p->readOnly==0\x00pX!=0\x00p2>0\x00p2<=(p->nMem+1 - p->nCursor)\x00memIsValid(pIn2)\x00(pIn2->flags & MEM_Int)!=0\x00p2>=2\x00pKeyInfo->enc==ENC(db)\x00pKeyInfo->db==db\x00pOp->p1>=0\x00nField>=0\x00pOrig->pBtx!=0\x00pOp->p2>=0\x00pgno==MASTER_ROOT+1\x00pCx->pKeyInfo->db==db\x00pCx->pKeyInfo->enc==ENC(db)\x00isSorter(pC)\x00pOp->p3>=0\x00pOp->p5==0\x00pOp->p2!=0\x00pC->isOrdered\x00pC->uc.pCursor!=0\x00sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ)==0 || CORRUPT_DB\x00pOp->opcode==OP_SeekGE || pOp->opcode==OP_SeekLE\x00pOp[1].opcode==OP_IdxLT || pOp[1].opcode==OP_IdxGT\x00pOp[1].p1==pOp[0].p1\x00pOp[1].p2==pOp[0].p2\x00pOp[1].p3==pOp[0].p3\x00pOp[1].p4.i==pOp[0].p4.i\x00pOp->p4type==P4_INT32\x00nField>0\x00oc!=OP_SeekGT || r.default_rc==-1\x00oc!=OP_SeekLE || r.default_rc==-1\x00oc!=OP_SeekGE || r.default_rc==+1\x00oc!=OP_SeekLT || r.default_rc==+1\x00memIsValid(&r.aMem[i])\x00res!=0\x00oc==OP_SeekGE || oc==OP_SeekGT\x00oc==OP_SeekLT || oc==OP_SeekLE\x00pC->isTable==0\x00memIsValid(&r.aMem[ii])\x00(r.aMem[ii].flags & MEM_Zero)==0 || r.aMem[ii].n==0\x00pIn3->flags & MEM_Blob\x00pC->isTable\x00pCrsr!=0\x00rc==SQLITE_OK || res==0\x00p->apCsr[pOp->p1]->eCurType!=CURTYPE_VTAB\x00sqlite3BtreeCursorIsValid(pC->uc.pCursor)\x00pOp->p3<=pFrame->nMem\x00memIsValid(pMem)\x00(pMem->flags & MEM_Int)!=0\x00pOp->p3==0\x00v>0\x00memIsValid(pData)\x00(pOp->p5 & OPFLAG_ISNOOP) || pC->isTable\x00pOp->p4type==P4_TABLE || pOp->p4type>=P4_STATIC\x00pKey->flags & MEM_Int\x00memIsValid(pKey)\x00pOp->opcode==OP_InsertInt\x00pC->iDb>=0\x00(pOp->p5 & OPFLAG_ISNOOP) || HasRowid(pTab)\x00pData->flags & (MEM_Blob|MEM_Str)\x00pC->deferredMoveto==0\x00pC->movetoTarget==iKey\x00pOp->p4.pTab!=0\x00(pOp->p5 & ~(OPFLAG_SAVEPOSITION|OPFLAG_AUXDELETE))==0\x00rc!=SQLITE_OK || (pOut->flags & MEM_Blob)\x00isSorter(pC)==0\x00pC->nullRow==0\x00pC->uc.pVCur!=0\x00pModule->xRowid\x00pOp->p2==0\x00isSorter(pC)==(pOp->opcode==OP_SorterSort)\x00pOp->p2>0 && pOp->p2<p->nOp\x00pOp->p5<ArraySize(p->aCounter)\x00res==0 || (res==1 && pC->isTable==0)\x00pOp->opcode!=OP_Next || pOp->p4.xAdvance==sqlite3BtreeNext\x00pOp->opcode!=OP_Prev || pOp->p4.xAdvance==sqlite3BtreePrevious\x00pOp->opcode!=OP_NextIfOpen || pOp->p4.xAdvance==sqlite3BtreeNext\x00pOp->opcode!=OP_PrevIfOpen || pOp->p4.xAdvance==sqlite3BtreePrevious\x00pOp->opcode!=OP_Next || pOp->opcode!=OP_NextIfOpen || pC->seekOp==OP_SeekGT || pC->seekOp==OP_SeekGE || pC->seekOp==OP_Rewind || pC->seekOp==OP_Found\x00pOp->opcode!=OP_Prev || pOp->opcode!=OP_PrevIfOpen || pC->seekOp==OP_SeekLT || pC->seekOp==OP_SeekLE || pC->seekOp==OP_Last\x00isSorter(pC)==(pOp->opcode==OP_SorterInsert)\x00pIn2->flags & MEM_Blob\x00pC->eCurType==CURTYPE_BTREE || pOp->opcode==OP_SorterInsert\x00pOp->p2>0 && pOp->p2+pOp->p3<=(p->nMem+1 - p->nCursor)+1\x00!pC->nullRow || pOp->opcode==OP_IdxRowid\x00pOp->p3>=0 && pOp->p3<p->nCursor\x00pTabCur!=0\x00pTabCur->eCurType==CURTYPE_BTREE\x00pTabCur->uc.pCursor!=0\x00pTabCur->isTable\x00pOp->p4type==P4_INTARRAY || pOp->p4.ai==0\x00pOp->opcode==OP_IdxRowid\x00pOp->p5==0 || pOp->p5==1\x00pOp->opcode==OP_IdxLE || pOp->opcode==OP_IdxGT\x00pOp->opcode==OP_IdxGE || pOp->opcode==OP_IdxLT\x00pOp->opcode==OP_IdxLE || pOp->opcode==OP_IdxLT\x00pOp->opcode==OP_IdxGE || pOp->opcode==OP_IdxGT\x00pOp->p1>1\x00resetSchemaOnFault==0 || resetSchemaOnFault==iDb+1\x00DbMaskTest(p->btreeMask, pOp->p2)\x00pC->isEphemeral\x00DbHasProperty(db, iDb, DB_SchemaLoaded)\x00SELECT name, rootpage, sql FROM '%q'.%s WHERE %s ORDER BY rowid\x00nRoot>0\x00aRoot[nRoot]==0\x00(pnErr->flags & MEM_Int)!=0\x00(pnErr->flags & (MEM_Str|MEM_Blob))==0\x00pOp->p5<db->nDb\x00DbMaskTest(p->btreeMask, pOp->p5)\x00z==0\x00pIn3->flags&MEM_Int\x00iSet==-1 || iSet>=0\x00pProgram->nOp>0\x00too many levels of trigger recursion\x00nMem>0\x00pProgram->nMem+pProgram->nCsr==pFrame->nChildMem || (pProgram->nCsr==0 && pProgram->nMem+1==pFrame->nChildMem)\x00pProgram->nCsr==pFrame->nChildCsr\x00(int)(pOp - aOp)==pFrame->pc\x00pFrame->pAuxData==0\x00pIn1->flags&MEM_Int\x00pIn1->flags & MEM_Int\x00t.flags==MEM_Null\x00pOp[-1].opcode==OP_CollSeq\x00(pMem->flags & ~(MEM_Null|MEM_Agg))==0\x00pOp->p2==SQLITE_CHECKPOINT_PASSIVE || pOp->p2==SQLITE_CHECKPOINT_FULL || pOp->p2==SQLITE_CHECKPOINT_RESTART || pOp->p2==SQLITE_CHECKPOINT_TRUNCATE\x00eNew==PAGER_JOURNALMODE_DELETE || eNew==PAGER_JOURNALMODE_TRUNCATE || eNew==PAGER_JOURNALMODE_PERSIST || eNew==PAGER_JOURNALMODE_OFF || eNew==PAGER_JOURNALMODE_MEMORY || eNew==PAGER_JOURNALMODE_WAL || eNew==PAGER_JOURNALMODE_QUERY\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00sqlite3BtreeIsInTrans(pBt)==0\x00p1>=0 && p1<db->nDb\x00DbMaskTest(p->btreeMask, p1)\x00isWriteLock==0 || isWriteLock==1\x00database table is locked: %s\x00(aMem[pOp->p2].flags & MEM_Str)!=0\x00(aMem[pOp->p2].flags & MEM_Static)!=0\x00zTab || db->mallocFailed\x00memIsValid(pQuery)\x00pCur->eCurType==CURTYPE_VTAB\x00(pQuery->flags&MEM_Int)!=0 && pArgc->flags==MEM_Int\x00pModule->xColumn\x00pModule->xNext\x00pVtab->pModule->xRename\x00memIsValid(pName)\x00pName->flags & MEM_Str\x00pOp->p2==1 || pOp->p5==OE_Fail || pOp->p5==OE_Rollback || pOp->p5==OE_Abort || pOp->p5==OE_Ignore || pOp->p5==OE_Replace\x00pOp->p4type==P4_VTAB\x00memIsValid(pX)\x00nArg>1 && apArg[0] && (apArg[0]->flags&MEM_Null)\x00-- \x00pOp->p4.z==0 || strncmp(pOp->p4.z, \"-\" \"- \", 3)==0\x00pOp==p->aOp\x00-- %s\x00SQL-trace: %s\x0a\x00pOp->opcode==OP_Noop || pOp->opcode==OP_Explain\x00pOp>=&aOp[-1] && pOp<&aOp[p->nOp-1]\x00rc=%d\x0a\x00rc\x00statement aborts at %d: [%s] %s\x00DELETE%\x00rc!=SQLITE_OK || nExtraDelete==0 || sqlite3_strlike(\"DELETE%\",p->zSql,0)!=0\x00db->u1.isInterrupted\x00sqlite3VdbeExec\x00SQL: [%s]\x0a\x00REG[%d] = \x00 undefined\x00 NULL\x00 si:%lld\x00 i:%lld\x00 r:%g\x00 (rowset)\x00 subtype=0x%02x\x00(f & (MEM_Static|MEM_Ephem))==0\x00(f & (MEM_Dyn|MEM_Ephem))==0\x00(f & (MEM_Static|MEM_Dyn))==0\x00%d[\x00%02X\x00+%dz\x00sqlite3VdbeMemPrettyPrint\x00(X)\x00(8)\x00(16LE)\x00(16BE)\x00NOT NULL\x00FOREIGN KEY\x00out2Prerelease\x00sqlite3VdbeMemTooBig\x00(pFrom->flags & MEM_RowSet)==0\x00pTo->db==pFrom->db\x00srcType==MEM_Ephem || srcType==MEM_Static\x00sqlite3VdbeMemShallowCopy\x00!VdbeMemDynamic(pTo)\x00vdbeClrCopy\x00pFrom->db==0 || sqlite3_mutex_held(pFrom->db->mutex)\x00pTo->db==0 || sqlite3_mutex_held(pTo->db->mutex)\x00pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db\x00sqlite3VdbeMemMove\x00(pMem->flags & (MEM_Int|MEM_Real))==0\x00(pMem->flags & (MEM_Str|MEM_Blob))!=0\x00computeNumericType\x00(combined_flags & MEM_RowSet)==0\x00pMem1->enc==pMem2->enc || pMem1->db->mallocFailed\x00pMem1->enc==SQLITE_UTF8 || pMem1->enc==SQLITE_UTF16LE || pMem1->enc==SQLITE_UTF16BE\x00!pColl || pColl->xCmp\x00sqlite3MemCompare\x00(flags & ~MEM_TypeMask)==0\x00sqlite3VdbeMemInit\x00(pB1->flags & MEM_Zero)==0 || n1==0\x00(pB2->flags & MEM_Zero)==0 || n2==0\x00sqlite3BlobCompare\x00p->deferredMoveto\x00p->isTable\x00p->eCurType==CURTYPE_BTREE\x00handleDeferredMoveto\x00cursorOwnsBtShared(pCur)\x00sqlite3_mutex_held(pCur->pBtree->db->mutex)\x00pRes\x00(pIdxKey==0)==(pCur->pKeyInfo==0)\x00pCur->eState!=CURSOR_VALID || (pIdxKey==0)==(pCur->curIntKey!=0)\x00pIdxKey->default_rc==1 || pIdxKey->default_rc==0 || pIdxKey->default_rc==-1\x00pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]\x00pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->isInit\x00pCur->eState==CURSOR_INVALID || pCur->apPage[pCur->iPage]->nCell>0\x00pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0\x00pCur->apPage[0]->intKey==pCur->curIntKey\x00pCur->curIntKey || pIdxKey\x00pPage->nCell>0\x00pPage->intKey==(pIdxKey==0)\x00biasRight==0 || biasRight==1\x00nCellKey==intKey\x00lwr+upr>=0\x00(pIdxKey->errCode!=SQLITE_CORRUPT || c==0) && (pIdxKey->errCode!=SQLITE_NOMEM || pCur->pBtree->db->mallocFailed)\x00c==0\x00lwr==upr+1 || (pPage->intKey && !pPage->leaf)\x00pPage->isInit\x00(pCur->curFlags & BTCF_ValidOvfl)==0\x00cursorHoldsMutex(p)\x00cursorOwnsBtShared\x00sqlite3BtreeMovetoUnpacked\x00pRes!=0\x00*pRes==0 || *pRes==1\x00pCur->skipNext==0 || pCur->eState!=CURSOR_VALID\x00sqlite3BtreeNext\x00*pRes==0\x00pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_SKIPNEXT\x00btreeNext\x00pCur->eState>=CURSOR_REQUIRESEEK\x00pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID\x00btreeRestoreCursorPosition\x00nKey==(i64)(int)nKey\x00btreeMoveto\x00sqlite3VdbeAllocUnpackedRecord\x00u<=pKeyInfo->nField + 1\x00sqlite3VdbeRecordUnpack\x00n>3 && n<=9\x00sqlite3GetVarint32\x00sizeof(r1)==sizeof(t2) && memcmp(&r1, &t2, sizeof(r1))==0\x00serialGet\x00pCur->iPage<BTCURSOR_MAX_DEPTH\x00pCur->iPage>=0\x00moveToChild\x00pCur==0 || ppPage==&pCur->apPage[pCur->iPage]\x00pCur==0 || bReadOnly==pCur->curPagerFlags\x00pCur==0 || pCur->iPage>0\x00(*ppPage)->pgno==pgno\x00(*ppPage)->aData==sqlite3PagerGetData(pDbPage)\x00pgno!=0 || rc==SQLITE_CORRUPT\x00getAndInitPage\x00moveToLeftmost\x00pCur->iPage>0\x00pCur->apPage[pCur->iPage]\x00moveToParent\x00iIdx<=pParent->nCell\x00get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild\x00get4byte(findCell(pParent, iIdx))==iChild\x00assertParentIndex\x00flags & MEM_Str\x00(*(u8*)pKey1)<=0x3F || CORRUPT_DB\x00vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, res)\x00nKey>=0\x00szHdr<=(u32)nKey\x00nField <= pKeyInfo->nField+pKeyInfo->nXField\x00vdbeAssertFieldCountWithinLimits\x00vdbeRecordCompareInt\x00pPKey2->pKeyInfo->nField+pPKey2->pKeyInfo->nXField>=pPKey2->nField || CORRUPT_DB\x00pPKey2->pKeyInfo->aSortOrder!=0\x00pPKey2->pKeyInfo->nField>0\x00idx1<=szHdr1 || CORRUPT_DB\x00(pRhs->flags & MEM_Zero)==0 || pRhs->n==0\x00vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, rc)\x00mem1.szMalloc==0\x00CORRUPT_DB || vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, pPKey2->default_rc) || pKeyInfo->db->mallocFailed\x00serial_type<12 || sqlite3SmallTypeSizes[serial_type]==(serial_type - 12)/2\x00sqlite3VdbeSerialTypeLen\x00sqlite3VdbeRecordCompareWithSkip\x00CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7)\x00vdbeRecordDecodeInt\x00pKeyInfo->nField+pKeyInfo->nXField>=pPKey2->nField || CORRUPT_DB\x00pKeyInfo->nField>0\x00vdbeRecordCompareDebug\x00i<10\x00sqlite3VarintLen\x00sqlite3VdbeFindCompare\x00pPKey2->aMem[0].flags & MEM_Str\x00vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, res) || CORRUPT_DB || pPKey2->pKeyInfo->db->mallocFailed\x00vdbeRecordCompareString\x00pCur->skipNext!=SQLITE_OK\x00pCur->apPage[pCur->iPage]!=0\x00pCur->iPage==(-1)\x00pRoot->pgno==pCur->pgnoRoot\x00pRoot->intKey==1 || pRoot->intKey==0\x00moveToRoot\x00p->uc.pCursor!=0\x00sqlite3BtreeCursorHasMoved(p->uc.pCursor)\x00handleMovedCursor\x00pCur!=0\x00pCur->eState!=CURSOR_VALID\x00pCur->skipNext==0\x00sqlite3BtreeCursorRestore\x00pCur!=0 && pCur->iPage>=0 && pCur->apPage[pCur->iPage]\x00pCur->info.nSize>0\x00pCur->info.pPayload>pCur->apPage[pCur->iPage]->aData || CORRUPT_DB\x00pCur->info.pPayload<pCur->apPage[pCur->iPage]->aDataEnd ||CORRUPT_DB\x00fetchPayload\x00sqlite3BtreeCursorIsValid(pCur)\x00!VdbeMemDynamic(pMem)\x00zData!=0\x00sqlite3VdbeMemFromBtree\x00serial_type<128\x00sqlite3VdbeOneByteSerialTypeLen\x00pLen!=0\x00pMem->db->mallocFailed || flags&(MEM_Str|MEM_Blob)\x00sqlite3VdbeSerialType\x00n<=9\x00putVarint64\x00pMem->n + ((pMem->flags & MEM_Zero)?pMem->u.nZero:0) == (int)sqlite3VdbeSerialTypeLen(serial_type)\x00sqlite3VdbeSerialPut\x00n==(db->nSavepoint + db->isTransactionSavepoint)\x00checkSavepointCount\x00p->inTrans==TRANS_WRITE\x00(pBt->btsFlags & BTS_READ_ONLY)==0\x00iStatement>0\x00iStatement>p->db->nSavepoint\x00sqlite3BtreeBeginStmt\x00idx>=1 && idx<=15\x00pBt->pPage1!=0\x00pBt->autoVacuum || iMeta==0\x00iMeta==0 || iMeta==1\x00sqlite3BtreeUpdateMeta\x00iCur>=0 && iCur<p->nCursor\x00allocateCursor\x00wrFlag==0 || wrFlag==BTREE_WRCSR || wrFlag==(BTREE_WRCSR|BTREE_FORDELETE)\x00hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, (wrFlag?2:1))\x00wrFlag==0 || !hasReadConflicts(p, iTable)\x00wrFlag==0 || p->inTrans==TRANS_WRITE\x00pBt->pPage1 && pBt->pPage1->aData\x00wrFlag==0 || (pBt->btsFlags & BTS_READ_ONLY)==0\x00wrFlag==0\x00btreeCursor\x00x==BTREE_SEEK_EQ || x==BTREE_BULKLOAD || x==0\x00sqlite3BtreeCursorHintFlags\x00:memory:\x00pVfs!=0\x00(flags&0xff)==flags\x00(flags & BTREE_UNORDERED)==0 || (flags & BTREE_SINGLE)!=0\x00(flags & BTREE_SINGLE)==0 || isTempDb\x00pBt->nRef>0\x00(pBt->pageSize & 7)==0\x00sqlite3_mutex_held(mutexOpen)\x00rc!=SQLITE_OK || sqlite3BtreeConnectionCount(*ppBtree)>0\x00sqlite3BtreeOpen\x00nUri>=0\x00EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize))\x00EIGHT_BYTE_ALIGNMENT(pPager->jfd)\x00nPathname>0\x00-journal\x00\x00-wal\x00\x00!memDb\x00nolock\x00immutable\x00pPager->memDb==0\x00nExtra>=8 && nExtra<1000\x00tempFile==PAGER_LOCKINGMODE_NORMAL || tempFile==PAGER_LOCKINGMODE_EXCLUSIVE\x00useJournal || pPager->tempFile\x00pPager->fullSync==0\x00pPager->extraSync==0\x00pPager->syncFlags==0\x00pPager->walSyncFlags==0\x00pPager->ckptSyncFlags==0\x00isOpen(pPager->fd) || tempFile\x00sqlite3PagerOpen\x00onoffalseyestruextrafull\x00szExtra>=8\x00sqlite3PcacheOpen\x00(pPg->flags&PGHDR_NEED_SYNC)==0\x00pagerStress\x00sqlite3PagerPageRefcount(pData)>0\x00pageReinit\x00sqlite3PagerReadFileheader\x00((int(*)(void *))(ap[0]))==xBusyHandler\x00ap[1]==pBusyHandlerArg\x00sqlite3PagerSetBusyhandler\x00pgnoRoot>=3 || CORRUPT_DB\x00eType!=PTRMAP_ROOTPAGE\x00eType!=PTRMAP_FREEPAGE\x00sqlite3PagerIswriteable(pBt->pPage1->pDbPage)\x00sqlite3PagerIswriteable(pRoot->pDbPage)\x00(pBt->openFlags & BTREE_SINGLE)==0 || pgnoRoot==2\x00btreeCreateTable\x00pCsr->pKeyInfo && pCsr->pBtx==0\x00pSorter->iMemory==0\x00sqlite3VdbeSorterInit\x00sqlite3BtreePrevious\x00(pCur->curFlags & (BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey))==0\x00pCur->info.nSize==0\x00(pCur->curFlags & (BTCF_ValidOvfl))==0\x00btreePrevious\x00(pCur->curFlags & BTCF_ValidNKey)==0\x00moveToRightmost\x00pCur->aiIdx[ii]==pCur->apPage[ii]->nCell\x00pCur->ix==pCur->apPage[pCur->iPage]->nCell-1\x00pCur->apPage[pCur->iPage]->leaf\x00sqlite3BtreeLast\x00(flags & (BTREE_SAVEPOSITION|BTREE_APPEND))==flags\x00(pCur->curFlags & BTCF_WriteFlag)!=0 && pBt->inTransaction==TRANS_WRITE && (pBt->btsFlags & BTS_READ_ONLY)==0\x00hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2)\x00(pX->pKey==0)==(pCur->pKeyInfo==0)\x00pX->pKey==0\x00(flags & BTREE_SAVEPOSITION)==0 || ((pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey==pCur->info.nKey)\x00pCur->eState==CURSOR_VALID || (pCur->eState==CURSOR_INVALID && loc)\x00pPage->intKey || pX->nKey>=0\x00pPage->leaf || !pPage->intKey\x00newCell!=0\x00szNew==pPage->xCellSize(pPage, newCell)\x00szNew <= MX_CELL_SIZE(pBt)\x00idx<pPage->nCell\x00pPage->leaf\x00pPage->nOverflow==0 || rc==SQLITE_OK\x00rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0\x00pCur->pKey==0\x00pCur->apPage[pCur->iPage]->nOverflow==0\x00sqlite3BtreeInsert\x00sqlite3BtreeHoldsMutex(pBtree)\x00invalidateIncrblobCursors\x00pCell<pPage->aData || pCell>=&pPage->aData[pBt->pageSize] || sqlite3PagerIswriteable(pPage->pDbPage)\x00pX->nKey<=0x7fffffff && pX->pKey!=0\x00nHeader==(int)(info.pPayload - pCell)\x00info.nKey==pX->nKey\x00*pnSize == info.nSize\x00spaceLeft == info.nLocal\x00pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage)\x00pPrior<pPage->aData || pPrior>=&pPage->aData[pBt->pageSize] || sqlite3PagerIswriteable(pPage->pDbPage)\x00pPayload<pPage->aData || pPayload>=&pPage->aData[pBt->pageSize] || sqlite3PagerIswriteable(pPage->pDbPage)\x00pSrc\x00fillInCell\x00pBt->usableSize > 4\x00nOvfl>0 || (CORRUPT_DB && (pInfo->nPayload + ovflPageSize)<ovflPageSize)\x00clearCell\x00btreePageLookup\x00CORRUPT_DB || iPage>1\x00!pMemPage || pMemPage->pgno==iPage\x00pBt->usableSize>32\x00freePage2\x00sqlite3PcacheRef\x00pgno<=pBt->nPage\x00btreeSetHasContent\x00idx>=0 && idx<pPage->nCell\x00CORRUPT_DB || sz==cellSize(pPage, idx)\x00dropCell\x00CORRUPT_DB || iStart>=pPage->hdrOffset+6+pPage->childPtrSize\x00CORRUPT_DB || iEnd <= pPage->pBt->usableSize\x00iSize>=4\x00iStart<=iLast\x00iFreeBlk>iPtr || iFreeBlk==0\x00freeSpace\x00*pRC==SQLITE_OK\x00i>=0 && i<=pPage->nCell+pPage->nOverflow\x00MX_CELL(pPage->pBt)<=10921\x00pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB\x00pPage->nOverflow<=ArraySize(pPage->apOvfl)\x00sz==pPage->xCellSize(pPage, pCell) || (sz==8 && iChild>0)\x00j < ArraySize(pPage->apOvfl)-1\x00j==0 || pPage->aiOvfl[j-1]<(u16)i\x00j==0 || i==pPage->aiOvfl[j-1]+1\x00&data[pPage->cellOffset]==pPage->aCellIdx\x00idx >= 0\x00idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB\x00idx+sz <= (int)pPage->pBt->usableSize\x00get2byte(&data[pPage->hdrOffset+3])==pPage->nCell\x00insertCell\x00nByte>=0\x00pPage->nFree>=nByte\x00pPage->nOverflow==0\x00nByte < (int)(pPage->pBt->usableSize-8)\x00pPage->cellOffset == hdr + 12 - 4*pPage->leaf\x00gap<=65536\x00top<=(int)pPage->pBt->usableSize\x00pSpace>=data && (pSpace - data)<65536\x00pPage->nCell>0 || CORRUPT_DB\x00gap+2+nByte<=top\x00top+nByte <= (int)pPage->pBt->usableSize\x00allocateSpace\x00pc>0\x00pageFindSlot\x00pPage->pBt->usableSize <= SQLITE_MAX_PAGE_SIZE\x00nCell==get2byte(&data[hdr+3])\x00iFree2==0 || iFree2>iFree\x00iFree+get2byte(&data[iFree+2]) <= usableSize\x00iFree2==0 || iFree2+get2byte(&data[iFree2+2]) <= usableSize\x00iFree+sz+sz2+iFree2-(iFree+sz) <= usableSize\x00cbrk+(iFree-top) <= usableSize\x00pc>=iCellFirst && pc<=iCellLast\x00cbrk+size<=usableSize && cbrk>=iCellFirst\x00cbrk>=iCellFirst\x00defragmentPage\x00balance_deeper_called==0\x00pCur->apPage[1]->nOverflow\x00balance_quick_called==0\x00balance\x00pRoot->nOverflow>0\x00sqlite3PagerIswriteable(pChild->pDbPage)\x00pChild->nCell==pRoot->nCell\x00balance_deeper\x00pFrom->isInit\x00pFrom->nFree>=iToHdr\x00get2byte(&aFrom[iFromHdr+5]) <= (int)pBt->usableSize\x00copyNodeContent\x00sqlite3PagerIswriteable(pParent->pDbPage)\x00pPage->nOverflow==1\x00sqlite3PagerIswriteable(pNew->pDbPage)\x00pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF)\x00balance_quick\x00szCell[i]==pPg->xCellSize(pPg, pCell) || CORRUPT_DB\x00rebuildPage\x00pParent->nOverflow==0 || pParent->nOverflow==1\x00pParent->nOverflow==0 || pParent->aiOvfl[0]==iParentIdx\x00bBulk==0 || bBulk==1\x00szScratch<=6*(int)pBt->pageSize\x00EIGHT_BYTE_ALIGNMENT(aSpace1)\x00k==0 || pOld->aiOvfl[k-1]+1==pOld->aiOvfl[k]\x00b.nCell<nMaxCells\x00sz<=pBt->maxLocal+23\x00iSpace1 <= (int)pBt->pageSize\x00leafCorrection==0 || leafCorrection==4\x00leafCorrection==0\x00pOld->hdrOffset==0\x00leafCorrection==4\x00b.szCell[b.nCell]==3 || CORRUPT_DB\x00b.apCell[b.nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB\x00d<nMaxCells\x00r<nMaxCells\x00cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB\x00CORRUPT_DB\x00j<nMaxCells\x00b.apCell[j]!=0\x00iOvflSpace <= (int)pBt->pageSize\x00iPg>=0 && iPg<nNew\x00iPg==0 || cntOld[iPg-1]>=cntNew[iPg-1] || abDone[iPg-1]\x00cntNew[iPg]>=cntOld[iPg] || abDone[iPg+1]\x00apNew[iPg]->nOverflow==0\x00apNew[iPg]->nCell==nNewCell\x00\x01\x01\x01\x01\x01\x00memcmp(abDone, \"\\01\\01\\01\\01\\01\", nNew)==0\x00nOld>0\x00nNew>0\x00nNew==1 || CORRUPT_DB\x00apNew[0]->nFree == (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2) || rc!=SQLITE_OK\x00pParent->isInit\x00balance_nonroot\x00sqlite3_mutex_notheld(mem0.mutex)\x00sqlite3ScratchMalloc\x00N>=0 && N<p->nCell\x00cachedCellSize\x00p->szCell[N]==0\x00computeCellSize\x00pPg->pgno!=iNew\x00sqlite3PagerRekey\x00(iOld-iNew)<nNew || nCell==0 || CORRUPT_DB\x000==memcmp(pCell, &aData[iOff], pCArray->pRef->xCellSize(pCArray->pRef, pCArray->apCell[i+iNew]))\x00sz>0\x00pFree>aData && (pFree - aData)<65536\x00pageFreeArray\x00editPage\x00CORRUPT_DB || pPg->hdrOffset==0\x00(pSlot+sz)<=pCArray->apCell[i] || pSlot>=(pCArray->apCell[i]+sz) || CORRUPT_DB\x00pageInsertArray\x00idx>=0 && idx+N<=p->nCell\x00p->apCell[idx]!=0\x00CORRUPT_DB || p->szCell[idx]==p->pRef->xCellSize(p->pRef, p->apCell[idx])\x00populateCellCache\x00mem0.nScratchFree <= (u32)sqlite3GlobalConfig.nScratch\x00sqlite3ScratchFree\x00pCur->curFlags & BTCF_WriteFlag\x00!hasReadConflicts(p, pCur->pgnoRoot)\x00(flags & ~(BTREE_SAVEPOSITION | BTREE_AUXDELETE))==0\x00MX_CELL_SIZE(pBt) >= nCell\x00pTmp!=0\x00bPreserve && (pCur->iPage==iCellDepth || CORRUPT_DB)\x00pPage==pCur->apPage[pCur->iPage] || CORRUPT_DB\x00(pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell\x00sqlite3BtreeDelete\x00r2->nField==nKeyCol\x00sqlite3VdbeSorterCompare\x00sqlite3VdbeSorterRowkey\x00sqlite3VdbeCursorRestore\x00sqlite3BtreeCursorIsValidNN\x00pCur->apPage[pCur->iPage]->nCell>0\x00sqlite3BtreeFirst\x00sqlite3BtreeRowCountEst\x00pSorter\x00pSorter->list.pList\x00pSorter->pReader==0\x00sqlite3VdbeSorterRewind\x00p->u.iNext<sqlite3MallocSize(pList->aMemory)\x00pTask->pUnpacked->errCode==SQLITE_OK || pTask->pUnpacked->errCode==SQLITE_NOMEM\x00(s1>0 && s1<7) || s1==8 || s1==9\x00(s2>0 && s2<7) || s2==8 || s2==9\x00vdbeSorterCompareInt\x00vdbeSorterSort\x00p1!=0 && p2!=0\x00vdbeSorterMerge\x00pTask->pThread==0 && pTask->bDone==0\x00pTask->list.pList==0\x00pTask->list.aMemory==0 || pSorter->list.aMemory!=0\x00pList->szPMA>0\x00rc!=SQLITE_OK || pTask->file.pFd\x00pTask->file.iEof==0\x00pTask->nPMA==0\x00rc!=SQLITE_OK || pList->pList==0\x00rc!=SQLITE_OK || pTask->file.iEof==iSz\x00vdbeSorterListToPMA\x00p->iBufEnd<p->nBuffer\x00vdbePmaWriteBlob\x00vdbePmaWriterFinish\x00vdbeSorterFlushPMA\x00vdbeSorterCreateThread\x00ppThread!=0\x00xTask!=0\x00sqlite3GlobalConfig.bCoreMutex!=0\x00sqlite3ThreadCreate\x00pTask->bDone==0\x00vdbeSorterFlushThread\x00pSorter->bUseThreads==0 || pSorter->nTask>1\x00pIncr->pTask!=pLast\x00p->pIncr==0 || ( (p->pIncr->pTask==&pSorter->aTask[iTask]) && (iTask!=pSorter->nTask-1 || p->pIncr->bUseThread==0) )\x00pSorter->bUseThreads || pSorter->nTask==1\x00pTask->nPMA>0 || SQLITE_MAX_WORKER_THREADS>0\x00pMain==0\x00vdbeSorterMergeTreeBuild\x00nReader<=SORTER_MAX_MERGE_COUNT\x00vdbeMergeEngineNew\x00pFile->iEof>iStart\x00pReadr->aAlloc==0 && pReadr->nAlloc==0\x00pReadr->aBuffer==0\x00pReadr->aMap==0\x00vdbePmaReaderInit\x00pReadr->pIncr==0 || pReadr->pIncr->bEof==0\x00vdbePmaReaderSeek\x00p->aBuffer\x00nRead>0\x00rc!=SQLITE_IOERR_SHORT_READ\x00aNext!=p->aAlloc\x00vdbePmaReadBlob\x00pIncr->bUseThread\x00vdbeIncrBgPopulate\x00pIncr->bEof==0\x00pIncr->pMerger->pTask==pTask\x00vdbeIncrPopulate\x00vdbeSorterSetupMerge\x00pIncr->bUseThread==0 || eMode==INCRINIT_TASK\x00vdbePmaReaderIncrInit\x00pTask->file2.iEof>0\x00eMode==INCRINIT_ROOT || eMode==INCRINIT_TASK\x00pMerger->pTask==0\x00vdbeMergeEngineInit\x00iOut<pMerger->nTree && iOut>0\x00pTask->pUnpacked!=0\x00vdbeMergeEngineCompare\x00vdbePmaReaderIncrMergeInit\x00pSorter->bUsePMA || (pSorter->pReader==0 && pSorter->pMerger==0)\x00pSorter->pReader==0 || pSorter->pMerger==0\x00pSorter->bUseThreads==0 || pSorter->pReader\x00pSorter->bUseThreads==1 || pSorter->pMerger\x00pSorter->pMerger!=0\x00pSorter->pMerger->pTask==(&pSorter->aTask[0])\x00sqlite3VdbeSorterNext\x00rc!=SQLITE_OK || pSorter->list.pList==0\x00sqlite3VdbeSorterWrite\x00(nCellKey & SQLITE_MAX_U32)==(u64)nCellKey\x00sqlite3VdbeIdxRowid\x00sqlite3VdbeIdxKeyCompare\x00iTable>=2\x00maxRootPgno!=PENDING_BYTE_PAGE(pBt)\x00btreeDropTable\x00sqlite3BtreeClearTable\x00pPage->intKey || CORRUPT_DB\x00clearDatabasePage\x00sqlite3RootPageMoved\x00zTabName\x00sqlite3UnlinkAndDeleteTable\x00sqlite3UnlinkAndDeleteIndex\x00sqlite3UnlinkAndDeleteTrigger\x00p->inTrans>TRANS_NONE && pBt->inTransaction>TRANS_NONE\x00nRef>=0\x00Main freelist: \x00Page %d is never used\x00Pointer map page %d is referenced\x00nRef==sqlite3PagerRefcount(pBt->pPager)\x00sqlite3BtreeIntegrityCheck\x00iPg<=pCheck->nPage && sizeof(pCheck->aPgRef[0])==1\x00setPageReferenced\x00%d of %d pages missing from overflow list starting at %d\x00failed to get page %d\x00freelist leaf count too big on page %d\x00free-page count in header is too small\x00invalid page number %d\x002nd reference to page %d\x00getPageReferenced\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00Page %d: \x00unable to get the page. error code=%d\x00rc==SQLITE_CORRUPT\x00btreeInitPage() returns error code %d\x00On tree page %d cell %d: \x00contentOffset<=usableSize\x00pPage->nCell==nCell\x00pPage->aCellIdx==&data[cellStart]\x00On page %d at right child: \x00pCellIdx==&data[cellStart + i*2]\x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00pc + info.nSize - 4 <= usableSize\x00Child page depth differs\x00(u32)i<=usableSize-4\x00(u32)(i+size)<=usableSize\x00j==0 || j>i+size\x00(u32)j<=usableSize-4\x00Multiple uses for byte %u of page %d\x00Fragmentation of %d bytes reported as %d on page %d\x00checkTreePage\x00pMem->zMalloc\x00pMem->u.pRowSet!=0\x00sqlite3VdbeMemSetRowSet\x00N >= ROUND8(sizeof(*p))\x00sqlite3RowSetInit\x00p!=0 && (p->rsFlags & ROWSET_NEXT)==0\x00sqlite3RowSetInsert\x00rowSetEntryAlloc\x00p->pForest==0\x00sqlite3RowSetNext\x00pA->pRight==0 || pA->v<=pA->pRight->v\x00pB->pRight==0 || pB->v<=pB->pRight->v\x00rowSetEntryMerge\x00pRowSet!=0 && (pRowSet->rsFlags & ROWSET_NEXT)==0\x00sqlite3RowSetTest\x00pList!=0\x00rowSetListToTree\x00pIn!=0\x00(*ppLast)->pRight==0\x00rowSetTreeToList\x00!pnLog || *pnLog==-1\x00!pnCkpt || *pnCkpt==-1\x00sqlite3Checkpoint\x00sqlite3PagerOkToChangeJournalMode\x00pPager->journalMode==PAGER_JOURNALMODE_WAL\x00sqlite3PagerCloseWal\x00eMode==PAGER_JOURNALMODE_DELETE || eMode==PAGER_JOURNALMODE_TRUNCATE || eMode==PAGER_JOURNALMODE_PERSIST || eMode==PAGER_JOURNALMODE_OFF || eMode==PAGER_JOURNALMODE_WAL || eMode==PAGER_JOURNALMODE_MEMORY\x00pPager->tempFile==0 || eMode!=PAGER_JOURNALMODE_WAL\x00eOld==PAGER_JOURNALMODE_MEMORY || eOld==PAGER_JOURNALMODE_OFF\x00isOpen(pPager->fd) || pPager->exclusiveMode\x00state==PAGER_OPEN || state==PAGER_READER\x00state==pPager->eState\x00Filename: %s\x0aState: %s errCode=%d\x0aLock: %s\x0aLocking mode: locking_mode=%s\x0aJournal mode: journal_mode=%s\x0aBacking store: tempFile=%d memDb=%d useJournal=%d\x0aJournal: journalOff=%lld journalHdr=%lld\x0aSize: dbsize=%d dbOrigSize=%d dbFileSize=%d\x0a\x00OPEN\x00READER\x00WRITER_LOCKED\x00WRITER_CACHEMOD\x00WRITER_DBMOD\x00WRITER_FINISHED\x00ERROR\x00?error?\x00NO_LOCK\x00RESERVED\x00SHARED\x00UNKNOWN\x00exclusive\x00normal\x00memory\x00off\x00delete\x00persist\x00truncate\x00wal\x00sqlite3PagerSetJournalMode\x00iVersion==1 || iVersion==2\x00sqlite3BtreeSetVersion\x00eMode>=0 && eMode<=ArraySize(azModeName)\x00sqlite3JournalModename\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00ATTACH''AS vacuum_db\x00(db->nDb-1)==nDb\x00vacuum_db\x00strcmp(pDb->zDbSName,\"vacuum_db\")==0\x00SELECT sql FROM \"%w\".sqlite_master WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_master WHERE type='index' AND length(sql)>10\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_master WHERE type='table'AND coalesce(rootpage,1)>0\x00(db->flags & SQLITE_Vacuum)!=0\x00INSERT INTO vacuum_db.sqlite_master SELECT*FROM \"%w\".sqlite_master WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x001==sqlite3BtreeIsInTrans(pTemp)\x001==sqlite3BtreeIsInTrans(pMain)\x00sqlite3_strnicmp(zSql,\"SELECT\",6)==0\x00zSubSql[0]!='S'\x00rc!=SQLITE_ROW\x00execSql\x00sqlite3RunVacuum\x00sqlite3BtreeSetSpillSize\x00p->pCache!=0\x00sqlite3PcacheSetSpillsize\x00sqlite3BtreeSetPagerFlags\x00nReserve>=-1 && nReserve<=255\x00nReserve>=0 && nReserve<=255\x00sqlite3BtreeSetPageSize\x00sqlite3BtreeIsInTrans(pTo)\x00b.rc!=SQLITE_OK\x00sqlite3BtreeIsInTrans(pTo)==0\x00sqlite3BtreeCopyFile\x00nSrcPage>=0\x00pgszSrc==sqlite3BtreeGetPageSize(p->pSrc)\x00pgszDest==sqlite3BtreeGetPageSize(p->pDest)\x00nDestTruncate>0\x00nDestTruncate==0 || (i64)nDestTruncate*(i64)pgszDest >= iSize || ( nDestTruncate==(int)(PENDING_BYTE_PAGE(p->pDest->pBt)-1) && iSize>=PENDING_BYTE && iSize<=PENDING_BYTE+pgszDest )\x00sqlite3_backup_step\x00sqlite3BtreeHoldsMutex(p->pSrc)\x00attachBackupObject\x00sqlite3PagerClearCache\x00pBt->inTransaction==TRANS_WRITE && p->inTrans==TRANS_WRITE\x00sqlite3BtreeIncrVacuum\x00p->inTrans!=TRANS_NONE\x00sqlite3BtreeLockTable\x000==(p->db->flags&SQLITE_ReadUncommitted) || eLock==WRITE_LOCK\x00p->sharable\x00SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock)\x00setSharedCacheTableLock\x00sqlite3VdbeMemCopy\x00pTab && IsVirtual(pTab) && !pTab->pVTable\x00no such module: %s\x00sqlite3VtabCallCreate\x00vtable constructor called recursively: %s\x00&db->pVtabCtx\x00xConstruct\x00sCtx.pTab==pTab\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00hidden\x00zType[i-1]==' '\x00vtabCallConstructor\x00p->pVtab\x00xDestroy!=0\x00pTab->pVTable==p && p->pNext==0\x00sqlite3VtabCallDestroy\x00pPager->eState!=PAGER_OPEN\x00pPager->mxPgno>=pPager->dbSize\x00sqlite3PagerMaxPageCount\x00(zRawSql - zStart) > 0\x00zRawSql[0] || nToken==0\x00sqlite3Isdigit(zRawSql[1])\x00zRawSql[0]==':' || zRawSql[0]=='$' || zRawSql[0]=='@' || zRawSql[0]=='#'\x00idx>0\x00idx>0 && idx<=p->nVar\x00'%.*q'\x00zeroblob(%d)\x00pVar->flags & MEM_Blob\x00x'\x00%02x\x00'\x00sqlite3VdbeExpandSql\x00n>0 && tokenType!=TK_ILLEGAL\x00findNextHostParameter\x00sqlite3_mutex_held(sqlite3VdbeDb(p)->mutex)\x00pNew==0\x00sqlite3Reprepare\x00pA->db==pB->db\x00sqlite3VdbeSwap\x00pTo->nVar==pFrom->nVar\x00sqlite3TransferBindings\x00sqlite3_step\x00sqlite3_result_value\x00pTab->nModuleArg==0\x00sqlite3VtabEponymousTableInit\x00pTable\x00view %s is circularly defined\x00pTable->nCol>=0\x00pTable->pSelect\x00pTable->aCol==0\x00sqlite3SchemaMutexHeld(db, 0, pTable->pSchema)\x00sqlite3ViewGetColumnNames\x00pTab\x00sqlite3VtabCallConnect\x00db->lookaside.bDisable\x00sqlite3ResultSetOfSelect\x00pSelect!=0\x00(pSelect->selFlags & SF_Resolved)!=0\x00pTab->nCol==pSelect->pEList->nExpr || db->mallocFailed\x00sqlite3SelectAddColumnTypeAndCollation\x00pNC->pSrcList!=0\x00pTab && pExpr->pTab==pTab\x00!pS\x00iCol==-1 || (iCol>=0 && iCol<pTab->nCol)\x00columnTypeImpl\x00sqlite3ExprCollSeq\x00p==pColl\x00sqlite3CheckCollSeq\x00no such index: %s\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00sqliteProcessJoin\x00(piTab==0)==(piCol==0)\x00tableAndColumnIndex\x00iLeft<iRight\x00pSrc->nSrc>iRight\x00pSrc->a[iLeft].pTab\x00pSrc->a[iRight].pTab\x00!ExprHasProperty(pEq, EP_TokenOnly|EP_Reduced)\x00addWhereTerm\x00p->op!=TK_INTEGER || (p->flags & EP_IntValue)!=0 || sqlite3GetInt32(p->u.zToken, &rc)==0\x00v!=(-2147483647-1)\x00sqlite3ExprIsInteger\x00sqlite3ExprAttachSubtrees\x00sqlite3ExprListFlags\x00Expression tree is too large (maximum depth %d)\x00setJoinExpr\x00sqlite3MatchSpanName\x00pList!=0 || pParse->db->mallocFailed!=0\x00pItem->zName==0\x00sqlite3ExprListSetName\x00pParse->pWith==pWith\x00selectPopWith\x00sqlite3ResolveSelectNames\x00pNC!=0\x00pParse==pWalker->pParse\x00pSrcList->a[i].iCursor>=0 && pSrcList->a[i].iCursor<pParse->nTab\x00the \".\" operator\x00pRight->op==TK_DOT\x00second argument to likelihood() must be a constant between 0.0 and 1.0\x00not authorized to use function: %s\x00non-deterministic functions\x00misuse of aggregate function %.*s()\x00no such function: %.*s\x00wrong number of arguments to function %.*s()\x00pDef!=0\x00subqueries\x00pNC->nRef>=nRef\x00parameters\x00pExpr->pLeft!=0\x00pExpr->pRight!=0\x00resolveExprStep\x00(validMask&~(NC_IsCheck|NC_PartIdx|NC_IdxExpr))==0\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00%s prohibited in %s\x00notValid\x00pNC\x00zCol\x00!ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced)\x00db->aDb[i].zDbSName\x00pNC && cnt==0\x00pTab!=0 && pTab->zName!=0\x00pTab->nCol>0\x00zTabName!=0\x00(pMatch->fg.jointype & JT_RIGHT)==0\x00op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT\x00pExpr->pLeft==0 && pExpr->pRight==0\x00pExpr->x.pList==0\x00pExpr->x.pSelect==0\x00misuse of aliased aggregate %s\x00zTab==0 && zDb==0\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00pMatch->iCursor==pExpr->iTable\x00pTopNC!=0\x00lookupName\x00_ROWID_\x00ROWID\x00OID\x00iCol>=0 && iCol<pEList->nExpr\x00pOrig!=0\x00(pExpr->flags & (EP_Reduced|EP_TokenOnly))==0\x00resolveAlias\x00zC!=0\x00sqlite3ExprAddCollateString\x00pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER\x00pTabList\x00pTab->iPKey<pTab->nCol\x00sqlite3AuthRead\x00access to %s.%s.%s is prohibited\x00access to %s.%s is prohibited\x00r>=0.0\x00exprProbability\x00pExpr->op==TK_AGG_FUNCTION\x00sqlite3FunctionUsesThisSrc\x00exprSrcCount\x00(p->selFlags & SF_Expanded)!=0\x00(p->selFlags & SF_Resolved)==0\x00p->pSrc->nSrc==1 && p->pOrderBy\x00pSub->pPrior && pSub->pOrderBy==0\x00pItem->fg.isCorrelated==0 && nRef<=0\x00(p->selFlags & SF_Aggregate)==0\x00a GROUP BY clause is required before HAVING\x00aggregate functions are not allowed in the GROUP BY clause\x00resolveSelectStep\x00%r %s BY term out of range - should be between 1 and %d\x00sqlite3ExprCompare\x00too many terms in %s BY clause\x00sqlite3ResolveOrderGroupBy\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00too many terms in ORDER BY clause\x00pDup\x00pParent->op==TK_COLLATE\x00pParent->pLeft==pE\x00%r ORDER BY term does not match any column in the result set\x00resolveCompoundOrderBy\x00sqlite3ExprIsInteger(pE, &i)==0\x00resolveOrderByTermToExprList\x00p->selFlags & SF_Resolved\x00(p->selFlags & SF_HasTypeInfo)==0\x00selectAddSubqueryTypeInfo\x00p->pPrior==0\x00pSrc && iFrom>=0 && iFrom<pSrc->nSrc\x00pSub!=0\x00pSubSrc\x00pSub->pSrc!=0\x00pSub->pEList->nExpr==pSub1->pEList->nExpr\x00flatten %s.%p from term %d\x0a\x00compound-subquery flattener creates %s.%p as peer\x0a\x00pParent==p\x00pParent!=p\x00pSrc->a[i+iFrom].fg.isTabFunc==0\x00pParent->pOrderBy==0\x00pSub->pPrior==0\x00pParent->pHaving==0\x00pParent->pGroupBy==0\x00After flattening:\x0a\x00flattenSubquery\x00pSubst->pEList!=0 && pExpr->iColumn<pSubst->pEList->nExpr\x00substExpr\x00sub-select returns %d columns - expected %d\x00substSelect\x00p && p->pPrior\x00(p->selFlags & SF_Recursive)==0 || p->op==TK_ALL || p->op==TK_UNION\x00ORDER BY clause should come after %s not before\x00LIMIT clause should come after %s not before\x00p->pEList\x00p->pEList && pPrior->pEList\x00p->pEList->nExpr==pPrior->pEList->nExpr\x00!pPrior->pLimit\x00Jump ahead if LIMIT reached\x00p->pLimit==0\x00p->pOffset==0\x00p->pOrderBy==0\x00p->addrOpenEphm[0] == -1\x00!pPrior->pOrderBy\x00p->op==TK_UNION\x00unionTab==dest.iSDParm || dest.eDest!=priorOp\x00p->op==TK_INTERSECT\x00p->addrOpenEphm[1] == -1\x00p->pNext==0\x00pLoop->addrOpenEphm[1]<0\x00multiSelect\x00p->selFlags & SF_MultiValue\x00p->selFlags & SF_Values\x00p->op==TK_ALL || (p->op==TK_SELECT && p->pPrior==0)\x00p->pNext==0 || p->pEList->nExpr==p->pNext->pEList->nExpr\x00p->pPrior->pNext==p\x00multiSelectValues\x00Queue table\x00recursive aggregate queries not supported\x00p->pOffset==0 || p->pLimit!=0\x00LIMIT counter\x00OFFSET counter\x00LIMIT+OFFSET\x00CLEAR\x0a\x00computeLimitRegisters\x00generateWithRecursiveQuery\x00sqlite3KeyInfoIsWriteable(pRet)\x00iCol>=0\x00multiSelectCollSeq\x00multiSelectOrderByKeyInfo\x00iContinue!=0\x00eDest==SRT_Set || eDest==SRT_Mem || eDest==SRT_Coroutine || eDest==SRT_Output\x00sqlite3VdbeCurrentAddr(v)==iJump || pParse->db->mallocFailed\x00pDistinct->eTnctType==WHERE_DISTINCT_UNORDERED\x00pSort==0\x00sqlite3Strlen30(pDest->zAffSdst)==nResultCol\x00nResultCol<=pDest->nSdst\x00nResultCol==pDest->nSdst\x00regResult==iParm\x00pSO\x00eDest==SRT_Discard\x00selectInnerLoop\x00target>0\x00pParse->pVdbe!=0\x00sqlite3ExprCodeExprList\x00ConstFactorOk(pParse)\x00sqlite3ExprCodeAtInit\x00addr>=0 && addr<p->nOp\x00sqlite3VdbeChangeToNoop\x00sqlite3VdbeCurrentAddr\x00!usedAsColumnCache(pParse, i, i+n-1)\x00sqlite3GetTempRange\x00bSeq==0 || bSeq==1\x00nData==1 || regData==regOrigData || regOrigData==0\x00nPrefixReg==nExpr+bSeq\x00pSelect->iOffset==0 || pSelect->iLimit!=0\x00pushOntoSorter\x00iFrom>=iTo+nReg || iFrom+nReg<=iTo\x00sqlite3ExprCodeMove\x00sqlite3KeyInfoIsWriteable(pInfo)\x00keyInfoFromExprList\x00j<p->nLabel\x00j>=0\x00sqlite3VdbeResolveLabel\x00p->pOrderBy!=0\x00pKeyDup==0\x00pPrior->pOrderBy==0\x00pOrderBy\x00pItem->u.x.iOrderByCol>0\x00pItem->u.x.iOrderByCol<=p->pEList->nExpr\x00nOrderBy>=nExpr || db->mallocFailed\x00sqlite3KeyInfoIsWriteable(pKeyDup)\x00left SELECT\x00right SELECT\x00Output routine for A\x00Output routine for B\x00eof-A subroutine\x00eof-B subroutine\x00A-lt-B subroutine\x00A-eq-B subroutine\x00A-gt-B subroutine\x00multiSelectOrderBy\x00pDest->eDest!=SRT_Exists\x00pDest->eDest!=SRT_Table\x00pIn->nSdst==1 || pParse->nErr>0\x00pDest->eDest==SRT_Output\x00sqlite3KeyInfoRef\x00generateOutputSubroutine\x00pTabList!=0\x00column%d\x00generateColumnNames\x00op==TK_UNION || op==TK_EXCEPT || op==TK_INTERSECT || op==TK_ALL\x00COMPOUND SUBQUERIES %d AND %d %s(%s)\x00USING TEMP B-TREE \x00explainComposite\x00(wctrlFlags & WHERE_ONEPASS_MULTIROW)==0 || ( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 && (wctrlFlags & WHERE_OR_SUBCLAUSE)==0 )\x00(wctrlFlags & WHERE_OR_SUBCLAUSE)==0 || (wctrlFlags & WHERE_USE_LIMIT)==0\x00at most %d tables in a join\x00pWInfo->eOnePass==ONEPASS_OFF\x00EIGHT_BYTE_ALIGNMENT(sWLB.pNew)\x00m==MASKBIT(ii)\x00(wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1\x00pTabItem->iCursor==pLevel->iTabCur\x00n<=pTab->nCol\x00iAuxArg!=0 || (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0\x00wctrlFlags & WHERE_ONEPASS_DESIRED\x00pIx->pSchema==pTab->pSchema\x00iIndexCur>=0\x00sqlite3WhereBegin\x00jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0\x00pExpr->op!=TK_ISNULL || op==OP_NotNull\x00pExpr->op!=TK_NOTNULL || op==OP_IsNull\x00pExpr->op!=TK_NE || op==OP_Eq\x00pExpr->op!=TK_EQ || op==OP_Ne\x00pExpr->op!=TK_LT || op==OP_Ge\x00pExpr->op!=TK_LE || op==OP_Gt\x00pExpr->op!=TK_GT || op==OP_Le\x00pExpr->op!=TK_GE || op==OP_Lt\x00sqlite3ExprIfFalse\x00pParse->iCacheLevel>=1\x00POP to %d\x0a\x00sqlite3ExprCachePop\x00sqlite3ExprIfTrue\x00sqlite3BinaryCompareCollSeq\x00exprCodeBetween\x00begin IN expr\x00pParse->nErr || nVector==1 || eType==IN_INDEX_EPH || eType==IN_INDEX_INDEX_ASC || eType==IN_INDEX_INDEX_DESC\x00cnt==1\x00destIfNull==destIfFalse\x00end IN expr\x00sqlite3ExprCodeIN\x00pX->op==TK_IN\x00p->pEList->a[0].pExpr!=0\x00p->pSrc!=0\x00idxaff==SQLITE_AFF_TEXT\x00pReq!=0 || pRhs->iColumn==XN_ROWID || pParse->nErr\x00pIdx->azColl[j]\x00i==nExpr || colUsed!=(MASKBIT(nExpr)-1)\x00USING INDEX %s FOR IN-OPERATOR\x00sqlite3FindInIndex\x00p->pTab!=0\x00sqlite3ExprCanBeNull\x00pTab->pSelect==0\x00pRes->iTable==pSrc->a[0].iCursor\x00isCandidateForInOpt\x00iDb>=0 && iDb<pParse->db->nDb\x00pParse->db->aDb[iDb].pBt!=0 || iDb==1\x00iDb<SQLITE_MAX_ATTACHED+2\x00sqlite3SchemaMutexHeld(pParse->db, iDb, 0)\x00sqlite3CodeVerifySchema\x00unable to open a temporary database file for storing temporary tables\x00db->aDb[1].pSchema\x00sqlite3OpenTempDatabase\x00first_entry_in(%d)\x00!ExprHasProperty(pIn, EP_xIsSelect)\x00sqlite3InRhsIsConstant\x00pMaskSet->n < ArraySize(pMaskSet->ix)\x00createMask\x00too many arguments on %s() - max %d\x00sqlite3WhereTabFuncArgs\x00pMaskSet->n<=(int)sizeof(Bitmask)*8\x00sqlite3WhereGetMask\x00pExpr->op!=TK_AS && pExpr->op!=TK_COLLATE\x00pExpr->pRight==0\x00ON clause references tables to its right\x00op==TK_IN\x00pLeft->op==TK_VECTOR\x00pTerm->iField==0\x00pList->nExpr==2\x00pWC->op==TK_AND\x00NOCASE\x00exprAnalyze\x00!ExprHasProperty(p, EP_TokenOnly)\x00sqlite3WhereExprUsage\x00exprSelectUsage\x00op<=TK_GE\x00exprMightBeIndexed\x00allowedOp(op)\x00(WO_EQ<<(op-TK_EQ)) < 0x7fff\x00op!=TK_ISNULL || c==WO_ISNULL\x00op!=TK_IN || c==WO_IN\x00op!=TK_EQ || c==WO_EQ\x00op!=TK_LT || c==WO_LT\x00op!=TK_LE || c==WO_LE\x00op!=TK_GT || c==WO_GT\x00op!=TK_GE || c==WO_GE\x00op!=TK_IS || c==WO_IS\x00operatorMask\x00allowedOp(pExpr->op) && pExpr->op!=TK_IN\x00pExpr->op>=TK_GT && pExpr->op<=TK_GE\x00exprCommute\x00(pTerm->wtFlags & (TERM_DYNAMIC|TERM_ORINFO|TERM_ANDINFO))==0\x00pExpr->op==TK_OR\x00pOrWc->nTerm>=2\x00(pOrTerm->wtFlags & (TERM_ANDINFO|TERM_ORINFO))==0\x00pAndTerm->pExpr\x00pOrTerm->eOperator & WO_EQ\x00j==1\x00pOrTerm->wtFlags & (TERM_COPIED|TERM_VIRTUAL)\x00IsPowerOfTwo(chngToIN)\x00chngToIN==sqlite3WhereGetMask(&pWInfo->sMaskSet, iCursor)\x00pOrTerm->leftCursor==iCursor\x00pOrTerm->u.leftColumn==iColumn\x00pLeft!=0\x00!ExprHasProperty(pNew, EP_xIsSelect)\x00exprAnalyzeOrTerm\x00pOne->pExpr->pLeft!=0 && pOne->pExpr->pRight!=0\x00pTwo->pExpr->pLeft!=0 && pTwo->pExpr->pRight!=0\x00eOp & (WO_GT|WO_GE)\x00op<TK_GE\x00whereCombineDisjuncts\x00pRight->op==TK_VARIABLE || pRight->op==TK_REGISTER\x00(char*)&likeInfoAlt == (char*)&likeInfoAlt.matchAll\x00&((char*)&likeInfoAlt)[1] == (char*)&likeInfoAlt.matchOne\x00&((char*)&likeInfoAlt)[2] == (char*)&likeInfoAlt.matchSet\x00sqlite3IsLikeFunction\x00iVar>0\x00sqlite3VdbeGetBoundValue\x00sqlite3VdbeSetVarmask\x00isLikeOrGlob\x00regexp\x00pVector->flags & EP_xIsSelect\x00pRet==0 || pRet->iTable==0\x00sqlite3ExprForVectorField\x00pScan->iEquiv<=pScan->nEquiv\x00pWC!=0\x00pX->pLeft\x00whereScanNext\x00pExpr->op==TK_EQ || pExpr->op==TK_IN || pExpr->op==TK_LT || pExpr->op==TK_GT || pExpr->op==TK_GE || pExpr->op==TK_LE || pExpr->op==TK_NE || pExpr->op==TK_IS || pExpr->op==TK_ISNOT\x00pExpr->pLeft\x00comparisonAffinity\x00iCol>=0 && iCol<pIdx->nColumn\x00j==(-2)\x00indexColumnNotNull\x00pWInfo->pTabList->nSrc>=1\x00pLoop->aLTermSpace==pLoop->aLTerm\x00pWInfo->sMaskSet.n==1 && iCur==pWInfo->sMaskSet.ix[0]\x00whereShortCut\x00(mPrereq & mUnusable)==0\x00IsVirtual(pSrc->pTab)\x00bIn==0\x00mNext>0\x00whereLoopAddVirtual\x00IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV)\x00pTerm->u.leftColumn>=(-1)\x00pTerm->eOperator & (WO_IN|WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_MATCH)\x00allocateIndexInfo\x00(mUsable & mPrereq)==mPrereq\x00pIdxInfo->needToFreeIdxStr==0\x00pNew->nLSlot>=nConstraint\x00%s.xBestIndex malfunction\x00iTerm<pNew->nLSlot\x00(mExclude & WO_IN)==0\x00pNew->nLTerm<=pNew->nLSlot\x00whereLoopAddVirtualOne\x00p->rSetup==0 || pTemplate->rSetup==0 || p->rSetup==pTemplate->rSetup\x00p->rSetup>=pTemplate->rSetup\x00whereLoopFindLesser\x00!IsVirtual(pSrc->pTab)\x0043==sqlite3LogEst(20)\x00(pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || b==0\x00whereLoopAddBtree\x00(pLoop->wsFlags & WHERE_AUTO_INDEX)==0\x00whereLoopOutputAdjust\x00(pNew->wsFlags & WHERE_VIRTUALTABLE)==0\x00(pNew->wsFlags & WHERE_TOP_LIMIT)==0\x00pNew->u.btree.nBtm==0\x00pNew->u.btree.nEq<pProbe->nColumn\x00nInMul==0 || (pNew->wsFlags & WHERE_COLUMN_NULL)!=0 || (pNew->wsFlags & WHERE_COLUMN_IN)!=0 || (pNew->wsFlags & WHERE_SKIPSCAN)!=0\x0046==sqlite3LogEst(25)\x00nIn>0\x00saved_nEq==pNew->u.btree.nEq\x00(pTop-(pTerm->pWC->a))<pTerm->pWC->nTerm\x00pTop->wtFlags & TERM_LIKEOPT\x00pTop->eOperator==WO_LT\x00eOp & (WO_LT|WO_LE)\x00pNew->nOut==saved_nOut\x00eOp & (WO_ISNULL|WO_EQ|WO_IN|WO_IS)\x00(eOp & WO_IN) || nIn==0\x0042==sqlite3LogEst(18)\x00whereLoopAddBtreeIndex\x00pLower || pUpper\x00pUpper==0 || (pUpper->wtFlags & TERM_VNULL)==0\x00whereRangeScanEst\x0020==sqlite3LogEst(4)\x00whereRangeAdjust\x00rc==SQLITE_OK || sCur.n==0\x00whereLoopAddOr\x00nLoop<=pWInfo->pTabList->nSrc\x00aSortCost==0 || &pSpace[nSpace]==(char*)&aSortCost[nOrderBy]\x00aSortCost!=0 || &pSpace[nSpace]==(char*)pX\x0048==sqlite3LogEst(28)\x00aFrom[0].isOrdered==0\x00no query solution\x00pWInfo->nLevel==nLoop\x00pWInfo->sorted==0\x00wherePathSolver\x00pOrderBy!=0\x00wctrlFlags & WHERE_ORDERBY_LIMIT\x00nColumn==nKeyCol+1 || !HasRowid(pIndex->pTable)\x00pIndex->aiColumn[nColumn-1]==XN_ROWID || !HasRowid(pIndex->pTable)\x00j>=pLoop->u.btree.nEq || (pLoop->aLTerm[j]==0)==(j<pLoop->nSkip)\x00(pLoop->aLTerm[i]->eOperator & WO_IN)\x00wherePathSatisfiesOrderBy\x00nOrderBy>0 && 66==sqlite3LogEst(100)\x00whereSortingCost\x00!ExprHasProperty(pExpr, EP_FromJoin) || pExpr->iRightJoinTable!=pSrc->iCursor || pLoop->prereq!=0\x00automatic index on %s(%s)\x00nKeyCol>0\x00auto-index\x00(u32)n==pLoop->u.btree.nEq\x00n==nKeyCol\x00pLevel->iIdxCur>=0\x00for %s\x00next row of \"%s\"\x00constructAutomaticIndex\x00pIdx->aColExpr\x00pIdx->aColExpr->nExpr>iIdxCol\x00sqlite3ExprCodeLoadIndexColumn\x00x==XN_EXPR\x00pIdx->aColExpr!=0\x00sqlite3IndexAffinityStr\x00SEARCH\x00SCAN\x00 SUBQUERY %d\x00 TABLE %s\x00 AS %s\x00pLoop->u.btree.pIndex!=0\x00!(flags&WHERE_AUTO_INDEX) || (flags&WHERE_IDX_ONLY)\x00PRIMARY KEY\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00=\x00>? AND rowid<\x00>\x00flags&WHERE_TOP_LIMIT\x00<\x00 USING INTEGER PRIMARY KEY (rowid%s?)\x00 VIRTUAL TABLE INDEX %d:%s\x00sqlite3WhereExplainOneScan\x00 (\x00 AND \x00%s=?\x00ANY(%s)\x00<expr>\x00nTerm>=1\x00(\x00,\x00explainAppendTerm\x00init LEFT JOIN no-match flag\x00pLevel->u.in.aInLoop!=0 || db->mallocFailed\x00iIn>0\x00pOp->opcode==OP_Column || pOp->opcode==OP_Rowid\x00pOp->opcode!=OP_Column || pOp->p3==iReg+j+2\x00pOp->opcode!=OP_Rowid || pOp->p2==iReg+j+2\x00pCompare!=0 || db->mallocFailed\x00pLoop->u.btree.nEq==1\x00pTerm!=0\x00pTerm->pExpr!=0\x00omitTable==0\x00pStart!=0 || pEnd!=0\x00(pStart->wtFlags & TERM_VNULL)==0\x00(pEnd->wtFlags & TERM_VNULL)==0\x00pLevel->p5==0\x00nEq>=pLoop->nSkip\x00pWInfo->pOrderBy==0 || pWInfo->pOrderBy->nExpr==1 || (pWInfo->wctrlFlags&WHERE_ORDERBY_MIN)==0\x00pLoop->nSkip==0\x00(pRangeStart->wtFlags & TERM_LIKEOPT)==0 || (pLoop->wsFlags & WHERE_TOP_LIMIT)!=0\x00pRangeStart!=0\x00pRangeStart->wtFlags & TERM_LIKEOPT\x00LIKE loop counter\x00(bRev & ~1)==0\x00pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0\x00zStartAff==0 || sqlite3Strlen30(zStartAff)>=nEq\x00op!=0\x00pTerm->eOperator & WO_OR\x00(pTerm->wtFlags & TERM_ORINFO)!=0\x00pSubWInfo || pParse->nErr || db->mallocFailed\x00(pSubLoop->wsFlags & WHERE_AUTO_INDEX)==0\x00pSubWInfo->a[0].iIdxCur==iCovCur\x00bRev==0 || bRev==1\x00pE!=0\x00x>0\x00!ExprHasProperty(pE, EP_FromJoin)\x00(pTerm->prereqRight & pLevel->notReady)!=0\x00record LEFT JOIN hit\x00pWInfo->untestedTerms\x00pTerm->pExpr\x00sqlite3WhereCodeOneLoopStart\x00pLevel->pWLoop->aLTerm[iEq]==pTerm\x00iTarget>0\x00(pLoop->wsFlags & WHERE_MULTI_OR)==0\x00codeEqualityTerm\x00disableTerm\x00nReg>0\x00nReg<=pList->nExpr\x00nReg==1\x00codeExprOrVector\x00(pLoop->wsFlags & WHERE_VIRTUALTABLE)==0\x00zAff!=0 || pParse->db->mallocFailed\x00begin skip-scan on %s\x00zAff==0 || (int)strlen(zAff)>=nEq\x00codeAllEqualityTerms\x00p->iTable>=0\x00sqlite3ExprNeedsNoAffinityChange\x00pLevel->iLikeRepCntr>0\x00pOp!=0\x00pOp->opcode==OP_String8 || pTerm->pWC->pWInfo->pParse->db->mallocFailed\x00whereLikeOptimizationStringFixup\x00codeApplyAffinity\x00iIdxCur>0\x00pIdx->aiColumn[pIdx->nColumn-1]==-1\x00pIdx->aiColumn[i]<pTab->nCol\x00codeDeferredSeek\x00aColExpr->a[iIdxCol].pExpr!=0\x00whereIndexExprTrans\x00next skip-scan on %s\x00(ws & WHERE_IDX_ONLY)==0 || (ws & WHERE_INDEXED)!=0\x00pWInfo->nLevel<=pTabList->nSrc\x00pIdx->pTable==pTab\x00x>=0\x00(pLoop->wsFlags & WHERE_IDX_ONLY)==0 || x>=0 || pWInfo->eOnePass\x00sqlite3WhereEnd\x00whereInfoFree\x00pWInfo->iContinue!=0\x00sqlite3WhereContinueLabel\x00analyzeAggregate\x00sqlite3ExprAnalyzeAggregates\x00USE TEMP B-TREE FOR %s\x00pWInfo->wctrlFlags & WHERE_GROUPBY\x00pWInfo->wctrlFlags & WHERE_SORTBYGROUP\x00sqlite3WhereIsSorted\x00!ExprHasProperty(pF->pExpr, EP_xIsSelect)\x00updateAccumulator\x00finalizeAggFunctions\x00nReg==pAggInfo->mxReg-pAggInfo->mnReg+1\x00pAggInfo->aCol[i].iMem>=pAggInfo->mnReg && pAggInfo->aCol[i].iMem<=pAggInfo->mxReg\x00pAggInfo->aFunc[i].iMem>=pAggInfo->mnReg && pAggInfo->aFunc[i].iMem<=pAggInfo->mxReg\x00!ExprHasProperty(pE, EP_xIsSelect)\x00DISTINCT aggregates must have exactly one argument\x00resetAccumulator\x00!p->pGroupBy\x00pTab && !pTab->pSelect && pExpr\x00isSimpleCount\x00SCAN TABLE %s%s%s\x00 USING COVERING INDEX \x00*ppMinMax==0 || (*ppMinMax)->nExpr==1\x00minMaxQuery\x00addrBreak<0\x00nColumn==sqlite3Strlen30(pDest->zAffSdst)\x00eDest==SRT_Output || eDest==SRT_Coroutine\x00generateSortTail\x00op==TK_VECTOR || op==TK_REGISTER || op==TK_SELECT\x00exprVectorRegister\x00pVtab!=0\x00pVtab->pModule!=0\x00sqlite3VtabOverloadFunction\x00(errCode&0xff)==SQLITE_CONSTRAINT\x00sqlite3HaltConstraint\x00pParse!=0\x00pParse==p->pParse\x00EIGHT_BYTE_ALIGNMENT(x.pSpace)\x00x.nFree>=0\x00EIGHT_BYTE_ALIGNMENT(&x.pSpace[x.nFree])\x00sqlite3VdbeMakeReady\x00(pOp - p->aOp) >= 3\x00pOp[-1].opcode==OP_Integer\x00ADDR(pOp->p2)<pParse->nLabel\x00p->bIsReader!=0 || DbMaskAllZero(p->btreeMask)\x00resolveP2Values\x00EIGHT_BYTE_ALIGNMENT(p->pSpace)\x00EIGHT_BYTE_ALIGNMENT(pBuf)\x00allocSpace\x00sqlite3BeginTransaction\x00pParse->db!=0\x00sqlite3CommitTransaction\x00sqlite3RollbackTransaction\x00temporary table name must be unqualified\x00isTemp==0 || isTemp==1\x00isView==0 || isView==1\x00table %T already exists\x00!db->init.busy || CORRUPT_DB\x00there is already an index named %s\x00sqlite_sequence\x00pName2!=0\x00corrupt database\x00unknown database %T\x00db->init.iDb==0 || db->init.busy || (db->flags & SQLITE_Vacuum)!=0\x00sqlite3TwoPartName\x00sqlite_\x00object name reserved for internal use: %s\x00sqlite3StartTable\x00!db->init.busy || !pSelect\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00view\x00pParse->nTab==1\x00p->aCol==0\x00CREATE %s %.*s\x00UPDATE %Q.%s SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00p==pOld\x00!pSelect && pCons && pEnd\x00sqlite3EndTable\x00pParse->pNewTable==pTab\x00pIdx->nColumn>=pIdx->nKeyCol+n\x00pIdx->nColumn>=j\x00j<pPk->nColumn\x00pPk->nColumn==j\x00pTab->nCol==j\x00convertToWithoutRowidTable\x00pName1 && pName2\x00pName && pName->z\x00index\x00db->mallocFailed==0 || pTab==0\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00pName==0\x00pStart==0\x00pParse->nErr==0\x00altertab_\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00pName->z!=0\x00there is already a table named %s\x00index %s already exists\x00!db->init.busy\x00sqlite_autoindex_%s_%d\x00pList->nExpr==1\x00EIGHT_BYTE_ALIGNMENT(pIndex->aiRowLogEst)\x00EIGHT_BYTE_ALIGNMENT(pIndex->azColl)\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00pCopy!=0\x00j<=0x7fff\x00nExtra>=nColl\x00i==pIndex->nColumn\x00HasRowid(pTab) || pTab->iPKey<0 || sqlite3ColumnOfIndex(pIndex, pTab->iPKey)>=0\x00IsUniqueIndex(pIdx)\x00pIdx->idxType!=SQLITE_IDXTYPE_APPDEF\x00IsUniqueIndex(pIndex)\x00pIdx->aiColumn[k]>=0\x00conflicting ON CONFLICT clauses specified\x00!IN_DECLARE_VTAB\x00sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema)\x00p==pIndex\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.%s VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00sqlite3CreateIndex\x00pItem && pSrc->nSrc==1\x00sqlite3SrcListLookup\x00db->nDb>iDb\x00sqlite3FixInit\x00%s %T cannot reference objects in database %s\x00sqlite3FixSrcList\x00%s cannot use variables\x00p->nExpr>0\x00p->a[p->nExpr-1].sortOrder==SQLITE_SO_ASC\x00sqlite3ExprListSetSortOrder\x00too many columns in %s\x00type==NC_IsCheck || type==NC_PartIdx || type==NC_IdxExpr\x00sqlite3ResolveSelfReference\x00x<pIdx->pTable->nCol\x00estimateIndexWidth\x00pParse->nested<10\x00sqlite3NestedParse\x00pKey!=0 || db->mallocFailed || pParse->nErr\x00sqlite3RefillIndex\x00index '%q'\x00pIdx->aiColumn[j]>=0\x00, \x00sqlite3UniqueConstraint\x00sqlite3ChangeCookie\x00pIdx->isResized==0\x00resizeIndexObject\x00\x0a \x00,\x0a \x00\x0a)\x00CREATE TABLE \x00pCol->affinity-SQLITE_AFF_BLOB >= 0\x00pCol->affinity-SQLITE_AFF_BLOB < ArraySize(azType)\x00pCol->affinity==SQLITE_AFF_BLOB || pCol->affinity==sqlite3AffinityType(zType, 0)\x00k<=n\x00createTableStmt\x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00z<=zTerm\x00sqlite3Utf8CharLen\x00too many columns on %s\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00isInit==0 || isInit==1\x00sqlite3ExprIsConstantOrFunction\x00sqlite3AddNotNull\x00table \"%s\" has more than one primary key\x00pCExpr!=0\x00autoInc==0 || autoInc==1\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00sqlite3AddPrimaryKey\x00pTo!=0\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00sqlite3SchemaMutexHeld(db, 0, p->pSchema)\x00pNextTo->pPrevTo==0\x00sqlite3CreateForeignKey\x00isDeferred==0 || isDeferred==1\x00sqlite3DeferForeignKey\x00pIdx->nKeyCol==1\x00sqlite3AddCollateType\x00pName->nSrc==1\x00isView==0 || isView==LOCATE_VIEW\x00sqlite_stat\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00sqlite3DropTable\x00sqlite_stat%d\x00DELETE FROM %Q.%s WHERE %s=%Q\x00sqlite3FkDropTable\x00pTabList->nSrc==1\x00rcauth==SQLITE_OK || rcauth==SQLITE_DENY || rcauth==SQLITE_IGNORE\x00!isView || pTrigger\x00!isView\x00pIdx->pSchema==pTab->pSchema\x00IsVirtual(pTab)==0 || eOnePass!=ONEPASS_MULTI\x00IsVirtual(pTab) || bComplex || eOnePass!=ONEPASS_OFF\x00pPk->aiColumn[i]>=0\x00pPk || IsVirtual(pTab) || iDataCur==iTabCur\x00pPk || IsVirtual(pTab) || iIdxCur==iDataCur+1\x00nKey==nPk\x00pPk!=0 || pTab->pSelect!=0\x00nKey==0\x00nKey==1\x00eOnePass==ONEPASS_OFF || eOnePass==ONEPASS_SINGLE\x00rows deleted\x00sqlite3DeleteFrom\x00pList==0 || IsVirtual(pTab)==0\x00sqlite3SchemaMutexHeld(pParse->db, 0, pTmpSchema)\x00sqlite3TriggerList\x00sqlite3TriggersExist\x00checkColumnOverlap\x00table %s may not be modified\x00cannot modify %s because it is a view\x00pParse\x00sqlite3AuthContextPush\x00pFrom->nSrc==1\x00pFrom->a[0].pOn==0\x00pFrom->a[0].pUsing==0\x00sqlite3MaterializeView\x00pOffset==0 || pLimit!=0 || pParse->nErr>0 || pParse->db->mallocFailed!=0\x00pNew->pSrc!=0 || pParse->nErr>0\x00pNew!=&standin\x00sqlite3SelectNew\x00op==OP_OpenRead || op==OP_OpenWrite\x00op==OP_OpenWrite || p5==0\x00sqlite3OpenTableAndIndices\x00sqlite3VtabMakeWritable\x00sqlite3GenerateRowDelete\x00isNew==1 || isNew==0\x00sqlite3TriggerColmask\x00pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger)\x00getRowTrigger\x00pTop->pVdbe\x00Start: %s.%s (%s %s%s%s ON %s)\x00-- TRIGGER %s\x00End: %s.%s\x00!pSubParse->pAinc && !pSubParse->pZombieTab\x00!pSubParse->pTriggerPrg && !pSubParse->nMaxArg\x00codeRowTrigger\x00default\x00n/a\x00pParse->pTriggerTab && pParse->pToplevel\x00pStepList\x00pParse->okConstFactor==0\x00pStep->op==TK_SELECT\x00codeTriggerProgram\x00pTrigger || tmask==0\x00no such column: %s\x00(chngRowid & chngPk)==0\x00chngRowid==0 || chngRowid==1\x00chngPk==0 || chngPk==1\x00iCur!=iDataCur || !HasRowid(pTab)\x00pPk\x00chngKey || pTrigger || hasFK || regOldRowid==regNewRowid\x00regOldRowid>0\x00regNew==regNewRowid+1\x00rows updated\x00sqlite3Update\x00updateVirtualTable\x00pIdx->aiColumn[i]>=0\x00ppIdx && *ppIdx==0\x00!paiCol || *paiCol==0\x00nCol>1\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00sqlite3FkLocateIndex\x00sqlite3FkOldmask\x00op==TK_UPDATE || op==TK_INSERT || op==TK_DELETE\x00tr_tm==TRIGGER_BEFORE || tr_tm==TRIGGER_AFTER\x00(op==TK_UPDATE)==(pChanges!=0)\x00p->pSchema!=0\x00p->pTabSchema!=0\x00p->pSchema==p->pTabSchema || p->pSchema==pParse->db->aDb[1].pSchema\x00sqlite3CodeRowTrigger\x00pPrg || pParse->nErr || pParse->db->mallocFailed\x00Call: %s.%s\x00fkey\x00sqlite3CodeRowTriggerDirect\x00onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail || onError==OE_Ignore || onError==OE_Replace\x00onError==OE_Replace\x00%s column %d\x00sqlite3GenerateConstraintChecks\x00pExpr->iColumn>=0 || pExpr->iColumn==-1\x00checkConstraintExprNode\x00%s.rowid\x00iIdxCur+i!=iDataCur || pPk==pIdx\x00sqlite3GenerateRowIndexDelete\x00(regOld==0)!=(regNew==0)\x00isIgnoreErrors==0 || (regOld!=0 && regNew==0)\x00pFKey->nCol==1 || (aiFree && pIdx)\x00pIdx==0 || pIdx->aiColumn[i]>=0\x00regOld==0 && regNew!=0\x00aiCol || pFKey->nCol==1\x00sqlite3FkCheck\x00aiCol[i]!=pTab->iPKey\x00nIncr==1\x00fkLookupParent\x00pIdx==0 || pIdx->pTable==pTab\x00pIdx==0 || pIdx->nKeyCol==pFKey->nCol\x00pIdx!=0 || pFKey->nCol==1\x00pIdx!=0 || HasRowid(pTab)\x00fkScanChildren\x00update_flags==0 || update_flags==OPFLAG_ISUPDATE || update_flags==(OPFLAG_ISUPDATE|OPFLAG_SAVEPOSITION)\x00pParse->nested==0\x00sqlite3CompleteInsertion\x00iFromCol>=0\x00pIdx!=0 || (pTab->iPKey>=0 && pTab->iPKey<pTab->nCol)\x00pStep!=0\x00fkActionTrigger\x00autoIncrementEnd\x00pSrc->nSrc>0\x00targetSrcList\x00(pTrigger && tmask) || (pTrigger==0 && tmask==0)\x00!pTrigger\x00pList==0\x00!withoutRowid\x00table %S has no column named %s\x00pSelect->pEList\x00useTempTable==0\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00pIdx\x00pSelect==0\x00rows inserted\x00sqlite3Insert\x00pSelect->pSrc\x00pSelect->pOffset==0\x00pEList->a[0].pExpr\x00pDestCol->pDflt==0 || pDestCol->pDflt->op==TK_SPAN\x00pSrcCol->pDflt==0 || pSrcCol->pDflt->op==TK_SPAN\x00HasRowid(pDest) || destHasUniqueIdx\x00(pDest->tabFlags & TF_Autoincrement)==0\x00pSrcIdx\x00xferOptimization\x00pDest && pSrc\x00pDest->pTable!=pSrc->pTable\x00pSrc->aColExpr!=0 && pDest->aColExpr!=0\x00xferCompatibleIndex\x00pOp->p4.pVtab!=0\x00readsTable\x00pExpr->op!=TK_REGISTER\x00sqlite3ExprCodeAndCache\x00pFrom->zErrMsg==0 || pFrom->nErr\x00pTo->zErrMsg==0 || pTo->nErr\x00transferParseError\x00aOp && !p->db->mallocFailed\x00DbMaskAllZero(p->btreeMask)\x00sqlite3VdbeTakeOpArray\x00pTrigger->pSchema==pTab->pSchema || pTrigger->pSchema==db->aDb[1].pSchema\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.%s WHERE tbl_name=%Q and type!='trigger'\x00sqlite3CodeDropTable\x00pTable->pSchema==pTrigger->pSchema || iDb==1\x00DELETE FROM %Q.%s WHERE name=%Q AND type='trigger'\x00sqlite3DropTriggerPtr\x00destroyTable\x00iTable>1\x00UPDATE %Q.%s SET rootpage=%d WHERE #%d AND rootpage=#%d\x00destroyRootPage\x00sqlite3SchemaMutexHeld(db, idx, 0)\x00sqliteViewResetAll\x00parameters are not allowed in views\x00sEnd.z[0]!=0\x00sqlite3CreateView\x00too many terms in compound SELECT\x00yy_reduce\x00pList!=0 || db->mallocFailed!=0\x00db->mallocFailed || pItem->pExpr==pSpan->pExpr\x00sqlite3ExprListSetSpan\x00pIndexedBy!=0\x00pItem->fg.notIndexed==0\x00pItem->fg.isIndexedBy==0\x00pItem->fg.isTabFunc==0\x00sqlite3SrcListIndexedBy\x00sqlite3SrcListFuncArgs\x00 \x00pB!=0\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00sqlite3JoinType\x00pList->nExpr==iFirst+i+1\x00pFirst!=0\x00pFirst->op==TK_SELECT_COLUMN\x00sqlite3ExprListAppendVector\x00!ExprHasProperty(pExpr, EP_IntValue|EP_Reduced|EP_TokenOnly)\x00z[0]!=0\x00n==(u32)sqlite3Strlen30(z)\x00z[0]=='?'\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00sqlite3ExprAssignVarNumber\x00pIn==0 || pIn[0]>=3\x00pIn[1]<=pIn[0]\x00sqlite3VListAdd\x00pToken\x00sqlite3ExprFunction\x00sqlite3PExprAddSelect\x00syntax error after column name \"%.*s\"\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.%s WHERE name=%Q AND type='index'\x00sqlite3DropIndex\x00-%T\x00pId2\x00pBt!=0\x00pDb==&db->aDb[0]\x00eMode==PAGER_LOCKINGMODE_NORMAL || eMode==PAGER_LOCKINGMODE_EXCLUSIVE\x00eAuto>=0 && eAuto<=2\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00pCol->pDflt==0 || pCol->pDflt->op==TK_SPAN\x00issisi\x00ssiii\x00siii\x00pParse->nMem<=pPragma->nPragCName\x00iis\x00isi\x00c\x00u\x00isisi\x00db->aDb[i].zDbSName!=0\x00iss\x00is\x00iissssss\x00NONE\x00pParse->nErr>0 || pFK==0\x00x==0\x00pFK->nCol==1\x00si\x00parser: \x00iDb==0 || pId2->z\x00sqlite3SchemaMutexHeld(db, i, 0)\x00*** in database %s ***\x0a\x00pParse->nMem>=8+j\x00sqlite3NoTempsInRange(pParse,1,7+j)\x00NULL value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00iCol!=XN_ROWID && iCol<pTab->nCol\x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00encnames[SQLITE_UTF8].enc==SQLITE_UTF8\x00encnames[SQLITE_UTF16LE].enc==SQLITE_UTF16LE\x00encnames[SQLITE_UTF16BE].enc==SQLITE_UTF16BE\x00unsupported encoding: %s\x00full\x00restart\x00sqlite3LogEst(25)==46\x00ANALYZE \"%w\".\"%w\"\x00pPragma->ePragTyp==PragTyp_BUSY_TIMEOUT\x00unknown\x00closed\x00ss\x00sqlite3Pragma\x00fd!=0\x00sqlite3_file_control\x00p->nOp + N <= p->pParse->nOpAlloc\x00sqlite3VdbeVerifyNoMallocRequired\x00eMode==PAGER_LOCKINGMODE_QUERY || eMode==PAGER_LOCKINGMODE_NORMAL || eMode==PAGER_LOCKINGMODE_EXCLUSIVE\x00pPager->exclusiveMode || 0==sqlite3WalHeapMemory(pPager->pWal)\x00sqlite3PagerLockingMode\x00incremental\x00(pDb->safety_level & PAGER_SYNCHRONOUS_MASK)==pDb->safety_level\x00setAllPagerFlags\x00sqlite3BtreeSetMmapLimit\x00temporary storage cannot be changed from within a transaction\x00c=='i'\x00sqlite3VdbeMultiLoad\x00SET NULL\x00SET DEFAULT\x00NO ACTION\x00action==OE_None\x00actionName\x00LIKE or GLOB pattern too complex\x00zB==sqlite3_value_text(argv[0])\x00ESCAPE expression must be a single character\x00p && p->pFunc\x00sqlite3_user_data\x00likeFunc\x00sqlite3_result_int\x00setLikeOptFlag\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00DEBUG\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_SYNCHRONOUS=2\x00ENABLE_API_ARMOR\x00SYSTEM_MALLOC\x00THREADSAFE=1\x00unknown database: %s\x00sqlite3PcacheShrink\x00aHardLimit[SQLITE_LIMIT_LENGTH]==SQLITE_MAX_LENGTH\x00aHardLimit[SQLITE_LIMIT_SQL_LENGTH]==SQLITE_MAX_SQL_LENGTH\x00aHardLimit[SQLITE_LIMIT_COLUMN]==SQLITE_MAX_COLUMN\x00aHardLimit[SQLITE_LIMIT_EXPR_DEPTH]==SQLITE_MAX_EXPR_DEPTH\x00aHardLimit[SQLITE_LIMIT_COMPOUND_SELECT]==SQLITE_MAX_COMPOUND_SELECT\x00aHardLimit[SQLITE_LIMIT_VDBE_OP]==SQLITE_MAX_VDBE_OP\x00aHardLimit[SQLITE_LIMIT_FUNCTION_ARG]==SQLITE_MAX_FUNCTION_ARG\x00aHardLimit[SQLITE_LIMIT_ATTACHED]==SQLITE_MAX_ATTACHED\x00aHardLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]== SQLITE_MAX_LIKE_PATTERN_LENGTH\x00aHardLimit[SQLITE_LIMIT_VARIABLE_NUMBER]==SQLITE_MAX_VARIABLE_NUMBER\x00aHardLimit[SQLITE_LIMIT_TRIGGER_DEPTH]==SQLITE_MAX_TRIGGER_DEPTH\x00aHardLimit[SQLITE_LIMIT_WORKER_THREADS]==SQLITE_MAX_WORKER_THREADS\x00sqlite3_limit\x00unlocked\x00shared\x00reserved\x00pending\x00p->aOp[i].opcode!=OP_ResultRow\x00sqlite3VdbeVerifyNoResultRow\x00INSERT INTO %Q.%s VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00!pParse->pNewTrigger\x00sqlite3FinishTrigger\x00pName1!=0\x00op==TK_INSERT || op==TK_UPDATE || op==TK_DELETE\x00op>0 && op<0xff\x00temporary trigger may not have qualified name\x00pTableName->nSrc==1\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00cannot create INSTEAD OF trigger on table: %S\x00pParse->pNewTrigger==pTrigger\x00sqlite3BeginTrigger\x00pSelect != 0 || db->mallocFailed\x00sqlite3TriggerInsertStep\x00no such trigger: %S\x00sqlite3DropTrigger\x00v || db->mallocFailed\x00pFunc->nArg==-1 || (pFunc->nArg&0xff)==pFunc->nArg\x00codeAttach\x00sqlite_attach\x00too many attached databases - max %d\x00cannot ATTACH database within transaction\x00z && zName\x00database %s is already in use\x00pVfs\x00database is already attached\x00iDb>=2\x00unable to open database: %s\x00attachFunc\x00*pzErrMsg==0\x00file:\x00localhost\x00invalid uri authority: %.*s\x00octet>=0 && octet<256\x00vfs\x00cache\x00mode\x00access\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00sqlite3ParseUri\x00private\x00ro\x00rw\x00rwc\x00sqlite_detach\x00no such database: %s\x00cannot detach database %s\x00cannot DETACH database within transaction\x00database %s is locked\x00pName1->z\x00unable to identify the object to be reindexed\x00pDb!=0\x00reindexDatabases\x00zColl!=0\x00z!=0 || pIndex->aiColumn[i]<0\x00collationMatch\x00sqlite3Reindex\x00sqlite3BtreeHoldsAllMutexes(pParse->db)\x00pName2!=0 || pName1==0\x00sqlite3Analyze\x00sqlite3VdbeDb(v)==db\x00CREATE TABLE %Q.%s(%s)\x00i<ArraySize(aTable)\x00openStatTable\x00tbl,idx,stat\x00sqlite_stat3\x00sqlite_stat4\x00analyzeDatabase\x00sqlite_%\x00Analysis for %s.%s\x00iDb==sqlite3SchemaToIndex(db, pIdx->pSchema)\x00regChng==(regStat4+1)\x00BBB\x00\"BBB\"[0]==SQLITE_AFF_TEXT\x00analyzeOneTable\x00stat_init\x00nCol>0\x00nKeyCol<=nCol\x00statInit\x00n>=0\x00sqlite3_result_blob\x00stat_push\x00p->nCol>0\x00iChng<p->nCol\x00statPush\x00regOut!=regStat4 && regOut!=regStat4+1\x00iParam==STAT_GET_STAT1\x00callStatGet\x00stat_get\x00argc==1\x00%llu\x00 %llu\x00p->current.anEq[i]\x00z[0]=='\\0' && z>zRet\x00statGet\x00analyzeTable\x00pSrc->nSrc==1\x00there is already another table or index with this name: %s\x00view %s may not be altered\x00UPDATE \"%w\".%s SET sql = sqlite_rename_parent(sql, %Q, %Q) WHERE %s;\x00UPDATE %Q.%s SET sql = CASE WHEN type = 'trigger' THEN sqlite_rename_trigger(sql, %Q)ELSE sqlite_rename_table(sql, %Q) END, tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqlite_autoindex%%' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_master SET sql = sqlite_rename_trigger(sql, %Q), tbl_name = %Q WHERE %s;\x00sqlite3AlterRenameTable\x00table %s may not be altered\x00name=%Q\x00%s OR name=%Q\x00type='trigger' AND (%s)\x00iTrigDb==iDb || iTrigDb==1\x00tbl_name=%Q\x00reloadTableSchema\x00pNew\x00pDflt==0 || pDflt->op==TK_SPAN\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00db->mallocFailed == 1\x00Cannot add a column with non-constant default\x00UPDATE \"%w\".%s SET sql = substr(sql,1,%d) || ', ' || %Q || substr(sql,%d) WHERE type = 'table' AND name = %Q\x00sqlite3AlterFinishAddColumn\x00virtual tables may not be altered\x00Cannot add a column to a view\x00pTab->addColOffset>0\x00pNew->nCol>0\x00nAlloc>=pNew->nCol && nAlloc%8==0 && nAlloc-pNew->nCol<8\x00sqlite_altertab_%s\x00sqlite3AlterBeginAddColumn\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.%s SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name='%q' AND type='table'\x00sqlite3SchemaMutexHeld(db, 0, pSchema)\x00pTab==pOld\x00sqlite3VtabFinishParse\x000==pTable->pIndex\x00pTable->nModuleArg==0\x00(pParse->sNameToken.z==pName2->z && pName2->z!=0) || (pParse->sNameToken.z==pName1->z && pName2->z==0)\x00sqlite3VtabBeginParse\x00pArg->z <= p->z\x00sqlite3VtabArgExtend\x00duplicate WITH table name: %s\x00(pNew!=0 && zName!=0) || db->mallocFailed\x00sqlite3WithAdd\x00stateno<=YY_REDUCE_COUNT\x00i!=YY_REDUCE_USE_DFLT\x00i>=0 && i<YY_ACTTAB_COUNT\x00yy_lookahead[i]==iLookAhead\x00yy_find_reduce_action\x00%sAccept!\x0a\x00yypParser->yytos==yypParser->yystack\x00yy_accept\x00TOKEN.z[0]\x00yy_syntax_error\x00azResult!=0\x00sqlite3_free_table\x00pCtx->pVdbe!=0\x00sqlite3_get_auxdata\x00sqlite3_get_table() called with two or more incompatible queries\x003.19.3\x00RTRIM\x00db->pDfltColl!=0\x00db->mutex!=0 || isThreadsafe==0 || sqlite3GlobalConfig.bFullMutex==0\x00db!=0 || rc==SQLITE_NOMEM\x00openDatabase\x00rc==SQLITE_NOMEM || rc==SQLITE_OK\x00unable to use function %s in the requested context\x00sqlite3RegisterPerConnectionBuiltinFunctions\x00automatic extension loading failed: %s\x00sz > (int)sizeof(LookasideSlot*)\x00setupLookaside\x00\x00\x00\x00*ppDb || rc==SQLITE_NOMEM\x00sqlite3_open16\x00sqlite3_prepare16\x00sqlite3_result_error16\x00sqlite3_result_int64\x00sqlite3_result_null\x00sqlite3_result_text16\x00sqlite3_result_text16be\x00sqlite3_result_text16le\x00sqlite3_set_auxdata\x00no such table column: %s.%s\x00pTo->isPrepareV2 || pTo->expmask==0\x00pFrom->isPrepareV2 || pFrom->expmask==0\x00sqlite3_transfer_bindings\x00sqlite3_prepare16_v2\x00sqlite3_clear_bindings\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00pBlob->pStmt || db->mallocFailed\x00aOp!=0\x00sqlite3_blob_open\x00cannot open value of type %s\x00null\x00no such rowid: %lld\x00rc!=SQLITE_OK || zErr==0\x00rc!=SQLITE_ROW && rc!=SQLITE_DONE\x00blobSeekToRow\x00db == v->db\x00blobReadWrite\x00sqlite3BtreePayloadChecked\x00accessPayloadChecked\x00cursorOwnsBtShared(pCsr)\x00sqlite3_mutex_held(pCsr->pBtree->db->mutex)\x00pCsr->curFlags & BTCF_Incrblob\x00pCsr->eState!=CURSOR_REQUIRESEEK\x00(pCsr->pBt->btsFlags & BTS_READ_ONLY)==0 && pCsr->pBt->inTransaction==TRANS_WRITE\x00hasSharedCacheTableLock(pCsr->pBtree, pCsr->pgnoRoot, 0, 2)\x00!hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot)\x00pCsr->apPage[pCsr->iPage]->intKey\x00sqlite3BtreePutData\x00sqlite3_mutex_alloc\x00vfsList\x00sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER))\x00vfsUnlink\x00sqlite3_vfs_register\x00sqlite3_result_zeroblob\x00(x = va_arg(ap,int))!=0\x00sqlite3_test_control\x00source and destination must be distinct\x00unknown database %s\x00destination database is in use\x00SQLITE_\x00(op-SQLITE_DBSTATUS_LOOKASIDE_HIT)>=0\x00(op-SQLITE_DBSTATUS_LOOKASIDE_HIT)<3\x00sqlite3_db_status\x00eStat==SQLITE_DBSTATUS_CACHE_HIT || eStat==SQLITE_DBSTATUS_CACHE_MISS || eStat==SQLITE_DBSTATUS_CACHE_WRITE\x00sqlite3PagerCacheStat\x00rc!=SQLITE_SCHEMA\x00rc==SQLITE_OK || p->pStmt==0\x00sqlite3_blob_reopen\x00p->pTab==0 || IsVirtual(p->pTab)\x00sqlite3_vtab_config\x00db->vtabOnConflict>=1 && db->vtabOnConflict<=5\x00sqlite3_vtab_on_conflict\x00sqlite3_auto_extension\x00xDel!=SQLITE_DYNAMIC\x00sqlite3_bind_blob64\x00invokeValueDestructor\x00sqlite3_bind_text64\x00sqlite3_result_blob64\x00sqlite3_result_text64\x00sqlite3_mutex_held(pOut->db->mutex)\x00sqlite3_result_zeroblob64\x00(n & 0x7FFFFFFF)==n\x00sqlite3_bind_zeroblob64\x00sqlite3_result_subtype\x00sqlite3PagerFlush\x00compileoptionusedFunc\x00compileoptiongetFunc\x00zIn==sqlite3_value_text(argv[0])\x00trimFunc\x00nByte>0\x00contextMalloc\x00argc>1\x00pColl\x00mask==-1 || mask==0\x00minmaxFunc\x00context->pVdbe!=0\x00pOp->opcode==OP_CollSeq\x00sqlite3GetFuncCollSeq\x00lengthFunc\x00integer overflow\x00absFunc\x00argc==1 || argc==2\x00%.*f\x00roundFunc\x00z2==(char*)sqlite3_value_text(argv[0])\x00upperFunc\x00lowerFunc\x00pBlob==sqlite3_value_blob(argv[0])\x00hexFunc\x00randomBlob\x00%!.20e\x00zBlob==sqlite3_value_blob(argv[0])\x00sqlite3_value_type(argv[0])==SQLITE_NULL\x00quoteFunc\x00zStr==sqlite3_value_text(argv[0])\x00sqlite3_value_type(argv[1])==SQLITE_NULL || sqlite3_context_db_handle(context)->mallocFailed\x00sqlite3_value_type(argv[1])!=SQLITE_NULL\x00zPattern==sqlite3_value_text(argv[1])\x00zRep==sqlite3_value_text(argv[2])\x00nOut<SQLITE_MAX_LENGTH\x00j+nStr-i+1==nOut\x00j<=nOut\x00replaceFunc\x00zeroblobFunc\x00argc==3 || argc==2\x00len==sqlite3_value_bytes(argv[0])\x00p1>=0 && p2>=0\x00substrFunc\x00sumStep\x00argc==1 || p==0 || p->n>0x7fffffff || p->n==sqlite3_aggregate_count(context)\x00countStep\x00groupConcatStep\x00unix\x00unix-none\x00unix-dotfile\x00unix-excl\x00pFile->pInode->nLock>0 || pFile->pInode->bProcessLock==0\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00open\x00close\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00eFileLock==SHARED_LOCK || ((unixFile *)id)->nFetchOut==0\x00unixUnlock\x00eFileLock<=SHARED_LOCK\x00pInode->nShared!=0\x00pInode->eFileLock==pFile->eFileLock\x00handleNFSUnlock==0\x00PENDING_BYTE+1==RESERVED_BYTE\x00pInode->nLock>=0\x00posixUnlock\x00unixMutexHeld()\x00pInode!=0\x00pInode->nLock==0\x00unixFileLock\x00unixClose\x00pInode->pShmNode==0\x00pInode->pPrev->pNext==pInode\x00inodeList==pInode\x00pInode->pNext->pPrev==pInode\x00releaseInodeInfo\x00pFd->nFetchOut==0\x00unixUnmapfile\x00offset>=0\x00amt>0\x00unixRead\x00cnt==(cnt&0x1ffff)\x00id->h>2\x00seekAndRead\x00unixWrite\x00nBuf==(nBuf&0x1ffff)\x00fd>2\x00piErrno!=0\x00seekAndWriteFd\x00unixTruncate\x00(flags&0x0F)==SQLITE_SYNC_NORMAL || (flags&0x0F)==SQLITE_SYNC_FULL\x00full_fsync\x00rc==SQLITE_CANTOPEN\x00unixSync\x00unixFileSize\x00pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK\x00eFileLock!=PENDING_LOCK\x00eFileLock!=RESERVED_LOCK || pFile->eFileLock==SHARED_LOCK\x00eFileLock==SHARED_LOCK\x00pFile->eFileLock==0\x00pInode->nShared>0\x00pInode->nShared==0\x00pInode->eFileLock==0\x000!=pFile->eFileLock\x00eFileLock==RESERVED_LOCK || eFileLock==EXCLUSIVE_LOCK\x00unixLock\x00(sqliteIOErr == SQLITE_IOERR_LOCK) || (sqliteIOErr == SQLITE_IOERR_UNLOCK) || (sqliteIOErr == SQLITE_IOERR_RDLOCK) || (sqliteIOErr == SQLITE_IOERR_CHECKRESERVEDLOCK)\x00sqliteErrorFromPosixError\x00pFile->eFileLock<=SHARED_LOCK\x00unixCheckReservedLock\x00iWrite>=buf.st_size\x00((iWrite+1)%nBlk)==0\x00fcntlSizeHint\x00nMap>=0 || pFd->nFetchOut==0\x00nMap>0 || (pFd->mmapSize==0 && pFd->pMapRegion==0)\x00unixMapfile\x00nNew>pFd->mmapSize\x00nNew<=pFd->mmapSizeMax\x00pFd->mmapSizeActual>=pFd->mmapSize\x00MAP_FAILED!=0\x00unixRemapfile\x00nBuf>2\x00%s/etilqs_%llx%c\x00SQLITE_TMPDIR\x00TMPDIR\x00/var/tmp\x00/usr/tmp\x00/tmp\x00unixGetTempname\x00szRegion==pShmNode->szRegion || pShmNode->nRegion==0\x00pShmNode->pInode==pDbFd->pInode\x00pShmNode->h>=0 || pDbFd->pInode->bProcessLock==1\x00pShmNode->h<0 || pDbFd->pInode->bProcessLock==0\x00(nByte % pgsz)==0\x00((pgsz-1)&pgsz)==0\x00unixShmRegionPerMap\x00pDbFd->pShm==0\x00%s-shm\x00readonly_shm\x00unixOpenSharedMemory\x00sqlite3_mutex_held(pShmNode->mutex) || pShmNode->nRef==0\x00n==1 || lockType!=F_RDLCK\x00n>=1 && n<=SQLITE_SHM_NLOCK\x00lockType==F_WRLCK\x00unixShmSystemLock\x00p->pInode==pFd->pInode\x00unixShmPurge\x00unixShmMap\x00pShmNode==pDbFd->pInode->pShmNode\x00ofst>=0 && ofst+n<=SQLITE_SHM_NLOCK\x00n>=1\x00flags==(SQLITE_SHM_LOCK | SQLITE_SHM_SHARED) || flags==(SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE) || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED) || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE)\x00n==1 || (flags & SQLITE_SHM_EXCLUSIVE)!=0\x00n>1 || mask==(1<<ofst)\x00(pX->exclMask & (p->exclMask|p->sharedMask))==0\x00(p->sharedMask & mask)==0\x00unixShmLock\x00pShmNode->nRef>0\x00unixShmUnmap\x00(p==0)==(pFd->nFetchOut==0)\x00p==0 || p==&((u8 *)pFd->pMapRegion)[iOff]\x00pFd->nFetchOut>=0\x00unixUnfetch\x00(isReadonly==0 || isReadWrite==0) && (isReadWrite || isReadonly)\x00isCreate==0 || isReadWrite\x00isExclusive==0 || isCreate\x00isDelete==0 || isCreate\x00(!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB\x00(!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL\x00(!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL\x00(!isDelete && zName) || eType!=SQLITE_OPEN_WAL\x00eType==SQLITE_OPEN_MAIN_DB || eType==SQLITE_OPEN_TEMP_DB || eType==SQLITE_OPEN_MAIN_JOURNAL || eType==SQLITE_OPEN_TEMP_JOURNAL || eType==SQLITE_OPEN_SUBJOURNAL || eType==SQLITE_OPEN_MASTER_JOURNAL || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL\x00(flags & SQLITE_OPEN_URI) || zName[strlen(zName)+1]==0\x00isDelete && !syncDir\x00zName[strlen(zName)+1]==0\x00!p->pUnused\x00eType==SQLITE_OPEN_WAL || eType==SQLITE_OPEN_MAIN_JOURNAL\x00!isExclusive || (openFlags & O_CREAT)!=0\x00fd>=0\x00unixOpen\x00nDb>0\x00sqlite3Isalnum(zPath[nDb])\x00modeof\x00findCreateFileMode\x00pNew->pInode==NULL\x00zFilename==0 || zFilename[0]=='/'\x00zFilename!=0 || (ctrlFlags & UNIXFILE_NOLOCK)!=0\x00psow\x00zFilename!=0\x00%s.lock\x00fillInUnixFile\x00findInodeInfo\x00id!=0\x00dotlockClose\x00eFileLock==NO_LOCK\x00dotlockUnlock\x00dotlockCheckReservedLock\x00fsync\x00unixDelete\x00pResOut!=0\x00flags==SQLITE_ACCESS_EXISTS || flags==SQLITE_ACCESS_READWRITE\x00unixAccess\x00pVfs->mxPathname==MAX_PATHNAME\x00rc!=SQLITE_OK || zIn!=zOut || zIn[0]=='/'\x00unixFullPathname\x00(size_t)nBuf>=(sizeof(time_t)+sizeof(int))\x00/dev/urandom\x00sizeof(t)+sizeof(randomnessPid)<=(size_t)nBuf\x00unixRandomness\x00sqlite3_initialize\x00enlargeAndAppend\x00sqlite3VXPrintf\x00thstndrd\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00sqlite3AppendChar\x00sqlite3_exec\x00")
+var strTab = []byte("3.19.3\x002017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b\x00SQLITE_\x00misuse\x00%s at line %d of [%.10s]\x00%\x00%s:%i: assertion failure in %s: %s\x0a\x00../../../sqlite.org/sqlite-amalgamation-3190300/sqlite3.c\x00width>=0\x00precision>=(-1)\x00NaN\x00Inf\x00precision>0\x00bufpt>zOut\x00\x00NULL\x00(NULL)\x00bArgList==0\x00k>=0 && k<pSrc->nSrc\x00.\x00xtype==etINVALID\x00z!=0 || N==0\x00p->zText!=0 || p->nChar==0 || p->accError\x00N>=0\x00p->accError==0 || p->nAlloc==0\x00p->zText\x00sqlite3StrAccumAppend\x00(p->zText==0 || p->zText==p->zBase)==!isMalloced(p)\x00p->nChar+(i64)N >= p->nAlloc\x00p->zText!=0 || p->nChar==0\x00sqlite3StrAccumEnlarge\x00eError==STRACCUM_NOMEM || eError==STRACCUM_TOOBIG\x00setStrAccumError\x00sqlite3StrAccumReset\x00db==0 || sqlite3_mutex_held(db->mutex)\x00p==0 || sqlite3GlobalConfig.mutex.xMutexHeld\x00sqlite3_mutex_held\x00sqlite3DbFree\x00p!=0\x00db!=0 || sqlite3MemdebugNoType(p, MEMTYPE_LOOKASIDE)\x00sqlite3DbFreeNN\x00sqlite3_mutex_held(db->mutex)\x00sqlite3DbMallocSize\x00sqlite3GlobalConfig.mutex.xMutexEnter\x00sqlite3_mutex_enter\x00op>=0 && op<ArraySize(statMutex)\x00sqlite3_mutex_held(statMutex[op] ? sqlite3Pcache1Mutex() : sqlite3MallocMutex())\x00op>=0 && op<ArraySize(wsdStat.nowValue)\x00sqlite3StatusDown\x00sqlite3GlobalConfig.mutex.xMutexLeave\x00sqlite3_mutex_leave\x00db!=0\x00sqlite3DbRealloc\x00db->pnBytesFreed==0\x00db->mallocFailed==0\x00sqlite3DbMallocRawNN\x00dbMallocRawFinish\x00EIGHT_BYTE_ALIGNMENT(p)\x00sqlite3_mutex_held(mem0.mutex)\x00n>0\x00mallocWithAlarm\x00X>=0\x00op==SQLITE_STATUS_MALLOC_SIZE || op==SQLITE_STATUS_PAGECACHE_SIZE || op==SQLITE_STATUS_SCRATCH_SIZE || op==SQLITE_STATUS_PARSER_STACK\x00sqlite3StatusHighwater\x00sqlite3StatusValue\x00sqlite3StatusUp\x00sqlite3Malloc\x00dbReallocFinish\x00sqlite3GlobalConfig.nRefInitMutex==0\x00sqlite3IsNaN(y)\x00sqlite3GlobalConfig.mutex.xMutexInit\x00p->nRef==0\x00pthreadMutexFree\x00p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p)\x00p->nRef>0 || p->owner==0\x00enter mutex %p (%d) with nRef=%d\x0a\x00pthreadMutexEnter\x00pthreadMutexTry\x00pthreadMutexHeld(p)\x00p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE\x00leave mutex %p (%d) with nRef=%d\x0a\x00pthreadMutexLeave\x00p->cnt==0\x00debugMutexFree\x00p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX)\x00debugMutexEnter\x00debugMutexTry\x00debugMutexHeld(pX)\x00debugMutexLeave\x00sqlite3MutexInit\x00GLOBAL(int, mutexIsInit)\x00sqlite3GlobalConfig.mutex.xMutexAlloc\x00sqlite3MutexAlloc\x00pcache1.isInit==0\x00pcache1Init\x00pcache1.isInit!=0\x00pcache1Shutdown\x00(szPage & (szPage-1))==0 && szPage>=512 && szPage<=65536\x00szExtra < 300\x00(pGroup)->mutex==0\x00pcache1Create\x00sqlite3_mutex_held(p->pGroup->mutex)\x00(p->pGroup)->mutex==0\x00pcache1ResizeHash\x00pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0)\x00pGroup->nMaxPage >= pCache->nMax\x00pGroup->nMinPage >= pCache->nMin\x00pcache1Destroy\x00sqlite3_mutex_held(pCache->pGroup->mutex)\x00pCache->iMaxKey >= iLimit\x00pCache->nHash > 0\x00h<pCache->nHash\x00nPage<0 || pCache->nPage==(unsigned)nPage\x00pcache1TruncateUnsafe\x00pPage!=0\x00pPage->isPinned==0\x00pPage->pLruNext\x00pPage->pLruPrev\x00pPage->isAnchor==0\x00pCache->pGroup->lru.isAnchor==1\x00pcache1PinPage\x00sqlite3_mutex_held(p->pCache->pGroup->mutex)\x00pcache1FreePage\x00pcache1.nFreeSlot<=pcache1.nSlot\x00pcache1Free\x00sqlite3_mutex_held(pGroup->mutex)\x00p->pCache->pGroup==pGroup\x00p->isPinned==0\x00pcache1EnforceMaxPage\x00pcache1RemoveFromHash\x00pcache1Cachesize\x00(pCache->pGroup)->mutex==0\x00pcache1Pagecount\x00pCache->bPurgeable || createFlag!=1\x00pCache->bPurgeable || pCache->nMin==0\x00pCache->bPurgeable==0 || pCache->nMin==10\x00pCache->nMin==0 || pCache->bPurgeable\x00pCache->nHash>0\x00pcache1Fetch\x00pCache->nPage >= pCache->nRecyclable\x00pGroup->mxPinned == pGroup->nMaxPage + 10 - pGroup->nMinPage\x00pCache->n90pct == pCache->nMax*9/10\x00pCache->nHash>0 && pCache->apHash\x00pcache1FetchStage2\x00pcache1AllocPage\x00sqlite3_mutex_notheld(pcache1.grp.mutex)\x00pcache1.nFreeSlot>=0\x00p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld\x00sqlite3_mutex_notheld\x00pcache1Alloc\x00pPage->pCache==pCache\x00pPage->pLruPrev==0 && pPage->pLruNext==0\x00pPage->isPinned==1\x00pcache1Unpin\x00pPage->iKey==iOld\x00pcache1Rekey\x00pcache1Truncate\x00pcache1Shrink\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00pPrior!=0\x00sqlite3MemSize\x00OOM\x00pOther!=&aDef[i] && pOther->pNext!=&aDef[i]\x00sqlite3InsertBuiltinFuncs\x00sqlite_rename_table\x00sqlite_rename_trigger\x00sqlite_rename_parent\x00len>0\x00%.*s\"%w\"%s\x00pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex)\x00(enc&3)==(enc&~SQLITE_UTF16_ALIGNED)\x00(pVal->flags & MEM_RowSet)==0\x00sqlite3ValueText\x00pVal!=0\x00(pVal->flags & (MEM_Null))==0\x00(pVal->flags & (MEM_Ephem|MEM_Static))!=0\x000==(1&SQLITE_PTR_TO_INT(pVal->z))\x00pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0 || pVal->db->mallocFailed\x00valueToText\x00pMem->flags & MEM_Zero\x00pMem->flags&MEM_Blob\x00(pMem->flags&MEM_RowSet)==0\x00pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex)\x00sqlite3VdbeMemExpandBlob\x00sqlite3VdbeCheckMemInvariants(pMem)\x00bPreserve==0 || pMem->flags&(MEM_Blob|MEM_Str)\x00pMem->szMalloc==0 || pMem->szMalloc==sqlite3DbMallocSize(pMem->db, pMem->zMalloc)\x000\x00pMem->xDel!=0 && pMem->xDel!=SQLITE_DYNAMIC\x00(p->flags & MEM_Dyn)==0 || p->xDel!=0\x00(p->flags & MEM_Dyn)==0 || p->szMalloc==0\x00(p->flags & (MEM_Int|MEM_Real))!=(MEM_Int|MEM_Real)\x00(p->flags & MEM_Null)==0 || (p->flags & (MEM_Int|MEM_Real|MEM_Str|MEM_Blob))==0\x00p->szMalloc==0 || p->szMalloc==sqlite3DbMallocSize(p->db,p->zMalloc)\x00((p->szMalloc>0 && p->z==p->zMalloc)? 1 : 0) + ((p->flags&MEM_Dyn)!=0 ? 1 : 0) + ((p->flags&MEM_Ephem)!=0 ? 1 : 0) + ((p->flags&MEM_Static)!=0 ? 1 : 0) == 1\x00sqlite3VdbeCheckMemInvariants\x00sqlite3VdbeMemGrow\x00p->db==0 || sqlite3_mutex_held(p->db->mutex)\x00VdbeMemDynamic(p)\x00(p->flags & MEM_Agg)==0\x00(p->flags&MEM_RowSet)==0\x00p->xDel!=SQLITE_DYNAMIC && p->xDel!=0\x00vdbeMemClearExternAndSetNull\x00(pMem->flags & MEM_Null)!=0 || pFunc==pMem->u.pDef\x00(pMem->flags & MEM_Dyn)==0\x00sqlite3VdbeMemFinalize\x00desiredEnc==SQLITE_UTF8 || desiredEnc==SQLITE_UTF16LE || desiredEnc==SQLITE_UTF16BE\x00rc==SQLITE_OK || rc==SQLITE_NOMEM\x00rc==SQLITE_OK || pMem->enc!=desiredEnc\x00rc==SQLITE_NOMEM || pMem->enc==desiredEnc\x00sqlite3VdbeChangeEncoding\x00pMem->flags&MEM_Str\x00pMem->enc!=desiredEnc\x00pMem->enc!=0\x00pMem->n>=0\x00rc==SQLITE_NOMEM\x00desiredEnc==SQLITE_UTF16BE\x00desiredEnc==SQLITE_UTF8\x00(pMem->n+(desiredEnc==SQLITE_UTF8?1:2))<=len\x00sqlite3VdbeMemTranslate\x00sqlite3VdbeMemMakeWriteable\x00sqlite3VdbeCheckMemInvariants(p)\x00sqlite3VdbeMemRelease\x00sqlite3VdbeMemNulTerminate\x00!(fg&MEM_Zero)\x00!(fg&(MEM_Str|MEM_Blob))\x00fg&(MEM_Int|MEM_Real)\x00EIGHT_BYTE_ALIGNMENT(pMem)\x00%lld\x00fg & MEM_Real\x00%!.15g\x00sqlite3VdbeMemStringify\x00szNew>0\x00(pMem->flags & MEM_Dyn)==0 || pMem->szMalloc==0\x00sqlite3VdbeMemClearAndResize\x00p && p->pOut\x00sqlite3_context_db_handle\x00renameTableFunc\x00sqlite3VMPrintf\x00(p->zText==p->zBase)==!isMalloced(p)\x00sqlite3StrAccumFinish\x00p->mxAlloc>0 && !isMalloced(p)\x00strAccumFinishRealloc\x00sqlite3_mutex_held(pCtx->pOut->db->mutex)\x00sqlite3_result_text\x00(pMem->flags & MEM_RowSet)==0\x00enc!=0\x00sqlite3VdbeMemSetStr\x00sqlite3VdbeMemHandleBom\x00string or blob too big\x00sqlite3_result_error_toobig\x00renameTriggerFunc\x00%s%.*s\"%w\"\x00%s%s\x00(n&0x7fffffff)==n\x00sqlite3DbStrNDup\x00z[i]\x00sqlite3Dequote\x00julianday\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00p->pVdbe!=0\x00sqlite3StmtCurrentTime\x00sqlite3VdbeRealValue\x00enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE\x00e>=342\x00sqlite3AtoF\x00now\x0040f-21a-21d\x00zFormat[2]>='a' && zFormat[2]<='f'\x00getDigits\x0020c:20e\x0020e\x0020b:20e\x00(p->flags & MEM_Null)==0 || (p->flags & (MEM_Str|MEM_Blob))==0\x00sqlite3ValueBytes\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00local time unavailable\x00sqlite3_result_error\x00second\x00minute\x00hour\x00sqlite3_result_double\x00%04d-%02d-%02d\x00%02d:%02d:%02d\x00%04d-%02d-%02d %02d:%02d:%02d\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%04d\x00sqlite3_result_error_nomem\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00affinity\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00length\x00instr\x00printf\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00like\x00coalesce\x00not authorized\x00sqlite3_extension_init\x00%s.%s\x00unable to open shared library [%s]\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00so\x00p && p->pFunc && p->pFunc->xFinalize\x00sqlite3_mutex_held(p->pOut->db->mutex)\x00sqlite3_aggregate_context\x00(pMem->flags & MEM_Agg)==0\x00createAggContext\x00p && p->pMem && p->pFunc && p->pFunc->xFinalize\x00sqlite3_aggregate_count\x00bind on a busy prepared statement: [%s]\x00p->isPrepareV2 || p->expmask==0\x00API called with NULL prepared statement\x00API called with finalized prepared statement\x00sqlite3Error\x00vdbeUnbind\x00sqlite3ApiExit\x00db->lookaside.bDisable>0\x00sqlite3OomClear\x00unopened\x00API call with %s database connection pointer\x00invalid\x00count>=0\x00sqliteDefaultBusyCallback\x00unable to close due to unfinalized statements or unfinished backups\x00btreeEnterAll\x00p->pNext==0 || p->pNext->pBt>p->pBt\x00p->pPrev==0 || p->pPrev->pBt<p->pBt\x00p->pNext==0 || p->pNext->db==p->db\x00p->pPrev==0 || p->pPrev->db==p->db\x00p->sharable || (p->pNext==0 && p->pPrev==0)\x00!p->locked || p->wantToLock>0\x00p->sharable || p->wantToLock==0\x00sqlite3_mutex_held(p->db->mutex)\x00(p->locked==0 && p->sharable) || p->pBt->db==p->db\x00sqlite3BtreeEnter\x00pLater->sharable\x00pLater->pNext==0 || pLater->pNext->pBt>pLater->pBt\x00!pLater->locked || pLater->wantToLock>0\x00sqlite3GlobalConfig.mutex.xMutexTry\x00sqlite3_mutex_try\x00btreeLockCarefully\x00p->locked==1\x00sqlite3_mutex_held(pBt->mutex)\x00p->db==pBt->db\x00unlockBtreeMutex\x00p->locked==0\x00sqlite3_mutex_notheld(p->pBt->mutex)\x00lockBtreeMutex\x00IsVirtual(p)\x00sqlite3BtreeHoldsAllMutexes(db)\x00sqlite3VtabDisconnect\x00db\x00pVTab->nRef>0\x00db->magic==SQLITE_MAGIC_OPEN || db->magic==SQLITE_MAGIC_ZOMBIE\x00sqlite3VtabUnlock\x00sqlite3VtabUnlockList\x00btreeLeaveAll\x00p->wantToLock>0\x00sqlite3BtreeLeave\x00connectionIsBusy\x00p\x00sqlite3BtreeIsInBackup\x00sqlite3ErrorWithMsg\x00db->nDb<=2\x00db->aDb==db->aDbStatic\x00db->lookaside.nOut==0\x00sqlite3RollbackAll\x00p==0 || sqlite3_mutex_held(p->db->mutex)\x00sqlite3BtreeIsInTrans\x00writeOnly==1 || writeOnly==0\x00tripCode==SQLITE_ABORT_ROLLBACK || tripCode==SQLITE_OK\x00rc==SQLITE_OK || (writeOnly==0 && rc2==SQLITE_OK)\x00p->pBt->inTransaction!=TRANS_NONE || p->pBt->nTransaction==0\x00p->pBt->inTransaction>=p->inTrans\x00TRANS_WRITE==pBt->inTransaction\x00countValidCursors(pBt, 1)==0\x00sqlite3BtreeRollback\x00pExcept==0 || pExcept->pBt==pBt\x00saveAllCursors\x00CURSOR_VALID==pCur->eState || CURSOR_SKIPNEXT==pCur->eState\x000==pCur->pKey\x00cursorHoldsMutex(pCur)\x00saveCursorPosition\x00CURSOR_VALID==pCur->eState\x00!pCur->curIntKey || !pCur->pKey\x00saveCursorKey\x00pCur->eState==CURSOR_VALID\x00pCur->curIntKey\x00sqlite3BtreeIntegerKey\x00CORRUPT_DB || memcmp(&info, &pCur->info, sizeof(info))==0\x00assertCellInfo\x00sqlite3BtreePayloadSize\x00pCur->iPage>=0 && pCur->apPage[pCur->iPage]\x00pCur->ix<pCur->apPage[pCur->iPage]->nCell\x00sqlite3BtreePayload\x00pPage\x00eOp==0 || eOp==1\x00pCur->ix<pPage->nCell\x00offset+amt <= pCur->info.nPayload\x00aPayload > pPage->aData\x00rc==SQLITE_OK && amt>0\x00pCur->aOverflow[iIdx]==0 || pCur->aOverflow[iIdx]==nextPage || CORRUPT_DB\x00pCur->curFlags & BTCF_ValidOvfl\x00pCur->pBtree->db==pBt->db\x00accessPayload\x00database corruption\x00(pPg->flags & PGHDR_MMAP)==0\x00pPager->eState>=PAGER_WRITER_LOCKED\x00assert_pager_state(pPager)\x00pPager->tempFile==0\x00sqlite3PagerWrite\x00p->eState==PAGER_OPEN || p->eState==PAGER_READER || p->eState==PAGER_WRITER_LOCKED || p->eState==PAGER_WRITER_CACHEMOD || p->eState==PAGER_WRITER_DBMOD || p->eState==PAGER_WRITER_FINISHED || p->eState==PAGER_ERROR\x00p->tempFile==0 || p->eLock==EXCLUSIVE_LOCK\x00p->tempFile==0 || pPager->changeCountDone\x00p->journalMode==PAGER_JOURNALMODE_OFF || p->useJournal\x00p->journalMode!=PAGER_JOURNALMODE_OFF || !isOpen(p->jfd)\x00!isOpen(p->fd)\x00p->noSync\x00p->journalMode==PAGER_JOURNALMODE_OFF || p->journalMode==PAGER_JOURNALMODE_MEMORY\x00p->eState!=PAGER_ERROR && p->eState!=PAGER_OPEN\x00pagerUseWal(p)==0\x00pPager->changeCountDone==0 || pPager->eLock>=RESERVED_LOCK\x00p->eLock!=PENDING_LOCK\x00!MEMDB\x00pPager->errCode==SQLITE_OK\x00sqlite3PcacheRefCount(pPager->pPCache)==0 || pPager->tempFile\x00p->eLock!=UNKNOWN_LOCK\x00p->eLock>=SHARED_LOCK\x00p->eLock>=RESERVED_LOCK\x00pPager->dbSize==pPager->dbOrigSize\x00pPager->dbOrigSize==pPager->dbFileSize\x00pPager->dbOrigSize==pPager->dbHintSize\x00pPager->setMaster==0\x00isOpen(p->jfd) || p->journalMode==PAGER_JOURNALMODE_OFF || p->journalMode==PAGER_JOURNALMODE_WAL\x00p->eLock==EXCLUSIVE_LOCK\x00!pagerUseWal(pPager)\x00p->eLock>=EXCLUSIVE_LOCK\x00pPager->dbOrigSize<=pPager->dbHintSize\x00pPager->errCode!=SQLITE_OK\x00sqlite3PcacheRefCount(pPager->pPCache)>0 || pPager->tempFile\x00assert_pager_state\x00sqlite3BitvecTestNotNull\x00pPager->useJournal\x00isOpen(pPager->jfd) || pagerUseWal(pPager)\x00isOpen(pPager->sjfd) || pPager->nSubRec==0\x00pagerUseWal(pPager) || pageInJournal(pPager, pPg) || pPg->pgno>pPager->dbOrigSize\x00pPager->nSavepoint>0\x00subjournalPage\x00MEMJOURNAL_DFLT_FILECHUNKSIZE==fileChunkSize(p->nChunkSize)\x00rc==SQLITE_OK || pFile->pMethods==0\x00sqlite3OsOpen\x00sqlite3JournalOpen\x00(iAmt+iOfst)<=p->endpoint.iOffset\x00p->readpoint.iOffset==0 || p->readpoint.pChunk!=0\x00pChunk!=0\x00memjrnlRead\x00iOfst==p->endpoint.iOffset || iOfst==0\x00iOfst>0 || p->pFirst==0\x00p->pFirst\x00!p->pFirst\x00memjrnlWrite\x00I/O OOM error\x00memjrnlTruncate\x00i>0\x00i<=p->iSize\x00sqlite3BitvecSet\x00addToSavepointBitvecs\x00(pPager->doNotSpill & SPILLFLAG_NOSYNC)==0\x00nPage>0\x00pg1<=pPg->pgno\x00(pg1+nPage)>pPg->pgno\x00(pPager->doNotSpill & SPILLFLAG_NOSYNC)!=0\x00pagerWriteLargeSector\x00pPager->eState==PAGER_WRITER_LOCKED || pPager->eState==PAGER_WRITER_CACHEMOD || pPager->eState==PAGER_WRITER_DBMOD\x00pPager->errCode==0\x00pPager->readOnly==0\x00pPager->eState>=PAGER_WRITER_CACHEMOD\x00(pPager->pInJournal!=0) == isOpen(pPager->jfd)\x00pagerUseWal(pPager)==0\x00pager_write\x00pPager->eState==PAGER_WRITER_LOCKED\x00pPager->pInJournal==0\x00rc!=SQLITE_OK || isOpen(pPager->jfd)\x00pager_open_journal\x00pPager->zFilename && pPager->zFilename[0]\x00databaseIsUnmoved\x00isOpen(pPager->jfd)\x00isOpen(pPager->fd) || pPager->noSync\x00pPager->journalHdr <= pPager->journalOff\x00writeJournalHdr\x00offset%JOURNAL_HDR_SZ(pPager)==0\x00offset>=c\x00(offset-c)<JOURNAL_HDR_SZ(pPager)\x00journalHdrOffset\x00N>0\x00sqlite3_randomness\x00p->nRef>0\x00sqlite3PcachePageSanity(p)\x00(p->flags & (PGHDR_DIRTY|PGHDR_CLEAN))==PGHDR_DIRTY\x00sqlite3PcacheMakeDirty\x00pPg!=0\x00pPg->pgno>0 || pPg->pPager==0\x00pCache!=0\x00(pPg->flags & PGHDR_DIRTY)==0\x00pCache->pDirty!=pPg\x00pCache->pDirtyTail!=pPg\x00pPg->flags & PGHDR_DIRTY\x00sqlite3PcachePageSanity\x00pPage->pDirtyNext || pPage==p->pDirtyTail\x00pPage->pDirtyPrev || pPage==p->pDirty\x00pPage==p->pDirtyTail\x00pPage==p->pDirty\x00p->bPurgeable || p->eCreate==2\x00p->bPurgeable==0 || p->eCreate==1\x00pPage->pDirtyNext==0 && pPage->pDirtyPrev==0 && p->pDirty!=pPage\x00pPage->pDirtyNext->pDirtyPrev==0\x00p->eCreate==2\x00pcacheManageDirtyList\x00pPg->pgno!=PAGER_MJ_PGNO(pPager)\x00pPager->journalHdr<=pPager->journalOff\x00pPager->pInJournal!=0\x00pagerAddPageToRollbackJournal\x00sqlite3PagerUnrefNotNull\x00pPager->fd->pMethods->iVersion>=3\x00pagerReleaseMapPage\x00sqlite3PcacheRelease\x00pPager->eState==PAGER_READER\x00pagerUnlockAndRollback\x00pPager->eState==PAGER_READER || rc!=SQLITE_OK\x00rc==SQLITE_OK || rc==SQLITE_FULL || rc==SQLITE_CORRUPT || rc==SQLITE_NOMEM || (rc&0xFF)==SQLITE_IOERR || rc==SQLITE_CANTOPEN\x00sqlite3PagerRollback\x00op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK\x00iSavepoint>=0 || op==SAVEPOINT_ROLLBACK\x00rc==SQLITE_OK\x00rc!=SQLITE_DONE\x00sqlite3PagerSavepoint\x00pPager->eState!=PAGER_ERROR\x00pagerUseWal(pPager)==0 || szJ==0\x00rc!=SQLITE_OK || pPager->journalOff>=szJ\x00offset==(i64)ii*(4+pPager->pageSize)\x00pagerPlaybackSavepoint\x00walFramePgno(pWal, iFrame)!=1\x00sqlite3WalUndo\x00pWal->nWiData>0 && pWal->apWiData[0]\x00walIndexHdr\x00(iHash==0 || iFrame>HASHTABLE_NPAGE_ONE) && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE) && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)) && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE) && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))\x00walFramePage\x00pWal->writeLock\x00pWal->nWiData>walFramePage(pWal->hdr.mxFrame)\x00pWal->apWiData[walFramePage(pWal->hdr.mxFrame)]\x00iLimit>0\x00walCleanupHash\x00rc==SQLITE_OK || iHash>0\x00iPage==0 || *ppPage || rc!=SQLITE_OK\x00walIndexPage\x00walHashGet\x00pagerUseWal(pPager)\x00pagerUndoCallback\x00pPager!=0\x00pgno!=0\x00pPager->pPCache!=0\x00pPage==0 || pPager->hasHeldSharedLock\x00sqlite3PagerLookup\x00pCache->pCache!=0\x00createFlag==3 || createFlag==0\x00pCache->eCreate==((pCache->bPurgeable && pCache->pDirty) ? 1 : 2)\x00eCreate==0 || eCreate==1 || eCreate==2\x00createFlag==0 || pCache->eCreate==eCreate\x00createFlag==0 || eCreate==1+(!pCache->bPurgeable||!pCache->pDirty)\x00sqlite3PcacheFetch\x00sqlite3PcachePageSanity(pPgHdr)\x00sqlite3PcacheFetchFinish\x00pPgHdr->pPage==0\x00pcacheFetchFinishWithInit\x00p->nRef==1\x00sqlite3PcacheDrop\x00pWal->readLock>=0 || pWal->lockError\x00iFrame>iRead || CORRUPT_DB\x00sqlite3WalFindFrame\x00iPage>0\x00walHash\x00pPager->eState>=PAGER_READER && !MEMDB\x00isOpen(pPager->fd)\x00readDbPage\x00sqlite3_mutex_held(p->pSrc->pBt->mutex)\x00sqlite3BackupRestart\x00pcacheSortDirtyList\x00pA!=0 && pB!=0\x00pcacheMergeDirtyList\x00(isMainJrnl&~1)==0\x00(isSavepnt&~1)==0\x00isMainJrnl || pDone\x00isSavepnt || pDone==0\x00aData\x00pagerUseWal(pPager)==0 || (!isMainJrnl && isSavepnt)\x00pPager->eState>=PAGER_WRITER_CACHEMOD || (pPager->eState==PAGER_OPEN && pPager->eLock==EXCLUSIVE_LOCK)\x00pPager->eState>=PAGER_WRITER_CACHEMOD || isMainJrnl\x00!isSavepnt\x00pPg || !MEMDB\x00pPager->eState!=PAGER_OPEN || pPg==0 || pPager->tempFile\x00isSavepnt\x00(pPager->doNotSpill & SPILLFLAG_ROLLBACK)==0\x00(pPager->doNotSpill & SPILLFLAG_ROLLBACK)!=0\x00pager_playback_one_page\x00p->pDestDb\x00rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED\x00backupUpdate\x00isFatalError\x00sqlite3BtreeGetReserveNoMutex(p->pSrc)>=0\x00p->bDestLocked\x00!isFatalError(p->rc)\x00iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt)\x00zSrcData\x00sqlite3_mutex_held(p->pBt->mutex)\x00sqlite3BtreeGetReserveNoMutex\x00backupOnePage\x00pPg->nRef>0 || pPg->pPager->memDb\x00sqlite3PagerGetData\x00sqlite3BtreeHoldsMutex(p)\x00((p->pBt->nPage)&0x8000000)==0\x00p->sharable==0 || p->locked==0 || p->wantToLock>0\x00p->sharable==0 || p->locked==0 || p->db==p->pBt->db\x00p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->pBt->mutex)\x00p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->db->mutex)\x00sqlite3BtreeHoldsMutex\x00sqlite3BtreeLastPage\x00readJournalHdr\x00pageSize==0 || (pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE)\x00nReserve>=0 && nReserve<1000\x00sqlite3PagerSetPagesize\x00p->pgno>0\x00p->flags&PGHDR_DIRTY\x00sqlite3PcacheTruncate\x00(p->flags & PGHDR_CLEAN)==0\x00sqlite3PcacheMakeClean\x00pCache->nRefSum==0 && pCache->pDirty==0\x00sqlite3PcacheSetPageSize\x00getPageError\x00USEFETCH(pPager)\x00pPager->eState>=PAGER_READER\x00pPager->hasHeldSharedLock==1\x00getPageMMap\x00pPager->nExtra>=8\x00p->pExtra==(void *)&p[1]\x00p->pPage==0\x00p->flags==PGHDR_MMAP\x00p->pPager==pPager\x00pagerAcquireMapPage\x00pPg==(*ppPage)\x00pPg->pgno==pgno\x00pPg->pPager==pPager || pPg->pPager==0\x00pgno<=PAGER_MAX_PGNO && pgno!=PAGER_MJ_PGNO(pPager)\x00!isOpen(pPager->fd) || !MEMDB\x00pPg->pPager==pPager\x00rc!=SQLITE_OK\x00getPageNormal\x00sqlite3PcachePagecount\x00aWalData[3]!=pWal->nCkpt || aWalData[0]<=pWal->hdr.mxFrame\x00sqlite3WalSavepointUndo\x00isOpen(pPager->jfd) || pPager->pInJournal==0\x00sqlite3JournalIsInMemory(pPager->jfd)==0\x00pPager->journalMode==PAGER_JOURNALMODE_DELETE || pPager->journalMode==PAGER_JOURNALMODE_MEMORY || pPager->journalMode==PAGER_JOURNALMODE_WAL\x00rc2==SQLITE_OK\x00pPager->eLock==EXCLUSIVE_LOCK\x00pager_end_transaction\x00!sqlite3JournalIsInMemory(pPager->jfd)\x00zeroJournalHdr\x00dirSync==0 || dirSync==1\x00sqlite3OsDelete\x00pPager->eState!=PAGER_READER\x00pager_truncate\x00pWal->writeLock==0\x00pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE || op==-1\x00pWal->readLock>=0 || (op<=0 && pWal->exclusiveMode==0)\x00pWal->exclusiveMode==0\x00pWal->readLock>=0\x00sqlite3WalExclusiveMode\x00!pPager->exclusiveMode || pPager->eLock==eLock\x00eLock==NO_LOCK || eLock==SHARED_LOCK\x00eLock!=NO_LOCK || pagerUseWal(pPager)==0\x00pPager->eLock>=eLock\x00pagerUnlockDb\x00pPager->journalOff==JOURNAL_HDR_SZ(pPager)\x00recovered %d pages from %s\x00pager_playback\x00sqlite3PagerSync\x00!isOpen(pJournal)\x00pager_delmaster\x00isOpen(pPager->fd) || pPager->tempFile\x00setSectorSize\x00rc==SQLITE_OK || !MEMDB\x00pPager->errCode==SQLITE_FULL || pPager->errCode==SQLITE_OK || (pPager->errCode & 0xff)==SQLITE_IOERR\x00pager_error\x00pPager->eState==PAGER_READER || pPager->eState==PAGER_OPEN || pPager->eState==PAGER_ERROR\x00!isOpen(pPager->jfd)\x00pPager->errCode || pPager->eState!=PAGER_ERROR\x00pPager->errCode==SQLITE_OK || !MEMDB\x00pager_unlock\x00EIGHT_BYTE_ALIGNMENT(pNew)\x00sqlite3Realloc\x00pPgnoNext\x00next==0 || rc==SQLITE_DONE\x00rc==SQLITE_OK || pPage==0\x00getOverflowPage\x00ptrmapPageno\x00offset <= (int)pBt->usableSize-5\x00pEType!=0\x00ptrmapGet\x00flags==0 || flags==PAGER_GET_NOCONTENT || flags==PAGER_GET_READONLY\x00btreeGetPage\x00pPage->aData==sqlite3PagerGetData(pDbPage)\x00btreePageFromDbPage\x00pPage->aData\x00pPage->pBt\x00pPage->pDbPage!=0\x00sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage\x00sqlite3PagerGetData(pPage->pDbPage)==pPage->aData\x00sqlite3_mutex_held(pPage->pBt->mutex)\x00releasePageNotNull\x00(writeOnly==0 || writeOnly==1) && BTCF_WriteFlag==1\x00sqlite3BtreeTripAllCursors\x00sqlite3BtreeClearCursor\x00pPager->eState!=PAGER_WRITER_FINISHED\x00sqlite3PagerPagecount\x00btreeEndTransaction\x00pLock->eLock==READ_LOCK || pLock->pBtree==p\x00downgradeAllSharedCacheTableLocks\x00p->sharable || 0==*ppIter\x00p->inTrans>0\x00(pBt->btsFlags & BTS_EXCLUSIVE)==0 || pBt->pWriter==pLock->pBtree\x00pLock->pBtree->inTrans>=pLock->eLock\x00pLock->iTable!=1 || pLock==&p->lock\x00(pBt->btsFlags & BTS_PENDING)==0 || pBt->pWriter\x00clearAllSharedCacheTableLocks\x00countValidCursors(pBt,0)==0 || pBt->inTransaction>TRANS_NONE\x00pPage1->aData\x00sqlite3PagerRefcount(pBt->pPager)==1\x00unlockBtreeIfUnused\x00pNew!=0\x00sqlite3HashInit\x00pH!=0\x00sqlite3HashClear\x00!ExprHasProperty(p, EP_IntValue) || p->u.iValue>=0\x00p->pLeft==0\x00p->pRight==0\x00p->x.pSelect==0\x00p->x.pList==0 || p->pRight==0\x00sqlite3ExprDeleteNN\x00pList->nExpr>0\x00exprListDeleteNN\x00pIndex->pSchema==pTable->pSchema || (IsVirtual(pTable) && pIndex->idxType!=SQLITE_IDXTYPE_APPDEF)\x00db==0 || sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema)\x00pOld==pIndex || pOld==0\x00nLookaside==0 || nLookaside==db->lookaside.nOut\x00deleteTable\x00pKey!=0\x00pH->htsize>0\x00sqlite3HashInsert\x00elem!=0\x00findElementWithHash\x00pEntry->count>=0\x00pH->first==0\x00pH->count==0\x00removeElementGivenHash\x00iDb>=0 && iDb<db->nDb\x00sqlite3SchemaMutexHeld\x00i>=0 && i<db->nDb\x00sqlite3SchemaToIndex\x00db==0 || IsVirtual(pTab) || sqlite3SchemaMutexHeld(db, 0, pTab->pSchema)\x00pFKey->isDeferred==0 || pFKey->isDeferred==1\x00sqlite3FkDelete\x00pTable!=0\x00sqlite3DeleteColumnNames\x00db==0 || sqlite3SchemaMutexHeld(db, 0, p->pSchema)\x00db2\x00!db || pRet\x00vtabDisconnectAll\x00p->wantToLock==0 && p->locked==0\x00!pBt->pCursor\x00p->wantToLock==0\x00sqlite3BtreeClose\x00pBt->pCursor!=0\x00sqlite3BtreeCloseCursor\x00sqlite3_mutex_notheld(pBt->mutex)\x00removeFromSharingList\x00sqlite3GlobalConfig.mutex.xMutexFree\x00sqlite3_mutex_free\x00db || pagerUseWal(pPager)==0\x00db || pPager->pWal==0\x00!pPager->aSavepoint && !pPager->pInJournal\x00!isOpen(pPager->jfd) && !isOpen(pPager->sjfd)\x00sqlite3PagerClose\x00pWal->ckptLock==0\x00eMode!=SQLITE_CHECKPOINT_PASSIVE || xBusy==0\x00sqlite3WalCheckpoint\x00pChanged\x00page0 || pWal->writeLock==0\x00badHdr==0 || pWal->writeLock==0\x00walIndexReadHdr\x00walIndexTryHdr\x00nByte>=8\x00(nByte&0x00000007)==0\x00walChecksumBytes\x00pWal->ckptLock==1 || pWal->ckptLock==0\x00recovered %d frames from WAL file %s\x00walIndexRecover\x00cannot open file\x00idx <= HASHTABLE_NSLOT/2 + 1\x00!aPgno[idx]\x00walIndexAppend\x00walIndexWriteHdr\x00walCkptInfo\x00pIter\x00y<=pWal->hdr.mxFrame\x00walFramePgno(pWal, iFrame)==iDbpage\x00pInfo->nBackfill==pWal->hdr.mxFrame\x00pWal->ckptLock && pWal->hdr.mxFrame>0\x00walIteratorInit\x00nList<=HASHTABLE_NPAGE && nList>0\x00iSub<ArraySize(aSub)\x00p->aList && p->nList<=(1<<iSub)\x00p->aList==&aList[iList&~((2<<iSub)-1)]\x00p->nList<=(1<<iSub)\x00p->aList==&aList[nList&~((2<<iSub)-1)]\x00aMerge==aList\x00aContent[aList[i]] > aContent[aList[i-1]]\x00walMergesort\x00nLeft>0 && nRight>0\x00iLeft>=nLeft || aContent[aLeft[iLeft]]>dbpage\x00iRight>=nRight || aContent[aRight[iRight]]>dbpage\x00walMerge\x00walCheckpoint\x00iMin<0xffffffff\x00walIteratorNext\x00pInfo->aReadMark[0]==0\x00walRestartHdr\x00cannot limit WAL size: %s\x00sqlite3PcacheClose\x00sqlite3LeaveMutexAndCloseZombie\x00sqlite3CloseExtensions\x00p->flags==MEM_Null && p->z==0\x00sqlite3_value_blob\x00pVm->db\x00columnMem\x00p->db!=0\x00columnMallocFailure\x00columnName\x00pMem->z || pMem->n==0\x00sqlite3VdbeIntValue\x00u<=LARGEST_INT64\x00u-1==LARGEST_INT64\x00sqlite3Atoi64\x00922337203685477580\x00create\x00trigger\x00temp\x00temporary\x00end\x00explain\x00!db->mallocFailed\x00sqlite3_create_collation_v2\x00unable to delete/modify collation sequence due to active statements\x00createCollation\x00enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE\x00pDel==0 || pDel==pColl\x00sqlite3HashFind\x00findCollSeqEntry\x00sqlite3FindCollSeq\x00sqlite3_create_collation16\x00(m.flags & MEM_Term)!=0 || db->mallocFailed\x00(m.flags & MEM_Str)!=0 || db->mallocFailed\x00m.z || db->mallocFailed\x00sqlite3Utf16to8\x00unable to delete/modify user-function due to active statements\x00p || db->mallocFailed\x00sqlite3CreateFunc\x00nArg>=(-2)\x00nArg>=(-1) || createFlag==0\x00sqlite3FindFunction\x00sqlite3_create_function_v2\x00sqlite3_create_function16\x00pDel==0 || pDel==pMod\x00sqlite3VtabCreateModule\x00IsVirtual(pTab)\x00pTab->pIndex==0\x00pIdx->pNext==0\x00%s\x00(rc&0xff)==rc\x00sqlite3_declare_vtab\x00zSql!=0\x00pzErrMsg!=0\x00pParse->pNewTable==0\x00pParse->pNewTrigger==0\x00pParse->nVar==0\x00pParse->pVList==0\x00tokenType==TK_SPACE || tokenType==TK_ILLEGAL\x00unrecognized token: \"%.*s\"\x00nErr==0\x00nErr==0 || pParse->rc!=SQLITE_OK\x00sqlite3RunParser\x00yypParser->yytos!=0\x00%sInput '%s'\x0a\x00yyact == YY_ERROR_ACTION\x00%sSyntax Error!\x0a\x00%sReturn. Stack=\x00%c%s\x00]\x0a\x00sqlite3Parser\x00$\x00SEMI\x00EXPLAIN\x00QUERY\x00PLAN\x00BEGIN\x00TRANSACTION\x00DEFERRED\x00IMMEDIATE\x00EXCLUSIVE\x00COMMIT\x00END\x00ROLLBACK\x00SAVEPOINT\x00RELEASE\x00TO\x00TABLE\x00CREATE\x00IF\x00NOT\x00EXISTS\x00TEMP\x00LP\x00RP\x00AS\x00WITHOUT\x00COMMA\x00ID\x00ABORT\x00ACTION\x00AFTER\x00ANALYZE\x00ASC\x00ATTACH\x00BEFORE\x00BY\x00CASCADE\x00CAST\x00COLUMNKW\x00CONFLICT\x00DATABASE\x00DESC\x00DETACH\x00EACH\x00FAIL\x00FOR\x00IGNORE\x00INITIALLY\x00INSTEAD\x00LIKE_KW\x00MATCH\x00NO\x00KEY\x00OF\x00OFFSET\x00PRAGMA\x00RAISE\x00RECURSIVE\x00REPLACE\x00RESTRICT\x00ROW\x00TRIGGER\x00VACUUM\x00VIEW\x00VIRTUAL\x00WITH\x00REINDEX\x00RENAME\x00CTIME_KW\x00ANY\x00OR\x00AND\x00IS\x00BETWEEN\x00IN\x00ISNULL\x00NOTNULL\x00NE\x00EQ\x00GT\x00LE\x00LT\x00GE\x00ESCAPE\x00BITAND\x00BITOR\x00LSHIFT\x00RSHIFT\x00PLUS\x00MINUS\x00STAR\x00SLASH\x00REM\x00CONCAT\x00COLLATE\x00BITNOT\x00INDEXED\x00STRING\x00JOIN_KW\x00CONSTRAINT\x00DEFAULT\x00PRIMARY\x00UNIQUE\x00CHECK\x00REFERENCES\x00AUTOINCR\x00ON\x00INSERT\x00DELETE\x00UPDATE\x00SET\x00DEFERRABLE\x00FOREIGN\x00DROP\x00UNION\x00ALL\x00EXCEPT\x00INTERSECT\x00SELECT\x00VALUES\x00DISTINCT\x00DOT\x00FROM\x00JOIN\x00USING\x00ORDER\x00GROUP\x00HAVING\x00LIMIT\x00WHERE\x00INTO\x00FLOAT\x00BLOB\x00INTEGER\x00VARIABLE\x00CASE\x00WHEN\x00THEN\x00ELSE\x00INDEX\x00ALTER\x00ADD\x00error\x00input\x00cmdlist\x00ecmd\x00cmdx\x00cmd\x00transtype\x00trans_opt\x00nm\x00savepoint_opt\x00create_table\x00create_table_args\x00createkw\x00ifnotexists\x00dbnm\x00columnlist\x00conslist_opt\x00table_options\x00select\x00columnname\x00carglist\x00typetoken\x00typename\x00signed\x00plus_num\x00minus_num\x00ccons\x00term\x00expr\x00onconf\x00sortorder\x00autoinc\x00eidlist_opt\x00refargs\x00defer_subclause\x00refarg\x00refact\x00init_deferred_pred_opt\x00conslist\x00tconscomma\x00tcons\x00sortlist\x00eidlist\x00defer_subclause_opt\x00orconf\x00resolvetype\x00raisetype\x00ifexists\x00fullname\x00selectnowith\x00oneselect\x00with\x00multiselect_op\x00distinct\x00selcollist\x00from\x00where_opt\x00groupby_opt\x00having_opt\x00orderby_opt\x00limit_opt\x00values\x00nexprlist\x00exprlist\x00sclp\x00as\x00seltablist\x00stl_prefix\x00joinop\x00indexed_opt\x00on_opt\x00using_opt\x00idlist\x00setlist\x00insert_cmd\x00idlist_opt\x00likeop\x00between_op\x00in_op\x00paren_exprlist\x00case_operand\x00case_exprlist\x00case_else\x00uniqueflag\x00collate\x00nmnum\x00trigger_decl\x00trigger_cmd_list\x00trigger_time\x00trigger_event\x00foreach_clause\x00when_clause\x00trigger_cmd\x00trnm\x00tridxby\x00database_kw_opt\x00key_opt\x00add_column_fullname\x00kwcolumn_opt\x00create_vtab\x00vtabarglist\x00vtabarg\x00vtabargtoken\x00lp\x00anylist\x00wqlist\x00stateno <= YY_SHIFT_COUNT\x00iLookAhead!=YYNOCODE\x00%sFALLBACK %s => %s\x0a\x00yyFallback[iFallback]==0\x00%sWILDCARD %s => %s\x0a\x00yy_find_shift_action\x00%sStack Overflow!\x0a\x00parser stack overflow\x00pParser->yytos!=0\x00pParser->yytos > pParser->yystack\x00%sPopping %s\x0a\x00yy_pop_parser_stack\x00%sShift '%s', go to state %d\x0a\x00%sShift '%s'\x0a\x00%sReduce [%s], go to state %d.\x0a\x00rowid\x00unknown table option: %.*s\x00#%d\x00%.*s\x00set list\x00t.n>=2\x00near \"%T\": syntax error\x00too many arguments on function %T\x00yymsp[-2].minor.yy145!=0\x00yymsp[-1].minor.yy145!=0\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00yyruleno!=277\x00yyruleno!=294\x00yyruleno!=295\x00yyruleno!=301\x00yyruleno!=303\x00yyruleno!=304\x00yyruleno!=305\x00yyruleno!=309\x00yyruleno!=312\x00yyruleno!=313\x00yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0])\x00yyact == YY_ACCEPT_ACTION\x00explain ::= EXPLAIN\x00explain ::= EXPLAIN QUERY PLAN\x00cmdx ::= cmd\x00cmd ::= BEGIN transtype trans_opt\x00transtype ::=\x00transtype ::= DEFERRED\x00transtype ::= IMMEDIATE\x00transtype ::= EXCLUSIVE\x00cmd ::= COMMIT trans_opt\x00cmd ::= END trans_opt\x00cmd ::= ROLLBACK trans_opt\x00cmd ::= SAVEPOINT nm\x00cmd ::= RELEASE savepoint_opt nm\x00cmd ::= ROLLBACK trans_opt TO savepoint_opt nm\x00create_table ::= createkw temp TABLE ifnotexists nm dbnm\x00createkw ::= CREATE\x00ifnotexists ::=\x00ifnotexists ::= IF NOT EXISTS\x00temp ::= TEMP\x00temp ::=\x00create_table_args ::= LP columnlist conslist_opt RP table_options\x00create_table_args ::= AS select\x00table_options ::=\x00table_options ::= WITHOUT nm\x00columnname ::= nm typetoken\x00typetoken ::=\x00typetoken ::= typename LP signed RP\x00typetoken ::= typename LP signed COMMA signed RP\x00typename ::= typename ID|STRING\x00ccons ::= CONSTRAINT nm\x00ccons ::= DEFAULT term\x00ccons ::= DEFAULT LP expr RP\x00ccons ::= DEFAULT PLUS term\x00ccons ::= DEFAULT MINUS term\x00ccons ::= DEFAULT ID|INDEXED\x00ccons ::= NOT NULL onconf\x00ccons ::= PRIMARY KEY sortorder onconf autoinc\x00ccons ::= UNIQUE onconf\x00ccons ::= CHECK LP expr RP\x00ccons ::= REFERENCES nm eidlist_opt refargs\x00ccons ::= defer_subclause\x00ccons ::= COLLATE ID|STRING\x00autoinc ::=\x00autoinc ::= AUTOINCR\x00refargs ::=\x00refargs ::= refargs refarg\x00refarg ::= MATCH nm\x00refarg ::= ON INSERT refact\x00refarg ::= ON DELETE refact\x00refarg ::= ON UPDATE refact\x00refact ::= SET NULL\x00refact ::= SET DEFAULT\x00refact ::= CASCADE\x00refact ::= RESTRICT\x00refact ::= NO ACTION\x00defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt\x00defer_subclause ::= DEFERRABLE init_deferred_pred_opt\x00init_deferred_pred_opt ::=\x00init_deferred_pred_opt ::= INITIALLY DEFERRED\x00init_deferred_pred_opt ::= INITIALLY IMMEDIATE\x00conslist_opt ::=\x00tconscomma ::= COMMA\x00tcons ::= CONSTRAINT nm\x00tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf\x00tcons ::= UNIQUE LP sortlist RP onconf\x00tcons ::= CHECK LP expr RP onconf\x00tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt\x00defer_subclause_opt ::=\x00onconf ::=\x00onconf ::= ON CONFLICT resolvetype\x00orconf ::=\x00orconf ::= OR resolvetype\x00resolvetype ::= IGNORE\x00resolvetype ::= REPLACE\x00cmd ::= DROP TABLE ifexists fullname\x00ifexists ::= IF EXISTS\x00ifexists ::=\x00cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select\x00cmd ::= DROP VIEW ifexists fullname\x00cmd ::= select\x00select ::= with selectnowith\x00selectnowith ::= selectnowith multiselect_op oneselect\x00multiselect_op ::= UNION\x00multiselect_op ::= UNION ALL\x00multiselect_op ::= EXCEPT|INTERSECT\x00oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt\x00values ::= VALUES LP nexprlist RP\x00values ::= values COMMA LP exprlist RP\x00distinct ::= DISTINCT\x00distinct ::= ALL\x00distinct ::=\x00sclp ::=\x00selcollist ::= sclp expr as\x00selcollist ::= sclp STAR\x00selcollist ::= sclp nm DOT STAR\x00as ::= AS nm\x00as ::=\x00from ::=\x00from ::= FROM seltablist\x00stl_prefix ::= seltablist joinop\x00stl_prefix ::=\x00seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt\x00seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt\x00seltablist ::= stl_prefix LP select RP as on_opt using_opt\x00seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt\x00dbnm ::=\x00dbnm ::= DOT nm\x00fullname ::= nm dbnm\x00joinop ::= COMMA|JOIN\x00joinop ::= JOIN_KW JOIN\x00joinop ::= JOIN_KW nm JOIN\x00joinop ::= JOIN_KW nm nm JOIN\x00on_opt ::= ON expr\x00on_opt ::=\x00indexed_opt ::=\x00indexed_opt ::= INDEXED BY nm\x00indexed_opt ::= NOT INDEXED\x00using_opt ::= USING LP idlist RP\x00using_opt ::=\x00orderby_opt ::=\x00orderby_opt ::= ORDER BY sortlist\x00sortlist ::= sortlist COMMA expr sortorder\x00sortlist ::= expr sortorder\x00sortorder ::= ASC\x00sortorder ::= DESC\x00sortorder ::=\x00groupby_opt ::=\x00groupby_opt ::= GROUP BY nexprlist\x00having_opt ::=\x00having_opt ::= HAVING expr\x00limit_opt ::=\x00limit_opt ::= LIMIT expr\x00limit_opt ::= LIMIT expr OFFSET expr\x00limit_opt ::= LIMIT expr COMMA expr\x00cmd ::= with DELETE FROM fullname indexed_opt where_opt\x00where_opt ::=\x00where_opt ::= WHERE expr\x00cmd ::= with UPDATE orconf fullname indexed_opt SET setlist where_opt\x00setlist ::= setlist COMMA nm EQ expr\x00setlist ::= setlist COMMA LP idlist RP EQ expr\x00setlist ::= nm EQ expr\x00setlist ::= LP idlist RP EQ expr\x00cmd ::= with insert_cmd INTO fullname idlist_opt select\x00cmd ::= with insert_cmd INTO fullname idlist_opt DEFAULT VALUES\x00insert_cmd ::= INSERT orconf\x00insert_cmd ::= REPLACE\x00idlist_opt ::=\x00idlist_opt ::= LP idlist RP\x00idlist ::= idlist COMMA nm\x00idlist ::= nm\x00expr ::= LP expr RP\x00term ::= NULL\x00expr ::= ID|INDEXED\x00expr ::= JOIN_KW\x00expr ::= nm DOT nm\x00expr ::= nm DOT nm DOT nm\x00term ::= FLOAT|BLOB\x00term ::= STRING\x00term ::= INTEGER\x00expr ::= VARIABLE\x00expr ::= expr COLLATE ID|STRING\x00expr ::= CAST LP expr AS typetoken RP\x00expr ::= ID|INDEXED LP distinct exprlist RP\x00expr ::= ID|INDEXED LP STAR RP\x00term ::= CTIME_KW\x00expr ::= LP nexprlist COMMA expr RP\x00expr ::= expr AND expr\x00expr ::= expr OR expr\x00expr ::= expr LT|GT|GE|LE expr\x00expr ::= expr EQ|NE expr\x00expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr\x00expr ::= expr PLUS|MINUS expr\x00expr ::= expr STAR|SLASH|REM expr\x00expr ::= expr CONCAT expr\x00likeop ::= NOT LIKE_KW|MATCH\x00expr ::= expr likeop expr\x00expr ::= expr likeop expr ESCAPE expr\x00expr ::= expr ISNULL|NOTNULL\x00expr ::= expr NOT NULL\x00expr ::= expr IS expr\x00expr ::= expr IS NOT expr\x00expr ::= NOT expr\x00expr ::= BITNOT expr\x00expr ::= MINUS expr\x00expr ::= PLUS expr\x00between_op ::= BETWEEN\x00between_op ::= NOT BETWEEN\x00expr ::= expr between_op expr AND expr\x00in_op ::= IN\x00in_op ::= NOT IN\x00expr ::= expr in_op LP exprlist RP\x00expr ::= LP select RP\x00expr ::= expr in_op LP select RP\x00expr ::= expr in_op nm dbnm paren_exprlist\x00expr ::= EXISTS LP select RP\x00expr ::= CASE case_operand case_exprlist case_else END\x00case_exprlist ::= case_exprlist WHEN expr THEN expr\x00case_exprlist ::= WHEN expr THEN expr\x00case_else ::= ELSE expr\x00case_else ::=\x00case_operand ::= expr\x00case_operand ::=\x00exprlist ::=\x00nexprlist ::= nexprlist COMMA expr\x00nexprlist ::= expr\x00paren_exprlist ::=\x00paren_exprlist ::= LP exprlist RP\x00cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt\x00uniqueflag ::= UNIQUE\x00uniqueflag ::=\x00eidlist_opt ::=\x00eidlist_opt ::= LP eidlist RP\x00eidlist ::= eidlist COMMA nm collate sortorder\x00eidlist ::= nm collate sortorder\x00collate ::=\x00collate ::= COLLATE ID|STRING\x00cmd ::= DROP INDEX ifexists fullname\x00cmd ::= VACUUM\x00cmd ::= VACUUM nm\x00cmd ::= PRAGMA nm dbnm\x00cmd ::= PRAGMA nm dbnm EQ nmnum\x00cmd ::= PRAGMA nm dbnm LP nmnum RP\x00cmd ::= PRAGMA nm dbnm EQ minus_num\x00cmd ::= PRAGMA nm dbnm LP minus_num RP\x00plus_num ::= PLUS INTEGER|FLOAT\x00minus_num ::= MINUS INTEGER|FLOAT\x00cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END\x00trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause\x00trigger_time ::= BEFORE\x00trigger_time ::= AFTER\x00trigger_time ::= INSTEAD OF\x00trigger_time ::=\x00trigger_event ::= DELETE|INSERT\x00trigger_event ::= UPDATE\x00trigger_event ::= UPDATE OF idlist\x00when_clause ::=\x00when_clause ::= WHEN expr\x00trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI\x00trigger_cmd_list ::= trigger_cmd SEMI\x00trnm ::= nm DOT nm\x00tridxby ::= INDEXED BY nm\x00tridxby ::= NOT INDEXED\x00trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt\x00trigger_cmd ::= insert_cmd INTO trnm idlist_opt select\x00trigger_cmd ::= DELETE FROM trnm tridxby where_opt\x00trigger_cmd ::= select\x00expr ::= RAISE LP IGNORE RP\x00expr ::= RAISE LP raisetype COMMA nm RP\x00raisetype ::= ROLLBACK\x00raisetype ::= ABORT\x00raisetype ::= FAIL\x00cmd ::= DROP TRIGGER ifexists fullname\x00cmd ::= ATTACH database_kw_opt expr AS expr key_opt\x00cmd ::= DETACH database_kw_opt expr\x00key_opt ::=\x00key_opt ::= KEY expr\x00cmd ::= REINDEX\x00cmd ::= REINDEX nm dbnm\x00cmd ::= ANALYZE\x00cmd ::= ANALYZE nm dbnm\x00cmd ::= ALTER TABLE fullname RENAME TO nm\x00cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist\x00add_column_fullname ::= fullname\x00cmd ::= create_vtab\x00cmd ::= create_vtab LP vtabarglist RP\x00create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm\x00vtabarg ::=\x00vtabargtoken ::= ANY\x00vtabargtoken ::= lp anylist RP\x00lp ::= LP\x00with ::=\x00with ::= WITH wqlist\x00with ::= WITH RECURSIVE wqlist\x00wqlist ::= nm eidlist_opt AS LP select RP\x00wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP\x00input ::= cmdlist\x00cmdlist ::= cmdlist ecmd\x00cmdlist ::= ecmd\x00ecmd ::= SEMI\x00ecmd ::= explain cmdx SEMI\x00explain ::=\x00trans_opt ::=\x00trans_opt ::= TRANSACTION\x00trans_opt ::= TRANSACTION nm\x00savepoint_opt ::= SAVEPOINT\x00savepoint_opt ::=\x00cmd ::= create_table create_table_args\x00columnlist ::= columnlist COMMA columnname carglist\x00columnlist ::= columnname carglist\x00nm ::= ID|INDEXED\x00nm ::= STRING\x00nm ::= JOIN_KW\x00typetoken ::= typename\x00typename ::= ID|STRING\x00signed ::= plus_num\x00signed ::= minus_num\x00carglist ::= carglist ccons\x00carglist ::=\x00ccons ::= NULL onconf\x00conslist_opt ::= COMMA conslist\x00conslist ::= conslist tconscomma tcons\x00conslist ::= tcons\x00tconscomma ::=\x00defer_subclause_opt ::= defer_subclause\x00resolvetype ::= raisetype\x00selectnowith ::= oneselect\x00oneselect ::= values\x00sclp ::= selcollist COMMA\x00as ::= ID|STRING\x00expr ::= term\x00likeop ::= LIKE_KW|MATCH\x00exprlist ::= nexprlist\x00nmnum ::= plus_num\x00nmnum ::= nm\x00nmnum ::= ON\x00nmnum ::= DELETE\x00nmnum ::= DEFAULT\x00plus_num ::= INTEGER|FLOAT\x00foreach_clause ::=\x00foreach_clause ::= FOR EACH ROW\x00trnm ::= nm\x00tridxby ::=\x00database_kw_opt ::= DATABASE\x00database_kw_opt ::=\x00kwcolumn_opt ::=\x00kwcolumn_opt ::= COLUMNKW\x00vtabarglist ::= vtabarg\x00vtabarglist ::= vtabarglist COMMA vtabarg\x00vtabarg ::= vtabarg vtabargtoken\x00anylist ::=\x00anylist ::= anylist LP anylist RP\x00anylist ::= anylist ANY\x00pParse->pToplevel==0\x00!pParse->isMultiWrite || sqlite3VdbeAssertMayAbort(v, pParse->mayAbort)\x00sqlite3VdbeGetOp(v, 0)->opcode==OP_Init\x00usesStmtJournal=%d\x00pParse->iCacheLevel==0\x00sqlite3FinishCoding\x00pParse->aLabel==0\x00pParse->nLabel==0\x00pParse->nOpAlloc==0\x00pParse->szOpAlloc==0\x00sqlite3VdbeCreate\x00p->magic==VDBE_MAGIC_INIT\x00op>=0 && op<0xff\x00 r[%d]={%d:%d}\x00\x0a\x00sqlite3VdbeAddOp3\x00p->pParse->nOpAlloc<=p->nOp\x00p->pParse->nOpAlloc>p->nOp\x00growOp3\x00nOp<=(1024/sizeof(Op))\x00nNew>=(p->nOpAlloc+nOp)\x00growOpArray\x00nTemp>=20\x00pKeyInfo->aSortOrder!=0\x00k(%d\x00BINARY\x00B\x00,%s%s\x00-\x00)\x00(%.20s)\x00%s(%d)\x00%d\x00pMem->flags & MEM_Blob\x00(blob)\x00vtab:%p\x00,%d\x00]\x00program\x00zP4!=0\x00displayP4\x00IF \x00r[P2] = (%s)\x00if %s goto P2\x00@P\x00+1\x00..%d\x00..P3\x00; %s\x00Savepoint\x00\x00AutoCommit\x00\x00Transaction\x00\x00SorterNext\x00\x00PrevIfOpen\x00\x00NextIfOpen\x00\x00Prev\x00\x00Next\x00\x00Checkpoint\x00\x00JournalMode\x00\x00Vacuum\x00\x00VFilter\x00iplan=r[P3] zplan='P4'\x00VUpdate\x00data=r[P3@P2]\x00Goto\x00\x00Gosub\x00\x00InitCoroutine\x00\x00Yield\x00\x00MustBeInt\x00\x00Jump\x00\x00Not\x00r[P2]= !r[P1]\x00Once\x00\x00If\x00\x00IfNot\x00\x00IfNullRow\x00if P1.nullRow then r[P3]=NULL, goto P2\x00SeekLT\x00key=r[P3@P4]\x00SeekLE\x00key=r[P3@P4]\x00SeekGE\x00key=r[P3@P4]\x00SeekGT\x00key=r[P3@P4]\x00NoConflict\x00key=r[P3@P4]\x00NotFound\x00key=r[P3@P4]\x00Found\x00key=r[P3@P4]\x00SeekRowid\x00intkey=r[P3]\x00NotExists\x00intkey=r[P3]\x00Last\x00\x00IfSmaller\x00\x00SorterSort\x00\x00Sort\x00\x00Rewind\x00\x00IdxLE\x00key=r[P3@P4]\x00IdxGT\x00key=r[P3@P4]\x00IdxLT\x00key=r[P3@P4]\x00IdxGE\x00key=r[P3@P4]\x00RowSetRead\x00r[P3]=rowset(P1)\x00RowSetTest\x00if r[P3] in rowset(P1) goto P2\x00Program\x00\x00FkIfZero\x00if fkctr[P1]==0 goto P2\x00IfPos\x00if r[P1]>0 then r[P1]-=P3, goto P2\x00IfNotZero\x00if r[P1]!=0 then r[P1]--, goto P2\x00DecrJumpZero\x00if (--r[P1])==0 goto P2\x00IncrVacuum\x00\x00VNext\x00\x00Init\x00Start at P2\x00Return\x00\x00EndCoroutine\x00\x00HaltIfNull\x00if r[P3]=null halt\x00Halt\x00\x00Integer\x00r[P2]=P1\x00Int64\x00r[P2]=P4\x00String\x00r[P2]='P4' (len=P1)\x00Null\x00r[P2..P3]=NULL\x00SoftNull\x00r[P1]=NULL\x00Blob\x00r[P2]=P4 (len=P1)\x00Variable\x00r[P2]=parameter(P1,P4)\x00Move\x00r[P2@P3]=r[P1@P3]\x00Copy\x00r[P2@P3+1]=r[P1@P3+1]\x00SCopy\x00r[P2]=r[P1]\x00IntCopy\x00r[P2]=r[P1]\x00ResultRow\x00output=r[P1@P2]\x00CollSeq\x00\x00Function0\x00r[P3]=func(r[P2@P5])\x00Or\x00r[P3]=(r[P1] || r[P2])\x00And\x00r[P3]=(r[P1] && r[P2])\x00Function\x00r[P3]=func(r[P2@P5])\x00AddImm\x00r[P1]=r[P1]+P2\x00RealAffinity\x00\x00IsNull\x00if r[P1]==NULL goto P2\x00NotNull\x00if r[P1]!=NULL goto P2\x00Ne\x00IF r[P3]!=r[P1]\x00Eq\x00IF r[P3]==r[P1]\x00Gt\x00IF r[P3]>r[P1]\x00Le\x00IF r[P3]<=r[P1]\x00Lt\x00IF r[P3]<r[P1]\x00Ge\x00IF r[P3]>=r[P1]\x00ElseNotEq\x00\x00BitAnd\x00r[P3]=r[P1]&r[P2]\x00BitOr\x00r[P3]=r[P1]|r[P2]\x00ShiftLeft\x00r[P3]=r[P2]<<r[P1]\x00ShiftRight\x00r[P3]=r[P2]>>r[P1]\x00Add\x00r[P3]=r[P1]+r[P2]\x00Subtract\x00r[P3]=r[P2]-r[P1]\x00Multiply\x00r[P3]=r[P1]*r[P2]\x00Divide\x00r[P3]=r[P2]/r[P1]\x00Remainder\x00r[P3]=r[P2]%r[P1]\x00Concat\x00r[P3]=r[P2]+r[P1]\x00Cast\x00affinity(r[P1])\x00BitNot\x00r[P1]= ~r[P1]\x00Permutation\x00\x00String8\x00r[P2]='P4'\x00Compare\x00r[P1@P3] <-> r[P2@P3]\x00Column\x00r[P3]=PX\x00Affinity\x00affinity(r[P1@P2])\x00MakeRecord\x00r[P3]=mkrec(r[P1@P2])\x00Count\x00r[P2]=count()\x00ReadCookie\x00\x00SetCookie\x00\x00ReopenIdx\x00root=P2 iDb=P3\x00OpenRead\x00root=P2 iDb=P3\x00OpenWrite\x00root=P2 iDb=P3\x00OpenDup\x00\x00OpenAutoindex\x00nColumn=P2\x00OpenEphemeral\x00nColumn=P2\x00SorterOpen\x00\x00SequenceTest\x00if( cursor[P1].ctr++ ) pc = P2\x00OpenPseudo\x00P3 columns in r[P2]\x00Close\x00\x00ColumnsUsed\x00\x00Sequence\x00r[P2]=cursor[P1].ctr++\x00NewRowid\x00r[P2]=rowid\x00Insert\x00intkey=r[P3] data=r[P2]\x00InsertInt\x00intkey=P3 data=r[P2]\x00Delete\x00\x00ResetCount\x00\x00SorterCompare\x00if key(P1)!=trim(r[P3],P4) goto P2\x00SorterData\x00r[P2]=data\x00RowData\x00r[P2]=data\x00Rowid\x00r[P2]=rowid\x00NullRow\x00\x00SorterInsert\x00key=r[P2]\x00IdxInsert\x00key=r[P2]\x00IdxDelete\x00key=r[P2@P3]\x00Seek\x00Move P3 to P1.rowid\x00IdxRowid\x00r[P2]=rowid\x00Real\x00r[P2]=P4\x00Destroy\x00\x00Clear\x00\x00ResetSorter\x00\x00CreateIndex\x00r[P2]=root iDb=P1\x00CreateTable\x00r[P2]=root iDb=P1\x00SqlExec\x00\x00ParseSchema\x00\x00LoadAnalysis\x00\x00DropTable\x00\x00DropIndex\x00\x00DropTrigger\x00\x00IntegrityCk\x00\x00RowSetAdd\x00rowset(P1)=r[P2]\x00Param\x00\x00FkCounter\x00fkctr[P1]+=P2\x00MemMax\x00r[P1]=max(r[P1],r[P2])\x00OffsetLimit\x00if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)\x00AggStep0\x00accum=r[P3] step(r[P2@P5])\x00AggStep\x00accum=r[P3] step(r[P2@P5])\x00AggFinal\x00accum=r[P1] N=P2\x00Expire\x00\x00TableLock\x00iDb=P1 root=P2 write=P3\x00VBegin\x00\x00VCreate\x00\x00VDestroy\x00\x00VOpen\x00\x00VColumn\x00r[P3]=vcolumn(P2)\x00VRename\x00\x00Pagecount\x00\x00MaxPgcnt\x00\x00CursorHint\x00\x00Noop\x00\x00Explain\x00\x00%4d %-13s %4d %4d %4d %-13s %.2X %s\x0a\x00p->iAddr<nOp\x00opIterNext\x00(addr>=0 && addr<p->nOp) || p->db->mallocFailed\x00sqlite3VdbeGetOp\x00i>=0 && i<p->db->nDb && i<(int)sizeof(yDbMask)*8\x00i<(int)sizeof(p->btreeMask)*8\x00sqlite3VdbeUsesBtree\x00p->nOp>0 || p->db->mallocFailed\x00sqlite3VdbeChangeP5\x00p->nOp>0 || p->aOp==0\x00p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->db->mallocFailed\x00p->aOp\x00vdbeVComment\x00sqlite3GetVTable\x00p->aOp!=0 || db->mallocFailed\x00p->nOp>0\x00addr<p->nOp\x00n<0\x00sqlite3VdbeChangeP4\x00freeP4\x00sqlite3KeyInfoUnref\x00pVdbe!=0\x00codeTableLocks\x00pParse->pTriggerTab==0\x00sqlite3IsToplevel(pParse)\x00v\x00sqlite3SchemaMutexHeld(db, 0, pDb->pSchema)\x00sqlite3AutoincrementBegin\x00!IsVirtual(pTab)\x00opcode==OP_OpenWrite || opcode==OP_OpenRead\x00pPk!=0\x00pPk->tnum==pTab->tnum\x00sqlite3OpenTable\x00iDb>=0\x00sqlite3TableLock\x00v!=0\x00pIdx!=0\x00sqlite3VdbeSetP4KeyInfo\x00sqlite3KeyInfoIsWriteable(pKey)\x00sqlite3KeyInfoOfIndex\x00!p || p->xCmp\x00no such collation sequence: %s\x00!db->xCollNeeded || !db->xCollNeeded16\x00callCollNeeded\x00sqlite3GetCollSeq\x00n!=P4_INT32 && n!=P4_VTAB\x00n<=0\x00pP4!=0\x00pOp->p4type==P4_NOTUSED\x00sqlite3VdbeAppendP4\x00nOp>0\x00aOp->p2>=0\x00sqlite3VdbeAddOpList\x00target>0 && target<=pParse->nMem\x00pParse->pVdbe!=0 || pParse->db->mallocFailed\x00sqlite3ExprCode\x00pParse->db->mallocFailed\x00pCol->iMem>0\x00!ExprHasProperty(pExpr, EP_IntValue)\x00pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X'\x00pExpr->u.zToken[1]=='\\''\x00z[n]=='\\''\x00pExpr->u.zToken!=0\x00pExpr->u.zToken[0]!=0\x00pExpr->u.zToken[0]=='?' || strcmp(pExpr->u.zToken, z)==0\x00pLeft\x00misuse of aggregate: %s()\x00!ExprHasProperty(pExpr, EP_xIsSelect)\x00unknown function: %s()\x00nFarg>=2\x00nFarg>=1\x00blob\x00text\x00numeric\x00integer\x00real\x00nFarg==1\x00none\x00pFarg->a[0].pExpr!=0\x00pExpr->iTable==0 || pExpr->pLeft->op==TK_SELECT\x00%d columns assigned %d values\x00pExpr->iTable==0 || pExpr->iTable==1\x00pExpr->iColumn>=-1 && pExpr->iColumn<pTab->nCol\x00pTab->iPKey<0 || pExpr->iColumn!=pTab->iPKey\x00p1>=0 && p1<(pTab->nCol*2+2)\x00%s.%s -> $%d\x00new\x00old\x00row value misused\x00op==TK_CASE\x00!ExprHasProperty(pExpr, EP_xIsSelect) && pExpr->x.pList\x00pExpr->x.pList->nExpr > 0\x00pTest!=0\x00pParse->db->mallocFailed || pParse->nErr>0 || pParse->iCacheLevel==iCacheLevel\x00pExpr->affinity==OE_Rollback || pExpr->affinity==OE_Abort || pExpr->affinity==OE_Fail || pExpr->affinity==OE_Ignore\x00RAISE() may only be used within a trigger-program\x00sqlite3ExprCodeTarget\x00sqlite3ExprCodeGetColumn\x00pTab!=0\x00i<pTab->nCol\x00sqlite3ColumnDefault\x00pExpr!=0\x00(pExpr->flags & EP_TokenOnly)==0 || pCtx==0\x00zVal[nVal]=='\\''\x00*ppVal==0\x00pCtx==0\x00valueFromExpr\x00zIn!=0\x00sqlite3AffinityType\x00(h>='0' && h<='9') || (h>='a' && h<='f') || (h>='A' && h<='F')\x00sqlite3HexToInt\x00pMem->flags & MEM_Str || pMem->db->mallocFailed\x00aff==SQLITE_AFF_TEXT\x00affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL || affinity==SQLITE_AFF_NUMERIC\x00applyAffinity\x00(pRec->flags & (MEM_Str|MEM_Int|MEM_Real))==MEM_Str\x00applyNumericAffinity\x00pMem->flags & MEM_Real\x00sqlite3VdbeIntegerAffinity\x00sqlite3VdbeMemCast\x00(pMem->flags & (MEM_Blob|MEM_Str))!=0\x00(pMem->flags & (MEM_Int|MEM_Real|MEM_Null))!=0\x00sqlite3VdbeMemNumerify\x00sqlite3VdbeMemIntegerify\x00sqlite3VdbeMemRealify\x00iReg>0 || pParse->nErr || pParse->db->mallocFailed\x00iCol>=-1 && iCol<32768\x00p->iTable!=iTab || p->iColumn!=iCol\x00sqlite3ExprCacheStore\x00i>=0\x00z!=0\x000x\x00hex literal too big: %s%s\x00codeInteger\x00!sqlite3IsNaN(value)\x00codeReal\x00pExpr->op==TK_EQ || pExpr->op==TK_NE || pExpr->op==TK_IS || pExpr->op==TK_ISNOT || pExpr->op==TK_LT || pExpr->op==TK_GT || pExpr->op==TK_LE || pExpr->op==TK_GE\x00pExpr->op==op || (pExpr->op==TK_IS && op==TK_EQ) || (pExpr->op==TK_ISNOT && op==TK_NE)\x00p5==0 || pExpr->op!=op\x00p5==SQLITE_NULLEQ || pExpr->op==op\x00i>=0 && i<nLeft\x00op==TK_LT || op==TK_GT || op==TK_LE || op==TK_GE\x00v->magic==VDBE_MAGIC_INIT\x00sqlite3VdbeMakeLabel\x00codeVectorCompare\x00EXECUTE %s%s SUBQUERY %d\x00CORRELATED \x00LIST\x00SCALAR\x00!isRowid || nVal==1\x00!isRowid\x00pKeyInfo!=0\x00pEList!=0\x00pEList->nExpr>0\x00sqlite3KeyInfoIsWriteable(pKeyInfo)\x00pExpr->op==TK_EXISTS || pExpr->op==TK_SELECT\x00ExprHasProperty(pExpr, EP_xIsSelect)\x00Init subquery result\x00Init EXISTS result\x00sqlite3CodeSubselect\x00PUSH to %d\x0a\x00pExpr->op==TK_IN\x00exprINAffinity\x00i<sqlite3ExprVectorSize(pVector)\x00pVector->op2==0 || pVector->op==TK_REGISTER\x00sqlite3VectorFieldSubexpr\x00pExpr->flags&EP_xIsSelect\x00pExpr->pLeft->flags&EP_xIsSelect\x00pExpr->x.pList->nExpr>0\x00pExpr->op==TK_FUNCTION\x00pExpr->op==TK_COLLATE\x00sqlite3ExprSkipCollate\x00sqlite3ExprAffinity\x00iCol<pTab->nCol\x00sqlite3TableColumnAffinity\x00aff1==0 || aff2==0\x00sqlite3CompareAffinity\x00%*s%s.%p: \x00begin processing:\x0a\x00p->pOrderBy==0 || pDest->eDest!=SRT_DistFifo\x00p->pOrderBy==0 || pDest->eDest!=SRT_Fifo\x00p->pOrderBy==0 || pDest->eDest!=SRT_DistQueue\x00p->pOrderBy==0 || pDest->eDest!=SRT_Queue\x00pDest->eDest==SRT_Exists || pDest->eDest==SRT_Union || pDest->eDest==SRT_Except || pDest->eDest==SRT_Discard || pDest->eDest==SRT_Queue || pDest->eDest==SRT_DistFifo || pDest->eDest==SRT_DistQueue || pDest->eDest==SRT_Fifo\x00p->pEList!=0\x00after name resolution:\x0a\x00expected %d columns for '%s' but got %d\x00end compound-select processing\x0a\x00After WHERE-clause push-down:\x0a\x00pItem->addrFillSub==0\x00materialize \"%s\"\x00end %s\x00After all FROM-clause analysis:\x0a\x00sDistinct.isTnct\x00Transform DISTINCT into GROUP BY:\x0a\x0066==sqlite3LogEst(100)\x000==sqlite3LogEst(1)\x00pWhere==p->pWhere\x00!ExprHasProperty(sAggInfo.aFunc[i].pExpr, EP_xIsSelect)\x00clear abort flag\x00indicate accumulator empty\x00GROUP BY\x00GROUP BY sort\x00output one row\x00check abort flag\x00reset accumulator\x00indicate data in accumulator\x00output final row\x00set abort flag\x00Groupby result generator entry point\x00end groupby result generator\x00p->pGroupBy==0\x00flag==0\x00flag==0 || (pMinMax!=0 && pMinMax->nExpr==1)\x00db->mallocFailed || pMinMax!=0\x00pMinMax==0 || pMinMax->nExpr==1\x00%s() by index\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00end processing\x0a\x00authorizer malfunction\x00nil-SELECT\x00SELECT%s%s (0x%p) selFlags=0x%x nSelectRow=%d\x00 DISTINCT\x00 agg_flag\x00result-set\x00{%d,*}\x00 %s.%s\x00 %s\x00 tabname=%Q\x00 (AS %s)\x00 LEFT-JOIN\x00func-args:\x00GROUPBY\x00ORDERBY\x00UNION ALL\x00| \x00 \x00|-- \x00'-- \x00acc.nChar>0\x00sqlite3TreeViewLine\x00moreToFollow==0 || moreToFollow==1\x00sqlite3TreeViewPush\x00WITH (0x%p, pOuter=0x%p)\x00WITH (0x%p)\x00 AS\x00%s (empty)\x00iOrderByCol=%d\x00nil\x00 flags=0x%x iRJT=%d\x00 flags=0x%x\x00AGG{%d:%d}%s\x00COLUMN(%d)%s\x00{%d:%d}%s\x00%Q\x00VARIABLE(%s,%d)\x00REGISTER(%d)\x00ID \"%w\"\x00CAST %Q\x00ISNOT\x00MUL\x00SUB\x00DIV\x00UMINUS\x00UPLUS\x00SPAN %Q\x00COLLATE %Q\x00AGG_FUNCTION%d %Q\x00FUNCTION %Q\x00EXISTS-expr\x00SELECT-expr\x00NEW\x00OLD\x00unk\x00rollback\x00abort\x00fail\x00ignore\x00RAISE %s(%Q)\x00MATCH {%d:%d}%s\x00VECTOR\x00SELECT-COLUMN %d\x00IF-NULL-ROW %d\x00op=%d\x00sqlite3Select\x00sqlite3SelectPrep\x00(p->selFlags & SF_Converted)==0\x00pNew->pPrior!=0\x00a JOIN clause is required before %s\x00pAlias!=0\x00p==0\x00pDatabase==0 || pTable!=0\x00sqlite3SrcListAppend\x00iStart>=0\x00nExtra>=1\x00pSrc!=0\x00iStart<=pSrc->nSrc\x00db->mallocFailed\x00sqlite3SrcListEnlarge\x00sqlite3SrcListAppendFromTerm\x00sqlite3ExprListAppend\x00iValue>=0\x00pToken->z!=0 || pToken->n==0\x00sqlite3ExprAlloc\x00convertCompoundSelectToSubquery\x00sqlite3WalkSelectFrom\x00pFrom->fg.isRecursive==0 || pFrom->pTab!=0\x00pFrom->pTab==0\x00pSel!=0\x00sqlite_sq_%p\x00200==sqlite3LogEst(1048576)\x00too many references to \"%s\": max 65535\x00pFrom->pSelect==0\x00pE->op!=TK_DOT || pE->pRight!=0\x00pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID)\x00pE->op!=TK_DOT || pRight!=0\x00pE->pLeft!=0\x00!ExprHasProperty(pE->pLeft, EP_IntValue)\x00*\x00zName\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00selectExpander\x00bFree==0 || (pParse->pWith==0 && pParse->pWithToFree==0)\x00pParse->pWith!=pWith\x00sqlite3WithPush\x00pList || pParse->db->mallocFailed\x00sqlite3SrcListAssignCursors\x00pFrom->pSelect\x00multiple references to recursive table: %s\x00pTab->nTabRef==1 || ((pSel->selFlags&SF_Recursive) && pTab->nTabRef==2 )\x00circular reference: %s\x00pPrior->pWith==0\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00withExpand\x00'%s' is not a function\x00sqlite3SelectDup\x00pNewExpr->iColumn==0 || i>0\x00pOldExpr->pLeft==pOldExpr->pRight\x00pItem[-1].pExpr!=0\x00pNewExpr->iColumn==pItem[-1].pExpr->iColumn+1\x00pPriorSelectCol==pItem[-1].pExpr->pLeft\x00sqlite3ExprListDup\x00flags==0 || flags==EXPRDUP_REDUCE\x00sqlite3ExprDup\x00dupFlags==0 || dupFlags==EXPRDUP_REDUCE\x00pzBuffer==0 || dupFlags==EXPRDUP_REDUCE\x00ExprHasProperty(p, EP_Reduced)==0\x00p->iColumn==0 || p->pRight==0\x00p->pRight==0 || p->pRight==p->pLeft\x00exprDup\x00flags==EXPRDUP_REDUCE || flags==0\x00!ExprHasProperty(p, EP_TokenOnly|EP_Reduced)\x00!ExprHasProperty(p, EP_FromJoin)\x00!ExprHasProperty(p, EP_MemToken)\x00!ExprHasProperty(p, EP_NoReduce)\x00dupedExprStructSize\x00sqlite3SrcListDup\x00sqlite3IdListDup\x00nCol==(i16)nCol\x00pColExpr!=0\x00!ExprHasProperty(pColExpr, EP_IntValue)\x00%.*z:%u\x00sqlite3ColumnsFromExprList\x00p->pSchema==0 || p->zDatabase==0\x00sqlite3LocateTableItem\x00no such view\x00no such table\x00pragma_\x00%s: %s.%s\x00%s: %s\x00sqlite3ReadSchema\x00sqlite3BtreeHoldsMutex(db->aDb[0].pBt)\x00db->init.busy==0\x00db->nDb>1\x00sqlite3Init\x00db->aDb[iDb].pSchema\x00iDb==1 || sqlite3BtreeHoldsMutex(db->aDb[iDb].pBt)\x00sqlite_temp_master\x00sqlite_master\x001\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage integer,sql text)\x00attached databases must use the same text encoding as main database\x00unsupported file format\x00db->init.busy\x00SELECT name, rootpage, sql FROM \"%w\".%s ORDER BY rowid\x00sqlite3InitOne\x00argc==3\x00create \x00(rc&0xFF)==(rcp&0xFF)\x00saved_iDb==0 || (db->flags & SQLITE_Vacuum)!=0\x00iDb==1\x00invalid rootpage\x00sqlite3InitCallback\x00?\x00malformed database schema (%s)\x00%z - %s\x00rc==SQLITE_OK || ppStmt==0 || *ppStmt==0\x00rc==SQLITE_OK || *ppStmt==0\x00ppStmt && *ppStmt==0\x00sqlite3BtreeHoldsMutex(pBt)\x00database schema is locked: %s\x00statement too long\x000==sParse.nQueryLoop\x00!(*ppStmt)\x00(rc&db->errMask)==rc\x00sqlite3Prepare\x00rc==SQLITE_OK || rc==SQLITE_LOCKED_SHAREDCACHE\x00sqlite3BtreeSchemaLocked\x00eLock==READ_LOCK || eLock==WRITE_LOCK\x00!(p->db->flags&SQLITE_ReadUncommitted)||eLock==WRITE_LOCK||iTab==1\x00eLock==READ_LOCK || (p==pBt->pWriter && p->inTrans==TRANS_WRITE)\x00eLock==READ_LOCK || pBt->inTransaction==TRANS_WRITE\x00pIter->eLock==READ_LOCK || pIter->eLock==WRITE_LOCK\x00eLock==READ_LOCK || pIter->pBtree==p || pIter->eLock==READ_LOCK\x00p==pBt->pWriter\x00querySharedCacheTableLock\x00pParse->checkSchema\x00sqlite3SchemaMutexHeld(db, iDb, 0)\x00schemaIsValid\x00sqlite3BtreeIsInReadTrans\x00pBt->inTransaction==TRANS_WRITE || IfNotOmitAV(pBt->bDoTruncate)==0\x00p->lock.pBtree==p && p->lock.iTable==1\x00!pBt->pWriter\x00sqlite3BtreeBeginTrans\x00pBt->pPage1==0\x00@ \x00(pageSize & 7)==0\x00pBt->maxLeaf + 23 <= MX_CELL_SIZE(pBt)\x00lockBtree\x00sqlite3PcacheRefCount(pPager->pPCache)==0\x00pPager->eState==PAGER_OPEN || pPager->eState==PAGER_READER\x00pPager->tempFile==0 || pPager->eLock==EXCLUSIVE_LOCK\x00pPager->eLock==NO_LOCK || pPager->eLock==UNKNOWN_LOCK\x00!pPager->tempFile\x00pPager->eState==PAGER_OPEN\x00(pPager->eLock==SHARED_LOCK) || (pPager->exclusiveMode && pPager->eLock>SHARED_LOCK)\x00pPager->pWal==0 || rc==SQLITE_OK\x00sqlite3PagerSharedLock\x00(pPager->eLock>=locktype) || (pPager->eLock==NO_LOCK && locktype==SHARED_LOCK) || (pPager->eLock==RESERVED_LOCK && locktype==EXCLUSIVE_LOCK)\x00pager_wait_on_lock\x00eLock==SHARED_LOCK || eLock==RESERVED_LOCK || eLock==EXCLUSIVE_LOCK\x00pagerLockDb\x00jrnlOpen==0 || ( sqlite3OsDeviceCharacteristics(pPager->jfd) & SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN )\x00hasHotJournal\x00pPager->eLock>=SHARED_LOCK\x00pagerPagecount\x00sqlite3WalDbsize\x00pagerOpenWalIfPresent\x00pPager->eState==PAGER_OPEN || pbOpen\x00pPager->eState==PAGER_READER || !pbOpen\x00pbOpen==0 || *pbOpen==0\x00pbOpen!=0 || (!pPager->tempFile && !pPager->pWal)\x00sqlite3PagerOpenWal\x00pPager->pWal==0 && pPager->tempFile==0\x00pPager->eLock==SHARED_LOCK || pPager->eLock==EXCLUSIVE_LOCK\x00pagerOpenWal\x00pagerExclusiveLock\x00zWalName && zWalName[0]\x00pDbFd\x00sqlite3WalOpen\x00pagerBeginReadTransaction\x00pWal->readLock<0\x00thisMark!=READMARK_NOT_USED\x00rc==SQLITE_BUSY || (pWal->readOnly & WAL_SHM_RDONLY)!=0\x00mxReadMark<=pWal->hdr.mxFrame\x00walTryBeginRead\x00SQLite format 3\x00pPager->eState>=PAGER_READER && pPager->eState<PAGER_ERROR\x00rc==SQLITE_OK || pPager->eState==PAGER_READER\x00rc!=SQLITE_OK || pPager->eState==PAGER_WRITER_LOCKED\x00sqlite3PagerBegin\x00pWal->writeLock==0 && pWal->iReCksum==0\x00sqlite3WalBeginWriteTransaction\x00pP1!=0\x00pBt->usableSize<=pBt->pageSize && pBt->usableSize+255>=pBt->pageSize\x00pBt->autoVacuum==1 || pBt->autoVacuum==0\x00pBt->incrVacuum==1 || pBt->incrVacuum==0\x00newDatabase\x00sqlite3PagerPagenumber(pPage->pDbPage)==pPage->pgno\x00sqlite3PagerGetData(pPage->pDbPage) == data\x00sqlite3PagerIswriteable(pPage->pDbPage)\x00pBt->pageSize>=512 && pBt->pageSize<=65536\x00zeroPage\x00pPage->hdrOffset==(pPage->pgno==1 ? 100 : 0)\x00decodeFlags\x00nSize==debuginfo.nSize || CORRUPT_DB\x00cellSizePtr\x00pPage->leaf==0 || pPage->leaf==1\x00pPage->intKeyLeaf\x00pPage->childPtrSize==0\x00btreeParseCellPtr\x00pPage->childPtrSize==4\x00debuginfo.nSize==(u16)(pIter - pCell) || CORRUPT_DB\x00cellSizePtrNoPayload\x00pPage->leaf==0\x00btreeParseCellPtrNoPayload\x00pPage->intKeyLeaf==0\x00btreeParseCellPtrIndex\x00pBt->db\x00sqlite3_mutex_held(pBt->db->mutex)\x00btreeInvokeBusyHandler\x00sqlite3InvokeBusyHandler\x00sqlite3PagerOpenSavepoint\x00nSavepoint>nCurrent && pPager->useJournal\x00pPager->nSavepoint==nSavepoint\x00pagerOpenSavepoint\x00sqlite3WalSavepoint\x00pPg->flags&PGHDR_DIRTY\x00!subjRequiresPage(pPg) || pPg->pgno<=pPg->pPager->dbSize\x00assertTruncateConstraintCb\x00p->inTrans>TRANS_NONE\x00SQLITE_OK==querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK)\x00pBt->pPage1\x00idx>=0 && idx<=15\x00sqlite3BtreeGetMeta\x00pPager->eState>PAGER_OPEN\x00sqlite3PagerDataVersion\x00iDb<db->nDb\x00pDb->pSchema!=0\x00sqlite3ResetOneSchema\x00pBt->autoVacuum\x00nRef>=sqlite3PagerRefcount(pPager)\x00autoVacuumCommit\x00invalidateAllOverflowCache\x00iLastPg>nFin\x00iFreePg==iLastPg\x00iFreePg<iLastPg\x00incrVacuumStep\x00eMode==BTALLOC_ANY || (nearby>0 && IfNotOmitAV(pBt->autoVacuum))\x00nearby>0\x00pTrunk!=0\x00pTrunk->aData!=0\x00pPrevTrunk==0\x00sqlite3PagerIswriteable(pPage1->pDbPage)\x00pBt->nPage!=PENDING_BYTE_PAGE(pBt)\x00*pPgno!=PENDING_BYTE_PAGE(pBt)\x00rc!=SQLITE_OK || sqlite3PagerPageRefcount((*ppPage)->pDbPage)<=1\x00rc!=SQLITE_OK || (*ppPage)->isInit==0\x00allocateBtreePage\x00eType==PTRMAP_OVERFLOW2 || eType==PTRMAP_OVERFLOW1 || eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE\x00pDbPage->pBt==pBt\x00relocatePage\x00pPg->nRef>0\x00pPager->eState==PAGER_WRITER_CACHEMOD || pPager->eState==PAGER_WRITER_DBMOD\x00pPager->tempFile || !MEMDB\x00pPager->journalMode==PAGER_JOURNALMODE_OFF || pageInJournal(pPager, pPg) || pPg->pgno>pPager->dbOrigSize\x00!pPgOld || pPgOld->nRef==1\x00pPager->pTmpSpace!=0\x00sqlite3PagerMovepage\x00newPgno>0\x00sqlite3PcacheMove\x00sqlite3BitvecClear\x00setChildPtrmaps\x00pPage->pBt!=0\x00pPage->pBt->db!=0\x00pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage)\x00pPage == sqlite3PagerGetExtra(pPage->pDbPage)\x00pPage->aData == sqlite3PagerGetData(pPage->pDbPage)\x00pPage->nCell>0 || top==usableSize || CORRUPT_DB\x00btreeInitPage\x00pCell!=0\x00ptrmapPutOvflPtr\x000==PTRMAP_ISPAGE(pBt, PENDING_BYTE_PAGE(pBt))\x00ptrmapPut\x00modifyPagePointer\x00pPager->dbSize>=nPage\x00sqlite3PagerTruncateImage\x00pPager->eState==PAGER_WRITER_LOCKED || pPager->eState==PAGER_WRITER_CACHEMOD || pPager->eState==PAGER_WRITER_DBMOD || pPager->eState==PAGER_ERROR\x00MEMDB==0 || pPager->tempFile\x00rc!=SQLITE_IOERR_BLOCKED\x00pPager->eState==PAGER_WRITER_DBMOD\x00sqlite3PagerCommitPhaseOne\x00pPager->pWal\x00pList\x00p->pgno < p->pDirty->pgno\x00pList->pDirty==0 || isCommit\x00pagerWalFrames\x00(isCommit!=0)==(nTruncate!=0)\x00(int)pWal->szPage==szPage\x00rc==SQLITE_OK || iWrite==0\x00iOffset==walFrameOffset(iFrame, szPage)\x00sqlite3WalFrames\x00(rc&0xff)!=SQLITE_BUSY\x00walRestartLog\x00p->syncFlags & (SQLITE_SYNC_NORMAL|SQLITE_SYNC_FULL)\x00walWriteToLog\x00pWal->iReCksum>0\x00walRewriteChecksums\x00isDirectMode==0\x00!pPager->tempFile && isOpen(pPager->fd)\x00pPgHdr==0 || rc==SQLITE_OK\x00pager_incr_changecounter\x00writeMasterJournal\x00syncJournal\x00pPager->eState==PAGER_WRITER_CACHEMOD || pPager->eState==PAGER_WRITER_DBMOD || pPager->eState==PAGER_WRITER_LOCKED\x00sqlite3PagerExclusiveLock\x00pPager->tempFile || pPager->eState==PAGER_WRITER_DBMOD\x00isOpen(pPager->fd) || pList->pDirty==0\x00pPager->tempFile && rc==SQLITE_OK\x00rc!=SQLITE_OK || isOpen(pPager->fd)\x00(pList->flags&PGHDR_NEED_SYNC)==0\x00pager_write_pagelist\x00rc!=SQLITE_OK || isOpen(pFile)\x00pagerOpentemp\x00pBt->inTransaction==TRANS_WRITE\x00pBt->nTransaction>0\x00sqlite3BtreeCommitPhaseTwo\x00pPager->eState==PAGER_WRITER_LOCKED || pPager->eState==PAGER_WRITER_FINISHED || (pagerUseWal(pPager) && pPager->eState==PAGER_WRITER_CACHEMOD)\x00pPager->journalOff==JOURNAL_HDR_SZ(pPager) || !pPager->journalOff\x00sqlite3PagerCommitPhaseTwo\x00(&p[1])==pEnd || p[0].db==p[1].db\x00releaseMemArray\x00idx<p->nResColumn\x00var<COLNAME_N\x00!zName || xDel!=SQLITE_DYNAMIC\x00p->aColName!=0\x00rc!=0 || !zName || (pColName->flags&MEM_Term)!=0\x00sqlite3VdbeSetColName\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00selectid\x00order\x00detail\x00isPrepareV2==1 || isPrepareV2==0\x00p->zSql==0\x00sqlite3VdbeSetSql\x00(rc & p->db->errMask)==rc\x00db->nVdbeActive>=db->nVdbeRead\x00db->nVdbeRead>=db->nVdbeWrite\x00db->nVdbeWrite>=0\x00db->nVdbeActive>0 || db->autoCommit==0 || db->nStatement==0\x00p->nFrame==0\x00p->pAuxData==0\x00pCx->pBtx==0 || pCx->eCurType==CURTYPE_BTREE\x00pCx->uc.pCursor!=0\x00pVCur->pVtab->nRef>0\x00sqlite3VdbeFreeCursor\x00pCsr->eCurType==CURTYPE_SORTER\x00sqlite3VdbeSorterClose\x00pSorter->bUseThreads || pSorter->pReader==0\x00pTask->bDone==1\x00ppOut!=0\x00sqlite3ThreadJoin\x00vdbeSorterJoinThread\x00sqlite3VdbeSorterReset\x00pFile\x00sqlite3OsCloseFree\x00pTask->list.aMemory==0\x00vdbeSortSubtaskCleanup\x00closeAllCursors\x00cnt==db->nVdbeActive\x00nWrite==db->nVdbeWrite\x00nRead==db->nVdbeRead\x00checkActiveVdbeCnt\x00sqlite3VdbeEnter\x00FOREIGN KEY constraint failed\x00sqlite3VdbeHalt\x00vdbeLeave\x00i!=1\x00%s-mjXXXXXX9XXz\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00zMaster[sqlite3Strlen30(zMaster)-3]=='9'\x00zFile[0]!=0\x00rc!=SQLITE_BUSY\x00vdbeCommit\x00p->pBt->pPager!=0\x00sqlite3BtreeGetFilename\x00sqlite3BtreeGetJournalname\x00eOp==SAVEPOINT_ROLLBACK || eOp==SAVEPOINT_RELEASE\x00db->nStatement>0\x00p->iStatement==(db->nStatement+db->nSavepoint)\x00vdbeCloseStatement\x00iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK)\x00pBt->nPage>0\x00sqlite3BtreeSavepoint\x00op==SAVEPOINT_RELEASE||op==SAVEPOINT_ROLLBACK||op==SAVEPOINT_BEGIN\x00iSavepoint>=-1\x00sqlite3VtabSavepoint\x00sqlite3VdbeSetChanges\x00p->apCsr[i]==0\x00p->aMem[i].flags==MEM_Undefined\x00Cleanup\x00sqlite3VdbeFinalize\x00db->pVdbe==p\x00sqlite3VdbeDelete\x00p->db==0 || p->db==db\x00sqlite3VdbeClearObject\x00db->lookaside.bDisable >= pParse->disableLookaside\x00sqlite3ParserReset\x00p->startTime>0\x00db->xProfile!=0 || (db->mTrace & SQLITE_TRACE_PROFILE)!=0\x00p->zSql!=0\x00invokeProfileCallback\x00sqlite3LockAndPrepare\x00sqlite3_prepare\x00unknown error\x00abort due to ROLLBACK\x00sqlite3ErrStr\x00not an error\x00SQL logic error or missing database\x00access permission denied\x00callback requested query abort\x00database is locked\x00database table is locked\x00out of memory\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00table contains no data\x00database schema has changed\x00constraint failed\x00datatype mismatch\x00library routine called out of sequence\x00large file support is disabled\x00authorization denied\x00auxiliary database format error\x00bind or column index out of range\x00file is encrypted or is not a database\x00sqlite3_errmsg\x00zDb!=0 || sqlite3BtreeHoldsAllMutexes(db)\x00pSchema\x00sqlite3SchemaMutexHeld(db, j, 0)\x00sqlite3FindIndex\x00sqlite3BtreeSetCacheSize\x00sqlite3PcacheSetCachesize\x00rc==SQLITE_OK || pStmt==0\x00azCols[i]!=0\x00sqlite3_prepare_v2\x00sqlite3_exec\x00v->expired==0\x00db->nVdbeWrite>0 || db->autoCommit==0 || (db->nDeferredCons==0 && db->nDeferredImmCons==0)\x00p->startTime==0\x00p->rc==SQLITE_OK\x00rc==SQLITE_ROW || rc==SQLITE_DONE || rc==SQLITE_ERROR || (rc&0xff)==SQLITE_BUSY || rc==SQLITE_MISUSE\x00(p->rc!=SQLITE_ROW && p->rc!=SQLITE_DONE) || p->rc==p->rcApp\x00sqlite3Step\x00(rc & (db->errMask))==rc\x00p->magic==VDBE_MAGIC_INIT || p->magic==VDBE_MAGIC_RESET\x00p->aMem[i].db==p->db\x00sqlite3VdbeRewind\x00sqlite3_reset\x00p->explain\x00p->magic==VDBE_MAGIC_RUN\x00p->rc==SQLITE_OK || p->rc==SQLITE_BUSY || p->rc==SQLITE_NOMEM\x00p->nMem>9\x00pMem->z!=0\x00p->db->mallocFailed\x00%.2x\x00sqlite3VdbeList\x00p->rc==SQLITE_OK || (p->rc&0xff)==SQLITE_BUSY\x00p->bIsReader || p->readOnly!=0\x00p->explain==0\x000 < db->nProgressOps\x00VDBE Program Listing:\x0a\x00VDBE Query Plan:\x0a\x00%s\x0a\x00VDBE Trace:\x0a\x00pOp>=aOp && pOp<&aOp[p->nOp]\x00pOp->p1>0\x00pOp->p1<=(p->nMem+1 - p->nCursor)\x00memIsValid(&aMem[pOp->p1])\x00sqlite3VdbeCheckMemInvariants(&aMem[pOp->p1])\x00pOp->p2>0\x00pOp->p2<=(p->nMem+1 - p->nCursor)\x00memIsValid(&aMem[pOp->p2])\x00sqlite3VdbeCheckMemInvariants(&aMem[pOp->p2])\x00pOp->p3>0\x00pOp->p3<=(p->nMem+1 - p->nCursor)\x00memIsValid(&aMem[pOp->p3])\x00sqlite3VdbeCheckMemInvariants(&aMem[pOp->p3])\x00db->nProgressOps!=0\x00pOp->p1>0 && pOp->p1<=(p->nMem+1 - p->nCursor)\x00VdbeMemDynamic(pIn1)==0\x00pIn1->flags==MEM_Int\x00pOp->p2>=0 && pOp->p2<p->nOp\x00pOp->p3>=0 && pOp->p3<p->nOp\x00!VdbeMemDynamic(pOut)\x00pIn1->u.i>=0 && pIn1->u.i<p->nOp\x00pCaller->opcode==OP_Yield\x00pCaller->p2>=0 && pCaller->p2<p->nOp\x00pOp->p5<=4\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR\x00rc==SQLITE_OK || (p->rc&0xff)==SQLITE_CONSTRAINT\x00rc==SQLITE_OK || db->nDeferredCons>0 || db->nDeferredImmCons>0\x00pOp->p4.pI64!=0\x00!sqlite3IsNaN(*pOp->p4.pReal)\x00pOp->p4.z!=0\x00rc==SQLITE_OK || rc==SQLITE_TOOBIG\x00pOut->szMalloc>0 && pOut->zMalloc==pOut->z\x00VdbeMemDynamic(pOut)==0\x00pIn3->flags & MEM_Int\x00pOp->p1 <= SQLITE_MAX_LENGTH\x00pOp->p1>0 && pOp->p1<=p->nVar\x00pOp->p4.z==0 || pOp->p4.z==sqlite3VListNumToName(p->pVList,pOp->p1)\x00n>0 && p1>0 && p2>0\x00p1+n<=p2 || p2+n<=p1\x00pOut<=&aMem[(p->nMem+1 - p->nCursor)]\x00pIn1<=&aMem[(p->nMem+1 - p->nCursor)]\x00memIsValid(pIn1)\x00pOut!=pIn1\x00(pIn1->flags & MEM_Int)!=0\x00p->nResColumn==pOp->p2\x00pOp->p1+pOp->p2<=(p->nMem+1 - p->nCursor)+1\x00db->flags&SQLITE_CountRows\x00p->usesStmtJournal\x00p->iStatement==0 || db->flags&SQLITE_CountRows\x00memIsValid(&pMem[i])\x00(pMem[i].flags & MEM_Ephem)==0 || (pMem[i].flags & (MEM_Str|MEM_Blob))==0\x00pIn1!=pOut\x00pOp->p4type==P4_COLLSEQ\x00pOp->p4type==P4_FUNCDEF\x00pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor)\x00n==0 || (pOp->p2>0 && pOp->p2+n<=(p->nMem+1 - p->nCursor)+1)\x00pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+n\x00pOp->p4type==P4_FUNCCTX\x00memIsValid(pCtx->argv[i])\x00op==OP_ShiftRight || op==OP_ShiftLeft\x00pOp->p2>=SQLITE_AFF_BLOB && pOp->p2<=SQLITE_AFF_REAL\x00pOp->opcode==OP_Eq || pOp->opcode==OP_Ne\x00(flags1 & MEM_Cleared)==0\x00(pOp->p5 & SQLITE_JUMPIFNULL)==0\x00pIn1!=pIn3\x00pOp->p4type==P4_COLLSEQ || pOp->p4.pColl==0\x00(pIn1->flags & MEM_Dyn) == (flags1 & MEM_Dyn)\x00(pIn3->flags & MEM_Dyn) == (flags3 & MEM_Dyn)\x00pOp->opcode==OP_Ne || pOp->opcode==OP_Eq\x00res2==0 || res2==1\x00pOp>aOp\x00pOp[-1].opcode==OP_Lt || pOp[-1].opcode==OP_Gt\x00pOp[-1].p5 & SQLITE_STOREP2\x00pOp->p4type==P4_INTARRAY\x00pOp->p4.ai\x00pOp[1].opcode==OP_Compare\x00pOp[1].p5 & OPFLAG_PERMUTE\x00pOp[-1].opcode==OP_Permutation\x00pOp[-1].p4type==P4_INTARRAY\x00aPermute!=0\x00p1>0 && p1+mx<=(p->nMem+1 - p->nCursor)+1\x00p2>0 && p2+mx<=(p->nMem+1 - p->nCursor)+1\x00p1>0 && p1+n<=(p->nMem+1 - p->nCursor)+1\x00p2>0 && p2+n<=(p->nMem+1 - p->nCursor)+1\x00memIsValid(&aMem[p1+idx])\x00memIsValid(&aMem[p2+idx])\x00i<pKeyInfo->nField\x00p->aOp[0].opcode==OP_Init\x00pOp->p1>=0 && pOp->p1<p->nCursor\x00p->apCsr[pOp->p1]!=0\x00pC!=0\x00p2<pC->nField\x00pC->eCurType!=CURTYPE_VTAB\x00pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow\x00pC->eCurType!=CURTYPE_SORTER\x00pC->uc.pseudoTableReg>0\x00pReg->flags & MEM_Blob\x00memIsValid(pReg)\x00pC->eCurType==CURTYPE_BTREE\x00pCrsr\x00sqlite3BtreeCursorIsValid(pCrsr)\x00avail<=65536\x00pC->nHdrParsed<=p2\x00p2<pC->nHdrParsed\x00sqlite3VdbeCheckMemInvariants(pDest)\x00t==pC->aType[p2]\x00zAffinity!=0\x00zAffinity[pOp->p2]==0\x00pIn1 <= &p->aMem[(p->nMem+1 - p->nCursor)]\x00nField>0 && pOp->p2>0 && pOp->p2+nField<=(p->nMem+1 - p->nCursor)+1\x00pOp->p3<pOp->p1 || pOp->p3>=pOp->p1+pOp->p2\x00pData0<=pLast\x00zAffinity[0]==0 || pRec<=pLast\x00memIsValid(pRec)\x00i==nHdr\x00j==nByte\x00p->apCsr[pOp->p1]->eCurType==CURTYPE_BTREE\x00db->pSavepoint==0 || db->autoCommit==0\x00p1==SAVEPOINT_BEGIN||p1==SAVEPOINT_RELEASE||p1==SAVEPOINT_ROLLBACK\x00db->pSavepoint || db->isTransactionSavepoint==0\x00checkSavepointCount(db)\x00p->bIsReader\x00cannot open savepoint - SQL statements in progress\x00db->autoCommit==0 || db->nVTrans==0\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00pSavepoint==db->pSavepoint\x00desiredAutoCommit==1 || desiredAutoCommit==0\x00desiredAutoCommit==1 || iRollback==0\x00db->nVdbeActive>0\x00desiredAutoCommit==1\x00cannot commit transaction - SQL statements in progress\x00db->nStatement==0\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00p->readOnly==0 || pOp->p2==0\x00pOp->p1>=0 && pOp->p1<db->nDb\x00DbMaskTest(p->btreeMask, pOp->p1)\x00sqlite3BtreeIsInTrans(pBt)\x00db->nStatement>=0 && db->nSavepoint>=0\x00pOp->p5==0 || pOp->p4type==P4_INT32\x00pOp->p3<SQLITE_N_BTREE_META\x00db->aDb[iDb].pBt!=0\x00DbMaskTest(p->btreeMask, iDb)\x00pOp->p2<SQLITE_N_BTREE_META\x00p->readOnly==0\x00pDb->pBt!=0\x00sqlite3SchemaMutexHeld(db, pOp->p1, 0)\x00pOp->p5==0 || pOp->p5==OPFLAG_SEEKEQ\x00pOp->p4type==P4_KEYINFO\x00pCur->iDb==pOp->p3\x00pOp->opcode==OP_OpenWrite || pOp->p5==0 || pOp->p5==OPFLAG_SEEKEQ\x00pOp->opcode==OP_OpenRead || pOp->opcode==OP_ReopenIdx || p->readOnly==0\x00pX!=0\x00p2>0\x00p2<=(p->nMem+1 - p->nCursor)\x00memIsValid(pIn2)\x00(pIn2->flags & MEM_Int)!=0\x00p2>=2\x00pKeyInfo->enc==ENC(db)\x00pKeyInfo->db==db\x00pOp->p1>=0\x00nField>=0\x00pOrig->pBtx!=0\x00pOp->p2>=0\x00pgno==MASTER_ROOT+1\x00pCx->pKeyInfo->db==db\x00pCx->pKeyInfo->enc==ENC(db)\x00isSorter(pC)\x00pOp->p3>=0\x00pOp->p5==0\x00pOp->p2!=0\x00pC->isOrdered\x00pC->uc.pCursor!=0\x00sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ)==0 || CORRUPT_DB\x00pOp->opcode==OP_SeekGE || pOp->opcode==OP_SeekLE\x00pOp[1].opcode==OP_IdxLT || pOp[1].opcode==OP_IdxGT\x00pOp[1].p1==pOp[0].p1\x00pOp[1].p2==pOp[0].p2\x00pOp[1].p3==pOp[0].p3\x00pOp[1].p4.i==pOp[0].p4.i\x00pOp->p4type==P4_INT32\x00nField>0\x00oc!=OP_SeekGT || r.default_rc==-1\x00oc!=OP_SeekLE || r.default_rc==-1\x00oc!=OP_SeekGE || r.default_rc==+1\x00oc!=OP_SeekLT || r.default_rc==+1\x00memIsValid(&r.aMem[i])\x00res!=0\x00oc==OP_SeekGE || oc==OP_SeekGT\x00oc==OP_SeekLT || oc==OP_SeekLE\x00pC->isTable==0\x00memIsValid(&r.aMem[ii])\x00(r.aMem[ii].flags & MEM_Zero)==0 || r.aMem[ii].n==0\x00pIn3->flags & MEM_Blob\x00pC->isTable\x00pCrsr!=0\x00rc==SQLITE_OK || res==0\x00p->apCsr[pOp->p1]->eCurType!=CURTYPE_VTAB\x00sqlite3BtreeCursorIsValid(pC->uc.pCursor)\x00pOp->p3<=pFrame->nMem\x00memIsValid(pMem)\x00(pMem->flags & MEM_Int)!=0\x00pOp->p3==0\x00v>0\x00memIsValid(pData)\x00(pOp->p5 & OPFLAG_ISNOOP) || pC->isTable\x00pOp->p4type==P4_TABLE || pOp->p4type>=P4_STATIC\x00pKey->flags & MEM_Int\x00memIsValid(pKey)\x00pOp->opcode==OP_InsertInt\x00pC->iDb>=0\x00(pOp->p5 & OPFLAG_ISNOOP) || HasRowid(pTab)\x00pData->flags & (MEM_Blob|MEM_Str)\x00pC->deferredMoveto==0\x00pC->movetoTarget==iKey\x00pOp->p4.pTab!=0\x00(pOp->p5 & ~(OPFLAG_SAVEPOSITION|OPFLAG_AUXDELETE))==0\x00rc!=SQLITE_OK || (pOut->flags & MEM_Blob)\x00isSorter(pC)==0\x00pC->nullRow==0\x00pC->uc.pVCur!=0\x00pModule->xRowid\x00pOp->p2==0\x00isSorter(pC)==(pOp->opcode==OP_SorterSort)\x00pOp->p2>0 && pOp->p2<p->nOp\x00pOp->p5<ArraySize(p->aCounter)\x00res==0 || (res==1 && pC->isTable==0)\x00pOp->opcode!=OP_Next || pOp->p4.xAdvance==sqlite3BtreeNext\x00pOp->opcode!=OP_Prev || pOp->p4.xAdvance==sqlite3BtreePrevious\x00pOp->opcode!=OP_NextIfOpen || pOp->p4.xAdvance==sqlite3BtreeNext\x00pOp->opcode!=OP_PrevIfOpen || pOp->p4.xAdvance==sqlite3BtreePrevious\x00pOp->opcode!=OP_Next || pOp->opcode!=OP_NextIfOpen || pC->seekOp==OP_SeekGT || pC->seekOp==OP_SeekGE || pC->seekOp==OP_Rewind || pC->seekOp==OP_Found\x00pOp->opcode!=OP_Prev || pOp->opcode!=OP_PrevIfOpen || pC->seekOp==OP_SeekLT || pC->seekOp==OP_SeekLE || pC->seekOp==OP_Last\x00isSorter(pC)==(pOp->opcode==OP_SorterInsert)\x00pIn2->flags & MEM_Blob\x00pC->eCurType==CURTYPE_BTREE || pOp->opcode==OP_SorterInsert\x00pOp->p2>0 && pOp->p2+pOp->p3<=(p->nMem+1 - p->nCursor)+1\x00!pC->nullRow || pOp->opcode==OP_IdxRowid\x00pOp->p3>=0 && pOp->p3<p->nCursor\x00pTabCur!=0\x00pTabCur->eCurType==CURTYPE_BTREE\x00pTabCur->uc.pCursor!=0\x00pTabCur->isTable\x00pOp->p4type==P4_INTARRAY || pOp->p4.ai==0\x00pOp->opcode==OP_IdxRowid\x00pOp->p5==0 || pOp->p5==1\x00pOp->opcode==OP_IdxLE || pOp->opcode==OP_IdxGT\x00pOp->opcode==OP_IdxGE || pOp->opcode==OP_IdxLT\x00pOp->opcode==OP_IdxLE || pOp->opcode==OP_IdxLT\x00pOp->opcode==OP_IdxGE || pOp->opcode==OP_IdxGT\x00pOp->p1>1\x00resetSchemaOnFault==0 || resetSchemaOnFault==iDb+1\x00DbMaskTest(p->btreeMask, pOp->p2)\x00pC->isEphemeral\x00DbHasProperty(db, iDb, DB_SchemaLoaded)\x00SELECT name, rootpage, sql FROM '%q'.%s WHERE %s ORDER BY rowid\x00nRoot>0\x00aRoot[nRoot]==0\x00(pnErr->flags & MEM_Int)!=0\x00(pnErr->flags & (MEM_Str|MEM_Blob))==0\x00pOp->p5<db->nDb\x00DbMaskTest(p->btreeMask, pOp->p5)\x00z==0\x00pIn3->flags&MEM_Int\x00iSet==-1 || iSet>=0\x00pProgram->nOp>0\x00too many levels of trigger recursion\x00nMem>0\x00pProgram->nMem+pProgram->nCsr==pFrame->nChildMem || (pProgram->nCsr==0 && pProgram->nMem+1==pFrame->nChildMem)\x00pProgram->nCsr==pFrame->nChildCsr\x00(int)(pOp - aOp)==pFrame->pc\x00pFrame->pAuxData==0\x00pIn1->flags&MEM_Int\x00pIn1->flags & MEM_Int\x00t.flags==MEM_Null\x00pOp[-1].opcode==OP_CollSeq\x00(pMem->flags & ~(MEM_Null|MEM_Agg))==0\x00pOp->p2==SQLITE_CHECKPOINT_PASSIVE || pOp->p2==SQLITE_CHECKPOINT_FULL || pOp->p2==SQLITE_CHECKPOINT_RESTART || pOp->p2==SQLITE_CHECKPOINT_TRUNCATE\x00eNew==PAGER_JOURNALMODE_DELETE || eNew==PAGER_JOURNALMODE_TRUNCATE || eNew==PAGER_JOURNALMODE_PERSIST || eNew==PAGER_JOURNALMODE_OFF || eNew==PAGER_JOURNALMODE_MEMORY || eNew==PAGER_JOURNALMODE_WAL || eNew==PAGER_JOURNALMODE_QUERY\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00sqlite3BtreeIsInTrans(pBt)==0\x00p1>=0 && p1<db->nDb\x00DbMaskTest(p->btreeMask, p1)\x00isWriteLock==0 || isWriteLock==1\x00database table is locked: %s\x00(aMem[pOp->p2].flags & MEM_Str)!=0\x00(aMem[pOp->p2].flags & MEM_Static)!=0\x00zTab || db->mallocFailed\x00memIsValid(pQuery)\x00pCur->eCurType==CURTYPE_VTAB\x00(pQuery->flags&MEM_Int)!=0 && pArgc->flags==MEM_Int\x00pModule->xColumn\x00pModule->xNext\x00pVtab->pModule->xRename\x00memIsValid(pName)\x00pName->flags & MEM_Str\x00pOp->p2==1 || pOp->p5==OE_Fail || pOp->p5==OE_Rollback || pOp->p5==OE_Abort || pOp->p5==OE_Ignore || pOp->p5==OE_Replace\x00pOp->p4type==P4_VTAB\x00memIsValid(pX)\x00nArg>1 && apArg[0] && (apArg[0]->flags&MEM_Null)\x00-- \x00pOp->p4.z==0 || strncmp(pOp->p4.z, \"-\" \"- \", 3)==0\x00pOp==p->aOp\x00-- %s\x00SQL-trace: %s\x0a\x00pOp->opcode==OP_Noop || pOp->opcode==OP_Explain\x00pOp>=&aOp[-1] && pOp<&aOp[p->nOp-1]\x00rc=%d\x0a\x00rc\x00statement aborts at %d: [%s] %s\x00DELETE%\x00rc!=SQLITE_OK || nExtraDelete==0 || sqlite3_strlike(\"DELETE%\",p->zSql,0)!=0\x00db->u1.isInterrupted\x00sqlite3VdbeExec\x00SQL: [%s]\x0a\x00REG[%d] = \x00 undefined\x00 NULL\x00 si:%lld\x00 i:%lld\x00 r:%g\x00 (rowset)\x00 subtype=0x%02x\x00(f & (MEM_Static|MEM_Ephem))==0\x00(f & (MEM_Dyn|MEM_Ephem))==0\x00(f & (MEM_Static|MEM_Dyn))==0\x00%d[\x00%02X\x00+%dz\x00sqlite3VdbeMemPrettyPrint\x00(X)\x00(8)\x00(16LE)\x00(16BE)\x00NOT NULL\x00FOREIGN KEY\x00out2Prerelease\x00sqlite3VdbeMemTooBig\x00(pFrom->flags & MEM_RowSet)==0\x00pTo->db==pFrom->db\x00srcType==MEM_Ephem || srcType==MEM_Static\x00sqlite3VdbeMemShallowCopy\x00!VdbeMemDynamic(pTo)\x00vdbeClrCopy\x00pFrom->db==0 || sqlite3_mutex_held(pFrom->db->mutex)\x00pTo->db==0 || sqlite3_mutex_held(pTo->db->mutex)\x00pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db\x00sqlite3VdbeMemMove\x00(pMem->flags & (MEM_Int|MEM_Real))==0\x00(pMem->flags & (MEM_Str|MEM_Blob))!=0\x00computeNumericType\x00(combined_flags & MEM_RowSet)==0\x00pMem1->enc==pMem2->enc || pMem1->db->mallocFailed\x00pMem1->enc==SQLITE_UTF8 || pMem1->enc==SQLITE_UTF16LE || pMem1->enc==SQLITE_UTF16BE\x00!pColl || pColl->xCmp\x00sqlite3MemCompare\x00(flags & ~MEM_TypeMask)==0\x00sqlite3VdbeMemInit\x00(pB1->flags & MEM_Zero)==0 || n1==0\x00(pB2->flags & MEM_Zero)==0 || n2==0\x00sqlite3BlobCompare\x00p->deferredMoveto\x00p->isTable\x00p->eCurType==CURTYPE_BTREE\x00handleDeferredMoveto\x00cursorOwnsBtShared(pCur)\x00sqlite3_mutex_held(pCur->pBtree->db->mutex)\x00pRes\x00(pIdxKey==0)==(pCur->pKeyInfo==0)\x00pCur->eState!=CURSOR_VALID || (pIdxKey==0)==(pCur->curIntKey!=0)\x00pIdxKey->default_rc==1 || pIdxKey->default_rc==0 || pIdxKey->default_rc==-1\x00pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]\x00pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->isInit\x00pCur->eState==CURSOR_INVALID || pCur->apPage[pCur->iPage]->nCell>0\x00pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0\x00pCur->apPage[0]->intKey==pCur->curIntKey\x00pCur->curIntKey || pIdxKey\x00pPage->nCell>0\x00pPage->intKey==(pIdxKey==0)\x00biasRight==0 || biasRight==1\x00nCellKey==intKey\x00lwr+upr>=0\x00(pIdxKey->errCode!=SQLITE_CORRUPT || c==0) && (pIdxKey->errCode!=SQLITE_NOMEM || pCur->pBtree->db->mallocFailed)\x00c==0\x00lwr==upr+1 || (pPage->intKey && !pPage->leaf)\x00pPage->isInit\x00(pCur->curFlags & BTCF_ValidOvfl)==0\x00cursorHoldsMutex(p)\x00cursorOwnsBtShared\x00sqlite3BtreeMovetoUnpacked\x00pRes!=0\x00*pRes==0 || *pRes==1\x00pCur->skipNext==0 || pCur->eState!=CURSOR_VALID\x00sqlite3BtreeNext\x00*pRes==0\x00pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_SKIPNEXT\x00btreeNext\x00pCur->eState>=CURSOR_REQUIRESEEK\x00pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID\x00btreeRestoreCursorPosition\x00nKey==(i64)(int)nKey\x00btreeMoveto\x00sqlite3VdbeAllocUnpackedRecord\x00u<=pKeyInfo->nField + 1\x00sqlite3VdbeRecordUnpack\x00n>3 && n<=9\x00sqlite3GetVarint32\x00sizeof(r1)==sizeof(t2) && memcmp(&r1, &t2, sizeof(r1))==0\x00serialGet\x00pCur->iPage<BTCURSOR_MAX_DEPTH\x00pCur->iPage>=0\x00moveToChild\x00pCur==0 || ppPage==&pCur->apPage[pCur->iPage]\x00pCur==0 || bReadOnly==pCur->curPagerFlags\x00pCur==0 || pCur->iPage>0\x00(*ppPage)->pgno==pgno\x00(*ppPage)->aData==sqlite3PagerGetData(pDbPage)\x00pgno!=0 || rc==SQLITE_CORRUPT\x00getAndInitPage\x00moveToLeftmost\x00pCur->iPage>0\x00pCur->apPage[pCur->iPage]\x00moveToParent\x00iIdx<=pParent->nCell\x00get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild\x00get4byte(findCell(pParent, iIdx))==iChild\x00assertParentIndex\x00flags & MEM_Str\x00(*(u8*)pKey1)<=0x3F || CORRUPT_DB\x00vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, res)\x00nKey>=0\x00szHdr<=(u32)nKey\x00nField <= pKeyInfo->nField+pKeyInfo->nXField\x00vdbeAssertFieldCountWithinLimits\x00vdbeRecordCompareInt\x00pPKey2->pKeyInfo->nField+pPKey2->pKeyInfo->nXField>=pPKey2->nField || CORRUPT_DB\x00pPKey2->pKeyInfo->aSortOrder!=0\x00pPKey2->pKeyInfo->nField>0\x00idx1<=szHdr1 || CORRUPT_DB\x00(pRhs->flags & MEM_Zero)==0 || pRhs->n==0\x00vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, rc)\x00mem1.szMalloc==0\x00CORRUPT_DB || vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, pPKey2->default_rc) || pKeyInfo->db->mallocFailed\x00serial_type<12 || sqlite3SmallTypeSizes[serial_type]==(serial_type - 12)/2\x00sqlite3VdbeSerialTypeLen\x00sqlite3VdbeRecordCompareWithSkip\x00CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7)\x00vdbeRecordDecodeInt\x00pKeyInfo->nField+pKeyInfo->nXField>=pPKey2->nField || CORRUPT_DB\x00pKeyInfo->nField>0\x00vdbeRecordCompareDebug\x00i<10\x00sqlite3VarintLen\x00sqlite3VdbeFindCompare\x00pPKey2->aMem[0].flags & MEM_Str\x00vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, res) || CORRUPT_DB || pPKey2->pKeyInfo->db->mallocFailed\x00vdbeRecordCompareString\x00pCur->skipNext!=SQLITE_OK\x00pCur->apPage[pCur->iPage]!=0\x00pCur->iPage==(-1)\x00pRoot->pgno==pCur->pgnoRoot\x00pRoot->intKey==1 || pRoot->intKey==0\x00moveToRoot\x00p->uc.pCursor!=0\x00sqlite3BtreeCursorHasMoved(p->uc.pCursor)\x00handleMovedCursor\x00pCur!=0\x00pCur->eState!=CURSOR_VALID\x00pCur->skipNext==0\x00sqlite3BtreeCursorRestore\x00pCur!=0 && pCur->iPage>=0 && pCur->apPage[pCur->iPage]\x00pCur->info.nSize>0\x00pCur->info.pPayload>pCur->apPage[pCur->iPage]->aData || CORRUPT_DB\x00pCur->info.pPayload<pCur->apPage[pCur->iPage]->aDataEnd ||CORRUPT_DB\x00fetchPayload\x00sqlite3BtreeCursorIsValid(pCur)\x00!VdbeMemDynamic(pMem)\x00zData!=0\x00sqlite3VdbeMemFromBtree\x00serial_type<128\x00sqlite3VdbeOneByteSerialTypeLen\x00pLen!=0\x00pMem->db->mallocFailed || flags&(MEM_Str|MEM_Blob)\x00sqlite3VdbeSerialType\x00n<=9\x00putVarint64\x00pMem->n + ((pMem->flags & MEM_Zero)?pMem->u.nZero:0) == (int)sqlite3VdbeSerialTypeLen(serial_type)\x00sqlite3VdbeSerialPut\x00n==(db->nSavepoint + db->isTransactionSavepoint)\x00checkSavepointCount\x00p->inTrans==TRANS_WRITE\x00(pBt->btsFlags & BTS_READ_ONLY)==0\x00iStatement>0\x00iStatement>p->db->nSavepoint\x00sqlite3BtreeBeginStmt\x00idx>=1 && idx<=15\x00pBt->pPage1!=0\x00pBt->autoVacuum || iMeta==0\x00iMeta==0 || iMeta==1\x00sqlite3BtreeUpdateMeta\x00iCur>=0 && iCur<p->nCursor\x00allocateCursor\x00wrFlag==0 || wrFlag==BTREE_WRCSR || wrFlag==(BTREE_WRCSR|BTREE_FORDELETE)\x00hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, (wrFlag?2:1))\x00wrFlag==0 || !hasReadConflicts(p, iTable)\x00wrFlag==0 || p->inTrans==TRANS_WRITE\x00pBt->pPage1 && pBt->pPage1->aData\x00wrFlag==0 || (pBt->btsFlags & BTS_READ_ONLY)==0\x00wrFlag==0\x00btreeCursor\x00x==BTREE_SEEK_EQ || x==BTREE_BULKLOAD || x==0\x00sqlite3BtreeCursorHintFlags\x00:memory:\x00pVfs!=0\x00(flags&0xff)==flags\x00(flags & BTREE_UNORDERED)==0 || (flags & BTREE_SINGLE)!=0\x00(flags & BTREE_SINGLE)==0 || isTempDb\x00pBt->nRef>0\x00(pBt->pageSize & 7)==0\x00sqlite3_mutex_held(mutexOpen)\x00rc!=SQLITE_OK || sqlite3BtreeConnectionCount(*ppBtree)>0\x00sqlite3BtreeOpen\x00nUri>=0\x00EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize))\x00EIGHT_BYTE_ALIGNMENT(pPager->jfd)\x00nPathname>0\x00-journal\x00\x00-wal\x00\x00!memDb\x00nolock\x00immutable\x00pPager->memDb==0\x00nExtra>=8 && nExtra<1000\x00tempFile==PAGER_LOCKINGMODE_NORMAL || tempFile==PAGER_LOCKINGMODE_EXCLUSIVE\x00useJournal || pPager->tempFile\x00pPager->fullSync==0\x00pPager->extraSync==0\x00pPager->syncFlags==0\x00pPager->walSyncFlags==0\x00pPager->ckptSyncFlags==0\x00isOpen(pPager->fd) || tempFile\x00sqlite3PagerOpen\x00onoffalseyestruextrafull\x00szExtra>=8\x00sqlite3PcacheOpen\x00(pPg->flags&PGHDR_NEED_SYNC)==0\x00pagerStress\x00sqlite3PagerPageRefcount(pData)>0\x00pageReinit\x00sqlite3PagerReadFileheader\x00((int(*)(void *))(ap[0]))==xBusyHandler\x00ap[1]==pBusyHandlerArg\x00sqlite3PagerSetBusyhandler\x00pgnoRoot>=3 || CORRUPT_DB\x00eType!=PTRMAP_ROOTPAGE\x00eType!=PTRMAP_FREEPAGE\x00sqlite3PagerIswriteable(pBt->pPage1->pDbPage)\x00sqlite3PagerIswriteable(pRoot->pDbPage)\x00(pBt->openFlags & BTREE_SINGLE)==0 || pgnoRoot==2\x00btreeCreateTable\x00pCsr->pKeyInfo && pCsr->pBtx==0\x00pSorter->iMemory==0\x00sqlite3VdbeSorterInit\x00sqlite3BtreePrevious\x00(pCur->curFlags & (BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey))==0\x00pCur->info.nSize==0\x00(pCur->curFlags & (BTCF_ValidOvfl))==0\x00btreePrevious\x00(pCur->curFlags & BTCF_ValidNKey)==0\x00moveToRightmost\x00pCur->aiIdx[ii]==pCur->apPage[ii]->nCell\x00pCur->ix==pCur->apPage[pCur->iPage]->nCell-1\x00pCur->apPage[pCur->iPage]->leaf\x00sqlite3BtreeLast\x00(flags & (BTREE_SAVEPOSITION|BTREE_APPEND))==flags\x00(pCur->curFlags & BTCF_WriteFlag)!=0 && pBt->inTransaction==TRANS_WRITE && (pBt->btsFlags & BTS_READ_ONLY)==0\x00hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2)\x00(pX->pKey==0)==(pCur->pKeyInfo==0)\x00pX->pKey==0\x00(flags & BTREE_SAVEPOSITION)==0 || ((pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey==pCur->info.nKey)\x00pCur->eState==CURSOR_VALID || (pCur->eState==CURSOR_INVALID && loc)\x00pPage->intKey || pX->nKey>=0\x00pPage->leaf || !pPage->intKey\x00newCell!=0\x00szNew==pPage->xCellSize(pPage, newCell)\x00szNew <= MX_CELL_SIZE(pBt)\x00idx<pPage->nCell\x00pPage->leaf\x00pPage->nOverflow==0 || rc==SQLITE_OK\x00rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0\x00pCur->pKey==0\x00pCur->apPage[pCur->iPage]->nOverflow==0\x00sqlite3BtreeInsert\x00sqlite3BtreeHoldsMutex(pBtree)\x00invalidateIncrblobCursors\x00pCell<pPage->aData || pCell>=&pPage->aData[pBt->pageSize] || sqlite3PagerIswriteable(pPage->pDbPage)\x00pX->nKey<=0x7fffffff && pX->pKey!=0\x00nHeader==(int)(info.pPayload - pCell)\x00info.nKey==pX->nKey\x00*pnSize == info.nSize\x00spaceLeft == info.nLocal\x00pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage)\x00pPrior<pPage->aData || pPrior>=&pPage->aData[pBt->pageSize] || sqlite3PagerIswriteable(pPage->pDbPage)\x00pPayload<pPage->aData || pPayload>=&pPage->aData[pBt->pageSize] || sqlite3PagerIswriteable(pPage->pDbPage)\x00pSrc\x00fillInCell\x00pBt->usableSize > 4\x00nOvfl>0 || (CORRUPT_DB && (pInfo->nPayload + ovflPageSize)<ovflPageSize)\x00clearCell\x00btreePageLookup\x00CORRUPT_DB || iPage>1\x00!pMemPage || pMemPage->pgno==iPage\x00pBt->usableSize>32\x00freePage2\x00sqlite3PcacheRef\x00pgno<=pBt->nPage\x00btreeSetHasContent\x00idx>=0 && idx<pPage->nCell\x00CORRUPT_DB || sz==cellSize(pPage, idx)\x00dropCell\x00CORRUPT_DB || iStart>=pPage->hdrOffset+6+pPage->childPtrSize\x00CORRUPT_DB || iEnd <= pPage->pBt->usableSize\x00iSize>=4\x00iStart<=iLast\x00iFreeBlk>iPtr || iFreeBlk==0\x00freeSpace\x00*pRC==SQLITE_OK\x00i>=0 && i<=pPage->nCell+pPage->nOverflow\x00MX_CELL(pPage->pBt)<=10921\x00pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB\x00pPage->nOverflow<=ArraySize(pPage->apOvfl)\x00sz==pPage->xCellSize(pPage, pCell) || (sz==8 && iChild>0)\x00j < ArraySize(pPage->apOvfl)-1\x00j==0 || pPage->aiOvfl[j-1]<(u16)i\x00j==0 || i==pPage->aiOvfl[j-1]+1\x00&data[pPage->cellOffset]==pPage->aCellIdx\x00idx >= 0\x00idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB\x00idx+sz <= (int)pPage->pBt->usableSize\x00get2byte(&data[pPage->hdrOffset+3])==pPage->nCell\x00insertCell\x00nByte>=0\x00pPage->nFree>=nByte\x00pPage->nOverflow==0\x00nByte < (int)(pPage->pBt->usableSize-8)\x00pPage->cellOffset == hdr + 12 - 4*pPage->leaf\x00gap<=65536\x00top<=(int)pPage->pBt->usableSize\x00pSpace>=data && (pSpace - data)<65536\x00pPage->nCell>0 || CORRUPT_DB\x00gap+2+nByte<=top\x00top+nByte <= (int)pPage->pBt->usableSize\x00allocateSpace\x00pc>0\x00pageFindSlot\x00pPage->pBt->usableSize <= SQLITE_MAX_PAGE_SIZE\x00nCell==get2byte(&data[hdr+3])\x00iFree2==0 || iFree2>iFree\x00iFree+get2byte(&data[iFree+2]) <= usableSize\x00iFree2==0 || iFree2+get2byte(&data[iFree2+2]) <= usableSize\x00iFree+sz+sz2+iFree2-(iFree+sz) <= usableSize\x00cbrk+(iFree-top) <= usableSize\x00pc>=iCellFirst && pc<=iCellLast\x00cbrk+size<=usableSize && cbrk>=iCellFirst\x00cbrk>=iCellFirst\x00defragmentPage\x00balance_deeper_called==0\x00pCur->apPage[1]->nOverflow\x00balance_quick_called==0\x00balance\x00pRoot->nOverflow>0\x00sqlite3PagerIswriteable(pChild->pDbPage)\x00pChild->nCell==pRoot->nCell\x00balance_deeper\x00pFrom->isInit\x00pFrom->nFree>=iToHdr\x00get2byte(&aFrom[iFromHdr+5]) <= (int)pBt->usableSize\x00copyNodeContent\x00sqlite3PagerIswriteable(pParent->pDbPage)\x00pPage->nOverflow==1\x00sqlite3PagerIswriteable(pNew->pDbPage)\x00pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF)\x00balance_quick\x00szCell[i]==pPg->xCellSize(pPg, pCell) || CORRUPT_DB\x00rebuildPage\x00pParent->nOverflow==0 || pParent->nOverflow==1\x00pParent->nOverflow==0 || pParent->aiOvfl[0]==iParentIdx\x00bBulk==0 || bBulk==1\x00szScratch<=6*(int)pBt->pageSize\x00EIGHT_BYTE_ALIGNMENT(aSpace1)\x00k==0 || pOld->aiOvfl[k-1]+1==pOld->aiOvfl[k]\x00b.nCell<nMaxCells\x00sz<=pBt->maxLocal+23\x00iSpace1 <= (int)pBt->pageSize\x00leafCorrection==0 || leafCorrection==4\x00leafCorrection==0\x00pOld->hdrOffset==0\x00leafCorrection==4\x00b.szCell[b.nCell]==3 || CORRUPT_DB\x00b.apCell[b.nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB\x00d<nMaxCells\x00r<nMaxCells\x00cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB\x00CORRUPT_DB\x00j<nMaxCells\x00b.apCell[j]!=0\x00iOvflSpace <= (int)pBt->pageSize\x00iPg>=0 && iPg<nNew\x00iPg==0 || cntOld[iPg-1]>=cntNew[iPg-1] || abDone[iPg-1]\x00cntNew[iPg]>=cntOld[iPg] || abDone[iPg+1]\x00apNew[iPg]->nOverflow==0\x00apNew[iPg]->nCell==nNewCell\x00\x01\x01\x01\x01\x01\x00memcmp(abDone, \"\\01\\01\\01\\01\\01\", nNew)==0\x00nOld>0\x00nNew>0\x00nNew==1 || CORRUPT_DB\x00apNew[0]->nFree == (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2) || rc!=SQLITE_OK\x00pParent->isInit\x00balance_nonroot\x00sqlite3_mutex_notheld(mem0.mutex)\x00sqlite3ScratchMalloc\x00N>=0 && N<p->nCell\x00cachedCellSize\x00p->szCell[N]==0\x00computeCellSize\x00pPg->pgno!=iNew\x00sqlite3PagerRekey\x00(iOld-iNew)<nNew || nCell==0 || CORRUPT_DB\x000==memcmp(pCell, &aData[iOff], pCArray->pRef->xCellSize(pCArray->pRef, pCArray->apCell[i+iNew]))\x00sz>0\x00pFree>aData && (pFree - aData)<65536\x00pageFreeArray\x00editPage\x00CORRUPT_DB || pPg->hdrOffset==0\x00(pSlot+sz)<=pCArray->apCell[i] || pSlot>=(pCArray->apCell[i]+sz) || CORRUPT_DB\x00pageInsertArray\x00idx>=0 && idx+N<=p->nCell\x00p->apCell[idx]!=0\x00CORRUPT_DB || p->szCell[idx]==p->pRef->xCellSize(p->pRef, p->apCell[idx])\x00populateCellCache\x00mem0.nScratchFree <= (u32)sqlite3GlobalConfig.nScratch\x00sqlite3ScratchFree\x00pCur->curFlags & BTCF_WriteFlag\x00!hasReadConflicts(p, pCur->pgnoRoot)\x00(flags & ~(BTREE_SAVEPOSITION | BTREE_AUXDELETE))==0\x00MX_CELL_SIZE(pBt) >= nCell\x00pTmp!=0\x00bPreserve && (pCur->iPage==iCellDepth || CORRUPT_DB)\x00pPage==pCur->apPage[pCur->iPage] || CORRUPT_DB\x00(pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell\x00sqlite3BtreeDelete\x00r2->nField==nKeyCol\x00sqlite3VdbeSorterCompare\x00sqlite3VdbeSorterRowkey\x00sqlite3VdbeCursorRestore\x00sqlite3BtreeCursorIsValidNN\x00pCur->apPage[pCur->iPage]->nCell>0\x00sqlite3BtreeFirst\x00sqlite3BtreeRowCountEst\x00pSorter\x00pSorter->list.pList\x00pSorter->pReader==0\x00sqlite3VdbeSorterRewind\x00p->u.iNext<sqlite3MallocSize(pList->aMemory)\x00pTask->pUnpacked->errCode==SQLITE_OK || pTask->pUnpacked->errCode==SQLITE_NOMEM\x00(s1>0 && s1<7) || s1==8 || s1==9\x00(s2>0 && s2<7) || s2==8 || s2==9\x00vdbeSorterCompareInt\x00vdbeSorterSort\x00p1!=0 && p2!=0\x00vdbeSorterMerge\x00pTask->pThread==0 && pTask->bDone==0\x00pTask->list.pList==0\x00pTask->list.aMemory==0 || pSorter->list.aMemory!=0\x00pList->szPMA>0\x00rc!=SQLITE_OK || pTask->file.pFd\x00pTask->file.iEof==0\x00pTask->nPMA==0\x00rc!=SQLITE_OK || pList->pList==0\x00rc!=SQLITE_OK || pTask->file.iEof==iSz\x00vdbeSorterListToPMA\x00p->iBufEnd<p->nBuffer\x00vdbePmaWriteBlob\x00vdbePmaWriterFinish\x00vdbeSorterFlushPMA\x00vdbeSorterCreateThread\x00ppThread!=0\x00xTask!=0\x00sqlite3GlobalConfig.bCoreMutex!=0\x00sqlite3ThreadCreate\x00pTask->bDone==0\x00vdbeSorterFlushThread\x00pSorter->bUseThreads==0 || pSorter->nTask>1\x00pIncr->pTask!=pLast\x00p->pIncr==0 || ( (p->pIncr->pTask==&pSorter->aTask[iTask]) && (iTask!=pSorter->nTask-1 || p->pIncr->bUseThread==0) )\x00pSorter->bUseThreads || pSorter->nTask==1\x00pTask->nPMA>0 || SQLITE_MAX_WORKER_THREADS>0\x00pMain==0\x00vdbeSorterMergeTreeBuild\x00nReader<=SORTER_MAX_MERGE_COUNT\x00vdbeMergeEngineNew\x00pFile->iEof>iStart\x00pReadr->aAlloc==0 && pReadr->nAlloc==0\x00pReadr->aBuffer==0\x00pReadr->aMap==0\x00vdbePmaReaderInit\x00pReadr->pIncr==0 || pReadr->pIncr->bEof==0\x00vdbePmaReaderSeek\x00p->aBuffer\x00nRead>0\x00rc!=SQLITE_IOERR_SHORT_READ\x00aNext!=p->aAlloc\x00vdbePmaReadBlob\x00pIncr->bUseThread\x00vdbeIncrBgPopulate\x00pIncr->bEof==0\x00pIncr->pMerger->pTask==pTask\x00vdbeIncrPopulate\x00vdbeSorterSetupMerge\x00pIncr->bUseThread==0 || eMode==INCRINIT_TASK\x00vdbePmaReaderIncrInit\x00pTask->file2.iEof>0\x00eMode==INCRINIT_ROOT || eMode==INCRINIT_TASK\x00pMerger->pTask==0\x00vdbeMergeEngineInit\x00iOut<pMerger->nTree && iOut>0\x00pTask->pUnpacked!=0\x00vdbeMergeEngineCompare\x00vdbePmaReaderIncrMergeInit\x00pSorter->bUsePMA || (pSorter->pReader==0 && pSorter->pMerger==0)\x00pSorter->pReader==0 || pSorter->pMerger==0\x00pSorter->bUseThreads==0 || pSorter->pReader\x00pSorter->bUseThreads==1 || pSorter->pMerger\x00pSorter->pMerger!=0\x00pSorter->pMerger->pTask==(&pSorter->aTask[0])\x00sqlite3VdbeSorterNext\x00rc!=SQLITE_OK || pSorter->list.pList==0\x00sqlite3VdbeSorterWrite\x00(nCellKey & SQLITE_MAX_U32)==(u64)nCellKey\x00sqlite3VdbeIdxRowid\x00sqlite3VdbeIdxKeyCompare\x00iTable>=2\x00maxRootPgno!=PENDING_BYTE_PAGE(pBt)\x00btreeDropTable\x00sqlite3BtreeClearTable\x00pPage->intKey || CORRUPT_DB\x00clearDatabasePage\x00sqlite3RootPageMoved\x00sqlite_stat1\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00sqlite3AnalysisLoad\x00zDatabase!=0 || sqlite3BtreeHoldsAllMutexes(db)\x00sqlite3FindTable\x00analysisLoader\x00aOut==0\x00aLog!=0\x00pIndex!=0\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00decodeIntArray\x00matchOther<0x80\x00patternCompare\x00!pIdx->hasStat1\x0010==sqlite3LogEst(2)\x0033==sqlite3LogEst(10)\x0023==sqlite3LogEst(5)\x00sqlite3DefaultRowEst\x00zTabName\x00sqlite3UnlinkAndDeleteTable\x00sqlite3UnlinkAndDeleteIndex\x00sqlite3UnlinkAndDeleteTrigger\x00p->inTrans>TRANS_NONE && pBt->inTransaction>TRANS_NONE\x00nRef>=0\x00Main freelist: \x00Page %d is never used\x00Pointer map page %d is referenced\x00nRef==sqlite3PagerRefcount(pBt->pPager)\x00sqlite3BtreeIntegrityCheck\x00iPg<=pCheck->nPage && sizeof(pCheck->aPgRef[0])==1\x00setPageReferenced\x00%d of %d pages missing from overflow list starting at %d\x00failed to get page %d\x00freelist leaf count too big on page %d\x00free-page count in header is too small\x00invalid page number %d\x002nd reference to page %d\x00getPageReferenced\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00Page %d: \x00unable to get the page. error code=%d\x00rc==SQLITE_CORRUPT\x00btreeInitPage() returns error code %d\x00On tree page %d cell %d: \x00contentOffset<=usableSize\x00pPage->nCell==nCell\x00pPage->aCellIdx==&data[cellStart]\x00On page %d at right child: \x00pCellIdx==&data[cellStart + i*2]\x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00pc + info.nSize - 4 <= usableSize\x00Child page depth differs\x00(u32)i<=usableSize-4\x00(u32)(i+size)<=usableSize\x00j==0 || j>i+size\x00(u32)j<=usableSize-4\x00Multiple uses for byte %u of page %d\x00Fragmentation of %d bytes reported as %d on page %d\x00checkTreePage\x00pMem->zMalloc\x00pMem->u.pRowSet!=0\x00sqlite3VdbeMemSetRowSet\x00N >= ROUND8(sizeof(*p))\x00sqlite3RowSetInit\x00p!=0 && (p->rsFlags & ROWSET_NEXT)==0\x00sqlite3RowSetInsert\x00rowSetEntryAlloc\x00p->pForest==0\x00sqlite3RowSetNext\x00pA->pRight==0 || pA->v<=pA->pRight->v\x00pB->pRight==0 || pB->v<=pB->pRight->v\x00rowSetEntryMerge\x00pRowSet!=0 && (pRowSet->rsFlags & ROWSET_NEXT)==0\x00sqlite3RowSetTest\x00pList!=0\x00rowSetListToTree\x00pIn!=0\x00(*ppLast)->pRight==0\x00rowSetTreeToList\x00!pnLog || *pnLog==-1\x00!pnCkpt || *pnCkpt==-1\x00sqlite3Checkpoint\x00sqlite3PagerOkToChangeJournalMode\x00pPager->journalMode==PAGER_JOURNALMODE_WAL\x00sqlite3PagerCloseWal\x00eMode==PAGER_JOURNALMODE_DELETE || eMode==PAGER_JOURNALMODE_TRUNCATE || eMode==PAGER_JOURNALMODE_PERSIST || eMode==PAGER_JOURNALMODE_OFF || eMode==PAGER_JOURNALMODE_WAL || eMode==PAGER_JOURNALMODE_MEMORY\x00pPager->tempFile==0 || eMode!=PAGER_JOURNALMODE_WAL\x00eOld==PAGER_JOURNALMODE_MEMORY || eOld==PAGER_JOURNALMODE_OFF\x00isOpen(pPager->fd) || pPager->exclusiveMode\x00state==PAGER_OPEN || state==PAGER_READER\x00state==pPager->eState\x00Filename: %s\x0aState: %s errCode=%d\x0aLock: %s\x0aLocking mode: locking_mode=%s\x0aJournal mode: journal_mode=%s\x0aBacking store: tempFile=%d memDb=%d useJournal=%d\x0aJournal: journalOff=%lld journalHdr=%lld\x0aSize: dbsize=%d dbOrigSize=%d dbFileSize=%d\x0a\x00OPEN\x00READER\x00WRITER_LOCKED\x00WRITER_CACHEMOD\x00WRITER_DBMOD\x00WRITER_FINISHED\x00ERROR\x00?error?\x00NO_LOCK\x00RESERVED\x00SHARED\x00UNKNOWN\x00exclusive\x00normal\x00memory\x00off\x00delete\x00persist\x00truncate\x00wal\x00sqlite3PagerSetJournalMode\x00iVersion==1 || iVersion==2\x00sqlite3BtreeSetVersion\x00eMode>=0 && eMode<=ArraySize(azModeName)\x00sqlite3JournalModename\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00ATTACH''AS vacuum_db\x00(db->nDb-1)==nDb\x00vacuum_db\x00strcmp(pDb->zDbSName,\"vacuum_db\")==0\x00SELECT sql FROM \"%w\".sqlite_master WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_master WHERE type='index' AND length(sql)>10\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_master WHERE type='table'AND coalesce(rootpage,1)>0\x00(db->flags & SQLITE_Vacuum)!=0\x00INSERT INTO vacuum_db.sqlite_master SELECT*FROM \"%w\".sqlite_master WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x001==sqlite3BtreeIsInTrans(pTemp)\x001==sqlite3BtreeIsInTrans(pMain)\x00sqlite3_strnicmp(zSql,\"SELECT\",6)==0\x00zSubSql[0]!='S'\x00rc!=SQLITE_ROW\x00execSql\x00sqlite3RunVacuum\x00sqlite3BtreeSetSpillSize\x00p->pCache!=0\x00sqlite3PcacheSetSpillsize\x00sqlite3BtreeSetPagerFlags\x00nReserve>=-1 && nReserve<=255\x00nReserve>=0 && nReserve<=255\x00sqlite3BtreeSetPageSize\x00sqlite3BtreeIsInTrans(pTo)\x00b.rc!=SQLITE_OK\x00sqlite3BtreeIsInTrans(pTo)==0\x00sqlite3BtreeCopyFile\x00nSrcPage>=0\x00pgszSrc==sqlite3BtreeGetPageSize(p->pSrc)\x00pgszDest==sqlite3BtreeGetPageSize(p->pDest)\x00nDestTruncate>0\x00nDestTruncate==0 || (i64)nDestTruncate*(i64)pgszDest >= iSize || ( nDestTruncate==(int)(PENDING_BYTE_PAGE(p->pDest->pBt)-1) && iSize>=PENDING_BYTE && iSize<=PENDING_BYTE+pgszDest )\x00sqlite3_backup_step\x00sqlite3BtreeHoldsMutex(p->pSrc)\x00attachBackupObject\x00sqlite3PagerClearCache\x00pBt->inTransaction==TRANS_WRITE && p->inTrans==TRANS_WRITE\x00sqlite3BtreeIncrVacuum\x00p->inTrans!=TRANS_NONE\x00sqlite3BtreeLockTable\x000==(p->db->flags&SQLITE_ReadUncommitted) || eLock==WRITE_LOCK\x00p->sharable\x00SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock)\x00setSharedCacheTableLock\x00sqlite3VdbeMemCopy\x00pTab && IsVirtual(pTab) && !pTab->pVTable\x00no such module: %s\x00sqlite3VtabCallCreate\x00vtable constructor called recursively: %s\x00&db->pVtabCtx\x00xConstruct\x00sCtx.pTab==pTab\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00hidden\x00zType[i-1]==' '\x00vtabCallConstructor\x00p->pVtab\x00xDestroy!=0\x00pTab->pVTable==p && p->pNext==0\x00sqlite3VtabCallDestroy\x00pPager->eState!=PAGER_OPEN\x00pPager->mxPgno>=pPager->dbSize\x00sqlite3PagerMaxPageCount\x00(zRawSql - zStart) > 0\x00zRawSql[0] || nToken==0\x00sqlite3Isdigit(zRawSql[1])\x00zRawSql[0]==':' || zRawSql[0]=='$' || zRawSql[0]=='@' || zRawSql[0]=='#'\x00idx>0\x00idx>0 && idx<=p->nVar\x00'%.*q'\x00zeroblob(%d)\x00pVar->flags & MEM_Blob\x00x'\x00%02x\x00'\x00sqlite3VdbeExpandSql\x00n>0 && tokenType!=TK_ILLEGAL\x00findNextHostParameter\x00sqlite3_mutex_held(sqlite3VdbeDb(p)->mutex)\x00pNew==0\x00sqlite3Reprepare\x00pA->db==pB->db\x00sqlite3VdbeSwap\x00pTo->nVar==pFrom->nVar\x00sqlite3TransferBindings\x00sqlite3_step\x00main\x00sqlite3_strnicmp(zName, \"pragma_\", 7)==0\x00sqlite3HashFind(&db->aModule, zName)==0\x00sqlite3PragmaVtabRegister\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_size\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_file_format\x00lock_status\x00locking_mode\x00max_page_count\x00mmap_size\x00optimize\x00page_count\x00page_size\x00parser_trace\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00sql_trace\x00stats\x00synchronous\x00table_info\x00temp_store\x00temp_store_directory\x00threads\x00user_version\x00vdbe_addoptrace\x00vdbe_debug\x00vdbe_eqp\x00vdbe_listing\x00vdbe_trace\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00strlen(zBuf) < sizeof(zBuf)-1\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00tbl\x00idx\x00wdth\x00hght\x00flgs\x00seqno\x00desc\x00coll\x00key\x00seq\x00unique\x00origin\x00partial\x00file\x00id\x00table\x00to\x00on_update\x00on_delete\x00match\x00parent\x00fkid\x00busy\x00log\x00checkpointed\x00timeout\x00database\x00status\x00pragmaVtabConnect\x00j < 2\x00pragmaVtabBestIndex\x00j<ArraySize(pCsr->azArg)\x00PRAGMA \x00%Q.\x00=%Q\x00pragmaVtabFilter\x00pCsr->pPragma\x00pragmaVtabNext\x00sqlite3_result_value\x00pTab->nModuleArg==0\x00sqlite3VtabEponymousTableInit\x00pTable\x00view %s is circularly defined\x00pTable->nCol>=0\x00pTable->pSelect\x00pTable->aCol==0\x00sqlite3SchemaMutexHeld(db, 0, pTable->pSchema)\x00sqlite3ViewGetColumnNames\x00pTab\x00sqlite3VtabCallConnect\x00db->lookaside.bDisable\x00sqlite3ResultSetOfSelect\x00pSelect!=0\x00(pSelect->selFlags & SF_Resolved)!=0\x00pTab->nCol==pSelect->pEList->nExpr || db->mallocFailed\x00sqlite3SelectAddColumnTypeAndCollation\x00pNC->pSrcList!=0\x00pTab && pExpr->pTab==pTab\x00!pS\x00iCol==-1 || (iCol>=0 && iCol<pTab->nCol)\x00columnTypeImpl\x00sqlite3ExprCollSeq\x00p==pColl\x00sqlite3CheckCollSeq\x00no such index: %s\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00sqliteProcessJoin\x00(piTab==0)==(piCol==0)\x00tableAndColumnIndex\x00iLeft<iRight\x00pSrc->nSrc>iRight\x00pSrc->a[iLeft].pTab\x00pSrc->a[iRight].pTab\x00!ExprHasProperty(pEq, EP_TokenOnly|EP_Reduced)\x00addWhereTerm\x00p->op!=TK_INTEGER || (p->flags & EP_IntValue)!=0 || sqlite3GetInt32(p->u.zToken, &rc)==0\x00v!=(-2147483647-1)\x00sqlite3ExprIsInteger\x00sqlite3ExprAttachSubtrees\x00sqlite3ExprListFlags\x00Expression tree is too large (maximum depth %d)\x00setJoinExpr\x00sqlite3MatchSpanName\x00pList!=0 || pParse->db->mallocFailed!=0\x00pItem->zName==0\x00sqlite3ExprListSetName\x00pParse->pWith==pWith\x00selectPopWith\x00sqlite3ResolveSelectNames\x00pNC!=0\x00pParse==pWalker->pParse\x00pSrcList->a[i].iCursor>=0 && pSrcList->a[i].iCursor<pParse->nTab\x00the \".\" operator\x00pRight->op==TK_DOT\x00second argument to likelihood() must be a constant between 0.0 and 1.0\x00not authorized to use function: %s\x00non-deterministic functions\x00misuse of aggregate function %.*s()\x00no such function: %.*s\x00wrong number of arguments to function %.*s()\x00pDef!=0\x00subqueries\x00pNC->nRef>=nRef\x00parameters\x00pExpr->pLeft!=0\x00pExpr->pRight!=0\x00resolveExprStep\x00(validMask&~(NC_IsCheck|NC_PartIdx|NC_IdxExpr))==0\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00%s prohibited in %s\x00notValid\x00pNC\x00zCol\x00!ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced)\x00db->aDb[i].zDbSName\x00pNC && cnt==0\x00pTab!=0 && pTab->zName!=0\x00pTab->nCol>0\x00zTabName!=0\x00(pMatch->fg.jointype & JT_RIGHT)==0\x00op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT\x00pExpr->pLeft==0 && pExpr->pRight==0\x00pExpr->x.pList==0\x00pExpr->x.pSelect==0\x00misuse of aliased aggregate %s\x00zTab==0 && zDb==0\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00pMatch->iCursor==pExpr->iTable\x00pTopNC!=0\x00lookupName\x00_ROWID_\x00ROWID\x00OID\x00iCol>=0 && iCol<pEList->nExpr\x00pOrig!=0\x00(pExpr->flags & (EP_Reduced|EP_TokenOnly))==0\x00resolveAlias\x00zC!=0\x00sqlite3ExprAddCollateString\x00pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER\x00pTabList\x00pTab->iPKey<pTab->nCol\x00sqlite3AuthRead\x00access to %s.%s.%s is prohibited\x00access to %s.%s is prohibited\x00r>=0.0\x00exprProbability\x00pExpr->op==TK_AGG_FUNCTION\x00sqlite3FunctionUsesThisSrc\x00exprSrcCount\x00(p->selFlags & SF_Expanded)!=0\x00(p->selFlags & SF_Resolved)==0\x00p->pSrc->nSrc==1 && p->pOrderBy\x00pSub->pPrior && pSub->pOrderBy==0\x00pItem->fg.isCorrelated==0 && nRef<=0\x00(p->selFlags & SF_Aggregate)==0\x00a GROUP BY clause is required before HAVING\x00aggregate functions are not allowed in the GROUP BY clause\x00resolveSelectStep\x00%r %s BY term out of range - should be between 1 and %d\x00sqlite3ExprCompare\x00too many terms in %s BY clause\x00sqlite3ResolveOrderGroupBy\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00too many terms in ORDER BY clause\x00pDup\x00pParent->op==TK_COLLATE\x00pParent->pLeft==pE\x00%r ORDER BY term does not match any column in the result set\x00resolveCompoundOrderBy\x00sqlite3ExprIsInteger(pE, &i)==0\x00resolveOrderByTermToExprList\x00p->selFlags & SF_Resolved\x00(p->selFlags & SF_HasTypeInfo)==0\x00selectAddSubqueryTypeInfo\x00p->pPrior==0\x00pSrc && iFrom>=0 && iFrom<pSrc->nSrc\x00pSub!=0\x00pSubSrc\x00pSub->pSrc!=0\x00pSub->pEList->nExpr==pSub1->pEList->nExpr\x00flatten %s.%p from term %d\x0a\x00compound-subquery flattener creates %s.%p as peer\x0a\x00pParent==p\x00pParent!=p\x00pSrc->a[i+iFrom].fg.isTabFunc==0\x00pParent->pOrderBy==0\x00pSub->pPrior==0\x00pParent->pHaving==0\x00pParent->pGroupBy==0\x00After flattening:\x0a\x00flattenSubquery\x00pSubst->pEList!=0 && pExpr->iColumn<pSubst->pEList->nExpr\x00substExpr\x00sub-select returns %d columns - expected %d\x00substSelect\x00p && p->pPrior\x00(p->selFlags & SF_Recursive)==0 || p->op==TK_ALL || p->op==TK_UNION\x00ORDER BY clause should come after %s not before\x00LIMIT clause should come after %s not before\x00p->pEList\x00p->pEList && pPrior->pEList\x00p->pEList->nExpr==pPrior->pEList->nExpr\x00!pPrior->pLimit\x00Jump ahead if LIMIT reached\x00p->pLimit==0\x00p->pOffset==0\x00p->pOrderBy==0\x00p->addrOpenEphm[0] == -1\x00!pPrior->pOrderBy\x00p->op==TK_UNION\x00unionTab==dest.iSDParm || dest.eDest!=priorOp\x00p->op==TK_INTERSECT\x00p->addrOpenEphm[1] == -1\x00p->pNext==0\x00pLoop->addrOpenEphm[1]<0\x00multiSelect\x00p->selFlags & SF_MultiValue\x00p->selFlags & SF_Values\x00p->op==TK_ALL || (p->op==TK_SELECT && p->pPrior==0)\x00p->pNext==0 || p->pEList->nExpr==p->pNext->pEList->nExpr\x00p->pPrior->pNext==p\x00multiSelectValues\x00Queue table\x00recursive aggregate queries not supported\x00p->pOffset==0 || p->pLimit!=0\x00LIMIT counter\x00OFFSET counter\x00LIMIT+OFFSET\x00CLEAR\x0a\x00computeLimitRegisters\x00generateWithRecursiveQuery\x00sqlite3KeyInfoIsWriteable(pRet)\x00iCol>=0\x00multiSelectCollSeq\x00multiSelectOrderByKeyInfo\x00iContinue!=0\x00eDest==SRT_Set || eDest==SRT_Mem || eDest==SRT_Coroutine || eDest==SRT_Output\x00sqlite3VdbeCurrentAddr(v)==iJump || pParse->db->mallocFailed\x00pDistinct->eTnctType==WHERE_DISTINCT_UNORDERED\x00pSort==0\x00sqlite3Strlen30(pDest->zAffSdst)==nResultCol\x00nResultCol<=pDest->nSdst\x00nResultCol==pDest->nSdst\x00regResult==iParm\x00pSO\x00eDest==SRT_Discard\x00selectInnerLoop\x00target>0\x00pParse->pVdbe!=0\x00sqlite3ExprCodeExprList\x00ConstFactorOk(pParse)\x00sqlite3ExprCodeAtInit\x00addr>=0 && addr<p->nOp\x00sqlite3VdbeChangeToNoop\x00sqlite3VdbeCurrentAddr\x00!usedAsColumnCache(pParse, i, i+n-1)\x00sqlite3GetTempRange\x00bSeq==0 || bSeq==1\x00nData==1 || regData==regOrigData || regOrigData==0\x00nPrefixReg==nExpr+bSeq\x00pSelect->iOffset==0 || pSelect->iLimit!=0\x00pushOntoSorter\x00iFrom>=iTo+nReg || iFrom+nReg<=iTo\x00sqlite3ExprCodeMove\x00sqlite3KeyInfoIsWriteable(pInfo)\x00keyInfoFromExprList\x00j<p->nLabel\x00j>=0\x00sqlite3VdbeResolveLabel\x00p->pOrderBy!=0\x00pKeyDup==0\x00pPrior->pOrderBy==0\x00pOrderBy\x00pItem->u.x.iOrderByCol>0\x00pItem->u.x.iOrderByCol<=p->pEList->nExpr\x00nOrderBy>=nExpr || db->mallocFailed\x00sqlite3KeyInfoIsWriteable(pKeyDup)\x00left SELECT\x00right SELECT\x00Output routine for A\x00Output routine for B\x00eof-A subroutine\x00eof-B subroutine\x00A-lt-B subroutine\x00A-eq-B subroutine\x00A-gt-B subroutine\x00multiSelectOrderBy\x00pDest->eDest!=SRT_Exists\x00pDest->eDest!=SRT_Table\x00pIn->nSdst==1 || pParse->nErr>0\x00pDest->eDest==SRT_Output\x00sqlite3KeyInfoRef\x00generateOutputSubroutine\x00pTabList!=0\x00column%d\x00generateColumnNames\x00op==TK_UNION || op==TK_EXCEPT || op==TK_INTERSECT || op==TK_ALL\x00COMPOUND SUBQUERIES %d AND %d %s(%s)\x00USING TEMP B-TREE \x00explainComposite\x00(wctrlFlags & WHERE_ONEPASS_MULTIROW)==0 || ( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 && (wctrlFlags & WHERE_OR_SUBCLAUSE)==0 )\x00(wctrlFlags & WHERE_OR_SUBCLAUSE)==0 || (wctrlFlags & WHERE_USE_LIMIT)==0\x00at most %d tables in a join\x00pWInfo->eOnePass==ONEPASS_OFF\x00EIGHT_BYTE_ALIGNMENT(sWLB.pNew)\x00m==MASKBIT(ii)\x00(wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1\x00pTabItem->iCursor==pLevel->iTabCur\x00n<=pTab->nCol\x00iAuxArg!=0 || (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0\x00wctrlFlags & WHERE_ONEPASS_DESIRED\x00pIx->pSchema==pTab->pSchema\x00iIndexCur>=0\x00sqlite3WhereBegin\x00jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0\x00pExpr->op!=TK_ISNULL || op==OP_NotNull\x00pExpr->op!=TK_NOTNULL || op==OP_IsNull\x00pExpr->op!=TK_NE || op==OP_Eq\x00pExpr->op!=TK_EQ || op==OP_Ne\x00pExpr->op!=TK_LT || op==OP_Ge\x00pExpr->op!=TK_LE || op==OP_Gt\x00pExpr->op!=TK_GT || op==OP_Le\x00pExpr->op!=TK_GE || op==OP_Lt\x00sqlite3ExprIfFalse\x00pParse->iCacheLevel>=1\x00POP to %d\x0a\x00sqlite3ExprCachePop\x00sqlite3ExprIfTrue\x00sqlite3BinaryCompareCollSeq\x00exprCodeBetween\x00begin IN expr\x00pParse->nErr || nVector==1 || eType==IN_INDEX_EPH || eType==IN_INDEX_INDEX_ASC || eType==IN_INDEX_INDEX_DESC\x00cnt==1\x00destIfNull==destIfFalse\x00end IN expr\x00sqlite3ExprCodeIN\x00pX->op==TK_IN\x00p->pEList->a[0].pExpr!=0\x00p->pSrc!=0\x00idxaff==SQLITE_AFF_TEXT\x00pReq!=0 || pRhs->iColumn==XN_ROWID || pParse->nErr\x00pIdx->azColl[j]\x00i==nExpr || colUsed!=(MASKBIT(nExpr)-1)\x00USING INDEX %s FOR IN-OPERATOR\x00sqlite3FindInIndex\x00p->pTab!=0\x00sqlite3ExprCanBeNull\x00pTab->pSelect==0\x00pRes->iTable==pSrc->a[0].iCursor\x00isCandidateForInOpt\x00iDb>=0 && iDb<pParse->db->nDb\x00pParse->db->aDb[iDb].pBt!=0 || iDb==1\x00iDb<SQLITE_MAX_ATTACHED+2\x00sqlite3SchemaMutexHeld(pParse->db, iDb, 0)\x00sqlite3CodeVerifySchema\x00unable to open a temporary database file for storing temporary tables\x00db->aDb[1].pSchema\x00sqlite3OpenTempDatabase\x00first_entry_in(%d)\x00!ExprHasProperty(pIn, EP_xIsSelect)\x00sqlite3InRhsIsConstant\x00pMaskSet->n < ArraySize(pMaskSet->ix)\x00createMask\x00too many arguments on %s() - max %d\x00sqlite3WhereTabFuncArgs\x00pMaskSet->n<=(int)sizeof(Bitmask)*8\x00sqlite3WhereGetMask\x00pExpr->op!=TK_AS && pExpr->op!=TK_COLLATE\x00pExpr->pRight==0\x00ON clause references tables to its right\x00op==TK_IN\x00pLeft->op==TK_VECTOR\x00pTerm->iField==0\x00pList->nExpr==2\x00pWC->op==TK_AND\x00NOCASE\x00exprAnalyze\x00!ExprHasProperty(p, EP_TokenOnly)\x00sqlite3WhereExprUsage\x00exprSelectUsage\x00op<=TK_GE\x00exprMightBeIndexed\x00allowedOp(op)\x00(WO_EQ<<(op-TK_EQ)) < 0x7fff\x00op!=TK_ISNULL || c==WO_ISNULL\x00op!=TK_IN || c==WO_IN\x00op!=TK_EQ || c==WO_EQ\x00op!=TK_LT || c==WO_LT\x00op!=TK_LE || c==WO_LE\x00op!=TK_GT || c==WO_GT\x00op!=TK_GE || c==WO_GE\x00op!=TK_IS || c==WO_IS\x00operatorMask\x00allowedOp(pExpr->op) && pExpr->op!=TK_IN\x00pExpr->op>=TK_GT && pExpr->op<=TK_GE\x00exprCommute\x00(pTerm->wtFlags & (TERM_DYNAMIC|TERM_ORINFO|TERM_ANDINFO))==0\x00pExpr->op==TK_OR\x00pOrWc->nTerm>=2\x00(pOrTerm->wtFlags & (TERM_ANDINFO|TERM_ORINFO))==0\x00pAndTerm->pExpr\x00pOrTerm->eOperator & WO_EQ\x00j==1\x00pOrTerm->wtFlags & (TERM_COPIED|TERM_VIRTUAL)\x00IsPowerOfTwo(chngToIN)\x00chngToIN==sqlite3WhereGetMask(&pWInfo->sMaskSet, iCursor)\x00pOrTerm->leftCursor==iCursor\x00pOrTerm->u.leftColumn==iColumn\x00pLeft!=0\x00!ExprHasProperty(pNew, EP_xIsSelect)\x00exprAnalyzeOrTerm\x00pOne->pExpr->pLeft!=0 && pOne->pExpr->pRight!=0\x00pTwo->pExpr->pLeft!=0 && pTwo->pExpr->pRight!=0\x00eOp & (WO_GT|WO_GE)\x00op<TK_GE\x00whereCombineDisjuncts\x00pRight->op==TK_VARIABLE || pRight->op==TK_REGISTER\x00(char*)&likeInfoAlt == (char*)&likeInfoAlt.matchAll\x00&((char*)&likeInfoAlt)[1] == (char*)&likeInfoAlt.matchOne\x00&((char*)&likeInfoAlt)[2] == (char*)&likeInfoAlt.matchSet\x00sqlite3IsLikeFunction\x00iVar>0\x00sqlite3VdbeGetBoundValue\x00sqlite3VdbeSetVarmask\x00isLikeOrGlob\x00regexp\x00pVector->flags & EP_xIsSelect\x00pRet==0 || pRet->iTable==0\x00sqlite3ExprForVectorField\x00pScan->iEquiv<=pScan->nEquiv\x00pWC!=0\x00pX->pLeft\x00whereScanNext\x00pExpr->op==TK_EQ || pExpr->op==TK_IN || pExpr->op==TK_LT || pExpr->op==TK_GT || pExpr->op==TK_GE || pExpr->op==TK_LE || pExpr->op==TK_NE || pExpr->op==TK_IS || pExpr->op==TK_ISNOT\x00pExpr->pLeft\x00comparisonAffinity\x00iCol>=0 && iCol<pIdx->nColumn\x00j==(-2)\x00indexColumnNotNull\x00pWInfo->pTabList->nSrc>=1\x00pLoop->aLTermSpace==pLoop->aLTerm\x00pWInfo->sMaskSet.n==1 && iCur==pWInfo->sMaskSet.ix[0]\x00whereShortCut\x00(mPrereq & mUnusable)==0\x00IsVirtual(pSrc->pTab)\x00bIn==0\x00mNext>0\x00whereLoopAddVirtual\x00IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV)\x00pTerm->u.leftColumn>=(-1)\x00pTerm->eOperator & (WO_IN|WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_MATCH)\x00allocateIndexInfo\x00(mUsable & mPrereq)==mPrereq\x00pIdxInfo->needToFreeIdxStr==0\x00pNew->nLSlot>=nConstraint\x00%s.xBestIndex malfunction\x00iTerm<pNew->nLSlot\x00(mExclude & WO_IN)==0\x00pNew->nLTerm<=pNew->nLSlot\x00whereLoopAddVirtualOne\x00p->rSetup==0 || pTemplate->rSetup==0 || p->rSetup==pTemplate->rSetup\x00p->rSetup>=pTemplate->rSetup\x00whereLoopFindLesser\x00!IsVirtual(pSrc->pTab)\x0043==sqlite3LogEst(20)\x00(pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || b==0\x00whereLoopAddBtree\x00(pLoop->wsFlags & WHERE_AUTO_INDEX)==0\x00whereLoopOutputAdjust\x00(pNew->wsFlags & WHERE_VIRTUALTABLE)==0\x00(pNew->wsFlags & WHERE_TOP_LIMIT)==0\x00pNew->u.btree.nBtm==0\x00pNew->u.btree.nEq<pProbe->nColumn\x00nInMul==0 || (pNew->wsFlags & WHERE_COLUMN_NULL)!=0 || (pNew->wsFlags & WHERE_COLUMN_IN)!=0 || (pNew->wsFlags & WHERE_SKIPSCAN)!=0\x0046==sqlite3LogEst(25)\x00nIn>0\x00saved_nEq==pNew->u.btree.nEq\x00(pTop-(pTerm->pWC->a))<pTerm->pWC->nTerm\x00pTop->wtFlags & TERM_LIKEOPT\x00pTop->eOperator==WO_LT\x00eOp & (WO_LT|WO_LE)\x00pNew->nOut==saved_nOut\x00eOp & (WO_ISNULL|WO_EQ|WO_IN|WO_IS)\x00(eOp & WO_IN) || nIn==0\x0042==sqlite3LogEst(18)\x00whereLoopAddBtreeIndex\x00pLower || pUpper\x00pUpper==0 || (pUpper->wtFlags & TERM_VNULL)==0\x00whereRangeScanEst\x0020==sqlite3LogEst(4)\x00whereRangeAdjust\x00rc==SQLITE_OK || sCur.n==0\x00whereLoopAddOr\x00nLoop<=pWInfo->pTabList->nSrc\x00aSortCost==0 || &pSpace[nSpace]==(char*)&aSortCost[nOrderBy]\x00aSortCost!=0 || &pSpace[nSpace]==(char*)pX\x0048==sqlite3LogEst(28)\x00aFrom[0].isOrdered==0\x00no query solution\x00pWInfo->nLevel==nLoop\x00pWInfo->sorted==0\x00wherePathSolver\x00pOrderBy!=0\x00wctrlFlags & WHERE_ORDERBY_LIMIT\x00nColumn==nKeyCol+1 || !HasRowid(pIndex->pTable)\x00pIndex->aiColumn[nColumn-1]==XN_ROWID || !HasRowid(pIndex->pTable)\x00j>=pLoop->u.btree.nEq || (pLoop->aLTerm[j]==0)==(j<pLoop->nSkip)\x00(pLoop->aLTerm[i]->eOperator & WO_IN)\x00wherePathSatisfiesOrderBy\x00nOrderBy>0 && 66==sqlite3LogEst(100)\x00whereSortingCost\x00!ExprHasProperty(pExpr, EP_FromJoin) || pExpr->iRightJoinTable!=pSrc->iCursor || pLoop->prereq!=0\x00automatic index on %s(%s)\x00nKeyCol>0\x00auto-index\x00(u32)n==pLoop->u.btree.nEq\x00n==nKeyCol\x00pLevel->iIdxCur>=0\x00for %s\x00next row of \"%s\"\x00constructAutomaticIndex\x00pIdx->aColExpr\x00pIdx->aColExpr->nExpr>iIdxCol\x00sqlite3ExprCodeLoadIndexColumn\x00x==XN_EXPR\x00pIdx->aColExpr!=0\x00sqlite3IndexAffinityStr\x00SEARCH\x00SCAN\x00 SUBQUERY %d\x00 TABLE %s\x00 AS %s\x00pLoop->u.btree.pIndex!=0\x00!(flags&WHERE_AUTO_INDEX) || (flags&WHERE_IDX_ONLY)\x00PRIMARY KEY\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00=\x00>? AND rowid<\x00>\x00flags&WHERE_TOP_LIMIT\x00<\x00 USING INTEGER PRIMARY KEY (rowid%s?)\x00 VIRTUAL TABLE INDEX %d:%s\x00sqlite3WhereExplainOneScan\x00 (\x00 AND \x00%s=?\x00ANY(%s)\x00<expr>\x00nTerm>=1\x00(\x00,\x00explainAppendTerm\x00init LEFT JOIN no-match flag\x00pLevel->u.in.aInLoop!=0 || db->mallocFailed\x00iIn>0\x00pOp->opcode==OP_Column || pOp->opcode==OP_Rowid\x00pOp->opcode!=OP_Column || pOp->p3==iReg+j+2\x00pOp->opcode!=OP_Rowid || pOp->p2==iReg+j+2\x00pCompare!=0 || db->mallocFailed\x00pLoop->u.btree.nEq==1\x00pTerm!=0\x00pTerm->pExpr!=0\x00omitTable==0\x00pStart!=0 || pEnd!=0\x00(pStart->wtFlags & TERM_VNULL)==0\x00(pEnd->wtFlags & TERM_VNULL)==0\x00pLevel->p5==0\x00nEq>=pLoop->nSkip\x00pWInfo->pOrderBy==0 || pWInfo->pOrderBy->nExpr==1 || (pWInfo->wctrlFlags&WHERE_ORDERBY_MIN)==0\x00pLoop->nSkip==0\x00(pRangeStart->wtFlags & TERM_LIKEOPT)==0 || (pLoop->wsFlags & WHERE_TOP_LIMIT)!=0\x00pRangeStart!=0\x00pRangeStart->wtFlags & TERM_LIKEOPT\x00LIKE loop counter\x00(bRev & ~1)==0\x00pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0\x00zStartAff==0 || sqlite3Strlen30(zStartAff)>=nEq\x00op!=0\x00pTerm->eOperator & WO_OR\x00(pTerm->wtFlags & TERM_ORINFO)!=0\x00pSubWInfo || pParse->nErr || db->mallocFailed\x00(pSubLoop->wsFlags & WHERE_AUTO_INDEX)==0\x00pSubWInfo->a[0].iIdxCur==iCovCur\x00bRev==0 || bRev==1\x00pE!=0\x00x>0\x00!ExprHasProperty(pE, EP_FromJoin)\x00(pTerm->prereqRight & pLevel->notReady)!=0\x00record LEFT JOIN hit\x00pWInfo->untestedTerms\x00pTerm->pExpr\x00sqlite3WhereCodeOneLoopStart\x00pLevel->pWLoop->aLTerm[iEq]==pTerm\x00iTarget>0\x00(pLoop->wsFlags & WHERE_MULTI_OR)==0\x00codeEqualityTerm\x00disableTerm\x00nReg>0\x00nReg<=pList->nExpr\x00nReg==1\x00codeExprOrVector\x00(pLoop->wsFlags & WHERE_VIRTUALTABLE)==0\x00zAff!=0 || pParse->db->mallocFailed\x00begin skip-scan on %s\x00zAff==0 || (int)strlen(zAff)>=nEq\x00codeAllEqualityTerms\x00p->iTable>=0\x00sqlite3ExprNeedsNoAffinityChange\x00pLevel->iLikeRepCntr>0\x00pOp!=0\x00pOp->opcode==OP_String8 || pTerm->pWC->pWInfo->pParse->db->mallocFailed\x00whereLikeOptimizationStringFixup\x00codeApplyAffinity\x00iIdxCur>0\x00pIdx->aiColumn[pIdx->nColumn-1]==-1\x00pIdx->aiColumn[i]<pTab->nCol\x00codeDeferredSeek\x00aColExpr->a[iIdxCol].pExpr!=0\x00whereIndexExprTrans\x00next skip-scan on %s\x00(ws & WHERE_IDX_ONLY)==0 || (ws & WHERE_INDEXED)!=0\x00pWInfo->nLevel<=pTabList->nSrc\x00pIdx->pTable==pTab\x00x>=0\x00(pLoop->wsFlags & WHERE_IDX_ONLY)==0 || x>=0 || pWInfo->eOnePass\x00sqlite3WhereEnd\x00whereInfoFree\x00pWInfo->iContinue!=0\x00sqlite3WhereContinueLabel\x00analyzeAggregate\x00sqlite3ExprAnalyzeAggregates\x00USE TEMP B-TREE FOR %s\x00pWInfo->wctrlFlags & WHERE_GROUPBY\x00pWInfo->wctrlFlags & WHERE_SORTBYGROUP\x00sqlite3WhereIsSorted\x00!ExprHasProperty(pF->pExpr, EP_xIsSelect)\x00updateAccumulator\x00finalizeAggFunctions\x00nReg==pAggInfo->mxReg-pAggInfo->mnReg+1\x00pAggInfo->aCol[i].iMem>=pAggInfo->mnReg && pAggInfo->aCol[i].iMem<=pAggInfo->mxReg\x00pAggInfo->aFunc[i].iMem>=pAggInfo->mnReg && pAggInfo->aFunc[i].iMem<=pAggInfo->mxReg\x00!ExprHasProperty(pE, EP_xIsSelect)\x00DISTINCT aggregates must have exactly one argument\x00resetAccumulator\x00!p->pGroupBy\x00pTab && !pTab->pSelect && pExpr\x00isSimpleCount\x00SCAN TABLE %s%s%s\x00 USING COVERING INDEX \x00*ppMinMax==0 || (*ppMinMax)->nExpr==1\x00minMaxQuery\x00addrBreak<0\x00nColumn==sqlite3Strlen30(pDest->zAffSdst)\x00eDest==SRT_Output || eDest==SRT_Coroutine\x00generateSortTail\x00op==TK_VECTOR || op==TK_REGISTER || op==TK_SELECT\x00exprVectorRegister\x00pVtab!=0\x00pVtab->pModule!=0\x00sqlite3VtabOverloadFunction\x00(errCode&0xff)==SQLITE_CONSTRAINT\x00sqlite3HaltConstraint\x00pParse!=0\x00pParse==p->pParse\x00EIGHT_BYTE_ALIGNMENT(x.pSpace)\x00x.nFree>=0\x00EIGHT_BYTE_ALIGNMENT(&x.pSpace[x.nFree])\x00sqlite3VdbeMakeReady\x00(pOp - p->aOp) >= 3\x00pOp[-1].opcode==OP_Integer\x00ADDR(pOp->p2)<pParse->nLabel\x00p->bIsReader!=0 || DbMaskAllZero(p->btreeMask)\x00resolveP2Values\x00EIGHT_BYTE_ALIGNMENT(p->pSpace)\x00EIGHT_BYTE_ALIGNMENT(pBuf)\x00allocSpace\x00sqlite3BeginTransaction\x00pParse->db!=0\x00sqlite3CommitTransaction\x00sqlite3RollbackTransaction\x00temporary table name must be unqualified\x00isTemp==0 || isTemp==1\x00isView==0 || isView==1\x00table %T already exists\x00!db->init.busy || CORRUPT_DB\x00there is already an index named %s\x00sqlite_sequence\x00pName2!=0\x00corrupt database\x00unknown database %T\x00db->init.iDb==0 || db->init.busy || (db->flags & SQLITE_Vacuum)!=0\x00sqlite3TwoPartName\x00sqlite_\x00object name reserved for internal use: %s\x00sqlite3StartTable\x00!db->init.busy || !pSelect\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00view\x00pParse->nTab==1\x00p->aCol==0\x00CREATE %s %.*s\x00UPDATE %Q.%s SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00p==pOld\x00!pSelect && pCons && pEnd\x00sqlite3EndTable\x00pParse->pNewTable==pTab\x00pIdx->nColumn>=pIdx->nKeyCol+n\x00pIdx->nColumn>=j\x00j<pPk->nColumn\x00pPk->nColumn==j\x00pTab->nCol==j\x00convertToWithoutRowidTable\x00pName1 && pName2\x00pName && pName->z\x00index\x00db->mallocFailed==0 || pTab==0\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00pName==0\x00pStart==0\x00pParse->nErr==0\x00altertab_\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00pName->z!=0\x00there is already a table named %s\x00index %s already exists\x00!db->init.busy\x00sqlite_autoindex_%s_%d\x00pList->nExpr==1\x00EIGHT_BYTE_ALIGNMENT(pIndex->aiRowLogEst)\x00EIGHT_BYTE_ALIGNMENT(pIndex->azColl)\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00pCopy!=0\x00j<=0x7fff\x00nExtra>=nColl\x00i==pIndex->nColumn\x00HasRowid(pTab) || pTab->iPKey<0 || sqlite3ColumnOfIndex(pIndex, pTab->iPKey)>=0\x00IsUniqueIndex(pIdx)\x00pIdx->idxType!=SQLITE_IDXTYPE_APPDEF\x00IsUniqueIndex(pIndex)\x00pIdx->aiColumn[k]>=0\x00conflicting ON CONFLICT clauses specified\x00!IN_DECLARE_VTAB\x00sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema)\x00p==pIndex\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.%s VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00sqlite3CreateIndex\x00pItem && pSrc->nSrc==1\x00sqlite3SrcListLookup\x00db->nDb>iDb\x00sqlite3FixInit\x00%s %T cannot reference objects in database %s\x00sqlite3FixSrcList\x00%s cannot use variables\x00p->nExpr>0\x00p->a[p->nExpr-1].sortOrder==SQLITE_SO_ASC\x00sqlite3ExprListSetSortOrder\x00too many columns in %s\x00type==NC_IsCheck || type==NC_PartIdx || type==NC_IdxExpr\x00sqlite3ResolveSelfReference\x00x<pIdx->pTable->nCol\x00estimateIndexWidth\x00pParse->nested<10\x00sqlite3NestedParse\x00pKey!=0 || db->mallocFailed || pParse->nErr\x00sqlite3RefillIndex\x00index '%q'\x00pIdx->aiColumn[j]>=0\x00, \x00sqlite3UniqueConstraint\x00sqlite3ChangeCookie\x00pIdx->isResized==0\x00resizeIndexObject\x00\x0a \x00,\x0a \x00\x0a)\x00CREATE TABLE \x00pCol->affinity-SQLITE_AFF_BLOB >= 0\x00pCol->affinity-SQLITE_AFF_BLOB < ArraySize(azType)\x00pCol->affinity==SQLITE_AFF_BLOB || pCol->affinity==sqlite3AffinityType(zType, 0)\x00k<=n\x00createTableStmt\x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00z<=zTerm\x00sqlite3Utf8CharLen\x00too many columns on %s\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00isInit==0 || isInit==1\x00sqlite3ExprIsConstantOrFunction\x00sqlite3AddNotNull\x00table \"%s\" has more than one primary key\x00pCExpr!=0\x00autoInc==0 || autoInc==1\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00sqlite3AddPrimaryKey\x00pTo!=0\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00sqlite3SchemaMutexHeld(db, 0, p->pSchema)\x00pNextTo->pPrevTo==0\x00sqlite3CreateForeignKey\x00isDeferred==0 || isDeferred==1\x00sqlite3DeferForeignKey\x00pIdx->nKeyCol==1\x00sqlite3AddCollateType\x00pName->nSrc==1\x00isView==0 || isView==LOCATE_VIEW\x00sqlite_stat\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00sqlite3DropTable\x00sqlite_stat%d\x00DELETE FROM %Q.%s WHERE %s=%Q\x00sqlite3FkDropTable\x00pTabList->nSrc==1\x00rcauth==SQLITE_OK || rcauth==SQLITE_DENY || rcauth==SQLITE_IGNORE\x00!isView || pTrigger\x00!isView\x00pIdx->pSchema==pTab->pSchema\x00IsVirtual(pTab)==0 || eOnePass!=ONEPASS_MULTI\x00IsVirtual(pTab) || bComplex || eOnePass!=ONEPASS_OFF\x00pPk->aiColumn[i]>=0\x00pPk || IsVirtual(pTab) || iDataCur==iTabCur\x00pPk || IsVirtual(pTab) || iIdxCur==iDataCur+1\x00nKey==nPk\x00pPk!=0 || pTab->pSelect!=0\x00nKey==0\x00nKey==1\x00eOnePass==ONEPASS_OFF || eOnePass==ONEPASS_SINGLE\x00rows deleted\x00sqlite3DeleteFrom\x00pList==0 || IsVirtual(pTab)==0\x00sqlite3SchemaMutexHeld(pParse->db, 0, pTmpSchema)\x00sqlite3TriggerList\x00sqlite3TriggersExist\x00checkColumnOverlap\x00table %s may not be modified\x00cannot modify %s because it is a view\x00pParse\x00sqlite3AuthContextPush\x00pFrom->nSrc==1\x00pFrom->a[0].pOn==0\x00pFrom->a[0].pUsing==0\x00sqlite3MaterializeView\x00pOffset==0 || pLimit!=0 || pParse->nErr>0 || pParse->db->mallocFailed!=0\x00pNew->pSrc!=0 || pParse->nErr>0\x00pNew!=&standin\x00sqlite3SelectNew\x00op==OP_OpenRead || op==OP_OpenWrite\x00op==OP_OpenWrite || p5==0\x00sqlite3OpenTableAndIndices\x00sqlite3VtabMakeWritable\x00sqlite3GenerateRowDelete\x00isNew==1 || isNew==0\x00sqlite3TriggerColmask\x00pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger)\x00getRowTrigger\x00pTop->pVdbe\x00Start: %s.%s (%s %s%s%s ON %s)\x00-- TRIGGER %s\x00End: %s.%s\x00!pSubParse->pAinc && !pSubParse->pZombieTab\x00!pSubParse->pTriggerPrg && !pSubParse->nMaxArg\x00codeRowTrigger\x00default\x00n/a\x00pParse->pTriggerTab && pParse->pToplevel\x00pStepList\x00pParse->okConstFactor==0\x00pStep->op==TK_SELECT\x00codeTriggerProgram\x00pTrigger || tmask==0\x00no such column: %s\x00(chngRowid & chngPk)==0\x00chngRowid==0 || chngRowid==1\x00chngPk==0 || chngPk==1\x00iCur!=iDataCur || !HasRowid(pTab)\x00pPk\x00chngKey || pTrigger || hasFK || regOldRowid==regNewRowid\x00regOldRowid>0\x00regNew==regNewRowid+1\x00rows updated\x00sqlite3Update\x00updateVirtualTable\x00pIdx->aiColumn[i]>=0\x00ppIdx && *ppIdx==0\x00!paiCol || *paiCol==0\x00nCol>1\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00sqlite3FkLocateIndex\x00sqlite3FkOldmask\x00op==TK_UPDATE || op==TK_INSERT || op==TK_DELETE\x00tr_tm==TRIGGER_BEFORE || tr_tm==TRIGGER_AFTER\x00(op==TK_UPDATE)==(pChanges!=0)\x00p->pSchema!=0\x00p->pTabSchema!=0\x00p->pSchema==p->pTabSchema || p->pSchema==pParse->db->aDb[1].pSchema\x00sqlite3CodeRowTrigger\x00pPrg || pParse->nErr || pParse->db->mallocFailed\x00Call: %s.%s\x00fkey\x00sqlite3CodeRowTriggerDirect\x00onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail || onError==OE_Ignore || onError==OE_Replace\x00onError==OE_Replace\x00%s column %d\x00sqlite3GenerateConstraintChecks\x00pExpr->iColumn>=0 || pExpr->iColumn==-1\x00checkConstraintExprNode\x00%s.rowid\x00iIdxCur+i!=iDataCur || pPk==pIdx\x00sqlite3GenerateRowIndexDelete\x00(regOld==0)!=(regNew==0)\x00isIgnoreErrors==0 || (regOld!=0 && regNew==0)\x00pFKey->nCol==1 || (aiFree && pIdx)\x00pIdx==0 || pIdx->aiColumn[i]>=0\x00regOld==0 && regNew!=0\x00aiCol || pFKey->nCol==1\x00sqlite3FkCheck\x00aiCol[i]!=pTab->iPKey\x00nIncr==1\x00fkLookupParent\x00pIdx==0 || pIdx->pTable==pTab\x00pIdx==0 || pIdx->nKeyCol==pFKey->nCol\x00pIdx!=0 || pFKey->nCol==1\x00pIdx!=0 || HasRowid(pTab)\x00fkScanChildren\x00update_flags==0 || update_flags==OPFLAG_ISUPDATE || update_flags==(OPFLAG_ISUPDATE|OPFLAG_SAVEPOSITION)\x00pParse->nested==0\x00sqlite3CompleteInsertion\x00iFromCol>=0\x00pIdx!=0 || (pTab->iPKey>=0 && pTab->iPKey<pTab->nCol)\x00pStep!=0\x00fkActionTrigger\x00autoIncrementEnd\x00pSrc->nSrc>0\x00targetSrcList\x00(pTrigger && tmask) || (pTrigger==0 && tmask==0)\x00!pTrigger\x00pList==0\x00!withoutRowid\x00table %S has no column named %s\x00pSelect->pEList\x00useTempTable==0\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00pIdx\x00pSelect==0\x00rows inserted\x00sqlite3Insert\x00pSelect->pSrc\x00pSelect->pOffset==0\x00pEList->a[0].pExpr\x00pDestCol->pDflt==0 || pDestCol->pDflt->op==TK_SPAN\x00pSrcCol->pDflt==0 || pSrcCol->pDflt->op==TK_SPAN\x00HasRowid(pDest) || destHasUniqueIdx\x00(pDest->tabFlags & TF_Autoincrement)==0\x00pSrcIdx\x00xferOptimization\x00pDest && pSrc\x00pDest->pTable!=pSrc->pTable\x00pSrc->aColExpr!=0 && pDest->aColExpr!=0\x00xferCompatibleIndex\x00pOp->p4.pVtab!=0\x00readsTable\x00pExpr->op!=TK_REGISTER\x00sqlite3ExprCodeAndCache\x00pFrom->zErrMsg==0 || pFrom->nErr\x00pTo->zErrMsg==0 || pTo->nErr\x00transferParseError\x00aOp && !p->db->mallocFailed\x00DbMaskAllZero(p->btreeMask)\x00sqlite3VdbeTakeOpArray\x00pTrigger->pSchema==pTab->pSchema || pTrigger->pSchema==db->aDb[1].pSchema\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.%s WHERE tbl_name=%Q and type!='trigger'\x00sqlite3CodeDropTable\x00pTable->pSchema==pTrigger->pSchema || iDb==1\x00DELETE FROM %Q.%s WHERE name=%Q AND type='trigger'\x00sqlite3DropTriggerPtr\x00destroyTable\x00iTable>1\x00UPDATE %Q.%s SET rootpage=%d WHERE #%d AND rootpage=#%d\x00destroyRootPage\x00sqlite3SchemaMutexHeld(db, idx, 0)\x00sqliteViewResetAll\x00parameters are not allowed in views\x00sEnd.z[0]!=0\x00sqlite3CreateView\x00too many terms in compound SELECT\x00yy_reduce\x00pList!=0 || db->mallocFailed!=0\x00db->mallocFailed || pItem->pExpr==pSpan->pExpr\x00sqlite3ExprListSetSpan\x00pIndexedBy!=0\x00pItem->fg.notIndexed==0\x00pItem->fg.isIndexedBy==0\x00pItem->fg.isTabFunc==0\x00sqlite3SrcListIndexedBy\x00sqlite3SrcListFuncArgs\x00 \x00pB!=0\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00sqlite3JoinType\x00pList->nExpr==iFirst+i+1\x00pFirst!=0\x00pFirst->op==TK_SELECT_COLUMN\x00sqlite3ExprListAppendVector\x00!ExprHasProperty(pExpr, EP_IntValue|EP_Reduced|EP_TokenOnly)\x00z[0]!=0\x00n==(u32)sqlite3Strlen30(z)\x00z[0]=='?'\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00sqlite3ExprAssignVarNumber\x00pIn==0 || pIn[0]>=3\x00pIn[1]<=pIn[0]\x00sqlite3VListAdd\x00pToken\x00sqlite3ExprFunction\x00sqlite3PExprAddSelect\x00syntax error after column name \"%.*s\"\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.%s WHERE name=%Q AND type='index'\x00sqlite3DropIndex\x00-%T\x00pId2\x00pBt!=0\x00pDb==&db->aDb[0]\x00eMode==PAGER_LOCKINGMODE_NORMAL || eMode==PAGER_LOCKINGMODE_EXCLUSIVE\x00eAuto>=0 && eAuto<=2\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00pCol->pDflt==0 || pCol->pDflt->op==TK_SPAN\x00issisi\x00ssiii\x00siii\x00pParse->nMem<=pPragma->nPragCName\x00iis\x00isi\x00c\x00u\x00isisi\x00db->aDb[i].zDbSName!=0\x00iss\x00is\x00iissssss\x00NONE\x00pParse->nErr>0 || pFK==0\x00x==0\x00pFK->nCol==1\x00si\x00parser: \x00iDb==0 || pId2->z\x00sqlite3SchemaMutexHeld(db, i, 0)\x00*** in database %s ***\x0a\x00pParse->nMem>=8+j\x00sqlite3NoTempsInRange(pParse,1,7+j)\x00NULL value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00iCol!=XN_ROWID && iCol<pTab->nCol\x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00encnames[SQLITE_UTF8].enc==SQLITE_UTF8\x00encnames[SQLITE_UTF16LE].enc==SQLITE_UTF16LE\x00encnames[SQLITE_UTF16BE].enc==SQLITE_UTF16BE\x00unsupported encoding: %s\x00full\x00restart\x00sqlite3LogEst(25)==46\x00ANALYZE \"%w\".\"%w\"\x00pPragma->ePragTyp==PragTyp_BUSY_TIMEOUT\x00unknown\x00closed\x00ss\x00sqlite3Pragma\x00fd!=0\x00sqlite3_file_control\x00p->nOp + N <= p->pParse->nOpAlloc\x00sqlite3VdbeVerifyNoMallocRequired\x00eMode==PAGER_LOCKINGMODE_QUERY || eMode==PAGER_LOCKINGMODE_NORMAL || eMode==PAGER_LOCKINGMODE_EXCLUSIVE\x00pPager->exclusiveMode || 0==sqlite3WalHeapMemory(pPager->pWal)\x00sqlite3PagerLockingMode\x00incremental\x00(pDb->safety_level & PAGER_SYNCHRONOUS_MASK)==pDb->safety_level\x00setAllPagerFlags\x00sqlite3BtreeSetMmapLimit\x00temporary storage cannot be changed from within a transaction\x00c=='i'\x00sqlite3VdbeMultiLoad\x00SET NULL\x00SET DEFAULT\x00NO ACTION\x00action==OE_None\x00actionName\x00LIKE or GLOB pattern too complex\x00zB==sqlite3_value_text(argv[0])\x00ESCAPE expression must be a single character\x00p && p->pFunc\x00sqlite3_user_data\x00likeFunc\x00sqlite3_result_int\x00setLikeOptFlag\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00DEBUG\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_SYNCHRONOUS=2\x00ENABLE_API_ARMOR\x00SYSTEM_MALLOC\x00THREADSAFE=1\x00unknown database: %s\x00sqlite3PcacheShrink\x00aHardLimit[SQLITE_LIMIT_LENGTH]==SQLITE_MAX_LENGTH\x00aHardLimit[SQLITE_LIMIT_SQL_LENGTH]==SQLITE_MAX_SQL_LENGTH\x00aHardLimit[SQLITE_LIMIT_COLUMN]==SQLITE_MAX_COLUMN\x00aHardLimit[SQLITE_LIMIT_EXPR_DEPTH]==SQLITE_MAX_EXPR_DEPTH\x00aHardLimit[SQLITE_LIMIT_COMPOUND_SELECT]==SQLITE_MAX_COMPOUND_SELECT\x00aHardLimit[SQLITE_LIMIT_VDBE_OP]==SQLITE_MAX_VDBE_OP\x00aHardLimit[SQLITE_LIMIT_FUNCTION_ARG]==SQLITE_MAX_FUNCTION_ARG\x00aHardLimit[SQLITE_LIMIT_ATTACHED]==SQLITE_MAX_ATTACHED\x00aHardLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]== SQLITE_MAX_LIKE_PATTERN_LENGTH\x00aHardLimit[SQLITE_LIMIT_VARIABLE_NUMBER]==SQLITE_MAX_VARIABLE_NUMBER\x00aHardLimit[SQLITE_LIMIT_TRIGGER_DEPTH]==SQLITE_MAX_TRIGGER_DEPTH\x00aHardLimit[SQLITE_LIMIT_WORKER_THREADS]==SQLITE_MAX_WORKER_THREADS\x00sqlite3_limit\x00unlocked\x00shared\x00reserved\x00pending\x00p->aOp[i].opcode!=OP_ResultRow\x00sqlite3VdbeVerifyNoResultRow\x00INSERT INTO %Q.%s VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00!pParse->pNewTrigger\x00sqlite3FinishTrigger\x00pName1!=0\x00op==TK_INSERT || op==TK_UPDATE || op==TK_DELETE\x00op>0 && op<0xff\x00temporary trigger may not have qualified name\x00pTableName->nSrc==1\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00cannot create INSTEAD OF trigger on table: %S\x00pParse->pNewTrigger==pTrigger\x00sqlite3BeginTrigger\x00pSelect != 0 || db->mallocFailed\x00sqlite3TriggerInsertStep\x00no such trigger: %S\x00sqlite3DropTrigger\x00v || db->mallocFailed\x00pFunc->nArg==-1 || (pFunc->nArg&0xff)==pFunc->nArg\x00codeAttach\x00sqlite_attach\x00too many attached databases - max %d\x00cannot ATTACH database within transaction\x00z && zName\x00database %s is already in use\x00pVfs\x00database is already attached\x00iDb>=2\x00unable to open database: %s\x00attachFunc\x00*pzErrMsg==0\x00file:\x00localhost\x00invalid uri authority: %.*s\x00octet>=0 && octet<256\x00vfs\x00cache\x00mode\x00access\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00sqlite3ParseUri\x00private\x00ro\x00rw\x00rwc\x00sqlite_detach\x00no such database: %s\x00cannot detach database %s\x00cannot DETACH database within transaction\x00database %s is locked\x00pName1->z\x00unable to identify the object to be reindexed\x00pDb!=0\x00reindexDatabases\x00zColl!=0\x00z!=0 || pIndex->aiColumn[i]<0\x00collationMatch\x00sqlite3Reindex\x00sqlite3BtreeHoldsAllMutexes(pParse->db)\x00pName2!=0 || pName1==0\x00sqlite3Analyze\x00sqlite3VdbeDb(v)==db\x00CREATE TABLE %Q.%s(%s)\x00i<ArraySize(aTable)\x00openStatTable\x00tbl,idx,stat\x00sqlite_stat3\x00sqlite_stat4\x00analyzeDatabase\x00sqlite_%\x00Analysis for %s.%s\x00iDb==sqlite3SchemaToIndex(db, pIdx->pSchema)\x00regChng==(regStat4+1)\x00BBB\x00\"BBB\"[0]==SQLITE_AFF_TEXT\x00analyzeOneTable\x00stat_init\x00nCol>0\x00nKeyCol<=nCol\x00statInit\x00n>=0\x00sqlite3_result_blob\x00stat_push\x00p->nCol>0\x00iChng<p->nCol\x00statPush\x00regOut!=regStat4 && regOut!=regStat4+1\x00iParam==STAT_GET_STAT1\x00callStatGet\x00stat_get\x00argc==1\x00%llu\x00 %llu\x00p->current.anEq[i]\x00z[0]=='\\0' && z>zRet\x00statGet\x00analyzeTable\x00pSrc->nSrc==1\x00there is already another table or index with this name: %s\x00view %s may not be altered\x00UPDATE \"%w\".%s SET sql = sqlite_rename_parent(sql, %Q, %Q) WHERE %s;\x00UPDATE %Q.%s SET sql = CASE WHEN type = 'trigger' THEN sqlite_rename_trigger(sql, %Q)ELSE sqlite_rename_table(sql, %Q) END, tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqlite_autoindex%%' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_master SET sql = sqlite_rename_trigger(sql, %Q), tbl_name = %Q WHERE %s;\x00sqlite3AlterRenameTable\x00table %s may not be altered\x00name=%Q\x00%s OR name=%Q\x00type='trigger' AND (%s)\x00iTrigDb==iDb || iTrigDb==1\x00tbl_name=%Q\x00reloadTableSchema\x00pNew\x00pDflt==0 || pDflt->op==TK_SPAN\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00db->mallocFailed == 1\x00Cannot add a column with non-constant default\x00UPDATE \"%w\".%s SET sql = substr(sql,1,%d) || ', ' || %Q || substr(sql,%d) WHERE type = 'table' AND name = %Q\x00sqlite3AlterFinishAddColumn\x00virtual tables may not be altered\x00Cannot add a column to a view\x00pTab->addColOffset>0\x00pNew->nCol>0\x00nAlloc>=pNew->nCol && nAlloc%8==0 && nAlloc-pNew->nCol<8\x00sqlite_altertab_%s\x00sqlite3AlterBeginAddColumn\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.%s SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name='%q' AND type='table'\x00sqlite3SchemaMutexHeld(db, 0, pSchema)\x00pTab==pOld\x00sqlite3VtabFinishParse\x000==pTable->pIndex\x00pTable->nModuleArg==0\x00(pParse->sNameToken.z==pName2->z && pName2->z!=0) || (pParse->sNameToken.z==pName1->z && pName2->z==0)\x00sqlite3VtabBeginParse\x00pArg->z <= p->z\x00sqlite3VtabArgExtend\x00duplicate WITH table name: %s\x00(pNew!=0 && zName!=0) || db->mallocFailed\x00sqlite3WithAdd\x00stateno<=YY_REDUCE_COUNT\x00i!=YY_REDUCE_USE_DFLT\x00i>=0 && i<YY_ACTTAB_COUNT\x00yy_lookahead[i]==iLookAhead\x00yy_find_reduce_action\x00%sAccept!\x0a\x00yypParser->yytos==yypParser->yystack\x00yy_accept\x00TOKEN.z[0]\x00yy_syntax_error\x00azResult!=0\x00sqlite3_free_table\x00pCtx->pVdbe!=0\x00sqlite3_get_auxdata\x00sqlite3_get_table() called with two or more incompatible queries\x00RTRIM\x00db->pDfltColl!=0\x00db->mutex!=0 || isThreadsafe==0 || sqlite3GlobalConfig.bFullMutex==0\x00db!=0 || rc==SQLITE_NOMEM\x00openDatabase\x00rc==SQLITE_NOMEM || rc==SQLITE_OK\x00unable to use function %s in the requested context\x00sqlite3RegisterPerConnectionBuiltinFunctions\x00automatic extension loading failed: %s\x00sz > (int)sizeof(LookasideSlot*)\x00setupLookaside\x00\x00\x00\x00*ppDb || rc==SQLITE_NOMEM\x00sqlite3_open16\x00sqlite3_prepare16\x00sqlite3_result_error16\x00sqlite3_result_int64\x00sqlite3_result_null\x00sqlite3_result_text16\x00sqlite3_result_text16be\x00sqlite3_result_text16le\x00sqlite3_set_auxdata\x00no such table column: %s.%s\x00pTo->isPrepareV2 || pTo->expmask==0\x00pFrom->isPrepareV2 || pFrom->expmask==0\x00sqlite3_transfer_bindings\x00sqlite3_prepare16_v2\x00sqlite3_clear_bindings\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00pBlob->pStmt || db->mallocFailed\x00aOp!=0\x00sqlite3_blob_open\x00cannot open value of type %s\x00null\x00no such rowid: %lld\x00rc!=SQLITE_OK || zErr==0\x00rc!=SQLITE_ROW && rc!=SQLITE_DONE\x00blobSeekToRow\x00db == v->db\x00blobReadWrite\x00sqlite3BtreePayloadChecked\x00accessPayloadChecked\x00cursorOwnsBtShared(pCsr)\x00sqlite3_mutex_held(pCsr->pBtree->db->mutex)\x00pCsr->curFlags & BTCF_Incrblob\x00pCsr->eState!=CURSOR_REQUIRESEEK\x00(pCsr->pBt->btsFlags & BTS_READ_ONLY)==0 && pCsr->pBt->inTransaction==TRANS_WRITE\x00hasSharedCacheTableLock(pCsr->pBtree, pCsr->pgnoRoot, 0, 2)\x00!hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot)\x00pCsr->apPage[pCsr->iPage]->intKey\x00sqlite3BtreePutData\x00sqlite3_mutex_alloc\x00vfsList\x00sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER))\x00vfsUnlink\x00sqlite3_vfs_register\x00sqlite3_result_zeroblob\x00(x = va_arg(ap,int))!=0\x00sqlite3_test_control\x00source and destination must be distinct\x00unknown database %s\x00destination database is in use\x00(op-SQLITE_DBSTATUS_LOOKASIDE_HIT)>=0\x00(op-SQLITE_DBSTATUS_LOOKASIDE_HIT)<3\x00sqlite3_db_status\x00eStat==SQLITE_DBSTATUS_CACHE_HIT || eStat==SQLITE_DBSTATUS_CACHE_MISS || eStat==SQLITE_DBSTATUS_CACHE_WRITE\x00sqlite3PagerCacheStat\x00rc!=SQLITE_SCHEMA\x00rc==SQLITE_OK || p->pStmt==0\x00sqlite3_blob_reopen\x00p->pTab==0 || IsVirtual(p->pTab)\x00sqlite3_vtab_config\x00db->vtabOnConflict>=1 && db->vtabOnConflict<=5\x00sqlite3_vtab_on_conflict\x00sqlite3_auto_extension\x00xDel!=SQLITE_DYNAMIC\x00sqlite3_bind_blob64\x00invokeValueDestructor\x00sqlite3_bind_text64\x00sqlite3_result_blob64\x00sqlite3_result_text64\x00sqlite3_mutex_held(pOut->db->mutex)\x00sqlite3_result_zeroblob64\x00(n & 0x7FFFFFFF)==n\x00sqlite3_bind_zeroblob64\x00sqlite3_result_subtype\x00sqlite3PagerFlush\x00compileoptionusedFunc\x00compileoptiongetFunc\x00zIn==sqlite3_value_text(argv[0])\x00trimFunc\x00nByte>0\x00contextMalloc\x00argc>1\x00pColl\x00mask==-1 || mask==0\x00minmaxFunc\x00context->pVdbe!=0\x00pOp->opcode==OP_CollSeq\x00sqlite3GetFuncCollSeq\x00lengthFunc\x00integer overflow\x00absFunc\x00argc==1 || argc==2\x00%.*f\x00roundFunc\x00z2==(char*)sqlite3_value_text(argv[0])\x00upperFunc\x00lowerFunc\x00pBlob==sqlite3_value_blob(argv[0])\x00hexFunc\x00randomBlob\x00%!.20e\x00zBlob==sqlite3_value_blob(argv[0])\x00sqlite3_value_type(argv[0])==SQLITE_NULL\x00quoteFunc\x00zStr==sqlite3_value_text(argv[0])\x00sqlite3_value_type(argv[1])==SQLITE_NULL || sqlite3_context_db_handle(context)->mallocFailed\x00sqlite3_value_type(argv[1])!=SQLITE_NULL\x00zPattern==sqlite3_value_text(argv[1])\x00zRep==sqlite3_value_text(argv[2])\x00nOut<SQLITE_MAX_LENGTH\x00j+nStr-i+1==nOut\x00j<=nOut\x00replaceFunc\x00zeroblobFunc\x00argc==3 || argc==2\x00len==sqlite3_value_bytes(argv[0])\x00p1>=0 && p2>=0\x00substrFunc\x00sumStep\x00argc==1 || p==0 || p->n>0x7fffffff || p->n==sqlite3_aggregate_count(context)\x00countStep\x00groupConcatStep\x00unix\x00unix-none\x00unix-dotfile\x00unix-excl\x00pFile->pInode->nLock>0 || pFile->pInode->bProcessLock==0\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00open\x00close\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00eFileLock==SHARED_LOCK || ((unixFile *)id)->nFetchOut==0\x00unixUnlock\x00eFileLock<=SHARED_LOCK\x00pInode->nShared!=0\x00pInode->eFileLock==pFile->eFileLock\x00handleNFSUnlock==0\x00PENDING_BYTE+1==RESERVED_BYTE\x00pInode->nLock>=0\x00posixUnlock\x00unixMutexHeld()\x00pInode!=0\x00pInode->nLock==0\x00unixFileLock\x00unixClose\x00pInode->pShmNode==0\x00pInode->pPrev->pNext==pInode\x00inodeList==pInode\x00pInode->pNext->pPrev==pInode\x00releaseInodeInfo\x00pFd->nFetchOut==0\x00unixUnmapfile\x00offset>=0\x00amt>0\x00unixRead\x00cnt==(cnt&0x1ffff)\x00id->h>2\x00seekAndRead\x00unixWrite\x00nBuf==(nBuf&0x1ffff)\x00fd>2\x00piErrno!=0\x00seekAndWriteFd\x00unixTruncate\x00(flags&0x0F)==SQLITE_SYNC_NORMAL || (flags&0x0F)==SQLITE_SYNC_FULL\x00full_fsync\x00rc==SQLITE_CANTOPEN\x00unixSync\x00unixFileSize\x00pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK\x00eFileLock!=PENDING_LOCK\x00eFileLock!=RESERVED_LOCK || pFile->eFileLock==SHARED_LOCK\x00eFileLock==SHARED_LOCK\x00pFile->eFileLock==0\x00pInode->nShared>0\x00pInode->nShared==0\x00pInode->eFileLock==0\x000!=pFile->eFileLock\x00eFileLock==RESERVED_LOCK || eFileLock==EXCLUSIVE_LOCK\x00unixLock\x00(sqliteIOErr == SQLITE_IOERR_LOCK) || (sqliteIOErr == SQLITE_IOERR_UNLOCK) || (sqliteIOErr == SQLITE_IOERR_RDLOCK) || (sqliteIOErr == SQLITE_IOERR_CHECKRESERVEDLOCK)\x00sqliteErrorFromPosixError\x00pFile->eFileLock<=SHARED_LOCK\x00unixCheckReservedLock\x00iWrite>=buf.st_size\x00((iWrite+1)%nBlk)==0\x00fcntlSizeHint\x00nMap>=0 || pFd->nFetchOut==0\x00nMap>0 || (pFd->mmapSize==0 && pFd->pMapRegion==0)\x00unixMapfile\x00nNew>pFd->mmapSize\x00nNew<=pFd->mmapSizeMax\x00pFd->mmapSizeActual>=pFd->mmapSize\x00MAP_FAILED!=0\x00unixRemapfile\x00nBuf>2\x00%s/etilqs_%llx%c\x00SQLITE_TMPDIR\x00TMPDIR\x00/var/tmp\x00/usr/tmp\x00/tmp\x00unixGetTempname\x00szRegion==pShmNode->szRegion || pShmNode->nRegion==0\x00pShmNode->pInode==pDbFd->pInode\x00pShmNode->h>=0 || pDbFd->pInode->bProcessLock==1\x00pShmNode->h<0 || pDbFd->pInode->bProcessLock==0\x00(nByte % pgsz)==0\x00((pgsz-1)&pgsz)==0\x00unixShmRegionPerMap\x00pDbFd->pShm==0\x00%s-shm\x00readonly_shm\x00unixOpenSharedMemory\x00sqlite3_mutex_held(pShmNode->mutex) || pShmNode->nRef==0\x00n==1 || lockType!=F_RDLCK\x00n>=1 && n<=SQLITE_SHM_NLOCK\x00lockType==F_WRLCK\x00unixShmSystemLock\x00p->pInode==pFd->pInode\x00unixShmPurge\x00unixShmMap\x00pShmNode==pDbFd->pInode->pShmNode\x00ofst>=0 && ofst+n<=SQLITE_SHM_NLOCK\x00n>=1\x00flags==(SQLITE_SHM_LOCK | SQLITE_SHM_SHARED) || flags==(SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE) || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED) || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE)\x00n==1 || (flags & SQLITE_SHM_EXCLUSIVE)!=0\x00n>1 || mask==(1<<ofst)\x00(pX->exclMask & (p->exclMask|p->sharedMask))==0\x00(p->sharedMask & mask)==0\x00unixShmLock\x00pShmNode->nRef>0\x00unixShmUnmap\x00(p==0)==(pFd->nFetchOut==0)\x00p==0 || p==&((u8 *)pFd->pMapRegion)[iOff]\x00pFd->nFetchOut>=0\x00unixUnfetch\x00(isReadonly==0 || isReadWrite==0) && (isReadWrite || isReadonly)\x00isCreate==0 || isReadWrite\x00isExclusive==0 || isCreate\x00isDelete==0 || isCreate\x00(!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB\x00(!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL\x00(!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL\x00(!isDelete && zName) || eType!=SQLITE_OPEN_WAL\x00eType==SQLITE_OPEN_MAIN_DB || eType==SQLITE_OPEN_TEMP_DB || eType==SQLITE_OPEN_MAIN_JOURNAL || eType==SQLITE_OPEN_TEMP_JOURNAL || eType==SQLITE_OPEN_SUBJOURNAL || eType==SQLITE_OPEN_MASTER_JOURNAL || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL\x00(flags & SQLITE_OPEN_URI) || zName[strlen(zName)+1]==0\x00isDelete && !syncDir\x00zName[strlen(zName)+1]==0\x00!p->pUnused\x00eType==SQLITE_OPEN_WAL || eType==SQLITE_OPEN_MAIN_JOURNAL\x00!isExclusive || (openFlags & O_CREAT)!=0\x00fd>=0\x00unixOpen\x00nDb>0\x00sqlite3Isalnum(zPath[nDb])\x00modeof\x00findCreateFileMode\x00pNew->pInode==NULL\x00zFilename==0 || zFilename[0]=='/'\x00zFilename!=0 || (ctrlFlags & UNIXFILE_NOLOCK)!=0\x00psow\x00zFilename!=0\x00%s.lock\x00fillInUnixFile\x00findInodeInfo\x00id!=0\x00dotlockClose\x00eFileLock==NO_LOCK\x00dotlockUnlock\x00dotlockCheckReservedLock\x00fsync\x00unixDelete\x00pResOut!=0\x00flags==SQLITE_ACCESS_EXISTS || flags==SQLITE_ACCESS_READWRITE\x00unixAccess\x00pVfs->mxPathname==MAX_PATHNAME\x00rc!=SQLITE_OK || zIn!=zOut || zIn[0]=='/'\x00unixFullPathname\x00(size_t)nBuf>=(sizeof(time_t)+sizeof(int))\x00/dev/urandom\x00sizeof(t)+sizeof(randomnessPid)<=(size_t)nBuf\x00unixRandomness\x00sqlite3_initialize\x00enlargeAndAppend\x00sqlite3VXPrintf\x00thstndrd\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00sqlite3AppendChar\x00")
diff --git a/internal/mptest/mptest_linux_386.go b/internal/mptest/mptest_linux_386.go
index bbe8e07..df052e4 100644
--- a/internal/mptest/mptest_linux_386.go
+++ b/internal/mptest/mptest_linux_386.go
@@ -1,41 +1,41 @@
// Code generated by ccgo. DO NOT EDIT.
-// mptest.c
-
-// 2013-04-05
-//
-// 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 is a program used for testing SQLite, and specifically for testing
-// the ability of independent processes to access the same SQLite database
-// concurrently.
-//
-// Compile this program as follows:
-//
-// gcc -g -c -Wall sqlite3.c $(OPTS)
-// gcc -g -o mptest mptest.c sqlite3.o $(LIBS)
-//
-// Recommended options:
-//
-// -DHAVE_USLEEP
-// -DSQLITE_NO_SYNC
-// -DSQLITE_THREADSAFE=0
-// -DSQLITE_OMIT_LOAD_EXTENSION
-//
-// Run like this:
-//
-// ./mptest $database $script
-//
-// where $database is the database to use for testing and $script is a
-// test script.
-
+// mptest
+// /*
+// ** 2013-04-05
+// **
+// ** 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 is a program used for testing SQLite, and specifically for testing
+// ** the ability of independent processes to access the same SQLite database
+// ** concurrently.
+// **
+// ** Compile this program as follows:
+// **
+// ** gcc -g -c -Wall sqlite3.c $(OPTS)
+// ** gcc -g -o mptest mptest.c sqlite3.o $(LIBS)
+// **
+// ** Recommended options:
+// **
+// ** -DHAVE_USLEEP
+// ** -DSQLITE_NO_SYNC
+// ** -DSQLITE_THREADSAFE=0
+// ** -DSQLITE_OMIT_LOAD_EXTENSION
+// **
+// ** Run like this:
+// **
+// ** ./mptest $database $script
+// **
+// ** where $database is the database to use for testing and $script is a
+// ** test script.
+// */
package main
import (
@@ -73,105 +73,105 @@ var X__stdfiles [3]unsafe.Pointer
var Xstdout unsafe.Pointer
func init() {
- Xstdout = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
+ Xstdout = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
}
var Xstderr unsafe.Pointer
func init() {
- Xstderr = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
+ Xstderr = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
}
func Xmain(tls *crt.TLS, _argc int32, _argv **int8) (r0 int32) {
var _iClient, _n, _i, _openFlags, _rc, _taskId, _nRep, _iRep, _iTmout, _7_nTry, _15_iTimeout int32
var _zClient, _zScript, _zTrace, _zCOption, _zJMode, _zNRep, _zTmout, _14_zTaskName *int8
var _15_pStmt unsafe.Pointer
- r0 = i32(0)
- _openFlags = i32(2)
- _nRep = i32(1)
- _iTmout = i32(0)
- *(**int8)(unsafe.Pointer(&(_g.X0))) = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))
- *(*int32)(unsafe.Pointer(&(_g.X10))) = i32(1)
- if _argc < i32(2) {
- _usage(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- }
- *(**int8)(unsafe.Pointer(&(_g.X2))) = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))
- if Xstrglob(tls, str(0), _g.X2) != 0 {
- _usage(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))))
- }
- if crt.Xstrcmp(tls, bin.Xsqlite3_sourceid(tls), str(7)) != i32(0) {
+ r0 = int32(0)
+ _openFlags = int32(2)
+ _nRep = int32(1)
+ _iTmout = int32(0)
+ _g.Xargv0 = *elem0(_argv, 0)
+ _g.XiTrace = int32(1)
+ if _argc < int32(2) {
+ _usage(tls, *elem0(_argv, 0))
+ }
+ _g.XzDbFile = *elem0(_argv, uintptr(1))
+ if Xstrglob(tls, str(0), _g.XzDbFile) != 0 {
+ _usage(tls, *elem0(_argv, 0))
+ }
+ if crt.Xstrcmp(tls, bin.Xsqlite3_sourceid(tls), str(7)) != int32(0) {
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(92), unsafe.Pointer(bin.Xsqlite3_sourceid(tls)), unsafe.Pointer(str(7)))
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
- _n = _argc - i32(2)
- bin.Xsqlite3_snprintf(tls, int32(u32(32)), (*int8)(unsafe.Pointer((*[32]int8)(unsafe.Pointer(&(_g.X8))))), str(152), crt.Xgetpid(tls))
- _zJMode = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(164), i32(1))
- _zNRep = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(176), i32(1))
+ _n = _argc - int32(2)
+ bin.Xsqlite3_snprintf(tls, int32(32), (*int8)(unsafe.Pointer(&_g.XzName)), str(152), crt.Xgetpid(tls))
+ _zJMode = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(164), int32(1))
+ _zNRep = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(176), int32(1))
if _zNRep != nil {
_nRep = crt.Xatoi(tls, _zNRep)
}
- if _nRep < i32(1) {
- _nRep = i32(1)
+ if _nRep < int32(1) {
+ _nRep = int32(1)
}
- *(**int8)(unsafe.Pointer(&(_g.X1))) = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(183), i32(1))
- _zClient = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(187), i32(1))
- *(**int8)(unsafe.Pointer(&(_g.X4))) = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(194), i32(1))
- *(**int8)(unsafe.Pointer(&(_g.X6))) = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(201), i32(1))
- _zTrace = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(205), i32(1))
+ _g.XzVfs = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(183), int32(1))
+ _zClient = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(187), int32(1))
+ _g.XzErrLog = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(194), int32(1))
+ _g.XzLog = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(201), int32(1))
+ _zTrace = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(205), int32(1))
if _zTrace != nil {
- *(*int32)(unsafe.Pointer(&(_g.X10))) = crt.Xatoi(tls, _zTrace)
+ _g.XiTrace = crt.Xatoi(tls, _zTrace)
}
- if _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(211), i32(0)) != nil {
- *(*int32)(unsafe.Pointer(&(_g.X10))) = i32(0)
+ if _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(211), int32(0)) != nil {
+ _g.XiTrace = int32(0)
}
- _zTmout = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(217), i32(1))
+ _zTmout = _findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(217), int32(1))
if _zTmout != nil {
_iTmout = crt.Xatoi(tls, _zTmout)
}
- *(*int32)(unsafe.Pointer(&(_g.X11))) = bool2int(_findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(225), i32(0)) != nil)
- *(*int32)(unsafe.Pointer(&(_g.X16))) = bool2int(_findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(234), i32(0)) != nil)
- if (_g.X4) != nil {
- *(**crt.XFILE)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_g.X5))))) = crt.Xfopen64(tls, _g.X4, str(239))
+ _g.XbSqlTrace = bool2int(_findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(225), int32(0)) != nil)
+ _g.XbSync = bool2int(_findOption(tls, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))), &_n, str(234), int32(0)) != nil)
+ if _g.XzErrLog != nil {
+ *(**crt.XFILE)(unsafe.Pointer(&_g.XpErrLog)) = crt.Xfopen64(tls, _g.XzErrLog, str(239))
goto _9
}
- *(**crt.XFILE)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_g.X5))))) = (*crt.XFILE)(Xstderr)
+ *(**crt.XFILE)(unsafe.Pointer(&_g.XpErrLog)) = (*crt.XFILE)(Xstderr)
_9:
- if (_g.X6) != nil {
- *(**crt.XFILE)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_g.X7))))) = crt.Xfopen64(tls, _g.X6, str(239))
+ if _g.XzLog != nil {
+ *(**crt.XFILE)(unsafe.Pointer(&_g.XpLog)) = crt.Xfopen64(tls, _g.XzLog, str(239))
goto _11
}
- *(**crt.XFILE)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_g.X7))))) = (*crt.XFILE)(Xstdout)
+ *(**crt.XFILE)(unsafe.Pointer(&_g.XpLog)) = (*crt.XFILE)(Xstdout)
_11:
- bin.Xsqlite3_config(tls, i32(16), _sqlErrorCallback, i32(0))
+ bin.Xsqlite3_config(tls, int32(16), _sqlErrorCallback, int32(0))
if _zClient == nil {
goto _12
}
_iClient = crt.Xatoi(tls, _zClient)
- if _iClient < i32(1) {
+ if _iClient < int32(1) {
_fatalError(tls, str(241), _iClient)
}
- bin.Xsqlite3_snprintf(tls, int32(u32(32)), (*int8)(unsafe.Pointer((*[32]int8)(unsafe.Pointer(&(_g.X8))))), str(268), crt.Xgetpid(tls), _iClient)
+ bin.Xsqlite3_snprintf(tls, int32(32), (*int8)(unsafe.Pointer(&_g.XzName)), str(268), crt.Xgetpid(tls), _iClient)
goto _14
_12:
- _7_nTry = i32(0)
- if (_g.X10) <= i32(0) {
+ _7_nTry = int32(0)
+ if _g.XiTrace <= int32(0) {
goto _15
}
- crt.Xprintf(tls, str(284), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
- _i = i32(1)
+ crt.Xprintf(tls, str(284), unsafe.Pointer(*elem0(_argv, 0)))
+ _i = int32(1)
_16:
if _i >= _argc {
goto _19
}
- crt.Xprintf(tls, str(294), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))))
+ crt.Xprintf(tls, str(294), unsafe.Pointer(*elem0(_argv, uintptr(_i))))
_i += 1
goto _16
_19:
crt.Xprintf(tls, str(298))
crt.Xprintf(tls, str(300))
- _i = i32(0)
+ _i = int32(0)
_20:
- if store0(&_zCOption, bin.Xsqlite3_compileoption_get(tls, _i)) == nil {
+ if store1(&_zCOption, bin.Xsqlite3_compileoption_get(tls, _i)) == nil {
goto _23
}
crt.Xprintf(tls, str(405), unsafe.Pointer(_zCOption))
@@ -180,378 +180,362 @@ _20:
_23:
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
_15:
- _iClient = i32(0)
+ _iClient = int32(0)
_24:
- if (_7_nTry % i32(5)) == i32(4) {
+ if (_7_nTry % int32(5)) == int32(4) {
crt.Xprintf(tls, str(418), unsafe.Pointer(func() *int8 {
- if _7_nTry > i32(5) {
+ if _7_nTry > int32(5) {
return str(447)
}
return str(454)
- }()), unsafe.Pointer(_g.X2))
+ }()), unsafe.Pointer(_g.XzDbFile))
}
- _rc = crt.Xunlink(tls, _g.X2)
- if _rc != 0 && ((*crt.X__errno_location(tls)) == i32(2)) {
- _rc = i32(0)
+ _rc = crt.Xunlink(tls, _g.XzDbFile)
+ if _rc != 0 && ((*crt.X__errno_location(tls)) == int32(2)) {
+ _rc = int32(0)
}
- if ((_rc != i32(0)) && (preInc1(&_7_nTry, 1) < i32(60))) && (bin.Xsqlite3_sleep(tls, i32(1000)) > i32(0)) {
+ if ((_rc != int32(0)) && (preInc2(&_7_nTry, 1) < int32(60))) && (bin.Xsqlite3_sleep(tls, int32(1000)) > int32(0)) {
goto _24
}
- if _rc != i32(0) {
- _fatalError(tls, str(455), unsafe.Pointer(_g.X2), _7_nTry)
- }
- {
- p := &_openFlags
- *p = (*p) | i32(4)
- sink1(*p)
+ if _rc != int32(0) {
+ _fatalError(tls, str(455), unsafe.Pointer(_g.XzDbFile), _7_nTry)
}
+ _openFlags |= int32(4)
_14:
- _rc = bin.Xsqlite3_open_v2(tls, _g.X2, (**bin.Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_g.X3))))), _openFlags, _g.X1)
+ _rc = bin.Xsqlite3_open_v2(tls, _g.XzDbFile, (**bin.Xsqlite3)(unsafe.Pointer(&_g.Xdb)), _openFlags, _g.XzVfs)
if _rc != 0 {
- _fatalError(tls, str(496), unsafe.Pointer(_g.X2))
+ _fatalError(tls, str(496), unsafe.Pointer(_g.XzDbFile))
}
- if _iTmout > i32(0) {
- bin.Xsqlite3_busy_timeout(tls, (*bin.Xsqlite3)(_g.X3), _iTmout)
+ if _iTmout > int32(0) {
+ bin.Xsqlite3_busy_timeout(tls, (*bin.Xsqlite3)(_g.Xdb), _iTmout)
}
if _zJMode != nil {
_runSql(tls, str(513), unsafe.Pointer(_zJMode))
}
- if (_g.X16) == 0 {
+ if _g.XbSync == 0 {
_trySql(tls, str(537))
}
- bin.Xsqlite3_enable_load_extension(tls, (*bin.Xsqlite3)(_g.X3), i32(1))
- bin.Xsqlite3_busy_handler(tls, (*bin.Xsqlite3)(_g.X3), _busyHandler, nil)
- bin.Xsqlite3_create_function(tls, (*bin.Xsqlite3)(_g.X3), str(560), i32(0), i32(1), nil, *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{_vfsNameFunc})), *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{nil})), *(*func(*crt.TLS, *bin.Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{nil})))
- bin.Xsqlite3_create_function(tls, (*bin.Xsqlite3)(_g.X3), str(568), i32(1), i32(1), nil, *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{_evalFunc})), *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{nil})), *(*func(*crt.TLS, *bin.Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{nil})))
- *(*int32)(unsafe.Pointer(&(_g.X15))) = i32(10000)
- if (_g.X11) != 0 {
- bin.Xsqlite3_trace(tls, (*bin.Xsqlite3)(_g.X3), _sqlTraceCallback, nil)
- }
- if _iClient <= i32(0) {
+ bin.Xsqlite3_enable_load_extension(tls, (*bin.Xsqlite3)(_g.Xdb), int32(1))
+ bin.Xsqlite3_busy_handler(tls, (*bin.Xsqlite3)(_g.Xdb), _busyHandler, nil)
+ bin.Xsqlite3_create_function(tls, (*bin.Xsqlite3)(_g.Xdb), str(560), int32(0), int32(1), nil, func() func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem) {
+ v := _vfsNameFunc
+ return *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&v))
+ }(), nil, nil)
+ bin.Xsqlite3_create_function(tls, (*bin.Xsqlite3)(_g.Xdb), str(568), int32(1), int32(1), nil, func() func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem) {
+ v := _evalFunc
+ return *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&v))
+ }(), nil, nil)
+ _g.XiTimeout = int32(10000)
+ if _g.XbSqlTrace != 0 {
+ bin.Xsqlite3_trace(tls, (*bin.Xsqlite3)(_g.Xdb), _sqlTraceCallback, nil)
+ }
+ if _iClient <= int32(0) {
goto _38
}
- if _n > i32(0) {
- _unrecognizedArguments(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), _n, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))))
+ if _n > int32(0) {
+ _unrecognizedArguments(tls, *elem0(_argv, 0), _n, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))))
}
- if (_g.X10) != 0 {
+ if _g.XiTrace != 0 {
_logMessage(tls, str(573))
}
_40:
_14_zTaskName = nil
_rc = _startScript(tls, _iClient, &_zScript, &_taskId, &_14_zTaskName)
- if _rc == i32(101) {
+ if _rc == int32(101) {
goto _42
}
- if (_g.X10) != 0 {
+ if _g.XiTrace != 0 {
_logMessage(tls, str(586), unsafe.Pointer(_14_zTaskName), _taskId)
}
_runScript(tls, _iClient, _taskId, _zScript, _14_zTaskName)
- if (_g.X10) != 0 {
+ if _g.XiTrace != 0 {
_logMessage(tls, str(600), unsafe.Pointer(_14_zTaskName), _taskId)
}
- _finishScript(tls, _iClient, _taskId, i32(0))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_14_zTaskName))
- bin.Xsqlite3_sleep(tls, i32(10))
+ _finishScript(tls, _iClient, _taskId, int32(0))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_14_zTaskName))
+ bin.Xsqlite3_sleep(tls, int32(10))
goto _40
_42:
- if (_g.X10) != 0 {
+ if _g.XiTrace != 0 {
_logMessage(tls, str(612))
}
goto _47
_38:
- if _n == i32(0) {
+ if _n == int32(0) {
_fatalError(tls, str(623))
}
- if _n > i32(1) {
- _unrecognizedArguments(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0)))), _n, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(i32(2))))))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))))
+ if _n > int32(1) {
+ _unrecognizedArguments(tls, *elem0(_argv, 0), _n, (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv))+uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(int32(2))*uintptr(unsafe.Pointer((**int8)(unsafe.Pointer(uintptr(4))))))))))))
}
_runSql(tls, str(647))
- _zScript = _readFile(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2)))))
- _iRep = i32(1)
+ _zScript = _readFile(tls, *elem0(_argv, uintptr(2)))
+ _iRep = int32(1)
_50:
if _iRep > _nRep {
goto _53
}
- if (_g.X10) != 0 {
- _logMessage(tls, str(1083), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2))))), _iRep)
+ if _g.XiTrace != 0 {
+ _logMessage(tls, str(1083), unsafe.Pointer(*elem0(_argv, uintptr(2))), _iRep)
}
- _runScript(tls, i32(0), i32(0), _zScript, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2)))))
- if (_g.X10) != 0 {
- _logMessage(tls, str(1111), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(2))))), _iRep)
+ _runScript(tls, int32(0), int32(0), _zScript, *elem0(_argv, uintptr(2)))
+ if _g.XiTrace != 0 {
+ _logMessage(tls, str(1111), unsafe.Pointer(*elem0(_argv, uintptr(2))), _iRep)
}
_iRep += 1
goto _50
_53:
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zScript))
- _waitForClient(tls, i32(0), i32(2000), str(1137))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zScript))
+ _waitForClient(tls, int32(0), int32(2000), str(1137))
_trySql(tls, str(1157))
- bin.Xsqlite3_sleep(tls, i32(10))
- *(*int32)(unsafe.Pointer(&(_g.X15))) = i32(0)
- _15_iTimeout = i32(1000)
+ bin.Xsqlite3_sleep(tls, int32(10))
+ _g.XiTimeout = int32(0)
+ _15_iTimeout = int32(1000)
_56:
- if ((store1(&_rc, _trySql(tls, str(1186))) == i32(5)) || (_rc == i32(100))) && (_15_iTimeout > i32(0)) {
- bin.Xsqlite3_sleep(tls, i32(10))
- {
- p := &_15_iTimeout
- *p = (*p) - i32(10)
- sink1(*p)
- }
+ if ((store2(&_rc, _trySql(tls, str(1186))) == int32(5)) || (_rc == int32(100))) && (_15_iTimeout > int32(0)) {
+ bin.Xsqlite3_sleep(tls, int32(10))
+ _15_iTimeout -= int32(10)
goto _56
}
- bin.Xsqlite3_sleep(tls, i32(100))
+ bin.Xsqlite3_sleep(tls, int32(100))
_15_pStmt = _prepareSql(tls, str(1207))
- _15_iTimeout = i32(1000)
+ _15_iTimeout = int32(1000)
_60:
- if (store1(&_rc, bin.Xsqlite3_step(tls, _15_pStmt)) == i32(5)) && (_15_iTimeout > i32(0)) {
- bin.Xsqlite3_sleep(tls, i32(10))
- {
- p := &_15_iTimeout
- *p = (*p) - i32(10)
- sink1(*p)
- }
+ if (store2(&_rc, bin.Xsqlite3_step(tls, _15_pStmt)) == int32(5)) && (_15_iTimeout > int32(0)) {
+ bin.Xsqlite3_sleep(tls, int32(10))
+ _15_iTimeout -= int32(10)
goto _60
}
- if _rc == i32(100) {
- {
- p := (*int32)(unsafe.Pointer(&(_g.X13)))
- *p = (*p) + bin.Xsqlite3_column_int(tls, _15_pStmt, i32(0))
- sink1(*p)
- }
- {
- p := (*int32)(unsafe.Pointer(&(_g.X14)))
- *p = (*p) + bin.Xsqlite3_column_int(tls, _15_pStmt, i32(1))
- sink1(*p)
- }
+ if _rc == int32(100) {
+ _g.XnError += bin.Xsqlite3_column_int(tls, _15_pStmt, int32(0))
+ _g.XnTest += bin.Xsqlite3_column_int(tls, _15_pStmt, int32(1))
}
bin.Xsqlite3_finalize(tls, _15_pStmt)
_47:
- bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_g.X3))
- _maybeClose(tls, (*crt.XFILE)(_g.X7))
- _maybeClose(tls, (*crt.XFILE)(_g.X5))
- if _iClient != i32(0) {
+ bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_g.Xdb))
+ _maybeClose(tls, (*crt.XFILE)(_g.XpLog))
+ _maybeClose(tls, (*crt.XFILE)(_g.XpErrLog))
+ if _iClient != int32(0) {
goto _64
}
- crt.Xprintf(tls, str(1242), _g.X13, _g.X14)
- crt.Xprintf(tls, str(1278), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
- _i = i32(1)
+ crt.Xprintf(tls, str(1242), _g.XnError, _g.XnTest)
+ crt.Xprintf(tls, str(1278), unsafe.Pointer(*elem0(_argv, 0)))
+ _i = int32(1)
_65:
if _i >= _argc {
goto _68
}
- crt.Xprintf(tls, str(294), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))))
+ crt.Xprintf(tls, str(294), unsafe.Pointer(*elem0(_argv, uintptr(_i))))
_i += 1
goto _65
_68:
crt.Xprintf(tls, str(298))
_64:
- return bool2int((_g.X13) > i32(0))
+ return bool2int(_g.XnError > int32(0))
}
+// C comment
+// /* Global data
+// */
var _g TGlobal
-// Print a usage message for the program and exit
+// C comment
+// /* Print a usage message for the program and exit */
func _usage(tls *crt.TLS, _argv0 *int8) {
var _i int32
var _zTail *int8
_zTail = _argv0
- _i = i32(0)
+ _i = int32(0)
_0:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv0)) + 1*uintptr(_i)))) == 0 {
+ if (*elem1(_argv0, uintptr(_i))) == 0 {
goto _3
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv0)) + 1*uintptr(_i)))) == i32(47) {
- _zTail = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv0))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_i))))))))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(1))))))))
+ if int32(*elem1(_argv0, uintptr(_i))) == int32(47) {
+ _zTail = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_argv0))+uintptr(_i))))) + uintptr(int32(1))))
}
_i += 1
goto _0
_3:
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1286), unsafe.Pointer(_zTail))
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1325))
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
-// Return TRUE if string z[] matches glob pattern zGlob[].
-// Return FALSE if the pattern does not match.
-//
-// Globbing rules:
-//
-// '*' Matches any sequence of zero or more characters.
-//
-// '?' Matches exactly one character.
-//
-// [...] Matches one character from the enclosed list of
-// characters.
-//
-// [^...] Matches one character not in the enclosed list.
-//
-// '#' Matches any sequence of one or more digits with an
-// optional + or - sign in front
+// C comment
+// /*
+// ** Return TRUE if string z[] matches glob pattern zGlob[].
+// ** Return FALSE if the pattern does not match.
+// **
+// ** Globbing rules:
+// **
+// ** '*' Matches any sequence of zero or more characters.
+// **
+// ** '?' Matches exactly one character.
+// **
+// ** [...] Matches one character from the enclosed list of
+// ** characters.
+// **
+// ** [^...] Matches one character not in the enclosed list.
+// **
+// ** '#' Matches any sequence of one or more digits with an
+// ** optional + or - sign in front
+// */
func Xstrglob(tls *crt.TLS, _zGlob *int8, _z *int8) (r0 int32) {
var _c, _c2, _invert, _seen, _10_prior_c int32
_0:
- if store1(&_c, int32(*postInc0(&_zGlob, 1))) == i32(0) {
+ if store2(&_c, int32(*postInc1(&_zGlob, 1))) == int32(0) {
goto _1
}
- if _c != i32(42) {
+ if _c != int32(42) {
goto _2
}
_3:
- if store1(&_c, int32(*postInc0(&_zGlob, 1))) != i32(42) && _c != i32(63) {
+ if store2(&_c, int32(*postInc1(&_zGlob, 1))) != int32(42) && _c != int32(63) {
goto _4
}
- if (_c == i32(63)) && (int32(*postInc0(&_z, 1)) == i32(0)) {
- return i32(0)
+ if (_c == int32(63)) && (int32(*postInc1(&_z, 1)) == int32(0)) {
+ return int32(0)
}
goto _3
_4:
- if _c == i32(0) {
- return i32(1)
+ if _c == int32(0) {
+ return int32(1)
}
- if _c != i32(91) {
+ if _c != int32(91) {
goto _10
}
_11:
- if ((*_z) != 0) && Xstrglob(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zGlob))-uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(1)))))))), _z) != 0 {
+ if ((*_z) != 0) && Xstrglob(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zGlob))-uintptr(int32(1)))), _z) != 0 {
*(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
goto _11
}
- return bool2int(int32(*_z) != i32(0))
+ return bool2int(int32(*_z) != int32(0))
_10:
- if store1(&_c2, int32(*postInc0(&_z, 1))) == i32(0) {
+ if store2(&_c2, int32(*postInc1(&_z, 1))) == int32(0) {
goto _15
}
_16:
if _c2 == _c {
goto _17
}
- _c2 = int32(*postInc0(&_z, 1))
- if _c2 == i32(0) {
- return i32(0)
+ _c2 = int32(*postInc1(&_z, 1))
+ if _c2 == int32(0) {
+ return int32(0)
}
goto _16
_17:
if Xstrglob(tls, _zGlob, _z) != 0 {
- return i32(1)
+ return int32(1)
}
goto _10
_15:
- return i32(0)
+ return int32(0)
_2:
- if _c != i32(63) {
+ if _c != int32(63) {
goto _21
}
- if int32(*postInc0(&_z, 1)) == i32(0) {
- return i32(0)
+ if int32(*postInc1(&_z, 1)) == int32(0) {
+ return int32(0)
}
goto _50
_21:
- if _c != i32(91) {
+ if _c != int32(91) {
goto _24
}
- _10_prior_c = i32(0)
- _seen = i32(0)
- _invert = i32(0)
- _c = int32(*postInc0(&_z, 1))
- if _c == i32(0) {
- return i32(0)
+ _10_prior_c = int32(0)
+ _seen = int32(0)
+ _invert = int32(0)
+ _c = int32(*postInc1(&_z, 1))
+ if _c == int32(0) {
+ return int32(0)
}
- _c2 = int32(*postInc0(&_zGlob, 1))
- if _c2 == i32(94) {
- _invert = i32(1)
- _c2 = int32(*postInc0(&_zGlob, 1))
+ _c2 = int32(*postInc1(&_zGlob, 1))
+ if _c2 == int32(94) {
+ _invert = int32(1)
+ _c2 = int32(*postInc1(&_zGlob, 1))
}
- if _c2 != i32(93) {
+ if _c2 != int32(93) {
goto _27
}
- if _c == i32(93) {
- _seen = i32(1)
+ if _c == int32(93) {
+ _seen = int32(1)
}
- _c2 = int32(*postInc0(&_zGlob, 1))
+ _c2 = int32(*postInc1(&_zGlob, 1))
_27:
- if _c2 == 0 || _c2 == i32(93) {
+ if _c2 == 0 || _c2 == int32(93) {
goto _30
}
- if _c2 != i32(45) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zGlob)) + 1*uintptr(i32(0))))) == i32(93) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zGlob)) + 1*uintptr(i32(0))))) == i32(0) || _10_prior_c <= i32(0) {
+ if _c2 != int32(45) || int32(*elem1(_zGlob, 0)) == int32(93) || int32(*elem1(_zGlob, 0)) == int32(0) || _10_prior_c <= int32(0) {
goto _35
}
- _c2 = int32(*postInc0(&_zGlob, 1))
+ _c2 = int32(*postInc1(&_zGlob, 1))
if (_c >= _10_prior_c) && (_c <= _c2) {
- _seen = i32(1)
+ _seen = int32(1)
}
- _10_prior_c = i32(0)
+ _10_prior_c = int32(0)
goto _38
_35:
if _c == _c2 {
- _seen = i32(1)
+ _seen = int32(1)
}
_10_prior_c = _c2
_38:
- _c2 = int32(*postInc0(&_zGlob, 1))
+ _c2 = int32(*postInc1(&_zGlob, 1))
goto _27
_30:
- if (_c2 == i32(0)) || ((_seen ^ _invert) == i32(0)) {
- return i32(0)
+ if (_c2 == int32(0)) || ((_seen ^ _invert) == int32(0)) {
+ return int32(0)
}
goto _50
_24:
- if _c != i32(35) {
+ if _c != int32(35) {
goto _43
}
- if ((int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) == i32(45)) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) == i32(43))) && (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))))))))&int32(u16(2048))) != 0 {
+ if ((int32(*elem1(_z, 0)) == int32(45)) || (int32(*elem1(_z, 0)) == int32(43))) && (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, uintptr(1)))))))&int32(2048)) != 0 {
*(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
}
- if (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0)))))))))) & int32(u16(2048))) == 0 {
- return i32(0)
+ if (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, 0)))))) & int32(2048)) == 0 {
+ return int32(0)
}
*(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
_48:
- if (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0)))))))))) & int32(u16(2048))) != 0 {
+ if (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, 0)))))) & int32(2048)) != 0 {
*(*uintptr)(unsafe.Pointer(&_z)) += uintptr(1)
goto _48
}
goto _50
_43:
- if _c != int32(*postInc0(&_z, 1)) {
- return i32(0)
+ if _c != int32(*postInc1(&_z, 1)) {
+ return int32(0)
}
_50:
goto _0
_1:
- return bool2int(int32(*_z) == i32(0))
+ return bool2int(int32(*_z) == int32(0))
}
-// Look for a command-line option. If present, return a pointer.
-// Return NULL if missing.
-//
-// hasArg==0 means the option is a flag. It is either present or not.
-// hasArg==1 means the option has an argument. Return a pointer to the
-// argument.
+// C comment
+// /*
+// ** Look for a command-line option. If present, return a pointer.
+// ** Return NULL if missing.
+// **
+// ** hasArg==0 means the option is a flag. It is either present or not.
+// ** hasArg==1 means the option has an argument. Return a pointer to the
+// ** argument.
+// */
func _findOption(tls *crt.TLS, _azArg **int8, _pnArg *int32, _zOption *int8, _hasArg int32) (r0 *int8) {
var _i, _j, _nArg int32
var _zReturn, _1_z *int8
_zReturn = nil
_nArg = *_pnArg
func() {
- if _hasArg != i32(0) && _hasArg != i32(1) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1897), unsafe.Pointer(str(1933)), i32(1211), unsafe.Pointer((*int8)(unsafe.Pointer(&_findOptionØ00__func__Ø000))), unsafe.Pointer(str(1988)))
+ if _hasArg != int32(0) && _hasArg != int32(1) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(1897), unsafe.Pointer(str(1933)), int32(1211), unsafe.Pointer(&_findOptionØ00__func__Ø000), unsafe.Pointer(str(1988)))
crt.X__builtin_abort(tls)
}
}()
- _i = i32(0)
+ _i = int32(0)
_3:
if _i >= _nArg {
goto _6
@@ -559,35 +543,35 @@ _3:
if (_i + _hasArg) >= _nArg {
goto _6
}
- _1_z = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azArg)) + 4*uintptr(_i)))
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(i32(0))))) != i32(45) {
+ _1_z = *elem0(_azArg, uintptr(_i))
+ if int32(*elem1(_1_z, 0)) != int32(45) {
goto _4
}
*(*uintptr)(unsafe.Pointer(&_1_z)) += uintptr(1)
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(i32(0))))) != i32(45) {
+ if int32(*elem1(_1_z, 0)) != int32(45) {
goto _9
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(i32(1))))) == i32(0) {
+ if int32(*elem1(_1_z, uintptr(1))) == int32(0) {
goto _6
}
*(*uintptr)(unsafe.Pointer(&_1_z)) += uintptr(1)
_9:
- if crt.Xstrcmp(tls, _1_z, _zOption) != i32(0) {
+ if crt.Xstrcmp(tls, _1_z, _zOption) != int32(0) {
goto _11
}
- if _hasArg != 0 && (_i == (_nArg - i32(1))) {
+ if _hasArg != 0 && (_i == (_nArg - int32(1))) {
_fatalError(tls, str(2011), unsafe.Pointer(_1_z))
}
if _hasArg != 0 {
- _zReturn = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azArg)) + 4*uintptr(_i+i32(1))))
+ _zReturn = *elem0(_azArg, uintptr(_i+int32(1)))
goto _15
}
- _zReturn = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azArg)) + 4*uintptr(_i)))
+ _zReturn = *elem0(_azArg, uintptr(_i))
_15:
- _j = (_i + i32(1)) + bool2int(_hasArg != i32(0))
+ _j = (_i + int32(1)) + bool2int(_hasArg != int32(0))
_16:
if _j < _nArg {
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azArg)) + 4*uintptr(postInc1(&_i, int32(1))))) = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azArg)) + 4*uintptr(postInc1(&_j, int32(1)))))
+ *elem0(_azArg, uintptr(postInc2(&_i, 1))) = *elem0(_azArg, uintptr(postInc2(&_j, 1)))
goto _16
}
*_pnArg = _i
@@ -607,7 +591,10 @@ func init() {
crt.Xstrncpy(nil, &_findOptionØ00__func__Ø000[0], str(2059), 11)
}
-// Print an error message and then quit.
+// C comment
+// /*
+// ** Print an error message and then quit.
+// */
func _fatalError(tls *crt.TLS, _zFormat *int8, args ...interface{}) {
var _3_nTry int32
var _zMsg *int8
@@ -616,58 +603,57 @@ func _fatalError(tls *crt.TLS, _zFormat *int8, args ...interface{}) {
_ap = args
_zMsg = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
- bin.Xsqlite3_snprintf(tls, int32(u32(30)), (*int8)(unsafe.Pointer(&_zPrefix)), str(2070), unsafe.Pointer((*int8)(unsafe.Pointer((*[32]int8)(unsafe.Pointer(&(_g.X8)))))))
- if (*crt.XFILE)(_g.X7) != nil {
- _printWithPrefix(tls, (*crt.XFILE)(_g.X7), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
- crt.Xfflush(tls, (*crt.XFILE)(_g.X7))
- _maybeClose(tls, (*crt.XFILE)(_g.X7))
- }
- if ((*crt.XFILE)(_g.X5) != nil) && _safe_strcmp(tls, _g.X4, _g.X6) != 0 {
- _printWithPrefix(tls, (*crt.XFILE)(_g.X5), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
- crt.Xfflush(tls, (*crt.XFILE)(_g.X5))
- _maybeClose(tls, (*crt.XFILE)(_g.X5))
- }
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zMsg))
- if (_g.X3) == nil {
+ bin.Xsqlite3_snprintf(tls, int32(30), (*int8)(unsafe.Pointer(&_zPrefix)), str(2070), unsafe.Pointer(&_g.XzName))
+ if _g.XpLog != nil {
+ _printWithPrefix(tls, (*crt.XFILE)(_g.XpLog), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
+ crt.Xfflush(tls, (*crt.XFILE)(_g.XpLog))
+ _maybeClose(tls, (*crt.XFILE)(_g.XpLog))
+ }
+ if (_g.XpErrLog != nil) && _safe_strcmp(tls, _g.XzErrLog, _g.XzLog) != 0 {
+ _printWithPrefix(tls, (*crt.XFILE)(_g.XpErrLog), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
+ crt.Xfflush(tls, (*crt.XFILE)(_g.XpErrLog))
+ _maybeClose(tls, (*crt.XFILE)(_g.XpErrLog))
+ }
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zMsg))
+ if _g.Xdb == nil {
goto _3
}
- _3_nTry = i32(0)
- *(*int32)(unsafe.Pointer(&(_g.X15))) = i32(0)
+ _3_nTry = int32(0)
+ _g.XiTimeout = int32(0)
_4:
- if (_trySql(tls, str(2081)) == i32(5)) && (postInc1(&_3_nTry, int32(1)) < i32(100)) {
- bin.Xsqlite3_sleep(tls, i32(10))
+ if (_trySql(tls, str(2081)) == int32(5)) && (postInc2(&_3_nTry, 1) < int32(100)) {
+ bin.Xsqlite3_sleep(tls, int32(10))
goto _4
}
_3:
- bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_g.X3))
- crt.Xexit(tls, i32(1))
+ bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_g.Xdb))
+ crt.Xexit(tls, int32(1))
_ = _zPrefix
_ = _3_nTry
}
-// Print a message adding zPrefix[] to the beginning of every line.
+// C comment
+// /*
+// ** Print a message adding zPrefix[] to the beginning of every line.
+// */
func _printWithPrefix(tls *crt.TLS, _pOut *crt.XFILE, _zPrefix *int8, _zMsg *int8) {
var _1_i int32
_0:
- if _zMsg == nil || (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMsg)) + 1*uintptr(i32(0))))) == 0 {
+ if _zMsg == nil || (*elem1(_zMsg, 0)) == 0 {
goto _1
}
- _1_i = i32(0)
+ _1_i = int32(0)
_3:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMsg)) + 1*uintptr(_1_i)))) == 0 || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMsg)) + 1*uintptr(_1_i)))) == i32(10) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMsg)) + 1*uintptr(_1_i)))) == i32(13) {
+ if (*elem1(_zMsg, uintptr(_1_i))) == 0 || int32(*elem1(_zMsg, uintptr(_1_i))) == int32(10) || int32(*elem1(_zMsg, uintptr(_1_i))) == int32(13) {
goto _8
}
_1_i += 1
goto _3
_8:
crt.Xfprintf(tls, _pOut, str(2111), unsafe.Pointer(_zPrefix), _1_i, unsafe.Pointer(_zMsg))
- {
- p := &_zMsg
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_1_i)))
- sink0(*p)
- }
+ *(*uintptr)(unsafe.Pointer(&_zMsg)) += uintptr(_1_i)
_9:
- if (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMsg)) + 1*uintptr(i32(0))))) == i32(10)) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zMsg)) + 1*uintptr(i32(0))))) == i32(13)) {
+ if (int32(*elem1(_zMsg, 0)) == int32(10)) || (int32(*elem1(_zMsg, 0)) == int32(13)) {
*(*uintptr)(unsafe.Pointer(&_zMsg)) += uintptr(1)
goto _9
}
@@ -675,28 +661,37 @@ _9:
_1:
}
-// Close output stream pOut if it is not stdout or stderr
+// C comment
+// /*
+// ** Close output stream pOut if it is not stdout or stderr
+// */
func _maybeClose(tls *crt.TLS, _pOut *crt.XFILE) {
- if (uintptr(unsafe.Pointer(_pOut)) != uintptr(Xstdout)) && (_pOut != (*crt.XFILE)(Xstderr)) {
+ if (unsafe.Pointer(_pOut) != Xstdout) && (_pOut != (*crt.XFILE)(Xstderr)) {
crt.Xfclose(tls, _pOut)
}
}
-// Compare two pointers to strings, where the pointers might be NULL.
+// C comment
+// /*
+// ** Compare two pointers to strings, where the pointers might be NULL.
+// */
func _safe_strcmp(tls *crt.TLS, _a *int8, _b *int8) (r0 int32) {
if _a == _b {
- return i32(0)
+ return int32(0)
}
if _a == nil {
- return i32(-1)
+ return int32(-1)
}
if _b == nil {
- return i32(1)
+ return int32(1)
}
return crt.Xstrcmp(tls, _a, _b)
}
-// Try to run arbitrary SQL. Return success code.
+// C comment
+// /*
+// ** Try to run arbitrary SQL. Return success code.
+// */
func _trySql(tls *crt.TLS, _zFormat *int8, args ...interface{}) (r0 int32) {
var _rc int32
var _zSql *int8
@@ -704,23 +699,26 @@ func _trySql(tls *crt.TLS, _zFormat *int8, args ...interface{}) (r0 int32) {
_ap = args
_zSql = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
- _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_g.X3), _zSql, nil, nil, nil)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
+ _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_g.Xdb), _zSql, nil, nil, nil)
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zSql))
return _rc
}
-// SQL error log callback
+// C comment
+// /*
+// ** SQL error log callback
+// */
func _sqlErrorCallback(tls *crt.TLS, _pArg unsafe.Pointer, _iErrCode int32, _zMsg *int8) {
- if (_iErrCode == i32(1)) && (_g.X12) != 0 {
+ if (_iErrCode == int32(1)) && _g.XbIgnoreSqlErrors != 0 {
return
}
- if ((_iErrCode & i32(255)) == i32(17)) && ((_g.X10) < i32(3)) {
+ if ((_iErrCode & int32(255)) == int32(17)) && (_g.XiTrace < int32(3)) {
return
}
- if (((_g.X15) == i32(0)) && ((_iErrCode & i32(255)) == i32(5))) && ((_g.X10) < i32(3)) {
+ if ((_g.XiTimeout == int32(0)) && ((_iErrCode & int32(255)) == int32(5))) && (_g.XiTrace < int32(3)) {
return
}
- if (_iErrCode & i32(255)) == i32(27) {
+ if (_iErrCode & int32(255)) == int32(27) {
_logMessage(tls, str(2119), unsafe.Pointer(_zMsg))
goto _8
}
@@ -728,7 +726,10 @@ func _sqlErrorCallback(tls *crt.TLS, _pArg unsafe.Pointer, _iErrCode int32, _zMs
_8:
}
-// Print a log message
+// C comment
+// /*
+// ** Print a log message
+// */
func _logMessage(tls *crt.TLS, _zFormat *int8, args ...interface{}) {
var _zMsg *int8
var _ap []interface{}
@@ -736,16 +737,19 @@ func _logMessage(tls *crt.TLS, _zFormat *int8, args ...interface{}) {
_ap = args
_zMsg = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
- bin.Xsqlite3_snprintf(tls, int32(u32(30)), (*int8)(unsafe.Pointer(&_zPrefix)), str(2145), unsafe.Pointer((*int8)(unsafe.Pointer((*[32]int8)(unsafe.Pointer(&(_g.X8)))))))
- if (*crt.XFILE)(_g.X7) != nil {
- _printWithPrefix(tls, (*crt.XFILE)(_g.X7), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
- crt.Xfflush(tls, (*crt.XFILE)(_g.X7))
+ bin.Xsqlite3_snprintf(tls, int32(30), (*int8)(unsafe.Pointer(&_zPrefix)), str(2145), unsafe.Pointer(&_g.XzName))
+ if _g.XpLog != nil {
+ _printWithPrefix(tls, (*crt.XFILE)(_g.XpLog), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
+ crt.Xfflush(tls, (*crt.XFILE)(_g.XpLog))
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zMsg))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zMsg))
_ = _zPrefix
}
-// Print an error message
+// C comment
+// /*
+// ** Print an error message
+// */
func _errorMessage(tls *crt.TLS, _zFormat *int8, args ...interface{}) {
var _zMsg *int8
var _ap []interface{}
@@ -753,21 +757,24 @@ func _errorMessage(tls *crt.TLS, _zFormat *int8, args ...interface{}) {
_ap = args
_zMsg = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
- bin.Xsqlite3_snprintf(tls, int32(u32(30)), (*int8)(unsafe.Pointer(&_zPrefix)), str(2150), unsafe.Pointer((*int8)(unsafe.Pointer((*[32]int8)(unsafe.Pointer(&(_g.X8)))))))
- if (*crt.XFILE)(_g.X7) != nil {
- _printWithPrefix(tls, (*crt.XFILE)(_g.X7), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
- crt.Xfflush(tls, (*crt.XFILE)(_g.X7))
+ bin.Xsqlite3_snprintf(tls, int32(30), (*int8)(unsafe.Pointer(&_zPrefix)), str(2150), unsafe.Pointer(&_g.XzName))
+ if _g.XpLog != nil {
+ _printWithPrefix(tls, (*crt.XFILE)(_g.XpLog), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
+ crt.Xfflush(tls, (*crt.XFILE)(_g.XpLog))
}
- if ((*crt.XFILE)(_g.X5) != nil) && _safe_strcmp(tls, _g.X4, _g.X6) != 0 {
- _printWithPrefix(tls, (*crt.XFILE)(_g.X5), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
- crt.Xfflush(tls, (*crt.XFILE)(_g.X5))
+ if (_g.XpErrLog != nil) && _safe_strcmp(tls, _g.XzErrLog, _g.XzLog) != 0 {
+ _printWithPrefix(tls, (*crt.XFILE)(_g.XpErrLog), (*int8)(unsafe.Pointer(&_zPrefix)), _zMsg)
+ crt.Xfflush(tls, (*crt.XFILE)(_g.XpErrLog))
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zMsg))
- *(*int32)(unsafe.Pointer(&(_g.X13))) += 1
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zMsg))
+ _g.XnError += 1
_ = _zPrefix
}
-// Run arbitrary SQL. Issue a fatal error on failure.
+// C comment
+// /*
+// ** Run arbitrary SQL. Issue a fatal error on failure.
+// */
func _runSql(tls *crt.TLS, _zFormat *int8, args ...interface{}) {
var _rc int32
var _zSql *int8
@@ -775,129 +782,137 @@ func _runSql(tls *crt.TLS, _zFormat *int8, args ...interface{}) {
_ap = args
_zSql = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
- _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_g.X3), _zSql, nil, nil, nil)
- if _rc != i32(0) {
- _fatalError(tls, str(2161), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_g.X3))), unsafe.Pointer(_zSql))
+ _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_g.Xdb), _zSql, nil, nil, nil)
+ if _rc != int32(0) {
+ _fatalError(tls, str(2161), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_g.Xdb))), unsafe.Pointer(_zSql))
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zSql))
}
-// Busy handler with a g.iTimeout-millisecond timeout
+// C comment
+// /*
+// ** Busy handler with a g.iTimeout-millisecond timeout
+// */
func _busyHandler(tls *crt.TLS, _pCD unsafe.Pointer, _count int32) (r0 int32) {
- if (_count * i32(10)) <= (_g.X15) {
+ if (_count * int32(10)) <= _g.XiTimeout {
goto _0
}
- if (_g.X15) > i32(0) {
- _errorMessage(tls, str(2168), _g.X15)
+ if _g.XiTimeout > int32(0) {
+ _errorMessage(tls, str(2168), _g.XiTimeout)
}
- return i32(0)
+ return int32(0)
_0:
- bin.Xsqlite3_sleep(tls, i32(10))
- return i32(1)
+ bin.Xsqlite3_sleep(tls, int32(10))
+ return int32(1)
}
-// Auxiliary SQL function to return the name of the VFS
+// C comment
+// /*
+// ** Auxiliary SQL function to return the name of the VFS
+// */
func _vfsNameFunc(tls *crt.TLS, _context unsafe.Pointer, _argc int32, _argv *unsafe.Pointer) {
var _zVfs *int8
var _db unsafe.Pointer
_db = unsafe.Pointer(bin.Xsqlite3_context_db_handle(tls, (*bin.Xsqlite3_context)(_context)))
_zVfs = nil
- bin.Xsqlite3_file_control(tls, (*bin.Xsqlite3)(_db), str(2187), i32(12), (unsafe.Pointer)(&_zVfs))
+ bin.Xsqlite3_file_control(tls, (*bin.Xsqlite3)(_db), str(2187), int32(12), unsafe.Pointer(&_zVfs))
if _zVfs != nil {
- bin.Xsqlite3_result_text(tls, (*bin.Xsqlite3_context)(_context), _zVfs, i32(-1), bin.Xsqlite3_free)
+ bin.Xsqlite3_result_text(tls, (*bin.Xsqlite3_context)(_context), _zVfs, int32(-1), bin.Xsqlite3_free)
}
}
-// Auxiliary SQL function to recursively evaluate SQL.
+// C comment
+// /*
+// ** Auxiliary SQL function to recursively evaluate SQL.
+// */
func _evalFunc(tls *crt.TLS, _context unsafe.Pointer, _argc int32, _argv *unsafe.Pointer) {
var _rc int32
var _zSql, _zErrMsg *int8
var _db unsafe.Pointer
var _res XString
_db = unsafe.Pointer(bin.Xsqlite3_context_db_handle(tls, (*bin.Xsqlite3_context)(_context)))
- _zSql = (*int8)(unsafe.Pointer(bin.Xsqlite3_value_text(tls, (*bin.XMem)(*(*unsafe.Pointer)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))))
+ _zSql = (*int8)(unsafe.Pointer(bin.Xsqlite3_value_text(tls, (*bin.XMem)(*elem4(_argv, 0)))))
_zErrMsg = nil
- crt.Xmemset(tls, (unsafe.Pointer)(&_res), i32(0), u32(12))
- _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_db), _zSql, _evalCallback, (unsafe.Pointer)(&_res), &_zErrMsg)
+ crt.Xmemset(tls, unsafe.Pointer(&_res), int32(0), uint32(12))
+ _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_db), _zSql, _evalCallback, unsafe.Pointer(&_res), &_zErrMsg)
if _zErrMsg != nil {
- bin.Xsqlite3_result_error(tls, (*bin.Xsqlite3_context)(_context), _zErrMsg, i32(-1))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zErrMsg))
+ bin.Xsqlite3_result_error(tls, (*bin.Xsqlite3_context)(_context), _zErrMsg, int32(-1))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zErrMsg))
goto _3
}
if _rc != 0 {
bin.Xsqlite3_result_error_code(tls, (*bin.Xsqlite3_context)(_context), _rc)
goto _3
}
- bin.Xsqlite3_result_text(tls, (*bin.Xsqlite3_context)(_context), _res.X0, i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ bin.Xsqlite3_result_text(tls, (*bin.Xsqlite3_context)(_context), _res.Xz, int32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
_3:
_stringFree(tls, &_res)
- _ = _res
}
-// Callback function for evalSql()
+// C comment
+// /*
+// ** Callback function for evalSql()
+// */
func _evalCallback(tls *crt.TLS, _pCData unsafe.Pointer, _argc int32, _argv **int8, _azCol **int8) (r0 int32) {
var _i int32
var _p *XString
_p = (*XString)(_pCData)
- _i = i32(0)
+ _i = int32(0)
_0:
if _i >= _argc {
goto _3
}
- _stringAppendTerm(tls, _p, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i))))
+ _stringAppendTerm(tls, _p, *elem0(_argv, uintptr(_i)))
_i += 1
goto _0
_3:
- return i32(0)
+ return int32(0)
}
-// Append a new token onto the end of the string
+// C comment
+// /* Append a new token onto the end of the string */
func _stringAppendTerm(tls *crt.TLS, _p *XString, _z *int8) {
var _i int32
- if (_p.X1) != 0 {
- _stringAppend(tls, _p, str(2192), i32(1))
+ if _p.Xn != 0 {
+ _stringAppend(tls, _p, str(2192), int32(1))
}
if _z == nil {
- _stringAppend(tls, _p, str(2194), i32(3))
+ _stringAppend(tls, _p, str(2194), int32(3))
return
}
- _i = i32(0)
+ _i = int32(0)
_2:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) == 0 || (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))))))))&int32(u16(8192))) != 0 {
+ if (*elem1(_z, uintptr(_i))) == 0 || (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, uintptr(_i)))))))&int32(8192)) != 0 {
goto _6
}
_i += 1
goto _2
_6:
- if (_i > i32(0)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) == i32(0)) {
+ if (_i > int32(0)) && (int32(*elem1(_z, uintptr(_i))) == int32(0)) {
_stringAppend(tls, _p, _z, _i)
return
}
- _stringAppend(tls, _p, str(2198), i32(1))
+ _stringAppend(tls, _p, str(2198), int32(1))
_9:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) == 0 {
+ if (*elem1(_z, 0)) == 0 {
goto _10
}
- _i = i32(0)
+ _i = int32(0)
_11:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) == 0 || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) == i32(39) {
+ if (*elem1(_z, uintptr(_i))) == 0 || int32(*elem1(_z, uintptr(_i))) == int32(39) {
goto _15
}
_i += 1
goto _11
_15:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) != 0 {
- _stringAppend(tls, _p, _z, _i+i32(1))
- _stringAppend(tls, _p, str(2198), i32(1))
- {
- p := &_z
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_i+i32(1))))
- sink0(*p)
- }
+ if (*elem1(_z, uintptr(_i))) != 0 {
+ _stringAppend(tls, _p, _z, _i+int32(1))
+ _stringAppend(tls, _p, str(2198), int32(1))
+ *(*uintptr)(unsafe.Pointer(&_z)) += uintptr(_i + int32(1))
goto _17
}
_stringAppend(tls, _p, _z, _i)
@@ -905,163 +920,162 @@ _15:
_17:
goto _9
_10:
- _stringAppend(tls, _p, str(2198), i32(1))
+ _stringAppend(tls, _p, str(2198), int32(1))
}
-// Append n bytes of text to a string. If n<0 append the entire string.
+// C comment
+// /* Append n bytes of text to a string. If n<0 append the entire string. */
func _stringAppend(tls *crt.TLS, _p *XString, _z *int8, _n int32) {
var _1_nAlloc int32
var _1_zNew *int8
- if _n < i32(0) {
+ if _n < int32(0) {
_n = int32(crt.Xstrlen(tls, _z))
}
- if ((_p.X1) + _n) < (_p.X2) {
+ if (_p.Xn + _n) < _p.XnAlloc {
goto _1
}
- _1_nAlloc = (((_p.X2) * i32(2)) + _n) + i32(100)
- _1_zNew = (*int8)(bin.Xsqlite3_realloc(tls, (unsafe.Pointer)(_p.X0), _1_nAlloc))
+ _1_nAlloc = ((_p.XnAlloc * int32(2)) + _n) + int32(100)
+ _1_zNew = (*int8)(bin.Xsqlite3_realloc(tls, unsafe.Pointer(_p.Xz), _1_nAlloc))
if _1_zNew == nil {
_fatalError(tls, str(2200))
}
- *(**int8)(unsafe.Pointer(&(_p.X0))) = _1_zNew
- *(*int32)(unsafe.Pointer(&(_p.X2))) = _1_nAlloc
+ _p.Xz = _1_zNew
+ _p.XnAlloc = _1_nAlloc
_1:
- crt.Xmemcpy(tls, (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_p.X0))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_p.X1)))))))), (unsafe.Pointer)(_z), uint32(_n))
- {
- p := (*int32)(unsafe.Pointer(&(_p.X1)))
- *p = (*p) + _n
- sink1(*p)
- }
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X0)) + 1*uintptr(_p.X1))) = int8(i32(0))
+ crt.Xmemcpy(tls, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_p.Xz))+uintptr(_p.Xn)))), unsafe.Pointer(_z), uint32(_n))
+ _p.Xn += _n
+ *elem1(_p.Xz, uintptr(_p.Xn)) = 0
}
-// Free a string
+// C comment
+// /* Free a string */
func _stringFree(tls *crt.TLS, _p *XString) {
- if (_p.X0) != nil {
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_p.X0))
+ if _p.Xz != nil {
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_p.Xz))
}
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), u32(12))
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), uint32(12))
}
-// SQL Trace callback
+// C comment
+// /*
+// ** SQL Trace callback
+// */
func _sqlTraceCallback(tls *crt.TLS, _NotUsed1 unsafe.Pointer, _zSql *int8) {
_logMessage(tls, str(2214), _clipLength(tls, _zSql), unsafe.Pointer(_zSql))
}
-// Return the length of a string omitting trailing whitespace
+// C comment
+// /*
+// ** Return the length of a string omitting trailing whitespace
+// */
func _clipLength(tls *crt.TLS, _z *int8) (r0 int32) {
var _n int32
_n = int32(crt.Xstrlen(tls, _z))
_0:
- if (_n > i32(0)) && (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n-i32(1))))))))))&int32(u16(8192))) != 0 {
+ if (_n > int32(0)) && (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, uintptr(_n-int32(1))))))))&int32(8192)) != 0 {
_n -= 1
goto _0
}
return _n
}
-// Report on unrecognized arguments
+// C comment
+// /* Report on unrecognized arguments */
func _unrecognizedArguments(tls *crt.TLS, _argv0 *int8, _nArg int32, _azArg **int8) {
var _i int32
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(2221), unsafe.Pointer(_argv0))
- _i = i32(0)
+ _i = int32(0)
_0:
if _i >= _nArg {
goto _3
}
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(294), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azArg)) + 4*uintptr(_i)))))
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(294), unsafe.Pointer(*elem0(_azArg, uintptr(_i))))
_i += 1
goto _0
_3:
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(298))
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
-// Look up the next task for client iClient in the database.
-// Return the task script and the task number and mark that
-// task as being under way.
+// C comment
+// /*
+// ** Look up the next task for client iClient in the database.
+// ** Return the task script and the task number and mark that
+// ** task as being under way.
+// */
func _startScript(tls *crt.TLS, _iClient int32, _pzScript **int8, _pTaskId *int32, _pzTaskName **int8) (r0 int32) {
var _taskId, _rc, _totalTime, _6_n int32
var _pStmt unsafe.Pointer
_pStmt = nil
- _totalTime = i32(0)
+ _totalTime = int32(0)
*_pzScript = nil
- *(*int32)(unsafe.Pointer(&(_g.X15))) = i32(0)
+ _g.XiTimeout = int32(0)
_0:
_rc = _trySql(tls, str(2249))
- if _rc == i32(5) {
- bin.Xsqlite3_sleep(tls, i32(10))
- {
- p := &_totalTime
- *p = (*p) + i32(10)
- sink1(*p)
- }
+ if _rc == int32(5) {
+ bin.Xsqlite3_sleep(tls, int32(10))
+ _totalTime += int32(10)
goto _0
}
- if _rc != i32(0) {
- _fatalError(tls, str(2265), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_g.X3))))
+ if _rc != int32(0) {
+ _fatalError(tls, str(2265), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_g.Xdb))))
}
- if (_g.X13) != 0 || (_g.X14) != 0 {
- _runSql(tls, str(2284), _g.X13, _g.X14)
- *(*int32)(unsafe.Pointer(&(_g.X13))) = i32(0)
- *(*int32)(unsafe.Pointer(&(_g.X14))) = i32(0)
+ if _g.XnError != 0 || _g.XnTest != 0 {
+ _runSql(tls, str(2284), _g.XnError, _g.XnTest)
+ _g.XnError = int32(0)
+ _g.XnTest = int32(0)
}
_pStmt = _prepareSql(tls, str(2337), _iClient)
_rc = bin.Xsqlite3_step(tls, _pStmt)
bin.Xsqlite3_finalize(tls, _pStmt)
- if _rc == i32(100) {
+ if _rc == int32(100) {
_runSql(tls, str(2383), _iClient)
- *(*int32)(unsafe.Pointer(&(_g.X15))) = i32(10000)
+ _g.XiTimeout = int32(10000)
_runSql(tls, str(2414))
- return i32(101)
+ return int32(101)
}
_pStmt = _prepareSql(tls, str(2434), _iClient)
_rc = bin.Xsqlite3_step(tls, _pStmt)
- if _rc == i32(100) {
- _6_n = bin.Xsqlite3_column_bytes(tls, _pStmt, i32(0))
- *_pzScript = (*int8)(bin.Xsqlite3_malloc(tls, _6_n+i32(1)))
- crt.Xstrcpy(tls, *_pzScript, (*int8)(unsafe.Pointer(bin.Xsqlite3_column_text(tls, _pStmt, i32(0)))))
- *_pTaskId = store1(&_taskId, bin.Xsqlite3_column_int(tls, _pStmt, i32(1)))
- *_pzTaskName = bin.Xsqlite3_mprintf(tls, str(2526), unsafe.Pointer(bin.Xsqlite3_column_text(tls, _pStmt, i32(2))))
+ if _rc == int32(100) {
+ _6_n = bin.Xsqlite3_column_bytes(tls, _pStmt, int32(0))
+ *_pzScript = (*int8)(bin.Xsqlite3_malloc(tls, _6_n+int32(1)))
+ crt.Xstrcpy(tls, *_pzScript, (*int8)(unsafe.Pointer(bin.Xsqlite3_column_text(tls, _pStmt, int32(0)))))
+ *_pTaskId = store2(&_taskId, bin.Xsqlite3_column_int(tls, _pStmt, int32(1)))
+ *_pzTaskName = bin.Xsqlite3_mprintf(tls, str(2526), unsafe.Pointer(bin.Xsqlite3_column_text(tls, _pStmt, int32(2))))
bin.Xsqlite3_finalize(tls, _pStmt)
_runSql(tls, str(2529), _taskId)
- *(*int32)(unsafe.Pointer(&(_g.X15))) = i32(10000)
+ _g.XiTimeout = int32(10000)
_runSql(tls, str(2414))
- return i32(0)
+ return int32(0)
}
bin.Xsqlite3_finalize(tls, _pStmt)
- if _rc != i32(101) {
+ if _rc != int32(101) {
goto _8
}
- if _totalTime > i32(30000) {
+ if _totalTime > int32(30000) {
_errorMessage(tls, str(2612))
_runSql(tls, str(2661), _iClient)
- bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_g.X3))
- crt.Xexit(tls, i32(1))
+ bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_g.Xdb))
+ crt.Xexit(tls, int32(1))
}
_9:
- if _trySql(tls, str(2701)) == i32(5) {
- bin.Xsqlite3_sleep(tls, i32(10))
- {
- p := &_totalTime
- *p = (*p) + i32(10)
- sink1(*p)
- }
+ if _trySql(tls, str(2701)) == int32(5) {
+ bin.Xsqlite3_sleep(tls, int32(10))
+ _totalTime += int32(10)
goto _9
}
- bin.Xsqlite3_sleep(tls, i32(100))
- {
- p := &_totalTime
- *p = (*p) + i32(100)
- sink1(*p)
- }
+ bin.Xsqlite3_sleep(tls, int32(100))
+ _totalTime += int32(100)
goto _0
_8:
- _fatalError(tls, str(2526), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_g.X3))))
+ _fatalError(tls, str(2526), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_g.Xdb))))
goto _0
}
-// Prepare an SQL statement. Issue a fatal error if unable.
+// C comment
+// /*
+// ** Prepare an SQL statement. Issue a fatal error if unable.
+// */
func _prepareSql(tls *crt.TLS, _zFormat *int8, args ...interface{}) (r0 unsafe.Pointer) {
var _rc int32
var _zSql *int8
@@ -1071,16 +1085,19 @@ func _prepareSql(tls *crt.TLS, _zFormat *int8, args ...interface{}) (r0 unsafe.P
_ap = args
_zSql = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
- _rc = bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_g.X3), _zSql, i32(-1), &_pStmt, nil)
- if _rc != i32(0) {
+ _rc = bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_g.Xdb), _zSql, int32(-1), &_pStmt, nil)
+ if _rc != int32(0) {
bin.Xsqlite3_finalize(tls, _pStmt)
- _fatalError(tls, str(2161), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_g.X3))), unsafe.Pointer(_zSql))
+ _fatalError(tls, str(2161), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_g.Xdb))), unsafe.Pointer(_zSql))
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zSql))
return _pStmt
}
-// Run a script.
+// C comment
+// /*
+// ** Run a script.
+// */
func _runScript(tls *crt.TLS, _iClient int32, _taskId int32, _zScript *int8, _zFilename *int8) {
var _lineno, _prevLine, _ii, _iBegin, _n, _c, _j, _len, _nArg, _8_rc, _12_jj, _15_jj, _15_isGlob, _20_k, _23_jj, _25_jj, _25_rc, _30_iNewClient, _32_iTimeout, _33_iTarget, _33_iEnd int32
var _4_zSql, _12_zAns, _15_zAns, _15_zCopy, _19_zNewFile, _19_zNewScript, _19_zToDel, _33_zTask, _33_zTName, _41_zSql *int8
@@ -1089,368 +1106,331 @@ func _runScript(tls *crt.TLS, _iClient int32, _taskId int32, _zScript *int8, _zF
var _zCmd [30]int8
var _sResult XString
var _azArg [2][100]int8
- _lineno = i32(1)
- _prevLine = i32(1)
- _ii = i32(0)
- _iBegin = i32(0)
- crt.Xmemset(tls, (unsafe.Pointer)(&_sResult), i32(0), u32(12))
+ _lineno = int32(1)
+ _prevLine = int32(1)
+ _ii = int32(0)
+ _iBegin = int32(0)
+ crt.Xmemset(tls, unsafe.Pointer(&_sResult), int32(0), uint32(12))
_stringReset(tls, &_sResult)
_0:
- if store1(&_c, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zScript)) + 1*uintptr(_ii))))) == i32(0) {
+ if store2(&_c, int32(*elem1(_zScript, uintptr(_ii)))) == int32(0) {
goto _1
}
_prevLine = _lineno
- _len = _tokenLength(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii))))))), &_lineno)
- if (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(_c))))))&int32(u16(8192))) != 0 || ((_c == i32(47)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zScript)) + 1*uintptr(_ii+i32(1))))) == i32(42))) {
- {
- p := &_ii
- *p = (*p) + _len
- sink1(*p)
- }
+ _len = _tokenLength(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii))), &_lineno)
+ if (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(_c)))))&int32(8192)) != 0 || ((_c == int32(47)) && (int32(*elem1(_zScript, uintptr(_ii+int32(1)))) == int32(42))) {
+ _ii += _len
goto _0
}
- if ((_c != i32(45)) || (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zScript)) + 1*uintptr(_ii+i32(1))))) != i32(45))) || ((int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zScript)) + 1*uintptr(_ii+i32(2))))))))) & int32(u16(1024))) == 0) {
- {
- p := &_ii
- *p = (*p) + _len
- sink1(*p)
- }
+ if ((_c != int32(45)) || (int32(*elem1(_zScript, uintptr(_ii+int32(1)))) != int32(45))) || ((int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(*elem1(_zScript, uintptr(_ii+int32(2))))))) & int32(1024)) == 0) {
+ _ii += _len
goto _0
}
if _ii > _iBegin {
- _4_zSql = bin.Xsqlite3_mprintf(tls, str(2708), _ii-_iBegin, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_iBegin)))))))))
+ _4_zSql = bin.Xsqlite3_mprintf(tls, str(2708), _ii-_iBegin, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_iBegin)))))
_evalSql(tls, &_sResult, _4_zSql)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_4_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_4_zSql))
_iBegin = _ii + _len
}
- if (_g.X10) >= i32(2) {
- _logMessage(tls, str(2708), _len, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))
+ if _g.XiTrace >= int32(2) {
+ _logMessage(tls, str(2708), _len, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))
}
- _n = _extractToken(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(2)))))))), _len-i32(2), (*int8)(unsafe.Pointer(&_zCmd)), int32(u32(30)))
- _nArg = i32(0)
+ _n = _extractToken(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))+uintptr(int32(2)))), _len-int32(2), (*int8)(unsafe.Pointer(&_zCmd)), int32(30))
+ _nArg = int32(0)
_10:
- if _n >= (_len-i32(2)) || _nArg >= i32(2) {
+ if _n >= (_len-int32(2)) || _nArg >= int32(2) {
goto _14
}
_15:
- if (_n < (_len - i32(2))) && (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zScript)) + 1*uintptr((_ii+i32(2))+_n)))))))))&int32(u16(8192))) != 0 {
+ if (_n < (_len - int32(2))) && (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_zScript, uintptr((_ii+int32(2))+_n)))))))&int32(8192)) != 0 {
_n += 1
goto _15
}
- if _n >= (_len - i32(2)) {
+ if _n >= (_len - int32(2)) {
goto _14
}
- {
- p := &_n
- *p = (*p) + _extractToken(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(i32(2))))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n))))))), (_len-i32(2))-_n, (*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(_nArg))))), int32(u32(100)))
- sink1(*p)
- }
+ _n += _extractToken(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))+uintptr(int32(2))))))+uintptr(_n))), (_len-int32(2))-_n, (*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), uintptr(_nArg)))), int32(100))
_nArg += 1
goto _10
_14:
_j = _nArg
_19:
- if _j >= i32(2) {
+ if _j >= int32(2) {
goto _22
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(postInc1(&_j, int32(1))))))) + 1*uintptr(i32(0)))) = int8(i32(0))
+ *elem1((*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), uintptr(postInc2(&_j, 1))))), 0) = 0
_j += 1
goto _19
_22:
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2713)) == i32(0) {
- bin.Xsqlite3_sleep(tls, crt.Xatoi(tls, (*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(i32(0))))))))
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2713)) == int32(0) {
+ bin.Xsqlite3_sleep(tls, crt.Xatoi(tls, (*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), 0)))))
goto _108
}
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2719)) != i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2719)) != int32(0) {
goto _25
}
- _8_rc = crt.Xatoi(tls, (*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(i32(0)))))))
- _finishScript(tls, _iClient, _taskId, i32(1))
- if _8_rc == i32(0) {
- bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_g.X3))
+ _8_rc = crt.Xatoi(tls, (*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), 0))))
+ _finishScript(tls, _iClient, _taskId, int32(1))
+ if _8_rc == int32(0) {
+ bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_g.Xdb))
}
crt.Xexit(tls, _8_rc)
goto _108
_25:
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2724)) != i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2724)) != int32(0) {
goto _28
}
- if (_g.X10) == i32(1) {
- _logMessage(tls, str(2708), _len-i32(1), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))
+ if _g.XiTrace == int32(1) {
+ _logMessage(tls, str(2708), _len-int32(1), unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))
}
_stringReset(tls, &_sResult)
goto _108
_28:
- if (crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2733)) == i32(0)) && (_iClient > i32(0)) {
- _finishScript(tls, _iClient, _taskId, i32(1))
+ if (crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2733)) == int32(0)) && (_iClient > int32(0)) {
+ _finishScript(tls, _iClient, _taskId, int32(1))
goto _108
}
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2740)) == i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2740)) == int32(0) {
_stringReset(tls, &_sResult)
goto _108
}
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2746)) != i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2746)) != int32(0) {
goto _36
}
- _12_zAns = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript)) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))
- _12_jj = i32(7)
+ _12_zAns = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript)) + uintptr(_ii)))
+ _12_jj = int32(7)
_37:
- if _12_jj >= (_len-i32(1)) || (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_12_zAns)) + 1*uintptr(_12_jj)))))))))&int32(u16(8192))) == 0 {
+ if _12_jj >= (_len-int32(1)) || (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_12_zAns, uintptr(_12_jj)))))))&int32(8192)) == 0 {
goto _41
}
_12_jj += 1
goto _37
_41:
- {
- p := &_12_zAns
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_12_jj)))
- sink0(*p)
- }
- if (((_len - _12_jj) - i32(1)) != (_sResult.X1)) || crt.Xstrncmp(tls, _sResult.X0, _12_zAns, uint32((_len-_12_jj)-i32(1))) != 0 {
- _errorMessage(tls, str(2752), _prevLine, unsafe.Pointer(_zFilename), (_len-_12_jj)-i32(1), unsafe.Pointer(_12_zAns), unsafe.Pointer(_sResult.X0))
+ *(*uintptr)(unsafe.Pointer(&_12_zAns)) += uintptr(_12_jj)
+ if (((_len - _12_jj) - int32(1)) != _sResult.Xn) || crt.Xstrncmp(tls, _sResult.Xz, _12_zAns, uint32((_len-_12_jj)-int32(1))) != 0 {
+ _errorMessage(tls, str(2752), _prevLine, unsafe.Pointer(_zFilename), (_len-_12_jj)-int32(1), unsafe.Pointer(_12_zAns), unsafe.Pointer(_sResult.Xz))
}
- *(*int32)(unsafe.Pointer(&(_g.X14))) += 1
+ _g.XnTest += 1
_stringReset(tls, &_sResult)
goto _108
_36:
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2797)) != i32(0) && crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2802)) != i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2797)) != int32(0) && crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2802)) != int32(0) {
goto _46
}
- _15_zAns = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript)) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))
- _15_isGlob = bool2int(int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_zCmd)) + 1*uintptr(i32(0))))) == i32(103))
- _15_jj = i32(9) - (i32(3) * _15_isGlob)
+ _15_zAns = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript)) + uintptr(_ii)))
+ _15_isGlob = bool2int(int32(*elem1((*int8)(unsafe.Pointer(&_zCmd)), 0)) == int32(103))
+ _15_jj = int32(9) - (int32(3) * _15_isGlob)
_47:
- if _15_jj >= (_len-i32(1)) || (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_15_zAns)) + 1*uintptr(_15_jj)))))))))&int32(u16(8192))) == 0 {
+ if _15_jj >= (_len-int32(1)) || (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_15_zAns, uintptr(_15_jj)))))))&int32(8192)) == 0 {
goto _51
}
_15_jj += 1
goto _47
_51:
- {
- p := &_15_zAns
- *p = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_15_jj)))
- sink0(*p)
+ *(*uintptr)(unsafe.Pointer(&_15_zAns)) += uintptr(_15_jj)
+ _15_zCopy = bin.Xsqlite3_mprintf(tls, str(2708), (_len-_15_jj)-int32(1), unsafe.Pointer(_15_zAns))
+ if (bool2int(bin.Xsqlite3_strglob(tls, _15_zCopy, _sResult.Xz) == int32(0)) ^ _15_isGlob) != 0 {
+ _errorMessage(tls, str(2810), _prevLine, unsafe.Pointer(_zFilename), unsafe.Pointer(_15_zCopy), unsafe.Pointer(_sResult.Xz))
}
- _15_zCopy = bin.Xsqlite3_mprintf(tls, str(2708), (_len-_15_jj)-i32(1), unsafe.Pointer(_15_zAns))
- if (bool2int(bin.Xsqlite3_strglob(tls, _15_zCopy, _sResult.X0) == i32(0)) ^ _15_isGlob) != 0 {
- _errorMessage(tls, str(2810), _prevLine, unsafe.Pointer(_zFilename), unsafe.Pointer(_15_zCopy), unsafe.Pointer(_sResult.X0))
- }
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_15_zCopy))
- *(*int32)(unsafe.Pointer(&(_g.X14))) += 1
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_15_zCopy))
+ _g.XnTest += 1
_stringReset(tls, &_sResult)
goto _108
_46:
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2853)) == i32(0) {
- _logMessage(tls, str(2526), unsafe.Pointer(_sResult.X0))
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2853)) == int32(0) {
+ _logMessage(tls, str(2526), unsafe.Pointer(_sResult.Xz))
goto _108
}
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2860)) != i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2860)) != int32(0) {
goto _56
}
_19_zToDel = nil
- _19_zNewFile = (*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg)) + 100*uintptr(i32(0))))))
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_19_zNewFile)) + 1*uintptr(i32(0))))) == i32(47) {
+ _19_zNewFile = (*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), 0)))
+ if int32(*elem1(_19_zNewFile, 0)) == int32(47) {
goto _57
}
- _20_k = int32(crt.Xstrlen(tls, _zFilename)) - i32(1)
+ _20_k = int32(crt.Xstrlen(tls, _zFilename)) - int32(1)
_58:
- if _20_k < i32(0) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFilename)) + 1*uintptr(_20_k)))) == i32(47) {
+ if _20_k < int32(0) || int32(*elem1(_zFilename, uintptr(_20_k))) == int32(47) {
goto _62
}
_20_k -= 1
goto _58
_62:
- if _20_k > i32(0) {
- _19_zNewFile = store0(&_19_zToDel, bin.Xsqlite3_mprintf(tls, str(2867), _20_k, unsafe.Pointer(_zFilename), unsafe.Pointer(_19_zNewFile)))
+ if _20_k > int32(0) {
+ _19_zNewFile = store1(&_19_zToDel, bin.Xsqlite3_mprintf(tls, str(2867), _20_k, unsafe.Pointer(_zFilename), unsafe.Pointer(_19_zNewFile)))
}
_57:
_19_zNewScript = _readFile(tls, _19_zNewFile)
- if (_g.X10) != 0 {
+ if _g.XiTrace != 0 {
_logMessage(tls, str(2875), unsafe.Pointer(_19_zNewFile))
}
- _runScript(tls, i32(0), i32(0), _19_zNewScript, _19_zNewFile)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_19_zNewScript))
- if (_g.X10) != 0 {
+ _runScript(tls, int32(0), int32(0), _19_zNewScript, _19_zNewFile)
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_19_zNewScript))
+ if _g.XiTrace != 0 {
_logMessage(tls, str(2894), unsafe.Pointer(_19_zNewFile))
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_19_zToDel))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_19_zToDel))
goto _108
_56:
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2911)) != i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2911)) != int32(0) {
goto _67
}
- _23_jj = i32(7)
+ _23_jj = int32(7)
_68:
- if _23_jj >= _len || (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zScript)) + 1*uintptr(_ii+_23_jj)))))))))&int32(u16(8192))) == 0 {
+ if _23_jj >= _len || (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_zScript, uintptr(_ii+_23_jj)))))))&int32(8192)) == 0 {
goto _72
}
_23_jj += 1
goto _68
_72:
- _logMessage(tls, str(2708), _len-_23_jj, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_23_jj)))))))))
+ _logMessage(tls, str(2708), _len-_23_jj, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))+uintptr(_23_jj)))))
goto _108
_67:
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2917)) != i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2917)) != int32(0) {
goto _74
}
- _25_jj = i32(4)
+ _25_jj = int32(4)
_75:
- if _25_jj >= _len || (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zScript)) + 1*uintptr(_ii+_25_jj)))))))))&int32(u16(8192))) == 0 {
+ if _25_jj >= _len || (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_zScript, uintptr(_ii+_25_jj)))))))&int32(8192)) == 0 {
goto _79
}
_25_jj += 1
goto _75
_79:
- _25_pStmt = _prepareSql(tls, str(2920), _len-_25_jj, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_25_jj)))))))))
+ _25_pStmt = _prepareSql(tls, str(2920), _len-_25_jj, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))+uintptr(_25_jj)))))
_25_rc = bin.Xsqlite3_step(tls, _25_pStmt)
- if (_25_rc != i32(100)) || (bin.Xsqlite3_column_int(tls, _25_pStmt, i32(0)) == i32(0)) {
- {
- p := &_ii
- *p = (*p) + _findEndif(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_len))))))), i32(1), &_lineno)
- sink1(*p)
- }
+ if (_25_rc != int32(100)) || (bin.Xsqlite3_column_int(tls, _25_pStmt, int32(0)) == int32(0)) {
+ _ii += _findEndif(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))+uintptr(_len))), int32(1), &_lineno)
}
bin.Xsqlite3_finalize(tls, _25_pStmt)
goto _108
_74:
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2932)) == i32(0) {
- {
- p := &_ii
- *p = (*p) + _findEndif(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_len))))))), i32(0), &_lineno)
- sink1(*p)
- }
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2932)) == int32(0) {
+ _ii += _findEndif(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))+uintptr(_len))), int32(0), &_lineno)
goto _108
}
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2937)) == i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2937)) == int32(0) {
goto _108
}
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2943)) != i32(0) || _iClient != i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2943)) != int32(0) || _iClient != int32(0) {
goto _88
}
- _30_iNewClient = crt.Xatoi(tls, (*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(i32(0)))))))
- if _30_iNewClient > i32(0) {
+ _30_iNewClient = crt.Xatoi(tls, (*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), 0))))
+ if _30_iNewClient > int32(0) {
_startClient(tls, _30_iNewClient)
}
goto _108
_88:
- if (crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2949)) == i32(0)) && (_iClient == i32(0)) {
+ if (crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2949)) == int32(0)) && (_iClient == int32(0)) {
_32_iTimeout = func() int32 {
- if _nArg >= i32(2) {
- return crt.Xatoi(tls, (*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(i32(1)))))))
+ if _nArg >= int32(2) {
+ return crt.Xatoi(tls, (*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), uintptr(1)))))
}
- return i32(10000)
+ return int32(10000)
}()
- bin.Xsqlite3_snprintf(tls, int32(u32(1000)), (*int8)(unsafe.Pointer(&_zError)), str(2954), _prevLine, unsafe.Pointer(_zFilename))
- _waitForClient(tls, crt.Xatoi(tls, (*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(i32(0))))))), _32_iTimeout, (*int8)(unsafe.Pointer(&_zError)))
+ bin.Xsqlite3_snprintf(tls, int32(1000), (*int8)(unsafe.Pointer(&_zError)), str(2954), _prevLine, unsafe.Pointer(_zFilename))
+ _waitForClient(tls, crt.Xatoi(tls, (*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), 0)))), _32_iTimeout, (*int8)(unsafe.Pointer(&_zError)))
goto _108
}
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2969)) != i32(0) || _iClient != i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(2969)) != int32(0) || _iClient != int32(0) {
goto _97
}
- _33_iTarget = crt.Xatoi(tls, (*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(i32(0)))))))
- _33_iEnd = _findEnd(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_len))))))), &_lineno)
- if _33_iTarget < i32(0) {
+ _33_iTarget = crt.Xatoi(tls, (*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), 0))))
+ _33_iEnd = _findEnd(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))+uintptr(_len))), &_lineno)
+ if _33_iTarget < int32(0) {
_errorMessage(tls, str(2974), _prevLine, unsafe.Pointer(_zFilename), _33_iTarget)
goto _99
}
- _33_zTask = bin.Xsqlite3_mprintf(tls, str(2708), _33_iEnd, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_len)))))))))
- if _nArg > i32(1) {
- _33_zTName = bin.Xsqlite3_mprintf(tls, str(2526), unsafe.Pointer((*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(i32(1))))))))
+ _33_zTask = bin.Xsqlite3_mprintf(tls, str(2708), _33_iEnd, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))+uintptr(_len)))))
+ if _nArg > int32(1) {
+ _33_zTName = bin.Xsqlite3_mprintf(tls, str(2526), unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), uintptr(1))))
goto _101
}
_33_zTName = bin.Xsqlite3_mprintf(tls, str(3011), unsafe.Pointer(_filenameTail(tls, _zFilename)), _prevLine)
_101:
_startClient(tls, _33_iTarget)
_runSql(tls, str(3017), _33_iTarget, unsafe.Pointer(_33_zTask), unsafe.Pointer(_33_zTName))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_33_zTask))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_33_zTName))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_33_zTask))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_33_zTName))
_99:
- {
- p := &_33_iEnd
- *p = (*p) + _tokenLength(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_ii)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_len)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_33_iEnd))))))), &_lineno)
- sink1(*p)
- }
- {
- p := &_len
- *p = (*p) + _33_iEnd
- sink1(*p)
- }
+ _33_iEnd += _tokenLength(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_ii)))))+uintptr(_len)))))+uintptr(_33_iEnd))), &_lineno)
+ _len += _33_iEnd
_iBegin = _ii + _len
goto _108
_97:
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(3073)) == i32(0) {
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(3073)) == int32(0) {
_test_breakpoint(tls)
goto _108
}
- if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(3084)) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_g.X12))) = func() int32 {
- if _nArg >= i32(1) {
- return bool2int(_booleanValue(tls, (*int8)(unsafe.Pointer((*[100]int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_azArg))+100*uintptr(i32(0))))))) == 0)
+ if crt.Xstrcmp(tls, (*int8)(unsafe.Pointer(&_zCmd)), str(3084)) == int32(0) {
+ _g.XbIgnoreSqlErrors = func() int32 {
+ if _nArg >= int32(1) {
+ return bool2int(_booleanValue(tls, (*int8)(unsafe.Pointer(elem5((*[100]int8)(unsafe.Pointer(&_azArg)), 0)))) == 0)
}
- return i32(1)
+ return int32(1)
}()
goto _108
}
- _errorMessage(tls, str(3100), _prevLine, unsafe.Pointer(_zFilename), unsafe.Pointer((*int8)(unsafe.Pointer(&_zCmd))))
+ _errorMessage(tls, str(3100), _prevLine, unsafe.Pointer(_zFilename), unsafe.Pointer(&_zCmd))
_108:
- {
- p := &_ii
- *p = (*p) + _len
- sink1(*p)
- }
+ _ii += _len
goto _0
_1:
if _iBegin < _ii {
- _41_zSql = bin.Xsqlite3_mprintf(tls, str(2708), _ii-_iBegin, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_iBegin)))))))))
+ _41_zSql = bin.Xsqlite3_mprintf(tls, str(2708), _ii-_iBegin, unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_zScript))+uintptr(_iBegin)))))
_runSql(tls, _41_zSql)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_41_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_41_zSql))
}
_stringFree(tls, &_sResult)
- _ = _sResult
_ = _zCmd
_ = _zError
_ = _azArg
}
-// Reset a string to an empty string
+// C comment
+// /* Reset a string to an empty string */
func _stringReset(tls *crt.TLS, _p *XString) {
- if (_p.X0) == nil {
- _stringAppend(tls, _p, str(2192), i32(1))
+ if _p.Xz == nil {
+ _stringAppend(tls, _p, str(2192), int32(1))
}
- *(*int32)(unsafe.Pointer(&(_p.X1))) = i32(0)
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_p.X0)) + 1*uintptr(i32(0)))) = int8(i32(0))
+ _p.Xn = int32(0)
+ *elem1(_p.Xz, 0) = 0
}
-// Return the length of the next token.
+// C comment
+// /*
+// ** Return the length of the next token.
+// */
func _tokenLength(tls *crt.TLS, _z *int8, _pnLine *int32) (r0 int32) {
var _n, _1_inC, _1_c, _10_delim, _13_c int32
- _n = i32(0)
- if (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))))))))&int32(u16(8192))) == 0 && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(47) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(42)) {
+ _n = int32(0)
+ if (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, 0))))))&int32(8192)) == 0 && (int32(*elem1(_z, 0)) != int32(47) || int32(*elem1(_z, uintptr(1))) != int32(42)) {
goto _2
}
- _1_inC = i32(0)
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) == i32(47) {
- _1_inC = i32(1)
- _n = i32(2)
+ _1_inC = int32(0)
+ if int32(*elem1(_z, 0)) == int32(47) {
+ _1_inC = int32(1)
+ _n = int32(2)
}
_3:
- if store1(&_1_c, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(postInc1(&_n, int32(1))))))) == i32(0) {
+ if store2(&_1_c, int32(*elem1(_z, uintptr(postInc2(&_n, 1))))) == int32(0) {
goto _5
}
- if _1_c == i32(10) {
+ if _1_c == int32(10) {
*_pnLine += 1
}
- if (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(_1_c)))))) & int32(u16(8192))) != 0 {
+ if (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(_1_c))))) & int32(8192)) != 0 {
goto _3
}
- if (_1_inC != 0 && (_1_c == i32(42))) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) == i32(47)) {
+ if (_1_inC != 0 && (_1_c == int32(42))) && (int32(*elem1(_z, uintptr(_n))) == int32(47)) {
_n += 1
- _1_inC = i32(0)
+ _1_inC = int32(0)
goto _16
}
- if ((_1_inC == 0) && (_1_c == i32(47))) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) == i32(42)) {
+ if ((_1_inC == 0) && (_1_c == int32(47))) && (int32(*elem1(_z, uintptr(_n))) == int32(42)) {
_n += 1
- _1_inC = i32(1)
+ _1_inC = int32(1)
goto _16
}
if _1_inC == 0 {
@@ -1462,40 +1442,40 @@ _5:
_n -= 1
goto _36
_2:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(45) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(1))))) != i32(45) {
+ if int32(*elem1(_z, 0)) != int32(45) || int32(*elem1(_z, uintptr(1))) != int32(45) {
goto _19
}
- _n = i32(2)
+ _n = int32(2)
_20:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) == 0 || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) == i32(10) {
+ if (*elem1(_z, uintptr(_n))) == 0 || int32(*elem1(_z, uintptr(_n))) == int32(10) {
goto _24
}
_n += 1
goto _20
_24:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) != 0 {
+ if (*elem1(_z, uintptr(_n))) != 0 {
*_pnLine += 1
_n += 1
}
goto _36
_19:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(34) && int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0))))) != i32(39) {
+ if int32(*elem1(_z, 0)) != int32(34) && int32(*elem1(_z, 0)) != int32(39) {
goto _28
}
- _10_delim = int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(i32(0)))))
- _n = i32(1)
+ _10_delim = int32(*elem1(_z, 0))
+ _n = int32(1)
_29:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) == 0 {
+ if (*elem1(_z, uintptr(_n))) == 0 {
goto _32
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) == i32(10) {
+ if int32(*elem1(_z, uintptr(_n))) == int32(10) {
*_pnLine += 1
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) != _10_delim {
+ if int32(*elem1(_z, uintptr(_n))) != _10_delim {
goto _34
}
_n += 1
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n+i32(1))))) != _10_delim {
+ if int32(*elem1(_z, uintptr(_n+int32(1)))) != _10_delim {
goto _32
}
_34:
@@ -1504,9 +1484,9 @@ _34:
_32:
goto _36
_28:
- _n = i32(1)
+ _n = int32(1)
_37:
- if store1(&_13_c, int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n))))) == i32(0) || (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(_13_c))))))&int32(u16(8192))) != 0 || _13_c == i32(34) || _13_c == i32(39) || _13_c == i32(59) {
+ if store2(&_13_c, int32(*elem1(_z, uintptr(_n)))) == int32(0) || (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(_13_c)))))&int32(8192)) != 0 || _13_c == int32(34) || _13_c == int32(39) || _13_c == int32(59) {
goto _44
}
_n += 1
@@ -1516,8 +1496,11 @@ _36:
return _n
}
-// Run arbitrary SQL and record the results in an output string
-// given by the first parameter.
+// C comment
+// /*
+// ** Run arbitrary SQL and record the results in an output string
+// ** given by the first parameter.
+// */
func _evalSql(tls *crt.TLS, _p *XString, _zFormat *int8, args ...interface{}) (r0 int32) {
var _rc int32
var _zSql, _zErrMsg *int8
@@ -1528,21 +1511,21 @@ func _evalSql(tls *crt.TLS, _p *XString, _zFormat *int8, args ...interface{}) (r
_zSql = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
func() {
- if (_g.X15) <= i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(1897), unsafe.Pointer(str(1933)), i32(494), unsafe.Pointer((*int8)(unsafe.Pointer(&_evalSqlØ00__func__Ø000))), unsafe.Pointer(str(3136)))
+ if _g.XiTimeout <= int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(1897), unsafe.Pointer(str(1933)), int32(494), unsafe.Pointer(&_evalSqlØ00__func__Ø000), unsafe.Pointer(str(3136)))
crt.X__builtin_abort(tls)
}
}()
- _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_g.X3), _zSql, _evalCallback, (unsafe.Pointer)(_p), &_zErrMsg)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
+ _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_g.Xdb), _zSql, _evalCallback, unsafe.Pointer(_p), &_zErrMsg)
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zSql))
if _rc == 0 {
goto _2
}
- bin.Xsqlite3_snprintf(tls, int32(u32(30)), (*int8)(unsafe.Pointer(&_1_zErr)), str(3149), _rc)
+ bin.Xsqlite3_snprintf(tls, int32(30), (*int8)(unsafe.Pointer(&_1_zErr)), str(3149), _rc)
_stringAppendTerm(tls, _p, (*int8)(unsafe.Pointer(&_1_zErr)))
if _zErrMsg != nil {
_stringAppendTerm(tls, _p, _zErrMsg)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zErrMsg))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zErrMsg))
}
_2:
return _rc
@@ -1557,37 +1540,46 @@ func init() {
crt.Xstrncpy(nil, &_evalSqlØ00__func__Ø000[0], str(3159), 8)
}
-// Copy a single token into a string buffer.
+// C comment
+// /*
+// ** Copy a single token into a string buffer.
+// */
func _extractToken(tls *crt.TLS, _zIn *int8, _nIn int32, _zOut *int8, _nOut int32) (r0 int32) {
var _i int32
- if _nIn <= i32(0) {
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(i32(0)))) = int8(i32(0))
- return i32(0)
+ if _nIn <= int32(0) {
+ *elem1(_zOut, 0) = 0
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if _i >= _nIn || _i >= (_nOut-i32(1)) || (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIn)) + 1*uintptr(_i)))))))))&int32(u16(8192))) != 0 {
+ if _i >= _nIn || _i >= (_nOut-int32(1)) || (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_zIn, uintptr(_i)))))))&int32(8192)) != 0 {
goto _6
}
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(_i))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zIn)) + 1*uintptr(_i)))
+ *elem1(_zOut, uintptr(_i)) = *elem1(_zIn, uintptr(_i))
_i += 1
goto _1
_6:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(_i))) = int8(i32(0))
+ *elem1(_zOut, uintptr(_i)) = 0
return _i
}
-// Mark a script as having finished. Remove the CLIENT table entry
-// if bShutdown is true.
+// C comment
+// /*
+// ** Mark a script as having finished. Remove the CLIENT table entry
+// ** if bShutdown is true.
+// */
func _finishScript(tls *crt.TLS, _iClient int32, _taskId int32, _bShutdown int32) (r0 int32) {
_runSql(tls, str(3167), _taskId)
if _bShutdown != 0 {
_runSql(tls, str(2383), _iClient)
}
- return i32(0)
+ return int32(0)
}
-// Read the entire content of a file into memory
+// C comment
+// /*
+// ** Read the entire content of a file into memory
+// */
func _readFile(tls *crt.TLS, _zFilename *int8) (r0 *int8) {
var _sz int32
var _z *int8
@@ -1596,71 +1588,69 @@ func _readFile(tls *crt.TLS, _zFilename *int8) (r0 *int8) {
if _in == nil {
_fatalError(tls, str(3251), unsafe.Pointer(_zFilename))
}
- crt.Xfseek(tls, _in, i32(0), i32(2))
+ crt.Xfseek(tls, _in, int32(0), int32(2))
_sz = crt.Xftell(tls, _in)
crt.Xrewind(tls, _in)
- _z = (*int8)(bin.Xsqlite3_malloc(tls, _sz+i32(1)))
- _sz = int32(crt.Xfread(tls, (unsafe.Pointer)(_z), uint32(i32(1)), uint32(_sz), _in))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_sz))) = int8(i32(0))
+ _z = (*int8)(bin.Xsqlite3_malloc(tls, _sz+int32(1)))
+ _sz = int32(crt.Xfread(tls, unsafe.Pointer(_z), uint32(1), uint32(_sz), _in))
+ *elem1(_z, uintptr(_sz)) = 0
crt.Xfclose(tls, _in)
return _z
}
-// Find the number of characters up to the first character past the
-// of the next "--endif" or "--else" token. Nested --if commands are
-// also skipped.
+// C comment
+// /*
+// ** Find the number of characters up to the first character past the
+// ** of the next "--endif" or "--else" token. Nested --if commands are
+// ** also skipped.
+// */
func _findEndif(tls *crt.TLS, _z *int8, _stopAtElse int32, _pnLine *int32) (r0 int32) {
var _n, _1_len, _3_skip int32
- _n = i32(0)
+ _n = int32(0)
_0:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) == 0 {
+ if (*elem1(_z, uintptr(_n))) == 0 {
goto _1
}
- _1_len = _tokenLength(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n))))))), _pnLine)
- if ((crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n))))))), str(3280), uint32(i32(7))) == i32(0)) && (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n+i32(7))))))))))&int32(u16(8192))) != 0) || ((_stopAtElse != 0 && (crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n))))))), str(3288), uint32(i32(6))) == i32(0))) && (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n+i32(6))))))))))&int32(u16(8192))) != 0) {
+ _1_len = _tokenLength(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(_n))), _pnLine)
+ if ((crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(_n))), str(3280), uint32(7)) == int32(0)) && (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, uintptr(_n+int32(7))))))))&int32(8192)) != 0) || ((_stopAtElse != 0 && (crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(_n))), str(3288), uint32(6)) == int32(0))) && (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, uintptr(_n+int32(6))))))))&int32(8192)) != 0) {
return _n + _1_len
}
- if (crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n))))))), str(3295), uint32(i32(4))) == i32(0)) && (int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n+i32(4))))))))))&int32(u16(8192))) != 0 {
- _3_skip = _findEndif(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n)))))))))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_1_len))))))), i32(0), _pnLine)
- {
- p := &_n
- *p = (*p) + (_3_skip + _1_len)
- sink1(*p)
- }
+ if (crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(_n))), str(3295), uint32(4)) == int32(0)) && (int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, uintptr(_n+int32(4))))))))&int32(8192)) != 0 {
+ _3_skip = _findEndif(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(_n)))))+uintptr(_1_len))), int32(0), _pnLine)
+ _n += _3_skip + _1_len
goto _9
}
- {
- p := &_n
- *p = (*p) + _1_len
- sink1(*p)
- }
+ _n += _1_len
_9:
goto _0
_1:
return _n
}
-// Start up a client process for iClient, if it is not already
-// running. If the client is already running, then this routine
-// is a no-op.
+// C comment
+// /*
+// ** Start up a client process for iClient, if it is not already
+// ** running. If the client is already running, then this routine
+// ** is a no-op.
+// */
func _startClient(tls *crt.TLS, _iClient int32) {
var _1_rc int32
var _1_zSys *int8
_runSql(tls, str(3300), _iClient)
- if bin.Xsqlite3_changes(tls, (*bin.Xsqlite3)(_g.X3)) == 0 {
+ if bin.Xsqlite3_changes(tls, (*bin.Xsqlite3)(_g.Xdb)) == 0 {
goto _0
}
- _1_zSys = bin.Xsqlite3_mprintf(tls, str(3342), unsafe.Pointer(_g.X0), unsafe.Pointer(_g.X2), _iClient, _g.X10)
- if (_g.X11) != 0 {
+ _1_zSys = bin.Xsqlite3_mprintf(tls, str(3342), unsafe.Pointer(_g.Xargv0), unsafe.Pointer(_g.XzDbFile), _iClient, _g.XiTrace)
+ if _g.XbSqlTrace != 0 {
_1_zSys = bin.Xsqlite3_mprintf(tls, str(3373), unsafe.Pointer(_1_zSys))
}
- if (_g.X16) != 0 {
+ if _g.XbSync != 0 {
_1_zSys = bin.Xsqlite3_mprintf(tls, str(3387), unsafe.Pointer(_1_zSys))
}
- if (_g.X1) != nil {
- _1_zSys = bin.Xsqlite3_mprintf(tls, str(3397), unsafe.Pointer(_1_zSys), unsafe.Pointer(_g.X1))
+ if _g.XzVfs != nil {
+ _1_zSys = bin.Xsqlite3_mprintf(tls, str(3397), unsafe.Pointer(_1_zSys), unsafe.Pointer(_g.XzVfs))
}
- if (_g.X10) >= i32(2) {
+ if _g.XiTrace >= int32(2) {
_logMessage(tls, str(3411), unsafe.Pointer(_1_zSys))
}
_1_zSys = bin.Xsqlite3_mprintf(tls, str(3424), unsafe.Pointer(_1_zSys))
@@ -1668,41 +1658,40 @@ func _startClient(tls *crt.TLS, _iClient int32) {
if _1_rc != 0 {
_errorMessage(tls, str(3429), _1_rc)
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_1_zSys))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_1_zSys))
_0:
}
-// Wait for a client process to complete all its tasks
+// C comment
+// /*
+// ** Wait for a client process to complete all its tasks
+// */
func _waitForClient(tls *crt.TLS, _iClient int32, _iTimeout int32, _zErrPrefix *int8) {
var _rc int32
var _pStmt unsafe.Pointer
- if _iClient > i32(0) {
+ if _iClient > int32(0) {
_pStmt = _prepareSql(tls, str(3463), _iClient)
goto _1
}
_pStmt = _prepareSql(tls, str(3559))
_1:
- *(*int32)(unsafe.Pointer(&(_g.X15))) = i32(0)
+ _g.XiTimeout = int32(0)
_2:
- if ((store1(&_rc, bin.Xsqlite3_step(tls, _pStmt)) == i32(5)) || (_rc == i32(100))) && (_iTimeout > i32(0)) {
+ if ((store2(&_rc, bin.Xsqlite3_step(tls, _pStmt)) == int32(5)) || (_rc == int32(100))) && (_iTimeout > int32(0)) {
bin.Xsqlite3_reset(tls, _pStmt)
- bin.Xsqlite3_sleep(tls, i32(50))
- {
- p := &_iTimeout
- *p = (*p) - i32(50)
- sink1(*p)
- }
+ bin.Xsqlite3_sleep(tls, int32(50))
+ _iTimeout -= int32(50)
goto _2
}
bin.Xsqlite3_finalize(tls, _pStmt)
- *(*int32)(unsafe.Pointer(&(_g.X15))) = i32(10000)
- if _rc == i32(101) {
+ _g.XiTimeout = int32(10000)
+ if _rc == int32(101) {
goto _6
}
if _zErrPrefix == nil {
_zErrPrefix = str(454)
}
- if _iClient > i32(0) {
+ if _iClient > int32(0) {
_errorMessage(tls, str(3640), unsafe.Pointer(_zErrPrefix), _iClient)
goto _9
}
@@ -1711,72 +1700,82 @@ _9:
_6:
}
-// Find the number of characters up to the start of the next "--end" token.
+// C comment
+// /*
+// ** Find the number of characters up to the start of the next "--end" token.
+// */
func _findEnd(tls *crt.TLS, _z *int8, _pnLine *int32) (r0 int32) {
var _n int32
- _n = i32(0)
+ _n = int32(0)
_0:
- if ((*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n)))) != 0) && (crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n))))))), str(3706), uint32(i32(5))) != 0 || ((int32(*(*uint16)(unsafe.Pointer(uintptr((unsafe.Pointer)(*crt.X__ctype_b_loc(tls))) + 2*uintptr(int32(uint8(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_n+i32(5)))))))))) & int32(u16(8192))) == 0)) {
- {
- p := &_n
- *p = (*p) + _tokenLength(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_n))))))), _pnLine)
- sink1(*p)
- }
+ if ((*elem1(_z, uintptr(_n))) != 0) && (crt.Xstrncmp(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(_n))), str(3706), uint32(5)) != 0 || ((int32(*elem3(*crt.X__ctype_b_loc(tls), uintptr(int32(uint8(*elem1(_z, uintptr(_n+int32(5)))))))) & int32(8192)) == 0)) {
+ _n += _tokenLength(tls, (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z))+uintptr(_n))), _pnLine)
goto _0
}
return _n
}
-// Return a pointer to the tail of a filename
+// C comment
+// /* Return a pointer to the tail of a filename
+// */
func _filenameTail(tls *crt.TLS, _z *int8) (r0 *int8) {
var _i, _j int32
- _i = store1(&_j, i32(0))
+ _i = store2(&_j, int32(0))
_0:
- if (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) == 0 {
+ if (*elem1(_z, uintptr(_i))) == 0 {
goto _3
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_z)) + 1*uintptr(_i)))) == i32(47) {
- _j = _i + i32(1)
+ if int32(*elem1(_z, uintptr(_i))) == int32(47) {
+ _j = _i + int32(1)
}
_i += 1
goto _0
_3:
- return (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z)) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_j)))))))
+ return (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(_z)) + uintptr(_j)))
}
-// This routine exists as a convenient place to set a debugger
-// breakpoint.
+// C comment
+// /* This routine exists as a convenient place to set a debugger
+// ** breakpoint.
+// */
func _test_breakpoint(tls *crt.TLS) {
_test_breakpointØ00cntØ001 += 1
}
+// C comment
+// /* This routine exists as a convenient place to set a debugger
+// ** breakpoint.
+// */
var _test_breakpointØ00cntØ001 int32
-// Interpret zArg as a boolean value. Return either 0 or 1.
+// C comment
+// /*
+// ** Interpret zArg as a boolean value. Return either 0 or 1.
+// */
func _booleanValue(tls *crt.TLS, _zArg *int8) (r0 int32) {
var _i int32
if _zArg == nil {
- return i32(0)
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_1:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zArg)) + 1*uintptr(_i)))) < i32(48) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zArg)) + 1*uintptr(_i)))) > i32(57) {
+ if int32(*elem1(_zArg, uintptr(_i))) < int32(48) || int32(*elem1(_zArg, uintptr(_i))) > int32(57) {
goto _5
}
_i += 1
goto _1
_5:
- if (_i > i32(0)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zArg)) + 1*uintptr(_i)))) == i32(0)) {
+ if (_i > int32(0)) && (int32(*elem1(_zArg, uintptr(_i))) == int32(0)) {
return crt.Xatoi(tls, _zArg)
}
- if (bin.Xsqlite3_stricmp(tls, _zArg, str(3712)) == i32(0)) || (bin.Xsqlite3_stricmp(tls, _zArg, str(3715)) == i32(0)) {
- return i32(1)
+ if (bin.Xsqlite3_stricmp(tls, _zArg, str(3712)) == int32(0)) || (bin.Xsqlite3_stricmp(tls, _zArg, str(3715)) == int32(0)) {
+ return int32(1)
}
- if (bin.Xsqlite3_stricmp(tls, _zArg, str(3719)) == i32(0)) || (bin.Xsqlite3_stricmp(tls, _zArg, str(3723)) == i32(0)) {
- return i32(0)
+ if (bin.Xsqlite3_stricmp(tls, _zArg, str(3719)) == int32(0)) || (bin.Xsqlite3_stricmp(tls, _zArg, str(3723)) == int32(0)) {
+ return int32(0)
}
_errorMessage(tls, str(3726), unsafe.Pointer(_zArg))
- return i32(0)
+ return int32(0)
}
func bool2int(b bool) int32 {
@@ -1786,57 +1785,62 @@ func bool2int(b bool) int32 {
return 0
}
func bug20530(interface{}) {} //TODO remove when https://github.com/golang/go/issues/20530 is fixed.
-func i16(n int16) int16 { return n }
-func i32(n int32) int32 { return n }
-func i64(n int64) int64 { return n }
-func i8(n int8) int8 { return n }
func init() { nzf32 *= -1; nzf64 *= -1 }
-func u16(n uint16) uint16 { return n }
-func u32(n uint32) uint32 { return n }
-func u64(n uint64) uint64 { return n }
-func u8(n byte) byte { return n }
var inf = math.Inf(1)
var nzf32 float32 // -0.0
var nzf64 float64 // -0.0
-func sink0(*int8) {} //TODO report GC bug
-func sink1(int32) {} //TODO report GC bug
-func postInc0(p **int8, d int) *int8 {
+func elem0(a **int8, index uintptr) **int8 {
+ return (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem4(a *unsafe.Pointer, index uintptr) *unsafe.Pointer {
+ return (*unsafe.Pointer)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem5(a *[100]int8, index uintptr) *[100]int8 {
+ return (*[100]int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 100*index))
+}
+func elem1(a *int8, index uintptr) *int8 {
+ return (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 1*index))
+}
+func elem3(a *uint16, index uintptr) *uint16 {
+ return (*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 2*index))
+}
+func postInc1(p **int8, d int) *int8 {
q := (*uintptr)(unsafe.Pointer(p))
v := *q
*q += uintptr(d)
return (*int8)(unsafe.Pointer(v))
}
-func postInc1(p *int32, d int32) int32 { v := *p; *p += d; return v }
-func preInc1(p *int32, d int32) int32 { v := *p + d; *p = v; return v }
-func store0(p **int8, v *int8) *int8 { *p = v; return v }
-func store1(p *int32, v int32) int32 { *p = v; return v }
+func postInc2(p *int32, d int32) int32 { v := *p; *p += d; return v }
+func preInc2(p *int32, d int32) int32 { v := *p + d; *p = v; return v }
+func store1(p **int8, v *int8) *int8 { *p = v; return v }
+func store2(p *int32, v int32) int32 { *p = v; return v }
type TGlobal struct {
- X0 *int8
- X1 *int8
- X2 *int8
- X3 unsafe.Pointer
- X4 *int8
- X5 unsafe.Pointer
- X6 *int8
- X7 unsafe.Pointer
- X8 [32]int8
- X9 int32
- X10 int32
- X11 int32
- X12 int32
- X13 int32
- X14 int32
- X15 int32
- X16 int32
-} // t2 struct{*int8,*int8,*int8,*struct{},*int8,*struct{},*int8,*struct{},[32]int8,int32,int32,int32,int32,int32,int32,int32,int32}
+ Xargv0 *int8
+ XzVfs *int8
+ XzDbFile *int8
+ Xdb unsafe.Pointer
+ XzErrLog *int8
+ XpErrLog unsafe.Pointer
+ XzLog *int8
+ XpLog unsafe.Pointer
+ XzName [32]int8
+ XtaskId int32
+ XiTrace int32
+ XbSqlTrace int32
+ XbIgnoreSqlErrors int32
+ XnError int32
+ XnTest int32
+ XiTimeout int32
+ XbSync int32
+} // t6 struct{argv0 *int8,zVfs *int8,zDbFile *int8,db *struct{},zErrLog *int8,pErrLog *struct{},zLog *int8,pLog *struct{},zName [32]int8,taskId int32,iTrace int32,bSqlTrace int32,bIgnoreSqlErrors int32,nError int32,nTest int32,iTimeout int32,bSync int32}
type XString struct {
- X0 *int8
- X1 int32
- X2 int32
-} // t3 struct{*int8,int32,int32}
+ Xz *int8
+ Xn int32
+ XnAlloc int32
+} // t7 struct{z *int8,n int32,nAlloc int32}
func str(n int) *int8 { return (*int8)(unsafe.Pointer(&strTab[n])) }
func wstr(n int) *int32 { return (*int32)(unsafe.Pointer(&strTab[n])) }
diff --git a/internal/threadtest1/threadtest1_linux_386.go b/internal/threadtest1/threadtest1_linux_386.go
index 66ae1fa..444ba10 100644
--- a/internal/threadtest1/threadtest1_linux_386.go
+++ b/internal/threadtest1/threadtest1_linux_386.go
@@ -1,29 +1,29 @@
// Code generated by ccgo. DO NOT EDIT.
-// threadtest1.c
-
-// 2002 January 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 file implements a simple standalone program used to test whether
-// or not the SQLite library is threadsafe.
-//
-// Testing the thread safety of SQLite is difficult because there are very
-// few places in the code that are even potentially unsafe, and those
-// places execute for very short periods of time. So even if the library
-// is compiled with its mutexes disabled, it is likely to work correctly
-// in a multi-threaded program most of the time.
-//
-// This file is NOT part of the standard SQLite library. It is used for
-// testing only.
-
+// threadtest1
+// /*
+// ** 2002 January 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 file implements a simple standalone program used to test whether
+// ** or not the SQLite library is threadsafe.
+// **
+// ** Testing the thread safety of SQLite is difficult because there are very
+// ** few places in the code that are even potentially unsafe, and those
+// ** places execute for very short periods of time. So even if the library
+// ** is compiled with its mutexes disabled, it is likely to work correctly
+// ** in a multi-threaded program most of the time.
+// **
+// ** This file is NOT part of the standard SQLite library. It is used for
+// ** testing only.
+// */
package main
import (
@@ -61,13 +61,13 @@ var X__stdfiles [3]unsafe.Pointer
var Xstdout unsafe.Pointer
func init() {
- Xstdout = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
+ Xstdout = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
}
var Xstderr unsafe.Pointer
func init() {
- Xstderr = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
+ Xstderr = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
}
func Xmain(tls *crt.TLS, _argc int32, _argv **int8) (r0 int32) {
@@ -75,68 +75,72 @@ func Xmain(tls *crt.TLS, _argc int32, _argv **int8) (r0 int32) {
var _id uint32
var _zFile, _4_zDb, _4_zJournal *int8
var _2_zBuf, _6_zBuf [200]int8
- r0 = i32(0)
- if (_argc > i32(2)) && (crt.Xstrcmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))), str(0)) == i32(0)) {
- _verbose = i32(1)
+ r0 = int32(0)
+ if (_argc > int32(2)) && (crt.Xstrcmp(tls, *elem0(_argv, uintptr(1)), str(0)) == int32(0)) {
+ _verbose = int32(1)
bug20530(_verbose)
_argc -= 1
*(*uintptr)(unsafe.Pointer(&_argv)) += uintptr(4)
}
- if (_argc < i32(2)) || (store0(&_n, crt.Xatoi(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1)))))) < i32(1)) {
- _n = i32(10)
+ if (_argc < int32(2)) || (store1(&_n, crt.Xatoi(tls, *elem0(_argv, uintptr(1)))) < int32(1)) {
+ _n = int32(10)
}
- _i = i32(0)
+ _i = int32(0)
_4:
if _i >= _n {
goto _7
}
- crt.Xsprintf(tls, (*int8)(unsafe.Pointer(&_2_zBuf)), str(3), (_i+i32(1))/i32(2))
+ crt.Xsprintf(tls, (*int8)(unsafe.Pointer(&_2_zBuf)), str(3), (_i+int32(1))/int32(2))
crt.Xunlink(tls, (*int8)(unsafe.Pointer(&_2_zBuf)))
_i += 1
goto _4
_7:
- _i = i32(0)
+ _i = int32(0)
_8:
if _i >= _n {
goto _11
}
- _zFile = bin.Xsqlite3_mprintf(tls, str(13), (_i%i32(2))+i32(1), (_i+i32(2))/i32(2))
- if (_i % i32(2)) == i32(0) {
- _4_zDb = (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFile)) + 1*uintptr(i32(2))))
+ _zFile = bin.Xsqlite3_mprintf(tls, str(13), (_i%int32(2))+int32(1), (_i+int32(2))/int32(2))
+ if (_i % int32(2)) == int32(0) {
+ _4_zDb = elem2(_zFile, uintptr(2))
_4_zJournal = bin.Xsqlite3_mprintf(tls, str(26), unsafe.Pointer(_4_zDb))
crt.Xunlink(tls, _4_zDb)
crt.Xunlink(tls, _4_zJournal)
- crt.Xfree(tls, (unsafe.Pointer)(_4_zJournal))
+ crt.Xfree(tls, unsafe.Pointer(_4_zJournal))
}
- crt.Xpthread_create(tls, &_id, nil, _worker_bee, (unsafe.Pointer)(_zFile))
+ crt.Xpthread_create(tls, &_id, nil, _worker_bee, unsafe.Pointer(_zFile))
crt.Xpthread_detach(tls, _id)
_i += 1
goto _8
_11:
crt.Xpthread_mutex_lock(tls, &Xlock)
_13:
- if Xthread_cnt > i32(0) {
+ if Xthread_cnt > int32(0) {
crt.Xpthread_cond_wait(tls, &Xsig, &Xlock)
goto _13
}
crt.Xpthread_mutex_unlock(tls, &Xlock)
- _i = i32(0)
+ _i = int32(0)
_15:
if _i >= _n {
goto _18
}
- crt.Xsprintf(tls, (*int8)(unsafe.Pointer(&_6_zBuf)), str(3), (_i+i32(1))/i32(2))
+ crt.Xsprintf(tls, (*int8)(unsafe.Pointer(&_6_zBuf)), str(3), (_i+int32(1))/int32(2))
crt.Xunlink(tls, (*int8)(unsafe.Pointer(&_6_zBuf)))
_i += 1
goto _15
_18:
- return i32(0)
+ return int32(0)
_ = _2_zBuf
_ = _6_zBuf
panic(0)
}
+// C comment
+// /*
+// ** Enable for tracing
+// */
var _verbose int32
func _worker_bee(tls *crt.TLS, _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
@@ -152,56 +156,56 @@ func _worker_bee(tls *crt.TLS, _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
crt.Xpthread_mutex_unlock(tls, &Xlock)
crt.Xprintf(tls, str(37), unsafe.Pointer(_zFilename))
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
- _cnt = i32(0)
+ _cnt = int32(0)
_0:
- if _cnt >= i32(10) {
+ if _cnt >= int32(10) {
goto _3
}
- bin.Xsqlite3_open(tls, (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zFilename))+1*uintptr(i32(2)))), (**bin.Xsqlite3)(unsafe.Pointer(&_db)))
+ bin.Xsqlite3_open(tls, elem2(_zFilename, uintptr(2)), (**bin.Xsqlite3)(unsafe.Pointer(&_db)))
if _db == nil {
crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(48), unsafe.Pointer(_zFilename))
- _Exit(tls, i32(1))
+ _Exit(tls, int32(1))
}
- bin.Xsqlite3_busy_handler(tls, (*bin.Xsqlite3)(_db), _db_is_locked, (unsafe.Pointer)(_zFilename))
+ bin.Xsqlite3_busy_handler(tls, (*bin.Xsqlite3)(_db), _db_is_locked, unsafe.Pointer(_zFilename))
Xdb_execute(tls, _db, _zFilename, str(64), _t)
- _i = i32(1)
+ _i = int32(1)
_5:
- if _i > i32(100) {
+ if _i > int32(100) {
goto _8
}
- Xdb_execute(tls, _db, _zFilename, str(89), _t, _i, _i*i32(2), _i*_i)
+ Xdb_execute(tls, _db, _zFilename, str(89), _t, _i, _i*int32(2), _i*_i)
_i += 1
goto _5
_8:
_az = Xdb_query(tls, _db, _zFilename, str(123), _t)
- Xdb_check(tls, _zFilename, str(148), _az, unsafe.Pointer(str(156)), i32(0))
+ Xdb_check(tls, _zFilename, str(148), _az, unsafe.Pointer(str(156)), int32(0))
_az = Xdb_query(tls, _db, _zFilename, str(160), _t)
- Xdb_check(tls, _zFilename, str(183), _az, unsafe.Pointer(str(190)), i32(0))
- Xdb_execute(tls, _db, _zFilename, str(194), _t)
+ Xdb_check(tls, _zFilename, str(183), _az, unsafe.Pointer(str(190)), int32(0))
+ Xdb_execute(tls, _db, _zFilename, str(196), _t)
_az = Xdb_query(tls, _db, _zFilename, str(160), _t)
- Xdb_check(tls, _zFilename, str(221), _az, unsafe.Pointer(str(229)), i32(0))
- _i = i32(1)
+ Xdb_check(tls, _zFilename, str(223), _az, unsafe.Pointer(str(231)), int32(0))
+ _i = int32(1)
_9:
- if _i > i32(50) {
+ if _i > int32(50) {
goto _12
}
- _az = Xdb_query(tls, _db, _zFilename, str(232), _t, _i)
- crt.Xsprintf(tls, (*int8)(unsafe.Pointer(&_4_z1)), str(264), _i*i32(2))
- crt.Xsprintf(tls, (*int8)(unsafe.Pointer(&_4_z2)), str(264), _i*_i)
- Xdb_check(tls, _zFilename, str(267), _az, unsafe.Pointer((*int8)(unsafe.Pointer(&_4_z1))), unsafe.Pointer((*int8)(unsafe.Pointer(&_4_z2))), i32(0))
+ _az = Xdb_query(tls, _db, _zFilename, str(236), _t, _i)
+ crt.Xsprintf(tls, (*int8)(unsafe.Pointer(&_4_z1)), str(268), _i*int32(2))
+ crt.Xsprintf(tls, (*int8)(unsafe.Pointer(&_4_z2)), str(268), _i*_i)
+ Xdb_check(tls, _zFilename, str(271), _az, unsafe.Pointer(&_4_z1), unsafe.Pointer(&_4_z2), int32(0))
_i += 1
goto _9
_12:
- Xdb_execute(tls, _db, _zFilename, str(276), _t)
+ Xdb_execute(tls, _db, _zFilename, str(280), _t)
bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_db))
_cnt += 1
goto _0
_3:
- crt.Xprintf(tls, str(292), unsafe.Pointer(_zFilename))
+ crt.Xprintf(tls, str(296), unsafe.Pointer(_zFilename))
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
crt.Xpthread_mutex_lock(tls, &Xlock)
Xthread_cnt -= 1
- if Xthread_cnt <= i32(0) {
+ if Xthread_cnt <= int32(0) {
crt.Xpthread_cond_signal(tls, &Xsig)
}
crt.Xpthread_mutex_unlock(tls, &Xlock)
@@ -217,21 +221,30 @@ var Xlock crt.Xpthread_mutex_t
var Xthread_cnt int32
-// Come here to die.
+// C comment
+// /*
+// ** Come here to die.
+// */
func _Exit(tls *crt.TLS, _rc int32) {
crt.Xexit(tls, _rc)
}
-// When a lock occurs, yield.
+// C comment
+// /*
+// ** When a lock occurs, yield.
+// */
func _db_is_locked(tls *crt.TLS, _NotUsed unsafe.Pointer, _iCount int32) (r0 int32) {
if _verbose != 0 {
- crt.Xprintf(tls, str(301), unsafe.Pointer((*int8)(_NotUsed)), _iCount)
+ crt.Xprintf(tls, str(305), _NotUsed, _iCount)
}
- crt.Xusleep(tls, uint32(i32(100)))
- return bool2int(_iCount < i32(25))
+ crt.Xusleep(tls, uint32(100))
+ return bool2int(_iCount < int32(40000))
}
-// Execute an SQL statement.
+// C comment
+// /*
+// ** Execute an SQL statement.
+// */
func Xdb_execute(tls *crt.TLS, _db unsafe.Pointer, _zFile *int8, _zFormat *int8, args ...interface{}) {
var _rc int32
var _zSql, _zErrMsg *int8
@@ -241,27 +254,30 @@ func Xdb_execute(tls *crt.TLS, _db unsafe.Pointer, _zFile *int8, _zFormat *int8,
_zSql = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
if _verbose != 0 {
- crt.Xprintf(tls, str(314), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql))
+ crt.Xprintf(tls, str(318), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql))
}
_0:
_rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_db), _zSql, nil, nil, &_zErrMsg)
- if _rc == i32(5) {
+ if _rc == int32(5) {
goto _0
}
if _verbose != 0 {
- crt.Xprintf(tls, str(327), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql))
+ crt.Xprintf(tls, str(331), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql))
}
if _zErrMsg != nil {
- crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(340), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql), unsafe.Pointer(_zErrMsg))
- crt.Xfree(tls, (unsafe.Pointer)(_zErrMsg))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
- _Exit(tls, i32(1))
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(344), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql), unsafe.Pointer(_zErrMsg))
+ crt.Xfree(tls, unsafe.Pointer(_zErrMsg))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zSql))
+ _Exit(tls, int32(1))
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zSql))
}
-// Execute a query against the database. NULL values are returned
-// as an empty string. The list is terminated by a single NULL pointer.
+// C comment
+// /*
+// ** Execute a query against the database. NULL values are returned
+// ** as an empty string. The list is terminated by a single NULL pointer.
+// */
func Xdb_query(tls *crt.TLS, _db unsafe.Pointer, _zFile *int8, _zFormat *int8, args ...interface{}) (r0 **int8) {
var _rc int32
var _zSql, _zErrMsg *int8
@@ -271,95 +287,98 @@ func Xdb_query(tls *crt.TLS, _db unsafe.Pointer, _zFile *int8, _zFormat *int8, a
_ap = args
_zSql = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
- crt.Xmemset(tls, (unsafe.Pointer)(&_sResult), i32(0), u32(16))
- *(**int8)(unsafe.Pointer(&(_sResult.X0))) = _zFile
+ crt.Xmemset(tls, unsafe.Pointer(&_sResult), int32(0), uint32(16))
+ _sResult.XzFile = _zFile
if _verbose != 0 {
- crt.Xprintf(tls, str(369), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql))
+ crt.Xprintf(tls, str(373), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql))
}
- _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_db), _zSql, _db_query_callback, (unsafe.Pointer)(&_sResult), &_zErrMsg)
- if _rc != i32(17) {
+ _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_db), _zSql, _db_query_callback, unsafe.Pointer(&_sResult), &_zErrMsg)
+ if _rc != int32(17) {
goto _1
}
if _zErrMsg != nil {
- crt.Xfree(tls, (unsafe.Pointer)(_zErrMsg))
+ crt.Xfree(tls, unsafe.Pointer(_zErrMsg))
}
- _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_db), _zSql, _db_query_callback, (unsafe.Pointer)(&_sResult), &_zErrMsg)
+ _rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_db), _zSql, _db_query_callback, unsafe.Pointer(&_sResult), &_zErrMsg)
_1:
if _verbose != 0 {
- crt.Xprintf(tls, str(383), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql))
+ crt.Xprintf(tls, str(387), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql))
}
if _zErrMsg != nil {
- crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(395), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql), unsafe.Pointer(_zErrMsg))
- crt.Xfree(tls, (unsafe.Pointer)(_zErrMsg))
- crt.Xfree(tls, (unsafe.Pointer)(_zSql))
- _Exit(tls, i32(1))
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(399), unsafe.Pointer(_zFile), unsafe.Pointer(_zSql), unsafe.Pointer(_zErrMsg))
+ crt.Xfree(tls, unsafe.Pointer(_zErrMsg))
+ crt.Xfree(tls, unsafe.Pointer(_zSql))
+ _Exit(tls, int32(1))
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
- if (_sResult.X3) == nil {
- _db_query_callback(tls, (unsafe.Pointer)(&_sResult), i32(0), nil, nil)
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zSql))
+ if _sResult.XazElem == nil {
+ _db_query_callback(tls, unsafe.Pointer(&_sResult), int32(0), nil, nil)
}
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_sResult.X3)) + 4*uintptr(_sResult.X1))) = nil
- return _sResult.X3
-
- _ = _sResult
- panic(0)
+ *elem0(_sResult.XazElem, uintptr(_sResult.XnElem)) = nil
+ return _sResult.XazElem
}
-// The callback function for db_query
+// C comment
+// /*
+// ** The callback function for db_query
+// */
func _db_query_callback(tls *crt.TLS, _pUser unsafe.Pointer, _nArg int32, _azArg **int8, _NotUsed **int8) (r0 int32) {
var _i int32
var _pResult *TQueryResult
_pResult = (*TQueryResult)(_pUser)
- if ((_pResult.X1) + _nArg) < (_pResult.X2) {
+ if (_pResult.XnElem + _nArg) < _pResult.XnAlloc {
goto _0
}
- if (_pResult.X2) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_pResult.X2))) = _nArg + i32(1)
+ if _pResult.XnAlloc == int32(0) {
+ _pResult.XnAlloc = _nArg + int32(1)
goto _2
}
- *(*int32)(unsafe.Pointer(&(_pResult.X2))) = (((_pResult.X2) * i32(2)) + _nArg) + i32(1)
+ _pResult.XnAlloc = ((_pResult.XnAlloc * int32(2)) + _nArg) + int32(1)
_2:
- *(***int8)(unsafe.Pointer(&(_pResult.X3))) = (**int8)(crt.Xrealloc(tls, (unsafe.Pointer)(_pResult.X3), uint32(_pResult.X2)*u32(4)))
- if (_pResult.X3) == nil {
- crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(422), unsafe.Pointer(_pResult.X0))
- return i32(1)
+ _pResult.XazElem = (**int8)(crt.Xrealloc(tls, unsafe.Pointer(_pResult.XazElem), uint32(_pResult.XnAlloc)*uint32(4)))
+ if _pResult.XazElem == nil {
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(426), unsafe.Pointer(_pResult.XzFile))
+ return int32(1)
}
_0:
if _azArg == nil {
- return i32(0)
+ return int32(0)
}
- _i = i32(0)
+ _i = int32(0)
_5:
if _i >= _nArg {
goto _8
}
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pResult.X3)) + 4*uintptr(postInc0((*int32)(unsafe.Pointer(&(_pResult.X1))), int32(1))))) = bin.Xsqlite3_mprintf(tls, str(441), unsafe.Pointer(func() *int8 {
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azArg)) + 4*uintptr(_i)))) != nil {
- return (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_azArg)) + 4*uintptr(_i))))
+ *elem0(_pResult.XazElem, uintptr(postInc1(&_pResult.XnElem, 1))) = bin.Xsqlite3_mprintf(tls, str(445), unsafe.Pointer(func() *int8 {
+ if (*elem0(_azArg, uintptr(_i))) != nil {
+ return (*elem0(_azArg, uintptr(_i)))
}
- return str(444)
+ return str(448)
}()))
_i += 1
goto _5
_8:
- return i32(0)
+ return int32(0)
}
-// Check results
+// C comment
+// /*
+// ** Check results
+// */
func Xdb_check(tls *crt.TLS, _zFile *int8, _zMsg *int8, _az **int8, args ...interface{}) {
var _i int32
var _z *int8
var _ap []interface{}
_ap = args
- _i = i32(0)
+ _i = int32(0)
_0:
- if store1(&_z, (*int8)(crt.VAPointer(&_ap))) == nil {
+ if store2(&_z, (*int8)(crt.VAPointer(&_ap))) == nil {
goto _3
}
- if ((*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_az)) + 4*uintptr(_i)))) == nil) || (crt.Xstrcmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_az)) + 4*uintptr(_i))), _z) != i32(0)) {
- crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(445), unsafe.Pointer(_zFile), unsafe.Pointer(_zMsg), _i+i32(1), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_az)) + 4*uintptr(_i)))))
+ if ((*elem0(_az, uintptr(_i))) == nil) || (crt.Xstrcmp(tls, *elem0(_az, uintptr(_i)), _z) != int32(0)) {
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstdout), str(449), unsafe.Pointer(_zFile), unsafe.Pointer(_zMsg), _i+int32(1), unsafe.Pointer(*elem0(_az, uintptr(_i))))
Xdb_query_free(tls, _az)
- _Exit(tls, i32(1))
+ _Exit(tls, int32(1))
}
_i += 1
goto _0
@@ -368,19 +387,22 @@ _3:
Xdb_query_free(tls, _az)
}
-// Free the results of a db_query() call.
+// C comment
+// /*
+// ** Free the results of a db_query() call.
+// */
func Xdb_query_free(tls *crt.TLS, _az **int8) {
var _i int32
- _i = i32(0)
+ _i = int32(0)
_0:
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_az)) + 4*uintptr(_i)))) == nil {
+ if (*elem0(_az, uintptr(_i))) == nil {
goto _3
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_az)) + 4*uintptr(_i)))))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(*elem0(_az, uintptr(_i))))
_i += 1
goto _0
_3:
- crt.Xfree(tls, (unsafe.Pointer)(_az))
+ crt.Xfree(tls, unsafe.Pointer(_az))
}
var Xsig crt.Xpthread_cond_t
@@ -392,30 +414,28 @@ func bool2int(b bool) int32 {
return 0
}
func bug20530(interface{}) {} //TODO remove when https://github.com/golang/go/issues/20530 is fixed.
-func i16(n int16) int16 { return n }
-func i32(n int32) int32 { return n }
-func i64(n int64) int64 { return n }
-func i8(n int8) int8 { return n }
func init() { nzf32 *= -1; nzf64 *= -1 }
-func u16(n uint16) uint16 { return n }
-func u32(n uint32) uint32 { return n }
-func u64(n uint64) uint64 { return n }
-func u8(n byte) byte { return n }
var inf = math.Inf(1)
-var nzf32 float32 // -0.0
-var nzf64 float64 // -0.0
-func postInc0(p *int32, d int32) int32 { v := *p; *p += d; return v }
-func store1(p **int8, v *int8) *int8 { *p = v; return v }
-func store0(p *int32, v int32) int32 { *p = v; return v }
+var nzf32 float32 // -0.0
+var nzf64 float64 // -0.0
+func elem0(a **int8, index uintptr) **int8 {
+ return (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem2(a *int8, index uintptr) *int8 {
+ return (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 1*index))
+}
+func postInc1(p *int32, d int32) int32 { v := *p; *p += d; return v }
+func store2(p **int8, v *int8) *int8 { *p = v; return v }
+func store1(p *int32, v int32) int32 { *p = v; return v }
type TQueryResult struct {
- X0 *int8
- X1 int32
- X2 int32
- X3 **int8
-} // t2 struct{*int8,int32,int32,**int8}
+ XzFile *int8
+ XnElem int32
+ XnAlloc int32
+ XazElem **int8
+} // t3 struct{zFile *int8,nElem int32,nAlloc int32,azElem **int8}
func str(n int) *int8 { return (*int8)(unsafe.Pointer(&strTab[n])) }
func wstr(n int) *int32 { return (*int32)(unsafe.Pointer(&strTab[n])) }
-var strTab = []byte("-v\x00testdb-%d\x00%d.testdb-%d\x00%s-journal\x00%s: START\x0a\x00%s: can't open\x0a\x00CREATE TABLE t%d(a,b,c);\x00INSERT INTO t%d VALUES(%d,%d,%d);\x00SELECT count(*) FROM t%d\x00tX size\x00100\x00SELECT avg(b) FROM t%d\x00tX avg\x00101\x00DELETE FROM t%d WHERE a>50\x00tX avg2\x0051\x00SELECT b, c FROM t%d WHERE a=%d\x00%d\x00readback\x00DROP TABLE t%d;\x00%s: END\x0a\x00BUSY %s #%d\x0a\x00EXEC %s: %s\x0a\x00DONE %s: %s\x0a\x00%s: command failed: %s - %s\x0a\x00QUERY %s: %s\x0a\x00DONE %s %s\x0a\x00%s: query failed: %s - %s\x0a\x00%s: malloc failed\x0a\x00%s\x00\x00%s: %s: bad result in column %d: %s\x0a\x00")
+var strTab = []byte("-v\x00testdb-%d\x00%d.testdb-%d\x00%s-journal\x00%s: START\x0a\x00%s: can't open\x0a\x00CREATE TABLE t%d(a,b,c);\x00INSERT INTO t%d VALUES(%d,%d,%d);\x00SELECT count(*) FROM t%d\x00tX size\x00100\x00SELECT avg(b) FROM t%d\x00tX avg\x00101.0\x00DELETE FROM t%d WHERE a>50\x00tX avg2\x0051.0\x00SELECT b, c FROM t%d WHERE a=%d\x00%d\x00readback\x00DROP TABLE t%d;\x00%s: END\x0a\x00BUSY %s #%d\x0a\x00EXEC %s: %s\x0a\x00DONE %s: %s\x0a\x00%s: command failed: %s - %s\x0a\x00QUERY %s: %s\x0a\x00DONE %s %s\x0a\x00%s: query failed: %s - %s\x0a\x00%s: malloc failed\x0a\x00%s\x00\x00%s: %s: bad result in column %d: %s\x0a\x00")
diff --git a/internal/threadtest2/threadtest2_linux_386.go b/internal/threadtest2/threadtest2_linux_386.go
index ff32ec0..71c7e9d 100644
--- a/internal/threadtest2/threadtest2_linux_386.go
+++ b/internal/threadtest2/threadtest2_linux_386.go
@@ -1,23 +1,23 @@
// Code generated by ccgo. DO NOT EDIT.
-// threadtest2.c
-
-// 2004 January 13
-//
-// 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 implements a simple standalone program used to test whether
-// or not the SQLite library is threadsafe.
-//
-// This file is NOT part of the standard SQLite library. It is used for
-// testing only.
-
+// threadtest2
+// /*
+// ** 2004 January 13
+// **
+// ** 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 implements a simple standalone program used to test whether
+// ** or not the SQLite library is threadsafe.
+// **
+// ** This file is NOT part of the standard SQLite library. It is used for
+// ** testing only.
+// */
package main
import (
@@ -55,84 +55,90 @@ var X__stdfiles [3]unsafe.Pointer
var Xstdout unsafe.Pointer
func init() {
- Xstdout = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
+ Xstdout = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
}
var Xstderr unsafe.Pointer
func init() {
- Xstderr = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
+ Xstderr = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
}
-// Initialize the database and start the threads
+// C comment
+// /*
+// ** Initialize the database and start the threads
+// */
func Xmain(tls *crt.TLS, _argc int32, _argv **int8) (r0 int32) {
var _i, _rc int32
var _1_zJournal *int8
var _db unsafe.Pointer
var _aThread [5]uint32
- r0 = i32(0)
+ r0 = int32(0)
if crt.Xstrcmp(tls, str(0), str(8)) != 0 {
_1_zJournal = bin.Xsqlite3_mprintf(tls, str(17), unsafe.Pointer(str(0)))
crt.Xunlink(tls, str(0))
crt.Xunlink(tls, _1_zJournal)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_1_zJournal))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_1_zJournal))
}
bin.Xsqlite3_open(tls, str(0), (**bin.Xsqlite3)(unsafe.Pointer(&_db)))
if _db == nil {
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(28))
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
_rc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_db), str(59), nil, nil, nil)
if _rc != 0 {
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(79), _rc)
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_db))
- _i = i32(0)
+ _i = int32(0)
_3:
- if uint32(_i) >= u32(5) {
+ if uint32(_i) >= uint32(5) {
goto _6
}
- crt.Xpthread_create(tls, (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aThread))+4*uintptr(_i))), nil, Xworker, (unsafe.Pointer)(uintptr(_i)))
+ crt.Xpthread_create(tls, elem0((*uint32)(unsafe.Pointer(&_aThread)), uintptr(_i)), nil, Xworker, crt.U2P(uintptr(_i)))
_i += 1
goto _3
_6:
- _i = i32(0)
+ _i = int32(0)
_7:
- if uint32(_i) >= u32(5) {
+ if uint32(_i) >= uint32(5) {
goto _10
}
- crt.Xpthread_join(tls, *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aThread)) + 4*uintptr(_i))), nil)
+ crt.Xpthread_join(tls, *elem0((*uint32)(unsafe.Pointer(&_aThread)), uintptr(_i)), nil)
_i += 1
goto _7
_10:
if Xall_stop == 0 {
crt.Xprintf(tls, str(107))
- return i32(0)
+ return int32(0)
}
crt.Xprintf(tls, str(129))
- return i32(1)
+ return int32(1)
_ = _aThread
panic(0)
}
-// This is the worker thread
+// C comment
+// /*
+// ** This is the worker thread
+// */
func Xworker(tls *crt.TLS, _workerArg unsafe.Pointer) (r0 unsafe.Pointer) {
var _id, _rc, _cnt int32
var _db unsafe.Pointer
- _id = int32(uintptr(_workerArg))
- _cnt = i32(0)
+ _id = int32(crt.P2U(_workerArg))
+ _cnt = int32(0)
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(147), _id)
_0:
- if Xall_stop != 0 || postInc0(&_cnt, int32(1)) >= i32(10000) {
+ if Xall_stop != 0 || postInc1(&_cnt, 1) >= int32(10000) {
goto _1
}
- if (_cnt % i32(100)) == i32(0) {
+ if (_cnt % int32(100)) == int32(0) {
crt.Xprintf(tls, str(167), _id, _cnt)
}
_3:
- if bin.Xsqlite3_open(tls, str(0), (**bin.Xsqlite3)(unsafe.Pointer(&_db))) != i32(0) {
+ if bin.Xsqlite3_open(tls, str(0), (**bin.Xsqlite3)(unsafe.Pointer(&_db))) != int32(0) {
crt.Xsched_yield(tls)
goto _3
}
@@ -152,6 +158,11 @@ _1:
panic(0)
}
+// C comment
+// /*
+// ** When this variable becomes non-zero, all threads stop
+// ** what they are doing.
+// */
var Xall_stop int32
func bool2int(b bool) int32 {
@@ -161,20 +172,15 @@ func bool2int(b bool) int32 {
return 0
}
func bug20530(interface{}) {} //TODO remove when https://github.com/golang/go/issues/20530 is fixed.
-func i16(n int16) int16 { return n }
-func i32(n int32) int32 { return n }
-func i64(n int64) int64 { return n }
-func i8(n int8) int8 { return n }
func init() { nzf32 *= -1; nzf64 *= -1 }
-func u16(n uint16) uint16 { return n }
-func u32(n uint32) uint32 { return n }
-func u64(n uint64) uint64 { return n }
-func u8(n byte) byte { return n }
var inf = math.Inf(1)
-var nzf32 float32 // -0.0
-var nzf64 float64 // -0.0
-func postInc0(p *int32, d int32) int32 { v := *p; *p += d; return v }
+var nzf32 float32 // -0.0
+var nzf64 float64 // -0.0
+func elem0(a *uint32, index uintptr) *uint32 {
+ return (*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func postInc1(p *int32, d int32) int32 { v := *p; *p += d; return v }
func str(n int) *int8 { return (*int8)(unsafe.Pointer(&strTab[n])) }
func wstr(n int) *int32 { return (*int32)(unsafe.Pointer(&strTab[n])) }
diff --git a/internal/threadtest3/threadtest3_linux_386.go b/internal/threadtest3/threadtest3_linux_386.go
index 58b71eb..c6ecb4c 100644
--- a/internal/threadtest3/threadtest3_linux_386.go
+++ b/internal/threadtest3/threadtest3_linux_386.go
@@ -1,41 +1,43 @@
// Code generated by ccgo. DO NOT EDIT.
-// threadtest3.c
-
-// 2010-07-22
-//
-// 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 code in this file runs a few multi-threaded test cases using the
-// SQLite library. It can be compiled to an executable on unix using the
-// following command:
-//
-// gcc -O2 threadtest3.c sqlite3.c -ldl -lpthread -lm
-//
-// Even though threadtest3.c is the only C source code file mentioned on
-// the compiler command-line, #include macros are used to pull in additional
-// C code files named "tt3_*.c".
-//
-// After compiling, run this program with an optional argument telling
-// which test to run. All tests are run if no argument is given. The
-// argument can be a glob pattern to match multiple tests. Examples:
-//
-// ./a.out -- Run all tests
-// ./a.out walthread3 -- Run the "walthread3" test
-// ./a.out 'wal*' -- Run all of the wal* tests
-// ./a.out --help -- List all available tests
-//
-// The exit status is non-zero if any test fails.
-
-// The "Set Error Line" macro.
-
+// threadtest3
+// /*
+// ** 2010-07-22
+// **
+// ** 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 code in this file runs a few multi-threaded test cases using the
+// ** SQLite library. It can be compiled to an executable on unix using the
+// ** following command:
+// **
+// ** gcc -O2 threadtest3.c sqlite3.c -ldl -lpthread -lm
+// **
+// ** Even though threadtest3.c is the only C source code file mentioned on
+// ** the compiler command-line, #include macros are used to pull in additional
+// ** C code files named "tt3_*.c".
+// **
+// ** After compiling, run this program with an optional argument telling
+// ** which test to run. All tests are run if no argument is given. The
+// ** argument can be a glob pattern to match multiple tests. Examples:
+// **
+// ** ./a.out -- Run all tests
+// ** ./a.out walthread3 -- Run the "walthread3" test
+// ** ./a.out 'wal*' -- Run all of the wal* tests
+// ** ./a.out --help -- List all available tests
+// **
+// ** The exit status is non-zero if any test fails.
+// */
+
+// /*
+// ** The "Set Error Line" macro.
+// */
package main
import (
@@ -73,85 +75,85 @@ var X__stdfiles [3]unsafe.Pointer
var Xstdout unsafe.Pointer
func init() {
- Xstdout = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
+ Xstdout = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
}
var Xstderr unsafe.Pointer
func init() {
- Xstderr = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
+ Xstderr = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
}
func Xmain(tls *crt.TLS, _argc int32, _argv **int8) (r0 int32) {
var _i, _iArg, _nTestfound, _4_rc int32
var _2_zArg, _9_z *int8
var _aTest [14]TThreadTest
- r0 = i32(0)
+ r0 = int32(0)
_aTest = [14]TThreadTest{}
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(0)))).X0))) = _walthread1
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(0)))).X1))) = str(0)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(0)))).X2))) = i32(20000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(1)))).X0))) = _walthread2
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(1)))).X1))) = str(11)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(1)))).X2))) = i32(20000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(2)))).X0))) = _walthread3
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(2)))).X1))) = str(22)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(2)))).X2))) = i32(20000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(3)))).X0))) = _walthread4
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(3)))).X1))) = str(33)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(3)))).X2))) = i32(20000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(4)))).X0))) = _walthread5
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(4)))).X1))) = str(44)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(4)))).X2))) = i32(1000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(5)))).X0))) = _cgt_pager_1
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(5)))).X1))) = str(55)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(5)))).X2))) = i32(0)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(6)))).X0))) = _dynamic_triggers
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(6)))).X1))) = str(67)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(6)))).X2))) = i32(20000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(7)))).X0))) = _checkpoint_starvation_1
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(7)))).X1))) = str(84)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(7)))).X2))) = i32(10000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(8)))).X0))) = _checkpoint_starvation_2
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(8)))).X1))) = str(108)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(8)))).X2))) = i32(10000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(9)))).X0))) = _create_drop_index_1
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(9)))).X1))) = str(132)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(9)))).X2))) = i32(10000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(10)))).X0))) = _lookaside1
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(10)))).X1))) = str(152)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(10)))).X2))) = i32(10000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(11)))).X0))) = _vacuum1
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(11)))).X1))) = str(163)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(11)))).X2))) = i32(10000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(12)))).X0))) = _stress1
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(12)))).X1))) = str(171)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(12)))).X2))) = i32(10000)
- *(*func(*crt.TLS, int32))(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(13)))).X0))) = _stress2
- *(**int8)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(13)))).X1))) = str(179)
- *(*int32)(unsafe.Pointer(&((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(i32(13)))).X2))) = i32(60000)
- _nTestfound = i32(0)
- bin.Xsqlite3_config(tls, i32(2))
- if _argc < i32(2) {
- _argc = i32(2)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), 0).XxTest = _walthread1
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), 0).XzTest = str(0)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), 0).XnMs = int32(20000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(1)).XxTest = _walthread2
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(1)).XzTest = str(11)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(1)).XnMs = int32(20000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(2)).XxTest = _walthread3
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(2)).XzTest = str(22)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(2)).XnMs = int32(20000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(3)).XxTest = _walthread4
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(3)).XzTest = str(33)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(3)).XnMs = int32(20000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(4)).XxTest = _walthread5
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(4)).XzTest = str(44)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(4)).XnMs = int32(1000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(5)).XxTest = _cgt_pager_1
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(5)).XzTest = str(55)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(5)).XnMs = int32(0)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(6)).XxTest = _dynamic_triggers
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(6)).XzTest = str(67)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(6)).XnMs = int32(20000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(7)).XxTest = _checkpoint_starvation_1
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(7)).XzTest = str(84)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(7)).XnMs = int32(10000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(8)).XxTest = _checkpoint_starvation_2
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(8)).XzTest = str(108)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(8)).XnMs = int32(10000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(9)).XxTest = _create_drop_index_1
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(9)).XzTest = str(132)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(9)).XnMs = int32(10000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(10)).XxTest = _lookaside1
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(10)).XzTest = str(152)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(10)).XnMs = int32(10000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(11)).XxTest = _vacuum1
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(11)).XzTest = str(163)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(11)).XnMs = int32(10000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(12)).XxTest = _stress1
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(12)).XzTest = str(171)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(12)).XnMs = int32(10000)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(13)).XxTest = _stress2
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(13)).XzTest = str(179)
+ elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(13)).XnMs = int32(60000)
+ _nTestfound = int32(0)
+ bin.Xsqlite3_config(tls, int32(2))
+ if _argc < int32(2) {
+ _argc = int32(2)
_argv = (**int8)(unsafe.Pointer(&_mainØ00substArgvØ001))
}
- _iArg = i32(1)
+ _iArg = int32(1)
_1:
if _iArg >= _argc {
goto _4
}
- _2_zArg = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_iArg)))
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_2_zArg)) + 1*uintptr(i32(0))))) != i32(45) {
+ _2_zArg = *elem1(_argv, uintptr(_iArg))
+ if int32(*elem2(_2_zArg, 0)) != int32(45) {
goto _5
}
- if bin.Xsqlite3_stricmp(tls, _2_zArg, str(187)) != i32(0) {
+ if bin.Xsqlite3_stricmp(tls, _2_zArg, str(187)) != int32(0) {
goto _6
}
- _4_rc = Xsqlite3_multiplex_initialize(tls, nil, i32(1))
- if _4_rc != i32(0) {
+ _4_rc = Xsqlite3_multiplex_initialize(tls, nil, int32(1))
+ if _4_rc != int32(0) {
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(200), _4_rc)
- return i32(253)
+ return int32(253)
}
goto _8
_6:
@@ -159,42 +161,42 @@ _6:
_8:
goto _2
_5:
- _i = i32(0)
+ _i = int32(0)
_9:
- if uint32(_i) >= u32(14) {
+ if uint32(_i) >= uint32(14) {
goto _12
}
- if bin.Xsqlite3_strglob(tls, _2_zArg, (*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest))+12*uintptr(_i))).X1) == i32(0) {
+ if bin.Xsqlite3_strglob(tls, _2_zArg, elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(_i)).XzTest) == int32(0) {
goto _12
}
_i += 1
goto _9
_12:
- if uint32(_i) >= u32(14) {
+ if uint32(_i) >= uint32(14) {
goto _usage
}
_2:
_iArg += 1
goto _1
_4:
- _iArg = i32(1)
+ _iArg = int32(1)
_15:
if _iArg >= _argc {
goto _18
}
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_iArg))))) + 1*uintptr(i32(0))))) == i32(45) {
+ if int32(*elem2(*elem1(_argv, uintptr(_iArg)), 0)) == int32(45) {
goto _16
}
- _i = i32(0)
+ _i = int32(0)
_20:
- if uint32(_i) >= u32(14) {
+ if uint32(_i) >= uint32(14) {
goto _23
}
- _9_z = (*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(_i))).X1
- if bin.Xsqlite3_strglob(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_iArg))), _9_z) == i32(0) {
- crt.Xprintf(tls, str(240), unsafe.Pointer(_9_z), ((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest))+12*uintptr(_i))).X2)/i32(1000))
+ _9_z = elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(_i)).XzTest
+ if bin.Xsqlite3_strglob(tls, *elem1(_argv, uintptr(_iArg)), _9_z) == int32(0) {
+ crt.Xprintf(tls, str(240), unsafe.Pointer(_9_z), (elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(_i)).XnMs)/int32(1000))
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
- ((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest)) + 12*uintptr(_i))).X0)(tls, (*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest))+12*uintptr(_i))).X2)
+ (elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(_i)).XxTest)(tls, elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(_i)).XnMs)
_nTestfound += 1
}
_i += 1
@@ -204,30 +206,30 @@ _16:
_iArg += 1
goto _15
_18:
- if _nTestfound == i32(0) {
+ if _nTestfound == int32(0) {
goto _usage
}
crt.Xprintf(tls, str(270), _nGlobalErr, _nTestfound)
return func() int32 {
- if _nGlobalErr > i32(0) {
- return i32(255)
+ if _nGlobalErr > int32(0) {
+ return int32(255)
}
- return i32(0)
+ return int32(0)
}()
_usage:
- crt.Xprintf(tls, str(297), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
+ crt.Xprintf(tls, str(297), unsafe.Pointer(*elem1(_argv, 0)))
crt.Xprintf(tls, str(349))
- _i = i32(0)
+ _i = int32(0)
_28:
- if uint32(_i) >= u32(14) {
+ if uint32(_i) >= uint32(14) {
goto _31
}
- crt.Xprintf(tls, str(371), unsafe.Pointer((*TThreadTest)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTest))+12*uintptr(_i))).X1))
+ crt.Xprintf(tls, str(371), unsafe.Pointer(elem0((*TThreadTest)(unsafe.Pointer(&_aTest)), uintptr(_i)).XzTest))
_i += 1
goto _28
_31:
- return i32(254)
+ return int32(254)
_ = _aTest
panic(0)
@@ -235,59 +237,59 @@ _31:
func _walthread1(tls *crt.TLS, _nMs int32) {
var _i int32
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(987)
+ return int32(987)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(988)
+ return int32(988)
}()
return &_err
}(), &_db, str(386))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(995)
+ return int32(995)
}()
return &_err
}(), &_db)
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(997)
+ return int32(997)
}()
return &_err
}(), _nMs)
- _i = i32(0)
+ _i = int32(0)
_8:
- if _i >= i32(10) {
+ if _i >= int32(10) {
goto _11
}
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(999)
+ return int32(999)
}()
return &_err
}(), &_threads, _walthread1_thread, nil)
@@ -295,85 +297,85 @@ _8:
goto _8
_11:
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1001)
+ return int32(1001)
}()
return &_err
}(), &_threads, _walthread1_ckpt_thread, nil)
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1002)
+ return int32(1002)
}()
return &_err
}(), &_threads)
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _opendb_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _zFile *int8, _bDelete int32) {
var _1_rc, _1_flags int32
- if (_pErr.X0) != i32(0) {
+ if _pErr.Xrc != int32(0) {
goto _0
}
- _1_flags = i32(70)
+ _1_flags = int32(70)
if _bDelete != 0 {
crt.Xunlink(tls, _zFile)
}
- _1_rc = bin.Xsqlite3_open_v2(tls, _zFile, (**bin.Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pDb.X0))))), _1_flags, nil)
+ _1_rc = bin.Xsqlite3_open_v2(tls, _zFile, (**bin.Xsqlite3)(unsafe.Pointer(&_pDb.Xdb)), _1_flags, nil)
if _1_rc != 0 {
_sqlite_error(tls, _pErr, _pDb, str(562))
- bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_pDb.X0))
- *(*unsafe.Pointer)(unsafe.Pointer(&(_pDb.X0))) = nil
+ bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_pDb.Xdb))
+ _pDb.Xdb = nil
goto _3
}
- bin.Xsqlite3_create_function(tls, (*bin.Xsqlite3)(_pDb.X0), str(567), i32(-1), i32(1), nil, *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{nil})), *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{_md5step})), *(*func(*crt.TLS, *bin.Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{_md5finalize})))
- bin.Xsqlite3_busy_handler(tls, (*bin.Xsqlite3)(_pDb.X0), _busyhandler, nil)
- bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_pDb.X0), str(574), nil, nil, nil)
+ bin.Xsqlite3_create_function(tls, (*bin.Xsqlite3)(_pDb.Xdb), str(567), int32(-1), int32(1), nil, nil, func() func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem) {
+ v := _md5step
+ return *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&v))
+ }(), func() func(*crt.TLS, *bin.Xsqlite3_context) {
+ v := _md5finalize
+ return *(*func(*crt.TLS, *bin.Xsqlite3_context))(unsafe.Pointer(&v))
+ }())
+ bin.Xsqlite3_busy_handler(tls, (*bin.Xsqlite3)(_pDb.Xdb), _busyhandler, nil)
+ bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_pDb.Xdb), str(574), nil, nil, nil)
_3:
_0:
}
func _sqlite_error(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _zFunc *int8) {
- *(*int32)(unsafe.Pointer(&(_pErr.X0))) = bin.Xsqlite3_errcode(tls, (*bin.Xsqlite3)(_pDb.X0))
- *(**int8)(unsafe.Pointer(&(_pErr.X2))) = bin.Xsqlite3_mprintf(tls, str(597), unsafe.Pointer(_zFunc), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_pDb.X0))), bin.Xsqlite3_extended_errcode(tls, (*bin.Xsqlite3)(_pDb.X0)))
+ _pErr.Xrc = bin.Xsqlite3_errcode(tls, (*bin.Xsqlite3)(_pDb.Xdb))
+ _pErr.XzErr = bin.Xsqlite3_mprintf(tls, str(597), unsafe.Pointer(_zFunc), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_pDb.Xdb))), bin.Xsqlite3_extended_errcode(tls, (*bin.Xsqlite3)(_pDb.Xdb)))
}
-// During testing, the special md5sum() aggregate function is available.
-// inside SQLite. The following routines implement that function.
+// C comment
+// /*
+// ** During testing, the special md5sum() aggregate function is available.
+// ** inside SQLite. The following routines implement that function.
+// */
func _md5step(tls *crt.TLS, _context unsafe.Pointer, _argc int32, _argv *unsafe.Pointer) {
var _i int32
var _2_zData *int8
var _p *XMD5Context
- if _argc < i32(1) {
+ if _argc < int32(1) {
return
}
- _p = (*XMD5Context)(bin.Xsqlite3_aggregate_context(tls, (*bin.Xsqlite3_context)(_context), int32(u32(92))))
+ _p = (*XMD5Context)(bin.Xsqlite3_aggregate_context(tls, (*bin.Xsqlite3_context)(_context), int32(92)))
if _p == nil {
return
}
- if (_p.X0) == 0 {
+ if _p.XisInit == 0 {
_MD5Init(tls, _p)
}
- _i = i32(0)
+ _i = int32(0)
_3:
if _i >= _argc {
goto _6
}
- _2_zData = (*int8)(unsafe.Pointer(bin.Xsqlite3_value_text(tls, (*bin.XMem)(*(*unsafe.Pointer)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))))))
+ _2_zData = (*int8)(unsafe.Pointer(bin.Xsqlite3_value_text(tls, (*bin.XMem)(*elem3(_argv, uintptr(_i))))))
if _2_zData != nil {
_MD5Update(tls, _p, (*uint8)(unsafe.Pointer(_2_zData)), crt.Xstrlen(tls, _2_zData))
}
@@ -382,1136 +384,602 @@ _3:
_6:
}
-// * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
-// * initialization constants.
+// C comment
+// /*
+// * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
+// * initialization constants.
+// */
func _MD5Init(tls *crt.TLS, _ctx *XMD5Context) {
- *(*int32)(unsafe.Pointer(&(_ctx.X0))) = i32(1)
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint32)(unsafe.Pointer(&(_ctx.X1))))) + 4*uintptr(i32(0)))) = uint32(i32(1732584193))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint32)(unsafe.Pointer(&(_ctx.X1))))) + 4*uintptr(i32(1)))) = u32(4023233417)
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint32)(unsafe.Pointer(&(_ctx.X1))))) + 4*uintptr(i32(2)))) = u32(2562383102)
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[4]uint32)(unsafe.Pointer(&(_ctx.X1))))) + 4*uintptr(i32(3)))) = uint32(i32(271733878))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_ctx.X2))))) + 4*uintptr(i32(0)))) = uint32(i32(0))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_ctx.X2))))) + 4*uintptr(i32(1)))) = uint32(i32(0))
-}
-
-// * Update context to reflect the concatenation of another buffer full
-// * of bytes.
+ _ctx.XisInit = int32(1)
+ *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbuf)), 0) = uint32(1732584193)
+ *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbuf)), uintptr(1)) = uint32(4023233417)
+ *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbuf)), uintptr(2)) = uint32(2562383102)
+ *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbuf)), uintptr(3)) = uint32(271733878)
+ *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbits)), 0) = 0
+ *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbits)), uintptr(1)) = 0
+}
+
+// C comment
+// /*
+// * Update context to reflect the concatenation of another buffer full
+// * of bytes.
+// */
func _MD5Update(tls *crt.TLS, _ctx *XMD5Context, _buf *uint8, _len uint32) {
var _t uint32
var _1_p *uint8
- _t = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_ctx.X2))))) + 4*uintptr(i32(0))))
- if store0((*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_ctx.X2)))))+4*uintptr(i32(0)))), _t+(_len<<uint(i32(3)))) < _t {
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_ctx.X2))))) + 4*uintptr(i32(1)))) += 1
+ _t = *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbits)), 0)
+ if store5(elem4((*uint32)(unsafe.Pointer(&_ctx.Xbits)), 0), _t+(_len<<3)) < _t {
+ *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbits)), uintptr(1)) += 1
}
- {
- p := (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_ctx.X2))))) + 4*uintptr(i32(1))))
- *p = (*p) + (_len >> uint(i32(29)))
- sink0(*p)
- }
- _t = (_t >> uint(i32(3))) & uint32(i32(63))
+ *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbits)), uintptr(1)) += _len >> 29
+ _t = (_t >> 3) & uint32(63)
if _t == 0 {
goto _1
}
- _1_p = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))))) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_t)))))))
- _t = uint32(i32(64)) - _t
+ _1_p = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))) + uintptr(_t)))
+ _t = uint32(64) - _t
if _len < _t {
- crt.Xmemcpy(tls, (unsafe.Pointer)(_1_p), (unsafe.Pointer)(_buf), _len)
+ crt.Xmemcpy(tls, unsafe.Pointer(_1_p), unsafe.Pointer(_buf), _len)
return
}
- crt.Xmemcpy(tls, (unsafe.Pointer)(_1_p), (unsafe.Pointer)(_buf), _t)
- _byteReverse(tls, (*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))), uint32(i32(16)))
- _MD5Transform(tls, (*[4]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*[4]uint32)(unsafe.Pointer(&(_ctx.X1))))))), (*[16]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))))))))
- {
- p := &_buf
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(_t)))
- sink2(*p)
- }
- {
- p := &_len
- *p = (*p) - _t
- sink0(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer(_1_p), unsafe.Pointer(_buf), _t)
+ _byteReverse(tls, (*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))), uint32(16))
+ _MD5Transform(tls, (*[4]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer(&_ctx.Xbuf)))), (*[16]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))))))))
+ *(*uintptr)(unsafe.Pointer(&_buf)) += uintptr(_t)
+ _len -= _t
_1:
- if _len >= uint32(i32(64)) {
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3)))))), (unsafe.Pointer)(_buf), uint32(i32(64)))
- _byteReverse(tls, (*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))), uint32(i32(16)))
- _MD5Transform(tls, (*[4]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*[4]uint32)(unsafe.Pointer(&(_ctx.X1))))))), (*[16]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))))))))
- {
- p := &_buf
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(64))))
- sink2(*p)
- }
- {
- p := &_len
- *p = (*p) - uint32(i32(64))
- sink0(*p)
- }
+ if _len >= uint32(64) {
+ crt.Xmemcpy(tls, unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu))), unsafe.Pointer(_buf), uint32(64))
+ _byteReverse(tls, (*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))), uint32(16))
+ _MD5Transform(tls, (*[4]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer(&_ctx.Xbuf)))), (*[16]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))))))))
+ *(*uintptr)(unsafe.Pointer(&_buf)) += uintptr(int32(64))
+ _len -= uint32(64)
goto _1
}
- crt.Xmemcpy(tls, (unsafe.Pointer)((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3)))))), (unsafe.Pointer)(_buf), _len)
+ crt.Xmemcpy(tls, unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu))), unsafe.Pointer(_buf), _len)
}
-// * Note: this code is harmless on little-endian machines.
+// C comment
+// /*
+// * Note: this code is harmless on little-endian machines.
+// */
func _byteReverse(tls *crt.TLS, _buf *uint8, _longs uint32) {
var _t uint32
_0:
- _t = (((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(3))))) << uint(i32(8))) | uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(2)))))) << uint(i32(16))) | ((uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(1))))) << uint(i32(8))) | uint32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 1*uintptr(i32(0))))))
+ _t = (((uint32(*elem6(_buf, uintptr(3))) << 8) | uint32(*elem6(_buf, uintptr(2)))) << 16) | ((uint32(*elem6(_buf, uintptr(1))) << 8) | uint32(*elem6(_buf, 0)))
*(*uint32)(unsafe.Pointer(_buf)) = _t
- {
- p := &_buf
- *p = (*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*p)) + 1*uintptr(i32(4))))
- sink2(*p)
- }
- if preInc0(&_longs, uint32(4294967295)) != 0 {
+ *(*uintptr)(unsafe.Pointer(&_buf)) += uintptr(int32(4))
+ if preInc5(&_longs, uint32(4294967295)) != 0 {
goto _0
}
}
-// * The core of the MD5 algorithm, this alters an existing MD5 hash to
-// * reflect the addition of 16 longwords of new data. MD5Update blocks
-// * the data and converts bytes into longwords for this routine.
+// C comment
+// /*
+// * The core of the MD5 algorithm, this alters an existing MD5 hash to
+// * reflect the addition of 16 longwords of new data. MD5Update blocks
+// * the data and converts bytes into longwords for this routine.
+// */
func _MD5Transform(tls *crt.TLS, _buf *[4]uint32, _in *[16]uint32) {
var _a, _b, _c, _d uint32
- _a = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 4*uintptr(i32(0))))
- _b = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 4*uintptr(i32(1))))
- _c = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 4*uintptr(i32(2))))
- _d = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 4*uintptr(i32(3))))
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_d ^ (_b & (_c ^ _d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(0)))))) + u32(3614090360))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(7))) | (_a >> uint(i32(25)))
+ _a = *elem4((*uint32)(unsafe.Pointer(_buf)), 0)
+ _b = *elem4((*uint32)(unsafe.Pointer(_buf)), uintptr(1))
+ _c = *elem4((*uint32)(unsafe.Pointer(_buf)), uintptr(2))
+ _d = *elem4((*uint32)(unsafe.Pointer(_buf)), uintptr(3))
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_d ^ (_b & (_c ^ _d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), 0))) + uint32(3614090360)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_c ^ (_a & (_b ^ _c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(1)))))) + u32(3905402710))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(12))) | (_d >> uint(i32(20)))
+ }() = (_a << 7) | (_a >> 25)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_c ^ (_a & (_b ^ _c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(1)))) + uint32(3905402710)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_b ^ (_d & (_a ^ _b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(2)))))) + uint32(i32(606105819)))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(17))) | (_c >> uint(i32(15)))
+ }() = (_d << 12) | (_d >> 20)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_b ^ (_d & (_a ^ _b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(2)))) + uint32(606105819)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_a ^ (_c & (_d ^ _a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(3)))))) + u32(3250441966))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(22))) | (_b >> uint(i32(10)))
+ }() = (_c << 17) | (_c >> 15)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_a ^ (_c & (_d ^ _a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(3)))) + uint32(3250441966)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_d ^ (_b & (_c ^ _d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(4)))))) + u32(4118548399))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(7))) | (_a >> uint(i32(25)))
+ }() = (_b << 22) | (_b >> 10)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_d ^ (_b & (_c ^ _d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(4)))) + uint32(4118548399)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_c ^ (_a & (_b ^ _c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(5)))))) + uint32(i32(1200080426)))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(12))) | (_d >> uint(i32(20)))
+ }() = (_a << 7) | (_a >> 25)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_c ^ (_a & (_b ^ _c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(5)))) + uint32(1200080426)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_b ^ (_d & (_a ^ _b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(6)))))) + u32(2821735955))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(17))) | (_c >> uint(i32(15)))
+ }() = (_d << 12) | (_d >> 20)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_b ^ (_d & (_a ^ _b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(6)))) + uint32(2821735955)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_a ^ (_c & (_d ^ _a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(7)))))) + u32(4249261313))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(22))) | (_b >> uint(i32(10)))
+ }() = (_c << 17) | (_c >> 15)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_a ^ (_c & (_d ^ _a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(7)))) + uint32(4249261313)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_d ^ (_b & (_c ^ _d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(8)))))) + uint32(i32(1770035416)))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(7))) | (_a >> uint(i32(25)))
+ }() = (_b << 22) | (_b >> 10)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_d ^ (_b & (_c ^ _d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(8)))) + uint32(1770035416)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_c ^ (_a & (_b ^ _c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(9)))))) + u32(2336552879))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(12))) | (_d >> uint(i32(20)))
+ }() = (_a << 7) | (_a >> 25)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_c ^ (_a & (_b ^ _c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(9)))) + uint32(2336552879)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_b ^ (_d & (_a ^ _b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(10)))))) + u32(4294925233))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(17))) | (_c >> uint(i32(15)))
+ }() = (_d << 12) | (_d >> 20)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_b ^ (_d & (_a ^ _b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(10)))) + uint32(4294925233)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_a ^ (_c & (_d ^ _a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(11)))))) + u32(2304563134))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(22))) | (_b >> uint(i32(10)))
+ }() = (_c << 17) | (_c >> 15)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_a ^ (_c & (_d ^ _a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(11)))) + uint32(2304563134)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_d ^ (_b & (_c ^ _d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(12)))))) + uint32(i32(1804603682)))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(7))) | (_a >> uint(i32(25)))
+ }() = (_b << 22) | (_b >> 10)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_d ^ (_b & (_c ^ _d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(12)))) + uint32(1804603682)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_c ^ (_a & (_b ^ _c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(13)))))) + u32(4254626195))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(12))) | (_d >> uint(i32(20)))
+ }() = (_a << 7) | (_a >> 25)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_c ^ (_a & (_b ^ _c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(13)))) + uint32(4254626195)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_b ^ (_d & (_a ^ _b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(14)))))) + u32(2792965006))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(17))) | (_c >> uint(i32(15)))
+ }() = (_d << 12) | (_d >> 20)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_b ^ (_d & (_a ^ _b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(14)))) + uint32(2792965006)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_a ^ (_c & (_d ^ _a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(15)))))) + uint32(i32(1236535329)))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(22))) | (_b >> uint(i32(10)))
+ }() = (_c << 17) | (_c >> 15)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_a ^ (_c & (_d ^ _a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(15)))) + uint32(1236535329)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_c ^ (_d & (_b ^ _c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(1)))))) + u32(4129170786))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(5))) | (_a >> uint(i32(27)))
+ }() = (_b << 22) | (_b >> 10)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_c ^ (_d & (_b ^ _c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(1)))) + uint32(4129170786)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_b ^ (_c & (_a ^ _b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(6)))))) + u32(3225465664))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(9))) | (_d >> uint(i32(23)))
+ }() = (_a << 5) | (_a >> 27)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_b ^ (_c & (_a ^ _b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(6)))) + uint32(3225465664)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_a ^ (_b & (_d ^ _a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(11)))))) + uint32(i32(643717713)))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(14))) | (_c >> uint(i32(18)))
+ }() = (_d << 9) | (_d >> 23)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_a ^ (_b & (_d ^ _a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(11)))) + uint32(643717713)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_d ^ (_a & (_c ^ _d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(0)))))) + u32(3921069994))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(20))) | (_b >> uint(i32(12)))
+ }() = (_c << 14) | (_c >> 18)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_d ^ (_a & (_c ^ _d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), 0))) + uint32(3921069994)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_c ^ (_d & (_b ^ _c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(5)))))) + u32(3593408605))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(5))) | (_a >> uint(i32(27)))
+ }() = (_b << 20) | (_b >> 12)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_c ^ (_d & (_b ^ _c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(5)))) + uint32(3593408605)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_b ^ (_c & (_a ^ _b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(10)))))) + uint32(i32(38016083)))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(9))) | (_d >> uint(i32(23)))
+ }() = (_a << 5) | (_a >> 27)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_b ^ (_c & (_a ^ _b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(10)))) + uint32(38016083)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_a ^ (_b & (_d ^ _a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(15)))))) + u32(3634488961))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(14))) | (_c >> uint(i32(18)))
+ }() = (_d << 9) | (_d >> 23)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_a ^ (_b & (_d ^ _a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(15)))) + uint32(3634488961)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_d ^ (_a & (_c ^ _d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(4)))))) + u32(3889429448))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(20))) | (_b >> uint(i32(12)))
+ }() = (_c << 14) | (_c >> 18)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_d ^ (_a & (_c ^ _d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(4)))) + uint32(3889429448)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_c ^ (_d & (_b ^ _c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(9)))))) + uint32(i32(568446438)))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(5))) | (_a >> uint(i32(27)))
+ }() = (_b << 20) | (_b >> 12)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_c ^ (_d & (_b ^ _c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(9)))) + uint32(568446438)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_b ^ (_c & (_a ^ _b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(14)))))) + u32(3275163606))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(9))) | (_d >> uint(i32(23)))
+ }() = (_a << 5) | (_a >> 27)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_b ^ (_c & (_a ^ _b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(14)))) + uint32(3275163606)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_a ^ (_b & (_d ^ _a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(3)))))) + u32(4107603335))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(14))) | (_c >> uint(i32(18)))
+ }() = (_d << 9) | (_d >> 23)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_a ^ (_b & (_d ^ _a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(3)))) + uint32(4107603335)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_d ^ (_a & (_c ^ _d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(8)))))) + uint32(i32(1163531501)))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(20))) | (_b >> uint(i32(12)))
+ }() = (_c << 14) | (_c >> 18)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_d ^ (_a & (_c ^ _d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(8)))) + uint32(1163531501)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_c ^ (_d & (_b ^ _c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(13)))))) + u32(2850285829))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(5))) | (_a >> uint(i32(27)))
+ }() = (_b << 20) | (_b >> 12)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_c ^ (_d & (_b ^ _c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(13)))) + uint32(2850285829)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_b ^ (_c & (_a ^ _b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(2)))))) + u32(4243563512))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(9))) | (_d >> uint(i32(23)))
+ }() = (_a << 5) | (_a >> 27)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_b ^ (_c & (_a ^ _b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(2)))) + uint32(4243563512)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_a ^ (_b & (_d ^ _a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(7)))))) + uint32(i32(1735328473)))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(14))) | (_c >> uint(i32(18)))
+ }() = (_d << 9) | (_d >> 23)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_a ^ (_b & (_d ^ _a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(7)))) + uint32(1735328473)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_d ^ (_a & (_c ^ _d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(12)))))) + u32(2368359562))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(20))) | (_b >> uint(i32(12)))
+ }() = (_c << 14) | (_c >> 18)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_d ^ (_a & (_c ^ _d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(12)))) + uint32(2368359562)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + ((((_b ^ _c) ^ _d) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(5)))))) + u32(4294588738))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(4))) | (_a >> uint(i32(28)))
+ }() = (_b << 20) | (_b >> 12)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += (((_b ^ _c) ^ _d) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(5)))) + uint32(4294588738)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + ((((_a ^ _b) ^ _c) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(8)))))) + u32(2272392833))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(11))) | (_d >> uint(i32(21)))
+ }() = (_a << 4) | (_a >> 28)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += (((_a ^ _b) ^ _c) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(8)))) + uint32(2272392833)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + ((((_d ^ _a) ^ _b) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(11)))))) + uint32(i32(1839030562)))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(16))) | (_c >> uint(i32(16)))
+ }() = (_d << 11) | (_d >> 21)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += (((_d ^ _a) ^ _b) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(11)))) + uint32(1839030562)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + ((((_c ^ _d) ^ _a) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(14)))))) + u32(4259657740))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(23))) | (_b >> uint(i32(9)))
+ }() = (_c << 16) | (_c >> 16)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += (((_c ^ _d) ^ _a) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(14)))) + uint32(4259657740)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + ((((_b ^ _c) ^ _d) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(1)))))) + u32(2763975236))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(4))) | (_a >> uint(i32(28)))
+ }() = (_b << 23) | (_b >> 9)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += (((_b ^ _c) ^ _d) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(1)))) + uint32(2763975236)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + ((((_a ^ _b) ^ _c) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(4)))))) + uint32(i32(1272893353)))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(11))) | (_d >> uint(i32(21)))
+ }() = (_a << 4) | (_a >> 28)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += (((_a ^ _b) ^ _c) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(4)))) + uint32(1272893353)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + ((((_d ^ _a) ^ _b) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(7)))))) + u32(4139469664))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(16))) | (_c >> uint(i32(16)))
+ }() = (_d << 11) | (_d >> 21)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += (((_d ^ _a) ^ _b) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(7)))) + uint32(4139469664)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + ((((_c ^ _d) ^ _a) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(10)))))) + u32(3200236656))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(23))) | (_b >> uint(i32(9)))
+ }() = (_c << 16) | (_c >> 16)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += (((_c ^ _d) ^ _a) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(10)))) + uint32(3200236656)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + ((((_b ^ _c) ^ _d) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(13)))))) + uint32(i32(681279174)))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(4))) | (_a >> uint(i32(28)))
+ }() = (_b << 23) | (_b >> 9)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += (((_b ^ _c) ^ _d) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(13)))) + uint32(681279174)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + ((((_a ^ _b) ^ _c) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(0)))))) + u32(3936430074))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(11))) | (_d >> uint(i32(21)))
+ }() = (_a << 4) | (_a >> 28)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += (((_a ^ _b) ^ _c) + (*elem4((*uint32)(unsafe.Pointer(_in)), 0))) + uint32(3936430074)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + ((((_d ^ _a) ^ _b) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(3)))))) + u32(3572445317))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(16))) | (_c >> uint(i32(16)))
+ }() = (_d << 11) | (_d >> 21)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += (((_d ^ _a) ^ _b) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(3)))) + uint32(3572445317)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + ((((_c ^ _d) ^ _a) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(6)))))) + uint32(i32(76029189)))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(23))) | (_b >> uint(i32(9)))
+ }() = (_c << 16) | (_c >> 16)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += (((_c ^ _d) ^ _a) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(6)))) + uint32(76029189)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + ((((_b ^ _c) ^ _d) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(9)))))) + u32(3654602809))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(4))) | (_a >> uint(i32(28)))
+ }() = (_b << 23) | (_b >> 9)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += (((_b ^ _c) ^ _d) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(9)))) + uint32(3654602809)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + ((((_a ^ _b) ^ _c) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(12)))))) + u32(3873151461))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(11))) | (_d >> uint(i32(21)))
+ }() = (_a << 4) | (_a >> 28)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += (((_a ^ _b) ^ _c) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(12)))) + uint32(3873151461)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + ((((_d ^ _a) ^ _b) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(15)))))) + uint32(i32(530742520)))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(16))) | (_c >> uint(i32(16)))
+ }() = (_d << 11) | (_d >> 21)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += (((_d ^ _a) ^ _b) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(15)))) + uint32(530742520)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + ((((_c ^ _d) ^ _a) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(2)))))) + u32(3299628645))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(23))) | (_b >> uint(i32(9)))
+ }() = (_c << 16) | (_c >> 16)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += (((_c ^ _d) ^ _a) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(2)))) + uint32(3299628645)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_c ^ (_b | (^_d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(0)))))) + u32(4096336452))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(6))) | (_a >> uint(i32(26)))
+ }() = (_b << 23) | (_b >> 9)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_c ^ (_b | (^_d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), 0))) + uint32(4096336452)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_b ^ (_a | (^_c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(7)))))) + uint32(i32(1126891415)))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(10))) | (_d >> uint(i32(22)))
+ }() = (_a << 6) | (_a >> 26)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_b ^ (_a | (^_c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(7)))) + uint32(1126891415)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_a ^ (_d | (^_b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(14)))))) + u32(2878612391))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(15))) | (_c >> uint(i32(17)))
+ }() = (_d << 10) | (_d >> 22)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_a ^ (_d | (^_b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(14)))) + uint32(2878612391)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_d ^ (_c | (^_a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(5)))))) + u32(4237533241))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(21))) | (_b >> uint(i32(11)))
+ }() = (_c << 15) | (_c >> 17)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_d ^ (_c | (^_a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(5)))) + uint32(4237533241)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_c ^ (_b | (^_d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(12)))))) + uint32(i32(1700485571)))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(6))) | (_a >> uint(i32(26)))
+ }() = (_b << 21) | (_b >> 11)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_c ^ (_b | (^_d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(12)))) + uint32(1700485571)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_b ^ (_a | (^_c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(3)))))) + u32(2399980690))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(10))) | (_d >> uint(i32(22)))
+ }() = (_a << 6) | (_a >> 26)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_b ^ (_a | (^_c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(3)))) + uint32(2399980690)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_a ^ (_d | (^_b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(10)))))) + u32(4293915773))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(15))) | (_c >> uint(i32(17)))
+ }() = (_d << 10) | (_d >> 22)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_a ^ (_d | (^_b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(10)))) + uint32(4293915773)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_d ^ (_c | (^_a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(1)))))) + u32(2240044497))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(21))) | (_b >> uint(i32(11)))
+ }() = (_c << 15) | (_c >> 17)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_d ^ (_c | (^_a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(1)))) + uint32(2240044497)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_c ^ (_b | (^_d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(8)))))) + uint32(i32(1873313359)))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(6))) | (_a >> uint(i32(26)))
+ }() = (_b << 21) | (_b >> 11)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_c ^ (_b | (^_d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(8)))) + uint32(1873313359)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_b ^ (_a | (^_c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(15)))))) + u32(4264355552))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(10))) | (_d >> uint(i32(22)))
+ }() = (_a << 6) | (_a >> 26)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_b ^ (_a | (^_c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(15)))) + uint32(4264355552)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_a ^ (_d | (^_b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(6)))))) + u32(2734768916))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(15))) | (_c >> uint(i32(17)))
+ }() = (_d << 10) | (_d >> 22)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_a ^ (_d | (^_b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(6)))) + uint32(2734768916)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_d ^ (_c | (^_a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(13)))))) + uint32(i32(1309151649)))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(21))) | (_b >> uint(i32(11)))
+ }() = (_c << 15) | (_c >> 17)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_d ^ (_c | (^_a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(13)))) + uint32(1309151649)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_a
- *p = (*p) + (((_c ^ (_b | (^_d))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(4)))))) + u32(4149444226))
- sink0(*p)
- }
- return &_a
- }() = (_a << uint(i32(6))) | (_a >> uint(i32(26)))
+ }() = (_b << 21) | (_b >> 11)
+ return &_b
+ }() += _c
+ *func() *uint32 {
+ *func() *uint32 {
+ _a += ((_c ^ (_b | (^_d))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(4)))) + uint32(4149444226)
return &_a
- }()
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_d
- *p = (*p) + (((_b ^ (_a | (^_c))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(11)))))) + u32(3174756917))
- sink0(*p)
- }
- return &_d
- }() = (_d << uint(i32(10))) | (_d >> uint(i32(22)))
+ }() = (_a << 6) | (_a >> 26)
+ return &_a
+ }() += _b
+ *func() *uint32 {
+ *func() *uint32 {
+ _d += ((_b ^ (_a | (^_c))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(11)))) + uint32(3174756917)
return &_d
- }()
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_c
- *p = (*p) + (((_a ^ (_d | (^_b))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(2)))))) + uint32(i32(718787259)))
- sink0(*p)
- }
- return &_c
- }() = (_c << uint(i32(15))) | (_c >> uint(i32(17)))
+ }() = (_d << 10) | (_d >> 22)
+ return &_d
+ }() += _a
+ *func() *uint32 {
+ *func() *uint32 {
+ _c += ((_a ^ (_d | (^_b))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(2)))) + uint32(718787259)
return &_c
- }()
- *p = (*p) + _d
- sink0(*p)
- }
- {
- p := func() *uint32 {
- *func() *uint32 {
- {
- p := &_b
- *p = (*p) + (((_d ^ (_c | (^_a))) + (*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_in)) + 4*uintptr(i32(9)))))) + u32(3951481745))
- sink0(*p)
- }
- return &_b
- }() = (_b << uint(i32(21))) | (_b >> uint(i32(11)))
+ }() = (_c << 15) | (_c >> 17)
+ return &_c
+ }() += _d
+ *func() *uint32 {
+ *func() *uint32 {
+ _b += ((_d ^ (_c | (^_a))) + (*elem4((*uint32)(unsafe.Pointer(_in)), uintptr(9)))) + uint32(3951481745)
return &_b
- }()
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 4*uintptr(i32(0))))
- *p = (*p) + _a
- sink0(*p)
- }
- {
- p := (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 4*uintptr(i32(1))))
- *p = (*p) + _b
- sink0(*p)
- }
- {
- p := (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 4*uintptr(i32(2))))
- *p = (*p) + _c
- sink0(*p)
- }
- {
- p := (*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)(_buf)) + 4*uintptr(i32(3))))
- *p = (*p) + _d
- sink0(*p)
- }
+ }() = (_b << 21) | (_b >> 11)
+ return &_b
+ }() += _c
+ *elem4((*uint32)(unsafe.Pointer(_buf)), 0) += _a
+ *elem4((*uint32)(unsafe.Pointer(_buf)), uintptr(1)) += _b
+ *elem4((*uint32)(unsafe.Pointer(_buf)), uintptr(2)) += _c
+ *elem4((*uint32)(unsafe.Pointer(_buf)), uintptr(3)) += _d
}
func _md5finalize(tls *crt.TLS, _context unsafe.Pointer) {
var _zBuf [33]int8
var _digest [16]uint8
var _p *XMD5Context
- _p = (*XMD5Context)(bin.Xsqlite3_aggregate_context(tls, (*bin.Xsqlite3_context)(_context), int32(u32(92))))
+ _p = (*XMD5Context)(bin.Xsqlite3_aggregate_context(tls, (*bin.Xsqlite3_context)(_context), int32(92)))
_MD5Final(tls, (*[16]uint8)(unsafe.Pointer((*uint8)(unsafe.Pointer(&_digest)))), _p)
_MD5DigestToBase16(tls, (*uint8)(unsafe.Pointer(&_digest)), (*int8)(unsafe.Pointer(&_zBuf)))
- bin.Xsqlite3_result_text(tls, (*bin.Xsqlite3_context)(_context), (*int8)(unsafe.Pointer(&_zBuf)), i32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
+ bin.Xsqlite3_result_text(tls, (*bin.Xsqlite3_context)(_context), (*int8)(unsafe.Pointer(&_zBuf)), int32(-1), *(*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&struct{ f uintptr }{4294967295})))
_ = _digest
_ = _zBuf
}
-// * Final wrapup - pad to 64-byte boundary with the bit pattern
-// * 1 0* (64-bit count of bits processed, MSB-first)
+// C comment
+// /*
+// * Final wrapup - pad to 64-byte boundary with the bit pattern
+// * 1 0* (64-bit count of bits processed, MSB-first)
+// */
func _MD5Final(tls *crt.TLS, _digest *[16]uint8, _ctx *XMD5Context) {
var _count uint32
var _p *uint8
- _count = ((*(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_ctx.X2))))) + 4*uintptr(i32(0))))) >> uint(i32(3))) & uint32(i32(63))
- _p = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))))) + uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(_count)))))))
- *postInc2(&_p, 1) = uint8(i32(128))
- _count = uint32(i32(63)) - _count
- if _count < uint32(i32(8)) {
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), _count)
- _byteReverse(tls, (*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))), uint32(i32(16)))
- _MD5Transform(tls, (*[4]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*[4]uint32)(unsafe.Pointer(&(_ctx.X1))))))), (*[16]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))))))))
- crt.Xmemset(tls, (unsafe.Pointer)((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3)))))), i32(0), uint32(i32(56)))
+ _count = ((*elem4((*uint32)(unsafe.Pointer(&_ctx.Xbits)), 0)) >> 3) & uint32(63)
+ _p = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))) + uintptr(_count)))
+ *postInc6(&_p, 1) = uint8(128)
+ _count = uint32(63) - _count
+ if _count < uint32(8) {
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), _count)
+ _byteReverse(tls, (*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))), uint32(16))
+ _MD5Transform(tls, (*[4]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer(&_ctx.Xbuf)))), (*[16]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))))))))
+ crt.Xmemset(tls, unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu))), int32(0), uint32(56))
goto _1
}
- crt.Xmemset(tls, (unsafe.Pointer)(_p), i32(0), _count-uint32(i32(8)))
+ crt.Xmemset(tls, unsafe.Pointer(_p), int32(0), _count-uint32(8))
_1:
- _byteReverse(tls, (*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))), uint32(i32(14)))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[16]uint32)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))) + 4*uintptr(i32(14)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_ctx.X2))))) + 4*uintptr(i32(0))))
- *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[16]uint32)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))) + 4*uintptr(i32(15)))) = *(*uint32)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[2]uint32)(unsafe.Pointer(&(_ctx.X2))))) + 4*uintptr(i32(1))))
- _MD5Transform(tls, (*[4]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*[4]uint32)(unsafe.Pointer(&(_ctx.X1))))))), (*[16]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer((*t1)(unsafe.Pointer(&(_ctx.X3))))))))))))
- _byteReverse(tls, (*uint8)(unsafe.Pointer((*uint32)(unsafe.Pointer((*[4]uint32)(unsafe.Pointer(&(_ctx.X1))))))), uint32(i32(4)))
- crt.Xmemcpy(tls, (unsafe.Pointer)(_digest), (unsafe.Pointer)((*[4]uint32)(unsafe.Pointer(&(_ctx.X1)))), uint32(i32(16)))
- crt.Xmemset(tls, (unsafe.Pointer)(_ctx), i32(0), u32(92))
-}
-
-// Convert a 128-bit MD5 digest into a 32-digit base-16 number.
+ _byteReverse(tls, (*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))), uint32(14))
+ *elem4((*uint32)(unsafe.Pointer((*[16]uint32)(unsafe.Pointer(&_ctx.Xu)))), uintptr(14)) = *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbits)), 0)
+ *elem4((*uint32)(unsafe.Pointer((*[16]uint32)(unsafe.Pointer(&_ctx.Xu)))), uintptr(15)) = *elem4((*uint32)(unsafe.Pointer(&_ctx.Xbits)), uintptr(1))
+ _MD5Transform(tls, (*[4]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer(&_ctx.Xbuf)))), (*[16]uint32)(unsafe.Pointer((*uint32)(unsafe.Pointer((*uint8)(unsafe.Pointer((*[64]uint8)(unsafe.Pointer(&_ctx.Xu)))))))))
+ _byteReverse(tls, (*uint8)(unsafe.Pointer((*uint32)(unsafe.Pointer(&_ctx.Xbuf)))), uint32(4))
+ crt.Xmemcpy(tls, unsafe.Pointer(_digest), unsafe.Pointer(&_ctx.Xbuf), uint32(16))
+ crt.Xmemset(tls, unsafe.Pointer(_ctx), int32(0), uint32(92))
+}
+
+// C comment
+// /*
+// ** Convert a 128-bit MD5 digest into a 32-digit base-16 number.
+// */
func _MD5DigestToBase16(tls *crt.TLS, _digest *uint8, _zBuf *int8) {
var _i, _j, _1_a int32
- _j = store3(&_i, i32(0))
+ _j = store7(&_i, int32(0))
_0:
- if _i >= i32(16) {
+ if _i >= int32(16) {
goto _3
}
- _1_a = int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_digest)) + 1*uintptr(_i))))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(postInc3(&_j, int32(1))))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_MD5DigestToBase16Ø00zEncodeØ001)) + 1*uintptr((_1_a>>uint(i32(4)))&i32(15))))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(postInc3(&_j, int32(1))))) = *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_MD5DigestToBase16Ø00zEncodeØ001)) + 1*uintptr(_1_a&i32(15))))
+ _1_a = int32(*elem6(_digest, uintptr(_i)))
+ *elem2(_zBuf, uintptr(postInc7(&_j, 1))) = *elem2((*int8)(unsafe.Pointer(&_MD5DigestToBase16Ø00zEncodeØ001)), uintptr((_1_a>>4)&int32(15)))
+ *elem2(_zBuf, uintptr(postInc7(&_j, 1))) = *elem2((*int8)(unsafe.Pointer(&_MD5DigestToBase16Ø00zEncodeØ001)), uintptr(_1_a&int32(15)))
_i += 1
goto _0
_3:
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zBuf)) + 1*uintptr(_j))) = int8(i32(0))
+ *elem2(_zBuf, uintptr(_j)) = 0
}
var _MD5DigestToBase16Ø00zEncodeØ001 [17]int8
@@ -1521,50 +989,50 @@ func init() {
}
func _busyhandler(tls *crt.TLS, _pArg unsafe.Pointer, _n int32) (r0 int32) {
- crt.Xusleep(tls, uint32(i32(10000)))
- return i32(1)
+ crt.Xusleep(tls, uint32(10000))
+ return int32(1)
}
func _sql_script_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _zSql *int8) {
- if (_pErr.X0) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_pErr.X0))) = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_pDb.X0), _zSql, nil, nil, (**int8)(unsafe.Pointer(&(_pErr.X2))))
+ if _pErr.Xrc == int32(0) {
+ _pErr.Xrc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_pDb.Xdb), _zSql, nil, nil, &_pErr.XzErr)
}
}
func _closedb_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite) {
var _rc, _i int32
- var _pIter, _pNext *bin.Xsqlite3_pcache_page
- _pIter = (*bin.Xsqlite3_pcache_page)(_pDb.X1)
+ var _pIter, _pNext *XStatement
+ _pIter = (*XStatement)(_pDb.XpCache)
_0:
if _pIter == nil {
goto _3
}
- _pNext = (*bin.Xsqlite3_pcache_page)(_pIter.X1)
- bin.Xsqlite3_finalize(tls, _pIter.X0)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_pIter))
+ _pNext = (*XStatement)(_pIter.XpNext)
+ bin.Xsqlite3_finalize(tls, _pIter.XpStmt)
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_pIter))
_pIter = _pNext
goto _0
_3:
- _i = i32(0)
+ _i = int32(0)
_4:
- if _i >= (_pDb.X2) {
+ if _i >= _pDb.XnText {
goto _7
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pDb.X3)) + 4*uintptr(_i)))))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(*elem1(_pDb.XaText, uintptr(_i))))
_i += 1
goto _4
_7:
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_pDb.X3))
- _rc = bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_pDb.X0))
- if _rc != 0 && ((_pErr.X0) == i32(0)) {
- *(**int8)(unsafe.Pointer(&(_pErr.X2))) = bin.Xsqlite3_mprintf(tls, str(637), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_pDb.X0))))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_pDb.XaText))
+ _rc = bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_pDb.Xdb))
+ if _rc != 0 && (_pErr.Xrc == int32(0)) {
+ _pErr.XzErr = bin.Xsqlite3_mprintf(tls, str(637), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_pDb.Xdb))))
}
- crt.Xmemset(tls, (unsafe.Pointer)(_pDb), i32(0), u32(16))
+ crt.Xmemset(tls, unsafe.Pointer(_pDb), int32(0), uint32(16))
}
func _setstoptime_x(tls *crt.TLS, _pErr *XError, _nMs int32) {
var _1_t float64
- if (_pErr.X0) == i32(0) {
+ if _pErr.Xrc == int32(0) {
_1_t = _currentTime(tls)
_timelimit = _1_t + (float64(_nMs) / (8.64e+07))
bug20530(_timelimit)
@@ -1578,50 +1046,53 @@ func _currentTime(tls *crt.TLS) (r0 float64) {
_currentTimeØ00pTimelimitVfsØ001 = bin.Xsqlite3_vfs_find(tls, nil)
bug20530(_currentTimeØ00pTimelimitVfsØ001)
}
- if ((_currentTimeØ00pTimelimitVfsØ001.X0) >= i32(2)) && (*(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32
- }{(*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{(_currentTimeØ00pTimelimitVfsØ001.X18)})))})) != *(*unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32
- }{nil}))) {
- (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{(_currentTimeØ00pTimelimitVfsØ001.X18)})))(tls, _currentTimeØ00pTimelimitVfsØ001, &_1_tm)
+ if (_currentTimeØ00pTimelimitVfsØ001.XiVersion >= int32(2)) && (func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32 {
+ v := _currentTimeØ00pTimelimitVfsØ001.XxCurrentTimeInt64
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&v))
+ }() != nil) {
+ func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32 {
+ v := _currentTimeØ00pTimelimitVfsØ001.XxCurrentTimeInt64
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _currentTimeØ00pTimelimitVfsØ001, &_1_tm)
_t = float64(_1_tm) / (8.64e+07)
goto _3
}
- (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *float64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *float64) int32
- }{(_currentTimeØ00pTimelimitVfsØ001.X16)})))(tls, _currentTimeØ00pTimelimitVfsØ001, &_t)
+ func() func(*crt.TLS, *bin.Xsqlite3_vfs, *float64) int32 {
+ v := _currentTimeØ00pTimelimitVfsØ001.XxCurrentTime
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *float64) int32)(unsafe.Pointer(&v))
+ }()(tls, _currentTimeØ00pTimelimitVfsØ001, &_t)
_3:
return _t
}
var _currentTimeØ00pTimelimitVfsØ001 *bin.Xsqlite3_vfs
+// C comment
+// /*
+// ** Used by setstoptime() and timetostop().
+// */
var _timelimit float64
-func _launch_thread_x(tls *crt.TLS, _pErr *XError, _pThreads *bin.T_ht, _xProc func(*crt.TLS, int32, unsafe.Pointer) *int8, _pArg unsafe.Pointer) {
+func _launch_thread_x(tls *crt.TLS, _pErr *XError, _pThreads *XThreadset, _xProc func(*crt.TLS, int32, unsafe.Pointer) *int8, _pArg unsafe.Pointer) {
var _1_iTid, _1_rc int32
var _1_p *XThread
- if (_pErr.X0) != i32(0) {
+ if _pErr.Xrc != int32(0) {
goto _0
}
- _1_iTid = preInc3((*int32)(unsafe.Pointer(&(_pThreads.X0))), 1)
- _1_p = (*XThread)(bin.Xsqlite3_malloc(tls, int32(u32(20))))
- crt.Xmemset(tls, (unsafe.Pointer)(_1_p), i32(0), u32(20))
- *(*int32)(unsafe.Pointer(&(_1_p.X0))) = _1_iTid
- *(*unsafe.Pointer)(unsafe.Pointer(&(_1_p.X1))) = _pArg
- *(*func(*crt.TLS, int32, unsafe.Pointer) *int8)(unsafe.Pointer(&(_1_p.X3))) = _xProc
- _1_rc = crt.Xpthread_create(tls, (*uint32)(unsafe.Pointer(&(_1_p.X2))), (*crt.Xpthread_attr_t)(unsafe.Pointer(nil)), _launch_thread_main, (unsafe.Pointer)(_1_p))
- if _1_rc != i32(0) {
+ _1_iTid = preInc7(&_pThreads.XiMaxTid, 1)
+ _1_p = (*XThread)(bin.Xsqlite3_malloc(tls, int32(20)))
+ crt.Xmemset(tls, unsafe.Pointer(_1_p), int32(0), uint32(20))
+ _1_p.XiTid = _1_iTid
+ _1_p.XpArg = _pArg
+ _1_p.XxProc = _xProc
+ _1_rc = crt.Xpthread_create(tls, &_1_p.Xtid, nil, _launch_thread_main, unsafe.Pointer(_1_p))
+ if _1_rc != int32(0) {
_system_error(tls, _pErr, _1_rc)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_1_p))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_1_p))
goto _2
}
- *(**XThread)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_1_p.X4))))) = (*XThread)(_pThreads.X1)
- *(**XThread)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pThreads.X1))))) = _1_p
+ *(**XThread)(unsafe.Pointer(&_1_p.XpNext)) = (*XThread)(_pThreads.XpThread)
+ *(**XThread)(unsafe.Pointer(&_pThreads.XpThread)) = _1_p
_2:
_0:
}
@@ -1629,14 +1100,14 @@ _0:
func _launch_thread_main(tls *crt.TLS, _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
var _p *XThread
_p = (*XThread)(_pArg)
- return (unsafe.Pointer)((_p.X3)(tls, _p.X0, _p.X1))
+ return unsafe.Pointer(_p.XxProc(tls, _p.XiTid, _p.XpArg))
}
func _system_error(tls *crt.TLS, _pErr *XError, _iSys int32) {
- *(*int32)(unsafe.Pointer(&(_pErr.X0))) = _iSys
- *(**int8)(unsafe.Pointer(&(_pErr.X2))) = (*int8)(bin.Xsqlite3_malloc(tls, i32(512)))
- crt.Xstrerror_r(tls, _iSys, _pErr.X2, uint32(i32(512)))
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pErr.X2)) + 1*uintptr(i32(511)))) = int8(i32(0))
+ _pErr.Xrc = _iSys
+ _pErr.XzErr = (*int8)(bin.Xsqlite3_malloc(tls, int32(512)))
+ crt.Xstrerror_r(tls, _iSys, _pErr.XzErr, uint32(512))
+ *elem2(_pErr.XzErr, uintptr(511)) = 0
}
func _walthread1_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -1647,82 +1118,82 @@ func _walthread1_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *in
var _db XSqlite
_err = XError{}
_db = XSqlite{}
- _nIter = i32(0)
+ _nIter = int32(0)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(929)
+ return int32(929)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(930)
+ return int32(930)
}()
return &_err
}()) != 0 {
goto _3
}
_1_azSql = [2]*int8{}
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_1_azSql)) + 4*uintptr(i32(0)))) = str(640)
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_1_azSql)) + 4*uintptr(i32(1)))) = str(708)
+ *elem1((**int8)(unsafe.Pointer(&_1_azSql)), 0) = str(640)
+ *elem1((**int8)(unsafe.Pointer(&_1_azSql)), uintptr(1)) = str(708)
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(937)
+ return int32(937)
}()
return &_err
}(), &_db, unsafe.Pointer(str(767)))
_integrity_check_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(938)
+ return int32(938)
}()
return &_err
}(), &_db)
_1_z1 = _execsql_text_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(939)
+ return int32(939)
}()
return &_err
- }(), &_db, i32(1), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_1_azSql)) + 4*uintptr(i32(0))))))
+ }(), &_db, int32(1), unsafe.Pointer(*elem1((**int8)(unsafe.Pointer(&_1_azSql)), 0)))
_1_z2 = _execsql_text_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(940)
+ return int32(940)
}()
return &_err
- }(), &_db, i32(2), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_1_azSql)) + 4*uintptr(i32(1))))))
+ }(), &_db, int32(2), unsafe.Pointer(*elem1((**int8)(unsafe.Pointer(&_1_azSql)), uintptr(1))))
_1_z3 = _execsql_text_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(941)
+ return int32(941)
}()
return &_err
- }(), &_db, i32(3), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_1_azSql)) + 4*uintptr(i32(0))))))
+ }(), &_db, int32(3), unsafe.Pointer(*elem1((**int8)(unsafe.Pointer(&_1_azSql)), 0)))
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(942)
+ return int32(942)
}()
return &_err
}(), &_db, unsafe.Pointer(str(773)))
@@ -1730,11 +1201,11 @@ _2:
_test_error_x(tls, &_err, bin.Xsqlite3_mprintf(tls, str(780), unsafe.Pointer(_1_z1), unsafe.Pointer(_1_z2), unsafe.Pointer(_1_z3)))
}
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(948)
+ return int32(948)
}()
return &_err
}(), &_db, str(802))
@@ -1742,19 +1213,17 @@ _2:
goto _2
_3:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(957)
+ return int32(957)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(934), _nIter)
- _ = _err
- _ = _db
_ = _1_azSql
panic(0)
}
@@ -1762,8 +1231,8 @@ _3:
func _timetostop_x(tls *crt.TLS, _pErr *XError) (r0 int32) {
var _ret int32
var _1_t float64
- _ret = i32(1)
- if (_pErr.X0) == i32(0) {
+ _ret = int32(1)
+ if _pErr.Xrc == int32(0) {
_1_t = _currentTime(tls)
_ret = bool2int(_1_t >= _timelimit)
}
@@ -1775,8 +1244,8 @@ func _execsql_i64_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, args ...interfac
var _iRet int64
var _1_pStmt unsafe.Pointer
var _1_ap []interface{}
- _iRet = i64(0)
- if (_pErr.X0) != i32(0) {
+ _iRet = int64(0)
+ if _pErr.Xrc != int32(0) {
goto _0
}
_1_ap = args
@@ -1784,18 +1253,18 @@ func _execsql_i64_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, args ...interfac
if _1_pStmt == nil {
goto _1
}
- _2_first = i32(1)
+ _2_first = int32(1)
_2:
- if i32(100) != bin.Xsqlite3_step(tls, _1_pStmt) {
+ if int32(100) != bin.Xsqlite3_step(tls, _1_pStmt) {
goto _3
}
- if _2_first != 0 && (bin.Xsqlite3_column_count(tls, _1_pStmt) > i32(0)) {
- _iRet = bin.Xsqlite3_column_int64(tls, _1_pStmt, i32(0))
+ if _2_first != 0 && (bin.Xsqlite3_column_count(tls, _1_pStmt) > int32(0)) {
+ _iRet = bin.Xsqlite3_column_int64(tls, _1_pStmt, int32(0))
}
- _2_first = i32(0)
+ _2_first = int32(0)
goto _2
_3:
- if i32(0) != bin.Xsqlite3_reset(tls, _1_pStmt) {
+ if int32(0) != bin.Xsqlite3_reset(tls, _1_pStmt) {
_sqlite_error(tls, _pErr, _pDb, str(948))
}
_1:
@@ -1808,21 +1277,21 @@ func _getAndBindSqlStatement(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _ap []i
var _i int32
var _1_zName *int8
var _pStmt, _1_pArg unsafe.Pointer
- var _pStatement *bin.Xsqlite3_pcache_page
+ var _pStatement *XStatement
_pStatement = _getSqlStatement(tls, _pErr, _pDb, (*int8)(crt.VAPointer(&_ap)))
if _pStatement == nil {
return nil
}
- _pStmt = _pStatement.X0
- _i = i32(1)
+ _pStmt = _pStatement.XpStmt
+ _i = int32(1)
_1:
if _i > bin.Xsqlite3_bind_parameter_count(tls, _pStmt) {
goto _4
}
_1_zName = bin.Xsqlite3_bind_parameter_name(tls, _pStmt, _i)
_1_pArg = crt.VAPointer(&_ap)
- switch int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_zName)) + 1*uintptr(i32(1))))) {
- case i32(105):
+ switch int32(*elem2(_1_zName, uintptr(1))) {
+ case int32(105):
goto _6
default:
goto _7
@@ -1832,8 +1301,8 @@ _6:
bin.Xsqlite3_bind_int64(tls, _pStmt, _i, *(*int64)(_1_pArg))
goto _8
_7:
- *(*int32)(unsafe.Pointer(&(_pErr.X0))) = i32(1)
- *(**int8)(unsafe.Pointer(&(_pErr.X2))) = bin.Xsqlite3_mprintf(tls, str(954), unsafe.Pointer(_1_zName))
+ _pErr.Xrc = int32(1)
+ _pErr.XzErr = bin.Xsqlite3_mprintf(tls, str(954), unsafe.Pointer(_1_zName))
_pStmt = nil
goto _8
_8:
@@ -1843,34 +1312,34 @@ _4:
return _pStmt
}
-func _getSqlStatement(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _zSql *int8) (r0 *bin.Xsqlite3_pcache_page) {
+func _getSqlStatement(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _zSql *int8) (r0 *XStatement) {
var _rc int32
- var _pRet *bin.Xsqlite3_pcache_page
- _pRet = (*bin.Xsqlite3_pcache_page)(_pDb.X1)
+ var _pRet *XStatement
+ _pRet = (*XStatement)(_pDb.XpCache)
_0:
if _pRet == nil {
goto _3
}
- if i32(0) == crt.Xstrcmp(tls, bin.Xsqlite3_sql(tls, _pRet.X0), _zSql) {
+ if int32(0) == crt.Xstrcmp(tls, bin.Xsqlite3_sql(tls, _pRet.XpStmt), _zSql) {
return _pRet
}
- _pRet = (*bin.Xsqlite3_pcache_page)(_pRet.X1)
+ _pRet = (*XStatement)(_pRet.XpNext)
goto _0
_3:
- _pRet = (*bin.Xsqlite3_pcache_page)(bin.Xsqlite3_malloc(tls, int32(u32(8))))
- _rc = bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_pDb.X0), _zSql, i32(-1), (*unsafe.Pointer)(unsafe.Pointer(&(_pRet.X0))), nil)
- if _rc != i32(0) {
+ _pRet = (*XStatement)(bin.Xsqlite3_malloc(tls, int32(8)))
+ _rc = bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_pDb.Xdb), _zSql, int32(-1), &_pRet.XpStmt, nil)
+ if _rc != int32(0) {
_sqlite_error(tls, _pErr, _pDb, str(980))
return nil
}
func() {
- if i32(0) != crt.Xstrcmp(tls, bin.Xsqlite3_sql(tls, _pRet.X0), _zSql) {
- crt.X__builtin_fprintf(tls, Xstderr, str(991), unsafe.Pointer(str(1027)), i32(614), unsafe.Pointer((*int8)(unsafe.Pointer(&_getSqlStatementØ00__func__Ø000))), unsafe.Pointer(str(1085)))
+ if int32(0) != crt.Xstrcmp(tls, bin.Xsqlite3_sql(tls, _pRet.XpStmt), _zSql) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(991), unsafe.Pointer(str(1027)), int32(614), unsafe.Pointer(&_getSqlStatementØ00__func__Ø000), unsafe.Pointer(str(1085)))
crt.X__builtin_abort(tls)
}
}()
- *(**bin.Xsqlite3_pcache_page)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pRet.X1))))) = (*bin.Xsqlite3_pcache_page)(_pDb.X1)
- *(**bin.Xsqlite3_pcache_page)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pDb.X1))))) = _pRet
+ *(**XStatement)(unsafe.Pointer(&_pRet.XpNext)) = (*XStatement)(_pDb.XpCache)
+ *(**XStatement)(unsafe.Pointer(&_pDb.XpCache)) = _pRet
return _pRet
}
@@ -1883,8 +1352,8 @@ func init() {
func _integrity_check_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite) {
var _1_zErr, _3_z *int8
var _2_pStmt unsafe.Pointer
- var _1_pStatement *bin.Xsqlite3_pcache_page
- if (_pErr.X0) != i32(0) {
+ var _1_pStatement *XStatement
+ if _pErr.Xrc != int32(0) {
goto _0
}
_1_zErr = nil
@@ -1892,12 +1361,12 @@ func _integrity_check_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite) {
if _1_pStatement == nil {
goto _1
}
- _2_pStmt = _1_pStatement.X0
+ _2_pStmt = _1_pStatement.XpStmt
_2:
- if i32(100) != bin.Xsqlite3_step(tls, _2_pStmt) {
+ if int32(100) != bin.Xsqlite3_step(tls, _2_pStmt) {
goto _3
}
- _3_z = (*int8)(unsafe.Pointer(bin.Xsqlite3_column_text(tls, _2_pStmt, i32(0))))
+ _3_z = (*int8)(unsafe.Pointer(bin.Xsqlite3_column_text(tls, _2_pStmt, int32(0))))
if crt.Xstrcmp(tls, _3_z, str(1166)) == 0 {
goto _4
}
@@ -1912,8 +1381,8 @@ _4:
_3:
bin.Xsqlite3_reset(tls, _2_pStmt)
if _1_zErr != nil {
- *(**int8)(unsafe.Pointer(&(_pErr.X2))) = _1_zErr
- *(*int32)(unsafe.Pointer(&(_pErr.X0))) = i32(1)
+ _pErr.XzErr = _1_zErr
+ _pErr.Xrc = int32(1)
}
_1:
_0:
@@ -1925,13 +1394,13 @@ func _execsql_text_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _iSlot int32, a
var _2_pStmt unsafe.Pointer
var _2_ap []interface{}
_zRet = nil
- if _iSlot >= (_pDb.X2) {
- _1_nByte = int32(u32(4) * uint32(_iSlot+i32(1)))
- *(***int8)(unsafe.Pointer(&(_pDb.X3))) = (**int8)(bin.Xsqlite3_realloc(tls, (unsafe.Pointer)(_pDb.X3), _1_nByte))
- crt.Xmemset(tls, (unsafe.Pointer)((**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pDb.X3))+4*uintptr(_pDb.X2)))), i32(0), u32(4)*uint32((_iSlot+i32(1))-(_pDb.X2)))
- *(*int32)(unsafe.Pointer(&(_pDb.X2))) = _iSlot + i32(1)
+ if _iSlot >= _pDb.XnText {
+ _1_nByte = int32(uint32(4) * uint32(_iSlot+int32(1)))
+ _pDb.XaText = (**int8)(bin.Xsqlite3_realloc(tls, unsafe.Pointer(_pDb.XaText), _1_nByte))
+ crt.Xmemset(tls, unsafe.Pointer(elem1(_pDb.XaText, uintptr(_pDb.XnText))), int32(0), uint32(4)*uint32((_iSlot+int32(1))-_pDb.XnText))
+ _pDb.XnText = _iSlot + int32(1)
}
- if (_pErr.X0) != i32(0) {
+ if _pErr.Xrc != int32(0) {
goto _1
}
_2_ap = args
@@ -1939,20 +1408,20 @@ func _execsql_text_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _iSlot int32, a
if _2_pStmt == nil {
goto _2
}
- _3_first = i32(1)
+ _3_first = int32(1)
_3:
- if i32(100) != bin.Xsqlite3_step(tls, _2_pStmt) {
+ if int32(100) != bin.Xsqlite3_step(tls, _2_pStmt) {
goto _4
}
- if _3_first != 0 && (bin.Xsqlite3_column_count(tls, _2_pStmt) > i32(0)) {
- _zRet = bin.Xsqlite3_mprintf(tls, str(637), unsafe.Pointer(bin.Xsqlite3_column_text(tls, _2_pStmt, i32(0))))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pDb.X3)) + 4*uintptr(_iSlot)))))
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pDb.X3)) + 4*uintptr(_iSlot))) = _zRet
+ if _3_first != 0 && (bin.Xsqlite3_column_count(tls, _2_pStmt) > int32(0)) {
+ _zRet = bin.Xsqlite3_mprintf(tls, str(637), unsafe.Pointer(bin.Xsqlite3_column_text(tls, _2_pStmt, int32(0))))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(*elem1(_pDb.XaText, uintptr(_iSlot))))
+ *elem1(_pDb.XaText, uintptr(_iSlot)) = _zRet
}
- _3_first = i32(0)
+ _3_first = int32(0)
goto _3
_4:
- if i32(0) != bin.Xsqlite3_reset(tls, _2_pStmt) {
+ if int32(0) != bin.Xsqlite3_reset(tls, _2_pStmt) {
_sqlite_error(tls, _pErr, _pDb, str(948))
}
_2:
@@ -1962,12 +1431,12 @@ _1:
}
func _test_error_x(tls *crt.TLS, _pErr *XError, _zErr *int8) {
- if (_pErr.X0) == i32(0) {
- *(*int32)(unsafe.Pointer(&(_pErr.X0))) = i32(1)
- *(**int8)(unsafe.Pointer(&(_pErr.X2))) = _zErr
+ if _pErr.Xrc == int32(0) {
+ _pErr.Xrc = int32(1)
+ _pErr.XzErr = _zErr
goto _1
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zErr))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zErr))
_1:
}
@@ -1978,22 +1447,22 @@ func _print_and_free_err(tls *crt.TLS, _p *XError) {
func _print_err(tls *crt.TLS, _p *XError) {
var _1_isWarn int32
- if (_p.X0) == i32(0) {
+ if _p.Xrc == int32(0) {
goto _0
}
- _1_isWarn = i32(0)
- if (_p.X0) == i32(17) {
- _1_isWarn = i32(1)
+ _1_isWarn = int32(0)
+ if _p.Xrc == int32(17) {
+ _1_isWarn = int32(1)
}
- if bin.Xsqlite3_strglob(tls, str(1175), _p.X2) == i32(0) {
- _1_isWarn = i32(1)
+ if bin.Xsqlite3_strglob(tls, str(1175), _p.XzErr) == int32(0) {
+ _1_isWarn = int32(1)
}
crt.Xprintf(tls, str(1196), unsafe.Pointer(func() *int8 {
if _1_isWarn != 0 {
return str(1222)
}
return str(1230)
- }()), _p.X0, unsafe.Pointer(_p.X2), _p.X1)
+ }()), _p.Xrc, unsafe.Pointer(_p.XzErr), _p.XiLine)
if _1_isWarn == 0 {
_nGlobalErr += 1
}
@@ -2001,12 +1470,14 @@ func _print_err(tls *crt.TLS, _p *XError) {
_0:
}
+// C comment
+// /* Total number of errors in this process so far. */
var _nGlobalErr int32
func _free_err(tls *crt.TLS, _p *XError) {
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_p.X2))
- *(**int8)(unsafe.Pointer(&(_p.X2))) = nil
- *(*int32)(unsafe.Pointer(&(_p.X0))) = i32(0)
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_p.XzErr))
+ _p.XzErr = nil
+ _p.Xrc = int32(0)
}
func _walthread1_ckpt_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -2015,89 +1486,85 @@ func _walthread1_ckpt_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r
var _db XSqlite
_err = XError{}
_db = XSqlite{}
- _nCkpt = i32(0)
+ _nCkpt = int32(0)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(968)
+ return int32(968)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(969)
+ return int32(969)
}()
return &_err
}()) != 0 {
goto _3
}
- crt.Xusleep(tls, uint32(i32(500000)))
+ crt.Xusleep(tls, uint32(500000))
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(971)
+ return int32(971)
}()
return &_err
}(), &_db, unsafe.Pointer(str(1236)))
- if (_err.X0) == i32(0) {
+ if _err.Xrc == int32(0) {
_nCkpt += 1
}
- _clear_error_x(tls, &_err, i32(5))
+ _clear_error_x(tls, &_err, int32(5))
goto _2
_3:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(975)
+ return int32(975)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(1258), _nCkpt)
-
- _ = _err
- _ = _db
- panic(0)
}
func _clear_error_x(tls *crt.TLS, _pErr *XError, _rc int32) {
- if (_pErr.X0) == _rc {
- *(*int32)(unsafe.Pointer(&(_pErr.X0))) = i32(0)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_pErr.X2))
- *(**int8)(unsafe.Pointer(&(_pErr.X2))) = nil
+ if _pErr.Xrc == _rc {
+ _pErr.Xrc = int32(0)
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_pErr.XzErr))
+ _pErr.XzErr = nil
}
}
-func _join_all_threads_x(tls *crt.TLS, _pErr *XError, _pThreads *bin.T_ht) {
+func _join_all_threads_x(tls *crt.TLS, _pErr *XError, _pThreads *XThreadset) {
var _1_rc int32
var _1_ret unsafe.Pointer
var _p, _pNext *XThread
- _p = (*XThread)(_pThreads.X1)
+ _p = (*XThread)(_pThreads.XpThread)
_0:
if _p == nil {
goto _3
}
- _pNext = (*XThread)(_p.X4)
- _1_rc = crt.Xpthread_join(tls, _p.X2, &_1_ret)
- if _1_rc == i32(0) {
+ _pNext = (*XThread)(_p.XpNext)
+ _1_rc = crt.Xpthread_join(tls, _p.Xtid, &_1_ret)
+ if _1_rc == int32(0) {
goto _4
}
- if (_pErr.X0) == i32(0) {
+ if _pErr.Xrc == int32(0) {
_system_error(tls, _pErr, _1_rc)
}
goto _6
_4:
- crt.Xprintf(tls, str(1273), _p.X0, unsafe.Pointer(func() *int8 {
+ crt.Xprintf(tls, str(1273), _p.XiTid, unsafe.Pointer(func() *int8 {
if _1_ret == nil {
return str(1293)
}
@@ -2105,105 +1572,102 @@ _4:
}()))
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
_6:
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_p))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_p))
_p = _pNext
goto _0
_3:
- *(**XThread)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pThreads.X1))))) = nil
+ *(**XThread)(unsafe.Pointer(&_pThreads.XpThread)) = nil
}
func _walthread2(tls *crt.TLS, _nMs int32) {
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1050)
+ return int32(1050)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1051)
+ return int32(1051)
}()
return &_err
}(), &_db, str(1297))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1052)
+ return int32(1052)
}()
return &_err
}(), &_db)
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1054)
+ return int32(1054)
}()
return &_err
}(), _nMs)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1055)
+ return int32(1055)
}()
return &_err
}(), &_threads, _walthread2_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1056)
+ return int32(1056)
}()
return &_err
}(), &_threads, _walthread2_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1057)
+ return int32(1057)
}()
return &_err
- }(), &_threads, _walthread2_thread, (unsafe.Pointer)(uintptr(u32(1))))
+ }(), &_threads, _walthread2_thread, crt.U2P(uintptr(uint32(1))))
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1058)
+ return int32(1058)
}()
return &_err
- }(), &_threads, _walthread2_thread, (unsafe.Pointer)(uintptr(u32(1))))
+ }(), &_threads, _walthread2_thread, crt.U2P(uintptr(uint32(1))))
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1059)
+ return int32(1059)
}()
return &_err
}(), &_threads)
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _walthread2_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -2215,118 +1679,116 @@ func _walthread2_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *in
_err = XError{}
_db = XSqlite{}
_anTrans = [2]int32{}
- _iArg = int32(uintptr(_pArg))
+ _iArg = int32(crt.P2U(_pArg))
_zJournal = str(1346)
if _iArg != 0 {
_zJournal = str(1372)
}
_0:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1016)
+ return int32(1016)
}()
return &_err
}()) != 0 {
goto _2
}
- _2_journal_exists = i32(0)
- _2_wal_exists = i32(0)
+ _2_journal_exists = int32(0)
+ _2_wal_exists = int32(0)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1020)
+ return int32(1020)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1022)
+ return int32(1022)
}()
return &_err
}(), &_db, _zJournal)
- _clear_error_x(tls, &_err, i32(5))
+ _clear_error_x(tls, &_err, int32(5))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1024)
+ return int32(1024)
}()
return &_err
}(), &_db, str(767))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1025)
+ return int32(1025)
}()
return &_err
}(), &_db, str(1401))
_2_journal_exists = bool2int(_filesize_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1027)
+ return int32(1027)
}()
return &_err
- }(), str(1446)) >= int64(i32(0)))
+ }(), str(1446)) >= (0))
_2_wal_exists = bool2int(_filesize_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1028)
+ return int32(1028)
}()
return &_err
- }(), str(1462)) >= int64(i32(0)))
- if (_2_journal_exists + _2_wal_exists) != i32(1) {
+ }(), str(1462)) >= (0))
+ if (_2_journal_exists + _2_wal_exists) != int32(1) {
_test_error_x(tls, &_err, bin.Xsqlite3_mprintf(tls, str(1474), _2_journal_exists, _2_wal_exists))
}
- *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_anTrans)) + 4*uintptr(_2_journal_exists))) += 1
+ *elem8((*int32)(unsafe.Pointer(&_anTrans)), uintptr(_2_journal_exists)) += 1
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1036)
+ return int32(1036)
}()
return &_err
}(), &_db, str(773))
_integrity_check_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1037)
+ return int32(1037)
}()
return &_err
}(), &_db)
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1038)
+ return int32(1038)
}()
return &_err
}(), &_db)
goto _0
_2:
_print_and_free_err(tls, &_err)
- return bin.Xsqlite3_mprintf(tls, str(1511), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_anTrans)) + 4*uintptr(i32(0)))), *(*int32)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_anTrans)) + 4*uintptr(i32(1)))))
+ return bin.Xsqlite3_mprintf(tls, str(1511), *elem8((*int32)(unsafe.Pointer(&_anTrans)), 0), *elem8((*int32)(unsafe.Pointer(&_anTrans)), uintptr(1)))
- _ = _err
- _ = _db
_ = _anTrans
panic(0)
}
@@ -2334,97 +1796,91 @@ _2:
func _filesize_x(tls *crt.TLS, _pErr *XError, _zFile *int8) (r0 int64) {
var _iRet int64
var _1_sStat crt.Xstruct_stat64
- _iRet = i64(0)
- if (_pErr.X0) != i32(0) {
+ _iRet = int64(0)
+ if _pErr.Xrc != int32(0) {
goto _0
}
if crt.Xstat64(tls, _zFile, &_1_sStat) != 0 {
- _iRet = int64(i32(-1))
+ _iRet = int64(-1)
goto _2
}
- _iRet = _1_sStat.X9
+ _iRet = _1_sStat.Xst_size
_2:
_0:
return _iRet
-
- _ = _1_sStat
- panic(0)
}
func _walthread3(tls *crt.TLS, _nMs int32) {
var _i int32
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1107)
+ return int32(1107)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1108)
+ return int32(1108)
}()
return &_err
}(), &_db, str(1521))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1115)
+ return int32(1115)
}()
return &_err
}(), &_db)
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1117)
+ return int32(1117)
}()
return &_err
}(), _nMs)
- _i = i32(0)
+ _i = int32(0)
_8:
- if _i >= i32(6) {
+ if _i >= int32(6) {
goto _11
}
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1119)
+ return int32(1119)
}()
return &_err
- }(), &_threads, _walthread3_thread, (unsafe.Pointer)(uintptr(_i)))
+ }(), &_threads, _walthread3_thread, crt.U2P(uintptr(_i)))
_i += 1
goto _8
_11:
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1121)
+ return int32(1121)
}()
return &_err
}(), &_threads)
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _walthread3_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -2434,50 +1890,50 @@ func _walthread3_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *in
var _db XSqlite
_err = XError{}
_db = XSqlite{}
- _iArg = int32(uintptr(_pArg))
+ _iArg = int32(crt.P2U(_pArg))
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1070)
+ return int32(1070)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1071)
+ return int32(1071)
}()
return &_err
}(), &_db, str(1680))
- _iNextWrite = int64(_iArg + i32(1))
+ _iNextWrite = int64(_iArg + int32(1))
_4:
- _1_stop = i32(0)
+ _1_stop = int32(0)
_6:
- if i32(0) != store3(&_1_stop, _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ if int32(0) != store7(&_1_stop, _timetostop_x(tls, func() *XError {
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1079)
+ return int32(1079)
}()
return &_err
}())) {
goto _7
}
_2_iMax = _execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1080)
+ return int32(1080)
}()
return &_err
}(), &_db, unsafe.Pointer(str(1711)))
- if (_2_iMax + int64(i32(1))) == _iNextWrite {
+ if (_2_iMax + int64(1)) == _iNextWrite {
goto _7
}
goto _6
@@ -2486,141 +1942,128 @@ _7:
goto _5
}
_1_sum1 = _execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1085)
+ return int32(1085)
}()
return &_err
}(), &_db, unsafe.Pointer(str(1735)))
_1_sum2 = _execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1086)
+ return int32(1086)
}()
return &_err
}(), &_db, unsafe.Pointer(str(1759)))
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1087)
+ return int32(1087)
}()
return &_err
}(), &_db, unsafe.Pointer(str(1784)), unsafe.Pointer(&_iNextWrite), unsafe.Pointer(&_1_sum1), unsafe.Pointer(&_1_sum2))
_integrity_check_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1091)
+ return int32(1091)
}()
return &_err
}(), &_db)
- {
- p := &_iNextWrite
- *p = (*p) + int64(i32(6))
- sink4(*p)
- }
+ _iNextWrite += int64(6)
goto _4
_5:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1096)
+ return int32(1096)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return nil
-
- _ = _err
- _ = _db
- _ = _1_sum1
- _ = _1_sum2
- panic(0)
}
func _walthread4(tls *crt.TLS, _nMs int32) {
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1165)
+ return int32(1165)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1166)
+ return int32(1166)
}()
return &_err
}(), &_db, str(1835))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1170)
+ return int32(1170)
}()
return &_err
}(), &_db)
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1172)
+ return int32(1172)
}()
return &_err
}(), _nMs)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1173)
+ return int32(1173)
}()
return &_err
}(), &_threads, _walthread4_reader_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1174)
+ return int32(1174)
}()
return &_err
}(), &_threads, _walthread4_writer_thread, nil)
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1175)
+ return int32(1175)
}()
return &_err
}(), &_threads)
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _walthread4_reader_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -2629,50 +2072,46 @@ func _walthread4_reader_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer)
_err = XError{}
_db = XSqlite{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1130)
+ return int32(1130)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1131)
+ return int32(1131)
}()
return &_err
}()) == 0 {
_integrity_check_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1132)
+ return int32(1132)
}()
return &_err
}(), &_db)
goto _2
}
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1134)
+ return int32(1134)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return nil
-
- _ = _err
- _ = _db
- panic(0)
}
func _walthread4_writer_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -2681,294 +2120,283 @@ func _walthread4_writer_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer)
var _db XSqlite
_err = XError{}
_db = XSqlite{}
- _iRow = i64(1)
+ _iRow = int64(1)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1145)
+ return int32(1145)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1146)
+ return int32(1146)
}()
return &_err
}(), &_db, str(1911))
_4:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1147)
+ return int32(1147)
}()
return &_err
}()) != 0 {
goto _5
}
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1148)
+ return int32(1148)
}()
return &_err
}(), &_db, unsafe.Pointer(str(1943)), unsafe.Pointer(&_iRow))
_iRow += 1
- if _iRow == int64(i32(10)) {
- _iRow = int64(i32(0))
+ if _iRow == int64(10) {
+ _iRow = 0
}
goto _4
_5:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1154)
+ return int32(1154)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return nil
-
- _ = _err
- _ = _db
- panic(0)
}
func _walthread5(tls *crt.TLS, _nMs int32) {
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1198)
+ return int32(1198)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1199)
+ return int32(1199)
}()
return &_err
}(), &_db, str(1990))
_filecopy_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1224)
+ return int32(1224)
}()
return &_err
}(), str(378), str(3150))
_filecopy_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1225)
+ return int32(1225)
}()
return &_err
}(), str(1462), str(3161))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1226)
+ return int32(1226)
}()
return &_err
}(), &_db)
_filecopy_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1228)
+ return int32(1228)
}()
return &_err
}(), str(3150), str(378))
_filecopy_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1229)
+ return int32(1229)
}()
return &_err
}(), str(3161), str(1462))
- if (_err.X0) == i32(0) {
+ if _err.Xrc == int32(0) {
crt.Xprintf(tls, str(3176), int32(_filesize_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1232)
+ return int32(1232)
}()
return &_err
}(), str(1462))))
crt.Xprintf(tls, str(3200), int32(_filesize_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1233)
+ return int32(1233)
}()
return &_err
}(), str(378))))
}
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1236)
+ return int32(1236)
}()
return &_err
}(), _nMs)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1237)
+ return int32(1237)
}()
return &_err
}(), &_threads, _walthread5_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1238)
+ return int32(1238)
}()
return &_err
}(), &_threads, _walthread5_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1239)
+ return int32(1239)
}()
return &_err
}(), &_threads, _walthread5_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1240)
+ return int32(1240)
}()
return &_err
}(), &_threads, _walthread5_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1241)
+ return int32(1241)
}()
return &_err
}(), &_threads, _walthread5_thread, nil)
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1242)
+ return int32(1242)
}()
return &_err
}(), &_threads)
- if (_err.X0) == i32(0) {
+ if _err.Xrc == int32(0) {
crt.Xprintf(tls, str(3176), int32(_filesize_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1245)
+ return int32(1245)
}()
return &_err
}(), str(1462))))
crt.Xprintf(tls, str(3200), int32(_filesize_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1246)
+ return int32(1246)
}()
return &_err
}(), str(378))))
}
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _filecopy_x(tls *crt.TLS, _pErr *XError, _zFrom *int8, _zTo *int8) {
var _3_fd1, _3_fd2, _6_nCopy int32
var _1_nByte, _3_iOff int64
var _3_aBuf [1024]int8
- if (_pErr.X0) != i32(0) {
+ if _pErr.Xrc != int32(0) {
goto _0
}
_1_nByte = _filesize_x(tls, _pErr, _zFrom)
- if _1_nByte < int64(i32(0)) {
+ if _1_nByte < (0) {
_test_error_x(tls, _pErr, bin.Xsqlite3_mprintf(tls, str(3217), unsafe.Pointer(_zFrom)))
goto _2
}
crt.Xunlink(tls, _zTo)
- _3_fd1 = crt.Xopen64(tls, _zFrom, i32(0))
- if _3_fd1 < i32(0) {
+ _3_fd1 = crt.Xopen64(tls, _zFrom, int32(0))
+ if _3_fd1 < int32(0) {
_system_error(tls, _pErr, *crt.X__errno_location(tls))
return
}
- _3_fd2 = crt.Xopen64(tls, _zTo, i32(194), i32(420))
- if _3_fd2 < i32(0) {
+ _3_fd2 = crt.Xopen64(tls, _zTo, int32(194), int32(420))
+ if _3_fd2 < int32(0) {
_system_error(tls, _pErr, *crt.X__errno_location(tls))
crt.Xclose(tls, _3_fd1)
return
}
- _3_iOff = int64(i32(0))
+ _3_iOff = 0
_5:
if _3_iOff >= _1_nByte {
goto _6
}
- _6_nCopy = int32(u32(1024))
+ _6_nCopy = int32(1024)
if (int64(_6_nCopy) + _3_iOff) > _1_nByte {
_6_nCopy = int32(_1_nByte - _3_iOff)
}
- if _6_nCopy != crt.Xread(tls, _3_fd1, (unsafe.Pointer)(&_3_aBuf), uint32(_6_nCopy)) {
+ if _6_nCopy != crt.Xread(tls, _3_fd1, unsafe.Pointer(&_3_aBuf), uint32(_6_nCopy)) {
_system_error(tls, _pErr, *crt.X__errno_location(tls))
goto _6
}
- if _6_nCopy != crt.Xwrite(tls, _3_fd2, (unsafe.Pointer)(&_3_aBuf), uint32(_6_nCopy)) {
+ if _6_nCopy != crt.Xwrite(tls, _3_fd2, unsafe.Pointer(&_3_aBuf), uint32(_6_nCopy)) {
_system_error(tls, _pErr, *crt.X__errno_location(tls))
goto _6
}
- {
- p := &_3_iOff
- *p = (*p) + int64(_6_nCopy)
- sink4(*p)
- }
+ _3_iOff += int64(_6_nCopy)
goto _5
_6:
crt.Xclose(tls, _3_fd1)
@@ -2985,41 +2413,37 @@ func _walthread5_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *in
_err = XError{}
_db = XSqlite{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1185)
+ return int32(1185)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_nRow = _execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1186)
+ return int32(1186)
}()
return &_err
}(), &_db, unsafe.Pointer(str(3234)))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1187)
+ return int32(1187)
}()
return &_err
}(), &_db)
- if _nRow != int64(i32(65536)) {
+ if _nRow != int64(65536) {
_test_error_x(tls, &_err, bin.Xsqlite3_mprintf(tls, str(3258), int32(_nRow)))
}
_print_and_free_err(tls, &_err)
return nil
-
- _ = _err
- _ = _db
- panic(0)
}
func _cgt_pager_1(tls *crt.TLS, _nMs int32) {
@@ -3029,20 +2453,20 @@ func _cgt_pager_1(tls *crt.TLS, _nMs int32) {
_err = XError{}
_db = XSqlite{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1289)
+ return int32(1289)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1290)
+ return int32(1290)
}()
return &_err
}(), &_db, str(3276))
@@ -3053,17 +2477,15 @@ func _cgt_pager_1(tls *crt.TLS, _nMs int32) {
_xSub = _cgt_pager_1_read
_xSub(tls, &_err, &_db)
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1300)
+ return int32(1300)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
}
func _cgt_pager_1_populate(tls *crt.TLS, _pErr *XError, _pDb *XSqlite) {
@@ -3071,26 +2493,26 @@ func _cgt_pager_1_populate(tls *crt.TLS, _pErr *XError, _pDb *XSqlite) {
var _zInsert *int8
_zInsert = str(3373)
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(1259)
+ return int32(1259)
}()
return _pErr
}(), _pDb, str(767))
- _iRow = int64(i32(1))
+ _iRow = int64(1)
_2:
- if _iRow > int64(i32(10000)) {
+ if _iRow > int64(10000) {
goto _5
}
- _1_iBlob = int64(i32(600)) + (_iRow % int64(i32(300)))
+ _1_iBlob = int64(600) + (_iRow % int64(300))
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(1262)
+ return int32(1262)
}()
return _pErr
}(), _pDb, unsafe.Pointer(_zInsert), unsafe.Pointer(&_iRow), unsafe.Pointer(&_1_iBlob))
@@ -3098,15 +2520,14 @@ _2:
goto _2
_5:
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(1264)
+ return int32(1264)
}()
return _pErr
}(), _pDb, str(773))
- _ = _1_iBlob
}
func _cgt_pager_1_update(tls *crt.TLS, _pErr *XError, _pDb *XSqlite) {
@@ -3114,26 +2535,26 @@ func _cgt_pager_1_update(tls *crt.TLS, _pErr *XError, _pDb *XSqlite) {
var _zUpdate *int8
_zUpdate = str(3420)
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(1269)
+ return int32(1269)
}()
return _pErr
}(), _pDb, str(767))
- _iRow = int64(i32(1))
+ _iRow = int64(1)
_2:
- if _iRow > int64(i32(10000)) {
+ if _iRow > int64(10000) {
goto _5
}
- _1_iBlob = int64(i32(600)) + ((_iRow + int64(i32(100))) % int64(i32(300)))
+ _1_iBlob = int64(600) + ((_iRow + int64(100)) % int64(300))
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(1272)
+ return int32(1272)
}()
return _pErr
}(), _pDb, unsafe.Pointer(_zUpdate), unsafe.Pointer(&_1_iBlob), unsafe.Pointer(&_iRow))
@@ -3141,39 +2562,38 @@ _2:
goto _2
_5:
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(1274)
+ return int32(1274)
}()
return _pErr
}(), _pDb, str(773))
- _ = _1_iBlob
}
func _cgt_pager_1_read(tls *crt.TLS, _pErr *XError, _pDb *XSqlite) {
var _iRow int64
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(1278)
+ return int32(1278)
}()
return _pErr
}(), _pDb, str(767))
- _iRow = int64(i32(1))
+ _iRow = int64(1)
_2:
- if _iRow > int64(i32(10000)) {
+ if _iRow > int64(10000) {
goto _5
}
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(1280)
+ return int32(1280)
}()
return _pErr
}(), _pDb, unsafe.Pointer(str(3471)), unsafe.Pointer(&_iRow))
@@ -3181,111 +2601,108 @@ _2:
goto _2
_5:
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(1282)
+ return int32(1282)
}()
return _pErr
}(), _pDb, str(773))
}
func _dynamic_triggers(tls *crt.TLS, _nMs int32) {
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1396)
+ return int32(1396)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1397)
+ return int32(1397)
}()
return &_err
}(), &_db, str(3504))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1410)
+ return int32(1410)
}()
return &_err
}(), &_db)
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1412)
+ return int32(1412)
}()
return &_err
}(), _nMs)
- bin.Xsqlite3_enable_shared_cache(tls, i32(1))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(1))
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1415)
+ return int32(1415)
}()
return &_err
}(), &_threads, _dynamic_triggers_2, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1416)
+ return int32(1416)
}()
return &_err
}(), &_threads, _dynamic_triggers_2, nil)
- crt.Xsleep(tls, uint32(i32(2)))
- bin.Xsqlite3_enable_shared_cache(tls, i32(0))
+ crt.Xsleep(tls, uint32(2))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(0))
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1421)
+ return int32(1421)
}()
return &_err
}(), &_threads, _dynamic_triggers_2, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1422)
+ return int32(1422)
}()
return &_err
}(), &_threads, _dynamic_triggers_1, nil)
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1424)
+ return int32(1424)
}()
return &_err
}(), &_threads)
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _dynamic_triggers_2(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -3295,38 +2712,38 @@ func _dynamic_triggers_2(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *i
var _db XSqlite
_err = XError{}
_db = XSqlite{}
- _iVal = i64(0)
- _nInsert = i32(0)
- _nDelete = i32(0)
+ _iVal = int64(0)
+ _nInsert = int32(0)
+ _nDelete = int32(0)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1371)
+ return int32(1371)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1372)
+ return int32(1372)
}()
return &_err
}()) != 0 {
goto _3
}
_6:
- _iVal = (_iVal + int64(i32(1))) % int64(i32(100))
+ _iVal = (_iVal + int64(1)) % int64(100)
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1375)
+ return int32(1375)
}()
return &_err
}(), &_db, unsafe.Pointer(str(3753)), unsafe.Pointer(&_iVal), unsafe.Pointer(&_iVal))
@@ -3335,13 +2752,13 @@ _6:
goto _6
}
_9:
- _iVal = (_iVal + int64(i32(1))) % int64(i32(100))
+ _iVal = (_iVal + int64(1)) % int64(100)
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1381)
+ return int32(1381)
}()
return &_err
}(), &_db, unsafe.Pointer(str(3787)), unsafe.Pointer(&_iVal))
@@ -3352,20 +2769,16 @@ _9:
goto _2
_3:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1385)
+ return int32(1385)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(3816), _nInsert, _nDelete)
-
- _ = _err
- _ = _db
- panic(0)
}
func _dynamic_triggers_1(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -3375,105 +2788,105 @@ func _dynamic_triggers_1(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *i
var _db XSqlite
_err = XError{}
_db = XSqlite{}
- _nDrop = i32(0)
- _nCreate = i32(0)
+ _nDrop = int32(0)
+ _nCreate = int32(0)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1318)
+ return int32(1318)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1319)
+ return int32(1319)
}()
return &_err
}()) != 0 {
goto _3
}
- _1_i = i32(1)
+ _1_i = int32(1)
_6:
- if _1_i >= i32(9) {
+ if _1_i >= int32(9) {
goto _9
}
- _2_zSql = bin.Xsqlite3_mprintf(tls, str(3839), _1_i, _1_i, _1_i+i32(1))
+ _2_zSql = bin.Xsqlite3_mprintf(tls, str(3839), _1_i, _1_i, _1_i+int32(1))
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1328)
+ return int32(1328)
}()
return &_err
}(), &_db, unsafe.Pointer(_2_zSql))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_2_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_2_zSql))
_nCreate += 1
_1_i += 1
goto _6
_9:
- _1_i = i32(1)
+ _1_i = int32(1)
_12:
- if _1_i >= i32(9) {
+ if _1_i >= int32(9) {
goto _15
}
- _3_zSql = bin.Xsqlite3_mprintf(tls, str(3929), _1_i, _1_i, _1_i+i32(1))
+ _3_zSql = bin.Xsqlite3_mprintf(tls, str(3929), _1_i, _1_i, _1_i+int32(1))
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1339)
+ return int32(1339)
}()
return &_err
}(), &_db, unsafe.Pointer(_3_zSql))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_3_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_3_zSql))
_nCreate += 1
_1_i += 1
goto _12
_15:
- _1_i = i32(1)
+ _1_i = int32(1)
_18:
- if _1_i >= i32(9) {
+ if _1_i >= int32(9) {
goto _21
}
_4_zSql = bin.Xsqlite3_mprintf(tls, str(4015), _1_i)
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1346)
+ return int32(1346)
}()
return &_err
}(), &_db, unsafe.Pointer(_4_zSql))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_4_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_4_zSql))
_nDrop += 1
_1_i += 1
goto _18
_21:
- _1_i = i32(1)
+ _1_i = int32(1)
_24:
- if _1_i >= i32(9) {
+ if _1_i >= int32(9) {
goto _27
}
_5_zSql = bin.Xsqlite3_mprintf(tls, str(4034), _1_i)
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1353)
+ return int32(1353)
}()
return &_err
}(), &_db, unsafe.Pointer(_5_zSql))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_5_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_5_zSql))
_nDrop += 1
_1_i += 1
goto _24
@@ -3481,109 +2894,104 @@ _27:
goto _2
_3:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(1358)
+ return int32(1358)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(4053), _nCreate, _nDrop)
-
- _ = _err
- _ = _db
- panic(0)
}
func _checkpoint_starvation_1(tls *crt.TLS, _nMs int32) {
- var _ctx crt.Xstruct_timeval
var _err XError
+ var _ctx XCheckpointStarvationCtx
_err = XError{}
- _ctx = crt.Xstruct_timeval{}
+ _ctx = XCheckpointStarvationCtx{}
_checkpoint_starvation_main(tls, _nMs, &_ctx)
- if (_ctx.X1) < i32(500) {
- _test_error_x(tls, &_err, bin.Xsqlite3_mprintf(tls, str(4076), _ctx.X1))
+ if _ctx.XnMaxFrame < int32(500) {
+ _test_error_x(tls, &_err, bin.Xsqlite3_mprintf(tls, str(4076), _ctx.XnMaxFrame))
}
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _ctx
}
-func _checkpoint_starvation_main(tls *crt.TLS, _nMs int32, _p *crt.Xstruct_timeval) {
+func _checkpoint_starvation_main(tls *crt.TLS, _nMs int32, _p *XCheckpointStarvationCtx) {
var _nInsert, _i int32
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
- _nInsert = i32(0)
+ _threads = XThreadset{}
+ _nInsert = int32(0)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(99)
+ return int32(99)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(100)
+ return int32(100)
}()
return &_err
}(), &_db, str(4107))
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(106)
+ return int32(106)
}()
return &_err
}(), _nMs)
- _i = i32(0)
+ _i = int32(0)
_6:
- if _i >= i32(4) {
+ if _i >= int32(4) {
goto _9
}
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(109)
+ return int32(109)
}()
return &_err
}(), &_threads, _checkpoint_starvation_reader, nil)
- crt.Xusleep(tls, uint32(i32(25000)))
+ crt.Xusleep(tls, uint32(25000))
_i += 1
goto _6
_9:
- bin.Xsqlite3_wal_hook(tls, (*bin.Xsqlite3)(_db.X0), *(*func(*crt.TLS, unsafe.Pointer, *bin.Xsqlite3, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32
- }{_checkpoint_starvation_walhook})), (unsafe.Pointer)(_p))
+ bin.Xsqlite3_wal_hook(tls, (*bin.Xsqlite3)(_db.Xdb), func() func(*crt.TLS, unsafe.Pointer, *bin.Xsqlite3, *int8, int32) int32 {
+ v := _checkpoint_starvation_walhook
+ return *(*func(*crt.TLS, unsafe.Pointer, *bin.Xsqlite3, *int8, int32) int32)(unsafe.Pointer(&v))
+ }(), unsafe.Pointer(_p))
_12:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(114)
+ return int32(114)
}()
return &_err
}()) == 0 {
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(115)
+ return int32(115)
}()
return &_err
}(), &_db, str(4177))
@@ -3591,35 +2999,32 @@ _12:
goto _12
}
crt.Xprintf(tls, str(4217), unsafe.Pointer(func() *int8 {
- if (_p.X0) == i32(0) {
+ if _p.XeMode == int32(0) {
return str(4241)
}
return str(4249)
}()))
- crt.Xprintf(tls, str(4257), _p.X1)
+ crt.Xprintf(tls, str(4257), _p.XnMaxFrame)
crt.Xprintf(tls, str(4288), _nInsert)
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(125)
+ return int32(125)
}()
return &_err
}(), &_threads)
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(126)
+ return int32(126)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _checkpoint_starvation_reader(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -3629,60 +3034,60 @@ func _checkpoint_starvation_reader(tls *crt.TLS, _iTid int32, _pArg unsafe.Point
_err = XError{}
_db = XSqlite{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(73)
+ return int32(73)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(74)
+ return int32(74)
}()
return &_err
}()) != 0 {
goto _3
}
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(76)
+ return int32(76)
}()
return &_err
}(), &_db, str(767))
_1_iCount1 = _execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(77)
+ return int32(77)
}()
return &_err
}(), &_db, unsafe.Pointer(str(4325)))
- crt.Xusleep(tls, uint32(i32(100000)))
+ crt.Xusleep(tls, uint32(100000))
_1_iCount2 = _execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(79)
+ return int32(79)
}()
return &_err
}(), &_db, unsafe.Pointer(str(4325)))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(80)
+ return int32(80)
}()
return &_err
}(), &_db, str(773))
@@ -3692,151 +3097,142 @@ _2:
goto _2
_3:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(86)
+ return int32(86)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return nil
-
- _ = _err
- _ = _db
- panic(0)
}
func _checkpoint_starvation_walhook(tls *crt.TLS, _pCtx unsafe.Pointer, _db unsafe.Pointer, _zDb *int8, _nFrame int32) (r0 int32) {
- var _p *crt.Xstruct_timeval
- _p = (*crt.Xstruct_timeval)(_pCtx)
- if _nFrame > (_p.X1) {
- *(*int32)(unsafe.Pointer(&(_p.X1))) = _nFrame
+ var _p *XCheckpointStarvationCtx
+ _p = (*XCheckpointStarvationCtx)(_pCtx)
+ if _nFrame > _p.XnMaxFrame {
+ _p.XnMaxFrame = _nFrame
}
- if _nFrame >= i32(50) {
- bin.Xsqlite3_wal_checkpoint_v2(tls, (*bin.Xsqlite3)(_db), _zDb, _p.X0, nil, nil)
+ if _nFrame >= int32(50) {
+ bin.Xsqlite3_wal_checkpoint_v2(tls, (*bin.Xsqlite3)(_db), _zDb, _p.XeMode, nil, nil)
}
- return i32(0)
+ return int32(0)
}
func _checkpoint_starvation_2(tls *crt.TLS, _nMs int32) {
- var _ctx crt.Xstruct_timeval
var _err XError
+ var _ctx XCheckpointStarvationCtx
_err = XError{}
- _ctx = crt.Xstruct_timeval{X0: i32(2), X1: i32(0)}
+ _ctx = XCheckpointStarvationCtx{XeMode: int32(2)}
_checkpoint_starvation_main(tls, _nMs, &_ctx)
- if (_ctx.X1) > i32(60) {
- _test_error_x(tls, &_err, bin.Xsqlite3_mprintf(tls, str(4379), _ctx.X1))
+ if _ctx.XnMaxFrame > int32(60) {
+ _test_error_x(tls, &_err, bin.Xsqlite3_mprintf(tls, str(4379), _ctx.XnMaxFrame))
}
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _ctx
}
func _create_drop_index_1(tls *crt.TLS, _nMs int32) {
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(54)
+ return int32(54)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(55)
+ return int32(55)
}()
return &_err
}(), &_db, str(4410))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(60)
+ return int32(60)
}()
return &_err
}(), &_db)
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(62)
+ return int32(62)
}()
return &_err
}(), _nMs)
- bin.Xsqlite3_enable_shared_cache(tls, i32(1))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(1))
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(65)
+ return int32(65)
}()
return &_err
}(), &_threads, _create_drop_index_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(66)
+ return int32(66)
}()
return &_err
}(), &_threads, _create_drop_index_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(67)
+ return int32(67)
}()
return &_err
}(), &_threads, _create_drop_index_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(68)
+ return int32(68)
}()
return &_err
}(), &_threads, _create_drop_index_thread, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(69)
+ return int32(69)
}()
return &_err
}(), &_threads, _create_drop_index_thread, nil)
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(71)
+ return int32(71)
}()
return &_err
}(), &_threads)
- bin.Xsqlite3_enable_shared_cache(tls, i32(0))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(0))
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _create_drop_index_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -3846,39 +3242,39 @@ func _create_drop_index_thread(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer)
_db = XSqlite{}
_0:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(21)
+ return int32(21)
}()
return &_err
}()) == 0 {
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(22)
+ return int32(22)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(24)
+ return int32(24)
}()
return &_err
}(), &_db, str(4551))
- _clear_error_x(tls, &_err, i32(6))
+ _clear_error_x(tls, &_err, int32(6))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(42)
+ return int32(42)
}()
return &_err
}(), &_db)
@@ -3886,124 +3282,117 @@ _0:
}
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(1166))
-
- _ = _err
- _ = _db
- panic(0)
}
func _lookaside1(tls *crt.TLS, _nMs int32) {
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(71)
+ return int32(71)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(72)
+ return int32(72)
}()
return &_err
}(), &_db, str(4924))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(85)
+ return int32(85)
}()
return &_err
}(), &_db)
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(87)
+ return int32(87)
}()
return &_err
}(), _nMs)
- bin.Xsqlite3_enable_shared_cache(tls, i32(1))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(1))
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(90)
+ return int32(90)
}()
return &_err
}(), &_threads, _lookaside1_thread_reader, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(91)
+ return int32(91)
}()
return &_err
}(), &_threads, _lookaside1_thread_reader, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(92)
+ return int32(92)
}()
return &_err
}(), &_threads, _lookaside1_thread_reader, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(93)
+ return int32(93)
}()
return &_err
}(), &_threads, _lookaside1_thread_reader, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(94)
+ return int32(94)
}()
return &_err
}(), &_threads, _lookaside1_thread_reader, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(95)
+ return int32(95)
}()
return &_err
}(), &_threads, _lookaside1_thread_writer, nil)
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(96)
+ return int32(96)
}()
return &_err
}(), &_threads)
- bin.Xsqlite3_enable_shared_cache(tls, i32(0))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(0))
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _lookaside1_thread_reader(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -4014,62 +3403,58 @@ func _lookaside1_thread_reader(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer)
_err = XError{}
_db = XSqlite{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(25)
+ return int32(25)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(27)
+ return int32(27)
}()
return &_err
}()) != 0 {
goto _3
}
_1_pStmt = nil
- bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_db.X0), str(5276), i32(-1), &_1_pStmt, nil)
+ bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_db.Xdb), str(5276), int32(-1), &_1_pStmt, nil)
_6:
- if bin.Xsqlite3_step(tls, _1_pStmt) == i32(100) {
+ if bin.Xsqlite3_step(tls, _1_pStmt) == int32(100) {
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(33)
+ return int32(33)
}()
return &_err
}(), &_db, unsafe.Pointer(str(5293)))
goto _6
}
_1_rc = bin.Xsqlite3_finalize(tls, _1_pStmt)
- if ((_err.X0) == i32(0)) && (_1_rc != i32(0)) {
+ if (_err.Xrc == int32(0)) && (_1_rc != int32(0)) {
_sqlite_error(tls, &_err, &_db, str(5324))
}
goto _2
_3:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(41)
+ return int32(41)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(1166))
-
- _ = _err
- _ = _db
- panic(0)
}
func _lookaside1_thread_writer(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -4078,146 +3463,139 @@ func _lookaside1_thread_writer(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer)
_err = XError{}
_db = XSqlite{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(50)
+ return int32(50)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(53)
+ return int32(53)
}()
return &_err
}(), &_db, str(5333))
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(58)
+ return int32(58)
}()
return &_err
}()) == 0 {
goto _2
}
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(60)
+ return int32(60)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(1166))
-
- _ = _err
- _ = _db
- panic(0)
}
func _vacuum1(tls *crt.TLS, _nMs int32) {
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(72)
+ return int32(72)
}()
return &_err
- }(), &_db, str(378), i32(1))
+ }(), &_db, str(378), int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(73)
+ return int32(73)
}()
return &_err
}(), &_db, str(5379))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(77)
+ return int32(77)
}()
return &_err
}(), &_db)
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(79)
+ return int32(79)
}()
return &_err
}(), _nMs)
- bin.Xsqlite3_enable_shared_cache(tls, i32(1))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(1))
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(82)
+ return int32(82)
}()
return &_err
}(), &_threads, _vacuum1_thread_writer, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(83)
+ return int32(83)
}()
return &_err
}(), &_threads, _vacuum1_thread_writer, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(84)
+ return int32(84)
}()
return &_err
}(), &_threads, _vacuum1_thread_writer, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(85)
+ return int32(85)
}()
return &_err
}(), &_threads, _vacuum1_thread_vacuumer, nil)
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(86)
+ return int32(86)
}()
return &_err
}(), &_threads)
- bin.Xsqlite3_enable_shared_cache(tls, i32(0))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(0))
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _db
- _ = _threads
}
func _vacuum1_thread_writer(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -4227,73 +3605,68 @@ func _vacuum1_thread_writer(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0
_err = XError{}
_db = XSqlite{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(26)
+ return int32(26)
}()
return &_err
- }(), &_db, str(378), i32(0))
- _i = i64(0)
+ }(), &_db, str(378), int32(0))
+ _i = int64(0)
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(29)
+ return int32(29)
}()
return &_err
}()) == 0 {
_i += 1
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(33)
+ return int32(33)
}()
return &_err
}(), &_db, unsafe.Pointer(str(5444)))
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(39)
+ return int32(39)
}()
return &_err
}(), &_db, unsafe.Pointer(str(5579)), unsafe.Pointer(&_i))
- _clear_error_x(tls, &_err, i32(6))
+ _clear_error_x(tls, &_err, int32(6))
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(43)
+ return int32(43)
}()
return &_err
}(), &_db, unsafe.Pointer(str(5611)))
- _clear_error_x(tls, &_err, i32(6))
+ _clear_error_x(tls, &_err, int32(6))
goto _2
}
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(47)
+ return int32(47)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(1166))
-
- _ = _err
- _ = _db
- _ = _i
- panic(0)
}
func _vacuum1_thread_vacuumer(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -4302,238 +3675,234 @@ func _vacuum1_thread_vacuumer(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (
_err = XError{}
_db = XSqlite{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(55)
+ return int32(55)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(58)
+ return int32(58)
}()
return &_err
}(), &_db, str(5639))
- _clear_error_x(tls, &_err, i32(6))
+ _clear_error_x(tls, &_err, int32(6))
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(60)
+ return int32(60)
}()
return &_err
}()) == 0 {
goto _2
}
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(62)
+ return int32(62)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(1166))
-
- _ = _err
- _ = _db
- panic(0)
}
func _stress1(tls *crt.TLS, _nMs int32) {
- var _threads bin.T_ht
var _err XError
+ var _threads XThreadset
_err = XError{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(138)
+ return int32(138)
}()
return &_err
}(), _nMs)
- bin.Xsqlite3_enable_shared_cache(tls, i32(1))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(1))
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(141)
+ return int32(141)
}()
return &_err
}(), &_threads, _stress_thread_1, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(142)
+ return int32(142)
}()
return &_err
}(), &_threads, _stress_thread_1, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(144)
+ return int32(144)
}()
return &_err
}(), &_threads, _stress_thread_2, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(145)
+ return int32(145)
}()
return &_err
}(), &_threads, _stress_thread_2, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(147)
+ return int32(147)
}()
return &_err
}(), &_threads, _stress_thread_3, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(148)
+ return int32(148)
}()
return &_err
}(), &_threads, _stress_thread_3, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(150)
+ return int32(150)
}()
return &_err
}(), &_threads, _stress_thread_4, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(151)
+ return int32(151)
}()
return &_err
}(), &_threads, _stress_thread_4, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(153)
+ return int32(153)
}()
return &_err
}(), &_threads, _stress_thread_5, nil)
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(154)
+ return int32(154)
}()
return &_err
- }(), &_threads, _stress_thread_5, (unsafe.Pointer)(uintptr(u32(1))))
+ }(), &_threads, _stress_thread_5, crt.U2P(uintptr(uint32(1))))
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(156)
+ return int32(156)
}()
return &_err
}(), &_threads)
- bin.Xsqlite3_enable_shared_cache(tls, i32(0))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(0))
_print_and_free_err(tls, &_err)
- _ = _err
- _ = _threads
}
-// Thread 1. CREATE and DROP a table.
+// C comment
+// /*
+// ** Thread 1. CREATE and DROP a table.
+// */
func _stress_thread_1(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
var _err XError
var _db XSqlite
_err = XError{}
_db = XSqlite{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(24)
+ return int32(24)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(25)
+ return int32(25)
}()
return &_err
}()) == 0 {
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(26)
+ return int32(26)
}()
return &_err
}(), &_db, str(5646))
- _clear_error_x(tls, &_err, i32(6))
+ _clear_error_x(tls, &_err, int32(6))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(28)
+ return int32(28)
}()
return &_err
}(), &_db, str(5694))
- _clear_error_x(tls, &_err, i32(6))
+ _clear_error_x(tls, &_err, int32(6))
goto _2
}
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(31)
+ return int32(31)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(1166))
-
- _ = _err
- _ = _db
- panic(0)
}
-// Thread 2. Open and close database connections.
+// C comment
+// /*
+// ** Thread 2. Open and close database connections.
+// */
func _stress_thread_2(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
var _err XError
var _db XSqlite
@@ -4541,39 +3910,39 @@ func _stress_thread_2(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8
_db = XSqlite{}
_0:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(42)
+ return int32(42)
}()
return &_err
}()) == 0 {
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(43)
+ return int32(43)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(44)
+ return int32(44)
}()
return &_err
}(), &_db, str(5718))
- _clear_error_x(tls, &_err, i32(6))
+ _clear_error_x(tls, &_err, int32(6))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(46)
+ return int32(46)
}()
return &_err
}(), &_db)
@@ -4581,102 +3950,100 @@ _0:
}
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(1166))
-
- _ = _err
- _ = _db
- panic(0)
}
-// Thread 3. Attempt many small SELECT statements.
+// C comment
+// /*
+// ** Thread 3. Attempt many small SELECT statements.
+// */
func _stress_thread_3(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
var _i1, _i2 int32
var _err XError
var _db XSqlite
_err = XError{}
_db = XSqlite{}
- _i1 = i32(0)
- _i2 = i32(0)
+ _i1 = int32(0)
+ _i2 = int32(0)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(62)
+ return int32(62)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(63)
+ return int32(63)
}()
return &_err
}()) != 0 {
goto _3
}
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(64)
+ return int32(64)
}()
return &_err
}(), &_db, str(5747))
_i1 += 1
- if (_err.X0) != 0 {
+ if _err.Xrc != 0 {
_i2 += 1
}
- _clear_error_x(tls, &_err, i32(6))
- _clear_error_x(tls, &_err, i32(1))
+ _clear_error_x(tls, &_err, int32(6))
+ _clear_error_x(tls, &_err, int32(1))
goto _2
_3:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(70)
+ return int32(70)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(5776), _i2, _i1)
-
- _ = _err
- _ = _db
- panic(0)
}
-// Thread 5. Attempt INSERT statements.
+// C comment
+// /*
+// ** Thread 5. Attempt INSERT statements.
+// */
func _stress_thread_4(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
var _i1, _i2, _iArg int32
var _err XError
var _db XSqlite
_err = XError{}
_db = XSqlite{}
- _i1 = i32(0)
- _i2 = i32(0)
- _iArg = int32(uintptr(_pArg))
+ _i1 = int32(0)
+ _i2 = int32(0)
+ _iArg = int32(crt.P2U(_pArg))
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(85)
+ return int32(85)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(86)
+ return int32(86)
}()
return &_err
}()) != 0 {
@@ -4684,59 +4051,58 @@ _2:
}
if _iArg != 0 {
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(88)
+ return int32(88)
}()
return &_err
}(), &_db)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(89)
+ return int32(89)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
}
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(91)
+ return int32(91)
}()
return &_err
}(), &_db, str(5799))
_i1 += 1
- if (_err.X0) != 0 {
+ if _err.Xrc != 0 {
_i2 += 1
}
- _clear_error_x(tls, &_err, i32(6))
- _clear_error_x(tls, &_err, i32(1))
+ _clear_error_x(tls, &_err, int32(6))
+ _clear_error_x(tls, &_err, int32(1))
goto _2
_3:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(100)
+ return int32(100)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(5922), _i2, _i1)
-
- _ = _err
- _ = _db
- panic(0)
}
-// Thread 6. Attempt DELETE operations.
+// C comment
+// /*
+// ** Thread 6. Attempt DELETE operations.
+// */
func _stress_thread_5(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
var _iArg, _i1, _i2 int32
var _1_i int64
@@ -4744,228 +4110,234 @@ func _stress_thread_5(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8
var _db XSqlite
_err = XError{}
_db = XSqlite{}
- _iArg = int32(uintptr(_pArg))
- _i1 = i32(0)
- _i2 = i32(0)
+ _iArg = int32(crt.P2U(_pArg))
+ _i1 = int32(0)
+ _i2 = int32(0)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(116)
+ return int32(116)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
_2:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(117)
+ return int32(117)
}()
return &_err
}()) != 0 {
goto _3
}
- _1_i = int64(_i1 % i32(4))
+ _1_i = int64(_i1 % int32(4))
if _iArg != 0 {
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(120)
+ return int32(120)
}()
return &_err
}(), &_db)
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(121)
+ return int32(121)
}()
return &_err
- }(), &_db, str(378), i32(0))
+ }(), &_db, str(378), int32(0))
}
_execsql_i64_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(123)
+ return int32(123)
}()
return &_err
}(), &_db, unsafe.Pointer(str(5946)), unsafe.Pointer(&_1_i))
_i1 += 1
- if (_err.X0) != 0 {
+ if _err.Xrc != 0 {
_i2 += 1
}
- _clear_error_x(tls, &_err, i32(6))
+ _clear_error_x(tls, &_err, int32(6))
goto _2
_3:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(128)
+ return int32(128)
}()
return &_err
}(), &_db)
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(5983), _i2, _i1)
-
- _ = _err
- _ = _db
- _ = _1_i
- panic(0)
}
func _stress2(tls *crt.TLS, _nMs int32) {
var _i int32
var _zDb *int8
- var _threads bin.T_ht
var _err XError
var _db XSqlite
+ var _threads XThreadset
var _aTask [13]TStress2Task
_aTask = [13]TStress2Task{}
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(0)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload1}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(1)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload2}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(2)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload3}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(3)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload4}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(4)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload5}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(5)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload6}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(6)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload7}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(7)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload8}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(8)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload9}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(9)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload10}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(10)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload11}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(11)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload14}))
- *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(i32(12)))).X0))) = *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, *XError, *XSqlite, int32)
- }{_stress2_workload17}))
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), 0).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload1
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(1)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload2
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(2)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload3
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(3)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload4
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(4)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload5
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(5)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload6
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(6)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload7
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(7)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload8
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(8)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload9
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(9)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload10
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(10)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload11
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(11)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload14
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
+ elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(12)).Xx = func() func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32) {
+ v := _stress2_workload17
+ return *(*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&v))
+ }()
_zDb = str(378)
_err = XError{}
_db = XSqlite{}
- _threads = bin.T_ht{}
+ _threads = XThreadset{}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(345)
+ return int32(345)
}()
return &_err
- }(), &_db, _zDb, i32(1))
+ }(), &_db, _zDb, int32(1))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(346)
+ return int32(346)
}()
return &_err
}(), &_db, str(6014))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(350)
+ return int32(350)
}()
return &_err
}(), &_db)
_setstoptime_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(352)
+ return int32(352)
}()
return &_err
}(), _nMs)
- bin.Xsqlite3_enable_shared_cache(tls, i32(1))
- _i = i32(0)
+ bin.Xsqlite3_enable_shared_cache(tls, int32(1))
+ _i = int32(0)
_8:
- if uint32(_i) >= u32(13) {
+ if uint32(_i) >= uint32(13) {
goto _11
}
- _stress2_launch_thread_loop(tls, &_err, &_threads, _zDb, *(*func(*crt.TLS, *XError, *XSqlite, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
- }{((*TStress2Task)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_aTask)) + 4*uintptr(_i))).X0)})))
+ _stress2_launch_thread_loop(tls, &_err, &_threads, _zDb, func() func(*crt.TLS, *XError, *XSqlite, int32) {
+ v := elem9((*TStress2Task)(unsafe.Pointer(&_aTask)), uintptr(_i)).Xx
+ return *(*func(*crt.TLS, *XError, *XSqlite, int32))(unsafe.Pointer(&v))
+ }())
_i += 1
goto _8
_11:
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(358)
+ return int32(358)
}()
return &_err
- }(), &_threads, _stress2_workload19, (unsafe.Pointer)(_zDb))
+ }(), &_threads, _stress2_workload19, unsafe.Pointer(_zDb))
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(359)
+ return int32(359)
}()
return &_err
- }(), &_threads, _stress2_workload19, (unsafe.Pointer)(_zDb))
+ }(), &_threads, _stress2_workload19, unsafe.Pointer(_zDb))
_join_all_threads_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(361)
+ return int32(361)
}()
return &_err
}(), &_threads)
- bin.Xsqlite3_enable_shared_cache(tls, i32(0))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(0))
_print_and_free_err(tls, &_err)
_ = _aTask
- _ = _err
- _ = _db
- _ = _threads
}
func _stress2_workload1(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
var _iTab int32
- _iTab = (_i % i32(4)) + i32(1)
+ _iTab = (_i % int32(4)) + int32(1)
_sql_script_printf_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(193)
+ return int32(193)
}()
return _pErr
}(), _pDb, str(6105), _iTab)
@@ -4975,23 +4347,23 @@ func _sql_script_printf_x(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _zFormat *
var _1_zSql *int8
var _ap []interface{}
_ap = args
- if (_pErr.X0) == i32(0) {
+ if _pErr.Xrc == int32(0) {
_1_zSql = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
- *(*int32)(unsafe.Pointer(&(_pErr.X0))) = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_pDb.X0), _1_zSql, nil, nil, (**int8)(unsafe.Pointer(&(_pErr.X2))))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_1_zSql))
+ _pErr.Xrc = bin.Xsqlite3_exec(tls, (*bin.Xsqlite3)(_pDb.Xdb), _1_zSql, nil, nil, &_pErr.XzErr)
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_1_zSql))
}
_ap = nil
}
func _stress2_workload2(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
var _iTab int32
- _iTab = (_i % i32(4)) + i32(1)
+ _iTab = (_i % int32(4)) + int32(1)
_sql_script_printf_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(200)
+ return int32(200)
}()
return _pErr
}(), _pDb, str(6158), _iTab)
@@ -4999,11 +4371,11 @@ func _stress2_workload2(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload3(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(204)
+ return int32(204)
}()
return _pErr
}(), _pDb, str(6184))
@@ -5011,11 +4383,11 @@ func _stress2_workload3(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload4(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(208)
+ return int32(208)
}()
return _pErr
}(), _pDb, str(6219))
@@ -5023,11 +4395,11 @@ func _stress2_workload4(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload5(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(212)
+ return int32(212)
}()
return _pErr
}(), _pDb, str(6252))
@@ -5035,11 +4407,11 @@ func _stress2_workload5(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload6(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(218)
+ return int32(218)
}()
return _pErr
}(), _pDb, str(6321))
@@ -5047,11 +4419,11 @@ func _stress2_workload6(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload7(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_printf_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(224)
+ return int32(224)
}()
return _pErr
}(), _pDb, str(6387), _i)
@@ -5059,11 +4431,11 @@ func _stress2_workload7(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload8(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_printf_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(231)
+ return int32(231)
}()
return _pErr
}(), _pDb, str(6469), _i)
@@ -5071,11 +4443,11 @@ func _stress2_workload8(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload9(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_printf_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(239)
+ return int32(239)
}()
return _pErr
}(), _pDb, str(6546), _i)
@@ -5083,11 +4455,11 @@ func _stress2_workload9(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload10(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_printf_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(244)
+ return int32(244)
}()
return _pErr
}(), _pDb, str(6602), _i)
@@ -5095,11 +4467,11 @@ func _stress2_workload10(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload11(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(250)
+ return int32(250)
}()
return _pErr
}(), _pDb, str(5639))
@@ -5107,11 +4479,11 @@ func _stress2_workload11(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload14(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(254)
+ return int32(254)
}()
return _pErr
}(), _pDb, str(1143))
@@ -5119,35 +4491,35 @@ func _stress2_workload14(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
func _stress2_workload17(tls *crt.TLS, _pErr *XError, _pDb *XSqlite, _i int32) {
_sql_script_printf_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(258)
+ return int32(258)
}()
return _pErr
}(), _pDb, str(6656), unsafe.Pointer(func() *int8 {
- if (_i % i32(2)) != 0 {
+ if (_i % int32(2)) != 0 {
return str(6681)
}
return str(6688)
}()))
}
-func _stress2_launch_thread_loop(tls *crt.TLS, _pErr *XError, _pThreads *bin.T_ht, _zDb *int8, _x func(*crt.TLS, *XError, *XSqlite, int32)) {
+func _stress2_launch_thread_loop(tls *crt.TLS, _pErr *XError, _pThreads *XThreadset, _zDb *int8, _x func(*crt.TLS, *XError, *XSqlite, int32)) {
var _pCtx *XStress2Ctx
- _pCtx = (*XStress2Ctx)(bin.Xsqlite3_malloc(tls, int32(u32(8))))
- *(**int8)(unsafe.Pointer(&(_pCtx.X0))) = _zDb
- *(*func(*crt.TLS, *XError, *XSqlite, int32))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32))(unsafe.Pointer(&(_pCtx.X1))))) = _x
+ _pCtx = (*XStress2Ctx)(bin.Xsqlite3_malloc(tls, int32(8)))
+ _pCtx.XzDb = _zDb
+ *(*func(*crt.TLS, *XError, *XSqlite, int32))(unsafe.Pointer(&_pCtx.XxProc)) = _x
_launch_thread_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_pErr.X1))) = func() int32 {
- if (_pErr.X0) != 0 {
- return (_pErr.X1)
+ _pErr.XiLine = func() int32 {
+ if _pErr.Xrc != 0 {
+ return _pErr.XiLine
}
- return i32(316)
+ return int32(316)
}()
return _pErr
- }(), _pThreads, _stress2_thread_wrapper, (unsafe.Pointer)(_pCtx))
+ }(), _pThreads, _stress2_thread_wrapper, unsafe.Pointer(_pCtx))
}
func _stress2_thread_wrapper(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -5158,53 +4530,50 @@ func _stress2_thread_wrapper(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r
_pCtx = (*XStress2Ctx)(_pArg)
_err = XError{}
_db = XSqlite{}
- _i1 = i32(0)
- _i2 = i32(0)
+ _i1 = int32(0)
+ _i2 = int32(0)
_0:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(291)
+ return int32(291)
}()
return &_err
}()) != 0 {
goto _1
}
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(293)
+ return int32(293)
}()
return &_err
- }(), &_db, _pCtx.X0, i32(0))
- _1_cnt = i32(0)
+ }(), &_db, _pCtx.XzDb, int32(0))
+ _1_cnt = int32(0)
_6:
- if (_err.X0) != i32(0) || _1_cnt >= i32(5) {
+ if _err.Xrc != int32(0) || _1_cnt >= int32(5) {
goto _10
}
- (*(*func(*crt.TLS, *XError, *XSqlite, int32))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
- }{(_pCtx.X1)})))(tls, &_err, &_db, _i1)
- {
- p := &_i2
- *p = (*p) + bool2int((_err.X0) == i32(0))
- sink3(*p)
- }
- _clear_error_x(tls, &_err, i32(6))
+ func() func(*crt.TLS, *XError, *XSqlite, int32) {
+ v := _pCtx.XxProc
+ return *(*func(*crt.TLS, *XError, *XSqlite, int32))(unsafe.Pointer(&v))
+ }()(tls, &_err, &_db, _i1)
+ _i2 += bool2int(_err.Xrc == int32(0))
+ _clear_error_x(tls, &_err, int32(6))
_i1 += 1
_1_cnt += 1
goto _6
_10:
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(300)
+ return int32(300)
}()
return &_err
}(), &_db)
@@ -5212,10 +4581,6 @@ _10:
_1:
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(6692), _i2, _i1)
-
- _ = _err
- _ = _db
- panic(0)
}
func _stress2_workload19(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *int8) {
@@ -5227,39 +4592,39 @@ func _stress2_workload19(tls *crt.TLS, _iTid int32, _pArg unsafe.Pointer) (r0 *i
_zDb = (*int8)(_pArg)
_0:
if _timetostop_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(267)
+ return int32(267)
}()
return &_err
}()) == 0 {
_opendb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(268)
+ return int32(268)
}()
return &_err
- }(), &_db, _zDb, i32(0))
+ }(), &_db, _zDb, int32(0))
_sql_script_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(269)
+ return int32(269)
}()
return &_err
}(), &_db, str(5718))
- _clear_error_x(tls, &_err, i32(6))
+ _clear_error_x(tls, &_err, int32(6))
_closedb_x(tls, func() *XError {
- *(*int32)(unsafe.Pointer(&(_err.X1))) = func() int32 {
- if (_err.X0) != 0 {
- return (_err.X1)
+ _err.XiLine = func() int32 {
+ if _err.Xrc != 0 {
+ return _err.XiLine
}
- return i32(271)
+ return int32(271)
}()
return &_err
}(), &_db)
@@ -5267,10 +4632,6 @@ _0:
}
_print_and_free_err(tls, &_err)
return bin.Xsqlite3_mprintf(tls, str(1166))
-
- _ = _err
- _ = _db
- panic(0)
}
var _mainØ00substArgvØ001 [3]*int8
@@ -5279,82 +4640,87 @@ func init() {
_mainØ00substArgvØ001 = [3]*int8{nil, str(6701), nil}
}
-// ************************* Public Interfaces ****************************
-
-// CAPI: Initialize the multiplex VFS shim - sqlite3_multiplex_initialize()
-//
-// Use the VFS named zOrigVfsName as the VFS that does the actual work.
-// Use the default if zOrigVfsName==NULL.
-//
-// The multiplex VFS shim is named "multiplex". It will become the default
-// VFS if makeDefault is non-zero.
-//
-// THIS ROUTINE IS NOT THREADSAFE. Call this routine exactly once
-// during start-up.
+// C comment
+// /************************** Public Interfaces *****************************/
+// /*
+// ** CAPI: Initialize the multiplex VFS shim - sqlite3_multiplex_initialize()
+// **
+// ** Use the VFS named zOrigVfsName as the VFS that does the actual work.
+// ** Use the default if zOrigVfsName==NULL.
+// **
+// ** The multiplex VFS shim is named "multiplex". It will become the default
+// ** VFS if makeDefault is non-zero.
+// **
+// ** THIS ROUTINE IS NOT THREADSAFE. Call this routine exactly once
+// ** during start-up.
+// */
func Xsqlite3_multiplex_initialize(tls *crt.TLS, _zOrigVfsName *int8, _makeDefault int32) (r0 int32) {
var _pOrigVfs *bin.Xsqlite3_vfs
- if (_gMultiplex.X4) != 0 {
- return i32(21)
+ if _gMultiplex.XisInitialized != 0 {
+ return int32(21)
}
_pOrigVfs = bin.Xsqlite3_vfs_find(tls, _zOrigVfsName)
if _pOrigVfs == nil {
- return i32(1)
+ return int32(1)
}
func() {
- if _pOrigVfs == (*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))) {
- crt.X__builtin_fprintf(tls, Xstderr, str(991), unsafe.Pointer(str(6703)), i32(1099), unsafe.Pointer((*int8)(unsafe.Pointer(&_sqlite3_multiplex_initializeØ00__func__Ø000))), unsafe.Pointer(str(6763)))
+ if _pOrigVfs == &_gMultiplex.XsThisVfs {
+ crt.X__builtin_fprintf(tls, Xstderr, str(991), unsafe.Pointer(str(6703)), int32(1099), unsafe.Pointer(&_sqlite3_multiplex_initializeØ00__func__Ø000), unsafe.Pointer(str(6763)))
crt.X__builtin_abort(tls)
}
}()
- *(*int32)(unsafe.Pointer(&(_gMultiplex.X4))) = i32(1)
- *(**bin.Xsqlite3_vfs)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_gMultiplex.X0))))) = _pOrigVfs
- *(*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))) = *_pOrigVfs
+ _gMultiplex.XisInitialized = int32(1)
+ *(**bin.Xsqlite3_vfs)(unsafe.Pointer(&_gMultiplex.XpOrigVfs)) = _pOrigVfs
+ _gMultiplex.XsThisVfs = *_pOrigVfs
{
- p := (*int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X1)))
- *p = int32(uint32(*p) + u32(8))
- sink3(*p)
- }
- *(**int8)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X4))) = str(6794)
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, *bin.Xsqlite3_file, int32, *int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X6))))) = _multiplexOpen
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int8, int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X7))))) = _multiplexDelete
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X8))))) = _multiplexAccess
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int8) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X9))))) = _multiplexFullPathname
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8) unsafe.Pointer)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X10))))) = _multiplexDlOpen
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32, *int8))(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X11))))) = _multiplexDlError
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X12))))) = _multiplexDlSym
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X13))))) = _multiplexDlClose
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X14))))) = _multiplexRandomness
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X15))))) = _multiplexSleep
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *float64) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *float64) int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X16))))) = _multiplexCurrentTime
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32, *int8) int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X17))))) = _multiplexGetLastError
- *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&((*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))).X18))))) = _multiplexCurrentTimeInt64
- *(*int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X0))) = i32(1)
- *(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X1))))) = _multiplexClose
- *(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X2))))) = _multiplexRead
- *(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X3))))) = _multiplexWrite
- *(*func(*crt.TLS, *bin.Xsqlite3_file, int64) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int64) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X4))))) = _multiplexTruncate
- *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X5))))) = _multiplexSync
- *(*func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int64) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X6))))) = _multiplexFileSize
- *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X7))))) = _multiplexLock
- *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X8))))) = _multiplexUnlock
- *(*func(*crt.TLS, *bin.Xsqlite3_file, *int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, *int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X9))))) = _multiplexCheckReservedLock
- *(*func(*crt.TLS, *bin.Xsqlite3_file, int32, unsafe.Pointer) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X10))))) = _multiplexFileControl
- *(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X11))))) = _multiplexSectorSize
- *(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2))).X12))))) = _multiplexDeviceCharacteristics
- *(*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X3))) = _gMultiplex.X2
- *(*int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X3))).X0))) = i32(2)
- *(*func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X3))).X13))))) = _multiplexShmMap
- *(*func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X3))).X14))))) = _multiplexShmLock
- *(*func(*crt.TLS, *bin.Xsqlite3_file))(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer))(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X3))).X15))))) = _multiplexShmBarrier
- *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer((*func(*crt.TLS, unsafe.Pointer, int32) int32)(unsafe.Pointer(&((*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X3))).X16))))) = _multiplexShmUnmap
- bin.Xsqlite3_vfs_register(tls, (*bin.Xsqlite3_vfs)(unsafe.Pointer(&(_gMultiplex.X1))), _makeDefault)
- bin.Xsqlite3_auto_extension(tls, *(*func(*crt.TLS))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, **int8, *bin.Xsqlite3_api_routines) int32
- }{_multiplexFuncInit})))
- return i32(0)
-}
-
-var _gMultiplex t5
+ p := &(_gMultiplex.XsThisVfs.XszOsFile)
+ *p = int32(uint32(*p) + uint32(8))
+ }
+ _gMultiplex.XsThisVfs.XzName = str(6794)
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, *bin.Xsqlite3_file, int32, *int32) int32)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxOpen))) = _multiplexOpen
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxDelete))) = _multiplexDelete
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxAccess))) = _multiplexAccess
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int8) int32)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxFullPathname))) = _multiplexFullPathname
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8) unsafe.Pointer)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxDlOpen))) = _multiplexDlOpen
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8))(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxDlError))) = _multiplexDlError
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxDlSym))) = _multiplexDlSym
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer))(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxDlClose))) = _multiplexDlClose
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxRandomness))) = _multiplexRandomness
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32) int32)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxSleep))) = _multiplexSleep
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *float64) int32)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxCurrentTime))) = _multiplexCurrentTime
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxGetLastError))) = _multiplexGetLastError
+ *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&(_gMultiplex.XsThisVfs.XxCurrentTimeInt64))) = _multiplexCurrentTimeInt64
+ _gMultiplex.XsIoMethodsV1.XiVersion = int32(1)
+ *(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxClose))) = _multiplexClose
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxRead))) = _multiplexRead
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxWrite))) = _multiplexWrite
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, int64) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxTruncate))) = _multiplexTruncate
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxSync))) = _multiplexSync
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxFileSize))) = _multiplexFileSize
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxLock))) = _multiplexLock
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxUnlock))) = _multiplexUnlock
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, *int32) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxCheckReservedLock))) = _multiplexCheckReservedLock
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, int32, unsafe.Pointer) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxFileControl))) = _multiplexFileControl
+ *(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxSectorSize))) = _multiplexSectorSize
+ *(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV1.XxDeviceCharacteristics))) = _multiplexDeviceCharacteristics
+ _gMultiplex.XsIoMethodsV2 = _gMultiplex.XsIoMethodsV1
+ _gMultiplex.XsIoMethodsV2.XiVersion = int32(2)
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV2.XxShmMap))) = _multiplexShmMap
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV2.XxShmLock))) = _multiplexShmLock
+ *(*func(*crt.TLS, *bin.Xsqlite3_file))(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV2.XxShmBarrier))) = _multiplexShmBarrier
+ *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&(_gMultiplex.XsIoMethodsV2.XxShmUnmap))) = _multiplexShmUnmap
+ bin.Xsqlite3_vfs_register(tls, &_gMultiplex.XsThisVfs, _makeDefault)
+ bin.Xsqlite3_auto_extension(tls, func() func(*crt.TLS) { v := _multiplexFuncInit; return *(*func(*crt.TLS))(unsafe.Pointer(&v)) }())
+ return int32(0)
+}
+
+// C comment
+// /************************* Global Variables **********************************/
+// /*
+// ** All global variables used by this file are containing within the following
+// ** gMultiplex structure.
+// */
+var _gMultiplex t10
var _sqlite3_multiplex_initializeØ00__func__Ø000 [29]int8
@@ -5362,11 +4728,14 @@ func init() {
crt.Xstrncpy(nil, &_sqlite3_multiplex_initializeØ00__func__Ø000[0], str(6804), 29)
}
-// This is the xOpen method used for the "multiplex" VFS.
-//
-// Most of the work is done by the underlying original VFS. This method
-// simply links the new file into the appropriate multiplex group if it is a
-// file that needs to be tracked.
+// C comment
+// /*
+// ** This is the xOpen method used for the "multiplex" VFS.
+// **
+// ** Most of the work is done by the underlying original VFS. This method
+// ** simply links the new file into the appropriate multiplex group if it is a
+// ** file that needs to be tracked.
+// */
func _multiplexOpen(tls *crt.TLS, _pVfs *bin.Xsqlite3_vfs, _zName *int8, _pConn *bin.Xsqlite3_file, _flags int32, _pOutFlags *int32) (r0 int32) {
var _rc, _nName, _sz, _9_bExists, _12_iChunk int32
var _8_sz64 int64
@@ -5375,152 +4744,152 @@ func _multiplexOpen(tls *crt.TLS, _pVfs *bin.Xsqlite3_vfs, _zName *int8, _pConn
var _pOrigVfs *bin.Xsqlite3_vfs
var _pGroup *XmultiplexGroup
var _pMultiplexOpen *XmultiplexConn
- _rc = i32(0)
+ _rc = int32(0)
_pGroup = nil
_pSubOpen = nil
- _pOrigVfs = (*bin.Xsqlite3_vfs)(_gMultiplex.X0)
- _nName = i32(0)
- _sz = i32(0)
+ _pOrigVfs = (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs)
+ _nName = int32(0)
+ _sz = int32(0)
_zToFree = nil
- crt.Xmemset(tls, (unsafe.Pointer)(_pConn), i32(0), uint32(_pVfs.X1))
+ crt.Xmemset(tls, unsafe.Pointer(_pConn), int32(0), uint32(_pVfs.XszOsFile))
func() {
- if _zName == nil && (_flags&i32(8)) == 0 {
- crt.X__builtin_fprintf(tls, Xstderr, str(991), unsafe.Pointer(str(6703)), i32(484), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiplexOpenØ00__func__Ø000))), unsafe.Pointer(str(6833)))
+ if _zName == nil && (_flags&int32(8)) == 0 {
+ crt.X__builtin_fprintf(tls, Xstderr, str(991), unsafe.Pointer(str(6703)), int32(484), unsafe.Pointer(&_multiplexOpenØ00__func__Ø000), unsafe.Pointer(str(6833)))
crt.X__builtin_abort(tls)
}
}()
_pMultiplexOpen = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _3
}
_nName = func() int32 {
if _zName != nil {
return _multiplexStrlen30(tls, _zName)
}
- return i32(0)
+ return int32(0)
}()
- _sz = int32((u32(28) + uint32(_nName)) + uint32(i32(1)))
+ _sz = int32((uint32(28) + uint32(_nName)) + uint32(1))
_pGroup = (*XmultiplexGroup)(bin.Xsqlite3_malloc64(tls, uint64(_sz)))
if _pGroup == nil {
- _rc = i32(7)
+ _rc = int32(7)
}
_3:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _7
}
_3_zUri = func() *int8 {
- if (_flags & i32(64)) != 0 {
+ if (_flags & int32(64)) != 0 {
return _zName
}
return nil
}()
- crt.Xmemset(tls, (unsafe.Pointer)(_pGroup), i32(0), uint32(_sz))
- *(**XmultiplexGroup)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pMultiplexOpen.X1))))) = _pGroup
- *(*uint8)(unsafe.Pointer(&(_pGroup.X6))) = u8(255)
- *(*uint8)(unsafe.Pointer(&(_pGroup.X7))) = uint8(bin.Xsqlite3_uri_boolean(tls, _3_zUri, str(6878), bool2int((_flags&i32(256)) == i32(0))))
- *(*uint32)(unsafe.Pointer(&(_pGroup.X5))) = uint32(int32(bin.Xsqlite3_uri_int64(tls, _3_zUri, str(6887), int64(i32(2147418112)))))
- *(*uint32)(unsafe.Pointer(&(_pGroup.X5))) = ((_pGroup.X5) + uint32(i32(65535))) & uint32(i32(-65536))
+ crt.Xmemset(tls, unsafe.Pointer(_pGroup), int32(0), uint32(_sz))
+ *(**XmultiplexGroup)(unsafe.Pointer(&_pMultiplexOpen.XpGroup)) = _pGroup
+ _pGroup.XbEnabled = uint8(255)
+ _pGroup.XbTruncate = uint8(bin.Xsqlite3_uri_boolean(tls, _3_zUri, str(6878), bool2int((_flags&int32(256)) == int32(0))))
+ _pGroup.XszChunk = uint32(int32(bin.Xsqlite3_uri_int64(tls, _3_zUri, str(6887), int64(2147418112))))
+ _pGroup.XszChunk = (_pGroup.XszChunk + uint32(65535)) & uint32(4294901760)
if _zName != nil {
- _4_p = (*int8)(unsafe.Pointer((*XmultiplexGroup)(unsafe.Pointer(uintptr((unsafe.Pointer)(_pGroup)) + 28*uintptr(i32(1))))))
- *(**int8)(unsafe.Pointer(&(_pGroup.X2))) = _4_p
- crt.Xmemcpy(tls, (unsafe.Pointer)(_pGroup.X2), (unsafe.Pointer)(_zName), uint32(_nName+i32(1)))
- *(*int32)(unsafe.Pointer(&(_pGroup.X3))) = _nName
+ _4_p = (*int8)(unsafe.Pointer(elem11(_pGroup, uintptr(1))))
+ _pGroup.XzName = _4_p
+ crt.Xmemcpy(tls, unsafe.Pointer(_pGroup.XzName), unsafe.Pointer(_zName), uint32(_nName+int32(1)))
+ _pGroup.XnName = _nName
}
- if (_pGroup.X6) == 0 {
+ if _pGroup.XbEnabled == 0 {
goto _11
}
_12:
- if (uint32(bin.Xsqlite3PendingByte()) % (_pGroup.X5)) >= ((_pGroup.X5) - uint32(i32(65536))) {
- {
- p := (*uint32)(unsafe.Pointer(&(_pGroup.X5)))
- *p = (*p) + uint32(i32(65536))
- sink0(*p)
- }
+ if (uint32(bin.Xsqlite3PendingByte()) % _pGroup.XszChunk) >= (_pGroup.XszChunk - uint32(65536)) {
+ _pGroup.XszChunk += uint32(65536)
goto _12
}
_11:
- *(*int32)(unsafe.Pointer(&(_pGroup.X4))) = _flags
- _rc = _multiplexSubFilename(tls, _pGroup, i32(1))
- if _rc != i32(0) {
+ _pGroup.Xflags = _flags
+ _rc = _multiplexSubFilename(tls, _pGroup, int32(1))
+ if _rc != int32(0) {
goto _14
}
- _pSubOpen = _multiplexSubOpen(tls, _pGroup, i32(0), &_rc, _pOutFlags, i32(0))
- if (_pSubOpen == nil) && (_rc == i32(0)) {
- _rc = i32(14)
+ _pSubOpen = _multiplexSubOpen(tls, _pGroup, int32(0), &_rc, _pOutFlags, int32(0))
+ if (_pSubOpen == nil) && (_rc == int32(0)) {
+ _rc = int32(14)
}
_14:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _17
}
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X6)})))(tls, _pSubOpen, &_8_sz64)
- if _rc != i32(0) || _zName == nil {
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxFileSize
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen, &_8_sz64)
+ if _rc != int32(0) || _zName == nil {
goto _19
}
- if (_flags & i32(16384)) != 0 {
- *(*uint8)(unsafe.Pointer(&(_pGroup.X6))) = uint8(i32(0))
+ if (_flags & int32(16384)) != 0 {
+ _pGroup.XbEnabled = 0
goto _29
}
- if _8_sz64 != int64(i32(0)) {
+ if _8_sz64 != (0) {
goto _22
}
- if (_flags & i32(2048)) == 0 {
+ if (_flags & int32(2048)) == 0 {
goto _23
}
- _12_iChunk = i32(1)
+ _12_iChunk = int32(1)
_24:
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
- }{(_pOrigVfs.X8)})))(tls, _pOrigVfs, (*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_12_iChunk))).X1, i32(0), &_9_bExists)
- if _rc != i32(0) || _9_bExists == 0 {
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32 {
+ v := _pOrigVfs.XxAccess
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_12_iChunk)).Xz, int32(0), &_9_bExists)
+ if _rc != int32(0) || _9_bExists == 0 {
goto _26
}
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
- }{(_pOrigVfs.X7)})))(tls, _pOrigVfs, (*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_12_iChunk))).X1, i32(0))
- if _rc == i32(0) {
- _rc = _multiplexSubFilename(tls, _pGroup, preInc3(&_12_iChunk, 1))
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32 {
+ v := _pOrigVfs.XxDelete
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_12_iChunk)).Xz, int32(0))
+ if _rc == int32(0) {
+ _rc = _multiplexSubFilename(tls, _pGroup, preInc7(&_12_iChunk, 1))
}
_26:
- if (_rc == i32(0)) && _9_bExists != 0 {
+ if (_rc == int32(0)) && _9_bExists != 0 {
goto _24
}
_23:
goto _29
_22:
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
- }{(_pOrigVfs.X8)})))(tls, _pOrigVfs, (*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(i32(1)))).X1, i32(0), &_9_bExists)
- _9_bExists = bool2int(_multiplexSubSize(tls, _pGroup, i32(1), &_rc) > int64(i32(0)))
- if ((((_rc == i32(0)) && _9_bExists != 0) && (_8_sz64 == (_8_sz64 & int64(u32(4294901760))))) && (_8_sz64 > int64(i32(0)))) && (_8_sz64 != int64(_pGroup.X5)) {
- *(*uint32)(unsafe.Pointer(&(_pGroup.X5))) = uint32(int32(_8_sz64))
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32 {
+ v := _pOrigVfs.XxAccess
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(1)).Xz, int32(0), &_9_bExists)
+ _9_bExists = bool2int(_multiplexSubSize(tls, _pGroup, int32(1), &_rc) > (0))
+ if ((((_rc == int32(0)) && _9_bExists != 0) && (_8_sz64 == (_8_sz64 & int64(4294901760)))) && (_8_sz64 > (0))) && (_8_sz64 != int64(_pGroup.XszChunk)) {
+ _pGroup.XszChunk = uint32(int32(_8_sz64))
goto _38
}
- if ((_rc == i32(0)) && (_9_bExists == 0)) && (_8_sz64 > int64(_pGroup.X5)) {
- *(*uint8)(unsafe.Pointer(&(_pGroup.X6))) = uint8(i32(0))
+ if ((_rc == int32(0)) && (_9_bExists == 0)) && (_8_sz64 > int64(_pGroup.XszChunk)) {
+ _pGroup.XbEnabled = 0
}
_38:
_29:
_19:
_17:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _39
}
- if ((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X0) == i32(1) {
- *(**bin.Xsqlite3_io_methods)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*bin.Xsqlite3_file)(unsafe.Pointer(&(_pMultiplexOpen.X0))).X0))))) = (*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X2)))
+ if ((*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XiVersion) == int32(1) {
+ *(**bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_pMultiplexOpen.Xbase.XpMethods))) = &_gMultiplex.XsIoMethodsV1
goto _41
}
- *(**bin.Xsqlite3_io_methods)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*bin.Xsqlite3_file)(unsafe.Pointer(&(_pMultiplexOpen.X0))).X0))))) = (*bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_gMultiplex.X3)))
+ *(**bin.Xsqlite3_io_methods)(unsafe.Pointer(&(_pMultiplexOpen.Xbase.XpMethods))) = &_gMultiplex.XsIoMethodsV2
_41:
goto _42
_39:
_multiplexFreeComponents(tls, _pGroup)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_pGroup))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_pGroup))
_42:
_7:
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zToFree))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zToFree))
return _rc
}
@@ -5530,99 +4899,102 @@ func init() {
crt.Xstrncpy(nil, &_multiplexOpenØ00__func__Ø000[0], str(6897), 14)
}
-// ************************ Utility Routines ********************************
-
-// Compute a string length that is limited to what can be stored in
-// lower 30 bits of a 32-bit signed integer.
-//
-// The value returned will never be negative. Nor will it ever be greater
-// than the actual length of the string. For very long strings (greater
-// than 1GiB) the value returned might be less than the true string length.
+// C comment
+// /************************* Utility Routines *********************************/
+// /*
+// ** Compute a string length that is limited to what can be stored in
+// ** lower 30 bits of a 32-bit signed integer.
+// **
+// ** The value returned will never be negative. Nor will it ever be greater
+// ** than the actual length of the string. For very long strings (greater
+// ** than 1GiB) the value returned might be less than the true string length.
+// */
func _multiplexStrlen30(tls *crt.TLS, _z *int8) (r0 int32) {
var _z2 *int8
_z2 = _z
if _z == nil {
- return i32(0)
+ return int32(0)
}
_0:
if (*_z2) != 0 {
*(*uintptr)(unsafe.Pointer(&_z2)) += uintptr(1)
goto _0
}
- return i32(1073741823) & int32((uintptr(unsafe.Pointer(_z2))-uintptr(unsafe.Pointer(_z)))/1)
+ return int32(1073741823) & int32(uintptr(unsafe.Pointer(_z2))-uintptr(unsafe.Pointer(_z)))
}
-// Compute the filename for the iChunk-th chunk
+// C comment
+// /* Compute the filename for the iChunk-th chunk
+// */
func _multiplexSubFilename(tls *crt.TLS, _pGroup *XmultiplexGroup, _iChunk int32) (r0 int32) {
var _3_n int32
var _3_z *int8
- var _1_p *bin.XanalysisInfo
- if _iChunk < (_pGroup.X1) {
+ var _1_p *TmultiplexReal
+ if _iChunk < _pGroup.XnReal {
goto _0
}
- _1_p = (*bin.XanalysisInfo)(bin.Xsqlite3_realloc64(tls, _pGroup.X0, uint64(uint32(_iChunk+i32(1))*u32(8))))
+ _1_p = (*TmultiplexReal)(bin.Xsqlite3_realloc64(tls, _pGroup.XaReal, uint64(uint32(_iChunk+int32(1))*uint32(8))))
if _1_p == nil {
- return i32(7)
+ return int32(7)
}
- crt.Xmemset(tls, (unsafe.Pointer)((*bin.XanalysisInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_p))+8*uintptr(_pGroup.X1)))), i32(0), u32(8)*uint32((_iChunk+i32(1))-(_pGroup.X1)))
- *(**bin.XanalysisInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pGroup.X0))))) = _1_p
- *(*int32)(unsafe.Pointer(&(_pGroup.X1))) = _iChunk + i32(1)
+ crt.Xmemset(tls, unsafe.Pointer(elem12(_1_p, uintptr(_pGroup.XnReal))), int32(0), uint32(8)*uint32((_iChunk+int32(1))-_pGroup.XnReal))
+ *(**TmultiplexReal)(unsafe.Pointer(&_pGroup.XaReal)) = _1_p
+ _pGroup.XnReal = _iChunk + int32(1)
_0:
- if (_pGroup.X2) == nil || ((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk))).X1) != nil {
+ if _pGroup.XzName == nil || (elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz) != nil {
goto _3
}
- _3_n = _pGroup.X3
- *(**int8)(unsafe.Pointer(&((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0) + 8*uintptr(_iChunk))).X1))) = store6(&_3_z, (*int8)(bin.Xsqlite3_malloc64(tls, uint64(_3_n+i32(5)))))
+ _3_n = _pGroup.XnName
+ elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz = store2(&_3_z, (*int8)(bin.Xsqlite3_malloc64(tls, uint64(_3_n+int32(5)))))
if _3_z == nil {
- return i32(7)
+ return int32(7)
}
- _multiplexFilename(tls, _pGroup.X2, _pGroup.X3, _pGroup.X4, _iChunk, _3_z)
+ _multiplexFilename(tls, _pGroup.XzName, _pGroup.XnName, _pGroup.Xflags, _iChunk, _3_z)
_3:
- return i32(0)
-}
-
-// Generate the file-name for chunk iChunk of the group with base name
-// zBase. The file-name is written to buffer zOut before returning. Buffer
-// zOut must be allocated by the caller so that it is at least (nBase+5)
-// bytes in size, where nBase is the length of zBase, not including the
-// nul-terminator.
-//
-// If iChunk is 0 (or 400 - the number for the first journal file chunk),
-// the output is a copy of the input string. Otherwise, if
-// SQLITE_ENABLE_8_3_NAMES is not defined or the input buffer does not contain
-// a "." character, then the output is a copy of the input string with the
-// three-digit zero-padded decimal representation if iChunk appended to it.
-// For example:
-//
-// zBase="test.db", iChunk=4 -> zOut="test.db004"
-//
-// Or, if SQLITE_ENABLE_8_3_NAMES is defined and the input buffer contains
-// a "." character, then everything after the "." is replaced by the
-// three-digit representation of iChunk.
-//
-// zBase="test.db", iChunk=4 -> zOut="test.004"
-//
-// The output buffer string is terminated by 2 0x00 bytes. This makes it safe
-// to pass to sqlite3_uri_parameter() and similar.
+ return int32(0)
+}
+
+// C comment
+// /*
+// ** Generate the file-name for chunk iChunk of the group with base name
+// ** zBase. The file-name is written to buffer zOut before returning. Buffer
+// ** zOut must be allocated by the caller so that it is at least (nBase+5)
+// ** bytes in size, where nBase is the length of zBase, not including the
+// ** nul-terminator.
+// **
+// ** If iChunk is 0 (or 400 - the number for the first journal file chunk),
+// ** the output is a copy of the input string. Otherwise, if
+// ** SQLITE_ENABLE_8_3_NAMES is not defined or the input buffer does not contain
+// ** a "." character, then the output is a copy of the input string with the
+// ** three-digit zero-padded decimal representation if iChunk appended to it.
+// ** For example:
+// **
+// ** zBase="test.db", iChunk=4 -> zOut="test.db004"
+// **
+// ** Or, if SQLITE_ENABLE_8_3_NAMES is defined and the input buffer contains
+// ** a "." character, then everything after the "." is replaced by the
+// ** three-digit representation of iChunk.
+// **
+// ** zBase="test.db", iChunk=4 -> zOut="test.004"
+// **
+// ** The output buffer string is terminated by 2 0x00 bytes. This makes it safe
+// ** to pass to sqlite3_uri_parameter() and similar.
+// */
func _multiplexFilename(tls *crt.TLS, _zBase *int8, _nBase int32, _flags int32, _iChunk int32, _zOut *int8) {
var _n int32
_n = _nBase
- crt.Xmemcpy(tls, (unsafe.Pointer)(_zOut), (unsafe.Pointer)(_zBase), uint32(_n+i32(1)))
- if (_iChunk != i32(0)) && (_iChunk <= i32(299)) {
- bin.Xsqlite3_snprintf(tls, i32(4), (*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut))+1*uintptr(_n))), str(6911), _iChunk)
- {
- p := &_n
- *p = (*p) + i32(3)
- sink3(*p)
- }
+ crt.Xmemcpy(tls, unsafe.Pointer(_zOut), unsafe.Pointer(_zBase), uint32(_n+int32(1)))
+ if (_iChunk != int32(0)) && (_iChunk <= int32(299)) {
+ bin.Xsqlite3_snprintf(tls, int32(4), elem2(_zOut, uintptr(_n)), str(6911), _iChunk)
+ _n += int32(3)
}
func() {
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(_n)))) != i32(0) {
- crt.X__builtin_fprintf(tls, Xstderr, str(991), unsafe.Pointer(str(6703)), i32(250), unsafe.Pointer((*int8)(unsafe.Pointer(&_multiplexFilenameØ00__func__Ø000))), unsafe.Pointer(str(6916)))
+ if int32(*elem2(_zOut, uintptr(_n))) != int32(0) {
+ crt.X__builtin_fprintf(tls, Xstderr, str(991), unsafe.Pointer(str(6703)), int32(250), unsafe.Pointer(&_multiplexFilenameØ00__func__Ø000), unsafe.Pointer(str(6916)))
crt.X__builtin_abort(tls)
}
}()
- *(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_zOut)) + 1*uintptr(_n+i32(1)))) = int8(i32(0))
+ *elem2(_zOut, uintptr(_n+int32(1))) = 0
}
var _multiplexFilenameØ00__func__Ø000 [18]int8
@@ -5631,341 +5003,364 @@ func init() {
crt.Xstrncpy(nil, &_multiplexFilenameØ00__func__Ø000[0], str(6930), 18)
}
-// Translate an sqlite3_file* that is really a multiplexGroup* into
-// the sqlite3_file* for the underlying original VFS.
-//
-// For chunk 0, the pGroup->flags determines whether or not a new file
-// is created if it does not already exist. For chunks 1 and higher, the
-// file is created only if createFlag is 1.
+// C comment
+// /* Translate an sqlite3_file* that is really a multiplexGroup* into
+// ** the sqlite3_file* for the underlying original VFS.
+// **
+// ** For chunk 0, the pGroup->flags determines whether or not a new file
+// ** is created if it does not already exist. For chunks 1 and higher, the
+// ** file is created only if createFlag is 1.
+// */
func _multiplexSubOpen(tls *crt.TLS, _pGroup *XmultiplexGroup, _iChunk int32, _rc *int32, _pOutFlags *int32, _createFlag int32) (r0 *bin.Xsqlite3_file) {
var _1_flags, _1_bExists int32
var _pSubOpen *bin.Xsqlite3_file
var _pOrigVfs *bin.Xsqlite3_vfs
_pSubOpen = nil
- _pOrigVfs = (*bin.Xsqlite3_vfs)(_gMultiplex.X0)
+ _pOrigVfs = (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs)
*_rc = _multiplexSubFilename(tls, _pGroup, _iChunk)
- if (*_rc) != i32(0) || store7(&_pSubOpen, (*bin.Xsqlite3_file)((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk))).X0)) != nil {
+ if (*_rc) != int32(0) || store13(&_pSubOpen, (*bin.Xsqlite3_file)(elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xp)) != nil {
goto _1
}
- _1_flags = _pGroup.X4
+ _1_flags = _pGroup.Xflags
if _createFlag != 0 {
- {
- p := &_1_flags
- *p = (*p) | i32(4)
- sink3(*p)
- }
+ _1_flags |= int32(4)
goto _7
}
- if _iChunk == i32(0) {
+ if _iChunk == int32(0) {
goto _7
}
- if ((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0) + 8*uintptr(_iChunk))).X1) == nil {
+ if (elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz) == nil {
return nil
}
- *_rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
- }{(_pOrigVfs.X8)})))(tls, _pOrigVfs, (*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk))).X1, i32(0), &_1_bExists)
+ *_rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32 {
+ v := _pOrigVfs.XxAccess
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz, int32(0), &_1_bExists)
if (*_rc) == 0 && _1_bExists != 0 {
goto _9
}
if (*_rc) != 0 {
- bin.Xsqlite3_log(tls, *_rc, str(6948), unsafe.Pointer((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk))).X1))
+ bin.Xsqlite3_log(tls, *_rc, str(6948), unsafe.Pointer(elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz))
}
return nil
_9:
- {
- p := &_1_flags
- *p = (*p) & i32(-5)
- sink3(*p)
- }
+ _1_flags &= int32(-5)
_7:
- _pSubOpen = (*bin.Xsqlite3_file)(bin.Xsqlite3_malloc64(tls, uint64(_pOrigVfs.X1)))
+ _pSubOpen = (*bin.Xsqlite3_file)(bin.Xsqlite3_malloc64(tls, uint64(_pOrigVfs.XszOsFile)))
if _pSubOpen == nil {
- *_rc = i32(3082)
+ *_rc = int32(3082)
return nil
}
- *(**bin.Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0) + 8*uintptr(_iChunk))).X0))))) = _pSubOpen
- *_rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, *bin.Xsqlite3_file, int32, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32
- }{(_pOrigVfs.X6)})))(tls, _pOrigVfs, (*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk))).X1, _pSubOpen, _1_flags, _pOutFlags)
- if (*_rc) != i32(0) {
- bin.Xsqlite3_log(tls, *_rc, str(6982), unsafe.Pointer((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk))).X1))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_pSubOpen))
- *(**bin.Xsqlite3_file)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0) + 8*uintptr(_iChunk))).X0))))) = nil
+ *(**bin.Xsqlite3_file)(unsafe.Pointer(&(elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xp))) = _pSubOpen
+ *_rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, *bin.Xsqlite3_file, int32, *int32) int32 {
+ v := _pOrigVfs.XxOpen
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, *bin.Xsqlite3_file, int32, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz, _pSubOpen, _1_flags, _pOutFlags)
+ if (*_rc) != int32(0) {
+ bin.Xsqlite3_log(tls, *_rc, str(6982), unsafe.Pointer(elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_pSubOpen))
+ *(**bin.Xsqlite3_file)(unsafe.Pointer(&(elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xp))) = nil
return nil
}
_1:
return _pSubOpen
}
-// Return the size, in bytes, of chunk number iChunk. If that chunk
-// does not exist, then return 0. This function does not distingish between
-// non-existant files and zero-length files.
+// C comment
+// /*
+// ** Return the size, in bytes, of chunk number iChunk. If that chunk
+// ** does not exist, then return 0. This function does not distingish between
+// ** non-existant files and zero-length files.
+// */
func _multiplexSubSize(tls *crt.TLS, _pGroup *XmultiplexGroup, _iChunk int32, _rc *int32) (r0 int64) {
var _sz int64
var _pSub *bin.Xsqlite3_file
- _sz = i64(0)
+ _sz = int64(0)
if (*_rc) != 0 {
- return int64(i32(0))
+ return 0
}
- _pSub = _multiplexSubOpen(tls, _pGroup, _iChunk, _rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSub = _multiplexSubOpen(tls, _pGroup, _iChunk, _rc, nil, int32(0))
if _pSub == nil {
- return int64(i32(0))
+ return 0
}
- *_rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{((*bin.Xsqlite3_io_methods)(_pSub.X0).X6)})))(tls, _pSub, &_sz)
+ *_rc = func() func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSub.XpMethods).XxFileSize
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSub, &_sz)
return _sz
}
-// Deallocate memory held by a multiplexGroup
+// C comment
+// /*
+// ** Deallocate memory held by a multiplexGroup
+// */
func _multiplexFreeComponents(tls *crt.TLS, _pGroup *XmultiplexGroup) {
var _i int32
- _i = i32(0)
+ _i = int32(0)
_0:
- if _i >= (_pGroup.X1) {
+ if _i >= _pGroup.XnReal {
goto _3
}
_multiplexSubClose(tls, _pGroup, _i, nil)
_i += 1
goto _0
_3:
- bin.Xsqlite3_free(tls, _pGroup.X0)
- *(**bin.XanalysisInfo)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_pGroup.X0))))) = nil
- *(*int32)(unsafe.Pointer(&(_pGroup.X1))) = i32(0)
+ bin.Xsqlite3_free(tls, _pGroup.XaReal)
+ *(**TmultiplexReal)(unsafe.Pointer(&_pGroup.XaReal)) = nil
+ _pGroup.XnReal = int32(0)
}
-// Close a single sub-file in the connection group.
+// C comment
+// /*
+// ** Close a single sub-file in the connection group.
+// */
func _multiplexSubClose(tls *crt.TLS, _pGroup *XmultiplexGroup, _iChunk int32, _pOrigVfs *bin.Xsqlite3_vfs) {
var _pSubOpen *bin.Xsqlite3_file
- _pSubOpen = (*bin.Xsqlite3_file)((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0) + 8*uintptr(_iChunk))).X0)
+ _pSubOpen = (*bin.Xsqlite3_file)(elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xp)
if _pSubOpen == nil {
goto _0
}
- (*(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X1)})))(tls, _pSubOpen)
- if (_pOrigVfs != nil) && (((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0) + 8*uintptr(_iChunk))).X1) != nil) {
- (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
- }{(_pOrigVfs.X7)})))(tls, _pOrigVfs, (*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk))).X1, i32(0))
- }
- bin.Xsqlite3_free(tls, (*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk))).X0)
+ func() func(*crt.TLS, *bin.Xsqlite3_file) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxClose
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen)
+ if (_pOrigVfs != nil) && ((elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz) != nil) {
+ func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32 {
+ v := _pOrigVfs.XxDelete
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz, int32(0))
+ }
+ bin.Xsqlite3_free(tls, elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xp)
_0:
- bin.Xsqlite3_free(tls, (unsafe.Pointer)((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk))).X1))
- crt.Xmemset(tls, (unsafe.Pointer)((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0)+8*uintptr(_iChunk)))), i32(0), u32(8))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk)).Xz))
+ crt.Xmemset(tls, unsafe.Pointer(elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_iChunk))), int32(0), uint32(8))
}
-// This is the xDelete method used for the "multiplex" VFS.
-// It attempts to delete the filename specified.
+// C comment
+// /*
+// ** This is the xDelete method used for the "multiplex" VFS.
+// ** It attempts to delete the filename specified.
+// */
func _multiplexDelete(tls *crt.TLS, _pVfs *bin.Xsqlite3_vfs, _zName *int8, _syncDir int32) (r0 int32) {
var _rc, _1_nName, _3_iChunk, _3_bExists int32
var _1_z *int8
var _pOrigVfs *bin.Xsqlite3_vfs
- _pOrigVfs = (*bin.Xsqlite3_vfs)(_gMultiplex.X0)
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
- }{(_pOrigVfs.X7)})))(tls, _pOrigVfs, _zName, _syncDir)
- if _rc != i32(0) {
+ _pOrigVfs = (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs)
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32 {
+ v := _pOrigVfs.XxDelete
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, _zName, _syncDir)
+ if _rc != int32(0) {
goto _0
}
_1_nName = int32(crt.Xstrlen(tls, _zName))
- _1_z = (*int8)(bin.Xsqlite3_malloc64(tls, uint64(_1_nName+i32(5))))
+ _1_z = (*int8)(bin.Xsqlite3_malloc64(tls, uint64(_1_nName+int32(5))))
if _1_z == nil {
- _rc = i32(3082)
+ _rc = int32(3082)
goto _2
}
- _3_iChunk = i32(0)
+ _3_iChunk = int32(0)
_3:
- _multiplexFilename(tls, _zName, _1_nName, i32(2048), preInc3(&_3_iChunk, 1), _1_z)
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
- }{(_pOrigVfs.X8)})))(tls, _pOrigVfs, _1_z, i32(0), &_3_bExists)
- if (_rc == i32(0)) && _3_bExists != 0 {
+ _multiplexFilename(tls, _zName, _1_nName, int32(2048), preInc7(&_3_iChunk, 1), _1_z)
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32 {
+ v := _pOrigVfs.XxAccess
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, _1_z, int32(0), &_3_bExists)
+ if (_rc == int32(0)) && _3_bExists != 0 {
goto _3
}
_5:
- if (_rc == i32(0)) && (_3_iChunk > i32(1)) {
- _multiplexFilename(tls, _zName, _1_nName, i32(2048), preInc3(&_3_iChunk, -1), _1_z)
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
- }{(_pOrigVfs.X7)})))(tls, _pOrigVfs, _1_z, _syncDir)
+ if (_rc == int32(0)) && (_3_iChunk > int32(1)) {
+ _multiplexFilename(tls, _zName, _1_nName, int32(2048), preInc7(&_3_iChunk, -1), _1_z)
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32 {
+ v := _pOrigVfs.XxDelete
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, _1_z, _syncDir)
goto _5
}
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _8
}
- _3_iChunk = i32(0)
+ _3_iChunk = int32(0)
_9:
- _multiplexFilename(tls, _zName, _1_nName, i32(524288), preInc3(&_3_iChunk, 1), _1_z)
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
- }{(_pOrigVfs.X8)})))(tls, _pOrigVfs, _1_z, i32(0), &_3_bExists)
- if (_rc == i32(0)) && _3_bExists != 0 {
+ _multiplexFilename(tls, _zName, _1_nName, int32(524288), preInc7(&_3_iChunk, 1), _1_z)
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32 {
+ v := _pOrigVfs.XxAccess
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, _1_z, int32(0), &_3_bExists)
+ if (_rc == int32(0)) && _3_bExists != 0 {
goto _9
}
_11:
- if (_rc == i32(0)) && (_3_iChunk > i32(1)) {
- _multiplexFilename(tls, _zName, _1_nName, i32(524288), preInc3(&_3_iChunk, -1), _1_z)
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
- }{(_pOrigVfs.X7)})))(tls, _pOrigVfs, _1_z, _syncDir)
+ if (_rc == int32(0)) && (_3_iChunk > int32(1)) {
+ _multiplexFilename(tls, _zName, _1_nName, int32(524288), preInc7(&_3_iChunk, -1), _1_z)
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32 {
+ v := _pOrigVfs.XxDelete
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pOrigVfs, _1_z, _syncDir)
goto _11
}
_8:
_2:
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_1_z))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_1_z))
_0:
return _rc
}
func _multiplexAccess(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b *int8, _c int32, _d *int32) (r0 int32) {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X8)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b, _c, _d)
+ return func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32 {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxAccess
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b, _c, _d)
}
func _multiplexFullPathname(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b *int8, _c int32, _d *int8) (r0 int32) {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X9)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b, _c, _d)
+ return func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int8) int32 {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxFullPathname
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8, int32, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b, _c, _d)
}
func _multiplexDlOpen(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b *int8) (r0 unsafe.Pointer) {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8) unsafe.Pointer)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X10)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b)
+ return func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int8) unsafe.Pointer {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxDlOpen
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int8) unsafe.Pointer)(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b)
}
func _multiplexDlError(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b int32, _c *int8) {
- (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8)
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X11)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b, _c)
+ func() func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxDlError
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8))(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b, _c)
}
func _multiplexDlSym(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b unsafe.Pointer, _c *int8) (r0 func(*crt.TLS)) {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS)
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X12)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b, _c)
+ return func() func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS) {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxDlSym
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer, *int8) func(*crt.TLS))(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b, _c)
}
func _multiplexDlClose(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b unsafe.Pointer) {
- (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X13)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b)
+ func() func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer) {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxDlClose
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, unsafe.Pointer))(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b)
}
func _multiplexRandomness(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b int32, _c *int8) (r0 int32) {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X14)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b, _c)
+ return func() func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32 {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxRandomness
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b, _c)
}
func _multiplexSleep(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b int32) (r0 int32) {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X15)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b)
+ return func() func(*crt.TLS, *bin.Xsqlite3_vfs, int32) int32 {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxSleep
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b)
}
func _multiplexCurrentTime(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b *float64) (r0 int32) {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *float64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *float64) int32
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X16)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b)
+ return func() func(*crt.TLS, *bin.Xsqlite3_vfs, *float64) int32 {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxCurrentTime
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *float64) int32)(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b)
}
func _multiplexGetLastError(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b int32, _c *int8) (r0 int32) {
- if (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X17)}))) != nil {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X17)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b, _c)
+ if ((*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxGetLastError) != nil {
+ return func() func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32 {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxGetLastError
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, int32, *int8) int32)(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b, _c)
}
- return i32(0)
+ return int32(0)
}
func _multiplexCurrentTimeInt64(tls *crt.TLS, _a *bin.Xsqlite3_vfs, _b *int64) (r0 int32) {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{((*bin.Xsqlite3_vfs)(_gMultiplex.X0).X18)})))(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.X0), _b)
-}
-
-// xClose requests get passed through to the original VFS.
-// We loop over all open chunk handles and close them.
-// The group structure for this file is unlinked from
-// our list of groups and freed.
+ return func() func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32 {
+ v := (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs).XxCurrentTimeInt64
+ return *(*func(*crt.TLS, *bin.Xsqlite3_vfs, *int64) int32)(unsafe.Pointer(&v))
+ }()(tls, (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs), _b)
+}
+
+// C comment
+// /* xClose requests get passed through to the original VFS.
+// ** We loop over all open chunk handles and close them.
+// ** The group structure for this file is unlinked from
+// ** our list of groups and freed.
+// */
func _multiplexClose(tls *crt.TLS, _pConn *bin.Xsqlite3_file) (r0 int32) {
var _rc int32
var _pGroup *XmultiplexGroup
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pGroup = (*XmultiplexGroup)(_p.X1)
- _rc = i32(0)
+ _pGroup = (*XmultiplexGroup)(_p.XpGroup)
+ _rc = int32(0)
_multiplexFreeComponents(tls, _pGroup)
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_pGroup))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_pGroup))
return _rc
}
-// Pass xRead requests thru to the original VFS after
-// determining the correct chunk to operate on.
-// Break up reads across chunk boundaries.
+// C comment
+// /* Pass xRead requests thru to the original VFS after
+// ** determining the correct chunk to operate on.
+// ** Break up reads across chunk boundaries.
+// */
func _multiplexRead(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _pBuf unsafe.Pointer, _iAmt int32, _iOfst int64) (r0 int32) {
var _rc, _5_i, _6_extra int32
var _1_pSubOpen, _5_pSubOpen *bin.Xsqlite3_file
var _pGroup *XmultiplexGroup
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pGroup = (*XmultiplexGroup)(_p.X1)
- _rc = i32(0)
- if (_pGroup.X6) != 0 {
+ _pGroup = (*XmultiplexGroup)(_p.XpGroup)
+ _rc = int32(0)
+ if _pGroup.XbEnabled != 0 {
goto _0
}
- _1_pSubOpen = _multiplexSubOpen(tls, _pGroup, i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _1_pSubOpen = _multiplexSubOpen(tls, _pGroup, int32(0), &_rc, nil, int32(0))
if _1_pSubOpen == nil {
- _rc = i32(266)
+ _rc = int32(266)
goto _2
}
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- }{((*bin.Xsqlite3_io_methods)(_1_pSubOpen.X0).X2)})))(tls, _1_pSubOpen, _pBuf, _iAmt, _iOfst)
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_1_pSubOpen.XpMethods).XxRead
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _1_pSubOpen, _pBuf, _iAmt, _iOfst)
_2:
goto _3
_0:
_4:
- if _iAmt <= i32(0) {
+ if _iAmt <= int32(0) {
goto _5
}
- _5_i = int32(_iOfst / int64(_pGroup.X5))
- _5_pSubOpen = _multiplexSubOpen(tls, _pGroup, _5_i, &_rc, (*int32)(unsafe.Pointer(nil)), i32(1))
+ _5_i = int32(_iOfst / int64(_pGroup.XszChunk))
+ _5_pSubOpen = _multiplexSubOpen(tls, _pGroup, _5_i, &_rc, nil, int32(1))
if _5_pSubOpen == nil {
goto _6
}
- _6_extra = int32(uint32(int32(_iOfst%int64(_pGroup.X5))+_iAmt) - (_pGroup.X5))
- if _6_extra < i32(0) {
- _6_extra = i32(0)
+ _6_extra = int32(uint32(int32(_iOfst%int64(_pGroup.XszChunk))+_iAmt) - _pGroup.XszChunk)
+ if _6_extra < int32(0) {
+ _6_extra = int32(0)
}
- {
- p := &_iAmt
- *p = (*p) - _6_extra
- sink3(*p)
- }
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- }{((*bin.Xsqlite3_io_methods)(_5_pSubOpen.X0).X2)})))(tls, _5_pSubOpen, _pBuf, _iAmt, _iOfst%int64(_pGroup.X5))
- if _rc != i32(0) {
+ _iAmt -= _6_extra
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_5_pSubOpen.XpMethods).XxRead
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _5_pSubOpen, _pBuf, _iAmt, _iOfst%int64(_pGroup.XszChunk))
+ if _rc != int32(0) {
goto _5
}
- _pBuf = (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(_pBuf))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_iAmt))))))))
- {
- p := &_iOfst
- *p = (*p) + int64(_iAmt)
- sink4(*p)
- }
+ _pBuf = unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_pBuf) + uintptr(_iAmt))))
+ _iOfst += int64(_iAmt)
_iAmt = _6_extra
goto _9
_6:
- _rc = i32(266)
+ _rc = int32(266)
goto _5
_9:
goto _4
@@ -5974,58 +5369,54 @@ _3:
return _rc
}
-// Pass xWrite requests thru to the original VFS after
-// determining the correct chunk to operate on.
-// Break up writes across chunk boundaries.
+// C comment
+// /* Pass xWrite requests thru to the original VFS after
+// ** determining the correct chunk to operate on.
+// ** Break up writes across chunk boundaries.
+// */
func _multiplexWrite(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _pBuf unsafe.Pointer, _iAmt int32, _iOfst int64) (r0 int32) {
var _rc, _5_i, _6_extra int32
var _1_pSubOpen, _5_pSubOpen *bin.Xsqlite3_file
var _pGroup *XmultiplexGroup
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pGroup = (*XmultiplexGroup)(_p.X1)
- _rc = i32(0)
- if (_pGroup.X6) != 0 {
+ _pGroup = (*XmultiplexGroup)(_p.XpGroup)
+ _rc = int32(0)
+ if _pGroup.XbEnabled != 0 {
goto _0
}
- _1_pSubOpen = _multiplexSubOpen(tls, _pGroup, i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _1_pSubOpen = _multiplexSubOpen(tls, _pGroup, int32(0), &_rc, nil, int32(0))
if _1_pSubOpen == nil {
- _rc = i32(778)
+ _rc = int32(778)
goto _2
}
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- }{((*bin.Xsqlite3_io_methods)(_1_pSubOpen.X0).X3)})))(tls, _1_pSubOpen, _pBuf, _iAmt, _iOfst)
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_1_pSubOpen.XpMethods).XxWrite
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _1_pSubOpen, _pBuf, _iAmt, _iOfst)
_2:
goto _3
_0:
_4:
- if _rc != i32(0) || _iAmt <= i32(0) {
+ if _rc != int32(0) || _iAmt <= int32(0) {
goto _5
}
- _5_i = int32(_iOfst / int64(_pGroup.X5))
- _5_pSubOpen = _multiplexSubOpen(tls, _pGroup, _5_i, &_rc, (*int32)(unsafe.Pointer(nil)), i32(1))
+ _5_i = int32(_iOfst / int64(_pGroup.XszChunk))
+ _5_pSubOpen = _multiplexSubOpen(tls, _pGroup, _5_i, &_rc, nil, int32(1))
if _5_pSubOpen == nil {
goto _7
}
- _6_extra = int32(uint32(int32(_iOfst%int64(_pGroup.X5))+_iAmt) - (_pGroup.X5))
- if _6_extra < i32(0) {
- _6_extra = i32(0)
- }
- {
- p := &_iAmt
- *p = (*p) - _6_extra
- sink3(*p)
- }
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- }{((*bin.Xsqlite3_io_methods)(_5_pSubOpen.X0).X3)})))(tls, _5_pSubOpen, _pBuf, _iAmt, _iOfst%int64(_pGroup.X5))
- _pBuf = (unsafe.Pointer)((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(_pBuf))) + uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_iAmt))))))))
- {
- p := &_iOfst
- *p = (*p) + int64(_iAmt)
- sink4(*p)
- }
+ _6_extra = int32(uint32(int32(_iOfst%int64(_pGroup.XszChunk))+_iAmt) - _pGroup.XszChunk)
+ if _6_extra < int32(0) {
+ _6_extra = int32(0)
+ }
+ _iAmt -= _6_extra
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_5_pSubOpen.XpMethods).XxWrite
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, unsafe.Pointer, int32, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _5_pSubOpen, _pBuf, _iAmt, _iOfst%int64(_pGroup.XszChunk))
+ _pBuf = unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(_pBuf) + uintptr(_iAmt))))
+ _iOfst += int64(_iAmt)
_iAmt = _6_extra
_7:
goto _4
@@ -6034,9 +5425,11 @@ _3:
return _rc
}
-// Pass xTruncate requests thru to the original VFS after
-// determining the correct chunk to operate on. Delete any
-// chunks above the truncate mark.
+// C comment
+// /* Pass xTruncate requests thru to the original VFS after
+// ** determining the correct chunk to operate on. Delete any
+// ** chunks above the truncate mark.
+// */
func _multiplexTruncate(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _size int64) (r0 int32) {
var _rc, _4_i, _4_iBaseGroup int32
var _1_pSubOpen, _4_pSubOpen *bin.Xsqlite3_file
@@ -6044,82 +5437,88 @@ func _multiplexTruncate(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _size int64) (r
var _pGroup *XmultiplexGroup
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pGroup = (*XmultiplexGroup)(_p.X1)
- _rc = i32(0)
- if (_pGroup.X6) != 0 {
+ _pGroup = (*XmultiplexGroup)(_p.XpGroup)
+ _rc = int32(0)
+ if _pGroup.XbEnabled != 0 {
goto _0
}
- _1_pSubOpen = _multiplexSubOpen(tls, _pGroup, i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _1_pSubOpen = _multiplexSubOpen(tls, _pGroup, int32(0), &_rc, nil, int32(0))
if _1_pSubOpen == nil {
- _rc = i32(1546)
+ _rc = int32(1546)
goto _2
}
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int64) int32
- }{((*bin.Xsqlite3_io_methods)(_1_pSubOpen.X0).X4)})))(tls, _1_pSubOpen, _size)
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_1_pSubOpen.XpMethods).XxTruncate
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _1_pSubOpen, _size)
_2:
goto _3
_0:
- _4_iBaseGroup = int32(_size / int64(_pGroup.X5))
- _4_pOrigVfs = (*bin.Xsqlite3_vfs)(_gMultiplex.X0)
- _4_i = (_pGroup.X1) - i32(1)
+ _4_iBaseGroup = int32(_size / int64(_pGroup.XszChunk))
+ _4_pOrigVfs = (*bin.Xsqlite3_vfs)(_gMultiplex.XpOrigVfs)
+ _4_i = _pGroup.XnReal - int32(1)
_4:
- if _4_i <= _4_iBaseGroup || _rc != i32(0) {
+ if _4_i <= _4_iBaseGroup || _rc != int32(0) {
goto _8
}
- if (_pGroup.X7) != 0 {
+ if _pGroup.XbTruncate != 0 {
_multiplexSubClose(tls, _pGroup, _4_i, _4_pOrigVfs)
goto _10
}
- _4_pSubOpen = _multiplexSubOpen(tls, _pGroup, _4_i, &_rc, nil, i32(0))
+ _4_pSubOpen = _multiplexSubOpen(tls, _pGroup, _4_i, &_rc, nil, int32(0))
if _4_pSubOpen != nil {
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int64) int32
- }{((*bin.Xsqlite3_io_methods)(_4_pSubOpen.X0).X4)})))(tls, _4_pSubOpen, int64(i32(0)))
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_4_pSubOpen.XpMethods).XxTruncate
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _4_pSubOpen, 0)
}
_10:
_4_i -= 1
goto _4
_8:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _12
}
- _4_pSubOpen = _multiplexSubOpen(tls, _pGroup, _4_iBaseGroup, &_rc, nil, i32(0))
+ _4_pSubOpen = _multiplexSubOpen(tls, _pGroup, _4_iBaseGroup, &_rc, nil, int32(0))
if _4_pSubOpen != nil {
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int64) int32
- }{((*bin.Xsqlite3_io_methods)(_4_pSubOpen.X0).X4)})))(tls, _4_pSubOpen, _size%int64(_pGroup.X5))
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_4_pSubOpen.XpMethods).XxTruncate
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _4_pSubOpen, _size%int64(_pGroup.XszChunk))
}
_12:
if _rc != 0 {
- _rc = i32(1546)
+ _rc = int32(1546)
}
_3:
return _rc
}
-// Pass xSync requests through to the original VFS without change
+// C comment
+// /* Pass xSync requests through to the original VFS without change
+// */
func _multiplexSync(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _flags int32) (r0 int32) {
var _rc, _i, _2_rc2 int32
var _1_pSubOpen *bin.Xsqlite3_file
var _pGroup *XmultiplexGroup
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pGroup = (*XmultiplexGroup)(_p.X1)
- _rc = i32(0)
- _i = i32(0)
+ _pGroup = (*XmultiplexGroup)(_p.XpGroup)
+ _rc = int32(0)
+ _i = int32(0)
_0:
- if _i >= (_pGroup.X1) {
+ if _i >= _pGroup.XnReal {
goto _3
}
- _1_pSubOpen = (*bin.Xsqlite3_file)((*bin.XanalysisInfo)(unsafe.Pointer(uintptr(_pGroup.X0) + 8*uintptr(_i))).X0)
+ _1_pSubOpen = (*bin.Xsqlite3_file)(elem12((*TmultiplexReal)(_pGroup.XaReal), uintptr(_i)).Xp)
if _1_pSubOpen == nil {
goto _4
}
- _2_rc2 = (*(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{((*bin.Xsqlite3_io_methods)(_1_pSubOpen.X0).X5)})))(tls, _1_pSubOpen, _flags)
- if _2_rc2 != i32(0) {
+ _2_rc2 = func() func(*crt.TLS, *bin.Xsqlite3_file, int32) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_1_pSubOpen.XpMethods).XxSync
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _1_pSubOpen, _flags)
+ if _2_rc2 != int32(0) {
_rc = _2_rc2
}
_4:
@@ -6129,8 +5528,10 @@ _3:
return _rc
}
-// Pass xFileSize requests through to the original VFS.
-// Aggregate the size of all the chunks before returning.
+// C comment
+// /* Pass xFileSize requests through to the original VFS.
+// ** Aggregate the size of all the chunks before returning.
+// */
func _multiplexFileSize(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _pSize *int64) (r0 int32) {
var _rc, _i int32
var _5_sz int64
@@ -6138,33 +5539,34 @@ func _multiplexFileSize(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _pSize *int64)
var _pGroup *XmultiplexGroup
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pGroup = (*XmultiplexGroup)(_p.X1)
- _rc = i32(0)
- if (_pGroup.X6) != 0 {
+ _pGroup = (*XmultiplexGroup)(_p.XpGroup)
+ _rc = int32(0)
+ if _pGroup.XbEnabled != 0 {
goto _0
}
- _1_pSubOpen = _multiplexSubOpen(tls, _pGroup, i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _1_pSubOpen = _multiplexSubOpen(tls, _pGroup, int32(0), &_rc, nil, int32(0))
if _1_pSubOpen == nil {
- _rc = i32(1802)
+ _rc = int32(1802)
goto _2
}
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int64) int32
- }{((*bin.Xsqlite3_io_methods)(_1_pSubOpen.X0).X6)})))(tls, _1_pSubOpen, _pSize)
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_1_pSubOpen.XpMethods).XxFileSize
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, *int64) int32)(unsafe.Pointer(&v))
+ }()(tls, _1_pSubOpen, _pSize)
_2:
goto _3
_0:
- *_pSize = int64(i32(0))
- _i = i32(0)
+ *_pSize = 0
+ _i = int32(0)
_4:
- if _rc != i32(0) {
+ if _rc != int32(0) {
goto _7
}
_5_sz = _multiplexSubSize(tls, _pGroup, _i, &_rc)
- if _5_sz == int64(i32(0)) {
+ if _5_sz == (0) {
goto _7
}
- *_pSize = (int64(_i) * int64(_pGroup.X5)) + _5_sz
+ *_pSize = (int64(_i) * int64(_pGroup.XszChunk)) + _5_sz
_i += 1
goto _4
_7:
@@ -6172,62 +5574,64 @@ _3:
return _rc
}
-// Pass xLock requests through to the original VFS unchanged.
+// C comment
+// /* Pass xLock requests through to the original VFS unchanged.
+// */
func _multiplexLock(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _lock int32) (r0 int32) {
var _rc int32
var _pSubOpen *bin.Xsqlite3_file
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.X1), i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.XpGroup), int32(0), &_rc, nil, int32(0))
if _pSubOpen != nil {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X7)})))(tls, _pSubOpen, _lock)
+ return func() func(*crt.TLS, *bin.Xsqlite3_file, int32) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxLock
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen, _lock)
}
- return i32(5)
-
- _ = _rc
- panic(0)
+ return int32(5)
}
-// Pass xUnlock requests through to the original VFS unchanged.
+// C comment
+// /* Pass xUnlock requests through to the original VFS unchanged.
+// */
func _multiplexUnlock(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _lock int32) (r0 int32) {
var _rc int32
var _pSubOpen *bin.Xsqlite3_file
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.X1), i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.XpGroup), int32(0), &_rc, nil, int32(0))
if _pSubOpen != nil {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X8)})))(tls, _pSubOpen, _lock)
+ return func() func(*crt.TLS, *bin.Xsqlite3_file, int32) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxUnlock
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen, _lock)
}
- return i32(2058)
-
- _ = _rc
- panic(0)
+ return int32(2058)
}
-// Pass xCheckReservedLock requests through to the original VFS unchanged.
+// C comment
+// /* Pass xCheckReservedLock requests through to the original VFS unchanged.
+// */
func _multiplexCheckReservedLock(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _pResOut *int32) (r0 int32) {
var _rc int32
var _pSubOpen *bin.Xsqlite3_file
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.X1), i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.XpGroup), int32(0), &_rc, nil, int32(0))
if _pSubOpen != nil {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_file, *int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, *int32) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X9)})))(tls, _pSubOpen, _pResOut)
+ return func() func(*crt.TLS, *bin.Xsqlite3_file, *int32) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxCheckReservedLock
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, *int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen, _pResOut)
}
- return i32(3594)
-
- _ = _rc
- panic(0)
+ return int32(3594)
}
-// Pass xFileControl requests through to the original VFS unchanged,
-// except for any MULTIPLEX_CTRL_* requests here.
+// C comment
+// /* Pass xFileControl requests through to the original VFS unchanged,
+// ** except for any MULTIPLEX_CTRL_* requests here.
+// */
func _multiplexFileControl(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _op int32, _pArg unsafe.Pointer) (r0 int32) {
var _rc, _2_bEnabled int32
var _3_szChunk uint32
@@ -6236,23 +5640,23 @@ func _multiplexFileControl(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _op int32, _
var _pGroup *XmultiplexGroup
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pGroup = (*XmultiplexGroup)(_p.X1)
- _rc = i32(1)
- if (_gMultiplex.X4) == 0 {
- return i32(21)
+ _pGroup = (*XmultiplexGroup)(_p.XpGroup)
+ _rc = int32(1)
+ if _gMultiplex.XisInitialized == 0 {
+ return int32(21)
}
switch _op {
- case i32(5):
+ case int32(5):
goto _5
- case i32(6):
+ case int32(6):
goto _5
- case i32(14):
+ case int32(14):
goto _7
- case i32(214014):
+ case int32(214014):
goto _2
- case i32(214015):
+ case int32(214015):
goto _3
- case i32(214016):
+ case int32(214016):
goto _4
default:
goto _8
@@ -6261,8 +5665,8 @@ func _multiplexFileControl(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _op int32, _
_2:
if _pArg != nil {
_2_bEnabled = *(*int32)(_pArg)
- *(*uint8)(unsafe.Pointer(&(_pGroup.X6))) = uint8(_2_bEnabled)
- _rc = i32(0)
+ _pGroup.XbEnabled = uint8(_2_bEnabled)
+ _rc = int32(0)
}
goto _10
_3:
@@ -6270,62 +5674,59 @@ _3:
goto _11
}
_3_szChunk = *(*uint32)(_pArg)
- if _3_szChunk < uint32(i32(1)) {
- _rc = i32(21)
+ if _3_szChunk < uint32(1) {
+ _rc = int32(21)
goto _13
}
- _3_szChunk = _3_szChunk + uint32(i32(65535))
- {
- p := &_3_szChunk
- *p = (*p) & uint32(i32(-65536))
- sink0(*p)
- }
- *(*uint32)(unsafe.Pointer(&(_pGroup.X5))) = _3_szChunk
- _rc = i32(0)
+ _3_szChunk = _3_szChunk + uint32(65535)
+ _3_szChunk &= uint32(4294901760)
+ _pGroup.XszChunk = _3_szChunk
+ _rc = int32(0)
_13:
_11:
goto _10
_4:
- _rc = i32(0)
+ _rc = int32(0)
goto _10
_5:
- _rc = i32(0)
+ _rc = int32(0)
goto _10
_7:
_6_aFcntl = (**int8)(_pArg)
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_aFcntl)) + 4*uintptr(i32(1))))) == nil || bin.Xsqlite3_stricmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_aFcntl)) + 4*uintptr(i32(1)))), str(7014)) != i32(0) {
+ if (*elem1(_6_aFcntl, uintptr(1))) == nil || bin.Xsqlite3_stricmp(tls, *elem1(_6_aFcntl, uintptr(1)), str(7014)) != int32(0) {
goto _15
}
- if (*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_aFcntl)) + 4*uintptr(i32(2))))) == nil || (*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_aFcntl)) + 4*uintptr(i32(2)))))) + 1*uintptr(i32(0))))) == 0 {
+ if (*elem1(_6_aFcntl, uintptr(2))) == nil || (*elem2(*elem1(_6_aFcntl, uintptr(2)), 0)) == 0 {
goto _17
}
- if (bin.Xsqlite3_stricmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_aFcntl)) + 4*uintptr(i32(2)))), str(7033)) == i32(0)) || (bin.Xsqlite3_stricmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_aFcntl)) + 4*uintptr(i32(2)))), str(7036)) == i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pGroup.X7))) = uint8(i32(1))
+ if (bin.Xsqlite3_stricmp(tls, *elem1(_6_aFcntl, uintptr(2)), str(7033)) == int32(0)) || (bin.Xsqlite3_stricmp(tls, *elem1(_6_aFcntl, uintptr(2)), str(7036)) == int32(0)) {
+ _pGroup.XbTruncate = uint8(1)
goto _22
}
- if (bin.Xsqlite3_stricmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_aFcntl)) + 4*uintptr(i32(2)))), str(7038)) == i32(0)) || (bin.Xsqlite3_stricmp(tls, *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_aFcntl)) + 4*uintptr(i32(2)))), str(7042)) == i32(0)) {
- *(*uint8)(unsafe.Pointer(&(_pGroup.X7))) = uint8(i32(0))
+ if (bin.Xsqlite3_stricmp(tls, *elem1(_6_aFcntl, uintptr(2)), str(7038)) == int32(0)) || (bin.Xsqlite3_stricmp(tls, *elem1(_6_aFcntl, uintptr(2)), str(7042)) == int32(0)) {
+ _pGroup.XbTruncate = 0
}
_22:
_17:
- *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_6_aFcntl)) + 4*uintptr(i32(0)))) = bin.Xsqlite3_mprintf(tls, func() *int8 {
- if (_pGroup.X7) != 0 {
+ *elem1(_6_aFcntl, 0) = bin.Xsqlite3_mprintf(tls, func() *int8 {
+ if _pGroup.XbTruncate != 0 {
return str(7033)
}
return str(7038)
}())
- _rc = i32(0)
+ _rc = int32(0)
goto _10
_15:
_8:
- _pSubOpen = _multiplexSubOpen(tls, _pGroup, i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSubOpen = _multiplexSubOpen(tls, _pGroup, int32(0), &_rc, nil, int32(0))
if _pSubOpen == nil {
goto _25
}
- _rc = (*(*func(*crt.TLS, *bin.Xsqlite3_file, int32, unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X10)})))(tls, _pSubOpen, _op, _pArg)
- if (_op == i32(12)) && (_rc == i32(0)) {
+ _rc = func() func(*crt.TLS, *bin.Xsqlite3_file, int32, unsafe.Pointer) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxFileControl
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int32, unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen, _op, _pArg)
+ if (_op == int32(12)) && (_rc == int32(0)) {
*(**int8)(_pArg) = bin.Xsqlite3_mprintf(tls, str(7044), unsafe.Pointer(*(**int8)(_pArg)))
}
_25:
@@ -6334,167 +5735,170 @@ _10:
return _rc
}
-// Pass xSectorSize requests through to the original VFS unchanged.
+// C comment
+// /* Pass xSectorSize requests through to the original VFS unchanged.
+// */
func _multiplexSectorSize(tls *crt.TLS, _pConn *bin.Xsqlite3_file) (r0 int32) {
var _rc int32
var _pSubOpen *bin.Xsqlite3_file
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.X1), i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
- if (_pSubOpen != nil) && ((*(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X11)}))) != nil) {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X11)})))(tls, _pSubOpen)
+ _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.XpGroup), int32(0), &_rc, nil, int32(0))
+ if (_pSubOpen != nil) && (((*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxSectorSize) != nil) {
+ return func() func(*crt.TLS, *bin.Xsqlite3_file) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxSectorSize
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen)
}
- return i32(4096)
-
- _ = _rc
- panic(0)
+ return int32(4096)
}
-// Pass xDeviceCharacteristics requests through to the original VFS unchanged.
+// C comment
+// /* Pass xDeviceCharacteristics requests through to the original VFS unchanged.
+// */
func _multiplexDeviceCharacteristics(tls *crt.TLS, _pConn *bin.Xsqlite3_file) (r0 int32) {
var _rc int32
var _pSubOpen *bin.Xsqlite3_file
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.X1), i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.XpGroup), int32(0), &_rc, nil, int32(0))
if _pSubOpen != nil {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X12)})))(tls, _pSubOpen)
+ return func() func(*crt.TLS, *bin.Xsqlite3_file) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxDeviceCharacteristics
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen)
}
- return i32(0)
-
- _ = _rc
- panic(0)
+ return int32(0)
}
-// Pass xShmMap requests through to the original VFS unchanged.
+// C comment
+// /* Pass xShmMap requests through to the original VFS unchanged.
+// */
func _multiplexShmMap(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _iRegion int32, _szRegion int32, _bExtend int32, _pp *unsafe.Pointer) (r0 int32) {
var _rc int32
var _pSubOpen *bin.Xsqlite3_file
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.X1), i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.XpGroup), int32(0), &_rc, nil, int32(0))
if _pSubOpen != nil {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X13)})))(tls, _pSubOpen, _iRegion, _szRegion, _bExtend, _pp)
+ return func() func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxShmMap
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32, *unsafe.Pointer) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen, _iRegion, _szRegion, _bExtend, _pp)
}
- return i32(10)
-
- _ = _rc
- panic(0)
+ return int32(10)
}
-// Pass xShmLock requests through to the original VFS unchanged.
+// C comment
+// /* Pass xShmLock requests through to the original VFS unchanged.
+// */
func _multiplexShmLock(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _ofst int32, _n int32, _flags int32) (r0 int32) {
var _rc int32
var _pSubOpen *bin.Xsqlite3_file
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.X1), i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.XpGroup), int32(0), &_rc, nil, int32(0))
if _pSubOpen != nil {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X14)})))(tls, _pSubOpen, _ofst, _n, _flags)
+ return func() func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxShmLock
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int32, int32, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen, _ofst, _n, _flags)
}
- return i32(5)
-
- _ = _rc
- panic(0)
+ return int32(5)
}
-// Pass xShmBarrier requests through to the original VFS unchanged.
+// C comment
+// /* Pass xShmBarrier requests through to the original VFS unchanged.
+// */
func _multiplexShmBarrier(tls *crt.TLS, _pConn *bin.Xsqlite3_file) {
var _rc int32
var _pSubOpen *bin.Xsqlite3_file
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.X1), i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.XpGroup), int32(0), &_rc, nil, int32(0))
if _pSubOpen != nil {
- (*(*func(*crt.TLS, *bin.Xsqlite3_file))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X15)})))(tls, _pSubOpen)
+ func() func(*crt.TLS, *bin.Xsqlite3_file) {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxShmBarrier
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file))(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen)
}
- _ = _rc
}
-// Pass xShmUnmap requests through to the original VFS unchanged.
+// C comment
+// /* Pass xShmUnmap requests through to the original VFS unchanged.
+// */
func _multiplexShmUnmap(tls *crt.TLS, _pConn *bin.Xsqlite3_file, _deleteFlag int32) (r0 int32) {
var _rc int32
var _pSubOpen *bin.Xsqlite3_file
var _p *XmultiplexConn
_p = (*XmultiplexConn)(unsafe.Pointer(_pConn))
- _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.X1), i32(0), &_rc, (*int32)(unsafe.Pointer(nil)), i32(0))
+ _pSubOpen = _multiplexSubOpen(tls, (*XmultiplexGroup)(_p.XpGroup), int32(0), &_rc, nil, int32(0))
if _pSubOpen != nil {
- return (*(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32) int32
- }{((*bin.Xsqlite3_io_methods)(_pSubOpen.X0).X16)})))(tls, _pSubOpen, _deleteFlag)
+ return func() func(*crt.TLS, *bin.Xsqlite3_file, int32) int32 {
+ v := (*bin.Xsqlite3_io_methods)(_pSubOpen.XpMethods).XxShmUnmap
+ return *(*func(*crt.TLS, *bin.Xsqlite3_file, int32) int32)(unsafe.Pointer(&v))
+ }()(tls, _pSubOpen, _deleteFlag)
}
- return i32(0)
-
- _ = _rc
- panic(0)
+ return int32(0)
}
-// This is the entry point to register the auto-extension for the
-// multiplex_control() function.
-func _multiplexFuncInit(tls *crt.TLS, _db unsafe.Pointer, _pzErrMsg **int8, _pApi *bin.Xsqlite3_api_routines) (r0 int32) {
+// C comment
+// /*
+// ** This is the entry point to register the auto-extension for the
+// ** multiplex_control() function.
+// */
+func _multiplexFuncInit(tls *crt.TLS, _db unsafe.Pointer, _pzErrMsg **int8, _pApi *t14) (r0 int32) {
var _rc int32
- _rc = bin.Xsqlite3_create_function(tls, (*bin.Xsqlite3)(_db), str(7057), i32(2), i32(5), nil, *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{_multiplexControlFunc})), *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer)
- }{nil})), *(*func(*crt.TLS, *bin.Xsqlite3_context))(unsafe.Pointer(&struct {
- f func(*crt.TLS, unsafe.Pointer)
- }{nil})))
+ _rc = bin.Xsqlite3_create_function(tls, (*bin.Xsqlite3)(_db), str(7057), int32(2), int32(5), nil, func() func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem) {
+ v := _multiplexControlFunc
+ return *(*func(*crt.TLS, *bin.Xsqlite3_context, int32, **bin.XMem))(unsafe.Pointer(&v))
+ }(), nil, nil)
return _rc
}
-// This is the implementation of the multiplex_control() SQL function.
+// C comment
+// /*
+// ** This is the implementation of the multiplex_control() SQL function.
+// */
func _multiplexControlFunc(tls *crt.TLS, _context unsafe.Pointer, _argc int32, _argv *unsafe.Pointer) {
var _rc, _op, _iVal int32
var _db unsafe.Pointer
- _rc = i32(0)
+ _rc = int32(0)
_db = unsafe.Pointer(bin.Xsqlite3_context_db_handle(tls, (*bin.Xsqlite3_context)(_context)))
- _op = i32(0)
- if (_db == nil) || (_argc != i32(2)) {
- _rc = i32(1)
+ _op = int32(0)
+ if (_db == nil) || (_argc != int32(2)) {
+ _rc = int32(1)
goto _2
}
- _op = bin.Xsqlite3_value_int(tls, (*bin.XMem)(*(*unsafe.Pointer)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
- _iVal = bin.Xsqlite3_value_int(tls, (*bin.XMem)(*(*unsafe.Pointer)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(1))))))
+ _op = bin.Xsqlite3_value_int(tls, (*bin.XMem)(*elem3(_argv, 0)))
+ _iVal = bin.Xsqlite3_value_int(tls, (*bin.XMem)(*elem3(_argv, uintptr(1))))
switch _op {
- case i32(1):
+ case int32(1):
goto _4
- case i32(2):
+ case int32(2):
goto _5
- case i32(3):
+ case int32(3):
goto _6
default:
goto _7
}
_4:
- _op = i32(214014)
+ _op = int32(214014)
goto _8
_5:
- _op = i32(214015)
+ _op = int32(214015)
goto _8
_6:
- _op = i32(214016)
+ _op = int32(214016)
goto _8
_7:
- _rc = i32(12)
+ _rc = int32(12)
goto _8
_8:
_2:
- if _rc == i32(0) {
- _rc = bin.Xsqlite3_file_control(tls, (*bin.Xsqlite3)(_db), nil, _op, (unsafe.Pointer)(&_iVal))
+ if _rc == int32(0) {
+ _rc = bin.Xsqlite3_file_control(tls, (*bin.Xsqlite3)(_db), nil, _op, unsafe.Pointer(&_iVal))
}
bin.Xsqlite3_result_error_code(tls, (*bin.Xsqlite3_context)(_context), _rc)
_ = _iVal
@@ -6507,180 +5911,369 @@ func bool2int(b bool) int32 {
return 0
}
func bug20530(interface{}) {} //TODO remove when https://github.com/golang/go/issues/20530 is fixed.
-func i16(n int16) int16 { return n }
-func i32(n int32) int32 { return n }
-func i64(n int64) int64 { return n }
-func i8(n int8) int8 { return n }
func init() { nzf32 *= -1; nzf64 *= -1 }
-func u16(n uint16) uint16 { return n }
-func u32(n uint32) uint32 { return n }
-func u64(n uint64) uint64 { return n }
-func u8(n byte) byte { return n }
var inf = math.Inf(1)
-var nzf32 float32 // -0.0
-var nzf64 float64 // -0.0
-func sink2(*uint8) {} //TODO report GC bug
-func sink3(int32) {} //TODO report GC bug
-func sink4(int64) {} //TODO report GC bug
-func sink0(uint32) {} //TODO report GC bug
-func postInc2(p **uint8, d int) *uint8 {
+var nzf32 float32 // -0.0
+var nzf64 float64 // -0.0
+func elem1(a **int8, index uintptr) **int8 {
+ return (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem3(a *unsafe.Pointer, index uintptr) *unsafe.Pointer {
+ return (*unsafe.Pointer)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem8(a *int32, index uintptr) *int32 {
+ return (*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem2(a *int8, index uintptr) *int8 {
+ return (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 1*index))
+}
+func elem11(a *XmultiplexGroup, index uintptr) *XmultiplexGroup {
+ return (*XmultiplexGroup)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 28*index))
+}
+func elem12(a *TmultiplexReal, index uintptr) *TmultiplexReal {
+ return (*TmultiplexReal)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 8*index))
+}
+func elem9(a *TStress2Task, index uintptr) *TStress2Task {
+ return (*TStress2Task)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem0(a *TThreadTest, index uintptr) *TThreadTest {
+ return (*TThreadTest)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 12*index))
+}
+func elem4(a *uint32, index uintptr) *uint32 {
+ return (*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem6(a *uint8, index uintptr) *uint8 {
+ return (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 1*index))
+}
+func postInc6(p **uint8, d int) *uint8 {
q := (*uintptr)(unsafe.Pointer(p))
v := *q
*q += uintptr(d)
return (*uint8)(unsafe.Pointer(v))
}
-func postInc3(p *int32, d int32) int32 { v := *p; *p += d; return v }
-func preInc3(p *int32, d int32) int32 { v := *p + d; *p = v; return v }
-func preInc0(p *uint32, d uint32) uint32 { v := *p + d; *p = v; return v }
-func store6(p **int8, v *int8) *int8 { *p = v; return v }
-func store7(p **bin.Xsqlite3_file, v *bin.Xsqlite3_file) *bin.Xsqlite3_file { *p = v; return v }
-func store3(p *int32, v int32) int32 { *p = v; return v }
-func store0(p *uint32, v uint32) uint32 { *p = v; return v }
+func postInc7(p *int32, d int32) int32 { v := *p; *p += d; return v }
+func preInc7(p *int32, d int32) int32 { v := *p + d; *p = v; return v }
+func preInc5(p *uint32, d uint32) uint32 { v := *p + d; *p = v; return v }
+func store2(p **int8, v *int8) *int8 { *p = v; return v }
+func store13(p **bin.Xsqlite3_file, v *bin.Xsqlite3_file) *bin.Xsqlite3_file { *p = v; return v }
+func store7(p *int32, v int32) int32 { *p = v; return v }
+func store5(p *uint32, v uint32) uint32 { *p = v; return v }
type XmultiplexGroup struct {
- X0 unsafe.Pointer
- X1 int32
- X2 *int8
- X3 int32
- X4 int32
- X5 uint32
- X6 uint8
- X7 uint8
-} // t8 struct{*struct{},int32,*int8,int32,int32,uint32,uint8,uint8}
+ XaReal unsafe.Pointer
+ XnReal int32
+ XzName *int8
+ XnName int32
+ Xflags int32
+ XszChunk uint32
+ XbEnabled uint8
+ XbTruncate uint8
+} // t15 struct{aReal *struct{},nReal int32,zName *int8,nName int32,flags int32,szChunk uint32,bEnabled uint8,bTruncate uint8}
+
+type TmultiplexReal struct {
+ Xp unsafe.Pointer
+ Xz *int8
+} // t16 struct{p *struct{},z *int8}
type XmultiplexConn struct {
- X0 struct{ X0 unsafe.Pointer }
- X1 unsafe.Pointer
-} // t9 struct{struct{*struct{}},*struct{}}
+ Xbase bin.Xsqlite3_file
+ XpGroup unsafe.Pointer
+} // t17 struct{base struct{pMethods *struct{}},pGroup *struct{}}
type XMD5Context struct {
- X0 int32
- X1 [4]uint32
- X2 [2]uint32
- X3 struct {
- X [0]struct {
- X0 [64]uint8
- X1 [16]uint32
- }
- U [64]byte
- }
-} // t10 struct{int32,[4]uint32,[2]uint32,union{[64]uint8,[16]uint32}}
+ XisInit int32
+ Xbuf [4]uint32
+ Xbits [2]uint32
+ Xu t18
+} // t19 struct{isInit int32,buf [4]uint32,bits [2]uint32,u union{in [64]uint8,in32 [16]uint32}}
type XError struct {
- X0 int32
- X1 int32
- X2 *int8
-} // t11 struct{int32,int32,*int8}
+ Xrc int32
+ XiLine int32
+ XzErr *int8
+} // t20 struct{rc int32,iLine int32,zErr *int8}
type XSqlite struct {
- X0 unsafe.Pointer
- X1 unsafe.Pointer
- X2 int32
- X3 **int8
-} // t12 struct{*struct{},*struct{},int32,**int8}
+ Xdb unsafe.Pointer
+ XpCache unsafe.Pointer
+ XnText int32
+ XaText **int8
+} // t21 struct{db *struct{},pCache *struct{},nText int32,aText **int8}
+
+type XStatement struct {
+ XpStmt unsafe.Pointer
+ XpNext unsafe.Pointer
+} // t22 struct{pStmt *struct{},pNext *struct{}}
type XThread struct {
- X0 int32
- X1 unsafe.Pointer
- X2 uint32
- X3 func(*crt.TLS, int32, unsafe.Pointer) *int8
- X4 unsafe.Pointer
-} // t13 struct{int32,*struct{},uint32,*func(int32,*struct{})*int8,*struct{}}
+ XiTid int32
+ XpArg unsafe.Pointer
+ Xtid uint32
+ XxProc func(*crt.TLS, int32, unsafe.Pointer) *int8
+ XpNext unsafe.Pointer
+} // t23 struct{iTid int32,pArg *struct{},tid uint32,xProc *func(int32,*struct{})*int8,pNext *struct{}}
+
+type XThreadset struct {
+ XiMaxTid int32
+ XpThread unsafe.Pointer
+} // t24 struct{iMaxTid int32,pThread *struct{}}
+
+type XCheckpointStarvationCtx struct {
+ XeMode int32
+ XnMaxFrame int32
+} // t25 struct{eMode int32,nMaxFrame int32}
type XStress2Ctx struct {
- X0 *int8
- X1 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
-} // t14 struct{*int8,*func(*struct{},*struct{},int32)}
+ XzDb *int8
+ XxProc func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
+} // t26 struct{zDb *int8,xProc *func(*struct{},*struct{},int32)}
type TStress2Task struct {
- X0 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
-} // t15 struct{*func(*struct{},*struct{},int32)}
+ Xx func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
+} // t27 struct{x *func(*struct{},*struct{},int32)}
type TThreadTest struct {
- X0 func(*crt.TLS, int32)
- X1 *int8
- X2 int32
-} // t16 struct{*func(int32),*int8,int32}
-
-type t5 struct {
- X0 unsafe.Pointer
- X1 struct {
- X0 int32
- X1 int32
- X2 int32
- X3 unsafe.Pointer
- X4 *int8
- X5 unsafe.Pointer
- X6 func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, int32, *int32) int32
- X7 func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
- X8 func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32) int32
- X9 func(*crt.TLS, unsafe.Pointer, *int8, int32, *int8) int32
- X10 func(*crt.TLS, unsafe.Pointer, *int8) unsafe.Pointer
- X11 func(*crt.TLS, unsafe.Pointer, int32, *int8)
- X12 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8) func(*crt.TLS)
- X13 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
- X14 func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- X15 func(*crt.TLS, unsafe.Pointer, int32) int32
- X16 func(*crt.TLS, unsafe.Pointer, *float64) int32
- X17 func(*crt.TLS, unsafe.Pointer, int32, *int8) int32
- X18 func(*crt.TLS, unsafe.Pointer, *int64) int32
- X19 func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS)) int32
- X20 func(*crt.TLS, unsafe.Pointer, *int8) func(*crt.TLS)
- X21 func(*crt.TLS, unsafe.Pointer, *int8) *int8
- }
- X2 struct {
- X0 int32
- X1 func(*crt.TLS, unsafe.Pointer) int32
- X2 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- X3 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- X4 func(*crt.TLS, unsafe.Pointer, int64) int32
- X5 func(*crt.TLS, unsafe.Pointer, int32) int32
- X6 func(*crt.TLS, unsafe.Pointer, *int64) int32
- X7 func(*crt.TLS, unsafe.Pointer, int32) int32
- X8 func(*crt.TLS, unsafe.Pointer, int32) int32
- X9 func(*crt.TLS, unsafe.Pointer, *int32) int32
- X10 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
- X11 func(*crt.TLS, unsafe.Pointer) int32
- X12 func(*crt.TLS, unsafe.Pointer) int32
- X13 func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32
- X14 func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32
- X15 func(*crt.TLS, unsafe.Pointer)
- X16 func(*crt.TLS, unsafe.Pointer, int32) int32
- X17 func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32
- X18 func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32
- }
- X3 struct {
- X0 int32
- X1 func(*crt.TLS, unsafe.Pointer) int32
- X2 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- X3 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int64) int32
- X4 func(*crt.TLS, unsafe.Pointer, int64) int32
- X5 func(*crt.TLS, unsafe.Pointer, int32) int32
- X6 func(*crt.TLS, unsafe.Pointer, *int64) int32
- X7 func(*crt.TLS, unsafe.Pointer, int32) int32
- X8 func(*crt.TLS, unsafe.Pointer, int32) int32
- X9 func(*crt.TLS, unsafe.Pointer, *int32) int32
- X10 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
- X11 func(*crt.TLS, unsafe.Pointer) int32
- X12 func(*crt.TLS, unsafe.Pointer) int32
- X13 func(*crt.TLS, unsafe.Pointer, int32, int32, int32, *unsafe.Pointer) int32
- X14 func(*crt.TLS, unsafe.Pointer, int32, int32, int32) int32
- X15 func(*crt.TLS, unsafe.Pointer)
- X16 func(*crt.TLS, unsafe.Pointer, int32) int32
- X17 func(*crt.TLS, unsafe.Pointer, int64, int32, *unsafe.Pointer) int32
- X18 func(*crt.TLS, unsafe.Pointer, int64, unsafe.Pointer) int32
- }
- X4 int32
-} // struct{*struct{},struct{int32,int32,int32,*struct{},*int8,*struct{},*func(*struct{},*int8,*struct{},int32,*int32)int32,*func(*struct{},*int8,int32)int32,*func(*struct{},*int8,int32,*int32)int32,*func(*struct{},*int8,int32,*int8)int32,*func(*struct{},*int8)*struct{},*func(*struct{},int32,*int8),*func(*struct{},*struct{},*int8)*func(),*func(*struct{},*struct{}),*func(*struct{},int32,*int8)int32,*func(*struct{},int32)int32,*func(*struct{},*float64)int32,*func(*struct{},int32,*int8)int32,*func(*struct{},*int64)int32,*func(*struct{},*int8,*func())int32,*func(*struct{},*int8)*func(),*func(*struct{},*int8)*int8},struct{int32,*func(*struct{})int32,*func(*struct{},*struct{},int32,int64)int32,*func(*struct{},*struct{},int32,int64)int32,*func(*struct{},int64)int32,*func(*struct{},int32)int32,*func(*struct{},*int64)int32,*func(*struct{},int32)int32,*func(*struct{},int32)int32,*func(*struct{},*int32)int32,*func(*struct{},int32,*struct{})int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},int32,int32,int32,**struct{})int32,*func(*struct{},int32,int32,int32)int32,*func(*struct{}),*func(*struct{},int32)int32,*func(*struct{},int64,int32,**struct{})int32,*func(*struct{},int64,*struct{})int32},struct{int32,*func(*struct{})int32,*func(*struct{},*struct{},int32,int64)int32,*func(*struct{},*struct{},int32,int64)int32,*func(*struct{},int64)int32,*func(*struct{},int32)int32,*func(*struct{},*int64)int32,*func(*struct{},int32)int32,*func(*struct{},int32)int32,*func(*struct{},*int32)int32,*func(*struct{},int32,*struct{})int32,*func(*struct{})int32,*func(*struct{})int32,*func(*struct{},int32,int32,int32,**struct{})int32,*func(*struct{},int32,int32,int32)int32,*func(*struct{}),*func(*struct{},int32)int32,*func(*struct{},int64,int32,**struct{})int32,*func(*struct{},int64,*struct{})int32},int32}
-
-type t1 struct {
+ XxTest func(*crt.TLS, int32)
+ XzTest *int8
+ XnMs int32
+} // t28 struct{xTest *func(int32),zTest *int8,nMs int32}
+
+type t10 struct {
+ XpOrigVfs unsafe.Pointer
+ XsThisVfs bin.Xsqlite3_vfs
+ XsIoMethodsV1 bin.Xsqlite3_io_methods
+ XsIoMethodsV2 bin.Xsqlite3_io_methods
+ XisInitialized int32
+} // struct{pOrigVfs *struct{},sThisVfs struct{iVersion int32,szOsFile int32,mxPathname int32,pNext *struct{},zName *int8,pAppData *struct{},xOpen *func(*struct{},*int8,*struct{},int32,*int32)int32,xDelete *func(*struct{},*int8,int32)int32,xAccess *func(*struct{},*int8,int32,*int32)int32,xFullPathname *func(*struct{},*int8,int32,*int8)int32,xDlOpen *func(*struct{},*int8)*struct{},xDlError *func(*struct{},int32,*int8),xDlSym *func(*struct{},*struct{},*int8)*func(),xDlClose *func(*struct{},*struct{}),xRandomness *func(*struct{},int32,*int8)int32,xSleep *func(*struct{},int32)int32,xCurrentTime *func(*struct{},*float64)int32,xGetLastError *func(*struct{},int32,*int8)int32,xCurrentTimeInt64 *func(*struct{},*int64)int32,xSetSystemCall *func(*struct{},*int8,*func())int32,xGetSystemCall *func(*struct{},*int8)*func(),xNextSystemCall *func(*struct{},*int8)*int8},sIoMethodsV1 struct{iVersion int32,xClose *func(*struct{})int32,xRead *func(*struct{},*struct{},int32,int64)int32,xWrite *func(*struct{},*struct{},int32,int64)int32,xTruncate *func(*struct{},int64)int32,xSync *func(*struct{},int32)int32,xFileSize *func(*struct{},*int64)int32,xLock *func(*struct{},int32)int32,xUnlock *func(*struct{},int32)int32,xCheckReservedLock *func(*struct{},*int32)int32,xFileControl *func(*struct{},int32,*struct{})int32,xSectorSize *func(*struct{})int32,xDeviceCharacteristics *func(*struct{})int32,xShmMap *func(*struct{},int32,int32,int32,**struct{})int32,xShmLock *func(*struct{},int32,int32,int32)int32,xShmBarrier *func(*struct{}),xShmUnmap *func(*struct{},int32)int32,xFetch *func(*struct{},int64,int32,**struct{})int32,xUnfetch *func(*struct{},int64,*struct{})int32},sIoMethodsV2 struct{iVersion int32,xClose *func(*struct{})int32,xRead *func(*struct{},*struct{},int32,int64)int32,xWrite *func(*struct{},*struct{},int32,int64)int32,xTruncate *func(*struct{},int64)int32,xSync *func(*struct{},int32)int32,xFileSize *func(*struct{},*int64)int32,xLock *func(*struct{},int32)int32,xUnlock *func(*struct{},int32)int32,xCheckReservedLock *func(*struct{},*int32)int32,xFileControl *func(*struct{},int32,*struct{})int32,xSectorSize *func(*struct{})int32,xDeviceCharacteristics *func(*struct{})int32,xShmMap *func(*struct{},int32,int32,int32,**struct{})int32,xShmLock *func(*struct{},int32,int32,int32)int32,xShmBarrier *func(*struct{}),xShmUnmap *func(*struct{},int32)int32,xFetch *func(*struct{},int64,int32,**struct{})int32,xUnfetch *func(*struct{},int64,*struct{})int32},isInitialized int32}
+
+type t14 struct {
+ Xaggregate_context func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xaggregate_count func(*crt.TLS, unsafe.Pointer) int32
+ Xbind_blob func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_double func(*crt.TLS, unsafe.Pointer, int32, float64) int32
+ Xbind_int func(*crt.TLS, unsafe.Pointer, int32, int32) int32
+ Xbind_int64 func(*crt.TLS, unsafe.Pointer, int32, int64) int32
+ Xbind_null func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xbind_parameter_count func(*crt.TLS, unsafe.Pointer) int32
+ Xbind_parameter_index func(*crt.TLS, unsafe.Pointer, *int8) int32
+ Xbind_parameter_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xbind_text func(*crt.TLS, unsafe.Pointer, int32, *int8, int32, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_text16 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_value func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer) int32
+ Xbusy_handler func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32) int32, unsafe.Pointer) int32
+ Xbusy_timeout func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xchanges func(*crt.TLS, unsafe.Pointer) int32
+ Xclose func(*crt.TLS, unsafe.Pointer) int32
+ Xcollation_needed func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *int8)) int32
+ Xcollation_needed16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer)) int32
+ Xcolumn_blob func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_bytes func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcolumn_bytes16 func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcolumn_count func(*crt.TLS, unsafe.Pointer) int32
+ Xcolumn_database_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_database_name16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_decltype func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_decltype16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_double func(*crt.TLS, unsafe.Pointer, int32) float64
+ Xcolumn_int func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcolumn_int64 func(*crt.TLS, unsafe.Pointer, int32) int64
+ Xcolumn_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_name16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_origin_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_origin_name16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_table_name func(*crt.TLS, unsafe.Pointer, int32) *int8
+ Xcolumn_table_name16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_text func(*crt.TLS, unsafe.Pointer, int32) *uint8
+ Xcolumn_text16 func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcolumn_type func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcolumn_value func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xcommit_hook func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer) unsafe.Pointer
+ Xcomplete func(*crt.TLS, *int8) int32
+ Xcomplete16 func(*crt.TLS, unsafe.Pointer) int32
+ Xcreate_collation func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32
+ Xcreate_collation16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32) int32
+ Xcreate_function func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32
+ Xcreate_function16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32
+ Xcreate_module func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer) int32
+ Xdata_count func(*crt.TLS, unsafe.Pointer) int32
+ Xdb_handle func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xdeclare_vtab func(*crt.TLS, unsafe.Pointer, *int8) int32
+ Xenable_shared_cache func(*crt.TLS, int32) int32
+ Xerrcode func(*crt.TLS, unsafe.Pointer) int32
+ Xerrmsg func(*crt.TLS, unsafe.Pointer) *int8
+ Xerrmsg16 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xexec func(*crt.TLS, unsafe.Pointer, *int8, func(*crt.TLS, unsafe.Pointer, int32, **int8, **int8) int32, unsafe.Pointer, **int8) int32
+ Xexpired func(*crt.TLS, unsafe.Pointer) int32
+ Xfinalize func(*crt.TLS, unsafe.Pointer) int32
+ Xfree func(*crt.TLS, unsafe.Pointer)
+ Xfree_table func(*crt.TLS, **int8)
+ Xget_autocommit func(*crt.TLS, unsafe.Pointer) int32
+ Xget_auxdata func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xget_table func(*crt.TLS, unsafe.Pointer, *int8, ***int8, *int32, *int32, **int8) int32
+ Xglobal_recover func(*crt.TLS) int32
+ Xinterruptx func(*crt.TLS, unsafe.Pointer)
+ Xlast_insert_rowid func(*crt.TLS, unsafe.Pointer) int64
+ Xlibversion func(*crt.TLS) *int8
+ Xlibversion_number func(*crt.TLS) int32
+ Xmalloc func(*crt.TLS, int32) unsafe.Pointer
+ Xmprintf func(*crt.TLS, *int8, ...interface{}) *int8
+ Xopen func(*crt.TLS, *int8, *unsafe.Pointer) int32
+ Xopen16 func(*crt.TLS, unsafe.Pointer, *unsafe.Pointer) int32
+ Xprepare func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32
+ Xprepare16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32
+ Xprofile func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8, uint64), unsafe.Pointer) unsafe.Pointer
+ Xprogress_handler func(*crt.TLS, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer) int32, unsafe.Pointer)
+ Xrealloc func(*crt.TLS, unsafe.Pointer, int32) unsafe.Pointer
+ Xreset func(*crt.TLS, unsafe.Pointer) int32
+ Xresult_blob func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_double func(*crt.TLS, unsafe.Pointer, float64)
+ Xresult_error func(*crt.TLS, unsafe.Pointer, *int8, int32)
+ Xresult_error16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32)
+ Xresult_int func(*crt.TLS, unsafe.Pointer, int32)
+ Xresult_int64 func(*crt.TLS, unsafe.Pointer, int64)
+ Xresult_null func(*crt.TLS, unsafe.Pointer)
+ Xresult_text func(*crt.TLS, unsafe.Pointer, *int8, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_text16 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_text16be func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_text16le func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, func(*crt.TLS, unsafe.Pointer))
+ Xresult_value func(*crt.TLS, unsafe.Pointer, unsafe.Pointer)
+ Xrollback_hook func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer), unsafe.Pointer) unsafe.Pointer
+ Xset_authorizer func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, *int8, *int8) int32, unsafe.Pointer) int32
+ Xset_auxdata func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer))
+ Xsnprintf func(*crt.TLS, int32, *int8, *int8, ...interface{}) *int8
+ Xstep func(*crt.TLS, unsafe.Pointer) int32
+ Xtable_column_metadata func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, **int8, **int8, *int32, *int32, *int32) int32
+ Xthread_cleanup func(*crt.TLS)
+ Xtotal_changes func(*crt.TLS, unsafe.Pointer) int32
+ Xtrace func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, *int8), unsafe.Pointer) unsafe.Pointer
+ Xtransfer_bindings func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) int32
+ Xupdate_hook func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *int8, *int8, int64), unsafe.Pointer) unsafe.Pointer
+ Xuser_data func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_blob func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_bytes func(*crt.TLS, unsafe.Pointer) int32
+ Xvalue_bytes16 func(*crt.TLS, unsafe.Pointer) int32
+ Xvalue_double func(*crt.TLS, unsafe.Pointer) float64
+ Xvalue_int func(*crt.TLS, unsafe.Pointer) int32
+ Xvalue_int64 func(*crt.TLS, unsafe.Pointer) int64
+ Xvalue_numeric_type func(*crt.TLS, unsafe.Pointer) int32
+ Xvalue_text func(*crt.TLS, unsafe.Pointer) *uint8
+ Xvalue_text16 func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_text16be func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_text16le func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_type func(*crt.TLS, unsafe.Pointer) int32
+ Xvmprintf func(*crt.TLS, *int8, unsafe.Pointer) *int8
+ Xoverload_function func(*crt.TLS, unsafe.Pointer, *int8, int32) int32
+ Xprepare_v2 func(*crt.TLS, unsafe.Pointer, *int8, int32, *unsafe.Pointer, **int8) int32
+ Xprepare16_v2 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, *unsafe.Pointer, *unsafe.Pointer) int32
+ Xclear_bindings func(*crt.TLS, unsafe.Pointer) int32
+ Xcreate_module_v2 func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_zeroblob func(*crt.TLS, unsafe.Pointer, int32, int32) int32
+ Xblob_bytes func(*crt.TLS, unsafe.Pointer) int32
+ Xblob_close func(*crt.TLS, unsafe.Pointer) int32
+ Xblob_open func(*crt.TLS, unsafe.Pointer, *int8, *int8, *int8, int64, int32, *unsafe.Pointer) int32
+ Xblob_read func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32) int32
+ Xblob_write func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, int32, int32) int32
+ Xcreate_collation_v2 func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, int32, unsafe.Pointer) int32, func(*crt.TLS, unsafe.Pointer)) int32
+ Xfile_control func(*crt.TLS, unsafe.Pointer, *int8, int32, unsafe.Pointer) int32
+ Xmemory_highwater func(*crt.TLS, int32) int64
+ Xmemory_used func(*crt.TLS) int64
+ Xmutex_alloc func(*crt.TLS, int32) unsafe.Pointer
+ Xmutex_enter func(*crt.TLS, unsafe.Pointer)
+ Xmutex_free func(*crt.TLS, unsafe.Pointer)
+ Xmutex_leave func(*crt.TLS, unsafe.Pointer)
+ Xmutex_try func(*crt.TLS, unsafe.Pointer) int32
+ Xopen_v2 func(*crt.TLS, *int8, *unsafe.Pointer, int32, *int8) int32
+ Xrelease_memory func(*crt.TLS, int32) int32
+ Xresult_error_nomem func(*crt.TLS, unsafe.Pointer)
+ Xresult_error_toobig func(*crt.TLS, unsafe.Pointer)
+ Xsleep func(*crt.TLS, int32) int32
+ Xsoft_heap_limit func(*crt.TLS, int32)
+ Xvfs_find func(*crt.TLS, *int8) unsafe.Pointer
+ Xvfs_register func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xvfs_unregister func(*crt.TLS, unsafe.Pointer) int32
+ Xxthreadsafe func(*crt.TLS) int32
+ Xresult_zeroblob func(*crt.TLS, unsafe.Pointer, int32)
+ Xresult_error_code func(*crt.TLS, unsafe.Pointer, int32)
+ Xtest_control func(*crt.TLS, int32, ...interface{}) int32
+ Xrandomness func(*crt.TLS, int32, unsafe.Pointer)
+ Xcontext_db_handle func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xextended_result_codes func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xlimit func(*crt.TLS, unsafe.Pointer, int32, int32) int32
+ Xnext_stmt func(*crt.TLS, unsafe.Pointer, unsafe.Pointer) unsafe.Pointer
+ Xsql func(*crt.TLS, unsafe.Pointer) *int8
+ Xstatus func(*crt.TLS, int32, *int32, *int32, int32) int32
+ Xbackup_finish func(*crt.TLS, unsafe.Pointer) int32
+ Xbackup_init func(*crt.TLS, unsafe.Pointer, *int8, unsafe.Pointer, *int8) unsafe.Pointer
+ Xbackup_pagecount func(*crt.TLS, unsafe.Pointer) int32
+ Xbackup_remaining func(*crt.TLS, unsafe.Pointer) int32
+ Xbackup_step func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xcompileoption_get func(*crt.TLS, int32) *int8
+ Xcompileoption_used func(*crt.TLS, *int8) int32
+ Xcreate_function_v2 func(*crt.TLS, unsafe.Pointer, *int8, int32, int32, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer, int32, *unsafe.Pointer), func(*crt.TLS, unsafe.Pointer), func(*crt.TLS, unsafe.Pointer)) int32
+ Xdb_config func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32
+ Xdb_mutex func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xdb_status func(*crt.TLS, unsafe.Pointer, int32, *int32, *int32, int32) int32
+ Xextended_errcode func(*crt.TLS, unsafe.Pointer) int32
+ Xlog func(*crt.TLS, int32, *int8, ...interface{})
+ Xsoft_heap_limit64 func(*crt.TLS, int64) int64
+ Xsourceid func(*crt.TLS) *int8
+ Xstmt_status func(*crt.TLS, unsafe.Pointer, int32, int32) int32
+ Xstrnicmp func(*crt.TLS, *int8, *int8, int32) int32
+ Xunlock_notify func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, *unsafe.Pointer, int32), unsafe.Pointer) int32
+ Xwal_autocheckpoint func(*crt.TLS, unsafe.Pointer, int32) int32
+ Xwal_checkpoint func(*crt.TLS, unsafe.Pointer, *int8) int32
+ Xwal_hook func(*crt.TLS, unsafe.Pointer, func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, *int8, int32) int32, unsafe.Pointer) unsafe.Pointer
+ Xblob_reopen func(*crt.TLS, unsafe.Pointer, int64) int32
+ Xvtab_config func(*crt.TLS, unsafe.Pointer, int32, ...interface{}) int32
+ Xvtab_on_conflict func(*crt.TLS, unsafe.Pointer) int32
+ Xclose_v2 func(*crt.TLS, unsafe.Pointer) int32
+ Xdb_filename func(*crt.TLS, unsafe.Pointer, *int8) *int8
+ Xdb_readonly func(*crt.TLS, unsafe.Pointer, *int8) int32
+ Xdb_release_memory func(*crt.TLS, unsafe.Pointer) int32
+ Xerrstr func(*crt.TLS, int32) *int8
+ Xstmt_busy func(*crt.TLS, unsafe.Pointer) int32
+ Xstmt_readonly func(*crt.TLS, unsafe.Pointer) int32
+ Xstricmp func(*crt.TLS, *int8, *int8) int32
+ Xuri_boolean func(*crt.TLS, *int8, *int8, int32) int32
+ Xuri_int64 func(*crt.TLS, *int8, *int8, int64) int64
+ Xuri_parameter func(*crt.TLS, *int8, *int8) *int8
+ Xvsnprintf func(*crt.TLS, int32, *int8, *int8, unsafe.Pointer) *int8
+ Xwal_checkpoint_v2 func(*crt.TLS, unsafe.Pointer, *int8, int32, *int32, *int32) int32
+ Xauto_extension func(*crt.TLS, func(*crt.TLS)) int32
+ Xbind_blob64 func(*crt.TLS, unsafe.Pointer, int32, unsafe.Pointer, uint64, func(*crt.TLS, unsafe.Pointer)) int32
+ Xbind_text64 func(*crt.TLS, unsafe.Pointer, int32, *int8, uint64, func(*crt.TLS, unsafe.Pointer), uint8) int32
+ Xcancel_auto_extension func(*crt.TLS, func(*crt.TLS)) int32
+ Xload_extension func(*crt.TLS, unsafe.Pointer, *int8, *int8, **int8) int32
+ Xmalloc64 func(*crt.TLS, uint64) unsafe.Pointer
+ Xmsize func(*crt.TLS, unsafe.Pointer) uint64
+ Xrealloc64 func(*crt.TLS, unsafe.Pointer, uint64) unsafe.Pointer
+ Xreset_auto_extension func(*crt.TLS)
+ Xresult_blob64 func(*crt.TLS, unsafe.Pointer, unsafe.Pointer, uint64, func(*crt.TLS, unsafe.Pointer))
+ Xresult_text64 func(*crt.TLS, unsafe.Pointer, *int8, uint64, func(*crt.TLS, unsafe.Pointer), uint8)
+ Xstrglob func(*crt.TLS, *int8, *int8) int32
+ Xvalue_dup func(*crt.TLS, unsafe.Pointer) unsafe.Pointer
+ Xvalue_free func(*crt.TLS, unsafe.Pointer)
+ Xresult_zeroblob64 func(*crt.TLS, unsafe.Pointer, uint64) int32
+ Xbind_zeroblob64 func(*crt.TLS, unsafe.Pointer, int32, uint64) int32
+ Xvalue_subtype func(*crt.TLS, unsafe.Pointer) uint32
+ Xresult_subtype func(*crt.TLS, unsafe.Pointer, uint32)
+ Xstatus64 func(*crt.TLS, int32, *int64, *int64, int32) int32
+ Xstrlike func(*crt.TLS, *int8, *int8, uint32) int32
+ Xdb_cacheflush func(*crt.TLS, unsafe.Pointer) int32
+ Xsystem_errno func(*crt.TLS, unsafe.Pointer) int32
+ Xtrace_v2 func(*crt.TLS, unsafe.Pointer, uint32, func(*crt.TLS, uint32, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) int32, unsafe.Pointer) int32
+ Xexpanded_sql func(*crt.TLS, unsafe.Pointer) *int8
+ Xset_last_insert_rowid func(*crt.TLS, unsafe.Pointer, int64)
+} // struct{aggregate_context *func(*struct{},int32)*struct{},aggregate_count *func(*struct{})int32,bind_blob *func(*struct{},int32,*struct{},int32,*func(*struct{}))int32,bind_double *func(*struct{},int32,float64)int32,bind_int *func(*struct{},int32,int32)int32,bind_int64 *func(*struct{},int32,int64)int32,bind_null *func(*struct{},int32)int32,bind_parameter_count *func(*struct{})int32,bind_parameter_index *func(*struct{},*int8)int32,bind_parameter_name *func(*struct{},int32)*int8,bind_text *func(*struct{},int32,*int8,int32,*func(*struct{}))int32,bind_text16 *func(*struct{},int32,*struct{},int32,*func(*struct{}))int32,bind_value *func(*struct{},int32,*struct{})int32,busy_handler *func(*struct{},*func(*struct{},int32)int32,*struct{})int32,busy_timeout *func(*struct{},int32)int32,changes *func(*struct{})int32,close *func(*struct{})int32,collation_needed *func(*struct{},*struct{},*func(*struct{},*struct{},int32,*int8))int32,collation_needed16 *func(*struct{},*struct{},*func(*struct{},*struct{},int32,*struct{}))int32,column_blob *func(*struct{},int32)*struct{},column_bytes *func(*struct{},int32)int32,column_bytes16 *func(*struct{},int32)int32,column_count *func(*struct{})int32,column_database_name *func(*struct{},int32)*int8,column_database_name16 *func(*struct{},int32)*struct{},column_decltype *func(*struct{},int32)*int8,column_decltype16 *func(*struct{},int32)*struct{},column_double *func(*struct{},int32)float64,column_int *func(*struct{},int32)int32,column_int64 *func(*struct{},int32)int64,column_name *func(*struct{},int32)*int8,column_name16 *func(*struct{},int32)*struct{},column_origin_name *func(*struct{},int32)*int8,column_origin_name16 *func(*struct{},int32)*struct{},column_table_name *func(*struct{},int32)*int8,column_table_name16 *func(*struct{},int32)*struct{},column_text *func(*struct{},int32)*uint8,column_text16 *func(*struct{},int32)*struct{},column_type *func(*struct{},int32)int32,column_value *func(*struct{},int32)*struct{},commit_hook *func(*struct{},*func(*struct{})int32,*struct{})*struct{},complete *func(*int8)int32,complete16 *func(*struct{})int32,create_collation *func(*struct{},*int8,int32,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32)int32,create_collation16 *func(*struct{},*struct{},int32,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32)int32,create_function *func(*struct{},*int8,int32,int32,*struct{},*func(*struct{},int32,**struct{}),*func(*struct{},int32,**struct{}),*func(*struct{}))int32,create_function16 *func(*struct{},*struct{},int32,int32,*struct{},*func(*struct{},int32,**struct{}),*func(*struct{},int32,**struct{}),*func(*struct{}))int32,create_module *func(*struct{},*int8,*struct{},*struct{})int32,data_count *func(*struct{})int32,db_handle *func(*struct{})*struct{},declare_vtab *func(*struct{},*int8)int32,enable_shared_cache *func(int32)int32,errcode *func(*struct{})int32,errmsg *func(*struct{})*int8,errmsg16 *func(*struct{})*struct{},exec *func(*struct{},*int8,*func(*struct{},int32,**int8,**int8)int32,*struct{},**int8)int32,expired *func(*struct{})int32,finalize *func(*struct{})int32,free *func(*struct{}),free_table *func(**int8),get_autocommit *func(*struct{})int32,get_auxdata *func(*struct{},int32)*struct{},get_table *func(*struct{},*int8,***int8,*int32,*int32,**int8)int32,global_recover *func()int32,interruptx *func(*struct{}),last_insert_rowid *func(*struct{})int64,libversion *func()*int8,libversion_number *func()int32,malloc *func(int32)*struct{},mprintf *func(*int8...)*int8,open *func(*int8,**struct{})int32,open16 *func(*struct{},**struct{})int32,prepare *func(*struct{},*int8,int32,**struct{},**int8)int32,prepare16 *func(*struct{},*struct{},int32,**struct{},**struct{})int32,profile *func(*struct{},*func(*struct{},*int8,uint64),*struct{})*struct{},progress_handler *func(*struct{},int32,*func(*struct{})int32,*struct{}),realloc *func(*struct{},int32)*struct{},reset *func(*struct{})int32,result_blob *func(*struct{},*struct{},int32,*func(*struct{})),result_double *func(*struct{},float64),result_error *func(*struct{},*int8,int32),result_error16 *func(*struct{},*struct{},int32),result_int *func(*struct{},int32),result_int64 *func(*struct{},int64),result_null *func(*struct{}),result_text *func(*struct{},*int8,int32,*func(*struct{})),result_text16 *func(*struct{},*struct{},int32,*func(*struct{})),result_text16be *func(*struct{},*struct{},int32,*func(*struct{})),result_text16le *func(*struct{},*struct{},int32,*func(*struct{})),result_value *func(*struct{},*struct{}),rollback_hook *func(*struct{},*func(*struct{}),*struct{})*struct{},set_authorizer *func(*struct{},*func(*struct{},int32,*int8,*int8,*int8,*int8)int32,*struct{})int32,set_auxdata *func(*struct{},int32,*struct{},*func(*struct{})),snprintf *func(int32,*int8,*int8...)*int8,step *func(*struct{})int32,table_column_metadata *func(*struct{},*int8,*int8,*int8,**int8,**int8,*int32,*int32,*int32)int32,thread_cleanup *func(),total_changes *func(*struct{})int32,trace *func(*struct{},*func(*struct{},*int8),*struct{})*struct{},transfer_bindings *func(*struct{},*struct{})int32,update_hook *func(*struct{},*func(*struct{},int32,*int8,*int8,int64),*struct{})*struct{},user_data *func(*struct{})*struct{},value_blob *func(*struct{})*struct{},value_bytes *func(*struct{})int32,value_bytes16 *func(*struct{})int32,value_double *func(*struct{})float64,value_int *func(*struct{})int32,value_int64 *func(*struct{})int64,value_numeric_type *func(*struct{})int32,value_text *func(*struct{})*uint8,value_text16 *func(*struct{})*struct{},value_text16be *func(*struct{})*struct{},value_text16le *func(*struct{})*struct{},value_type *func(*struct{})int32,vmprintf *func(*int8,*struct{})*int8,overload_function *func(*struct{},*int8,int32)int32,prepare_v2 *func(*struct{},*int8,int32,**struct{},**int8)int32,prepare16_v2 *func(*struct{},*struct{},int32,**struct{},**struct{})int32,clear_bindings *func(*struct{})int32,create_module_v2 *func(*struct{},*int8,*struct{},*struct{},*func(*struct{}))int32,bind_zeroblob *func(*struct{},int32,int32)int32,blob_bytes *func(*struct{})int32,blob_close *func(*struct{})int32,blob_open *func(*struct{},*int8,*int8,*int8,int64,int32,**struct{})int32,blob_read *func(*struct{},*struct{},int32,int32)int32,blob_write *func(*struct{},*struct{},int32,int32)int32,create_collation_v2 *func(*struct{},*int8,int32,*struct{},*func(*struct{},int32,*struct{},int32,*struct{})int32,*func(*struct{}))int32,file_control *func(*struct{},*int8,int32,*struct{})int32,memory_highwater *func(int32)int64,memory_used *func()int64,mutex_alloc *func(int32)*struct{},mutex_enter *func(*struct{}),mutex_free *func(*struct{}),mutex_leave *func(*struct{}),mutex_try *func(*struct{})int32,open_v2 *func(*int8,**struct{},int32,*int8)int32,release_memory *func(int32)int32,result_error_nomem *func(*struct{}),result_error_toobig *func(*struct{}),sleep *func(int32)int32,soft_heap_limit *func(int32),vfs_find *func(*int8)*struct{},vfs_register *func(*struct{},int32)int32,vfs_unregister *func(*struct{})int32,xthreadsafe *func()int32,result_zeroblob *func(*struct{},int32),result_error_code *func(*struct{},int32),test_control *func(int32...)int32,randomness *func(int32,*struct{}),context_db_handle *func(*struct{})*struct{},extended_result_codes *func(*struct{},int32)int32,limit *func(*struct{},int32,int32)int32,next_stmt *func(*struct{},*struct{})*struct{},sql *func(*struct{})*int8,status *func(int32,*int32,*int32,int32)int32,backup_finish *func(*struct{})int32,backup_init *func(*struct{},*int8,*struct{},*int8)*struct{},backup_pagecount *func(*struct{})int32,backup_remaining *func(*struct{})int32,backup_step *func(*struct{},int32)int32,compileoption_get *func(int32)*int8,compileoption_used *func(*int8)int32,create_function_v2 *func(*struct{},*int8,int32,int32,*struct{},*func(*struct{},int32,**struct{}),*func(*struct{},int32,**struct{}),*func(*struct{}),*func(*struct{}))int32,db_config *func(*struct{},int32...)int32,db_mutex *func(*struct{})*struct{},db_status *func(*struct{},int32,*int32,*int32,int32)int32,extended_errcode *func(*struct{})int32,log *func(int32,*int8...),soft_heap_limit64 *func(int64)int64,sourceid *func()*int8,stmt_status *func(*struct{},int32,int32)int32,strnicmp *func(*int8,*int8,int32)int32,unlock_notify *func(*struct{},*func(**struct{},int32),*struct{})int32,wal_autocheckpoint *func(*struct{},int32)int32,wal_checkpoint *func(*struct{},*int8)int32,wal_hook *func(*struct{},*func(*struct{},*struct{},*int8,int32)int32,*struct{})*struct{},blob_reopen *func(*struct{},int64)int32,vtab_config *func(*struct{},int32...)int32,vtab_on_conflict *func(*struct{})int32,close_v2 *func(*struct{})int32,db_filename *func(*struct{},*int8)*int8,db_readonly *func(*struct{},*int8)int32,db_release_memory *func(*struct{})int32,errstr *func(int32)*int8,stmt_busy *func(*struct{})int32,stmt_readonly *func(*struct{})int32,stricmp *func(*int8,*int8)int32,uri_boolean *func(*int8,*int8,int32)int32,uri_int64 *func(*int8,*int8,int64)int64,uri_parameter *func(*int8,*int8)*int8,vsnprintf *func(int32,*int8,*int8,*struct{})*int8,wal_checkpoint_v2 *func(*struct{},*int8,int32,*int32,*int32)int32,auto_extension *func(*func())int32,bind_blob64 *func(*struct{},int32,*struct{},uint64,*func(*struct{}))int32,bind_text64 *func(*struct{},int32,*int8,uint64,*func(*struct{}),uint8)int32,cancel_auto_extension *func(*func())int32,load_extension *func(*struct{},*int8,*int8,**int8)int32,malloc64 *func(uint64)*struct{},msize *func(*struct{})uint64,realloc64 *func(*struct{},uint64)*struct{},reset_auto_extension *func(),result_blob64 *func(*struct{},*struct{},uint64,*func(*struct{})),result_text64 *func(*struct{},*int8,uint64,*func(*struct{}),uint8),strglob *func(*int8,*int8)int32,value_dup *func(*struct{})*struct{},value_free *func(*struct{}),result_zeroblob64 *func(*struct{},uint64)int32,bind_zeroblob64 *func(*struct{},int32,uint64)int32,value_subtype *func(*struct{})uint32,result_subtype *func(*struct{},uint32),status64 *func(int32,*int64,*int64,int32)int32,strlike *func(*int8,*int8,uint32)int32,db_cacheflush *func(*struct{})int32,system_errno *func(*struct{})int32,trace_v2 *func(*struct{},uint32,*func(uint32,*struct{},*struct{},*struct{})int32,*struct{})int32,expanded_sql *func(*struct{})*int8,set_last_insert_rowid *func(*struct{},int64)}
+
+type t18 struct {
X [0]struct {
- X0 [64]uint8
- X1 [16]uint32
+ Xin [64]uint8
+ Xin32 [16]uint32
}
U [64]byte
-} // union{[64]uint8,[16]uint32}
+} // union{in [64]uint8,in32 [16]uint32}
func str(n int) *int8 { return (*int8)(unsafe.Pointer(&strTab[n])) }
func wstr(n int) *int32 { return (*int32)(unsafe.Pointer(&strTab[n])) }
diff --git a/internal/threadtest4/threadtest4_linux_386.go b/internal/threadtest4/threadtest4_linux_386.go
index 60b3c65..9a25b43 100644
--- a/internal/threadtest4/threadtest4_linux_386.go
+++ b/internal/threadtest4/threadtest4_linux_386.go
@@ -1,36 +1,36 @@
// Code generated by ccgo. DO NOT EDIT.
-// threadtest4.c
-
-// 2014-12-11
-//
-// 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 implements a simple standalone program used to stress the
-// SQLite library when accessing the same set of databases simultaneously
-// from multiple threads in shared-cache mode.
-//
-// This test program runs on unix-like systems only. It uses pthreads.
-// To compile:
-//
-// gcc -g -Wall -I. threadtest4.c sqlite3.c -ldl -lpthread
-//
-// To run:
-//
-// ./a.out 10
-//
-// The argument is the number of threads. There are also options, such
-// as -wal and -multithread and -serialized.
-//
-// Consider also compiling with clang instead of gcc and adding the
-// -fsanitize=thread option.
-
+// threadtest4
+// /*
+// ** 2014-12-11
+// **
+// ** 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 implements a simple standalone program used to stress the
+// ** SQLite library when accessing the same set of databases simultaneously
+// ** from multiple threads in shared-cache mode.
+// **
+// ** This test program runs on unix-like systems only. It uses pthreads.
+// ** To compile:
+// **
+// ** gcc -g -Wall -I. threadtest4.c sqlite3.c -ldl -lpthread
+// **
+// ** To run:
+// **
+// ** ./a.out 10
+// **
+// ** The argument is the number of threads. There are also options, such
+// ** as -wal and -multithread and -serialized.
+// **
+// ** Consider also compiling with clang instead of gcc and adding the
+// ** -fsanitize=thread option.
+// */
package main
import (
@@ -68,13 +68,13 @@ var X__stdfiles [3]unsafe.Pointer
var Xstdout unsafe.Pointer
func init() {
- Xstdout = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
+ Xstdout = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 4)
}
var Xstderr unsafe.Pointer
func init() {
- Xstderr = (unsafe.Pointer)(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
+ Xstderr = unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdfiles)) + 8)
}
func Xmain(tls *crt.TLS, _argc int32, _argv **int8) (r0 int32) {
@@ -85,104 +85,88 @@ func Xmain(tls *crt.TLS, _argc int32, _argv **int8) (r0 int32) {
var _wrMutex crt.Xpthread_mutex_t
var _infoTop XWorkerInfo
var _aInfo, _p *XWorkerInfo
- r0 = i32(0)
- _nWorker = i32(0)
- _wkrFlags = u32(0)
- _nErr = i32(0)
- _nTest = i32(0)
+ r0 = int32(0)
+ _nWorker = int32(0)
+ _wkrFlags = uint32(0)
+ _nErr = int32(0)
+ _nTest = int32(0)
_db = nil
- bin.Xsqlite3_config(tls, i32(2))
- _i = i32(1)
+ bin.Xsqlite3_config(tls, int32(2))
+ _i = int32(1)
_0:
if _i >= _argc {
goto _3
}
- _1_z = *(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(i32(0))))) != i32(45) {
+ _1_z = *elem0(_argv, uintptr(_i))
+ if int32(*elem1(_1_z, 0)) != int32(45) {
goto _4
}
- if (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(i32(1))))) == i32(45)) && (int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(i32(2))))) != i32(0)) {
+ if (int32(*elem1(_1_z, uintptr(1))) == int32(45)) && (int32(*elem1(_1_z, uintptr(2))) != int32(0)) {
*(*uintptr)(unsafe.Pointer(&_1_z)) += uintptr(1)
}
- if crt.Xstrcmp(tls, _1_z, str(0)) == i32(0) {
- bin.Xsqlite3_config(tls, i32(2))
- {
- p := &_wkrFlags
- *p = (*p) & uint32(i32(-2))
- sink0(*p)
- }
+ if crt.Xstrcmp(tls, _1_z, str(0)) == int32(0) {
+ bin.Xsqlite3_config(tls, int32(2))
+ _wkrFlags &= uint32(4294967294)
goto _14
}
- if crt.Xstrcmp(tls, _1_z, str(13)) == i32(0) {
- bin.Xsqlite3_config(tls, i32(3))
- {
- p := &_wkrFlags
- *p = (*p) | uint32(i32(1))
- sink0(*p)
- }
+ if crt.Xstrcmp(tls, _1_z, str(13)) == int32(0) {
+ bin.Xsqlite3_config(tls, int32(3))
+ _wkrFlags |= uint32(1)
goto _14
}
- if crt.Xstrcmp(tls, _1_z, str(25)) == i32(0) {
- {
- p := &_wkrFlags
- *p = (*p) | uint32(i32(2))
- sink0(*p)
- }
+ if crt.Xstrcmp(tls, _1_z, str(25)) == int32(0) {
+ _wkrFlags |= uint32(2)
goto _14
}
- if crt.Xstrcmp(tls, _1_z, str(30)) == i32(0) {
- {
- p := &_wkrFlags
- *p = (*p) | uint32(i32(4))
- sink0(*p)
- }
+ if crt.Xstrcmp(tls, _1_z, str(30)) == int32(0) {
+ _wkrFlags |= uint32(4)
goto _14
}
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(37), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))))
- crt.Xexit(tls, i32(1))
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(37), unsafe.Pointer(*elem0(_argv, uintptr(_i))))
+ crt.Xexit(tls, int32(1))
_14:
goto _20
_4:
- if int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(i32(0))))) < i32(49) || int32(*(*int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_1_z)) + 1*uintptr(i32(0))))) > i32(57) || _nWorker != i32(0) {
+ if int32(*elem1(_1_z, 0)) < int32(49) || int32(*elem1(_1_z, 0)) > int32(57) || _nWorker != int32(0) {
goto _18
}
_nWorker = crt.Xatoi(tls, _1_z)
- if _nWorker < i32(2) {
+ if _nWorker < int32(2) {
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(70))
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
goto _20
_18:
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(92), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(_i)))))
- crt.Xexit(tls, i32(1))
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(92), unsafe.Pointer(*elem0(_argv, uintptr(_i))))
+ crt.Xexit(tls, int32(1))
_20:
_i += 1
goto _0
_3:
- if _nWorker == i32(0) {
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(127), unsafe.Pointer(*(**int8)(unsafe.Pointer(uintptr((unsafe.Pointer)(_argv)) + 4*uintptr(i32(0))))))
- crt.Xexit(tls, i32(1))
+ if _nWorker == int32(0) {
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(127), unsafe.Pointer(*elem0(_argv, 0)))
+ crt.Xexit(tls, int32(1))
}
if bin.Xsqlite3_threadsafe(tls) == 0 {
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(260))
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
bin.Xsqlite3_initialize(tls)
- bin.Xsqlite3_enable_shared_cache(tls, i32(1))
+ bin.Xsqlite3_enable_shared_cache(tls, int32(1))
crt.Xpthread_mutex_init(tls, &_wrMutex, nil)
crt.Xunlink(tls, str(299))
crt.Xunlink(tls, str(312))
crt.Xunlink(tls, str(325))
_rc = bin.Xsqlite3_open(tls, str(299), (**bin.Xsqlite3)(unsafe.Pointer(&_db)))
- if _rc != i32(0) {
+ if _rc != int32(0) {
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(338))
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
- crt.Xmemset(tls, (unsafe.Pointer)(&_infoTop), i32(0), u32(40))
- *(*unsafe.Pointer)(unsafe.Pointer(&(_infoTop.X4))) = _db
- *(*uint32)(unsafe.Pointer(&(_infoTop.X2))) = _wkrFlags
+ crt.Xmemset(tls, unsafe.Pointer(&_infoTop), int32(0), uint32(40))
+ _infoTop.Xdb = _db
+ _infoTop.XwkrFlags = _wkrFlags
_p = &_infoTop
- if (_wkrFlags & uint32(i32(2))) != 0 {
+ if (_wkrFlags & uint32(2)) != 0 {
_run_sql(tls, _p, str(382))
}
_run_sql(tls, _p, str(406))
@@ -197,212 +181,226 @@ _3:
_run_sql(tls, _p, str(743))
_run_sql(tls, _p, str(805))
_run_sql(tls, _p, str(841))
- _aInfo = (*XWorkerInfo)(_safe_malloc(tls, int32(u32(40)*uint32(_nWorker))))
- crt.Xmemset(tls, (unsafe.Pointer)(_aInfo), i32(0), u32(40)*uint32(_nWorker))
- _i = i32(0)
+ _aInfo = (*XWorkerInfo)(_safe_malloc(tls, int32(uint32(40)*uint32(_nWorker))))
+ crt.Xmemset(tls, unsafe.Pointer(_aInfo), int32(0), uint32(40)*uint32(_nWorker))
+ _i = int32(0)
_25:
if _i >= _nWorker {
goto _28
}
- *(*int32)(unsafe.Pointer(&((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo)) + 40*uintptr(_i))).X0))) = _i + i32(1)
- *(*int32)(unsafe.Pointer(&((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo)) + 40*uintptr(_i))).X1))) = _nWorker
- *(*uint32)(unsafe.Pointer(&((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo)) + 40*uintptr(_i))).X2))) = _wkrFlags
- *(*unsafe.Pointer)(unsafe.Pointer(&((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo)) + 40*uintptr(_i))).X3))) = _db
- *(**crt.Xpthread_mutex_t)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo)) + 40*uintptr(_i))).X9))))) = &_wrMutex
- _rc = crt.Xpthread_create(tls, (*uint32)(unsafe.Pointer(&((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo)) + 40*uintptr(_i))).X8))), nil, _worker_thread, (unsafe.Pointer)((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo))+40*uintptr(_i)))))
- if _rc != i32(0) {
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(876), _i+i32(1))
- crt.Xexit(tls, i32(1))
+ elem2(_aInfo, uintptr(_i)).Xtid = _i + int32(1)
+ elem2(_aInfo, uintptr(_i)).XnWorker = _nWorker
+ elem2(_aInfo, uintptr(_i)).XwkrFlags = _wkrFlags
+ elem2(_aInfo, uintptr(_i)).XmainDb = _db
+ *(**crt.Xpthread_mutex_t)(unsafe.Pointer(&(elem2(_aInfo, uintptr(_i)).XpWrMutex))) = &_wrMutex
+ _rc = crt.Xpthread_create(tls, &(elem2(_aInfo, uintptr(_i)).Xid), nil, _worker_thread, unsafe.Pointer(elem2(_aInfo, uintptr(_i))))
+ if _rc != int32(0) {
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(876), _i+int32(1))
+ crt.Xexit(tls, int32(1))
}
crt.Xsched_yield(tls)
_i += 1
goto _25
_28:
- _i = i32(0)
+ _i = int32(0)
_30:
if _i >= _nWorker {
goto _33
}
- crt.Xpthread_join(tls, (*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo))+40*uintptr(_i))).X8, nil)
- crt.Xprintf(tls, str(914), (*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo))+40*uintptr(_i))).X0, (*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo))+40*uintptr(_i))).X5, (*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo))+40*uintptr(_i))).X6)
- if ((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo)) + 40*uintptr(_i))).X7) != nil {
- crt.Xprintf(tls, str(954), unsafe.Pointer((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo))+40*uintptr(_i))).X7))
+ crt.Xpthread_join(tls, elem2(_aInfo, uintptr(_i)).Xid, nil)
+ crt.Xprintf(tls, str(914), elem2(_aInfo, uintptr(_i)).Xtid, elem2(_aInfo, uintptr(_i)).XnErr, elem2(_aInfo, uintptr(_i)).XnTest)
+ if (elem2(_aInfo, uintptr(_i)).XzMsg) != nil {
+ crt.Xprintf(tls, str(954), unsafe.Pointer(elem2(_aInfo, uintptr(_i)).XzMsg))
goto _35
}
crt.Xprintf(tls, str(960))
_35:
- {
- p := &_nErr
- *p = (*p) + ((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo)) + 40*uintptr(_i))).X5)
- sink1(*p)
- }
- {
- p := &_nTest
- *p = (*p) + ((*XWorkerInfo)(unsafe.Pointer(uintptr((unsafe.Pointer)(_aInfo)) + 40*uintptr(_i))).X6)
- sink1(*p)
- }
+ _nErr += elem2(_aInfo, uintptr(_i)).XnErr
+ _nTest += elem2(_aInfo, uintptr(_i)).XnTest
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
_i += 1
goto _30
_33:
bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_db))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_aInfo))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_aInfo))
crt.Xprintf(tls, str(962), _nErr, _nTest)
return _nErr
-
- _ = _wrMutex
- _ = _infoTop
- panic(0)
}
-// Run a SQL statements. Panic if unable.
+// C comment
+// /*
+// ** Run a SQL statements. Panic if unable.
+// */
func _run_sql(tls *crt.TLS, _p *XWorkerInfo, _zFormat *int8, args ...interface{}) {
- var _rc, _nRetry int32
+ var _rc, _i, _nRetry int32
var _zSql *int8
var _pStmt unsafe.Pointer
var _ap []interface{}
_pStmt = nil
- _nRetry = i32(0)
+ _nRetry = int32(0)
_ap = args
_zSql = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
- _check_oom(tls, (unsafe.Pointer)(_zSql))
- _rc = bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_p.X4), _zSql, i32(-1), &_pStmt, nil)
- if _rc != i32(0) {
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(991), _rc, bin.Xsqlite3_extended_errcode(tls, (*bin.Xsqlite3)(_p.X4)), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_p.X4))), unsafe.Pointer(_zSql))
- crt.Xexit(tls, i32(1))
+ _check_oom(tls, unsafe.Pointer(_zSql))
+ _i = int32(0)
+_0:
+ if _i >= int32(1000) {
+ goto _3
+ }
+ _rc = bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_p.Xdb), _zSql, int32(-1), &_pStmt, nil)
+ if _rc == int32(0) {
+ goto _3
+ }
+ _i += 1
+ goto _0
+_3:
+ if _rc != int32(0) {
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(991), _rc, bin.Xsqlite3_extended_errcode(tls, (*bin.Xsqlite3)(_p.Xdb)), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_p.Xdb))), unsafe.Pointer(_zSql))
+ crt.Xexit(tls, int32(1))
}
_worker_trace(tls, _p, str(1036), unsafe.Pointer(_zSql))
-_1:
- if store1(&_rc, bin.Xsqlite3_step(tls, _pStmt)) == i32(101) {
- goto _2
+_6:
+ if store3(&_rc, bin.Xsqlite3_step(tls, _pStmt)) == int32(101) {
+ goto _7
}
- if (_rc&i32(255)) != i32(5) && (_rc&i32(255)) != i32(6) {
- goto _4
+ if (_rc&int32(255)) != int32(5) && (_rc&int32(255)) != int32(6) {
+ goto _9
}
bin.Xsqlite3_reset(tls, _pStmt)
_nRetry += 1
- if _nRetry < i32(10) {
+ if _nRetry < int32(10) {
_worker_trace(tls, _p, str(1049), _nRetry, unsafe.Pointer(_zSql))
crt.Xsched_yield(tls)
- goto _1
+ goto _6
}
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1067), _p.X0, unsafe.Pointer(_zSql))
- crt.Xexit(tls, i32(1))
-_4:
- if _rc != i32(100) {
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1109), _rc, bin.Xsqlite3_extended_errcode(tls, (*bin.Xsqlite3)(_p.X4)), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_p.X4))), unsafe.Pointer(_zSql))
- crt.Xexit(tls, i32(1))
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1067), _p.Xtid, unsafe.Pointer(_zSql))
+ crt.Xexit(tls, int32(1))
+_9:
+ if _rc != int32(100) {
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1109), _rc, bin.Xsqlite3_extended_errcode(tls, (*bin.Xsqlite3)(_p.Xdb)), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_p.Xdb))), unsafe.Pointer(_zSql))
+ crt.Xexit(tls, int32(1))
}
- goto _1
-_2:
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
+ goto _6
+_7:
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zSql))
bin.Xsqlite3_finalize(tls, _pStmt)
}
-// Report an OOM error and die if the argument is NULL
+// C comment
+// /*
+// ** Report an OOM error and die if the argument is NULL
+// */
func _check_oom(tls *crt.TLS, _x unsafe.Pointer) {
if _x == nil {
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1151))
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
}
-// Print a trace message for a worker
+// C comment
+// /*
+// ** Print a trace message for a worker
+// */
func _worker_trace(tls *crt.TLS, _p *XWorkerInfo, _zFormat *int8, args ...interface{}) {
var _zMsg *int8
var _ap []interface{}
- if ((_p.X2) & uint32(i32(4))) == uint32(i32(0)) {
+ if (_p.XwkrFlags & uint32(4)) == (0) {
return
}
_ap = args
_zMsg = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
- _check_oom(tls, (unsafe.Pointer)(_zMsg))
+ _check_oom(tls, unsafe.Pointer(_zMsg))
_ap = nil
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1166), _p.X0, unsafe.Pointer(_zMsg))
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zMsg))
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1166), _p.Xtid, unsafe.Pointer(_zMsg))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zMsg))
}
-// Allocate memory. If the allocation fails, print an error message and
-// kill the process.
+// C comment
+// /*
+// ** Allocate memory. If the allocation fails, print an error message and
+// ** kill the process.
+// */
func _safe_malloc(tls *crt.TLS, _sz int32) (r0 unsafe.Pointer) {
var _x unsafe.Pointer
_x = bin.Xsqlite3_malloc(tls, func() int32 {
- if _sz > i32(0) {
+ if _sz > int32(0) {
return _sz
}
- return i32(1)
+ return int32(1)
}())
_check_oom(tls, _x)
return _x
}
-// Each thread runs the following function.
+// C comment
+// /*
+// ** Each thread runs the following function.
+// */
func _worker_thread(tls *crt.TLS, _pArg unsafe.Pointer) (r0 unsafe.Pointer) {
var _iOuter, _i, _rc int32
var _pStmt unsafe.Pointer
var _p *XWorkerInfo
_p = (*XWorkerInfo)(_pArg)
- crt.Xprintf(tls, str(1183), _p.X0)
+ crt.Xprintf(tls, str(1183), _p.Xtid)
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
- _iOuter = i32(1)
+ _iOuter = int32(1)
_0:
- if _iOuter > (_p.X1) {
+ if _iOuter > _p.XnWorker {
goto _3
}
_worker_open_connection(tls, _p, _iOuter)
- _i = i32(0)
+ _i = int32(0)
_4:
- if _i >= i32(4) {
+ if _i >= int32(4) {
goto _7
}
- _worker_add_content(tls, _p, (_i*i32(100))+i32(1), (_i+i32(1))*i32(100), (((_p.X0)+_iOuter)%i32(3))+i32(1))
- _worker_add_content(tls, _p, (_i*i32(100))+i32(1), (_i+i32(1))*i32(100), ((((_p.X0)+_iOuter)+i32(1))%i32(3))+i32(1))
- _worker_add_content(tls, _p, (_i*i32(100))+i32(1), (_i+i32(1))*i32(100), ((((_p.X0)+_iOuter)+i32(2))%i32(3))+i32(1))
+ _worker_add_content(tls, _p, (_i*int32(100))+int32(1), (_i+int32(1))*int32(100), ((_p.Xtid+_iOuter)%int32(3))+int32(1))
+ _worker_add_content(tls, _p, (_i*int32(100))+int32(1), (_i+int32(1))*int32(100), (((_p.Xtid+_iOuter)+int32(1))%int32(3))+int32(1))
+ _worker_add_content(tls, _p, (_i*int32(100))+int32(1), (_i+int32(1))*int32(100), (((_p.Xtid+_iOuter)+int32(2))%int32(3))+int32(1))
_i += 1
goto _4
_7:
- _pStmt = _prep_sql(tls, _p.X4, str(1202), _p.X0)
+ _pStmt = _prep_sql(tls, _p.Xdb, str(1202), _p.Xtid)
_worker_trace(tls, _p, str(1239), unsafe.Pointer(bin.Xsqlite3_sql(tls, _pStmt)))
_rc = bin.Xsqlite3_step(tls, _pStmt)
- if _rc != i32(100) {
+ if _rc != int32(100) {
_worker_error(tls, _p, str(1250), unsafe.Pointer(bin.Xsqlite3_sql(tls, _pStmt)))
goto _10
}
- if bin.Xsqlite3_column_int(tls, _pStmt, i32(0)) != i32(400) {
- _worker_error(tls, _p, str(1269), bin.Xsqlite3_column_int(tls, _pStmt, i32(0)))
+ if bin.Xsqlite3_column_int(tls, _pStmt, int32(0)) != int32(400) {
+ _worker_error(tls, _p, str(1269), bin.Xsqlite3_column_int(tls, _pStmt, int32(0)))
}
_10:
bin.Xsqlite3_finalize(tls, _pStmt)
- if (_p.X5) != 0 {
+ if _p.XnErr != 0 {
goto _3
}
- if ((_iOuter + (_p.X0)) % i32(3)) == i32(0) {
- bin.Xsqlite3_db_release_memory(tls, (*bin.Xsqlite3)(_p.X4))
- *(*int32)(unsafe.Pointer(&(_p.X6))) += 1
+ if ((_iOuter + _p.Xtid) % int32(3)) == int32(0) {
+ bin.Xsqlite3_db_release_memory(tls, (*bin.Xsqlite3)(_p.Xdb))
+ _p.XnTest += 1
}
- crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
+ crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
_run_sql(tls, _p, str(1286))
_run_sql(tls, _p, str(1293))
_run_sql(tls, _p, str(1325))
_run_sql(tls, _p, str(1357))
_run_sql(tls, _p, str(1389))
- *(*int32)(unsafe.Pointer(&(_p.X6))) += 1
- crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- if _iOuter == (_p.X0) {
- crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
+ _p.XnTest += 1
+ crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ if _iOuter == _p.Xtid {
+ crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
_run_sql(tls, _p, str(1399))
- crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
+ crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
}
- _pStmt = _prep_sql(tls, _p.X4, str(1406), _p.X0, _p.X0, _p.X0)
+ _pStmt = _prep_sql(tls, _p.Xdb, str(1406), _p.Xtid, _p.Xtid, _p.Xtid)
_worker_trace(tls, _p, str(1239), unsafe.Pointer(bin.Xsqlite3_sql(tls, _pStmt)))
- _i = i32(0)
+ _i = int32(0)
_14:
- if _i >= (_p.X1) {
+ if _i >= _p.XnWorker {
goto _17
}
_rc = bin.Xsqlite3_step(tls, _pStmt)
- if _rc != i32(100) {
+ if _rc != int32(100) {
_worker_error(tls, _p, str(1250), unsafe.Pointer(bin.Xsqlite3_sql(tls, _pStmt)))
goto _17
}
@@ -411,58 +409,64 @@ _14:
goto _14
_17:
bin.Xsqlite3_finalize(tls, _pStmt)
- if (_p.X5) != 0 {
+ if _p.XnErr != 0 {
goto _3
}
- _worker_delete_all_content(tls, _p, ((_p.X0)+_iOuter)%i32(2))
+ _worker_delete_all_content(tls, _p, (_p.Xtid+_iOuter)%int32(2))
_worker_close_connection(tls, _p)
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))) = nil
+ _p.Xdb = nil
_iOuter += 1
goto _0
_3:
_worker_close_connection(tls, _p)
- crt.Xprintf(tls, str(1552), _p.X0)
+ crt.Xprintf(tls, str(1552), _p.Xtid)
crt.Xfflush(tls, (*crt.XFILE)(Xstdout))
return nil
}
-// Open the database connection for WorkerInfo. The order in which
-// the files are opened is a function of the tid value.
+// C comment
+// /*
+// ** Open the database connection for WorkerInfo. The order in which
+// ** the files are opened is a function of the tid value.
+// */
func _worker_open_connection(tls *crt.TLS, _p *XWorkerInfo, _iCnt int32) {
var _x, _rc int32
var _zFile *int8
- _x = ((_p.X0) + _iCnt) % i32(6)
- _zFile = bin.Xsqlite3_mprintf(tls, str(1572), int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_worker_open_connectionØ00aOrderØ001))+3*uintptr(_x))))) + 1*uintptr(i32(0))))))
- _check_oom(tls, (unsafe.Pointer)(_zFile))
+ _x = (_p.Xtid + _iCnt) % int32(6)
+ _zFile = bin.Xsqlite3_mprintf(tls, str(1572), int32(*elem4((*uint8)(unsafe.Pointer(elem5((*[3]uint8)(unsafe.Pointer(&_worker_open_connectionØ00aOrderØ001)), uintptr(_x)))), 0)))
+ _check_oom(tls, unsafe.Pointer(_zFile))
_worker_trace(tls, _p, str(1586), unsafe.Pointer(_zFile))
- _rc = bin.Xsqlite3_open_v2(tls, _zFile, (**bin.Xsqlite3)(unsafe.Pointer((*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))))), i32(131074), nil)
- if _rc != i32(0) {
- crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1594), unsafe.Pointer(_zFile), _p.X0)
- crt.Xexit(tls, i32(1))
+ _rc = bin.Xsqlite3_open_v2(tls, _zFile, (**bin.Xsqlite3)(unsafe.Pointer(&_p.Xdb)), int32(131074), nil)
+ if _rc != int32(0) {
+ crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(1594), unsafe.Pointer(_zFile), _p.Xtid)
+ crt.Xexit(tls, int32(1))
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zFile))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zFile))
_run_sql(tls, _p, str(1634))
- bin.Xsqlite3_busy_timeout(tls, (*bin.Xsqlite3)(_p.X4), i32(10000))
+ bin.Xsqlite3_busy_timeout(tls, (*bin.Xsqlite3)(_p.Xdb), int32(10000))
_run_sql(tls, _p, str(1662))
- _run_sql(tls, _p, str(1686), int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_worker_open_connectionØ00aOrderØ001))+3*uintptr(_x))))) + 1*uintptr(i32(1))))))
- _run_sql(tls, _p, str(1717), int32(*(*uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)((*[3]uint8)(unsafe.Pointer(uintptr((unsafe.Pointer)(&_worker_open_connectionØ00aOrderØ001))+3*uintptr(_x))))) + 1*uintptr(i32(2))))))
+ _run_sql(tls, _p, str(1686), int32(*elem4((*uint8)(unsafe.Pointer(elem5((*[3]uint8)(unsafe.Pointer(&_worker_open_connectionØ00aOrderØ001)), uintptr(_x)))), uintptr(1))))
+ _run_sql(tls, _p, str(1717), int32(*elem4((*uint8)(unsafe.Pointer(elem5((*[3]uint8)(unsafe.Pointer(&_worker_open_connectionØ00aOrderØ001)), uintptr(_x)))), uintptr(2))))
}
var _worker_open_connectionØ00aOrderØ001 [6][3]uint8
func init() {
- _worker_open_connectionØ00aOrderØ001 = [6][3]uint8{[3]uint8{u8(1), u8(2), u8(3)}, [3]uint8{u8(1), u8(3), u8(2)}, [3]uint8{u8(2), u8(1), u8(3)}, [3]uint8{u8(2), u8(3), u8(1)}, [3]uint8{u8(3), u8(1), u8(2)}, [3]uint8{u8(3), u8(2), u8(1)}}
+ _worker_open_connectionØ00aOrderØ001 = [6][3]uint8{[3]uint8{uint8(1), uint8(2), uint8(3)}, [3]uint8{uint8(1), uint8(3), uint8(2)}, [3]uint8{uint8(2), uint8(1), uint8(3)}, [3]uint8{uint8(2), uint8(3), uint8(1)}, [3]uint8{uint8(3), uint8(1), uint8(2)}, [3]uint8{uint8(3), uint8(2), uint8(1)}}
}
-// Create rows mn through mx in table iTab for the given worker
+// C comment
+// /*
+// ** Create rows mn through mx in table iTab for the given worker
+// */
func _worker_add_content(tls *crt.TLS, _p *XWorkerInfo, _mn int32, _mx int32, _iTab int32) {
var _zTabDef *int8
switch _iTab {
- case i32(1):
+ case int32(1):
goto _1
- case i32(2):
+ case int32(2):
goto _2
- case i32(3):
+ case int32(3):
goto _3
default:
goto _4
@@ -478,15 +482,18 @@ _3:
_zTabDef = str(1782)
goto _4
_4:
- crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- _run_sql(tls, _p, str(1799), _mn, _mx, unsafe.Pointer(_zTabDef), _p.X0)
- crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- *(*int32)(unsafe.Pointer(&(_p.X6))) += 1
+ crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ _run_sql(tls, _p, str(1799), _mn, _mx, unsafe.Pointer(_zTabDef), _p.Xtid)
+ crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ _p.XnTest += 1
}
-// Prepare a single SQL query
+// C comment
+// /*
+// ** Prepare a single SQL query
+// */
func _prep_sql(tls *crt.TLS, _db unsafe.Pointer, _zFormat *int8, args ...interface{}) (r0 unsafe.Pointer) {
- var _rc int32
+ var _rc, _i int32
var _zSql *int8
var _pStmt unsafe.Pointer
var _ap []interface{}
@@ -494,63 +501,83 @@ func _prep_sql(tls *crt.TLS, _db unsafe.Pointer, _zFormat *int8, args ...interfa
_ap = args
_zSql = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
- _check_oom(tls, (unsafe.Pointer)(_zSql))
- _rc = bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_db), _zSql, i32(-1), &_pStmt, nil)
- if _rc != i32(0) {
+ _check_oom(tls, unsafe.Pointer(_zSql))
+ _i = int32(0)
+_0:
+ if _i >= int32(1000) {
+ goto _3
+ }
+ _rc = bin.Xsqlite3_prepare_v2(tls, (*bin.Xsqlite3)(_db), _zSql, int32(-1), &_pStmt, nil)
+ if _rc == int32(0) {
+ goto _3
+ }
+ _i += 1
+ goto _0
+_3:
+ if _rc != int32(0) {
crt.Xfprintf(tls, (*crt.XFILE)(Xstderr), str(991), _rc, bin.Xsqlite3_extended_errcode(tls, (*bin.Xsqlite3)(_db)), unsafe.Pointer(bin.Xsqlite3_errmsg(tls, (*bin.Xsqlite3)(_db))), unsafe.Pointer(_zSql))
- crt.Xexit(tls, i32(1))
+ crt.Xexit(tls, int32(1))
}
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_zSql))
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_zSql))
return _pStmt
}
-// Set an error message on a worker
+// C comment
+// /*
+// ** Set an error message on a worker
+// */
func _worker_error(tls *crt.TLS, _p *XWorkerInfo, _zFormat *int8, args ...interface{}) {
var _ap []interface{}
- *(*int32)(unsafe.Pointer(&(_p.X5))) += 1
- bin.Xsqlite3_free(tls, (unsafe.Pointer)(_p.X7))
+ _p.XnErr += 1
+ bin.Xsqlite3_free(tls, unsafe.Pointer(_p.XzMsg))
_ap = args
- *(**int8)(unsafe.Pointer(&(_p.X7))) = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
+ _p.XzMsg = bin.Xsqlite3_vmprintf(tls, _zFormat, _ap)
_ap = nil
}
-// Delete all content in the three databases associated with a
-// single thread. Make this happen all in a single transaction if
-// inTrans is true, or separately for each database if inTrans is
-// false.
+// C comment
+// /*
+// ** Delete all content in the three databases associated with a
+// ** single thread. Make this happen all in a single transaction if
+// ** inTrans is true, or separately for each database if inTrans is
+// ** false.
+// */
func _worker_delete_all_content(tls *crt.TLS, _p *XWorkerInfo, _inTrans int32) {
if _inTrans != 0 {
- crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
+ crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
_run_sql(tls, _p, str(1947))
- _run_sql(tls, _p, str(1953), _p.X0)
- _run_sql(tls, _p, str(1981), _p.X0)
- _run_sql(tls, _p, str(2009), _p.X0)
+ _run_sql(tls, _p, str(1953), _p.Xtid)
+ _run_sql(tls, _p, str(1981), _p.Xtid)
+ _run_sql(tls, _p, str(2009), _p.Xtid)
_run_sql(tls, _p, str(2037))
- crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- *(*int32)(unsafe.Pointer(&(_p.X6))) += 1
+ crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ _p.XnTest += 1
goto _1
}
- crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- _run_sql(tls, _p, str(1953), _p.X0)
- crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- *(*int32)(unsafe.Pointer(&(_p.X6))) += 1
- crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- _run_sql(tls, _p, str(1981), _p.X0)
- crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- *(*int32)(unsafe.Pointer(&(_p.X6))) += 1
- crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- _run_sql(tls, _p, str(2009), _p.X0)
- crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.X9))
- *(*int32)(unsafe.Pointer(&(_p.X6))) += 1
+ crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ _run_sql(tls, _p, str(1953), _p.Xtid)
+ crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ _p.XnTest += 1
+ crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ _run_sql(tls, _p, str(1981), _p.Xtid)
+ crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ _p.XnTest += 1
+ crt.Xpthread_mutex_lock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ _run_sql(tls, _p, str(2009), _p.Xtid)
+ crt.Xpthread_mutex_unlock(tls, (*crt.Xpthread_mutex_t)(_p.XpWrMutex))
+ _p.XnTest += 1
_1:
}
-// Close the worker database connection
+// C comment
+// /*
+// ** Close the worker database connection
+// */
func _worker_close_connection(tls *crt.TLS, _p *XWorkerInfo) {
- if (_p.X4) != nil {
+ if _p.Xdb != nil {
_worker_trace(tls, _p, str(2044))
- bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_p.X4))
- *(*unsafe.Pointer)(unsafe.Pointer(&(_p.X4))) = nil
+ bin.Xsqlite3_close(tls, (*bin.Xsqlite3)(_p.Xdb))
+ _p.Xdb = nil
}
}
@@ -561,35 +588,40 @@ func bool2int(b bool) int32 {
return 0
}
func bug20530(interface{}) {} //TODO remove when https://github.com/golang/go/issues/20530 is fixed.
-func i16(n int16) int16 { return n }
-func i32(n int32) int32 { return n }
-func i64(n int64) int64 { return n }
-func i8(n int8) int8 { return n }
func init() { nzf32 *= -1; nzf64 *= -1 }
-func u16(n uint16) uint16 { return n }
-func u32(n uint32) uint32 { return n }
-func u64(n uint64) uint64 { return n }
-func u8(n byte) byte { return n }
var inf = math.Inf(1)
-var nzf32 float32 // -0.0
-var nzf64 float64 // -0.0
-func sink1(int32) {} //TODO report GC bug
-func sink0(uint32) {} //TODO report GC bug
-func store1(p *int32, v int32) int32 { *p = v; return v }
+var nzf32 float32 // -0.0
+var nzf64 float64 // -0.0
+func elem0(a **int8, index uintptr) **int8 {
+ return (**int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 4*index))
+}
+func elem5(a *[3]uint8, index uintptr) *[3]uint8 {
+ return (*[3]uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 3*index))
+}
+func elem1(a *int8, index uintptr) *int8 {
+ return (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 1*index))
+}
+func elem2(a *XWorkerInfo, index uintptr) *XWorkerInfo {
+ return (*XWorkerInfo)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 40*index))
+}
+func elem4(a *uint8, index uintptr) *uint8 {
+ return (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(a)) + 1*index))
+}
+func store3(p *int32, v int32) int32 { *p = v; return v }
type XWorkerInfo struct {
- X0 int32
- X1 int32
- X2 uint32
- X3 unsafe.Pointer
- X4 unsafe.Pointer
- X5 int32
- X6 int32
- X7 *int8
- X8 uint32
- X9 unsafe.Pointer
-} // t2 struct{int32,int32,uint32,*struct{},*struct{},int32,int32,*int8,uint32,*struct{}}
+ Xtid int32
+ XnWorker int32
+ XwkrFlags uint32
+ XmainDb unsafe.Pointer
+ Xdb unsafe.Pointer
+ XnErr int32
+ XnTest int32
+ XzMsg *int8
+ Xid uint32
+ XpWrMutex unsafe.Pointer
+} // t6 struct{tid int32,nWorker int32,wkrFlags uint32,mainDb *struct{},db *struct{},nErr int32,nTest int32,zMsg *int8,id uint32,pWrMutex *struct{}}
func str(n int) *int8 { return (*int8)(unsafe.Pointer(&strTab[n])) }
func wstr(n int) *int32 { return (*int32)(unsafe.Pointer(&strTab[n])) }